var Nl = Object.defineProperty; var Pl = (e, t, n) => t in e ? Nl(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var qt = (e, t, n) => (Pl(e, typeof t != "symbol" ? t + "" : t, n), n); class Il { constructor() { this.listeners = [], this.unexpectedErrorHandler = function(t) { setTimeout(() => { throw t.stack ? Ot.isErrorNoTelemetry(t) ? new Ot(t.message + ` ` + t.stack) : new Error(t.message + ` ` + t.stack) : t; }, 0); }; } addListener(t) { return this.listeners.push(t), () => { this._removeListener(t); }; } emit(t) { this.listeners.forEach((n) => { n(t); }); } _removeListener(t) { this.listeners.splice(this.listeners.indexOf(t), 1); } setUnexpectedErrorHandler(t) { this.unexpectedErrorHandler = t; } getUnexpectedErrorHandler() { return this.unexpectedErrorHandler; } onUnexpectedError(t) { this.unexpectedErrorHandler(t), this.emit(t); } // For external errors, we don't want the listeners to be called onUnexpectedExternalError(t) { this.unexpectedErrorHandler(t); } } const Ll = new Il(); function Po(e) { Tl(e) || Ll.onUnexpectedError(e); } function Ui(e) { if (e instanceof Error) { const { 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; } const Rr = "Canceled"; function Tl(e) { return e instanceof Wl ? !0 : e instanceof Error && e.name === Rr && e.message === Rr; } class Wl extends Error { constructor() { super(Rr), this.name = this.message; } } class Ot extends Error { constructor(t) { super(t), this.name = "CodeExpectedError"; } static fromError(t) { if (t instanceof Ot) return t; const n = new Ot(); return n.message = t.message, n.stack = t.stack, n; } static isErrorNoTelemetry(t) { return t.name === "CodeExpectedError"; } } class kt extends Error { constructor(t) { super(t || "An unexpected bug occurred."), Object.setPrototypeOf(this, kt.prototype); debugger; } } function Ol(e) { const t = this; let n = !1, r; return function() { return n || (n = !0, r = e.apply(t, arguments)), r; }; } var Ln; (function(e) { function t(w) { return w && typeof w == "object" && typeof w[Symbol.iterator] == "function"; } e.is = t; const n = Object.freeze([]); function r() { return n; } e.empty = r; function* i(w) { yield w; } e.single = i; function s(w) { return t(w) ? w : i(w); } e.wrap = s; function a(w) { return w || n; } e.from = a; function o(w) { return !w || w[Symbol.iterator]().next().done === !0; } e.isEmpty = o; function l(w) { return w[Symbol.iterator]().next().value; } e.first = l; function c(w, S) { for (const k of w) if (S(k)) return !0; return !1; } e.some = c; function h(w, S) { for (const k of w) if (S(k)) return k; } e.find = h; function* u(w, S) { for (const k of w) S(k) && (yield k); } e.filter = u; function* f(w, S) { let k = 0; for (const F of w) yield S(F, k++); } e.map = f; function* m(...w) { for (const S of w) for (const k of S) yield k; } e.concat = m; function b(w, S, k) { let F = k; for (const N of w) F = S(F, N); return F; } e.reduce = b; function* v(w, S, k = w.length) { for (S < 0 && (S += w.length), k < 0 ? k += w.length : k > w.length && (k = w.length); S < k; S++) yield w[S]; } e.slice = v; function y(w, S = Number.POSITIVE_INFINITY) { const k = []; if (S === 0) return [k, w]; const F = w[Symbol.iterator](); for (let N = 0; N < S; N++) { const B = F.next(); if (B.done) return [k, e.empty()]; k.push(B.value); } return [k, { [Symbol.iterator]() { return F; } }]; } e.consume = y; })(Ln || (Ln = {})); globalThis && globalThis.__awaiter; function Io(e) { if (Ln.is(e)) { const t = []; for (const n of e) if (n) try { n.dispose(); } catch (r) { t.push(r); } if (t.length === 1) throw t[0]; if (t.length > 1) throw new AggregateError(t, "Encountered errors while disposing of store"); return Array.isArray(e) ? [] : e; } else if (e) return e.dispose(), e; } function Ul(...e) { return Tn(() => Io(e)); } function Tn(e) { return { dispose: Ol(() => { e(); }) }; } class Ct { constructor() { this._toDispose = /* @__PURE__ */ new Set(), this._isDisposed = !1; } /** * 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() { this._isDisposed || (this._isDisposed = !0, 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) try { Io(this._toDispose); } finally { this._toDispose.clear(); } } /** * Add a new {@link IDisposable disposable} to the collection. */ add(t) { if (!t) return t; if (t === this) throw new Error("Cannot register a disposable on itself!"); return this._isDisposed ? Ct.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; } } Ct.DISABLE_DISPOSED_WARNING = !1; class rr { constructor() { this._store = new Ct(), this._store; } dispose() { this._store.dispose(); } /** * Adds `o` to the collection of disposables managed by this object. */ _register(t) { if (t === this) throw new Error("Cannot register a disposable on itself!"); return this._store.add(t); } } rr.None = Object.freeze({ dispose() { } }); class Vl { constructor() { this.dispose = () => { }, this.unset = () => { }, this.isset = () => !1; } set(t) { let n = t; return this.unset = () => n = void 0, this.isset = () => n !== void 0, this.dispose = () => { n && (n(), n = void 0); }, this; } } let re = class Er { constructor(t) { this.element = t, this.next = Er.Undefined, this.prev = Er.Undefined; } }; re.Undefined = new re(void 0); class Wn { constructor() { this._first = re.Undefined, this._last = re.Undefined, this._size = 0; } get size() { return this._size; } isEmpty() { return this._first === re.Undefined; } clear() { let t = this._first; for (; t !== re.Undefined; ) { const n = t.next; t.prev = re.Undefined, t.next = re.Undefined, t = n; } this._first = re.Undefined, this._last = re.Undefined, this._size = 0; } unshift(t) { return this._insert(t, !1); } push(t) { return this._insert(t, !0); } _insert(t, n) { const r = new re(t); if (this._first === re.Undefined) this._first = r, this._last = r; else if (n) { const s = this._last; this._last = r, r.prev = s, s.next = r; } else { const 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 !== re.Undefined) { const t = this._first.element; return this._remove(this._first), t; } } pop() { if (this._last !== re.Undefined) { const t = this._last.element; return this._remove(this._last), t; } } _remove(t) { if (t.prev !== re.Undefined && t.next !== re.Undefined) { const n = t.prev; n.next = t.next, t.next.prev = n; } else t.prev === re.Undefined && t.next === re.Undefined ? (this._first = re.Undefined, this._last = re.Undefined) : t.next === re.Undefined ? (this._last = this._last.prev, this._last.next = re.Undefined) : t.prev === re.Undefined && (this._first = this._first.next, this._first.prev = re.Undefined); this._size -= 1; } *[Symbol.iterator]() { let t = this._first; for (; t !== re.Undefined; ) yield t.element, t = t.next; } } globalThis && globalThis.__awaiter; let Bl = typeof document < "u" && document.location && document.location.hash.indexOf("pseudo=true") >= 0; function jl(e, t) { let n; return t.length === 0 ? n = e : n = e.replace(/\{(\d+)\}/g, (r, i) => { const s = i[0], a = t[s]; let o = r; return typeof a == "string" ? o = a : (typeof a == "number" || typeof a == "boolean" || a === void 0 || a === null) && (o = String(a)), o; }), Bl && (n = "[" + n.replace(/[aouei]/g, "$&$&") + "]"), n; } function ql(e, t, ...n) { return jl(t, n); } var lr; const Nt = "en"; let Dr = !1, Ar = !1, cr = !1, Lo = !1, wn, zn = Nt, Vi = Nt, $l, Oe; const Fe = typeof self == "object" ? self : typeof global == "object" ? global : {}; let ye; typeof Fe.vscode < "u" && typeof Fe.vscode.process < "u" ? ye = Fe.vscode.process : typeof process < "u" && (ye = process); const Hl = typeof ((lr = ye == null ? void 0 : ye.versions) === null || lr === void 0 ? void 0 : lr.electron) == "string", Gl = Hl && (ye == null ? void 0 : ye.type) === "renderer"; if (typeof navigator == "object" && !Gl) Oe = navigator.userAgent, Dr = Oe.indexOf("Windows") >= 0, Ar = Oe.indexOf("Macintosh") >= 0, (Oe.indexOf("Macintosh") >= 0 || Oe.indexOf("iPad") >= 0 || Oe.indexOf("iPhone") >= 0) && navigator.maxTouchPoints && navigator.maxTouchPoints > 0, cr = Oe.indexOf("Linux") >= 0, (Oe == null ? void 0 : Oe.indexOf("Mobi")) >= 0, Lo = !0, // 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. ql({ key: "ensureLoaderPluginIsLoaded", comment: ["{Locked}"] }, "_"), wn = Nt, zn = wn, Vi = navigator.language; else if (typeof ye == "object") { Dr = ye.platform === "win32", Ar = ye.platform === "darwin", cr = ye.platform === "linux", cr && ye.env.SNAP && ye.env.SNAP_REVISION, ye.env.CI || ye.env.BUILD_ARTIFACTSTAGINGDIRECTORY, wn = Nt, zn = Nt; const e = ye.env.VSCODE_NLS_CONFIG; if (e) try { const t = JSON.parse(e), n = t.availableLanguages["*"]; wn = t.locale, Vi = t.osLocale, zn = n || Nt, $l = t._translationsConfigFile; } catch { } } else console.error("Unable to resolve platform."); const sn = Dr, Jl = Ar; Lo && Fe.importScripts; const He = Oe, it = zn; var Bi; (function(e) { function t() { return it; } e.value = t; function n() { return it.length === 2 ? it === "en" : it.length >= 3 ? it[0] === "e" && it[1] === "n" && it[2] === "-" : !1; } e.isDefaultVariant = n; function r() { return it === "en"; } e.isDefault = r; })(Bi || (Bi = {})); const Xl = typeof Fe.postMessage == "function" && !Fe.importScripts; (() => { if (Xl) { const e = []; Fe.addEventListener("message", (n) => { if (n.data && n.data.vscodeScheduleAsyncWork) for (let r = 0, i = e.length; r < i; r++) { const s = e[r]; if (s.id === n.data.vscodeScheduleAsyncWork) { e.splice(r, 1), s.callback(); return; } } }); let t = 0; return (n) => { const r = ++t; e.push({ id: r, callback: n }), Fe.postMessage({ vscodeScheduleAsyncWork: r }, "*"); }; } return (e) => setTimeout(e); })(); const Yl = !!(He && He.indexOf("Chrome") >= 0); He && He.indexOf("Firefox") >= 0; !Yl && He && He.indexOf("Safari") >= 0; He && He.indexOf("Edg/") >= 0; He && He.indexOf("Android") >= 0; const Kl = Fe.performance && typeof Fe.performance.now == "function"; class ir { static create(t = !0) { return new ir(t); } constructor(t) { this._highResolution = Kl && t, this._startTime = this._now(), this._stopTime = -1; } stop() { this._stopTime = this._now(); } reset() { this._startTime = this._now(), this._stopTime = -1; } elapsed() { return this._stopTime !== -1 ? this._stopTime - this._startTime : this._now() - this._startTime; } _now() { return this._highResolution ? Fe.performance.now() : Date.now(); } } globalThis && globalThis.__awaiter; var zr; (function(e) { e.None = () => rr.None; function t(D, R) { return h(D, () => { }, 0, void 0, !0, void 0, R); } e.defer = t; function n(D) { return (R, I = null, P) => { let z = !1, V; return V = D((q) => { if (!z) return V ? V.dispose() : z = !0, R.call(I, q); }, null, P), z && V.dispose(), V; }; } e.once = n; function r(D, R, I) { return c((P, z = null, V) => D((q) => P.call(z, R(q)), null, V), I); } e.map = r; function i(D, R, I) { return c((P, z = null, V) => D((q) => { R(q), P.call(z, q); }, null, V), I); } e.forEach = i; function s(D, R, I) { return c((P, z = null, V) => D((q) => R(q) && P.call(z, q), null, V), I); } e.filter = s; function a(D) { return D; } e.signal = a; function o(...D) { return (R, I = null, P) => Ul(...D.map((z) => z((V) => R.call(I, V), null, P))); } e.any = o; function l(D, R, I, P) { let z = I; return r(D, (V) => (z = R(z, V), z), P); } e.reduce = l; function c(D, R) { let I; const P = { onWillAddFirstListener() { I = D(z.fire, z); }, onDidRemoveLastListener() { I == null || I.dispose(); } }, z = new $e(P); return R == null || R.add(z), z.event; } function h(D, R, I = 100, P = !1, z = !1, V, q) { let ie, de, A, C = 0, E; const L = { leakWarningThreshold: V, onWillAddFirstListener() { ie = D((X) => { C++, de = R(de, X), P && !A && (G.fire(de), de = void 0), E = () => { const Z = de; de = void 0, A = void 0, (!P || C > 1) && G.fire(Z), C = 0; }, typeof I == "number" ? (clearTimeout(A), A = setTimeout(E, I)) : A === void 0 && (A = 0, queueMicrotask(E)); }); }, onWillRemoveListener() { z && C > 0 && (E == null || E()); }, onDidRemoveLastListener() { E = void 0, ie.dispose(); } }, G = new $e(L); return q == null || q.add(G), G.event; } e.debounce = h; function u(D, R = 0, I) { return e.debounce(D, (P, z) => P ? (P.push(z), P) : [z], R, void 0, !0, void 0, I); } e.accumulate = u; function f(D, R = (P, z) => P === z, I) { let P = !0, z; return s(D, (V) => { const q = P || !R(V, z); return P = !1, z = V, q; }, I); } e.latch = f; function m(D, R, I) { return [ e.filter(D, R, I), e.filter(D, (P) => !R(P), I) ]; } e.split = m; function b(D, R = !1, I = []) { let P = I.slice(), z = D((ie) => { P ? P.push(ie) : q.fire(ie); }); const V = () => { P == null || P.forEach((ie) => q.fire(ie)), P = null; }, q = new $e({ onWillAddFirstListener() { z || (z = D((ie) => q.fire(ie))); }, onDidAddFirstListener() { P && (R ? setTimeout(V) : V()); }, onDidRemoveLastListener() { z && z.dispose(), z = null; } }); return q.event; } e.buffer = b; class v { constructor(R) { this.event = R, this.disposables = new Ct(); } /** @see {@link Event.map} */ map(R) { return new v(r(this.event, R, this.disposables)); } /** @see {@link Event.forEach} */ forEach(R) { return new v(i(this.event, R, this.disposables)); } filter(R) { return new v(s(this.event, R, this.disposables)); } /** @see {@link Event.reduce} */ reduce(R, I) { return new v(l(this.event, R, I, this.disposables)); } /** @see {@link Event.reduce} */ latch() { return new v(f(this.event, void 0, this.disposables)); } debounce(R, I = 100, P = !1, z = !1, V) { return new v(h(this.event, R, I, P, z, V, this.disposables)); } /** * Attach a listener to the event. */ on(R, I, P) { return this.event(R, I, P); } /** @see {@link Event.once} */ once(R, I, P) { return n(this.event)(R, I, P); } dispose() { this.disposables.dispose(); } } function y(D) { return new v(D); } e.chain = y; function w(D, R, I = (P) => P) { const P = (...ie) => q.fire(I(...ie)), z = () => D.on(R, P), V = () => D.removeListener(R, P), q = new $e({ onWillAddFirstListener: z, onDidRemoveLastListener: V }); return q.event; } e.fromNodeEventEmitter = w; function S(D, R, I = (P) => P) { const P = (...ie) => q.fire(I(...ie)), z = () => D.addEventListener(R, P), V = () => D.removeEventListener(R, P), q = new $e({ onWillAddFirstListener: z, onDidRemoveLastListener: V }); return q.event; } e.fromDOMEventEmitter = S; function k(D) { return new Promise((R) => n(D)(R)); } e.toPromise = k; function F(D, R) { return R(void 0), D((I) => R(I)); } e.runAndSubscribe = F; function N(D, R) { let I = null; function P(V) { I == null || I.dispose(), I = new Ct(), R(V, I); } P(void 0); const z = D((V) => P(V)); return Tn(() => { z.dispose(), I == null || I.dispose(); }); } e.runAndSubscribeWithStore = N; class B { constructor(R, I) { this.obs = R, this._counter = 0, this._hasChanged = !1; const P = { onWillAddFirstListener: () => { R.addObserver(this); }, onDidRemoveLastListener: () => { R.removeObserver(this); } }; this.emitter = new $e(P), I && I.add(this.emitter); } beginUpdate(R) { this._counter++; } handleChange(R, I) { this._hasChanged = !0; } endUpdate(R) { --this._counter === 0 && this._hasChanged && (this._hasChanged = !1, this.emitter.fire(this.obs.get())); } } function H(D, R) { return new B(D, R).emitter.event; } e.fromObservable = H; })(zr || (zr = {})); class Ut { constructor(t) { this.listenerCount = 0, this.invocationCount = 0, this.elapsedOverall = 0, this.durations = [], this.name = `${t}_${Ut._idPool++}`, Ut.all.add(this); } start(t) { this._stopWatch = new ir(!0), this.listenerCount = t; } stop() { if (this._stopWatch) { const t = this._stopWatch.elapsed(); this.durations.push(t), this.elapsedOverall += t, this.invocationCount += 1, this._stopWatch = void 0; } } } Ut.all = /* @__PURE__ */ new Set(); Ut._idPool = 0; let Ql = -1; class Zl { 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) { const r = this.threshold; if (r <= 0 || n < r) return; this._stacks || (this._stacks = /* @__PURE__ */ new Map()); const i = this._stacks.get(t.value) || 0; if (this._stacks.set(t.value, i + 1), this._warnCountdown -= 1, this._warnCountdown <= 0) { this._warnCountdown = r * 0.5; let s, a = 0; for (const [o, l] of this._stacks) (!s || a < l) && (s = o, a = l); console.warn(`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${a}):`), console.warn(s); } return () => { const s = this._stacks.get(t.value) || 0; this._stacks.set(t.value, s - 1); }; } } class fi { static create() { var t; return new fi((t = new Error().stack) !== null && t !== void 0 ? t : ""); } constructor(t) { this.value = t; } print() { console.warn(this.value.split(` `).slice(2).join(` `)); } } class ec { constructor(t, n, r) { this.callback = t, this.callbackThis = n, this.stack = r, this.subscription = new Vl(); } invoke(t) { this.callback.call(this.callbackThis, t); } } class $e { constructor(t) { var n, r, i, s, a; this._disposed = !1, this._options = t, this._leakageMon = !((n = this._options) === null || n === void 0) && n.leakWarningThreshold ? new Zl((i = (r = this._options) === null || r === void 0 ? void 0 : r.leakWarningThreshold) !== null && i !== void 0 ? i : Ql) : void 0, this._perfMon = !((s = this._options) === null || s === void 0) && s._profName ? new Ut(this._options._profName) : void 0, this._deliveryQueue = (a = this._options) === null || a === void 0 ? void 0 : a.deliveryQueue; } dispose() { var t, n, r, i; this._disposed || (this._disposed = !0, this._listeners && this._listeners.clear(), (t = this._deliveryQueue) === null || t === void 0 || t.clear(this), (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()); } /** * For the public to allow to subscribe * to events from this Emitter */ get event() { return this._event || (this._event = (t, n, r) => { var i, s, a; if (this._listeners || (this._listeners = new Wn()), this._leakageMon && this._listeners.size > this._leakageMon.threshold * 3) return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`), rr.None; const o = this._listeners.isEmpty(); o && (!((i = this._options) === null || i === void 0) && i.onWillAddFirstListener) && this._options.onWillAddFirstListener(this); let l, c; this._leakageMon && this._listeners.size >= Math.ceil(this._leakageMon.threshold * 0.2) && (c = fi.create(), l = this._leakageMon.check(c, this._listeners.size + 1)); const h = new ec(t, n, c), u = this._listeners.push(h); o && (!((s = this._options) === null || s === void 0) && s.onDidAddFirstListener) && this._options.onDidAddFirstListener(this), !((a = this._options) === null || a === void 0) && a.onDidAddListener && this._options.onDidAddListener(this, t, n); const f = h.subscription.set(() => { var m, b; l == null || l(), this._disposed || ((b = (m = this._options) === null || m === void 0 ? void 0 : m.onWillRemoveListener) === null || b === void 0 || b.call(m, this), u(), this._options && this._options.onDidRemoveLastListener && (this._listeners && !this._listeners.isEmpty() || this._options.onDidRemoveLastListener(this))); }); return r instanceof Ct ? r.add(f) : Array.isArray(r) && r.push(f), f; }), this._event; } /** * To be kept private to fire an event to * subscribers */ fire(t) { var n, r, i; if (this._listeners) { this._deliveryQueue || (this._deliveryQueue = new nc((n = this._options) === null || n === void 0 ? void 0 : n.onListenerError)); for (const s of this._listeners) this._deliveryQueue.push(this, s, t); (r = this._perfMon) === null || r === void 0 || r.start(this._deliveryQueue.size), this._deliveryQueue.deliver(), (i = this._perfMon) === null || i === void 0 || i.stop(); } } hasListeners() { return this._listeners ? !this._listeners.isEmpty() : !1; } } class tc { constructor(t = Po) { this._onListenerError = t, this._queue = new Wn(); } get size() { return this._queue.size; } push(t, n, r) { this._queue.push(new rc(t, n, r)); } clear(t) { const n = new Wn(); for (const r of this._queue) r.emitter !== t && n.push(r); this._queue = n; } deliver() { for (; this._queue.size > 0; ) { const t = this._queue.shift(); try { t.listener.invoke(t.event); } catch (n) { this._onListenerError(n); } } } } class nc extends tc { clear(t) { this._queue.clear(); } } class rc { constructor(t, n, r) { this.emitter = t, this.listener = n, this.event = r; } } function ic(e) { return typeof e == "string"; } function sc(e) { let t = [], n = Object.getPrototypeOf(e); for (; Object.prototype !== n; ) t = t.concat(Object.getOwnPropertyNames(n)), n = Object.getPrototypeOf(n); return t; } function Mr(e) { const t = []; for (const n of sc(e)) typeof e[n] == "function" && t.push(n); return t; } function ac(e, t) { const n = (i) => function() { const s = Array.prototype.slice.call(arguments, 0); return t(i, s); }, r = {}; for (const i of e) r[i] = n(i); return r; } const To = Object.freeze(function(e, t) { const n = setTimeout(e.bind(t), 0); return { dispose() { clearTimeout(n); } }; }); var On; (function(e) { function t(n) { return n === e.None || n === e.Cancelled || n instanceof Mn ? !0 : !n || typeof n != "object" ? !1 : typeof n.isCancellationRequested == "boolean" && typeof n.onCancellationRequested == "function"; } e.isCancellationToken = t, e.None = Object.freeze({ isCancellationRequested: !1, onCancellationRequested: zr.None }), e.Cancelled = Object.freeze({ isCancellationRequested: !0, onCancellationRequested: To }); })(On || (On = {})); class Mn { 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 ? To : (this._emitter || (this._emitter = new $e()), this._emitter.event); } dispose() { this._emitter && (this._emitter.dispose(), this._emitter = null); } } class oc { 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 Mn()), this._token; } cancel() { this._token ? this._token instanceof Mn && this._token.cancel() : this._token = On.Cancelled; } dispose(t = !1) { var n; t && this.cancel(), (n = this._parentListener) === null || n === void 0 || n.dispose(), this._token ? this._token instanceof Mn && this._token.dispose() : this._token = On.None; } } class lc { constructor(t) { this.fn = t, this.lastCache = void 0, this.lastArgKey = void 0; } get(t) { const n = JSON.stringify(t); return this.lastArgKey !== n && (this.lastArgKey = n, this.lastCache = this.fn(t)), this.lastCache; } } class Wo { constructor(t) { this.executor = t, this._didRun = !1; } /** * True if the lazy value has been resolved. */ get hasValue() { return this._didRun; } /** * 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 (t) { this._error = t; } finally { this._didRun = !0; } if (this._error) throw this._error; return this._value; } /** * Get the wrapped value without forcing evaluation. */ get rawValue() { return this._value; } } var Oo; function cc(e) { return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&"); } function hc(e) { return e.split(/\r\n|\r|\n/); } function dc(e) { for (let t = 0, n = e.length; t < n; t++) { const r = e.charCodeAt(t); if (r !== 32 && r !== 9) return t; } return -1; } function uc(e, t = e.length - 1) { for (let n = t; n >= 0; n--) { const r = e.charCodeAt(n); if (r !== 32 && r !== 9) return n; } return -1; } function Uo(e) { return e >= 65 && e <= 90; } function Nr(e) { return 55296 <= e && e <= 56319; } function pc(e) { return 56320 <= e && e <= 57343; } function fc(e, t) { return (e - 55296 << 10) + (t - 56320) + 65536; } function mc(e, t, n) { const r = e.charCodeAt(n); if (Nr(r) && n + 1 < t) { const i = e.charCodeAt(n + 1); if (pc(i)) return fc(r, i); } return r; } const gc = /^[\t\n\r\x20-\x7E]*$/; function bc(e) { return gc.test(e); } class Le { static getInstance(t) { return Le.cache.get(Array.from(t)); } static getLocales() { return Le._locales.value; } constructor(t) { this.confusableDictionary = t; } isAmbiguous(t) { return this.confusableDictionary.has(t); } /** * 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(t) { return this.confusableDictionary.get(t); } getConfusableCodePoints() { return new Set(this.confusableDictionary.keys()); } } Oo = Le; Le.ambiguousCharacterData = new Wo(() => 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]}')); Le.cache = new lc((e) => { function t(c) { const h = /* @__PURE__ */ new Map(); for (let u = 0; u < c.length; u += 2) h.set(c[u], c[u + 1]); return h; } function n(c, h) { const u = new Map(c); for (const [f, m] of h) u.set(f, m); return u; } function r(c, h) { if (!c) return h; const u = /* @__PURE__ */ new Map(); for (const [f, m] of c) h.has(f) && u.set(f, m); return u; } const i = Oo.ambiguousCharacterData.value; let s = e.filter((c) => !c.startsWith("_") && c in i); s.length === 0 && (s = ["_default"]); let a; for (const c of s) { const h = t(i[c]); a = r(a, h); } const o = t(i._common), l = n(o, a); return new Le(l); }); Le._locales = new Wo(() => Object.keys(Le.ambiguousCharacterData.value).filter((e) => !e.startsWith("_"))); class pt { 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(pt.getRawData())), this._data; } static isInvisibleCharacter(t) { return pt.getData().has(t); } static get codePoints() { return pt.getData(); } } pt._data = void 0; const vc = "$initialize"; class yc { constructor(t, n, r, i) { this.vsWorker = t, this.req = n, this.method = r, this.args = i, this.type = 0; } } class ji { constructor(t, n, r, i) { this.vsWorker = t, this.seq = n, this.res = r, this.err = i, this.type = 1; } } class wc { constructor(t, n, r, i) { this.vsWorker = t, this.req = n, this.eventName = r, this.arg = i, this.type = 2; } } class xc { constructor(t, n, r) { this.vsWorker = t, this.req = n, this.event = r, this.type = 3; } } class Sc { constructor(t, n) { this.vsWorker = t, this.req = n, this.type = 4; } } class Cc { constructor(t) { this._workerId = -1, this._handler = t, this._lastSentReq = 0, this._pendingReplies = /* @__PURE__ */ Object.create(null), this._pendingEmitters = /* @__PURE__ */ new Map(), this._pendingEvents = /* @__PURE__ */ new Map(); } setWorkerId(t) { this._workerId = t; } sendMessage(t, n) { const r = String(++this._lastSentReq); return new Promise((i, s) => { this._pendingReplies[r] = { resolve: i, reject: s }, this._send(new yc(this._workerId, r, t, n)); }); } listen(t, n) { let r = null; const i = new $e({ onWillAddFirstListener: () => { r = String(++this._lastSentReq), this._pendingEmitters.set(r, i), this._send(new wc(this._workerId, r, t, n)); }, onDidRemoveLastListener: () => { this._pendingEmitters.delete(r), this._send(new Sc(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; } const 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) { const n = t.req; this._handler.handleMessage(t.method, t.args).then((i) => { this._send(new ji(this._workerId, n, i, void 0)); }, (i) => { i.detail instanceof Error && (i.detail = Ui(i.detail)), this._send(new ji(this._workerId, n, void 0, Ui(i))); }); } _handleSubscribeEventMessage(t) { const n = t.req, r = this._handler.handleEvent(t.eventName, t.arg)((i) => { this._send(new xc(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) { const n = []; if (t.type === 0) for (let r = 0; r < t.args.length; r++) t.args[r] instanceof ArrayBuffer && n.push(t.args[r]); else t.type === 1 && t.res instanceof ArrayBuffer && n.push(t.res); this._handler.sendMessage(t, n); } } function Vo(e) { return e[0] === "o" && e[1] === "n" && Uo(e.charCodeAt(2)); } function Bo(e) { return /^onDynamic/.test(e) && Uo(e.charCodeAt(9)); } function kc(e, t, n) { const r = (a) => function() { const o = Array.prototype.slice.call(arguments, 0); return t(a, o); }, i = (a) => function(o) { return n(a, o); }, s = {}; for (const a of e) { if (Bo(a)) { s[a] = i(a); continue; } if (Vo(a)) { s[a] = n(a, void 0); continue; } s[a] = r(a); } return s; } class _c { constructor(t, n) { this._requestHandlerFactory = n, this._requestHandler = null, this._protocol = new Cc({ 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 === vc) 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 (Bo(t)) { const 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 (Vo(t)) { const 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); const o = kc(i, (l, c) => this._protocol.sendMessage(l, c), (l, c) => this._protocol.listen(l, c)); return this._requestHandlerFactory ? (this._requestHandler = this._requestHandlerFactory(o), Promise.resolve(Mr(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 !== void 0 && delete n.trustedTypesPolicy, n.catchError = !0, globalThis.require.config(n)), new Promise((l, c) => { const h = globalThis.require; h([r], (u) => { if (this._requestHandler = u.create(o), !this._requestHandler) { c(new Error("No RequestHandler!")); return; } l(Mr(this._requestHandler)); }, c); })); } } class lt { /** * Constructs a new DiffChange with the given sequence information * and content. */ constructor(t, n, r, i) { this.originalStart = t, this.originalLength = n, this.modifiedStart = r, this.modifiedLength = i; } /** * 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; } } function qi(e, t) { return (t << 5) - t + e | 0; } function Fc(e, t) { t = qi(149417, t); for (let n = 0, r = e.length; n < r; n++) t = qi(e.charCodeAt(n), t); return t; } class $i { constructor(t) { this.source = t; } getElements() { const t = this.source, n = new Int32Array(t.length); for (let r = 0, i = t.length; r < i; r++) n[r] = t.charCodeAt(r); return n; } } function Rc(e, t, n) { return new ht(new $i(e), new $i(t)).ComputeDiff(n).changes; } class _t { static Assert(t, n) { if (!t) throw new Error(n); } } class Ft { /** * 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(t, n, r, i, s) { for (let a = 0; a < s; a++) r[i + a] = t[n + a]; } static Copy2(t, n, r, i, s) { for (let a = 0; a < s; a++) r[i + a] = t[n + a]; } } class Hi { /** * 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() { (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.m_changes.push(new lt(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(t, n) { this.m_originalStart = Math.min(this.m_originalStart, t), this.m_modifiedStart = Math.min(this.m_modifiedStart, n), 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(t, n) { this.m_originalStart = Math.min(this.m_originalStart, t), this.m_modifiedStart = Math.min(this.m_modifiedStart, n), this.m_modifiedCount++; } /** * Retrieves all of the changes marked by the class. */ getChanges() { return (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), this.m_changes; } /** * Retrieves all of the changes marked by the class in the reverse order */ getReverseChanges() { return (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), this.m_changes.reverse(), this.m_changes; } } class ht { /** * Constructs the DiffFinder */ constructor(t, n, r = null) { this.ContinueProcessingPredicate = r, this._originalSequence = t, this._modifiedSequence = n; const [i, s, a] = ht._getElements(t), [o, l, c] = ht._getElements(n); this._hasStrings = a && c, this._originalStringElements = i, this._originalElementsOrHash = s, this._modifiedStringElements = o, this._modifiedElementsOrHash = l, this.m_forwardHistory = [], this.m_reverseHistory = []; } static _isStringArray(t) { return t.length > 0 && typeof t[0] == "string"; } static _getElements(t) { const n = t.getElements(); if (ht._isStringArray(n)) { const r = new Int32Array(n.length); for (let i = 0, s = n.length; i < s; i++) r[i] = Fc(n[i], 0); return [n, r, !0]; } return n instanceof Int32Array ? [[], n, !1] : [[], new Int32Array(n), !1]; } ElementsAreEqual(t, n) { return this._originalElementsOrHash[t] !== this._modifiedElementsOrHash[n] ? !1 : this._hasStrings ? this._originalStringElements[t] === this._modifiedStringElements[n] : !0; } ElementsAreStrictEqual(t, n) { if (!this.ElementsAreEqual(t, n)) return !1; const r = ht._getStrictElement(this._originalSequence, t), i = ht._getStrictElement(this._modifiedSequence, n); return r === i; } static _getStrictElement(t, n) { return typeof t.getStrictElement == "function" ? t.getStrictElement(n) : null; } OriginalElementsAreEqual(t, n) { return this._originalElementsOrHash[t] !== this._originalElementsOrHash[n] ? !1 : this._hasStrings ? this._originalStringElements[t] === this._originalStringElements[n] : !0; } ModifiedElementsAreEqual(t, n) { return this._modifiedElementsOrHash[t] !== this._modifiedElementsOrHash[n] ? !1 : this._hasStrings ? this._modifiedStringElements[t] === this._modifiedStringElements[n] : !0; } ComputeDiff(t) { return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, t); } /** * 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(t, n, r, i, s) { const a = [!1]; let o = this.ComputeDiffRecursive(t, n, r, i, a); return s && (o = this.PrettifyChanges(o)), { quitEarly: a[0], changes: o }; } /** * Private helper method which computes the differences on the bounded range * recursively. * @returns An array of the differences between the two input sequences. */ ComputeDiffRecursive(t, n, r, i, s) { for (s[0] = !1; t <= n && r <= i && this.ElementsAreEqual(t, r); ) t++, r++; for (; n >= t && i >= r && this.ElementsAreEqual(n, i); ) n--, i--; if (t > n || r > i) { let u; return r <= i ? (_t.Assert(t === n + 1, "originalStart should only be one more than originalEnd"), u = [ new lt(t, 0, r, i - r + 1) ]) : t <= n ? (_t.Assert(r === i + 1, "modifiedStart should only be one more than modifiedEnd"), u = [ new lt(t, n - t + 1, r, 0) ]) : (_t.Assert(t === n + 1, "originalStart should only be one more than originalEnd"), _t.Assert(r === i + 1, "modifiedStart should only be one more than modifiedEnd"), u = []), u; } const a = [0], o = [0], l = this.ComputeRecursionPoint(t, n, r, i, a, o, s), c = a[0], h = o[0]; if (l !== null) return l; if (!s[0]) { const u = this.ComputeDiffRecursive(t, c, r, h, s); let f = []; return s[0] ? f = [ new lt(c + 1, n - (c + 1) + 1, h + 1, i - (h + 1) + 1) ] : f = this.ComputeDiffRecursive(c + 1, n, h + 1, i, s), this.ConcatenateChanges(u, f); } return [ new lt(t, n - t + 1, r, i - r + 1) ]; } WALKTRACE(t, n, r, i, s, a, o, l, c, h, u, f, m, b, v, y, w, S) { let k = null, F = null, N = new Hi(), B = n, H = r, D = m[0] - y[0] - i, R = -1073741824, I = this.m_forwardHistory.length - 1; do { const P = D + t; P === B || P < H && c[P - 1] < c[P + 1] ? (u = c[P + 1], b = u - D - i, u < R && N.MarkNextChange(), R = u, N.AddModifiedElement(u + 1, b), D = P + 1 - t) : (u = c[P - 1] + 1, b = u - D - i, u < R && N.MarkNextChange(), R = u - 1, N.AddOriginalElement(u, b + 1), D = P - 1 - t), I >= 0 && (c = this.m_forwardHistory[I], t = c[0], B = 1, H = c.length - 1); } while (--I >= -1); if (k = N.getReverseChanges(), S[0]) { let P = m[0] + 1, z = y[0] + 1; if (k !== null && k.length > 0) { const V = k[k.length - 1]; P = Math.max(P, V.getOriginalEnd()), z = Math.max(z, V.getModifiedEnd()); } F = [ new lt(P, f - P + 1, z, v - z + 1) ]; } else { N = new Hi(), B = a, H = o, D = m[0] - y[0] - l, R = 1073741824, I = w ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2; do { const P = D + s; P === B || P < H && h[P - 1] >= h[P + 1] ? (u = h[P + 1] - 1, b = u - D - l, u > R && N.MarkNextChange(), R = u + 1, N.AddOriginalElement(u + 1, b + 1), D = P + 1 - s) : (u = h[P - 1], b = u - D - l, u > R && N.MarkNextChange(), R = u, N.AddModifiedElement(u + 1, b + 1), D = P - 1 - s), I >= 0 && (h = this.m_reverseHistory[I], s = h[0], B = 1, H = h.length - 1); } while (--I >= -1); F = N.getChanges(); } return this.ConcatenateChanges(k, F); } /** * 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(t, n, r, i, s, a, o) { let l = 0, c = 0, h = 0, u = 0, f = 0, m = 0; t--, r--, s[0] = 0, a[0] = 0, this.m_forwardHistory = [], this.m_reverseHistory = []; const b = n - t + (i - r), v = b + 1, y = new Int32Array(v), w = new Int32Array(v), S = i - r, k = n - t, F = t - r, N = n - i, H = (k - S) % 2 === 0; y[S] = t, w[k] = n, o[0] = !1; for (let D = 1; D <= b / 2 + 1; D++) { let R = 0, I = 0; h = this.ClipDiagonalBound(S - D, D, S, v), u = this.ClipDiagonalBound(S + D, D, S, v); for (let z = h; z <= u; z += 2) { z === h || z < u && y[z - 1] < y[z + 1] ? l = y[z + 1] : l = y[z - 1] + 1, c = l - (z - S) - F; const V = l; for (; l < n && c < i && this.ElementsAreEqual(l + 1, c + 1); ) l++, c++; if (y[z] = l, l + c > R + I && (R = l, I = c), !H && Math.abs(z - k) <= D - 1 && l >= w[z]) return s[0] = l, a[0] = c, V <= w[z] && 1447 > 0 && D <= 1447 + 1 ? this.WALKTRACE(S, h, u, F, k, f, m, N, y, w, l, n, s, c, i, a, H, o) : null; } const P = (R - t + (I - r) - D) / 2; if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(R, P)) return o[0] = !0, s[0] = R, a[0] = I, P > 0 && 1447 > 0 && D <= 1447 + 1 ? this.WALKTRACE(S, h, u, F, k, f, m, N, y, w, l, n, s, c, i, a, H, o) : (t++, r++, [ new lt(t, n - t + 1, r, i - r + 1) ]); f = this.ClipDiagonalBound(k - D, D, k, v), m = this.ClipDiagonalBound(k + D, D, k, v); for (let z = f; z <= m; z += 2) { z === f || z < m && w[z - 1] >= w[z + 1] ? l = w[z + 1] - 1 : l = w[z - 1], c = l - (z - k) - N; const V = l; for (; l > t && c > r && this.ElementsAreEqual(l, c); ) l--, c--; if (w[z] = l, H && Math.abs(z - S) <= D && l <= y[z]) return s[0] = l, a[0] = c, V >= y[z] && 1447 > 0 && D <= 1447 + 1 ? this.WALKTRACE(S, h, u, F, k, f, m, N, y, w, l, n, s, c, i, a, H, o) : null; } if (D <= 1447) { let z = new Int32Array(u - h + 2); z[0] = S - h + 1, Ft.Copy2(y, h, z, 1, u - h + 1), this.m_forwardHistory.push(z), z = new Int32Array(m - f + 2), z[0] = k - f + 1, Ft.Copy2(w, f, z, 1, m - f + 1), this.m_reverseHistory.push(z); } } return this.WALKTRACE(S, h, u, F, k, f, m, N, y, w, l, n, s, c, i, a, H, o); } /** * 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(t) { for (let n = 0; n < t.length; n++) { const r = t[n], i = n < t.length - 1 ? t[n + 1].originalStart : this._originalElementsOrHash.length, s = n < t.length - 1 ? t[n + 1].modifiedStart : this._modifiedElementsOrHash.length, a = r.originalLength > 0, o = r.modifiedLength > 0; for (; r.originalStart + r.originalLength < i && r.modifiedStart + r.modifiedLength < s && (!a || this.OriginalElementsAreEqual(r.originalStart, r.originalStart + r.originalLength)) && (!o || this.ModifiedElementsAreEqual(r.modifiedStart, r.modifiedStart + r.modifiedLength)); ) { const c = this.ElementsAreStrictEqual(r.originalStart, r.modifiedStart); if (this.ElementsAreStrictEqual(r.originalStart + r.originalLength, r.modifiedStart + r.modifiedLength) && !c) break; r.originalStart++, r.modifiedStart++; } const l = [null]; if (n < t.length - 1 && this.ChangesOverlap(t[n], t[n + 1], l)) { t[n] = l[0], t.splice(n + 1, 1), n--; continue; } } for (let n = t.length - 1; n >= 0; n--) { const r = t[n]; let i = 0, s = 0; if (n > 0) { const u = t[n - 1]; i = u.originalStart + u.originalLength, s = u.modifiedStart + u.modifiedLength; } const a = r.originalLength > 0, o = r.modifiedLength > 0; let l = 0, c = this._boundaryScore(r.originalStart, r.originalLength, r.modifiedStart, r.modifiedLength); for (let u = 1; ; u++) { const f = r.originalStart - u, m = r.modifiedStart - u; if (f < i || m < s || a && !this.OriginalElementsAreEqual(f, f + r.originalLength) || o && !this.ModifiedElementsAreEqual(m, m + r.modifiedLength)) break; const v = (f === i && m === s ? 5 : 0) + this._boundaryScore(f, r.originalLength, m, r.modifiedLength); v > c && (c = v, l = u); } r.originalStart -= l, r.modifiedStart -= l; const h = [null]; if (n > 0 && this.ChangesOverlap(t[n - 1], t[n], h)) { t[n - 1] = h[0], t.splice(n, 1), n++; continue; } } if (this._hasStrings) for (let n = 1, r = t.length; n < r; n++) { const i = t[n - 1], s = t[n], a = s.originalStart - i.originalStart - i.originalLength, o = i.originalStart, l = s.originalStart + s.originalLength, c = l - o, h = i.modifiedStart, u = s.modifiedStart + s.modifiedLength, f = u - h; if (a < 5 && c < 20 && f < 20) { const m = this._findBetterContiguousSequence(o, c, h, f, a); if (m) { const [b, v] = m; (b !== i.originalStart + i.originalLength || v !== i.modifiedStart + i.modifiedLength) && (i.originalLength = b - i.originalStart, i.modifiedLength = v - i.modifiedStart, s.originalStart = b + a, s.modifiedStart = v + a, s.originalLength = l - s.originalStart, s.modifiedLength = u - s.modifiedStart); } } } return t; } _findBetterContiguousSequence(t, n, r, i, s) { if (n < s || i < s) return null; const a = t + n - s + 1, o = r + i - s + 1; let l = 0, c = 0, h = 0; for (let u = t; u < a; u++) for (let f = r; f < o; f++) { const m = this._contiguousSequenceScore(u, f, s); m > 0 && m > l && (l = m, c = u, h = f); } return l > 0 ? [c, h] : null; } _contiguousSequenceScore(t, n, r) { let i = 0; for (let s = 0; s < r; s++) { if (!this.ElementsAreEqual(t + s, n + s)) return 0; i += this._originalStringElements[t + s].length; } return i; } _OriginalIsBoundary(t) { return t <= 0 || t >= 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) { const 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) { const r = t + n; if (this._ModifiedIsBoundary(r - 1) || this._ModifiedIsBoundary(r)) return !0; } return !1; } _boundaryScore(t, n, r, i) { const s = this._OriginalRegionIsBoundary(t, n) ? 1 : 0, a = this._ModifiedRegionIsBoundary(r, i) ? 1 : 0; return s + a; } /** * Concatenates the two input DiffChange lists and returns the resulting * list. * @param The left changes * @param The right changes * @returns The concatenated list */ ConcatenateChanges(t, n) { const r = []; if (t.length === 0 || n.length === 0) return n.length > 0 ? n : t; if (this.ChangesOverlap(t[t.length - 1], n[0], r)) { const i = new Array(t.length + n.length - 1); return Ft.Copy(t, 0, i, 0, t.length - 1), i[t.length - 1] = r[0], Ft.Copy(n, 1, i, t.length, n.length - 1), i; } else { const i = new Array(t.length + n.length); return Ft.Copy(t, 0, i, 0, t.length), Ft.Copy(n, 0, i, t.length, n.length), i; } } /** * 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(t, n, r) { if (_t.Assert(t.originalStart <= n.originalStart, "Left change is not less than or equal to right change"), _t.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) { const i = t.originalStart; let s = t.originalLength; const a = t.modifiedStart; let o = t.modifiedLength; return t.originalStart + t.originalLength >= n.originalStart && (s = n.originalStart + n.originalLength - t.originalStart), t.modifiedStart + t.modifiedLength >= n.modifiedStart && (o = n.modifiedStart + n.modifiedLength - t.modifiedStart), r[0] = new lt(i, s, a, o), !0; } else return r[0] = null, !1; } /** * 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(t, n, r, i) { if (t >= 0 && t < i) return t; const s = r, a = i - r - 1, o = n % 2 === 0; if (t < 0) { const l = s % 2 === 0; return o === l ? 0 : 1; } else { const l = a % 2 === 0; return o === l ? i - 1 : i - 2; } } } let St; if (typeof Fe.vscode < "u" && typeof Fe.vscode.process < "u") { const e = Fe.vscode.process; St = { get platform() { return e.platform; }, get arch() { return e.arch; }, get env() { return e.env; }, cwd() { return e.cwd(); } }; } else typeof process < "u" ? St = { get platform() { return process.platform; }, get arch() { return process.arch; }, get env() { return process.env; }, cwd() { return process.env.VSCODE_CWD || process.cwd(); } } : St = { // Supported get platform() { return sn ? "win32" : Jl ? "darwin" : "linux"; }, get arch() { }, // Unsupported get env() { return {}; }, cwd() { return "/"; } }; const Un = St.cwd, Ec = St.env, Dc = St.platform; St.arch; const Ac = 65, zc = 97, Mc = 90, Nc = 122, ft = 46, be = 47, ke = 92, st = 58, Pc = 63; class jo extends Error { constructor(t, n, r) { let i; typeof n == "string" && n.indexOf("not ") === 0 ? (i = "must not be", n = n.replace(/^not /, "")) : i = "must be"; const s = t.indexOf(".") !== -1 ? "property" : "argument"; let a = `The "${t}" ${s} ${i} of type ${n}`; a += `. Received type ${typeof r}`, super(a), this.code = "ERR_INVALID_ARG_TYPE"; } } function Ic(e, t) { if (e === null || typeof e != "object") throw new jo(t, "Object", e); } function ae(e, t) { if (typeof e != "string") throw new jo(t, "string", e); } const Re = Dc === "win32"; function J(e) { return e === be || e === ke; } function Pr(e) { return e === be; } function at(e) { return e >= Ac && e <= Mc || e >= zc && e <= Nc; } function Vn(e, t, n, r) { let i = "", s = 0, a = -1, o = 0, l = 0; for (let c = 0; c <= e.length; ++c) { if (c < e.length) l = e.charCodeAt(c); else { if (r(l)) break; l = be; } if (r(l)) { if (!(a === c - 1 || o === 1)) if (o === 2) { if (i.length < 2 || s !== 2 || i.charCodeAt(i.length - 1) !== ft || i.charCodeAt(i.length - 2) !== ft) { if (i.length > 2) { const h = i.lastIndexOf(n); h === -1 ? (i = "", s = 0) : (i = i.slice(0, h), s = i.length - 1 - i.lastIndexOf(n)), a = c, o = 0; continue; } else if (i.length !== 0) { i = "", s = 0, a = c, o = 0; continue; } } t && (i += i.length > 0 ? `${n}..` : "..", s = 2); } else i.length > 0 ? i += `${n}${e.slice(a + 1, c)}` : i = e.slice(a + 1, c), s = c - a - 1; a = c, o = 0; } else l === ft && o !== -1 ? ++o : o = -1; } return i; } function qo(e, t) { Ic(t, "pathObject"); const n = t.dir || t.root, r = t.base || `${t.name || ""}${t.ext || ""}`; return n ? n === t.root ? `${n}${r}` : `${n}${e}${r}` : r; } const he = { // path.resolve([from ...], to) 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], ae(s, "path"), s.length === 0) continue; } else t.length === 0 ? s = Un() : (s = Ec[`=${t}`] || Un(), (s === void 0 || s.slice(0, 2).toLowerCase() !== t.toLowerCase() && s.charCodeAt(2) === ke) && (s = `${t}\\`)); const a = s.length; let o = 0, l = "", c = !1; const h = s.charCodeAt(0); if (a === 1) J(h) && (o = 1, c = !0); else if (J(h)) if (c = !0, J(s.charCodeAt(1))) { let u = 2, f = u; for (; u < a && !J(s.charCodeAt(u)); ) u++; if (u < a && u !== f) { const m = s.slice(f, u); for (f = u; u < a && J(s.charCodeAt(u)); ) u++; if (u < a && u !== f) { for (f = u; u < a && !J(s.charCodeAt(u)); ) u++; (u === a || u !== f) && (l = `\\\\${m}\\${s.slice(f, u)}`, o = u); } } } else o = 1; else at(h) && s.charCodeAt(1) === st && (l = s.slice(0, 2), o = 2, a > 2 && J(s.charCodeAt(2)) && (c = !0, o = 3)); if (l.length > 0) if (t.length > 0) { if (l.toLowerCase() !== t.toLowerCase()) continue; } else t = l; if (r) { if (t.length > 0) break; } else if (n = `${s.slice(o)}\\${n}`, r = c, c && t.length > 0) break; } return n = Vn(n, !r, "\\", J), r ? `${t}\\${n}` : `${t}${n}` || "."; }, normalize(e) { ae(e, "path"); const t = e.length; if (t === 0) return "."; let n = 0, r, i = !1; const s = e.charCodeAt(0); if (t === 1) return Pr(s) ? "\\" : e; if (J(s)) if (i = !0, J(e.charCodeAt(1))) { let o = 2, l = o; for (; o < t && !J(e.charCodeAt(o)); ) o++; if (o < t && o !== l) { const c = e.slice(l, o); for (l = o; o < t && J(e.charCodeAt(o)); ) o++; if (o < t && o !== l) { for (l = o; o < t && !J(e.charCodeAt(o)); ) o++; if (o === t) return `\\\\${c}\\${e.slice(l)}\\`; o !== l && (r = `\\\\${c}\\${e.slice(l, o)}`, n = o); } } } else n = 1; else at(s) && e.charCodeAt(1) === st && (r = e.slice(0, 2), n = 2, t > 2 && J(e.charCodeAt(2)) && (i = !0, n = 3)); let a = n < t ? Vn(e.slice(n), !i, "\\", J) : ""; return a.length === 0 && !i && (a = "."), a.length > 0 && J(e.charCodeAt(t - 1)) && (a += "\\"), r === void 0 ? i ? `\\${a}` : a : i ? `${r}\\${a}` : `${r}${a}`; }, isAbsolute(e) { ae(e, "path"); const t = e.length; if (t === 0) return !1; const n = e.charCodeAt(0); return J(n) || // Possible device root t > 2 && at(n) && e.charCodeAt(1) === st && J(e.charCodeAt(2)); }, join(...e) { if (e.length === 0) return "."; let t, n; for (let s = 0; s < e.length; ++s) { const a = e[s]; ae(a, "path"), a.length > 0 && (t === void 0 ? t = n = a : t += `\\${a}`); } if (t === void 0) return "."; let r = !0, i = 0; if (typeof n == "string" && J(n.charCodeAt(0))) { ++i; const s = n.length; s > 1 && J(n.charCodeAt(1)) && (++i, s > 2 && (J(n.charCodeAt(2)) ? ++i : r = !1)); } if (r) { for (; i < t.length && J(t.charCodeAt(i)); ) i++; i >= 2 && (t = `\\${t.slice(i)}`); } return he.normalize(t); }, // 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(e, t) { if (ae(e, "from"), ae(t, "to"), e === t) return ""; const n = he.resolve(e), r = he.resolve(t); if (n === r || (e = n.toLowerCase(), t = r.toLowerCase(), e === t)) return ""; let i = 0; for (; i < e.length && e.charCodeAt(i) === ke; ) i++; let s = e.length; for (; s - 1 > i && e.charCodeAt(s - 1) === ke; ) s--; const a = s - i; let o = 0; for (; o < t.length && t.charCodeAt(o) === ke; ) o++; let l = t.length; for (; l - 1 > o && t.charCodeAt(l - 1) === ke; ) l--; const c = l - o, h = a < c ? a : c; let u = -1, f = 0; for (; f < h; f++) { const b = e.charCodeAt(i + f); if (b !== t.charCodeAt(o + f)) break; b === ke && (u = f); } if (f !== h) { if (u === -1) return r; } else { if (c > h) { if (t.charCodeAt(o + f) === ke) return r.slice(o + f + 1); if (f === 2) return r.slice(o + f); } a > h && (e.charCodeAt(i + f) === ke ? u = f : f === 2 && (u = 3)), u === -1 && (u = 0); } let m = ""; for (f = i + u + 1; f <= s; ++f) (f === s || e.charCodeAt(f) === ke) && (m += m.length === 0 ? ".." : "\\.."); return o += u, m.length > 0 ? `${m}${r.slice(o, l)}` : (r.charCodeAt(o) === ke && ++o, r.slice(o, l)); }, toNamespacedPath(e) { if (typeof e != "string" || e.length === 0) return e; const t = he.resolve(e); if (t.length <= 2) return e; if (t.charCodeAt(0) === ke) { if (t.charCodeAt(1) === ke) { const n = t.charCodeAt(2); if (n !== Pc && n !== ft) return `\\\\?\\UNC\\${t.slice(2)}`; } } else if (at(t.charCodeAt(0)) && t.charCodeAt(1) === st && t.charCodeAt(2) === ke) return `\\\\?\\${t}`; return e; }, dirname(e) { ae(e, "path"); const t = e.length; if (t === 0) return "."; let n = -1, r = 0; const i = e.charCodeAt(0); if (t === 1) return J(i) ? e : "."; if (J(i)) { if (n = r = 1, J(e.charCodeAt(1))) { let o = 2, l = o; for (; o < t && !J(e.charCodeAt(o)); ) o++; if (o < t && o !== l) { for (l = o; o < t && J(e.charCodeAt(o)); ) o++; if (o < t && o !== l) { for (l = o; o < t && !J(e.charCodeAt(o)); ) o++; if (o === t) return e; o !== l && (n = r = o + 1); } } } } else at(i) && e.charCodeAt(1) === st && (n = t > 2 && J(e.charCodeAt(2)) ? 3 : 2, r = n); let s = -1, a = !0; for (let o = t - 1; o >= r; --o) if (J(e.charCodeAt(o))) { if (!a) { s = o; break; } } else a = !1; if (s === -1) { if (n === -1) return "."; s = n; } return e.slice(0, s); }, basename(e, t) { t !== void 0 && ae(t, "ext"), ae(e, "path"); let n = 0, r = -1, i = !0, s; if (e.length >= 2 && at(e.charCodeAt(0)) && e.charCodeAt(1) === st && (n = 2), t !== void 0 && t.length > 0 && t.length <= e.length) { if (t === e) return ""; let a = t.length - 1, o = -1; for (s = e.length - 1; s >= n; --s) { const l = e.charCodeAt(s); if (J(l)) { if (!i) { n = s + 1; break; } } else o === -1 && (i = !1, o = s + 1), a >= 0 && (l === t.charCodeAt(a) ? --a === -1 && (r = s) : (a = -1, r = o)); } return n === r ? r = o : r === -1 && (r = e.length), e.slice(n, r); } for (s = e.length - 1; s >= n; --s) if (J(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) { ae(e, "path"); let t = 0, n = -1, r = 0, i = -1, s = !0, a = 0; e.length >= 2 && e.charCodeAt(1) === st && at(e.charCodeAt(0)) && (t = r = 2); for (let o = e.length - 1; o >= t; --o) { const l = e.charCodeAt(o); if (J(l)) { if (!s) { r = o + 1; break; } continue; } i === -1 && (s = !1, i = o + 1), l === ft ? n === -1 ? n = o : a !== 1 && (a = 1) : n !== -1 && (a = -1); } return n === -1 || i === -1 || // We saw a non-dot character immediately before the dot a === 0 || // The (right-most) trimmed path component is exactly '..' a === 1 && n === i - 1 && n === r + 1 ? "" : e.slice(n, i); }, format: qo.bind(null, "\\"), parse(e) { ae(e, "path"); const t = { root: "", dir: "", base: "", ext: "", name: "" }; if (e.length === 0) return t; const n = e.length; let r = 0, i = e.charCodeAt(0); if (n === 1) return J(i) ? (t.root = t.dir = e, t) : (t.base = t.name = e, t); if (J(i)) { if (r = 1, J(e.charCodeAt(1))) { let u = 2, f = u; for (; u < n && !J(e.charCodeAt(u)); ) u++; if (u < n && u !== f) { for (f = u; u < n && J(e.charCodeAt(u)); ) u++; if (u < n && u !== f) { for (f = u; u < n && !J(e.charCodeAt(u)); ) u++; u === n ? r = u : u !== f && (r = u + 1); } } } } else if (at(i) && e.charCodeAt(1) === st) { if (n <= 2) return t.root = t.dir = e, t; if (r = 2, J(e.charCodeAt(2))) { if (n === 3) return t.root = t.dir = e, t; r = 3; } } r > 0 && (t.root = e.slice(0, r)); let s = -1, a = r, o = -1, l = !0, c = e.length - 1, h = 0; for (; c >= r; --c) { if (i = e.charCodeAt(c), J(i)) { if (!l) { a = c + 1; break; } continue; } o === -1 && (l = !1, o = c + 1), i === ft ? s === -1 ? s = c : h !== 1 && (h = 1) : s !== -1 && (h = -1); } return o !== -1 && (s === -1 || // We saw a non-dot character immediately before the dot h === 0 || // The (right-most) trimmed path component is exactly '..' h === 1 && s === o - 1 && s === a + 1 ? t.base = t.name = e.slice(a, o) : (t.name = e.slice(a, s), t.base = e.slice(a, o), t.ext = e.slice(s, o))), a > 0 && a !== r ? t.dir = e.slice(0, a - 1) : t.dir = t.root, t; }, sep: "\\", delimiter: ";", win32: null, posix: null }, Lc = (() => { if (Re) { const e = /\\/g; return () => { const t = Un().replace(e, "/"); return t.slice(t.indexOf("/")); }; } return () => Un(); })(), fe = { // path.resolve([from ...], to) resolve(...e) { let t = "", n = !1; for (let r = e.length - 1; r >= -1 && !n; r--) { const i = r >= 0 ? e[r] : Lc(); ae(i, "path"), i.length !== 0 && (t = `${i}/${t}`, n = i.charCodeAt(0) === be); } return t = Vn(t, !n, "/", Pr), n ? `/${t}` : t.length > 0 ? t : "."; }, normalize(e) { if (ae(e, "path"), e.length === 0) return "."; const t = e.charCodeAt(0) === be, n = e.charCodeAt(e.length - 1) === be; return e = Vn(e, !t, "/", Pr), e.length === 0 ? t ? "/" : n ? "./" : "." : (n && (e += "/"), t ? `/${e}` : e); }, isAbsolute(e) { return ae(e, "path"), e.length > 0 && e.charCodeAt(0) === be; }, join(...e) { if (e.length === 0) return "."; let t; for (let n = 0; n < e.length; ++n) { const r = e[n]; ae(r, "path"), r.length > 0 && (t === void 0 ? t = r : t += `/${r}`); } return t === void 0 ? "." : fe.normalize(t); }, relative(e, t) { if (ae(e, "from"), ae(t, "to"), e === t || (e = fe.resolve(e), t = fe.resolve(t), e === t)) return ""; const n = 1, r = e.length, i = r - n, s = 1, a = t.length - s, o = i < a ? i : a; let l = -1, c = 0; for (; c < o; c++) { const u = e.charCodeAt(n + c); if (u !== t.charCodeAt(s + c)) break; u === be && (l = c); } if (c === o) if (a > o) { if (t.charCodeAt(s + c) === be) return t.slice(s + c + 1); if (c === 0) return t.slice(s + c); } else i > o && (e.charCodeAt(n + c) === be ? l = c : c === 0 && (l = 0)); let h = ""; for (c = n + l + 1; c <= r; ++c) (c === r || e.charCodeAt(c) === be) && (h += h.length === 0 ? ".." : "/.."); return `${h}${t.slice(s + l)}`; }, toNamespacedPath(e) { return e; }, dirname(e) { if (ae(e, "path"), e.length === 0) return "."; const t = e.charCodeAt(0) === be; let n = -1, r = !0; for (let i = e.length - 1; i >= 1; --i) if (e.charCodeAt(i) === be) { 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 && ae(t, "ext"), ae(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 a = t.length - 1, o = -1; for (s = e.length - 1; s >= 0; --s) { const l = e.charCodeAt(s); if (l === be) { if (!i) { n = s + 1; break; } } else o === -1 && (i = !1, o = s + 1), a >= 0 && (l === t.charCodeAt(a) ? --a === -1 && (r = s) : (a = -1, r = o)); } return n === r ? r = o : r === -1 && (r = e.length), e.slice(n, r); } for (s = e.length - 1; s >= 0; --s) if (e.charCodeAt(s) === be) { if (!i) { n = s + 1; break; } } else r === -1 && (i = !1, r = s + 1); return r === -1 ? "" : e.slice(n, r); }, extname(e) { ae(e, "path"); let t = -1, n = 0, r = -1, i = !0, s = 0; for (let a = e.length - 1; a >= 0; --a) { const o = e.charCodeAt(a); if (o === be) { if (!i) { n = a + 1; break; } continue; } r === -1 && (i = !1, r = a + 1), o === ft ? t === -1 ? t = a : s !== 1 && (s = 1) : t !== -1 && (s = -1); } return t === -1 || r === -1 || // We saw a non-dot character immediately before the dot s === 0 || // The (right-most) trimmed path component is exactly '..' s === 1 && t === r - 1 && t === n + 1 ? "" : e.slice(t, r); }, format: qo.bind(null, "/"), parse(e) { ae(e, "path"); const t = { root: "", dir: "", base: "", ext: "", name: "" }; if (e.length === 0) return t; const n = e.charCodeAt(0) === be; let r; n ? (t.root = "/", r = 1) : r = 0; let i = -1, s = 0, a = -1, o = !0, l = e.length - 1, c = 0; for (; l >= r; --l) { const h = e.charCodeAt(l); if (h === be) { if (!o) { s = l + 1; break; } continue; } a === -1 && (o = !1, a = l + 1), h === ft ? i === -1 ? i = l : c !== 1 && (c = 1) : i !== -1 && (c = -1); } if (a !== -1) { const h = s === 0 && n ? 1 : s; i === -1 || // We saw a non-dot character immediately before the dot c === 0 || // The (right-most) trimmed path component is exactly '..' c === 1 && i === a - 1 && i === s + 1 ? t.base = t.name = e.slice(h, a) : (t.name = e.slice(h, i), t.base = e.slice(h, a), t.ext = e.slice(i, a)); } return s > 0 ? t.dir = e.slice(0, s - 1) : n && (t.dir = "/"), t; }, sep: "/", delimiter: ":", win32: null, posix: null }; fe.win32 = he.win32 = he; fe.posix = he.posix = fe; Re ? he.normalize : fe.normalize; Re ? he.isAbsolute : fe.isAbsolute; Re ? he.join : fe.join; Re ? he.resolve : fe.resolve; Re ? he.relative : fe.relative; Re ? he.dirname : fe.dirname; Re ? he.basename : fe.basename; Re ? he.extname : fe.extname; Re ? he.format : fe.format; Re ? he.parse : fe.parse; Re ? he.toNamespacedPath : fe.toNamespacedPath; Re ? he.sep : fe.sep; Re ? he.delimiter : fe.delimiter; const Tc = /^\w[\w\d+.-]*$/, Wc = /^\//, Oc = /^\/\//; function Gi(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 && !Tc.test(e.scheme)) throw new Error("[UriError]: Scheme contains illegal characters."); if (e.path) { if (e.authority) { if (!Wc.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 (Oc.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 Uc(e, t) { return !e && !t ? "file" : e; } function Vc(e, t) { switch (e) { case "https": case "http": case "file": t ? t[0] !== Ue && (t = Ue + t) : t = Ue; break; } return t; } const ne = "", Ue = "/", Bc = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; let mi = class Nn { static isUri(t) { return t instanceof Nn ? !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; } /** * @internal */ constructor(t, n, r, i, s, a = !1) { typeof t == "object" ? (this.scheme = t.scheme || ne, this.authority = t.authority || ne, this.path = t.path || ne, this.query = t.query || ne, this.fragment = t.fragment || ne) : (this.scheme = Uc(t, a), this.authority = n || ne, this.path = Vc(this.scheme, r || ne), this.query = i || ne, this.fragment = s || ne, Gi(this, a)); } // ---- 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 Ir(this, !1); } // ---- modify to new ------------------------- with(t) { if (!t) return this; let { scheme: n, authority: r, path: i, query: s, fragment: a } = t; return n === void 0 ? n = this.scheme : n === null && (n = ne), r === void 0 ? r = this.authority : r === null && (r = ne), i === void 0 ? i = this.path : i === null && (i = ne), s === void 0 ? s = this.query : s === null && (s = ne), a === void 0 ? a = this.fragment : a === null && (a = ne), n === this.scheme && r === this.authority && i === this.path && s === this.query && a === this.fragment ? this : new Rt(n, r, i, s, a); } // ---- 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(t, n = !1) { const r = Bc.exec(t); return r ? new Rt(r[2] || ne, xn(r[4] || ne), xn(r[5] || ne), xn(r[7] || ne), xn(r[9] || ne), n) : new Rt(ne, ne, ne, ne, ne); } /** * 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(t) { let n = ne; if (sn && (t = t.replace(/\\/g, Ue)), t[0] === Ue && t[1] === Ue) { const 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 Rt("file", n, t, ne, ne); } static from(t) { const n = new Rt(t.scheme, t.authority, t.path, t.query, t.fragment); return Gi(n, !0), n; } /** * 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(t, ...n) { if (!t.path) throw new Error("[UriError]: cannot call joinPath on URI without path"); let r; return sn && t.scheme === "file" ? r = Nn.file(he.join(Ir(t, !0), ...n)).path : r = fe.join(t.path, ...n), t.with({ path: r }); } // ---- 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(t = !1) { return Lr(this, t); } toJSON() { return this; } static revive(t) { if (t) { if (t instanceof Nn) return t; { const n = new Rt(t); return n._formatted = t.external, n._fsPath = t._sep === $o ? t.fsPath : null, n; } } else return t; } }; const $o = sn ? 1 : void 0; class Rt extends mi { constructor() { super(...arguments), this._formatted = null, this._fsPath = null; } get fsPath() { return this._fsPath || (this._fsPath = Ir(this, !1)), this._fsPath; } toString(t = !1) { return t ? Lr(this, !0) : (this._formatted || (this._formatted = Lr(this, !1)), this._formatted); } toJSON() { const t = { $mid: 1 /* MarshalledId.Uri */ }; return this._fsPath && (t.fsPath = this._fsPath, t._sep = $o), 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; } } const Ho = { [ 58 /* CharCode.Colon */ ]: "%3A", [ 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", [ 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 Ji(e, t, n) { let r, i = -1; for (let s = 0; s < e.length; s++) { const a = e.charCodeAt(s); if (a >= 97 && a <= 122 || a >= 65 && a <= 90 || a >= 48 && a <= 57 || a === 45 || a === 46 || a === 95 || a === 126 || t && a === 47 || n && a === 91 || n && a === 93 || n && a === 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)); const o = Ho[a]; o !== void 0 ? (i !== -1 && (r += encodeURIComponent(e.substring(i, s)), i = -1), r += o) : i === -1 && (i = s); } } return i !== -1 && (r += encodeURIComponent(e.substring(i))), r !== void 0 ? r : e; } function jc(e) { let t; for (let n = 0; n < e.length; n++) { const r = e.charCodeAt(n); r === 35 || r === 63 ? (t === void 0 && (t = e.substr(0, n)), t += Ho[r]) : t !== void 0 && (t += e[n]); } return t !== void 0 ? t : e; } function Ir(e, t) { let n; return e.authority && e.path.length > 1 && 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, sn && (n = n.replace(/\//g, "\\")), n; } function Lr(e, t) { const n = t ? jc : Ji; let r = "", { scheme: i, authority: s, path: a, query: o, fragment: l } = e; if (i && (r += i, r += ":"), (s || i === "file") && (r += Ue, r += Ue), s) { let c = s.indexOf("@"); if (c !== -1) { const 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 (a) { if (a.length >= 3 && a.charCodeAt(0) === 47 && a.charCodeAt(2) === 58) { const c = a.charCodeAt(1); c >= 65 && c <= 90 && (a = `/${String.fromCharCode(c + 32)}:${a.substr(3)}`); } else if (a.length >= 2 && a.charCodeAt(1) === 58) { const c = a.charCodeAt(0); c >= 65 && c <= 90 && (a = `${String.fromCharCode(c + 32)}:${a.substr(2)}`); } r += n(a, !0, !1); } return o && (r += "?", r += n(o, !1, !1)), l && (r += "#", r += t ? l : Ji(l, !1, !1)), r; } function Go(e) { try { return decodeURIComponent(e); } catch { return e.length > 3 ? e.substr(0, 3) + Go(e.substr(3)) : e; } } const Xi = /(%[0-9A-Za-z][0-9A-Za-z])+/g; function xn(e) { return e.match(Xi) ? e.replace(Xi, (t) => Go(t)) : e; } let Ge = class vt { constructor(t, n) { this.lineNumber = t, this.column = n; } /** * Create a new position from this position. * * @param newLineNumber new line number * @param newColumn new column */ with(t = this.lineNumber, n = this.column) { return t === this.lineNumber && n === this.column ? this : new vt(t, n); } /** * Derive a new position from this position. * * @param deltaLineNumber line number delta * @param deltaColumn column delta */ delta(t = 0, n = 0) { return this.with(this.lineNumber + t, this.column + n); } /** * Test if this position equals other position */ equals(t) { return vt.equals(this, t); } /** * Test if position `a` equals position `b` */ static equals(t, n) { return !t && !n ? !0 : !!t && !!n && t.lineNumber === n.lineNumber && t.column === n.column; } /** * Test if this position is before other position. * If the two positions are equal, the result will be false. */ isBefore(t) { return vt.isBefore(this, t); } /** * Test if position `a` is before position `b`. * If the two positions are equal, the result will be false. */ static isBefore(t, n) { return t.lineNumber < n.lineNumber ? !0 : n.lineNumber < t.lineNumber ? !1 : t.column < n.column; } /** * Test if this position is before other position. * If the two positions are equal, the result will be true. */ isBeforeOrEqual(t) { return vt.isBeforeOrEqual(this, t); } /** * Test if position `a` is before position `b`. * If the two positions are equal, the result will be true. */ static isBeforeOrEqual(t, n) { return t.lineNumber < n.lineNumber ? !0 : n.lineNumber < t.lineNumber ? !1 : t.column <= n.column; } /** * A function that compares positions, useful for sorting */ static compare(t, n) { const r = t.lineNumber | 0, i = n.lineNumber | 0; if (r === i) { const s = t.column | 0, a = n.column | 0; return s - a; } return r - i; } /** * Clone this position. */ clone() { return new vt(this.lineNumber, this.column); } /** * Convert to a human-readable representation. */ toString() { return "(" + this.lineNumber + "," + this.column + ")"; } // --- /** * Create a `Position` from an `IPosition`. */ static lift(t) { return new vt(t.lineNumber, t.column); } /** * Test if `obj` is an `IPosition`. */ static isIPosition(t) { return t && typeof t.lineNumber == "number" && typeof t.column == "number"; } }, _e = class le { constructor(t, n, r, i) { t > r || 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); } /** * Test if this range is empty. */ isEmpty() { return le.isEmpty(this); } /** * Test if `range` is empty. */ static isEmpty(t) { return t.startLineNumber === t.endLineNumber && t.startColumn === t.endColumn; } /** * Test if position is in this range. If the position is at the edges, will return true. */ containsPosition(t) { return le.containsPosition(this, t); } /** * Test if `position` is in `range`. If the position is at the edges, will return true. */ static containsPosition(t, n) { return !(n.lineNumber < t.startLineNumber || n.lineNumber > t.endLineNumber || n.lineNumber === t.startLineNumber && n.column < t.startColumn || n.lineNumber === t.endLineNumber && n.column > t.endColumn); } /** * Test if `position` is in `range`. If the position is at the edges, will return false. * @internal */ static strictContainsPosition(t, n) { return !(n.lineNumber < t.startLineNumber || n.lineNumber > t.endLineNumber || n.lineNumber === t.startLineNumber && n.column <= t.startColumn || n.lineNumber === t.endLineNumber && n.column >= t.endColumn); } /** * Test if range is in this range. If the range is equal to this range, will return true. */ containsRange(t) { return le.containsRange(this, t); } /** * Test if `otherRange` is in `range`. If the ranges are equal, will return true. */ static containsRange(t, n) { return !(n.startLineNumber < t.startLineNumber || n.endLineNumber < t.startLineNumber || n.startLineNumber > t.endLineNumber || n.endLineNumber > t.endLineNumber || n.startLineNumber === t.startLineNumber && n.startColumn < t.startColumn || n.endLineNumber === t.endLineNumber && n.endColumn > t.endColumn); } /** * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true. */ strictContainsRange(t) { return le.strictContainsRange(this, t); } /** * Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false. */ static strictContainsRange(t, n) { return !(n.startLineNumber < t.startLineNumber || n.endLineNumber < t.startLineNumber || n.startLineNumber > t.endLineNumber || n.endLineNumber > t.endLineNumber || n.startLineNumber === t.startLineNumber && n.startColumn <= t.startColumn || n.endLineNumber === t.endLineNumber && n.endColumn >= t.endColumn); } /** * 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(t) { return le.plusRange(this, t); } /** * 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(t, n) { let r, i, s, a; return n.startLineNumber < t.startLineNumber ? (r = n.startLineNumber, i = n.startColumn) : n.startLineNumber === t.startLineNumber ? (r = n.startLineNumber, i = Math.min(n.startColumn, t.startColumn)) : (r = t.startLineNumber, i = t.startColumn), n.endLineNumber > t.endLineNumber ? (s = n.endLineNumber, a = n.endColumn) : n.endLineNumber === t.endLineNumber ? (s = n.endLineNumber, a = Math.max(n.endColumn, t.endColumn)) : (s = t.endLineNumber, a = t.endColumn), new le(r, i, s, a); } /** * A intersection of the two ranges. */ intersectRanges(t) { return le.intersectRanges(this, t); } /** * A intersection of the two ranges. */ static intersectRanges(t, n) { let r = t.startLineNumber, i = t.startColumn, s = t.endLineNumber, a = t.endColumn; const o = n.startLineNumber, l = n.startColumn, c = n.endLineNumber, h = n.endColumn; return r < o ? (r = o, i = l) : r === o && (i = Math.max(i, l)), s > c ? (s = c, a = h) : s === c && (a = Math.min(a, h)), r > s || r === s && i > a ? null : new le(r, i, s, a); } /** * Test if this range equals other. */ equalsRange(t) { return le.equalsRange(this, t); } /** * Test if range `a` equals `b`. */ 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; } /** * Return the end position (which will be after or equal to the start position) */ getEndPosition() { return le.getEndPosition(this); } /** * Return the end position (which will be after or equal to the start position) */ static getEndPosition(t) { return new Ge(t.endLineNumber, t.endColumn); } /** * Return the start position (which will be before or equal to the end position) */ getStartPosition() { return le.getStartPosition(this); } /** * Return the start position (which will be before or equal to the end position) */ static getStartPosition(t) { return new Ge(t.startLineNumber, t.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(t, n) { return new le(this.startLineNumber, this.startColumn, t, n); } /** * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position. */ setStartPosition(t, n) { return new le(t, n, this.endLineNumber, this.endColumn); } /** * Create a new empty range using this range's start position. */ collapseToStart() { return le.collapseToStart(this); } /** * Create a new empty range using this range's start position. */ static collapseToStart(t) { return new le(t.startLineNumber, t.startColumn, t.startLineNumber, t.startColumn); } /** * Create a new empty range using this range's end position. */ collapseToEnd() { return le.collapseToEnd(this); } /** * Create a new empty range using this range's end position. */ static collapseToEnd(t) { return new le(t.endLineNumber, t.endColumn, t.endLineNumber, t.endColumn); } /** * Moves the range by the given amount of lines. */ delta(t) { return new le(this.startLineNumber + t, this.startColumn, this.endLineNumber + t, this.endColumn); } // --- static fromPositions(t, n = t) { return new le(t.lineNumber, t.column, n.lineNumber, n.column); } static lift(t) { return t ? new le(t.startLineNumber, t.startColumn, t.endLineNumber, t.endColumn) : null; } /** * Test if `obj` is an `IRange`. */ static isIRange(t) { return t && typeof t.startLineNumber == "number" && typeof t.startColumn == "number" && typeof t.endLineNumber == "number" && typeof t.endColumn == "number"; } /** * Test if the two ranges are touching in any way. */ static areIntersectingOrTouching(t, n) { return !(t.endLineNumber < n.startLineNumber || t.endLineNumber === n.startLineNumber && t.endColumn < n.startColumn || n.endLineNumber < t.startLineNumber || n.endLineNumber === t.startLineNumber && n.endColumn < t.startColumn); } /** * Test if the two ranges are intersecting. If the ranges are touching it returns true. */ static areIntersecting(t, n) { return !(t.endLineNumber < n.startLineNumber || t.endLineNumber === n.startLineNumber && t.endColumn <= n.startColumn || n.endLineNumber < t.startLineNumber || n.endLineNumber === t.startLineNumber && n.endColumn <= t.startColumn); } /** * A function that compares ranges, useful for sorting ranges * It will first compare ranges on the startPosition and then on the endPosition */ static compareRangesUsingStarts(t, n) { if (t && n) { const s = t.startLineNumber | 0, a = n.startLineNumber | 0; if (s === a) { const o = t.startColumn | 0, l = n.startColumn | 0; if (o === l) { const c = t.endLineNumber | 0, h = n.endLineNumber | 0; if (c === h) { const u = t.endColumn | 0, f = n.endColumn | 0; return u - f; } return c - h; } return o - l; } return s - a; } return (t ? 1 : 0) - (n ? 1 : 0); } /** * A function that compares ranges, useful for sorting ranges * It will first compare ranges on the endPosition and then on the startPosition */ static compareRangesUsingEnds(t, n) { return t.endLineNumber === n.endLineNumber ? t.endColumn === n.endColumn ? t.startLineNumber === n.startLineNumber ? t.startColumn - n.startColumn : t.startLineNumber - n.startLineNumber : t.endColumn - n.endColumn : t.endLineNumber - n.endLineNumber; } /** * Test if the range spans multiple lines. */ static spansMultipleLines(t) { return t.endLineNumber > t.startLineNumber; } toJSON() { return this; } }; globalThis && globalThis.__awaiter; var Yi; (function(e) { function t(i) { return i < 0; } e.isLessThan = t; function n(i) { return i > 0; } e.isGreaterThan = n; function r(i) { return i === 0; } e.isNeitherLessOrGreaterThan = r, e.greaterThan = 1, e.lessThan = -1, e.neitherLessOrGreaterThan = 0; })(Yi || (Yi = {})); function Ki(e) { return e < 0 ? 0 : e > 255 ? 255 : e | 0; } function Et(e) { return e < 0 ? 0 : e > 4294967295 ? 4294967295 : e | 0; } class qc { constructor(t) { this.values = t, this.prefixSum = new Uint32Array(t.length), this.prefixSumValidIndex = new Int32Array(1), this.prefixSumValidIndex[0] = -1; } getCount() { return this.values.length; } insertValues(t, n) { t = Et(t); const 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 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = t - 1), this.prefixSum = new Uint32Array(this.values.length), this.prefixSumValidIndex[0] >= 0 && this.prefixSum.set(i.subarray(0, this.prefixSumValidIndex[0] + 1)), !0); } setValue(t, n) { return t = Et(t), n = Et(n), this.values[t] === n ? !1 : (this.values[t] = n, t - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = t - 1), !0); } removeValues(t, n) { t = Et(t), n = Et(n); const r = this.values, i = this.prefixSum; if (t >= r.length) return !1; const 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 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = t - 1), this.prefixSumValidIndex[0] >= 0 && this.prefixSum.set(i.subarray(0, this.prefixSumValidIndex[0] + 1)), !0); } getTotalSum() { return this.values.length === 0 ? 0 : this._getPrefixSum(this.values.length - 1); } /** * Returns the sum of the first `index + 1` many items. * @returns `SUM(0 <= j <= index, values[j])`. */ getPrefixSum(t) { return t < 0 ? 0 : (t = Et(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, a = 0; for (; n <= r; ) if (i = n + (r - n) / 2 | 0, s = this.prefixSum[i], a = s - this.values[i], t < a) r = i - 1; else if (t >= s) n = i + 1; else break; return new $c(i, t - a); } } class $c { constructor(t, n) { this.index = t, this.remainder = n, this._prefixSumIndexOfResultBrand = void 0, this.index = t, this.remainder = n; } } class Hc { 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); const n = t.changes; for (const r of n) this._acceptDeleteRange(r.range), this._acceptInsertText(new Ge(r.range.startLineNumber, r.range.startColumn), r.text); this._versionId = t.versionId, this._cachedTextValue = null; } _ensureLineStarts() { if (!this._lineStarts) { const t = this._eol.length, n = this._lines.length, r = new Uint32Array(n); for (let i = 0; i < n; i++) r[i] = this._lines[i].length + t; this._lineStarts = new qc(r); } } /** * All changes to a line's text go through this method */ _setLineText(t, n) { this._lines[t] = n, this._lineStarts && this._lineStarts.setValue(t, this._lines[t].length + this._eol.length); } _acceptDeleteRange(t) { if (t.startLineNumber === t.endLineNumber) { if (t.startColumn === t.endColumn) return; this._setLineText(t.startLineNumber - 1, this._lines[t.startLineNumber - 1].substring(0, t.startColumn - 1) + this._lines[t.startLineNumber - 1].substring(t.endColumn - 1)); return; } this._setLineText(t.startLineNumber - 1, this._lines[t.startLineNumber - 1].substring(0, t.startColumn - 1) + this._lines[t.endLineNumber - 1].substring(t.endColumn - 1)), this._lines.splice(t.startLineNumber, t.endLineNumber - t.startLineNumber), this._lineStarts && this._lineStarts.removeValues(t.startLineNumber, t.endLineNumber - t.startLineNumber); } _acceptInsertText(t, n) { if (n.length === 0) return; const r = hc(n); if (r.length === 1) { this._setLineText(t.lineNumber - 1, this._lines[t.lineNumber - 1].substring(0, t.column - 1) + r[0] + this._lines[t.lineNumber - 1].substring(t.column - 1)); return; } r[r.length - 1] += this._lines[t.lineNumber - 1].substring(t.column - 1), this._setLineText(t.lineNumber - 1, this._lines[t.lineNumber - 1].substring(0, t.column - 1) + r[0]); const i = new Uint32Array(r.length - 1); for (let s = 1; s < r.length; s++) this._lines.splice(t.lineNumber + s - 1, 0, r[s]), i[s - 1] = r[s].length + this._eol.length; this._lineStarts && this._lineStarts.insertValues(t.lineNumber, i); } } const Gc = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"; function Jc(e = "") { let t = "(-?\\d*\\.\\d\\w*)|([^"; for (const n of Gc) e.indexOf(n) >= 0 || (t += "\\" + n); return t += "\\s]+)", new RegExp(t, "g"); } const Jo = Jc(); function Xc(e) { let t = Jo; 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; } const Xo = new Wn(); Xo.unshift({ maxLen: 1e3, windowSize: 15, timeBudget: 150 }); function gi(e, t, n, r, i) { if (i || (i = Ln.first(Xo)), 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), gi(e, t, n, r, i); } const s = Date.now(), a = e - 1 - r; let o = -1, l = null; for (let c = 1; !(Date.now() - s >= i.timeBudget); c++) { const h = a - i.windowSize * c; t.lastIndex = Math.max(0, h); const u = Yc(t, n, a, o); if (!u && l || (l = u, h <= 0)) break; o = h; } if (l) { const c = { word: l[0], startColumn: r + 1 + l.index, endColumn: r + 1 + l.index + l[0].length }; return t.lastIndex = 0, c; } return null; } function Yc(e, t, n, r) { let i; for (; i = e.exec(t); ) { const s = i.index || 0; if (s <= n && e.lastIndex >= n) return i; if (r > 0 && s > r) return null; } return null; } class bi { constructor(t) { const n = Ki(t); this._defaultValue = n, this._asciiMap = bi._createAsciiMap(n), this._map = /* @__PURE__ */ new Map(); } static _createAsciiMap(t) { const n = new Uint8Array(256); return n.fill(t), n; } set(t, n) { const r = Ki(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(); } } class Kc { constructor(t, n, r) { const i = new Uint8Array(t * n); for (let s = 0, a = t * n; s < a; s++) i[s] = r; this._data = i, this.rows = t, this.cols = n; } get(t, n) { return this._data[t * this.cols + n]; } set(t, n, r) { this._data[t * this.cols + n] = r; } } class Qc { constructor(t) { let n = 0, r = 0; for (let s = 0, a = t.length; s < a; s++) { const [o, l, c] = t[s]; l > n && (n = l), o > r && (r = o), c > r && (r = c); } n++, r++; const i = new Kc( r, n, 0 /* State.Invalid */ ); for (let s = 0, a = t.length; s < a; s++) { const [o, l, c] = t[s]; i.set(o, l, c); } this._states = i, this._maxCharCode = n; } nextState(t, n) { return n < 0 || n >= this._maxCharCode ? 0 : this._states.get(t, n); } } let hr = null; function Zc() { return hr === null && (hr = new Qc([ [ 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 */ ] ])), hr; } let $t = null; function eh() { if ($t === null) { $t = new bi( 0 /* CharacterClass.None */ ); const e = ` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`; for (let n = 0; n < e.length; n++) $t.set( e.charCodeAt(n), 1 /* CharacterClass.ForceTermination */ ); const t = ".,;:"; for (let n = 0; n < t.length; n++) $t.set( t.charCodeAt(n), 2 /* CharacterClass.CannotEndIn */ ); } return $t; } class Bn { static _createLink(t, n, r, i, s) { let a = s - 1; do { const o = n.charCodeAt(a); if (t.get(o) !== 2) break; a--; } while (a > i); if (i > 0) { const o = n.charCodeAt(i - 1), l = n.charCodeAt(a); (o === 40 && l === 41 || o === 91 && l === 93 || o === 123 && l === 125) && a--; } return { range: { startLineNumber: r, startColumn: i + 1, endLineNumber: r, endColumn: a + 2 }, url: n.substring(i, a + 1) }; } static computeLinks(t, n = Zc()) { const r = eh(), i = []; for (let s = 1, a = t.getLineCount(); s <= a; s++) { const o = t.getLineContent(s), l = o.length; let c = 0, h = 0, u = 0, f = 1, m = !1, b = !1, v = !1, y = !1; for (; c < l; ) { let w = !1; const S = o.charCodeAt(c); if (f === 13) { let k; switch (S) { case 40: m = !0, k = 0; break; case 41: k = m ? 0 : 1; break; case 91: v = !0, b = !0, k = 0; break; case 93: v = !1, k = b ? 0 : 1; break; case 123: y = !0, k = 0; break; case 125: k = y ? 0 : 1; break; case 39: case 34: case 96: u === S ? k = 1 : u === 39 || u === 34 || u === 96 ? k = 0 : k = 1; break; case 42: k = u === 42 ? 1 : 0; break; case 124: k = u === 124 ? 1 : 0; break; case 32: k = v ? 0 : 1; break; default: k = r.get(S); } k === 1 && (i.push(Bn._createLink(r, o, s, h, c)), w = !0); } else if (f === 12) { let k; S === 91 ? (b = !0, k = 0) : k = r.get(S), k === 1 ? w = !0 : f = 13; } else f = n.nextState(f, S), f === 0 && (w = !0); w && (f = 1, m = !1, b = !1, y = !1, h = c + 1, u = S), c++; } f === 13 && i.push(Bn._createLink(r, o, s, h, l)); } return i; } } function th(e) { return !e || typeof e.getLineCount != "function" || typeof e.getLineContent != "function" ? [] : Bn.computeLinks(e); } class Tr { constructor() { this._defaultValueSet = [ ["true", "false"], ["True", "False"], ["Private", "Public", "Friend", "ReadOnly", "Partial", "Protected", "WriteOnly"], ["public", "protected", "private"] ]; } navigateValueSet(t, n, r, i, s) { if (t && n) { const a = this.doNavigateValueSet(n, s); if (a) return { range: t, value: a }; } if (r && i) { const a = this.doNavigateValueSet(i, s); if (a) return { range: r, value: a }; } return null; } doNavigateValueSet(t, n) { const r = this.numberReplace(t, n); return r !== null ? r : this.textReplace(t, n); } numberReplace(t, n) { const r = Math.pow(10, t.length - (t.lastIndexOf(".") + 1)); let i = Number(t); const s = parseFloat(t); return !isNaN(i) && !isNaN(s) && i === s ? i === 0 && !n ? null : (i = Math.floor(i * r), i += n ? r : -r, String(i / r)) : null; } textReplace(t, n) { return this.valueSetsReplace(this._defaultValueSet, t, n); } valueSetsReplace(t, n, r) { let i = null; for (let s = 0, a = t.length; i === null && s < a; s++) i = this.valueSetReplace(t[s], n, r); return i; } valueSetReplace(t, n, r) { let i = t.indexOf(n); return i >= 0 ? (i += r ? 1 : -1, i < 0 ? i = t.length - 1 : i %= t.length, t[i]) : null; } } Tr.INSTANCE = new Tr(); class vi { constructor() { this._keyCodeToStr = [], this._strToKeyCode = /* @__PURE__ */ 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; } } const Pn = new vi(), Wr = new vi(), Or = new vi(), nh = new Array(230), rh = /* @__PURE__ */ Object.create(null), ih = /* @__PURE__ */ Object.create(null); (function() { const e = "", t = [ // keyCodeOrd, immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel [0, 1, 0, "None", 0, "unknown", 0, "VK_UNKNOWN", e, e], [0, 1, 1, "Hyper", 0, e, 0, e, e, e], [0, 1, 2, "Super", 0, e, 0, e, e, e], [0, 1, 3, "Fn", 0, e, 0, e, e, e], [0, 1, 4, "FnLock", 0, e, 0, e, e, e], [0, 1, 5, "Suspend", 0, e, 0, e, e, e], [0, 1, 6, "Resume", 0, e, 0, e, e, e], [0, 1, 7, "Turbo", 0, e, 0, e, e, e], [0, 1, 8, "Sleep", 0, e, 0, "VK_SLEEP", e, e], [0, 1, 9, "WakeUp", 0, e, 0, e, e, e], [31, 0, 10, "KeyA", 31, "A", 65, "VK_A", e, e], [32, 0, 11, "KeyB", 32, "B", 66, "VK_B", e, e], [33, 0, 12, "KeyC", 33, "C", 67, "VK_C", e, e], [34, 0, 13, "KeyD", 34, "D", 68, "VK_D", e, e], [35, 0, 14, "KeyE", 35, "E", 69, "VK_E", e, e], [36, 0, 15, "KeyF", 36, "F", 70, "VK_F", e, e], [37, 0, 16, "KeyG", 37, "G", 71, "VK_G", e, e], [38, 0, 17, "KeyH", 38, "H", 72, "VK_H", e, e], [39, 0, 18, "KeyI", 39, "I", 73, "VK_I", e, e], [40, 0, 19, "KeyJ", 40, "J", 74, "VK_J", e, e], [41, 0, 20, "KeyK", 41, "K", 75, "VK_K", e, e], [42, 0, 21, "KeyL", 42, "L", 76, "VK_L", e, e], [43, 0, 22, "KeyM", 43, "M", 77, "VK_M", e, e], [44, 0, 23, "KeyN", 44, "N", 78, "VK_N", e, e], [45, 0, 24, "KeyO", 45, "O", 79, "VK_O", e, e], [46, 0, 25, "KeyP", 46, "P", 80, "VK_P", e, e], [47, 0, 26, "KeyQ", 47, "Q", 81, "VK_Q", e, e], [48, 0, 27, "KeyR", 48, "R", 82, "VK_R", e, e], [49, 0, 28, "KeyS", 49, "S", 83, "VK_S", e, e], [50, 0, 29, "KeyT", 50, "T", 84, "VK_T", e, e], [51, 0, 30, "KeyU", 51, "U", 85, "VK_U", e, e], [52, 0, 31, "KeyV", 52, "V", 86, "VK_V", e, e], [53, 0, 32, "KeyW", 53, "W", 87, "VK_W", e, e], [54, 0, 33, "KeyX", 54, "X", 88, "VK_X", e, e], [55, 0, 34, "KeyY", 55, "Y", 89, "VK_Y", e, e], [56, 0, 35, "KeyZ", 56, "Z", 90, "VK_Z", e, e], [22, 0, 36, "Digit1", 22, "1", 49, "VK_1", e, e], [23, 0, 37, "Digit2", 23, "2", 50, "VK_2", e, e], [24, 0, 38, "Digit3", 24, "3", 51, "VK_3", e, e], [25, 0, 39, "Digit4", 25, "4", 52, "VK_4", e, e], [26, 0, 40, "Digit5", 26, "5", 53, "VK_5", e, e], [27, 0, 41, "Digit6", 27, "6", 54, "VK_6", e, e], [28, 0, 42, "Digit7", 28, "7", 55, "VK_7", e, e], [29, 0, 43, "Digit8", 29, "8", 56, "VK_8", e, e], [30, 0, 44, "Digit9", 30, "9", 57, "VK_9", e, e], [21, 0, 45, "Digit0", 21, "0", 48, "VK_0", e, e], [3, 1, 46, "Enter", 3, "Enter", 13, "VK_RETURN", e, e], [9, 1, 47, "Escape", 9, "Escape", 27, "VK_ESCAPE", e, e], [1, 1, 48, "Backspace", 1, "Backspace", 8, "VK_BACK", e, e], [2, 1, 49, "Tab", 2, "Tab", 9, "VK_TAB", e, e], [10, 1, 50, "Space", 10, "Space", 32, "VK_SPACE", e, e], [83, 0, 51, "Minus", 83, "-", 189, "VK_OEM_MINUS", "-", "OEM_MINUS"], [81, 0, 52, "Equal", 81, "=", 187, "VK_OEM_PLUS", "=", "OEM_PLUS"], [87, 0, 53, "BracketLeft", 87, "[", 219, "VK_OEM_4", "[", "OEM_4"], [89, 0, 54, "BracketRight", 89, "]", 221, "VK_OEM_6", "]", "OEM_6"], [88, 0, 55, "Backslash", 88, "\\", 220, "VK_OEM_5", "\\", "OEM_5"], [0, 0, 56, "IntlHash", 0, e, 0, e, e, e], [80, 0, 57, "Semicolon", 80, ";", 186, "VK_OEM_1", ";", "OEM_1"], [90, 0, 58, "Quote", 90, "'", 222, "VK_OEM_7", "'", "OEM_7"], [86, 0, 59, "Backquote", 86, "`", 192, "VK_OEM_3", "`", "OEM_3"], [82, 0, 60, "Comma", 82, ",", 188, "VK_OEM_COMMA", ",", "OEM_COMMA"], [84, 0, 61, "Period", 84, ".", 190, "VK_OEM_PERIOD", ".", "OEM_PERIOD"], [85, 0, 62, "Slash", 85, "/", 191, "VK_OEM_2", "/", "OEM_2"], [8, 1, 63, "CapsLock", 8, "CapsLock", 20, "VK_CAPITAL", e, e], [59, 1, 64, "F1", 59, "F1", 112, "VK_F1", e, e], [60, 1, 65, "F2", 60, "F2", 113, "VK_F2", e, e], [61, 1, 66, "F3", 61, "F3", 114, "VK_F3", e, e], [62, 1, 67, "F4", 62, "F4", 115, "VK_F4", e, e], [63, 1, 68, "F5", 63, "F5", 116, "VK_F5", e, e], [64, 1, 69, "F6", 64, "F6", 117, "VK_F6", e, e], [65, 1, 70, "F7", 65, "F7", 118, "VK_F7", e, e], [66, 1, 71, "F8", 66, "F8", 119, "VK_F8", e, e], [67, 1, 72, "F9", 67, "F9", 120, "VK_F9", e, e], [68, 1, 73, "F10", 68, "F10", 121, "VK_F10", e, e], [69, 1, 74, "F11", 69, "F11", 122, "VK_F11", e, e], [70, 1, 75, "F12", 70, "F12", 123, "VK_F12", e, e], [0, 1, 76, "PrintScreen", 0, e, 0, e, e, e], [79, 1, 77, "ScrollLock", 79, "ScrollLock", 145, "VK_SCROLL", e, e], [7, 1, 78, "Pause", 7, "PauseBreak", 19, "VK_PAUSE", e, e], [19, 1, 79, "Insert", 19, "Insert", 45, "VK_INSERT", e, e], [14, 1, 80, "Home", 14, "Home", 36, "VK_HOME", e, e], [11, 1, 81, "PageUp", 11, "PageUp", 33, "VK_PRIOR", e, e], [20, 1, 82, "Delete", 20, "Delete", 46, "VK_DELETE", e, e], [13, 1, 83, "End", 13, "End", 35, "VK_END", e, e], [12, 1, 84, "PageDown", 12, "PageDown", 34, "VK_NEXT", e, e], [17, 1, 85, "ArrowRight", 17, "RightArrow", 39, "VK_RIGHT", "Right", e], [15, 1, 86, "ArrowLeft", 15, "LeftArrow", 37, "VK_LEFT", "Left", e], [18, 1, 87, "ArrowDown", 18, "DownArrow", 40, "VK_DOWN", "Down", e], [16, 1, 88, "ArrowUp", 16, "UpArrow", 38, "VK_UP", "Up", e], [78, 1, 89, "NumLock", 78, "NumLock", 144, "VK_NUMLOCK", e, e], [108, 1, 90, "NumpadDivide", 108, "NumPad_Divide", 111, "VK_DIVIDE", e, e], [103, 1, 91, "NumpadMultiply", 103, "NumPad_Multiply", 106, "VK_MULTIPLY", e, e], [106, 1, 92, "NumpadSubtract", 106, "NumPad_Subtract", 109, "VK_SUBTRACT", e, e], [104, 1, 93, "NumpadAdd", 104, "NumPad_Add", 107, "VK_ADD", e, e], [3, 1, 94, "NumpadEnter", 3, e, 0, e, e, e], [94, 1, 95, "Numpad1", 94, "NumPad1", 97, "VK_NUMPAD1", e, e], [95, 1, 96, "Numpad2", 95, "NumPad2", 98, "VK_NUMPAD2", e, e], [96, 1, 97, "Numpad3", 96, "NumPad3", 99, "VK_NUMPAD3", e, e], [97, 1, 98, "Numpad4", 97, "NumPad4", 100, "VK_NUMPAD4", e, e], [98, 1, 99, "Numpad5", 98, "NumPad5", 101, "VK_NUMPAD5", e, e], [99, 1, 100, "Numpad6", 99, "NumPad6", 102, "VK_NUMPAD6", e, e], [100, 1, 101, "Numpad7", 100, "NumPad7", 103, "VK_NUMPAD7", e, e], [101, 1, 102, "Numpad8", 101, "NumPad8", 104, "VK_NUMPAD8", e, e], [102, 1, 103, "Numpad9", 102, "NumPad9", 105, "VK_NUMPAD9", e, e], [93, 1, 104, "Numpad0", 93, "NumPad0", 96, "VK_NUMPAD0", e, e], [107, 1, 105, "NumpadDecimal", 107, "NumPad_Decimal", 110, "VK_DECIMAL", e, e], [92, 0, 106, "IntlBackslash", 92, "OEM_102", 226, "VK_OEM_102", e, e], [58, 1, 107, "ContextMenu", 58, "ContextMenu", 93, e, e, e], [0, 1, 108, "Power", 0, e, 0, e, e, e], [0, 1, 109, "NumpadEqual", 0, e, 0, e, e, e], [71, 1, 110, "F13", 71, "F13", 124, "VK_F13", e, e], [72, 1, 111, "F14", 72, "F14", 125, "VK_F14", e, e], [73, 1, 112, "F15", 73, "F15", 126, "VK_F15", e, e], [74, 1, 113, "F16", 74, "F16", 127, "VK_F16", e, e], [75, 1, 114, "F17", 75, "F17", 128, "VK_F17", e, e], [76, 1, 115, "F18", 76, "F18", 129, "VK_F18", e, e], [77, 1, 116, "F19", 77, "F19", 130, "VK_F19", e, e], [0, 1, 117, "F20", 0, e, 0, "VK_F20", e, e], [0, 1, 118, "F21", 0, e, 0, "VK_F21", e, e], [0, 1, 119, "F22", 0, e, 0, "VK_F22", e, e], [0, 1, 120, "F23", 0, e, 0, "VK_F23", e, e], [0, 1, 121, "F24", 0, e, 0, "VK_F24", e, e], [0, 1, 122, "Open", 0, e, 0, e, e, e], [0, 1, 123, "Help", 0, e, 0, e, e, e], [0, 1, 124, "Select", 0, e, 0, e, e, e], [0, 1, 125, "Again", 0, e, 0, e, e, e], [0, 1, 126, "Undo", 0, e, 0, e, e, e], [0, 1, 127, "Cut", 0, e, 0, e, e, e], [0, 1, 128, "Copy", 0, e, 0, e, e, e], [0, 1, 129, "Paste", 0, e, 0, e, e, e], [0, 1, 130, "Find", 0, e, 0, e, e, e], [0, 1, 131, "AudioVolumeMute", 112, "AudioVolumeMute", 173, "VK_VOLUME_MUTE", e, e], [0, 1, 132, "AudioVolumeUp", 113, "AudioVolumeUp", 175, "VK_VOLUME_UP", e, e], [0, 1, 133, "AudioVolumeDown", 114, "AudioVolumeDown", 174, "VK_VOLUME_DOWN", e, e], [105, 1, 134, "NumpadComma", 105, "NumPad_Separator", 108, "VK_SEPARATOR", e, e], [110, 0, 135, "IntlRo", 110, "ABNT_C1", 193, "VK_ABNT_C1", e, e], [0, 1, 136, "KanaMode", 0, e, 0, e, e, e], [0, 0, 137, "IntlYen", 0, e, 0, e, e, e], [0, 1, 138, "Convert", 0, e, 0, e, e, e], [0, 1, 139, "NonConvert", 0, e, 0, e, e, e], [0, 1, 140, "Lang1", 0, e, 0, e, e, e], [0, 1, 141, "Lang2", 0, e, 0, e, e, e], [0, 1, 142, "Lang3", 0, e, 0, e, e, e], [0, 1, 143, "Lang4", 0, e, 0, e, e, e], [0, 1, 144, "Lang5", 0, e, 0, e, e, e], [0, 1, 145, "Abort", 0, e, 0, e, e, e], [0, 1, 146, "Props", 0, e, 0, e, e, e], [0, 1, 147, "NumpadParenLeft", 0, e, 0, e, e, e], [0, 1, 148, "NumpadParenRight", 0, e, 0, e, e, e], [0, 1, 149, "NumpadBackspace", 0, e, 0, e, e, e], [0, 1, 150, "NumpadMemoryStore", 0, e, 0, e, e, e], [0, 1, 151, "NumpadMemoryRecall", 0, e, 0, e, e, e], [0, 1, 152, "NumpadMemoryClear", 0, e, 0, e, e, e], [0, 1, 153, "NumpadMemoryAdd", 0, e, 0, e, e, e], [0, 1, 154, "NumpadMemorySubtract", 0, e, 0, e, e, e], [0, 1, 155, "NumpadClear", 126, "Clear", 12, "VK_CLEAR", e, e], [0, 1, 156, "NumpadClearEntry", 0, e, 0, e, e, e], [5, 1, 0, e, 5, "Ctrl", 17, "VK_CONTROL", e, e], [4, 1, 0, e, 4, "Shift", 16, "VK_SHIFT", e, e], [6, 1, 0, e, 6, "Alt", 18, "VK_MENU", e, e], [57, 1, 0, e, 57, "Meta", 91, "VK_COMMAND", e, e], [5, 1, 157, "ControlLeft", 5, e, 0, "VK_LCONTROL", e, e], [4, 1, 158, "ShiftLeft", 4, e, 0, "VK_LSHIFT", e, e], [6, 1, 159, "AltLeft", 6, e, 0, "VK_LMENU", e, e], [57, 1, 160, "MetaLeft", 57, e, 0, "VK_LWIN", e, e], [5, 1, 161, "ControlRight", 5, e, 0, "VK_RCONTROL", e, e], [4, 1, 162, "ShiftRight", 4, e, 0, "VK_RSHIFT", e, e], [6, 1, 163, "AltRight", 6, e, 0, "VK_RMENU", e, e], [57, 1, 164, "MetaRight", 57, e, 0, "VK_RWIN", e, e], [0, 1, 165, "BrightnessUp", 0, e, 0, e, e, e], [0, 1, 166, "BrightnessDown", 0, e, 0, e, e, e], [0, 1, 167, "MediaPlay", 0, e, 0, e, e, e], [0, 1, 168, "MediaRecord", 0, e, 0, e, e, e], [0, 1, 169, "MediaFastForward", 0, e, 0, e, e, e], [0, 1, 170, "MediaRewind", 0, e, 0, e, e, e], [114, 1, 171, "MediaTrackNext", 119, "MediaTrackNext", 176, "VK_MEDIA_NEXT_TRACK", e, e], [115, 1, 172, "MediaTrackPrevious", 120, "MediaTrackPrevious", 177, "VK_MEDIA_PREV_TRACK", e, e], [116, 1, 173, "MediaStop", 121, "MediaStop", 178, "VK_MEDIA_STOP", e, e], [0, 1, 174, "Eject", 0, e, 0, e, e, e], [117, 1, 175, "MediaPlayPause", 122, "MediaPlayPause", 179, "VK_MEDIA_PLAY_PAUSE", e, e], [0, 1, 176, "MediaSelect", 123, "LaunchMediaPlayer", 181, "VK_MEDIA_LAUNCH_MEDIA_SELECT", e, e], [0, 1, 177, "LaunchMail", 124, "LaunchMail", 180, "VK_MEDIA_LAUNCH_MAIL", e, e], [0, 1, 178, "LaunchApp2", 125, "LaunchApp2", 183, "VK_MEDIA_LAUNCH_APP2", e, e], [0, 1, 179, "LaunchApp1", 0, e, 0, "VK_MEDIA_LAUNCH_APP1", e, e], [0, 1, 180, "SelectTask", 0, e, 0, e, e, e], [0, 1, 181, "LaunchScreenSaver", 0, e, 0, e, e, e], [0, 1, 182, "BrowserSearch", 115, "BrowserSearch", 170, "VK_BROWSER_SEARCH", e, e], [0, 1, 183, "BrowserHome", 116, "BrowserHome", 172, "VK_BROWSER_HOME", e, e], [112, 1, 184, "BrowserBack", 117, "BrowserBack", 166, "VK_BROWSER_BACK", e, e], [113, 1, 185, "BrowserForward", 118, "BrowserForward", 167, "VK_BROWSER_FORWARD", e, e], [0, 1, 186, "BrowserStop", 0, e, 0, "VK_BROWSER_STOP", e, e], [0, 1, 187, "BrowserRefresh", 0, e, 0, "VK_BROWSER_REFRESH", e, e], [0, 1, 188, "BrowserFavorites", 0, e, 0, "VK_BROWSER_FAVORITES", e, e], [0, 1, 189, "ZoomToggle", 0, e, 0, e, e, e], [0, 1, 190, "MailReply", 0, e, 0, e, e, e], [0, 1, 191, "MailForward", 0, e, 0, e, e, e], [0, 1, 192, "MailSend", 0, e, 0, e, e, e], // 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. [109, 1, 0, e, 109, "KeyInComposition", 229, e, e, e], [111, 1, 0, e, 111, "ABNT_C2", 194, "VK_ABNT_C2", e, e], [91, 1, 0, e, 91, "OEM_8", 223, "VK_OEM_8", e, e], [0, 1, 0, e, 0, e, 0, "VK_KANA", e, e], [0, 1, 0, e, 0, e, 0, "VK_HANGUL", e, e], [0, 1, 0, e, 0, e, 0, "VK_JUNJA", e, e], [0, 1, 0, e, 0, e, 0, "VK_FINAL", e, e], [0, 1, 0, e, 0, e, 0, "VK_HANJA", e, e], [0, 1, 0, e, 0, e, 0, "VK_KANJI", e, e], [0, 1, 0, e, 0, e, 0, "VK_CONVERT", e, e], [0, 1, 0, e, 0, e, 0, "VK_NONCONVERT", e, e], [0, 1, 0, e, 0, e, 0, "VK_ACCEPT", e, e], [0, 1, 0, e, 0, e, 0, "VK_MODECHANGE", e, e], [0, 1, 0, e, 0, e, 0, "VK_SELECT", e, e], [0, 1, 0, e, 0, e, 0, "VK_PRINT", e, e], [0, 1, 0, e, 0, e, 0, "VK_EXECUTE", e, e], [0, 1, 0, e, 0, e, 0, "VK_SNAPSHOT", e, e], [0, 1, 0, e, 0, e, 0, "VK_HELP", e, e], [0, 1, 0, e, 0, e, 0, "VK_APPS", e, e], [0, 1, 0, e, 0, e, 0, "VK_PROCESSKEY", e, e], [0, 1, 0, e, 0, e, 0, "VK_PACKET", e, e], [0, 1, 0, e, 0, e, 0, "VK_DBE_SBCSCHAR", e, e], [0, 1, 0, e, 0, e, 0, "VK_DBE_DBCSCHAR", e, e], [0, 1, 0, e, 0, e, 0, "VK_ATTN", e, e], [0, 1, 0, e, 0, e, 0, "VK_CRSEL", e, e], [0, 1, 0, e, 0, e, 0, "VK_EXSEL", e, e], [0, 1, 0, e, 0, e, 0, "VK_EREOF", e, e], [0, 1, 0, e, 0, e, 0, "VK_PLAY", e, e], [0, 1, 0, e, 0, e, 0, "VK_ZOOM", e, e], [0, 1, 0, e, 0, e, 0, "VK_NONAME", e, e], [0, 1, 0, e, 0, e, 0, "VK_PA1", e, e], [0, 1, 0, e, 0, e, 0, "VK_OEM_CLEAR", e, e] ], n = [], r = []; for (const i of t) { const [s, a, o, l, c, h, u, f, m, b] = i; if (r[o] || (r[o] = !0, rh[l] = o, ih[l.toLowerCase()] = o), !n[c]) { if (n[c] = !0, !h) throw new Error(`String representation missing for key code ${c} around scan code ${l}`); Pn.define(c, h), Wr.define(c, m || h), Or.define(c, b || m || h); } u && (nh[u] = c); } })(); var Qi; (function(e) { function t(o) { return Pn.keyCodeToStr(o); } e.toString = t; function n(o) { return Pn.strToKeyCode(o); } e.fromString = n; function r(o) { return Wr.keyCodeToStr(o); } e.toUserSettingsUS = r; function i(o) { return Or.keyCodeToStr(o); } e.toUserSettingsGeneral = i; function s(o) { return Wr.strToKeyCode(o) || Or.strToKeyCode(o); } e.fromUserSettings = s; function a(o) { if (o >= 93 && o <= 108) return null; switch (o) { case 16: return "Up"; case 18: return "Down"; case 15: return "Left"; case 17: return "Right"; } return Pn.keyCodeToStr(o); } e.toElectronAccelerator = a; })(Qi || (Qi = {})); function sh(e, t) { const n = (t & 65535) << 16 >>> 0; return (e | n) >>> 0; } class De extends _e { constructor(t, n, r, i) { super(t, n, r, i), this.selectionStartLineNumber = t, this.selectionStartColumn = n, this.positionLineNumber = r, this.positionColumn = i; } /** * Transform to a human-readable representation. */ toString() { return "[" + this.selectionStartLineNumber + "," + this.selectionStartColumn + " -> " + this.positionLineNumber + "," + this.positionColumn + "]"; } /** * Test if equals other selection. */ equalsSelection(t) { return De.selectionsEqual(this, t); } /** * Test if the two selections are equal. */ static selectionsEqual(t, n) { return t.selectionStartLineNumber === n.selectionStartLineNumber && t.selectionStartColumn === n.selectionStartColumn && t.positionLineNumber === n.positionLineNumber && t.positionColumn === n.positionColumn; } /** * Get directions (LTR or RTL). */ getDirection() { return this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn ? 0 : 1; } /** * Create a new selection with a different `positionLineNumber` and `positionColumn`. */ setEndPosition(t, n) { return this.getDirection() === 0 ? new De(this.startLineNumber, this.startColumn, t, n) : new De(t, n, this.startLineNumber, this.startColumn); } /** * Get the position at `positionLineNumber` and `positionColumn`. */ getPosition() { return new Ge(this.positionLineNumber, this.positionColumn); } /** * Get the position at the start of the selection. */ getSelectionStart() { return new Ge(this.selectionStartLineNumber, this.selectionStartColumn); } /** * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. */ setStartPosition(t, n) { return this.getDirection() === 0 ? new De(t, n, this.endLineNumber, this.endColumn) : new De(this.endLineNumber, this.endColumn, t, n); } // ---- /** * Create a `Selection` from one or two positions */ static fromPositions(t, n = t) { return new De(t.lineNumber, t.column, n.lineNumber, n.column); } /** * Creates a `Selection` from a range, given a direction. */ static fromRange(t, n) { return n === 0 ? new De(t.startLineNumber, t.startColumn, t.endLineNumber, t.endColumn) : new De(t.endLineNumber, t.endColumn, t.startLineNumber, t.startColumn); } /** * Create a `Selection` from an `ISelection`. */ static liftSelection(t) { return new De(t.selectionStartLineNumber, t.selectionStartColumn, t.positionLineNumber, t.positionColumn); } /** * `a` equals `b`. */ 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 < i; r++) if (!this.selectionsEqual(t[r], n[r])) return !1; return !0; } /** * Test if `obj` is an `ISelection`. */ static isISelection(t) { return t && typeof t.selectionStartLineNumber == "number" && typeof t.selectionStartColumn == "number" && typeof t.positionLineNumber == "number" && typeof t.positionColumn == "number"; } /** * Create with a direction. */ static createWithDirection(t, n, r, i, s) { return s === 0 ? new De(t, n, r, i) : new De(r, i, t, n); } } const Zi = /* @__PURE__ */ Object.create(null); function d(e, t) { if (ic(t)) { const n = Zi[t]; if (n === void 0) throw new Error(`${e} references an unknown codicon: ${t}`); t = n; } return Zi[e] = t, { id: e }; } const U = { // built-in icons, with image name add: d("add", 6e4), plus: d("plus", 6e4), gistNew: d("gist-new", 6e4), repoCreate: d("repo-create", 6e4), lightbulb: d("lightbulb", 60001), lightBulb: d("light-bulb", 60001), repo: d("repo", 60002), repoDelete: d("repo-delete", 60002), gistFork: d("gist-fork", 60003), repoForked: d("repo-forked", 60003), gitPullRequest: d("git-pull-request", 60004), gitPullRequestAbandoned: d("git-pull-request-abandoned", 60004), recordKeys: d("record-keys", 60005), keyboard: d("keyboard", 60005), tag: d("tag", 60006), tagAdd: d("tag-add", 60006), tagRemove: d("tag-remove", 60006), person: d("person", 60007), personFollow: d("person-follow", 60007), personOutline: d("person-outline", 60007), personFilled: d("person-filled", 60007), gitBranch: d("git-branch", 60008), gitBranchCreate: d("git-branch-create", 60008), gitBranchDelete: d("git-branch-delete", 60008), sourceControl: d("source-control", 60008), mirror: d("mirror", 60009), mirrorPublic: d("mirror-public", 60009), star: d("star", 60010), starAdd: d("star-add", 60010), starDelete: d("star-delete", 60010), starEmpty: d("star-empty", 60010), comment: d("comment", 60011), commentAdd: d("comment-add", 60011), alert: d("alert", 60012), warning: d("warning", 60012), search: d("search", 60013), searchSave: d("search-save", 60013), logOut: d("log-out", 60014), signOut: d("sign-out", 60014), logIn: d("log-in", 60015), signIn: d("sign-in", 60015), eye: d("eye", 60016), eyeUnwatch: d("eye-unwatch", 60016), eyeWatch: d("eye-watch", 60016), circleFilled: d("circle-filled", 60017), primitiveDot: d("primitive-dot", 60017), closeDirty: d("close-dirty", 60017), debugBreakpoint: d("debug-breakpoint", 60017), debugBreakpointDisabled: d("debug-breakpoint-disabled", 60017), debugHint: d("debug-hint", 60017), primitiveSquare: d("primitive-square", 60018), edit: d("edit", 60019), pencil: d("pencil", 60019), info: d("info", 60020), issueOpened: d("issue-opened", 60020), gistPrivate: d("gist-private", 60021), gitForkPrivate: d("git-fork-private", 60021), lock: d("lock", 60021), mirrorPrivate: d("mirror-private", 60021), close: d("close", 60022), removeClose: d("remove-close", 60022), x: d("x", 60022), repoSync: d("repo-sync", 60023), sync: d("sync", 60023), clone: d("clone", 60024), desktopDownload: d("desktop-download", 60024), beaker: d("beaker", 60025), microscope: d("microscope", 60025), vm: d("vm", 60026), deviceDesktop: d("device-desktop", 60026), file: d("file", 60027), fileText: d("file-text", 60027), more: d("more", 60028), ellipsis: d("ellipsis", 60028), kebabHorizontal: d("kebab-horizontal", 60028), mailReply: d("mail-reply", 60029), reply: d("reply", 60029), organization: d("organization", 60030), organizationFilled: d("organization-filled", 60030), organizationOutline: d("organization-outline", 60030), newFile: d("new-file", 60031), fileAdd: d("file-add", 60031), newFolder: d("new-folder", 60032), fileDirectoryCreate: d("file-directory-create", 60032), trash: d("trash", 60033), trashcan: d("trashcan", 60033), history: d("history", 60034), clock: d("clock", 60034), folder: d("folder", 60035), fileDirectory: d("file-directory", 60035), symbolFolder: d("symbol-folder", 60035), logoGithub: d("logo-github", 60036), markGithub: d("mark-github", 60036), github: d("github", 60036), terminal: d("terminal", 60037), console: d("console", 60037), repl: d("repl", 60037), zap: d("zap", 60038), symbolEvent: d("symbol-event", 60038), error: d("error", 60039), stop: d("stop", 60039), variable: d("variable", 60040), symbolVariable: d("symbol-variable", 60040), array: d("array", 60042), symbolArray: d("symbol-array", 60042), symbolModule: d("symbol-module", 60043), symbolPackage: d("symbol-package", 60043), symbolNamespace: d("symbol-namespace", 60043), symbolObject: d("symbol-object", 60043), symbolMethod: d("symbol-method", 60044), symbolFunction: d("symbol-function", 60044), symbolConstructor: d("symbol-constructor", 60044), symbolBoolean: d("symbol-boolean", 60047), symbolNull: d("symbol-null", 60047), symbolNumeric: d("symbol-numeric", 60048), symbolNumber: d("symbol-number", 60048), symbolStructure: d("symbol-structure", 60049), symbolStruct: d("symbol-struct", 60049), symbolParameter: d("symbol-parameter", 60050), symbolTypeParameter: d("symbol-type-parameter", 60050), symbolKey: d("symbol-key", 60051), symbolText: d("symbol-text", 60051), symbolReference: d("symbol-reference", 60052), goToFile: d("go-to-file", 60052), symbolEnum: d("symbol-enum", 60053), symbolValue: d("symbol-value", 60053), symbolRuler: d("symbol-ruler", 60054), symbolUnit: d("symbol-unit", 60054), activateBreakpoints: d("activate-breakpoints", 60055), archive: d("archive", 60056), arrowBoth: d("arrow-both", 60057), arrowDown: d("arrow-down", 60058), arrowLeft: d("arrow-left", 60059), arrowRight: d("arrow-right", 60060), arrowSmallDown: d("arrow-small-down", 60061), arrowSmallLeft: d("arrow-small-left", 60062), arrowSmallRight: d("arrow-small-right", 60063), arrowSmallUp: d("arrow-small-up", 60064), arrowUp: d("arrow-up", 60065), bell: d("bell", 60066), bold: d("bold", 60067), book: d("book", 60068), bookmark: d("bookmark", 60069), debugBreakpointConditionalUnverified: d("debug-breakpoint-conditional-unverified", 60070), debugBreakpointConditional: d("debug-breakpoint-conditional", 60071), debugBreakpointConditionalDisabled: d("debug-breakpoint-conditional-disabled", 60071), debugBreakpointDataUnverified: d("debug-breakpoint-data-unverified", 60072), debugBreakpointData: d("debug-breakpoint-data", 60073), debugBreakpointDataDisabled: d("debug-breakpoint-data-disabled", 60073), debugBreakpointLogUnverified: d("debug-breakpoint-log-unverified", 60074), debugBreakpointLog: d("debug-breakpoint-log", 60075), debugBreakpointLogDisabled: d("debug-breakpoint-log-disabled", 60075), briefcase: d("briefcase", 60076), broadcast: d("broadcast", 60077), browser: d("browser", 60078), bug: d("bug", 60079), calendar: d("calendar", 60080), caseSensitive: d("case-sensitive", 60081), check: d("check", 60082), checklist: d("checklist", 60083), chevronDown: d("chevron-down", 60084), dropDownButton: d("drop-down-button", 60084), chevronLeft: d("chevron-left", 60085), chevronRight: d("chevron-right", 60086), chevronUp: d("chevron-up", 60087), chromeClose: d("chrome-close", 60088), chromeMaximize: d("chrome-maximize", 60089), chromeMinimize: d("chrome-minimize", 60090), chromeRestore: d("chrome-restore", 60091), circle: d("circle", 60092), circleOutline: d("circle-outline", 60092), debugBreakpointUnverified: d("debug-breakpoint-unverified", 60092), circleSlash: d("circle-slash", 60093), circuitBoard: d("circuit-board", 60094), clearAll: d("clear-all", 60095), clippy: d("clippy", 60096), closeAll: d("close-all", 60097), cloudDownload: d("cloud-download", 60098), cloudUpload: d("cloud-upload", 60099), code: d("code", 60100), collapseAll: d("collapse-all", 60101), colorMode: d("color-mode", 60102), commentDiscussion: d("comment-discussion", 60103), compareChanges: d("compare-changes", 60157), creditCard: d("credit-card", 60105), dash: d("dash", 60108), dashboard: d("dashboard", 60109), database: d("database", 60110), debugContinue: d("debug-continue", 60111), debugDisconnect: d("debug-disconnect", 60112), debugPause: d("debug-pause", 60113), debugRestart: d("debug-restart", 60114), debugStart: d("debug-start", 60115), debugStepInto: d("debug-step-into", 60116), debugStepOut: d("debug-step-out", 60117), debugStepOver: d("debug-step-over", 60118), debugStop: d("debug-stop", 60119), debug: d("debug", 60120), deviceCameraVideo: d("device-camera-video", 60121), deviceCamera: d("device-camera", 60122), deviceMobile: d("device-mobile", 60123), diffAdded: d("diff-added", 60124), diffIgnored: d("diff-ignored", 60125), diffModified: d("diff-modified", 60126), diffRemoved: d("diff-removed", 60127), diffRenamed: d("diff-renamed", 60128), diff: d("diff", 60129), discard: d("discard", 60130), editorLayout: d("editor-layout", 60131), emptyWindow: d("empty-window", 60132), exclude: d("exclude", 60133), extensions: d("extensions", 60134), eyeClosed: d("eye-closed", 60135), fileBinary: d("file-binary", 60136), fileCode: d("file-code", 60137), fileMedia: d("file-media", 60138), filePdf: d("file-pdf", 60139), fileSubmodule: d("file-submodule", 60140), fileSymlinkDirectory: d("file-symlink-directory", 60141), fileSymlinkFile: d("file-symlink-file", 60142), fileZip: d("file-zip", 60143), files: d("files", 60144), filter: d("filter", 60145), flame: d("flame", 60146), foldDown: d("fold-down", 60147), foldUp: d("fold-up", 60148), fold: d("fold", 60149), folderActive: d("folder-active", 60150), folderOpened: d("folder-opened", 60151), gear: d("gear", 60152), gift: d("gift", 60153), gistSecret: d("gist-secret", 60154), gist: d("gist", 60155), gitCommit: d("git-commit", 60156), gitCompare: d("git-compare", 60157), gitMerge: d("git-merge", 60158), githubAction: d("github-action", 60159), githubAlt: d("github-alt", 60160), globe: d("globe", 60161), grabber: d("grabber", 60162), graph: d("graph", 60163), gripper: d("gripper", 60164), heart: d("heart", 60165), home: d("home", 60166), horizontalRule: d("horizontal-rule", 60167), hubot: d("hubot", 60168), inbox: d("inbox", 60169), issueClosed: d("issue-closed", 60324), issueReopened: d("issue-reopened", 60171), issues: d("issues", 60172), italic: d("italic", 60173), jersey: d("jersey", 60174), json: d("json", 60175), bracket: d("bracket", 60175), kebabVertical: d("kebab-vertical", 60176), key: d("key", 60177), law: d("law", 60178), lightbulbAutofix: d("lightbulb-autofix", 60179), linkExternal: d("link-external", 60180), link: d("link", 60181), listOrdered: d("list-ordered", 60182), listUnordered: d("list-unordered", 60183), liveShare: d("live-share", 60184), loading: d("loading", 60185), location: d("location", 60186), mailRead: d("mail-read", 60187), mail: d("mail", 60188), markdown: d("markdown", 60189), megaphone: d("megaphone", 60190), mention: d("mention", 60191), milestone: d("milestone", 60192), mortarBoard: d("mortar-board", 60193), move: d("move", 60194), multipleWindows: d("multiple-windows", 60195), mute: d("mute", 60196), noNewline: d("no-newline", 60197), note: d("note", 60198), octoface: d("octoface", 60199), openPreview: d("open-preview", 60200), package_: d("package", 60201), paintcan: d("paintcan", 60202), pin: d("pin", 60203), play: d("play", 60204), run: d("run", 60204), plug: d("plug", 60205), preserveCase: d("preserve-case", 60206), preview: d("preview", 60207), project: d("project", 60208), pulse: d("pulse", 60209), question: d("question", 60210), quote: d("quote", 60211), radioTower: d("radio-tower", 60212), reactions: d("reactions", 60213), references: d("references", 60214), refresh: d("refresh", 60215), regex: d("regex", 60216), remoteExplorer: d("remote-explorer", 60217), remote: d("remote", 60218), remove: d("remove", 60219), replaceAll: d("replace-all", 60220), replace: d("replace", 60221), repoClone: d("repo-clone", 60222), repoForcePush: d("repo-force-push", 60223), repoPull: d("repo-pull", 60224), repoPush: d("repo-push", 60225), report: d("report", 60226), requestChanges: d("request-changes", 60227), rocket: d("rocket", 60228), rootFolderOpened: d("root-folder-opened", 60229), rootFolder: d("root-folder", 60230), rss: d("rss", 60231), ruby: d("ruby", 60232), saveAll: d("save-all", 60233), saveAs: d("save-as", 60234), save: d("save", 60235), screenFull: d("screen-full", 60236), screenNormal: d("screen-normal", 60237), searchStop: d("search-stop", 60238), server: d("server", 60240), settingsGear: d("settings-gear", 60241), settings: d("settings", 60242), shield: d("shield", 60243), smiley: d("smiley", 60244), sortPrecedence: d("sort-precedence", 60245), splitHorizontal: d("split-horizontal", 60246), splitVertical: d("split-vertical", 60247), squirrel: d("squirrel", 60248), starFull: d("star-full", 60249), starHalf: d("star-half", 60250), symbolClass: d("symbol-class", 60251), symbolColor: d("symbol-color", 60252), symbolCustomColor: d("symbol-customcolor", 60252), symbolConstant: d("symbol-constant", 60253), symbolEnumMember: d("symbol-enum-member", 60254), symbolField: d("symbol-field", 60255), symbolFile: d("symbol-file", 60256), symbolInterface: d("symbol-interface", 60257), symbolKeyword: d("symbol-keyword", 60258), symbolMisc: d("symbol-misc", 60259), symbolOperator: d("symbol-operator", 60260), symbolProperty: d("symbol-property", 60261), wrench: d("wrench", 60261), wrenchSubaction: d("wrench-subaction", 60261), symbolSnippet: d("symbol-snippet", 60262), tasklist: d("tasklist", 60263), telescope: d("telescope", 60264), textSize: d("text-size", 60265), threeBars: d("three-bars", 60266), thumbsdown: d("thumbsdown", 60267), thumbsup: d("thumbsup", 60268), tools: d("tools", 60269), triangleDown: d("triangle-down", 60270), triangleLeft: d("triangle-left", 60271), triangleRight: d("triangle-right", 60272), triangleUp: d("triangle-up", 60273), twitter: d("twitter", 60274), unfold: d("unfold", 60275), unlock: d("unlock", 60276), unmute: d("unmute", 60277), unverified: d("unverified", 60278), verified: d("verified", 60279), versions: d("versions", 60280), vmActive: d("vm-active", 60281), vmOutline: d("vm-outline", 60282), vmRunning: d("vm-running", 60283), watch: d("watch", 60284), whitespace: d("whitespace", 60285), wholeWord: d("whole-word", 60286), window: d("window", 60287), wordWrap: d("word-wrap", 60288), zoomIn: d("zoom-in", 60289), zoomOut: d("zoom-out", 60290), listFilter: d("list-filter", 60291), listFlat: d("list-flat", 60292), listSelection: d("list-selection", 60293), selection: d("selection", 60293), listTree: d("list-tree", 60294), debugBreakpointFunctionUnverified: d("debug-breakpoint-function-unverified", 60295), debugBreakpointFunction: d("debug-breakpoint-function", 60296), debugBreakpointFunctionDisabled: d("debug-breakpoint-function-disabled", 60296), debugStackframeActive: d("debug-stackframe-active", 60297), circleSmallFilled: d("circle-small-filled", 60298), debugStackframeDot: d("debug-stackframe-dot", 60298), debugStackframe: d("debug-stackframe", 60299), debugStackframeFocused: d("debug-stackframe-focused", 60299), debugBreakpointUnsupported: d("debug-breakpoint-unsupported", 60300), symbolString: d("symbol-string", 60301), debugReverseContinue: d("debug-reverse-continue", 60302), debugStepBack: d("debug-step-back", 60303), debugRestartFrame: d("debug-restart-frame", 60304), callIncoming: d("call-incoming", 60306), callOutgoing: d("call-outgoing", 60307), menu: d("menu", 60308), expandAll: d("expand-all", 60309), feedback: d("feedback", 60310), groupByRefType: d("group-by-ref-type", 60311), ungroupByRefType: d("ungroup-by-ref-type", 60312), account: d("account", 60313), bellDot: d("bell-dot", 60314), debugConsole: d("debug-console", 60315), library: d("library", 60316), output: d("output", 60317), runAll: d("run-all", 60318), syncIgnored: d("sync-ignored", 60319), pinned: d("pinned", 60320), githubInverted: d("github-inverted", 60321), debugAlt: d("debug-alt", 60305), serverProcess: d("server-process", 60322), serverEnvironment: d("server-environment", 60323), pass: d("pass", 60324), stopCircle: d("stop-circle", 60325), playCircle: d("play-circle", 60326), record: d("record", 60327), debugAltSmall: d("debug-alt-small", 60328), vmConnect: d("vm-connect", 60329), cloud: d("cloud", 60330), merge: d("merge", 60331), exportIcon: d("export", 60332), graphLeft: d("graph-left", 60333), magnet: d("magnet", 60334), notebook: d("notebook", 60335), redo: d("redo", 60336), checkAll: d("check-all", 60337), pinnedDirty: d("pinned-dirty", 60338), passFilled: d("pass-filled", 60339), circleLargeFilled: d("circle-large-filled", 60340), circleLarge: d("circle-large", 60341), circleLargeOutline: d("circle-large-outline", 60341), combine: d("combine", 60342), gather: d("gather", 60342), table: d("table", 60343), variableGroup: d("variable-group", 60344), typeHierarchy: d("type-hierarchy", 60345), typeHierarchySub: d("type-hierarchy-sub", 60346), typeHierarchySuper: d("type-hierarchy-super", 60347), gitPullRequestCreate: d("git-pull-request-create", 60348), runAbove: d("run-above", 60349), runBelow: d("run-below", 60350), notebookTemplate: d("notebook-template", 60351), debugRerun: d("debug-rerun", 60352), workspaceTrusted: d("workspace-trusted", 60353), workspaceUntrusted: d("workspace-untrusted", 60354), workspaceUnspecified: d("workspace-unspecified", 60355), terminalCmd: d("terminal-cmd", 60356), terminalDebian: d("terminal-debian", 60357), terminalLinux: d("terminal-linux", 60358), terminalPowershell: d("terminal-powershell", 60359), terminalTmux: d("terminal-tmux", 60360), terminalUbuntu: d("terminal-ubuntu", 60361), terminalBash: d("terminal-bash", 60362), arrowSwap: d("arrow-swap", 60363), copy: d("copy", 60364), personAdd: d("person-add", 60365), filterFilled: d("filter-filled", 60366), wand: d("wand", 60367), debugLineByLine: d("debug-line-by-line", 60368), inspect: d("inspect", 60369), layers: d("layers", 60370), layersDot: d("layers-dot", 60371), layersActive: d("layers-active", 60372), compass: d("compass", 60373), compassDot: d("compass-dot", 60374), compassActive: d("compass-active", 60375), azure: d("azure", 60376), issueDraft: d("issue-draft", 60377), gitPullRequestClosed: d("git-pull-request-closed", 60378), gitPullRequestDraft: d("git-pull-request-draft", 60379), debugAll: d("debug-all", 60380), debugCoverage: d("debug-coverage", 60381), runErrors: d("run-errors", 60382), folderLibrary: d("folder-library", 60383), debugContinueSmall: d("debug-continue-small", 60384), beakerStop: d("beaker-stop", 60385), graphLine: d("graph-line", 60386), graphScatter: d("graph-scatter", 60387), pieChart: d("pie-chart", 60388), bracketDot: d("bracket-dot", 60389), bracketError: d("bracket-error", 60390), lockSmall: d("lock-small", 60391), azureDevops: d("azure-devops", 60392), verifiedFilled: d("verified-filled", 60393), newLine: d("newline", 60394), layout: d("layout", 60395), layoutActivitybarLeft: d("layout-activitybar-left", 60396), layoutActivitybarRight: d("layout-activitybar-right", 60397), layoutPanelLeft: d("layout-panel-left", 60398), layoutPanelCenter: d("layout-panel-center", 60399), layoutPanelJustify: d("layout-panel-justify", 60400), layoutPanelRight: d("layout-panel-right", 60401), layoutPanel: d("layout-panel", 60402), layoutSidebarLeft: d("layout-sidebar-left", 60403), layoutSidebarRight: d("layout-sidebar-right", 60404), layoutStatusbar: d("layout-statusbar", 60405), layoutMenubar: d("layout-menubar", 60406), layoutCentered: d("layout-centered", 60407), layoutSidebarRightOff: d("layout-sidebar-right-off", 60416), layoutPanelOff: d("layout-panel-off", 60417), layoutSidebarLeftOff: d("layout-sidebar-left-off", 60418), target: d("target", 60408), indent: d("indent", 60409), recordSmall: d("record-small", 60410), errorSmall: d("error-small", 60411), arrowCircleDown: d("arrow-circle-down", 60412), arrowCircleLeft: d("arrow-circle-left", 60413), arrowCircleRight: d("arrow-circle-right", 60414), arrowCircleUp: d("arrow-circle-up", 60415), heartFilled: d("heart-filled", 60420), map: d("map", 60421), mapFilled: d("map-filled", 60422), circleSmall: d("circle-small", 60423), bellSlash: d("bell-slash", 60424), bellSlashDot: d("bell-slash-dot", 60425), commentUnresolved: d("comment-unresolved", 60426), gitPullRequestGoToChanges: d("git-pull-request-go-to-changes", 60427), gitPullRequestNewChanges: d("git-pull-request-new-changes", 60428), searchFuzzy: d("search-fuzzy", 60429), commentDraft: d("comment-draft", 60430), send: d("send", 60431), sparkle: d("sparkle", 60432), insert: d("insert", 60433), // derived icons, that could become separate icons dialogError: d("dialog-error", "error"), dialogWarning: d("dialog-warning", "warning"), dialogInfo: d("dialog-info", "info"), dialogClose: d("dialog-close", "close"), treeItemExpanded: d("tree-item-expanded", "chevron-down"), treeFilterOnTypeOn: d("tree-filter-on-type-on", "list-filter"), treeFilterOnTypeOff: d("tree-filter-on-type-off", "list-selection"), treeFilterClear: d("tree-filter-clear", "close"), treeItemLoading: d("tree-item-loading", "loading"), menuSelection: d("menu-selection", "check"), menuSubmenu: d("menu-submenu", "chevron-right"), menuBarMore: d("menubar-more", "more"), scrollbarButtonLeft: d("scrollbar-button-left", "triangle-left"), scrollbarButtonRight: d("scrollbar-button-right", "triangle-right"), scrollbarButtonUp: d("scrollbar-button-up", "triangle-up"), scrollbarButtonDown: d("scrollbar-button-down", "triangle-down"), toolBarMore: d("toolbar-more", "more"), quickInputBack: d("quick-input-back", "arrow-left") }; var Ur = globalThis && globalThis.__awaiter || function(e, t, n, r) { function i(s) { return s instanceof n ? s : new n(function(a) { a(s); }); } return new (n || (n = Promise))(function(s, a) { function o(h) { try { c(r.next(h)); } catch (u) { a(u); } } function l(h) { try { c(r.throw(h)); } catch (u) { a(u); } } function c(h) { h.done ? s(h.value) : i(h.value).then(o, l); } c((r = r.apply(e, t || [])).next()); }); }; class ah { constructor() { this._tokenizationSupports = /* @__PURE__ */ new Map(), this._factories = /* @__PURE__ */ new Map(), this._onDidChange = new $e(), this.onDidChange = this._onDidChange.event, this._colorMap = null; } handleChange(t) { this._onDidChange.fire({ changedLanguages: t, changedColorMap: !1 }); } register(t, n) { return this._tokenizationSupports.set(t, n), this.handleChange([t]), Tn(() => { 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(); const i = new oh(this, t, n); return this._factories.set(t, i), Tn(() => { const s = this._factories.get(t); !s || s !== i || (this._factories.delete(t), s.dispose()); }); } getOrCreate(t) { return Ur(this, void 0, void 0, function* () { const n = this.get(t); if (n) return n; const r = this._factories.get(t); return !r || r.isResolved ? null : (yield r.resolve(), this.get(t)); }); } isResolved(t) { if (this.get(t)) return !0; const 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 /* ColorId.DefaultBackground */ ] : null; } } class oh extends rr { 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(); } resolve() { return Ur(this, void 0, void 0, function* () { return this._resolvePromise || (this._resolvePromise = this._create()), this._resolvePromise; }); } _create() { return Ur(this, void 0, void 0, function* () { const t = yield this._factory.tokenizationSupport; this._isResolved = !0, t && !this._isDisposed && this._register(this._registry.register(this._languageId, t)); }); } } class lh { constructor(t, n, r) { this.offset = t, this.type = n, this.language = r, this._tokenBrand = void 0; } toString() { return "(" + this.offset + ", " + this.type + ")"; } } var es; (function(e) { const t = /* @__PURE__ */ new Map(); t.set(0, U.symbolMethod), t.set(1, U.symbolFunction), t.set(2, U.symbolConstructor), t.set(3, U.symbolField), t.set(4, U.symbolVariable), t.set(5, U.symbolClass), t.set(6, U.symbolStruct), t.set(7, U.symbolInterface), t.set(8, U.symbolModule), t.set(9, U.symbolProperty), t.set(10, U.symbolEvent), t.set(11, U.symbolOperator), t.set(12, U.symbolUnit), t.set(13, U.symbolValue), t.set(15, U.symbolEnum), t.set(14, U.symbolConstant), t.set(15, U.symbolEnum), t.set(16, U.symbolEnumMember), t.set(17, U.symbolKeyword), t.set(27, U.symbolSnippet), t.set(18, U.symbolText), t.set(19, U.symbolColor), t.set(20, U.symbolFile), t.set(21, U.symbolReference), t.set(22, U.symbolCustomColor), t.set(23, U.symbolFolder), t.set(24, U.symbolTypeParameter), t.set(25, U.account), t.set(26, U.issues); function n(s) { let a = t.get(s); return a || (console.info("No codicon found for CompletionItemKind " + s), a = U.symbolProperty), a; } e.toIcon = n; const r = /* @__PURE__ */ new Map(); r.set( "method", 0 /* CompletionItemKind.Method */ ), r.set( "function", 1 /* CompletionItemKind.Function */ ), r.set( "constructor", 2 /* CompletionItemKind.Constructor */ ), r.set( "field", 3 /* CompletionItemKind.Field */ ), r.set( "variable", 4 /* CompletionItemKind.Variable */ ), r.set( "class", 5 /* CompletionItemKind.Class */ ), r.set( "struct", 6 /* CompletionItemKind.Struct */ ), r.set( "interface", 7 /* CompletionItemKind.Interface */ ), r.set( "module", 8 /* CompletionItemKind.Module */ ), r.set( "property", 9 /* CompletionItemKind.Property */ ), r.set( "event", 10 /* CompletionItemKind.Event */ ), r.set( "operator", 11 /* CompletionItemKind.Operator */ ), r.set( "unit", 12 /* CompletionItemKind.Unit */ ), r.set( "value", 13 /* CompletionItemKind.Value */ ), r.set( "constant", 14 /* CompletionItemKind.Constant */ ), r.set( "enum", 15 /* CompletionItemKind.Enum */ ), r.set( "enum-member", 16 /* CompletionItemKind.EnumMember */ ), r.set( "enumMember", 16 /* CompletionItemKind.EnumMember */ ), r.set( "keyword", 17 /* CompletionItemKind.Keyword */ ), r.set( "snippet", 27 /* CompletionItemKind.Snippet */ ), r.set( "text", 18 /* CompletionItemKind.Text */ ), r.set( "color", 19 /* CompletionItemKind.Color */ ), r.set( "file", 20 /* CompletionItemKind.File */ ), r.set( "reference", 21 /* CompletionItemKind.Reference */ ), r.set( "customcolor", 22 /* CompletionItemKind.Customcolor */ ), r.set( "folder", 23 /* CompletionItemKind.Folder */ ), r.set( "type-parameter", 24 /* CompletionItemKind.TypeParameter */ ), r.set( "typeParameter", 24 /* CompletionItemKind.TypeParameter */ ), r.set( "account", 25 /* CompletionItemKind.User */ ), r.set( "issue", 26 /* CompletionItemKind.Issue */ ); function i(s, a) { let o = r.get(s); return typeof o > "u" && !a && (o = 9), o; } e.fromString = i; })(es || (es = {})); var ts; (function(e) { e[e.Automatic = 0] = "Automatic", e[e.Explicit = 1] = "Explicit"; })(ts || (ts = {})); var ns; (function(e) { e[e.Invoke = 1] = "Invoke", e[e.TriggerCharacter = 2] = "TriggerCharacter", e[e.ContentChange = 3] = "ContentChange"; })(ns || (ns = {})); var rs; (function(e) { e[e.Text = 0] = "Text", e[e.Read = 1] = "Read", e[e.Write = 2] = "Write"; })(rs || (rs = {})); var is; (function(e) { const t = /* @__PURE__ */ new Map(); t.set(0, U.symbolFile), t.set(1, U.symbolModule), t.set(2, U.symbolNamespace), t.set(3, U.symbolPackage), t.set(4, U.symbolClass), t.set(5, U.symbolMethod), t.set(6, U.symbolProperty), t.set(7, U.symbolField), t.set(8, U.symbolConstructor), t.set(9, U.symbolEnum), t.set(10, U.symbolInterface), t.set(11, U.symbolFunction), t.set(12, U.symbolVariable), t.set(13, U.symbolConstant), t.set(14, U.symbolString), t.set(15, U.symbolNumber), t.set(16, U.symbolBoolean), t.set(17, U.symbolArray), t.set(18, U.symbolObject), t.set(19, U.symbolKey), t.set(20, U.symbolNull), t.set(21, U.symbolEnumMember), t.set(22, U.symbolStruct), t.set(23, U.symbolEvent), t.set(24, U.symbolOperator), t.set(25, U.symbolTypeParameter); function n(r) { let i = t.get(r); return i || (console.info("No codicon found for SymbolKind " + r), i = U.symbolProperty), i; } e.toIcon = n; })(is || (is = {})); var ss; (function(e) { function t(n) { return !n || typeof n != "object" ? !1 : typeof n.id == "string" && typeof n.title == "string"; } e.is = t; })(ss || (ss = {})); var as; (function(e) { e[e.Collapsed = 0] = "Collapsed", e[e.Expanded = 1] = "Expanded"; })(as || (as = {})); var os; (function(e) { e[e.Unresolved = 0] = "Unresolved", e[e.Resolved = 1] = "Resolved"; })(os || (os = {})); var ls; (function(e) { e[e.Editing = 0] = "Editing", e[e.Preview = 1] = "Preview"; })(ls || (ls = {})); var cs; (function(e) { e[e.Published = 0] = "Published", e[e.Draft = 1] = "Draft"; })(cs || (cs = {})); var hs; (function(e) { e[e.Type = 1] = "Type", e[e.Parameter = 2] = "Parameter"; })(hs || (hs = {})); new ah(); var ds; (function(e) { e[e.None = 0] = "None", e[e.Option = 1] = "Option", e[e.Default = 2] = "Default", e[e.Preferred = 3] = "Preferred"; })(ds || (ds = {})); var us; (function(e) { e[e.Unknown = 0] = "Unknown", e[e.Disabled = 1] = "Disabled", e[e.Enabled = 2] = "Enabled"; })(us || (us = {})); var ps; (function(e) { e[e.Invoke = 1] = "Invoke", e[e.Auto = 2] = "Auto"; })(ps || (ps = {})); var fs; (function(e) { e[e.None = 0] = "None", e[e.KeepWhitespace = 1] = "KeepWhitespace", e[e.InsertAsSnippet = 4] = "InsertAsSnippet"; })(fs || (fs = {})); var ms; (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"; })(ms || (ms = {})); var gs; (function(e) { e[e.Deprecated = 1] = "Deprecated"; })(gs || (gs = {})); var bs; (function(e) { e[e.Invoke = 0] = "Invoke", e[e.TriggerCharacter = 1] = "TriggerCharacter", e[e.TriggerForIncompleteCompletions = 2] = "TriggerForIncompleteCompletions"; })(bs || (bs = {})); var vs; (function(e) { e[e.EXACT = 0] = "EXACT", e[e.ABOVE = 1] = "ABOVE", e[e.BELOW = 2] = "BELOW"; })(vs || (vs = {})); var ys; (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"; })(ys || (ys = {})); var ws; (function(e) { e[e.LF = 1] = "LF", e[e.CRLF = 2] = "CRLF"; })(ws || (ws = {})); var xs; (function(e) { e[e.Text = 0] = "Text", e[e.Read = 1] = "Read", e[e.Write = 2] = "Write"; })(xs || (xs = {})); var Ss; (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"; })(Ss || (Ss = {})); var Cs; (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.autoClosingBrackets = 5] = "autoClosingBrackets", e[e.screenReaderAnnounceInlineSuggestion = 6] = "screenReaderAnnounceInlineSuggestion", e[e.autoClosingDelete = 7] = "autoClosingDelete", e[e.autoClosingOvertype = 8] = "autoClosingOvertype", e[e.autoClosingQuotes = 9] = "autoClosingQuotes", e[e.autoIndent = 10] = "autoIndent", e[e.automaticLayout = 11] = "automaticLayout", e[e.autoSurround = 12] = "autoSurround", e[e.bracketPairColorization = 13] = "bracketPairColorization", e[e.guides = 14] = "guides", e[e.codeLens = 15] = "codeLens", e[e.codeLensFontFamily = 16] = "codeLensFontFamily", e[e.codeLensFontSize = 17] = "codeLensFontSize", e[e.colorDecorators = 18] = "colorDecorators", e[e.colorDecoratorsLimit = 19] = "colorDecoratorsLimit", e[e.columnSelection = 20] = "columnSelection", e[e.comments = 21] = "comments", e[e.contextmenu = 22] = "contextmenu", e[e.copyWithSyntaxHighlighting = 23] = "copyWithSyntaxHighlighting", e[e.cursorBlinking = 24] = "cursorBlinking", e[e.cursorSmoothCaretAnimation = 25] = "cursorSmoothCaretAnimation", e[e.cursorStyle = 26] = "cursorStyle", e[e.cursorSurroundingLines = 27] = "cursorSurroundingLines", e[e.cursorSurroundingLinesStyle = 28] = "cursorSurroundingLinesStyle", e[e.cursorWidth = 29] = "cursorWidth", e[e.disableLayerHinting = 30] = "disableLayerHinting", e[e.disableMonospaceOptimizations = 31] = "disableMonospaceOptimizations", e[e.domReadOnly = 32] = "domReadOnly", e[e.dragAndDrop = 33] = "dragAndDrop", e[e.dropIntoEditor = 34] = "dropIntoEditor", e[e.emptySelectionClipboard = 35] = "emptySelectionClipboard", e[e.experimentalWhitespaceRendering = 36] = "experimentalWhitespaceRendering", e[e.extraEditorClassName = 37] = "extraEditorClassName", e[e.fastScrollSensitivity = 38] = "fastScrollSensitivity", e[e.find = 39] = "find", e[e.fixedOverflowWidgets = 40] = "fixedOverflowWidgets", e[e.folding = 41] = "folding", e[e.foldingStrategy = 42] = "foldingStrategy", e[e.foldingHighlight = 43] = "foldingHighlight", e[e.foldingImportsByDefault = 44] = "foldingImportsByDefault", e[e.foldingMaximumRegions = 45] = "foldingMaximumRegions", e[e.unfoldOnClickAfterEndOfLine = 46] = "unfoldOnClickAfterEndOfLine", e[e.fontFamily = 47] = "fontFamily", e[e.fontInfo = 48] = "fontInfo", e[e.fontLigatures = 49] = "fontLigatures", e[e.fontSize = 50] = "fontSize", e[e.fontWeight = 51] = "fontWeight", e[e.fontVariations = 52] = "fontVariations", e[e.formatOnPaste = 53] = "formatOnPaste", e[e.formatOnType = 54] = "formatOnType", e[e.glyphMargin = 55] = "glyphMargin", e[e.gotoLocation = 56] = "gotoLocation", e[e.hideCursorInOverviewRuler = 57] = "hideCursorInOverviewRuler", e[e.hover = 58] = "hover", e[e.inDiffEditor = 59] = "inDiffEditor", e[e.inlineSuggest = 60] = "inlineSuggest", e[e.letterSpacing = 61] = "letterSpacing", e[e.lightbulb = 62] = "lightbulb", e[e.lineDecorationsWidth = 63] = "lineDecorationsWidth", e[e.lineHeight = 64] = "lineHeight", e[e.lineNumbers = 65] = "lineNumbers", e[e.lineNumbersMinChars = 66] = "lineNumbersMinChars", e[e.linkedEditing = 67] = "linkedEditing", e[e.links = 68] = "links", e[e.matchBrackets = 69] = "matchBrackets", e[e.minimap = 70] = "minimap", e[e.mouseStyle = 71] = "mouseStyle", e[e.mouseWheelScrollSensitivity = 72] = "mouseWheelScrollSensitivity", e[e.mouseWheelZoom = 73] = "mouseWheelZoom", e[e.multiCursorMergeOverlapping = 74] = "multiCursorMergeOverlapping", e[e.multiCursorModifier = 75] = "multiCursorModifier", e[e.multiCursorPaste = 76] = "multiCursorPaste", e[e.multiCursorLimit = 77] = "multiCursorLimit", e[e.occurrencesHighlight = 78] = "occurrencesHighlight", e[e.overviewRulerBorder = 79] = "overviewRulerBorder", e[e.overviewRulerLanes = 80] = "overviewRulerLanes", e[e.padding = 81] = "padding", e[e.parameterHints = 82] = "parameterHints", e[e.peekWidgetDefaultFocus = 83] = "peekWidgetDefaultFocus", e[e.definitionLinkOpensInPeek = 84] = "definitionLinkOpensInPeek", e[e.quickSuggestions = 85] = "quickSuggestions", e[e.quickSuggestionsDelay = 86] = "quickSuggestionsDelay", e[e.readOnly = 87] = "readOnly", e[e.renameOnType = 88] = "renameOnType", e[e.renderControlCharacters = 89] = "renderControlCharacters", e[e.renderFinalNewline = 90] = "renderFinalNewline", e[e.renderLineHighlight = 91] = "renderLineHighlight", e[e.renderLineHighlightOnlyWhenFocus = 92] = "renderLineHighlightOnlyWhenFocus", e[e.renderValidationDecorations = 93] = "renderValidationDecorations", e[e.renderWhitespace = 94] = "renderWhitespace", e[e.revealHorizontalRightPadding = 95] = "revealHorizontalRightPadding", e[e.roundedSelection = 96] = "roundedSelection", e[e.rulers = 97] = "rulers", e[e.scrollbar = 98] = "scrollbar", e[e.scrollBeyondLastColumn = 99] = "scrollBeyondLastColumn", e[e.scrollBeyondLastLine = 100] = "scrollBeyondLastLine", e[e.scrollPredominantAxis = 101] = "scrollPredominantAxis", e[e.selectionClipboard = 102] = "selectionClipboard", e[e.selectionHighlight = 103] = "selectionHighlight", e[e.selectOnLineNumbers = 104] = "selectOnLineNumbers", e[e.showFoldingControls = 105] = "showFoldingControls", e[e.showUnused = 106] = "showUnused", e[e.snippetSuggestions = 107] = "snippetSuggestions", e[e.smartSelect = 108] = "smartSelect", e[e.smoothScrolling = 109] = "smoothScrolling", e[e.stickyScroll = 110] = "stickyScroll", e[e.stickyTabStops = 111] = "stickyTabStops", e[e.stopRenderingLineAfter = 112] = "stopRenderingLineAfter", e[e.suggest = 113] = "suggest", e[e.suggestFontSize = 114] = "suggestFontSize", e[e.suggestLineHeight = 115] = "suggestLineHeight", e[e.suggestOnTriggerCharacters = 116] = "suggestOnTriggerCharacters", e[e.suggestSelection = 117] = "suggestSelection", e[e.tabCompletion = 118] = "tabCompletion", e[e.tabIndex = 119] = "tabIndex", e[e.unicodeHighlighting = 120] = "unicodeHighlighting", e[e.unusualLineTerminators = 121] = "unusualLineTerminators", e[e.useShadowDOM = 122] = "useShadowDOM", e[e.useTabStops = 123] = "useTabStops", e[e.wordBreak = 124] = "wordBreak", e[e.wordSeparators = 125] = "wordSeparators", e[e.wordWrap = 126] = "wordWrap", e[e.wordWrapBreakAfterCharacters = 127] = "wordWrapBreakAfterCharacters", e[e.wordWrapBreakBeforeCharacters = 128] = "wordWrapBreakBeforeCharacters", e[e.wordWrapColumn = 129] = "wordWrapColumn", e[e.wordWrapOverride1 = 130] = "wordWrapOverride1", e[e.wordWrapOverride2 = 131] = "wordWrapOverride2", e[e.wrappingIndent = 132] = "wrappingIndent", e[e.wrappingStrategy = 133] = "wrappingStrategy", e[e.showDeprecated = 134] = "showDeprecated", e[e.inlayHints = 135] = "inlayHints", e[e.editorClassName = 136] = "editorClassName", e[e.pixelRatio = 137] = "pixelRatio", e[e.tabFocusMode = 138] = "tabFocusMode", e[e.layoutInfo = 139] = "layoutInfo", e[e.wrappingInfo = 140] = "wrappingInfo"; })(Cs || (Cs = {})); var ks; (function(e) { e[e.TextDefined = 0] = "TextDefined", e[e.LF = 1] = "LF", e[e.CRLF = 2] = "CRLF"; })(ks || (ks = {})); var _s; (function(e) { e[e.LF = 0] = "LF", e[e.CRLF = 1] = "CRLF"; })(_s || (_s = {})); var Fs; (function(e) { e[e.None = 0] = "None", e[e.Indent = 1] = "Indent", e[e.IndentOutdent = 2] = "IndentOutdent", e[e.Outdent = 3] = "Outdent"; })(Fs || (Fs = {})); var Rs; (function(e) { e[e.Both = 0] = "Both", e[e.Right = 1] = "Right", e[e.Left = 2] = "Left", e[e.None = 3] = "None"; })(Rs || (Rs = {})); var Es; (function(e) { e[e.Type = 1] = "Type", e[e.Parameter = 2] = "Parameter"; })(Es || (Es = {})); var Ds; (function(e) { e[e.Automatic = 0] = "Automatic", e[e.Explicit = 1] = "Explicit"; })(Ds || (Ds = {})); var Vr; (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.NumLock = 78] = "NumLock", e[e.ScrollLock = 79] = "ScrollLock", e[e.Semicolon = 80] = "Semicolon", e[e.Equal = 81] = "Equal", e[e.Comma = 82] = "Comma", e[e.Minus = 83] = "Minus", e[e.Period = 84] = "Period", e[e.Slash = 85] = "Slash", e[e.Backquote = 86] = "Backquote", e[e.BracketLeft = 87] = "BracketLeft", e[e.Backslash = 88] = "Backslash", e[e.BracketRight = 89] = "BracketRight", e[e.Quote = 90] = "Quote", e[e.OEM_8 = 91] = "OEM_8", e[e.IntlBackslash = 92] = "IntlBackslash", e[e.Numpad0 = 93] = "Numpad0", e[e.Numpad1 = 94] = "Numpad1", e[e.Numpad2 = 95] = "Numpad2", e[e.Numpad3 = 96] = "Numpad3", e[e.Numpad4 = 97] = "Numpad4", e[e.Numpad5 = 98] = "Numpad5", e[e.Numpad6 = 99] = "Numpad6", e[e.Numpad7 = 100] = "Numpad7", e[e.Numpad8 = 101] = "Numpad8", e[e.Numpad9 = 102] = "Numpad9", e[e.NumpadMultiply = 103] = "NumpadMultiply", e[e.NumpadAdd = 104] = "NumpadAdd", e[e.NUMPAD_SEPARATOR = 105] = "NUMPAD_SEPARATOR", e[e.NumpadSubtract = 106] = "NumpadSubtract", e[e.NumpadDecimal = 107] = "NumpadDecimal", e[e.NumpadDivide = 108] = "NumpadDivide", e[e.KEY_IN_COMPOSITION = 109] = "KEY_IN_COMPOSITION", e[e.ABNT_C1 = 110] = "ABNT_C1", e[e.ABNT_C2 = 111] = "ABNT_C2", e[e.AudioVolumeMute = 112] = "AudioVolumeMute", e[e.AudioVolumeUp = 113] = "AudioVolumeUp", e[e.AudioVolumeDown = 114] = "AudioVolumeDown", e[e.BrowserSearch = 115] = "BrowserSearch", e[e.BrowserHome = 116] = "BrowserHome", e[e.BrowserBack = 117] = "BrowserBack", e[e.BrowserForward = 118] = "BrowserForward", e[e.MediaTrackNext = 119] = "MediaTrackNext", e[e.MediaTrackPrevious = 120] = "MediaTrackPrevious", e[e.MediaStop = 121] = "MediaStop", e[e.MediaPlayPause = 122] = "MediaPlayPause", e[e.LaunchMediaPlayer = 123] = "LaunchMediaPlayer", e[e.LaunchMail = 124] = "LaunchMail", e[e.LaunchApp2 = 125] = "LaunchApp2", e[e.Clear = 126] = "Clear", e[e.MAX_VALUE = 127] = "MAX_VALUE"; })(Vr || (Vr = {})); var Br; (function(e) { e[e.Hint = 1] = "Hint", e[e.Info = 2] = "Info", e[e.Warning = 4] = "Warning", e[e.Error = 8] = "Error"; })(Br || (Br = {})); var jr; (function(e) { e[e.Unnecessary = 1] = "Unnecessary", e[e.Deprecated = 2] = "Deprecated"; })(jr || (jr = {})); var As; (function(e) { e[e.Inline = 1] = "Inline", e[e.Gutter = 2] = "Gutter"; })(As || (As = {})); var zs; (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"; })(zs || (zs = {})); var Ms; (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"; })(Ms || (Ms = {})); var Ns; (function(e) { e[e.Left = 1] = "Left", e[e.Center = 2] = "Center", e[e.Right = 4] = "Right", e[e.Full = 7] = "Full"; })(Ns || (Ns = {})); var Ps; (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"; })(Ps || (Ps = {})); var Is; (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"; })(Is || (Is = {})); var Ls; (function(e) { e[e.None = 0] = "None", e[e.Text = 1] = "Text", e[e.Blocks = 2] = "Blocks"; })(Ls || (Ls = {})); var Ts; (function(e) { e[e.Smooth = 0] = "Smooth", e[e.Immediate = 1] = "Immediate"; })(Ts || (Ts = {})); var Ws; (function(e) { e[e.Auto = 1] = "Auto", e[e.Hidden = 2] = "Hidden", e[e.Visible = 3] = "Visible"; })(Ws || (Ws = {})); var qr; (function(e) { e[e.LTR = 0] = "LTR", e[e.RTL = 1] = "RTL"; })(qr || (qr = {})); var Os; (function(e) { e[e.Invoke = 1] = "Invoke", e[e.TriggerCharacter = 2] = "TriggerCharacter", e[e.ContentChange = 3] = "ContentChange"; })(Os || (Os = {})); var Us; (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"; })(Us || (Us = {})); var Vs; (function(e) { e[e.Deprecated = 1] = "Deprecated"; })(Vs || (Vs = {})); var Bs; (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"; })(Bs || (Bs = {})); var js; (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"; })(js || (js = {})); var qs; (function(e) { e[e.AlwaysGrowsWhenTypingAtEdges = 0] = "AlwaysGrowsWhenTypingAtEdges", e[e.NeverGrowsWhenTypingAtEdges = 1] = "NeverGrowsWhenTypingAtEdges", e[e.GrowsOnlyWhenTypingBefore = 2] = "GrowsOnlyWhenTypingBefore", e[e.GrowsOnlyWhenTypingAfter = 3] = "GrowsOnlyWhenTypingAfter"; })(qs || (qs = {})); var $s; (function(e) { e[e.None = 0] = "None", e[e.Same = 1] = "Same", e[e.Indent = 2] = "Indent", e[e.DeepIndent = 3] = "DeepIndent"; })($s || ($s = {})); class gn { static chord(t, n) { return sh(t, n); } } gn.CtrlCmd = 2048; gn.Shift = 1024; gn.Alt = 512; gn.WinCtrl = 256; function ch() { return { editor: void 0, languages: void 0, CancellationTokenSource: oc, Emitter: $e, KeyCode: Vr, KeyMod: gn, Position: Ge, Range: _e, Selection: De, SelectionDirection: qr, MarkerSeverity: Br, MarkerTag: jr, Uri: mi, Token: lh }; } var Hs; (function(e) { e[e.Left = 1] = "Left", e[e.Center = 2] = "Center", e[e.Right = 4] = "Right", e[e.Full = 7] = "Full"; })(Hs || (Hs = {})); var Gs; (function(e) { e[e.Inline = 1] = "Inline", e[e.Gutter = 2] = "Gutter"; })(Gs || (Gs = {})); var Js; (function(e) { e[e.Both = 0] = "Both", e[e.Right = 1] = "Right", e[e.Left = 2] = "Left", e[e.None = 3] = "None"; })(Js || (Js = {})); function hh(e, t, n, r, i) { if (r === 0) return !0; const s = t.charCodeAt(r - 1); if (e.get(s) !== 0 || s === 13 || s === 10) return !0; if (i > 0) { const a = t.charCodeAt(r); if (e.get(a) !== 0) return !0; } return !1; } function dh(e, t, n, r, i) { if (r + i === n) return !0; const s = t.charCodeAt(r + i); if (e.get(s) !== 0 || s === 13 || s === 10) return !0; if (i > 0) { const a = t.charCodeAt(r + i - 1); if (e.get(a) !== 0) return !0; } return !1; } function uh(e, t, n, r, i) { return hh(e, t, n, r, i) && dh(e, t, n, r, i); } class ph { 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) { const n = t.length; let r; do { if (this._prevMatchStartIndex + this._prevMatchLength === n || (r = this._searchRegex.exec(t), !r)) return null; const i = r.index, s = r[0].length; if (i === this._prevMatchStartIndex && s === this._prevMatchLength) { if (s === 0) { mc(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 || uh(this._wordSeparators, t, n, i, s)) return r; } while (r); return null; } } function fh(e, t = "Unreachable") { throw new Error(t); } function yi(e) { if (!e()) { debugger; e(), Po(new kt("Assertion Failed")); } } function Yo(e, t) { let n = 0; for (; n < e.length - 1; ) { const r = e[n], i = e[n + 1]; if (!t(r, i)) return !1; n++; } return !0; } class mh { static computeUnicodeHighlights(t, n, r) { const i = r ? r.startLineNumber : 1, s = r ? r.endLineNumber : t.getLineCount(), a = new Xs(n), o = a.getCandidateCodePoints(); let l; o === "allNonBasicAscii" ? l = new RegExp("[^\\t\\n\\r\\x20-\\x7E]", "g") : l = new RegExp(`${gh(Array.from(o))}`, "g"); const c = new ph(null, l), h = []; let u = !1, f, m = 0, b = 0, v = 0; e: for (let y = i, w = s; y <= w; y++) { const S = t.getLineContent(y), k = S.length; c.reset(0); do if (f = c.next(S), f) { let F = f.index, N = f.index + f[0].length; if (F > 0) { const R = S.charCodeAt(F - 1); Nr(R) && F--; } if (N + 1 < k) { const R = S.charCodeAt(N - 1); Nr(R) && N++; } const B = S.substring(F, N); let H = gi(F + 1, Jo, S, 0); H && H.endColumn <= F + 1 && (H = null); const D = a.shouldHighlightNonBasicASCII(B, H ? H.word : null); if (D !== 0) { D === 3 ? m++ : D === 2 ? b++ : D === 1 ? v++ : fh(); const R = 1e3; if (h.length >= R) { u = !0; break e; } h.push(new _e(y, F + 1, y, N + 1)); } } while (f); } return { ranges: h, hasMore: u, ambiguousCharacterCount: m, invisibleCharacterCount: b, nonBasicAsciiCharacterCount: v }; } static computeUnicodeHighlightReason(t, n) { const r = new Xs(n); switch (r.shouldHighlightNonBasicASCII(t, null)) { case 0: return null; case 2: return { kind: 1 /* UnicodeHighlighterReasonKind.Invisible */ }; case 3: { const s = t.codePointAt(0), a = r.ambiguousCharacters.getPrimaryConfusable(s), o = Le.getLocales().filter((l) => !Le.getInstance(/* @__PURE__ */ new Set([...n.allowedLocales, l])).isAmbiguous(s)); return { kind: 0, confusableWith: String.fromCodePoint(a), notAmbiguousInLocales: o }; } case 1: return { kind: 2 /* UnicodeHighlighterReasonKind.NonBasicAscii */ }; } } } function gh(e, t) { return `[${cc(e.map((r) => String.fromCodePoint(r)).join(""))}]`; } class Xs { constructor(t) { this.options = t, this.allowedCodePoints = new Set(t.allowedCodePoints), this.ambiguousCharacters = Le.getInstance(new Set(t.allowedLocales)); } getCandidateCodePoints() { if (this.options.nonBasicASCII) return "allNonBasicAscii"; const t = /* @__PURE__ */ new Set(); if (this.options.invisibleCharacters) for (const n of pt.codePoints) Ys(String.fromCodePoint(n)) || t.add(n); if (this.options.ambiguousCharacters) for (const n of this.ambiguousCharacters.getConfusableCodePoints()) t.add(n); for (const n of this.allowedCodePoints) t.delete(n); return t; } shouldHighlightNonBasicASCII(t, n) { const 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 (const a of n) { const o = a.codePointAt(0), l = bc(a); i = i || l, !l && !this.ambiguousCharacters.isAmbiguous(o) && !pt.isInvisibleCharacter(o) && (s = !0); } return ( /* Don't allow mixing weird looking characters with ASCII */ !i && /* Is there an obviously weird looking character? */ s ? 0 : this.options.invisibleCharacters && !Ys(t) && pt.isInvisibleCharacter(r) ? 2 : this.options.ambiguousCharacters && this.ambiguousCharacters.isAmbiguous(r) ? 3 : 0 ); } } function Ys(e) { return e === " " || e === ` ` || e === " "; } class Ko { constructor(t, n) { this.changes = t, this.hitTimeout = n; } } class jn { constructor(t, n, r) { this.originalRange = t, this.modifiedRange = n, this.innerChanges = r; } toString() { return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`; } } class Qo { constructor(t, n) { this.originalRange = t, this.modifiedRange = n; } toString() { return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`; } } class Ve { /** * @param lineRanges An array of sorted line ranges. */ static joinMany(t) { if (t.length === 0) return []; let n = t[0]; for (let r = 1; r < t.length; r++) n = this.join(n, t[r]); return n; } /** * @param lineRanges1 Must be sorted. * @param lineRanges2 Must be sorted. */ static join(t, n) { if (t.length === 0) return n; if (n.length === 0) return t; const r = []; let i = 0, s = 0, a = null; for (; i < t.length || s < n.length; ) { let o = null; if (i < t.length && s < n.length) { const l = t[i], c = n[s]; l.startLineNumber < c.startLineNumber ? (o = l, i++) : (o = c, s++); } else i < t.length ? (o = t[i], i++) : (o = n[s], s++); a === null ? a = o : a.endLineNumberExclusive >= o.startLineNumber ? a = new Ve(a.startLineNumber, Math.max(a.endLineNumberExclusive, o.endLineNumberExclusive)) : (r.push(a), a = o); } return a !== null && r.push(a), r; } constructor(t, n) { if (t > n) throw new kt(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`); this.startLineNumber = t, this.endLineNumberExclusive = n; } /** * Indicates if this line range contains the given line number. */ contains(t) { return this.startLineNumber <= t && t < 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(t) { return new Ve(this.startLineNumber + t, this.endLineNumberExclusive + t); } /** * 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(t) { return new Ve(Math.min(this.startLineNumber, t.startLineNumber), Math.max(this.endLineNumberExclusive, t.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(t) { const n = Math.max(this.startLineNumber, t.startLineNumber), r = Math.min(this.endLineNumberExclusive, t.endLineNumberExclusive); if (n <= r) return new Ve(n, r); } overlapOrTouch(t) { return this.startLineNumber <= t.endLineNumberExclusive && t.startLineNumber <= this.endLineNumberExclusive; } equals(t) { return this.startLineNumber === t.startLineNumber && this.endLineNumberExclusive === t.endLineNumberExclusive; } } const bh = 3; class vh { computeDiff(t, n, r) { var i; const a = new el(t, n, { maxComputationTime: r.maxComputationTimeMs, shouldIgnoreTrimWhitespace: r.ignoreTrimWhitespace, shouldComputeCharChanges: !0, shouldMakePrettyDiff: !0, shouldPostProcessCharChanges: !0 }).computeDiff(), o = []; let l = null; for (const c of a.changes) { let h; c.originalEndLineNumber === 0 ? h = new Ve(c.originalStartLineNumber + 1, c.originalStartLineNumber + 1) : h = new Ve(c.originalStartLineNumber, c.originalEndLineNumber + 1); let u; c.modifiedEndLineNumber === 0 ? u = new Ve(c.modifiedStartLineNumber + 1, c.modifiedStartLineNumber + 1) : u = new Ve(c.modifiedStartLineNumber, c.modifiedEndLineNumber + 1); let f = new jn(h, u, (i = c.charChanges) === null || i === void 0 ? void 0 : i.map((m) => new Qo(new _e(m.originalStartLineNumber, m.originalStartColumn, m.originalEndLineNumber, m.originalEndColumn), new _e(m.modifiedStartLineNumber, m.modifiedStartColumn, m.modifiedEndLineNumber, m.modifiedEndColumn)))); l && (l.modifiedRange.endLineNumberExclusive === f.modifiedRange.startLineNumber || l.originalRange.endLineNumberExclusive === f.originalRange.startLineNumber) && (f = new jn(l.originalRange.join(f.originalRange), l.modifiedRange.join(f.modifiedRange), l.innerChanges && f.innerChanges ? l.innerChanges.concat(f.innerChanges) : void 0), o.pop()), o.push(f), l = f; } return yi(() => Yo(o, (c, h) => h.originalRange.startLineNumber - c.originalRange.endLineNumberExclusive === h.modifiedRange.startLineNumber - c.modifiedRange.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined) c.originalRange.endLineNumberExclusive < h.originalRange.startLineNumber && c.modifiedRange.endLineNumberExclusive < h.modifiedRange.startLineNumber)), new Ko(o, a.quitEarly); } } function Zo(e, t, n, r) { return new ht(e, t, n).ComputeDiff(r); } let Ks = class { constructor(t) { const n = [], r = []; for (let i = 0, s = t.length; i < s; i++) n[i] = $r(t[i], 1), r[i] = Hr(t[i], 1); this.lines = t, this._startColumns = n, this._endColumns = r; } getElements() { const t = []; for (let n = 0, r = this.lines.length; n < r; n++) t[n] = this.lines[n].substring(this._startColumns[n] - 1, this._endColumns[n] - 1); return t; } getStrictElement(t) { return this.lines[t]; } getStartLineNumber(t) { return t + 1; } getEndLineNumber(t) { return t + 1; } createCharSequence(t, n, r) { const i = [], s = [], a = []; let o = 0; for (let l = n; l <= r; l++) { const c = this.lines[l], h = t ? this._startColumns[l] : 1, u = t ? this._endColumns[l] : c.length + 1; for (let f = h; f < u; f++) i[o] = c.charCodeAt(f - 1), s[o] = l + 1, a[o] = f, o++; !t && l < r && (i[o] = 10, s[o] = l + 1, a[o] = c.length + 1, o++); } return new yh(i, s, a); } }; class yh { constructor(t, n, r) { this._charCodes = t, this._lineNumbers = n, this._columns = r; } toString() { return "[" + this._charCodes.map((t, n) => (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); } } class It { constructor(t, n, r, i, s, a, o, l) { this.originalStartLineNumber = t, this.originalStartColumn = n, this.originalEndLineNumber = r, this.originalEndColumn = i, this.modifiedStartLineNumber = s, this.modifiedStartColumn = a, this.modifiedEndLineNumber = o, this.modifiedEndColumn = l; } static createFromDiffChange(t, n, r) { const i = n.getStartLineNumber(t.originalStart), s = n.getStartColumn(t.originalStart), a = n.getEndLineNumber(t.originalStart + t.originalLength - 1), o = n.getEndColumn(t.originalStart + t.originalLength - 1), l = r.getStartLineNumber(t.modifiedStart), c = r.getStartColumn(t.modifiedStart), h = r.getEndLineNumber(t.modifiedStart + t.modifiedLength - 1), u = r.getEndColumn(t.modifiedStart + t.modifiedLength - 1); return new It(i, s, a, o, l, c, h, u); } } function wh(e) { if (e.length <= 1) return e; const t = [e[0]]; let n = t[0]; for (let r = 1, i = e.length; r < i; r++) { const s = e[r], a = s.originalStart - (n.originalStart + n.originalLength), o = s.modifiedStart - (n.modifiedStart + n.modifiedLength); Math.min(a, o) < bh ? (n.originalLength = s.originalStart + s.originalLength - n.originalStart, n.modifiedLength = s.modifiedStart + s.modifiedLength - n.modifiedStart) : (t.push(s), n = s); } return t; } class nn { constructor(t, n, r, i, s) { this.originalStartLineNumber = t, this.originalEndLineNumber = n, this.modifiedStartLineNumber = r, this.modifiedEndLineNumber = i, this.charChanges = s; } static createFromDiffResult(t, n, r, i, s, a, o) { let l, c, h, u, f; if (n.originalLength === 0 ? (l = r.getStartLineNumber(n.originalStart) - 1, c = 0) : (l = r.getStartLineNumber(n.originalStart), c = r.getEndLineNumber(n.originalStart + n.originalLength - 1)), n.modifiedLength === 0 ? (h = i.getStartLineNumber(n.modifiedStart) - 1, u = 0) : (h = i.getStartLineNumber(n.modifiedStart), u = i.getEndLineNumber(n.modifiedStart + n.modifiedLength - 1)), a && n.originalLength > 0 && n.originalLength < 20 && n.modifiedLength > 0 && n.modifiedLength < 20 && s()) { const m = r.createCharSequence(t, n.originalStart, n.originalStart + n.originalLength - 1), b = i.createCharSequence(t, n.modifiedStart, n.modifiedStart + n.modifiedLength - 1); if (m.getElements().length > 0 && b.getElements().length > 0) { let v = Zo(m, b, s, !0).changes; o && (v = wh(v)), f = []; for (let y = 0, w = v.length; y < w; y++) f.push(It.createFromDiffChange(v[y], m, b)); } } return new nn(l, c, h, u, f); } } class el { constructor(t, n, r) { this.shouldComputeCharChanges = r.shouldComputeCharChanges, this.shouldPostProcessCharChanges = r.shouldPostProcessCharChanges, this.shouldIgnoreTrimWhitespace = r.shouldIgnoreTrimWhitespace, this.shouldMakePrettyDiff = r.shouldMakePrettyDiff, this.originalLines = t, this.modifiedLines = n, this.original = new Ks(t), this.modified = new Ks(n), this.continueLineDiff = Qs(r.maxComputationTime), this.continueCharDiff = Qs(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 }] }; const t = Zo(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff), n = t.changes, r = t.quitEarly; if (this.shouldIgnoreTrimWhitespace) { const o = []; for (let l = 0, c = n.length; l < c; l++) o.push(nn.createFromDiffResult(this.shouldIgnoreTrimWhitespace, n[l], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); return { quitEarly: r, changes: o }; } const i = []; let s = 0, a = 0; for (let o = -1, l = n.length; o < l; o++) { const c = o + 1 < l ? n[o + 1] : null, h = c ? c.originalStart : this.originalLines.length, u = c ? c.modifiedStart : this.modifiedLines.length; for (; s < h && a < u; ) { const f = this.originalLines[s], m = this.modifiedLines[a]; if (f !== m) { { let b = $r(f, 1), v = $r(m, 1); for (; b > 1 && v > 1; ) { const y = f.charCodeAt(b - 2), w = m.charCodeAt(v - 2); if (y !== w) break; b--, v--; } (b > 1 || v > 1) && this._pushTrimWhitespaceCharChange(i, s + 1, 1, b, a + 1, 1, v); } { let b = Hr(f, 1), v = Hr(m, 1); const y = f.length + 1, w = m.length + 1; for (; b < y && v < w; ) { const S = f.charCodeAt(b - 1), k = f.charCodeAt(v - 1); if (S !== k) break; b++, v++; } (b < y || v < w) && this._pushTrimWhitespaceCharChange(i, s + 1, b, y, a + 1, v, w); } } s++, a++; } c && (i.push(nn.createFromDiffResult(this.shouldIgnoreTrimWhitespace, c, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)), s += c.originalLength, a += c.modifiedLength); } return { quitEarly: r, changes: i }; } _pushTrimWhitespaceCharChange(t, n, r, i, s, a, o) { if (this._mergeTrimWhitespaceCharChange(t, n, r, i, s, a, o)) return; let l; this.shouldComputeCharChanges && (l = [new It(n, r, n, i, s, a, s, o)]), t.push(new nn(n, n, s, s, l)); } _mergeTrimWhitespaceCharChange(t, n, r, i, s, a, o) { const l = t.length; if (l === 0) return !1; const c = t[l - 1]; return c.originalEndLineNumber === 0 || c.modifiedEndLineNumber === 0 ? !1 : c.originalEndLineNumber === n && c.modifiedEndLineNumber === s ? (this.shouldComputeCharChanges && c.charChanges && c.charChanges.push(new It(n, r, n, i, s, a, s, o)), !0) : c.originalEndLineNumber + 1 === n && c.modifiedEndLineNumber + 1 === s ? (c.originalEndLineNumber = n, c.modifiedEndLineNumber = s, this.shouldComputeCharChanges && c.charChanges && c.charChanges.push(new It(n, r, n, i, s, a, s, o)), !0) : !1; } } function $r(e, t) { const n = dc(e); return n === -1 ? t : n + 1; } function Hr(e, t) { const n = uc(e); return n === -1 ? t : n + 2; } function Qs(e) { if (e === 0) return () => !0; const t = Date.now(); return () => Date.now() - t < e; } class ce { static addRange(t, n) { let r = 0; for (; r < n.length && n[r].endExclusive < t.start; ) r++; let i = r; for (; i < n.length && n[i].start <= t.endExclusive; ) i++; if (r === i) n.splice(r, 0, t); else { const s = Math.min(t.start, n[r].start), a = Math.max(t.endExclusive, n[i - 1].endExclusive); n.splice(r, i - r, new ce(s, a)); } } static tryCreate(t, n) { if (!(t > n)) return new ce(t, n); } constructor(t, n) { if (this.start = t, this.endExclusive = n, t > n) throw new kt(`Invalid range: ${this.toString()}`); } get isEmpty() { return this.start === this.endExclusive; } delta(t) { return new ce(this.start + t, this.endExclusive + t); } get length() { return this.endExclusive - this.start; } toString() { return `[${this.start}, ${this.endExclusive})`; } equals(t) { return this.start === t.start && this.endExclusive === t.endExclusive; } containsRange(t) { return this.start <= t.start && t.endExclusive <= this.endExclusive; } contains(t) { return this.start <= t && t < 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(t) { return new ce(Math.min(this.start, t.start), Math.max(this.endExclusive, t.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(t) { const n = Math.max(this.start, t.start), r = Math.min(this.endExclusive, t.endExclusive); if (n <= r) return new ce(n, r); } } class nt { static trivial(t, n) { return new nt([new Te(new ce(0, t.length), new ce(0, n.length))], !1); } static trivialTimedOut(t, n) { return new nt([new Te(new ce(0, t.length), new ce(0, n.length))], !0); } constructor(t, n) { this.diffs = t, this.hitTimeout = n; } } class Te { constructor(t, n) { this.seq1Range = t, this.seq2Range = n; } reverse() { return new Te(this.seq2Range, this.seq1Range); } toString() { return `${this.seq1Range} <-> ${this.seq2Range}`; } join(t) { return new Te(this.seq1Range.join(t.seq1Range), this.seq2Range.join(t.seq2Range)); } } class an { isValid() { return !0; } } an.instance = new an(); class xh { constructor(t) { if (this.timeout = t, this.startTime = Date.now(), this.valid = !0, t <= 0) throw new kt("timeout must be positive"); } // Recommendation: Set a log-point `{this.disable()}` in the body isValid() { if (!(Date.now() - this.startTime < this.timeout) && this.valid) { this.valid = !1; debugger; } return this.valid; } disable() { this.timeout = Number.MAX_SAFE_INTEGER, this.isValid = () => !0, this.valid = !0; } } class dr { constructor(t, n) { this.width = t, this.height = n, this.array = [], this.array = new Array(t * n); } get(t, n) { return this.array[t + n * this.width]; } set(t, n, r) { this.array[t + n * this.width] = r; } } class Sh { compute(t, n, r = an.instance, i) { if (t.length === 0 || n.length === 0) return nt.trivial(t, n); const s = new dr(t.length, n.length), a = new dr(t.length, n.length), o = new dr(t.length, n.length); for (let b = 0; b < t.length; b++) for (let v = 0; v < n.length; v++) { if (!r.isValid()) return nt.trivialTimedOut(t, n); const y = b === 0 ? 0 : s.get(b - 1, v), w = v === 0 ? 0 : s.get(b, v - 1); let S; t.getElement(b) === n.getElement(v) ? (b === 0 || v === 0 ? S = 0 : S = s.get(b - 1, v - 1), b > 0 && v > 0 && a.get(b - 1, v - 1) === 3 && (S += o.get(b - 1, v - 1)), S += i ? i(b, v) : 1) : S = -1; const k = Math.max(y, w, S); if (k === S) { const F = b > 0 && v > 0 ? o.get(b - 1, v - 1) : 0; o.set(b, v, F + 1), a.set(b, v, 3); } else k === y ? (o.set(b, v, 0), a.set(b, v, 1)) : k === w && (o.set(b, v, 0), a.set(b, v, 2)); s.set(b, v, k); } const l = []; let c = t.length, h = n.length; function u(b, v) { (b + 1 !== c || v + 1 !== h) && l.push(new Te(new ce(b + 1, c), new ce(v + 1, h))), c = b, h = v; } let f = t.length - 1, m = n.length - 1; for (; f >= 0 && m >= 0; ) a.get(f, m) === 3 ? (u(f, m), f--, m--) : a.get(f, m) === 1 ? f-- : m--; return u(-1, -1), l.reverse(), new nt(l, !1); } } function Zs(e, t, n) { let r = n; return r = kh(e, t, r), r = _h(e, t, r), r; } function Ch(e, t, n) { const r = []; for (const i of n) { const 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 Te(s.seq1Range.join(i.seq1Range), s.seq2Range.join(i.seq2Range)) : r.push(i); } return r; } function kh(e, t, n) { const r = []; n.length > 0 && r.push(n[0]); for (let i = 1; i < n.length; i++) { const s = r[r.length - 1], a = n[i]; if (a.seq1Range.isEmpty) { let o = !0; const l = a.seq1Range.start - s.seq1Range.endExclusive; for (let c = 1; c <= l; c++) if (t.getElement(a.seq2Range.start - c) !== t.getElement(a.seq2Range.endExclusive - c)) { o = !1; break; } if (o) { r[r.length - 1] = new Te(s.seq1Range, new ce(s.seq2Range.start, a.seq2Range.endExclusive - l)); continue; } } r.push(a); } return r; } function _h(e, t, n) { if (!e.getBoundaryScore || !t.getBoundaryScore) return n; for (let r = 0; r < n.length; r++) { const i = n[r]; if (i.seq1Range.isEmpty) { const s = r > 0 ? n[r - 1].seq2Range.endExclusive : -1, a = r + 1 < n.length ? n[r + 1].seq2Range.start : t.length; n[r] = ea(i, e, t, a, s); } else if (i.seq2Range.isEmpty) { const s = r > 0 ? n[r - 1].seq1Range.endExclusive : -1, a = r + 1 < n.length ? n[r + 1].seq1Range.start : e.length; n[r] = ea(i.reverse(), t, e, a, s).reverse(); } } return n; } function ea(e, t, n, r, i) { let a = 1; for (; e.seq2Range.start - a > i && n.getElement(e.seq2Range.start - a) === n.getElement(e.seq2Range.endExclusive - a) && a < 20; ) a++; a--; let o = 0; for (; e.seq2Range.start + o < r && n.getElement(e.seq2Range.start + o) === n.getElement(e.seq2Range.endExclusive + o) && o < 20; ) o++; if (a === 0 && o === 0) return e; let l = 0, c = -1; for (let h = -a; h <= o; h++) { const u = e.seq2Range.start + h, f = e.seq2Range.endExclusive + h, m = e.seq1Range.start + h, b = t.getBoundaryScore(m) + n.getBoundaryScore(u) + n.getBoundaryScore(f); b > c && (c = b, l = h); } return l !== 0 ? new Te(e.seq1Range.delta(l), e.seq2Range.delta(l)) : e; } class Fh { compute(t, n, r = an.instance) { if (t.length === 0 || n.length === 0) return nt.trivial(t, n); function i(m, b) { for (; m < t.length && b < n.length && t.getElement(m) === n.getElement(b); ) m++, b++; return m; } let s = 0; const a = new Rh(); a.set(0, i(0, 0)); const o = new Eh(); o.set(0, a.get(0) === 0 ? null : new ta(null, 0, 0, a.get(0))); let l = 0; e: for (; ; ) for (s++, l = -s; l <= s; l += 2) { if (!r.isValid()) return nt.trivialTimedOut(t, n); const m = l === s ? -1 : a.get(l + 1), b = l === -s ? -1 : a.get(l - 1) + 1, v = Math.min(Math.max(m, b), t.length), y = v - l, w = i(v, y); a.set(l, w); const S = v === m ? o.get(l + 1) : o.get(l - 1); if (o.set(l, w !== v ? new ta(S, v, y, w - v) : S), a.get(l) === t.length && a.get(l) - l === n.length) break e; } let c = o.get(l); const h = []; let u = t.length, f = n.length; for (; ; ) { const m = c ? c.x + c.length : 0, b = c ? c.y + c.length : 0; if ((m !== u || b !== f) && h.push(new Te(new ce(m, u), new ce(b, f))), !c) break; u = c.x, f = c.y, c = c.prev; } return h.reverse(), new nt(h, !1); } } class ta { constructor(t, n, r, i) { this.prev = t, this.x = n, this.y = r, this.length = i; } } class Rh { 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) { const r = this.negativeArr; this.negativeArr = new Int32Array(r.length * 2), this.negativeArr.set(r); } this.negativeArr[t] = n; } else { if (t >= this.positiveArr.length) { const r = this.positiveArr; this.positiveArr = new Int32Array(r.length * 2), this.positiveArr.set(r); } this.positiveArr[t] = n; } } } class Eh { 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; } } class Dh { constructor() { this.dynamicProgrammingDiffing = new Sh(), this.myersDiffingAlgorithm = new Fh(); } computeDiff(t, n, r) { const i = r.maxComputationTimeMs === 0 ? an.instance : new xh(r.maxComputationTimeMs), s = !r.ignoreTrimWhitespace, a = /* @__PURE__ */ new Map(); function o(F) { let N = a.get(F); return N === void 0 && (N = a.size, a.set(F, N)), N; } const l = t.map((F) => o(F.trim())), c = n.map((F) => o(F.trim())), h = new na(l, t), u = new na(c, n), f = (() => h.length + u.length < 1500 ? this.dynamicProgrammingDiffing.compute(h, u, i, (F, N) => t[F] === n[N] ? n[N].length === 0 ? 0.1 : 1 + Math.log(1 + n[N].length) : 0.99) : this.myersDiffingAlgorithm.compute(h, u))(); let m = f.diffs, b = f.hitTimeout; m = Zs(h, u, m); const v = [], y = (F) => { if (s) for (let N = 0; N < F; N++) { const B = w + N, H = S + N; if (t[B] !== n[H]) { const D = this.refineDiff(t, n, new Te(new ce(B, B + 1), new ce(H, H + 1)), i, s); for (const R of D.mappings) v.push(R); D.hitTimeout && (b = !0); } } }; let w = 0, S = 0; for (const F of m) { yi(() => F.seq1Range.start - w === F.seq2Range.start - S); const N = F.seq1Range.start - w; y(N), w = F.seq1Range.endExclusive, S = F.seq2Range.endExclusive; const B = this.refineDiff(t, n, F, i, s); B.hitTimeout && (b = !0); for (const H of B.mappings) v.push(H); } y(t.length - w); const k = Mh(v, t, n); return new Ko(k, b); } refineDiff(t, n, r, i, s) { const a = new ia(t, r.seq1Range, s), o = new ia(n, r.seq2Range, s), l = a.length + o.length < 500 ? this.dynamicProgrammingDiffing.compute(a, o, i) : this.myersDiffingAlgorithm.compute(a, o, i); let c = l.diffs; return c = Zs(a, o, c), c = Ah(a, o, c), c = Ch(a, o, c), { mappings: c.map((u) => new Qo(a.translateRange(u.seq1Range), o.translateRange(u.seq2Range))), hitTimeout: l.hitTimeout }; } } function Ah(e, t, n) { const r = []; let i; function s() { if (!i) return; const l = i.s1Range.length - i.deleted; i.s2Range.length - i.added, Math.max(i.deleted, i.added) + (i.count - 1) > l && r.push(new Te(i.s1Range, i.s2Range)), i = void 0; } for (const l of n) { let c = function(b, v) { var y, w, S, k; if (!i || !i.s1Range.containsRange(b) || !i.s2Range.containsRange(v)) if (i && !(i.s1Range.endExclusive < b.start && i.s2Range.endExclusive < v.start)) { const B = ce.tryCreate(i.s1Range.endExclusive, b.start), H = ce.tryCreate(i.s2Range.endExclusive, v.start); i.deleted += (y = B == null ? void 0 : B.length) !== null && y !== void 0 ? y : 0, i.added += (w = H == null ? void 0 : H.length) !== null && w !== void 0 ? w : 0, i.s1Range = i.s1Range.join(b), i.s2Range = i.s2Range.join(v); } else s(), i = { added: 0, deleted: 0, count: 0, s1Range: b, s2Range: v }; const F = b.intersect(l.seq1Range), N = v.intersect(l.seq2Range); i.count++, i.deleted += (S = F == null ? void 0 : F.length) !== null && S !== void 0 ? S : 0, i.added += (k = N == null ? void 0 : N.length) !== null && k !== void 0 ? k : 0; }; var o = c; const h = e.findWordContaining(l.seq1Range.start - 1), u = t.findWordContaining(l.seq2Range.start - 1), f = e.findWordContaining(l.seq1Range.endExclusive), m = t.findWordContaining(l.seq2Range.endExclusive); h && f && u && m && h.equals(f) && u.equals(m) ? c(h, u) : (h && u && c(h, u), f && m && c(f, m)); } return s(), zh(n, r); } function zh(e, t) { const n = []; for (; e.length > 0 || t.length > 0; ) { const r = e[0], i = t[0]; let s; r && (!i || r.seq1Range.start < i.seq1Range.start) ? s = e.shift() : s = t.shift(), n.length > 0 && 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 Mh(e, t, n) { const r = []; for (const i of Ph(e.map((s) => Nh(s, t, n)), (s, a) => s.originalRange.overlapOrTouch(a.originalRange) || s.modifiedRange.overlapOrTouch(a.modifiedRange))) { const s = i[0], a = i[i.length - 1]; r.push(new jn(s.originalRange.join(a.originalRange), s.modifiedRange.join(a.modifiedRange), i.map((o) => o.innerChanges[0]))); } return yi(() => Yo(r, (i, s) => s.originalRange.startLineNumber - i.originalRange.endLineNumberExclusive === s.modifiedRange.startLineNumber - i.modifiedRange.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined) i.originalRange.endLineNumberExclusive < s.originalRange.startLineNumber && i.modifiedRange.endLineNumberExclusive < s.modifiedRange.startLineNumber)), r; } function Nh(e, t, n) { let r = 0, i = 0; e.modifiedRange.startColumn - 1 >= n[e.modifiedRange.startLineNumber - 1].length && e.originalRange.startColumn - 1 >= t[e.originalRange.startLineNumber - 1].length && (r = 1), e.modifiedRange.endColumn === 1 && e.originalRange.endColumn === 1 && e.originalRange.startLineNumber + r <= e.originalRange.endLineNumber && e.modifiedRange.startLineNumber + r <= e.modifiedRange.endLineNumber && (i = -1); const s = new Ve(e.originalRange.startLineNumber + r, e.originalRange.endLineNumber + 1 + i), a = new Ve(e.modifiedRange.startLineNumber + r, e.modifiedRange.endLineNumber + 1 + i); return new jn(s, a, [e]); } function* Ph(e, t) { let n, r; for (const i of e) r !== void 0 && t(r, i) ? n.push(i) : (n && (yield n), n = [i]), r = i; n && (yield n); } class na { constructor(t, n) { this.trimmedHash = t, this.lines = n; } getElement(t) { return this.trimmedHash[t]; } get length() { return this.trimmedHash.length; } getBoundaryScore(t) { const n = t === 0 ? 0 : ra(this.lines[t - 1]), r = t === this.lines.length ? 0 : ra(this.lines[t]); return 1e3 - (n + r); } } function ra(e) { let t = 0; for (; t < e.length && (e.charCodeAt(t) === 32 || e.charCodeAt(t) === 9); ) t++; return t; } class ia { constructor(t, n, r) { this.lines = t, this.considerWhitespaceChanges = r, this.elements = [], this.firstCharOffsetByLineMinusOne = [], this.offsetByLine = []; let i = !1; n.start > 0 && n.endExclusive >= t.length && (n = new ce(n.start - 1, n.endExclusive), i = !0), this.lineRange = n; for (let s = this.lineRange.start; s < this.lineRange.endExclusive; s++) { let a = t[s], o = 0; if (i) o = a.length, a = "", i = !1; else if (!r) { const l = a.trimStart(); o = a.length - l.length, a = l.trimEnd(); } this.offsetByLine.push(o); for (let l = 0; l < a.length; l++) this.elements.push(a.charCodeAt(l)); s < t.length - 1 && (this.elements.push(` `.charCodeAt(0)), this.firstCharOffsetByLineMinusOne[s - this.lineRange.start] = this.elements.length); } this.offsetByLine.push(0); } toString() { return `Slice: "${this.text}"`; } get text() { return [...this.elements].map((t) => String.fromCharCode(t)).join(""); } getElement(t) { return this.elements[t]; } get length() { return this.elements.length; } getBoundaryScore(t) { const n = aa(t > 0 ? this.elements[t - 1] : -1), r = aa(t < this.elements.length ? this.elements[t] : -1); if (n === 6 && r === 7) return 0; let i = 0; return n !== r && (i += 10, r === 1 && (i += 1)), i += sa(n), i += sa(r), i; } translateOffset(t) { if (this.lineRange.isEmpty) return new Ge(this.lineRange.start + 1, 1); let n = 0, r = this.firstCharOffsetByLineMinusOne.length; for (; n < r; ) { const s = Math.floor((n + r) / 2); this.firstCharOffsetByLineMinusOne[s] > t ? r = s : n = s + 1; } const i = n === 0 ? 0 : this.firstCharOffsetByLineMinusOne[n - 1]; return new Ge(this.lineRange.start + n + 1, t - i + 1 + this.offsetByLine[n]); } translateRange(t) { return _e.fromPositions(this.translateOffset(t.start), this.translateOffset(t.endExclusive)); } /** * Finds the word that contains the character at the given offset */ findWordContaining(t) { if (t < 0 || t >= this.elements.length || !ur(this.elements[t])) return; let n = t; for (; n > 0 && ur(this.elements[n - 1]); ) n--; let r = t; for (; r < this.elements.length && ur(this.elements[r]); ) r++; return new ce(n, r); } } function ur(e) { return e >= 97 && e <= 122 || e >= 65 && e <= 90 || e >= 48 && e <= 57; } const Ih = { [ 0 /* CharBoundaryCategory.WordLower */ ]: 0, [ 1 /* CharBoundaryCategory.WordUpper */ ]: 0, [ 2 /* CharBoundaryCategory.WordNumber */ ]: 0, [ 3 /* CharBoundaryCategory.End */ ]: 10, [ 4 /* CharBoundaryCategory.Other */ ]: 2, [ 5 /* CharBoundaryCategory.Space */ ]: 3, [ 6 /* CharBoundaryCategory.LineBreakCR */ ]: 10, [ 7 /* CharBoundaryCategory.LineBreakLF */ ]: 10 }; function sa(e) { return Ih[e]; } function aa(e) { return e === 10 ? 7 : e === 13 ? 6 : Lh(e) ? 5 : e >= 97 && e <= 122 ? 0 : e >= 65 && e <= 90 ? 1 : e >= 48 && e <= 57 ? 2 : e === -1 ? 3 : 4; } function Lh(e) { return e === 32 || e === 9; } const pr = { smart: new vh(), experimental: new Dh() }; var Ke = globalThis && globalThis.__awaiter || function(e, t, n, r) { function i(s) { return s instanceof n ? s : new n(function(a) { a(s); }); } return new (n || (n = Promise))(function(s, a) { function o(h) { try { c(r.next(h)); } catch (u) { a(u); } } function l(h) { try { c(r.throw(h)); } catch (u) { a(u); } } function c(h) { h.done ? s(h.value) : i(h.value).then(o, l); } c((r = r.apply(e, t || [])).next()); }); }; class Th extends Hc { get uri() { return this._uri; } get eol() { return this._eol; } getValue() { return this.getText(); } getLinesContent() { return this._lines.slice(0); } getLineCount() { return this._lines.length; } getLineContent(t) { return this._lines[t - 1]; } getWordAtPosition(t, n) { const r = gi(t.column, Xc(n), this._lines[t.lineNumber - 1], 0); return r ? new _e(t.lineNumber, r.startColumn, t.lineNumber, r.endColumn) : null; } getWordUntilPosition(t, n) { const r = this.getWordAtPosition(t, n); return r ? { word: this._lines[t.lineNumber - 1].substring(r.startColumn - 1, t.column - 1), startColumn: r.startColumn, endColumn: t.column } : { word: "", startColumn: t.column, endColumn: t.column }; } words(t) { const n = this._lines, r = this._wordenize.bind(this); let i = 0, s = "", a = 0, o = []; return { *[Symbol.iterator]() { for (; ; ) if (a < o.length) { const l = s.substring(o[a].start, o[a].end); a += 1, yield l; } else if (i < n.length) s = n[i], o = r(s, t), a = 0, i += 1; else break; } }; } getLineWords(t, n) { const r = this._lines[t - 1], i = this._wordenize(r, n), s = []; for (const a of i) s.push({ word: r.substring(a.start, a.end), startColumn: a.start + 1, endColumn: a.end + 1 }); return s; } _wordenize(t, n) { const r = []; let i; for (n.lastIndex = 0; (i = n.exec(t)) && i[0].length !== 0; ) r.push({ start: i.index, end: i.index + i[0].length }); return r; } getValueInRange(t) { if (t = this._validateRange(t), t.startLineNumber === t.endLineNumber) return this._lines[t.startLineNumber - 1].substring(t.startColumn - 1, t.endColumn - 1); const n = this._eol, r = t.startLineNumber - 1, i = t.endLineNumber - 1, s = []; s.push(this._lines[r].substring(t.startColumn - 1)); for (let a = r + 1; a < i; a++) s.push(this._lines[a]); return s.push(this._lines[i].substring(0, t.endColumn - 1)), s.join(n); } offsetAt(t) { return t = this._validatePosition(t), this._ensureLineStarts(), this._lineStarts.getPrefixSum(t.lineNumber - 2) + (t.column - 1); } positionAt(t) { t = Math.floor(t), t = Math.max(0, t), this._ensureLineStarts(); const n = this._lineStarts.getIndexOf(t), r = this._lines[n.index].length; return { lineNumber: 1 + n.index, column: 1 + Math.min(n.remainder, r) }; } _validateRange(t) { const n = this._validatePosition({ lineNumber: t.startLineNumber, column: t.startColumn }), r = this._validatePosition({ lineNumber: t.endLineNumber, column: t.endColumn }); return n.lineNumber !== t.startLineNumber || n.column !== t.startColumn || r.lineNumber !== t.endLineNumber || r.column !== t.endColumn ? { startLineNumber: n.lineNumber, startColumn: n.column, endLineNumber: r.lineNumber, endColumn: r.column } : t; } _validatePosition(t) { if (!Ge.isIPosition(t)) throw new Error("bad position"); let { lineNumber: n, column: r } = t, i = !1; if (n < 1) n = 1, r = 1, i = !0; else if (n > this._lines.length) n = this._lines.length, r = this._lines[n - 1].length + 1, i = !0; else { const 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; } } class ut { constructor(t, n) { this._host = t, this._models = /* @__PURE__ */ Object.create(null), this._foreignModuleFactory = n, this._foreignModule = null; } dispose() { this._models = /* @__PURE__ */ Object.create(null); } _getModel(t) { return this._models[t]; } _getModels() { const t = []; return Object.keys(this._models).forEach((n) => t.push(this._models[n])), t; } acceptNewModel(t) { this._models[t.url] = new Th(mi.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]; } computeUnicodeHighlights(t, n, r) { return Ke(this, void 0, void 0, function* () { const i = this._getModel(t); return i ? mh.computeUnicodeHighlights(i, n, r) : { ranges: [], hasMore: !1, ambiguousCharacterCount: 0, invisibleCharacterCount: 0, nonBasicAsciiCharacterCount: 0 }; }); } // ---- BEGIN diff -------------------------------------------------------------------------- computeDiff(t, n, r, i) { return Ke(this, void 0, void 0, function* () { const s = this._getModel(t), a = this._getModel(n); return !s || !a ? null : ut.computeDiff(s, a, r, i); }); } static computeDiff(t, n, r, i) { const s = i === "experimental" ? pr.experimental : pr.smart, a = t.getLinesContent(), o = n.getLinesContent(), l = s.computeDiff(a, o, r); return { identical: l.changes.length > 0 ? !1 : this._modelsAreIdentical(t, n), quitEarly: l.hitTimeout, changes: l.changes.map((h) => { var u; return [h.originalRange.startLineNumber, h.originalRange.endLineNumberExclusive, h.modifiedRange.startLineNumber, h.modifiedRange.endLineNumberExclusive, (u = h.innerChanges) === null || u === void 0 ? void 0 : u.map((f) => [ f.originalRange.startLineNumber, f.originalRange.startColumn, f.originalRange.endLineNumber, f.originalRange.endColumn, f.modifiedRange.startLineNumber, f.modifiedRange.startColumn, f.modifiedRange.endLineNumber, f.modifiedRange.endColumn ])]; }) }; } static _modelsAreIdentical(t, n) { const r = t.getLineCount(), i = n.getLineCount(); if (r !== i) return !1; for (let s = 1; s <= r; s++) { const a = t.getLineContent(s), o = n.getLineContent(s); if (a !== o) return !1; } return !0; } computeDirtyDiff(t, n, r) { return Ke(this, void 0, void 0, function* () { const i = this._getModel(t), s = this._getModel(n); if (!i || !s) return null; const a = i.getLinesContent(), o = s.getLinesContent(); return new el(a, o, { shouldComputeCharChanges: !1, shouldPostProcessCharChanges: !1, shouldIgnoreTrimWhitespace: r, shouldMakePrettyDiff: !0, maxComputationTime: 1e3 }).computeDiff().changes; }); } computeMoreMinimalEdits(t, n, r) { return Ke(this, void 0, void 0, function* () { const i = this._getModel(t); if (!i) return n; const s = []; let a; n = n.slice(0).sort((o, l) => { if (o.range && l.range) return _e.compareRangesUsingStarts(o.range, l.range); const c = o.range ? 0 : 1, h = l.range ? 0 : 1; return c - h; }); for (let { range: o, text: l, eol: c } of n) { if (typeof c == "number" && (a = c), _e.isEmpty(o) && !l) continue; const h = i.getValueInRange(o); if (l = l.replace(/\r\n|\n|\r/g, i.eol), h === l) continue; if (Math.max(l.length, h.length) > ut._diffLimit) { s.push({ range: o, text: l }); continue; } const u = Rc(h, l, r), f = i.offsetAt(_e.lift(o).getStartPosition()); for (const m of u) { const b = i.positionAt(f + m.originalStart), v = i.positionAt(f + m.originalStart + m.originalLength), y = { text: l.substr(m.modifiedStart, m.modifiedLength), range: { startLineNumber: b.lineNumber, startColumn: b.column, endLineNumber: v.lineNumber, endColumn: v.column } }; i.getValueInRange(y.range) !== y.text && s.push(y); } } return typeof a == "number" && s.push({ eol: a, text: "", range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } }), s; }); } computeHumanReadableDiff(t, n, r) { return Ke(this, void 0, void 0, function* () { const i = this._getModel(t); if (!i) return n; const s = []; let a; n = n.slice(0).sort((c, h) => { if (c.range && h.range) return _e.compareRangesUsingStarts(c.range, h.range); const u = c.range ? 0 : 1, f = h.range ? 0 : 1; return u - f; }); for (let { range: c, text: h, eol: u } of n) { let w = function(k, F) { return new Ge(k.lineNumber + F.lineNumber - 1, F.lineNumber === 1 ? k.column + F.column - 1 : F.column); }, S = function(k, F) { const N = []; for (let B = F.startLineNumber; B <= F.endLineNumber; B++) { const H = k[B - 1]; B === F.startLineNumber && B === F.endLineNumber ? N.push(H.substring(F.startColumn - 1, F.endColumn - 1)) : B === F.startLineNumber ? N.push(H.substring(F.startColumn - 1)) : B === F.endLineNumber ? N.push(H.substring(0, F.endColumn - 1)) : N.push(H); } return N; }; var o = w, l = S; if (typeof u == "number" && (a = u), _e.isEmpty(c) && !h) continue; const f = i.getValueInRange(c); if (h = h.replace(/\r\n|\n|\r/g, i.eol), f === h) continue; if (Math.max(h.length, f.length) > ut._diffLimit) { s.push({ range: c, text: h }); continue; } const m = f.split(/\r\n|\n|\r/), b = h.split(/\r\n|\n|\r/), v = pr.experimental.computeDiff(m, b, r), y = _e.lift(c).getStartPosition(); for (const k of v.changes) if (k.innerChanges) for (const F of k.innerChanges) s.push({ range: _e.fromPositions(w(y, F.originalRange.getStartPosition()), w(y, F.originalRange.getEndPosition())), text: S(b, F.modifiedRange).join(i.eol) }); else throw new kt("The experimental diff algorithm always produces inner changes"); } return typeof a == "number" && s.push({ eol: a, text: "", range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } }), s; }); } // ---- END minimal edits --------------------------------------------------------------- computeLinks(t) { return Ke(this, void 0, void 0, function* () { const n = this._getModel(t); return n ? th(n) : null; }); } textualSuggest(t, n, r, i) { return Ke(this, void 0, void 0, function* () { const s = new ir(!0), a = new RegExp(r, i), o = /* @__PURE__ */ new Set(); e: for (const l of t) { const c = this._getModel(l); if (c) { for (const h of c.words(a)) if (!(h === n || !isNaN(Number(h))) && (o.add(h), o.size > ut._suggestionsLimit)) break e; } } return { words: Array.from(o), duration: s.elapsed() }; }); } // ---- END suggest -------------------------------------------------------------------------- //#region -- word ranges -- computeWordRanges(t, n, r, i) { return Ke(this, void 0, void 0, function* () { const s = this._getModel(t); if (!s) return /* @__PURE__ */ Object.create(null); const a = new RegExp(r, i), o = /* @__PURE__ */ Object.create(null); for (let l = n.startLineNumber; l < n.endLineNumber; l++) { const c = s.getLineWords(l, a); for (const h of c) { if (!isNaN(Number(h.word))) continue; let u = o[h.word]; u || (u = [], o[h.word] = u), u.push({ startLineNumber: l, startColumn: h.startColumn, endLineNumber: l, endColumn: h.endColumn }); } } return o; }); } //#endregion navigateValueSet(t, n, r, i, s) { return Ke(this, void 0, void 0, function* () { const a = this._getModel(t); if (!a) return null; const o = new RegExp(i, s); n.startColumn === n.endColumn && (n = { startLineNumber: n.startLineNumber, startColumn: n.startColumn, endLineNumber: n.endLineNumber, endColumn: n.endColumn + 1 }); const l = a.getValueInRange(n), c = a.getWordAtPosition({ lineNumber: n.startLineNumber, column: n.startColumn }, o); if (!c) return null; const h = a.getValueInRange(c); return Tr.INSTANCE.navigateValueSet(n, l, c, h, r); }); } // ---- BEGIN foreign module support -------------------------------------------------------------------------- loadForeignModule(t, n, r) { const a = { host: ac(r, (o, l) => this._host.fhr(o, l)), getMirrorModels: () => this._getModels() }; return this._foreignModuleFactory ? (this._foreignModule = this._foreignModuleFactory(a, n), Promise.resolve(Mr(this._foreignModule))) : Promise.reject(new Error("Unexpected usage")); } // foreign method request 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); } } } ut._diffLimit = 1e5; ut._suggestionsLimit = 1e4; typeof importScripts == "function" && (globalThis.monaco = ch()); let Gr = !1; function tl(e) { if (Gr) return; Gr = !0; const t = new _c((n) => { globalThis.postMessage(n); }, (n) => new ut(n, e)); globalThis.onmessage = (n) => { t.onmessage(n.data); }; } globalThis.onmessage = (e) => { Gr || tl(null); }; /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ var p; (function(e) { e[e.Ident = 0] = "Ident", e[e.AtKeyword = 1] = "AtKeyword", e[e.String = 2] = "String", e[e.BadString = 3] = "BadString", e[e.UnquotedString = 4] = "UnquotedString", e[e.Hash = 5] = "Hash", e[e.Num = 6] = "Num", e[e.Percentage = 7] = "Percentage", e[e.Dimension = 8] = "Dimension", e[e.UnicodeRange = 9] = "UnicodeRange", e[e.CDO = 10] = "CDO", e[e.CDC = 11] = "CDC", e[e.Colon = 12] = "Colon", e[e.SemiColon = 13] = "SemiColon", e[e.CurlyL = 14] = "CurlyL", e[e.CurlyR = 15] = "CurlyR", e[e.ParenthesisL = 16] = "ParenthesisL", e[e.ParenthesisR = 17] = "ParenthesisR", e[e.BracketL = 18] = "BracketL", e[e.BracketR = 19] = "BracketR", e[e.Whitespace = 20] = "Whitespace", e[e.Includes = 21] = "Includes", e[e.Dashmatch = 22] = "Dashmatch", e[e.SubstringOperator = 23] = "SubstringOperator", e[e.PrefixOperator = 24] = "PrefixOperator", e[e.SuffixOperator = 25] = "SuffixOperator", e[e.Delim = 26] = "Delim", e[e.EMS = 27] = "EMS", e[e.EXS = 28] = "EXS", e[e.Length = 29] = "Length", e[e.Angle = 30] = "Angle", e[e.Time = 31] = "Time", e[e.Freq = 32] = "Freq", e[e.Exclamation = 33] = "Exclamation", e[e.Resolution = 34] = "Resolution", e[e.Comma = 35] = "Comma", e[e.Charset = 36] = "Charset", e[e.EscapedJavaScript = 37] = "EscapedJavaScript", e[e.BadEscapedJavaScript = 38] = "BadEscapedJavaScript", e[e.Comment = 39] = "Comment", e[e.SingleLineComment = 40] = "SingleLineComment", e[e.EOF = 41] = "EOF", e[e.CustomToken = 42] = "CustomToken"; })(p || (p = {})); var oa = function() { function e(t) { this.source = t, this.len = t.length, this.position = 0; } return e.prototype.substring = function(t, n) { return n === void 0 && (n = this.position), this.source.substring(t, n); }, e.prototype.eos = function() { return this.len <= this.position; }, e.prototype.pos = function() { return this.position; }, e.prototype.goBackTo = function(t) { this.position = t; }, e.prototype.goBack = function(t) { this.position -= t; }, e.prototype.advance = function(t) { this.position += t; }, e.prototype.nextChar = function() { return this.source.charCodeAt(this.position++) || 0; }, e.prototype.peekChar = function(t) { return t === void 0 && (t = 0), this.source.charCodeAt(this.position + t) || 0; }, e.prototype.lookbackChar = function(t) { return t === void 0 && (t = 0), this.source.charCodeAt(this.position - t) || 0; }, e.prototype.advanceIfChar = function(t) { return t === this.source.charCodeAt(this.position) ? (this.position++, !0) : !1; }, e.prototype.advanceIfChars = function(t) { if (this.position + t.length > this.source.length) return !1; for (var n = 0; n < t.length; n++) if (this.source.charCodeAt(this.position + n) !== t[n]) return !1; return this.advance(n), !0; }, e.prototype.advanceWhileChar = function(t) { for (var n = this.position; this.position < this.len && t(this.source.charCodeAt(this.position)); ) this.position++; return this.position - n; }, e; }(), Sn = "a".charCodeAt(0), la = "f".charCodeAt(0), ca = "z".charCodeAt(0), Cn = "A".charCodeAt(0), ha = "F".charCodeAt(0), da = "Z".charCodeAt(0), Ht = "0".charCodeAt(0), Gt = "9".charCodeAt(0), Wh = "~".charCodeAt(0), Oh = "^".charCodeAt(0), Jt = "=".charCodeAt(0), Uh = "|".charCodeAt(0), gt = "-".charCodeAt(0), ua = "_".charCodeAt(0), Vh = "%".charCodeAt(0), fr = "*".charCodeAt(0), nl = "(".charCodeAt(0), rl = ")".charCodeAt(0), Bh = "<".charCodeAt(0), jh = ">".charCodeAt(0), qh = "@".charCodeAt(0), $h = "#".charCodeAt(0), Hh = "$".charCodeAt(0), mr = "\\".charCodeAt(0), pa = "/".charCodeAt(0), Dt = ` `.charCodeAt(0), At = "\r".charCodeAt(0), Xt = "\f".charCodeAt(0), fa = '"'.charCodeAt(0), ma = "'".charCodeAt(0), gr = " ".charCodeAt(0), br = " ".charCodeAt(0), Gh = ";".charCodeAt(0), Jh = ":".charCodeAt(0), Xh = "{".charCodeAt(0), Yh = "}".charCodeAt(0), Kh = "[".charCodeAt(0), Qh = "]".charCodeAt(0), Zh = ",".charCodeAt(0), ga = ".".charCodeAt(0), ba = "!".charCodeAt(0), ed = "?".charCodeAt(0), td = "+".charCodeAt(0), Xe = {}; Xe[Gh] = p.SemiColon; Xe[Jh] = p.Colon; Xe[Xh] = p.CurlyL; Xe[Yh] = p.CurlyR; Xe[Qh] = p.BracketR; Xe[Kh] = p.BracketL; Xe[nl] = p.ParenthesisL; Xe[rl] = p.ParenthesisR; Xe[Zh] = p.Comma; var me = {}; me.em = p.EMS; me.ex = p.EXS; me.px = p.Length; me.cm = p.Length; me.mm = p.Length; me.in = p.Length; me.pt = p.Length; me.pc = p.Length; me.deg = p.Angle; me.rad = p.Angle; me.grad = p.Angle; me.ms = p.Time; me.s = p.Time; me.hz = p.Freq; me.khz = p.Freq; me["%"] = p.Percentage; me.fr = p.Percentage; me.dpi = p.Resolution; me.dpcm = p.Resolution; var bn = function() { function e() { this.stream = new oa(""), this.ignoreComment = !0, this.ignoreWhitespace = !0, this.inURL = !1; } return e.prototype.setSource = function(t) { this.stream = new oa(t); }, e.prototype.finishToken = function(t, n, r) { return { offset: t, len: this.stream.pos() - t, type: n, text: r || this.stream.substring(t) }; }, e.prototype.substring = function(t, n) { return this.stream.substring(t, t + n); }, e.prototype.pos = function() { return this.stream.pos(); }, e.prototype.goBackTo = function(t) { this.stream.goBackTo(t); }, e.prototype.scanUnquotedString = function() { var t = this.stream.pos(), n = []; return this._unquotedString(n) ? this.finishToken(t, p.UnquotedString, n.join("")) : null; }, e.prototype.scan = function() { var t = this.trivia(); if (t !== null) return t; var n = this.stream.pos(); return this.stream.eos() ? this.finishToken(n, p.EOF) : this.scanNext(n); }, e.prototype.tryScanUnicode = function() { var t = this.stream.pos(); if (!this.stream.eos() && this._unicodeRange()) return this.finishToken(t, p.UnicodeRange); this.stream.goBackTo(t); }, e.prototype.scanNext = function(t) { if (this.stream.advanceIfChars([Bh, ba, gt, gt])) return this.finishToken(t, p.CDO); if (this.stream.advanceIfChars([gt, gt, jh])) return this.finishToken(t, p.CDC); var n = []; if (this.ident(n)) return this.finishToken(t, p.Ident, n.join("")); if (this.stream.advanceIfChar(qh)) if (n = ["@"], this._name(n)) { var r = n.join(""); return r === "@charset" ? this.finishToken(t, p.Charset, r) : this.finishToken(t, p.AtKeyword, r); } else return this.finishToken(t, p.Delim); if (this.stream.advanceIfChar($h)) return n = ["#"], this._name(n) ? this.finishToken(t, p.Hash, n.join("")) : this.finishToken(t, p.Delim); if (this.stream.advanceIfChar(ba)) return this.finishToken(t, p.Exclamation); if (this._number()) { var i = this.stream.pos(); if (n = [this.stream.substring(t, i)], this.stream.advanceIfChar(Vh)) return this.finishToken(t, p.Percentage); if (this.ident(n)) { var s = this.stream.substring(i).toLowerCase(), a = me[s]; return typeof a < "u" ? this.finishToken(t, a, n.join("")) : this.finishToken(t, p.Dimension, n.join("")); } return this.finishToken(t, p.Num); } n = []; var o = this._string(n); return o !== null ? this.finishToken(t, o, n.join("")) : (o = Xe[this.stream.peekChar()], typeof o < "u" ? (this.stream.advance(1), this.finishToken(t, o)) : this.stream.peekChar(0) === Wh && this.stream.peekChar(1) === Jt ? (this.stream.advance(2), this.finishToken(t, p.Includes)) : this.stream.peekChar(0) === Uh && this.stream.peekChar(1) === Jt ? (this.stream.advance(2), this.finishToken(t, p.Dashmatch)) : this.stream.peekChar(0) === fr && this.stream.peekChar(1) === Jt ? (this.stream.advance(2), this.finishToken(t, p.SubstringOperator)) : this.stream.peekChar(0) === Oh && this.stream.peekChar(1) === Jt ? (this.stream.advance(2), this.finishToken(t, p.PrefixOperator)) : this.stream.peekChar(0) === Hh && this.stream.peekChar(1) === Jt ? (this.stream.advance(2), this.finishToken(t, p.SuffixOperator)) : (this.stream.nextChar(), this.finishToken(t, p.Delim))); }, e.prototype.trivia = function() { for (; ; ) { var t = this.stream.pos(); if (this._whitespace()) { if (!this.ignoreWhitespace) return this.finishToken(t, p.Whitespace); } else if (this.comment()) { if (!this.ignoreComment) return this.finishToken(t, p.Comment); } else return null; } }, e.prototype.comment = function() { if (this.stream.advanceIfChars([pa, fr])) { var t = !1, n = !1; return this.stream.advanceWhileChar(function(r) { return n && r === pa ? (t = !0, !1) : (n = r === fr, !0); }), t && this.stream.advance(1), !0; } return !1; }, e.prototype._number = function() { var t = 0, n; return this.stream.peekChar() === ga && (t = 1), n = this.stream.peekChar(t), n >= Ht && n <= Gt ? (this.stream.advance(t + 1), this.stream.advanceWhileChar(function(r) { return r >= Ht && r <= Gt || t === 0 && r === ga; }), !0) : !1; }, e.prototype._newline = function(t) { var n = this.stream.peekChar(); switch (n) { case At: case Xt: case Dt: return this.stream.advance(1), t.push(String.fromCharCode(n)), n === At && this.stream.advanceIfChar(Dt) && t.push(` `), !0; } return !1; }, e.prototype._escape = function(t, n) { var r = this.stream.peekChar(); if (r === mr) { this.stream.advance(1), r = this.stream.peekChar(); for (var i = 0; i < 6 && (r >= Ht && r <= Gt || r >= Sn && r <= la || r >= Cn && r <= ha); ) 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 && t.push(String.fromCharCode(s)); } catch { } return r === gr || r === br ? this.stream.advance(1) : this._newline([]), !0; } if (r !== At && r !== Xt && r !== Dt) return this.stream.advance(1), t.push(String.fromCharCode(r)), !0; if (n) return this._newline(t); } return !1; }, e.prototype._stringChar = function(t, n) { var r = this.stream.peekChar(); return r !== 0 && r !== t && r !== mr && r !== At && r !== Xt && r !== Dt ? (this.stream.advance(1), n.push(String.fromCharCode(r)), !0) : !1; }, e.prototype._string = function(t) { if (this.stream.peekChar() === ma || this.stream.peekChar() === fa) { var n = this.stream.nextChar(); for (t.push(String.fromCharCode(n)); this._stringChar(n, t) || this._escape(t, !0); ) ; return this.stream.peekChar() === n ? (this.stream.nextChar(), t.push(String.fromCharCode(n)), p.String) : p.BadString; } return null; }, e.prototype._unquotedChar = function(t) { var n = this.stream.peekChar(); return n !== 0 && n !== mr && n !== ma && n !== fa && n !== nl && n !== rl && n !== gr && n !== br && n !== Dt && n !== Xt && n !== At ? (this.stream.advance(1), t.push(String.fromCharCode(n)), !0) : !1; }, e.prototype._unquotedString = function(t) { for (var n = !1; this._unquotedChar(t) || this._escape(t); ) n = !0; return n; }, e.prototype._whitespace = function() { var t = this.stream.advanceWhileChar(function(n) { return n === gr || n === br || n === Dt || n === Xt || n === At; }); return t > 0; }, e.prototype._name = function(t) { for (var n = !1; this._identChar(t) || this._escape(t); ) n = !0; return n; }, e.prototype.ident = function(t) { var n = this.stream.pos(), r = this._minus(t); if (r) { if (this._minus(t) || this._identFirstChar(t) || this._escape(t)) { for (; this._identChar(t) || this._escape(t); ) ; return !0; } } else if (this._identFirstChar(t) || this._escape(t)) { for (; this._identChar(t) || this._escape(t); ) ; return !0; } return this.stream.goBackTo(n), !1; }, e.prototype._identFirstChar = function(t) { var n = this.stream.peekChar(); return n === ua || n >= Sn && n <= ca || n >= Cn && n <= da || n >= 128 && n <= 65535 ? (this.stream.advance(1), t.push(String.fromCharCode(n)), !0) : !1; }, e.prototype._minus = function(t) { var n = this.stream.peekChar(); return n === gt ? (this.stream.advance(1), t.push(String.fromCharCode(n)), !0) : !1; }, e.prototype._identChar = function(t) { var n = this.stream.peekChar(); return n === ua || n === gt || n >= Sn && n <= ca || n >= Cn && n <= da || n >= Ht && n <= Gt || n >= 128 && n <= 65535 ? (this.stream.advance(1), t.push(String.fromCharCode(n)), !0) : !1; }, e.prototype._unicodeRange = function() { if (this.stream.advanceIfChar(td)) { var t = function(i) { return i >= Ht && i <= Gt || i >= Sn && i <= la || i >= Cn && i <= ha; }, n = this.stream.advanceWhileChar(t) + this.stream.advanceWhileChar(function(i) { return i === ed; }); if (n >= 1 && n <= 6) if (this.stream.advanceIfChar(gt)) { var r = this.stream.advanceWhileChar(t); if (r >= 1 && r <= 6) return !0; } else return !0; } return !1; }, e; }(); function pe(e, t) { if (e.length < t.length) return !1; for (var n = 0; n < t.length; n++) if (e[n] !== t[n]) return !1; return !0; } function il(e, t) { var n = e.length - t.length; return n > 0 ? e.lastIndexOf(t) === n : n === 0 ? e === t : !1; } function nd(e, t, n) { n === void 0 && (n = 4); var r = Math.abs(e.length - t.length); if (r > n) return 0; var i = [], s = [], a, o; for (a = 0; a < t.length + 1; ++a) s.push(0); for (a = 0; a < e.length + 1; ++a) i.push(s); for (a = 1; a < e.length + 1; ++a) for (o = 1; o < t.length + 1; ++o) e[a - 1] === t[o - 1] ? i[a][o] = i[a - 1][o - 1] + 1 : i[a][o] = Math.max(i[a - 1][o], i[a][o - 1]); return i[e.length][t.length] - Math.sqrt(r); } function va(e, t) { return t === void 0 && (t = !0), e ? e.length < 140 ? e : e.slice(0, 140) + (t ? "…" : "") : ""; } function rd(e, t) { var n = t.exec(e); return n && n[0].length ? e.substr(0, e.length - n[0].length) : e; } function ya(e, t) { for (var n = ""; t > 0; ) (t & 1) === 1 && (n += e), e += e, t = t >>> 1; return n; } var T = function() { var e = function(t, n) { return e = 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]); }, e(t, n); }; return function(t, n) { if (typeof n != "function" && n !== null) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); e(t, n); function r() { this.constructor = t; } t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; }(), g; (function(e) { e[e.Undefined = 0] = "Undefined", e[e.Identifier = 1] = "Identifier", e[e.Stylesheet = 2] = "Stylesheet", e[e.Ruleset = 3] = "Ruleset", e[e.Selector = 4] = "Selector", e[e.SimpleSelector = 5] = "SimpleSelector", e[e.SelectorInterpolation = 6] = "SelectorInterpolation", e[e.SelectorCombinator = 7] = "SelectorCombinator", e[e.SelectorCombinatorParent = 8] = "SelectorCombinatorParent", e[e.SelectorCombinatorSibling = 9] = "SelectorCombinatorSibling", e[e.SelectorCombinatorAllSiblings = 10] = "SelectorCombinatorAllSiblings", e[e.SelectorCombinatorShadowPiercingDescendant = 11] = "SelectorCombinatorShadowPiercingDescendant", e[e.Page = 12] = "Page", e[e.PageBoxMarginBox = 13] = "PageBoxMarginBox", e[e.ClassSelector = 14] = "ClassSelector", e[e.IdentifierSelector = 15] = "IdentifierSelector", e[e.ElementNameSelector = 16] = "ElementNameSelector", e[e.PseudoSelector = 17] = "PseudoSelector", e[e.AttributeSelector = 18] = "AttributeSelector", e[e.Declaration = 19] = "Declaration", e[e.Declarations = 20] = "Declarations", e[e.Property = 21] = "Property", e[e.Expression = 22] = "Expression", e[e.BinaryExpression = 23] = "BinaryExpression", e[e.Term = 24] = "Term", e[e.Operator = 25] = "Operator", e[e.Value = 26] = "Value", e[e.StringLiteral = 27] = "StringLiteral", e[e.URILiteral = 28] = "URILiteral", e[e.EscapedValue = 29] = "EscapedValue", e[e.Function = 30] = "Function", e[e.NumericValue = 31] = "NumericValue", e[e.HexColorValue = 32] = "HexColorValue", e[e.RatioValue = 33] = "RatioValue", e[e.MixinDeclaration = 34] = "MixinDeclaration", e[e.MixinReference = 35] = "MixinReference", e[e.VariableName = 36] = "VariableName", e[e.VariableDeclaration = 37] = "VariableDeclaration", e[e.Prio = 38] = "Prio", e[e.Interpolation = 39] = "Interpolation", e[e.NestedProperties = 40] = "NestedProperties", e[e.ExtendsReference = 41] = "ExtendsReference", e[e.SelectorPlaceholder = 42] = "SelectorPlaceholder", e[e.Debug = 43] = "Debug", e[e.If = 44] = "If", e[e.Else = 45] = "Else", e[e.For = 46] = "For", e[e.Each = 47] = "Each", e[e.While = 48] = "While", e[e.MixinContentReference = 49] = "MixinContentReference", e[e.MixinContentDeclaration = 50] = "MixinContentDeclaration", e[e.Media = 51] = "Media", e[e.Keyframe = 52] = "Keyframe", e[e.FontFace = 53] = "FontFace", e[e.Import = 54] = "Import", e[e.Namespace = 55] = "Namespace", e[e.Invocation = 56] = "Invocation", e[e.FunctionDeclaration = 57] = "FunctionDeclaration", e[e.ReturnStatement = 58] = "ReturnStatement", e[e.MediaQuery = 59] = "MediaQuery", e[e.MediaCondition = 60] = "MediaCondition", e[e.MediaFeature = 61] = "MediaFeature", e[e.FunctionParameter = 62] = "FunctionParameter", e[e.FunctionArgument = 63] = "FunctionArgument", e[e.KeyframeSelector = 64] = "KeyframeSelector", e[e.ViewPort = 65] = "ViewPort", e[e.Document = 66] = "Document", e[e.AtApplyRule = 67] = "AtApplyRule", e[e.CustomPropertyDeclaration = 68] = "CustomPropertyDeclaration", e[e.CustomPropertySet = 69] = "CustomPropertySet", e[e.ListEntry = 70] = "ListEntry", e[e.Supports = 71] = "Supports", e[e.SupportsCondition = 72] = "SupportsCondition", e[e.NamespacePrefix = 73] = "NamespacePrefix", e[e.GridLine = 74] = "GridLine", e[e.Plugin = 75] = "Plugin", e[e.UnknownAtRule = 76] = "UnknownAtRule", e[e.Use = 77] = "Use", e[e.ModuleConfiguration = 78] = "ModuleConfiguration", e[e.Forward = 79] = "Forward", e[e.ForwardVisibility = 80] = "ForwardVisibility", e[e.Module = 81] = "Module", e[e.UnicodeRange = 82] = "UnicodeRange"; })(g || (g = {})); var Y; (function(e) { e[e.Mixin = 0] = "Mixin", e[e.Rule = 1] = "Rule", e[e.Variable = 2] = "Variable", e[e.Function = 3] = "Function", e[e.Keyframe = 4] = "Keyframe", e[e.Unknown = 5] = "Unknown", e[e.Module = 6] = "Module", e[e.Forward = 7] = "Forward", e[e.ForwardVisibility = 8] = "ForwardVisibility"; })(Y || (Y = {})); function Jr(e, t) { var n = null; return !e || t < e.offset || t > e.end ? null : (e.accept(function(r) { return r.offset === -1 && r.length === -1 ? !0 : r.offset <= t && r.end >= t ? (n ? r.length <= n.length && (n = r) : n = r, !0) : !1; }), n); } function wi(e, t) { for (var n = Jr(e, t), r = []; n; ) r.unshift(n), n = n.parent; return r; } function id(e) { var t = e.findParent(g.Declaration), n = t && t.getValue(); return n && n.encloses(e) ? t : null; } var W = function() { function e(t, n, r) { t === void 0 && (t = -1), n === void 0 && (n = -1), this.parent = null, this.offset = t, this.length = n, r && (this.nodeType = r); } return Object.defineProperty(e.prototype, "end", { get: function() { return this.offset + this.length; }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "type", { get: function() { return this.nodeType || g.Undefined; }, set: function(t) { this.nodeType = t; }, enumerable: !1, configurable: !0 }), e.prototype.getTextProvider = function() { for (var t = this; t && !t.textProvider; ) t = t.parent; return t ? t.textProvider : function() { return "unknown"; }; }, e.prototype.getText = function() { return this.getTextProvider()(this.offset, this.length); }, e.prototype.matches = function(t) { return this.length === t.length && this.getTextProvider()(this.offset, this.length) === t; }, e.prototype.startsWith = function(t) { return this.length >= t.length && this.getTextProvider()(this.offset, t.length) === t; }, e.prototype.endsWith = function(t) { return this.length >= t.length && this.getTextProvider()(this.end - t.length, t.length) === t; }, e.prototype.accept = function(t) { if (t(this) && this.children) for (var n = 0, r = this.children; n < r.length; n++) { var i = r[n]; i.accept(t); } }, e.prototype.acceptVisitor = function(t) { this.accept(t.visitNode.bind(t)); }, e.prototype.adoptChild = function(t, n) { if (n === void 0 && (n = -1), t.parent && t.parent.children) { var r = t.parent.children.indexOf(t); r >= 0 && t.parent.children.splice(r, 1); } t.parent = this; var i = this.children; return i || (i = this.children = []), n !== -1 ? i.splice(n, 0, t) : i.push(t), t; }, e.prototype.attachTo = function(t, n) { return n === void 0 && (n = -1), t && t.adoptChild(this, n), this; }, e.prototype.collectIssues = function(t) { this.issues && t.push.apply(t, this.issues); }, e.prototype.addIssue = function(t) { this.issues || (this.issues = []), this.issues.push(t); }, e.prototype.hasIssue = function(t) { return Array.isArray(this.issues) && this.issues.some(function(n) { return n.getRule() === t; }); }, e.prototype.isErroneous = function(t) { return t === void 0 && (t = !1), this.issues && this.issues.length > 0 ? !0 : t && Array.isArray(this.children) && this.children.some(function(n) { return n.isErroneous(!0); }); }, e.prototype.setNode = function(t, n, r) { return r === void 0 && (r = -1), n ? (n.attachTo(this, r), this[t] = n, !0) : !1; }, e.prototype.addChild = function(t) { return t ? (this.children || (this.children = []), t.attachTo(this), this.updateOffsetAndLength(t), !0) : !1; }, e.prototype.updateOffsetAndLength = function(t) { (t.offset < this.offset || this.offset === -1) && (this.offset = t.offset); var n = t.end; (n > this.end || this.length === -1) && (this.length = n - this.offset); }, e.prototype.hasChildren = function() { return !!this.children && this.children.length > 0; }, e.prototype.getChildren = function() { return this.children ? this.children.slice(0) : []; }, e.prototype.getChild = function(t) { return this.children && t < this.children.length ? this.children[t] : null; }, e.prototype.addChildren = function(t) { for (var n = 0, r = t; n < r.length; n++) { var i = r[n]; this.addChild(i); } }, e.prototype.findFirstChildBeforeOffset = function(t) { if (this.children) { for (var n = null, r = this.children.length - 1; r >= 0; r--) if (n = this.children[r], n.offset <= t) return n; } return null; }, e.prototype.findChildAtOffset = function(t, n) { var r = this.findFirstChildBeforeOffset(t); return r && r.end >= t ? n && r.findChildAtOffset(t, !0) || r : null; }, e.prototype.encloses = function(t) { return this.offset <= t.offset && this.offset + this.length >= t.offset + t.length; }, e.prototype.getParent = function() { for (var t = this.parent; t instanceof we; ) t = t.parent; return t; }, e.prototype.findParent = function(t) { for (var n = this; n && n.type !== t; ) n = n.parent; return n; }, e.prototype.findAParent = function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; for (var r = this; r && !t.some(function(i) { return r.type === i; }); ) r = r.parent; return r; }, e.prototype.setData = function(t, n) { this.options || (this.options = {}), this.options[t] = n; }, e.prototype.getData = function(t) { return !this.options || !this.options.hasOwnProperty(t) ? null : this.options[t]; }, e; }(), we = function(e) { T(t, e); function t(n, r) { r === void 0 && (r = -1); var i = e.call(this, -1, -1) || this; return i.attachTo(n, r), i.offset = -1, i.length = -1, i; } return t; }(W), sd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.UnicodeRange; }, enumerable: !1, configurable: !0 }), t.prototype.setRangeStart = function(n) { return this.setNode("rangeStart", n); }, t.prototype.getRangeStart = function() { return this.rangeStart; }, t.prototype.setRangeEnd = function(n) { return this.setNode("rangeEnd", n); }, t.prototype.getRangeEnd = function() { return this.rangeEnd; }, t; }(W), Pe = function(e) { T(t, e); function t(n, r) { var i = e.call(this, n, r) || this; return i.isCustomProperty = !1, i; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Identifier; }, enumerable: !1, configurable: !0 }), t.prototype.containsInterpolation = function() { return this.hasChildren(); }, t; }(W), ad = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Stylesheet; }, enumerable: !1, configurable: !0 }), t; }(W), xi = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Declarations; }, enumerable: !1, configurable: !0 }), t; }(W), se = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return t.prototype.getDeclarations = function() { return this.declarations; }, t.prototype.setDeclarations = function(n) { return this.setNode("declarations", n); }, t; }(W), Lt = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Ruleset; }, enumerable: !1, configurable: !0 }), t.prototype.getSelectors = function() { return this.selectors || (this.selectors = new we(this)), this.selectors; }, t.prototype.isNested = function() { return !!this.parent && this.parent.findParent(g.Declarations) !== null; }, t; }(se), vn = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Selector; }, enumerable: !1, configurable: !0 }), t; }(W), Tt = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.SimpleSelector; }, enumerable: !1, configurable: !0 }), t; }(W); (function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.AtApplyRule; }, enumerable: !1, configurable: !0 }), t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; }, t; })(W); var Si = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return t; }(W), od = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.CustomPropertySet; }, enumerable: !1, configurable: !0 }), t; }(se), Je = function(e) { T(t, e); function t(n, r) { var i = e.call(this, n, r) || this; return i.property = null, i; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Declaration; }, enumerable: !1, configurable: !0 }), t.prototype.setProperty = function(n) { return this.setNode("property", n); }, t.prototype.getProperty = function() { return this.property; }, t.prototype.getFullPropertyName = function() { var n = this.property ? this.property.getName() : "unknown"; if (this.parent instanceof xi && this.parent.getParent() instanceof al) { var r = this.parent.getParent().getParent(); if (r instanceof t) return r.getFullPropertyName() + n; } return n; }, t.prototype.getNonPrefixedPropertyName = function() { var n = this.getFullPropertyName(); if (n && n.charAt(0) === "-") { var r = n.indexOf("-", 1); if (r !== -1) return n.substring(r + 1); } return n; }, t.prototype.setValue = function(n) { return this.setNode("value", n); }, t.prototype.getValue = function() { return this.value; }, t.prototype.setNestedProperties = function(n) { return this.setNode("nestedProperties", n); }, t.prototype.getNestedProperties = function() { return this.nestedProperties; }, t; }(Si), ld = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.CustomPropertyDeclaration; }, enumerable: !1, configurable: !0 }), t.prototype.setPropertySet = function(n) { return this.setNode("propertySet", n); }, t.prototype.getPropertySet = function() { return this.propertySet; }, t; }(Je), Ci = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Property; }, enumerable: !1, configurable: !0 }), t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n); }, t.prototype.getIdentifier = function() { return this.identifier; }, t.prototype.getName = function() { return rd(this.getText(), /[_\+]+$/); }, t.prototype.isCustomProperty = function() { return !!this.identifier && this.identifier.isCustomProperty; }, t; }(W), cd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Invocation; }, enumerable: !1, configurable: !0 }), t.prototype.getArguments = function() { return this.arguments || (this.arguments = new we(this)), this.arguments; }, t; }(W), yn = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Function; }, enumerable: !1, configurable: !0 }), t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; }, t; }(cd), sr = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.FunctionParameter; }, enumerable: !1, configurable: !0 }), t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; }, t.prototype.setDefaultValue = function(n) { return this.setNode("defaultValue", n, 0); }, t.prototype.getDefaultValue = function() { return this.defaultValue; }, t; }(W), Vt = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.FunctionArgument; }, enumerable: !1, configurable: !0 }), t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; }, t.prototype.setValue = function(n) { return this.setNode("value", n, 0); }, t.prototype.getValue = function() { return this.value; }, t; }(W), hd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.If; }, enumerable: !1, configurable: !0 }), t.prototype.setExpression = function(n) { return this.setNode("expression", n, 0); }, t.prototype.setElseClause = function(n) { return this.setNode("elseClause", n); }, t; }(se), dd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.For; }, enumerable: !1, configurable: !0 }), t.prototype.setVariable = function(n) { return this.setNode("variable", n, 0); }, t; }(se), ud = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Each; }, enumerable: !1, configurable: !0 }), t.prototype.getVariables = function() { return this.variables || (this.variables = new we(this)), this.variables; }, t; }(se), pd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.While; }, enumerable: !1, configurable: !0 }), t; }(se), fd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Else; }, enumerable: !1, configurable: !0 }), t; }(se), qn = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.FunctionDeclaration; }, enumerable: !1, configurable: !0 }), t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; }, t.prototype.getParameters = function() { return this.parameters || (this.parameters = new we(this)), this.parameters; }, t; }(se), md = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.ViewPort; }, enumerable: !1, configurable: !0 }), t; }(se), sl = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.FontFace; }, enumerable: !1, configurable: !0 }), t; }(se), al = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.NestedProperties; }, enumerable: !1, configurable: !0 }), t; }(se), ol = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Keyframe; }, enumerable: !1, configurable: !0 }), t.prototype.setKeyword = function(n) { return this.setNode("keyword", n, 0); }, t.prototype.getKeyword = function() { return this.keyword; }, t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; }, t; }(se), wa = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.KeyframeSelector; }, enumerable: !1, configurable: !0 }), t; }(se), ki = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Import; }, enumerable: !1, configurable: !0 }), t.prototype.setMedialist = function(n) { return n ? (n.attachTo(this), !0) : !1; }, t; }(W), gd = function(e) { T(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Use; }, enumerable: !1, configurable: !0 }), t.prototype.getParameters = function() { return this.parameters || (this.parameters = new we(this)), this.parameters; }, t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t; }(W), bd = function(e) { T(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.ModuleConfiguration; }, enumerable: !1, configurable: !0 }), t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; }, t.prototype.setValue = function(n) { return this.setNode("value", n, 0); }, t.prototype.getValue = function() { return this.value; }, t; }(W), vd = function(e) { T(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Forward; }, enumerable: !1, configurable: !0 }), t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t.prototype.getMembers = function() { return this.members || (this.members = new we(this)), this.members; }, t.prototype.getParameters = function() { return this.parameters || (this.parameters = new we(this)), this.parameters; }, t; }(W), yd = function(e) { T(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.ForwardVisibility; }, enumerable: !1, configurable: !0 }), t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t; }(W), wd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Namespace; }, enumerable: !1, configurable: !0 }), t; }(W), ll = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Media; }, enumerable: !1, configurable: !0 }), t; }(se), Xr = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Supports; }, enumerable: !1, configurable: !0 }), t; }(se), xd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Document; }, enumerable: !1, configurable: !0 }), t; }(se), cl = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return t.prototype.getMediums = function() { return this.mediums || (this.mediums = new we(this)), this.mediums; }, t; }(W), hl = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.MediaQuery; }, enumerable: !1, configurable: !0 }), t; }(W), Sd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.MediaCondition; }, enumerable: !1, configurable: !0 }), t; }(W), Cd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.MediaFeature; }, enumerable: !1, configurable: !0 }), t; }(W), rn = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.SupportsCondition; }, enumerable: !1, configurable: !0 }), t; }(W), kd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Page; }, enumerable: !1, configurable: !0 }), t; }(se), _d = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.PageBoxMarginBox; }, enumerable: !1, configurable: !0 }), t; }(se), dl = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Expression; }, enumerable: !1, configurable: !0 }), t; }(W), _i = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.BinaryExpression; }, enumerable: !1, configurable: !0 }), t.prototype.setLeft = function(n) { return this.setNode("left", n); }, t.prototype.getLeft = function() { return this.left; }, t.prototype.setRight = function(n) { return this.setNode("right", n); }, t.prototype.getRight = function() { return this.right; }, t.prototype.setOperator = function(n) { return this.setNode("operator", n); }, t.prototype.getOperator = function() { return this.operator; }, t; }(W), Fd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Term; }, enumerable: !1, configurable: !0 }), t.prototype.setOperator = function(n) { return this.setNode("operator", n); }, t.prototype.getOperator = function() { return this.operator; }, t.prototype.setExpression = function(n) { return this.setNode("expression", n); }, t.prototype.getExpression = function() { return this.expression; }, t; }(W), Rd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.AttributeSelector; }, enumerable: !1, configurable: !0 }), t.prototype.setNamespacePrefix = function(n) { return this.setNode("namespacePrefix", n); }, t.prototype.getNamespacePrefix = function() { return this.namespacePrefix; }, t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n); }, t.prototype.getIdentifier = function() { return this.identifier; }, t.prototype.setOperator = function(n) { return this.setNode("operator", n); }, t.prototype.getOperator = function() { return this.operator; }, t.prototype.setValue = function(n) { return this.setNode("value", n); }, t.prototype.getValue = function() { return this.value; }, t; }(W); (function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Operator; }, enumerable: !1, configurable: !0 }), t; })(W); var Fi = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.HexColorValue; }, enumerable: !1, configurable: !0 }), t; }(W), Ed = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.RatioValue; }, enumerable: !1, configurable: !0 }), t; }(W), Dd = ".".charCodeAt(0), Ad = "0".charCodeAt(0), zd = "9".charCodeAt(0), Ri = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.NumericValue; }, enumerable: !1, configurable: !0 }), t.prototype.getValue = function() { for (var n = this.getText(), r = 0, i, s = 0, a = n.length; s < a && (i = n.charCodeAt(s), Ad <= i && i <= zd || i === Dd); s++) r += 1; return { value: n.substring(0, r), unit: r < n.length ? n.substring(r) : void 0 }; }, t; }(W), ar = function(e) { T(t, e); function t(n, r) { var i = e.call(this, n, r) || this; return i.variable = null, i.value = null, i.needsSemicolon = !0, i; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.VariableDeclaration; }, enumerable: !1, configurable: !0 }), t.prototype.setVariable = function(n) { return n ? (n.attachTo(this), this.variable = n, !0) : !1; }, t.prototype.getVariable = function() { return this.variable; }, t.prototype.getName = function() { return this.variable ? this.variable.getName() : ""; }, t.prototype.setValue = function(n) { return n ? (n.attachTo(this), this.value = n, !0) : !1; }, t.prototype.getValue = function() { return this.value; }, t; }(Si), Yr = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Interpolation; }, enumerable: !1, configurable: !0 }), t; }(W), Ei = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.VariableName; }, enumerable: !1, configurable: !0 }), t.prototype.getName = function() { return this.getText(); }, t; }(W), on = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.ExtendsReference; }, enumerable: !1, configurable: !0 }), t.prototype.getSelectors = function() { return this.selectors || (this.selectors = new we(this)), this.selectors; }, t; }(W), Md = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.MixinContentReference; }, enumerable: !1, configurable: !0 }), t.prototype.getArguments = function() { return this.arguments || (this.arguments = new we(this)), this.arguments; }, t; }(W), Nd = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.MixinContentReference; }, enumerable: !1, configurable: !0 }), t.prototype.getParameters = function() { return this.parameters || (this.parameters = new we(this)), this.parameters; }, t; }(se), $n = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.MixinReference; }, enumerable: !1, configurable: !0 }), t.prototype.getNamespaces = function() { return this.namespaces || (this.namespaces = new we(this)), this.namespaces; }, t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; }, t.prototype.getArguments = function() { return this.arguments || (this.arguments = new we(this)), this.arguments; }, t.prototype.setContent = function(n) { return this.setNode("content", n); }, t.prototype.getContent = function() { return this.content; }, t; }(W), ln = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.MixinDeclaration; }, enumerable: !1, configurable: !0 }), t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; }, t.prototype.getParameters = function() { return this.parameters || (this.parameters = new we(this)), this.parameters; }, t.prototype.setGuard = function(n) { return n && (n.attachTo(this), this.guard = n), !1; }, t; }(se), ul = function(e) { T(t, e); function t(n, r) { return e.call(this, n, r) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.UnknownAtRule; }, enumerable: !1, configurable: !0 }), t.prototype.setAtRuleName = function(n) { this.atRuleName = n; }, t.prototype.getAtRuleName = function() { return this.atRuleName; }, t; }(se), Pd = function(e) { T(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.ListEntry; }, enumerable: !1, configurable: !0 }), t.prototype.setKey = function(n) { return this.setNode("key", n, 0); }, t.prototype.setValue = function(n) { return this.setNode("value", n, 1); }, t; }(W), Id = function(e) { T(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return t.prototype.getConditions = function() { return this.conditions || (this.conditions = new we(this)), this.conditions; }, t; }(W), Ld = function(e) { T(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return t.prototype.setVariable = function(n) { return this.setNode("variable", n); }, t; }(W), xa = function(e) { T(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return Object.defineProperty(t.prototype, "type", { get: function() { return g.Module; }, enumerable: !1, configurable: !0 }), t.prototype.setIdentifier = function(n) { return this.setNode("identifier", n, 0); }, t.prototype.getIdentifier = function() { return this.identifier; }, t; }(W), ze; (function(e) { e[e.Ignore = 1] = "Ignore", e[e.Warning = 2] = "Warning", e[e.Error = 4] = "Error"; })(ze || (ze = {})); var pl = function() { function e(t, n, r, i, s, a) { s === void 0 && (s = t.offset), a === void 0 && (a = t.length), this.node = t, this.rule = n, this.level = r, this.message = i || n.message, this.offset = s, this.length = a; } return e.prototype.getRule = function() { return this.rule; }, e.prototype.getLevel = function() { return this.level; }, e.prototype.getOffset = function() { return this.offset; }, e.prototype.getLength = function() { return this.length; }, e.prototype.getNode = function() { return this.node; }, e.prototype.getMessage = function() { return this.message; }, e; }(), Td = function() { function e() { this.entries = []; } return e.entries = function(t) { var n = new e(); return t.acceptVisitor(n), n.entries; }, e.prototype.visitNode = function(t) { return t.isErroneous() && t.collectIssues(this.entries), !0; }, e; }(); function Wd(e, t) { let n; return t.length === 0 ? n = e : n = e.replace(/\{(\d+)\}/g, (r, i) => { let s = i[0]; return typeof t[s] < "u" ? t[s] : r; }), n; } function Od(e, t, ...n) { return Wd(t, n); } function Be(e) { return Od; } var K = Be(), Q = function() { function e(t, n) { this.id = t, this.message = n; } return e; }(), x = { NumberExpected: new Q("css-numberexpected", K("expected.number", "number expected")), ConditionExpected: new Q("css-conditionexpected", K("expected.condt", "condition expected")), RuleOrSelectorExpected: new Q("css-ruleorselectorexpected", K("expected.ruleorselector", "at-rule or selector expected")), DotExpected: new Q("css-dotexpected", K("expected.dot", "dot expected")), ColonExpected: new Q("css-colonexpected", K("expected.colon", "colon expected")), SemiColonExpected: new Q("css-semicolonexpected", K("expected.semicolon", "semi-colon expected")), TermExpected: new Q("css-termexpected", K("expected.term", "term expected")), ExpressionExpected: new Q("css-expressionexpected", K("expected.expression", "expression expected")), OperatorExpected: new Q("css-operatorexpected", K("expected.operator", "operator expected")), IdentifierExpected: new Q("css-identifierexpected", K("expected.ident", "identifier expected")), PercentageExpected: new Q("css-percentageexpected", K("expected.percentage", "percentage expected")), URIOrStringExpected: new Q("css-uriorstringexpected", K("expected.uriorstring", "uri or string expected")), URIExpected: new Q("css-uriexpected", K("expected.uri", "URI expected")), VariableNameExpected: new Q("css-varnameexpected", K("expected.varname", "variable name expected")), VariableValueExpected: new Q("css-varvalueexpected", K("expected.varvalue", "variable value expected")), PropertyValueExpected: new Q("css-propertyvalueexpected", K("expected.propvalue", "property value expected")), LeftCurlyExpected: new Q("css-lcurlyexpected", K("expected.lcurly", "{ expected")), RightCurlyExpected: new Q("css-rcurlyexpected", K("expected.rcurly", "} expected")), LeftSquareBracketExpected: new Q("css-rbracketexpected", K("expected.lsquare", "[ expected")), RightSquareBracketExpected: new Q("css-lbracketexpected", K("expected.rsquare", "] expected")), LeftParenthesisExpected: new Q("css-lparentexpected", K("expected.lparen", "( expected")), RightParenthesisExpected: new Q("css-rparentexpected", K("expected.rparent", ") expected")), CommaExpected: new Q("css-commaexpected", K("expected.comma", "comma expected")), PageDirectiveOrDeclarationExpected: new Q("css-pagedirordeclexpected", K("expected.pagedirordecl", "page directive or declaraton expected")), UnknownAtRule: new Q("css-unknownatrule", K("unknown.atrule", "at-rule unknown")), UnknownKeyword: new Q("css-unknownkeyword", K("unknown.keyword", "unknown keyword")), SelectorExpected: new Q("css-selectorexpected", K("expected.selector", "selector expected")), StringLiteralExpected: new Q("css-stringliteralexpected", K("expected.stringliteral", "string literal expected")), WhitespaceExpected: new Q("css-whitespaceexpected", K("expected.whitespace", "whitespace expected")), MediaQueryExpected: new Q("css-mediaqueryexpected", K("expected.mediaquery", "media query expected")), IdentifierOrWildcardExpected: new Q("css-idorwildcardexpected", K("expected.idorwildcard", "identifier or wildcard expected")), WildcardExpected: new Q("css-wildcardexpected", K("expected.wildcard", "wildcard expected")), IdentifierOrVariableExpected: new Q("css-idorvarexpected", K("expected.idorvar", "identifier or variable expected")) }, Sa; (function(e) { e.MIN_VALUE = -2147483648, e.MAX_VALUE = 2147483647; })(Sa || (Sa = {})); var Hn; (function(e) { e.MIN_VALUE = 0, e.MAX_VALUE = 2147483647; })(Hn || (Hn = {})); var Ce; (function(e) { function t(r, i) { return r === Number.MAX_VALUE && (r = Hn.MAX_VALUE), i === Number.MAX_VALUE && (i = Hn.MAX_VALUE), { line: r, character: i }; } e.create = t; function n(r) { var i = r; return _.objectLiteral(i) && _.uinteger(i.line) && _.uinteger(i.character); } e.is = n; })(Ce || (Ce = {})); var ee; (function(e) { function t(r, i, s, a) { if (_.uinteger(r) && _.uinteger(i) && _.uinteger(s) && _.uinteger(a)) return { start: Ce.create(r, i), end: Ce.create(s, a) }; if (Ce.is(r) && Ce.is(i)) return { start: r, end: i }; throw new Error("Range#create called with invalid arguments[" + r + ", " + i + ", " + s + ", " + a + "]"); } e.create = t; function n(r) { var i = r; return _.objectLiteral(i) && Ce.is(i.start) && Ce.is(i.end); } e.is = n; })(ee || (ee = {})); var cn; (function(e) { function t(r, i) { return { uri: r, range: i }; } e.create = t; function n(r) { var i = r; return _.defined(i) && ee.is(i.range) && (_.string(i.uri) || _.undefined(i.uri)); } e.is = n; })(cn || (cn = {})); var Ca; (function(e) { function t(r, i, s, a) { return { targetUri: r, targetRange: i, targetSelectionRange: s, originSelectionRange: a }; } e.create = t; function n(r) { var i = r; return _.defined(i) && ee.is(i.targetRange) && _.string(i.targetUri) && (ee.is(i.targetSelectionRange) || _.undefined(i.targetSelectionRange)) && (ee.is(i.originSelectionRange) || _.undefined(i.originSelectionRange)); } e.is = n; })(Ca || (Ca = {})); var Kr; (function(e) { function t(r, i, s, a) { return { red: r, green: i, blue: s, alpha: a }; } e.create = t; function n(r) { var i = r; return _.numberRange(i.red, 0, 1) && _.numberRange(i.green, 0, 1) && _.numberRange(i.blue, 0, 1) && _.numberRange(i.alpha, 0, 1); } e.is = n; })(Kr || (Kr = {})); var ka; (function(e) { function t(r, i) { return { range: r, color: i }; } e.create = t; function n(r) { var i = r; return ee.is(i.range) && Kr.is(i.color); } e.is = n; })(ka || (ka = {})); var _a; (function(e) { function t(r, i, s) { return { label: r, textEdit: i, additionalTextEdits: s }; } e.create = t; function n(r) { var i = r; return _.string(i.label) && (_.undefined(i.textEdit) || $.is(i)) && (_.undefined(i.additionalTextEdits) || _.typedArray(i.additionalTextEdits, $.is)); } e.is = n; })(_a || (_a = {})); var Fa; (function(e) { e.Comment = "comment", e.Imports = "imports", e.Region = "region"; })(Fa || (Fa = {})); var Ra; (function(e) { function t(r, i, s, a, o) { var l = { startLine: r, endLine: i }; return _.defined(s) && (l.startCharacter = s), _.defined(a) && (l.endCharacter = a), _.defined(o) && (l.kind = o), l; } e.create = t; function n(r) { var i = r; return _.uinteger(i.startLine) && _.uinteger(i.startLine) && (_.undefined(i.startCharacter) || _.uinteger(i.startCharacter)) && (_.undefined(i.endCharacter) || _.uinteger(i.endCharacter)) && (_.undefined(i.kind) || _.string(i.kind)); } e.is = n; })(Ra || (Ra = {})); var Qr; (function(e) { function t(r, i) { return { location: r, message: i }; } e.create = t; function n(r) { var i = r; return _.defined(i) && cn.is(i.location) && _.string(i.message); } e.is = n; })(Qr || (Qr = {})); var Gn; (function(e) { e.Error = 1, e.Warning = 2, e.Information = 3, e.Hint = 4; })(Gn || (Gn = {})); var Ea; (function(e) { e.Unnecessary = 1, e.Deprecated = 2; })(Ea || (Ea = {})); var Da; (function(e) { function t(n) { var r = n; return r != null && _.string(r.href); } e.is = t; })(Da || (Da = {})); var Jn; (function(e) { function t(r, i, s, a, o, l) { var c = { range: r, message: i }; return _.defined(s) && (c.severity = s), _.defined(a) && (c.code = a), _.defined(o) && (c.source = o), _.defined(l) && (c.relatedInformation = l), c; } e.create = t; function n(r) { var i, s = r; return _.defined(s) && ee.is(s.range) && _.string(s.message) && (_.number(s.severity) || _.undefined(s.severity)) && (_.integer(s.code) || _.string(s.code) || _.undefined(s.code)) && (_.undefined(s.codeDescription) || _.string((i = s.codeDescription) === null || i === void 0 ? void 0 : i.href)) && (_.string(s.source) || _.undefined(s.source)) && (_.undefined(s.relatedInformation) || _.typedArray(s.relatedInformation, Qr.is)); } e.is = n; })(Jn || (Jn = {})); var Bt; (function(e) { function t(r, i) { for (var s = [], a = 2; a < arguments.length; a++) s[a - 2] = arguments[a]; var o = { title: r, command: i }; return _.defined(s) && s.length > 0 && (o.arguments = s), o; } e.create = t; function n(r) { var i = r; return _.defined(i) && _.string(i.title) && _.string(i.command); } e.is = n; })(Bt || (Bt = {})); var $; (function(e) { function t(s, a) { return { range: s, newText: a }; } e.replace = t; function n(s, a) { return { range: { start: s, end: s }, newText: a }; } e.insert = n; function r(s) { return { range: s, newText: "" }; } e.del = r; function i(s) { var a = s; return _.objectLiteral(a) && _.string(a.newText) && ee.is(a.range); } e.is = i; })($ || ($ = {})); var Wt; (function(e) { function t(r, i, s) { var a = { label: r }; return i !== void 0 && (a.needsConfirmation = i), s !== void 0 && (a.description = s), a; } e.create = t; function n(r) { var i = r; return i !== void 0 && _.objectLiteral(i) && _.string(i.label) && (_.boolean(i.needsConfirmation) || i.needsConfirmation === void 0) && (_.string(i.description) || i.description === void 0); } e.is = n; })(Wt || (Wt = {})); var Se; (function(e) { function t(n) { var r = n; return typeof r == "string"; } e.is = t; })(Se || (Se = {})); var ct; (function(e) { function t(s, a, o) { return { range: s, newText: a, annotationId: o }; } e.replace = t; function n(s, a, o) { return { range: { start: s, end: s }, newText: a, annotationId: o }; } e.insert = n; function r(s, a) { return { range: s, newText: "", annotationId: a }; } e.del = r; function i(s) { var a = s; return $.is(a) && (Wt.is(a.annotationId) || Se.is(a.annotationId)); } e.is = i; })(ct || (ct = {})); var hn; (function(e) { function t(r, i) { return { textDocument: r, edits: i }; } e.create = t; function n(r) { var i = r; return _.defined(i) && Xn.is(i.textDocument) && Array.isArray(i.edits); } e.is = n; })(hn || (hn = {})); var dn; (function(e) { function t(r, i, s) { var a = { kind: "create", uri: r }; return i !== void 0 && (i.overwrite !== void 0 || i.ignoreIfExists !== void 0) && (a.options = i), s !== void 0 && (a.annotationId = s), a; } e.create = t; function n(r) { var i = r; return i && i.kind === "create" && _.string(i.uri) && (i.options === void 0 || (i.options.overwrite === void 0 || _.boolean(i.options.overwrite)) && (i.options.ignoreIfExists === void 0 || _.boolean(i.options.ignoreIfExists))) && (i.annotationId === void 0 || Se.is(i.annotationId)); } e.is = n; })(dn || (dn = {})); var un; (function(e) { function t(r, i, s, a) { var o = { kind: "rename", oldUri: r, newUri: i }; return s !== void 0 && (s.overwrite !== void 0 || s.ignoreIfExists !== void 0) && (o.options = s), a !== void 0 && (o.annotationId = a), o; } e.create = t; function n(r) { var i = r; return i && i.kind === "rename" && _.string(i.oldUri) && _.string(i.newUri) && (i.options === void 0 || (i.options.overwrite === void 0 || _.boolean(i.options.overwrite)) && (i.options.ignoreIfExists === void 0 || _.boolean(i.options.ignoreIfExists))) && (i.annotationId === void 0 || Se.is(i.annotationId)); } e.is = n; })(un || (un = {})); var pn; (function(e) { function t(r, i, s) { var a = { kind: "delete", uri: r }; return i !== void 0 && (i.recursive !== void 0 || i.ignoreIfNotExists !== void 0) && (a.options = i), s !== void 0 && (a.annotationId = s), a; } e.create = t; function n(r) { var i = r; return i && i.kind === "delete" && _.string(i.uri) && (i.options === void 0 || (i.options.recursive === void 0 || _.boolean(i.options.recursive)) && (i.options.ignoreIfNotExists === void 0 || _.boolean(i.options.ignoreIfNotExists))) && (i.annotationId === void 0 || Se.is(i.annotationId)); } e.is = n; })(pn || (pn = {})); var Zr; (function(e) { function t(n) { var r = n; return r && (r.changes !== void 0 || r.documentChanges !== void 0) && (r.documentChanges === void 0 || r.documentChanges.every(function(i) { return _.string(i.kind) ? dn.is(i) || un.is(i) || pn.is(i) : hn.is(i); })); } e.is = t; })(Zr || (Zr = {})); var kn = function() { function e(t, n) { this.edits = t, this.changeAnnotations = n; } return e.prototype.insert = function(t, n, r) { var i, s; if (r === void 0 ? i = $.insert(t, n) : Se.is(r) ? (s = r, i = ct.insert(t, n, r)) : (this.assertChangeAnnotations(this.changeAnnotations), s = this.changeAnnotations.manage(r), i = ct.insert(t, n, s)), this.edits.push(i), s !== void 0) return s; }, e.prototype.replace = function(t, n, r) { var i, s; if (r === void 0 ? i = $.replace(t, n) : Se.is(r) ? (s = r, i = ct.replace(t, n, r)) : (this.assertChangeAnnotations(this.changeAnnotations), s = this.changeAnnotations.manage(r), i = ct.replace(t, n, s)), this.edits.push(i), s !== void 0) return s; }, e.prototype.delete = function(t, n) { var r, i; if (n === void 0 ? r = $.del(t) : Se.is(n) ? (i = n, r = ct.del(t, n)) : (this.assertChangeAnnotations(this.changeAnnotations), i = this.changeAnnotations.manage(n), r = ct.del(t, i)), this.edits.push(r), i !== void 0) return i; }, e.prototype.add = function(t) { this.edits.push(t); }, e.prototype.all = function() { return this.edits; }, e.prototype.clear = function() { this.edits.splice(0, this.edits.length); }, e.prototype.assertChangeAnnotations = function(t) { if (t === void 0) throw new Error("Text edit change is not configured to manage change annotations."); }, e; }(), Aa = function() { function e(t) { this._annotations = t === void 0 ? /* @__PURE__ */ Object.create(null) : t, this._counter = 0, this._size = 0; } return e.prototype.all = function() { return this._annotations; }, Object.defineProperty(e.prototype, "size", { get: function() { return this._size; }, enumerable: !1, configurable: !0 }), e.prototype.manage = function(t, n) { var r; if (Se.is(t) ? r = t : (r = this.nextId(), n = t), 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; }, e.prototype.nextId = function() { return this._counter++, this._counter.toString(); }, e; }(); (function() { function e(t) { var n = this; this._textEditChanges = /* @__PURE__ */ Object.create(null), t !== void 0 ? (this._workspaceEdit = t, t.documentChanges ? (this._changeAnnotations = new Aa(t.changeAnnotations), t.changeAnnotations = this._changeAnnotations.all(), t.documentChanges.forEach(function(r) { if (hn.is(r)) { var i = new kn(r.edits, n._changeAnnotations); n._textEditChanges[r.textDocument.uri] = i; } })) : t.changes && Object.keys(t.changes).forEach(function(r) { var i = new kn(t.changes[r]); n._textEditChanges[r] = i; })) : this._workspaceEdit = {}; } return Object.defineProperty(e.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 }), e.prototype.getTextEditChange = function(t) { if (Xn.is(t)) { if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0) throw new Error("Workspace edit is not configured for document changes."); var n = { uri: t.uri, version: t.version }, r = this._textEditChanges[n.uri]; if (!r) { var i = [], s = { textDocument: n, edits: i }; this._workspaceEdit.documentChanges.push(s), r = new kn(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[t]; if (!r) { var i = []; this._workspaceEdit.changes[t] = i, r = new kn(i), this._textEditChanges[t] = r; } return r; } }, e.prototype.initDocumentChanges = function() { this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._changeAnnotations = new Aa(), this._workspaceEdit.documentChanges = [], this._workspaceEdit.changeAnnotations = this._changeAnnotations.all()); }, e.prototype.initChanges = function() { this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null)); }, e.prototype.createFile = function(t, n, r) { if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0) throw new Error("Workspace edit is not configured for document changes."); var i; Wt.is(n) || Se.is(n) ? i = n : r = n; var s, a; if (i === void 0 ? s = dn.create(t, r) : (a = Se.is(i) ? i : this._changeAnnotations.manage(i), s = dn.create(t, r, a)), this._workspaceEdit.documentChanges.push(s), a !== void 0) return a; }, e.prototype.renameFile = function(t, n, r, i) { if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0) throw new Error("Workspace edit is not configured for document changes."); var s; Wt.is(r) || Se.is(r) ? s = r : i = r; var a, o; if (s === void 0 ? a = un.create(t, n, i) : (o = Se.is(s) ? s : this._changeAnnotations.manage(s), a = un.create(t, n, i, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0) return o; }, e.prototype.deleteFile = function(t, n, r) { if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0) throw new Error("Workspace edit is not configured for document changes."); var i; Wt.is(n) || Se.is(n) ? i = n : r = n; var s, a; if (i === void 0 ? s = pn.create(t, r) : (a = Se.is(i) ? i : this._changeAnnotations.manage(i), s = pn.create(t, r, a)), this._workspaceEdit.documentChanges.push(s), a !== void 0) return a; }, e; })(); var za; (function(e) { function t(r) { return { uri: r }; } e.create = t; function n(r) { var i = r; return _.defined(i) && _.string(i.uri); } e.is = n; })(za || (za = {})); var ei; (function(e) { function t(r, i) { return { uri: r, version: i }; } e.create = t; function n(r) { var i = r; return _.defined(i) && _.string(i.uri) && _.integer(i.version); } e.is = n; })(ei || (ei = {})); var Xn; (function(e) { function t(r, i) { return { uri: r, version: i }; } e.create = t; function n(r) { var i = r; return _.defined(i) && _.string(i.uri) && (i.version === null || _.integer(i.version)); } e.is = n; })(Xn || (Xn = {})); var Ma; (function(e) { function t(r, i, s, a) { return { uri: r, languageId: i, version: s, text: a }; } e.create = t; function n(r) { var i = r; return _.defined(i) && _.string(i.uri) && _.string(i.languageId) && _.integer(i.version) && _.string(i.text); } e.is = n; })(Ma || (Ma = {})); var Ie; (function(e) { e.PlainText = "plaintext", e.Markdown = "markdown"; })(Ie || (Ie = {})); (function(e) { function t(n) { var r = n; return r === e.PlainText || r === e.Markdown; } e.is = t; })(Ie || (Ie = {})); var ti; (function(e) { function t(n) { var r = n; return _.objectLiteral(n) && Ie.is(r.kind) && _.string(r.value); } e.is = t; })(ti || (ti = {})); var j; (function(e) { e.Text = 1, e.Method = 2, e.Function = 3, e.Constructor = 4, e.Field = 5, e.Variable = 6, e.Class = 7, e.Interface = 8, e.Module = 9, e.Property = 10, e.Unit = 11, e.Value = 12, e.Enum = 13, e.Keyword = 14, e.Snippet = 15, e.Color = 16, e.File = 17, e.Reference = 18, e.Folder = 19, e.EnumMember = 20, e.Constant = 21, e.Struct = 22, e.Event = 23, e.Operator = 24, e.TypeParameter = 25; })(j || (j = {})); var Ae; (function(e) { e.PlainText = 1, e.Snippet = 2; })(Ae || (Ae = {})); var wt; (function(e) { e.Deprecated = 1; })(wt || (wt = {})); var Na; (function(e) { function t(r, i, s) { return { newText: r, insert: i, replace: s }; } e.create = t; function n(r) { var i = r; return i && _.string(i.newText) && ee.is(i.insert) && ee.is(i.replace); } e.is = n; })(Na || (Na = {})); var Pa; (function(e) { e.asIs = 1, e.adjustIndentation = 2; })(Pa || (Pa = {})); var Ia; (function(e) { function t(n) { return { label: n }; } e.create = t; })(Ia || (Ia = {})); var La; (function(e) { function t(n, r) { return { items: n || [], isIncomplete: !!r }; } e.create = t; })(La || (La = {})); var Yn; (function(e) { function t(r) { return r.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); } e.fromPlainText = t; function n(r) { var i = r; return _.string(i) || _.objectLiteral(i) && _.string(i.language) && _.string(i.value); } e.is = n; })(Yn || (Yn = {})); var Ta; (function(e) { function t(n) { var r = n; return !!r && _.objectLiteral(r) && (ti.is(r.contents) || Yn.is(r.contents) || _.typedArray(r.contents, Yn.is)) && (n.range === void 0 || ee.is(n.range)); } e.is = t; })(Ta || (Ta = {})); var Wa; (function(e) { function t(n, r) { return r ? { label: n, documentation: r } : { label: n }; } e.create = t; })(Wa || (Wa = {})); var Oa; (function(e) { function t(n, r) { for (var i = [], s = 2; s < arguments.length; s++) i[s - 2] = arguments[s]; var a = { label: n }; return _.defined(r) && (a.documentation = r), _.defined(i) ? a.parameters = i : a.parameters = [], a; } e.create = t; })(Oa || (Oa = {})); var Pt; (function(e) { e.Text = 1, e.Read = 2, e.Write = 3; })(Pt || (Pt = {})); var Ua; (function(e) { function t(n, r) { var i = { range: n }; return _.number(r) && (i.kind = r), i; } e.create = t; })(Ua || (Ua = {})); var xt; (function(e) { e.File = 1, e.Module = 2, e.Namespace = 3, e.Package = 4, e.Class = 5, e.Method = 6, e.Property = 7, e.Field = 8, e.Constructor = 9, e.Enum = 10, e.Interface = 11, e.Function = 12, e.Variable = 13, e.Constant = 14, e.String = 15, e.Number = 16, e.Boolean = 17, e.Array = 18, e.Object = 19, e.Key = 20, e.Null = 21, e.EnumMember = 22, e.Struct = 23, e.Event = 24, e.Operator = 25, e.TypeParameter = 26; })(xt || (xt = {})); var Va; (function(e) { e.Deprecated = 1; })(Va || (Va = {})); var Ba; (function(e) { function t(n, r, i, s, a) { var o = { name: n, kind: r, location: { uri: s, range: i } }; return a && (o.containerName = a), o; } e.create = t; })(Ba || (Ba = {})); var ja; (function(e) { function t(r, i, s, a, o, l) { var c = { name: r, detail: i, kind: s, range: a, selectionRange: o }; return l !== void 0 && (c.children = l), c; } e.create = t; function n(r) { var i = r; return i && _.string(i.name) && _.number(i.kind) && ee.is(i.range) && ee.is(i.selectionRange) && (i.detail === void 0 || _.string(i.detail)) && (i.deprecated === void 0 || _.boolean(i.deprecated)) && (i.children === void 0 || Array.isArray(i.children)) && (i.tags === void 0 || Array.isArray(i.tags)); } e.is = n; })(ja || (ja = {})); var ni; (function(e) { e.Empty = "", e.QuickFix = "quickfix", e.Refactor = "refactor", e.RefactorExtract = "refactor.extract", e.RefactorInline = "refactor.inline", e.RefactorRewrite = "refactor.rewrite", e.Source = "source", e.SourceOrganizeImports = "source.organizeImports", e.SourceFixAll = "source.fixAll"; })(ni || (ni = {})); var qa; (function(e) { function t(r, i) { var s = { diagnostics: r }; return i != null && (s.only = i), s; } e.create = t; function n(r) { var i = r; return _.defined(i) && _.typedArray(i.diagnostics, Jn.is) && (i.only === void 0 || _.typedArray(i.only, _.string)); } e.is = n; })(qa || (qa = {})); var ri; (function(e) { function t(r, i, s) { var a = { title: r }, o = !0; return typeof i == "string" ? (o = !1, a.kind = i) : Bt.is(i) ? a.command = i : a.edit = i, o && s !== void 0 && (a.kind = s), a; } e.create = t; function n(r) { var i = r; return i && _.string(i.title) && (i.diagnostics === void 0 || _.typedArray(i.diagnostics, Jn.is)) && (i.kind === void 0 || _.string(i.kind)) && (i.edit !== void 0 || i.command !== void 0) && (i.command === void 0 || Bt.is(i.command)) && (i.isPreferred === void 0 || _.boolean(i.isPreferred)) && (i.edit === void 0 || Zr.is(i.edit)); } e.is = n; })(ri || (ri = {})); var $a; (function(e) { function t(r, i) { var s = { range: r }; return _.defined(i) && (s.data = i), s; } e.create = t; function n(r) { var i = r; return _.defined(i) && ee.is(i.range) && (_.undefined(i.command) || Bt.is(i.command)); } e.is = n; })($a || ($a = {})); var Ha; (function(e) { function t(r, i) { return { tabSize: r, insertSpaces: i }; } e.create = t; function n(r) { var i = r; return _.defined(i) && _.uinteger(i.tabSize) && _.boolean(i.insertSpaces); } e.is = n; })(Ha || (Ha = {})); var Ga; (function(e) { function t(r, i, s) { return { range: r, target: i, data: s }; } e.create = t; function n(r) { var i = r; return _.defined(i) && ee.is(i.range) && (_.undefined(i.target) || _.string(i.target)); } e.is = n; })(Ga || (Ga = {})); var Kn; (function(e) { function t(r, i) { return { range: r, parent: i }; } e.create = t; function n(r) { var i = r; return i !== void 0 && ee.is(i.range) && (i.parent === void 0 || e.is(i.parent)); } e.is = n; })(Kn || (Kn = {})); var Ja; (function(e) { function t(s, a, o, l) { return new Ud(s, a, o, l); } e.create = t; function n(s) { var a = s; return !!(_.defined(a) && _.string(a.uri) && (_.undefined(a.languageId) || _.string(a.languageId)) && _.uinteger(a.lineCount) && _.func(a.getText) && _.func(a.positionAt) && _.func(a.offsetAt)); } e.is = n; function r(s, a) { for (var o = s.getText(), l = i(a, function(b, v) { var y = b.range.start.line - v.range.start.line; return y === 0 ? b.range.start.character - v.range.start.character : y; }), c = o.length, h = l.length - 1; h >= 0; h--) { var u = l[h], f = s.offsetAt(u.range.start), m = s.offsetAt(u.range.end); if (m <= c) o = o.substring(0, f) + u.newText + o.substring(m, o.length); else throw new Error("Overlapping edit"); c = f; } return o; } e.applyEdits = r; function i(s, a) { if (s.length <= 1) return s; var o = s.length / 2 | 0, l = s.slice(0, o), c = s.slice(o); i(l, a), i(c, a); for (var h = 0, u = 0, f = 0; h < l.length && u < c.length; ) { var m = a(l[h], c[u]); m <= 0 ? s[f++] = l[h++] : s[f++] = c[u++]; } for (; h < l.length; ) s[f++] = l[h++]; for (; u < c.length; ) s[f++] = c[u++]; return s; } })(Ja || (Ja = {})); var Ud = function() { function e(t, n, r, i) { this._uri = t, this._languageId = n, this._version = r, this._content = i, this._lineOffsets = void 0; } return Object.defineProperty(e.prototype, "uri", { get: function() { return this._uri; }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "languageId", { get: function() { return this._languageId; }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "version", { get: function() { return this._version; }, enumerable: !1, configurable: !0 }), e.prototype.getText = function(t) { if (t) { var n = this.offsetAt(t.start), r = this.offsetAt(t.end); return this._content.substring(n, r); } return this._content; }, e.prototype.update = function(t, n) { this._content = t.text, this._version = n, this._lineOffsets = void 0; }, e.prototype.getLineOffsets = function() { if (this._lineOffsets === void 0) { for (var t = [], n = this._content, r = !0, i = 0; i < n.length; i++) { r && (t.push(i), r = !1); var s = n.charAt(i); r = s === "\r" || s === ` `, s === "\r" && i + 1 < n.length && n.charAt(i + 1) === ` ` && i++; } r && n.length > 0 && t.push(n.length), this._lineOffsets = t; } return this._lineOffsets; }, e.prototype.positionAt = function(t) { t = Math.max(Math.min(t, this._content.length), 0); var n = this.getLineOffsets(), r = 0, i = n.length; if (i === 0) return Ce.create(0, t); for (; r < i; ) { var s = Math.floor((r + i) / 2); n[s] > t ? i = s : r = s + 1; } var a = r - 1; return Ce.create(a, t - n[a]); }, e.prototype.offsetAt = function(t) { var n = this.getLineOffsets(); if (t.line >= n.length) return this._content.length; if (t.line < 0) return 0; var r = n[t.line], i = t.line + 1 < n.length ? n[t.line + 1] : this._content.length; return Math.max(Math.min(r + t.character, i), r); }, Object.defineProperty(e.prototype, "lineCount", { get: function() { return this.getLineOffsets().length; }, enumerable: !1, configurable: !0 }), e; }(), _; (function(e) { var t = Object.prototype.toString; function n(m) { return typeof m < "u"; } e.defined = n; function r(m) { return typeof m > "u"; } e.undefined = r; function i(m) { return m === !0 || m === !1; } e.boolean = i; function s(m) { return t.call(m) === "[object String]"; } e.string = s; function a(m) { return t.call(m) === "[object Number]"; } e.number = a; function o(m, b, v) { return t.call(m) === "[object Number]" && b <= m && m <= v; } e.numberRange = o; function l(m) { return t.call(m) === "[object Number]" && -2147483648 <= m && m <= 2147483647; } e.integer = l; function c(m) { return t.call(m) === "[object Number]" && 0 <= m && m <= 2147483647; } e.uinteger = c; function h(m) { return t.call(m) === "[object Function]"; } e.func = h; function u(m) { return m !== null && typeof m == "object"; } e.objectLiteral = u; function f(m, b) { return Array.isArray(m) && m.every(b); } e.typedArray = f; })(_ || (_ = {})); var Qn = class { constructor(e, t, n, r) { this._uri = e, this._languageId = t, this._version = n, this._content = r, this._lineOffsets = void 0; } get uri() { return this._uri; } get languageId() { return this._languageId; } get version() { return this._version; } getText(e) { if (e) { const t = this.offsetAt(e.start), n = this.offsetAt(e.end); return this._content.substring(t, n); } return this._content; } update(e, t) { for (let n of e) if (Qn.isIncremental(n)) { const r = fl(n.range), i = this.offsetAt(r.start), s = this.offsetAt(r.end); this._content = this._content.substring(0, i) + n.text + this._content.substring(s, this._content.length); const a = Math.max(r.start.line, 0), o = Math.max(r.end.line, 0); let l = this._lineOffsets; const c = Xa(n.text, !1, i); if (o - a === c.length) for (let u = 0, f = c.length; u < f; u++) l[u + a + 1] = c[u]; else c.length < 1e4 ? l.splice(a + 1, o - a, ...c) : this._lineOffsets = l = l.slice(0, a + 1).concat(c, l.slice(o + 1)); const h = n.text.length - (s - i); if (h !== 0) for (let u = a + 1 + c.length, f = l.length; u < f; u++) l[u] = l[u] + h; } else if (Qn.isFull(n)) this._content = n.text, this._lineOffsets = void 0; else throw new Error("Unknown change event received"); this._version = t; } getLineOffsets() { return this._lineOffsets === void 0 && (this._lineOffsets = Xa(this._content, !0)), this._lineOffsets; } positionAt(e) { e = Math.max(Math.min(e, this._content.length), 0); let t = this.getLineOffsets(), n = 0, r = t.length; if (r === 0) return { line: 0, character: e }; for (; n < r; ) { let s = Math.floor((n + r) / 2); t[s] > e ? r = s : n = s + 1; } let i = n - 1; return { line: i, character: e - t[i] }; } offsetAt(e) { let t = this.getLineOffsets(); if (e.line >= t.length) return this._content.length; if (e.line < 0) return 0; let n = t[e.line], r = e.line + 1 < t.length ? t[e.line + 1] : this._content.length; return Math.max(Math.min(n + e.character, r), n); } get lineCount() { return this.getLineOffsets().length; } static isIncremental(e) { let t = e; return t != null && typeof t.text == "string" && t.range !== void 0 && (t.rangeLength === void 0 || typeof t.rangeLength == "number"); } static isFull(e) { let t = e; return t != null && typeof t.text == "string" && t.range === void 0 && t.rangeLength === void 0; } }, ii; (function(e) { function t(i, s, a, o) { return new Qn(i, s, a, o); } e.create = t; function n(i, s, a) { if (i instanceof Qn) return i.update(s, a), i; throw new Error("TextDocument.update: document must be created by TextDocument.create"); } e.update = n; function r(i, s) { let a = i.getText(), o = si(s.map(Vd), (h, u) => { let f = h.range.start.line - u.range.start.line; return f === 0 ? h.range.start.character - u.range.start.character : f; }), l = 0; const c = []; for (const h of o) { let u = i.offsetAt(h.range.start); if (u < l) throw new Error("Overlapping edit"); u > l && c.push(a.substring(l, u)), h.newText.length && c.push(h.newText), l = i.offsetAt(h.range.end); } return c.push(a.substr(l)), c.join(""); } e.applyEdits = r; })(ii || (ii = {})); function si(e, t) { if (e.length <= 1) return e; const n = e.length / 2 | 0, r = e.slice(0, n), i = e.slice(n); si(r, t), si(i, t); let s = 0, a = 0, o = 0; for (; s < r.length && a < i.length; ) t(r[s], i[a]) <= 0 ? e[o++] = r[s++] : e[o++] = i[a++]; for (; s < r.length; ) e[o++] = r[s++]; for (; a < i.length; ) e[o++] = i[a++]; return e; } function Xa(e, t, n = 0) { const r = t ? [n] : []; for (let i = 0; i < e.length; i++) { let s = e.charCodeAt(i); (s === 13 || s === 10) && (s === 13 && i + 1 < e.length && e.charCodeAt(i + 1) === 10 && i++, r.push(n + i + 1)); } return r; } function fl(e) { const t = e.start, n = e.end; return t.line > n.line || t.line === n.line && t.character > n.character ? { start: n, end: t } : e; } function Vd(e) { const t = fl(e.range); return t !== e.range ? { newText: e.newText, range: t } : e; } var Ya; (function(e) { e.LATEST = { textDocument: { completion: { completionItem: { documentationFormat: [Ie.Markdown, Ie.PlainText] } }, hover: { contentFormat: [Ie.Markdown, Ie.PlainText] } } }; })(Ya || (Ya = {})); var fn; (function(e) { e[e.Unknown = 0] = "Unknown", e[e.File = 1] = "File", e[e.Directory = 2] = "Directory", e[e.SymbolicLink = 64] = "SymbolicLink"; })(fn || (fn = {})); var Ka = { E: "Edge", FF: "Firefox", S: "Safari", C: "Chrome", IE: "IE", O: "Opera" }; function ml(e) { switch (e) { case "experimental": return `⚠️ Property is experimental. Be cautious when using it.️ `; case "nonstandard": return `🚨️ Property is nonstandard. Avoid using it. `; case "obsolete": return `🚨️️️ Property is obsolete. Avoid using it. `; default: return ""; } } function dt(e, t, n) { var r; if (t ? r = { kind: "markdown", value: jd(e, n) } : r = { kind: "plaintext", value: Bd(e, n) }, r.value !== "") return r; } function _n(e) { return e = e.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"), e.replace(//g, ">"); } function Bd(e, t) { if (!e.description || e.description === "") return ""; if (typeof e.description != "string") return e.description.value; var n = ""; if ((t == null ? void 0 : t.documentation) !== !1) { e.status && (n += ml(e.status)), n += e.description; var r = gl(e.browsers); r && (n += ` (` + r + ")"), "syntax" in e && (n += ` Syntax: `.concat(e.syntax)); } return e.references && e.references.length > 0 && (t == null ? void 0 : t.references) !== !1 && (n.length > 0 && (n += ` `), n += e.references.map(function(i) { return "".concat(i.name, ": ").concat(i.url); }).join(" | ")), n; } function jd(e, t) { if (!e.description || e.description === "") return ""; var n = ""; if ((t == null ? void 0 : t.documentation) !== !1) { e.status && (n += ml(e.status)), typeof e.description == "string" ? n += _n(e.description) : n += e.description.kind === Ie.Markdown ? e.description.value : _n(e.description.value); var r = gl(e.browsers); r && (n += ` (` + _n(r) + ")"), "syntax" in e && e.syntax && (n += ` Syntax: `.concat(_n(e.syntax))); } return e.references && e.references.length > 0 && (t == null ? void 0 : t.references) !== !1 && (n.length > 0 && (n += ` `), n += e.references.map(function(i) { return "[".concat(i.name, "](").concat(i.url, ")"); }).join(" | ")), n; } function gl(e) { return e === void 0 && (e = []), e.length === 0 ? null : e.map(function(t) { var n = "", r = t.match(/([A-Z]+)(\d+)?/), i = r[1], s = r[2]; return i in Ka && (n += Ka[i]), s && (n += " " + s), n; }).join(", "); } var Yt = Be(), qd = [ { func: "rgb($red, $green, $blue)", desc: Yt("css.builtin.rgb", "Creates a Color from red, green, and blue values.") }, { func: "rgba($red, $green, $blue, $alpha)", desc: Yt("css.builtin.rgba", "Creates a Color from red, green, blue, and alpha values.") }, { func: "hsl($hue, $saturation, $lightness)", desc: Yt("css.builtin.hsl", "Creates a Color from hue, saturation, and lightness values.") }, { func: "hsla($hue, $saturation, $lightness, $alpha)", desc: Yt("css.builtin.hsla", "Creates a Color from hue, saturation, lightness, and alpha values.") }, { func: "hwb($hue $white $black)", desc: Yt("css.builtin.hwb", "Creates a Color from hue, white and black.") } ], Zn = { 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" }, Qa = { 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 ot(e, t) { var n = e.getText(), r = n.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/); if (r) { r[2] && (t = 100); var i = parseFloat(r[1]) / t; if (i >= 0 && i <= 1) return i; } throw new Error(); } function Za(e) { var t = e.getText(), n = t.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/); if (n) switch (n[2]) { case "deg": return parseFloat(t) % 360; case "rad": return parseFloat(t) * 180 / Math.PI % 360; case "grad": return parseFloat(t) * 0.9 % 360; case "turn": return parseFloat(t) * 360 % 360; default: if (typeof n[2] > "u") return parseFloat(t) % 360; } throw new Error(); } function $d(e) { var t = e.getName(); return t ? /^(rgb|rgba|hsl|hsla|hwb)$/gi.test(t) : !1; } var eo = 48, Hd = 57, Gd = 65, Fn = 97, Jd = 102; function oe(e) { return e < eo ? 0 : e <= Hd ? e - eo : (e < Fn && (e += Fn - Gd), e >= Fn && e <= Jd ? e - Fn + 10 : 0); } function to(e) { if (e[0] !== "#") return null; switch (e.length) { case 4: return { red: oe(e.charCodeAt(1)) * 17 / 255, green: oe(e.charCodeAt(2)) * 17 / 255, blue: oe(e.charCodeAt(3)) * 17 / 255, alpha: 1 }; case 5: return { red: oe(e.charCodeAt(1)) * 17 / 255, green: oe(e.charCodeAt(2)) * 17 / 255, blue: oe(e.charCodeAt(3)) * 17 / 255, alpha: oe(e.charCodeAt(4)) * 17 / 255 }; case 7: return { red: (oe(e.charCodeAt(1)) * 16 + oe(e.charCodeAt(2))) / 255, green: (oe(e.charCodeAt(3)) * 16 + oe(e.charCodeAt(4))) / 255, blue: (oe(e.charCodeAt(5)) * 16 + oe(e.charCodeAt(6))) / 255, alpha: 1 }; case 9: return { red: (oe(e.charCodeAt(1)) * 16 + oe(e.charCodeAt(2))) / 255, green: (oe(e.charCodeAt(3)) * 16 + oe(e.charCodeAt(4))) / 255, blue: (oe(e.charCodeAt(5)) * 16 + oe(e.charCodeAt(6))) / 255, alpha: (oe(e.charCodeAt(7)) * 16 + oe(e.charCodeAt(8))) / 255 }; } return null; } function bl(e, t, n, r) { if (r === void 0 && (r = 1), e = e / 60, t === 0) return { red: n, green: n, blue: n, alpha: r }; var i = function(o, l, c) { for (; c < 0; ) c += 6; for (; c >= 6; ) c -= 6; return c < 1 ? (l - o) * c + o : c < 3 ? l : c < 4 ? (l - o) * (4 - c) + o : o; }, s = n <= 0.5 ? n * (t + 1) : n + t - n * t, a = n * 2 - s; return { red: i(a, s, e + 2), green: i(a, s, e), blue: i(a, s, e - 2), alpha: r }; } function vl(e) { var t = e.red, n = e.green, r = e.blue, i = e.alpha, s = Math.max(t, n, r), a = Math.min(t, n, r), o = 0, l = 0, c = (a + s) / 2, h = s - a; if (h > 0) { switch (l = Math.min(c <= 0.5 ? h / (2 * c) : h / (2 - 2 * c), 1), s) { case t: o = (n - r) / h + (n < r ? 6 : 0); break; case n: o = (r - t) / h + 2; break; case r: o = (t - n) / h + 4; break; } o *= 60, o = Math.round(o); } return { h: o, s: l, l: c, a: i }; } function Xd(e, t, n, r) { if (r === void 0 && (r = 1), t + n >= 1) { var i = t / (t + n); return { red: i, green: i, blue: i, alpha: r }; } var s = bl(e, 1, 0.5, r), a = s.red; a *= 1 - t - n, a += t; var o = s.green; o *= 1 - t - n, o += t; var l = s.blue; return l *= 1 - t - n, l += t, { red: a, green: o, blue: l, alpha: r }; } function Yd(e) { var t = vl(e), n = Math.min(e.red, e.green, e.blue), r = 1 - Math.max(e.red, e.green, e.blue); return { h: t.h, w: n, b: r, a: t.a }; } function Kd(e) { if (e.type === g.HexColorValue) { var t = e.getText(); return to(t); } else if (e.type === g.Function) { var n = e, r = n.getName(), i = n.getArguments().getChildren(); if (i.length === 1) { var s = i[0].getChildren(); if (s.length === 1 && s[0].type === g.Expression && (i = s[0].getChildren(), i.length === 3)) { var a = i[2]; if (a instanceof _i) { var o = a.getLeft(), l = a.getRight(), c = a.getOperator(); o && l && c && c.matches("/") && (i = [i[0], i[1], o, l]); } } } if (!r || i.length < 3 || i.length > 4) return null; try { var h = i.length === 4 ? ot(i[3], 1) : 1; if (r === "rgb" || r === "rgba") return { red: ot(i[0], 255), green: ot(i[1], 255), blue: ot(i[2], 255), alpha: h }; if (r === "hsl" || r === "hsla") { var u = Za(i[0]), f = ot(i[1], 100), m = ot(i[2], 100); return bl(u, f, m, h); } else if (r === "hwb") { var u = Za(i[0]), b = ot(i[1], 100), v = ot(i[2], 100); return Xd(u, b, v, h); } } catch { return null; } } else if (e.type === g.Identifier) { if (e.parent && e.parent.type !== g.Term) return null; var y = e.parent; if (y && y.parent && y.parent.type === g.BinaryExpression) { var w = y.parent; if (w.parent && w.parent.type === g.ListEntry && w.parent.key === w) return null; } var S = e.getText().toLowerCase(); if (S === "none") return null; var k = Zn[S]; if (k) return to(k); } return null; } var no = { bottom: "Computes to ‘100%’ 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 ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.", left: "Computes to ‘0%’ 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 ‘100%’ 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 ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset." }, ro = { "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 ‘repeat no-repeat’.", "repeat-y": "Computes to ‘no-repeat repeat’.", round: "Repeated as often as will fit within the background positioning area. If it doesn’t 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." }, io = { 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 ‘none’, 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." }, Qd = ["medium", "thick", "thin"], so = { "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." }, ao = { "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." }, oo = { initial: "Represents the value specified as the property’s initial value.", inherit: "Represents the computed value of the property on the element’s parent.", unset: "Acts as either `inherit` or `initial`, depending on whether the property is inherited or not." }, lo = { "var()": "Evaluates the value of a custom variable.", "calc()": "Evaluates an mathematical expression. The following operators can be used: + - * /." }, co = { "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’s position and the first specified color-stop’s 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’s position and the first specified color-stop’s position." }, ho = { 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 “start” or “end”.", "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." }, uo = { "circle()": "Defines a circle.", "ellipse()": "Defines an ellipse.", "inset()": "Defines an inset rectangle.", "polygon()": "Defines a polygon." }, yl = { 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"] }, Zd = [ "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" ], eu = [ "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" ], tu = [ "@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 Rn(e) { return Object.keys(e).map(function(t) { return e[t]; }); } function Ne(e) { return typeof e < "u"; } var po = function(e, t, n) { if (n || arguments.length === 2) for (var r = 0, i = t.length, s; r < i; r++) (s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]); return e.concat(s || Array.prototype.slice.call(t)); }, Di = function() { function e(t) { t === void 0 && (t = new bn()), this.keyframeRegex = /^@(\-(webkit|ms|moz|o)\-)?keyframes$/i, this.scanner = t, this.token = { type: p.EOF, offset: -1, len: 0, text: "" }, this.prevToken = void 0; } return e.prototype.peekIdent = function(t) { return p.Ident === this.token.type && t.length === this.token.text.length && t === this.token.text.toLowerCase(); }, e.prototype.peekKeyword = function(t) { return p.AtKeyword === this.token.type && t.length === this.token.text.length && t === this.token.text.toLowerCase(); }, e.prototype.peekDelim = function(t) { return p.Delim === this.token.type && t === this.token.text; }, e.prototype.peek = function(t) { return t === this.token.type; }, e.prototype.peekOne = function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return t.indexOf(this.token.type) !== -1; }, e.prototype.peekRegExp = function(t, n) { return t !== this.token.type ? !1 : n.test(this.token.text); }, e.prototype.hasWhitespace = function() { return !!this.prevToken && this.prevToken.offset + this.prevToken.len !== this.token.offset; }, e.prototype.consumeToken = function() { this.prevToken = this.token, this.token = this.scanner.scan(); }, e.prototype.acceptUnicodeRange = function() { var t = this.scanner.tryScanUnicode(); return t ? (this.prevToken = t, this.token = this.scanner.scan(), !0) : !1; }, e.prototype.mark = function() { return { prev: this.prevToken, curr: this.token, pos: this.scanner.pos() }; }, e.prototype.restoreAtMark = function(t) { this.prevToken = t.prev, this.token = t.curr, this.scanner.goBackTo(t.pos); }, e.prototype.try = function(t) { var n = this.mark(), r = t(); return r || (this.restoreAtMark(n), null); }, e.prototype.acceptOneKeyword = function(t) { if (p.AtKeyword === this.token.type) for (var n = 0, r = t; n < r.length; n++) { var i = r[n]; if (i.length === this.token.text.length && i === this.token.text.toLowerCase()) return this.consumeToken(), !0; } return !1; }, e.prototype.accept = function(t) { return t === this.token.type ? (this.consumeToken(), !0) : !1; }, e.prototype.acceptIdent = function(t) { return this.peekIdent(t) ? (this.consumeToken(), !0) : !1; }, e.prototype.acceptKeyword = function(t) { return this.peekKeyword(t) ? (this.consumeToken(), !0) : !1; }, e.prototype.acceptDelim = function(t) { return this.peekDelim(t) ? (this.consumeToken(), !0) : !1; }, e.prototype.acceptRegexp = function(t) { return t.test(this.token.text) ? (this.consumeToken(), !0) : !1; }, e.prototype._parseRegexp = function(t) { var n = this.createNode(g.Identifier); do ; while (this.acceptRegexp(t)); return this.finish(n); }, e.prototype.acceptUnquotedString = function() { var t = this.scanner.pos(); this.scanner.goBackTo(this.token.offset); var n = this.scanner.scanUnquotedString(); return n ? (this.token = n, this.consumeToken(), !0) : (this.scanner.goBackTo(t), !1); }, e.prototype.resync = function(t, n) { for (; ; ) { if (t && t.indexOf(this.token.type) !== -1) return this.consumeToken(), !0; if (n && n.indexOf(this.token.type) !== -1) return !0; if (this.token.type === p.EOF) return !1; this.token = this.scanner.scan(); } }, e.prototype.createNode = function(t) { return new W(this.token.offset, this.token.len, t); }, e.prototype.create = function(t) { return new t(this.token.offset, this.token.len); }, e.prototype.finish = function(t, n, r, i) { if (!(t instanceof we) && (n && this.markError(t, n, r, i), this.prevToken)) { var s = this.prevToken.offset + this.prevToken.len; t.length = s > t.offset ? s - t.offset : 0; } return t; }, e.prototype.markError = function(t, n, r, i) { this.token !== this.lastErrorToken && (t.addIssue(new pl(t, n, ze.Error, void 0, this.token.offset, this.token.len)), this.lastErrorToken = this.token), (r || i) && this.resync(r, i); }, e.prototype.parseStylesheet = function(t) { var n = t.version, r = t.getText(), i = function(s, a) { if (t.version !== n) throw new Error("Underlying model has changed, AST is no longer valid"); return r.substr(s, a); }; return this.internalParse(r, this._parseStylesheet, i); }, e.prototype.internalParse = function(t, n, r) { this.scanner.setSource(t), this.token = this.scanner.scan(); var i = n.bind(this)(); return i && (r ? i.textProvider = r : i.textProvider = function(s, a) { return t.substr(s, a); }), i; }, e.prototype._parseStylesheet = function() { for (var t = this.create(ad); t.addChild(this._parseStylesheetStart()); ) ; var n = !1; do { var r = !1; do { r = !1; var i = this._parseStylesheetStatement(); for (i && (t.addChild(i), r = !0, n = !1, !this.peek(p.EOF) && this._needsSemicolonAfter(i) && !this.accept(p.SemiColon) && this.markError(t, x.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(t, x.UnknownAtRule) : this.markError(t, x.RuleOrSelectorExpected), n = !0), this.consumeToken(); } while (!this.peek(p.EOF)); return this.finish(t); }, e.prototype._parseStylesheetStart = function() { return this._parseCharset(); }, e.prototype._parseStylesheetStatement = function(t) { return t === void 0 && (t = !1), this.peek(p.AtKeyword) ? this._parseStylesheetAtStatement(t) : this._parseRuleset(t); }, e.prototype._parseStylesheetAtStatement = function(t) { return t === void 0 && (t = !1), this._parseImport() || this._parseMedia(t) || this._parsePage() || this._parseFontFace() || this._parseKeyframe() || this._parseSupports(t) || this._parseViewPort() || this._parseNamespace() || this._parseDocument() || this._parseUnknownAtRule(); }, e.prototype._tryParseRuleset = function(t) { var n = this.mark(); if (this._parseSelector(t)) { for (; this.accept(p.Comma) && this._parseSelector(t); ) ; if (this.accept(p.CurlyL)) return this.restoreAtMark(n), this._parseRuleset(t); } return this.restoreAtMark(n), null; }, e.prototype._parseRuleset = function(t) { t === void 0 && (t = !1); var n = this.create(Lt), r = n.getSelectors(); if (!r.addChild(this._parseSelector(t))) return null; for (; this.accept(p.Comma); ) if (!r.addChild(this._parseSelector(t))) return this.finish(n, x.SelectorExpected); return this._parseBody(n, this._parseRuleSetDeclaration.bind(this)); }, e.prototype._parseRuleSetDeclarationAtStatement = function() { return this._parseUnknownAtRule(); }, e.prototype._parseRuleSetDeclaration = function() { return this.peek(p.AtKeyword) ? this._parseRuleSetDeclarationAtStatement() : this._parseDeclaration(); }, e.prototype._needsSemicolonAfter = function(t) { switch (t.type) { case g.Keyframe: case g.ViewPort: case g.Media: case g.Ruleset: case g.Namespace: case g.If: case g.For: case g.Each: case g.While: case g.MixinDeclaration: case g.FunctionDeclaration: case g.MixinContentDeclaration: return !1; case g.ExtendsReference: case g.MixinContentReference: case g.ReturnStatement: case g.MediaQuery: case g.Debug: case g.Import: case g.AtApplyRule: case g.CustomPropertyDeclaration: return !0; case g.VariableDeclaration: return t.needsSemicolon; case g.MixinReference: return !t.getContent(); case g.Declaration: return !t.getNestedProperties(); } return !1; }, e.prototype._parseDeclarations = function(t) { var n = this.create(xi); if (!this.accept(p.CurlyL)) return null; for (var r = t(); n.addChild(r) && !this.peek(p.CurlyR); ) { if (this._needsSemicolonAfter(r) && !this.accept(p.SemiColon)) return this.finish(n, x.SemiColonExpected, [p.SemiColon, p.CurlyR]); for (r && this.prevToken && this.prevToken.type === p.SemiColon && (r.semicolonPosition = this.prevToken.offset); this.accept(p.SemiColon); ) ; r = t(); } return this.accept(p.CurlyR) ? this.finish(n) : this.finish(n, x.RightCurlyExpected, [p.CurlyR, p.SemiColon]); }, e.prototype._parseBody = function(t, n) { return t.setDeclarations(this._parseDeclarations(n)) ? this.finish(t) : this.finish(t, x.LeftCurlyExpected, [p.CurlyR, p.SemiColon]); }, e.prototype._parseSelector = function(t) { var n = this.create(vn), r = !1; for (t && (r = n.addChild(this._parseCombinator())); n.addChild(this._parseSimpleSelector()); ) r = !0, n.addChild(this._parseCombinator()); return r ? this.finish(n) : null; }, e.prototype._parseDeclaration = function(t) { var n = this._tryParseCustomPropertyDeclaration(t); if (n) return n; var r = this.create(Je); 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, x.PropertyValueExpected)) : this.finish(r, x.ColonExpected, [p.Colon], t || [p.SemiColon]) : null; }, e.prototype._tryParseCustomPropertyDeclaration = function(t) { if (!this.peekRegExp(p.Ident, /^--/)) return null; var n = this.create(ld); if (!n.setProperty(this._parseProperty())) return null; if (!this.accept(p.Colon)) return this.finish(n, x.ColonExpected, [p.Colon]); this.prevToken && (n.colonPosition = this.prevToken.offset); var r = this.mark(); if (this.peek(p.CurlyL)) { var i = this.create(od), 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 a = this._parseExpr(); return a && !a.isErroneous(!0) && (this._parsePrio(), this.peekOne.apply(this, po(po([], t || [], !1), [p.SemiColon, p.EOF], !1))) ? (n.setValue(a), this.peek(p.SemiColon) && (n.semicolonPosition = this.token.offset), this.finish(n)) : (this.restoreAtMark(r), n.addChild(this._parseCustomPropertyValue(t)), n.addChild(this._parsePrio()), Ne(n.colonPosition) && this.token.offset === n.colonPosition + 1 ? this.finish(n, x.PropertyValueExpected) : this.finish(n)); }, e.prototype._parseCustomPropertyValue = function(t) { var n = this; t === void 0 && (t = [p.CurlyR]); var r = this.create(W), i = function() { return a === 0 && o === 0 && l === 0; }, s = function() { return t.indexOf(n.token.type) !== -1; }, a = 0, o = 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: a++; break; case p.CurlyR: if (a--, a < 0) { if (s() && o === 0 && l === 0) break e; return this.finish(r, x.LeftCurlyExpected); } break; case p.ParenthesisL: o++; break; case p.ParenthesisR: if (o--, o < 0) { if (s() && l === 0 && a === 0) break e; return this.finish(r, x.LeftParenthesisExpected); } break; case p.BracketL: l++; break; case p.BracketR: if (l--, l < 0) return this.finish(r, x.LeftSquareBracketExpected); break; case p.BadString: break e; case p.EOF: var c = x.RightCurlyExpected; return l > 0 ? c = x.RightSquareBracketExpected : o > 0 && (c = x.RightParenthesisExpected), this.finish(r, c); } this.consumeToken(); } return this.finish(r); }, e.prototype._tryToParseDeclaration = function(t) { var n = this.mark(); return this._parseProperty() && this.accept(p.Colon) ? (this.restoreAtMark(n), this._parseDeclaration(t)) : (this.restoreAtMark(n), null); }, e.prototype._parseProperty = function() { var t = this.create(Ci), n = this.mark(); return (this.acceptDelim("*") || this.acceptDelim("_")) && this.hasWhitespace() ? (this.restoreAtMark(n), null) : t.setIdentifier(this._parsePropertyIdentifier()) ? this.finish(t) : null; }, e.prototype._parsePropertyIdentifier = function() { return this._parseIdent(); }, e.prototype._parseCharset = function() { if (!this.peek(p.Charset)) return null; var t = this.create(W); return this.consumeToken(), this.accept(p.String) ? this.accept(p.SemiColon) ? this.finish(t) : this.finish(t, x.SemiColonExpected) : this.finish(t, x.IdentifierExpected); }, e.prototype._parseImport = function() { if (!this.peekKeyword("@import")) return null; var t = this.create(ki); return this.consumeToken(), !t.addChild(this._parseURILiteral()) && !t.addChild(this._parseStringLiteral()) ? this.finish(t, x.URIOrStringExpected) : (!this.peek(p.SemiColon) && !this.peek(p.EOF) && t.setMedialist(this._parseMediaQueryList()), this.finish(t)); }, e.prototype._parseNamespace = function() { if (!this.peekKeyword("@namespace")) return null; var t = this.create(wd); return this.consumeToken(), !t.addChild(this._parseURILiteral()) && (t.addChild(this._parseIdent()), !t.addChild(this._parseURILiteral()) && !t.addChild(this._parseStringLiteral())) ? this.finish(t, x.URIExpected, [p.SemiColon]) : this.accept(p.SemiColon) ? this.finish(t) : this.finish(t, x.SemiColonExpected); }, e.prototype._parseFontFace = function() { if (!this.peekKeyword("@font-face")) return null; var t = this.create(sl); return this.consumeToken(), this._parseBody(t, this._parseRuleSetDeclaration.bind(this)); }, e.prototype._parseViewPort = function() { if (!this.peekKeyword("@-ms-viewport") && !this.peekKeyword("@-o-viewport") && !this.peekKeyword("@viewport")) return null; var t = this.create(md); return this.consumeToken(), this._parseBody(t, this._parseRuleSetDeclaration.bind(this)); }, e.prototype._parseKeyframe = function() { if (!this.peekRegExp(p.AtKeyword, this.keyframeRegex)) return null; var t = this.create(ol), n = this.create(W); return this.consumeToken(), t.setKeyword(this.finish(n)), n.matches("@-ms-keyframes") && this.markError(n, x.UnknownKeyword), t.setIdentifier(this._parseKeyframeIdent()) ? this._parseBody(t, this._parseKeyframeSelector.bind(this)) : this.finish(t, x.IdentifierExpected, [p.CurlyR]); }, e.prototype._parseKeyframeIdent = function() { return this._parseIdent([Y.Keyframe]); }, e.prototype._parseKeyframeSelector = function() { var t = this.create(wa); if (!t.addChild(this._parseIdent()) && !this.accept(p.Percentage)) return null; for (; this.accept(p.Comma); ) if (!t.addChild(this._parseIdent()) && !this.accept(p.Percentage)) return this.finish(t, x.PercentageExpected); return this._parseBody(t, this._parseRuleSetDeclaration.bind(this)); }, e.prototype._tryParseKeyframeSelector = function() { var t = this.create(wa), n = this.mark(); if (!t.addChild(this._parseIdent()) && !this.accept(p.Percentage)) return null; for (; this.accept(p.Comma); ) if (!t.addChild(this._parseIdent()) && !this.accept(p.Percentage)) return this.restoreAtMark(n), null; return this.peek(p.CurlyL) ? this._parseBody(t, this._parseRuleSetDeclaration.bind(this)) : (this.restoreAtMark(n), null); }, e.prototype._parseSupports = function(t) { if (t === void 0 && (t = !1), !this.peekKeyword("@supports")) return null; var n = this.create(Xr); return this.consumeToken(), n.addChild(this._parseSupportsCondition()), this._parseBody(n, this._parseSupportsDeclaration.bind(this, t)); }, e.prototype._parseSupportsDeclaration = function(t) { return t === void 0 && (t = !1), t ? this._tryParseRuleset(!0) || this._tryToParseDeclaration() || this._parseStylesheetStatement(!0) : this._parseStylesheetStatement(!1); }, e.prototype._parseSupportsCondition = function() { var t = this.create(rn); if (this.acceptIdent("not")) t.addChild(this._parseSupportsConditionInParens()); else if (t.addChild(this._parseSupportsConditionInParens()), this.peekRegExp(p.Ident, /^(and|or)$/i)) for (var n = this.token.text.toLowerCase(); this.acceptIdent(n); ) t.addChild(this._parseSupportsConditionInParens()); return this.finish(t); }, e.prototype._parseSupportsConditionInParens = function() { var t = this.create(rn); if (this.accept(p.ParenthesisL)) return this.prevToken && (t.lParent = this.prevToken.offset), !t.addChild(this._tryToParseDeclaration([p.ParenthesisR])) && !this._parseSupportsCondition() ? this.finish(t, x.ConditionExpected) : this.accept(p.ParenthesisR) ? (this.prevToken && (t.rParent = this.prevToken.offset), this.finish(t)) : this.finish(t, x.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(t); } else this.restoreAtMark(n); } return this.finish(t, x.LeftParenthesisExpected, [], [p.ParenthesisL]); }, e.prototype._parseMediaDeclaration = function(t) { return t === void 0 && (t = !1), t ? this._tryParseRuleset(!0) || this._tryToParseDeclaration() || this._parseStylesheetStatement(!0) : this._parseStylesheetStatement(!1); }, e.prototype._parseMedia = function(t) { if (t === void 0 && (t = !1), !this.peekKeyword("@media")) return null; var n = this.create(ll); return this.consumeToken(), n.addChild(this._parseMediaQueryList()) ? this._parseBody(n, this._parseMediaDeclaration.bind(this, t)) : this.finish(n, x.MediaQueryExpected); }, e.prototype._parseMediaQueryList = function() { var t = this.create(cl); if (!t.addChild(this._parseMediaQuery())) return this.finish(t, x.MediaQueryExpected); for (; this.accept(p.Comma); ) if (!t.addChild(this._parseMediaQuery())) return this.finish(t, x.MediaQueryExpected); return this.finish(t); }, e.prototype._parseMediaQuery = function() { var t = this.create(hl), n = this.mark(); if (this.acceptIdent("not"), this.peek(p.ParenthesisL)) this.restoreAtMark(n), t.addChild(this._parseMediaCondition()); else { if (this.acceptIdent("only"), !t.addChild(this._parseIdent())) return null; this.acceptIdent("and") && t.addChild(this._parseMediaCondition()); } return this.finish(t); }, e.prototype._parseRatio = function() { var t = this.mark(), n = this.create(Ed); return this._parseNumeric() ? this.acceptDelim("/") ? this._parseNumeric() ? this.finish(n) : this.finish(n, x.NumberExpected) : (this.restoreAtMark(t), null) : null; }, e.prototype._parseMediaCondition = function() { var t = this.create(Sd); this.acceptIdent("not"); for (var n = !0; n; ) { if (!this.accept(p.ParenthesisL)) return this.finish(t, x.LeftParenthesisExpected, [], [p.CurlyL]); if (this.peek(p.ParenthesisL) || this.peekIdent("not") ? t.addChild(this._parseMediaCondition()) : t.addChild(this._parseMediaFeature()), !this.accept(p.ParenthesisR)) return this.finish(t, x.RightParenthesisExpected, [], [p.CurlyL]); n = this.acceptIdent("and") || this.acceptIdent("or"); } return this.finish(t); }, e.prototype._parseMediaFeature = function() { var t = this, n = [p.ParenthesisR], r = this.create(Cd), i = function() { return t.acceptDelim("<") || t.acceptDelim(">") ? (t.hasWhitespace() || t.acceptDelim("="), !0) : !!t.acceptDelim("="); }; if (r.addChild(this._parseMediaFeatureName())) { if (this.accept(p.Colon)) { if (!r.addChild(this._parseMediaFeatureValue())) return this.finish(r, x.TermExpected, [], n); } else if (i()) { if (!r.addChild(this._parseMediaFeatureValue())) return this.finish(r, x.TermExpected, [], n); if (i() && !r.addChild(this._parseMediaFeatureValue())) return this.finish(r, x.TermExpected, [], n); } } else if (r.addChild(this._parseMediaFeatureValue())) { if (!i()) return this.finish(r, x.OperatorExpected, [], n); if (!r.addChild(this._parseMediaFeatureName())) return this.finish(r, x.IdentifierExpected, [], n); if (i() && !r.addChild(this._parseMediaFeatureValue())) return this.finish(r, x.TermExpected, [], n); } else return this.finish(r, x.IdentifierExpected, [], n); return this.finish(r); }, e.prototype._parseMediaFeatureName = function() { return this._parseIdent(); }, e.prototype._parseMediaFeatureValue = function() { return this._parseRatio() || this._parseTermExpression(); }, e.prototype._parseMedium = function() { var t = this.create(W); return t.addChild(this._parseIdent()) ? this.finish(t) : null; }, e.prototype._parsePageDeclaration = function() { return this._parsePageMarginBox() || this._parseRuleSetDeclaration(); }, e.prototype._parsePage = function() { if (!this.peekKeyword("@page")) return null; var t = this.create(kd); if (this.consumeToken(), t.addChild(this._parsePageSelector())) { for (; this.accept(p.Comma); ) if (!t.addChild(this._parsePageSelector())) return this.finish(t, x.IdentifierExpected); } return this._parseBody(t, this._parsePageDeclaration.bind(this)); }, e.prototype._parsePageMarginBox = function() { if (!this.peek(p.AtKeyword)) return null; var t = this.create(_d); return this.acceptOneKeyword(tu) || this.markError(t, x.UnknownAtRule, [], [p.CurlyL]), this._parseBody(t, this._parseRuleSetDeclaration.bind(this)); }, e.prototype._parsePageSelector = function() { if (!this.peek(p.Ident) && !this.peek(p.Colon)) return null; var t = this.create(W); return t.addChild(this._parseIdent()), this.accept(p.Colon) && !t.addChild(this._parseIdent()) ? this.finish(t, x.IdentifierExpected) : this.finish(t); }, e.prototype._parseDocument = function() { if (!this.peekKeyword("@-moz-document")) return null; var t = this.create(xd); return this.consumeToken(), this.resync([], [p.CurlyL]), this._parseBody(t, this._parseStylesheetStatement.bind(this)); }, e.prototype._parseUnknownAtRule = function() { if (!this.peek(p.AtKeyword)) return null; var t = this.create(ul); t.addChild(this._parseUnknownAtRuleName()); var n = function() { return i === 0 && s === 0 && a === 0; }, r = 0, i = 0, s = 0, a = 0; e: for (; ; ) { switch (this.token.type) { case p.SemiColon: if (n()) break e; break; case p.EOF: return i > 0 ? this.finish(t, x.RightCurlyExpected) : a > 0 ? this.finish(t, x.RightSquareBracketExpected) : s > 0 ? this.finish(t, x.RightParenthesisExpected) : this.finish(t); case p.CurlyL: r++, i++; break; case p.CurlyR: if (i--, r > 0 && i === 0) { if (this.consumeToken(), a > 0) return this.finish(t, x.RightSquareBracketExpected); if (s > 0) return this.finish(t, x.RightParenthesisExpected); break e; } if (i < 0) { if (s === 0 && a === 0) break e; return this.finish(t, x.LeftCurlyExpected); } break; case p.ParenthesisL: s++; break; case p.ParenthesisR: if (s--, s < 0) return this.finish(t, x.LeftParenthesisExpected); break; case p.BracketL: a++; break; case p.BracketR: if (a--, a < 0) return this.finish(t, x.LeftSquareBracketExpected); break; } this.consumeToken(); } return t; }, e.prototype._parseUnknownAtRuleName = function() { var t = this.create(W); return this.accept(p.AtKeyword) ? this.finish(t) : t; }, e.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 t = this.createNode(g.Operator); return this.consumeToken(), this.finish(t); } else return null; }, e.prototype._parseUnaryOperator = function() { if (!this.peekDelim("+") && !this.peekDelim("-")) return null; var t = this.create(W); return this.consumeToken(), this.finish(t); }, e.prototype._parseCombinator = function() { if (this.peekDelim(">")) { var t = this.create(W); this.consumeToken(); var n = this.mark(); if (!this.hasWhitespace() && this.acceptDelim(">")) { if (!this.hasWhitespace() && this.acceptDelim(">")) return t.type = g.SelectorCombinatorShadowPiercingDescendant, this.finish(t); this.restoreAtMark(n); } return t.type = g.SelectorCombinatorParent, this.finish(t); } else if (this.peekDelim("+")) { var t = this.create(W); return this.consumeToken(), t.type = g.SelectorCombinatorSibling, this.finish(t); } else if (this.peekDelim("~")) { var t = this.create(W); return this.consumeToken(), t.type = g.SelectorCombinatorAllSiblings, this.finish(t); } else if (this.peekDelim("/")) { var t = this.create(W); this.consumeToken(); var n = this.mark(); if (!this.hasWhitespace() && this.acceptIdent("deep") && !this.hasWhitespace() && this.acceptDelim("/")) return t.type = g.SelectorCombinatorShadowPiercingDescendant, this.finish(t); this.restoreAtMark(n); } return null; }, e.prototype._parseSimpleSelector = function() { var t = this.create(Tt), n = 0; for (t.addChild(this._parseElementName()) && n++; (n === 0 || !this.hasWhitespace()) && t.addChild(this._parseSimpleSelectorBody()); ) n++; return n > 0 ? this.finish(t) : null; }, e.prototype._parseSimpleSelectorBody = function() { return this._parsePseudo() || this._parseHash() || this._parseClass() || this._parseAttrib(); }, e.prototype._parseSelectorIdent = function() { return this._parseIdent(); }, e.prototype._parseHash = function() { if (!this.peek(p.Hash) && !this.peekDelim("#")) return null; var t = this.createNode(g.IdentifierSelector); if (this.acceptDelim("#")) { if (this.hasWhitespace() || !t.addChild(this._parseSelectorIdent())) return this.finish(t, x.IdentifierExpected); } else this.consumeToken(); return this.finish(t); }, e.prototype._parseClass = function() { if (!this.peekDelim(".")) return null; var t = this.createNode(g.ClassSelector); return this.consumeToken(), this.hasWhitespace() || !t.addChild(this._parseSelectorIdent()) ? this.finish(t, x.IdentifierExpected) : this.finish(t); }, e.prototype._parseElementName = function() { var t = this.mark(), n = this.createNode(g.ElementNameSelector); return n.addChild(this._parseNamespacePrefix()), !n.addChild(this._parseSelectorIdent()) && !this.acceptDelim("*") ? (this.restoreAtMark(t), null) : this.finish(n); }, e.prototype._parseNamespacePrefix = function() { var t = this.mark(), n = this.createNode(g.NamespacePrefix); return !n.addChild(this._parseIdent()) && this.acceptDelim("*"), this.acceptDelim("|") ? this.finish(n) : (this.restoreAtMark(t), null); }, e.prototype._parseAttrib = function() { if (!this.peek(p.BracketL)) return null; var t = this.create(Rd); return this.consumeToken(), t.setNamespacePrefix(this._parseNamespacePrefix()), t.setIdentifier(this._parseIdent()) ? (t.setOperator(this._parseOperator()) && (t.setValue(this._parseBinaryExpr()), this.acceptIdent("i"), this.acceptIdent("s")), this.accept(p.BracketR) ? this.finish(t) : this.finish(t, x.RightSquareBracketExpected)) : this.finish(t, x.IdentifierExpected); }, e.prototype._parsePseudo = function() { var t = this, n = this._tryParsePseudoIdentifier(); if (n) { if (!this.hasWhitespace() && this.accept(p.ParenthesisL)) { var r = function() { var i = t.create(W); if (!i.addChild(t._parseSelector(!1))) return null; for (; t.accept(p.Comma) && i.addChild(t._parseSelector(!1)); ) ; return t.peek(p.ParenthesisR) ? t.finish(i) : null; }; if (n.addChild(this.try(r) || this._parseBinaryExpr()), !this.accept(p.ParenthesisR)) return this.finish(n, x.RightParenthesisExpected); } return this.finish(n); } return null; }, e.prototype._tryParsePseudoIdentifier = function() { if (!this.peek(p.Colon)) return null; var t = this.mark(), n = this.createNode(g.PseudoSelector); return this.consumeToken(), this.hasWhitespace() ? (this.restoreAtMark(t), null) : (this.accept(p.Colon), this.hasWhitespace() || !n.addChild(this._parseIdent()) ? this.finish(n, x.IdentifierExpected) : this.finish(n)); }, e.prototype._tryParsePrio = function() { var t = this.mark(), n = this._parsePrio(); return n || (this.restoreAtMark(t), null); }, e.prototype._parsePrio = function() { if (!this.peek(p.Exclamation)) return null; var t = this.createNode(g.Prio); return this.accept(p.Exclamation) && this.acceptIdent("important") ? this.finish(t) : null; }, e.prototype._parseExpr = function(t) { t === void 0 && (t = !1); var n = this.create(dl); if (!n.addChild(this._parseBinaryExpr())) return null; for (; ; ) { if (this.peek(p.Comma)) { if (t) return this.finish(n); this.consumeToken(); } else if (!this.hasWhitespace()) break; if (!n.addChild(this._parseBinaryExpr())) break; } return this.finish(n); }, e.prototype._parseUnicodeRange = function() { if (!this.peekIdent("u")) return null; var t = this.create(sd); return this.acceptUnicodeRange() ? this.finish(t) : null; }, e.prototype._parseNamedLine = function() { if (!this.peek(p.BracketL)) return null; var t = this.createNode(g.GridLine); for (this.consumeToken(); t.addChild(this._parseIdent()); ) ; return this.accept(p.BracketR) ? this.finish(t) : this.finish(t, x.RightSquareBracketExpected); }, e.prototype._parseBinaryExpr = function(t, n) { var r = this.create(_i); if (!r.setLeft(t || this._parseTerm())) return null; if (!r.setOperator(n || this._parseOperator())) return this.finish(r); if (!r.setRight(this._parseTerm())) return this.finish(r, x.TermExpected); r = this.finish(r); var i = this._parseOperator(); return i && (r = this._parseBinaryExpr(r, i)), this.finish(r); }, e.prototype._parseTerm = function() { var t = this.create(Fd); return t.setOperator(this._parseUnaryOperator()), t.setExpression(this._parseTermExpression()) ? this.finish(t) : null; }, e.prototype._parseTermExpression = function() { return this._parseURILiteral() || this._parseUnicodeRange() || this._parseFunction() || this._parseIdent() || this._parseStringLiteral() || this._parseNumeric() || this._parseHexColor() || this._parseOperation() || this._parseNamedLine(); }, e.prototype._parseOperation = function() { if (!this.peek(p.ParenthesisL)) return null; var t = this.create(W); return this.consumeToken(), t.addChild(this._parseExpr()), this.accept(p.ParenthesisR) ? this.finish(t) : this.finish(t, x.RightParenthesisExpected); }, e.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 t = this.create(Ri); return this.consumeToken(), this.finish(t); } return null; }, e.prototype._parseStringLiteral = function() { if (!this.peek(p.String) && !this.peek(p.BadString)) return null; var t = this.createNode(g.StringLiteral); return this.consumeToken(), this.finish(t); }, e.prototype._parseURILiteral = function() { if (!this.peekRegExp(p.Ident, /^url(-prefix)?$/i)) return null; var t = this.mark(), n = this.createNode(g.URILiteral); return this.accept(p.Ident), this.hasWhitespace() || !this.peek(p.ParenthesisL) ? (this.restoreAtMark(t), 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, x.RightParenthesisExpected)); }, e.prototype._parseURLArgument = function() { var t = this.create(W); return !this.accept(p.String) && !this.accept(p.BadString) && !this.acceptUnquotedString() ? null : this.finish(t); }, e.prototype._parseIdent = function(t) { if (!this.peek(p.Ident)) return null; var n = this.create(Pe); return t && (n.referenceTypes = t), n.isCustomProperty = this.peekRegExp(p.Ident, /^--/), this.consumeToken(), this.finish(n); }, e.prototype._parseFunction = function() { var t = this.mark(), n = this.create(yn); if (!n.setIdentifier(this._parseFunctionIdentifier())) return null; if (this.hasWhitespace() || !this.accept(p.ParenthesisL)) return this.restoreAtMark(t), null; if (n.getArguments().addChild(this._parseFunctionArgument())) for (; this.accept(p.Comma) && !this.peek(p.ParenthesisR); ) n.getArguments().addChild(this._parseFunctionArgument()) || this.markError(n, x.ExpressionExpected); return this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, x.RightParenthesisExpected); }, e.prototype._parseFunctionIdentifier = function() { if (!this.peek(p.Ident)) return null; var t = this.create(Pe); if (t.referenceTypes = [Y.Function], this.acceptIdent("progid")) { if (this.accept(p.Colon)) for (; this.accept(p.Ident) && this.acceptDelim("."); ) ; return this.finish(t); } return this.consumeToken(), this.finish(t); }, e.prototype._parseFunctionArgument = function() { var t = this.create(Vt); return t.setValue(this._parseExpr(!0)) ? this.finish(t) : null; }, e.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 t = this.create(Fi); return this.consumeToken(), this.finish(t); } else return null; }, e; }(); function nu(e, t) { var n = 0, r = e.length; if (r === 0) return 0; for (; n < r; ) { var i = Math.floor((n + r) / 2); t(e[i]) ? r = i : n = i + 1; } return n; } function wl(e, t) { return e.indexOf(t) !== -1; } function En() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; for (var n = [], r = 0, i = e; r < i.length; r++) for (var s = i[r], a = 0, o = s; a < o.length; a++) { var l = o[a]; wl(n, l) || n.push(l); } return n; } var ru = function() { var e = function(t, n) { return e = 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]); }, e(t, n); }; return function(t, n) { if (typeof n != "function" && n !== null) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); e(t, n); function r() { this.constructor = t; } t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; }(), xl = function() { function e(t, n) { this.offset = t, this.length = n, this.symbols = [], this.parent = null, this.children = []; } return e.prototype.addChild = function(t) { this.children.push(t), t.setParent(this); }, e.prototype.setParent = function(t) { this.parent = t; }, e.prototype.findScope = function(t, n) { return n === void 0 && (n = 0), this.offset <= t && this.offset + this.length > t + n || this.offset === t && this.length === n ? this.findInScope(t, n) : null; }, e.prototype.findInScope = function(t, n) { n === void 0 && (n = 0); var r = t + n, i = nu(this.children, function(a) { return a.offset > r; }); if (i === 0) return this; var s = this.children[i - 1]; return s.offset <= t && s.offset + s.length >= t + n ? s.findInScope(t, n) : this; }, e.prototype.addSymbol = function(t) { this.symbols.push(t); }, e.prototype.getSymbol = function(t, n) { for (var r = 0; r < this.symbols.length; r++) { var i = this.symbols[r]; if (i.name === t && i.type === n) return i; } return null; }, e.prototype.getSymbols = function() { return this.symbols; }, e; }(), iu = function(e) { ru(t, e); function t() { return e.call(this, 0, Number.MAX_VALUE) || this; } return t; }(xl), Dn = function() { function e(t, n, r, i) { this.name = t, this.value = n, this.node = r, this.type = i; } return e; }(), su = function() { function e(t) { this.scope = t; } return e.prototype.addSymbol = function(t, n, r, i) { if (t.offset !== -1) { var s = this.scope.findScope(t.offset, t.length); s && s.addSymbol(new Dn(n, r, t, i)); } }, e.prototype.addScope = function(t) { if (t.offset !== -1) { var n = this.scope.findScope(t.offset, t.length); if (n && (n.offset !== t.offset || n.length !== t.length)) { var r = new xl(t.offset, t.length); return n.addChild(r), r; } return n; } return null; }, e.prototype.addSymbolToChildScope = function(t, n, r, i, s) { if (t && t.offset !== -1) { var a = this.addScope(t); a && a.addSymbol(new Dn(r, i, n, s)); } }, e.prototype.visitNode = function(t) { switch (t.type) { case g.Keyframe: return this.addSymbol(t, t.getName(), void 0, Y.Keyframe), !0; case g.CustomPropertyDeclaration: return this.visitCustomPropertyDeclarationNode(t); case g.VariableDeclaration: return this.visitVariableDeclarationNode(t); case g.Ruleset: return this.visitRuleSet(t); case g.MixinDeclaration: return this.addSymbol(t, t.getName(), void 0, Y.Mixin), !0; case g.FunctionDeclaration: return this.addSymbol(t, t.getName(), void 0, Y.Function), !0; case g.FunctionParameter: return this.visitFunctionParameterNode(t); case g.Declarations: return this.addScope(t), !0; case g.For: var n = t, r = n.getDeclarations(); return r && n.variable && this.addSymbolToChildScope(r, n.variable, n.variable.getName(), void 0, Y.Variable), !0; case g.Each: { var i = t, s = i.getDeclarations(); if (s) for (var a = i.getVariables().getChildren(), o = 0, l = a; o < l.length; o++) { var c = l[o]; this.addSymbolToChildScope(s, c, c.getName(), void 0, Y.Variable); } return !0; } } return !0; }, e.prototype.visitRuleSet = function(t) { var n = this.scope.findScope(t.offset, t.length); if (n) for (var r = 0, i = t.getSelectors().getChildren(); r < i.length; r++) { var s = i[r]; s instanceof vn && s.getChildren().length === 1 && n.addSymbol(new Dn(s.getChild(0).getText(), void 0, s, Y.Rule)); } return !0; }, e.prototype.visitVariableDeclarationNode = function(t) { var n = t.getValue() ? t.getValue().getText() : void 0; return this.addSymbol(t, t.getName(), n, Y.Variable), !0; }, e.prototype.visitFunctionParameterNode = function(t) { var n = t.getParent().getDeclarations(); if (n) { var r = t.getDefaultValue(), i = r ? r.getText() : void 0; this.addSymbolToChildScope(n, t, t.getName(), i, Y.Variable); } return !0; }, e.prototype.visitCustomPropertyDeclarationNode = function(t) { var n = t.getValue() ? t.getValue().getText() : ""; return this.addCSSVariable(t.getProperty(), t.getProperty().getName(), n, Y.Variable), !0; }, e.prototype.addCSSVariable = function(t, n, r, i) { t.offset !== -1 && this.scope.addSymbol(new Dn(n, r, t, i)); }, e; }(), ai = function() { function e(t) { this.global = new iu(), t.acceptVisitor(new su(this.global)); } return e.prototype.findSymbolsAtOffset = function(t, n) { for (var r = this.global.findScope(t, 0), i = [], s = {}; r; ) { for (var a = r.getSymbols(), o = 0; o < a.length; o++) { var l = a[o]; l.type === n && !s[l.name] && (i.push(l), s[l.name] = !0); } r = r.parent; } return i; }, e.prototype.internalFindSymbol = function(t, n) { var r = t; if (t.parent instanceof sr && t.parent.getParent() instanceof se && (r = t.parent.getParent().getDeclarations()), t.parent instanceof Vt && t.parent.getParent() instanceof yn) { var i = t.parent.getParent().getIdentifier(); if (i) { var s = this.internalFindSymbol(i, [Y.Function]); s && (r = s.node.getDeclarations()); } } if (!r) return null; for (var a = t.getText(), o = this.global.findScope(r.offset, r.length); o; ) { for (var l = 0; l < n.length; l++) { var c = n[l], h = o.getSymbol(a, c); if (h) return h; } o = o.parent; } return null; }, e.prototype.evaluateReferenceTypes = function(t) { if (t instanceof Pe) { var n = t.referenceTypes; if (n) return n; if (t.isCustomProperty) return [Y.Variable]; var r = id(t); if (r) { var i = r.getNonPrefixedPropertyName(); if ((i === "animation" || i === "animation-name") && r.getValue() && r.getValue().offset === t.offset) return [Y.Keyframe]; } } else if (t instanceof Ei) return [Y.Variable]; var s = t.findAParent(g.Selector, g.ExtendsReference); return s ? [Y.Rule] : null; }, e.prototype.findSymbolFromNode = function(t) { if (!t) return null; for (; t.type === g.Interpolation; ) t = t.getParent(); var n = this.evaluateReferenceTypes(t); return n ? this.internalFindSymbol(t, n) : null; }, e.prototype.matchesSymbol = function(t, n) { if (!t) return !1; for (; t.type === g.Interpolation; ) t = t.getParent(); if (!t.matches(n.name)) return !1; var r = this.evaluateReferenceTypes(t); if (!r || r.indexOf(n.type) === -1) return !1; var i = this.internalFindSymbol(t, r); return i === n; }, e.prototype.findSymbol = function(t, n, r) { for (var i = this.global.findScope(r); i; ) { var s = i.getSymbol(t, n); if (s) return s; i = i.parent; } return null; }, e; }(), Sl; Sl = (() => { var e = { 470: (r) => { function i(o) { if (typeof o != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(o)); } function s(o, l) { for (var c, h = "", u = 0, f = -1, m = 0, b = 0; b <= o.length; ++b) { if (b < o.length) c = o.charCodeAt(b); else { if (c === 47) break; c = 47; } if (c === 47) { if (!(f === b - 1 || m === 1)) if (f !== b - 1 && m === 2) { if (h.length < 2 || u !== 2 || h.charCodeAt(h.length - 1) !== 46 || h.charCodeAt(h.length - 2) !== 46) { if (h.length > 2) { var v = h.lastIndexOf("/"); if (v !== h.length - 1) { v === -1 ? (h = "", u = 0) : u = (h = h.slice(0, v)).length - 1 - h.lastIndexOf("/"), f = b, m = 0; continue; } } else if (h.length === 2 || h.length === 1) { h = "", u = 0, f = b, m = 0; continue; } } l && (h.length > 0 ? h += "/.." : h = "..", u = 2); } else h.length > 0 ? h += "/" + o.slice(f + 1, b) : h = o.slice(f + 1, b), u = b - f - 1; f = b, m = 0; } else c === 46 && m !== -1 ? ++m : m = -1; } return h; } var a = { resolve: function() { for (var o, l = "", c = !1, h = arguments.length - 1; h >= -1 && !c; h--) { var u; h >= 0 ? u = arguments[h] : (o === void 0 && (o = process.cwd()), u = o), i(u), u.length !== 0 && (l = u + "/" + l, c = u.charCodeAt(0) === 47); } return l = s(l, !c), c ? l.length > 0 ? "/" + l : "/" : l.length > 0 ? l : "."; }, normalize: function(o) { if (i(o), o.length === 0) return "."; var l = o.charCodeAt(0) === 47, c = o.charCodeAt(o.length - 1) === 47; return (o = s(o, !l)).length !== 0 || l || (o = "."), o.length > 0 && c && (o += "/"), l ? "/" + o : o; }, isAbsolute: function(o) { return i(o), o.length > 0 && o.charCodeAt(0) === 47; }, join: function() { if (arguments.length === 0) return "."; for (var o, l = 0; l < arguments.length; ++l) { var c = arguments[l]; i(c), c.length > 0 && (o === void 0 ? o = c : o += "/" + c); } return o === void 0 ? "." : a.normalize(o); }, relative: function(o, l) { if (i(o), i(l), o === l || (o = a.resolve(o)) === (l = a.resolve(l))) return ""; for (var c = 1; c < o.length && o.charCodeAt(c) === 47; ++c) ; for (var h = o.length, u = h - c, f = 1; f < l.length && l.charCodeAt(f) === 47; ++f) ; for (var m = l.length - f, b = u < m ? u : m, v = -1, y = 0; y <= b; ++y) { if (y === b) { if (m > b) { if (l.charCodeAt(f + y) === 47) return l.slice(f + y + 1); if (y === 0) return l.slice(f + y); } else u > b && (o.charCodeAt(c + y) === 47 ? v = y : y === 0 && (v = 0)); break; } var w = o.charCodeAt(c + y); if (w !== l.charCodeAt(f + y)) break; w === 47 && (v = y); } var S = ""; for (y = c + v + 1; y <= h; ++y) y !== h && o.charCodeAt(y) !== 47 || (S.length === 0 ? S += ".." : S += "/.."); return S.length > 0 ? S + l.slice(f + v) : (f += v, l.charCodeAt(f) === 47 && ++f, l.slice(f)); }, _makeLong: function(o) { return o; }, dirname: function(o) { if (i(o), o.length === 0) return "."; for (var l = o.charCodeAt(0), c = l === 47, h = -1, u = !0, f = o.length - 1; f >= 1; --f) if ((l = o.charCodeAt(f)) === 47) { if (!u) { h = f; break; } } else u = !1; return h === -1 ? c ? "/" : "." : c && h === 1 ? "//" : o.slice(0, h); }, basename: function(o, l) { if (l !== void 0 && typeof l != "string") throw new TypeError('"ext" argument must be a string'); i(o); var c, h = 0, u = -1, f = !0; if (l !== void 0 && l.length > 0 && l.length <= o.length) { if (l.length === o.length && l === o) return ""; var m = l.length - 1, b = -1; for (c = o.length - 1; c >= 0; --c) { var v = o.charCodeAt(c); if (v === 47) { if (!f) { h = c + 1; break; } } else b === -1 && (f = !1, b = c + 1), m >= 0 && (v === l.charCodeAt(m) ? --m == -1 && (u = c) : (m = -1, u = b)); } return h === u ? u = b : u === -1 && (u = o.length), o.slice(h, u); } for (c = o.length - 1; c >= 0; --c) if (o.charCodeAt(c) === 47) { if (!f) { h = c + 1; break; } } else u === -1 && (f = !1, u = c + 1); return u === -1 ? "" : o.slice(h, u); }, extname: function(o) { i(o); for (var l = -1, c = 0, h = -1, u = !0, f = 0, m = o.length - 1; m >= 0; --m) { var b = o.charCodeAt(m); if (b !== 47) h === -1 && (u = !1, h = m + 1), b === 46 ? l === -1 ? l = m : f !== 1 && (f = 1) : l !== -1 && (f = -1); else if (!u) { c = m + 1; break; } } return l === -1 || h === -1 || f === 0 || f === 1 && l === h - 1 && l === c + 1 ? "" : o.slice(l, h); }, format: function(o) { if (o === null || typeof o != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof o); return function(l, c) { var h = c.dir || c.root, u = c.base || (c.name || "") + (c.ext || ""); return h ? h === c.root ? h + u : h + "/" + u : u; }(0, o); }, parse: function(o) { i(o); var l = { root: "", dir: "", base: "", ext: "", name: "" }; if (o.length === 0) return l; var c, h = o.charCodeAt(0), u = h === 47; u ? (l.root = "/", c = 1) : c = 0; for (var f = -1, m = 0, b = -1, v = !0, y = o.length - 1, w = 0; y >= c; --y) if ((h = o.charCodeAt(y)) !== 47) b === -1 && (v = !1, b = y + 1), h === 46 ? f === -1 ? f = y : w !== 1 && (w = 1) : f !== -1 && (w = -1); else if (!v) { m = y + 1; break; } return f === -1 || b === -1 || w === 0 || w === 1 && f === b - 1 && f === m + 1 ? b !== -1 && (l.base = l.name = m === 0 && u ? o.slice(1, b) : o.slice(m, b)) : (m === 0 && u ? (l.name = o.slice(1, f), l.base = o.slice(1, b)) : (l.name = o.slice(m, f), l.base = o.slice(m, b)), l.ext = o.slice(f, b)), m > 0 ? l.dir = o.slice(0, m - 1) : u && (l.dir = "/"), l; }, sep: "/", delimiter: ":", win32: null, posix: null }; a.posix = a, r.exports = a; }, 447: (r, i, s) => { var a; if (s.r(i), s.d(i, { URI: () => S, Utils: () => V }), typeof process == "object") a = process.platform === "win32"; else if (typeof navigator == "object") { var o = navigator.userAgent; a = o.indexOf("Windows") >= 0; } var l, c, h = (l = function(A, C) { return (l = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(E, L) { E.__proto__ = L; } || function(E, L) { for (var G in L) Object.prototype.hasOwnProperty.call(L, G) && (E[G] = L[G]); })(A, C); }, function(A, C) { if (typeof C != "function" && C !== null) throw new TypeError("Class extends value " + String(C) + " is not a constructor or null"); function E() { this.constructor = A; } l(A, C), A.prototype = C === null ? Object.create(C) : (E.prototype = C.prototype, new E()); }), u = /^\w[\w\d+.-]*$/, f = /^\//, m = /^\/\//; function b(A, C) { if (!A.scheme && C) throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(A.authority, '", path: "').concat(A.path, '", query: "').concat(A.query, '", fragment: "').concat(A.fragment, '"}')); if (A.scheme && !u.test(A.scheme)) throw new Error("[UriError]: Scheme contains illegal characters."); if (A.path) { if (A.authority) { if (!f.test(A.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(A.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); } } var v = "", y = "/", w = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, S = function() { function A(C, E, L, G, X, Z) { Z === void 0 && (Z = !1), typeof C == "object" ? (this.scheme = C.scheme || v, this.authority = C.authority || v, this.path = C.path || v, this.query = C.query || v, this.fragment = C.fragment || v) : (this.scheme = function(je, xe) { return je || xe ? je : "file"; }(C, Z), this.authority = E || v, this.path = function(je, xe) { switch (je) { case "https": case "http": case "file": xe ? xe[0] !== y && (xe = y + xe) : xe = y; } return xe; }(this.scheme, L || v), this.query = G || v, this.fragment = X || v, b(this, Z)); } return A.isUri = function(C) { return C instanceof A || !!C && typeof C.authority == "string" && typeof C.fragment == "string" && typeof C.path == "string" && typeof C.query == "string" && typeof C.scheme == "string" && typeof C.fsPath == "string" && typeof C.with == "function" && typeof C.toString == "function"; }, Object.defineProperty(A.prototype, "fsPath", { get: function() { return D(this, !1); }, enumerable: !1, configurable: !0 }), A.prototype.with = function(C) { if (!C) return this; var E = C.scheme, L = C.authority, G = C.path, X = C.query, Z = C.fragment; return E === void 0 ? E = this.scheme : E === null && (E = v), L === void 0 ? L = this.authority : L === null && (L = v), G === void 0 ? G = this.path : G === null && (G = v), X === void 0 ? X = this.query : X === null && (X = v), Z === void 0 ? Z = this.fragment : Z === null && (Z = v), E === this.scheme && L === this.authority && G === this.path && X === this.query && Z === this.fragment ? this : new F(E, L, G, X, Z); }, A.parse = function(C, E) { E === void 0 && (E = !1); var L = w.exec(C); return L ? new F(L[2] || v, z(L[4] || v), z(L[5] || v), z(L[7] || v), z(L[9] || v), E) : new F(v, v, v, v, v); }, A.file = function(C) { var E = v; if (a && (C = C.replace(/\\/g, y)), C[0] === y && C[1] === y) { var L = C.indexOf(y, 2); L === -1 ? (E = C.substring(2), C = y) : (E = C.substring(2, L), C = C.substring(L) || y); } return new F("file", E, C, v, v); }, A.from = function(C) { var E = new F(C.scheme, C.authority, C.path, C.query, C.fragment); return b(E, !0), E; }, A.prototype.toString = function(C) { return C === void 0 && (C = !1), R(this, C); }, A.prototype.toJSON = function() { return this; }, A.revive = function(C) { if (C) { if (C instanceof A) return C; var E = new F(C); return E._formatted = C.external, E._fsPath = C._sep === k ? C.fsPath : null, E; } return C; }, A; }(), k = a ? 1 : void 0, F = function(A) { function C() { var E = A !== null && A.apply(this, arguments) || this; return E._formatted = null, E._fsPath = null, E; } return h(C, A), Object.defineProperty(C.prototype, "fsPath", { get: function() { return this._fsPath || (this._fsPath = D(this, !1)), this._fsPath; }, enumerable: !1, configurable: !0 }), C.prototype.toString = function(E) { return E === void 0 && (E = !1), E ? R(this, !0) : (this._formatted || (this._formatted = R(this, !1)), this._formatted); }, C.prototype.toJSON = function() { var E = { $mid: 1 }; return this._fsPath && (E.fsPath = this._fsPath, E._sep = k), 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; }, C; }(S), N = ((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 B(A, C) { for (var E = void 0, L = -1, G = 0; G < A.length; G++) { var X = A.charCodeAt(G); if (X >= 97 && X <= 122 || X >= 65 && X <= 90 || X >= 48 && X <= 57 || X === 45 || X === 46 || X === 95 || X === 126 || C && X === 47) L !== -1 && (E += encodeURIComponent(A.substring(L, G)), L = -1), E !== void 0 && (E += A.charAt(G)); else { E === void 0 && (E = A.substr(0, G)); var Z = N[X]; Z !== void 0 ? (L !== -1 && (E += encodeURIComponent(A.substring(L, G)), L = -1), E += Z) : L === -1 && (L = G); } } return L !== -1 && (E += encodeURIComponent(A.substring(L))), E !== void 0 ? E : A; } function H(A) { for (var C = void 0, E = 0; E < A.length; E++) { var L = A.charCodeAt(E); L === 35 || L === 63 ? (C === void 0 && (C = A.substr(0, E)), C += N[L]) : C !== void 0 && (C += A[E]); } return C !== void 0 ? C : A; } function D(A, C) { var E; return E = A.authority && A.path.length > 1 && A.scheme === "file" ? "//".concat(A.authority).concat(A.path) : A.path.charCodeAt(0) === 47 && (A.path.charCodeAt(1) >= 65 && A.path.charCodeAt(1) <= 90 || A.path.charCodeAt(1) >= 97 && A.path.charCodeAt(1) <= 122) && A.path.charCodeAt(2) === 58 ? C ? A.path.substr(1) : A.path[1].toLowerCase() + A.path.substr(2) : A.path, a && (E = E.replace(/\//g, "\\")), E; } function R(A, C) { var E = C ? H : B, L = "", G = A.scheme, X = A.authority, Z = A.path, je = A.query, xe = A.fragment; if (G && (L += G, L += ":"), (X || G === "file") && (L += y, L += y), X) { var Ee = X.indexOf("@"); if (Ee !== -1) { var mt = X.substr(0, Ee); X = X.substr(Ee + 1), (Ee = mt.indexOf(":")) === -1 ? L += E(mt, !1) : (L += E(mt.substr(0, Ee), !1), L += ":", L += E(mt.substr(Ee + 1), !1)), L += "@"; } (Ee = (X = X.toLowerCase()).indexOf(":")) === -1 ? L += E(X, !1) : (L += E(X.substr(0, Ee), !1), L += X.substr(Ee)); } if (Z) { if (Z.length >= 3 && Z.charCodeAt(0) === 47 && Z.charCodeAt(2) === 58) (Ye = Z.charCodeAt(1)) >= 65 && Ye <= 90 && (Z = "/".concat(String.fromCharCode(Ye + 32), ":").concat(Z.substr(3))); else if (Z.length >= 2 && Z.charCodeAt(1) === 58) { var Ye; (Ye = Z.charCodeAt(0)) >= 65 && Ye <= 90 && (Z = "".concat(String.fromCharCode(Ye + 32), ":").concat(Z.substr(2))); } L += E(Z, !0); } return je && (L += "?", L += E(je, !1)), xe && (L += "#", L += C ? xe : B(xe, !1)), L; } function I(A) { try { return decodeURIComponent(A); } catch { return A.length > 3 ? A.substr(0, 3) + I(A.substr(3)) : A; } } var P = /(%[0-9A-Za-z][0-9A-Za-z])+/g; function z(A) { return A.match(P) ? A.replace(P, function(C) { return I(C); }) : A; } var V, q = s(470), ie = function(A, C, E) { if (E || arguments.length === 2) for (var L, G = 0, X = C.length; G < X; G++) !L && G in C || (L || (L = Array.prototype.slice.call(C, 0, G)), L[G] = C[G]); return A.concat(L || Array.prototype.slice.call(C)); }, de = q.posix || q; (function(A) { A.joinPath = function(C) { for (var E = [], L = 1; L < arguments.length; L++) E[L - 1] = arguments[L]; return C.with({ path: de.join.apply(de, ie([C.path], E, !1)) }); }, A.resolvePath = function(C) { for (var E = [], L = 1; L < arguments.length; L++) E[L - 1] = arguments[L]; var G = C.path || "/"; return C.with({ path: de.resolve.apply(de, ie([G], E, !1)) }); }, A.dirname = function(C) { var E = de.dirname(C.path); return E.length === 1 && E.charCodeAt(0) === 46 ? C : C.with({ path: E }); }, A.basename = function(C) { return de.basename(C.path); }, A.extname = function(C) { return de.extname(C.path); }; })(V || (V = {})); } }, t = {}; function n(r) { if (t[r]) return t[r].exports; var i = t[r] = { exports: {} }; return e[r](i, i.exports, n), i.exports; } return n.d = (r, i) => { 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: Ai, Utils: oi } = Sl, au = function(e, t, n) { if (n || arguments.length === 2) for (var r = 0, i = t.length, s; r < i; r++) (s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]); return e.concat(s || Array.prototype.slice.call(t)); }; function vr(e) { return oi.dirname(Ai.parse(e)).toString(); } function li(e) { for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; return oi.joinPath.apply(oi, au([Ai.parse(e)], t, !1)).toString(); } var fo = function(e, t, n, r) { function i(s) { return s instanceof n ? s : new n(function(a) { a(s); }); } return new (n || (n = Promise))(function(s, a) { function o(h) { try { c(r.next(h)); } catch (u) { a(u); } } function l(h) { try { c(r.throw(h)); } catch (u) { a(u); } } function c(h) { h.done ? s(h.value) : i(h.value).then(o, l); } c((r = r.apply(e, t || [])).next()); }); }, mo = function(e, t) { var n = { label: 0, sent: function() { if (s[0] & 1) throw s[1]; return s[1]; }, trys: [], ops: [] }, r, i, s, a; return a = { next: o(0), throw: o(1), return: o(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() { return this; }), a; function o(c) { return function(h) { return l([c, h]); }; } function l(c) { if (r) throw new TypeError("Generator is already executing."); for (; n; ) try { if (r = 1, i && (s = c[0] & 2 ? i.return : c[0] ? i.throw || ((s = i.return) && s.call(i), 0) : i.next) && !(s = s.call(i, c[1])).done) return s; switch (i = 0, s && (c = [c[0] & 2, s.value]), c[0]) { case 0: case 1: s = c; break; case 4: return n.label++, { value: c[1], done: !1 }; case 5: n.label++, i = c[1], c = [0]; continue; case 7: c = n.ops.pop(), n.trys.pop(); continue; default: if (s = n.trys, !(s = s.length > 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] < s[3])) { n.label = c[1]; break; } if (c[0] === 6 && n.label < s[1]) { n.label = s[1], s = c; break; } if (s && n.label < s[2]) { n.label = s[2], n.ops.push(c); break; } s[2] && n.ops.pop(), n.trys.pop(); continue; } c = t.call(e, n); } catch (h) { c = [6, h], i = 0; } finally { r = s = 0; } if (c[0] & 5) throw c[1]; return { value: c[0] ? c[1] : void 0, done: !0 }; } }, ou = function() { function e(t) { this.readDirectory = t, this.literalCompletions = [], this.importCompletions = []; } return e.prototype.onCssURILiteralValue = function(t) { this.literalCompletions.push(t); }, e.prototype.onCssImportPath = function(t) { this.importCompletions.push(t); }, e.prototype.computeCompletions = function(t, n) { return fo(this, void 0, void 0, function() { var r, i, s, a, o, v, l, c, h, k, u, f, m, b, v, y, w, S, k; return mo(this, function(F) { switch (F.label) { case 0: r = { items: [], isIncomplete: !1 }, i = 0, s = this.literalCompletions, F.label = 1; case 1: return i < s.length ? (a = s[i], o = a.uriValue, v = yr(o), v === "." || v === ".." ? (r.isIncomplete = !0, [3, 4]) : [3, 2]) : [3, 5]; case 2: return [4, this.providePathSuggestions(o, a.position, a.range, t, n)]; case 3: for (l = F.sent(), c = 0, h = l; c < h.length; c++) k = h[c], r.items.push(k); F.label = 4; case 4: return i++, [3, 1]; case 5: u = 0, f = this.importCompletions, F.label = 6; case 6: return u < f.length ? (m = f[u], b = m.pathValue, v = yr(b), v === "." || v === ".." ? (r.isIncomplete = !0, [3, 9]) : [3, 7]) : [3, 10]; case 7: return [4, this.providePathSuggestions(b, m.position, m.range, t, n)]; case 8: for (y = F.sent(), t.languageId === "scss" && y.forEach(function(N) { pe(N.label, "_") && il(N.label, ".scss") && (N.textEdit ? N.textEdit.newText = N.label.slice(1, -5) : N.label = N.label.slice(1, -5)); }), w = 0, S = y; w < S.length; w++) k = S[w], r.items.push(k); F.label = 9; case 9: return u++, [3, 6]; case 10: return [2, r]; } }); }); }, e.prototype.providePathSuggestions = function(t, n, r, i, s) { return fo(this, void 0, void 0, function() { var a, o, l, c, h, u, f, m, b, v, y, w, S, k, F; return mo(this, function(N) { switch (N.label) { case 0: if (a = yr(t), o = pe(t, "'") || pe(t, '"'), l = o ? a.slice(0, n.character - (r.start.character + 1)) : a.slice(0, n.character - r.start.character), c = i.uri, h = o ? du(r, 1, -1) : r, u = cu(l, a, h), f = l.substring(0, l.lastIndexOf("/") + 1), m = s.resolveReference(f || ".", c), !m) return [3, 4]; N.label = 1; case 1: return N.trys.push([1, 3, , 4]), b = [], [4, this.readDirectory(m)]; case 2: for (v = N.sent(), y = 0, w = v; y < w.length; y++) S = w[y], k = S[0], F = S[1], k.charCodeAt(0) !== lu && (F === fn.Directory || li(m, k) !== c) && b.push(hu(k, F === fn.Directory, u)); return [2, b]; case 3: return N.sent(), [3, 4]; case 4: return [2, []]; } }); }); }, e; }(), lu = ".".charCodeAt(0); function yr(e) { return pe(e, "'") || pe(e, '"') ? e.slice(1, -1) : e; } function cu(e, t, n) { var r, i = e.lastIndexOf("/"); if (i === -1) r = n; else { var s = t.slice(i + 1), a = er(n.end, -s.length), o = s.indexOf(" "), l = void 0; o !== -1 ? l = er(a, o) : l = n.end, r = ee.create(a, l); } return r; } function hu(e, t, n) { return t ? (e = e + "/", { label: An(e), kind: j.Folder, textEdit: $.replace(n, An(e)), command: { title: "Suggest", command: "editor.action.triggerSuggest" } }) : { label: An(e), kind: j.File, textEdit: $.replace(n, An(e)) }; } function An(e) { return e.replace(/(\s|\(|\)|,|"|')/g, "\\$1"); } function er(e, t) { return Ce.create(e.line, e.character + t); } function du(e, t, n) { var r = er(e.start, t), i = er(e.end, n); return ee.create(r, i); } var uu = function(e, t, n, r) { function i(s) { return s instanceof n ? s : new n(function(a) { a(s); }); } return new (n || (n = Promise))(function(s, a) { function o(h) { try { c(r.next(h)); } catch (u) { a(u); } } function l(h) { try { c(r.throw(h)); } catch (u) { a(u); } } function c(h) { h.done ? s(h.value) : i(h.value).then(o, l); } c((r = r.apply(e, t || [])).next()); }); }, pu = function(e, t) { var n = { label: 0, sent: function() { if (s[0] & 1) throw s[1]; return s[1]; }, trys: [], ops: [] }, r, i, s, a; return a = { next: o(0), throw: o(1), return: o(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() { return this; }), a; function o(c) { return function(h) { return l([c, h]); }; } function l(c) { if (r) throw new TypeError("Generator is already executing."); for (; n; ) try { if (r = 1, i && (s = c[0] & 2 ? i.return : c[0] ? i.throw || ((s = i.return) && s.call(i), 0) : i.next) && !(s = s.call(i, c[1])).done) return s; switch (i = 0, s && (c = [c[0] & 2, s.value]), c[0]) { case 0: case 1: s = c; break; case 4: return n.label++, { value: c[1], done: !1 }; case 5: n.label++, i = c[1], c = [0]; continue; case 7: c = n.ops.pop(), n.trys.pop(); continue; default: if (s = n.trys, !(s = s.length > 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] < s[3])) { n.label = c[1]; break; } if (c[0] === 6 && n.label < s[1]) { n.label = s[1], s = c; break; } if (s && n.label < s[2]) { n.label = s[2], n.ops.push(c); break; } s[2] && n.ops.pop(), n.trys.pop(); continue; } c = t.call(e, n); } catch (h) { c = [6, h], i = 0; } finally { r = s = 0; } if (c[0] & 5) throw c[1]; return { value: c[0] ? c[1] : void 0, done: !0 }; } }, fu = Be(), Qe = Ae.Snippet, go = { title: "Suggest", command: "editor.action.triggerSuggest" }, qe; (function(e) { e.Enums = " ", e.Normal = "d", e.VendorPrefixed = "x", e.Term = "y", e.Variable = "z"; })(qe || (qe = {})); var zi = function() { function e(t, n, r) { t === void 0 && (t = null), this.variablePrefix = t, this.lsOptions = n, this.cssDataManager = r, this.completionParticipants = []; } return e.prototype.configure = function(t) { this.defaultSettings = t; }, e.prototype.getSymbolContext = function() { return this.symbolContext || (this.symbolContext = new ai(this.styleSheet)), this.symbolContext; }, e.prototype.setCompletionParticipants = function(t) { this.completionParticipants = t || []; }, e.prototype.doComplete2 = function(t, n, r, i, s) { return s === void 0 && (s = this.defaultSettings), uu(this, void 0, void 0, function() { var a, o, l, c; return pu(this, function(h) { switch (h.label) { case 0: if (!this.lsOptions.fileSystemProvider || !this.lsOptions.fileSystemProvider.readDirectory) return [2, this.doComplete(t, n, r, s)]; a = new ou(this.lsOptions.fileSystemProvider.readDirectory), o = this.completionParticipants, this.completionParticipants = [a].concat(o), l = this.doComplete(t, n, r, s), h.label = 1; case 1: return h.trys.push([1, , 3, 4]), [4, a.computeCompletions(t, i)]; case 2: return c = h.sent(), [2, { isIncomplete: l.isIncomplete || c.isIncomplete, items: c.items.concat(l.items) }]; case 3: return this.completionParticipants = o, [7]; case 4: return [2]; } }); }); }, e.prototype.doComplete = function(t, n, r, i) { this.offset = t.offsetAt(n), this.position = n, this.currentWord = vu(t, this.offset), this.defaultReplaceRange = ee.create(Ce.create(this.position.line, this.position.character - this.currentWord.length), this.position), this.textDocument = t, this.styleSheet = r, this.documentSettings = i; try { var s = { isIncomplete: !1, items: [] }; this.nodePath = wi(this.styleSheet, this.offset); for (var a = this.nodePath.length - 1; a >= 0; a--) { var o = this.nodePath[a]; if (o instanceof Ci) this.getCompletionsForDeclarationProperty(o.getParent(), s); else if (o instanceof dl) o.parent instanceof Yr ? this.getVariableProposals(null, s) : this.getCompletionsForExpression(o, s); else if (o instanceof Tt) { var l = o.findAParent(g.ExtendsReference, g.Ruleset); if (l) if (l.type === g.ExtendsReference) this.getCompletionsForExtendsReference(l, o, s); else { var c = l; this.getCompletionsForSelector(c, c && c.isNested(), s); } } else if (o instanceof Vt) this.getCompletionsForFunctionArgument(o, o.getParent(), s); else if (o instanceof xi) this.getCompletionsForDeclarations(o, s); else if (o instanceof ar) this.getCompletionsForVariableDeclaration(o, s); else if (o instanceof Lt) this.getCompletionsForRuleSet(o, s); else if (o instanceof Yr) this.getCompletionsForInterpolation(o, s); else if (o instanceof qn) this.getCompletionsForFunctionDeclaration(o, s); else if (o instanceof $n) this.getCompletionsForMixinReference(o, s); else if (o instanceof yn) this.getCompletionsForFunctionArgument(null, o, s); else if (o instanceof Xr) this.getCompletionsForSupports(o, s); else if (o instanceof rn) this.getCompletionsForSupportsCondition(o, s); else if (o instanceof on) this.getCompletionsForExtendsReference(o, null, s); else if (o.type === g.URILiteral) this.getCompletionForUriLiteralValue(o, s); else if (o.parent === null) this.getCompletionForTopLevel(s); else if (o.type === g.StringLiteral && this.isImportPathParent(o.parent.type)) this.getCompletionForImportPath(o, s); else continue; if (s.items.length > 0 || this.offset > o.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; } }, e.prototype.isImportPathParent = function(t) { return t === g.Import; }, e.prototype.finalize = function(t) { return t; }, e.prototype.findInNodePath = function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; for (var r = this.nodePath.length - 1; r >= 0; r--) { var i = this.nodePath[r]; if (t.indexOf(i.type) !== -1) return i; } return null; }, e.prototype.getCompletionsForDeclarationProperty = function(t, n) { return this.getPropertyProposals(t, n); }, e.prototype.getPropertyProposals = function(t, n) { var r = this, i = this.isTriggerPropertyValueCompletionEnabled, s = this.isCompletePropertyWithSemicolonEnabled, a = this.cssDataManager.getProperties(); return a.forEach(function(o) { var l, c, h = !1; t ? (l = r.getCompletionRange(t.getProperty()), c = o.name, Ne(t.colonPosition) || (c += ": ", h = !0)) : (l = r.getCompletionRange(null), c = o.name + ": ", h = !0), !t && s && (c += "$0;"), t && !t.semicolonPosition && s && r.offset >= r.textDocument.offsetAt(l.end) && (c += "$0;"); var u = { label: o.name, documentation: dt(o, r.doesSupportMarkdown()), tags: Kt(o) ? [wt.Deprecated] : [], textEdit: $.replace(l, c), insertTextFormat: Ae.Snippet, kind: j.Property }; o.restrictions || (h = !1), i && h && (u.command = go); var f = typeof o.relevance == "number" ? Math.min(Math.max(o.relevance, 0), 99) : 50, m = (255 - f).toString(16), b = pe(o.name, "-") ? qe.VendorPrefixed : qe.Normal; u.sortText = b + "_" + m, n.items.push(u); }), this.completionParticipants.forEach(function(o) { o.onCssProperty && o.onCssProperty({ propertyName: r.currentWord, range: r.defaultReplaceRange }); }), n; }, Object.defineProperty(e.prototype, "isTriggerPropertyValueCompletionEnabled", { get: function() { var t, n; return (n = (t = this.documentSettings) === null || t === void 0 ? void 0 : t.triggerPropertyValueCompletion) !== null && n !== void 0 ? n : !0; }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "isCompletePropertyWithSemicolonEnabled", { get: function() { var t, n; return (n = (t = this.documentSettings) === null || t === void 0 ? void 0 : t.completePropertyWithSemicolon) !== null && n !== void 0 ? n : !0; }, enumerable: !1, configurable: !0 }), e.prototype.getCompletionsForDeclarationValue = function(t, n) { for (var r = this, i = t.getFullPropertyName(), s = this.cssDataManager.getProperty(i), a = t.getValue() || null; a && a.hasChildren(); ) a = a.findChildAtOffset(this.offset, !1); if (this.completionParticipants.forEach(function(b) { b.onCssPropertyValue && b.onCssPropertyValue({ propertyName: i, propertyValue: r.currentWord, range: r.getCompletionRange(a) }); }), s) { if (s.restrictions) for (var o = 0, l = s.restrictions; o < l.length; o++) { var c = l[o]; switch (c) { case "color": this.getColorProposals(s, a, n); break; case "position": this.getPositionProposals(s, a, n); break; case "repeat": this.getRepeatStyleProposals(s, a, n); break; case "line-style": this.getLineStyleProposals(s, a, n); break; case "line-width": this.getLineWidthProposals(s, a, n); break; case "geometry-box": this.getGeometryBoxProposals(s, a, n); break; case "box": this.getBoxProposals(s, a, n); break; case "image": this.getImageProposals(s, a, n); break; case "timing-function": this.getTimingFunctionProposals(s, a, n); break; case "shape": this.getBasicShapeProposals(s, a, n); break; } } this.getValueEnumProposals(s, a, n), this.getCSSWideKeywordProposals(s, a, n), this.getUnitProposals(s, a, n); } else for (var h = mu(this.styleSheet, t), u = 0, f = h.getEntries(); u < f.length; u++) { var m = f[u]; n.items.push({ label: m, textEdit: $.replace(this.getCompletionRange(a), m), kind: j.Value }); } return this.getVariableProposals(a, n), this.getTermProposals(s, a, n), n; }, e.prototype.getValueEnumProposals = function(t, n, r) { if (t.values) for (var i = 0, s = t.values; i < s.length; i++) { var a = s[i], o = a.name, l = void 0; if (il(o, ")")) { var c = o.lastIndexOf("("); c !== -1 && (o = o.substr(0, c) + "($1)", l = Qe); } var h = qe.Enums; pe(a.name, "-") && (h += qe.VendorPrefixed); var u = { label: a.name, documentation: dt(a, this.doesSupportMarkdown()), tags: Kt(t) ? [wt.Deprecated] : [], textEdit: $.replace(this.getCompletionRange(n), o), sortText: h, kind: j.Value, insertTextFormat: l }; r.items.push(u); } return r; }, e.prototype.getCSSWideKeywordProposals = function(t, n, r) { for (var i in oo) r.items.push({ label: i, documentation: oo[i], textEdit: $.replace(this.getCompletionRange(n), i), kind: j.Value }); for (var s in lo) { var a = zt(s); r.items.push({ label: s, documentation: lo[s], textEdit: $.replace(this.getCompletionRange(n), a), kind: j.Function, insertTextFormat: Qe, command: pe(s, "var") ? go : void 0 }); } return r; }, e.prototype.getCompletionsForInterpolation = function(t, n) { return this.offset >= t.offset + 2 && this.getVariableProposals(null, n), n; }, e.prototype.getVariableProposals = function(t, n) { for (var r = this.getSymbolContext().findSymbolsAtOffset(this.offset, Y.Variable), i = 0, s = r; i < s.length; i++) { var a = s[i], o = pe(a.name, "--") ? "var(".concat(a.name, ")") : a.name, l = { label: a.name, documentation: a.value ? va(a.value) : a.value, textEdit: $.replace(this.getCompletionRange(t), o), kind: j.Variable, sortText: qe.Variable }; if (typeof l.documentation == "string" && bo(l.documentation) && (l.kind = j.Color), a.node.type === g.FunctionParameter) { var c = a.node.getParent(); c.type === g.MixinDeclaration && (l.detail = fu("completion.argument", "argument from '{0}'", c.getName())); } n.items.push(l); } return n; }, e.prototype.getVariableProposalsForCSSVarFunction = function(t) { var n = new ci(); this.styleSheet.acceptVisitor(new bu(n, this.offset)); for (var r = this.getSymbolContext().findSymbolsAtOffset(this.offset, Y.Variable), i = 0, s = r; i < s.length; i++) { var a = s[i]; if (pe(a.name, "--")) { var o = { label: a.name, documentation: a.value ? va(a.value) : a.value, textEdit: $.replace(this.getCompletionRange(null), a.name), kind: j.Variable }; typeof o.documentation == "string" && bo(o.documentation) && (o.kind = j.Color), t.items.push(o); } n.remove(a.name); } for (var l = 0, c = n.getEntries(); l < c.length; l++) { var h = c[l]; if (pe(h, "--")) { var o = { label: h, textEdit: $.replace(this.getCompletionRange(null), h), kind: j.Variable }; t.items.push(o); } } return t; }, e.prototype.getUnitProposals = function(t, n, r) { var i = "0"; if (this.currentWord.length > 0) { 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 === g.Term && (n = n.getParent()), t.restrictions) for (var a = 0, o = t.restrictions; a < o.length; a++) { var l = o[a], c = yl[l]; if (c) for (var h = 0, u = c; h < u.length; h++) { var f = u[h], m = i + f; r.items.push({ label: m, textEdit: $.replace(this.getCompletionRange(n), m), kind: j.Unit }); } } return r; }, e.prototype.getCompletionRange = function(t) { if (t && t.offset <= this.offset && this.offset <= t.end) { var n = t.end !== -1 ? this.textDocument.positionAt(t.end) : this.position, r = this.textDocument.positionAt(t.offset); if (r.line === n.line) return ee.create(r, n); } return this.defaultReplaceRange; }, e.prototype.getColorProposals = function(t, n, r) { for (var i in Zn) r.items.push({ label: i, documentation: Zn[i], textEdit: $.replace(this.getCompletionRange(n), i), kind: j.Color }); for (var i in Qa) r.items.push({ label: i, documentation: Qa[i], textEdit: $.replace(this.getCompletionRange(n), i), kind: j.Value }); var s = new ci(); this.styleSheet.acceptVisitor(new gu(s, this.offset)); for (var a = 0, o = s.getEntries(); a < o.length; a++) { var i = o[a]; r.items.push({ label: i, textEdit: $.replace(this.getCompletionRange(n), i), kind: j.Color }); } for (var l = function(m) { var b = 1, v = function(w, S) { return "${" + b++ + ":" + S + "}"; }, y = m.func.replace(/\[?\$(\w+)\]?/g, v); r.items.push({ label: m.func.substr(0, m.func.indexOf("(")), detail: m.func, documentation: m.desc, textEdit: $.replace(c.getCompletionRange(n), y), insertTextFormat: Qe, kind: j.Function }); }, c = this, h = 0, u = qd; h < u.length; h++) { var f = u[h]; l(f); } return r; }, e.prototype.getPositionProposals = function(t, n, r) { for (var i in no) r.items.push({ label: i, documentation: no[i], textEdit: $.replace(this.getCompletionRange(n), i), kind: j.Value }); return r; }, e.prototype.getRepeatStyleProposals = function(t, n, r) { for (var i in ro) r.items.push({ label: i, documentation: ro[i], textEdit: $.replace(this.getCompletionRange(n), i), kind: j.Value }); return r; }, e.prototype.getLineStyleProposals = function(t, n, r) { for (var i in io) r.items.push({ label: i, documentation: io[i], textEdit: $.replace(this.getCompletionRange(n), i), kind: j.Value }); return r; }, e.prototype.getLineWidthProposals = function(t, n, r) { for (var i = 0, s = Qd; i < s.length; i++) { var a = s[i]; r.items.push({ label: a, textEdit: $.replace(this.getCompletionRange(n), a), kind: j.Value }); } return r; }, e.prototype.getGeometryBoxProposals = function(t, n, r) { for (var i in ao) r.items.push({ label: i, documentation: ao[i], textEdit: $.replace(this.getCompletionRange(n), i), kind: j.Value }); return r; }, e.prototype.getBoxProposals = function(t, n, r) { for (var i in so) r.items.push({ label: i, documentation: so[i], textEdit: $.replace(this.getCompletionRange(n), i), kind: j.Value }); return r; }, e.prototype.getImageProposals = function(t, n, r) { for (var i in co) { var s = zt(i); r.items.push({ label: i, documentation: co[i], textEdit: $.replace(this.getCompletionRange(n), s), kind: j.Function, insertTextFormat: i !== s ? Qe : void 0 }); } return r; }, e.prototype.getTimingFunctionProposals = function(t, n, r) { for (var i in ho) { var s = zt(i); r.items.push({ label: i, documentation: ho[i], textEdit: $.replace(this.getCompletionRange(n), s), kind: j.Function, insertTextFormat: i !== s ? Qe : void 0 }); } return r; }, e.prototype.getBasicShapeProposals = function(t, n, r) { for (var i in uo) { var s = zt(i); r.items.push({ label: i, documentation: uo[i], textEdit: $.replace(this.getCompletionRange(n), s), kind: j.Function, insertTextFormat: i !== s ? Qe : void 0 }); } return r; }, e.prototype.getCompletionsForStylesheet = function(t) { var n = this.styleSheet.findFirstChildBeforeOffset(this.offset); return n ? n instanceof Lt ? this.getCompletionsForRuleSet(n, t) : n instanceof Xr ? this.getCompletionsForSupports(n, t) : t : this.getCompletionForTopLevel(t); }, e.prototype.getCompletionForTopLevel = function(t) { var n = this; return this.cssDataManager.getAtDirectives().forEach(function(r) { t.items.push({ label: r.name, textEdit: $.replace(n.getCompletionRange(null), r.name), documentation: dt(r, n.doesSupportMarkdown()), tags: Kt(r) ? [wt.Deprecated] : [], kind: j.Keyword }); }), this.getCompletionsForSelector(null, !1, t), t; }, e.prototype.getCompletionsForRuleSet = function(t, n) { var r = t.getDeclarations(), i = r && r.endsWith("}") && this.offset >= r.end; if (i) return this.getCompletionForTopLevel(n); var s = !r || this.offset <= r.offset; return s ? this.getCompletionsForSelector(t, t.isNested(), n) : this.getCompletionsForDeclarations(t.getDeclarations(), n); }, e.prototype.getCompletionsForSelector = function(t, n, r) { var i = this, s = this.findInNodePath(g.PseudoSelector, g.IdentifierSelector, g.ClassSelector, g.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 = ee.create(Ce.create(this.position.line, this.position.character - this.currentWord.length), this.position)); var a = this.cssDataManager.getPseudoClasses(); a.forEach(function(y) { var w = zt(y.name), S = { label: y.name, textEdit: $.replace(i.getCompletionRange(s), w), documentation: dt(y, i.doesSupportMarkdown()), tags: Kt(y) ? [wt.Deprecated] : [], kind: j.Function, insertTextFormat: y.name !== w ? Qe : void 0 }; pe(y.name, ":-") && (S.sortText = qe.VendorPrefixed), r.items.push(S); }); var o = this.cssDataManager.getPseudoElements(); if (o.forEach(function(y) { var w = zt(y.name), S = { label: y.name, textEdit: $.replace(i.getCompletionRange(s), w), documentation: dt(y, i.doesSupportMarkdown()), tags: Kt(y) ? [wt.Deprecated] : [], kind: j.Function, insertTextFormat: y.name !== w ? Qe : void 0 }; pe(y.name, "::-") && (S.sortText = qe.VendorPrefixed), r.items.push(S); }), !n) { for (var l = 0, c = Zd; l < c.length; l++) { var h = c[l]; r.items.push({ label: h, textEdit: $.replace(this.getCompletionRange(s), h), kind: j.Keyword }); } for (var u = 0, f = eu; u < f.length; u++) { var h = f[u]; r.items.push({ label: h, textEdit: $.replace(this.getCompletionRange(s), h), kind: j.Keyword }); } } var m = {}; m[this.currentWord] = !0; var b = this.textDocument.getText(); if (this.styleSheet.accept(function(y) { if (y.type === g.SimpleSelector && y.length > 0) { var w = b.substr(y.offset, y.length); return w.charAt(0) === "." && !m[w] && (m[w] = !0, r.items.push({ label: w, textEdit: $.replace(i.getCompletionRange(s), w), kind: j.Keyword })), !1; } return !0; }), t && t.isNested()) { var v = t.getSelectors().findFirstChildBeforeOffset(this.offset); v && t.getSelectors().getChildren().indexOf(v) === 0 && this.getPropertyProposals(null, r); } return r; }, e.prototype.getCompletionsForDeclarations = function(t, n) { if (!t || this.offset === t.offset) return n; var r = t.findFirstChildBeforeOffset(this.offset); if (!r) return this.getCompletionsForDeclarationProperty(null, n); if (r instanceof Si) { var i = r; if (!Ne(i.colonPosition) || this.offset <= i.colonPosition) return this.getCompletionsForDeclarationProperty(i, n); if (Ne(i.semicolonPosition) && i.semicolonPosition < this.offset) return this.offset === i.semicolonPosition + 1 ? n : this.getCompletionsForDeclarationProperty(null, n); if (i instanceof Je) return this.getCompletionsForDeclarationValue(i, n); } else r instanceof on ? this.getCompletionsForExtendsReference(r, null, n) : this.currentWord && this.currentWord[0] === "@" ? this.getCompletionsForDeclarationProperty(null, n) : r instanceof Lt && this.getCompletionsForDeclarationProperty(null, n); return n; }, e.prototype.getCompletionsForVariableDeclaration = function(t, n) { return this.offset && Ne(t.colonPosition) && this.offset > t.colonPosition && this.getVariableProposals(t.getValue(), n), n; }, e.prototype.getCompletionsForExpression = function(t, n) { var r = t.getParent(); if (r instanceof Vt) return this.getCompletionsForFunctionArgument(r, r.getParent(), n), n; var i = t.findParent(g.Declaration); if (!i) return this.getTermProposals(void 0, null, n), n; var s = t.findChildAtOffset(this.offset, !0); return s ? s instanceof Ri || s instanceof Pe ? this.getCompletionsForDeclarationValue(i, n) : n : this.getCompletionsForDeclarationValue(i, n); }, e.prototype.getCompletionsForFunctionArgument = function(t, n, r) { var i = n.getIdentifier(); return i && i.matches("var") && (!n.getArguments().hasChildren() || n.getArguments().getChild(0) === t) && this.getVariableProposalsForCSSVarFunction(r), r; }, e.prototype.getCompletionsForFunctionDeclaration = function(t, n) { var r = t.getDeclarations(); return r && this.offset > r.offset && this.offset < r.end && this.getTermProposals(void 0, null, n), n; }, e.prototype.getCompletionsForMixinReference = function(t, n) { for (var r = this, i = this.getSymbolContext().findSymbolsAtOffset(this.offset, Y.Mixin), s = 0, a = i; s < a.length; s++) { var o = a[s]; o.node instanceof ln && n.items.push(this.makeTermProposal(o, o.node.getParameters(), null)); } var l = t.getIdentifier() || null; return this.completionParticipants.forEach(function(c) { c.onCssMixinReference && c.onCssMixinReference({ mixinName: r.currentWord, range: r.getCompletionRange(l) }); }), n; }, e.prototype.getTermProposals = function(t, n, r) { for (var i = this.getSymbolContext().findSymbolsAtOffset(this.offset, Y.Function), s = 0, a = i; s < a.length; s++) { var o = a[s]; o.node instanceof qn && r.items.push(this.makeTermProposal(o, o.node.getParameters(), n)); } return r; }, e.prototype.makeTermProposal = function(t, n, r) { t.node; var i = n.getChildren().map(function(a) { return a instanceof sr ? a.getName() : a.getText(); }), s = t.name + "(" + i.map(function(a, o) { return "${" + (o + 1) + ":" + a + "}"; }).join(", ") + ")"; return { label: t.name, detail: t.name + "(" + i.join(", ") + ")", textEdit: $.replace(this.getCompletionRange(r), s), insertTextFormat: Qe, kind: j.Function, sortText: qe.Term }; }, e.prototype.getCompletionsForSupportsCondition = function(t, n) { var r = t.findFirstChildBeforeOffset(this.offset); if (r) { if (r instanceof Je) return !Ne(r.colonPosition) || this.offset <= r.colonPosition ? this.getCompletionsForDeclarationProperty(r, n) : this.getCompletionsForDeclarationValue(r, n); if (r instanceof rn) return this.getCompletionsForSupportsCondition(r, n); } return Ne(t.lParent) && this.offset > t.lParent && (!Ne(t.rParent) || this.offset <= t.rParent) ? this.getCompletionsForDeclarationProperty(null, n) : n; }, e.prototype.getCompletionsForSupports = function(t, n) { var r = t.getDeclarations(), i = !r || this.offset <= r.offset; if (i) { var s = t.findFirstChildBeforeOffset(this.offset); return s instanceof rn ? this.getCompletionsForSupportsCondition(s, n) : n; } return this.getCompletionForTopLevel(n); }, e.prototype.getCompletionsForExtendsReference = function(t, n, r) { return r; }, e.prototype.getCompletionForUriLiteralValue = function(t, n) { var r, i, s; if (t.hasChildren()) { var o = t.getChild(0); r = o.getText(), i = this.position, s = this.getCompletionRange(o); } else { r = "", i = this.position; var a = this.textDocument.positionAt(t.offset + 4); s = ee.create(a, a); } return this.completionParticipants.forEach(function(l) { l.onCssURILiteralValue && l.onCssURILiteralValue({ uriValue: r, position: i, range: s }); }), n; }, e.prototype.getCompletionForImportPath = function(t, n) { var r = this; return this.completionParticipants.forEach(function(i) { i.onCssImportPath && i.onCssImportPath({ pathValue: t.getText(), position: r.position, range: r.getCompletionRange(t) }); }), n; }, e.prototype.hasCharacterAtPosition = function(t, n) { var r = this.textDocument.getText(); return t >= 0 && t < r.length && r.charAt(t) === n; }, e.prototype.doesSupportMarkdown = function() { var t, n, r; if (!Ne(this.supportsMarkdown)) { if (!Ne(this.lsOptions.clientCapabilities)) return this.supportsMarkdown = !0, this.supportsMarkdown; var i = (r = (n = (t = this.lsOptions.clientCapabilities.textDocument) === null || t === void 0 ? void 0 : t.completion) === null || n === void 0 ? void 0 : n.completionItem) === null || r === void 0 ? void 0 : r.documentationFormat; this.supportsMarkdown = Array.isArray(i) && i.indexOf(Ie.Markdown) !== -1; } return this.supportsMarkdown; }, e; }(); function Kt(e) { return !!(e.status && (e.status === "nonstandard" || e.status === "obsolete")); } var ci = function() { function e() { this.entries = {}; } return e.prototype.add = function(t) { this.entries[t] = !0; }, e.prototype.remove = function(t) { delete this.entries[t]; }, e.prototype.getEntries = function() { return Object.keys(this.entries); }, e; }(); function zt(e) { return e.replace(/\(\)$/, "($1)"); } function mu(e, t) { var n = t.getFullPropertyName(), r = new ci(); function i(o) { return (o instanceof Pe || o instanceof Ri || o instanceof Fi) && r.add(o.getText()), !0; } function s(o) { var l = o.getFullPropertyName(); return n === l; } function a(o) { if (o instanceof Je && o !== t && s(o)) { var l = o.getValue(); l && l.accept(i); } return !0; } return e.accept(a), r; } var gu = function() { function e(t, n) { this.entries = t, this.currentOffset = n; } return e.prototype.visitNode = function(t) { return (t instanceof Fi || t instanceof yn && $d(t)) && (this.currentOffset < t.offset || t.end < this.currentOffset) && this.entries.add(t.getText()), !0; }, e; }(), bu = function() { function e(t, n) { this.entries = t, this.currentOffset = n; } return e.prototype.visitNode = function(t) { return t instanceof Pe && t.isCustomProperty && (this.currentOffset < t.offset || t.end < this.currentOffset) && this.entries.add(t.getText()), !0; }, e; }(); function vu(e, t) { for (var n = t - 1, r = e.getText(); n >= 0 && ` \r":{[()]},*>+`.indexOf(r.charAt(n)) === -1; ) n--; return r.substring(n + 1, t); } function bo(e) { return e.toLowerCase() in Zn || /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e); } var Cl = function() { var e = function(t, n) { return e = 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]); }, e(t, n); }; return function(t, n) { if (typeof n != "function" && n !== null) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); e(t, n); function r() { this.constructor = t; } t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; }(), yu = Be(), Mi = function() { function e() { this.parent = null, this.children = null, this.attributes = null; } return e.prototype.findAttribute = function(t) { if (this.attributes) for (var n = 0, r = this.attributes; n < r.length; n++) { var i = r[n]; if (i.name === t) return i.value; } return null; }, e.prototype.addChild = function(t) { t instanceof e && (t.parent = this), this.children || (this.children = []), this.children.push(t); }, e.prototype.append = function(t) { if (this.attributes) { var n = this.attributes[this.attributes.length - 1]; n.value = n.value + t; } }, e.prototype.prepend = function(t) { if (this.attributes) { var n = this.attributes[0]; n.value = t + n.value; } }, e.prototype.findRoot = function() { for (var t = this; t.parent && !(t.parent instanceof jt); ) t = t.parent; return t; }, e.prototype.removeChild = function(t) { if (this.children) { var n = this.children.indexOf(t); if (n !== -1) return this.children.splice(n, 1), !0; } return !1; }, e.prototype.addAttr = function(t, n) { this.attributes || (this.attributes = []); for (var r = 0, i = this.attributes; r < i.length; r++) { var s = i[r]; if (s.name === t) { s.value += " " + n; return; } } this.attributes.push({ name: t, value: n }); }, e.prototype.clone = function(t) { t === void 0 && (t = !0); var n = new e(); if (this.attributes) { n.attributes = []; for (var r = 0, i = this.attributes; r < i.length; r++) { var s = i[r]; n.addAttr(s.name, s.value); } } if (t && this.children) { n.children = []; for (var a = 0; a < this.children.length; a++) n.addChild(this.children[a].clone()); } return n; }, e.prototype.cloneWithParent = function() { var t = this.clone(!1); if (this.parent && !(this.parent instanceof jt)) { var n = this.parent.cloneWithParent(); n.addChild(t); } return t; }, e; }(), jt = function(e) { Cl(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return t; }(Mi), hi = function(e) { Cl(t, e); function t(n) { var r = e.call(this) || this; return r.addAttr("name", n), r; } return t; }(Mi), vo = function() { function e(t) { this.quote = t, this.result = []; } return e.prototype.print = function(t) { this.result = [], t instanceof jt ? t.children && this.doPrint(t.children, 0) : this.doPrint([t], 0); var n = this.result.join(` `); return [{ language: "html", value: n }]; }, e.prototype.doPrint = function(t, n) { for (var r = 0, i = t; r < i.length; r++) { var s = i[r]; this.doPrintElement(s, n), s.children && this.doPrint(s.children, n + 1); } }, e.prototype.writeLine = function(t, n) { var r = new Array(t + 1).join(" "); this.result.push(r + n); }, e.prototype.doPrintElement = function(t, n) { var r = t.findAttribute("name"); if (t instanceof hi || r === "…") { this.writeLine(n, r); return; } var i = ["<"]; if (r ? i.push(r) : i.push("element"), t.attributes) for (var s = 0, a = t.attributes; s < a.length; s++) { var o = a[s]; if (o.name !== "name") { i.push(" "), i.push(o.name); var l = o.value; l && (i.push("="), i.push(tt.ensure(l, this.quote))); } } i.push(">"), this.writeLine(n, i.join("")); }, e; }(), tt; (function(e) { function t(r, i) { return i + n(r) + i; } e.ensure = t; function n(r) { var i = r.match(/^['"](.*)["']$/); return i ? i[1] : r; } e.remove = n; })(tt || (tt = {})); var yo = function() { function e() { this.id = 0, this.attr = 0, this.tag = 0; } return e; }(); function kl(e, t) { for (var n = new Mi(), r = 0, i = e.getChildren(); r < i.length; r++) { var s = i[r]; switch (s.type) { case g.SelectorCombinator: if (t) { var a = s.getText().split("&"); if (a.length === 1) { n.addAttr("name", a[0]); break; } if (n = t.cloneWithParent(), a[0]) { var o = n.findRoot(); o.prepend(a[0]); } for (var l = 1; l < a.length; l++) { if (l > 1) { var c = t.cloneWithParent(); n.addChild(c.findRoot()), n = c; } n.append(a[l]); } } break; case g.SelectorPlaceholder: if (s.matches("@at-root")) return n; case g.ElementNameSelector: var h = s.getText(); n.addAttr("name", h === "*" ? "element" : Me(h)); break; case g.ClassSelector: n.addAttr("class", Me(s.getText().substring(1))); break; case g.IdentifierSelector: n.addAttr("id", Me(s.getText().substring(1))); break; case g.MixinDeclaration: n.addAttr("class", s.getName()); break; case g.PseudoSelector: n.addAttr(Me(s.getText()), ""); break; case g.AttributeSelector: var u = s, f = u.getIdentifier(); if (f) { var m = u.getValue(), b = u.getOperator(), v = void 0; if (m && b) switch (Me(b.getText())) { case "|=": v = "".concat(tt.remove(Me(m.getText())), "-…"); break; case "^=": v = "".concat(tt.remove(Me(m.getText())), "…"); break; case "$=": v = "…".concat(tt.remove(Me(m.getText()))); break; case "~=": v = " … ".concat(tt.remove(Me(m.getText())), " … "); break; case "*=": v = "…".concat(tt.remove(Me(m.getText())), "…"); break; default: v = tt.remove(Me(m.getText())); break; } n.addAttr(Me(f.getText()), v); } break; } } return n; } function Me(e) { var t = new bn(); t.setSource(e); var n = t.scanUnquotedString(); return n ? n.text : e; } var wu = function() { function e(t) { this.cssDataManager = t; } return e.prototype.selectorToMarkedString = function(t) { var n = Cu(t); if (n) { var r = new vo('"').print(n); return r.push(this.selectorToSpecificityMarkedString(t)), r; } else return []; }, e.prototype.simpleSelectorToMarkedString = function(t) { var n = kl(t), r = new vo('"').print(n); return r.push(this.selectorToSpecificityMarkedString(t)), r; }, e.prototype.isPseudoElementIdentifier = function(t) { var n = t.match(/^::?([\w-]+)/); return n ? !!this.cssDataManager.getPseudoElement("::" + n[1]) : !1; }, e.prototype.selectorToSpecificityMarkedString = function(t) { var n = this, r = function(s) { var a = new yo(); e: for (var o = 0, l = s.getChildren(); o < l.length; o++) { var c = l[o]; switch (c.type) { case g.IdentifierSelector: a.id++; break; case g.ClassSelector: case g.AttributeSelector: a.attr++; break; case g.ElementNameSelector: if (c.matches("*")) break; a.tag++; break; case g.PseudoSelector: var h = c.getText(); if (n.isPseudoElementIdentifier(h)) { a.tag++; break; } if (h.match(/^:where/i)) continue e; if (h.match(/^:(not|has|is)/i) && c.getChildren().length > 0) { for (var u = new yo(), f = 0, m = c.getChildren(); f < m.length; f++) { var b = m[f]; b.type === g.Undefined && b.getChildren(); for (var v = 0, y = b.getChildren(); v < y.length; v++) { var w = y[v], S = r(w); if (S.id > u.id) { u = S; continue; } else if (S.id < u.id) continue; if (S.attr > u.attr) { u = S; continue; } else if (S.attr < u.attr) continue; if (S.tag > u.tag) { u = S; continue; } } } a.id += u.id, a.attr += u.attr, a.tag += u.tag; continue e; } a.attr++; break; } if (c.getChildren().length > 0) { var S = r(c); a.id += S.id, a.attr += S.attr, a.tag += S.tag; } } return a; }, i = r(t); return yu("specificity", "[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})", i.id, i.attr, i.tag); }, e; }(), xu = function() { function e(t) { this.prev = null, this.element = t; } return e.prototype.processSelector = function(t) { var n = null; if (!(this.element instanceof jt) && t.getChildren().some(function(h) { return h.hasChildren() && h.getChild(0).type === g.SelectorCombinator; })) { var r = this.element.findRoot(); r.parent instanceof jt && (n = this.element, this.element = r.parent, this.element.removeChild(r), this.prev = null); } for (var i = 0, s = t.getChildren(); i < s.length; i++) { var a = s[i]; if (a instanceof Tt) { if (this.prev instanceof Tt) { var o = new hi("…"); this.element.addChild(o), this.element = o; } else this.prev && (this.prev.matches("+") || this.prev.matches("~")) && this.element.parent && (this.element = this.element.parent); this.prev && this.prev.matches("~") && this.element.addChild(new hi("⋮")); var l = kl(a, n), c = l.findRoot(); this.element.addChild(c), this.element = l; } (a instanceof Tt || a.type === g.SelectorCombinatorParent || a.type === g.SelectorCombinatorShadowPiercingDescendant || a.type === g.SelectorCombinatorSibling || a.type === g.SelectorCombinatorAllSiblings) && (this.prev = a); } }, e; }(); function Su(e) { switch (e.type) { case g.MixinDeclaration: case g.Stylesheet: return !0; } return !1; } function Cu(e) { if (e.matches("@at-root")) return null; var t = new jt(), n = [], r = e.getParent(); if (r instanceof Lt) for (var i = r.getParent(); i && !Su(i); ) { if (i instanceof Lt) { if (i.getSelectors().matches("@at-root")) break; n.push(i); } i = i.getParent(); } for (var s = new xu(t), a = n.length - 1; a >= 0; a--) { var o = n[a].getSelectors().getChild(0); o && s.processSelector(o); } return s.processSelector(e), t; } var Ni = function() { function e(t, n) { this.clientCapabilities = t, this.cssDataManager = n, this.selectorPrinting = new wu(n); } return e.prototype.configure = function(t) { this.defaultSettings = t; }, e.prototype.doHover = function(t, n, r, i) { i === void 0 && (i = this.defaultSettings); function s(y) { return ee.create(t.positionAt(y.offset), t.positionAt(y.end)); } for (var a = t.offsetAt(n), o = wi(r, a), l = null, c = 0; c < o.length; c++) { var h = o[c]; if (h instanceof vn) { l = { contents: this.selectorPrinting.selectorToMarkedString(h), range: s(h) }; break; } if (h instanceof Tt) { pe(h.getText(), "@") || (l = { contents: this.selectorPrinting.simpleSelectorToMarkedString(h), range: s(h) }); break; } if (h instanceof Je) { var u = h.getFullPropertyName(), f = this.cssDataManager.getProperty(u); if (f) { var m = dt(f, this.doesSupportMarkdown(), i); m ? l = { contents: m, range: s(h) } : l = null; } continue; } if (h instanceof ul) { var b = h.getText(), f = this.cssDataManager.getAtDirective(b); if (f) { var m = dt(f, this.doesSupportMarkdown(), i); m ? l = { contents: m, range: s(h) } : l = null; } continue; } if (h instanceof W && h.type === g.PseudoSelector) { var v = h.getText(), f = v.slice(0, 2) === "::" ? this.cssDataManager.getPseudoElement(v) : this.cssDataManager.getPseudoClass(v); if (f) { var m = dt(f, this.doesSupportMarkdown(), i); m ? l = { contents: m, range: s(h) } : l = null; } continue; } } return l && (l.contents = this.convertContents(l.contents)), l; }, e.prototype.convertContents = function(t) { return this.doesSupportMarkdown() || typeof t == "string" ? t : "kind" in t ? { kind: "plaintext", value: t.value } : Array.isArray(t) ? t.map(function(n) { return typeof n == "string" ? n : n.value; }) : t.value; }, e.prototype.doesSupportMarkdown = function() { if (!Ne(this.supportsMarkdown)) { if (!Ne(this.clientCapabilities)) return this.supportsMarkdown = !0, this.supportsMarkdown; var t = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover; this.supportsMarkdown = t && t.contentFormat && Array.isArray(t.contentFormat) && t.contentFormat.indexOf(Ie.Markdown) !== -1; } return this.supportsMarkdown; }, e; }(), Qt = function(e, t, n, r) { function i(s) { return s instanceof n ? s : new n(function(a) { a(s); }); } return new (n || (n = Promise))(function(s, a) { function o(h) { try { c(r.next(h)); } catch (u) { a(u); } } function l(h) { try { c(r.throw(h)); } catch (u) { a(u); } } function c(h) { h.done ? s(h.value) : i(h.value).then(o, l); } c((r = r.apply(e, t || [])).next()); }); }, Zt = function(e, t) { var n = { label: 0, sent: function() { if (s[0] & 1) throw s[1]; return s[1]; }, trys: [], ops: [] }, r, i, s, a; return a = { next: o(0), throw: o(1), return: o(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() { return this; }), a; function o(c) { return function(h) { return l([c, h]); }; } function l(c) { if (r) throw new TypeError("Generator is already executing."); for (; n; ) try { if (r = 1, i && (s = c[0] & 2 ? i.return : c[0] ? i.throw || ((s = i.return) && s.call(i), 0) : i.next) && !(s = s.call(i, c[1])).done) return s; switch (i = 0, s && (c = [c[0] & 2, s.value]), c[0]) { case 0: case 1: s = c; break; case 4: return n.label++, { value: c[1], done: !1 }; case 5: n.label++, i = c[1], c = [0]; continue; case 7: c = n.ops.pop(), n.trys.pop(); continue; default: if (s = n.trys, !(s = s.length > 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] < s[3])) { n.label = c[1]; break; } if (c[0] === 6 && n.label < s[1]) { n.label = s[1], s = c; break; } if (s && n.label < s[2]) { n.label = s[2], n.ops.push(c); break; } s[2] && n.ops.pop(), n.trys.pop(); continue; } c = t.call(e, n); } catch (h) { c = [6, h], i = 0; } finally { r = s = 0; } if (c[0] & 5) throw c[1]; return { value: c[0] ? c[1] : void 0, done: !0 }; } }, wo = Be(), xo = /^\w+:\/\//, So = /^data:/, Pi = function() { function e(t, n) { this.fileSystemProvider = t, this.resolveModuleReferences = n; } return e.prototype.findDefinition = function(t, n, r) { var i = new ai(r), s = t.offsetAt(n), a = Jr(r, s); if (!a) return null; var o = i.findSymbolFromNode(a); return o ? { uri: t.uri, range: yt(o.node, t) } : null; }, e.prototype.findReferences = function(t, n, r) { var i = this.findDocumentHighlights(t, n, r); return i.map(function(s) { return { uri: t.uri, range: s.range }; }); }, e.prototype.findDocumentHighlights = function(t, n, r) { var i = [], s = t.offsetAt(n), a = Jr(r, s); if (!a || a.type === g.Stylesheet || a.type === g.Declarations) return i; a.type === g.Identifier && a.parent && a.parent.type === g.ClassSelector && (a = a.parent); var o = new ai(r), l = o.findSymbolFromNode(a), c = a.getText(); return r.accept(function(h) { if (l) { if (o.matchesSymbol(h, l)) return i.push({ kind: Co(h), range: yt(h, t) }), !1; } else a && a.type === h.type && h.matches(c) && i.push({ kind: Co(h), range: yt(h, t) }); return !0; }), i; }, e.prototype.isRawStringDocumentLinkNode = function(t) { return t.type === g.Import; }, e.prototype.findDocumentLinks = function(t, n, r) { for (var i = this.findUnresolvedLinks(t, n), s = [], a = 0, o = i; a < o.length; a++) { var l = o[a], c = l.link, h = c.target; if (!(!h || So.test(h))) if (xo.test(h)) s.push(c); else { var u = r.resolveReference(h, t.uri); u && (c.target = u), s.push(c); } } return s; }, e.prototype.findDocumentLinks2 = function(t, n, r) { return Qt(this, void 0, void 0, function() { var i, s, a, o, l, c, h, u; return Zt(this, function(f) { switch (f.label) { case 0: i = this.findUnresolvedLinks(t, n), s = [], a = 0, o = i, f.label = 1; case 1: return a < o.length ? (l = o[a], c = l.link, h = c.target, !h || So.test(h) ? [3, 5] : [3, 2]) : [3, 6]; case 2: return xo.test(h) ? (s.push(c), [3, 5]) : [3, 3]; case 3: return [4, this.resolveRelativeReference(h, t.uri, r, l.isRawLink)]; case 4: u = f.sent(), u !== void 0 && (c.target = u, s.push(c)), f.label = 5; case 5: return a++, [3, 1]; case 6: return [2, s]; } }); }); }, e.prototype.findUnresolvedLinks = function(t, n) { var r = this, i = [], s = function(a) { var o = a.getText(), l = yt(a, t); if (!(l.start.line === l.end.line && l.start.character === l.end.character)) { (pe(o, "'") || pe(o, '"')) && (o = o.slice(1, -1)); var c = a.parent ? r.isRawStringDocumentLinkNode(a.parent) : !1; i.push({ link: { target: o, range: l }, isRawLink: c }); } }; return n.accept(function(a) { if (a.type === g.URILiteral) { var o = a.getChild(0); return o && s(o), !1; } if (a.parent && r.isRawStringDocumentLinkNode(a.parent)) { var l = a.getText(); return (pe(l, "'") || pe(l, '"')) && s(a), !1; } return !0; }), i; }, e.prototype.findDocumentSymbols = function(t, n) { var r = []; return n.accept(function(i) { var s = { name: null, kind: xt.Class, location: null }, a = i; if (i instanceof vn) return s.name = i.getText(), a = i.findAParent(g.Ruleset, g.ExtendsReference), a && (s.location = cn.create(t.uri, yt(a, t)), r.push(s)), !1; if (i instanceof ar) s.name = i.getName(), s.kind = xt.Variable; else if (i instanceof ln) s.name = i.getName(), s.kind = xt.Method; else if (i instanceof qn) s.name = i.getName(), s.kind = xt.Function; else if (i instanceof ol) s.name = wo("literal.keyframes", "@keyframes {0}", i.getName()); else if (i instanceof sl) s.name = wo("literal.fontface", "@font-face"); else if (i instanceof ll) { var o = i.getChild(0); o instanceof cl && (s.name = "@media " + o.getText(), s.kind = xt.Module); } return s.name && (s.location = cn.create(t.uri, yt(a, t)), r.push(s)), !0; }), r; }, e.prototype.findDocumentColors = function(t, n) { var r = []; return n.accept(function(i) { var s = ku(i, t); return s && r.push(s), !0; }), r; }, e.prototype.getColorPresentations = function(t, n, r, i) { var s = [], a = Math.round(r.red * 255), o = Math.round(r.green * 255), l = Math.round(r.blue * 255), c; r.alpha === 1 ? c = "rgb(".concat(a, ", ").concat(o, ", ").concat(l, ")") : c = "rgba(".concat(a, ", ").concat(o, ", ").concat(l, ", ").concat(r.alpha, ")"), s.push({ label: c, textEdit: $.replace(i, c) }), r.alpha === 1 ? c = "#".concat(bt(a)).concat(bt(o)).concat(bt(l)) : c = "#".concat(bt(a)).concat(bt(o)).concat(bt(l)).concat(bt(Math.round(r.alpha * 255))), s.push({ label: c, textEdit: $.replace(i, c) }); var h = vl(r); h.a === 1 ? c = "hsl(".concat(h.h, ", ").concat(Math.round(h.s * 100), "%, ").concat(Math.round(h.l * 100), "%)") : c = "hsla(".concat(h.h, ", ").concat(Math.round(h.s * 100), "%, ").concat(Math.round(h.l * 100), "%, ").concat(h.a, ")"), s.push({ label: c, textEdit: $.replace(i, c) }); var u = Yd(r); return u.a === 1 ? c = "hwb(".concat(u.h, " ").concat(Math.round(u.w * 100), "% ").concat(Math.round(u.b * 100), "%)") : c = "hwb(".concat(u.h, " ").concat(Math.round(u.w * 100), "% ").concat(Math.round(u.b * 100), "% / ").concat(u.a, ")"), s.push({ label: c, textEdit: $.replace(i, c) }), s; }, e.prototype.doRename = function(t, n, r, i) { var s, a = this.findDocumentHighlights(t, n, i), o = a.map(function(l) { return $.replace(l.range, r); }); return { changes: (s = {}, s[t.uri] = o, s) }; }, e.prototype.resolveModuleReference = function(t, n, r) { return Qt(this, void 0, void 0, function() { var i, s, a, o, l; return Zt(this, function(c) { switch (c.label) { case 0: return pe(n, "file://") ? (i = _u(t), s = r.resolveReference("/", n), a = vr(n), [4, this.resolvePathToModule(i, a, s)]) : [3, 2]; case 1: if (o = c.sent(), o) return l = t.substring(i.length + 1), [2, li(o, l)]; c.label = 2; case 2: return [2, void 0]; } }); }); }, e.prototype.resolveRelativeReference = function(t, n, r, i) { return Qt(this, void 0, void 0, function() { var s, a; return Zt(this, function(o) { switch (o.label) { case 0: return s = r.resolveReference(t, n), t[0] === "~" && t[1] !== "/" && this.fileSystemProvider ? (t = t.substring(1), [4, this.resolveModuleReference(t, n, r)]) : [3, 2]; case 1: return [2, o.sent() || s]; case 2: return this.resolveModuleReferences ? (a = s, a ? [4, this.fileExists(s)] : [3, 4]) : [3, 7]; case 3: a = o.sent(), o.label = 4; case 4: return a ? [2, s] : [3, 5]; case 5: return [4, this.resolveModuleReference(t, n, r)]; case 6: return [2, o.sent() || s]; case 7: return [2, s]; } }); }); }, e.prototype.resolvePathToModule = function(t, n, r) { return Qt(this, void 0, void 0, function() { var i; return Zt(this, function(s) { switch (s.label) { case 0: return i = li(n, "node_modules", t, "package.json"), [4, this.fileExists(i)]; case 1: return s.sent() ? [2, vr(i)] : r && n.startsWith(r) && n.length !== r.length ? [2, this.resolvePathToModule(t, vr(n), r)] : [2, void 0]; } }); }); }, e.prototype.fileExists = function(t) { return Qt(this, void 0, void 0, function() { var n; return Zt(this, function(r) { switch (r.label) { case 0: if (!this.fileSystemProvider) return [2, !1]; r.label = 1; case 1: return r.trys.push([1, 3, , 4]), [4, this.fileSystemProvider.stat(t)]; case 2: return n = r.sent(), n.type === fn.Unknown && n.size === -1 ? [2, !1] : [2, !0]; case 3: return r.sent(), [2, !1]; case 4: return [2]; } }); }); }, e; }(); function ku(e, t) { var n = Kd(e); if (n) { var r = yt(e, t); return { color: n, range: r }; } return null; } function yt(e, t) { return ee.create(t.positionAt(e.offset), t.positionAt(e.end)); } function Co(e) { if (e.type === g.Selector || e instanceof Pe && e.parent && e.parent instanceof Ci && e.isCustomProperty) return Pt.Write; if (e.parent) switch (e.parent.type) { case g.FunctionDeclaration: case g.MixinDeclaration: case g.Keyframe: case g.VariableDeclaration: case g.FunctionParameter: return Pt.Write; } return Pt.Read; } function bt(e) { var t = e.toString(16); return t.length !== 2 ? "0" + t : t; } function _u(e) { return e[0] === "@" ? e.substring(0, e.indexOf("/", e.indexOf("/") + 1)) : e.substring(0, e.indexOf("/")); } var ue = Be(), Mt = ze.Warning, ko = ze.Error, We = ze.Ignore, ge = function() { function e(t, n, r) { this.id = t, this.message = n, this.defaultValue = r; } return e; }(), Fu = function() { function e(t, n, r) { this.id = t, this.message = n, this.defaultValue = r; } return e; }(), te = { AllVendorPrefixes: new ge("compatibleVendorPrefixes", ue("rule.vendorprefixes.all", "When using a vendor-specific prefix make sure to also include all other vendor-specific properties"), We), IncludeStandardPropertyWhenUsingVendorPrefix: new ge("vendorPrefix", ue("rule.standardvendorprefix.all", "When using a vendor-specific prefix also include the standard property"), Mt), DuplicateDeclarations: new ge("duplicateProperties", ue("rule.duplicateDeclarations", "Do not use duplicate style definitions"), We), EmptyRuleSet: new ge("emptyRules", ue("rule.emptyRuleSets", "Do not use empty rulesets"), Mt), ImportStatemement: new ge("importStatement", ue("rule.importDirective", "Import statements do not load in parallel"), We), BewareOfBoxModelSize: new ge("boxModel", ue("rule.bewareOfBoxModelSize", "Do not use width or height when using padding or border"), We), UniversalSelector: new ge("universalSelector", ue("rule.universalSelector", "The universal selector (*) is known to be slow"), We), ZeroWithUnit: new ge("zeroUnits", ue("rule.zeroWidthUnit", "No unit for zero needed"), We), RequiredPropertiesForFontFace: new ge("fontFaceProperties", ue("rule.fontFaceProperties", "@font-face rule must define 'src' and 'font-family' properties"), Mt), HexColorLength: new ge("hexColorLength", ue("rule.hexColor", "Hex colors must consist of three, four, six or eight hex numbers"), ko), ArgsInColorFunction: new ge("argumentsInColorFunction", ue("rule.colorFunction", "Invalid number of parameters"), ko), UnknownProperty: new ge("unknownProperties", ue("rule.unknownProperty", "Unknown property."), Mt), UnknownAtRules: new ge("unknownAtRules", ue("rule.unknownAtRules", "Unknown at-rule."), Mt), IEStarHack: new ge("ieHack", ue("rule.ieHack", "IE hacks are only necessary when supporting IE7 and older"), We), UnknownVendorSpecificProperty: new ge("unknownVendorSpecificProperties", ue("rule.unknownVendorSpecificProperty", "Unknown vendor specific property."), We), PropertyIgnoredDueToDisplay: new ge("propertyIgnoredDueToDisplay", ue("rule.propertyIgnoredDueToDisplay", "Property is ignored due to the display."), Mt), AvoidImportant: new ge("important", ue("rule.avoidImportant", "Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."), We), AvoidFloat: new ge("float", ue("rule.avoidFloat", "Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."), We), AvoidIdSelector: new ge("idSelector", ue("rule.avoidIdSelector", "Selectors should not contain IDs because these rules are too tightly coupled with the HTML."), We) }, Ru = { ValidProperties: new Fu("validProperties", ue("rule.validProperties", "A list of properties that are not validated against the `unknownProperties` rule."), []) }, Eu = function() { function e(t) { t === void 0 && (t = {}), this.conf = t; } return e.prototype.getRule = function(t) { if (this.conf.hasOwnProperty(t.id)) { var n = Du(this.conf[t.id]); if (n) return n; } return t.defaultValue; }, e.prototype.getSetting = function(t) { return this.conf[t.id]; }, e; }(); function Du(e) { switch (e) { case "ignore": return ze.Ignore; case "warning": return ze.Warning; case "error": return ze.Error; } return null; } var Au = Be(), Ii = function() { function e(t) { this.cssDataManager = t; } return e.prototype.doCodeActions = function(t, n, r, i) { return this.doCodeActions2(t, n, r, i).map(function(s) { var a = s.edit && s.edit.documentChanges && s.edit.documentChanges[0]; return Bt.create(s.title, "_css.applyCodeAction", t.uri, t.version, a && a.edits); }); }, e.prototype.doCodeActions2 = function(t, n, r, i) { var s = []; if (r.diagnostics) for (var a = 0, o = r.diagnostics; a < o.length; a++) { var l = o[a]; this.appendFixesForMarker(t, i, l, s); } return s; }, e.prototype.getFixesForUnknownProperty = function(t, n, r, i) { var s = n.getName(), a = []; this.cssDataManager.getProperties().forEach(function(w) { var S = nd(s, w.name); S >= s.length / 2 && a.push({ property: w.name, score: S }); }), a.sort(function(w, S) { return S.score - w.score || w.property.localeCompare(S.property); }); for (var o = 3, l = 0, c = a; l < c.length; l++) { var h = c[l], u = h.property, f = Au("css.codeaction.rename", "Rename to '{0}'", u), m = $.replace(r.range, u), b = ei.create(t.uri, t.version), v = { documentChanges: [hn.create(b, [m])] }, y = ri.create(f, v, ni.QuickFix); if (y.diagnostics = [r], i.push(y), --o <= 0) return; } }, e.prototype.appendFixesForMarker = function(t, n, r, i) { if (r.code === te.UnknownProperty.id) for (var s = t.offsetAt(r.range.start), a = t.offsetAt(r.range.end), o = wi(n, s), l = o.length - 1; l >= 0; l--) { var c = o[l]; if (c instanceof Je) { var h = c.getProperty(); if (h && h.offset === s && h.end === a) { this.getFixesForUnknownProperty(t, h, r, i); return; } } } }, e; }(), zu = function() { function e(t) { this.fullPropertyName = t.getFullPropertyName().toLowerCase(), this.node = t; } return e; }(); function tn(e, t, n, r) { var i = e[t]; i.value = n, n && (wl(i.properties, r) || i.properties.push(r)); } function Mu(e, t, n) { tn(e, "top", t, n), tn(e, "right", t, n), tn(e, "bottom", t, n), tn(e, "left", t, n); } function ve(e, t, n, r) { t === "top" || t === "right" || t === "bottom" || t === "left" ? tn(e, t, n, r) : Mu(e, n, r); } function wr(e, t, n) { switch (t.length) { case 1: ve(e, void 0, t[0], n); break; case 2: ve(e, "top", t[0], n), ve(e, "bottom", t[0], n), ve(e, "right", t[1], n), ve(e, "left", t[1], n); break; case 3: ve(e, "top", t[0], n), ve(e, "right", t[1], n), ve(e, "left", t[1], n), ve(e, "bottom", t[2], n); break; case 4: ve(e, "top", t[0], n), ve(e, "right", t[1], n), ve(e, "bottom", t[2], n), ve(e, "left", t[3], n); break; } } function di(e, t) { for (var n = 0, r = t; n < r.length; n++) { var i = r[n]; if (e.matches(i)) return !0; } return !1; } function mn(e, t) { return t === void 0 && (t = !0), t && di(e, ["initial", "unset"]) ? !1 : parseFloat(e.getText()) !== 0; } function _o(e, t) { return t === void 0 && (t = !0), e.map(function(n) { return mn(n, t); }); } function tr(e, t) { return t === void 0 && (t = !0), !(di(e, ["none", "hidden"]) || t && di(e, ["initial", "unset"])); } function Nu(e, t) { return t === void 0 && (t = !0), e.map(function(n) { return tr(n, t); }); } function Pu(e) { var t = e.getChildren(); if (t.length === 1) { var n = t[0]; return mn(n) && tr(n); } for (var r = 0, i = t; r < i.length; r++) { var s = i[r], n = s; if (!mn(n, !1) || !tr(n, !1)) return !1; } return !0; } function Iu(e) { for (var t = { top: { value: !1, properties: [] }, right: { value: !1, properties: [] }, bottom: { value: !1, properties: [] }, left: { value: !1, properties: [] } }, n = 0, r = e; n < r.length; n++) { var i = r[n], s = i.node.value; if (!(typeof s > "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": t.width = i; break; case "height": t.height = i; break; default: var a = i.fullPropertyName.split("-"); switch (a[0]) { case "border": switch (a[1]) { case void 0: case "top": case "right": case "bottom": case "left": switch (a[2]) { case void 0: ve(t, a[1], Pu(s), i); break; case "width": ve(t, a[1], mn(s, !1), i); break; case "style": ve(t, a[1], tr(s, !0), i); break; } break; case "width": wr(t, _o(s.getChildren(), !1), i); break; case "style": wr(t, Nu(s.getChildren(), !0), i); break; } break; case "padding": a.length === 1 ? wr(t, _o(s.getChildren(), !0), i) : ve(t, a[1], mn(s, !0), i); break; } break; } } return t; } var Ze = Be(), Fo = function() { function e() { this.data = {}; } return e.prototype.add = function(t, n, r) { var i = this.data[t]; i || (i = { nodes: [], names: [] }, this.data[t] = i), i.names.push(n), r && i.nodes.push(r); }, e; }(), Lu = function() { function e(t, n, r) { var i = this; this.cssDataManager = r, this.warnings = [], this.settings = n, this.documentText = t.getText(), this.keyframes = new Fo(), this.validProperties = {}; var s = n.getSetting(Ru.ValidProperties); Array.isArray(s) && s.forEach(function(a) { if (typeof a == "string") { var o = a.trim().toLowerCase(); o.length && (i.validProperties[o] = !0); } }); } return e.entries = function(t, n, r, i, s) { var a = new e(n, r, i); return t.acceptVisitor(a), a.completeValidations(), a.getEntries(s); }, e.prototype.isValidPropertyDeclaration = function(t) { var n = t.fullPropertyName; return this.validProperties[n]; }, e.prototype.fetch = function(t, n) { for (var r = [], i = 0, s = t; i < s.length; i++) { var a = s[i]; a.fullPropertyName === n && r.push(a); } return r; }, e.prototype.fetchWithValue = function(t, n, r) { for (var i = [], s = 0, a = t; s < a.length; s++) { var o = a[s]; if (o.fullPropertyName === n) { var l = o.node.getValue(); l && this.findValueInExpression(l, r) && i.push(o); } } return i; }, e.prototype.findValueInExpression = function(t, n) { var r = !1; return t.accept(function(i) { return i.type === g.Identifier && i.matches(n) && (r = !0), !r; }), r; }, e.prototype.getEntries = function(t) { return t === void 0 && (t = ze.Warning | ze.Error), this.warnings.filter(function(n) { return (n.getLevel() & t) !== 0; }); }, e.prototype.addEntry = function(t, n, r) { var i = new pl(t, n, this.settings.getRule(n), r); this.warnings.push(i); }, e.prototype.getMissingNames = function(t, n) { for (var r = t.slice(0), i = 0; i < n.length; i++) { var s = r.indexOf(n[i]); s !== -1 && (r[s] = null); } for (var a = null, i = 0; i < r.length; i++) { var o = r[i]; o && (a === null ? a = Ze("namelist.single", "'{0}'", o) : a = Ze("namelist.concatenated", "{0}, '{1}'", a, o)); } return a; }, e.prototype.visitNode = function(t) { switch (t.type) { case g.UnknownAtRule: return this.visitUnknownAtRule(t); case g.Keyframe: return this.visitKeyframe(t); case g.FontFace: return this.visitFontFace(t); case g.Ruleset: return this.visitRuleSet(t); case g.SimpleSelector: return this.visitSimpleSelector(t); case g.Function: return this.visitFunction(t); case g.NumericValue: return this.visitNumericValue(t); case g.Import: return this.visitImport(t); case g.HexColorValue: return this.visitHexColorValue(t); case g.Prio: return this.visitPrio(t); case g.IdentifierSelector: return this.visitIdentifierSelector(t); } return !0; }, e.prototype.completeValidations = function() { this.validateKeyframes(); }, e.prototype.visitUnknownAtRule = function(t) { var n = t.getChild(0); if (!n) return !1; var r = this.cssDataManager.getAtDirective(n.getText()); return r ? !1 : (this.addEntry(n, te.UnknownAtRules, "Unknown at rule ".concat(n.getText())), !0); }, e.prototype.visitKeyframe = function(t) { var n = t.getKeyword(); if (!n) return !1; var r = n.getText(); return this.keyframes.add(t.getName(), r, r !== "@keyframes" ? n : null), !0; }, e.prototype.validateKeyframes = function() { var t = ["@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes"]; for (var n in this.keyframes.data) { var r = this.keyframes.data[n].names, i = r.indexOf("@keyframes") === -1; if (!(!i && r.length === 1)) { var s = this.getMissingNames(t, r); if (s || i) for (var a = 0, o = this.keyframes.data[n].nodes; a < o.length; a++) { var l = o[a]; if (i) { var c = Ze("keyframes.standardrule.missing", "Always define standard rule '@keyframes' when defining keyframes."); this.addEntry(l, te.IncludeStandardPropertyWhenUsingVendorPrefix, c); } if (s) { var c = Ze("keyframes.vendorspecific.missing", "Always include all vendor specific rules: Missing: {0}", s); this.addEntry(l, te.AllVendorPrefixes, c); } } } } return !0; }, e.prototype.visitSimpleSelector = function(t) { var n = this.documentText.charAt(t.offset); return t.length === 1 && n === "*" && this.addEntry(t, te.UniversalSelector), !0; }, e.prototype.visitIdentifierSelector = function(t) { return this.addEntry(t, te.AvoidIdSelector), !0; }, e.prototype.visitImport = function(t) { return this.addEntry(t, te.ImportStatemement), !0; }, e.prototype.visitRuleSet = function(t) { var n = t.getDeclarations(); if (!n) return !1; n.hasChildren() || this.addEntry(t.getSelectors(), te.EmptyRuleSet); for (var r = [], i = 0, s = n.getChildren(); i < s.length; i++) { var a = s[i]; a instanceof Je && r.push(new zu(a)); } var o = Iu(r); if (o.width) { var l = []; if (o.right.value && (l = En(l, o.right.properties)), o.left.value && (l = En(l, o.left.properties)), l.length !== 0) { for (var c = 0, h = l; c < h.length; c++) { var u = h[c]; this.addEntry(u.node, te.BewareOfBoxModelSize); } this.addEntry(o.width.node, te.BewareOfBoxModelSize); } } if (o.height) { var l = []; if (o.top.value && (l = En(l, o.top.properties)), o.bottom.value && (l = En(l, o.bottom.properties)), l.length !== 0) { for (var f = 0, m = l; f < m.length; f++) { var u = m[f]; this.addEntry(u.node, te.BewareOfBoxModelSize); } this.addEntry(o.height.node, te.BewareOfBoxModelSize); } } var b = this.fetchWithValue(r, "display", "inline-block"); if (b.length > 0) for (var v = this.fetch(r, "float"), y = 0; y < v.length; y++) { var w = v[y].node, S = w.getValue(); S && !S.matches("none") && this.addEntry(w, te.PropertyIgnoredDueToDisplay, Ze("rule.propertyIgnoredDueToDisplayInlineBlock", "inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'")); } if (b = this.fetchWithValue(r, "display", "block"), b.length > 0) for (var v = this.fetch(r, "vertical-align"), y = 0; y < v.length; y++) this.addEntry(v[y].node, te.PropertyIgnoredDueToDisplay, Ze("rule.propertyIgnoredDueToDisplayBlock", "Property is ignored due to the display. With 'display: block', vertical-align should not be used.")); for (var k = this.fetch(r, "float"), y = 0; y < k.length; y++) { var a = k[y]; this.isValidPropertyDeclaration(a) || this.addEntry(a.node, te.AvoidFloat); } for (var F = 0; F < r.length; F++) { var a = r[F]; if (a.fullPropertyName !== "background" && !this.validProperties[a.fullPropertyName]) { var S = a.node.getValue(); if (S && this.documentText.charAt(S.offset) !== "-") { var N = this.fetch(r, a.fullPropertyName); if (N.length > 1) for (var B = 0; B < N.length; B++) { var H = N[B].node.getValue(); H && this.documentText.charAt(H.offset) !== "-" && N[B] !== a && this.addEntry(a.node, te.DuplicateDeclarations); } } } } var D = t.getSelectors().matches(":export"); if (!D) { for (var R = new Fo(), I = !1, P = 0, z = r; P < z.length; P++) { var a = z[P], V = a.node; if (this.isCSSDeclaration(V)) { var q = a.fullPropertyName, ie = q.charAt(0); if (ie === "-") { if (q.charAt(1) !== "-") { !this.cssDataManager.isKnownProperty(q) && !this.validProperties[q] && this.addEntry(V.getProperty(), te.UnknownVendorSpecificProperty); var de = V.getNonPrefixedPropertyName(); R.add(de, q, V.getProperty()); } } else { var A = q; (ie === "*" || ie === "_") && (this.addEntry(V.getProperty(), te.IEStarHack), q = q.substr(1)), !this.cssDataManager.isKnownProperty(A) && !this.cssDataManager.isKnownProperty(q) && (this.validProperties[q] || this.addEntry(V.getProperty(), te.UnknownProperty, Ze("property.unknownproperty.detailed", "Unknown property: '{0}'", V.getFullPropertyName()))), R.add(q, q, null); } } else I = !0; } if (!I) for (var C in R.data) { var E = R.data[C], L = E.names, G = this.cssDataManager.isStandardProperty(C) && L.indexOf(C) === -1; if (!(!G && L.length === 1)) { for (var X = [], F = 0, Z = e.prefixes.length; F < Z; F++) { var je = e.prefixes[F]; this.cssDataManager.isStandardProperty(je + C) && X.push(je + C); } var xe = this.getMissingNames(X, L); if (xe || G) for (var Ee = 0, mt = E.nodes; Ee < mt.length; Ee++) { var Ye = mt[Ee]; if (G) { var or = Ze("property.standard.missing", "Also define the standard property '{0}' for compatibility", C); this.addEntry(Ye, te.IncludeStandardPropertyWhenUsingVendorPrefix, or); } if (xe) { var or = Ze("property.vendorspecific.missing", "Always include all vendor specific properties: Missing: {0}", xe); this.addEntry(Ye, te.AllVendorPrefixes, or); } } } } } return !0; }, e.prototype.visitPrio = function(t) { return this.addEntry(t, te.AvoidImportant), !0; }, e.prototype.visitNumericValue = function(t) { var n = t.findParent(g.Function); if (n && n.getName() === "calc") return !0; var r = t.findParent(g.Declaration); if (r) { var i = r.getValue(); if (i) { var s = t.getValue(); if (!s.unit || yl.length.indexOf(s.unit.toLowerCase()) === -1) return !0; parseFloat(s.value) === 0 && s.unit && !this.validProperties[r.getFullPropertyName()] && this.addEntry(t, te.ZeroWithUnit); } } return !0; }, e.prototype.visitFontFace = function(t) { var n = t.getDeclarations(); if (!n) return !1; for (var r = !1, i = !1, s = !1, a = 0, o = n.getChildren(); a < o.length; a++) { var l = o[a]; if (this.isCSSDeclaration(l)) { var c = l.getProperty().getName().toLowerCase(); c === "src" && (r = !0), c === "font-family" && (i = !0); } else s = !0; } return !s && (!r || !i) && this.addEntry(t, te.RequiredPropertiesForFontFace), !0; }, e.prototype.isCSSDeclaration = function(t) { if (t instanceof Je) { if (!t.getValue()) return !1; var n = t.getProperty(); if (!n) return !1; var r = n.getIdentifier(); return !(!r || r.containsInterpolation()); } return !1; }, e.prototype.visitHexColorValue = function(t) { var n = t.length; return n !== 9 && n !== 7 && n !== 5 && n !== 4 && this.addEntry(t, te.HexColorLength), !1; }, e.prototype.visitFunction = function(t) { var n = t.getName().toLowerCase(), r = -1, i = 0; switch (n) { case "rgb(": case "hsl(": r = 3; break; case "rgba(": case "hsla(": r = 4; break; } return r !== -1 && (t.getArguments().accept(function(s) { return s instanceof _i ? (i += 1, !1) : !0; }), i !== r && this.addEntry(t, te.ArgsInColorFunction)), !0; }, e.prefixes = [ "-ms-", "-moz-", "-o-", "-webkit-" ], e; }(), Li = function() { function e(t) { this.cssDataManager = t; } return e.prototype.configure = function(t) { this.settings = t; }, e.prototype.doValidation = function(t, n, r) { if (r === void 0 && (r = this.settings), r && r.validate === !1) return []; var i = []; i.push.apply(i, Td.entries(n)), i.push.apply(i, Lu.entries(n, t, new Eu(r && r.lint), this.cssDataManager)); var s = []; for (var a in te) s.push(te[a].id); function o(l) { var c = ee.create(t.positionAt(l.getOffset()), t.positionAt(l.getOffset() + l.getLength())), h = t.languageId; return { code: l.getRule().id, source: h, message: l.getMessage(), severity: l.getLevel() === ze.Warning ? Gn.Warning : Gn.Error, range: c }; } return i.filter(function(l) { return l.getLevel() !== ze.Ignore; }).map(o); }, e; }(), Tu = function() { var e = function(t, n) { return e = 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]); }, e(t, n); }; return function(t, n) { if (typeof n != "function" && n !== null) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); e(t, n); function r() { this.constructor = t; } t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; }(), Ro = "/".charCodeAt(0), Wu = ` `.charCodeAt(0), Ou = "\r".charCodeAt(0), Uu = "\f".charCodeAt(0), Vu = "$".charCodeAt(0), Bu = "#".charCodeAt(0), ju = "{".charCodeAt(0), en = "=".charCodeAt(0), qu = "!".charCodeAt(0), $u = "<".charCodeAt(0), Hu = ">".charCodeAt(0), xr = ".".charCodeAt(0), rt = p.CustomToken, ui = rt++, nr = rt++; rt++; var _l = rt++, Fl = rt++, Rl = rt++, El = rt++, In = rt++; rt++; var Dl = function(e) { Tu(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return t.prototype.scanNext = function(n) { if (this.stream.advanceIfChar(Vu)) { var r = ["$"]; if (this.ident(r)) return this.finishToken(n, ui, r.join("")); this.stream.goBackTo(n); } return this.stream.advanceIfChars([Bu, ju]) ? this.finishToken(n, nr) : this.stream.advanceIfChars([en, en]) ? this.finishToken(n, _l) : this.stream.advanceIfChars([qu, en]) ? this.finishToken(n, Fl) : this.stream.advanceIfChar($u) ? this.stream.advanceIfChar(en) ? this.finishToken(n, El) : this.finishToken(n, p.Delim) : this.stream.advanceIfChar(Hu) ? this.stream.advanceIfChar(en) ? this.finishToken(n, Rl) : this.finishToken(n, p.Delim) : this.stream.advanceIfChars([xr, xr, xr]) ? this.finishToken(n, In) : e.prototype.scanNext.call(this, n); }, t.prototype.comment = function() { return e.prototype.comment.call(this) ? !0 : !this.inURL && this.stream.advanceIfChars([Ro, Ro]) ? (this.stream.advanceWhileChar(function(n) { switch (n) { case Wu: case Ou: case Uu: return !1; default: return !0; } }), !0) : !1; }, t; }(bn), Sr = Be(), Cr = function() { function e(t, n) { this.id = t, this.message = n; } return e; }(), kr = { FromExpected: new Cr("scss-fromexpected", Sr("expected.from", "'from' expected")), ThroughOrToExpected: new Cr("scss-throughexpected", Sr("expected.through", "'through' or 'to' expected")), InExpected: new Cr("scss-fromexpected", Sr("expected.in", "'in' expected")) }, Gu = function() { var e = function(t, n) { return e = 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]); }, e(t, n); }; return function(t, n) { if (typeof n != "function" && n !== null) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); e(t, n); function r() { this.constructor = t; } t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; }(), Ju = function(e) { Gu(t, e); function t() { return e.call(this, new Dl()) || this; } return t.prototype._parseStylesheetStatement = function(n) { return n === void 0 && (n = !1), this.peek(p.AtKeyword) ? this._parseWarnAndDebug() || this._parseControlStatement() || this._parseMixinDeclaration() || this._parseMixinContent() || this._parseMixinReference() || this._parseFunctionDeclaration() || this._parseForward() || this._parseUse() || this._parseRuleset(n) || e.prototype._parseStylesheetAtStatement.call(this, n) : this._parseRuleset(!0) || this._parseVariableDeclaration(); }, t.prototype._parseImport = function() { if (!this.peekKeyword("@import")) return null; var n = this.create(ki); if (this.consumeToken(), !n.addChild(this._parseURILiteral()) && !n.addChild(this._parseStringLiteral())) return this.finish(n, x.URIOrStringExpected); for (; this.accept(p.Comma); ) if (!n.addChild(this._parseURILiteral()) && !n.addChild(this._parseStringLiteral())) return this.finish(n, x.URIOrStringExpected); return !this.peek(p.SemiColon) && !this.peek(p.EOF) && n.setMedialist(this._parseMediaQueryList()), this.finish(n); }, t.prototype._parseVariableDeclaration = function(n) { if (n === void 0 && (n = []), !this.peek(ui)) return null; var r = this.create(ar); if (!r.setVariable(this._parseVariable())) return null; if (!this.accept(p.Colon)) return this.finish(r, x.ColonExpected); if (this.prevToken && (r.colonPosition = this.prevToken.offset), !r.setValue(this._parseExpr())) return this.finish(r, x.VariableValueExpected, [], n); for (; this.peek(p.Exclamation); ) if (!r.addChild(this._tryParsePrio())) { if (this.consumeToken(), !this.peekRegExp(p.Ident, /^(default|global)$/)) return this.finish(r, x.UnknownKeyword); this.consumeToken(); } return this.peek(p.SemiColon) && (r.semicolonPosition = this.token.offset), this.finish(r); }, t.prototype._parseMediaCondition = function() { return this._parseInterpolation() || e.prototype._parseMediaCondition.call(this); }, t.prototype._parseMediaFeatureName = function() { return this._parseModuleMember() || this._parseFunction() || this._parseIdent() || this._parseVariable(); }, t.prototype._parseKeyframeSelector = function() { return this._tryParseKeyframeSelector() || this._parseControlStatement(this._parseKeyframeSelector.bind(this)) || this._parseVariableDeclaration() || this._parseMixinContent(); }, t.prototype._parseVariable = function() { if (!this.peek(ui)) return null; var n = this.create(Ei); return this.consumeToken(), n; }, t.prototype._parseModuleMember = function() { var n = this.mark(), r = this.create(xa); return r.setIdentifier(this._parseIdent([Y.Module])) ? this.hasWhitespace() || !this.acceptDelim(".") || this.hasWhitespace() ? (this.restoreAtMark(n), null) : r.addChild(this._parseVariable() || this._parseFunction()) ? r : this.finish(r, x.IdentifierOrVariableExpected) : null; }, t.prototype._parseIdent = function(n) { var r = this; if (!this.peek(p.Ident) && !this.peek(nr) && !this.peekDelim("-")) return null; var i = this.create(Pe); i.referenceTypes = n, i.isCustomProperty = this.peekRegExp(p.Ident, /^--/); for (var s = !1, a = function() { var o = r.mark(); return r.acceptDelim("-") && (r.hasWhitespace() || r.acceptDelim("-"), r.hasWhitespace()) ? (r.restoreAtMark(o), null) : r._parseInterpolation(); }; (this.accept(p.Ident) || i.addChild(a()) || s && this.acceptRegexp(/^[\w-]/)) && (s = !0, !this.hasWhitespace()); ) ; return s ? this.finish(i) : null; }, t.prototype._parseTermExpression = function() { return this._parseModuleMember() || this._parseVariable() || this._parseSelectorCombinator() || e.prototype._parseTermExpression.call(this); }, t.prototype._parseInterpolation = function() { if (this.peek(nr)) { var n = this.create(Yr); return this.consumeToken(), !n.addChild(this._parseExpr()) && !this._parseSelectorCombinator() ? this.accept(p.CurlyR) ? this.finish(n) : this.finish(n, x.ExpressionExpected) : this.accept(p.CurlyR) ? this.finish(n) : this.finish(n, x.RightCurlyExpected); } return null; }, t.prototype._parseOperator = function() { if (this.peek(_l) || this.peek(Fl) || this.peek(Rl) || this.peek(El) || this.peekDelim(">") || this.peekDelim("<") || this.peekIdent("and") || this.peekIdent("or") || this.peekDelim("%")) { var n = this.createNode(g.Operator); return this.consumeToken(), this.finish(n); } return e.prototype._parseOperator.call(this); }, t.prototype._parseUnaryOperator = function() { if (this.peekIdent("not")) { var n = this.create(W); return this.consumeToken(), this.finish(n); } return e.prototype._parseUnaryOperator.call(this); }, t.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) || e.prototype._parseRuleSetDeclarationAtStatement.call(this) : this._parseVariableDeclaration() || this._tryParseRuleset(!0) || e.prototype._parseRuleSetDeclaration.call(this); }, t.prototype._parseDeclaration = function(n) { var r = this._tryParseCustomPropertyDeclaration(n); if (r) return r; var i = this.create(Je); if (!i.setProperty(this._parseProperty())) return null; if (!this.accept(p.Colon)) return this.finish(i, x.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, x.PropertyValueExpected); return this.peek(p.SemiColon) && (i.semicolonPosition = this.token.offset), this.finish(i); }, t.prototype._parseNestedProperties = function() { var n = this.create(al); return this._parseBody(n, this._parseDeclaration.bind(this)); }, t.prototype._parseExtends = function() { if (this.peekKeyword("@extend")) { var n = this.create(on); if (this.consumeToken(), !n.getSelectors().addChild(this._parseSimpleSelector())) return this.finish(n, x.SelectorExpected); for (; this.accept(p.Comma); ) n.getSelectors().addChild(this._parseSimpleSelector()); return this.accept(p.Exclamation) && !this.acceptIdent("optional") ? this.finish(n, x.UnknownKeyword) : this.finish(n); } return null; }, t.prototype._parseSimpleSelectorBody = function() { return this._parseSelectorCombinator() || this._parseSelectorPlaceholder() || e.prototype._parseSimpleSelectorBody.call(this); }, t.prototype._parseSelectorCombinator = function() { if (this.peekDelim("&")) { var n = this.createNode(g.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; }, t.prototype._parseSelectorPlaceholder = function() { if (this.peekDelim("%")) { var n = this.createNode(g.SelectorPlaceholder); return this.consumeToken(), this._parseIdent(), this.finish(n); } else if (this.peekKeyword("@at-root")) { var n = this.createNode(g.SelectorPlaceholder); return this.consumeToken(), this.finish(n); } return null; }, t.prototype._parseElementName = function() { var n = this.mark(), r = e.prototype._parseElementName.call(this); return r && !this.hasWhitespace() && this.peek(p.ParenthesisL) ? (this.restoreAtMark(n), null) : r; }, t.prototype._tryParsePseudoIdentifier = function() { return this._parseInterpolation() || e.prototype._tryParsePseudoIdentifier.call(this); }, t.prototype._parseWarnAndDebug = function() { if (!this.peekKeyword("@debug") && !this.peekKeyword("@warn") && !this.peekKeyword("@error")) return null; var n = this.createNode(g.Debug); return this.consumeToken(), n.addChild(this._parseExpr()), this.finish(n); }, t.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; }, t.prototype._parseIfStatement = function(n) { return this.peekKeyword("@if") ? this._internalParseIfStatement(n) : null; }, t.prototype._internalParseIfStatement = function(n) { var r = this.create(hd); if (this.consumeToken(), !r.setExpression(this._parseExpr(!0))) return this.finish(r, x.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(fd); this._parseBody(i, n), r.setElseClause(i); } } return this.finish(r); }, t.prototype._parseForStatement = function(n) { if (!this.peekKeyword("@for")) return null; var r = this.create(dd); return this.consumeToken(), r.setVariable(this._parseVariable()) ? this.acceptIdent("from") ? r.addChild(this._parseBinaryExpr()) ? !this.acceptIdent("to") && !this.acceptIdent("through") ? this.finish(r, kr.ThroughOrToExpected, [p.CurlyR]) : r.addChild(this._parseBinaryExpr()) ? this._parseBody(r, n) : this.finish(r, x.ExpressionExpected, [p.CurlyR]) : this.finish(r, x.ExpressionExpected, [p.CurlyR]) : this.finish(r, kr.FromExpected, [p.CurlyR]) : this.finish(r, x.VariableNameExpected, [p.CurlyR]); }, t.prototype._parseEachStatement = function(n) { if (!this.peekKeyword("@each")) return null; var r = this.create(ud); this.consumeToken(); var i = r.getVariables(); if (!i.addChild(this._parseVariable())) return this.finish(r, x.VariableNameExpected, [p.CurlyR]); for (; this.accept(p.Comma); ) if (!i.addChild(this._parseVariable())) return this.finish(r, x.VariableNameExpected, [p.CurlyR]); return this.finish(i), this.acceptIdent("in") ? r.addChild(this._parseExpr()) ? this._parseBody(r, n) : this.finish(r, x.ExpressionExpected, [p.CurlyR]) : this.finish(r, kr.InExpected, [p.CurlyR]); }, t.prototype._parseWhileStatement = function(n) { if (!this.peekKeyword("@while")) return null; var r = this.create(pd); return this.consumeToken(), r.addChild(this._parseBinaryExpr()) ? this._parseBody(r, n) : this.finish(r, x.ExpressionExpected, [p.CurlyR]); }, t.prototype._parseFunctionBodyDeclaration = function() { return this._parseVariableDeclaration() || this._parseReturnStatement() || this._parseWarnAndDebug() || this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this)); }, t.prototype._parseFunctionDeclaration = function() { if (!this.peekKeyword("@function")) return null; var n = this.create(qn); if (this.consumeToken(), !n.setIdentifier(this._parseIdent([Y.Function]))) return this.finish(n, x.IdentifierExpected, [p.CurlyR]); if (!this.accept(p.ParenthesisL)) return this.finish(n, x.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, x.VariableNameExpected); } return this.accept(p.ParenthesisR) ? this._parseBody(n, this._parseFunctionBodyDeclaration.bind(this)) : this.finish(n, x.RightParenthesisExpected, [p.CurlyR]); }, t.prototype._parseReturnStatement = function() { if (!this.peekKeyword("@return")) return null; var n = this.createNode(g.ReturnStatement); return this.consumeToken(), n.addChild(this._parseExpr()) ? this.finish(n) : this.finish(n, x.ExpressionExpected); }, t.prototype._parseMixinDeclaration = function() { if (!this.peekKeyword("@mixin")) return null; var n = this.create(ln); if (this.consumeToken(), !n.setIdentifier(this._parseIdent([Y.Mixin]))) return this.finish(n, x.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, x.VariableNameExpected); } if (!this.accept(p.ParenthesisR)) return this.finish(n, x.RightParenthesisExpected, [p.CurlyR]); } return this._parseBody(n, this._parseRuleSetDeclaration.bind(this)); }, t.prototype._parseParameterDeclaration = function() { var n = this.create(sr); return n.setIdentifier(this._parseVariable()) ? (this.accept(In), this.accept(p.Colon) && !n.setDefaultValue(this._parseExpr(!0)) ? this.finish(n, x.VariableValueExpected, [], [p.Comma, p.ParenthesisR]) : this.finish(n)) : null; }, t.prototype._parseMixinContent = function() { if (!this.peekKeyword("@content")) return null; var n = this.create(Md); 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, x.ExpressionExpected); } if (!this.accept(p.ParenthesisR)) return this.finish(n, x.RightParenthesisExpected); } return this.finish(n); }, t.prototype._parseMixinReference = function() { if (!this.peekKeyword("@include")) return null; var n = this.create($n); this.consumeToken(); var r = this._parseIdent([Y.Mixin]); if (!n.setIdentifier(r)) return this.finish(n, x.IdentifierExpected, [p.CurlyR]); if (!this.hasWhitespace() && this.acceptDelim(".") && !this.hasWhitespace()) { var i = this._parseIdent([Y.Mixin]); if (!i) return this.finish(n, x.IdentifierExpected, [p.CurlyR]); var s = this.create(xa); r.referenceTypes = [Y.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, x.ExpressionExpected); } if (!this.accept(p.ParenthesisR)) return this.finish(n, x.RightParenthesisExpected); } return (this.peekIdent("using") || this.peek(p.CurlyL)) && n.setContent(this._parseMixinContentDeclaration()), this.finish(n); }, t.prototype._parseMixinContentDeclaration = function() { var n = this.create(Nd); if (this.acceptIdent("using")) { if (!this.accept(p.ParenthesisL)) return this.finish(n, x.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, x.VariableNameExpected); } if (!this.accept(p.ParenthesisR)) return this.finish(n, x.RightParenthesisExpected, [p.CurlyL]); } return this.peek(p.CurlyL) && this._parseBody(n, this._parseMixinReferenceBodyStatement.bind(this)), this.finish(n); }, t.prototype._parseMixinReferenceBodyStatement = function() { return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration(); }, t.prototype._parseFunctionArgument = function() { var n = this.create(Vt), r = this.mark(), i = this._parseVariable(); if (i) if (this.accept(p.Colon)) n.setIdentifier(i); else { if (this.accept(In)) return n.setValue(i), this.finish(n); this.restoreAtMark(r); } return n.setValue(this._parseExpr(!0)) ? (this.accept(In), n.addChild(this._parsePrio()), this.finish(n)) : n.setValue(this._tryParsePrio()) ? this.finish(n) : null; }, t.prototype._parseURLArgument = function() { var n = this.mark(), r = e.prototype._parseURLArgument.call(this); if (!r || !this.peek(p.ParenthesisR)) { this.restoreAtMark(n); var i = this.create(W); return i.addChild(this._parseBinaryExpr()), this.finish(i); } return r; }, t.prototype._parseOperation = function() { if (!this.peek(p.ParenthesisL)) return null; var n = this.create(W); for (this.consumeToken(); n.addChild(this._parseListElement()); ) this.accept(p.Comma); return this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, x.RightParenthesisExpected); }, t.prototype._parseListElement = function() { var n = this.create(Pd), r = this._parseBinaryExpr(); if (!r) return null; if (this.accept(p.Colon)) { if (n.setKey(r), !n.setValue(this._parseBinaryExpr())) return this.finish(n, x.ExpressionExpected); } else n.setValue(r); return this.finish(n); }, t.prototype._parseUse = function() { if (!this.peekKeyword("@use")) return null; var n = this.create(gd); if (this.consumeToken(), !n.addChild(this._parseStringLiteral())) return this.finish(n, x.StringLiteralExpected); if (!this.peek(p.SemiColon) && !this.peek(p.EOF)) { if (!this.peekRegExp(p.Ident, /as|with/)) return this.finish(n, x.UnknownKeyword); if (this.acceptIdent("as") && !n.setIdentifier(this._parseIdent([Y.Module])) && !this.acceptDelim("*")) return this.finish(n, x.IdentifierOrWildcardExpected); if (this.acceptIdent("with")) { if (!this.accept(p.ParenthesisL)) return this.finish(n, x.LeftParenthesisExpected, [p.ParenthesisR]); if (!n.getParameters().addChild(this._parseModuleConfigDeclaration())) return this.finish(n, x.VariableNameExpected); for (; this.accept(p.Comma) && !this.peek(p.ParenthesisR); ) if (!n.getParameters().addChild(this._parseModuleConfigDeclaration())) return this.finish(n, x.VariableNameExpected); if (!this.accept(p.ParenthesisR)) return this.finish(n, x.RightParenthesisExpected); } } return !this.accept(p.SemiColon) && !this.accept(p.EOF) ? this.finish(n, x.SemiColonExpected) : this.finish(n); }, t.prototype._parseModuleConfigDeclaration = function() { var n = this.create(bd); return n.setIdentifier(this._parseVariable()) ? !this.accept(p.Colon) || !n.setValue(this._parseExpr(!0)) ? this.finish(n, x.VariableValueExpected, [], [p.Comma, p.ParenthesisR]) : this.accept(p.Exclamation) && (this.hasWhitespace() || !this.acceptIdent("default")) ? this.finish(n, x.UnknownKeyword) : this.finish(n) : null; }, t.prototype._parseForward = function() { if (!this.peekKeyword("@forward")) return null; var n = this.create(vd); if (this.consumeToken(), !n.addChild(this._parseStringLiteral())) return this.finish(n, x.StringLiteralExpected); if (this.acceptIdent("with")) { if (!this.accept(p.ParenthesisL)) return this.finish(n, x.LeftParenthesisExpected, [p.ParenthesisR]); if (!n.getParameters().addChild(this._parseModuleConfigDeclaration())) return this.finish(n, x.VariableNameExpected); for (; this.accept(p.Comma) && !this.peek(p.ParenthesisR); ) if (!n.getParameters().addChild(this._parseModuleConfigDeclaration())) return this.finish(n, x.VariableNameExpected); if (!this.accept(p.ParenthesisR)) return this.finish(n, x.RightParenthesisExpected); } if (!this.peek(p.SemiColon) && !this.peek(p.EOF)) { if (!this.peekRegExp(p.Ident, /as|hide|show/)) return this.finish(n, x.UnknownKeyword); if (this.acceptIdent("as")) { var r = this._parseIdent([Y.Forward]); if (!n.setIdentifier(r)) return this.finish(n, x.IdentifierExpected); if (this.hasWhitespace() || !this.acceptDelim("*")) return this.finish(n, x.WildcardExpected); } if ((this.peekIdent("hide") || this.peekIdent("show")) && !n.addChild(this._parseForwardVisibility())) return this.finish(n, x.IdentifierOrVariableExpected); } return !this.accept(p.SemiColon) && !this.accept(p.EOF) ? this.finish(n, x.SemiColonExpected) : this.finish(n); }, t.prototype._parseForwardVisibility = function() { var n = this.create(yd); for (n.setIdentifier(this._parseIdent()); n.addChild(this._parseVariable() || this._parseIdent()); ) this.accept(p.Comma); return n.getChildren().length > 1 ? n : null; }, t.prototype._parseSupportsCondition = function() { return this._parseInterpolation() || e.prototype._parseSupportsCondition.call(this); }, t; }(Di), Xu = function() { var e = function(t, n) { return e = 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]); }, e(t, n); }; return function(t, n) { if (typeof n != "function" && n !== null) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); e(t, n); function r() { this.constructor = t; } t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; }(), M = Be(), Yu = function(e) { Xu(t, e); function t(n, r) { var i = e.call(this, "$", n, r) || this; return Eo(t.scssModuleLoaders), Eo(t.scssModuleBuiltIns), i; } return t.prototype.isImportPathParent = function(n) { return n === g.Forward || n === g.Use || e.prototype.isImportPathParent.call(this, n); }, t.prototype.getCompletionForImportPath = function(n, r) { var i = n.getParent().type; if (i === g.Forward || i === g.Use) for (var s = 0, a = t.scssModuleBuiltIns; s < a.length; s++) { var o = a[s], l = { label: o.label, documentation: o.documentation, textEdit: $.replace(this.getCompletionRange(n), "'".concat(o.label, "'")), kind: j.Module }; r.items.push(l); } return e.prototype.getCompletionForImportPath.call(this, n, r); }, t.prototype.createReplaceFunction = function() { var n = 1; return function(r, i) { return "\\" + i + ": ${" + n++ + ":" + (t.variableDefaults[i] || "") + "}"; }; }, t.prototype.createFunctionProposals = function(n, r, i, s) { for (var a = 0, o = n; a < o.length; a++) { var l = o[a], c = l.func.replace(/\[?(\$\w+)\]?/g, this.createReplaceFunction()), h = l.func.substr(0, l.func.indexOf("(")), u = { label: h, detail: l.func, documentation: l.desc, textEdit: $.replace(this.getCompletionRange(r), c), insertTextFormat: Ae.Snippet, kind: j.Function }; i && (u.sortText = "z"), s.items.push(u); } return s; }, t.prototype.getCompletionsForSelector = function(n, r, i) { return this.createFunctionProposals(t.selectorFuncs, null, !0, i), e.prototype.getCompletionsForSelector.call(this, n, r, i); }, t.prototype.getTermProposals = function(n, r, i) { var s = t.builtInFuncs; return n && (s = s.filter(function(a) { return !a.type || !n.restrictions || n.restrictions.indexOf(a.type) !== -1; })), this.createFunctionProposals(s, r, !0, i), e.prototype.getTermProposals.call(this, n, r, i); }, t.prototype.getColorProposals = function(n, r, i) { return this.createFunctionProposals(t.colorProposals, r, !1, i), e.prototype.getColorProposals.call(this, n, r, i); }, t.prototype.getCompletionsForDeclarationProperty = function(n, r) { return this.getCompletionForAtDirectives(r), this.getCompletionsForSelector(null, !0, r), e.prototype.getCompletionsForDeclarationProperty.call(this, n, r); }, t.prototype.getCompletionsForExtendsReference = function(n, r, i) { for (var s = this.getSymbolContext().findSymbolsAtOffset(this.offset, Y.Rule), a = 0, o = s; a < o.length; a++) { var l = o[a], c = { label: l.name, textEdit: $.replace(this.getCompletionRange(r), l.name), kind: j.Function }; i.items.push(c); } return i; }, t.prototype.getCompletionForAtDirectives = function(n) { var r; return (r = n.items).push.apply(r, t.scssAtDirectives), n; }, t.prototype.getCompletionForTopLevel = function(n) { return this.getCompletionForAtDirectives(n), this.getCompletionForModuleLoaders(n), e.prototype.getCompletionForTopLevel.call(this, n), n; }, t.prototype.getCompletionForModuleLoaders = function(n) { var r; return (r = n.items).push.apply(r, t.scssModuleLoaders), n; }, t.variableDefaults = { $red: "1", $green: "2", $blue: "3", $alpha: "1.0", $color: "#000000", $weight: "0.5", $hue: "0", $saturation: "0%", $lightness: "0%", $degrees: "0", $amount: "0", $string: '""', $substring: '"s"', $number: "0", $limit: "1" }, t.colorProposals = [ { func: "red($color)", desc: M("scss.builtin.red", "Gets the red component of a color.") }, { func: "green($color)", desc: M("scss.builtin.green", "Gets the green component of a color.") }, { func: "blue($color)", desc: M("scss.builtin.blue", "Gets the blue component of a color.") }, { func: "mix($color, $color, [$weight])", desc: M("scss.builtin.mix", "Mixes two colors together.") }, { func: "hue($color)", desc: M("scss.builtin.hue", "Gets the hue component of a color.") }, { func: "saturation($color)", desc: M("scss.builtin.saturation", "Gets the saturation component of a color.") }, { func: "lightness($color)", desc: M("scss.builtin.lightness", "Gets the lightness component of a color.") }, { func: "adjust-hue($color, $degrees)", desc: M("scss.builtin.adjust-hue", "Changes the hue of a color.") }, { func: "lighten($color, $amount)", desc: M("scss.builtin.lighten", "Makes a color lighter.") }, { func: "darken($color, $amount)", desc: M("scss.builtin.darken", "Makes a color darker.") }, { func: "saturate($color, $amount)", desc: M("scss.builtin.saturate", "Makes a color more saturated.") }, { func: "desaturate($color, $amount)", desc: M("scss.builtin.desaturate", "Makes a color less saturated.") }, { func: "grayscale($color)", desc: M("scss.builtin.grayscale", "Converts a color to grayscale.") }, { func: "complement($color)", desc: M("scss.builtin.complement", "Returns the complement of a color.") }, { func: "invert($color)", desc: M("scss.builtin.invert", "Returns the inverse of a color.") }, { func: "alpha($color)", desc: M("scss.builtin.alpha", "Gets the opacity component of a color.") }, { func: "opacity($color)", desc: "Gets the alpha component (opacity) of a color." }, { func: "rgba($color, $alpha)", desc: M("scss.builtin.rgba", "Changes the alpha component for a color.") }, { func: "opacify($color, $amount)", desc: M("scss.builtin.opacify", "Makes a color more opaque.") }, { func: "fade-in($color, $amount)", desc: M("scss.builtin.fade-in", "Makes a color more opaque.") }, { func: "transparentize($color, $amount)", desc: M("scss.builtin.transparentize", "Makes a color more transparent.") }, { func: "fade-out($color, $amount)", desc: M("scss.builtin.fade-out", "Makes a color more transparent.") }, { func: "adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])", desc: M("scss.builtin.adjust-color", "Increases or decreases one or more components of a color.") }, { func: "scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])", desc: M("scss.builtin.scale-color", "Fluidly scales one or more properties of a color.") }, { func: "change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])", desc: M("scss.builtin.change-color", "Changes one or more properties of a color.") }, { func: "ie-hex-str($color)", desc: M("scss.builtin.ie-hex-str", "Converts a color into the format understood by IE filters.") } ], t.selectorFuncs = [ { func: "selector-nest($selectors…)", desc: M("scss.builtin.selector-nest", "Nests selector beneath one another like they would be nested in the stylesheet.") }, { func: "selector-append($selectors…)", desc: M("scss.builtin.selector-append", "Appends selectors to one another without spaces in between.") }, { func: "selector-extend($selector, $extendee, $extender)", desc: M("scss.builtin.selector-extend", "Extends $extendee with $extender within $selector.") }, { func: "selector-replace($selector, $original, $replacement)", desc: M("scss.builtin.selector-replace", "Replaces $original with $replacement within $selector.") }, { func: "selector-unify($selector1, $selector2)", desc: M("scss.builtin.selector-unify", "Unifies two selectors to produce a selector that matches elements matched by both.") }, { func: "is-superselector($super, $sub)", desc: M("scss.builtin.is-superselector", "Returns whether $super matches all the elements $sub does, and possibly more.") }, { func: "simple-selectors($selector)", desc: M("scss.builtin.simple-selectors", "Returns the simple selectors that comprise a compound selector.") }, { func: "selector-parse($selector)", desc: M("scss.builtin.selector-parse", "Parses a selector into the format returned by &.") } ], t.builtInFuncs = [ { func: "unquote($string)", desc: M("scss.builtin.unquote", "Removes quotes from a string.") }, { func: "quote($string)", desc: M("scss.builtin.quote", "Adds quotes to a string.") }, { func: "str-length($string)", desc: M("scss.builtin.str-length", "Returns the number of characters in a string.") }, { func: "str-insert($string, $insert, $index)", desc: M("scss.builtin.str-insert", "Inserts $insert into $string at $index.") }, { func: "str-index($string, $substring)", desc: M("scss.builtin.str-index", "Returns the index of the first occurance of $substring in $string.") }, { func: "str-slice($string, $start-at, [$end-at])", desc: M("scss.builtin.str-slice", "Extracts a substring from $string.") }, { func: "to-upper-case($string)", desc: M("scss.builtin.to-upper-case", "Converts a string to upper case.") }, { func: "to-lower-case($string)", desc: M("scss.builtin.to-lower-case", "Converts a string to lower case.") }, { func: "percentage($number)", desc: M("scss.builtin.percentage", "Converts a unitless number to a percentage."), type: "percentage" }, { func: "round($number)", desc: M("scss.builtin.round", "Rounds a number to the nearest whole number.") }, { func: "ceil($number)", desc: M("scss.builtin.ceil", "Rounds a number up to the next whole number.") }, { func: "floor($number)", desc: M("scss.builtin.floor", "Rounds a number down to the previous whole number.") }, { func: "abs($number)", desc: M("scss.builtin.abs", "Returns the absolute value of a number.") }, { func: "min($numbers)", desc: M("scss.builtin.min", "Finds the minimum of several numbers.") }, { func: "max($numbers)", desc: M("scss.builtin.max", "Finds the maximum of several numbers.") }, { func: "random([$limit])", desc: M("scss.builtin.random", "Returns a random number.") }, { func: "length($list)", desc: M("scss.builtin.length", "Returns the length of a list.") }, { func: "nth($list, $n)", desc: M("scss.builtin.nth", "Returns a specific item in a list.") }, { func: "set-nth($list, $n, $value)", desc: M("scss.builtin.set-nth", "Replaces the nth item in a list.") }, { func: "join($list1, $list2, [$separator])", desc: M("scss.builtin.join", "Joins together two lists into one.") }, { func: "append($list1, $val, [$separator])", desc: M("scss.builtin.append", "Appends a single value onto the end of a list.") }, { func: "zip($lists)", desc: M("scss.builtin.zip", "Combines several lists into a single multidimensional list.") }, { func: "index($list, $value)", desc: M("scss.builtin.index", "Returns the position of a value within a list.") }, { func: "list-separator(#list)", desc: M("scss.builtin.list-separator", "Returns the separator of a list.") }, { func: "map-get($map, $key)", desc: M("scss.builtin.map-get", "Returns the value in a map associated with a given key.") }, { func: "map-merge($map1, $map2)", desc: M("scss.builtin.map-merge", "Merges two maps together into a new map.") }, { func: "map-remove($map, $keys)", desc: M("scss.builtin.map-remove", "Returns a new map with keys removed.") }, { func: "map-keys($map)", desc: M("scss.builtin.map-keys", "Returns a list of all keys in a map.") }, { func: "map-values($map)", desc: M("scss.builtin.map-values", "Returns a list of all values in a map.") }, { func: "map-has-key($map, $key)", desc: M("scss.builtin.map-has-key", "Returns whether a map has a value associated with a given key.") }, { func: "keywords($args)", desc: M("scss.builtin.keywords", "Returns the keywords passed to a function that takes variable arguments.") }, { func: "feature-exists($feature)", desc: M("scss.builtin.feature-exists", "Returns whether a feature exists in the current Sass runtime.") }, { func: "variable-exists($name)", desc: M("scss.builtin.variable-exists", "Returns whether a variable with the given name exists in the current scope.") }, { func: "global-variable-exists($name)", desc: M("scss.builtin.global-variable-exists", "Returns whether a variable with the given name exists in the global scope.") }, { func: "function-exists($name)", desc: M("scss.builtin.function-exists", "Returns whether a function with the given name exists.") }, { func: "mixin-exists($name)", desc: M("scss.builtin.mixin-exists", "Returns whether a mixin with the given name exists.") }, { func: "inspect($value)", desc: M("scss.builtin.inspect", "Returns the string representation of a value as it would be represented in Sass.") }, { func: "type-of($value)", desc: M("scss.builtin.type-of", "Returns the type of a value.") }, { func: "unit($number)", desc: M("scss.builtin.unit", "Returns the unit(s) associated with a number.") }, { func: "unitless($number)", desc: M("scss.builtin.unitless", "Returns whether a number has units.") }, { func: "comparable($number1, $number2)", desc: M("scss.builtin.comparable", "Returns whether two numbers can be added, subtracted, or compared.") }, { func: "call($name, $args…)", desc: M("scss.builtin.call", "Dynamically calls a Sass function.") } ], t.scssAtDirectives = [ { label: "@extend", documentation: M("scss.builtin.@extend", "Inherits the styles of another selector."), kind: j.Keyword }, { label: "@at-root", documentation: M("scss.builtin.@at-root", "Causes one or more rules to be emitted at the root of the document."), kind: j.Keyword }, { label: "@debug", documentation: M("scss.builtin.@debug", "Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."), kind: j.Keyword }, { label: "@warn", documentation: M("scss.builtin.@warn", "Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."), kind: j.Keyword }, { label: "@error", documentation: M("scss.builtin.@error", "Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."), kind: j.Keyword }, { label: "@if", documentation: M("scss.builtin.@if", "Includes the body if the expression does not evaluate to `false` or `null`."), insertText: `@if \${1:expr} { $0 }`, insertTextFormat: Ae.Snippet, kind: j.Keyword }, { label: "@for", documentation: M("scss.builtin.@for", "For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."), insertText: "@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n $0\n}", insertTextFormat: Ae.Snippet, kind: j.Keyword }, { label: "@each", documentation: M("scss.builtin.@each", "Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."), insertText: "@each \\$${1:var} in ${2:list} {\n $0\n}", insertTextFormat: Ae.Snippet, kind: j.Keyword }, { label: "@while", documentation: M("scss.builtin.@while", "While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."), insertText: `@while \${1:condition} { $0 }`, insertTextFormat: Ae.Snippet, kind: j.Keyword }, { label: "@mixin", documentation: M("scss.builtin.@mixin", "Defines styles that can be re-used throughout the stylesheet with `@include`."), insertText: `@mixin \${1:name} { $0 }`, insertTextFormat: Ae.Snippet, kind: j.Keyword }, { label: "@include", documentation: M("scss.builtin.@include", "Includes the styles defined by another mixin into the current rule."), kind: j.Keyword }, { label: "@function", documentation: M("scss.builtin.@function", "Defines complex operations that can be re-used throughout stylesheets."), kind: j.Keyword } ], t.scssModuleLoaders = [ { label: "@use", documentation: M("scss.builtin.@use", "Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/at-rules/use" }], insertText: "@use $0;", insertTextFormat: Ae.Snippet, kind: j.Keyword }, { label: "@forward", documentation: M("scss.builtin.@forward", "Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/at-rules/forward" }], insertText: "@forward $0;", insertTextFormat: Ae.Snippet, kind: j.Keyword } ], t.scssModuleBuiltIns = [ { label: "sass:math", documentation: M("scss.builtin.sass:math", "Provides functions that operate on numbers."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/math" }] }, { label: "sass:string", documentation: M("scss.builtin.sass:string", "Makes it easy to combine, search, or split apart strings."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/string" }] }, { label: "sass:color", documentation: M("scss.builtin.sass:color", "Generates new colors based on existing ones, making it easy to build color themes."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/color" }] }, { label: "sass:list", documentation: M("scss.builtin.sass:list", "Lets you access and modify values in lists."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/list" }] }, { label: "sass:map", documentation: M("scss.builtin.sass:map", "Makes it possible to look up the value associated with a key in a map, and much more."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/map" }] }, { label: "sass:selector", documentation: M("scss.builtin.sass:selector", "Provides access to Sass’s powerful selector engine."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/selector" }] }, { label: "sass:meta", documentation: M("scss.builtin.sass:meta", "Exposes the details of Sass’s inner workings."), references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/meta" }] } ], t; }(zi); function Eo(e) { e.forEach(function(t) { if (t.documentation && t.references && t.references.length > 0) { var n = typeof t.documentation == "string" ? { kind: "markdown", value: t.documentation } : { kind: "markdown", value: t.documentation.value }; n.value += ` `, n.value += t.references.map(function(r) { return "[".concat(r.name, "](").concat(r.url, ")"); }).join(" | "), t.documentation = n; } }); } var Ku = function() { var e = function(t, n) { return e = 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]); }, e(t, n); }; return function(t, n) { if (typeof n != "function" && n !== null) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); e(t, n); function r() { this.constructor = t; } t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; }(), Do = "/".charCodeAt(0), Qu = ` `.charCodeAt(0), Zu = "\r".charCodeAt(0), ep = "\f".charCodeAt(0), _r = "`".charCodeAt(0), Fr = ".".charCodeAt(0), tp = p.CustomToken, pi = tp++, Al = function(e) { Ku(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return t.prototype.scanNext = function(n) { var r = this.escapedJavaScript(); return r !== null ? this.finishToken(n, r) : this.stream.advanceIfChars([Fr, Fr, Fr]) ? this.finishToken(n, pi) : e.prototype.scanNext.call(this, n); }, t.prototype.comment = function() { return e.prototype.comment.call(this) ? !0 : !this.inURL && this.stream.advanceIfChars([Do, Do]) ? (this.stream.advanceWhileChar(function(n) { switch (n) { case Qu: case Zu: case ep: return !1; default: return !0; } }), !0) : !1; }, t.prototype.escapedJavaScript = function() { var n = this.stream.peekChar(); return n === _r ? (this.stream.advance(1), this.stream.advanceWhileChar(function(r) { return r !== _r; }), this.stream.advanceIfChar(_r) ? p.EscapedJavaScript : p.BadEscapedJavaScript) : null; }, t; }(bn), np = function() { var e = function(t, n) { return e = 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]); }, e(t, n); }; return function(t, n) { if (typeof n != "function" && n !== null) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); e(t, n); function r() { this.constructor = t; } t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; }(), rp = function(e) { np(t, e); function t() { return e.call(this, new Al()) || this; } return t.prototype._parseStylesheetStatement = function(n) { return n === void 0 && (n = !1), this.peek(p.AtKeyword) ? this._parseVariableDeclaration() || this._parsePlugin() || e.prototype._parseStylesheetAtStatement.call(this, n) : this._tryParseMixinDeclaration() || this._tryParseMixinReference() || this._parseFunction() || this._parseRuleset(!0); }, t.prototype._parseImport = function() { if (!this.peekKeyword("@import") && !this.peekKeyword("@import-once")) return null; var n = this.create(ki); if (this.consumeToken(), this.accept(p.ParenthesisL)) { if (!this.accept(p.Ident)) return this.finish(n, x.IdentifierExpected, [p.SemiColon]); do if (!this.accept(p.Comma)) break; while (this.accept(p.Ident)); if (!this.accept(p.ParenthesisR)) return this.finish(n, x.RightParenthesisExpected, [p.SemiColon]); } return !n.addChild(this._parseURILiteral()) && !n.addChild(this._parseStringLiteral()) ? this.finish(n, x.URIOrStringExpected, [p.SemiColon]) : (!this.peek(p.SemiColon) && !this.peek(p.EOF) && n.setMedialist(this._parseMediaQueryList()), this.finish(n)); }, t.prototype._parsePlugin = function() { if (!this.peekKeyword("@plugin")) return null; var n = this.createNode(g.Plugin); return this.consumeToken(), n.addChild(this._parseStringLiteral()) ? this.accept(p.SemiColon) ? this.finish(n) : this.finish(n, x.SemiColonExpected) : this.finish(n, x.StringLiteralExpected); }, t.prototype._parseMediaQuery = function() { var n = e.prototype._parseMediaQuery.call(this); if (!n) { var r = this.create(hl); return r.addChild(this._parseVariable()) ? this.finish(r) : null; } return n; }, t.prototype._parseMediaDeclaration = function(n) { return n === void 0 && (n = !1), this._tryParseRuleset(n) || this._tryToParseDeclaration() || this._tryParseMixinDeclaration() || this._tryParseMixinReference() || this._parseDetachedRuleSetMixin() || this._parseStylesheetStatement(n); }, t.prototype._parseMediaFeatureName = function() { return this._parseIdent() || this._parseVariable(); }, t.prototype._parseVariableDeclaration = function(n) { n === void 0 && (n = []); var r = this.create(ar), 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, x.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); }, t.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(ln); 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, x.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(se); return this._parseBody(i, this._parseDetachedRuleSetBody.bind(this)), this.finish(i); }, t.prototype._parseDetachedRuleSetBody = function() { return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration(); }, t.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; }, t.prototype._parseLookupValue = function() { var n = this.create(W), 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); }, t.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(Ei), a = this.mark(); this.acceptDelim("@") || !n && this.acceptDelim("$"); ) if (this.hasWhitespace()) return this.restoreAtMark(a), null; return !this.accept(p.AtKeyword) && !this.accept(p.Ident) ? (this.restoreAtMark(a), null) : !r && this.peek(p.BracketL) && !this._addLookupChildren(s) ? (this.restoreAtMark(a), null) : s; }, t.prototype._parseTermExpression = function() { return this._parseVariable() || this._parseEscaped() || e.prototype._parseTermExpression.call(this) || this._tryParseMixinReference(!1); }, t.prototype._parseEscaped = function() { if (this.peek(p.EscapedJavaScript) || this.peek(p.BadEscapedJavaScript)) { var n = this.createNode(g.EscapedValue); return this.consumeToken(), this.finish(n); } if (this.peekDelim("~")) { var n = this.createNode(g.EscapedValue); return this.consumeToken(), this.accept(p.String) || this.accept(p.EscapedJavaScript) ? this.finish(n) : this.finish(n, x.TermExpected); } return null; }, t.prototype._parseOperator = function() { var n = this._parseGuardOperator(); return n || e.prototype._parseOperator.call(this); }, t.prototype._parseGuardOperator = function() { if (this.peekDelim(">")) { var n = this.createNode(g.Operator); return this.consumeToken(), this.acceptDelim("="), n; } else if (this.peekDelim("=")) { var n = this.createNode(g.Operator); return this.consumeToken(), this.acceptDelim("<"), n; } else if (this.peekDelim("<")) { var n = this.createNode(g.Operator); return this.consumeToken(), this.acceptDelim("="), n; } return null; }, t.prototype._parseRuleSetDeclaration = function() { return this.peek(p.AtKeyword) ? this._parseKeyframe() || this._parseMedia(!0) || this._parseImport() || this._parseSupports(!0) || this._parseDetachedRuleSetMixin() || this._parseVariableDeclaration() || e.prototype._parseRuleSetDeclarationAtStatement.call(this) : this._tryParseMixinDeclaration() || this._tryParseRuleset(!0) || this._tryParseMixinReference() || this._parseFunction() || this._parseExtend() || e.prototype._parseRuleSetDeclaration.call(this); }, t.prototype._parseKeyframeIdent = function() { return this._parseIdent([Y.Keyframe]) || this._parseVariable(); }, t.prototype._parseKeyframeSelector = function() { return this._parseDetachedRuleSetMixin() || e.prototype._parseKeyframeSelector.call(this); }, t.prototype._parseSimpleSelectorBody = function() { return this._parseSelectorCombinator() || e.prototype._parseSimpleSelectorBody.call(this); }, t.prototype._parseSelector = function(n) { var r = this.create(vn), 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; }, t.prototype._parseSelectorCombinator = function() { if (this.peekDelim("&")) { var n = this.createNode(g.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; }, t.prototype._parseSelectorIdent = function() { if (!this.peekInterpolatedIdent()) return null; var n = this.createNode(g.SelectorInterpolation), r = this._acceptInterpolatedIdent(n); return r ? this.finish(n) : null; }, t.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(Pe); s.isCustomProperty = this.acceptDelim("-") && this.acceptDelim("-"); var a = !1; return n ? s.isCustomProperty ? a = s.addChild(this._parseIdent()) : a = s.addChild(this._parseRegexp(r)) : s.isCustomProperty ? a = this._acceptInterpolatedIdent(s) : a = this._acceptInterpolatedIdent(s, r), a ? (!n && !this.hasWhitespace() && (this.acceptDelim("+"), this.hasWhitespace() || this.acceptIdent("_")), this.finish(s)) : (this.restoreAtMark(i), null); }, t.prototype.peekInterpolatedIdent = function() { return this.peek(p.Ident) || this.peekDelim("@") || this.peekDelim("$") || this.peekDelim("-"); }, t.prototype._acceptInterpolatedIdent = function(n, r) { for (var i = this, s = !1, a = function() { var l = i.mark(); return i.acceptDelim("-") && (i.hasWhitespace() || i.acceptDelim("-"), i.hasWhitespace()) ? (i.restoreAtMark(l), null) : i._parseInterpolation(); }, o = r ? function() { return i.acceptRegexp(r); } : function() { return i.accept(p.Ident); }; (o() || n.addChild(this._parseInterpolation() || this.try(a))) && (s = !0, !this.hasWhitespace()); ) ; return s; }, t.prototype._parseInterpolation = function() { var n = this.mark(); if (this.peekDelim("@") || this.peekDelim("$")) { var r = this.createNode(g.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, x.RightCurlyExpected) : this.finish(r, x.IdentifierExpected); } return null; }, t.prototype._tryParseMixinDeclaration = function() { var n = this.mark(), r = this.create(ln); 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, x.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); }, t.prototype._parseMixInBodyDeclaration = function() { return this._parseFontFace() || this._parseRuleSetDeclaration(); }, t.prototype._parseMixinDeclarationIdentifier = function() { var n; if (this.peekDelim("#") || this.peekDelim(".")) { if (n = this.create(Pe), this.consumeToken(), this.hasWhitespace() || !n.addChild(this._parseIdent())) return null; } else if (this.peek(p.Hash)) n = this.create(Pe), this.consumeToken(); else return null; return n.referenceTypes = [Y.Mixin], this.finish(n); }, t.prototype._parsePseudo = function() { if (!this.peek(p.Colon)) return null; var n = this.mark(), r = this.create(on); return this.consumeToken(), this.acceptIdent("extend") ? this._completeExtends(r) : (this.restoreAtMark(n), e.prototype._parsePseudo.call(this)); }, t.prototype._parseExtend = function() { if (!this.peekDelim("&")) return null; var n = this.mark(), r = this.create(on); return this.consumeToken(), this.hasWhitespace() || !this.accept(p.Colon) || !this.acceptIdent("extend") ? (this.restoreAtMark(n), null) : this._completeExtends(r); }, t.prototype._completeExtends = function(n) { if (!this.accept(p.ParenthesisL)) return this.finish(n, x.LeftParenthesisExpected); var r = n.getSelectors(); if (!r.addChild(this._parseSelector(!0))) return this.finish(n, x.SelectorExpected); for (; this.accept(p.Comma); ) if (!r.addChild(this._parseSelector(!0))) return this.finish(n, x.SelectorExpected); return this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, x.RightParenthesisExpected); }, t.prototype._parseDetachedRuleSetMixin = function() { if (!this.peek(p.AtKeyword)) return null; var n = this.mark(), r = this.create($n); 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, x.RightParenthesisExpected); }, t.prototype._tryParseMixinReference = function(n) { n === void 0 && (n = !0); for (var r = this.mark(), i = this.create($n), s = this._parseMixinDeclarationIdentifier(); s; ) { this.acceptDelim(">"); var a = this._parseMixinDeclarationIdentifier(); if (a) i.getNamespaces().addChild(s), s = a; else break; } if (!i.setIdentifier(s)) return this.restoreAtMark(r), null; var o = !1; if (this.accept(p.ParenthesisL)) { if (o = !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, x.ExpressionExpected); } if (!this.accept(p.ParenthesisR)) return this.finish(i, x.RightParenthesisExpected); s.referenceTypes = [Y.Mixin]; } else s.referenceTypes = [Y.Mixin, Y.Rule]; return this.peek(p.BracketL) ? n || this._addLookupChildren(i) : i.addChild(this._parsePrio()), !o && !this.peek(p.SemiColon) && !this.peek(p.CurlyR) && !this.peek(p.EOF) ? (this.restoreAtMark(r), null) : this.finish(i); }, t.prototype._parseMixinArgument = function() { var n = this.create(Vt), 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); }, t.prototype._parseMixinParameter = function() { var n = this.create(sr); if (this.peekKeyword("@rest")) { var r = this.create(W); return this.consumeToken(), this.accept(pi) ? (n.setIdentifier(this.finish(r)), this.finish(n)) : this.finish(n, x.DotExpected, [], [p.Comma, p.ParenthesisR]); } if (this.peek(pi)) { var i = this.create(W); 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); }, t.prototype._parseGuard = function() { if (!this.peekIdent("when")) return null; var n = this.create(Id); if (this.consumeToken(), n.isNegated = this.acceptIdent("not"), !n.getConditions().addChild(this._parseGuardCondition())) return this.finish(n, x.ConditionExpected); for (; this.acceptIdent("and") || this.accept(p.Comma); ) if (!n.getConditions().addChild(this._parseGuardCondition())) return this.finish(n, x.ConditionExpected); return this.finish(n); }, t.prototype._parseGuardCondition = function() { if (!this.peek(p.ParenthesisL)) return null; var n = this.create(Ld); return this.consumeToken(), n.addChild(this._parseExpr()), this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, x.RightParenthesisExpected); }, t.prototype._parseFunction = function() { var n = this.mark(), r = this.create(yn); 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, x.ExpressionExpected); } return this.accept(p.ParenthesisR) ? this.finish(r) : this.finish(r, x.RightParenthesisExpected); }, t.prototype._parseFunctionIdentifier = function() { if (this.peekDelim("%")) { var n = this.create(Pe); return n.referenceTypes = [Y.Function], this.consumeToken(), this.finish(n); } return e.prototype._parseFunctionIdentifier.call(this); }, t.prototype._parseURLArgument = function() { var n = this.mark(), r = e.prototype._parseURLArgument.call(this); if (!r || !this.peek(p.ParenthesisR)) { this.restoreAtMark(n); var i = this.create(W); return i.addChild(this._parseBinaryExpr()), this.finish(i); } return r; }, t; }(Di), ip = function() { var e = function(t, n) { return e = 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]); }, e(t, n); }; return function(t, n) { if (typeof n != "function" && n !== null) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); e(t, n); function r() { this.constructor = t; } t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; }(), O = Be(), sp = function(e) { ip(t, e); function t(n, r) { return e.call(this, "@", n, r) || this; } return t.prototype.createFunctionProposals = function(n, r, i, s) { for (var a = 0, o = n; a < o.length; a++) { var l = o[a], c = { label: l.name, detail: l.example, documentation: l.description, textEdit: $.replace(this.getCompletionRange(r), l.name + "($0)"), insertTextFormat: Ae.Snippet, kind: j.Function }; i && (c.sortText = "z"), s.items.push(c); } return s; }, t.prototype.getTermProposals = function(n, r, i) { var s = t.builtInProposals; return n && (s = s.filter(function(a) { return !a.type || !n.restrictions || n.restrictions.indexOf(a.type) !== -1; })), this.createFunctionProposals(s, r, !0, i), e.prototype.getTermProposals.call(this, n, r, i); }, t.prototype.getColorProposals = function(n, r, i) { return this.createFunctionProposals(t.colorProposals, r, !1, i), e.prototype.getColorProposals.call(this, n, r, i); }, t.prototype.getCompletionsForDeclarationProperty = function(n, r) { return this.getCompletionsForSelector(null, !0, r), e.prototype.getCompletionsForDeclarationProperty.call(this, n, r); }, t.builtInProposals = [ { name: "if", example: "if(condition, trueValue [, falseValue]);", description: O("less.builtin.if", "returns one of two values depending on a condition.") }, { name: "boolean", example: "boolean(condition);", description: O("less.builtin.boolean", '"store" a boolean test for later evaluation in a guard or if().') }, { name: "length", example: "length(@list);", description: O("less.builtin.length", "returns the number of elements in a value list") }, { name: "extract", example: "extract(@list, index);", description: O("less.builtin.extract", "returns a value at the specified position in the list") }, { name: "range", example: "range([start, ] end [, step]);", description: O("less.builtin.range", "generate a list spanning a range of values") }, { name: "each", example: "each(@list, ruleset);", description: O("less.builtin.each", "bind the evaluation of a ruleset to each member of a list.") }, { name: "escape", example: "escape(@string);", description: O("less.builtin.escape", "URL encodes a string") }, { name: "e", example: "e(@string);", description: O("less.builtin.e", "escape string content") }, { name: "replace", example: "replace(@string, @pattern, @replacement[, @flags]);", description: O("less.builtin.replace", "string replace") }, { name: "unit", example: "unit(@dimension, [@unit: '']);", description: O("less.builtin.unit", "remove or change the unit of a dimension") }, { name: "color", example: "color(@string);", description: O("less.builtin.color", "parses a string to a color"), type: "color" }, { name: "convert", example: "convert(@value, unit);", description: O("less.builtin.convert", "converts numbers from one type into another") }, { name: "data-uri", example: "data-uri([mimetype,] url);", description: O("less.builtin.data-uri", "inlines a resource and falls back to `url()`"), type: "url" }, { name: "abs", description: O("less.builtin.abs", "absolute value of a number"), example: "abs(number);" }, { name: "acos", description: O("less.builtin.acos", "arccosine - inverse of cosine function"), example: "acos(number);" }, { name: "asin", description: O("less.builtin.asin", "arcsine - inverse of sine function"), example: "asin(number);" }, { name: "ceil", example: "ceil(@number);", description: O("less.builtin.ceil", "rounds up to an integer") }, { name: "cos", description: O("less.builtin.cos", "cosine function"), example: "cos(number);" }, { name: "floor", description: O("less.builtin.floor", "rounds down to an integer"), example: "floor(@number);" }, { name: "percentage", description: O("less.builtin.percentage", "converts to a %, e.g. 0.5 > 50%"), example: "percentage(@number);", type: "percentage" }, { name: "round", description: O("less.builtin.round", "rounds a number to a number of places"), example: "round(number, [places: 0]);" }, { name: "sqrt", description: O("less.builtin.sqrt", "calculates square root of a number"), example: "sqrt(number);" }, { name: "sin", description: O("less.builtin.sin", "sine function"), example: "sin(number);" }, { name: "tan", description: O("less.builtin.tan", "tangent function"), example: "tan(number);" }, { name: "atan", description: O("less.builtin.atan", "arctangent - inverse of tangent function"), example: "atan(number);" }, { name: "pi", description: O("less.builtin.pi", "returns pi"), example: "pi();" }, { name: "pow", description: O("less.builtin.pow", "first argument raised to the power of the second argument"), example: "pow(@base, @exponent);" }, { name: "mod", description: O("less.builtin.mod", "first argument modulus second argument"), example: "mod(number, number);" }, { name: "min", description: O("less.builtin.min", "returns the lowest of one or more values"), example: "min(@x, @y);" }, { name: "max", description: O("less.builtin.max", "returns the lowest of one or more values"), example: "max(@x, @y);" } ], t.colorProposals = [ { name: "argb", example: "argb(@color);", description: O("less.builtin.argb", "creates a #AARRGGBB") }, { name: "hsl", example: "hsl(@hue, @saturation, @lightness);", description: O("less.builtin.hsl", "creates a color") }, { name: "hsla", example: "hsla(@hue, @saturation, @lightness, @alpha);", description: O("less.builtin.hsla", "creates a color") }, { name: "hsv", example: "hsv(@hue, @saturation, @value);", description: O("less.builtin.hsv", "creates a color") }, { name: "hsva", example: "hsva(@hue, @saturation, @value, @alpha);", description: O("less.builtin.hsva", "creates a color") }, { name: "hue", example: "hue(@color);", description: O("less.builtin.hue", "returns the `hue` channel of `@color` in the HSL space") }, { name: "saturation", example: "saturation(@color);", description: O("less.builtin.saturation", "returns the `saturation` channel of `@color` in the HSL space") }, { name: "lightness", example: "lightness(@color);", description: O("less.builtin.lightness", "returns the `lightness` channel of `@color` in the HSL space") }, { name: "hsvhue", example: "hsvhue(@color);", description: O("less.builtin.hsvhue", "returns the `hue` channel of `@color` in the HSV space") }, { name: "hsvsaturation", example: "hsvsaturation(@color);", description: O("less.builtin.hsvsaturation", "returns the `saturation` channel of `@color` in the HSV space") }, { name: "hsvvalue", example: "hsvvalue(@color);", description: O("less.builtin.hsvvalue", "returns the `value` channel of `@color` in the HSV space") }, { name: "red", example: "red(@color);", description: O("less.builtin.red", "returns the `red` channel of `@color`") }, { name: "green", example: "green(@color);", description: O("less.builtin.green", "returns the `green` channel of `@color`") }, { name: "blue", example: "blue(@color);", description: O("less.builtin.blue", "returns the `blue` channel of `@color`") }, { name: "alpha", example: "alpha(@color);", description: O("less.builtin.alpha", "returns the `alpha` channel of `@color`") }, { name: "luma", example: "luma(@color);", description: O("less.builtin.luma", "returns the `luma` value (perceptual brightness) of `@color`") }, { name: "saturate", example: "saturate(@color, 10%);", description: O("less.builtin.saturate", "return `@color` 10% points more saturated") }, { name: "desaturate", example: "desaturate(@color, 10%);", description: O("less.builtin.desaturate", "return `@color` 10% points less saturated") }, { name: "lighten", example: "lighten(@color, 10%);", description: O("less.builtin.lighten", "return `@color` 10% points lighter") }, { name: "darken", example: "darken(@color, 10%);", description: O("less.builtin.darken", "return `@color` 10% points darker") }, { name: "fadein", example: "fadein(@color, 10%);", description: O("less.builtin.fadein", "return `@color` 10% points less transparent") }, { name: "fadeout", example: "fadeout(@color, 10%);", description: O("less.builtin.fadeout", "return `@color` 10% points more transparent") }, { name: "fade", example: "fade(@color, 50%);", description: O("less.builtin.fade", "return `@color` with 50% transparency") }, { name: "spin", example: "spin(@color, 10);", description: O("less.builtin.spin", "return `@color` with a 10 degree larger in hue") }, { name: "mix", example: "mix(@color1, @color2, [@weight: 50%]);", description: O("less.builtin.mix", "return a mix of `@color1` and `@color2`") }, { name: "greyscale", example: "greyscale(@color);", description: O("less.builtin.greyscale", "returns a grey, 100% desaturated color") }, { name: "contrast", example: "contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);", description: O("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);" } ], t; }(zi); function ap(e, t) { var n = op(e); return lp(n, t); } function op(e) { function t(u) { return e.positionAt(u.offset).line; } function n(u) { return e.positionAt(u.offset + u.len).line; } function r() { switch (e.languageId) { case "scss": return new Dl(); case "less": return new Al(); default: return new bn(); } } function i(u, f) { var m = t(u), b = n(u); return m !== b ? { startLine: m, endLine: b, kind: f } : null; } var s = [], a = [], o = r(); o.ignoreComment = !1, o.setSource(e.getText()); for (var l = o.scan(), c = null, h = function() { switch (l.type) { case p.CurlyL: case nr: { a.push({ line: t(l), type: "brace", isStart: !0 }); break; } case p.CurlyR: { if (a.length !== 0) { var u = Ao(a, "brace"); if (!u) break; var f = n(l); u.type === "brace" && (c && n(c) !== f && f--, u.line !== f && s.push({ startLine: u.line, endLine: f, kind: void 0 })); } break; } case p.Comment: { var m = function(w) { return w === "#region" ? { line: t(l), type: "comment", isStart: !0 } : { line: n(l), type: "comment", isStart: !1 }; }, b = function(w) { var S = w.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//); if (S) return m(S[1]); if (e.languageId === "scss" || e.languageId === "less") { var k = w.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/); if (k) return m(k[1]); } return null; }, v = b(l); if (v) if (v.isStart) a.push(v); else { var u = Ao(a, "comment"); if (!u) break; u.type === "comment" && u.line !== v.line && s.push({ startLine: u.line, endLine: v.line, kind: "region" }); } else { var y = i(l, "comment"); y && s.push(y); } break; } } c = l, l = o.scan(); }; l.type !== p.EOF; ) h(); return s; } function Ao(e, t) { if (e.length === 0) return null; for (var n = e.length - 1; n >= 0; n--) if (e[n].type === t && e[n].isStart) return e.splice(n, 1)[0]; return null; } function lp(e, t) { var n = t && t.rangeLimit || Number.MAX_VALUE, r = e.sort(function(a, o) { var l = a.startLine - o.startLine; return l === 0 && (l = a.endLine - o.endLine), l; }), i = [], s = -1; return r.forEach(function(a) { a.startLine < s && s < a.endLine || (i.push(a), s = a.endLine); }), i.length < n ? i : i.slice(0, n); } var zl; (function() { var e = [ , , function(i) { function s(l) { this.__parent = l, this.__character_count = 0, this.__indent_count = -1, this.__alignment_count = 0, this.__wrap_point_index = 0, this.__wrap_point_character_count = 0, this.__wrap_point_indent_count = -1, this.__wrap_point_alignment_count = 0, this.__items = []; } s.prototype.clone_empty = function() { var l = new s(this.__parent); return l.set_indent(this.__indent_count, this.__alignment_count), l; }, s.prototype.item = function(l) { return l < 0 ? this.__items[this.__items.length + l] : this.__items[l]; }, s.prototype.has_match = function(l) { for (var c = this.__items.length - 1; c >= 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 a(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; } a.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; }, a.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; }, a.prototype.__ensure_cache = function(l) { for (; l >= this.__cache.length; ) this.__add_column(); }, a.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 o(l, c) { this.__indent_cache = new a(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(); } o.prototype.__add_outputline = function() { this.previous_line = this.current_line, this.current_line = this.next_line.clone_empty(), this.__lines.push(this.current_line); }, o.prototype.get_line_number = function() { return this.__lines.length; }, o.prototype.get_indent_string = function(l, c) { return this.__indent_cache.get_indent_string(l, c); }, o.prototype.get_indent_size = function(l, c) { return this.__indent_cache.get_indent_size(l, c); }, o.prototype.is_empty = function() { return !this.previous_line && this.current_line.is_empty(); }, o.prototype.add_new_line = function(l) { return this.is_empty() || !l && this.just_added_newline() ? !1 : (this.raw || this.__add_outputline(), !0); }, o.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; }, o.prototype.set_wrap_point = function() { this.current_line._set_wrap_point(); }, o.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); }, o.prototype.add_raw_token = function(l) { for (var c = 0; c < l.newlines; c++) this.__add_outputline(); this.current_line.set_indent(-1), this.current_line.push(l.whitespace_before), this.current_line.push(l.text), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = !1; }, o.prototype.add_token = function(l) { this.__add_space_before_token(), this.current_line.push(l), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = this.current_line._allow_wrap(); }, o.prototype.__add_space_before_token = function() { this.space_before_token && !this.just_added_newline() && (this.non_breaking_space || this.set_wrap_point(), this.current_line.push(" ")); }, o.prototype.remove_indent = function(l) { for (var c = this.__lines.length; l < c; ) this.__lines[l]._remove_indent(), l++; this.current_line._remove_wrap_indent(); }, o.prototype.trim = function(l) { for (l = l === void 0 ? !1 : l, this.current_line.trim(); l && this.__lines.length > 1 && 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; }, o.prototype.just_added_newline = function() { return this.current_line.is_empty(); }, o.prototype.just_added_blankline = function() { return this.is_empty() || this.current_line.is_empty() && this.previous_line.is_empty(); }, o.prototype.ensure_empty_line_above = function(l, c) { for (var h = this.__lines.length - 2; h >= 0; ) { var u = this.__lines[h]; if (u.is_empty()) break; if (u.item(0).indexOf(l) !== 0 && u.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 = o; }, , , , function(i) { function s(l, c) { this.raw_options = a(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], u = c || []; return typeof h == "object" ? h !== null && typeof h.concat == "function" && (u = h.concat()) : typeof h == "string" && (u = h.split(/[^a-zA-Z0-9_\/\-]+/)), u; }, s.prototype._get_boolean = function(l, c) { var h = this.raw_options[l], u = h === void 0 ? !!c : !!h; return u; }, s.prototype._get_characters = function(l, c) { var h = this.raw_options[l], u = c || ""; return typeof h == "string" && (u = h.replace(/\\r/, "\r").replace(/\\n/, ` `).replace(/\\t/, " ")), u; }, s.prototype._get_number = function(l, c) { var h = this.raw_options[l]; c = parseInt(c, 10), isNaN(c) && (c = 0); var u = parseInt(h, 10); return isNaN(u) && (u = c), u; }, s.prototype._get_selection = function(l, c, h) { var u = this._get_selection_list(l, c, h); if (u.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 u[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 u = this._get_array(l, h); if (!this._is_valid_selection(u, 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 u; }, s.prototype._is_valid_selection = function(l, c) { return l.length && c.length && !l.some(function(h) { return c.indexOf(h) === -1; }); }; function a(l, c) { var h = {}; l = o(l); var u; for (u in l) u !== c && (h[u] = l[u]); if (c && l[c]) for (u in l[c]) h[u] = l[c][u]; return h; } function o(l) { var c = {}, h; for (h in l) { var u = h.replace(/-/g, "_"); c[u] = l[h]; } return c; } i.exports.Options = s, i.exports.normalizeOpts = o, i.exports.mergeOpts = a; }, , function(i) { var s = RegExp.prototype.hasOwnProperty("sticky"); function a(o) { this.__input = o || "", this.__input_length = this.__input.length, this.__position = 0; } a.prototype.restart = function() { this.__position = 0; }, a.prototype.back = function() { this.__position > 0 && (this.__position -= 1); }, a.prototype.hasNext = function() { return this.__position < this.__input_length; }, a.prototype.next = function() { var o = null; return this.hasNext() && (o = this.__input.charAt(this.__position), this.__position += 1), o; }, a.prototype.peek = function(o) { var l = null; return o = o || 0, o += this.__position, o >= 0 && o < this.__input_length && (l = this.__input.charAt(o)), l; }, a.prototype.__match = function(o, l) { o.lastIndex = l; var c = o.exec(this.__input); return c && !(s && o.sticky) && c.index !== l && (c = null), c; }, a.prototype.test = function(o, l) { return l = l || 0, l += this.__position, l >= 0 && l < this.__input_length ? !!this.__match(o, l) : !1; }, a.prototype.testChar = function(o, l) { var c = this.peek(l); return o.lastIndex = 0, c !== null && o.test(c); }, a.prototype.match = function(o) { var l = this.__match(o, this.__position); return l ? this.__position += l[0].length : l = null, l; }, a.prototype.read = function(o, l, c) { var h = "", u; return o && (u = this.match(o), u && (h += u[0])), l && (u || !o) && (h += this.readUntil(l, c)), h; }, a.prototype.readUntil = function(o, l) { var c = "", h = this.__position; o.lastIndex = this.__position; var u = o.exec(this.__input); return u ? (h = u.index, l && (h += u[0].length)) : h = this.__input_length, c = this.__input.substring(this.__position, h), this.__position = h, c; }, a.prototype.readUntilAfter = function(o) { return this.readUntil(o, !0); }, a.prototype.get_regexp = function(o, l) { var c = null, h = "g"; return l && s && (h = "y"), typeof o == "string" && o !== "" ? c = new RegExp(o, h) : o && (c = new RegExp(o.source, h)), c; }, a.prototype.get_literal_regexp = function(o) { return RegExp(o.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")); }, a.prototype.peekUntilAfter = function(o) { var l = this.__position, c = this.readUntilAfter(o); return this.__position = l, c; }, a.prototype.lookBack = function(o) { var l = this.__position - 1; return l >= o.length && this.__input.substring(l - o.length, l).toLowerCase() === o; }, i.exports.InputScanner = a; }, , , , , function(i) { function s(a, o) { a = typeof a == "string" ? a : a.source, o = typeof o == "string" ? o : o.source, this.__directives_block_pattern = new RegExp(a + / beautify( \w+[:]\w+)+ /.source + o, "g"), this.__directive_pattern = / (\w+)[:](\w+)/g, this.__directives_end_ignore_pattern = new RegExp(a + /\sbeautify\signore:end\s/.source + o, "g"); } s.prototype.get_directives = function(a) { if (!a.match(this.__directives_block_pattern)) return null; var o = {}; this.__directive_pattern.lastIndex = 0; for (var l = this.__directive_pattern.exec(a); l; ) o[l[1]] = l[2], l = this.__directive_pattern.exec(a); return o; }, s.prototype.readIgnored = function(a) { return a.readUntilAfter(this.__directives_end_ignore_pattern); }, i.exports.Directives = s; }, , function(i, s, a) { var o = a(16).Beautifier, l = a(17).Options; function c(h, u) { var f = new o(h, u); return f.beautify(); } i.exports = c, i.exports.defaultOptions = function() { return new l(); }; }, function(i, s, a) { var o = a(17).Options, l = a(2).Output, c = a(8).InputScanner, h = a(13).Directives, u = new h(/\/\*/, /\*\//), f = /\r\n|[\r\n]/, m = /\r\n|[\r\n]/g, b = /\s/, v = /(?:\s|\n)+/g, y = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g, w = /\/\/(?:[^\n\r\u2028\u2029]*)/g; function S(k, F) { this._source_text = k || "", this._options = new o(F), 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 }; } S.prototype.eatString = function(k) { var F = ""; for (this._ch = this._input.next(); this._ch; ) { if (F += this._ch, this._ch === "\\") F += this._input.next(); else if (k.indexOf(this._ch) !== -1 || this._ch === ` `) break; this._ch = this._input.next(); } return F; }, S.prototype.eatWhitespace = function(k) { for (var F = b.test(this._input.peek()), N = 0; b.test(this._input.peek()); ) this._ch = this._input.next(), k && this._ch === ` ` && (N === 0 || N < this._options.max_preserve_newlines) && (N++, this._output.add_new_line(!0)); return F; }, S.prototype.foundNestedPseudoClass = function() { for (var k = 0, F = 1, N = this._input.peek(F); N; ) { if (N === "{") return !0; if (N === "(") k += 1; else if (N === ")") { if (k === 0) return !1; k -= 1; } else if (N === ";" || N === "}") return !1; F++, N = this._input.peek(F); } return !1; }, S.prototype.print_string = function(k) { this._output.set_indent(this._indentLevel), this._output.non_breaking_space = !0, this._output.add_token(k); }, S.prototype.preserveSingleSpace = function(k) { k && (this._output.space_before_token = !0); }, S.prototype.indent = function() { this._indentLevel++; }, S.prototype.outdent = function() { this._indentLevel > 0 && this._indentLevel--; }, S.prototype.beautify = function() { if (this._options.disabled) return this._source_text; var k = this._source_text, F = this._options.eol; F === "auto" && (F = ` `, k && f.test(k || "") && (F = k.match(f)[0])), k = k.replace(m, ` `); var N = k.match(/^[\t ]*/)[0]; this._output = new l(this._options, N), this._input = new c(k), this._indentLevel = 0, this._nestedLevel = 0, this._ch = null; for (var B = 0, H = !1, D = !1, R = !1, I = !1, P = !1, z = this._ch, V, q, ie; V = this._input.read(v), q = V !== "", ie = z, this._ch = this._input.next(), this._ch === "\\" && this._input.hasNext() && (this._ch += this._input.next()), z = this._ch, this._ch; ) if (this._ch === "/" && this._input.peek() === "*") { this._output.add_new_line(), this._input.back(); var de = this._input.read(y), A = u.get_directives(de); A && A.ignore === "start" && (de += u.readIgnored(this._input)), this.print_string(de), 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(w)), this.eatWhitespace(!0); else if (this._ch === "@") if (this.preserveSingleSpace(q), this._input.peek() === "{") this.print_string(this._ch + this.eatString("}")); else { this.print_string(this._ch); var C = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g); C.match(/[ :]$/) && (C = this.eatString(": ").replace(/\s$/, ""), this.print_string(C), this._output.space_before_token = !0), C = C.replace(/\s$/, ""), C === "extend" ? I = !0 : C === "import" && (P = !0), C in this.NESTED_AT_RULE ? (this._nestedLevel += 1, C in this.CONDITIONAL_GROUP_RULE && (R = !0)) : !H && B === 0 && C.indexOf(":") !== -1 && (D = !0, this.indent()); } else this._ch === "#" && this._input.peek() === "{" ? (this.preserveSingleSpace(q), this.print_string(this._ch + this.eatString("}"))) : this._ch === "{" ? (D && (D = !1, this.outdent()), R ? (R = !1, H = this._indentLevel >= this._nestedLevel) : H = this._indentLevel >= this._nestedLevel - 1, this._options.newline_between_rules && H && 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(), ie === "{" && this._output.trim(!0), P = !1, I = !1, D && (this.outdent(), D = !1), this.print_string(this._ch), H = !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 === ":" ? (H || R) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !I && B === 0 ? (this.print_string(":"), D || (D = !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(q), this.print_string(this._ch + this.eatString(this._ch)), this.eatWhitespace(!0)) : this._ch === ";" ? B === 0 ? (D && (this.outdent(), D = !1), I = !1, P = !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(), B++, 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(")")), B && (B--, this.outdent()))) : (this.preserveSingleSpace(q), this.print_string(this._ch), this.eatWhitespace(), B++, this.indent()) : this._ch === ")" ? (B && (B--, this.outdent()), this.print_string(this._ch)) : this._ch === "," ? (this.print_string(this._ch), this.eatWhitespace(!0), this._options.selector_separator_newline && !D && B === 0 && !P && !I ? this._output.add_new_line() : this._output.space_before_token = !0) : (this._ch === ">" || this._ch === "+" || this._ch === "~") && !D && B === 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(q), 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(q), this.print_string(this._ch)); var E = this._output.get_code(F); return E; }, i.exports.Beautifier = S; }, function(i, s, a) { var o = a(6).Options; function l(c) { o.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 u = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]); this.brace_style = "collapse"; for (var f = 0; f < u.length; f++) u[f] !== "expand" ? this.brace_style = "collapse" : this.brace_style = u[f]; } l.prototype = new o(), i.exports.Options = l; } ], t = {}; function n(i) { var s = t[i]; if (s !== void 0) return s.exports; var a = t[i] = { exports: {} }; return e[i](a, a.exports, n), a.exports; } var r = n(15); zl = r; })(); var cp = zl; function hp(e, t, n) { var r = e.getText(), i = !0, s = 0, a = !1, o = n.tabSize || 4; if (t) { for (var l = e.offsetAt(t.start), c = l; c > 0 && No(r, c - 1); ) c--; c === 0 || Mo(r, c - 1) ? l = c : c < l && (l = c + 1); for (var h = e.offsetAt(t.end), u = h; u < r.length && No(r, u); ) u++; if ((u === r.length || Mo(r, u)) && (h = u), t = ee.create(e.positionAt(l), e.positionAt(h)), a = pp(r, l), i = h === r.length, r = r.substring(l, h), l !== 0) { var f = e.offsetAt(Ce.create(t.start.line, 0)); s = fp(e.getText(), f, n); } a && (r = `{ `.concat(zo(r))); } else t = ee.create(Ce.create(0, 0), e.positionAt(r.length)); var m = { indent_size: o, indent_char: n.insertSpaces ? " " : " ", end_with_newline: i && et(n, "insertFinalNewline", !1), selector_separator_newline: et(n, "newlineBetweenSelectors", !0), newline_between_rules: et(n, "newlineBetweenRules", !0), space_around_selector_separator: et(n, "spaceAroundSelectorSeparator", !1), brace_style: et(n, "braceStyle", "collapse"), indent_empty_lines: et(n, "indentEmptyLines", !1), max_preserve_newlines: et(n, "maxPreserveNewLines", void 0), preserve_newlines: et(n, "preserveNewLines", !0), wrap_line_length: et(n, "wrapLineLength", void 0), eol: ` ` }, b = cp(r, m); if (a && (b = zo(b.substring(2))), s > 0) { var v = n.insertSpaces ? ya(" ", o * s) : ya(" ", s); b = b.split(` `).join(` ` + v), t.start.character === 0 && (b = v + b); } return [{ range: t, newText: b }]; } function zo(e) { return e.replace(/^\s+/, ""); } var dp = "{".charCodeAt(0), up = "}".charCodeAt(0); function pp(e, t) { for (; t >= 0; ) { var n = e.charCodeAt(t); if (n === dp) return !0; if (n === up) return !1; t--; } return !1; } function et(e, t, n) { if (e && e.hasOwnProperty(t)) { var r = e[t]; if (r !== null) return r; } return n; } function fp(e, t, n) { for (var r = t, i = 0, s = n.tabSize || 4; r < e.length; ) { var a = e.charAt(r); if (a === " ") i++; else if (a === " ") i += s; else break; r++; } return Math.floor(i / s); } function Mo(e, t) { return `\r `.indexOf(e.charAt(t)) !== -1; } function No(e, t) { return " ".indexOf(e.charAt(t)) !== -1; } var mp = { version: 1.1, properties: [ { name: "additive-symbols", browsers: [ "FF33" ], syntax: "[ && ]#", 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’s 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’s 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’s 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’s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself." }, { name: "baseline", description: "If the flex item’s 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’s 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: "