'use strict';

var require$$0$6 = require('chokidar');
var fs$1 = require('fs');
var path$1 = require('path');
var require$$0$3 = require('node:util');
var require$$0$2 = require('util');
var require$$2 = require('os');
var require$$3 = require('crypto');
var require$$4 = require('net');
var require$$5 = require('url');
var require$$3$1 = require('child_process');
var require$$0$4 = require('events');
var ts = require('typescript');
var require$$1$3 = require('fs/promises');
var require$$0$5 = require('@jridgewell/trace-mapping');
var compiler = require('svelte/compiler');
var require$$0$7 = require('perf_hooks');
var sade = require('sade');
var pc = require('picocolors');

function _interopNamespaceDefault(e) {
	var n = Object.create(null);
	if (e) {
		Object.keys(e).forEach(function (k) {
			if (k !== 'default') {
				var d = Object.getOwnPropertyDescriptor(e, k);
				Object.defineProperty(n, k, d.get ? d : {
					enumerable: true,
					get: function () { return e[k]; }
				});
			}
		});
	}
	n.default = e;
	return Object.freeze(n);
}

var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs$1);
var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path$1);

var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};

function getDefaultExportFromCjs (x) {
	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}

function getAugmentedNamespace(n) {
  if (n.__esModule) return n;
  var f = n.default;
	if (typeof f == "function") {
		var a = function a () {
			if (this instanceof a) {
				var args = [null];
				args.push.apply(args, arguments);
				var Ctor = Function.bind.apply(f, args);
				return new Ctor();
			}
			return f.apply(this, arguments);
		};
		a.prototype = f.prototype;
  } else a = {};
  Object.defineProperty(a, '__esModule', {value: true});
	Object.keys(n).forEach(function (k) {
		var d = Object.getOwnPropertyDescriptor(n, k);
		Object.defineProperty(a, k, d.get ? d : {
			enumerable: true,
			get: function () {
				return n[k];
			}
		});
	});
	return a;
}

var src$1 = {};

var server$1 = {};

var main$8 = {};

var is$4 = {};

Object.defineProperty(is$4, "__esModule", { value: true });
is$4.thenable = is$4.typedArray = is$4.stringArray = is$4.array = is$4.func = is$4.error = is$4.number = is$4.string = is$4.boolean = void 0;
function boolean$2(value) {
    return value === true || value === false;
}
is$4.boolean = boolean$2;
function string$2(value) {
    return typeof value === 'string' || value instanceof String;
}
is$4.string = string$2;
function number$2(value) {
    return typeof value === 'number' || value instanceof Number;
}
is$4.number = number$2;
function error$4(value) {
    return value instanceof Error;
}
is$4.error = error$4;
function func$2(value) {
    return typeof value === 'function';
}
is$4.func = func$2;
function array$2(value) {
    return Array.isArray(value);
}
is$4.array = array$2;
function stringArray$2(value) {
    return array$2(value) && value.every(elem => string$2(elem));
}
is$4.stringArray = stringArray$2;
function typedArray$2(value, check) {
    return Array.isArray(value) && value.every(check);
}
is$4.typedArray = typedArray$2;
function thenable(value) {
    return value && func$2(value.then);
}
is$4.thenable = thenable;

var server = {};

var main$7 = {};

var main$6 = {};

var ril$1 = {};

var api$4 = {};

var messages$3 = {};

var is$3 = {};

var hasRequiredIs$1;
function requireIs$1 () {
	if (hasRequiredIs$1) return is$3;
	hasRequiredIs$1 = 1;
	Object.defineProperty(is$3, "__esModule", { value: true });
	is$3.stringArray = is$3.array = is$3.func = is$3.error = is$3.number = is$3.string = is$3.boolean = void 0;
	function boolean(value) {
	    return value === true || value === false;
	}
	is$3.boolean = boolean;
	function string(value) {
	    return typeof value === 'string' || value instanceof String;
	}
	is$3.string = string;
	function number(value) {
	    return typeof value === 'number' || value instanceof Number;
	}
	is$3.number = number;
	function error(value) {
	    return value instanceof Error;
	}
	is$3.error = error;
	function func(value) {
	    return typeof value === 'function';
	}
	is$3.func = func;
	function array(value) {
	    return Array.isArray(value);
	}
	is$3.array = array;
	function stringArray(value) {
	    return array(value) && value.every(elem => string(elem));
	}
	is$3.stringArray = stringArray;
	return is$3;
}

var hasRequiredMessages$1;
function requireMessages$1 () {
	if (hasRequiredMessages$1) return messages$3;
	hasRequiredMessages$1 = 1;
	Object.defineProperty(messages$3, "__esModule", { value: true });
	messages$3.Message = messages$3.NotificationType9 = messages$3.NotificationType8 = messages$3.NotificationType7 = messages$3.NotificationType6 = messages$3.NotificationType5 = messages$3.NotificationType4 = messages$3.NotificationType3 = messages$3.NotificationType2 = messages$3.NotificationType1 = messages$3.NotificationType0 = messages$3.NotificationType = messages$3.RequestType9 = messages$3.RequestType8 = messages$3.RequestType7 = messages$3.RequestType6 = messages$3.RequestType5 = messages$3.RequestType4 = messages$3.RequestType3 = messages$3.RequestType2 = messages$3.RequestType1 = messages$3.RequestType = messages$3.RequestType0 = messages$3.AbstractMessageSignature = messages$3.ParameterStructures = messages$3.ResponseError = messages$3.ErrorCodes = void 0;
	const is = requireIs$1();
	var ErrorCodes;
	(function (ErrorCodes) {
	    ErrorCodes.ParseError = -32700;
	    ErrorCodes.InvalidRequest = -32600;
	    ErrorCodes.MethodNotFound = -32601;
	    ErrorCodes.InvalidParams = -32602;
	    ErrorCodes.InternalError = -32603;
	    ErrorCodes.jsonrpcReservedErrorRangeStart = -32099;
	    ErrorCodes.serverErrorStart = -32099;
	    ErrorCodes.MessageWriteError = -32099;
	    ErrorCodes.MessageReadError = -32098;
	    ErrorCodes.PendingResponseRejected = -32097;
	    ErrorCodes.ConnectionInactive = -32096;
	    ErrorCodes.ServerNotInitialized = -32002;
	    ErrorCodes.UnknownErrorCode = -32001;
	    ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000;
	    ErrorCodes.serverErrorEnd = -32000;
	})(ErrorCodes || (messages$3.ErrorCodes = ErrorCodes = {}));
	class ResponseError extends Error {
	    constructor(code, message, data) {
	        super(message);
	        this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
	        this.data = data;
	        Object.setPrototypeOf(this, ResponseError.prototype);
	    }
	    toJson() {
	        const result = {
	            code: this.code,
	            message: this.message
	        };
	        if (this.data !== undefined) {
	            result.data = this.data;
	        }
	        return result;
	    }
	}
	messages$3.ResponseError = ResponseError;
	class ParameterStructures {
	    constructor(kind) {
	        this.kind = kind;
	    }
	    static is(value) {
	        return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition;
	    }
	    toString() {
	        return this.kind;
	    }
	}
	messages$3.ParameterStructures = ParameterStructures;
	ParameterStructures.auto = new ParameterStructures('auto');
	ParameterStructures.byPosition = new ParameterStructures('byPosition');
	ParameterStructures.byName = new ParameterStructures('byName');
	class AbstractMessageSignature {
	    constructor(method, numberOfParams) {
	        this.method = method;
	        this.numberOfParams = numberOfParams;
	    }
	    get parameterStructures() {
	        return ParameterStructures.auto;
	    }
	}
	messages$3.AbstractMessageSignature = AbstractMessageSignature;
	class RequestType0 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 0);
	    }
	}
	messages$3.RequestType0 = RequestType0;
	class RequestType extends AbstractMessageSignature {
	    constructor(method, _parameterStructures = ParameterStructures.auto) {
	        super(method, 1);
	        this._parameterStructures = _parameterStructures;
	    }
	    get parameterStructures() {
	        return this._parameterStructures;
	    }
	}
	messages$3.RequestType = RequestType;
	class RequestType1 extends AbstractMessageSignature {
	    constructor(method, _parameterStructures = ParameterStructures.auto) {
	        super(method, 1);
	        this._parameterStructures = _parameterStructures;
	    }
	    get parameterStructures() {
	        return this._parameterStructures;
	    }
	}
	messages$3.RequestType1 = RequestType1;
	class RequestType2 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 2);
	    }
	}
	messages$3.RequestType2 = RequestType2;
	class RequestType3 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 3);
	    }
	}
	messages$3.RequestType3 = RequestType3;
	class RequestType4 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 4);
	    }
	}
	messages$3.RequestType4 = RequestType4;
	class RequestType5 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 5);
	    }
	}
	messages$3.RequestType5 = RequestType5;
	class RequestType6 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 6);
	    }
	}
	messages$3.RequestType6 = RequestType6;
	class RequestType7 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 7);
	    }
	}
	messages$3.RequestType7 = RequestType7;
	class RequestType8 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 8);
	    }
	}
	messages$3.RequestType8 = RequestType8;
	class RequestType9 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 9);
	    }
	}
	messages$3.RequestType9 = RequestType9;
	class NotificationType extends AbstractMessageSignature {
	    constructor(method, _parameterStructures = ParameterStructures.auto) {
	        super(method, 1);
	        this._parameterStructures = _parameterStructures;
	    }
	    get parameterStructures() {
	        return this._parameterStructures;
	    }
	}
	messages$3.NotificationType = NotificationType;
	class NotificationType0 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 0);
	    }
	}
	messages$3.NotificationType0 = NotificationType0;
	class NotificationType1 extends AbstractMessageSignature {
	    constructor(method, _parameterStructures = ParameterStructures.auto) {
	        super(method, 1);
	        this._parameterStructures = _parameterStructures;
	    }
	    get parameterStructures() {
	        return this._parameterStructures;
	    }
	}
	messages$3.NotificationType1 = NotificationType1;
	class NotificationType2 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 2);
	    }
	}
	messages$3.NotificationType2 = NotificationType2;
	class NotificationType3 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 3);
	    }
	}
	messages$3.NotificationType3 = NotificationType3;
	class NotificationType4 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 4);
	    }
	}
	messages$3.NotificationType4 = NotificationType4;
	class NotificationType5 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 5);
	    }
	}
	messages$3.NotificationType5 = NotificationType5;
	class NotificationType6 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 6);
	    }
	}
	messages$3.NotificationType6 = NotificationType6;
	class NotificationType7 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 7);
	    }
	}
	messages$3.NotificationType7 = NotificationType7;
	class NotificationType8 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 8);
	    }
	}
	messages$3.NotificationType8 = NotificationType8;
	class NotificationType9 extends AbstractMessageSignature {
	    constructor(method) {
	        super(method, 9);
	    }
	}
	messages$3.NotificationType9 = NotificationType9;
	var Message;
	(function (Message) {
	    function isRequest(message) {
	        const candidate = message;
	        return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
	    }
	    Message.isRequest = isRequest;
	    function isNotification(message) {
	        const candidate = message;
	        return candidate && is.string(candidate.method) && message.id === void 0;
	    }
	    Message.isNotification = isNotification;
	    function isResponse(message) {
	        const candidate = message;
	        return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
	    }
	    Message.isResponse = isResponse;
	})(Message || (messages$3.Message = Message = {}));
	return messages$3;
}

var linkedMap$1 = {};

var hasRequiredLinkedMap$1;
function requireLinkedMap$1 () {
	if (hasRequiredLinkedMap$1) return linkedMap$1;
	hasRequiredLinkedMap$1 = 1;
	var _a;
	Object.defineProperty(linkedMap$1, "__esModule", { value: true });
	linkedMap$1.LRUCache = linkedMap$1.LinkedMap = linkedMap$1.Touch = void 0;
	var Touch;
	(function (Touch) {
	    Touch.None = 0;
	    Touch.First = 1;
	    Touch.AsOld = Touch.First;
	    Touch.Last = 2;
	    Touch.AsNew = Touch.Last;
	})(Touch || (linkedMap$1.Touch = Touch = {}));
	class LinkedMap {
	    constructor() {
	        this[_a] = 'LinkedMap';
	        this._map = new Map();
	        this._head = undefined;
	        this._tail = undefined;
	        this._size = 0;
	        this._state = 0;
	    }
	    clear() {
	        this._map.clear();
	        this._head = undefined;
	        this._tail = undefined;
	        this._size = 0;
	        this._state++;
	    }
	    isEmpty() {
	        return !this._head && !this._tail;
	    }
	    get size() {
	        return this._size;
	    }
	    get first() {
	        return this._head?.value;
	    }
	    get last() {
	        return this._tail?.value;
	    }
	    has(key) {
	        return this._map.has(key);
	    }
	    get(key, touch = Touch.None) {
	        const item = this._map.get(key);
	        if (!item) {
	            return undefined;
	        }
	        if (touch !== Touch.None) {
	            this.touch(item, touch);
	        }
	        return item.value;
	    }
	    set(key, value, touch = Touch.None) {
	        let item = this._map.get(key);
	        if (item) {
	            item.value = value;
	            if (touch !== Touch.None) {
	                this.touch(item, touch);
	            }
	        }
	        else {
	            item = { key, value, next: undefined, previous: undefined };
	            switch (touch) {
	                case Touch.None:
	                    this.addItemLast(item);
	                    break;
	                case Touch.First:
	                    this.addItemFirst(item);
	                    break;
	                case Touch.Last:
	                    this.addItemLast(item);
	                    break;
	                default:
	                    this.addItemLast(item);
	                    break;
	            }
	            this._map.set(key, item);
	            this._size++;
	        }
	        return this;
	    }
	    delete(key) {
	        return !!this.remove(key);
	    }
	    remove(key) {
	        const item = this._map.get(key);
	        if (!item) {
	            return undefined;
	        }
	        this._map.delete(key);
	        this.removeItem(item);
	        this._size--;
	        return item.value;
	    }
	    shift() {
	        if (!this._head && !this._tail) {
	            return undefined;
	        }
	        if (!this._head || !this._tail) {
	            throw new Error('Invalid list');
	        }
	        const item = this._head;
	        this._map.delete(item.key);
	        this.removeItem(item);
	        this._size--;
	        return item.value;
	    }
	    forEach(callbackfn, thisArg) {
	        const state = this._state;
	        let current = this._head;
	        while (current) {
	            if (thisArg) {
	                callbackfn.bind(thisArg)(current.value, current.key, this);
	            }
	            else {
	                callbackfn(current.value, current.key, this);
	            }
	            if (this._state !== state) {
	                throw new Error(`LinkedMap got modified during iteration.`);
	            }
	            current = current.next;
	        }
	    }
	    keys() {
	        const state = this._state;
	        let current = this._head;
	        const iterator = {
	            [Symbol.iterator]: () => {
	                return iterator;
	            },
	            next: () => {
	                if (this._state !== state) {
	                    throw new Error(`LinkedMap got modified during iteration.`);
	                }
	                if (current) {
	                    const result = { value: current.key, done: false };
	                    current = current.next;
	                    return result;
	                }
	                else {
	                    return { value: undefined, done: true };
	                }
	            }
	        };
	        return iterator;
	    }
	    values() {
	        const state = this._state;
	        let current = this._head;
	        const iterator = {
	            [Symbol.iterator]: () => {
	                return iterator;
	            },
	            next: () => {
	                if (this._state !== state) {
	                    throw new Error(`LinkedMap got modified during iteration.`);
	                }
	                if (current) {
	                    const result = { value: current.value, done: false };
	                    current = current.next;
	                    return result;
	                }
	                else {
	                    return { value: undefined, done: true };
	                }
	            }
	        };
	        return iterator;
	    }
	    entries() {
	        const state = this._state;
	        let current = this._head;
	        const iterator = {
	            [Symbol.iterator]: () => {
	                return iterator;
	            },
	            next: () => {
	                if (this._state !== state) {
	                    throw new Error(`LinkedMap got modified during iteration.`);
	                }
	                if (current) {
	                    const result = { value: [current.key, current.value], done: false };
	                    current = current.next;
	                    return result;
	                }
	                else {
	                    return { value: undefined, done: true };
	                }
	            }
	        };
	        return iterator;
	    }
	    [(_a = Symbol.toStringTag, Symbol.iterator)]() {
	        return this.entries();
	    }
	    trimOld(newSize) {
	        if (newSize >= this.size) {
	            return;
	        }
	        if (newSize === 0) {
	            this.clear();
	            return;
	        }
	        let current = this._head;
	        let currentSize = this.size;
	        while (current && currentSize > newSize) {
	            this._map.delete(current.key);
	            current = current.next;
	            currentSize--;
	        }
	        this._head = current;
	        this._size = currentSize;
	        if (current) {
	            current.previous = undefined;
	        }
	        this._state++;
	    }
	    addItemFirst(item) {
	        if (!this._head && !this._tail) {
	            this._tail = item;
	        }
	        else if (!this._head) {
	            throw new Error('Invalid list');
	        }
	        else {
	            item.next = this._head;
	            this._head.previous = item;
	        }
	        this._head = item;
	        this._state++;
	    }
	    addItemLast(item) {
	        if (!this._head && !this._tail) {
	            this._head = item;
	        }
	        else if (!this._tail) {
	            throw new Error('Invalid list');
	        }
	        else {
	            item.previous = this._tail;
	            this._tail.next = item;
	        }
	        this._tail = item;
	        this._state++;
	    }
	    removeItem(item) {
	        if (item === this._head && item === this._tail) {
	            this._head = undefined;
	            this._tail = undefined;
	        }
	        else if (item === this._head) {
	            if (!item.next) {
	                throw new Error('Invalid list');
	            }
	            item.next.previous = undefined;
	            this._head = item.next;
	        }
	        else if (item === this._tail) {
	            if (!item.previous) {
	                throw new Error('Invalid list');
	            }
	            item.previous.next = undefined;
	            this._tail = item.previous;
	        }
	        else {
	            const next = item.next;
	            const previous = item.previous;
	            if (!next || !previous) {
	                throw new Error('Invalid list');
	            }
	            next.previous = previous;
	            previous.next = next;
	        }
	        item.next = undefined;
	        item.previous = undefined;
	        this._state++;
	    }
	    touch(item, touch) {
	        if (!this._head || !this._tail) {
	            throw new Error('Invalid list');
	        }
	        if ((touch !== Touch.First && touch !== Touch.Last)) {
	            return;
	        }
	        if (touch === Touch.First) {
	            if (item === this._head) {
	                return;
	            }
	            const next = item.next;
	            const previous = item.previous;
	            if (item === this._tail) {
	                previous.next = undefined;
	                this._tail = previous;
	            }
	            else {
	                next.previous = previous;
	                previous.next = next;
	            }
	            item.previous = undefined;
	            item.next = this._head;
	            this._head.previous = item;
	            this._head = item;
	            this._state++;
	        }
	        else if (touch === Touch.Last) {
	            if (item === this._tail) {
	                return;
	            }
	            const next = item.next;
	            const previous = item.previous;
	            if (item === this._head) {
	                next.previous = undefined;
	                this._head = next;
	            }
	            else {
	                next.previous = previous;
	                previous.next = next;
	            }
	            item.next = undefined;
	            item.previous = this._tail;
	            this._tail.next = item;
	            this._tail = item;
	            this._state++;
	        }
	    }
	    toJSON() {
	        const data = [];
	        this.forEach((value, key) => {
	            data.push([key, value]);
	        });
	        return data;
	    }
	    fromJSON(data) {
	        this.clear();
	        for (const [key, value] of data) {
	            this.set(key, value);
	        }
	    }
	}
	linkedMap$1.LinkedMap = LinkedMap;
	class LRUCache extends LinkedMap {
	    constructor(limit, ratio = 1) {
	        super();
	        this._limit = limit;
	        this._ratio = Math.min(Math.max(0, ratio), 1);
	    }
	    get limit() {
	        return this._limit;
	    }
	    set limit(limit) {
	        this._limit = limit;
	        this.checkTrim();
	    }
	    get ratio() {
	        return this._ratio;
	    }
	    set ratio(ratio) {
	        this._ratio = Math.min(Math.max(0, ratio), 1);
	        this.checkTrim();
	    }
	    get(key, touch = Touch.AsNew) {
	        return super.get(key, touch);
	    }
	    peek(key) {
	        return super.get(key, Touch.None);
	    }
	    set(key, value) {
	        super.set(key, value, Touch.Last);
	        this.checkTrim();
	        return this;
	    }
	    checkTrim() {
	        if (this.size > this._limit) {
	            this.trimOld(Math.round(this._limit * this._ratio));
	        }
	    }
	}
	linkedMap$1.LRUCache = LRUCache;
	return linkedMap$1;
}

var disposable$1 = {};

var hasRequiredDisposable;
function requireDisposable () {
	if (hasRequiredDisposable) return disposable$1;
	hasRequiredDisposable = 1;
	Object.defineProperty(disposable$1, "__esModule", { value: true });
	disposable$1.Disposable = void 0;
	var Disposable;
	(function (Disposable) {
	    function create(func) {
	        return {
	            dispose: func
	        };
	    }
	    Disposable.create = create;
	})(Disposable || (disposable$1.Disposable = Disposable = {}));
	return disposable$1;
}

var events$1 = {};

var ral$2 = {};

var hasRequiredRal;
function requireRal () {
	if (hasRequiredRal) return ral$2;
	hasRequiredRal = 1;
	Object.defineProperty(ral$2, "__esModule", { value: true });
	let _ral;
	function RAL() {
	    if (_ral === undefined) {
	        throw new Error(`No runtime abstraction layer installed`);
	    }
	    return _ral;
	}
	(function (RAL) {
	    function install(ral) {
	        if (ral === undefined) {
	            throw new Error(`No runtime abstraction layer provided`);
	        }
	        _ral = ral;
	    }
	    RAL.install = install;
	})(RAL || (RAL = {}));
	ral$2.default = RAL;
	return ral$2;
}

var hasRequiredEvents$1;
function requireEvents$1 () {
	if (hasRequiredEvents$1) return events$1;
	hasRequiredEvents$1 = 1;
	Object.defineProperty(events$1, "__esModule", { value: true });
	events$1.Emitter = events$1.Event = void 0;
	const ral_1 = requireRal();
	var Event;
	(function (Event) {
	    const _disposable = { dispose() { } };
	    Event.None = function () { return _disposable; };
	})(Event || (events$1.Event = Event = {}));
	class CallbackList {
	    add(callback, context = null, bucket) {
	        if (!this._callbacks) {
	            this._callbacks = [];
	            this._contexts = [];
	        }
	        this._callbacks.push(callback);
	        this._contexts.push(context);
	        if (Array.isArray(bucket)) {
	            bucket.push({ dispose: () => this.remove(callback, context) });
	        }
	    }
	    remove(callback, context = null) {
	        if (!this._callbacks) {
	            return;
	        }
	        let foundCallbackWithDifferentContext = false;
	        for (let i = 0, len = this._callbacks.length; i < len; i++) {
	            if (this._callbacks[i] === callback) {
	                if (this._contexts[i] === context) {
	                    this._callbacks.splice(i, 1);
	                    this._contexts.splice(i, 1);
	                    return;
	                }
	                else {
	                    foundCallbackWithDifferentContext = true;
	                }
	            }
	        }
	        if (foundCallbackWithDifferentContext) {
	            throw new Error('When adding a listener with a context, you should remove it with the same context');
	        }
	    }
	    invoke(...args) {
	        if (!this._callbacks) {
	            return [];
	        }
	        const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
	        for (let i = 0, len = callbacks.length; i < len; i++) {
	            try {
	                ret.push(callbacks[i].apply(contexts[i], args));
	            }
	            catch (e) {
	                (0, ral_1.default)().console.error(e);
	            }
	        }
	        return ret;
	    }
	    isEmpty() {
	        return !this._callbacks || this._callbacks.length === 0;
	    }
	    dispose() {
	        this._callbacks = undefined;
	        this._contexts = undefined;
	    }
	}
	class Emitter {
	    constructor(_options) {
	        this._options = _options;
	    }
	    get event() {
	        if (!this._event) {
	            this._event = (listener, thisArgs, disposables) => {
	                if (!this._callbacks) {
	                    this._callbacks = new CallbackList();
	                }
	                if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
	                    this._options.onFirstListenerAdd(this);
	                }
	                this._callbacks.add(listener, thisArgs);
	                const result = {
	                    dispose: () => {
	                        if (!this._callbacks) {
	                            return;
	                        }
	                        this._callbacks.remove(listener, thisArgs);
	                        result.dispose = Emitter._noop;
	                        if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
	                            this._options.onLastListenerRemove(this);
	                        }
	                    }
	                };
	                if (Array.isArray(disposables)) {
	                    disposables.push(result);
	                }
	                return result;
	            };
	        }
	        return this._event;
	    }
	    fire(event) {
	        if (this._callbacks) {
	            this._callbacks.invoke.call(this._callbacks, event);
	        }
	    }
	    dispose() {
	        if (this._callbacks) {
	            this._callbacks.dispose();
	            this._callbacks = undefined;
	        }
	    }
	}
	events$1.Emitter = Emitter;
	Emitter._noop = function () { };
	return events$1;
}

var cancellation$1 = {};

var hasRequiredCancellation$1;
function requireCancellation$1 () {
	if (hasRequiredCancellation$1) return cancellation$1;
	hasRequiredCancellation$1 = 1;
	Object.defineProperty(cancellation$1, "__esModule", { value: true });
	cancellation$1.CancellationTokenSource = cancellation$1.CancellationToken = void 0;
	const ral_1 = requireRal();
	const Is = requireIs$1();
	const events_1 = requireEvents$1();
	var CancellationToken;
	(function (CancellationToken) {
	    CancellationToken.None = Object.freeze({
	        isCancellationRequested: false,
	        onCancellationRequested: events_1.Event.None
	    });
	    CancellationToken.Cancelled = Object.freeze({
	        isCancellationRequested: true,
	        onCancellationRequested: events_1.Event.None
	    });
	    function is(value) {
	        const candidate = value;
	        return candidate && (candidate === CancellationToken.None
	            || candidate === CancellationToken.Cancelled
	            || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
	    }
	    CancellationToken.is = is;
	})(CancellationToken || (cancellation$1.CancellationToken = CancellationToken = {}));
	const shortcutEvent = Object.freeze(function (callback, context) {
	    const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0);
	    return { dispose() { handle.dispose(); } };
	});
	class MutableToken {
	    constructor() {
	        this._isCancelled = false;
	    }
	    cancel() {
	        if (!this._isCancelled) {
	            this._isCancelled = true;
	            if (this._emitter) {
	                this._emitter.fire(undefined);
	                this.dispose();
	            }
	        }
	    }
	    get isCancellationRequested() {
	        return this._isCancelled;
	    }
	    get onCancellationRequested() {
	        if (this._isCancelled) {
	            return shortcutEvent;
	        }
	        if (!this._emitter) {
	            this._emitter = new events_1.Emitter();
	        }
	        return this._emitter.event;
	    }
	    dispose() {
	        if (this._emitter) {
	            this._emitter.dispose();
	            this._emitter = undefined;
	        }
	    }
	}
	class CancellationTokenSource {
	    get token() {
	        if (!this._token) {
	            this._token = new MutableToken();
	        }
	        return this._token;
	    }
	    cancel() {
	        if (!this._token) {
	            this._token = CancellationToken.Cancelled;
	        }
	        else {
	            this._token.cancel();
	        }
	    }
	    dispose() {
	        if (!this._token) {
	            this._token = CancellationToken.None;
	        }
	        else if (this._token instanceof MutableToken) {
	            this._token.dispose();
	        }
	    }
	}
	cancellation$1.CancellationTokenSource = CancellationTokenSource;
	return cancellation$1;
}

var sharedArrayCancellation = {};

var hasRequiredSharedArrayCancellation;
function requireSharedArrayCancellation () {
	if (hasRequiredSharedArrayCancellation) return sharedArrayCancellation;
	hasRequiredSharedArrayCancellation = 1;
	Object.defineProperty(sharedArrayCancellation, "__esModule", { value: true });
	sharedArrayCancellation.SharedArrayReceiverStrategy = sharedArrayCancellation.SharedArraySenderStrategy = void 0;
	const cancellation_1 = requireCancellation$1();
	var CancellationState;
	(function (CancellationState) {
	    CancellationState.Continue = 0;
	    CancellationState.Cancelled = 1;
	})(CancellationState || (CancellationState = {}));
	class SharedArraySenderStrategy {
	    constructor() {
	        this.buffers = new Map();
	    }
	    enableCancellation(request) {
	        if (request.id === null) {
	            return;
	        }
	        const buffer = new SharedArrayBuffer(4);
	        const data = new Int32Array(buffer, 0, 1);
	        data[0] = CancellationState.Continue;
	        this.buffers.set(request.id, buffer);
	        request.$cancellationData = buffer;
	    }
	    async sendCancellation(_conn, id) {
	        const buffer = this.buffers.get(id);
	        if (buffer === undefined) {
	            return;
	        }
	        const data = new Int32Array(buffer, 0, 1);
	        Atomics.store(data, 0, CancellationState.Cancelled);
	    }
	    cleanup(id) {
	        this.buffers.delete(id);
	    }
	    dispose() {
	        this.buffers.clear();
	    }
	}
	sharedArrayCancellation.SharedArraySenderStrategy = SharedArraySenderStrategy;
	class SharedArrayBufferCancellationToken {
	    constructor(buffer) {
	        this.data = new Int32Array(buffer, 0, 1);
	    }
	    get isCancellationRequested() {
	        return Atomics.load(this.data, 0) === CancellationState.Cancelled;
	    }
	    get onCancellationRequested() {
	        throw new Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`);
	    }
	}
	class SharedArrayBufferCancellationTokenSource {
	    constructor(buffer) {
	        this.token = new SharedArrayBufferCancellationToken(buffer);
	    }
	    cancel() {
	    }
	    dispose() {
	    }
	}
	class SharedArrayReceiverStrategy {
	    constructor() {
	        this.kind = 'request';
	    }
	    createCancellationTokenSource(request) {
	        const buffer = request.$cancellationData;
	        if (buffer === undefined) {
	            return new cancellation_1.CancellationTokenSource();
	        }
	        return new SharedArrayBufferCancellationTokenSource(buffer);
	    }
	}
	sharedArrayCancellation.SharedArrayReceiverStrategy = SharedArrayReceiverStrategy;
	return sharedArrayCancellation;
}

var messageReader$1 = {};

var semaphore$1 = {};

var hasRequiredSemaphore$1;
function requireSemaphore$1 () {
	if (hasRequiredSemaphore$1) return semaphore$1;
	hasRequiredSemaphore$1 = 1;
	Object.defineProperty(semaphore$1, "__esModule", { value: true });
	semaphore$1.Semaphore = void 0;
	const ral_1 = requireRal();
	class Semaphore {
	    constructor(capacity = 1) {
	        if (capacity <= 0) {
	            throw new Error('Capacity must be greater than 0');
	        }
	        this._capacity = capacity;
	        this._active = 0;
	        this._waiting = [];
	    }
	    lock(thunk) {
	        return new Promise((resolve, reject) => {
	            this._waiting.push({ thunk, resolve, reject });
	            this.runNext();
	        });
	    }
	    get active() {
	        return this._active;
	    }
	    runNext() {
	        if (this._waiting.length === 0 || this._active === this._capacity) {
	            return;
	        }
	        (0, ral_1.default)().timer.setImmediate(() => this.doRunNext());
	    }
	    doRunNext() {
	        if (this._waiting.length === 0 || this._active === this._capacity) {
	            return;
	        }
	        const next = this._waiting.shift();
	        this._active++;
	        if (this._active > this._capacity) {
	            throw new Error(`To many thunks active`);
	        }
	        try {
	            const result = next.thunk();
	            if (result instanceof Promise) {
	                result.then((value) => {
	                    this._active--;
	                    next.resolve(value);
	                    this.runNext();
	                }, (err) => {
	                    this._active--;
	                    next.reject(err);
	                    this.runNext();
	                });
	            }
	            else {
	                this._active--;
	                next.resolve(result);
	                this.runNext();
	            }
	        }
	        catch (err) {
	            this._active--;
	            next.reject(err);
	            this.runNext();
	        }
	    }
	}
	semaphore$1.Semaphore = Semaphore;
	return semaphore$1;
}

var hasRequiredMessageReader$1;
function requireMessageReader$1 () {
	if (hasRequiredMessageReader$1) return messageReader$1;
	hasRequiredMessageReader$1 = 1;
	Object.defineProperty(messageReader$1, "__esModule", { value: true });
	messageReader$1.ReadableStreamMessageReader = messageReader$1.AbstractMessageReader = messageReader$1.MessageReader = void 0;
	const ral_1 = requireRal();
	const Is = requireIs$1();
	const events_1 = requireEvents$1();
	const semaphore_1 = requireSemaphore$1();
	var MessageReader;
	(function (MessageReader) {
	    function is(value) {
	        let candidate = value;
	        return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
	            Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
	    }
	    MessageReader.is = is;
	})(MessageReader || (messageReader$1.MessageReader = MessageReader = {}));
	class AbstractMessageReader {
	    constructor() {
	        this.errorEmitter = new events_1.Emitter();
	        this.closeEmitter = new events_1.Emitter();
	        this.partialMessageEmitter = new events_1.Emitter();
	    }
	    dispose() {
	        this.errorEmitter.dispose();
	        this.closeEmitter.dispose();
	    }
	    get onError() {
	        return this.errorEmitter.event;
	    }
	    fireError(error) {
	        this.errorEmitter.fire(this.asError(error));
	    }
	    get onClose() {
	        return this.closeEmitter.event;
	    }
	    fireClose() {
	        this.closeEmitter.fire(undefined);
	    }
	    get onPartialMessage() {
	        return this.partialMessageEmitter.event;
	    }
	    firePartialMessage(info) {
	        this.partialMessageEmitter.fire(info);
	    }
	    asError(error) {
	        if (error instanceof Error) {
	            return error;
	        }
	        else {
	            return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
	        }
	    }
	}
	messageReader$1.AbstractMessageReader = AbstractMessageReader;
	var ResolvedMessageReaderOptions;
	(function (ResolvedMessageReaderOptions) {
	    function fromOptions(options) {
	        let charset;
	        let contentDecoder;
	        const contentDecoders = new Map();
	        let contentTypeDecoder;
	        const contentTypeDecoders = new Map();
	        if (options === undefined || typeof options === 'string') {
	            charset = options ?? 'utf-8';
	        }
	        else {
	            charset = options.charset ?? 'utf-8';
	            if (options.contentDecoder !== undefined) {
	                contentDecoder = options.contentDecoder;
	                contentDecoders.set(contentDecoder.name, contentDecoder);
	            }
	            if (options.contentDecoders !== undefined) {
	                for (const decoder of options.contentDecoders) {
	                    contentDecoders.set(decoder.name, decoder);
	                }
	            }
	            if (options.contentTypeDecoder !== undefined) {
	                contentTypeDecoder = options.contentTypeDecoder;
	                contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
	            }
	            if (options.contentTypeDecoders !== undefined) {
	                for (const decoder of options.contentTypeDecoders) {
	                    contentTypeDecoders.set(decoder.name, decoder);
	                }
	            }
	        }
	        if (contentTypeDecoder === undefined) {
	            contentTypeDecoder = (0, ral_1.default)().applicationJson.decoder;
	            contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
	        }
	        return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders };
	    }
	    ResolvedMessageReaderOptions.fromOptions = fromOptions;
	})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {}));
	class ReadableStreamMessageReader extends AbstractMessageReader {
	    constructor(readable, options) {
	        super();
	        this.readable = readable;
	        this.options = ResolvedMessageReaderOptions.fromOptions(options);
	        this.buffer = (0, ral_1.default)().messageBuffer.create(this.options.charset);
	        this._partialMessageTimeout = 10000;
	        this.nextMessageLength = -1;
	        this.messageToken = 0;
	        this.readSemaphore = new semaphore_1.Semaphore(1);
	    }
	    set partialMessageTimeout(timeout) {
	        this._partialMessageTimeout = timeout;
	    }
	    get partialMessageTimeout() {
	        return this._partialMessageTimeout;
	    }
	    listen(callback) {
	        this.nextMessageLength = -1;
	        this.messageToken = 0;
	        this.partialMessageTimer = undefined;
	        this.callback = callback;
	        const result = this.readable.onData((data) => {
	            this.onData(data);
	        });
	        this.readable.onError((error) => this.fireError(error));
	        this.readable.onClose(() => this.fireClose());
	        return result;
	    }
	    onData(data) {
	        try {
	            this.buffer.append(data);
	            while (true) {
	                if (this.nextMessageLength === -1) {
	                    const headers = this.buffer.tryReadHeaders(true);
	                    if (!headers) {
	                        return;
	                    }
	                    const contentLength = headers.get('content-length');
	                    if (!contentLength) {
	                        this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(headers))}`));
	                        return;
	                    }
	                    const length = parseInt(contentLength);
	                    if (isNaN(length)) {
	                        this.fireError(new Error(`Content-Length value must be a number. Got ${contentLength}`));
	                        return;
	                    }
	                    this.nextMessageLength = length;
	                }
	                const body = this.buffer.tryReadBody(this.nextMessageLength);
	                if (body === undefined) {
	                    this.setPartialMessageTimer();
	                    return;
	                }
	                this.clearPartialMessageTimer();
	                this.nextMessageLength = -1;
	                this.readSemaphore.lock(async () => {
	                    const bytes = this.options.contentDecoder !== undefined
	                        ? await this.options.contentDecoder.decode(body)
	                        : body;
	                    const message = await this.options.contentTypeDecoder.decode(bytes, this.options);
	                    this.callback(message);
	                }).catch((error) => {
	                    this.fireError(error);
	                });
	            }
	        }
	        catch (error) {
	            this.fireError(error);
	        }
	    }
	    clearPartialMessageTimer() {
	        if (this.partialMessageTimer) {
	            this.partialMessageTimer.dispose();
	            this.partialMessageTimer = undefined;
	        }
	    }
	    setPartialMessageTimer() {
	        this.clearPartialMessageTimer();
	        if (this._partialMessageTimeout <= 0) {
	            return;
	        }
	        this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token, timeout) => {
	            this.partialMessageTimer = undefined;
	            if (token === this.messageToken) {
	                this.firePartialMessage({ messageToken: token, waitingTime: timeout });
	                this.setPartialMessageTimer();
	            }
	        }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
	    }
	}
	messageReader$1.ReadableStreamMessageReader = ReadableStreamMessageReader;
	return messageReader$1;
}

var messageWriter$1 = {};

var hasRequiredMessageWriter$1;
function requireMessageWriter$1 () {
	if (hasRequiredMessageWriter$1) return messageWriter$1;
	hasRequiredMessageWriter$1 = 1;
	Object.defineProperty(messageWriter$1, "__esModule", { value: true });
	messageWriter$1.WriteableStreamMessageWriter = messageWriter$1.AbstractMessageWriter = messageWriter$1.MessageWriter = void 0;
	const ral_1 = requireRal();
	const Is = requireIs$1();
	const semaphore_1 = requireSemaphore$1();
	const events_1 = requireEvents$1();
	const ContentLength = 'Content-Length: ';
	const CRLF = '\r\n';
	var MessageWriter;
	(function (MessageWriter) {
	    function is(value) {
	        let candidate = value;
	        return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
	            Is.func(candidate.onError) && Is.func(candidate.write);
	    }
	    MessageWriter.is = is;
	})(MessageWriter || (messageWriter$1.MessageWriter = MessageWriter = {}));
	class AbstractMessageWriter {
	    constructor() {
	        this.errorEmitter = new events_1.Emitter();
	        this.closeEmitter = new events_1.Emitter();
	    }
	    dispose() {
	        this.errorEmitter.dispose();
	        this.closeEmitter.dispose();
	    }
	    get onError() {
	        return this.errorEmitter.event;
	    }
	    fireError(error, message, count) {
	        this.errorEmitter.fire([this.asError(error), message, count]);
	    }
	    get onClose() {
	        return this.closeEmitter.event;
	    }
	    fireClose() {
	        this.closeEmitter.fire(undefined);
	    }
	    asError(error) {
	        if (error instanceof Error) {
	            return error;
	        }
	        else {
	            return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
	        }
	    }
	}
	messageWriter$1.AbstractMessageWriter = AbstractMessageWriter;
	var ResolvedMessageWriterOptions;
	(function (ResolvedMessageWriterOptions) {
	    function fromOptions(options) {
	        if (options === undefined || typeof options === 'string') {
	            return { charset: options ?? 'utf-8', contentTypeEncoder: (0, ral_1.default)().applicationJson.encoder };
	        }
	        else {
	            return { charset: options.charset ?? 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: options.contentTypeEncoder ?? (0, ral_1.default)().applicationJson.encoder };
	        }
	    }
	    ResolvedMessageWriterOptions.fromOptions = fromOptions;
	})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {}));
	class WriteableStreamMessageWriter extends AbstractMessageWriter {
	    constructor(writable, options) {
	        super();
	        this.writable = writable;
	        this.options = ResolvedMessageWriterOptions.fromOptions(options);
	        this.errorCount = 0;
	        this.writeSemaphore = new semaphore_1.Semaphore(1);
	        this.writable.onError((error) => this.fireError(error));
	        this.writable.onClose(() => this.fireClose());
	    }
	    async write(msg) {
	        return this.writeSemaphore.lock(async () => {
	            const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => {
	                if (this.options.contentEncoder !== undefined) {
	                    return this.options.contentEncoder.encode(buffer);
	                }
	                else {
	                    return buffer;
	                }
	            });
	            return payload.then((buffer) => {
	                const headers = [];
	                headers.push(ContentLength, buffer.byteLength.toString(), CRLF);
	                headers.push(CRLF);
	                return this.doWrite(msg, headers, buffer);
	            }, (error) => {
	                this.fireError(error);
	                throw error;
	            });
	        });
	    }
	    async doWrite(msg, headers, data) {
	        try {
	            await this.writable.write(headers.join(''), 'ascii');
	            return this.writable.write(data);
	        }
	        catch (error) {
	            this.handleError(error, msg);
	            return Promise.reject(error);
	        }
	    }
	    handleError(error, msg) {
	        this.errorCount++;
	        this.fireError(error, msg, this.errorCount);
	    }
	    end() {
	        this.writable.end();
	    }
	}
	messageWriter$1.WriteableStreamMessageWriter = WriteableStreamMessageWriter;
	return messageWriter$1;
}

var messageBuffer$1 = {};

var hasRequiredMessageBuffer;
function requireMessageBuffer () {
	if (hasRequiredMessageBuffer) return messageBuffer$1;
	hasRequiredMessageBuffer = 1;
	Object.defineProperty(messageBuffer$1, "__esModule", { value: true });
	messageBuffer$1.AbstractMessageBuffer = void 0;
	const CR = 13;
	const LF = 10;
	const CRLF = '\r\n';
	class AbstractMessageBuffer {
	    constructor(encoding = 'utf-8') {
	        this._encoding = encoding;
	        this._chunks = [];
	        this._totalLength = 0;
	    }
	    get encoding() {
	        return this._encoding;
	    }
	    append(chunk) {
	        const toAppend = typeof chunk === 'string' ? this.fromString(chunk, this._encoding) : chunk;
	        this._chunks.push(toAppend);
	        this._totalLength += toAppend.byteLength;
	    }
	    tryReadHeaders(lowerCaseKeys = false) {
	        if (this._chunks.length === 0) {
	            return undefined;
	        }
	        let state = 0;
	        let chunkIndex = 0;
	        let offset = 0;
	        let chunkBytesRead = 0;
	        row: while (chunkIndex < this._chunks.length) {
	            const chunk = this._chunks[chunkIndex];
	            offset = 0;
	            while (offset < chunk.length) {
	                const value = chunk[offset];
	                switch (value) {
	                    case CR:
	                        switch (state) {
	                            case 0:
	                                state = 1;
	                                break;
	                            case 2:
	                                state = 3;
	                                break;
	                            default:
	                                state = 0;
	                        }
	                        break;
	                    case LF:
	                        switch (state) {
	                            case 1:
	                                state = 2;
	                                break;
	                            case 3:
	                                state = 4;
	                                offset++;
	                                break row;
	                            default:
	                                state = 0;
	                        }
	                        break;
	                    default:
	                        state = 0;
	                }
	                offset++;
	            }
	            chunkBytesRead += chunk.byteLength;
	            chunkIndex++;
	        }
	        if (state !== 4) {
	            return undefined;
	        }
	        const buffer = this._read(chunkBytesRead + offset);
	        const result = new Map();
	        const headers = this.toString(buffer, 'ascii').split(CRLF);
	        if (headers.length < 2) {
	            return result;
	        }
	        for (let i = 0; i < headers.length - 2; i++) {
	            const header = headers[i];
	            const index = header.indexOf(':');
	            if (index === -1) {
	                throw new Error(`Message header must separate key and value using ':'\n${header}`);
	            }
	            const key = header.substr(0, index);
	            const value = header.substr(index + 1).trim();
	            result.set(lowerCaseKeys ? key.toLowerCase() : key, value);
	        }
	        return result;
	    }
	    tryReadBody(length) {
	        if (this._totalLength < length) {
	            return undefined;
	        }
	        return this._read(length);
	    }
	    get numberOfBytes() {
	        return this._totalLength;
	    }
	    _read(byteCount) {
	        if (byteCount === 0) {
	            return this.emptyBuffer();
	        }
	        if (byteCount > this._totalLength) {
	            throw new Error(`Cannot read so many bytes!`);
	        }
	        if (this._chunks[0].byteLength === byteCount) {
	            const chunk = this._chunks[0];
	            this._chunks.shift();
	            this._totalLength -= byteCount;
	            return this.asNative(chunk);
	        }
	        if (this._chunks[0].byteLength > byteCount) {
	            const chunk = this._chunks[0];
	            const result = this.asNative(chunk, byteCount);
	            this._chunks[0] = chunk.slice(byteCount);
	            this._totalLength -= byteCount;
	            return result;
	        }
	        const result = this.allocNative(byteCount);
	        let resultOffset = 0;
	        let chunkIndex = 0;
	        while (byteCount > 0) {
	            const chunk = this._chunks[chunkIndex];
	            if (chunk.byteLength > byteCount) {
	                const chunkPart = chunk.slice(0, byteCount);
	                result.set(chunkPart, resultOffset);
	                resultOffset += byteCount;
	                this._chunks[chunkIndex] = chunk.slice(byteCount);
	                this._totalLength -= byteCount;
	                byteCount -= byteCount;
	            }
	            else {
	                result.set(chunk, resultOffset);
	                resultOffset += chunk.byteLength;
	                this._chunks.shift();
	                this._totalLength -= chunk.byteLength;
	                byteCount -= chunk.byteLength;
	            }
	        }
	        return result;
	    }
	}
	messageBuffer$1.AbstractMessageBuffer = AbstractMessageBuffer;
	return messageBuffer$1;
}

var connection$3 = {};

var hasRequiredConnection$1;
function requireConnection$1 () {
	if (hasRequiredConnection$1) return connection$3;
	hasRequiredConnection$1 = 1;
	(function (exports) {
		Object.defineProperty(exports, "__esModule", { value: true });
		exports.createMessageConnection = exports.ConnectionOptions = exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.Trace = exports.NullLogger = exports.ProgressType = exports.ProgressToken = void 0;
		const ral_1 = requireRal();
		const Is = requireIs$1();
		const messages_1 = requireMessages$1();
		const linkedMap_1 = requireLinkedMap$1();
		const events_1 = requireEvents$1();
		const cancellation_1 = requireCancellation$1();
		var CancelNotification;
		(function (CancelNotification) {
		    CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
		})(CancelNotification || (CancelNotification = {}));
		var ProgressToken;
		(function (ProgressToken) {
		    function is(value) {
		        return typeof value === 'string' || typeof value === 'number';
		    }
		    ProgressToken.is = is;
		})(ProgressToken || (exports.ProgressToken = ProgressToken = {}));
		var ProgressNotification;
		(function (ProgressNotification) {
		    ProgressNotification.type = new messages_1.NotificationType('$/progress');
		})(ProgressNotification || (ProgressNotification = {}));
		class ProgressType {
		    constructor() {
		    }
		}
		exports.ProgressType = ProgressType;
		var StarRequestHandler;
		(function (StarRequestHandler) {
		    function is(value) {
		        return Is.func(value);
		    }
		    StarRequestHandler.is = is;
		})(StarRequestHandler || (StarRequestHandler = {}));
		exports.NullLogger = Object.freeze({
		    error: () => { },
		    warn: () => { },
		    info: () => { },
		    log: () => { }
		});
		var Trace;
		(function (Trace) {
		    Trace[Trace["Off"] = 0] = "Off";
		    Trace[Trace["Messages"] = 1] = "Messages";
		    Trace[Trace["Compact"] = 2] = "Compact";
		    Trace[Trace["Verbose"] = 3] = "Verbose";
		})(Trace || (exports.Trace = Trace = {}));
		var TraceValues;
		(function (TraceValues) {
		    TraceValues.Off = 'off';
		    TraceValues.Messages = 'messages';
		    TraceValues.Compact = 'compact';
		    TraceValues.Verbose = 'verbose';
		})(TraceValues || (exports.TraceValues = TraceValues = {}));
		(function (Trace) {
		    function fromString(value) {
		        if (!Is.string(value)) {
		            return Trace.Off;
		        }
		        value = value.toLowerCase();
		        switch (value) {
		            case 'off':
		                return Trace.Off;
		            case 'messages':
		                return Trace.Messages;
		            case 'compact':
		                return Trace.Compact;
		            case 'verbose':
		                return Trace.Verbose;
		            default:
		                return Trace.Off;
		        }
		    }
		    Trace.fromString = fromString;
		    function toString(value) {
		        switch (value) {
		            case Trace.Off:
		                return 'off';
		            case Trace.Messages:
		                return 'messages';
		            case Trace.Compact:
		                return 'compact';
		            case Trace.Verbose:
		                return 'verbose';
		            default:
		                return 'off';
		        }
		    }
		    Trace.toString = toString;
		})(Trace || (exports.Trace = Trace = {}));
		var TraceFormat;
		(function (TraceFormat) {
		    TraceFormat["Text"] = "text";
		    TraceFormat["JSON"] = "json";
		})(TraceFormat || (exports.TraceFormat = TraceFormat = {}));
		(function (TraceFormat) {
		    function fromString(value) {
		        if (!Is.string(value)) {
		            return TraceFormat.Text;
		        }
		        value = value.toLowerCase();
		        if (value === 'json') {
		            return TraceFormat.JSON;
		        }
		        else {
		            return TraceFormat.Text;
		        }
		    }
		    TraceFormat.fromString = fromString;
		})(TraceFormat || (exports.TraceFormat = TraceFormat = {}));
		var SetTraceNotification;
		(function (SetTraceNotification) {
		    SetTraceNotification.type = new messages_1.NotificationType('$/setTrace');
		})(SetTraceNotification || (exports.SetTraceNotification = SetTraceNotification = {}));
		var LogTraceNotification;
		(function (LogTraceNotification) {
		    LogTraceNotification.type = new messages_1.NotificationType('$/logTrace');
		})(LogTraceNotification || (exports.LogTraceNotification = LogTraceNotification = {}));
		var ConnectionErrors;
		(function (ConnectionErrors) {
		    ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
		    ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
		    ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
		})(ConnectionErrors || (exports.ConnectionErrors = ConnectionErrors = {}));
		class ConnectionError extends Error {
		    constructor(code, message) {
		        super(message);
		        this.code = code;
		        Object.setPrototypeOf(this, ConnectionError.prototype);
		    }
		}
		exports.ConnectionError = ConnectionError;
		var ConnectionStrategy;
		(function (ConnectionStrategy) {
		    function is(value) {
		        const candidate = value;
		        return candidate && Is.func(candidate.cancelUndispatched);
		    }
		    ConnectionStrategy.is = is;
		})(ConnectionStrategy || (exports.ConnectionStrategy = ConnectionStrategy = {}));
		var IdCancellationReceiverStrategy;
		(function (IdCancellationReceiverStrategy) {
		    function is(value) {
		        const candidate = value;
		        return candidate && (candidate.kind === undefined || candidate.kind === 'id') && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose));
		    }
		    IdCancellationReceiverStrategy.is = is;
		})(IdCancellationReceiverStrategy || (exports.IdCancellationReceiverStrategy = IdCancellationReceiverStrategy = {}));
		var RequestCancellationReceiverStrategy;
		(function (RequestCancellationReceiverStrategy) {
		    function is(value) {
		        const candidate = value;
		        return candidate && candidate.kind === 'request' && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose));
		    }
		    RequestCancellationReceiverStrategy.is = is;
		})(RequestCancellationReceiverStrategy || (exports.RequestCancellationReceiverStrategy = RequestCancellationReceiverStrategy = {}));
		var CancellationReceiverStrategy;
		(function (CancellationReceiverStrategy) {
		    CancellationReceiverStrategy.Message = Object.freeze({
		        createCancellationTokenSource(_) {
		            return new cancellation_1.CancellationTokenSource();
		        }
		    });
		    function is(value) {
		        return IdCancellationReceiverStrategy.is(value) || RequestCancellationReceiverStrategy.is(value);
		    }
		    CancellationReceiverStrategy.is = is;
		})(CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = CancellationReceiverStrategy = {}));
		var CancellationSenderStrategy;
		(function (CancellationSenderStrategy) {
		    CancellationSenderStrategy.Message = Object.freeze({
		        sendCancellation(conn, id) {
		            return conn.sendNotification(CancelNotification.type, { id });
		        },
		        cleanup(_) { }
		    });
		    function is(value) {
		        const candidate = value;
		        return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup);
		    }
		    CancellationSenderStrategy.is = is;
		})(CancellationSenderStrategy || (exports.CancellationSenderStrategy = CancellationSenderStrategy = {}));
		var CancellationStrategy;
		(function (CancellationStrategy) {
		    CancellationStrategy.Message = Object.freeze({
		        receiver: CancellationReceiverStrategy.Message,
		        sender: CancellationSenderStrategy.Message
		    });
		    function is(value) {
		        const candidate = value;
		        return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender);
		    }
		    CancellationStrategy.is = is;
		})(CancellationStrategy || (exports.CancellationStrategy = CancellationStrategy = {}));
		var MessageStrategy;
		(function (MessageStrategy) {
		    function is(value) {
		        const candidate = value;
		        return candidate && Is.func(candidate.handleMessage);
		    }
		    MessageStrategy.is = is;
		})(MessageStrategy || (exports.MessageStrategy = MessageStrategy = {}));
		var ConnectionOptions;
		(function (ConnectionOptions) {
		    function is(value) {
		        const candidate = value;
		        return candidate && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy) || MessageStrategy.is(candidate.messageStrategy));
		    }
		    ConnectionOptions.is = is;
		})(ConnectionOptions || (exports.ConnectionOptions = ConnectionOptions = {}));
		var ConnectionState;
		(function (ConnectionState) {
		    ConnectionState[ConnectionState["New"] = 1] = "New";
		    ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
		    ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
		    ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
		})(ConnectionState || (ConnectionState = {}));
		function createMessageConnection(messageReader, messageWriter, _logger, options) {
		    const logger = _logger !== undefined ? _logger : exports.NullLogger;
		    let sequenceNumber = 0;
		    let notificationSequenceNumber = 0;
		    let unknownResponseSequenceNumber = 0;
		    const version = '2.0';
		    let starRequestHandler = undefined;
		    const requestHandlers = new Map();
		    let starNotificationHandler = undefined;
		    const notificationHandlers = new Map();
		    const progressHandlers = new Map();
		    let timer;
		    let messageQueue = new linkedMap_1.LinkedMap();
		    let responsePromises = new Map();
		    let knownCanceledRequests = new Set();
		    let requestTokens = new Map();
		    let trace = Trace.Off;
		    let traceFormat = TraceFormat.Text;
		    let tracer;
		    let state = ConnectionState.New;
		    const errorEmitter = new events_1.Emitter();
		    const closeEmitter = new events_1.Emitter();
		    const unhandledNotificationEmitter = new events_1.Emitter();
		    const unhandledProgressEmitter = new events_1.Emitter();
		    const disposeEmitter = new events_1.Emitter();
		    const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message;
		    function createRequestQueueKey(id) {
		        if (id === null) {
		            throw new Error(`Can't send requests with id null since the response can't be correlated.`);
		        }
		        return 'req-' + id.toString();
		    }
		    function createResponseQueueKey(id) {
		        if (id === null) {
		            return 'res-unknown-' + (++unknownResponseSequenceNumber).toString();
		        }
		        else {
		            return 'res-' + id.toString();
		        }
		    }
		    function createNotificationQueueKey() {
		        return 'not-' + (++notificationSequenceNumber).toString();
		    }
		    function addMessageToQueue(queue, message) {
		        if (messages_1.Message.isRequest(message)) {
		            queue.set(createRequestQueueKey(message.id), message);
		        }
		        else if (messages_1.Message.isResponse(message)) {
		            queue.set(createResponseQueueKey(message.id), message);
		        }
		        else {
		            queue.set(createNotificationQueueKey(), message);
		        }
		    }
		    function cancelUndispatched(_message) {
		        return undefined;
		    }
		    function isListening() {
		        return state === ConnectionState.Listening;
		    }
		    function isClosed() {
		        return state === ConnectionState.Closed;
		    }
		    function isDisposed() {
		        return state === ConnectionState.Disposed;
		    }
		    function closeHandler() {
		        if (state === ConnectionState.New || state === ConnectionState.Listening) {
		            state = ConnectionState.Closed;
		            closeEmitter.fire(undefined);
		        }
		    }
		    function readErrorHandler(error) {
		        errorEmitter.fire([error, undefined, undefined]);
		    }
		    function writeErrorHandler(data) {
		        errorEmitter.fire(data);
		    }
		    messageReader.onClose(closeHandler);
		    messageReader.onError(readErrorHandler);
		    messageWriter.onClose(closeHandler);
		    messageWriter.onError(writeErrorHandler);
		    function triggerMessageQueue() {
		        if (timer || messageQueue.size === 0) {
		            return;
		        }
		        timer = (0, ral_1.default)().timer.setImmediate(() => {
		            timer = undefined;
		            processMessageQueue();
		        });
		    }
		    function handleMessage(message) {
		        if (messages_1.Message.isRequest(message)) {
		            handleRequest(message);
		        }
		        else if (messages_1.Message.isNotification(message)) {
		            handleNotification(message);
		        }
		        else if (messages_1.Message.isResponse(message)) {
		            handleResponse(message);
		        }
		        else {
		            handleInvalidMessage(message);
		        }
		    }
		    function processMessageQueue() {
		        if (messageQueue.size === 0) {
		            return;
		        }
		        const message = messageQueue.shift();
		        try {
		            const messageStrategy = options?.messageStrategy;
		            if (MessageStrategy.is(messageStrategy)) {
		                messageStrategy.handleMessage(message, handleMessage);
		            }
		            else {
		                handleMessage(message);
		            }
		        }
		        finally {
		            triggerMessageQueue();
		        }
		    }
		    const callback = (message) => {
		        try {
		            if (messages_1.Message.isNotification(message) && message.method === CancelNotification.type.method) {
		                const cancelId = message.params.id;
		                const key = createRequestQueueKey(cancelId);
		                const toCancel = messageQueue.get(key);
		                if (messages_1.Message.isRequest(toCancel)) {
		                    const strategy = options?.connectionStrategy;
		                    const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
		                    if (response && (response.error !== undefined || response.result !== undefined)) {
		                        messageQueue.delete(key);
		                        requestTokens.delete(cancelId);
		                        response.id = toCancel.id;
		                        traceSendingResponse(response, message.method, Date.now());
		                        messageWriter.write(response).catch(() => logger.error(`Sending response for canceled message failed.`));
		                        return;
		                    }
		                }
		                const cancellationToken = requestTokens.get(cancelId);
		                if (cancellationToken !== undefined) {
		                    cancellationToken.cancel();
		                    traceReceivedNotification(message);
		                    return;
		                }
		                else {
		                    knownCanceledRequests.add(cancelId);
		                }
		            }
		            addMessageToQueue(messageQueue, message);
		        }
		        finally {
		            triggerMessageQueue();
		        }
		    };
		    function handleRequest(requestMessage) {
		        if (isDisposed()) {
		            return;
		        }
		        function reply(resultOrError, method, startTime) {
		            const message = {
		                jsonrpc: version,
		                id: requestMessage.id
		            };
		            if (resultOrError instanceof messages_1.ResponseError) {
		                message.error = resultOrError.toJson();
		            }
		            else {
		                message.result = resultOrError === undefined ? null : resultOrError;
		            }
		            traceSendingResponse(message, method, startTime);
		            messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));
		        }
		        function replyError(error, method, startTime) {
		            const message = {
		                jsonrpc: version,
		                id: requestMessage.id,
		                error: error.toJson()
		            };
		            traceSendingResponse(message, method, startTime);
		            messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));
		        }
		        function replySuccess(result, method, startTime) {
		            if (result === undefined) {
		                result = null;
		            }
		            const message = {
		                jsonrpc: version,
		                id: requestMessage.id,
		                result: result
		            };
		            traceSendingResponse(message, method, startTime);
		            messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));
		        }
		        traceReceivedRequest(requestMessage);
		        const element = requestHandlers.get(requestMessage.method);
		        let type;
		        let requestHandler;
		        if (element) {
		            type = element.type;
		            requestHandler = element.handler;
		        }
		        const startTime = Date.now();
		        if (requestHandler || starRequestHandler) {
		            const tokenKey = requestMessage.id ?? String(Date.now());
		            const cancellationSource = IdCancellationReceiverStrategy.is(cancellationStrategy.receiver)
		                ? cancellationStrategy.receiver.createCancellationTokenSource(tokenKey)
		                : cancellationStrategy.receiver.createCancellationTokenSource(requestMessage);
		            if (requestMessage.id !== null && knownCanceledRequests.has(requestMessage.id)) {
		                cancellationSource.cancel();
		            }
		            if (requestMessage.id !== null) {
		                requestTokens.set(tokenKey, cancellationSource);
		            }
		            try {
		                let handlerResult;
		                if (requestHandler) {
		                    if (requestMessage.params === undefined) {
		                        if (type !== undefined && type.numberOfParams !== 0) {
		                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but received none.`), requestMessage.method, startTime);
		                            return;
		                        }
		                        handlerResult = requestHandler(cancellationSource.token);
		                    }
		                    else if (Array.isArray(requestMessage.params)) {
		                        if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byName) {
		                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime);
		                            return;
		                        }
		                        handlerResult = requestHandler(...requestMessage.params, cancellationSource.token);
		                    }
		                    else {
		                        if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) {
		                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime);
		                            return;
		                        }
		                        handlerResult = requestHandler(requestMessage.params, cancellationSource.token);
		                    }
		                }
		                else if (starRequestHandler) {
		                    handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
		                }
		                const promise = handlerResult;
		                if (!handlerResult) {
		                    requestTokens.delete(tokenKey);
		                    replySuccess(handlerResult, requestMessage.method, startTime);
		                }
		                else if (promise.then) {
		                    promise.then((resultOrError) => {
		                        requestTokens.delete(tokenKey);
		                        reply(resultOrError, requestMessage.method, startTime);
		                    }, error => {
		                        requestTokens.delete(tokenKey);
		                        if (error instanceof messages_1.ResponseError) {
		                            replyError(error, requestMessage.method, startTime);
		                        }
		                        else if (error && Is.string(error.message)) {
		                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
		                        }
		                        else {
		                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
		                        }
		                    });
		                }
		                else {
		                    requestTokens.delete(tokenKey);
		                    reply(handlerResult, requestMessage.method, startTime);
		                }
		            }
		            catch (error) {
		                requestTokens.delete(tokenKey);
		                if (error instanceof messages_1.ResponseError) {
		                    reply(error, requestMessage.method, startTime);
		                }
		                else if (error && Is.string(error.message)) {
		                    replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
		                }
		                else {
		                    replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
		                }
		            }
		        }
		        else {
		            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
		        }
		    }
		    function handleResponse(responseMessage) {
		        if (isDisposed()) {
		            return;
		        }
		        if (responseMessage.id === null) {
		            if (responseMessage.error) {
		                logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
		            }
		            else {
		                logger.error(`Received response message without id. No further error information provided.`);
		            }
		        }
		        else {
		            const key = responseMessage.id;
		            const responsePromise = responsePromises.get(key);
		            traceReceivedResponse(responseMessage, responsePromise);
		            if (responsePromise !== undefined) {
		                responsePromises.delete(key);
		                try {
		                    if (responseMessage.error) {
		                        const error = responseMessage.error;
		                        responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
		                    }
		                    else if (responseMessage.result !== undefined) {
		                        responsePromise.resolve(responseMessage.result);
		                    }
		                    else {
		                        throw new Error('Should never happen.');
		                    }
		                }
		                catch (error) {
		                    if (error.message) {
		                        logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
		                    }
		                    else {
		                        logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
		                    }
		                }
		            }
		        }
		    }
		    function handleNotification(message) {
		        if (isDisposed()) {
		            return;
		        }
		        let type = undefined;
		        let notificationHandler;
		        if (message.method === CancelNotification.type.method) {
		            const cancelId = message.params.id;
		            knownCanceledRequests.delete(cancelId);
		            traceReceivedNotification(message);
		            return;
		        }
		        else {
		            const element = notificationHandlers.get(message.method);
		            if (element) {
		                notificationHandler = element.handler;
		                type = element.type;
		            }
		        }
		        if (notificationHandler || starNotificationHandler) {
		            try {
		                traceReceivedNotification(message);
		                if (notificationHandler) {
		                    if (message.params === undefined) {
		                        if (type !== undefined) {
		                            if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) {
		                                logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received none.`);
		                            }
		                        }
		                        notificationHandler();
		                    }
		                    else if (Array.isArray(message.params)) {
		                        const params = message.params;
		                        if (message.method === ProgressNotification.type.method && params.length === 2 && ProgressToken.is(params[0])) {
		                            notificationHandler({ token: params[0], value: params[1] });
		                        }
		                        else {
		                            if (type !== undefined) {
		                                if (type.parameterStructures === messages_1.ParameterStructures.byName) {
		                                    logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`);
		                                }
		                                if (type.numberOfParams !== message.params.length) {
		                                    logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${params.length} arguments`);
		                                }
		                            }
		                            notificationHandler(...params);
		                        }
		                    }
		                    else {
		                        if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) {
		                            logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`);
		                        }
		                        notificationHandler(message.params);
		                    }
		                }
		                else if (starNotificationHandler) {
		                    starNotificationHandler(message.method, message.params);
		                }
		            }
		            catch (error) {
		                if (error.message) {
		                    logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
		                }
		                else {
		                    logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
		                }
		            }
		        }
		        else {
		            unhandledNotificationEmitter.fire(message);
		        }
		    }
		    function handleInvalidMessage(message) {
		        if (!message) {
		            logger.error('Received empty message.');
		            return;
		        }
		        logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
		        const responseMessage = message;
		        if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
		            const key = responseMessage.id;
		            const responseHandler = responsePromises.get(key);
		            if (responseHandler) {
		                responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
		            }
		        }
		    }
		    function stringifyTrace(params) {
		        if (params === undefined || params === null) {
		            return undefined;
		        }
		        switch (trace) {
		            case Trace.Verbose:
		                return JSON.stringify(params, null, 4);
		            case Trace.Compact:
		                return JSON.stringify(params);
		            default:
		                return undefined;
		        }
		    }
		    function traceSendingRequest(message) {
		        if (trace === Trace.Off || !tracer) {
		            return;
		        }
		        if (traceFormat === TraceFormat.Text) {
		            let data = undefined;
		            if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) {
		                data = `Params: ${stringifyTrace(message.params)}\n\n`;
		            }
		            tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
		        }
		        else {
		            logLSPMessage('send-request', message);
		        }
		    }
		    function traceSendingNotification(message) {
		        if (trace === Trace.Off || !tracer) {
		            return;
		        }
		        if (traceFormat === TraceFormat.Text) {
		            let data = undefined;
		            if (trace === Trace.Verbose || trace === Trace.Compact) {
		                if (message.params) {
		                    data = `Params: ${stringifyTrace(message.params)}\n\n`;
		                }
		                else {
		                    data = 'No parameters provided.\n\n';
		                }
		            }
		            tracer.log(`Sending notification '${message.method}'.`, data);
		        }
		        else {
		            logLSPMessage('send-notification', message);
		        }
		    }
		    function traceSendingResponse(message, method, startTime) {
		        if (trace === Trace.Off || !tracer) {
		            return;
		        }
		        if (traceFormat === TraceFormat.Text) {
		            let data = undefined;
		            if (trace === Trace.Verbose || trace === Trace.Compact) {
		                if (message.error && message.error.data) {
		                    data = `Error data: ${stringifyTrace(message.error.data)}\n\n`;
		                }
		                else {
		                    if (message.result) {
		                        data = `Result: ${stringifyTrace(message.result)}\n\n`;
		                    }
		                    else if (message.error === undefined) {
		                        data = 'No result returned.\n\n';
		                    }
		                }
		            }
		            tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
		        }
		        else {
		            logLSPMessage('send-response', message);
		        }
		    }
		    function traceReceivedRequest(message) {
		        if (trace === Trace.Off || !tracer) {
		            return;
		        }
		        if (traceFormat === TraceFormat.Text) {
		            let data = undefined;
		            if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) {
		                data = `Params: ${stringifyTrace(message.params)}\n\n`;
		            }
		            tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
		        }
		        else {
		            logLSPMessage('receive-request', message);
		        }
		    }
		    function traceReceivedNotification(message) {
		        if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
		            return;
		        }
		        if (traceFormat === TraceFormat.Text) {
		            let data = undefined;
		            if (trace === Trace.Verbose || trace === Trace.Compact) {
		                if (message.params) {
		                    data = `Params: ${stringifyTrace(message.params)}\n\n`;
		                }
		                else {
		                    data = 'No parameters provided.\n\n';
		                }
		            }
		            tracer.log(`Received notification '${message.method}'.`, data);
		        }
		        else {
		            logLSPMessage('receive-notification', message);
		        }
		    }
		    function traceReceivedResponse(message, responsePromise) {
		        if (trace === Trace.Off || !tracer) {
		            return;
		        }
		        if (traceFormat === TraceFormat.Text) {
		            let data = undefined;
		            if (trace === Trace.Verbose || trace === Trace.Compact) {
		                if (message.error && message.error.data) {
		                    data = `Error data: ${stringifyTrace(message.error.data)}\n\n`;
		                }
		                else {
		                    if (message.result) {
		                        data = `Result: ${stringifyTrace(message.result)}\n\n`;
		                    }
		                    else if (message.error === undefined) {
		                        data = 'No result returned.\n\n';
		                    }
		                }
		            }
		            if (responsePromise) {
		                const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
		                tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
		            }
		            else {
		                tracer.log(`Received response ${message.id} without active response promise.`, data);
		            }
		        }
		        else {
		            logLSPMessage('receive-response', message);
		        }
		    }
		    function logLSPMessage(type, message) {
		        if (!tracer || trace === Trace.Off) {
		            return;
		        }
		        const lspMessage = {
		            isLSPMessage: true,
		            type,
		            message,
		            timestamp: Date.now()
		        };
		        tracer.log(lspMessage);
		    }
		    function throwIfClosedOrDisposed() {
		        if (isClosed()) {
		            throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
		        }
		        if (isDisposed()) {
		            throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
		        }
		    }
		    function throwIfListening() {
		        if (isListening()) {
		            throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
		        }
		    }
		    function throwIfNotListening() {
		        if (!isListening()) {
		            throw new Error('Call listen() first.');
		        }
		    }
		    function undefinedToNull(param) {
		        if (param === undefined) {
		            return null;
		        }
		        else {
		            return param;
		        }
		    }
		    function nullToUndefined(param) {
		        if (param === null) {
		            return undefined;
		        }
		        else {
		            return param;
		        }
		    }
		    function isNamedParam(param) {
		        return param !== undefined && param !== null && !Array.isArray(param) && typeof param === 'object';
		    }
		    function computeSingleParam(parameterStructures, param) {
		        switch (parameterStructures) {
		            case messages_1.ParameterStructures.auto:
		                if (isNamedParam(param)) {
		                    return nullToUndefined(param);
		                }
		                else {
		                    return [undefinedToNull(param)];
		                }
		            case messages_1.ParameterStructures.byName:
		                if (!isNamedParam(param)) {
		                    throw new Error(`Received parameters by name but param is not an object literal.`);
		                }
		                return nullToUndefined(param);
		            case messages_1.ParameterStructures.byPosition:
		                return [undefinedToNull(param)];
		            default:
		                throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`);
		        }
		    }
		    function computeMessageParams(type, params) {
		        let result;
		        const numberOfParams = type.numberOfParams;
		        switch (numberOfParams) {
		            case 0:
		                result = undefined;
		                break;
		            case 1:
		                result = computeSingleParam(type.parameterStructures, params[0]);
		                break;
		            default:
		                result = [];
		                for (let i = 0; i < params.length && i < numberOfParams; i++) {
		                    result.push(undefinedToNull(params[i]));
		                }
		                if (params.length < numberOfParams) {
		                    for (let i = params.length; i < numberOfParams; i++) {
		                        result.push(null);
		                    }
		                }
		                break;
		        }
		        return result;
		    }
		    const connection = {
		        sendNotification: (type, ...args) => {
		            throwIfClosedOrDisposed();
		            let method;
		            let messageParams;
		            if (Is.string(type)) {
		                method = type;
		                const first = args[0];
		                let paramStart = 0;
		                let parameterStructures = messages_1.ParameterStructures.auto;
		                if (messages_1.ParameterStructures.is(first)) {
		                    paramStart = 1;
		                    parameterStructures = first;
		                }
		                let paramEnd = args.length;
		                const numberOfParams = paramEnd - paramStart;
		                switch (numberOfParams) {
		                    case 0:
		                        messageParams = undefined;
		                        break;
		                    case 1:
		                        messageParams = computeSingleParam(parameterStructures, args[paramStart]);
		                        break;
		                    default:
		                        if (parameterStructures === messages_1.ParameterStructures.byName) {
		                            throw new Error(`Received ${numberOfParams} parameters for 'by Name' notification parameter structure.`);
		                        }
		                        messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value));
		                        break;
		                }
		            }
		            else {
		                const params = args;
		                method = type.method;
		                messageParams = computeMessageParams(type, params);
		            }
		            const notificationMessage = {
		                jsonrpc: version,
		                method: method,
		                params: messageParams
		            };
		            traceSendingNotification(notificationMessage);
		            return messageWriter.write(notificationMessage).catch((error) => {
		                logger.error(`Sending notification failed.`);
		                throw error;
		            });
		        },
		        onNotification: (type, handler) => {
		            throwIfClosedOrDisposed();
		            let method;
		            if (Is.func(type)) {
		                starNotificationHandler = type;
		            }
		            else if (handler) {
		                if (Is.string(type)) {
		                    method = type;
		                    notificationHandlers.set(type, { type: undefined, handler });
		                }
		                else {
		                    method = type.method;
		                    notificationHandlers.set(type.method, { type, handler });
		                }
		            }
		            return {
		                dispose: () => {
		                    if (method !== undefined) {
		                        notificationHandlers.delete(method);
		                    }
		                    else {
		                        starNotificationHandler = undefined;
		                    }
		                }
		            };
		        },
		        onProgress: (_type, token, handler) => {
		            if (progressHandlers.has(token)) {
		                throw new Error(`Progress handler for token ${token} already registered`);
		            }
		            progressHandlers.set(token, handler);
		            return {
		                dispose: () => {
		                    progressHandlers.delete(token);
		                }
		            };
		        },
		        sendProgress: (_type, token, value) => {
		            return connection.sendNotification(ProgressNotification.type, { token, value });
		        },
		        onUnhandledProgress: unhandledProgressEmitter.event,
		        sendRequest: (type, ...args) => {
		            throwIfClosedOrDisposed();
		            throwIfNotListening();
		            let method;
		            let messageParams;
		            let token = undefined;
		            if (Is.string(type)) {
		                method = type;
		                const first = args[0];
		                const last = args[args.length - 1];
		                let paramStart = 0;
		                let parameterStructures = messages_1.ParameterStructures.auto;
		                if (messages_1.ParameterStructures.is(first)) {
		                    paramStart = 1;
		                    parameterStructures = first;
		                }
		                let paramEnd = args.length;
		                if (cancellation_1.CancellationToken.is(last)) {
		                    paramEnd = paramEnd - 1;
		                    token = last;
		                }
		                const numberOfParams = paramEnd - paramStart;
		                switch (numberOfParams) {
		                    case 0:
		                        messageParams = undefined;
		                        break;
		                    case 1:
		                        messageParams = computeSingleParam(parameterStructures, args[paramStart]);
		                        break;
		                    default:
		                        if (parameterStructures === messages_1.ParameterStructures.byName) {
		                            throw new Error(`Received ${numberOfParams} parameters for 'by Name' request parameter structure.`);
		                        }
		                        messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value));
		                        break;
		                }
		            }
		            else {
		                const params = args;
		                method = type.method;
		                messageParams = computeMessageParams(type, params);
		                const numberOfParams = type.numberOfParams;
		                token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
		            }
		            const id = sequenceNumber++;
		            let disposable;
		            if (token) {
		                disposable = token.onCancellationRequested(() => {
		                    const p = cancellationStrategy.sender.sendCancellation(connection, id);
		                    if (p === undefined) {
		                        logger.log(`Received no promise from cancellation strategy when cancelling id ${id}`);
		                        return Promise.resolve();
		                    }
		                    else {
		                        return p.catch(() => {
		                            logger.log(`Sending cancellation messages for id ${id} failed`);
		                        });
		                    }
		                });
		            }
		            const requestMessage = {
		                jsonrpc: version,
		                id: id,
		                method: method,
		                params: messageParams
		            };
		            traceSendingRequest(requestMessage);
		            if (typeof cancellationStrategy.sender.enableCancellation === 'function') {
		                cancellationStrategy.sender.enableCancellation(requestMessage);
		            }
		            return new Promise(async (resolve, reject) => {
		                const resolveWithCleanup = (r) => {
		                    resolve(r);
		                    cancellationStrategy.sender.cleanup(id);
		                    disposable?.dispose();
		                };
		                const rejectWithCleanup = (r) => {
		                    reject(r);
		                    cancellationStrategy.sender.cleanup(id);
		                    disposable?.dispose();
		                };
		                const responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup };
		                try {
		                    await messageWriter.write(requestMessage);
		                    responsePromises.set(id, responsePromise);
		                }
		                catch (error) {
		                    logger.error(`Sending request failed.`);
		                    responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, error.message ? error.message : 'Unknown reason'));
		                    throw error;
		                }
		            });
		        },
		        onRequest: (type, handler) => {
		            throwIfClosedOrDisposed();
		            let method = null;
		            if (StarRequestHandler.is(type)) {
		                method = undefined;
		                starRequestHandler = type;
		            }
		            else if (Is.string(type)) {
		                method = null;
		                if (handler !== undefined) {
		                    method = type;
		                    requestHandlers.set(type, { handler: handler, type: undefined });
		                }
		            }
		            else {
		                if (handler !== undefined) {
		                    method = type.method;
		                    requestHandlers.set(type.method, { type, handler });
		                }
		            }
		            return {
		                dispose: () => {
		                    if (method === null) {
		                        return;
		                    }
		                    if (method !== undefined) {
		                        requestHandlers.delete(method);
		                    }
		                    else {
		                        starRequestHandler = undefined;
		                    }
		                }
		            };
		        },
		        hasPendingResponse: () => {
		            return responsePromises.size > 0;
		        },
		        trace: async (_value, _tracer, sendNotificationOrTraceOptions) => {
		            let _sendNotification = false;
		            let _traceFormat = TraceFormat.Text;
		            if (sendNotificationOrTraceOptions !== undefined) {
		                if (Is.boolean(sendNotificationOrTraceOptions)) {
		                    _sendNotification = sendNotificationOrTraceOptions;
		                }
		                else {
		                    _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
		                    _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
		                }
		            }
		            trace = _value;
		            traceFormat = _traceFormat;
		            if (trace === Trace.Off) {
		                tracer = undefined;
		            }
		            else {
		                tracer = _tracer;
		            }
		            if (_sendNotification && !isClosed() && !isDisposed()) {
		                await connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
		            }
		        },
		        onError: errorEmitter.event,
		        onClose: closeEmitter.event,
		        onUnhandledNotification: unhandledNotificationEmitter.event,
		        onDispose: disposeEmitter.event,
		        end: () => {
		            messageWriter.end();
		        },
		        dispose: () => {
		            if (isDisposed()) {
		                return;
		            }
		            state = ConnectionState.Disposed;
		            disposeEmitter.fire(undefined);
		            const error = new messages_1.ResponseError(messages_1.ErrorCodes.PendingResponseRejected, 'Pending response rejected since connection got disposed');
		            for (const promise of responsePromises.values()) {
		                promise.reject(error);
		            }
		            responsePromises = new Map();
		            requestTokens = new Map();
		            knownCanceledRequests = new Set();
		            messageQueue = new linkedMap_1.LinkedMap();
		            if (Is.func(messageWriter.dispose)) {
		                messageWriter.dispose();
		            }
		            if (Is.func(messageReader.dispose)) {
		                messageReader.dispose();
		            }
		        },
		        listen: () => {
		            throwIfClosedOrDisposed();
		            throwIfListening();
		            state = ConnectionState.Listening;
		            messageReader.listen(callback);
		        },
		        inspect: () => {
		            (0, ral_1.default)().console.log('inspect');
		        }
		    };
		    connection.onNotification(LogTraceNotification.type, (params) => {
		        if (trace === Trace.Off || !tracer) {
		            return;
		        }
		        const verbose = trace === Trace.Verbose || trace === Trace.Compact;
		        tracer.log(params.message, verbose ? params.verbose : undefined);
		    });
		    connection.onNotification(ProgressNotification.type, (params) => {
		        const handler = progressHandlers.get(params.token);
		        if (handler) {
		            handler(params.value);
		        }
		        else {
		            unhandledProgressEmitter.fire(params);
		        }
		    });
		    return connection;
		}
		exports.createMessageConnection = createMessageConnection;
	} (connection$3));
	return connection$3;
}

var hasRequiredApi$1;
function requireApi$1 () {
	if (hasRequiredApi$1) return api$4;
	hasRequiredApi$1 = 1;
	(function (exports) {
		/// <reference path="../../typings/thenable.d.ts" />
		Object.defineProperty(exports, "__esModule", { value: true });
		exports.ProgressType = exports.ProgressToken = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.AbstractMessageBuffer = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.LRUCache = exports.Touch = exports.LinkedMap = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.Message = exports.RAL = void 0;
		exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.Trace = void 0;
		const messages_1 = requireMessages$1();
		Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return messages_1.Message; } });
		Object.defineProperty(exports, "RequestType", { enumerable: true, get: function () { return messages_1.RequestType; } });
		Object.defineProperty(exports, "RequestType0", { enumerable: true, get: function () { return messages_1.RequestType0; } });
		Object.defineProperty(exports, "RequestType1", { enumerable: true, get: function () { return messages_1.RequestType1; } });
		Object.defineProperty(exports, "RequestType2", { enumerable: true, get: function () { return messages_1.RequestType2; } });
		Object.defineProperty(exports, "RequestType3", { enumerable: true, get: function () { return messages_1.RequestType3; } });
		Object.defineProperty(exports, "RequestType4", { enumerable: true, get: function () { return messages_1.RequestType4; } });
		Object.defineProperty(exports, "RequestType5", { enumerable: true, get: function () { return messages_1.RequestType5; } });
		Object.defineProperty(exports, "RequestType6", { enumerable: true, get: function () { return messages_1.RequestType6; } });
		Object.defineProperty(exports, "RequestType7", { enumerable: true, get: function () { return messages_1.RequestType7; } });
		Object.defineProperty(exports, "RequestType8", { enumerable: true, get: function () { return messages_1.RequestType8; } });
		Object.defineProperty(exports, "RequestType9", { enumerable: true, get: function () { return messages_1.RequestType9; } });
		Object.defineProperty(exports, "ResponseError", { enumerable: true, get: function () { return messages_1.ResponseError; } });
		Object.defineProperty(exports, "ErrorCodes", { enumerable: true, get: function () { return messages_1.ErrorCodes; } });
		Object.defineProperty(exports, "NotificationType", { enumerable: true, get: function () { return messages_1.NotificationType; } });
		Object.defineProperty(exports, "NotificationType0", { enumerable: true, get: function () { return messages_1.NotificationType0; } });
		Object.defineProperty(exports, "NotificationType1", { enumerable: true, get: function () { return messages_1.NotificationType1; } });
		Object.defineProperty(exports, "NotificationType2", { enumerable: true, get: function () { return messages_1.NotificationType2; } });
		Object.defineProperty(exports, "NotificationType3", { enumerable: true, get: function () { return messages_1.NotificationType3; } });
		Object.defineProperty(exports, "NotificationType4", { enumerable: true, get: function () { return messages_1.NotificationType4; } });
		Object.defineProperty(exports, "NotificationType5", { enumerable: true, get: function () { return messages_1.NotificationType5; } });
		Object.defineProperty(exports, "NotificationType6", { enumerable: true, get: function () { return messages_1.NotificationType6; } });
		Object.defineProperty(exports, "NotificationType7", { enumerable: true, get: function () { return messages_1.NotificationType7; } });
		Object.defineProperty(exports, "NotificationType8", { enumerable: true, get: function () { return messages_1.NotificationType8; } });
		Object.defineProperty(exports, "NotificationType9", { enumerable: true, get: function () { return messages_1.NotificationType9; } });
		Object.defineProperty(exports, "ParameterStructures", { enumerable: true, get: function () { return messages_1.ParameterStructures; } });
		const linkedMap_1 = requireLinkedMap$1();
		Object.defineProperty(exports, "LinkedMap", { enumerable: true, get: function () { return linkedMap_1.LinkedMap; } });
		Object.defineProperty(exports, "LRUCache", { enumerable: true, get: function () { return linkedMap_1.LRUCache; } });
		Object.defineProperty(exports, "Touch", { enumerable: true, get: function () { return linkedMap_1.Touch; } });
		const disposable_1 = requireDisposable();
		Object.defineProperty(exports, "Disposable", { enumerable: true, get: function () { return disposable_1.Disposable; } });
		const events_1 = requireEvents$1();
		Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return events_1.Event; } });
		Object.defineProperty(exports, "Emitter", { enumerable: true, get: function () { return events_1.Emitter; } });
		const cancellation_1 = requireCancellation$1();
		Object.defineProperty(exports, "CancellationTokenSource", { enumerable: true, get: function () { return cancellation_1.CancellationTokenSource; } });
		Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return cancellation_1.CancellationToken; } });
		const sharedArrayCancellation_1 = requireSharedArrayCancellation();
		Object.defineProperty(exports, "SharedArraySenderStrategy", { enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArraySenderStrategy; } });
		Object.defineProperty(exports, "SharedArrayReceiverStrategy", { enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArrayReceiverStrategy; } });
		const messageReader_1 = requireMessageReader$1();
		Object.defineProperty(exports, "MessageReader", { enumerable: true, get: function () { return messageReader_1.MessageReader; } });
		Object.defineProperty(exports, "AbstractMessageReader", { enumerable: true, get: function () { return messageReader_1.AbstractMessageReader; } });
		Object.defineProperty(exports, "ReadableStreamMessageReader", { enumerable: true, get: function () { return messageReader_1.ReadableStreamMessageReader; } });
		const messageWriter_1 = requireMessageWriter$1();
		Object.defineProperty(exports, "MessageWriter", { enumerable: true, get: function () { return messageWriter_1.MessageWriter; } });
		Object.defineProperty(exports, "AbstractMessageWriter", { enumerable: true, get: function () { return messageWriter_1.AbstractMessageWriter; } });
		Object.defineProperty(exports, "WriteableStreamMessageWriter", { enumerable: true, get: function () { return messageWriter_1.WriteableStreamMessageWriter; } });
		const messageBuffer_1 = requireMessageBuffer();
		Object.defineProperty(exports, "AbstractMessageBuffer", { enumerable: true, get: function () { return messageBuffer_1.AbstractMessageBuffer; } });
		const connection_1 = requireConnection$1();
		Object.defineProperty(exports, "ConnectionStrategy", { enumerable: true, get: function () { return connection_1.ConnectionStrategy; } });
		Object.defineProperty(exports, "ConnectionOptions", { enumerable: true, get: function () { return connection_1.ConnectionOptions; } });
		Object.defineProperty(exports, "NullLogger", { enumerable: true, get: function () { return connection_1.NullLogger; } });
		Object.defineProperty(exports, "createMessageConnection", { enumerable: true, get: function () { return connection_1.createMessageConnection; } });
		Object.defineProperty(exports, "ProgressToken", { enumerable: true, get: function () { return connection_1.ProgressToken; } });
		Object.defineProperty(exports, "ProgressType", { enumerable: true, get: function () { return connection_1.ProgressType; } });
		Object.defineProperty(exports, "Trace", { enumerable: true, get: function () { return connection_1.Trace; } });
		Object.defineProperty(exports, "TraceValues", { enumerable: true, get: function () { return connection_1.TraceValues; } });
		Object.defineProperty(exports, "TraceFormat", { enumerable: true, get: function () { return connection_1.TraceFormat; } });
		Object.defineProperty(exports, "SetTraceNotification", { enumerable: true, get: function () { return connection_1.SetTraceNotification; } });
		Object.defineProperty(exports, "LogTraceNotification", { enumerable: true, get: function () { return connection_1.LogTraceNotification; } });
		Object.defineProperty(exports, "ConnectionErrors", { enumerable: true, get: function () { return connection_1.ConnectionErrors; } });
		Object.defineProperty(exports, "ConnectionError", { enumerable: true, get: function () { return connection_1.ConnectionError; } });
		Object.defineProperty(exports, "CancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.CancellationReceiverStrategy; } });
		Object.defineProperty(exports, "CancellationSenderStrategy", { enumerable: true, get: function () { return connection_1.CancellationSenderStrategy; } });
		Object.defineProperty(exports, "CancellationStrategy", { enumerable: true, get: function () { return connection_1.CancellationStrategy; } });
		Object.defineProperty(exports, "MessageStrategy", { enumerable: true, get: function () { return connection_1.MessageStrategy; } });
		const ral_1 = requireRal();
		exports.RAL = ral_1.default;
	} (api$4));
	return api$4;
}

Object.defineProperty(ril$1, "__esModule", { value: true });
const util_1$1 = require$$0$2;
const api_1 = requireApi$1();
let MessageBuffer$1 = class MessageBuffer extends api_1.AbstractMessageBuffer {
    constructor(encoding = 'utf-8') {
        super(encoding);
    }
    emptyBuffer() {
        return MessageBuffer$1.emptyBuffer;
    }
    fromString(value, encoding) {
        return Buffer.from(value, encoding);
    }
    toString(value, encoding) {
        if (value instanceof Buffer) {
            return value.toString(encoding);
        }
        else {
            return new util_1$1.TextDecoder(encoding).decode(value);
        }
    }
    asNative(buffer, length) {
        if (length === undefined) {
            return buffer instanceof Buffer ? buffer : Buffer.from(buffer);
        }
        else {
            return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length);
        }
    }
    allocNative(length) {
        return Buffer.allocUnsafe(length);
    }
};
MessageBuffer$1.emptyBuffer = Buffer.allocUnsafe(0);
let ReadableStreamWrapper$1 = class ReadableStreamWrapper {
    constructor(stream) {
        this.stream = stream;
    }
    onClose(listener) {
        this.stream.on('close', listener);
        return api_1.Disposable.create(() => this.stream.off('close', listener));
    }
    onError(listener) {
        this.stream.on('error', listener);
        return api_1.Disposable.create(() => this.stream.off('error', listener));
    }
    onEnd(listener) {
        this.stream.on('end', listener);
        return api_1.Disposable.create(() => this.stream.off('end', listener));
    }
    onData(listener) {
        this.stream.on('data', listener);
        return api_1.Disposable.create(() => this.stream.off('data', listener));
    }
};
let WritableStreamWrapper$1 = class WritableStreamWrapper {
    constructor(stream) {
        this.stream = stream;
    }
    onClose(listener) {
        this.stream.on('close', listener);
        return api_1.Disposable.create(() => this.stream.off('close', listener));
    }
    onError(listener) {
        this.stream.on('error', listener);
        return api_1.Disposable.create(() => this.stream.off('error', listener));
    }
    onEnd(listener) {
        this.stream.on('end', listener);
        return api_1.Disposable.create(() => this.stream.off('end', listener));
    }
    write(data, encoding) {
        return new Promise((resolve, reject) => {
            const callback = (error) => {
                if (error === undefined || error === null) {
                    resolve();
                }
                else {
                    reject(error);
                }
            };
            if (typeof data === 'string') {
                this.stream.write(data, encoding, callback);
            }
            else {
                this.stream.write(data, callback);
            }
        });
    }
    end() {
        this.stream.end();
    }
};
const _ril$1 = Object.freeze({
    messageBuffer: Object.freeze({
        create: (encoding) => new MessageBuffer$1(encoding)
    }),
    applicationJson: Object.freeze({
        encoder: Object.freeze({
            name: 'application/json',
            encode: (msg, options) => {
                try {
                    return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset));
                }
                catch (err) {
                    return Promise.reject(err);
                }
            }
        }),
        decoder: Object.freeze({
            name: 'application/json',
            decode: (buffer, options) => {
                try {
                    if (buffer instanceof Buffer) {
                        return Promise.resolve(JSON.parse(buffer.toString(options.charset)));
                    }
                    else {
                        return Promise.resolve(JSON.parse(new util_1$1.TextDecoder(options.charset).decode(buffer)));
                    }
                }
                catch (err) {
                    return Promise.reject(err);
                }
            }
        })
    }),
    stream: Object.freeze({
        asReadableStream: (stream) => new ReadableStreamWrapper$1(stream),
        asWritableStream: (stream) => new WritableStreamWrapper$1(stream)
    }),
    console: console,
    timer: Object.freeze({
        setTimeout(callback, ms, ...args) {
            const handle = setTimeout(callback, ms, ...args);
            return { dispose: () => clearTimeout(handle) };
        },
        setImmediate(callback, ...args) {
            const handle = setImmediate(callback, ...args);
            return { dispose: () => clearImmediate(handle) };
        },
        setInterval(callback, ms, ...args) {
            const handle = setInterval(callback, ms, ...args);
            return { dispose: () => clearInterval(handle) };
        }
    })
});
function RIL$1() {
    return _ril$1;
}
(function (RIL) {
    function install() {
        api_1.RAL.install(_ril$1);
    }
    RIL.install = install;
})(RIL$1 || (RIL$1 = {}));
ril$1.default = RIL$1;

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.createMessageConnection = exports.createServerSocketTransport = exports.createClientSocketTransport = exports.createServerPipeTransport = exports.createClientPipeTransport = exports.generateRandomPipeName = exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.PortMessageWriter = exports.PortMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0;
	const ril_1 = ril$1;
	ril_1.default.install();
	const path = path$1;
	const os = require$$2;
	const crypto_1 = require$$3;
	const net_1 = require$$4;
	const api_1 = requireApi$1();
	__exportStar(requireApi$1(), exports);
	class IPCMessageReader extends api_1.AbstractMessageReader {
	    constructor(process) {
	        super();
	        this.process = process;
	        let eventEmitter = this.process;
	        eventEmitter.on('error', (error) => this.fireError(error));
	        eventEmitter.on('close', () => this.fireClose());
	    }
	    listen(callback) {
	        this.process.on('message', callback);
	        return api_1.Disposable.create(() => this.process.off('message', callback));
	    }
	}
	exports.IPCMessageReader = IPCMessageReader;
	class IPCMessageWriter extends api_1.AbstractMessageWriter {
	    constructor(process) {
	        super();
	        this.process = process;
	        this.errorCount = 0;
	        const eventEmitter = this.process;
	        eventEmitter.on('error', (error) => this.fireError(error));
	        eventEmitter.on('close', () => this.fireClose);
	    }
	    write(msg) {
	        try {
	            if (typeof this.process.send === 'function') {
	                this.process.send(msg, undefined, undefined, (error) => {
	                    if (error) {
	                        this.errorCount++;
	                        this.handleError(error, msg);
	                    }
	                    else {
	                        this.errorCount = 0;
	                    }
	                });
	            }
	            return Promise.resolve();
	        }
	        catch (error) {
	            this.handleError(error, msg);
	            return Promise.reject(error);
	        }
	    }
	    handleError(error, msg) {
	        this.errorCount++;
	        this.fireError(error, msg, this.errorCount);
	    }
	    end() {
	    }
	}
	exports.IPCMessageWriter = IPCMessageWriter;
	class PortMessageReader extends api_1.AbstractMessageReader {
	    constructor(port) {
	        super();
	        this.onData = new api_1.Emitter;
	        port.on('close', () => this.fireClose);
	        port.on('error', (error) => this.fireError(error));
	        port.on('message', (message) => {
	            this.onData.fire(message);
	        });
	    }
	    listen(callback) {
	        return this.onData.event(callback);
	    }
	}
	exports.PortMessageReader = PortMessageReader;
	class PortMessageWriter extends api_1.AbstractMessageWriter {
	    constructor(port) {
	        super();
	        this.port = port;
	        this.errorCount = 0;
	        port.on('close', () => this.fireClose());
	        port.on('error', (error) => this.fireError(error));
	    }
	    write(msg) {
	        try {
	            this.port.postMessage(msg);
	            return Promise.resolve();
	        }
	        catch (error) {
	            this.handleError(error, msg);
	            return Promise.reject(error);
	        }
	    }
	    handleError(error, msg) {
	        this.errorCount++;
	        this.fireError(error, msg, this.errorCount);
	    }
	    end() {
	    }
	}
	exports.PortMessageWriter = PortMessageWriter;
	class SocketMessageReader extends api_1.ReadableStreamMessageReader {
	    constructor(socket, encoding = 'utf-8') {
	        super((0, ril_1.default)().stream.asReadableStream(socket), encoding);
	    }
	}
	exports.SocketMessageReader = SocketMessageReader;
	class SocketMessageWriter extends api_1.WriteableStreamMessageWriter {
	    constructor(socket, options) {
	        super((0, ril_1.default)().stream.asWritableStream(socket), options);
	        this.socket = socket;
	    }
	    dispose() {
	        super.dispose();
	        this.socket.destroy();
	    }
	}
	exports.SocketMessageWriter = SocketMessageWriter;
	class StreamMessageReader extends api_1.ReadableStreamMessageReader {
	    constructor(readable, encoding) {
	        super((0, ril_1.default)().stream.asReadableStream(readable), encoding);
	    }
	}
	exports.StreamMessageReader = StreamMessageReader;
	class StreamMessageWriter extends api_1.WriteableStreamMessageWriter {
	    constructor(writable, options) {
	        super((0, ril_1.default)().stream.asWritableStream(writable), options);
	    }
	}
	exports.StreamMessageWriter = StreamMessageWriter;
	const XDG_RUNTIME_DIR = process.env['XDG_RUNTIME_DIR'];
	const safeIpcPathLengths = new Map([
	    ['linux', 107],
	    ['darwin', 103]
	]);
	function generateRandomPipeName() {
	    const randomSuffix = (0, crypto_1.randomBytes)(21).toString('hex');
	    if (process.platform === 'win32') {
	        return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
	    }
	    let result;
	    if (XDG_RUNTIME_DIR) {
	        result = path.join(XDG_RUNTIME_DIR, `vscode-ipc-${randomSuffix}.sock`);
	    }
	    else {
	        result = path.join(os.tmpdir(), `vscode-${randomSuffix}.sock`);
	    }
	    const limit = safeIpcPathLengths.get(process.platform);
	    if (limit !== undefined && result.length > limit) {
	        (0, ril_1.default)().console.warn(`WARNING: IPC handle "${result}" is longer than ${limit} characters.`);
	    }
	    return result;
	}
	exports.generateRandomPipeName = generateRandomPipeName;
	function createClientPipeTransport(pipeName, encoding = 'utf-8') {
	    let connectResolve;
	    const connected = new Promise((resolve, _reject) => {
	        connectResolve = resolve;
	    });
	    return new Promise((resolve, reject) => {
	        let server = (0, net_1.createServer)((socket) => {
	            server.close();
	            connectResolve([
	                new SocketMessageReader(socket, encoding),
	                new SocketMessageWriter(socket, encoding)
	            ]);
	        });
	        server.on('error', reject);
	        server.listen(pipeName, () => {
	            server.removeListener('error', reject);
	            resolve({
	                onConnected: () => { return connected; }
	            });
	        });
	    });
	}
	exports.createClientPipeTransport = createClientPipeTransport;
	function createServerPipeTransport(pipeName, encoding = 'utf-8') {
	    const socket = (0, net_1.createConnection)(pipeName);
	    return [
	        new SocketMessageReader(socket, encoding),
	        new SocketMessageWriter(socket, encoding)
	    ];
	}
	exports.createServerPipeTransport = createServerPipeTransport;
	function createClientSocketTransport(port, encoding = 'utf-8') {
	    let connectResolve;
	    const connected = new Promise((resolve, _reject) => {
	        connectResolve = resolve;
	    });
	    return new Promise((resolve, reject) => {
	        const server = (0, net_1.createServer)((socket) => {
	            server.close();
	            connectResolve([
	                new SocketMessageReader(socket, encoding),
	                new SocketMessageWriter(socket, encoding)
	            ]);
	        });
	        server.on('error', reject);
	        server.listen(port, '127.0.0.1', () => {
	            server.removeListener('error', reject);
	            resolve({
	                onConnected: () => { return connected; }
	            });
	        });
	    });
	}
	exports.createClientSocketTransport = createClientSocketTransport;
	function createServerSocketTransport(port, encoding = 'utf-8') {
	    const socket = (0, net_1.createConnection)(port, '127.0.0.1');
	    return [
	        new SocketMessageReader(socket, encoding),
	        new SocketMessageWriter(socket, encoding)
	    ];
	}
	exports.createServerSocketTransport = createServerSocketTransport;
	function isReadableStream(value) {
	    const candidate = value;
	    return candidate.read !== undefined && candidate.addListener !== undefined;
	}
	function isWritableStream(value) {
	    const candidate = value;
	    return candidate.write !== undefined && candidate.addListener !== undefined;
	}
	function createMessageConnection(input, output, logger, options) {
	    if (!logger) {
	        logger = api_1.NullLogger;
	    }
	    const reader = isReadableStream(input) ? new StreamMessageReader(input) : input;
	    const writer = isWritableStream(output) ? new StreamMessageWriter(output) : output;
	    if (api_1.ConnectionStrategy.is(options)) {
	        options = { connectionStrategy: options };
	    }
	    return (0, api_1.createMessageConnection)(reader, writer, logger, options);
	}
	exports.createMessageConnection = createMessageConnection;
} (main$6));
getDefaultExportFromCjs(main$6);

var node$3 = main$6;
getDefaultExportFromCjs(node$3);

var api$3 = {};

function commonjsRequire(path) {
	throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}

var main$5 = {exports: {}};

main$5.exports;
(function (module, exports) {
	(function (factory) {
	    {
	        var v = factory(commonjsRequire, exports);
	        if (v !== undefined) module.exports = v;
	    }
	})(function (require, exports) {
	    Object.defineProperty(exports, "__esModule", { value: true });
	    exports.TextDocument = exports.EOL = exports.WorkspaceFolder = exports.InlineCompletionContext = exports.SelectedCompletionInfo = exports.InlineCompletionTriggerKind = exports.InlineCompletionList = exports.InlineCompletionItem = exports.StringValue = exports.InlayHint = exports.InlayHintLabelPart = exports.InlayHintKind = exports.InlineValueContext = exports.InlineValueEvaluatableExpression = exports.InlineValueVariableLookup = exports.InlineValueText = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = exports.SelectionRange = exports.DocumentLink = exports.FormattingOptions = exports.CodeLens = exports.CodeAction = exports.CodeActionContext = exports.CodeActionTriggerKind = exports.CodeActionKind = exports.DocumentSymbol = exports.WorkspaceSymbol = exports.SymbolInformation = exports.SymbolTag = exports.SymbolKind = exports.DocumentHighlight = exports.DocumentHighlightKind = exports.SignatureInformation = exports.ParameterInformation = exports.Hover = exports.MarkedString = exports.CompletionList = exports.CompletionItem = exports.CompletionItemLabelDetails = exports.InsertTextMode = exports.InsertReplaceEdit = exports.CompletionItemTag = exports.InsertTextFormat = exports.CompletionItemKind = exports.MarkupContent = exports.MarkupKind = exports.TextDocumentItem = exports.OptionalVersionedTextDocumentIdentifier = exports.VersionedTextDocumentIdentifier = exports.TextDocumentIdentifier = exports.WorkspaceChange = exports.WorkspaceEdit = exports.DeleteFile = exports.RenameFile = exports.CreateFile = exports.TextDocumentEdit = exports.AnnotatedTextEdit = exports.ChangeAnnotationIdentifier = exports.ChangeAnnotation = exports.TextEdit = exports.Command = exports.Diagnostic = exports.CodeDescription = exports.DiagnosticTag = exports.DiagnosticSeverity = exports.DiagnosticRelatedInformation = exports.FoldingRange = exports.FoldingRangeKind = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.LocationLink = exports.Location = exports.Range = exports.Position = exports.uinteger = exports.integer = exports.URI = exports.DocumentUri = void 0;
	    var DocumentUri;
	    (function (DocumentUri) {
	        function is(value) {
	            return typeof value === 'string';
	        }
	        DocumentUri.is = is;
	    })(DocumentUri || (exports.DocumentUri = DocumentUri = {}));
	    var URI;
	    (function (URI) {
	        function is(value) {
	            return typeof value === 'string';
	        }
	        URI.is = is;
	    })(URI || (exports.URI = URI = {}));
	    var integer;
	    (function (integer) {
	        integer.MIN_VALUE = -2147483648;
	        integer.MAX_VALUE = 2147483647;
	        function is(value) {
	            return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;
	        }
	        integer.is = is;
	    })(integer || (exports.integer = integer = {}));
	    var uinteger;
	    (function (uinteger) {
	        uinteger.MIN_VALUE = 0;
	        uinteger.MAX_VALUE = 2147483647;
	        function is(value) {
	            return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;
	        }
	        uinteger.is = is;
	    })(uinteger || (exports.uinteger = uinteger = {}));
	    var Position;
	    (function (Position) {
	        function create(line, character) {
	            if (line === Number.MAX_VALUE) {
	                line = uinteger.MAX_VALUE;
	            }
	            if (character === Number.MAX_VALUE) {
	                character = uinteger.MAX_VALUE;
	            }
	            return { line: line, character: character };
	        }
	        Position.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
	        }
	        Position.is = is;
	    })(Position || (exports.Position = Position = {}));
	    var Range;
	    (function (Range) {
	        function create(one, two, three, four) {
	            if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
	                return { start: Position.create(one, two), end: Position.create(three, four) };
	            }
	            else if (Position.is(one) && Position.is(two)) {
	                return { start: one, end: two };
	            }
	            else {
	                throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]"));
	            }
	        }
	        Range.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
	        }
	        Range.is = is;
	    })(Range || (exports.Range = Range = {}));
	    var Location;
	    (function (Location) {
	        function create(uri, range) {
	            return { uri: uri, range: range };
	        }
	        Location.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
	        }
	        Location.is = is;
	    })(Location || (exports.Location = Location = {}));
	    var LocationLink;
	    (function (LocationLink) {
	        function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
	            return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
	        }
	        LocationLink.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
	                && Range.is(candidate.targetSelectionRange)
	                && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
	        }
	        LocationLink.is = is;
	    })(LocationLink || (exports.LocationLink = LocationLink = {}));
	    var Color;
	    (function (Color) {
	        function create(red, green, blue, alpha) {
	            return {
	                red: red,
	                green: green,
	                blue: blue,
	                alpha: alpha,
	            };
	        }
	        Color.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1)
	                && Is.numberRange(candidate.green, 0, 1)
	                && Is.numberRange(candidate.blue, 0, 1)
	                && Is.numberRange(candidate.alpha, 0, 1);
	        }
	        Color.is = is;
	    })(Color || (exports.Color = Color = {}));
	    var ColorInformation;
	    (function (ColorInformation) {
	        function create(range, color) {
	            return {
	                range: range,
	                color: color,
	            };
	        }
	        ColorInformation.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);
	        }
	        ColorInformation.is = is;
	    })(ColorInformation || (exports.ColorInformation = ColorInformation = {}));
	    var ColorPresentation;
	    (function (ColorPresentation) {
	        function create(label, textEdit, additionalTextEdits) {
	            return {
	                label: label,
	                textEdit: textEdit,
	                additionalTextEdits: additionalTextEdits,
	            };
	        }
	        ColorPresentation.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && Is.string(candidate.label)
	                && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
	                && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
	        }
	        ColorPresentation.is = is;
	    })(ColorPresentation || (exports.ColorPresentation = ColorPresentation = {}));
	    var FoldingRangeKind;
	    (function (FoldingRangeKind) {
	        FoldingRangeKind.Comment = 'comment';
	        FoldingRangeKind.Imports = 'imports';
	        FoldingRangeKind.Region = 'region';
	    })(FoldingRangeKind || (exports.FoldingRangeKind = FoldingRangeKind = {}));
	    var FoldingRange;
	    (function (FoldingRange) {
	        function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {
	            var result = {
	                startLine: startLine,
	                endLine: endLine
	            };
	            if (Is.defined(startCharacter)) {
	                result.startCharacter = startCharacter;
	            }
	            if (Is.defined(endCharacter)) {
	                result.endCharacter = endCharacter;
	            }
	            if (Is.defined(kind)) {
	                result.kind = kind;
	            }
	            if (Is.defined(collapsedText)) {
	                result.collapsedText = collapsedText;
	            }
	            return result;
	        }
	        FoldingRange.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)
	                && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))
	                && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))
	                && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
	        }
	        FoldingRange.is = is;
	    })(FoldingRange || (exports.FoldingRange = FoldingRange = {}));
	    var DiagnosticRelatedInformation;
	    (function (DiagnosticRelatedInformation) {
	        function create(location, message) {
	            return {
	                location: location,
	                message: message
	            };
	        }
	        DiagnosticRelatedInformation.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
	        }
	        DiagnosticRelatedInformation.is = is;
	    })(DiagnosticRelatedInformation || (exports.DiagnosticRelatedInformation = DiagnosticRelatedInformation = {}));
	    var DiagnosticSeverity;
	    (function (DiagnosticSeverity) {
	        DiagnosticSeverity.Error = 1;
	        DiagnosticSeverity.Warning = 2;
	        DiagnosticSeverity.Information = 3;
	        DiagnosticSeverity.Hint = 4;
	    })(DiagnosticSeverity || (exports.DiagnosticSeverity = DiagnosticSeverity = {}));
	    var DiagnosticTag;
	    (function (DiagnosticTag) {
	        DiagnosticTag.Unnecessary = 1;
	        DiagnosticTag.Deprecated = 2;
	    })(DiagnosticTag || (exports.DiagnosticTag = DiagnosticTag = {}));
	    var CodeDescription;
	    (function (CodeDescription) {
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && Is.string(candidate.href);
	        }
	        CodeDescription.is = is;
	    })(CodeDescription || (exports.CodeDescription = CodeDescription = {}));
	    var Diagnostic;
	    (function (Diagnostic) {
	        function create(range, message, severity, code, source, relatedInformation) {
	            var result = { range: range, message: message };
	            if (Is.defined(severity)) {
	                result.severity = severity;
	            }
	            if (Is.defined(code)) {
	                result.code = code;
	            }
	            if (Is.defined(source)) {
	                result.source = source;
	            }
	            if (Is.defined(relatedInformation)) {
	                result.relatedInformation = relatedInformation;
	            }
	            return result;
	        }
	        Diagnostic.create = create;
	        function is(value) {
	            var _a;
	            var candidate = value;
	            return Is.defined(candidate)
	                && Range.is(candidate.range)
	                && Is.string(candidate.message)
	                && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
	                && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
	                && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))
	                && (Is.string(candidate.source) || Is.undefined(candidate.source))
	                && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
	        }
	        Diagnostic.is = is;
	    })(Diagnostic || (exports.Diagnostic = Diagnostic = {}));
	    var Command;
	    (function (Command) {
	        function create(title, command) {
	            var args = [];
	            for (var _i = 2; _i < arguments.length; _i++) {
	                args[_i - 2] = arguments[_i];
	            }
	            var result = { title: title, command: command };
	            if (Is.defined(args) && args.length > 0) {
	                result.arguments = args;
	            }
	            return result;
	        }
	        Command.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
	        }
	        Command.is = is;
	    })(Command || (exports.Command = Command = {}));
	    var TextEdit;
	    (function (TextEdit) {
	        function replace(range, newText) {
	            return { range: range, newText: newText };
	        }
	        TextEdit.replace = replace;
	        function insert(position, newText) {
	            return { range: { start: position, end: position }, newText: newText };
	        }
	        TextEdit.insert = insert;
	        function del(range) {
	            return { range: range, newText: '' };
	        }
	        TextEdit.del = del;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate)
	                && Is.string(candidate.newText)
	                && Range.is(candidate.range);
	        }
	        TextEdit.is = is;
	    })(TextEdit || (exports.TextEdit = TextEdit = {}));
	    var ChangeAnnotation;
	    (function (ChangeAnnotation) {
	        function create(label, needsConfirmation, description) {
	            var result = { label: label };
	            if (needsConfirmation !== undefined) {
	                result.needsConfirmation = needsConfirmation;
	            }
	            if (description !== undefined) {
	                result.description = description;
	            }
	            return result;
	        }
	        ChangeAnnotation.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && Is.string(candidate.label) &&
	                (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&
	                (Is.string(candidate.description) || candidate.description === undefined);
	        }
	        ChangeAnnotation.is = is;
	    })(ChangeAnnotation || (exports.ChangeAnnotation = ChangeAnnotation = {}));
	    var ChangeAnnotationIdentifier;
	    (function (ChangeAnnotationIdentifier) {
	        function is(value) {
	            var candidate = value;
	            return Is.string(candidate);
	        }
	        ChangeAnnotationIdentifier.is = is;
	    })(ChangeAnnotationIdentifier || (exports.ChangeAnnotationIdentifier = ChangeAnnotationIdentifier = {}));
	    var AnnotatedTextEdit;
	    (function (AnnotatedTextEdit) {
	        function replace(range, newText, annotation) {
	            return { range: range, newText: newText, annotationId: annotation };
	        }
	        AnnotatedTextEdit.replace = replace;
	        function insert(position, newText, annotation) {
	            return { range: { start: position, end: position }, newText: newText, annotationId: annotation };
	        }
	        AnnotatedTextEdit.insert = insert;
	        function del(range, annotation) {
	            return { range: range, newText: '', annotationId: annotation };
	        }
	        AnnotatedTextEdit.del = del;
	        function is(value) {
	            var candidate = value;
	            return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
	        }
	        AnnotatedTextEdit.is = is;
	    })(AnnotatedTextEdit || (exports.AnnotatedTextEdit = AnnotatedTextEdit = {}));
	    var TextDocumentEdit;
	    (function (TextDocumentEdit) {
	        function create(textDocument, edits) {
	            return { textDocument: textDocument, edits: edits };
	        }
	        TextDocumentEdit.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate)
	                && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)
	                && Array.isArray(candidate.edits);
	        }
	        TextDocumentEdit.is = is;
	    })(TextDocumentEdit || (exports.TextDocumentEdit = TextDocumentEdit = {}));
	    var CreateFile;
	    (function (CreateFile) {
	        function create(uri, options, annotation) {
	            var result = {
	                kind: 'create',
	                uri: uri
	            };
	            if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
	                result.options = options;
	            }
	            if (annotation !== undefined) {
	                result.annotationId = annotation;
	            }
	            return result;
	        }
	        CreateFile.create = create;
	        function is(value) {
	            var candidate = value;
	            return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||
	                ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
	        }
	        CreateFile.is = is;
	    })(CreateFile || (exports.CreateFile = CreateFile = {}));
	    var RenameFile;
	    (function (RenameFile) {
	        function create(oldUri, newUri, options, annotation) {
	            var result = {
	                kind: 'rename',
	                oldUri: oldUri,
	                newUri: newUri
	            };
	            if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
	                result.options = options;
	            }
	            if (annotation !== undefined) {
	                result.annotationId = annotation;
	            }
	            return result;
	        }
	        RenameFile.create = create;
	        function is(value) {
	            var candidate = value;
	            return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||
	                ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
	        }
	        RenameFile.is = is;
	    })(RenameFile || (exports.RenameFile = RenameFile = {}));
	    var DeleteFile;
	    (function (DeleteFile) {
	        function create(uri, options, annotation) {
	            var result = {
	                kind: 'delete',
	                uri: uri
	            };
	            if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
	                result.options = options;
	            }
	            if (annotation !== undefined) {
	                result.annotationId = annotation;
	            }
	            return result;
	        }
	        DeleteFile.create = create;
	        function is(value) {
	            var candidate = value;
	            return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||
	                ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
	        }
	        DeleteFile.is = is;
	    })(DeleteFile || (exports.DeleteFile = DeleteFile = {}));
	    var WorkspaceEdit;
	    (function (WorkspaceEdit) {
	        function is(value) {
	            var candidate = value;
	            return candidate &&
	                (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
	                (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {
	                    if (Is.string(change.kind)) {
	                        return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
	                    }
	                    else {
	                        return TextDocumentEdit.is(change);
	                    }
	                }));
	        }
	        WorkspaceEdit.is = is;
	    })(WorkspaceEdit || (exports.WorkspaceEdit = WorkspaceEdit = {}));
	    var TextEditChangeImpl =  (function () {
	        function TextEditChangeImpl(edits, changeAnnotations) {
	            this.edits = edits;
	            this.changeAnnotations = changeAnnotations;
	        }
	        TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {
	            var edit;
	            var id;
	            if (annotation === undefined) {
	                edit = TextEdit.insert(position, newText);
	            }
	            else if (ChangeAnnotationIdentifier.is(annotation)) {
	                id = annotation;
	                edit = AnnotatedTextEdit.insert(position, newText, annotation);
	            }
	            else {
	                this.assertChangeAnnotations(this.changeAnnotations);
	                id = this.changeAnnotations.manage(annotation);
	                edit = AnnotatedTextEdit.insert(position, newText, id);
	            }
	            this.edits.push(edit);
	            if (id !== undefined) {
	                return id;
	            }
	        };
	        TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {
	            var edit;
	            var id;
	            if (annotation === undefined) {
	                edit = TextEdit.replace(range, newText);
	            }
	            else if (ChangeAnnotationIdentifier.is(annotation)) {
	                id = annotation;
	                edit = AnnotatedTextEdit.replace(range, newText, annotation);
	            }
	            else {
	                this.assertChangeAnnotations(this.changeAnnotations);
	                id = this.changeAnnotations.manage(annotation);
	                edit = AnnotatedTextEdit.replace(range, newText, id);
	            }
	            this.edits.push(edit);
	            if (id !== undefined) {
	                return id;
	            }
	        };
	        TextEditChangeImpl.prototype.delete = function (range, annotation) {
	            var edit;
	            var id;
	            if (annotation === undefined) {
	                edit = TextEdit.del(range);
	            }
	            else if (ChangeAnnotationIdentifier.is(annotation)) {
	                id = annotation;
	                edit = AnnotatedTextEdit.del(range, annotation);
	            }
	            else {
	                this.assertChangeAnnotations(this.changeAnnotations);
	                id = this.changeAnnotations.manage(annotation);
	                edit = AnnotatedTextEdit.del(range, id);
	            }
	            this.edits.push(edit);
	            if (id !== undefined) {
	                return id;
	            }
	        };
	        TextEditChangeImpl.prototype.add = function (edit) {
	            this.edits.push(edit);
	        };
	        TextEditChangeImpl.prototype.all = function () {
	            return this.edits;
	        };
	        TextEditChangeImpl.prototype.clear = function () {
	            this.edits.splice(0, this.edits.length);
	        };
	        TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {
	            if (value === undefined) {
	                throw new Error("Text edit change is not configured to manage change annotations.");
	            }
	        };
	        return TextEditChangeImpl;
	    }());
	    var ChangeAnnotations =  (function () {
	        function ChangeAnnotations(annotations) {
	            this._annotations = annotations === undefined ? Object.create(null) : annotations;
	            this._counter = 0;
	            this._size = 0;
	        }
	        ChangeAnnotations.prototype.all = function () {
	            return this._annotations;
	        };
	        Object.defineProperty(ChangeAnnotations.prototype, "size", {
	            get: function () {
	                return this._size;
	            },
	            enumerable: false,
	            configurable: true
	        });
	        ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {
	            var id;
	            if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
	                id = idOrAnnotation;
	            }
	            else {
	                id = this.nextId();
	                annotation = idOrAnnotation;
	            }
	            if (this._annotations[id] !== undefined) {
	                throw new Error("Id ".concat(id, " is already in use."));
	            }
	            if (annotation === undefined) {
	                throw new Error("No annotation provided for id ".concat(id));
	            }
	            this._annotations[id] = annotation;
	            this._size++;
	            return id;
	        };
	        ChangeAnnotations.prototype.nextId = function () {
	            this._counter++;
	            return this._counter.toString();
	        };
	        return ChangeAnnotations;
	    }());
	    var WorkspaceChange =  (function () {
	        function WorkspaceChange(workspaceEdit) {
	            var _this = this;
	            this._textEditChanges = Object.create(null);
	            if (workspaceEdit !== undefined) {
	                this._workspaceEdit = workspaceEdit;
	                if (workspaceEdit.documentChanges) {
	                    this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
	                    workspaceEdit.changeAnnotations = this._changeAnnotations.all();
	                    workspaceEdit.documentChanges.forEach(function (change) {
	                        if (TextDocumentEdit.is(change)) {
	                            var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
	                            _this._textEditChanges[change.textDocument.uri] = textEditChange;
	                        }
	                    });
	                }
	                else if (workspaceEdit.changes) {
	                    Object.keys(workspaceEdit.changes).forEach(function (key) {
	                        var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
	                        _this._textEditChanges[key] = textEditChange;
	                    });
	                }
	            }
	            else {
	                this._workspaceEdit = {};
	            }
	        }
	        Object.defineProperty(WorkspaceChange.prototype, "edit", {
	            get: function () {
	                this.initDocumentChanges();
	                if (this._changeAnnotations !== undefined) {
	                    if (this._changeAnnotations.size === 0) {
	                        this._workspaceEdit.changeAnnotations = undefined;
	                    }
	                    else {
	                        this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
	                    }
	                }
	                return this._workspaceEdit;
	            },
	            enumerable: false,
	            configurable: true
	        });
	        WorkspaceChange.prototype.getTextEditChange = function (key) {
	            if (OptionalVersionedTextDocumentIdentifier.is(key)) {
	                this.initDocumentChanges();
	                if (this._workspaceEdit.documentChanges === undefined) {
	                    throw new Error('Workspace edit is not configured for document changes.');
	                }
	                var textDocument = { uri: key.uri, version: key.version };
	                var result = this._textEditChanges[textDocument.uri];
	                if (!result) {
	                    var edits = [];
	                    var textDocumentEdit = {
	                        textDocument: textDocument,
	                        edits: edits
	                    };
	                    this._workspaceEdit.documentChanges.push(textDocumentEdit);
	                    result = new TextEditChangeImpl(edits, this._changeAnnotations);
	                    this._textEditChanges[textDocument.uri] = result;
	                }
	                return result;
	            }
	            else {
	                this.initChanges();
	                if (this._workspaceEdit.changes === undefined) {
	                    throw new Error('Workspace edit is not configured for normal text edit changes.');
	                }
	                var result = this._textEditChanges[key];
	                if (!result) {
	                    var edits = [];
	                    this._workspaceEdit.changes[key] = edits;
	                    result = new TextEditChangeImpl(edits);
	                    this._textEditChanges[key] = result;
	                }
	                return result;
	            }
	        };
	        WorkspaceChange.prototype.initDocumentChanges = function () {
	            if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
	                this._changeAnnotations = new ChangeAnnotations();
	                this._workspaceEdit.documentChanges = [];
	                this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
	            }
	        };
	        WorkspaceChange.prototype.initChanges = function () {
	            if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
	                this._workspaceEdit.changes = Object.create(null);
	            }
	        };
	        WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {
	            this.initDocumentChanges();
	            if (this._workspaceEdit.documentChanges === undefined) {
	                throw new Error('Workspace edit is not configured for document changes.');
	            }
	            var annotation;
	            if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
	                annotation = optionsOrAnnotation;
	            }
	            else {
	                options = optionsOrAnnotation;
	            }
	            var operation;
	            var id;
	            if (annotation === undefined) {
	                operation = CreateFile.create(uri, options);
	            }
	            else {
	                id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
	                operation = CreateFile.create(uri, options, id);
	            }
	            this._workspaceEdit.documentChanges.push(operation);
	            if (id !== undefined) {
	                return id;
	            }
	        };
	        WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {
	            this.initDocumentChanges();
	            if (this._workspaceEdit.documentChanges === undefined) {
	                throw new Error('Workspace edit is not configured for document changes.');
	            }
	            var annotation;
	            if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
	                annotation = optionsOrAnnotation;
	            }
	            else {
	                options = optionsOrAnnotation;
	            }
	            var operation;
	            var id;
	            if (annotation === undefined) {
	                operation = RenameFile.create(oldUri, newUri, options);
	            }
	            else {
	                id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
	                operation = RenameFile.create(oldUri, newUri, options, id);
	            }
	            this._workspaceEdit.documentChanges.push(operation);
	            if (id !== undefined) {
	                return id;
	            }
	        };
	        WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {
	            this.initDocumentChanges();
	            if (this._workspaceEdit.documentChanges === undefined) {
	                throw new Error('Workspace edit is not configured for document changes.');
	            }
	            var annotation;
	            if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
	                annotation = optionsOrAnnotation;
	            }
	            else {
	                options = optionsOrAnnotation;
	            }
	            var operation;
	            var id;
	            if (annotation === undefined) {
	                operation = DeleteFile.create(uri, options);
	            }
	            else {
	                id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
	                operation = DeleteFile.create(uri, options, id);
	            }
	            this._workspaceEdit.documentChanges.push(operation);
	            if (id !== undefined) {
	                return id;
	            }
	        };
	        return WorkspaceChange;
	    }());
	    exports.WorkspaceChange = WorkspaceChange;
	    var TextDocumentIdentifier;
	    (function (TextDocumentIdentifier) {
	        function create(uri) {
	            return { uri: uri };
	        }
	        TextDocumentIdentifier.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate) && Is.string(candidate.uri);
	        }
	        TextDocumentIdentifier.is = is;
	    })(TextDocumentIdentifier || (exports.TextDocumentIdentifier = TextDocumentIdentifier = {}));
	    var VersionedTextDocumentIdentifier;
	    (function (VersionedTextDocumentIdentifier) {
	        function create(uri, version) {
	            return { uri: uri, version: version };
	        }
	        VersionedTextDocumentIdentifier.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
	        }
	        VersionedTextDocumentIdentifier.is = is;
	    })(VersionedTextDocumentIdentifier || (exports.VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier = {}));
	    var OptionalVersionedTextDocumentIdentifier;
	    (function (OptionalVersionedTextDocumentIdentifier) {
	        function create(uri, version) {
	            return { uri: uri, version: version };
	        }
	        OptionalVersionedTextDocumentIdentifier.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
	        }
	        OptionalVersionedTextDocumentIdentifier.is = is;
	    })(OptionalVersionedTextDocumentIdentifier || (exports.OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier = {}));
	    var TextDocumentItem;
	    (function (TextDocumentItem) {
	        function create(uri, languageId, version, text) {
	            return { uri: uri, languageId: languageId, version: version, text: text };
	        }
	        TextDocumentItem.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
	        }
	        TextDocumentItem.is = is;
	    })(TextDocumentItem || (exports.TextDocumentItem = TextDocumentItem = {}));
	    var MarkupKind;
	    (function (MarkupKind) {
	        MarkupKind.PlainText = 'plaintext';
	        MarkupKind.Markdown = 'markdown';
	        function is(value) {
	            var candidate = value;
	            return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
	        }
	        MarkupKind.is = is;
	    })(MarkupKind || (exports.MarkupKind = MarkupKind = {}));
	    var MarkupContent;
	    (function (MarkupContent) {
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
	        }
	        MarkupContent.is = is;
	    })(MarkupContent || (exports.MarkupContent = MarkupContent = {}));
	    var CompletionItemKind;
	    (function (CompletionItemKind) {
	        CompletionItemKind.Text = 1;
	        CompletionItemKind.Method = 2;
	        CompletionItemKind.Function = 3;
	        CompletionItemKind.Constructor = 4;
	        CompletionItemKind.Field = 5;
	        CompletionItemKind.Variable = 6;
	        CompletionItemKind.Class = 7;
	        CompletionItemKind.Interface = 8;
	        CompletionItemKind.Module = 9;
	        CompletionItemKind.Property = 10;
	        CompletionItemKind.Unit = 11;
	        CompletionItemKind.Value = 12;
	        CompletionItemKind.Enum = 13;
	        CompletionItemKind.Keyword = 14;
	        CompletionItemKind.Snippet = 15;
	        CompletionItemKind.Color = 16;
	        CompletionItemKind.File = 17;
	        CompletionItemKind.Reference = 18;
	        CompletionItemKind.Folder = 19;
	        CompletionItemKind.EnumMember = 20;
	        CompletionItemKind.Constant = 21;
	        CompletionItemKind.Struct = 22;
	        CompletionItemKind.Event = 23;
	        CompletionItemKind.Operator = 24;
	        CompletionItemKind.TypeParameter = 25;
	    })(CompletionItemKind || (exports.CompletionItemKind = CompletionItemKind = {}));
	    var InsertTextFormat;
	    (function (InsertTextFormat) {
	        InsertTextFormat.PlainText = 1;
	        InsertTextFormat.Snippet = 2;
	    })(InsertTextFormat || (exports.InsertTextFormat = InsertTextFormat = {}));
	    var CompletionItemTag;
	    (function (CompletionItemTag) {
	        CompletionItemTag.Deprecated = 1;
	    })(CompletionItemTag || (exports.CompletionItemTag = CompletionItemTag = {}));
	    var InsertReplaceEdit;
	    (function (InsertReplaceEdit) {
	        function create(newText, insert, replace) {
	            return { newText: newText, insert: insert, replace: replace };
	        }
	        InsertReplaceEdit.create = create;
	        function is(value) {
	            var candidate = value;
	            return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
	        }
	        InsertReplaceEdit.is = is;
	    })(InsertReplaceEdit || (exports.InsertReplaceEdit = InsertReplaceEdit = {}));
	    var InsertTextMode;
	    (function (InsertTextMode) {
	        InsertTextMode.asIs = 1;
	        InsertTextMode.adjustIndentation = 2;
	    })(InsertTextMode || (exports.InsertTextMode = InsertTextMode = {}));
	    var CompletionItemLabelDetails;
	    (function (CompletionItemLabelDetails) {
	        function is(value) {
	            var candidate = value;
	            return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) &&
	                (Is.string(candidate.description) || candidate.description === undefined);
	        }
	        CompletionItemLabelDetails.is = is;
	    })(CompletionItemLabelDetails || (exports.CompletionItemLabelDetails = CompletionItemLabelDetails = {}));
	    var CompletionItem;
	    (function (CompletionItem) {
	        function create(label) {
	            return { label: label };
	        }
	        CompletionItem.create = create;
	    })(CompletionItem || (exports.CompletionItem = CompletionItem = {}));
	    var CompletionList;
	    (function (CompletionList) {
	        function create(items, isIncomplete) {
	            return { items: items ? items : [], isIncomplete: !!isIncomplete };
	        }
	        CompletionList.create = create;
	    })(CompletionList || (exports.CompletionList = CompletionList = {}));
	    var MarkedString;
	    (function (MarkedString) {
	        function fromPlainText(plainText) {
	            return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&');
	        }
	        MarkedString.fromPlainText = fromPlainText;
	        function is(value) {
	            var candidate = value;
	            return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
	        }
	        MarkedString.is = is;
	    })(MarkedString || (exports.MarkedString = MarkedString = {}));
	    var Hover;
	    (function (Hover) {
	        function is(value) {
	            var candidate = value;
	            return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
	                MarkedString.is(candidate.contents) ||
	                Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
	        }
	        Hover.is = is;
	    })(Hover || (exports.Hover = Hover = {}));
	    var ParameterInformation;
	    (function (ParameterInformation) {
	        function create(label, documentation) {
	            return documentation ? { label: label, documentation: documentation } : { label: label };
	        }
	        ParameterInformation.create = create;
	    })(ParameterInformation || (exports.ParameterInformation = ParameterInformation = {}));
	    var SignatureInformation;
	    (function (SignatureInformation) {
	        function create(label, documentation) {
	            var parameters = [];
	            for (var _i = 2; _i < arguments.length; _i++) {
	                parameters[_i - 2] = arguments[_i];
	            }
	            var result = { label: label };
	            if (Is.defined(documentation)) {
	                result.documentation = documentation;
	            }
	            if (Is.defined(parameters)) {
	                result.parameters = parameters;
	            }
	            else {
	                result.parameters = [];
	            }
	            return result;
	        }
	        SignatureInformation.create = create;
	    })(SignatureInformation || (exports.SignatureInformation = SignatureInformation = {}));
	    var DocumentHighlightKind;
	    (function (DocumentHighlightKind) {
	        DocumentHighlightKind.Text = 1;
	        DocumentHighlightKind.Read = 2;
	        DocumentHighlightKind.Write = 3;
	    })(DocumentHighlightKind || (exports.DocumentHighlightKind = DocumentHighlightKind = {}));
	    var DocumentHighlight;
	    (function (DocumentHighlight) {
	        function create(range, kind) {
	            var result = { range: range };
	            if (Is.number(kind)) {
	                result.kind = kind;
	            }
	            return result;
	        }
	        DocumentHighlight.create = create;
	    })(DocumentHighlight || (exports.DocumentHighlight = DocumentHighlight = {}));
	    var SymbolKind;
	    (function (SymbolKind) {
	        SymbolKind.File = 1;
	        SymbolKind.Module = 2;
	        SymbolKind.Namespace = 3;
	        SymbolKind.Package = 4;
	        SymbolKind.Class = 5;
	        SymbolKind.Method = 6;
	        SymbolKind.Property = 7;
	        SymbolKind.Field = 8;
	        SymbolKind.Constructor = 9;
	        SymbolKind.Enum = 10;
	        SymbolKind.Interface = 11;
	        SymbolKind.Function = 12;
	        SymbolKind.Variable = 13;
	        SymbolKind.Constant = 14;
	        SymbolKind.String = 15;
	        SymbolKind.Number = 16;
	        SymbolKind.Boolean = 17;
	        SymbolKind.Array = 18;
	        SymbolKind.Object = 19;
	        SymbolKind.Key = 20;
	        SymbolKind.Null = 21;
	        SymbolKind.EnumMember = 22;
	        SymbolKind.Struct = 23;
	        SymbolKind.Event = 24;
	        SymbolKind.Operator = 25;
	        SymbolKind.TypeParameter = 26;
	    })(SymbolKind || (exports.SymbolKind = SymbolKind = {}));
	    var SymbolTag;
	    (function (SymbolTag) {
	        SymbolTag.Deprecated = 1;
	    })(SymbolTag || (exports.SymbolTag = SymbolTag = {}));
	    var SymbolInformation;
	    (function (SymbolInformation) {
	        function create(name, kind, range, uri, containerName) {
	            var result = {
	                name: name,
	                kind: kind,
	                location: { uri: uri, range: range }
	            };
	            if (containerName) {
	                result.containerName = containerName;
	            }
	            return result;
	        }
	        SymbolInformation.create = create;
	    })(SymbolInformation || (exports.SymbolInformation = SymbolInformation = {}));
	    var WorkspaceSymbol;
	    (function (WorkspaceSymbol) {
	        function create(name, kind, uri, range) {
	            return range !== undefined
	                ? { name: name, kind: kind, location: { uri: uri, range: range } }
	                : { name: name, kind: kind, location: { uri: uri } };
	        }
	        WorkspaceSymbol.create = create;
	    })(WorkspaceSymbol || (exports.WorkspaceSymbol = WorkspaceSymbol = {}));
	    var DocumentSymbol;
	    (function (DocumentSymbol) {
	        function create(name, detail, kind, range, selectionRange, children) {
	            var result = {
	                name: name,
	                detail: detail,
	                kind: kind,
	                range: range,
	                selectionRange: selectionRange
	            };
	            if (children !== undefined) {
	                result.children = children;
	            }
	            return result;
	        }
	        DocumentSymbol.create = create;
	        function is(value) {
	            var candidate = value;
	            return candidate &&
	                Is.string(candidate.name) && Is.number(candidate.kind) &&
	                Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
	                (candidate.detail === undefined || Is.string(candidate.detail)) &&
	                (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&
	                (candidate.children === undefined || Array.isArray(candidate.children)) &&
	                (candidate.tags === undefined || Array.isArray(candidate.tags));
	        }
	        DocumentSymbol.is = is;
	    })(DocumentSymbol || (exports.DocumentSymbol = DocumentSymbol = {}));
	    var CodeActionKind;
	    (function (CodeActionKind) {
	        CodeActionKind.Empty = '';
	        CodeActionKind.QuickFix = 'quickfix';
	        CodeActionKind.Refactor = 'refactor';
	        CodeActionKind.RefactorExtract = 'refactor.extract';
	        CodeActionKind.RefactorInline = 'refactor.inline';
	        CodeActionKind.RefactorRewrite = 'refactor.rewrite';
	        CodeActionKind.Source = 'source';
	        CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
	        CodeActionKind.SourceFixAll = 'source.fixAll';
	    })(CodeActionKind || (exports.CodeActionKind = CodeActionKind = {}));
	    var CodeActionTriggerKind;
	    (function (CodeActionTriggerKind) {
	        CodeActionTriggerKind.Invoked = 1;
	        CodeActionTriggerKind.Automatic = 2;
	    })(CodeActionTriggerKind || (exports.CodeActionTriggerKind = CodeActionTriggerKind = {}));
	    var CodeActionContext;
	    (function (CodeActionContext) {
	        function create(diagnostics, only, triggerKind) {
	            var result = { diagnostics: diagnostics };
	            if (only !== undefined && only !== null) {
	                result.only = only;
	            }
	            if (triggerKind !== undefined && triggerKind !== null) {
	                result.triggerKind = triggerKind;
	            }
	            return result;
	        }
	        CodeActionContext.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is)
	                && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string))
	                && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);
	        }
	        CodeActionContext.is = is;
	    })(CodeActionContext || (exports.CodeActionContext = CodeActionContext = {}));
	    var CodeAction;
	    (function (CodeAction) {
	        function create(title, kindOrCommandOrEdit, kind) {
	            var result = { title: title };
	            var checkKind = true;
	            if (typeof kindOrCommandOrEdit === 'string') {
	                checkKind = false;
	                result.kind = kindOrCommandOrEdit;
	            }
	            else if (Command.is(kindOrCommandOrEdit)) {
	                result.command = kindOrCommandOrEdit;
	            }
	            else {
	                result.edit = kindOrCommandOrEdit;
	            }
	            if (checkKind && kind !== undefined) {
	                result.kind = kind;
	            }
	            return result;
	        }
	        CodeAction.create = create;
	        function is(value) {
	            var candidate = value;
	            return candidate && Is.string(candidate.title) &&
	                (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
	                (candidate.kind === undefined || Is.string(candidate.kind)) &&
	                (candidate.edit !== undefined || candidate.command !== undefined) &&
	                (candidate.command === undefined || Command.is(candidate.command)) &&
	                (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&
	                (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
	        }
	        CodeAction.is = is;
	    })(CodeAction || (exports.CodeAction = CodeAction = {}));
	    var CodeLens;
	    (function (CodeLens) {
	        function create(range, data) {
	            var result = { range: range };
	            if (Is.defined(data)) {
	                result.data = data;
	            }
	            return result;
	        }
	        CodeLens.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
	        }
	        CodeLens.is = is;
	    })(CodeLens || (exports.CodeLens = CodeLens = {}));
	    var FormattingOptions;
	    (function (FormattingOptions) {
	        function create(tabSize, insertSpaces) {
	            return { tabSize: tabSize, insertSpaces: insertSpaces };
	        }
	        FormattingOptions.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
	        }
	        FormattingOptions.is = is;
	    })(FormattingOptions || (exports.FormattingOptions = FormattingOptions = {}));
	    var DocumentLink;
	    (function (DocumentLink) {
	        function create(range, target, data) {
	            return { range: range, target: target, data: data };
	        }
	        DocumentLink.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
	        }
	        DocumentLink.is = is;
	    })(DocumentLink || (exports.DocumentLink = DocumentLink = {}));
	    var SelectionRange;
	    (function (SelectionRange) {
	        function create(range, parent) {
	            return { range: range, parent: parent };
	        }
	        SelectionRange.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
	        }
	        SelectionRange.is = is;
	    })(SelectionRange || (exports.SelectionRange = SelectionRange = {}));
	    var SemanticTokenTypes;
	    (function (SemanticTokenTypes) {
	        SemanticTokenTypes["namespace"] = "namespace";
	        SemanticTokenTypes["type"] = "type";
	        SemanticTokenTypes["class"] = "class";
	        SemanticTokenTypes["enum"] = "enum";
	        SemanticTokenTypes["interface"] = "interface";
	        SemanticTokenTypes["struct"] = "struct";
	        SemanticTokenTypes["typeParameter"] = "typeParameter";
	        SemanticTokenTypes["parameter"] = "parameter";
	        SemanticTokenTypes["variable"] = "variable";
	        SemanticTokenTypes["property"] = "property";
	        SemanticTokenTypes["enumMember"] = "enumMember";
	        SemanticTokenTypes["event"] = "event";
	        SemanticTokenTypes["function"] = "function";
	        SemanticTokenTypes["method"] = "method";
	        SemanticTokenTypes["macro"] = "macro";
	        SemanticTokenTypes["keyword"] = "keyword";
	        SemanticTokenTypes["modifier"] = "modifier";
	        SemanticTokenTypes["comment"] = "comment";
	        SemanticTokenTypes["string"] = "string";
	        SemanticTokenTypes["number"] = "number";
	        SemanticTokenTypes["regexp"] = "regexp";
	        SemanticTokenTypes["operator"] = "operator";
	        SemanticTokenTypes["decorator"] = "decorator";
	    })(SemanticTokenTypes || (exports.SemanticTokenTypes = SemanticTokenTypes = {}));
	    var SemanticTokenModifiers;
	    (function (SemanticTokenModifiers) {
	        SemanticTokenModifiers["declaration"] = "declaration";
	        SemanticTokenModifiers["definition"] = "definition";
	        SemanticTokenModifiers["readonly"] = "readonly";
	        SemanticTokenModifiers["static"] = "static";
	        SemanticTokenModifiers["deprecated"] = "deprecated";
	        SemanticTokenModifiers["abstract"] = "abstract";
	        SemanticTokenModifiers["async"] = "async";
	        SemanticTokenModifiers["modification"] = "modification";
	        SemanticTokenModifiers["documentation"] = "documentation";
	        SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
	    })(SemanticTokenModifiers || (exports.SemanticTokenModifiers = SemanticTokenModifiers = {}));
	    var SemanticTokens;
	    (function (SemanticTokens) {
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
	                Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
	        }
	        SemanticTokens.is = is;
	    })(SemanticTokens || (exports.SemanticTokens = SemanticTokens = {}));
	    var InlineValueText;
	    (function (InlineValueText) {
	        function create(range, text) {
	            return { range: range, text: text };
	        }
	        InlineValueText.create = create;
	        function is(value) {
	            var candidate = value;
	            return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);
	        }
	        InlineValueText.is = is;
	    })(InlineValueText || (exports.InlineValueText = InlineValueText = {}));
	    var InlineValueVariableLookup;
	    (function (InlineValueVariableLookup) {
	        function create(range, variableName, caseSensitiveLookup) {
	            return { range: range, variableName: variableName, caseSensitiveLookup: caseSensitiveLookup };
	        }
	        InlineValueVariableLookup.create = create;
	        function is(value) {
	            var candidate = value;
	            return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup)
	                && (Is.string(candidate.variableName) || candidate.variableName === undefined);
	        }
	        InlineValueVariableLookup.is = is;
	    })(InlineValueVariableLookup || (exports.InlineValueVariableLookup = InlineValueVariableLookup = {}));
	    var InlineValueEvaluatableExpression;
	    (function (InlineValueEvaluatableExpression) {
	        function create(range, expression) {
	            return { range: range, expression: expression };
	        }
	        InlineValueEvaluatableExpression.create = create;
	        function is(value) {
	            var candidate = value;
	            return candidate !== undefined && candidate !== null && Range.is(candidate.range)
	                && (Is.string(candidate.expression) || candidate.expression === undefined);
	        }
	        InlineValueEvaluatableExpression.is = is;
	    })(InlineValueEvaluatableExpression || (exports.InlineValueEvaluatableExpression = InlineValueEvaluatableExpression = {}));
	    var InlineValueContext;
	    (function (InlineValueContext) {
	        function create(frameId, stoppedLocation) {
	            return { frameId: frameId, stoppedLocation: stoppedLocation };
	        }
	        InlineValueContext.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate) && Range.is(value.stoppedLocation);
	        }
	        InlineValueContext.is = is;
	    })(InlineValueContext || (exports.InlineValueContext = InlineValueContext = {}));
	    var InlayHintKind;
	    (function (InlayHintKind) {
	        InlayHintKind.Type = 1;
	        InlayHintKind.Parameter = 2;
	        function is(value) {
	            return value === 1 || value === 2;
	        }
	        InlayHintKind.is = is;
	    })(InlayHintKind || (exports.InlayHintKind = InlayHintKind = {}));
	    var InlayHintLabelPart;
	    (function (InlayHintLabelPart) {
	        function create(value) {
	            return { value: value };
	        }
	        InlayHintLabelPart.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate)
	                && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
	                && (candidate.location === undefined || Location.is(candidate.location))
	                && (candidate.command === undefined || Command.is(candidate.command));
	        }
	        InlayHintLabelPart.is = is;
	    })(InlayHintLabelPart || (exports.InlayHintLabelPart = InlayHintLabelPart = {}));
	    var InlayHint;
	    (function (InlayHint) {
	        function create(position, label, kind) {
	            var result = { position: position, label: label };
	            if (kind !== undefined) {
	                result.kind = kind;
	            }
	            return result;
	        }
	        InlayHint.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && Position.is(candidate.position)
	                && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is))
	                && (candidate.kind === undefined || InlayHintKind.is(candidate.kind))
	                && (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is)
	                && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
	                && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft))
	                && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight));
	        }
	        InlayHint.is = is;
	    })(InlayHint || (exports.InlayHint = InlayHint = {}));
	    var StringValue;
	    (function (StringValue) {
	        function createSnippet(value) {
	            return { kind: 'snippet', value: value };
	        }
	        StringValue.createSnippet = createSnippet;
	    })(StringValue || (exports.StringValue = StringValue = {}));
	    var InlineCompletionItem;
	    (function (InlineCompletionItem) {
	        function create(insertText, filterText, range, command) {
	            return { insertText: insertText, filterText: filterText, range: range, command: command };
	        }
	        InlineCompletionItem.create = create;
	    })(InlineCompletionItem || (exports.InlineCompletionItem = InlineCompletionItem = {}));
	    var InlineCompletionList;
	    (function (InlineCompletionList) {
	        function create(items) {
	            return { items: items };
	        }
	        InlineCompletionList.create = create;
	    })(InlineCompletionList || (exports.InlineCompletionList = InlineCompletionList = {}));
	    var InlineCompletionTriggerKind;
	    (function (InlineCompletionTriggerKind) {
	        InlineCompletionTriggerKind.Invoked = 0;
	        InlineCompletionTriggerKind.Automatic = 1;
	    })(InlineCompletionTriggerKind || (exports.InlineCompletionTriggerKind = InlineCompletionTriggerKind = {}));
	    var SelectedCompletionInfo;
	    (function (SelectedCompletionInfo) {
	        function create(range, text) {
	            return { range: range, text: text };
	        }
	        SelectedCompletionInfo.create = create;
	    })(SelectedCompletionInfo || (exports.SelectedCompletionInfo = SelectedCompletionInfo = {}));
	    var InlineCompletionContext;
	    (function (InlineCompletionContext) {
	        function create(triggerKind, selectedCompletionInfo) {
	            return { triggerKind: triggerKind, selectedCompletionInfo: selectedCompletionInfo };
	        }
	        InlineCompletionContext.create = create;
	    })(InlineCompletionContext || (exports.InlineCompletionContext = InlineCompletionContext = {}));
	    var WorkspaceFolder;
	    (function (WorkspaceFolder) {
	        function is(value) {
	            var candidate = value;
	            return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);
	        }
	        WorkspaceFolder.is = is;
	    })(WorkspaceFolder || (exports.WorkspaceFolder = WorkspaceFolder = {}));
	    exports.EOL = ['\n', '\r\n', '\r'];
	    var TextDocument;
	    (function (TextDocument) {
	        function create(uri, languageId, version, content) {
	            return new FullTextDocument(uri, languageId, version, content);
	        }
	        TextDocument.create = create;
	        function is(value) {
	            var candidate = value;
	            return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)
	                && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
	        }
	        TextDocument.is = is;
	        function applyEdits(document, edits) {
	            var text = document.getText();
	            var sortedEdits = mergeSort(edits, function (a, b) {
	                var diff = a.range.start.line - b.range.start.line;
	                if (diff === 0) {
	                    return a.range.start.character - b.range.start.character;
	                }
	                return diff;
	            });
	            var lastModifiedOffset = text.length;
	            for (var i = sortedEdits.length - 1; i >= 0; i--) {
	                var e = sortedEdits[i];
	                var startOffset = document.offsetAt(e.range.start);
	                var endOffset = document.offsetAt(e.range.end);
	                if (endOffset <= lastModifiedOffset) {
	                    text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
	                }
	                else {
	                    throw new Error('Overlapping edit');
	                }
	                lastModifiedOffset = startOffset;
	            }
	            return text;
	        }
	        TextDocument.applyEdits = applyEdits;
	        function mergeSort(data, compare) {
	            if (data.length <= 1) {
	                return data;
	            }
	            var p = (data.length / 2) | 0;
	            var left = data.slice(0, p);
	            var right = data.slice(p);
	            mergeSort(left, compare);
	            mergeSort(right, compare);
	            var leftIdx = 0;
	            var rightIdx = 0;
	            var i = 0;
	            while (leftIdx < left.length && rightIdx < right.length) {
	                var ret = compare(left[leftIdx], right[rightIdx]);
	                if (ret <= 0) {
	                    data[i++] = left[leftIdx++];
	                }
	                else {
	                    data[i++] = right[rightIdx++];
	                }
	            }
	            while (leftIdx < left.length) {
	                data[i++] = left[leftIdx++];
	            }
	            while (rightIdx < right.length) {
	                data[i++] = right[rightIdx++];
	            }
	            return data;
	        }
	    })(TextDocument || (exports.TextDocument = TextDocument = {}));
	    var FullTextDocument =  (function () {
	        function FullTextDocument(uri, languageId, version, content) {
	            this._uri = uri;
	            this._languageId = languageId;
	            this._version = version;
	            this._content = content;
	            this._lineOffsets = undefined;
	        }
	        Object.defineProperty(FullTextDocument.prototype, "uri", {
	            get: function () {
	                return this._uri;
	            },
	            enumerable: false,
	            configurable: true
	        });
	        Object.defineProperty(FullTextDocument.prototype, "languageId", {
	            get: function () {
	                return this._languageId;
	            },
	            enumerable: false,
	            configurable: true
	        });
	        Object.defineProperty(FullTextDocument.prototype, "version", {
	            get: function () {
	                return this._version;
	            },
	            enumerable: false,
	            configurable: true
	        });
	        FullTextDocument.prototype.getText = function (range) {
	            if (range) {
	                var start = this.offsetAt(range.start);
	                var end = this.offsetAt(range.end);
	                return this._content.substring(start, end);
	            }
	            return this._content;
	        };
	        FullTextDocument.prototype.update = function (event, version) {
	            this._content = event.text;
	            this._version = version;
	            this._lineOffsets = undefined;
	        };
	        FullTextDocument.prototype.getLineOffsets = function () {
	            if (this._lineOffsets === undefined) {
	                var lineOffsets = [];
	                var text = this._content;
	                var isLineStart = true;
	                for (var i = 0; i < text.length; i++) {
	                    if (isLineStart) {
	                        lineOffsets.push(i);
	                        isLineStart = false;
	                    }
	                    var ch = text.charAt(i);
	                    isLineStart = (ch === '\r' || ch === '\n');
	                    if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
	                        i++;
	                    }
	                }
	                if (isLineStart && text.length > 0) {
	                    lineOffsets.push(text.length);
	                }
	                this._lineOffsets = lineOffsets;
	            }
	            return this._lineOffsets;
	        };
	        FullTextDocument.prototype.positionAt = function (offset) {
	            offset = Math.max(Math.min(offset, this._content.length), 0);
	            var lineOffsets = this.getLineOffsets();
	            var low = 0, high = lineOffsets.length;
	            if (high === 0) {
	                return Position.create(0, offset);
	            }
	            while (low < high) {
	                var mid = Math.floor((low + high) / 2);
	                if (lineOffsets[mid] > offset) {
	                    high = mid;
	                }
	                else {
	                    low = mid + 1;
	                }
	            }
	            var line = low - 1;
	            return Position.create(line, offset - lineOffsets[line]);
	        };
	        FullTextDocument.prototype.offsetAt = function (position) {
	            var lineOffsets = this.getLineOffsets();
	            if (position.line >= lineOffsets.length) {
	                return this._content.length;
	            }
	            else if (position.line < 0) {
	                return 0;
	            }
	            var lineOffset = lineOffsets[position.line];
	            var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
	            return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
	        };
	        Object.defineProperty(FullTextDocument.prototype, "lineCount", {
	            get: function () {
	                return this.getLineOffsets().length;
	            },
	            enumerable: false,
	            configurable: true
	        });
	        return FullTextDocument;
	    }());
	    var Is;
	    (function (Is) {
	        var toString = Object.prototype.toString;
	        function defined(value) {
	            return typeof value !== 'undefined';
	        }
	        Is.defined = defined;
	        function undefined$1(value) {
	            return typeof value === 'undefined';
	        }
	        Is.undefined = undefined$1;
	        function boolean(value) {
	            return value === true || value === false;
	        }
	        Is.boolean = boolean;
	        function string(value) {
	            return toString.call(value) === '[object String]';
	        }
	        Is.string = string;
	        function number(value) {
	            return toString.call(value) === '[object Number]';
	        }
	        Is.number = number;
	        function numberRange(value, min, max) {
	            return toString.call(value) === '[object Number]' && min <= value && value <= max;
	        }
	        Is.numberRange = numberRange;
	        function integer(value) {
	            return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;
	        }
	        Is.integer = integer;
	        function uinteger(value) {
	            return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;
	        }
	        Is.uinteger = uinteger;
	        function func(value) {
	            return toString.call(value) === '[object Function]';
	        }
	        Is.func = func;
	        function objectLiteral(value) {
	            return value !== null && typeof value === 'object';
	        }
	        Is.objectLiteral = objectLiteral;
	        function typedArray(value, check) {
	            return Array.isArray(value) && value.every(check);
	        }
	        Is.typedArray = typedArray;
	    })(Is || (Is = {}));
	});
} (main$5, main$5.exports));
var mainExports = main$5.exports;
getDefaultExportFromCjs(mainExports);

var messages$2 = {};

Object.defineProperty(messages$2, "__esModule", { value: true });
messages$2.ProtocolNotificationType = messages$2.ProtocolNotificationType0 = messages$2.ProtocolRequestType = messages$2.ProtocolRequestType0 = messages$2.RegistrationType = messages$2.MessageDirection = void 0;
const vscode_jsonrpc_1$4 = main$6;
var MessageDirection;
(function (MessageDirection) {
    MessageDirection["clientToServer"] = "clientToServer";
    MessageDirection["serverToClient"] = "serverToClient";
    MessageDirection["both"] = "both";
})(MessageDirection || (messages$2.MessageDirection = MessageDirection = {}));
class RegistrationType {
    constructor(method) {
        this.method = method;
    }
}
messages$2.RegistrationType = RegistrationType;
class ProtocolRequestType0 extends vscode_jsonrpc_1$4.RequestType0 {
    constructor(method) {
        super(method);
    }
}
messages$2.ProtocolRequestType0 = ProtocolRequestType0;
class ProtocolRequestType extends vscode_jsonrpc_1$4.RequestType {
    constructor(method) {
        super(method, vscode_jsonrpc_1$4.ParameterStructures.byName);
    }
}
messages$2.ProtocolRequestType = ProtocolRequestType;
class ProtocolNotificationType0 extends vscode_jsonrpc_1$4.NotificationType0 {
    constructor(method) {
        super(method);
    }
}
messages$2.ProtocolNotificationType0 = ProtocolNotificationType0;
class ProtocolNotificationType extends vscode_jsonrpc_1$4.NotificationType {
    constructor(method) {
        super(method, vscode_jsonrpc_1$4.ParameterStructures.byName);
    }
}
messages$2.ProtocolNotificationType = ProtocolNotificationType;

var protocol$1 = {};

var is$2 = {};

Object.defineProperty(is$2, "__esModule", { value: true });
is$2.objectLiteral = is$2.typedArray = is$2.stringArray = is$2.array = is$2.func = is$2.error = is$2.number = is$2.string = is$2.boolean = void 0;
function boolean$1(value) {
    return value === true || value === false;
}
is$2.boolean = boolean$1;
function string$1(value) {
    return typeof value === 'string' || value instanceof String;
}
is$2.string = string$1;
function number$1(value) {
    return typeof value === 'number' || value instanceof Number;
}
is$2.number = number$1;
function error$3(value) {
    return value instanceof Error;
}
is$2.error = error$3;
function func$1(value) {
    return typeof value === 'function';
}
is$2.func = func$1;
function array$1(value) {
    return Array.isArray(value);
}
is$2.array = array$1;
function stringArray$1(value) {
    return array$1(value) && value.every(elem => string$1(elem));
}
is$2.stringArray = stringArray$1;
function typedArray$1(value, check) {
    return Array.isArray(value) && value.every(check);
}
is$2.typedArray = typedArray$1;
function objectLiteral$1(value) {
    return value !== null && typeof value === 'object';
}
is$2.objectLiteral = objectLiteral$1;

var protocol_implementation$1 = {};

Object.defineProperty(protocol_implementation$1, "__esModule", { value: true });
protocol_implementation$1.ImplementationRequest = void 0;
const messages_1$k = messages$2;
var ImplementationRequest;
(function (ImplementationRequest) {
    ImplementationRequest.method = 'textDocument/implementation';
    ImplementationRequest.messageDirection = messages_1$k.MessageDirection.clientToServer;
    ImplementationRequest.type = new messages_1$k.ProtocolRequestType(ImplementationRequest.method);
})(ImplementationRequest || (protocol_implementation$1.ImplementationRequest = ImplementationRequest = {}));

var protocol_typeDefinition$1 = {};

Object.defineProperty(protocol_typeDefinition$1, "__esModule", { value: true });
protocol_typeDefinition$1.TypeDefinitionRequest = void 0;
const messages_1$j = messages$2;
var TypeDefinitionRequest;
(function (TypeDefinitionRequest) {
    TypeDefinitionRequest.method = 'textDocument/typeDefinition';
    TypeDefinitionRequest.messageDirection = messages_1$j.MessageDirection.clientToServer;
    TypeDefinitionRequest.type = new messages_1$j.ProtocolRequestType(TypeDefinitionRequest.method);
})(TypeDefinitionRequest || (protocol_typeDefinition$1.TypeDefinitionRequest = TypeDefinitionRequest = {}));

var protocol_workspaceFolder$1 = {};

Object.defineProperty(protocol_workspaceFolder$1, "__esModule", { value: true });
protocol_workspaceFolder$1.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolder$1.WorkspaceFoldersRequest = void 0;
const messages_1$i = messages$2;
var WorkspaceFoldersRequest;
(function (WorkspaceFoldersRequest) {
    WorkspaceFoldersRequest.method = 'workspace/workspaceFolders';
    WorkspaceFoldersRequest.messageDirection = messages_1$i.MessageDirection.serverToClient;
    WorkspaceFoldersRequest.type = new messages_1$i.ProtocolRequestType0(WorkspaceFoldersRequest.method);
})(WorkspaceFoldersRequest || (protocol_workspaceFolder$1.WorkspaceFoldersRequest = WorkspaceFoldersRequest = {}));
var DidChangeWorkspaceFoldersNotification;
(function (DidChangeWorkspaceFoldersNotification) {
    DidChangeWorkspaceFoldersNotification.method = 'workspace/didChangeWorkspaceFolders';
    DidChangeWorkspaceFoldersNotification.messageDirection = messages_1$i.MessageDirection.clientToServer;
    DidChangeWorkspaceFoldersNotification.type = new messages_1$i.ProtocolNotificationType(DidChangeWorkspaceFoldersNotification.method);
})(DidChangeWorkspaceFoldersNotification || (protocol_workspaceFolder$1.DidChangeWorkspaceFoldersNotification = DidChangeWorkspaceFoldersNotification = {}));

var protocol_configuration$1 = {};

Object.defineProperty(protocol_configuration$1, "__esModule", { value: true });
protocol_configuration$1.ConfigurationRequest = void 0;
const messages_1$h = messages$2;
var ConfigurationRequest;
(function (ConfigurationRequest) {
    ConfigurationRequest.method = 'workspace/configuration';
    ConfigurationRequest.messageDirection = messages_1$h.MessageDirection.serverToClient;
    ConfigurationRequest.type = new messages_1$h.ProtocolRequestType(ConfigurationRequest.method);
})(ConfigurationRequest || (protocol_configuration$1.ConfigurationRequest = ConfigurationRequest = {}));

var protocol_colorProvider$1 = {};

Object.defineProperty(protocol_colorProvider$1, "__esModule", { value: true });
protocol_colorProvider$1.ColorPresentationRequest = protocol_colorProvider$1.DocumentColorRequest = void 0;
const messages_1$g = messages$2;
var DocumentColorRequest;
(function (DocumentColorRequest) {
    DocumentColorRequest.method = 'textDocument/documentColor';
    DocumentColorRequest.messageDirection = messages_1$g.MessageDirection.clientToServer;
    DocumentColorRequest.type = new messages_1$g.ProtocolRequestType(DocumentColorRequest.method);
})(DocumentColorRequest || (protocol_colorProvider$1.DocumentColorRequest = DocumentColorRequest = {}));
var ColorPresentationRequest;
(function (ColorPresentationRequest) {
    ColorPresentationRequest.method = 'textDocument/colorPresentation';
    ColorPresentationRequest.messageDirection = messages_1$g.MessageDirection.clientToServer;
    ColorPresentationRequest.type = new messages_1$g.ProtocolRequestType(ColorPresentationRequest.method);
})(ColorPresentationRequest || (protocol_colorProvider$1.ColorPresentationRequest = ColorPresentationRequest = {}));

var protocol_foldingRange$1 = {};

Object.defineProperty(protocol_foldingRange$1, "__esModule", { value: true });
protocol_foldingRange$1.FoldingRangeRefreshRequest = protocol_foldingRange$1.FoldingRangeRequest = void 0;
const messages_1$f = messages$2;
var FoldingRangeRequest;
(function (FoldingRangeRequest) {
    FoldingRangeRequest.method = 'textDocument/foldingRange';
    FoldingRangeRequest.messageDirection = messages_1$f.MessageDirection.clientToServer;
    FoldingRangeRequest.type = new messages_1$f.ProtocolRequestType(FoldingRangeRequest.method);
})(FoldingRangeRequest || (protocol_foldingRange$1.FoldingRangeRequest = FoldingRangeRequest = {}));
var FoldingRangeRefreshRequest;
(function (FoldingRangeRefreshRequest) {
    FoldingRangeRefreshRequest.method = `workspace/foldingRange/refresh`;
    FoldingRangeRefreshRequest.messageDirection = messages_1$f.MessageDirection.serverToClient;
    FoldingRangeRefreshRequest.type = new messages_1$f.ProtocolRequestType0(FoldingRangeRefreshRequest.method);
})(FoldingRangeRefreshRequest || (protocol_foldingRange$1.FoldingRangeRefreshRequest = FoldingRangeRefreshRequest = {}));

var protocol_declaration$1 = {};

Object.defineProperty(protocol_declaration$1, "__esModule", { value: true });
protocol_declaration$1.DeclarationRequest = void 0;
const messages_1$e = messages$2;
var DeclarationRequest;
(function (DeclarationRequest) {
    DeclarationRequest.method = 'textDocument/declaration';
    DeclarationRequest.messageDirection = messages_1$e.MessageDirection.clientToServer;
    DeclarationRequest.type = new messages_1$e.ProtocolRequestType(DeclarationRequest.method);
})(DeclarationRequest || (protocol_declaration$1.DeclarationRequest = DeclarationRequest = {}));

var protocol_selectionRange$1 = {};

Object.defineProperty(protocol_selectionRange$1, "__esModule", { value: true });
protocol_selectionRange$1.SelectionRangeRequest = void 0;
const messages_1$d = messages$2;
var SelectionRangeRequest;
(function (SelectionRangeRequest) {
    SelectionRangeRequest.method = 'textDocument/selectionRange';
    SelectionRangeRequest.messageDirection = messages_1$d.MessageDirection.clientToServer;
    SelectionRangeRequest.type = new messages_1$d.ProtocolRequestType(SelectionRangeRequest.method);
})(SelectionRangeRequest || (protocol_selectionRange$1.SelectionRangeRequest = SelectionRangeRequest = {}));

var protocol_progress$1 = {};

Object.defineProperty(protocol_progress$1, "__esModule", { value: true });
protocol_progress$1.WorkDoneProgressCancelNotification = protocol_progress$1.WorkDoneProgressCreateRequest = protocol_progress$1.WorkDoneProgress = void 0;
const vscode_jsonrpc_1$3 = main$6;
const messages_1$c = messages$2;
var WorkDoneProgress;
(function (WorkDoneProgress) {
    WorkDoneProgress.type = new vscode_jsonrpc_1$3.ProgressType();
    function is(value) {
        return value === WorkDoneProgress.type;
    }
    WorkDoneProgress.is = is;
})(WorkDoneProgress || (protocol_progress$1.WorkDoneProgress = WorkDoneProgress = {}));
var WorkDoneProgressCreateRequest;
(function (WorkDoneProgressCreateRequest) {
    WorkDoneProgressCreateRequest.method = 'window/workDoneProgress/create';
    WorkDoneProgressCreateRequest.messageDirection = messages_1$c.MessageDirection.serverToClient;
    WorkDoneProgressCreateRequest.type = new messages_1$c.ProtocolRequestType(WorkDoneProgressCreateRequest.method);
})(WorkDoneProgressCreateRequest || (protocol_progress$1.WorkDoneProgressCreateRequest = WorkDoneProgressCreateRequest = {}));
var WorkDoneProgressCancelNotification;
(function (WorkDoneProgressCancelNotification) {
    WorkDoneProgressCancelNotification.method = 'window/workDoneProgress/cancel';
    WorkDoneProgressCancelNotification.messageDirection = messages_1$c.MessageDirection.clientToServer;
    WorkDoneProgressCancelNotification.type = new messages_1$c.ProtocolNotificationType(WorkDoneProgressCancelNotification.method);
})(WorkDoneProgressCancelNotification || (protocol_progress$1.WorkDoneProgressCancelNotification = WorkDoneProgressCancelNotification = {}));

var protocol_callHierarchy$1 = {};

Object.defineProperty(protocol_callHierarchy$1, "__esModule", { value: true });
protocol_callHierarchy$1.CallHierarchyOutgoingCallsRequest = protocol_callHierarchy$1.CallHierarchyIncomingCallsRequest = protocol_callHierarchy$1.CallHierarchyPrepareRequest = void 0;
const messages_1$b = messages$2;
var CallHierarchyPrepareRequest;
(function (CallHierarchyPrepareRequest) {
    CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
    CallHierarchyPrepareRequest.messageDirection = messages_1$b.MessageDirection.clientToServer;
    CallHierarchyPrepareRequest.type = new messages_1$b.ProtocolRequestType(CallHierarchyPrepareRequest.method);
})(CallHierarchyPrepareRequest || (protocol_callHierarchy$1.CallHierarchyPrepareRequest = CallHierarchyPrepareRequest = {}));
var CallHierarchyIncomingCallsRequest;
(function (CallHierarchyIncomingCallsRequest) {
    CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
    CallHierarchyIncomingCallsRequest.messageDirection = messages_1$b.MessageDirection.clientToServer;
    CallHierarchyIncomingCallsRequest.type = new messages_1$b.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
})(CallHierarchyIncomingCallsRequest || (protocol_callHierarchy$1.CallHierarchyIncomingCallsRequest = CallHierarchyIncomingCallsRequest = {}));
var CallHierarchyOutgoingCallsRequest;
(function (CallHierarchyOutgoingCallsRequest) {
    CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
    CallHierarchyOutgoingCallsRequest.messageDirection = messages_1$b.MessageDirection.clientToServer;
    CallHierarchyOutgoingCallsRequest.type = new messages_1$b.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
})(CallHierarchyOutgoingCallsRequest || (protocol_callHierarchy$1.CallHierarchyOutgoingCallsRequest = CallHierarchyOutgoingCallsRequest = {}));

var protocol_semanticTokens$1 = {};

Object.defineProperty(protocol_semanticTokens$1, "__esModule", { value: true });
protocol_semanticTokens$1.SemanticTokensRefreshRequest = protocol_semanticTokens$1.SemanticTokensRangeRequest = protocol_semanticTokens$1.SemanticTokensDeltaRequest = protocol_semanticTokens$1.SemanticTokensRequest = protocol_semanticTokens$1.SemanticTokensRegistrationType = protocol_semanticTokens$1.TokenFormat = void 0;
const messages_1$a = messages$2;
var TokenFormat;
(function (TokenFormat) {
    TokenFormat.Relative = 'relative';
})(TokenFormat || (protocol_semanticTokens$1.TokenFormat = TokenFormat = {}));
var SemanticTokensRegistrationType;
(function (SemanticTokensRegistrationType) {
    SemanticTokensRegistrationType.method = 'textDocument/semanticTokens';
    SemanticTokensRegistrationType.type = new messages_1$a.RegistrationType(SemanticTokensRegistrationType.method);
})(SemanticTokensRegistrationType || (protocol_semanticTokens$1.SemanticTokensRegistrationType = SemanticTokensRegistrationType = {}));
var SemanticTokensRequest;
(function (SemanticTokensRequest) {
    SemanticTokensRequest.method = 'textDocument/semanticTokens/full';
    SemanticTokensRequest.messageDirection = messages_1$a.MessageDirection.clientToServer;
    SemanticTokensRequest.type = new messages_1$a.ProtocolRequestType(SemanticTokensRequest.method);
    SemanticTokensRequest.registrationMethod = SemanticTokensRegistrationType.method;
})(SemanticTokensRequest || (protocol_semanticTokens$1.SemanticTokensRequest = SemanticTokensRequest = {}));
var SemanticTokensDeltaRequest;
(function (SemanticTokensDeltaRequest) {
    SemanticTokensDeltaRequest.method = 'textDocument/semanticTokens/full/delta';
    SemanticTokensDeltaRequest.messageDirection = messages_1$a.MessageDirection.clientToServer;
    SemanticTokensDeltaRequest.type = new messages_1$a.ProtocolRequestType(SemanticTokensDeltaRequest.method);
    SemanticTokensDeltaRequest.registrationMethod = SemanticTokensRegistrationType.method;
})(SemanticTokensDeltaRequest || (protocol_semanticTokens$1.SemanticTokensDeltaRequest = SemanticTokensDeltaRequest = {}));
var SemanticTokensRangeRequest;
(function (SemanticTokensRangeRequest) {
    SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
    SemanticTokensRangeRequest.messageDirection = messages_1$a.MessageDirection.clientToServer;
    SemanticTokensRangeRequest.type = new messages_1$a.ProtocolRequestType(SemanticTokensRangeRequest.method);
    SemanticTokensRangeRequest.registrationMethod = SemanticTokensRegistrationType.method;
})(SemanticTokensRangeRequest || (protocol_semanticTokens$1.SemanticTokensRangeRequest = SemanticTokensRangeRequest = {}));
var SemanticTokensRefreshRequest;
(function (SemanticTokensRefreshRequest) {
    SemanticTokensRefreshRequest.method = `workspace/semanticTokens/refresh`;
    SemanticTokensRefreshRequest.messageDirection = messages_1$a.MessageDirection.serverToClient;
    SemanticTokensRefreshRequest.type = new messages_1$a.ProtocolRequestType0(SemanticTokensRefreshRequest.method);
})(SemanticTokensRefreshRequest || (protocol_semanticTokens$1.SemanticTokensRefreshRequest = SemanticTokensRefreshRequest = {}));

var protocol_showDocument$1 = {};

Object.defineProperty(protocol_showDocument$1, "__esModule", { value: true });
protocol_showDocument$1.ShowDocumentRequest = void 0;
const messages_1$9 = messages$2;
var ShowDocumentRequest;
(function (ShowDocumentRequest) {
    ShowDocumentRequest.method = 'window/showDocument';
    ShowDocumentRequest.messageDirection = messages_1$9.MessageDirection.serverToClient;
    ShowDocumentRequest.type = new messages_1$9.ProtocolRequestType(ShowDocumentRequest.method);
})(ShowDocumentRequest || (protocol_showDocument$1.ShowDocumentRequest = ShowDocumentRequest = {}));

var protocol_linkedEditingRange$1 = {};

Object.defineProperty(protocol_linkedEditingRange$1, "__esModule", { value: true });
protocol_linkedEditingRange$1.LinkedEditingRangeRequest = void 0;
const messages_1$8 = messages$2;
var LinkedEditingRangeRequest;
(function (LinkedEditingRangeRequest) {
    LinkedEditingRangeRequest.method = 'textDocument/linkedEditingRange';
    LinkedEditingRangeRequest.messageDirection = messages_1$8.MessageDirection.clientToServer;
    LinkedEditingRangeRequest.type = new messages_1$8.ProtocolRequestType(LinkedEditingRangeRequest.method);
})(LinkedEditingRangeRequest || (protocol_linkedEditingRange$1.LinkedEditingRangeRequest = LinkedEditingRangeRequest = {}));

var protocol_fileOperations$1 = {};

Object.defineProperty(protocol_fileOperations$1, "__esModule", { value: true });
protocol_fileOperations$1.WillDeleteFilesRequest = protocol_fileOperations$1.DidDeleteFilesNotification = protocol_fileOperations$1.DidRenameFilesNotification = protocol_fileOperations$1.WillRenameFilesRequest = protocol_fileOperations$1.DidCreateFilesNotification = protocol_fileOperations$1.WillCreateFilesRequest = protocol_fileOperations$1.FileOperationPatternKind = void 0;
const messages_1$7 = messages$2;
var FileOperationPatternKind;
(function (FileOperationPatternKind) {
    FileOperationPatternKind.file = 'file';
    FileOperationPatternKind.folder = 'folder';
})(FileOperationPatternKind || (protocol_fileOperations$1.FileOperationPatternKind = FileOperationPatternKind = {}));
var WillCreateFilesRequest;
(function (WillCreateFilesRequest) {
    WillCreateFilesRequest.method = 'workspace/willCreateFiles';
    WillCreateFilesRequest.messageDirection = messages_1$7.MessageDirection.clientToServer;
    WillCreateFilesRequest.type = new messages_1$7.ProtocolRequestType(WillCreateFilesRequest.method);
})(WillCreateFilesRequest || (protocol_fileOperations$1.WillCreateFilesRequest = WillCreateFilesRequest = {}));
var DidCreateFilesNotification;
(function (DidCreateFilesNotification) {
    DidCreateFilesNotification.method = 'workspace/didCreateFiles';
    DidCreateFilesNotification.messageDirection = messages_1$7.MessageDirection.clientToServer;
    DidCreateFilesNotification.type = new messages_1$7.ProtocolNotificationType(DidCreateFilesNotification.method);
})(DidCreateFilesNotification || (protocol_fileOperations$1.DidCreateFilesNotification = DidCreateFilesNotification = {}));
var WillRenameFilesRequest;
(function (WillRenameFilesRequest) {
    WillRenameFilesRequest.method = 'workspace/willRenameFiles';
    WillRenameFilesRequest.messageDirection = messages_1$7.MessageDirection.clientToServer;
    WillRenameFilesRequest.type = new messages_1$7.ProtocolRequestType(WillRenameFilesRequest.method);
})(WillRenameFilesRequest || (protocol_fileOperations$1.WillRenameFilesRequest = WillRenameFilesRequest = {}));
var DidRenameFilesNotification;
(function (DidRenameFilesNotification) {
    DidRenameFilesNotification.method = 'workspace/didRenameFiles';
    DidRenameFilesNotification.messageDirection = messages_1$7.MessageDirection.clientToServer;
    DidRenameFilesNotification.type = new messages_1$7.ProtocolNotificationType(DidRenameFilesNotification.method);
})(DidRenameFilesNotification || (protocol_fileOperations$1.DidRenameFilesNotification = DidRenameFilesNotification = {}));
var DidDeleteFilesNotification;
(function (DidDeleteFilesNotification) {
    DidDeleteFilesNotification.method = 'workspace/didDeleteFiles';
    DidDeleteFilesNotification.messageDirection = messages_1$7.MessageDirection.clientToServer;
    DidDeleteFilesNotification.type = new messages_1$7.ProtocolNotificationType(DidDeleteFilesNotification.method);
})(DidDeleteFilesNotification || (protocol_fileOperations$1.DidDeleteFilesNotification = DidDeleteFilesNotification = {}));
var WillDeleteFilesRequest;
(function (WillDeleteFilesRequest) {
    WillDeleteFilesRequest.method = 'workspace/willDeleteFiles';
    WillDeleteFilesRequest.messageDirection = messages_1$7.MessageDirection.clientToServer;
    WillDeleteFilesRequest.type = new messages_1$7.ProtocolRequestType(WillDeleteFilesRequest.method);
})(WillDeleteFilesRequest || (protocol_fileOperations$1.WillDeleteFilesRequest = WillDeleteFilesRequest = {}));

var protocol_moniker$1 = {};

Object.defineProperty(protocol_moniker$1, "__esModule", { value: true });
protocol_moniker$1.MonikerRequest = protocol_moniker$1.MonikerKind = protocol_moniker$1.UniquenessLevel = void 0;
const messages_1$6 = messages$2;
var UniquenessLevel;
(function (UniquenessLevel) {
    UniquenessLevel.document = 'document';
    UniquenessLevel.project = 'project';
    UniquenessLevel.group = 'group';
    UniquenessLevel.scheme = 'scheme';
    UniquenessLevel.global = 'global';
})(UniquenessLevel || (protocol_moniker$1.UniquenessLevel = UniquenessLevel = {}));
var MonikerKind;
(function (MonikerKind) {
    MonikerKind.$import = 'import';
    MonikerKind.$export = 'export';
    MonikerKind.local = 'local';
})(MonikerKind || (protocol_moniker$1.MonikerKind = MonikerKind = {}));
var MonikerRequest;
(function (MonikerRequest) {
    MonikerRequest.method = 'textDocument/moniker';
    MonikerRequest.messageDirection = messages_1$6.MessageDirection.clientToServer;
    MonikerRequest.type = new messages_1$6.ProtocolRequestType(MonikerRequest.method);
})(MonikerRequest || (protocol_moniker$1.MonikerRequest = MonikerRequest = {}));

var protocol_typeHierarchy$1 = {};

Object.defineProperty(protocol_typeHierarchy$1, "__esModule", { value: true });
protocol_typeHierarchy$1.TypeHierarchySubtypesRequest = protocol_typeHierarchy$1.TypeHierarchySupertypesRequest = protocol_typeHierarchy$1.TypeHierarchyPrepareRequest = void 0;
const messages_1$5 = messages$2;
var TypeHierarchyPrepareRequest;
(function (TypeHierarchyPrepareRequest) {
    TypeHierarchyPrepareRequest.method = 'textDocument/prepareTypeHierarchy';
    TypeHierarchyPrepareRequest.messageDirection = messages_1$5.MessageDirection.clientToServer;
    TypeHierarchyPrepareRequest.type = new messages_1$5.ProtocolRequestType(TypeHierarchyPrepareRequest.method);
})(TypeHierarchyPrepareRequest || (protocol_typeHierarchy$1.TypeHierarchyPrepareRequest = TypeHierarchyPrepareRequest = {}));
var TypeHierarchySupertypesRequest;
(function (TypeHierarchySupertypesRequest) {
    TypeHierarchySupertypesRequest.method = 'typeHierarchy/supertypes';
    TypeHierarchySupertypesRequest.messageDirection = messages_1$5.MessageDirection.clientToServer;
    TypeHierarchySupertypesRequest.type = new messages_1$5.ProtocolRequestType(TypeHierarchySupertypesRequest.method);
})(TypeHierarchySupertypesRequest || (protocol_typeHierarchy$1.TypeHierarchySupertypesRequest = TypeHierarchySupertypesRequest = {}));
var TypeHierarchySubtypesRequest;
(function (TypeHierarchySubtypesRequest) {
    TypeHierarchySubtypesRequest.method = 'typeHierarchy/subtypes';
    TypeHierarchySubtypesRequest.messageDirection = messages_1$5.MessageDirection.clientToServer;
    TypeHierarchySubtypesRequest.type = new messages_1$5.ProtocolRequestType(TypeHierarchySubtypesRequest.method);
})(TypeHierarchySubtypesRequest || (protocol_typeHierarchy$1.TypeHierarchySubtypesRequest = TypeHierarchySubtypesRequest = {}));

var protocol_inlineValue$1 = {};

Object.defineProperty(protocol_inlineValue$1, "__esModule", { value: true });
protocol_inlineValue$1.InlineValueRefreshRequest = protocol_inlineValue$1.InlineValueRequest = void 0;
const messages_1$4 = messages$2;
var InlineValueRequest;
(function (InlineValueRequest) {
    InlineValueRequest.method = 'textDocument/inlineValue';
    InlineValueRequest.messageDirection = messages_1$4.MessageDirection.clientToServer;
    InlineValueRequest.type = new messages_1$4.ProtocolRequestType(InlineValueRequest.method);
})(InlineValueRequest || (protocol_inlineValue$1.InlineValueRequest = InlineValueRequest = {}));
var InlineValueRefreshRequest;
(function (InlineValueRefreshRequest) {
    InlineValueRefreshRequest.method = `workspace/inlineValue/refresh`;
    InlineValueRefreshRequest.messageDirection = messages_1$4.MessageDirection.serverToClient;
    InlineValueRefreshRequest.type = new messages_1$4.ProtocolRequestType0(InlineValueRefreshRequest.method);
})(InlineValueRefreshRequest || (protocol_inlineValue$1.InlineValueRefreshRequest = InlineValueRefreshRequest = {}));

var protocol_inlayHint$1 = {};

Object.defineProperty(protocol_inlayHint$1, "__esModule", { value: true });
protocol_inlayHint$1.InlayHintRefreshRequest = protocol_inlayHint$1.InlayHintResolveRequest = protocol_inlayHint$1.InlayHintRequest = void 0;
const messages_1$3 = messages$2;
var InlayHintRequest;
(function (InlayHintRequest) {
    InlayHintRequest.method = 'textDocument/inlayHint';
    InlayHintRequest.messageDirection = messages_1$3.MessageDirection.clientToServer;
    InlayHintRequest.type = new messages_1$3.ProtocolRequestType(InlayHintRequest.method);
})(InlayHintRequest || (protocol_inlayHint$1.InlayHintRequest = InlayHintRequest = {}));
var InlayHintResolveRequest;
(function (InlayHintResolveRequest) {
    InlayHintResolveRequest.method = 'inlayHint/resolve';
    InlayHintResolveRequest.messageDirection = messages_1$3.MessageDirection.clientToServer;
    InlayHintResolveRequest.type = new messages_1$3.ProtocolRequestType(InlayHintResolveRequest.method);
})(InlayHintResolveRequest || (protocol_inlayHint$1.InlayHintResolveRequest = InlayHintResolveRequest = {}));
var InlayHintRefreshRequest;
(function (InlayHintRefreshRequest) {
    InlayHintRefreshRequest.method = `workspace/inlayHint/refresh`;
    InlayHintRefreshRequest.messageDirection = messages_1$3.MessageDirection.serverToClient;
    InlayHintRefreshRequest.type = new messages_1$3.ProtocolRequestType0(InlayHintRefreshRequest.method);
})(InlayHintRefreshRequest || (protocol_inlayHint$1.InlayHintRefreshRequest = InlayHintRefreshRequest = {}));

var protocol_diagnostic$1 = {};

Object.defineProperty(protocol_diagnostic$1, "__esModule", { value: true });
protocol_diagnostic$1.DiagnosticRefreshRequest = protocol_diagnostic$1.WorkspaceDiagnosticRequest = protocol_diagnostic$1.DocumentDiagnosticRequest = protocol_diagnostic$1.DocumentDiagnosticReportKind = protocol_diagnostic$1.DiagnosticServerCancellationData = void 0;
const vscode_jsonrpc_1$2 = main$6;
const Is$5 = is$2;
const messages_1$2 = messages$2;
var DiagnosticServerCancellationData;
(function (DiagnosticServerCancellationData) {
    function is(value) {
        const candidate = value;
        return candidate && Is$5.boolean(candidate.retriggerRequest);
    }
    DiagnosticServerCancellationData.is = is;
})(DiagnosticServerCancellationData || (protocol_diagnostic$1.DiagnosticServerCancellationData = DiagnosticServerCancellationData = {}));
var DocumentDiagnosticReportKind;
(function (DocumentDiagnosticReportKind) {
    DocumentDiagnosticReportKind.Full = 'full';
    DocumentDiagnosticReportKind.Unchanged = 'unchanged';
})(DocumentDiagnosticReportKind || (protocol_diagnostic$1.DocumentDiagnosticReportKind = DocumentDiagnosticReportKind = {}));
var DocumentDiagnosticRequest;
(function (DocumentDiagnosticRequest) {
    DocumentDiagnosticRequest.method = 'textDocument/diagnostic';
    DocumentDiagnosticRequest.messageDirection = messages_1$2.MessageDirection.clientToServer;
    DocumentDiagnosticRequest.type = new messages_1$2.ProtocolRequestType(DocumentDiagnosticRequest.method);
    DocumentDiagnosticRequest.partialResult = new vscode_jsonrpc_1$2.ProgressType();
})(DocumentDiagnosticRequest || (protocol_diagnostic$1.DocumentDiagnosticRequest = DocumentDiagnosticRequest = {}));
var WorkspaceDiagnosticRequest;
(function (WorkspaceDiagnosticRequest) {
    WorkspaceDiagnosticRequest.method = 'workspace/diagnostic';
    WorkspaceDiagnosticRequest.messageDirection = messages_1$2.MessageDirection.clientToServer;
    WorkspaceDiagnosticRequest.type = new messages_1$2.ProtocolRequestType(WorkspaceDiagnosticRequest.method);
    WorkspaceDiagnosticRequest.partialResult = new vscode_jsonrpc_1$2.ProgressType();
})(WorkspaceDiagnosticRequest || (protocol_diagnostic$1.WorkspaceDiagnosticRequest = WorkspaceDiagnosticRequest = {}));
var DiagnosticRefreshRequest;
(function (DiagnosticRefreshRequest) {
    DiagnosticRefreshRequest.method = `workspace/diagnostic/refresh`;
    DiagnosticRefreshRequest.messageDirection = messages_1$2.MessageDirection.serverToClient;
    DiagnosticRefreshRequest.type = new messages_1$2.ProtocolRequestType0(DiagnosticRefreshRequest.method);
})(DiagnosticRefreshRequest || (protocol_diagnostic$1.DiagnosticRefreshRequest = DiagnosticRefreshRequest = {}));

var protocol_notebook$1 = {};

Object.defineProperty(protocol_notebook$1, "__esModule", { value: true });
protocol_notebook$1.DidCloseNotebookDocumentNotification = protocol_notebook$1.DidSaveNotebookDocumentNotification = protocol_notebook$1.DidChangeNotebookDocumentNotification = protocol_notebook$1.NotebookCellArrayChange = protocol_notebook$1.DidOpenNotebookDocumentNotification = protocol_notebook$1.NotebookDocumentSyncRegistrationType = protocol_notebook$1.NotebookDocument = protocol_notebook$1.NotebookCell = protocol_notebook$1.ExecutionSummary = protocol_notebook$1.NotebookCellKind = void 0;
const vscode_languageserver_types_1$6 = mainExports;
const Is$4 = is$2;
const messages_1$1 = messages$2;
var NotebookCellKind;
(function (NotebookCellKind) {
    NotebookCellKind.Markup = 1;
    NotebookCellKind.Code = 2;
    function is(value) {
        return value === 1 || value === 2;
    }
    NotebookCellKind.is = is;
})(NotebookCellKind || (protocol_notebook$1.NotebookCellKind = NotebookCellKind = {}));
var ExecutionSummary;
(function (ExecutionSummary) {
    function create(executionOrder, success) {
        const result = { executionOrder };
        if (success === true || success === false) {
            result.success = success;
        }
        return result;
    }
    ExecutionSummary.create = create;
    function is(value) {
        const candidate = value;
        return Is$4.objectLiteral(candidate) && vscode_languageserver_types_1$6.uinteger.is(candidate.executionOrder) && (candidate.success === undefined || Is$4.boolean(candidate.success));
    }
    ExecutionSummary.is = is;
    function equals(one, other) {
        if (one === other) {
            return true;
        }
        if (one === null || one === undefined || other === null || other === undefined) {
            return false;
        }
        return one.executionOrder === other.executionOrder && one.success === other.success;
    }
    ExecutionSummary.equals = equals;
})(ExecutionSummary || (protocol_notebook$1.ExecutionSummary = ExecutionSummary = {}));
var NotebookCell;
(function (NotebookCell) {
    function create(kind, document) {
        return { kind, document };
    }
    NotebookCell.create = create;
    function is(value) {
        const candidate = value;
        return Is$4.objectLiteral(candidate) && NotebookCellKind.is(candidate.kind) && vscode_languageserver_types_1$6.DocumentUri.is(candidate.document) &&
            (candidate.metadata === undefined || Is$4.objectLiteral(candidate.metadata));
    }
    NotebookCell.is = is;
    function diff(one, two) {
        const result = new Set();
        if (one.document !== two.document) {
            result.add('document');
        }
        if (one.kind !== two.kind) {
            result.add('kind');
        }
        if (one.executionSummary !== two.executionSummary) {
            result.add('executionSummary');
        }
        if ((one.metadata !== undefined || two.metadata !== undefined) && !equalsMetadata(one.metadata, two.metadata)) {
            result.add('metadata');
        }
        if ((one.executionSummary !== undefined || two.executionSummary !== undefined) && !ExecutionSummary.equals(one.executionSummary, two.executionSummary)) {
            result.add('executionSummary');
        }
        return result;
    }
    NotebookCell.diff = diff;
    function equalsMetadata(one, other) {
        if (one === other) {
            return true;
        }
        if (one === null || one === undefined || other === null || other === undefined) {
            return false;
        }
        if (typeof one !== typeof other) {
            return false;
        }
        if (typeof one !== 'object') {
            return false;
        }
        const oneArray = Array.isArray(one);
        const otherArray = Array.isArray(other);
        if (oneArray !== otherArray) {
            return false;
        }
        if (oneArray && otherArray) {
            if (one.length !== other.length) {
                return false;
            }
            for (let i = 0; i < one.length; i++) {
                if (!equalsMetadata(one[i], other[i])) {
                    return false;
                }
            }
        }
        if (Is$4.objectLiteral(one) && Is$4.objectLiteral(other)) {
            const oneKeys = Object.keys(one);
            const otherKeys = Object.keys(other);
            if (oneKeys.length !== otherKeys.length) {
                return false;
            }
            oneKeys.sort();
            otherKeys.sort();
            if (!equalsMetadata(oneKeys, otherKeys)) {
                return false;
            }
            for (let i = 0; i < oneKeys.length; i++) {
                const prop = oneKeys[i];
                if (!equalsMetadata(one[prop], other[prop])) {
                    return false;
                }
            }
        }
        return true;
    }
})(NotebookCell || (protocol_notebook$1.NotebookCell = NotebookCell = {}));
var NotebookDocument;
(function (NotebookDocument) {
    function create(uri, notebookType, version, cells) {
        return { uri, notebookType, version, cells };
    }
    NotebookDocument.create = create;
    function is(value) {
        const candidate = value;
        return Is$4.objectLiteral(candidate) && Is$4.string(candidate.uri) && vscode_languageserver_types_1$6.integer.is(candidate.version) && Is$4.typedArray(candidate.cells, NotebookCell.is);
    }
    NotebookDocument.is = is;
})(NotebookDocument || (protocol_notebook$1.NotebookDocument = NotebookDocument = {}));
var NotebookDocumentSyncRegistrationType;
(function (NotebookDocumentSyncRegistrationType) {
    NotebookDocumentSyncRegistrationType.method = 'notebookDocument/sync';
    NotebookDocumentSyncRegistrationType.messageDirection = messages_1$1.MessageDirection.clientToServer;
    NotebookDocumentSyncRegistrationType.type = new messages_1$1.RegistrationType(NotebookDocumentSyncRegistrationType.method);
})(NotebookDocumentSyncRegistrationType || (protocol_notebook$1.NotebookDocumentSyncRegistrationType = NotebookDocumentSyncRegistrationType = {}));
var DidOpenNotebookDocumentNotification;
(function (DidOpenNotebookDocumentNotification) {
    DidOpenNotebookDocumentNotification.method = 'notebookDocument/didOpen';
    DidOpenNotebookDocumentNotification.messageDirection = messages_1$1.MessageDirection.clientToServer;
    DidOpenNotebookDocumentNotification.type = new messages_1$1.ProtocolNotificationType(DidOpenNotebookDocumentNotification.method);
    DidOpenNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method;
})(DidOpenNotebookDocumentNotification || (protocol_notebook$1.DidOpenNotebookDocumentNotification = DidOpenNotebookDocumentNotification = {}));
var NotebookCellArrayChange;
(function (NotebookCellArrayChange) {
    function is(value) {
        const candidate = value;
        return Is$4.objectLiteral(candidate) && vscode_languageserver_types_1$6.uinteger.is(candidate.start) && vscode_languageserver_types_1$6.uinteger.is(candidate.deleteCount) && (candidate.cells === undefined || Is$4.typedArray(candidate.cells, NotebookCell.is));
    }
    NotebookCellArrayChange.is = is;
    function create(start, deleteCount, cells) {
        const result = { start, deleteCount };
        if (cells !== undefined) {
            result.cells = cells;
        }
        return result;
    }
    NotebookCellArrayChange.create = create;
})(NotebookCellArrayChange || (protocol_notebook$1.NotebookCellArrayChange = NotebookCellArrayChange = {}));
var DidChangeNotebookDocumentNotification;
(function (DidChangeNotebookDocumentNotification) {
    DidChangeNotebookDocumentNotification.method = 'notebookDocument/didChange';
    DidChangeNotebookDocumentNotification.messageDirection = messages_1$1.MessageDirection.clientToServer;
    DidChangeNotebookDocumentNotification.type = new messages_1$1.ProtocolNotificationType(DidChangeNotebookDocumentNotification.method);
    DidChangeNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method;
})(DidChangeNotebookDocumentNotification || (protocol_notebook$1.DidChangeNotebookDocumentNotification = DidChangeNotebookDocumentNotification = {}));
var DidSaveNotebookDocumentNotification;
(function (DidSaveNotebookDocumentNotification) {
    DidSaveNotebookDocumentNotification.method = 'notebookDocument/didSave';
    DidSaveNotebookDocumentNotification.messageDirection = messages_1$1.MessageDirection.clientToServer;
    DidSaveNotebookDocumentNotification.type = new messages_1$1.ProtocolNotificationType(DidSaveNotebookDocumentNotification.method);
    DidSaveNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method;
})(DidSaveNotebookDocumentNotification || (protocol_notebook$1.DidSaveNotebookDocumentNotification = DidSaveNotebookDocumentNotification = {}));
var DidCloseNotebookDocumentNotification;
(function (DidCloseNotebookDocumentNotification) {
    DidCloseNotebookDocumentNotification.method = 'notebookDocument/didClose';
    DidCloseNotebookDocumentNotification.messageDirection = messages_1$1.MessageDirection.clientToServer;
    DidCloseNotebookDocumentNotification.type = new messages_1$1.ProtocolNotificationType(DidCloseNotebookDocumentNotification.method);
    DidCloseNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method;
})(DidCloseNotebookDocumentNotification || (protocol_notebook$1.DidCloseNotebookDocumentNotification = DidCloseNotebookDocumentNotification = {}));

var protocol_inlineCompletion = {};

Object.defineProperty(protocol_inlineCompletion, "__esModule", { value: true });
protocol_inlineCompletion.InlineCompletionRequest = void 0;
const messages_1 = messages$2;
var InlineCompletionRequest;
(function (InlineCompletionRequest) {
    InlineCompletionRequest.method = 'textDocument/inlineCompletion';
    InlineCompletionRequest.messageDirection = messages_1.MessageDirection.clientToServer;
    InlineCompletionRequest.type = new messages_1.ProtocolRequestType(InlineCompletionRequest.method);
})(InlineCompletionRequest || (protocol_inlineCompletion.InlineCompletionRequest = InlineCompletionRequest = {}));

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.RelativePattern = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeErrorCodes = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.PositionEncodingKind = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.NotebookCellTextDocumentFilter = exports.NotebookDocumentFilter = exports.TextDocumentFilter = void 0;
	exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangesFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = void 0;
	exports.InlineCompletionRequest = exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchySubtypesRequest = exports.TypeHierarchyPrepareRequest = void 0;
	const messages_1 = messages$2;
	const vscode_languageserver_types_1 = mainExports;
	const Is = is$2;
	const protocol_implementation_1 = protocol_implementation$1;
	Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } });
	const protocol_typeDefinition_1 = protocol_typeDefinition$1;
	Object.defineProperty(exports, "TypeDefinitionRequest", { enumerable: true, get: function () { return protocol_typeDefinition_1.TypeDefinitionRequest; } });
	const protocol_workspaceFolder_1 = protocol_workspaceFolder$1;
	Object.defineProperty(exports, "WorkspaceFoldersRequest", { enumerable: true, get: function () { return protocol_workspaceFolder_1.WorkspaceFoldersRequest; } });
	Object.defineProperty(exports, "DidChangeWorkspaceFoldersNotification", { enumerable: true, get: function () { return protocol_workspaceFolder_1.DidChangeWorkspaceFoldersNotification; } });
	const protocol_configuration_1 = protocol_configuration$1;
	Object.defineProperty(exports, "ConfigurationRequest", { enumerable: true, get: function () { return protocol_configuration_1.ConfigurationRequest; } });
	const protocol_colorProvider_1 = protocol_colorProvider$1;
	Object.defineProperty(exports, "DocumentColorRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.DocumentColorRequest; } });
	Object.defineProperty(exports, "ColorPresentationRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.ColorPresentationRequest; } });
	const protocol_foldingRange_1 = protocol_foldingRange$1;
	Object.defineProperty(exports, "FoldingRangeRequest", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRequest; } });
	Object.defineProperty(exports, "FoldingRangeRefreshRequest", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRefreshRequest; } });
	const protocol_declaration_1 = protocol_declaration$1;
	Object.defineProperty(exports, "DeclarationRequest", { enumerable: true, get: function () { return protocol_declaration_1.DeclarationRequest; } });
	const protocol_selectionRange_1 = protocol_selectionRange$1;
	Object.defineProperty(exports, "SelectionRangeRequest", { enumerable: true, get: function () { return protocol_selectionRange_1.SelectionRangeRequest; } });
	const protocol_progress_1 = protocol_progress$1;
	Object.defineProperty(exports, "WorkDoneProgress", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgress; } });
	Object.defineProperty(exports, "WorkDoneProgressCreateRequest", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCreateRequest; } });
	Object.defineProperty(exports, "WorkDoneProgressCancelNotification", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCancelNotification; } });
	const protocol_callHierarchy_1 = protocol_callHierarchy$1;
	Object.defineProperty(exports, "CallHierarchyIncomingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest; } });
	Object.defineProperty(exports, "CallHierarchyOutgoingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } });
	Object.defineProperty(exports, "CallHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } });
	const protocol_semanticTokens_1 = protocol_semanticTokens$1;
	Object.defineProperty(exports, "TokenFormat", { enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } });
	Object.defineProperty(exports, "SemanticTokensRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } });
	Object.defineProperty(exports, "SemanticTokensDeltaRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } });
	Object.defineProperty(exports, "SemanticTokensRangeRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRangeRequest; } });
	Object.defineProperty(exports, "SemanticTokensRefreshRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRefreshRequest; } });
	Object.defineProperty(exports, "SemanticTokensRegistrationType", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRegistrationType; } });
	const protocol_showDocument_1 = protocol_showDocument$1;
	Object.defineProperty(exports, "ShowDocumentRequest", { enumerable: true, get: function () { return protocol_showDocument_1.ShowDocumentRequest; } });
	const protocol_linkedEditingRange_1 = protocol_linkedEditingRange$1;
	Object.defineProperty(exports, "LinkedEditingRangeRequest", { enumerable: true, get: function () { return protocol_linkedEditingRange_1.LinkedEditingRangeRequest; } });
	const protocol_fileOperations_1 = protocol_fileOperations$1;
	Object.defineProperty(exports, "FileOperationPatternKind", { enumerable: true, get: function () { return protocol_fileOperations_1.FileOperationPatternKind; } });
	Object.defineProperty(exports, "DidCreateFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidCreateFilesNotification; } });
	Object.defineProperty(exports, "WillCreateFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillCreateFilesRequest; } });
	Object.defineProperty(exports, "DidRenameFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidRenameFilesNotification; } });
	Object.defineProperty(exports, "WillRenameFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillRenameFilesRequest; } });
	Object.defineProperty(exports, "DidDeleteFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidDeleteFilesNotification; } });
	Object.defineProperty(exports, "WillDeleteFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillDeleteFilesRequest; } });
	const protocol_moniker_1 = protocol_moniker$1;
	Object.defineProperty(exports, "UniquenessLevel", { enumerable: true, get: function () { return protocol_moniker_1.UniquenessLevel; } });
	Object.defineProperty(exports, "MonikerKind", { enumerable: true, get: function () { return protocol_moniker_1.MonikerKind; } });
	Object.defineProperty(exports, "MonikerRequest", { enumerable: true, get: function () { return protocol_moniker_1.MonikerRequest; } });
	const protocol_typeHierarchy_1 = protocol_typeHierarchy$1;
	Object.defineProperty(exports, "TypeHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchyPrepareRequest; } });
	Object.defineProperty(exports, "TypeHierarchySubtypesRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySubtypesRequest; } });
	Object.defineProperty(exports, "TypeHierarchySupertypesRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySupertypesRequest; } });
	const protocol_inlineValue_1 = protocol_inlineValue$1;
	Object.defineProperty(exports, "InlineValueRequest", { enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRequest; } });
	Object.defineProperty(exports, "InlineValueRefreshRequest", { enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRefreshRequest; } });
	const protocol_inlayHint_1 = protocol_inlayHint$1;
	Object.defineProperty(exports, "InlayHintRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRequest; } });
	Object.defineProperty(exports, "InlayHintResolveRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintResolveRequest; } });
	Object.defineProperty(exports, "InlayHintRefreshRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRefreshRequest; } });
	const protocol_diagnostic_1 = protocol_diagnostic$1;
	Object.defineProperty(exports, "DiagnosticServerCancellationData", { enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticServerCancellationData; } });
	Object.defineProperty(exports, "DocumentDiagnosticReportKind", { enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticReportKind; } });
	Object.defineProperty(exports, "DocumentDiagnosticRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticRequest; } });
	Object.defineProperty(exports, "WorkspaceDiagnosticRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.WorkspaceDiagnosticRequest; } });
	Object.defineProperty(exports, "DiagnosticRefreshRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticRefreshRequest; } });
	const protocol_notebook_1 = protocol_notebook$1;
	Object.defineProperty(exports, "NotebookCellKind", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCellKind; } });
	Object.defineProperty(exports, "ExecutionSummary", { enumerable: true, get: function () { return protocol_notebook_1.ExecutionSummary; } });
	Object.defineProperty(exports, "NotebookCell", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCell; } });
	Object.defineProperty(exports, "NotebookDocument", { enumerable: true, get: function () { return protocol_notebook_1.NotebookDocument; } });
	Object.defineProperty(exports, "NotebookDocumentSyncRegistrationType", { enumerable: true, get: function () { return protocol_notebook_1.NotebookDocumentSyncRegistrationType; } });
	Object.defineProperty(exports, "DidOpenNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidOpenNotebookDocumentNotification; } });
	Object.defineProperty(exports, "NotebookCellArrayChange", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCellArrayChange; } });
	Object.defineProperty(exports, "DidChangeNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidChangeNotebookDocumentNotification; } });
	Object.defineProperty(exports, "DidSaveNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidSaveNotebookDocumentNotification; } });
	Object.defineProperty(exports, "DidCloseNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidCloseNotebookDocumentNotification; } });
	const protocol_inlineCompletion_1 = protocol_inlineCompletion;
	Object.defineProperty(exports, "InlineCompletionRequest", { enumerable: true, get: function () { return protocol_inlineCompletion_1.InlineCompletionRequest; } });
	var TextDocumentFilter;
	(function (TextDocumentFilter) {
	    function is(value) {
	        const candidate = value;
	        return Is.string(candidate) || (Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern));
	    }
	    TextDocumentFilter.is = is;
	})(TextDocumentFilter || (exports.TextDocumentFilter = TextDocumentFilter = {}));
	var NotebookDocumentFilter;
	(function (NotebookDocumentFilter) {
	    function is(value) {
	        const candidate = value;
	        return Is.objectLiteral(candidate) && (Is.string(candidate.notebookType) || Is.string(candidate.scheme) || Is.string(candidate.pattern));
	    }
	    NotebookDocumentFilter.is = is;
	})(NotebookDocumentFilter || (exports.NotebookDocumentFilter = NotebookDocumentFilter = {}));
	var NotebookCellTextDocumentFilter;
	(function (NotebookCellTextDocumentFilter) {
	    function is(value) {
	        const candidate = value;
	        return Is.objectLiteral(candidate)
	            && (Is.string(candidate.notebook) || NotebookDocumentFilter.is(candidate.notebook))
	            && (candidate.language === undefined || Is.string(candidate.language));
	    }
	    NotebookCellTextDocumentFilter.is = is;
	})(NotebookCellTextDocumentFilter || (exports.NotebookCellTextDocumentFilter = NotebookCellTextDocumentFilter = {}));
	var DocumentSelector;
	(function (DocumentSelector) {
	    function is(value) {
	        if (!Array.isArray(value)) {
	            return false;
	        }
	        for (let elem of value) {
	            if (!Is.string(elem) && !TextDocumentFilter.is(elem) && !NotebookCellTextDocumentFilter.is(elem)) {
	                return false;
	            }
	        }
	        return true;
	    }
	    DocumentSelector.is = is;
	})(DocumentSelector || (exports.DocumentSelector = DocumentSelector = {}));
	var RegistrationRequest;
	(function (RegistrationRequest) {
	    RegistrationRequest.method = 'client/registerCapability';
	    RegistrationRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    RegistrationRequest.type = new messages_1.ProtocolRequestType(RegistrationRequest.method);
	})(RegistrationRequest || (exports.RegistrationRequest = RegistrationRequest = {}));
	var UnregistrationRequest;
	(function (UnregistrationRequest) {
	    UnregistrationRequest.method = 'client/unregisterCapability';
	    UnregistrationRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    UnregistrationRequest.type = new messages_1.ProtocolRequestType(UnregistrationRequest.method);
	})(UnregistrationRequest || (exports.UnregistrationRequest = UnregistrationRequest = {}));
	var ResourceOperationKind;
	(function (ResourceOperationKind) {
	    ResourceOperationKind.Create = 'create';
	    ResourceOperationKind.Rename = 'rename';
	    ResourceOperationKind.Delete = 'delete';
	})(ResourceOperationKind || (exports.ResourceOperationKind = ResourceOperationKind = {}));
	var FailureHandlingKind;
	(function (FailureHandlingKind) {
	    FailureHandlingKind.Abort = 'abort';
	    FailureHandlingKind.Transactional = 'transactional';
	    FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
	    FailureHandlingKind.Undo = 'undo';
	})(FailureHandlingKind || (exports.FailureHandlingKind = FailureHandlingKind = {}));
	var PositionEncodingKind;
	(function (PositionEncodingKind) {
	    PositionEncodingKind.UTF8 = 'utf-8';
	    PositionEncodingKind.UTF16 = 'utf-16';
	    PositionEncodingKind.UTF32 = 'utf-32';
	})(PositionEncodingKind || (exports.PositionEncodingKind = PositionEncodingKind = {}));
	var StaticRegistrationOptions;
	(function (StaticRegistrationOptions) {
	    function hasId(value) {
	        const candidate = value;
	        return candidate && Is.string(candidate.id) && candidate.id.length > 0;
	    }
	    StaticRegistrationOptions.hasId = hasId;
	})(StaticRegistrationOptions || (exports.StaticRegistrationOptions = StaticRegistrationOptions = {}));
	var TextDocumentRegistrationOptions;
	(function (TextDocumentRegistrationOptions) {
	    function is(value) {
	        const candidate = value;
	        return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
	    }
	    TextDocumentRegistrationOptions.is = is;
	})(TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = TextDocumentRegistrationOptions = {}));
	var WorkDoneProgressOptions;
	(function (WorkDoneProgressOptions) {
	    function is(value) {
	        const candidate = value;
	        return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
	    }
	    WorkDoneProgressOptions.is = is;
	    function hasWorkDoneProgress(value) {
	        const candidate = value;
	        return candidate && Is.boolean(candidate.workDoneProgress);
	    }
	    WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
	})(WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = WorkDoneProgressOptions = {}));
	var InitializeRequest;
	(function (InitializeRequest) {
	    InitializeRequest.method = 'initialize';
	    InitializeRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    InitializeRequest.type = new messages_1.ProtocolRequestType(InitializeRequest.method);
	})(InitializeRequest || (exports.InitializeRequest = InitializeRequest = {}));
	var InitializeErrorCodes;
	(function (InitializeErrorCodes) {
	    InitializeErrorCodes.unknownProtocolVersion = 1;
	})(InitializeErrorCodes || (exports.InitializeErrorCodes = InitializeErrorCodes = {}));
	var InitializedNotification;
	(function (InitializedNotification) {
	    InitializedNotification.method = 'initialized';
	    InitializedNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    InitializedNotification.type = new messages_1.ProtocolNotificationType(InitializedNotification.method);
	})(InitializedNotification || (exports.InitializedNotification = InitializedNotification = {}));
	var ShutdownRequest;
	(function (ShutdownRequest) {
	    ShutdownRequest.method = 'shutdown';
	    ShutdownRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    ShutdownRequest.type = new messages_1.ProtocolRequestType0(ShutdownRequest.method);
	})(ShutdownRequest || (exports.ShutdownRequest = ShutdownRequest = {}));
	var ExitNotification;
	(function (ExitNotification) {
	    ExitNotification.method = 'exit';
	    ExitNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    ExitNotification.type = new messages_1.ProtocolNotificationType0(ExitNotification.method);
	})(ExitNotification || (exports.ExitNotification = ExitNotification = {}));
	var DidChangeConfigurationNotification;
	(function (DidChangeConfigurationNotification) {
	    DidChangeConfigurationNotification.method = 'workspace/didChangeConfiguration';
	    DidChangeConfigurationNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType(DidChangeConfigurationNotification.method);
	})(DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = DidChangeConfigurationNotification = {}));
	var MessageType;
	(function (MessageType) {
	    MessageType.Error = 1;
	    MessageType.Warning = 2;
	    MessageType.Info = 3;
	    MessageType.Log = 4;
	    MessageType.Debug = 5;
	})(MessageType || (exports.MessageType = MessageType = {}));
	var ShowMessageNotification;
	(function (ShowMessageNotification) {
	    ShowMessageNotification.method = 'window/showMessage';
	    ShowMessageNotification.messageDirection = messages_1.MessageDirection.serverToClient;
	    ShowMessageNotification.type = new messages_1.ProtocolNotificationType(ShowMessageNotification.method);
	})(ShowMessageNotification || (exports.ShowMessageNotification = ShowMessageNotification = {}));
	var ShowMessageRequest;
	(function (ShowMessageRequest) {
	    ShowMessageRequest.method = 'window/showMessageRequest';
	    ShowMessageRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    ShowMessageRequest.type = new messages_1.ProtocolRequestType(ShowMessageRequest.method);
	})(ShowMessageRequest || (exports.ShowMessageRequest = ShowMessageRequest = {}));
	var LogMessageNotification;
	(function (LogMessageNotification) {
	    LogMessageNotification.method = 'window/logMessage';
	    LogMessageNotification.messageDirection = messages_1.MessageDirection.serverToClient;
	    LogMessageNotification.type = new messages_1.ProtocolNotificationType(LogMessageNotification.method);
	})(LogMessageNotification || (exports.LogMessageNotification = LogMessageNotification = {}));
	var TelemetryEventNotification;
	(function (TelemetryEventNotification) {
	    TelemetryEventNotification.method = 'telemetry/event';
	    TelemetryEventNotification.messageDirection = messages_1.MessageDirection.serverToClient;
	    TelemetryEventNotification.type = new messages_1.ProtocolNotificationType(TelemetryEventNotification.method);
	})(TelemetryEventNotification || (exports.TelemetryEventNotification = TelemetryEventNotification = {}));
	var TextDocumentSyncKind;
	(function (TextDocumentSyncKind) {
	    TextDocumentSyncKind.None = 0;
	    TextDocumentSyncKind.Full = 1;
	    TextDocumentSyncKind.Incremental = 2;
	})(TextDocumentSyncKind || (exports.TextDocumentSyncKind = TextDocumentSyncKind = {}));
	var DidOpenTextDocumentNotification;
	(function (DidOpenTextDocumentNotification) {
	    DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
	    DidOpenTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
	})(DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = DidOpenTextDocumentNotification = {}));
	var TextDocumentContentChangeEvent;
	(function (TextDocumentContentChangeEvent) {
	    function isIncremental(event) {
	        let candidate = event;
	        return candidate !== undefined && candidate !== null &&
	            typeof candidate.text === 'string' && candidate.range !== undefined &&
	            (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
	    }
	    TextDocumentContentChangeEvent.isIncremental = isIncremental;
	    function isFull(event) {
	        let candidate = event;
	        return candidate !== undefined && candidate !== null &&
	            typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
	    }
	    TextDocumentContentChangeEvent.isFull = isFull;
	})(TextDocumentContentChangeEvent || (exports.TextDocumentContentChangeEvent = TextDocumentContentChangeEvent = {}));
	var DidChangeTextDocumentNotification;
	(function (DidChangeTextDocumentNotification) {
	    DidChangeTextDocumentNotification.method = 'textDocument/didChange';
	    DidChangeTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
	})(DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = DidChangeTextDocumentNotification = {}));
	var DidCloseTextDocumentNotification;
	(function (DidCloseTextDocumentNotification) {
	    DidCloseTextDocumentNotification.method = 'textDocument/didClose';
	    DidCloseTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
	})(DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = DidCloseTextDocumentNotification = {}));
	var DidSaveTextDocumentNotification;
	(function (DidSaveTextDocumentNotification) {
	    DidSaveTextDocumentNotification.method = 'textDocument/didSave';
	    DidSaveTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
	})(DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = DidSaveTextDocumentNotification = {}));
	var TextDocumentSaveReason;
	(function (TextDocumentSaveReason) {
	    TextDocumentSaveReason.Manual = 1;
	    TextDocumentSaveReason.AfterDelay = 2;
	    TextDocumentSaveReason.FocusOut = 3;
	})(TextDocumentSaveReason || (exports.TextDocumentSaveReason = TextDocumentSaveReason = {}));
	var WillSaveTextDocumentNotification;
	(function (WillSaveTextDocumentNotification) {
	    WillSaveTextDocumentNotification.method = 'textDocument/willSave';
	    WillSaveTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
	})(WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = WillSaveTextDocumentNotification = {}));
	var WillSaveTextDocumentWaitUntilRequest;
	(function (WillSaveTextDocumentWaitUntilRequest) {
	    WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
	    WillSaveTextDocumentWaitUntilRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
	})(WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = WillSaveTextDocumentWaitUntilRequest = {}));
	var DidChangeWatchedFilesNotification;
	(function (DidChangeWatchedFilesNotification) {
	    DidChangeWatchedFilesNotification.method = 'workspace/didChangeWatchedFiles';
	    DidChangeWatchedFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType(DidChangeWatchedFilesNotification.method);
	})(DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = DidChangeWatchedFilesNotification = {}));
	var FileChangeType;
	(function (FileChangeType) {
	    FileChangeType.Created = 1;
	    FileChangeType.Changed = 2;
	    FileChangeType.Deleted = 3;
	})(FileChangeType || (exports.FileChangeType = FileChangeType = {}));
	var RelativePattern;
	(function (RelativePattern) {
	    function is(value) {
	        const candidate = value;
	        return Is.objectLiteral(candidate) && (vscode_languageserver_types_1.URI.is(candidate.baseUri) || vscode_languageserver_types_1.WorkspaceFolder.is(candidate.baseUri)) && Is.string(candidate.pattern);
	    }
	    RelativePattern.is = is;
	})(RelativePattern || (exports.RelativePattern = RelativePattern = {}));
	var WatchKind;
	(function (WatchKind) {
	    WatchKind.Create = 1;
	    WatchKind.Change = 2;
	    WatchKind.Delete = 4;
	})(WatchKind || (exports.WatchKind = WatchKind = {}));
	var PublishDiagnosticsNotification;
	(function (PublishDiagnosticsNotification) {
	    PublishDiagnosticsNotification.method = 'textDocument/publishDiagnostics';
	    PublishDiagnosticsNotification.messageDirection = messages_1.MessageDirection.serverToClient;
	    PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType(PublishDiagnosticsNotification.method);
	})(PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = PublishDiagnosticsNotification = {}));
	var CompletionTriggerKind;
	(function (CompletionTriggerKind) {
	    CompletionTriggerKind.Invoked = 1;
	    CompletionTriggerKind.TriggerCharacter = 2;
	    CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
	})(CompletionTriggerKind || (exports.CompletionTriggerKind = CompletionTriggerKind = {}));
	var CompletionRequest;
	(function (CompletionRequest) {
	    CompletionRequest.method = 'textDocument/completion';
	    CompletionRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
	})(CompletionRequest || (exports.CompletionRequest = CompletionRequest = {}));
	var CompletionResolveRequest;
	(function (CompletionResolveRequest) {
	    CompletionResolveRequest.method = 'completionItem/resolve';
	    CompletionResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
	})(CompletionResolveRequest || (exports.CompletionResolveRequest = CompletionResolveRequest = {}));
	var HoverRequest;
	(function (HoverRequest) {
	    HoverRequest.method = 'textDocument/hover';
	    HoverRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
	})(HoverRequest || (exports.HoverRequest = HoverRequest = {}));
	var SignatureHelpTriggerKind;
	(function (SignatureHelpTriggerKind) {
	    SignatureHelpTriggerKind.Invoked = 1;
	    SignatureHelpTriggerKind.TriggerCharacter = 2;
	    SignatureHelpTriggerKind.ContentChange = 3;
	})(SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = SignatureHelpTriggerKind = {}));
	var SignatureHelpRequest;
	(function (SignatureHelpRequest) {
	    SignatureHelpRequest.method = 'textDocument/signatureHelp';
	    SignatureHelpRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
	})(SignatureHelpRequest || (exports.SignatureHelpRequest = SignatureHelpRequest = {}));
	var DefinitionRequest;
	(function (DefinitionRequest) {
	    DefinitionRequest.method = 'textDocument/definition';
	    DefinitionRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
	})(DefinitionRequest || (exports.DefinitionRequest = DefinitionRequest = {}));
	var ReferencesRequest;
	(function (ReferencesRequest) {
	    ReferencesRequest.method = 'textDocument/references';
	    ReferencesRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
	})(ReferencesRequest || (exports.ReferencesRequest = ReferencesRequest = {}));
	var DocumentHighlightRequest;
	(function (DocumentHighlightRequest) {
	    DocumentHighlightRequest.method = 'textDocument/documentHighlight';
	    DocumentHighlightRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
	})(DocumentHighlightRequest || (exports.DocumentHighlightRequest = DocumentHighlightRequest = {}));
	var DocumentSymbolRequest;
	(function (DocumentSymbolRequest) {
	    DocumentSymbolRequest.method = 'textDocument/documentSymbol';
	    DocumentSymbolRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
	})(DocumentSymbolRequest || (exports.DocumentSymbolRequest = DocumentSymbolRequest = {}));
	var CodeActionRequest;
	(function (CodeActionRequest) {
	    CodeActionRequest.method = 'textDocument/codeAction';
	    CodeActionRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
	})(CodeActionRequest || (exports.CodeActionRequest = CodeActionRequest = {}));
	var CodeActionResolveRequest;
	(function (CodeActionResolveRequest) {
	    CodeActionResolveRequest.method = 'codeAction/resolve';
	    CodeActionResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CodeActionResolveRequest.type = new messages_1.ProtocolRequestType(CodeActionResolveRequest.method);
	})(CodeActionResolveRequest || (exports.CodeActionResolveRequest = CodeActionResolveRequest = {}));
	var WorkspaceSymbolRequest;
	(function (WorkspaceSymbolRequest) {
	    WorkspaceSymbolRequest.method = 'workspace/symbol';
	    WorkspaceSymbolRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
	})(WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = WorkspaceSymbolRequest = {}));
	var WorkspaceSymbolResolveRequest;
	(function (WorkspaceSymbolResolveRequest) {
	    WorkspaceSymbolResolveRequest.method = 'workspaceSymbol/resolve';
	    WorkspaceSymbolResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    WorkspaceSymbolResolveRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolResolveRequest.method);
	})(WorkspaceSymbolResolveRequest || (exports.WorkspaceSymbolResolveRequest = WorkspaceSymbolResolveRequest = {}));
	var CodeLensRequest;
	(function (CodeLensRequest) {
	    CodeLensRequest.method = 'textDocument/codeLens';
	    CodeLensRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CodeLensRequest.type = new messages_1.ProtocolRequestType(CodeLensRequest.method);
	})(CodeLensRequest || (exports.CodeLensRequest = CodeLensRequest = {}));
	var CodeLensResolveRequest;
	(function (CodeLensResolveRequest) {
	    CodeLensResolveRequest.method = 'codeLens/resolve';
	    CodeLensResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CodeLensResolveRequest.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest.method);
	})(CodeLensResolveRequest || (exports.CodeLensResolveRequest = CodeLensResolveRequest = {}));
	var CodeLensRefreshRequest;
	(function (CodeLensRefreshRequest) {
	    CodeLensRefreshRequest.method = `workspace/codeLens/refresh`;
	    CodeLensRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    CodeLensRefreshRequest.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest.method);
	})(CodeLensRefreshRequest || (exports.CodeLensRefreshRequest = CodeLensRefreshRequest = {}));
	var DocumentLinkRequest;
	(function (DocumentLinkRequest) {
	    DocumentLinkRequest.method = 'textDocument/documentLink';
	    DocumentLinkRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
	})(DocumentLinkRequest || (exports.DocumentLinkRequest = DocumentLinkRequest = {}));
	var DocumentLinkResolveRequest;
	(function (DocumentLinkResolveRequest) {
	    DocumentLinkResolveRequest.method = 'documentLink/resolve';
	    DocumentLinkResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType(DocumentLinkResolveRequest.method);
	})(DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = DocumentLinkResolveRequest = {}));
	var DocumentFormattingRequest;
	(function (DocumentFormattingRequest) {
	    DocumentFormattingRequest.method = 'textDocument/formatting';
	    DocumentFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
	})(DocumentFormattingRequest || (exports.DocumentFormattingRequest = DocumentFormattingRequest = {}));
	var DocumentRangeFormattingRequest;
	(function (DocumentRangeFormattingRequest) {
	    DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
	    DocumentRangeFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
	})(DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = DocumentRangeFormattingRequest = {}));
	var DocumentRangesFormattingRequest;
	(function (DocumentRangesFormattingRequest) {
	    DocumentRangesFormattingRequest.method = 'textDocument/rangesFormatting';
	    DocumentRangesFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentRangesFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangesFormattingRequest.method);
	})(DocumentRangesFormattingRequest || (exports.DocumentRangesFormattingRequest = DocumentRangesFormattingRequest = {}));
	var DocumentOnTypeFormattingRequest;
	(function (DocumentOnTypeFormattingRequest) {
	    DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
	    DocumentOnTypeFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
	})(DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = DocumentOnTypeFormattingRequest = {}));
	var PrepareSupportDefaultBehavior;
	(function (PrepareSupportDefaultBehavior) {
	    PrepareSupportDefaultBehavior.Identifier = 1;
	})(PrepareSupportDefaultBehavior || (exports.PrepareSupportDefaultBehavior = PrepareSupportDefaultBehavior = {}));
	var RenameRequest;
	(function (RenameRequest) {
	    RenameRequest.method = 'textDocument/rename';
	    RenameRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
	})(RenameRequest || (exports.RenameRequest = RenameRequest = {}));
	var PrepareRenameRequest;
	(function (PrepareRenameRequest) {
	    PrepareRenameRequest.method = 'textDocument/prepareRename';
	    PrepareRenameRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
	})(PrepareRenameRequest || (exports.PrepareRenameRequest = PrepareRenameRequest = {}));
	var ExecuteCommandRequest;
	(function (ExecuteCommandRequest) {
	    ExecuteCommandRequest.method = 'workspace/executeCommand';
	    ExecuteCommandRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    ExecuteCommandRequest.type = new messages_1.ProtocolRequestType(ExecuteCommandRequest.method);
	})(ExecuteCommandRequest || (exports.ExecuteCommandRequest = ExecuteCommandRequest = {}));
	var ApplyWorkspaceEditRequest;
	(function (ApplyWorkspaceEditRequest) {
	    ApplyWorkspaceEditRequest.method = 'workspace/applyEdit';
	    ApplyWorkspaceEditRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
	})(ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = ApplyWorkspaceEditRequest = {}));
} (protocol$1));
getDefaultExportFromCjs(protocol$1);

var connection$2 = {};

Object.defineProperty(connection$2, "__esModule", { value: true });
connection$2.createProtocolConnection = void 0;
const vscode_jsonrpc_1$1 = main$6;
function createProtocolConnection$1(input, output, logger, options) {
    if (vscode_jsonrpc_1$1.ConnectionStrategy.is(options)) {
        options = { connectionStrategy: options };
    }
    return (0, vscode_jsonrpc_1$1.createMessageConnection)(input, output, logger, options);
}
connection$2.createProtocolConnection = createProtocolConnection$1;

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.LSPErrorCodes = exports.createProtocolConnection = void 0;
	__exportStar(main$6, exports);
	__exportStar(mainExports, exports);
	__exportStar(messages$2, exports);
	__exportStar(protocol$1, exports);
	var connection_1 = connection$2;
	Object.defineProperty(exports, "createProtocolConnection", { enumerable: true, get: function () { return connection_1.createProtocolConnection; } });
	var LSPErrorCodes;
	(function (LSPErrorCodes) {
	    LSPErrorCodes.lspReservedErrorRangeStart = -32899;
	    LSPErrorCodes.RequestFailed = -32803;
	    LSPErrorCodes.ServerCancelled = -32802;
	    LSPErrorCodes.ContentModified = -32801;
	    LSPErrorCodes.RequestCancelled = -32800;
	    LSPErrorCodes.lspReservedErrorRangeEnd = -32800;
	})(LSPErrorCodes || (exports.LSPErrorCodes = LSPErrorCodes = {}));
} (api$3));
getDefaultExportFromCjs(api$3);

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.createProtocolConnection = void 0;
	const node_1 = node$3;
	__exportStar(node$3, exports);
	__exportStar(api$3, exports);
	function createProtocolConnection(input, output, logger, options) {
	    return (0, node_1.createMessageConnection)(input, output, logger, options);
	}
	exports.createProtocolConnection = createProtocolConnection;
} (main$7));
getDefaultExportFromCjs(main$7);

var uuid = {};

Object.defineProperty(uuid, "__esModule", { value: true });
uuid.generateUuid = uuid.parse = uuid.isUUID = uuid.v4 = uuid.empty = void 0;
class ValueUUID {
    constructor(_value) {
        this._value = _value;
    }
    asHex() {
        return this._value;
    }
    equals(other) {
        return this.asHex() === other.asHex();
    }
}
class V4UUID extends ValueUUID {
    static _oneOf(array) {
        return array[Math.floor(array.length * Math.random())];
    }
    static _randomHex() {
        return V4UUID._oneOf(V4UUID._chars);
    }
    constructor() {
        super([
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            '-',
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            '-',
            '4',
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            '-',
            V4UUID._oneOf(V4UUID._timeHighBits),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            '-',
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
            V4UUID._randomHex(),
        ].join(''));
    }
}
V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
V4UUID._timeHighBits = ['8', '9', 'a', 'b'];
uuid.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');
function v4() {
    return new V4UUID();
}
uuid.v4 = v4;
const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
function isUUID(value) {
    return _UUIDPattern.test(value);
}
uuid.isUUID = isUUID;
function parse$5(value) {
    if (!isUUID(value)) {
        throw new Error('invalid uuid');
    }
    return new ValueUUID(value);
}
uuid.parse = parse$5;
function generateUuid() {
    return v4().asHex();
}
uuid.generateUuid = generateUuid;

var progress = {};

Object.defineProperty(progress, "__esModule", { value: true });
progress.attachPartialResult = progress.ProgressFeature = progress.attachWorkDone = void 0;
const vscode_languageserver_protocol_1$j = main$7;
const uuid_1 = uuid;
class WorkDoneProgressReporterImpl {
    constructor(_connection, _token) {
        this._connection = _connection;
        this._token = _token;
        WorkDoneProgressReporterImpl.Instances.set(this._token, this);
    }
    begin(title, percentage, message, cancellable) {
        let param = {
            kind: 'begin',
            title,
            percentage,
            message,
            cancellable
        };
        this._connection.sendProgress(vscode_languageserver_protocol_1$j.WorkDoneProgress.type, this._token, param);
    }
    report(arg0, arg1) {
        let param = {
            kind: 'report'
        };
        if (typeof arg0 === 'number') {
            param.percentage = arg0;
            if (arg1 !== undefined) {
                param.message = arg1;
            }
        }
        else {
            param.message = arg0;
        }
        this._connection.sendProgress(vscode_languageserver_protocol_1$j.WorkDoneProgress.type, this._token, param);
    }
    done() {
        WorkDoneProgressReporterImpl.Instances.delete(this._token);
        this._connection.sendProgress(vscode_languageserver_protocol_1$j.WorkDoneProgress.type, this._token, { kind: 'end' });
    }
}
WorkDoneProgressReporterImpl.Instances = new Map();
class WorkDoneProgressServerReporterImpl extends WorkDoneProgressReporterImpl {
    constructor(connection, token) {
        super(connection, token);
        this._source = new vscode_languageserver_protocol_1$j.CancellationTokenSource();
    }
    get token() {
        return this._source.token;
    }
    done() {
        this._source.dispose();
        super.done();
    }
    cancel() {
        this._source.cancel();
    }
}
class NullProgressReporter {
    constructor() {
    }
    begin() {
    }
    report() {
    }
    done() {
    }
}
class NullProgressServerReporter extends NullProgressReporter {
    constructor() {
        super();
        this._source = new vscode_languageserver_protocol_1$j.CancellationTokenSource();
    }
    get token() {
        return this._source.token;
    }
    done() {
        this._source.dispose();
    }
    cancel() {
        this._source.cancel();
    }
}
function attachWorkDone(connection, params) {
    if (params === undefined || params.workDoneToken === undefined) {
        return new NullProgressReporter();
    }
    const token = params.workDoneToken;
    delete params.workDoneToken;
    return new WorkDoneProgressReporterImpl(connection, token);
}
progress.attachWorkDone = attachWorkDone;
const ProgressFeature = (Base) => {
    return class extends Base {
        constructor() {
            super();
            this._progressSupported = false;
        }
        initialize(capabilities) {
            super.initialize(capabilities);
            if (capabilities?.window?.workDoneProgress === true) {
                this._progressSupported = true;
                this.connection.onNotification(vscode_languageserver_protocol_1$j.WorkDoneProgressCancelNotification.type, (params) => {
                    let progress = WorkDoneProgressReporterImpl.Instances.get(params.token);
                    if (progress instanceof WorkDoneProgressServerReporterImpl || progress instanceof NullProgressServerReporter) {
                        progress.cancel();
                    }
                });
            }
        }
        attachWorkDoneProgress(token) {
            if (token === undefined) {
                return new NullProgressReporter();
            }
            else {
                return new WorkDoneProgressReporterImpl(this.connection, token);
            }
        }
        createWorkDoneProgress() {
            if (this._progressSupported) {
                const token = (0, uuid_1.generateUuid)();
                return this.connection.sendRequest(vscode_languageserver_protocol_1$j.WorkDoneProgressCreateRequest.type, { token }).then(() => {
                    const result = new WorkDoneProgressServerReporterImpl(this.connection, token);
                    return result;
                });
            }
            else {
                return Promise.resolve(new NullProgressServerReporter());
            }
        }
    };
};
progress.ProgressFeature = ProgressFeature;
var ResultProgress;
(function (ResultProgress) {
    ResultProgress.type = new vscode_languageserver_protocol_1$j.ProgressType();
})(ResultProgress || (ResultProgress = {}));
class ResultProgressReporterImpl {
    constructor(_connection, _token) {
        this._connection = _connection;
        this._token = _token;
    }
    report(data) {
        this._connection.sendProgress(ResultProgress.type, this._token, data);
    }
}
function attachPartialResult(connection, params) {
    if (params === undefined || params.partialResultToken === undefined) {
        return undefined;
    }
    const token = params.partialResultToken;
    delete params.partialResultToken;
    return new ResultProgressReporterImpl(connection, token);
}
progress.attachPartialResult = attachPartialResult;

var configuration = {};

Object.defineProperty(configuration, "__esModule", { value: true });
configuration.ConfigurationFeature = void 0;
const vscode_languageserver_protocol_1$i = main$7;
const Is$3 = is$4;
const ConfigurationFeature = (Base) => {
    return class extends Base {
        getConfiguration(arg) {
            if (!arg) {
                return this._getConfiguration({});
            }
            else if (Is$3.string(arg)) {
                return this._getConfiguration({ section: arg });
            }
            else {
                return this._getConfiguration(arg);
            }
        }
        _getConfiguration(arg) {
            let params = {
                items: Array.isArray(arg) ? arg : [arg]
            };
            return this.connection.sendRequest(vscode_languageserver_protocol_1$i.ConfigurationRequest.type, params).then((result) => {
                if (Array.isArray(result)) {
                    return Array.isArray(arg) ? result : result[0];
                }
                else {
                    return Array.isArray(arg) ? [] : null;
                }
            });
        }
    };
};
configuration.ConfigurationFeature = ConfigurationFeature;

var workspaceFolder = {};

Object.defineProperty(workspaceFolder, "__esModule", { value: true });
workspaceFolder.WorkspaceFoldersFeature = void 0;
const vscode_languageserver_protocol_1$h = main$7;
const WorkspaceFoldersFeature = (Base) => {
    return class extends Base {
        constructor() {
            super();
            this._notificationIsAutoRegistered = false;
        }
        initialize(capabilities) {
            super.initialize(capabilities);
            let workspaceCapabilities = capabilities.workspace;
            if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
                this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1$h.Emitter();
                this.connection.onNotification(vscode_languageserver_protocol_1$h.DidChangeWorkspaceFoldersNotification.type, (params) => {
                    this._onDidChangeWorkspaceFolders.fire(params.event);
                });
            }
        }
        fillServerCapabilities(capabilities) {
            super.fillServerCapabilities(capabilities);
            const changeNotifications = capabilities.workspace?.workspaceFolders?.changeNotifications;
            this._notificationIsAutoRegistered = changeNotifications === true || typeof changeNotifications === 'string';
        }
        getWorkspaceFolders() {
            return this.connection.sendRequest(vscode_languageserver_protocol_1$h.WorkspaceFoldersRequest.type);
        }
        get onDidChangeWorkspaceFolders() {
            if (!this._onDidChangeWorkspaceFolders) {
                throw new Error('Client doesn\'t support sending workspace folder change events.');
            }
            if (!this._notificationIsAutoRegistered && !this._unregistration) {
                this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1$h.DidChangeWorkspaceFoldersNotification.type);
            }
            return this._onDidChangeWorkspaceFolders.event;
        }
    };
};
workspaceFolder.WorkspaceFoldersFeature = WorkspaceFoldersFeature;

var callHierarchy = {};

Object.defineProperty(callHierarchy, "__esModule", { value: true });
callHierarchy.CallHierarchyFeature = void 0;
const vscode_languageserver_protocol_1$g = main$7;
const CallHierarchyFeature = (Base) => {
    return class extends Base {
        get callHierarchy() {
            return {
                onPrepare: (handler) => {
                    return this.connection.onRequest(vscode_languageserver_protocol_1$g.CallHierarchyPrepareRequest.type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
                    });
                },
                onIncomingCalls: (handler) => {
                    const type = vscode_languageserver_protocol_1$g.CallHierarchyIncomingCallsRequest.type;
                    return this.connection.onRequest(type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
                    });
                },
                onOutgoingCalls: (handler) => {
                    const type = vscode_languageserver_protocol_1$g.CallHierarchyOutgoingCallsRequest.type;
                    return this.connection.onRequest(type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
                    });
                }
            };
        }
    };
};
callHierarchy.CallHierarchyFeature = CallHierarchyFeature;

var semanticTokens = {};

Object.defineProperty(semanticTokens, "__esModule", { value: true });
semanticTokens.SemanticTokensBuilder = semanticTokens.SemanticTokensDiff = semanticTokens.SemanticTokensFeature = void 0;
const vscode_languageserver_protocol_1$f = main$7;
const SemanticTokensFeature = (Base) => {
    return class extends Base {
        get semanticTokens() {
            return {
                refresh: () => {
                    return this.connection.sendRequest(vscode_languageserver_protocol_1$f.SemanticTokensRefreshRequest.type);
                },
                on: (handler) => {
                    const type = vscode_languageserver_protocol_1$f.SemanticTokensRequest.type;
                    return this.connection.onRequest(type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
                    });
                },
                onDelta: (handler) => {
                    const type = vscode_languageserver_protocol_1$f.SemanticTokensDeltaRequest.type;
                    return this.connection.onRequest(type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
                    });
                },
                onRange: (handler) => {
                    const type = vscode_languageserver_protocol_1$f.SemanticTokensRangeRequest.type;
                    return this.connection.onRequest(type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
                    });
                }
            };
        }
    };
};
semanticTokens.SemanticTokensFeature = SemanticTokensFeature;
class SemanticTokensDiff {
    constructor(originalSequence, modifiedSequence) {
        this.originalSequence = originalSequence;
        this.modifiedSequence = modifiedSequence;
    }
    computeDiff() {
        const originalLength = this.originalSequence.length;
        const modifiedLength = this.modifiedSequence.length;
        let startIndex = 0;
        while (startIndex < modifiedLength && startIndex < originalLength && this.originalSequence[startIndex] === this.modifiedSequence[startIndex]) {
            startIndex++;
        }
        if (startIndex < modifiedLength && startIndex < originalLength) {
            let originalEndIndex = originalLength - 1;
            let modifiedEndIndex = modifiedLength - 1;
            while (originalEndIndex >= startIndex && modifiedEndIndex >= startIndex && this.originalSequence[originalEndIndex] === this.modifiedSequence[modifiedEndIndex]) {
                originalEndIndex--;
                modifiedEndIndex--;
            }
            if (originalEndIndex < startIndex || modifiedEndIndex < startIndex) {
                originalEndIndex++;
                modifiedEndIndex++;
            }
            const deleteCount = originalEndIndex - startIndex + 1;
            const newData = this.modifiedSequence.slice(startIndex, modifiedEndIndex + 1);
            if (newData.length === 1 && newData[0] === this.originalSequence[originalEndIndex]) {
                return [
                    { start: startIndex, deleteCount: deleteCount - 1 }
                ];
            }
            else {
                return [
                    { start: startIndex, deleteCount, data: newData }
                ];
            }
        }
        else if (startIndex < modifiedLength) {
            return [
                { start: startIndex, deleteCount: 0, data: this.modifiedSequence.slice(startIndex) }
            ];
        }
        else if (startIndex < originalLength) {
            return [
                { start: startIndex, deleteCount: originalLength - startIndex }
            ];
        }
        else {
            return [];
        }
    }
}
semanticTokens.SemanticTokensDiff = SemanticTokensDiff;
class SemanticTokensBuilder {
    constructor() {
        this._prevData = undefined;
        this.initialize();
    }
    initialize() {
        this._id = Date.now();
        this._prevLine = 0;
        this._prevChar = 0;
        this._data = [];
        this._dataLen = 0;
    }
    push(line, char, length, tokenType, tokenModifiers) {
        let pushLine = line;
        let pushChar = char;
        if (this._dataLen > 0) {
            pushLine -= this._prevLine;
            if (pushLine === 0) {
                pushChar -= this._prevChar;
            }
        }
        this._data[this._dataLen++] = pushLine;
        this._data[this._dataLen++] = pushChar;
        this._data[this._dataLen++] = length;
        this._data[this._dataLen++] = tokenType;
        this._data[this._dataLen++] = tokenModifiers;
        this._prevLine = line;
        this._prevChar = char;
    }
    get id() {
        return this._id.toString();
    }
    previousResult(id) {
        if (this.id === id) {
            this._prevData = this._data;
        }
        this.initialize();
    }
    build() {
        this._prevData = undefined;
        return {
            resultId: this.id,
            data: this._data
        };
    }
    canBuildEdits() {
        return this._prevData !== undefined;
    }
    buildEdits() {
        if (this._prevData !== undefined) {
            return {
                resultId: this.id,
                edits: (new SemanticTokensDiff(this._prevData, this._data)).computeDiff()
            };
        }
        else {
            return this.build();
        }
    }
}
semanticTokens.SemanticTokensBuilder = SemanticTokensBuilder;

var showDocument = {};

Object.defineProperty(showDocument, "__esModule", { value: true });
showDocument.ShowDocumentFeature = void 0;
const vscode_languageserver_protocol_1$e = main$7;
const ShowDocumentFeature = (Base) => {
    return class extends Base {
        showDocument(params) {
            return this.connection.sendRequest(vscode_languageserver_protocol_1$e.ShowDocumentRequest.type, params);
        }
    };
};
showDocument.ShowDocumentFeature = ShowDocumentFeature;

var fileOperations = {};

Object.defineProperty(fileOperations, "__esModule", { value: true });
fileOperations.FileOperationsFeature = void 0;
const vscode_languageserver_protocol_1$d = main$7;
const FileOperationsFeature = (Base) => {
    return class extends Base {
        onDidCreateFiles(handler) {
            return this.connection.onNotification(vscode_languageserver_protocol_1$d.DidCreateFilesNotification.type, (params) => {
                handler(params);
            });
        }
        onDidRenameFiles(handler) {
            return this.connection.onNotification(vscode_languageserver_protocol_1$d.DidRenameFilesNotification.type, (params) => {
                handler(params);
            });
        }
        onDidDeleteFiles(handler) {
            return this.connection.onNotification(vscode_languageserver_protocol_1$d.DidDeleteFilesNotification.type, (params) => {
                handler(params);
            });
        }
        onWillCreateFiles(handler) {
            return this.connection.onRequest(vscode_languageserver_protocol_1$d.WillCreateFilesRequest.type, (params, cancel) => {
                return handler(params, cancel);
            });
        }
        onWillRenameFiles(handler) {
            return this.connection.onRequest(vscode_languageserver_protocol_1$d.WillRenameFilesRequest.type, (params, cancel) => {
                return handler(params, cancel);
            });
        }
        onWillDeleteFiles(handler) {
            return this.connection.onRequest(vscode_languageserver_protocol_1$d.WillDeleteFilesRequest.type, (params, cancel) => {
                return handler(params, cancel);
            });
        }
    };
};
fileOperations.FileOperationsFeature = FileOperationsFeature;

var linkedEditingRange = {};

Object.defineProperty(linkedEditingRange, "__esModule", { value: true });
linkedEditingRange.LinkedEditingRangeFeature = void 0;
const vscode_languageserver_protocol_1$c = main$7;
const LinkedEditingRangeFeature = (Base) => {
    return class extends Base {
        onLinkedEditingRange(handler) {
            return this.connection.onRequest(vscode_languageserver_protocol_1$c.LinkedEditingRangeRequest.type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
            });
        }
    };
};
linkedEditingRange.LinkedEditingRangeFeature = LinkedEditingRangeFeature;

var typeHierarchy = {};

Object.defineProperty(typeHierarchy, "__esModule", { value: true });
typeHierarchy.TypeHierarchyFeature = void 0;
const vscode_languageserver_protocol_1$b = main$7;
const TypeHierarchyFeature = (Base) => {
    return class extends Base {
        get typeHierarchy() {
            return {
                onPrepare: (handler) => {
                    return this.connection.onRequest(vscode_languageserver_protocol_1$b.TypeHierarchyPrepareRequest.type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
                    });
                },
                onSupertypes: (handler) => {
                    const type = vscode_languageserver_protocol_1$b.TypeHierarchySupertypesRequest.type;
                    return this.connection.onRequest(type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
                    });
                },
                onSubtypes: (handler) => {
                    const type = vscode_languageserver_protocol_1$b.TypeHierarchySubtypesRequest.type;
                    return this.connection.onRequest(type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
                    });
                }
            };
        }
    };
};
typeHierarchy.TypeHierarchyFeature = TypeHierarchyFeature;

var inlineValue = {};

Object.defineProperty(inlineValue, "__esModule", { value: true });
inlineValue.InlineValueFeature = void 0;
const vscode_languageserver_protocol_1$a = main$7;
const InlineValueFeature = (Base) => {
    return class extends Base {
        get inlineValue() {
            return {
                refresh: () => {
                    return this.connection.sendRequest(vscode_languageserver_protocol_1$a.InlineValueRefreshRequest.type);
                },
                on: (handler) => {
                    return this.connection.onRequest(vscode_languageserver_protocol_1$a.InlineValueRequest.type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params));
                    });
                }
            };
        }
    };
};
inlineValue.InlineValueFeature = InlineValueFeature;

var foldingRange = {};

Object.defineProperty(foldingRange, "__esModule", { value: true });
foldingRange.FoldingRangeFeature = void 0;
const vscode_languageserver_protocol_1$9 = main$7;
const FoldingRangeFeature = (Base) => {
    return class extends Base {
        get foldingRange() {
            return {
                refresh: () => {
                    return this.connection.sendRequest(vscode_languageserver_protocol_1$9.FoldingRangeRefreshRequest.type);
                },
                on: (handler) => {
                    const type = vscode_languageserver_protocol_1$9.FoldingRangeRequest.type;
                    return this.connection.onRequest(type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
                    });
                }
            };
        }
    };
};
foldingRange.FoldingRangeFeature = FoldingRangeFeature;

var inlayHint = {};

Object.defineProperty(inlayHint, "__esModule", { value: true });
inlayHint.InlayHintFeature = void 0;
const vscode_languageserver_protocol_1$8 = main$7;
const InlayHintFeature = (Base) => {
    return class extends Base {
        get inlayHint() {
            return {
                refresh: () => {
                    return this.connection.sendRequest(vscode_languageserver_protocol_1$8.InlayHintRefreshRequest.type);
                },
                on: (handler) => {
                    return this.connection.onRequest(vscode_languageserver_protocol_1$8.InlayHintRequest.type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params));
                    });
                },
                resolve: (handler) => {
                    return this.connection.onRequest(vscode_languageserver_protocol_1$8.InlayHintResolveRequest.type, (params, cancel) => {
                        return handler(params, cancel);
                    });
                }
            };
        }
    };
};
inlayHint.InlayHintFeature = InlayHintFeature;

var diagnostic = {};

Object.defineProperty(diagnostic, "__esModule", { value: true });
diagnostic.DiagnosticFeature = void 0;
const vscode_languageserver_protocol_1$7 = main$7;
const DiagnosticFeature = (Base) => {
    return class extends Base {
        get diagnostics() {
            return {
                refresh: () => {
                    return this.connection.sendRequest(vscode_languageserver_protocol_1$7.DiagnosticRefreshRequest.type);
                },
                on: (handler) => {
                    return this.connection.onRequest(vscode_languageserver_protocol_1$7.DocumentDiagnosticRequest.type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(vscode_languageserver_protocol_1$7.DocumentDiagnosticRequest.partialResult, params));
                    });
                },
                onWorkspace: (handler) => {
                    return this.connection.onRequest(vscode_languageserver_protocol_1$7.WorkspaceDiagnosticRequest.type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(vscode_languageserver_protocol_1$7.WorkspaceDiagnosticRequest.partialResult, params));
                    });
                }
            };
        }
    };
};
diagnostic.DiagnosticFeature = DiagnosticFeature;

var notebook = {};

var textDocuments = {};

Object.defineProperty(textDocuments, "__esModule", { value: true });
textDocuments.TextDocuments = void 0;
const vscode_languageserver_protocol_1$6 = main$7;
class TextDocuments {
    constructor(configuration) {
        this._configuration = configuration;
        this._syncedDocuments = new Map();
        this._onDidChangeContent = new vscode_languageserver_protocol_1$6.Emitter();
        this._onDidOpen = new vscode_languageserver_protocol_1$6.Emitter();
        this._onDidClose = new vscode_languageserver_protocol_1$6.Emitter();
        this._onDidSave = new vscode_languageserver_protocol_1$6.Emitter();
        this._onWillSave = new vscode_languageserver_protocol_1$6.Emitter();
    }
    get onDidOpen() {
        return this._onDidOpen.event;
    }
    get onDidChangeContent() {
        return this._onDidChangeContent.event;
    }
    get onWillSave() {
        return this._onWillSave.event;
    }
    onWillSaveWaitUntil(handler) {
        this._willSaveWaitUntil = handler;
    }
    get onDidSave() {
        return this._onDidSave.event;
    }
    get onDidClose() {
        return this._onDidClose.event;
    }
    get(uri) {
        return this._syncedDocuments.get(uri);
    }
    all() {
        return Array.from(this._syncedDocuments.values());
    }
    keys() {
        return Array.from(this._syncedDocuments.keys());
    }
    listen(connection) {
        connection.__textDocumentSync = vscode_languageserver_protocol_1$6.TextDocumentSyncKind.Incremental;
        const disposables = [];
        disposables.push(connection.onDidOpenTextDocument((event) => {
            const td = event.textDocument;
            const document = this._configuration.create(td.uri, td.languageId, td.version, td.text);
            this._syncedDocuments.set(td.uri, document);
            const toFire = Object.freeze({ document });
            this._onDidOpen.fire(toFire);
            this._onDidChangeContent.fire(toFire);
        }));
        disposables.push(connection.onDidChangeTextDocument((event) => {
            const td = event.textDocument;
            const changes = event.contentChanges;
            if (changes.length === 0) {
                return;
            }
            const { version } = td;
            if (version === null || version === undefined) {
                throw new Error(`Received document change event for ${td.uri} without valid version identifier`);
            }
            let syncedDocument = this._syncedDocuments.get(td.uri);
            if (syncedDocument !== undefined) {
                syncedDocument = this._configuration.update(syncedDocument, changes, version);
                this._syncedDocuments.set(td.uri, syncedDocument);
                this._onDidChangeContent.fire(Object.freeze({ document: syncedDocument }));
            }
        }));
        disposables.push(connection.onDidCloseTextDocument((event) => {
            let syncedDocument = this._syncedDocuments.get(event.textDocument.uri);
            if (syncedDocument !== undefined) {
                this._syncedDocuments.delete(event.textDocument.uri);
                this._onDidClose.fire(Object.freeze({ document: syncedDocument }));
            }
        }));
        disposables.push(connection.onWillSaveTextDocument((event) => {
            let syncedDocument = this._syncedDocuments.get(event.textDocument.uri);
            if (syncedDocument !== undefined) {
                this._onWillSave.fire(Object.freeze({ document: syncedDocument, reason: event.reason }));
            }
        }));
        disposables.push(connection.onWillSaveTextDocumentWaitUntil((event, token) => {
            let syncedDocument = this._syncedDocuments.get(event.textDocument.uri);
            if (syncedDocument !== undefined && this._willSaveWaitUntil) {
                return this._willSaveWaitUntil(Object.freeze({ document: syncedDocument, reason: event.reason }), token);
            }
            else {
                return [];
            }
        }));
        disposables.push(connection.onDidSaveTextDocument((event) => {
            let syncedDocument = this._syncedDocuments.get(event.textDocument.uri);
            if (syncedDocument !== undefined) {
                this._onDidSave.fire(Object.freeze({ document: syncedDocument }));
            }
        }));
        return vscode_languageserver_protocol_1$6.Disposable.create(() => { disposables.forEach(disposable => disposable.dispose()); });
    }
}
textDocuments.TextDocuments = TextDocuments;

Object.defineProperty(notebook, "__esModule", { value: true });
notebook.NotebookDocuments = notebook.NotebookSyncFeature = void 0;
const vscode_languageserver_protocol_1$5 = main$7;
const textDocuments_1 = textDocuments;
const NotebookSyncFeature = (Base) => {
    return class extends Base {
        get synchronization() {
            return {
                onDidOpenNotebookDocument: (handler) => {
                    return this.connection.onNotification(vscode_languageserver_protocol_1$5.DidOpenNotebookDocumentNotification.type, (params) => {
                        handler(params);
                    });
                },
                onDidChangeNotebookDocument: (handler) => {
                    return this.connection.onNotification(vscode_languageserver_protocol_1$5.DidChangeNotebookDocumentNotification.type, (params) => {
                        handler(params);
                    });
                },
                onDidSaveNotebookDocument: (handler) => {
                    return this.connection.onNotification(vscode_languageserver_protocol_1$5.DidSaveNotebookDocumentNotification.type, (params) => {
                        handler(params);
                    });
                },
                onDidCloseNotebookDocument: (handler) => {
                    return this.connection.onNotification(vscode_languageserver_protocol_1$5.DidCloseNotebookDocumentNotification.type, (params) => {
                        handler(params);
                    });
                }
            };
        }
    };
};
notebook.NotebookSyncFeature = NotebookSyncFeature;
class CellTextDocumentConnection {
    onDidOpenTextDocument(handler) {
        this.openHandler = handler;
        return vscode_languageserver_protocol_1$5.Disposable.create(() => { this.openHandler = undefined; });
    }
    openTextDocument(params) {
        this.openHandler && this.openHandler(params);
    }
    onDidChangeTextDocument(handler) {
        this.changeHandler = handler;
        return vscode_languageserver_protocol_1$5.Disposable.create(() => { this.changeHandler = handler; });
    }
    changeTextDocument(params) {
        this.changeHandler && this.changeHandler(params);
    }
    onDidCloseTextDocument(handler) {
        this.closeHandler = handler;
        return vscode_languageserver_protocol_1$5.Disposable.create(() => { this.closeHandler = undefined; });
    }
    closeTextDocument(params) {
        this.closeHandler && this.closeHandler(params);
    }
    onWillSaveTextDocument() {
        return CellTextDocumentConnection.NULL_DISPOSE;
    }
    onWillSaveTextDocumentWaitUntil() {
        return CellTextDocumentConnection.NULL_DISPOSE;
    }
    onDidSaveTextDocument() {
        return CellTextDocumentConnection.NULL_DISPOSE;
    }
}
CellTextDocumentConnection.NULL_DISPOSE = Object.freeze({ dispose: () => { } });
class NotebookDocuments {
    constructor(configurationOrTextDocuments) {
        if (configurationOrTextDocuments instanceof textDocuments_1.TextDocuments) {
            this._cellTextDocuments = configurationOrTextDocuments;
        }
        else {
            this._cellTextDocuments = new textDocuments_1.TextDocuments(configurationOrTextDocuments);
        }
        this.notebookDocuments = new Map();
        this.notebookCellMap = new Map();
        this._onDidOpen = new vscode_languageserver_protocol_1$5.Emitter();
        this._onDidChange = new vscode_languageserver_protocol_1$5.Emitter();
        this._onDidSave = new vscode_languageserver_protocol_1$5.Emitter();
        this._onDidClose = new vscode_languageserver_protocol_1$5.Emitter();
    }
    get cellTextDocuments() {
        return this._cellTextDocuments;
    }
    getCellTextDocument(cell) {
        return this._cellTextDocuments.get(cell.document);
    }
    getNotebookDocument(uri) {
        return this.notebookDocuments.get(uri);
    }
    getNotebookCell(uri) {
        const value = this.notebookCellMap.get(uri);
        return value && value[0];
    }
    findNotebookDocumentForCell(cell) {
        const key = typeof cell === 'string' ? cell : cell.document;
        const value = this.notebookCellMap.get(key);
        return value && value[1];
    }
    get onDidOpen() {
        return this._onDidOpen.event;
    }
    get onDidSave() {
        return this._onDidSave.event;
    }
    get onDidChange() {
        return this._onDidChange.event;
    }
    get onDidClose() {
        return this._onDidClose.event;
    }
    listen(connection) {
        const cellTextDocumentConnection = new CellTextDocumentConnection();
        const disposables = [];
        disposables.push(this.cellTextDocuments.listen(cellTextDocumentConnection));
        disposables.push(connection.notebooks.synchronization.onDidOpenNotebookDocument((params) => {
            this.notebookDocuments.set(params.notebookDocument.uri, params.notebookDocument);
            for (const cellTextDocument of params.cellTextDocuments) {
                cellTextDocumentConnection.openTextDocument({ textDocument: cellTextDocument });
            }
            this.updateCellMap(params.notebookDocument);
            this._onDidOpen.fire(params.notebookDocument);
        }));
        disposables.push(connection.notebooks.synchronization.onDidChangeNotebookDocument((params) => {
            const notebookDocument = this.notebookDocuments.get(params.notebookDocument.uri);
            if (notebookDocument === undefined) {
                return;
            }
            notebookDocument.version = params.notebookDocument.version;
            const oldMetadata = notebookDocument.metadata;
            let metadataChanged = false;
            const change = params.change;
            if (change.metadata !== undefined) {
                metadataChanged = true;
                notebookDocument.metadata = change.metadata;
            }
            const opened = [];
            const closed = [];
            const data = [];
            const text = [];
            if (change.cells !== undefined) {
                const changedCells = change.cells;
                if (changedCells.structure !== undefined) {
                    const array = changedCells.structure.array;
                    notebookDocument.cells.splice(array.start, array.deleteCount, ...(array.cells !== undefined ? array.cells : []));
                    if (changedCells.structure.didOpen !== undefined) {
                        for (const open of changedCells.structure.didOpen) {
                            cellTextDocumentConnection.openTextDocument({ textDocument: open });
                            opened.push(open.uri);
                        }
                    }
                    if (changedCells.structure.didClose) {
                        for (const close of changedCells.structure.didClose) {
                            cellTextDocumentConnection.closeTextDocument({ textDocument: close });
                            closed.push(close.uri);
                        }
                    }
                }
                if (changedCells.data !== undefined) {
                    const cellUpdates = new Map(changedCells.data.map(cell => [cell.document, cell]));
                    for (let i = 0; i <= notebookDocument.cells.length; i++) {
                        const change = cellUpdates.get(notebookDocument.cells[i].document);
                        if (change !== undefined) {
                            const old = notebookDocument.cells.splice(i, 1, change);
                            data.push({ old: old[0], new: change });
                            cellUpdates.delete(change.document);
                            if (cellUpdates.size === 0) {
                                break;
                            }
                        }
                    }
                }
                if (changedCells.textContent !== undefined) {
                    for (const cellTextDocument of changedCells.textContent) {
                        cellTextDocumentConnection.changeTextDocument({ textDocument: cellTextDocument.document, contentChanges: cellTextDocument.changes });
                        text.push(cellTextDocument.document.uri);
                    }
                }
            }
            this.updateCellMap(notebookDocument);
            const changeEvent = { notebookDocument };
            if (metadataChanged) {
                changeEvent.metadata = { old: oldMetadata, new: notebookDocument.metadata };
            }
            const added = [];
            for (const open of opened) {
                added.push(this.getNotebookCell(open));
            }
            const removed = [];
            for (const close of closed) {
                removed.push(this.getNotebookCell(close));
            }
            const textContent = [];
            for (const change of text) {
                textContent.push(this.getNotebookCell(change));
            }
            if (added.length > 0 || removed.length > 0 || data.length > 0 || textContent.length > 0) {
                changeEvent.cells = { added, removed, changed: { data, textContent } };
            }
            if (changeEvent.metadata !== undefined || changeEvent.cells !== undefined) {
                this._onDidChange.fire(changeEvent);
            }
        }));
        disposables.push(connection.notebooks.synchronization.onDidSaveNotebookDocument((params) => {
            const notebookDocument = this.notebookDocuments.get(params.notebookDocument.uri);
            if (notebookDocument === undefined) {
                return;
            }
            this._onDidSave.fire(notebookDocument);
        }));
        disposables.push(connection.notebooks.synchronization.onDidCloseNotebookDocument((params) => {
            const notebookDocument = this.notebookDocuments.get(params.notebookDocument.uri);
            if (notebookDocument === undefined) {
                return;
            }
            this._onDidClose.fire(notebookDocument);
            for (const cellTextDocument of params.cellTextDocuments) {
                cellTextDocumentConnection.closeTextDocument({ textDocument: cellTextDocument });
            }
            this.notebookDocuments.delete(params.notebookDocument.uri);
            for (const cell of notebookDocument.cells) {
                this.notebookCellMap.delete(cell.document);
            }
        }));
        return vscode_languageserver_protocol_1$5.Disposable.create(() => { disposables.forEach(disposable => disposable.dispose()); });
    }
    updateCellMap(notebookDocument) {
        for (const cell of notebookDocument.cells) {
            this.notebookCellMap.set(cell.document, [cell, notebookDocument]);
        }
    }
}
notebook.NotebookDocuments = NotebookDocuments;

var moniker = {};

Object.defineProperty(moniker, "__esModule", { value: true });
moniker.MonikerFeature = void 0;
const vscode_languageserver_protocol_1$4 = main$7;
const MonikerFeature = (Base) => {
    return class extends Base {
        get moniker() {
            return {
                on: (handler) => {
                    const type = vscode_languageserver_protocol_1$4.MonikerRequest.type;
                    return this.connection.onRequest(type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
                    });
                },
            };
        }
    };
};
moniker.MonikerFeature = MonikerFeature;

Object.defineProperty(server, "__esModule", { value: true });
server.createConnection = server.combineFeatures = server.combineNotebooksFeatures = server.combineLanguagesFeatures = server.combineWorkspaceFeatures = server.combineWindowFeatures = server.combineClientFeatures = server.combineTracerFeatures = server.combineTelemetryFeatures = server.combineConsoleFeatures = server._NotebooksImpl = server._LanguagesImpl = server.BulkUnregistration = server.BulkRegistration = server.ErrorMessageTracker = void 0;
const vscode_languageserver_protocol_1$3 = main$7;
const Is$2 = is$4;
const UUID = uuid;
const progress_1 = progress;
const configuration_1 = configuration;
const workspaceFolder_1 = workspaceFolder;
const callHierarchy_1 = callHierarchy;
const semanticTokens_1 = semanticTokens;
const showDocument_1 = showDocument;
const fileOperations_1 = fileOperations;
const linkedEditingRange_1 = linkedEditingRange;
const typeHierarchy_1 = typeHierarchy;
const inlineValue_1 = inlineValue;
const foldingRange_1 = foldingRange;
const inlayHint_1 = inlayHint;
const diagnostic_1 = diagnostic;
const notebook_1 = notebook;
const moniker_1 = moniker;
function null2Undefined(value) {
    if (value === null) {
        return undefined;
    }
    return value;
}
class ErrorMessageTracker {
    constructor() {
        this._messages = Object.create(null);
    }
    add(message) {
        let count = this._messages[message];
        if (!count) {
            count = 0;
        }
        count++;
        this._messages[message] = count;
    }
    sendErrors(connection) {
        Object.keys(this._messages).forEach(message => {
            connection.window.showErrorMessage(message);
        });
    }
}
server.ErrorMessageTracker = ErrorMessageTracker;
class RemoteConsoleImpl {
    constructor() {
    }
    rawAttach(connection) {
        this._rawConnection = connection;
    }
    attach(connection) {
        this._connection = connection;
    }
    get connection() {
        if (!this._connection) {
            throw new Error('Remote is not attached to a connection yet.');
        }
        return this._connection;
    }
    fillServerCapabilities(_capabilities) {
    }
    initialize(_capabilities) {
    }
    error(message) {
        this.send(vscode_languageserver_protocol_1$3.MessageType.Error, message);
    }
    warn(message) {
        this.send(vscode_languageserver_protocol_1$3.MessageType.Warning, message);
    }
    info(message) {
        this.send(vscode_languageserver_protocol_1$3.MessageType.Info, message);
    }
    log(message) {
        this.send(vscode_languageserver_protocol_1$3.MessageType.Log, message);
    }
    debug(message) {
        this.send(vscode_languageserver_protocol_1$3.MessageType.Debug, message);
    }
    send(type, message) {
        if (this._rawConnection) {
            this._rawConnection.sendNotification(vscode_languageserver_protocol_1$3.LogMessageNotification.type, { type, message }).catch(() => {
                (0, vscode_languageserver_protocol_1$3.RAL)().console.error(`Sending log message failed`);
            });
        }
    }
}
class _RemoteWindowImpl {
    constructor() {
    }
    attach(connection) {
        this._connection = connection;
    }
    get connection() {
        if (!this._connection) {
            throw new Error('Remote is not attached to a connection yet.');
        }
        return this._connection;
    }
    initialize(_capabilities) {
    }
    fillServerCapabilities(_capabilities) {
    }
    showErrorMessage(message, ...actions) {
        let params = { type: vscode_languageserver_protocol_1$3.MessageType.Error, message, actions };
        return this.connection.sendRequest(vscode_languageserver_protocol_1$3.ShowMessageRequest.type, params).then(null2Undefined);
    }
    showWarningMessage(message, ...actions) {
        let params = { type: vscode_languageserver_protocol_1$3.MessageType.Warning, message, actions };
        return this.connection.sendRequest(vscode_languageserver_protocol_1$3.ShowMessageRequest.type, params).then(null2Undefined);
    }
    showInformationMessage(message, ...actions) {
        let params = { type: vscode_languageserver_protocol_1$3.MessageType.Info, message, actions };
        return this.connection.sendRequest(vscode_languageserver_protocol_1$3.ShowMessageRequest.type, params).then(null2Undefined);
    }
}
const RemoteWindowImpl = (0, showDocument_1.ShowDocumentFeature)((0, progress_1.ProgressFeature)(_RemoteWindowImpl));
var BulkRegistration;
(function (BulkRegistration) {
    function create() {
        return new BulkRegistrationImpl();
    }
    BulkRegistration.create = create;
})(BulkRegistration || (server.BulkRegistration = BulkRegistration = {}));
class BulkRegistrationImpl {
    constructor() {
        this._registrations = [];
        this._registered = new Set();
    }
    add(type, registerOptions) {
        const method = Is$2.string(type) ? type : type.method;
        if (this._registered.has(method)) {
            throw new Error(`${method} is already added to this registration`);
        }
        const id = UUID.generateUuid();
        this._registrations.push({
            id: id,
            method: method,
            registerOptions: registerOptions || {}
        });
        this._registered.add(method);
    }
    asRegistrationParams() {
        return {
            registrations: this._registrations
        };
    }
}
var BulkUnregistration;
(function (BulkUnregistration) {
    function create() {
        return new BulkUnregistrationImpl(undefined, []);
    }
    BulkUnregistration.create = create;
})(BulkUnregistration || (server.BulkUnregistration = BulkUnregistration = {}));
class BulkUnregistrationImpl {
    constructor(_connection, unregistrations) {
        this._connection = _connection;
        this._unregistrations = new Map();
        unregistrations.forEach(unregistration => {
            this._unregistrations.set(unregistration.method, unregistration);
        });
    }
    get isAttached() {
        return !!this._connection;
    }
    attach(connection) {
        this._connection = connection;
    }
    add(unregistration) {
        this._unregistrations.set(unregistration.method, unregistration);
    }
    dispose() {
        let unregistrations = [];
        for (let unregistration of this._unregistrations.values()) {
            unregistrations.push(unregistration);
        }
        let params = {
            unregisterations: unregistrations
        };
        this._connection.sendRequest(vscode_languageserver_protocol_1$3.UnregistrationRequest.type, params).catch(() => {
            this._connection.console.info(`Bulk unregistration failed.`);
        });
    }
    disposeSingle(arg) {
        const method = Is$2.string(arg) ? arg : arg.method;
        const unregistration = this._unregistrations.get(method);
        if (!unregistration) {
            return false;
        }
        let params = {
            unregisterations: [unregistration]
        };
        this._connection.sendRequest(vscode_languageserver_protocol_1$3.UnregistrationRequest.type, params).then(() => {
            this._unregistrations.delete(method);
        }, (_error) => {
            this._connection.console.info(`Un-registering request handler for ${unregistration.id} failed.`);
        });
        return true;
    }
}
class RemoteClientImpl {
    attach(connection) {
        this._connection = connection;
    }
    get connection() {
        if (!this._connection) {
            throw new Error('Remote is not attached to a connection yet.');
        }
        return this._connection;
    }
    initialize(_capabilities) {
    }
    fillServerCapabilities(_capabilities) {
    }
    register(typeOrRegistrations, registerOptionsOrType, registerOptions) {
        if (typeOrRegistrations instanceof BulkRegistrationImpl) {
            return this.registerMany(typeOrRegistrations);
        }
        else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {
            return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);
        }
        else {
            return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);
        }
    }
    registerSingle1(unregistration, type, registerOptions) {
        const method = Is$2.string(type) ? type : type.method;
        const id = UUID.generateUuid();
        let params = {
            registrations: [{ id, method, registerOptions: registerOptions || {} }]
        };
        if (!unregistration.isAttached) {
            unregistration.attach(this.connection);
        }
        return this.connection.sendRequest(vscode_languageserver_protocol_1$3.RegistrationRequest.type, params).then((_result) => {
            unregistration.add({ id: id, method: method });
            return unregistration;
        }, (_error) => {
            this.connection.console.info(`Registering request handler for ${method} failed.`);
            return Promise.reject(_error);
        });
    }
    registerSingle2(type, registerOptions) {
        const method = Is$2.string(type) ? type : type.method;
        const id = UUID.generateUuid();
        let params = {
            registrations: [{ id, method, registerOptions: registerOptions || {} }]
        };
        return this.connection.sendRequest(vscode_languageserver_protocol_1$3.RegistrationRequest.type, params).then((_result) => {
            return vscode_languageserver_protocol_1$3.Disposable.create(() => {
                this.unregisterSingle(id, method).catch(() => { this.connection.console.info(`Un-registering capability with id ${id} failed.`); });
            });
        }, (_error) => {
            this.connection.console.info(`Registering request handler for ${method} failed.`);
            return Promise.reject(_error);
        });
    }
    unregisterSingle(id, method) {
        let params = {
            unregisterations: [{ id, method }]
        };
        return this.connection.sendRequest(vscode_languageserver_protocol_1$3.UnregistrationRequest.type, params).catch(() => {
            this.connection.console.info(`Un-registering request handler for ${id} failed.`);
        });
    }
    registerMany(registrations) {
        let params = registrations.asRegistrationParams();
        return this.connection.sendRequest(vscode_languageserver_protocol_1$3.RegistrationRequest.type, params).then(() => {
            return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));
        }, (_error) => {
            this.connection.console.info(`Bulk registration failed.`);
            return Promise.reject(_error);
        });
    }
}
class _RemoteWorkspaceImpl {
    constructor() {
    }
    attach(connection) {
        this._connection = connection;
    }
    get connection() {
        if (!this._connection) {
            throw new Error('Remote is not attached to a connection yet.');
        }
        return this._connection;
    }
    initialize(_capabilities) {
    }
    fillServerCapabilities(_capabilities) {
    }
    applyEdit(paramOrEdit) {
        function isApplyWorkspaceEditParams(value) {
            return value && !!value.edit;
        }
        let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };
        return this.connection.sendRequest(vscode_languageserver_protocol_1$3.ApplyWorkspaceEditRequest.type, params);
    }
}
const RemoteWorkspaceImpl = (0, fileOperations_1.FileOperationsFeature)((0, workspaceFolder_1.WorkspaceFoldersFeature)((0, configuration_1.ConfigurationFeature)(_RemoteWorkspaceImpl)));
class TracerImpl {
    constructor() {
        this._trace = vscode_languageserver_protocol_1$3.Trace.Off;
    }
    attach(connection) {
        this._connection = connection;
    }
    get connection() {
        if (!this._connection) {
            throw new Error('Remote is not attached to a connection yet.');
        }
        return this._connection;
    }
    initialize(_capabilities) {
    }
    fillServerCapabilities(_capabilities) {
    }
    set trace(value) {
        this._trace = value;
    }
    log(message, verbose) {
        if (this._trace === vscode_languageserver_protocol_1$3.Trace.Off) {
            return;
        }
        this.connection.sendNotification(vscode_languageserver_protocol_1$3.LogTraceNotification.type, {
            message: message,
            verbose: this._trace === vscode_languageserver_protocol_1$3.Trace.Verbose ? verbose : undefined
        }).catch(() => {
        });
    }
}
class TelemetryImpl {
    constructor() {
    }
    attach(connection) {
        this._connection = connection;
    }
    get connection() {
        if (!this._connection) {
            throw new Error('Remote is not attached to a connection yet.');
        }
        return this._connection;
    }
    initialize(_capabilities) {
    }
    fillServerCapabilities(_capabilities) {
    }
    logEvent(data) {
        this.connection.sendNotification(vscode_languageserver_protocol_1$3.TelemetryEventNotification.type, data).catch(() => {
            this.connection.console.log(`Sending TelemetryEventNotification failed`);
        });
    }
}
class _LanguagesImpl {
    constructor() {
    }
    attach(connection) {
        this._connection = connection;
    }
    get connection() {
        if (!this._connection) {
            throw new Error('Remote is not attached to a connection yet.');
        }
        return this._connection;
    }
    initialize(_capabilities) {
    }
    fillServerCapabilities(_capabilities) {
    }
    attachWorkDoneProgress(params) {
        return (0, progress_1.attachWorkDone)(this.connection, params);
    }
    attachPartialResultProgress(_type, params) {
        return (0, progress_1.attachPartialResult)(this.connection, params);
    }
}
server._LanguagesImpl = _LanguagesImpl;
const LanguagesImpl = (0, foldingRange_1.FoldingRangeFeature)((0, moniker_1.MonikerFeature)((0, diagnostic_1.DiagnosticFeature)((0, inlayHint_1.InlayHintFeature)((0, inlineValue_1.InlineValueFeature)((0, typeHierarchy_1.TypeHierarchyFeature)((0, linkedEditingRange_1.LinkedEditingRangeFeature)((0, semanticTokens_1.SemanticTokensFeature)((0, callHierarchy_1.CallHierarchyFeature)(_LanguagesImpl)))))))));
class _NotebooksImpl {
    constructor() {
    }
    attach(connection) {
        this._connection = connection;
    }
    get connection() {
        if (!this._connection) {
            throw new Error('Remote is not attached to a connection yet.');
        }
        return this._connection;
    }
    initialize(_capabilities) {
    }
    fillServerCapabilities(_capabilities) {
    }
    attachWorkDoneProgress(params) {
        return (0, progress_1.attachWorkDone)(this.connection, params);
    }
    attachPartialResultProgress(_type, params) {
        return (0, progress_1.attachPartialResult)(this.connection, params);
    }
}
server._NotebooksImpl = _NotebooksImpl;
const NotebooksImpl = (0, notebook_1.NotebookSyncFeature)(_NotebooksImpl);
function combineConsoleFeatures(one, two) {
    return function (Base) {
        return two(one(Base));
    };
}
server.combineConsoleFeatures = combineConsoleFeatures;
function combineTelemetryFeatures(one, two) {
    return function (Base) {
        return two(one(Base));
    };
}
server.combineTelemetryFeatures = combineTelemetryFeatures;
function combineTracerFeatures(one, two) {
    return function (Base) {
        return two(one(Base));
    };
}
server.combineTracerFeatures = combineTracerFeatures;
function combineClientFeatures(one, two) {
    return function (Base) {
        return two(one(Base));
    };
}
server.combineClientFeatures = combineClientFeatures;
function combineWindowFeatures(one, two) {
    return function (Base) {
        return two(one(Base));
    };
}
server.combineWindowFeatures = combineWindowFeatures;
function combineWorkspaceFeatures(one, two) {
    return function (Base) {
        return two(one(Base));
    };
}
server.combineWorkspaceFeatures = combineWorkspaceFeatures;
function combineLanguagesFeatures(one, two) {
    return function (Base) {
        return two(one(Base));
    };
}
server.combineLanguagesFeatures = combineLanguagesFeatures;
function combineNotebooksFeatures(one, two) {
    return function (Base) {
        return two(one(Base));
    };
}
server.combineNotebooksFeatures = combineNotebooksFeatures;
function combineFeatures(one, two) {
    function combine(one, two, func) {
        if (one && two) {
            return func(one, two);
        }
        else if (one) {
            return one;
        }
        else {
            return two;
        }
    }
    let result = {
        __brand: 'features',
        console: combine(one.console, two.console, combineConsoleFeatures),
        tracer: combine(one.tracer, two.tracer, combineTracerFeatures),
        telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),
        client: combine(one.client, two.client, combineClientFeatures),
        window: combine(one.window, two.window, combineWindowFeatures),
        workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures),
        languages: combine(one.languages, two.languages, combineLanguagesFeatures),
        notebooks: combine(one.notebooks, two.notebooks, combineNotebooksFeatures)
    };
    return result;
}
server.combineFeatures = combineFeatures;
function createConnection(connectionFactory, watchDog, factories) {
    const logger = (factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl());
    const connection = connectionFactory(logger);
    logger.rawAttach(connection);
    const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());
    const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());
    const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());
    const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());
    const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());
    const languages = (factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl());
    const notebooks = (factories && factories.notebooks ? new (factories.notebooks(NotebooksImpl))() : new NotebooksImpl());
    const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages, notebooks];
    function asPromise(value) {
        if (value instanceof Promise) {
            return value;
        }
        else if (Is$2.thenable(value)) {
            return new Promise((resolve, reject) => {
                value.then((resolved) => resolve(resolved), (error) => reject(error));
            });
        }
        else {
            return Promise.resolve(value);
        }
    }
    let shutdownHandler = undefined;
    let initializeHandler = undefined;
    let exitHandler = undefined;
    let protocolConnection = {
        listen: () => connection.listen(),
        sendRequest: (type, ...params) => connection.sendRequest(Is$2.string(type) ? type : type.method, ...params),
        onRequest: (type, handler) => connection.onRequest(type, handler),
        sendNotification: (type, param) => {
            const method = Is$2.string(type) ? type : type.method;
            return connection.sendNotification(method, param);
        },
        onNotification: (type, handler) => connection.onNotification(type, handler),
        onProgress: connection.onProgress,
        sendProgress: connection.sendProgress,
        onInitialize: (handler) => {
            initializeHandler = handler;
            return {
                dispose: () => {
                    initializeHandler = undefined;
                }
            };
        },
        onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1$3.InitializedNotification.type, handler),
        onShutdown: (handler) => {
            shutdownHandler = handler;
            return {
                dispose: () => {
                    shutdownHandler = undefined;
                }
            };
        },
        onExit: (handler) => {
            exitHandler = handler;
            return {
                dispose: () => {
                    exitHandler = undefined;
                }
            };
        },
        get console() { return logger; },
        get telemetry() { return telemetry; },
        get tracer() { return tracer; },
        get client() { return client; },
        get window() { return remoteWindow; },
        get workspace() { return workspace; },
        get languages() { return languages; },
        get notebooks() { return notebooks; },
        onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1$3.DidChangeConfigurationNotification.type, handler),
        onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1$3.DidChangeWatchedFilesNotification.type, handler),
        __textDocumentSync: undefined,
        onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1$3.DidOpenTextDocumentNotification.type, handler),
        onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1$3.DidChangeTextDocumentNotification.type, handler),
        onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1$3.DidCloseTextDocumentNotification.type, handler),
        onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1$3.WillSaveTextDocumentNotification.type, handler),
        onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.WillSaveTextDocumentWaitUntilRequest.type, handler),
        onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1$3.DidSaveTextDocumentNotification.type, handler),
        sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1$3.PublishDiagnosticsNotification.type, params),
        onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.HoverRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined);
        }),
        onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.CompletionRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.CompletionResolveRequest.type, handler),
        onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.SignatureHelpRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined);
        }),
        onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.DeclarationRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.DefinitionRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.TypeDefinitionRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.ImplementationRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.ReferencesRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.DocumentHighlightRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.DocumentSymbolRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.WorkspaceSymbolRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onWorkspaceSymbolResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.WorkspaceSymbolResolveRequest.type, handler),
        onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.CodeActionRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onCodeActionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.CodeActionResolveRequest.type, (params, cancel) => {
            return handler(params, cancel);
        }),
        onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.CodeLensRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.CodeLensResolveRequest.type, (params, cancel) => {
            return handler(params, cancel);
        }),
        onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.DocumentFormattingRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined);
        }),
        onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.DocumentRangeFormattingRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined);
        }),
        onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.DocumentOnTypeFormattingRequest.type, (params, cancel) => {
            return handler(params, cancel);
        }),
        onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.RenameRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined);
        }),
        onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.PrepareRenameRequest.type, (params, cancel) => {
            return handler(params, cancel);
        }),
        onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.DocumentLinkRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.DocumentLinkResolveRequest.type, (params, cancel) => {
            return handler(params, cancel);
        }),
        onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.DocumentColorRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.ColorPresentationRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.FoldingRangeRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.SelectionRangeRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1$3.ExecuteCommandRequest.type, (params, cancel) => {
            return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined);
        }),
        dispose: () => connection.dispose()
    };
    for (let remote of allRemotes) {
        remote.attach(protocolConnection);
    }
    connection.onRequest(vscode_languageserver_protocol_1$3.InitializeRequest.type, (params) => {
        watchDog.initialize(params);
        if (Is$2.string(params.trace)) {
            tracer.trace = vscode_languageserver_protocol_1$3.Trace.fromString(params.trace);
        }
        for (let remote of allRemotes) {
            remote.initialize(params.capabilities);
        }
        if (initializeHandler) {
            let result = initializeHandler(params, new vscode_languageserver_protocol_1$3.CancellationTokenSource().token, (0, progress_1.attachWorkDone)(connection, params), undefined);
            return asPromise(result).then((value) => {
                if (value instanceof vscode_languageserver_protocol_1$3.ResponseError) {
                    return value;
                }
                let result = value;
                if (!result) {
                    result = { capabilities: {} };
                }
                let capabilities = result.capabilities;
                if (!capabilities) {
                    capabilities = {};
                    result.capabilities = capabilities;
                }
                if (capabilities.textDocumentSync === undefined || capabilities.textDocumentSync === null) {
                    capabilities.textDocumentSync = Is$2.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1$3.TextDocumentSyncKind.None;
                }
                else if (!Is$2.number(capabilities.textDocumentSync) && !Is$2.number(capabilities.textDocumentSync.change)) {
                    capabilities.textDocumentSync.change = Is$2.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1$3.TextDocumentSyncKind.None;
                }
                for (let remote of allRemotes) {
                    remote.fillServerCapabilities(capabilities);
                }
                return result;
            });
        }
        else {
            let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1$3.TextDocumentSyncKind.None } };
            for (let remote of allRemotes) {
                remote.fillServerCapabilities(result.capabilities);
            }
            return result;
        }
    });
    connection.onRequest(vscode_languageserver_protocol_1$3.ShutdownRequest.type, () => {
        watchDog.shutdownReceived = true;
        if (shutdownHandler) {
            return shutdownHandler(new vscode_languageserver_protocol_1$3.CancellationTokenSource().token);
        }
        else {
            return undefined;
        }
    });
    connection.onNotification(vscode_languageserver_protocol_1$3.ExitNotification.type, () => {
        try {
            if (exitHandler) {
                exitHandler();
            }
        }
        finally {
            if (watchDog.shutdownReceived) {
                watchDog.exit(0);
            }
            else {
                watchDog.exit(1);
            }
        }
    });
    connection.onNotification(vscode_languageserver_protocol_1$3.SetTraceNotification.type, (params) => {
        tracer.trace = vscode_languageserver_protocol_1$3.Trace.fromString(params.value);
    });
    return protocolConnection;
}
server.createConnection = createConnection;

var files = {};

Object.defineProperty(files, "__esModule", { value: true });
files.resolveModulePath = files.FileSystem = files.resolveGlobalYarnPath = files.resolveGlobalNodePath = files.resolve = files.uriToFilePath = void 0;
const url = require$$5;
const path = path$1;
const fs = fs$1;
const child_process_1 = require$$3$1;
function uriToFilePath(uri) {
    let parsed = url.parse(uri);
    if (parsed.protocol !== 'file:' || !parsed.path) {
        return undefined;
    }
    let segments = parsed.path.split('/');
    for (var i = 0, len = segments.length; i < len; i++) {
        segments[i] = decodeURIComponent(segments[i]);
    }
    if (process.platform === 'win32' && segments.length > 1) {
        let first = segments[0];
        let second = segments[1];
        if (first.length === 0 && second.length > 1 && second[1] === ':') {
            segments.shift();
        }
    }
    return path.normalize(segments.join('/'));
}
files.uriToFilePath = uriToFilePath;
function isWindows$1() {
    return process.platform === 'win32';
}
function resolve(moduleName, nodePath, cwd, tracer) {
    const nodePathKey = 'NODE_PATH';
    const app = [
        'var p = process;',
        'p.on(\'message\',function(m){',
        'if(m.c===\'e\'){',
        'p.exit(0);',
        '}',
        'else if(m.c===\'rs\'){',
        'try{',
        'var r=require.resolve(m.a);',
        'p.send({c:\'r\',s:true,r:r});',
        '}',
        'catch(err){',
        'p.send({c:\'r\',s:false});',
        '}',
        '}',
        '});'
    ].join('');
    return new Promise((resolve, reject) => {
        let env = process.env;
        let newEnv = Object.create(null);
        Object.keys(env).forEach(key => newEnv[key] = env[key]);
        if (nodePath && fs.existsSync(nodePath) ) {
            if (newEnv[nodePathKey]) {
                newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];
            }
            else {
                newEnv[nodePathKey] = nodePath;
            }
            if (tracer) {
                tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);
            }
        }
        newEnv['ELECTRON_RUN_AS_NODE'] = '1';
        try {
            let cp = (0, child_process_1.fork)('', [], {
                cwd: cwd,
                env: newEnv,
                execArgv: ['-e', app]
            });
            if (cp.pid === void 0) {
                reject(new Error(`Starting process to resolve node module  ${moduleName} failed`));
                return;
            }
            cp.on('error', (error) => {
                reject(error);
            });
            cp.on('message', (message) => {
                if (message.c === 'r') {
                    cp.send({ c: 'e' });
                    if (message.s) {
                        resolve(message.r);
                    }
                    else {
                        reject(new Error(`Failed to resolve module: ${moduleName}`));
                    }
                }
            });
            let message = {
                c: 'rs',
                a: moduleName
            };
            cp.send(message);
        }
        catch (error) {
            reject(error);
        }
    });
}
files.resolve = resolve;
function resolveGlobalNodePath(tracer) {
    let npmCommand = 'npm';
    const env = Object.create(null);
    Object.keys(process.env).forEach(key => env[key] = process.env[key]);
    env['NO_UPDATE_NOTIFIER'] = 'true';
    const options = {
        encoding: 'utf8',
        env
    };
    if (isWindows$1()) {
        npmCommand = 'npm.cmd';
        options.shell = true;
    }
    let handler = () => { };
    try {
        process.on('SIGPIPE', handler);
        let stdout = (0, child_process_1.spawnSync)(npmCommand, ['config', 'get', 'prefix'], options).stdout;
        if (!stdout) {
            if (tracer) {
                tracer(`'npm config get prefix' didn't return a value.`);
            }
            return undefined;
        }
        let prefix = stdout.trim();
        if (tracer) {
            tracer(`'npm config get prefix' value is: ${prefix}`);
        }
        if (prefix.length > 0) {
            if (isWindows$1()) {
                return path.join(prefix, 'node_modules');
            }
            else {
                return path.join(prefix, 'lib', 'node_modules');
            }
        }
        return undefined;
    }
    catch (err) {
        return undefined;
    }
    finally {
        process.removeListener('SIGPIPE', handler);
    }
}
files.resolveGlobalNodePath = resolveGlobalNodePath;
function resolveGlobalYarnPath(tracer) {
    let yarnCommand = 'yarn';
    let options = {
        encoding: 'utf8'
    };
    if (isWindows$1()) {
        yarnCommand = 'yarn.cmd';
        options.shell = true;
    }
    let handler = () => { };
    try {
        process.on('SIGPIPE', handler);
        let results = (0, child_process_1.spawnSync)(yarnCommand, ['global', 'dir', '--json'], options);
        let stdout = results.stdout;
        if (!stdout) {
            if (tracer) {
                tracer(`'yarn global dir' didn't return a value.`);
                if (results.stderr) {
                    tracer(results.stderr);
                }
            }
            return undefined;
        }
        let lines = stdout.trim().split(/\r?\n/);
        for (let line of lines) {
            try {
                let yarn = JSON.parse(line);
                if (yarn.type === 'log') {
                    return path.join(yarn.data, 'node_modules');
                }
            }
            catch (e) {
            }
        }
        return undefined;
    }
    catch (err) {
        return undefined;
    }
    finally {
        process.removeListener('SIGPIPE', handler);
    }
}
files.resolveGlobalYarnPath = resolveGlobalYarnPath;
var FileSystem;
(function (FileSystem) {
    let _isCaseSensitive = undefined;
    function isCaseSensitive() {
        if (_isCaseSensitive !== void 0) {
            return _isCaseSensitive;
        }
        if (process.platform === 'win32') {
            _isCaseSensitive = false;
        }
        else {
            _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());
        }
        return _isCaseSensitive;
    }
    FileSystem.isCaseSensitive = isCaseSensitive;
    function isParent(parent, child) {
        if (isCaseSensitive()) {
            return path.normalize(child).indexOf(path.normalize(parent)) === 0;
        }
        else {
            return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0;
        }
    }
    FileSystem.isParent = isParent;
})(FileSystem || (files.FileSystem = FileSystem = {}));
function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
    if (nodePath) {
        if (!path.isAbsolute(nodePath)) {
            nodePath = path.join(workspaceRoot, nodePath);
        }
        return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
            if (FileSystem.isParent(nodePath, value)) {
                return value;
            }
            else {
                return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
            }
        }).then(undefined, (_error) => {
            return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
        });
    }
    else {
        return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
    }
}
files.resolveModulePath = resolveModulePath;

var node$2 = main$7;
getDefaultExportFromCjs(node$2);

var api$2 = {};

var inlineCompletion_proposed = {};

Object.defineProperty(inlineCompletion_proposed, "__esModule", { value: true });
inlineCompletion_proposed.InlineCompletionFeature = void 0;
const vscode_languageserver_protocol_1$2 = main$7;
const InlineCompletionFeature = (Base) => {
    return class extends Base {
        get inlineCompletion() {
            return {
                on: (handler) => {
                    return this.connection.onRequest(vscode_languageserver_protocol_1$2.InlineCompletionRequest.type, (params, cancel) => {
                        return handler(params, cancel, this.attachWorkDoneProgress(params));
                    });
                }
            };
        }
    };
};
inlineCompletion_proposed.InlineCompletionFeature = InlineCompletionFeature;

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.ProposedFeatures = exports.NotebookDocuments = exports.TextDocuments = exports.SemanticTokensBuilder = void 0;
	const semanticTokens_1 = semanticTokens;
	Object.defineProperty(exports, "SemanticTokensBuilder", { enumerable: true, get: function () { return semanticTokens_1.SemanticTokensBuilder; } });
	const ic = inlineCompletion_proposed;
	__exportStar(main$7, exports);
	const textDocuments_1 = textDocuments;
	Object.defineProperty(exports, "TextDocuments", { enumerable: true, get: function () { return textDocuments_1.TextDocuments; } });
	const notebook_1 = notebook;
	Object.defineProperty(exports, "NotebookDocuments", { enumerable: true, get: function () { return notebook_1.NotebookDocuments; } });
	__exportStar(server, exports);
	var ProposedFeatures;
	(function (ProposedFeatures) {
	    ProposedFeatures.all = {
	        __brand: 'features',
	        languages: ic.InlineCompletionFeature
	    };
	})(ProposedFeatures || (exports.ProposedFeatures = ProposedFeatures = {}));
} (api$2));
getDefaultExportFromCjs(api$2);

(function (exports) {
	/// <reference path="../../typings/thenable.d.ts" />
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.createConnection = exports.Files = void 0;
	const node_util_1 = require$$0$3;
	const Is = is$4;
	const server_1 = server;
	const fm = files;
	const node_1 = node$2;
	__exportStar(node$2, exports);
	__exportStar(api$2, exports);
	var Files;
	(function (Files) {
	    Files.uriToFilePath = fm.uriToFilePath;
	    Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;
	    Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;
	    Files.resolve = fm.resolve;
	    Files.resolveModulePath = fm.resolveModulePath;
	})(Files || (exports.Files = Files = {}));
	function endProtocolConnection() {
	    {
	        return;
	    }
	}
	let _shutdownReceived = false;
	let exitTimer = undefined;
	function setupExitTimer() {
	    const argName = '--clientProcessId';
	    function runTimer(value) {
	        try {
	            let processId = parseInt(value);
	            if (!isNaN(processId)) {
	                exitTimer = setInterval(() => {
	                    try {
	                        process.kill(processId, 0);
	                    }
	                    catch (ex) {
	                        endProtocolConnection();
	                        process.exit(_shutdownReceived ? 0 : 1);
	                    }
	                }, 3000);
	            }
	        }
	        catch (e) {
	        }
	    }
	    for (let i = 2; i < process.argv.length; i++) {
	        let arg = process.argv[i];
	        if (arg === argName && i + 1 < process.argv.length) {
	            runTimer(process.argv[i + 1]);
	            return;
	        }
	        else {
	            let args = arg.split('=');
	            if (args[0] === argName) {
	                runTimer(args[1]);
	            }
	        }
	    }
	}
	setupExitTimer();
	const watchDog = {
	    initialize: (params) => {
	        const processId = params.processId;
	        if (Is.number(processId) && exitTimer === undefined) {
	            setInterval(() => {
	                try {
	                    process.kill(processId, 0);
	                }
	                catch (ex) {
	                    process.exit(_shutdownReceived ? 0 : 1);
	                }
	            }, 3000);
	        }
	    },
	    get shutdownReceived() {
	        return _shutdownReceived;
	    },
	    set shutdownReceived(value) {
	        _shutdownReceived = value;
	    },
	    exit: (code) => {
	        process.exit(code);
	    }
	};
	function createConnection(arg1, arg2, arg3, arg4) {
	    let factories;
	    let input;
	    let output;
	    let options;
	    if (arg1 !== void 0 && arg1.__brand === 'features') {
	        factories = arg1;
	        arg1 = arg2;
	        arg2 = arg3;
	        arg3 = arg4;
	    }
	    if (node_1.ConnectionStrategy.is(arg1) || node_1.ConnectionOptions.is(arg1)) {
	        options = arg1;
	    }
	    else {
	        input = arg1;
	        output = arg2;
	        options = arg3;
	    }
	    return _createConnection(input, output, options, factories);
	}
	exports.createConnection = createConnection;
	function _createConnection(input, output, options, factories) {
	    let stdio = false;
	    if (!input && !output && process.argv.length > 2) {
	        let port = void 0;
	        let pipeName = void 0;
	        let argv = process.argv.slice(2);
	        for (let i = 0; i < argv.length; i++) {
	            let arg = argv[i];
	            if (arg === '--node-ipc') {
	                input = new node_1.IPCMessageReader(process);
	                output = new node_1.IPCMessageWriter(process);
	                break;
	            }
	            else if (arg === '--stdio') {
	                stdio = true;
	                input = process.stdin;
	                output = process.stdout;
	                break;
	            }
	            else if (arg === '--socket') {
	                port = parseInt(argv[i + 1]);
	                break;
	            }
	            else if (arg === '--pipe') {
	                pipeName = argv[i + 1];
	                break;
	            }
	            else {
	                var args = arg.split('=');
	                if (args[0] === '--socket') {
	                    port = parseInt(args[1]);
	                    break;
	                }
	                else if (args[0] === '--pipe') {
	                    pipeName = args[1];
	                    break;
	                }
	            }
	        }
	        if (port) {
	            let transport = (0, node_1.createServerSocketTransport)(port);
	            input = transport[0];
	            output = transport[1];
	        }
	        else if (pipeName) {
	            let transport = (0, node_1.createServerPipeTransport)(pipeName);
	            input = transport[0];
	            output = transport[1];
	        }
	    }
	    var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \'--node-ipc\', \'--stdio\' or \'--socket={number}\'';
	    if (!input) {
	        throw new Error('Connection input stream is not set. ' + commandLineMessage);
	    }
	    if (!output) {
	        throw new Error('Connection output stream is not set. ' + commandLineMessage);
	    }
	    if (Is.func(input.read) && Is.func(input.on)) {
	        let inputStream = input;
	        inputStream.on('end', () => {
	            process.exit(_shutdownReceived ? 0 : 1);
	        });
	        inputStream.on('close', () => {
	            process.exit(_shutdownReceived ? 0 : 1);
	        });
	    }
	    const connectionFactory = (logger) => {
	        const result = (0, node_1.createProtocolConnection)(input, output, logger, options);
	        if (stdio) {
	            patchConsole(logger);
	        }
	        return result;
	    };
	    return (0, server_1.createConnection)(connectionFactory, watchDog, factories);
	}
	function patchConsole(logger) {
	    function serialize(args) {
	        return args.map(arg => typeof arg === 'string' ? arg : (0, node_util_1.inspect)(arg)).join(' ');
	    }
	    const counters = new Map();
	    console.assert = function assert(assertion, ...args) {
	        if (assertion) {
	            return;
	        }
	        if (args.length === 0) {
	            logger.error('Assertion failed');
	        }
	        else {
	            const [message, ...rest] = args;
	            logger.error(`Assertion failed: ${message} ${serialize(rest)}`);
	        }
	    };
	    console.count = function count(label = 'default') {
	        const message = String(label);
	        let counter = counters.get(message) ?? 0;
	        counter += 1;
	        counters.set(message, counter);
	        logger.log(`${message}: ${message}`);
	    };
	    console.countReset = function countReset(label) {
	        if (label === undefined) {
	            counters.clear();
	        }
	        else {
	            counters.delete(String(label));
	        }
	    };
	    console.debug = function debug(...args) {
	        logger.log(serialize(args));
	    };
	    console.dir = function dir(arg, options) {
	        logger.log((0, node_util_1.inspect)(arg, options));
	    };
	    console.log = function log(...args) {
	        logger.log(serialize(args));
	    };
	    console.error = function error(...args) {
	        logger.error(serialize(args));
	    };
	    console.trace = function trace(...args) {
	        const stack = new Error().stack.replace(/(.+\n){2}/, '');
	        let message = 'Trace';
	        if (args.length !== 0) {
	            message += `: ${serialize(args)}`;
	        }
	        logger.log(`${message}\n${stack}`);
	    };
	    console.warn = function warn(...args) {
	        logger.warn(serialize(args));
	    };
	}
} (main$8));
getDefaultExportFromCjs(main$8);

var node$1 = main$8;
getDefaultExportFromCjs(node$1);

var DiagnosticsManager = {};

var utils$6 = {};

var lodash = {exports: {}};

/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */
lodash.exports;
(function (module, exports) {
(function() {
	  var undefined$1;
	  var VERSION = '4.17.21';
	  var LARGE_ARRAY_SIZE = 200;
	  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
	      FUNC_ERROR_TEXT = 'Expected a function',
	      INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
	  var HASH_UNDEFINED = '__lodash_hash_undefined__';
	  var MAX_MEMOIZE_SIZE = 500;
	  var PLACEHOLDER = '__lodash_placeholder__';
	  var CLONE_DEEP_FLAG = 1,
	      CLONE_FLAT_FLAG = 2,
	      CLONE_SYMBOLS_FLAG = 4;
	  var COMPARE_PARTIAL_FLAG = 1,
	      COMPARE_UNORDERED_FLAG = 2;
	  var WRAP_BIND_FLAG = 1,
	      WRAP_BIND_KEY_FLAG = 2,
	      WRAP_CURRY_BOUND_FLAG = 4,
	      WRAP_CURRY_FLAG = 8,
	      WRAP_CURRY_RIGHT_FLAG = 16,
	      WRAP_PARTIAL_FLAG = 32,
	      WRAP_PARTIAL_RIGHT_FLAG = 64,
	      WRAP_ARY_FLAG = 128,
	      WRAP_REARG_FLAG = 256,
	      WRAP_FLIP_FLAG = 512;
	  var DEFAULT_TRUNC_LENGTH = 30,
	      DEFAULT_TRUNC_OMISSION = '...';
	  var HOT_COUNT = 800,
	      HOT_SPAN = 16;
	  var LAZY_FILTER_FLAG = 1,
	      LAZY_MAP_FLAG = 2,
	      LAZY_WHILE_FLAG = 3;
	  var INFINITY = 1 / 0,
	      MAX_SAFE_INTEGER = 9007199254740991,
	      MAX_INTEGER = 1.7976931348623157e+308,
	      NAN = 0 / 0;
	  var MAX_ARRAY_LENGTH = 4294967295,
	      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
	      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
	  var wrapFlags = [
	    ['ary', WRAP_ARY_FLAG],
	    ['bind', WRAP_BIND_FLAG],
	    ['bindKey', WRAP_BIND_KEY_FLAG],
	    ['curry', WRAP_CURRY_FLAG],
	    ['curryRight', WRAP_CURRY_RIGHT_FLAG],
	    ['flip', WRAP_FLIP_FLAG],
	    ['partial', WRAP_PARTIAL_FLAG],
	    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
	    ['rearg', WRAP_REARG_FLAG]
	  ];
	  var argsTag = '[object Arguments]',
	      arrayTag = '[object Array]',
	      asyncTag = '[object AsyncFunction]',
	      boolTag = '[object Boolean]',
	      dateTag = '[object Date]',
	      domExcTag = '[object DOMException]',
	      errorTag = '[object Error]',
	      funcTag = '[object Function]',
	      genTag = '[object GeneratorFunction]',
	      mapTag = '[object Map]',
	      numberTag = '[object Number]',
	      nullTag = '[object Null]',
	      objectTag = '[object Object]',
	      promiseTag = '[object Promise]',
	      proxyTag = '[object Proxy]',
	      regexpTag = '[object RegExp]',
	      setTag = '[object Set]',
	      stringTag = '[object String]',
	      symbolTag = '[object Symbol]',
	      undefinedTag = '[object Undefined]',
	      weakMapTag = '[object WeakMap]',
	      weakSetTag = '[object WeakSet]';
	  var arrayBufferTag = '[object ArrayBuffer]',
	      dataViewTag = '[object DataView]',
	      float32Tag = '[object Float32Array]',
	      float64Tag = '[object Float64Array]',
	      int8Tag = '[object Int8Array]',
	      int16Tag = '[object Int16Array]',
	      int32Tag = '[object Int32Array]',
	      uint8Tag = '[object Uint8Array]',
	      uint8ClampedTag = '[object Uint8ClampedArray]',
	      uint16Tag = '[object Uint16Array]',
	      uint32Tag = '[object Uint32Array]';
	  var reEmptyStringLeading = /\b__p \+= '';/g,
	      reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
	      reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
	  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
	      reUnescapedHtml = /[&<>"']/g,
	      reHasEscapedHtml = RegExp(reEscapedHtml.source),
	      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
	  var reEscape = /<%-([\s\S]+?)%>/g,
	      reEvaluate = /<%([\s\S]+?)%>/g,
	      reInterpolate = /<%=([\s\S]+?)%>/g;
	  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
	      reIsPlainProp = /^\w*$/,
	      rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
	  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
	      reHasRegExpChar = RegExp(reRegExpChar.source);
	  var reTrimStart = /^\s+/;
	  var reWhitespace = /\s/;
	  var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
	      reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
	      reSplitDetails = /,? & /;
	  var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
	  var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
	  var reEscapeChar = /\\(\\)?/g;
	  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
	  var reFlags = /\w*$/;
	  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
	  var reIsBinary = /^0b[01]+$/i;
	  var reIsHostCtor = /^\[object .+?Constructor\]$/;
	  var reIsOctal = /^0o[0-7]+$/i;
	  var reIsUint = /^(?:0|[1-9]\d*)$/;
	  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
	  var reNoMatch = /($^)/;
	  var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
	  var rsAstralRange = '\\ud800-\\udfff',
	      rsComboMarksRange = '\\u0300-\\u036f',
	      reComboHalfMarksRange = '\\ufe20-\\ufe2f',
	      rsComboSymbolsRange = '\\u20d0-\\u20ff',
	      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
	      rsDingbatRange = '\\u2700-\\u27bf',
	      rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
	      rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
	      rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
	      rsPunctuationRange = '\\u2000-\\u206f',
	      rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
	      rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
	      rsVarRange = '\\ufe0e\\ufe0f',
	      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
	  var rsApos = "['\u2019]",
	      rsAstral = '[' + rsAstralRange + ']',
	      rsBreak = '[' + rsBreakRange + ']',
	      rsCombo = '[' + rsComboRange + ']',
	      rsDigits = '\\d+',
	      rsDingbat = '[' + rsDingbatRange + ']',
	      rsLower = '[' + rsLowerRange + ']',
	      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
	      rsFitz = '\\ud83c[\\udffb-\\udfff]',
	      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
	      rsNonAstral = '[^' + rsAstralRange + ']',
	      rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
	      rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
	      rsUpper = '[' + rsUpperRange + ']',
	      rsZWJ = '\\u200d';
	  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
	      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
	      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
	      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
	      reOptMod = rsModifier + '?',
	      rsOptVar = '[' + rsVarRange + ']?',
	      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
	      rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
	      rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
	      rsSeq = rsOptVar + reOptMod + rsOptJoin,
	      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
	      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
	  var reApos = RegExp(rsApos, 'g');
	  var reComboMark = RegExp(rsCombo, 'g');
	  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
	  var reUnicodeWord = RegExp([
	    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
	    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
	    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
	    rsUpper + '+' + rsOptContrUpper,
	    rsOrdUpper,
	    rsOrdLower,
	    rsDigits,
	    rsEmoji
	  ].join('|'), 'g');
	  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');
	  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
	  var contextProps = [
	    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
	    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
	    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
	    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
	    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
	  ];
	  var templateCounter = -1;
	  var typedArrayTags = {};
	  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
	  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
	  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
	  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
	  typedArrayTags[uint32Tag] = true;
	  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
	  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
	  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
	  typedArrayTags[errorTag] = typedArrayTags[funcTag] =
	  typedArrayTags[mapTag] = typedArrayTags[numberTag] =
	  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
	  typedArrayTags[setTag] = typedArrayTags[stringTag] =
	  typedArrayTags[weakMapTag] = false;
	  var cloneableTags = {};
	  cloneableTags[argsTag] = cloneableTags[arrayTag] =
	  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
	  cloneableTags[boolTag] = cloneableTags[dateTag] =
	  cloneableTags[float32Tag] = cloneableTags[float64Tag] =
	  cloneableTags[int8Tag] = cloneableTags[int16Tag] =
	  cloneableTags[int32Tag] = cloneableTags[mapTag] =
	  cloneableTags[numberTag] = cloneableTags[objectTag] =
	  cloneableTags[regexpTag] = cloneableTags[setTag] =
	  cloneableTags[stringTag] = cloneableTags[symbolTag] =
	  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
	  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
	  cloneableTags[errorTag] = cloneableTags[funcTag] =
	  cloneableTags[weakMapTag] = false;
	  var deburredLetters = {
	    '\xc0': 'A',  '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
	    '\xe0': 'a',  '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
	    '\xc7': 'C',  '\xe7': 'c',
	    '\xd0': 'D',  '\xf0': 'd',
	    '\xc8': 'E',  '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
	    '\xe8': 'e',  '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
	    '\xcc': 'I',  '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
	    '\xec': 'i',  '\xed': 'i', '\xee': 'i', '\xef': 'i',
	    '\xd1': 'N',  '\xf1': 'n',
	    '\xd2': 'O',  '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
	    '\xf2': 'o',  '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
	    '\xd9': 'U',  '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
	    '\xf9': 'u',  '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
	    '\xdd': 'Y',  '\xfd': 'y', '\xff': 'y',
	    '\xc6': 'Ae', '\xe6': 'ae',
	    '\xde': 'Th', '\xfe': 'th',
	    '\xdf': 'ss',
	    '\u0100': 'A',  '\u0102': 'A', '\u0104': 'A',
	    '\u0101': 'a',  '\u0103': 'a', '\u0105': 'a',
	    '\u0106': 'C',  '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
	    '\u0107': 'c',  '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
	    '\u010e': 'D',  '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
	    '\u0112': 'E',  '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
	    '\u0113': 'e',  '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
	    '\u011c': 'G',  '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
	    '\u011d': 'g',  '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
	    '\u0124': 'H',  '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
	    '\u0128': 'I',  '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
	    '\u0129': 'i',  '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
	    '\u0134': 'J',  '\u0135': 'j',
	    '\u0136': 'K',  '\u0137': 'k', '\u0138': 'k',
	    '\u0139': 'L',  '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
	    '\u013a': 'l',  '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
	    '\u0143': 'N',  '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
	    '\u0144': 'n',  '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
	    '\u014c': 'O',  '\u014e': 'O', '\u0150': 'O',
	    '\u014d': 'o',  '\u014f': 'o', '\u0151': 'o',
	    '\u0154': 'R',  '\u0156': 'R', '\u0158': 'R',
	    '\u0155': 'r',  '\u0157': 'r', '\u0159': 'r',
	    '\u015a': 'S',  '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
	    '\u015b': 's',  '\u015d': 's', '\u015f': 's', '\u0161': 's',
	    '\u0162': 'T',  '\u0164': 'T', '\u0166': 'T',
	    '\u0163': 't',  '\u0165': 't', '\u0167': 't',
	    '\u0168': 'U',  '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
	    '\u0169': 'u',  '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
	    '\u0174': 'W',  '\u0175': 'w',
	    '\u0176': 'Y',  '\u0177': 'y', '\u0178': 'Y',
	    '\u0179': 'Z',  '\u017b': 'Z', '\u017d': 'Z',
	    '\u017a': 'z',  '\u017c': 'z', '\u017e': 'z',
	    '\u0132': 'IJ', '\u0133': 'ij',
	    '\u0152': 'Oe', '\u0153': 'oe',
	    '\u0149': "'n", '\u017f': 's'
	  };
	  var htmlEscapes = {
	    '&': '&amp;',
	    '<': '&lt;',
	    '>': '&gt;',
	    '"': '&quot;',
	    "'": '&#39;'
	  };
	  var htmlUnescapes = {
	    '&amp;': '&',
	    '&lt;': '<',
	    '&gt;': '>',
	    '&quot;': '"',
	    '&#39;': "'"
	  };
	  var stringEscapes = {
	    '\\': '\\',
	    "'": "'",
	    '\n': 'n',
	    '\r': 'r',
	    '\u2028': 'u2028',
	    '\u2029': 'u2029'
	  };
	  var freeParseFloat = parseFloat,
	      freeParseInt = parseInt;
	  var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
	  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
	  var root = freeGlobal || freeSelf || Function('return this')();
	  var freeExports = exports && !exports.nodeType && exports;
	  var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
	  var moduleExports = freeModule && freeModule.exports === freeExports;
	  var freeProcess = moduleExports && freeGlobal.process;
	  var nodeUtil = (function() {
	    try {
	      var types = freeModule && freeModule.require && freeModule.require('util').types;
	      if (types) {
	        return types;
	      }
	      return freeProcess && freeProcess.binding && freeProcess.binding('util');
	    } catch (e) {}
	  }());
	  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
	      nodeIsDate = nodeUtil && nodeUtil.isDate,
	      nodeIsMap = nodeUtil && nodeUtil.isMap,
	      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
	      nodeIsSet = nodeUtil && nodeUtil.isSet,
	      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
	  function apply(func, thisArg, args) {
	    switch (args.length) {
	      case 0: return func.call(thisArg);
	      case 1: return func.call(thisArg, args[0]);
	      case 2: return func.call(thisArg, args[0], args[1]);
	      case 3: return func.call(thisArg, args[0], args[1], args[2]);
	    }
	    return func.apply(thisArg, args);
	  }
	  function arrayAggregator(array, setter, iteratee, accumulator) {
	    var index = -1,
	        length = array == null ? 0 : array.length;
	    while (++index < length) {
	      var value = array[index];
	      setter(accumulator, value, iteratee(value), array);
	    }
	    return accumulator;
	  }
	  function arrayEach(array, iteratee) {
	    var index = -1,
	        length = array == null ? 0 : array.length;
	    while (++index < length) {
	      if (iteratee(array[index], index, array) === false) {
	        break;
	      }
	    }
	    return array;
	  }
	  function arrayEachRight(array, iteratee) {
	    var length = array == null ? 0 : array.length;
	    while (length--) {
	      if (iteratee(array[length], length, array) === false) {
	        break;
	      }
	    }
	    return array;
	  }
	  function arrayEvery(array, predicate) {
	    var index = -1,
	        length = array == null ? 0 : array.length;
	    while (++index < length) {
	      if (!predicate(array[index], index, array)) {
	        return false;
	      }
	    }
	    return true;
	  }
	  function arrayFilter(array, predicate) {
	    var index = -1,
	        length = array == null ? 0 : array.length,
	        resIndex = 0,
	        result = [];
	    while (++index < length) {
	      var value = array[index];
	      if (predicate(value, index, array)) {
	        result[resIndex++] = value;
	      }
	    }
	    return result;
	  }
	  function arrayIncludes(array, value) {
	    var length = array == null ? 0 : array.length;
	    return !!length && baseIndexOf(array, value, 0) > -1;
	  }
	  function arrayIncludesWith(array, value, comparator) {
	    var index = -1,
	        length = array == null ? 0 : array.length;
	    while (++index < length) {
	      if (comparator(value, array[index])) {
	        return true;
	      }
	    }
	    return false;
	  }
	  function arrayMap(array, iteratee) {
	    var index = -1,
	        length = array == null ? 0 : array.length,
	        result = Array(length);
	    while (++index < length) {
	      result[index] = iteratee(array[index], index, array);
	    }
	    return result;
	  }
	  function arrayPush(array, values) {
	    var index = -1,
	        length = values.length,
	        offset = array.length;
	    while (++index < length) {
	      array[offset + index] = values[index];
	    }
	    return array;
	  }
	  function arrayReduce(array, iteratee, accumulator, initAccum) {
	    var index = -1,
	        length = array == null ? 0 : array.length;
	    if (initAccum && length) {
	      accumulator = array[++index];
	    }
	    while (++index < length) {
	      accumulator = iteratee(accumulator, array[index], index, array);
	    }
	    return accumulator;
	  }
	  function arrayReduceRight(array, iteratee, accumulator, initAccum) {
	    var length = array == null ? 0 : array.length;
	    if (initAccum && length) {
	      accumulator = array[--length];
	    }
	    while (length--) {
	      accumulator = iteratee(accumulator, array[length], length, array);
	    }
	    return accumulator;
	  }
	  function arraySome(array, predicate) {
	    var index = -1,
	        length = array == null ? 0 : array.length;
	    while (++index < length) {
	      if (predicate(array[index], index, array)) {
	        return true;
	      }
	    }
	    return false;
	  }
	  var asciiSize = baseProperty('length');
	  function asciiToArray(string) {
	    return string.split('');
	  }
	  function asciiWords(string) {
	    return string.match(reAsciiWord) || [];
	  }
	  function baseFindKey(collection, predicate, eachFunc) {
	    var result;
	    eachFunc(collection, function(value, key, collection) {
	      if (predicate(value, key, collection)) {
	        result = key;
	        return false;
	      }
	    });
	    return result;
	  }
	  function baseFindIndex(array, predicate, fromIndex, fromRight) {
	    var length = array.length,
	        index = fromIndex + (fromRight ? 1 : -1);
	    while ((fromRight ? index-- : ++index < length)) {
	      if (predicate(array[index], index, array)) {
	        return index;
	      }
	    }
	    return -1;
	  }
	  function baseIndexOf(array, value, fromIndex) {
	    return value === value
	      ? strictIndexOf(array, value, fromIndex)
	      : baseFindIndex(array, baseIsNaN, fromIndex);
	  }
	  function baseIndexOfWith(array, value, fromIndex, comparator) {
	    var index = fromIndex - 1,
	        length = array.length;
	    while (++index < length) {
	      if (comparator(array[index], value)) {
	        return index;
	      }
	    }
	    return -1;
	  }
	  function baseIsNaN(value) {
	    return value !== value;
	  }
	  function baseMean(array, iteratee) {
	    var length = array == null ? 0 : array.length;
	    return length ? (baseSum(array, iteratee) / length) : NAN;
	  }
	  function baseProperty(key) {
	    return function(object) {
	      return object == null ? undefined$1 : object[key];
	    };
	  }
	  function basePropertyOf(object) {
	    return function(key) {
	      return object == null ? undefined$1 : object[key];
	    };
	  }
	  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
	    eachFunc(collection, function(value, index, collection) {
	      accumulator = initAccum
	        ? (initAccum = false, value)
	        : iteratee(accumulator, value, index, collection);
	    });
	    return accumulator;
	  }
	  function baseSortBy(array, comparer) {
	    var length = array.length;
	    array.sort(comparer);
	    while (length--) {
	      array[length] = array[length].value;
	    }
	    return array;
	  }
	  function baseSum(array, iteratee) {
	    var result,
	        index = -1,
	        length = array.length;
	    while (++index < length) {
	      var current = iteratee(array[index]);
	      if (current !== undefined$1) {
	        result = result === undefined$1 ? current : (result + current);
	      }
	    }
	    return result;
	  }
	  function baseTimes(n, iteratee) {
	    var index = -1,
	        result = Array(n);
	    while (++index < n) {
	      result[index] = iteratee(index);
	    }
	    return result;
	  }
	  function baseToPairs(object, props) {
	    return arrayMap(props, function(key) {
	      return [key, object[key]];
	    });
	  }
	  function baseTrim(string) {
	    return string
	      ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
	      : string;
	  }
	  function baseUnary(func) {
	    return function(value) {
	      return func(value);
	    };
	  }
	  function baseValues(object, props) {
	    return arrayMap(props, function(key) {
	      return object[key];
	    });
	  }
	  function cacheHas(cache, key) {
	    return cache.has(key);
	  }
	  function charsStartIndex(strSymbols, chrSymbols) {
	    var index = -1,
	        length = strSymbols.length;
	    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
	    return index;
	  }
	  function charsEndIndex(strSymbols, chrSymbols) {
	    var index = strSymbols.length;
	    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
	    return index;
	  }
	  function countHolders(array, placeholder) {
	    var length = array.length,
	        result = 0;
	    while (length--) {
	      if (array[length] === placeholder) {
	        ++result;
	      }
	    }
	    return result;
	  }
	  var deburrLetter = basePropertyOf(deburredLetters);
	  var escapeHtmlChar = basePropertyOf(htmlEscapes);
	  function escapeStringChar(chr) {
	    return '\\' + stringEscapes[chr];
	  }
	  function getValue(object, key) {
	    return object == null ? undefined$1 : object[key];
	  }
	  function hasUnicode(string) {
	    return reHasUnicode.test(string);
	  }
	  function hasUnicodeWord(string) {
	    return reHasUnicodeWord.test(string);
	  }
	  function iteratorToArray(iterator) {
	    var data,
	        result = [];
	    while (!(data = iterator.next()).done) {
	      result.push(data.value);
	    }
	    return result;
	  }
	  function mapToArray(map) {
	    var index = -1,
	        result = Array(map.size);
	    map.forEach(function(value, key) {
	      result[++index] = [key, value];
	    });
	    return result;
	  }
	  function overArg(func, transform) {
	    return function(arg) {
	      return func(transform(arg));
	    };
	  }
	  function replaceHolders(array, placeholder) {
	    var index = -1,
	        length = array.length,
	        resIndex = 0,
	        result = [];
	    while (++index < length) {
	      var value = array[index];
	      if (value === placeholder || value === PLACEHOLDER) {
	        array[index] = PLACEHOLDER;
	        result[resIndex++] = index;
	      }
	    }
	    return result;
	  }
	  function setToArray(set) {
	    var index = -1,
	        result = Array(set.size);
	    set.forEach(function(value) {
	      result[++index] = value;
	    });
	    return result;
	  }
	  function setToPairs(set) {
	    var index = -1,
	        result = Array(set.size);
	    set.forEach(function(value) {
	      result[++index] = [value, value];
	    });
	    return result;
	  }
	  function strictIndexOf(array, value, fromIndex) {
	    var index = fromIndex - 1,
	        length = array.length;
	    while (++index < length) {
	      if (array[index] === value) {
	        return index;
	      }
	    }
	    return -1;
	  }
	  function strictLastIndexOf(array, value, fromIndex) {
	    var index = fromIndex + 1;
	    while (index--) {
	      if (array[index] === value) {
	        return index;
	      }
	    }
	    return index;
	  }
	  function stringSize(string) {
	    return hasUnicode(string)
	      ? unicodeSize(string)
	      : asciiSize(string);
	  }
	  function stringToArray(string) {
	    return hasUnicode(string)
	      ? unicodeToArray(string)
	      : asciiToArray(string);
	  }
	  function trimmedEndIndex(string) {
	    var index = string.length;
	    while (index-- && reWhitespace.test(string.charAt(index))) {}
	    return index;
	  }
	  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
	  function unicodeSize(string) {
	    var result = reUnicode.lastIndex = 0;
	    while (reUnicode.test(string)) {
	      ++result;
	    }
	    return result;
	  }
	  function unicodeToArray(string) {
	    return string.match(reUnicode) || [];
	  }
	  function unicodeWords(string) {
	    return string.match(reUnicodeWord) || [];
	  }
	  var runInContext = (function runInContext(context) {
	    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
	    var Array = context.Array,
	        Date = context.Date,
	        Error = context.Error,
	        Function = context.Function,
	        Math = context.Math,
	        Object = context.Object,
	        RegExp = context.RegExp,
	        String = context.String,
	        TypeError = context.TypeError;
	    var arrayProto = Array.prototype,
	        funcProto = Function.prototype,
	        objectProto = Object.prototype;
	    var coreJsData = context['__core-js_shared__'];
	    var funcToString = funcProto.toString;
	    var hasOwnProperty = objectProto.hasOwnProperty;
	    var idCounter = 0;
	    var maskSrcKey = (function() {
	      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
	      return uid ? ('Symbol(src)_1.' + uid) : '';
	    }());
	    var nativeObjectToString = objectProto.toString;
	    var objectCtorString = funcToString.call(Object);
	    var oldDash = root._;
	    var reIsNative = RegExp('^' +
	      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
	      .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
	    );
	    var Buffer = moduleExports ? context.Buffer : undefined$1,
	        Symbol = context.Symbol,
	        Uint8Array = context.Uint8Array,
	        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined$1,
	        getPrototype = overArg(Object.getPrototypeOf, Object),
	        objectCreate = Object.create,
	        propertyIsEnumerable = objectProto.propertyIsEnumerable,
	        splice = arrayProto.splice,
	        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined$1,
	        symIterator = Symbol ? Symbol.iterator : undefined$1,
	        symToStringTag = Symbol ? Symbol.toStringTag : undefined$1;
	    var defineProperty = (function() {
	      try {
	        var func = getNative(Object, 'defineProperty');
	        func({}, '', {});
	        return func;
	      } catch (e) {}
	    }());
	    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
	        ctxNow = Date && Date.now !== root.Date.now && Date.now,
	        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
	    var nativeCeil = Math.ceil,
	        nativeFloor = Math.floor,
	        nativeGetSymbols = Object.getOwnPropertySymbols,
	        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1,
	        nativeIsFinite = context.isFinite,
	        nativeJoin = arrayProto.join,
	        nativeKeys = overArg(Object.keys, Object),
	        nativeMax = Math.max,
	        nativeMin = Math.min,
	        nativeNow = Date.now,
	        nativeParseInt = context.parseInt,
	        nativeRandom = Math.random,
	        nativeReverse = arrayProto.reverse;
	    var DataView = getNative(context, 'DataView'),
	        Map = getNative(context, 'Map'),
	        Promise = getNative(context, 'Promise'),
	        Set = getNative(context, 'Set'),
	        WeakMap = getNative(context, 'WeakMap'),
	        nativeCreate = getNative(Object, 'create');
	    var metaMap = WeakMap && new WeakMap;
	    var realNames = {};
	    var dataViewCtorString = toSource(DataView),
	        mapCtorString = toSource(Map),
	        promiseCtorString = toSource(Promise),
	        setCtorString = toSource(Set),
	        weakMapCtorString = toSource(WeakMap);
	    var symbolProto = Symbol ? Symbol.prototype : undefined$1,
	        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1,
	        symbolToString = symbolProto ? symbolProto.toString : undefined$1;
	    function lodash(value) {
	      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
	        if (value instanceof LodashWrapper) {
	          return value;
	        }
	        if (hasOwnProperty.call(value, '__wrapped__')) {
	          return wrapperClone(value);
	        }
	      }
	      return new LodashWrapper(value);
	    }
	    var baseCreate = (function() {
	      function object() {}
	      return function(proto) {
	        if (!isObject(proto)) {
	          return {};
	        }
	        if (objectCreate) {
	          return objectCreate(proto);
	        }
	        object.prototype = proto;
	        var result = new object;
	        object.prototype = undefined$1;
	        return result;
	      };
	    }());
	    function baseLodash() {
	    }
	    function LodashWrapper(value, chainAll) {
	      this.__wrapped__ = value;
	      this.__actions__ = [];
	      this.__chain__ = !!chainAll;
	      this.__index__ = 0;
	      this.__values__ = undefined$1;
	    }
	    lodash.templateSettings = {
	      'escape': reEscape,
	      'evaluate': reEvaluate,
	      'interpolate': reInterpolate,
	      'variable': '',
	      'imports': {
	        '_': lodash
	      }
	    };
	    lodash.prototype = baseLodash.prototype;
	    lodash.prototype.constructor = lodash;
	    LodashWrapper.prototype = baseCreate(baseLodash.prototype);
	    LodashWrapper.prototype.constructor = LodashWrapper;
	    function LazyWrapper(value) {
	      this.__wrapped__ = value;
	      this.__actions__ = [];
	      this.__dir__ = 1;
	      this.__filtered__ = false;
	      this.__iteratees__ = [];
	      this.__takeCount__ = MAX_ARRAY_LENGTH;
	      this.__views__ = [];
	    }
	    function lazyClone() {
	      var result = new LazyWrapper(this.__wrapped__);
	      result.__actions__ = copyArray(this.__actions__);
	      result.__dir__ = this.__dir__;
	      result.__filtered__ = this.__filtered__;
	      result.__iteratees__ = copyArray(this.__iteratees__);
	      result.__takeCount__ = this.__takeCount__;
	      result.__views__ = copyArray(this.__views__);
	      return result;
	    }
	    function lazyReverse() {
	      if (this.__filtered__) {
	        var result = new LazyWrapper(this);
	        result.__dir__ = -1;
	        result.__filtered__ = true;
	      } else {
	        result = this.clone();
	        result.__dir__ *= -1;
	      }
	      return result;
	    }
	    function lazyValue() {
	      var array = this.__wrapped__.value(),
	          dir = this.__dir__,
	          isArr = isArray(array),
	          isRight = dir < 0,
	          arrLength = isArr ? array.length : 0,
	          view = getView(0, arrLength, this.__views__),
	          start = view.start,
	          end = view.end,
	          length = end - start,
	          index = isRight ? end : (start - 1),
	          iteratees = this.__iteratees__,
	          iterLength = iteratees.length,
	          resIndex = 0,
	          takeCount = nativeMin(length, this.__takeCount__);
	      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
	        return baseWrapperValue(array, this.__actions__);
	      }
	      var result = [];
	      outer:
	      while (length-- && resIndex < takeCount) {
	        index += dir;
	        var iterIndex = -1,
	            value = array[index];
	        while (++iterIndex < iterLength) {
	          var data = iteratees[iterIndex],
	              iteratee = data.iteratee,
	              type = data.type,
	              computed = iteratee(value);
	          if (type == LAZY_MAP_FLAG) {
	            value = computed;
	          } else if (!computed) {
	            if (type == LAZY_FILTER_FLAG) {
	              continue outer;
	            } else {
	              break outer;
	            }
	          }
	        }
	        result[resIndex++] = value;
	      }
	      return result;
	    }
	    LazyWrapper.prototype = baseCreate(baseLodash.prototype);
	    LazyWrapper.prototype.constructor = LazyWrapper;
	    function Hash(entries) {
	      var index = -1,
	          length = entries == null ? 0 : entries.length;
	      this.clear();
	      while (++index < length) {
	        var entry = entries[index];
	        this.set(entry[0], entry[1]);
	      }
	    }
	    function hashClear() {
	      this.__data__ = nativeCreate ? nativeCreate(null) : {};
	      this.size = 0;
	    }
	    function hashDelete(key) {
	      var result = this.has(key) && delete this.__data__[key];
	      this.size -= result ? 1 : 0;
	      return result;
	    }
	    function hashGet(key) {
	      var data = this.__data__;
	      if (nativeCreate) {
	        var result = data[key];
	        return result === HASH_UNDEFINED ? undefined$1 : result;
	      }
	      return hasOwnProperty.call(data, key) ? data[key] : undefined$1;
	    }
	    function hashHas(key) {
	      var data = this.__data__;
	      return nativeCreate ? (data[key] !== undefined$1) : hasOwnProperty.call(data, key);
	    }
	    function hashSet(key, value) {
	      var data = this.__data__;
	      this.size += this.has(key) ? 0 : 1;
	      data[key] = (nativeCreate && value === undefined$1) ? HASH_UNDEFINED : value;
	      return this;
	    }
	    Hash.prototype.clear = hashClear;
	    Hash.prototype['delete'] = hashDelete;
	    Hash.prototype.get = hashGet;
	    Hash.prototype.has = hashHas;
	    Hash.prototype.set = hashSet;
	    function ListCache(entries) {
	      var index = -1,
	          length = entries == null ? 0 : entries.length;
	      this.clear();
	      while (++index < length) {
	        var entry = entries[index];
	        this.set(entry[0], entry[1]);
	      }
	    }
	    function listCacheClear() {
	      this.__data__ = [];
	      this.size = 0;
	    }
	    function listCacheDelete(key) {
	      var data = this.__data__,
	          index = assocIndexOf(data, key);
	      if (index < 0) {
	        return false;
	      }
	      var lastIndex = data.length - 1;
	      if (index == lastIndex) {
	        data.pop();
	      } else {
	        splice.call(data, index, 1);
	      }
	      --this.size;
	      return true;
	    }
	    function listCacheGet(key) {
	      var data = this.__data__,
	          index = assocIndexOf(data, key);
	      return index < 0 ? undefined$1 : data[index][1];
	    }
	    function listCacheHas(key) {
	      return assocIndexOf(this.__data__, key) > -1;
	    }
	    function listCacheSet(key, value) {
	      var data = this.__data__,
	          index = assocIndexOf(data, key);
	      if (index < 0) {
	        ++this.size;
	        data.push([key, value]);
	      } else {
	        data[index][1] = value;
	      }
	      return this;
	    }
	    ListCache.prototype.clear = listCacheClear;
	    ListCache.prototype['delete'] = listCacheDelete;
	    ListCache.prototype.get = listCacheGet;
	    ListCache.prototype.has = listCacheHas;
	    ListCache.prototype.set = listCacheSet;
	    function MapCache(entries) {
	      var index = -1,
	          length = entries == null ? 0 : entries.length;
	      this.clear();
	      while (++index < length) {
	        var entry = entries[index];
	        this.set(entry[0], entry[1]);
	      }
	    }
	    function mapCacheClear() {
	      this.size = 0;
	      this.__data__ = {
	        'hash': new Hash,
	        'map': new (Map || ListCache),
	        'string': new Hash
	      };
	    }
	    function mapCacheDelete(key) {
	      var result = getMapData(this, key)['delete'](key);
	      this.size -= result ? 1 : 0;
	      return result;
	    }
	    function mapCacheGet(key) {
	      return getMapData(this, key).get(key);
	    }
	    function mapCacheHas(key) {
	      return getMapData(this, key).has(key);
	    }
	    function mapCacheSet(key, value) {
	      var data = getMapData(this, key),
	          size = data.size;
	      data.set(key, value);
	      this.size += data.size == size ? 0 : 1;
	      return this;
	    }
	    MapCache.prototype.clear = mapCacheClear;
	    MapCache.prototype['delete'] = mapCacheDelete;
	    MapCache.prototype.get = mapCacheGet;
	    MapCache.prototype.has = mapCacheHas;
	    MapCache.prototype.set = mapCacheSet;
	    function SetCache(values) {
	      var index = -1,
	          length = values == null ? 0 : values.length;
	      this.__data__ = new MapCache;
	      while (++index < length) {
	        this.add(values[index]);
	      }
	    }
	    function setCacheAdd(value) {
	      this.__data__.set(value, HASH_UNDEFINED);
	      return this;
	    }
	    function setCacheHas(value) {
	      return this.__data__.has(value);
	    }
	    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
	    SetCache.prototype.has = setCacheHas;
	    function Stack(entries) {
	      var data = this.__data__ = new ListCache(entries);
	      this.size = data.size;
	    }
	    function stackClear() {
	      this.__data__ = new ListCache;
	      this.size = 0;
	    }
	    function stackDelete(key) {
	      var data = this.__data__,
	          result = data['delete'](key);
	      this.size = data.size;
	      return result;
	    }
	    function stackGet(key) {
	      return this.__data__.get(key);
	    }
	    function stackHas(key) {
	      return this.__data__.has(key);
	    }
	    function stackSet(key, value) {
	      var data = this.__data__;
	      if (data instanceof ListCache) {
	        var pairs = data.__data__;
	        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
	          pairs.push([key, value]);
	          this.size = ++data.size;
	          return this;
	        }
	        data = this.__data__ = new MapCache(pairs);
	      }
	      data.set(key, value);
	      this.size = data.size;
	      return this;
	    }
	    Stack.prototype.clear = stackClear;
	    Stack.prototype['delete'] = stackDelete;
	    Stack.prototype.get = stackGet;
	    Stack.prototype.has = stackHas;
	    Stack.prototype.set = stackSet;
	    function arrayLikeKeys(value, inherited) {
	      var isArr = isArray(value),
	          isArg = !isArr && isArguments(value),
	          isBuff = !isArr && !isArg && isBuffer(value),
	          isType = !isArr && !isArg && !isBuff && isTypedArray(value),
	          skipIndexes = isArr || isArg || isBuff || isType,
	          result = skipIndexes ? baseTimes(value.length, String) : [],
	          length = result.length;
	      for (var key in value) {
	        if ((inherited || hasOwnProperty.call(value, key)) &&
	            !(skipIndexes && (
	               key == 'length' ||
	               (isBuff && (key == 'offset' || key == 'parent')) ||
	               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
	               isIndex(key, length)
	            ))) {
	          result.push(key);
	        }
	      }
	      return result;
	    }
	    function arraySample(array) {
	      var length = array.length;
	      return length ? array[baseRandom(0, length - 1)] : undefined$1;
	    }
	    function arraySampleSize(array, n) {
	      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
	    }
	    function arrayShuffle(array) {
	      return shuffleSelf(copyArray(array));
	    }
	    function assignMergeValue(object, key, value) {
	      if ((value !== undefined$1 && !eq(object[key], value)) ||
	          (value === undefined$1 && !(key in object))) {
	        baseAssignValue(object, key, value);
	      }
	    }
	    function assignValue(object, key, value) {
	      var objValue = object[key];
	      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
	          (value === undefined$1 && !(key in object))) {
	        baseAssignValue(object, key, value);
	      }
	    }
	    function assocIndexOf(array, key) {
	      var length = array.length;
	      while (length--) {
	        if (eq(array[length][0], key)) {
	          return length;
	        }
	      }
	      return -1;
	    }
	    function baseAggregator(collection, setter, iteratee, accumulator) {
	      baseEach(collection, function(value, key, collection) {
	        setter(accumulator, value, iteratee(value), collection);
	      });
	      return accumulator;
	    }
	    function baseAssign(object, source) {
	      return object && copyObject(source, keys(source), object);
	    }
	    function baseAssignIn(object, source) {
	      return object && copyObject(source, keysIn(source), object);
	    }
	    function baseAssignValue(object, key, value) {
	      if (key == '__proto__' && defineProperty) {
	        defineProperty(object, key, {
	          'configurable': true,
	          'enumerable': true,
	          'value': value,
	          'writable': true
	        });
	      } else {
	        object[key] = value;
	      }
	    }
	    function baseAt(object, paths) {
	      var index = -1,
	          length = paths.length,
	          result = Array(length),
	          skip = object == null;
	      while (++index < length) {
	        result[index] = skip ? undefined$1 : get(object, paths[index]);
	      }
	      return result;
	    }
	    function baseClamp(number, lower, upper) {
	      if (number === number) {
	        if (upper !== undefined$1) {
	          number = number <= upper ? number : upper;
	        }
	        if (lower !== undefined$1) {
	          number = number >= lower ? number : lower;
	        }
	      }
	      return number;
	    }
	    function baseClone(value, bitmask, customizer, key, object, stack) {
	      var result,
	          isDeep = bitmask & CLONE_DEEP_FLAG,
	          isFlat = bitmask & CLONE_FLAT_FLAG,
	          isFull = bitmask & CLONE_SYMBOLS_FLAG;
	      if (customizer) {
	        result = object ? customizer(value, key, object, stack) : customizer(value);
	      }
	      if (result !== undefined$1) {
	        return result;
	      }
	      if (!isObject(value)) {
	        return value;
	      }
	      var isArr = isArray(value);
	      if (isArr) {
	        result = initCloneArray(value);
	        if (!isDeep) {
	          return copyArray(value, result);
	        }
	      } else {
	        var tag = getTag(value),
	            isFunc = tag == funcTag || tag == genTag;
	        if (isBuffer(value)) {
	          return cloneBuffer(value, isDeep);
	        }
	        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
	          result = (isFlat || isFunc) ? {} : initCloneObject(value);
	          if (!isDeep) {
	            return isFlat
	              ? copySymbolsIn(value, baseAssignIn(result, value))
	              : copySymbols(value, baseAssign(result, value));
	          }
	        } else {
	          if (!cloneableTags[tag]) {
	            return object ? value : {};
	          }
	          result = initCloneByTag(value, tag, isDeep);
	        }
	      }
	      stack || (stack = new Stack);
	      var stacked = stack.get(value);
	      if (stacked) {
	        return stacked;
	      }
	      stack.set(value, result);
	      if (isSet(value)) {
	        value.forEach(function(subValue) {
	          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
	        });
	      } else if (isMap(value)) {
	        value.forEach(function(subValue, key) {
	          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
	        });
	      }
	      var keysFunc = isFull
	        ? (isFlat ? getAllKeysIn : getAllKeys)
	        : (isFlat ? keysIn : keys);
	      var props = isArr ? undefined$1 : keysFunc(value);
	      arrayEach(props || value, function(subValue, key) {
	        if (props) {
	          key = subValue;
	          subValue = value[key];
	        }
	        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
	      });
	      return result;
	    }
	    function baseConforms(source) {
	      var props = keys(source);
	      return function(object) {
	        return baseConformsTo(object, source, props);
	      };
	    }
	    function baseConformsTo(object, source, props) {
	      var length = props.length;
	      if (object == null) {
	        return !length;
	      }
	      object = Object(object);
	      while (length--) {
	        var key = props[length],
	            predicate = source[key],
	            value = object[key];
	        if ((value === undefined$1 && !(key in object)) || !predicate(value)) {
	          return false;
	        }
	      }
	      return true;
	    }
	    function baseDelay(func, wait, args) {
	      if (typeof func != 'function') {
	        throw new TypeError(FUNC_ERROR_TEXT);
	      }
	      return setTimeout(function() { func.apply(undefined$1, args); }, wait);
	    }
	    function baseDifference(array, values, iteratee, comparator) {
	      var index = -1,
	          includes = arrayIncludes,
	          isCommon = true,
	          length = array.length,
	          result = [],
	          valuesLength = values.length;
	      if (!length) {
	        return result;
	      }
	      if (iteratee) {
	        values = arrayMap(values, baseUnary(iteratee));
	      }
	      if (comparator) {
	        includes = arrayIncludesWith;
	        isCommon = false;
	      }
	      else if (values.length >= LARGE_ARRAY_SIZE) {
	        includes = cacheHas;
	        isCommon = false;
	        values = new SetCache(values);
	      }
	      outer:
	      while (++index < length) {
	        var value = array[index],
	            computed = iteratee == null ? value : iteratee(value);
	        value = (comparator || value !== 0) ? value : 0;
	        if (isCommon && computed === computed) {
	          var valuesIndex = valuesLength;
	          while (valuesIndex--) {
	            if (values[valuesIndex] === computed) {
	              continue outer;
	            }
	          }
	          result.push(value);
	        }
	        else if (!includes(values, computed, comparator)) {
	          result.push(value);
	        }
	      }
	      return result;
	    }
	    var baseEach = createBaseEach(baseForOwn);
	    var baseEachRight = createBaseEach(baseForOwnRight, true);
	    function baseEvery(collection, predicate) {
	      var result = true;
	      baseEach(collection, function(value, index, collection) {
	        result = !!predicate(value, index, collection);
	        return result;
	      });
	      return result;
	    }
	    function baseExtremum(array, iteratee, comparator) {
	      var index = -1,
	          length = array.length;
	      while (++index < length) {
	        var value = array[index],
	            current = iteratee(value);
	        if (current != null && (computed === undefined$1
	              ? (current === current && !isSymbol(current))
	              : comparator(current, computed)
	            )) {
	          var computed = current,
	              result = value;
	        }
	      }
	      return result;
	    }
	    function baseFill(array, value, start, end) {
	      var length = array.length;
	      start = toInteger(start);
	      if (start < 0) {
	        start = -start > length ? 0 : (length + start);
	      }
	      end = (end === undefined$1 || end > length) ? length : toInteger(end);
	      if (end < 0) {
	        end += length;
	      }
	      end = start > end ? 0 : toLength(end);
	      while (start < end) {
	        array[start++] = value;
	      }
	      return array;
	    }
	    function baseFilter(collection, predicate) {
	      var result = [];
	      baseEach(collection, function(value, index, collection) {
	        if (predicate(value, index, collection)) {
	          result.push(value);
	        }
	      });
	      return result;
	    }
	    function baseFlatten(array, depth, predicate, isStrict, result) {
	      var index = -1,
	          length = array.length;
	      predicate || (predicate = isFlattenable);
	      result || (result = []);
	      while (++index < length) {
	        var value = array[index];
	        if (depth > 0 && predicate(value)) {
	          if (depth > 1) {
	            baseFlatten(value, depth - 1, predicate, isStrict, result);
	          } else {
	            arrayPush(result, value);
	          }
	        } else if (!isStrict) {
	          result[result.length] = value;
	        }
	      }
	      return result;
	    }
	    var baseFor = createBaseFor();
	    var baseForRight = createBaseFor(true);
	    function baseForOwn(object, iteratee) {
	      return object && baseFor(object, iteratee, keys);
	    }
	    function baseForOwnRight(object, iteratee) {
	      return object && baseForRight(object, iteratee, keys);
	    }
	    function baseFunctions(object, props) {
	      return arrayFilter(props, function(key) {
	        return isFunction(object[key]);
	      });
	    }
	    function baseGet(object, path) {
	      path = castPath(path, object);
	      var index = 0,
	          length = path.length;
	      while (object != null && index < length) {
	        object = object[toKey(path[index++])];
	      }
	      return (index && index == length) ? object : undefined$1;
	    }
	    function baseGetAllKeys(object, keysFunc, symbolsFunc) {
	      var result = keysFunc(object);
	      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
	    }
	    function baseGetTag(value) {
	      if (value == null) {
	        return value === undefined$1 ? undefinedTag : nullTag;
	      }
	      return (symToStringTag && symToStringTag in Object(value))
	        ? getRawTag(value)
	        : objectToString(value);
	    }
	    function baseGt(value, other) {
	      return value > other;
	    }
	    function baseHas(object, key) {
	      return object != null && hasOwnProperty.call(object, key);
	    }
	    function baseHasIn(object, key) {
	      return object != null && key in Object(object);
	    }
	    function baseInRange(number, start, end) {
	      return number >= nativeMin(start, end) && number < nativeMax(start, end);
	    }
	    function baseIntersection(arrays, iteratee, comparator) {
	      var includes = comparator ? arrayIncludesWith : arrayIncludes,
	          length = arrays[0].length,
	          othLength = arrays.length,
	          othIndex = othLength,
	          caches = Array(othLength),
	          maxLength = Infinity,
	          result = [];
	      while (othIndex--) {
	        var array = arrays[othIndex];
	        if (othIndex && iteratee) {
	          array = arrayMap(array, baseUnary(iteratee));
	        }
	        maxLength = nativeMin(array.length, maxLength);
	        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
	          ? new SetCache(othIndex && array)
	          : undefined$1;
	      }
	      array = arrays[0];
	      var index = -1,
	          seen = caches[0];
	      outer:
	      while (++index < length && result.length < maxLength) {
	        var value = array[index],
	            computed = iteratee ? iteratee(value) : value;
	        value = (comparator || value !== 0) ? value : 0;
	        if (!(seen
	              ? cacheHas(seen, computed)
	              : includes(result, computed, comparator)
	            )) {
	          othIndex = othLength;
	          while (--othIndex) {
	            var cache = caches[othIndex];
	            if (!(cache
	                  ? cacheHas(cache, computed)
	                  : includes(arrays[othIndex], computed, comparator))
	                ) {
	              continue outer;
	            }
	          }
	          if (seen) {
	            seen.push(computed);
	          }
	          result.push(value);
	        }
	      }
	      return result;
	    }
	    function baseInverter(object, setter, iteratee, accumulator) {
	      baseForOwn(object, function(value, key, object) {
	        setter(accumulator, iteratee(value), key, object);
	      });
	      return accumulator;
	    }
	    function baseInvoke(object, path, args) {
	      path = castPath(path, object);
	      object = parent(object, path);
	      var func = object == null ? object : object[toKey(last(path))];
	      return func == null ? undefined$1 : apply(func, object, args);
	    }
	    function baseIsArguments(value) {
	      return isObjectLike(value) && baseGetTag(value) == argsTag;
	    }
	    function baseIsArrayBuffer(value) {
	      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
	    }
	    function baseIsDate(value) {
	      return isObjectLike(value) && baseGetTag(value) == dateTag;
	    }
	    function baseIsEqual(value, other, bitmask, customizer, stack) {
	      if (value === other) {
	        return true;
	      }
	      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
	        return value !== value && other !== other;
	      }
	      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
	    }
	    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
	      var objIsArr = isArray(object),
	          othIsArr = isArray(other),
	          objTag = objIsArr ? arrayTag : getTag(object),
	          othTag = othIsArr ? arrayTag : getTag(other);
	      objTag = objTag == argsTag ? objectTag : objTag;
	      othTag = othTag == argsTag ? objectTag : othTag;
	      var objIsObj = objTag == objectTag,
	          othIsObj = othTag == objectTag,
	          isSameTag = objTag == othTag;
	      if (isSameTag && isBuffer(object)) {
	        if (!isBuffer(other)) {
	          return false;
	        }
	        objIsArr = true;
	        objIsObj = false;
	      }
	      if (isSameTag && !objIsObj) {
	        stack || (stack = new Stack);
	        return (objIsArr || isTypedArray(object))
	          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
	          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
	      }
	      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
	        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
	            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
	        if (objIsWrapped || othIsWrapped) {
	          var objUnwrapped = objIsWrapped ? object.value() : object,
	              othUnwrapped = othIsWrapped ? other.value() : other;
	          stack || (stack = new Stack);
	          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
	        }
	      }
	      if (!isSameTag) {
	        return false;
	      }
	      stack || (stack = new Stack);
	      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
	    }
	    function baseIsMap(value) {
	      return isObjectLike(value) && getTag(value) == mapTag;
	    }
	    function baseIsMatch(object, source, matchData, customizer) {
	      var index = matchData.length,
	          length = index,
	          noCustomizer = !customizer;
	      if (object == null) {
	        return !length;
	      }
	      object = Object(object);
	      while (index--) {
	        var data = matchData[index];
	        if ((noCustomizer && data[2])
	              ? data[1] !== object[data[0]]
	              : !(data[0] in object)
	            ) {
	          return false;
	        }
	      }
	      while (++index < length) {
	        data = matchData[index];
	        var key = data[0],
	            objValue = object[key],
	            srcValue = data[1];
	        if (noCustomizer && data[2]) {
	          if (objValue === undefined$1 && !(key in object)) {
	            return false;
	          }
	        } else {
	          var stack = new Stack;
	          if (customizer) {
	            var result = customizer(objValue, srcValue, key, object, source, stack);
	          }
	          if (!(result === undefined$1
	                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
	                : result
	              )) {
	            return false;
	          }
	        }
	      }
	      return true;
	    }
	    function baseIsNative(value) {
	      if (!isObject(value) || isMasked(value)) {
	        return false;
	      }
	      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
	      return pattern.test(toSource(value));
	    }
	    function baseIsRegExp(value) {
	      return isObjectLike(value) && baseGetTag(value) == regexpTag;
	    }
	    function baseIsSet(value) {
	      return isObjectLike(value) && getTag(value) == setTag;
	    }
	    function baseIsTypedArray(value) {
	      return isObjectLike(value) &&
	        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
	    }
	    function baseIteratee(value) {
	      if (typeof value == 'function') {
	        return value;
	      }
	      if (value == null) {
	        return identity;
	      }
	      if (typeof value == 'object') {
	        return isArray(value)
	          ? baseMatchesProperty(value[0], value[1])
	          : baseMatches(value);
	      }
	      return property(value);
	    }
	    function baseKeys(object) {
	      if (!isPrototype(object)) {
	        return nativeKeys(object);
	      }
	      var result = [];
	      for (var key in Object(object)) {
	        if (hasOwnProperty.call(object, key) && key != 'constructor') {
	          result.push(key);
	        }
	      }
	      return result;
	    }
	    function baseKeysIn(object) {
	      if (!isObject(object)) {
	        return nativeKeysIn(object);
	      }
	      var isProto = isPrototype(object),
	          result = [];
	      for (var key in object) {
	        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
	          result.push(key);
	        }
	      }
	      return result;
	    }
	    function baseLt(value, other) {
	      return value < other;
	    }
	    function baseMap(collection, iteratee) {
	      var index = -1,
	          result = isArrayLike(collection) ? Array(collection.length) : [];
	      baseEach(collection, function(value, key, collection) {
	        result[++index] = iteratee(value, key, collection);
	      });
	      return result;
	    }
	    function baseMatches(source) {
	      var matchData = getMatchData(source);
	      if (matchData.length == 1 && matchData[0][2]) {
	        return matchesStrictComparable(matchData[0][0], matchData[0][1]);
	      }
	      return function(object) {
	        return object === source || baseIsMatch(object, source, matchData);
	      };
	    }
	    function baseMatchesProperty(path, srcValue) {
	      if (isKey(path) && isStrictComparable(srcValue)) {
	        return matchesStrictComparable(toKey(path), srcValue);
	      }
	      return function(object) {
	        var objValue = get(object, path);
	        return (objValue === undefined$1 && objValue === srcValue)
	          ? hasIn(object, path)
	          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
	      };
	    }
	    function baseMerge(object, source, srcIndex, customizer, stack) {
	      if (object === source) {
	        return;
	      }
	      baseFor(source, function(srcValue, key) {
	        stack || (stack = new Stack);
	        if (isObject(srcValue)) {
	          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
	        }
	        else {
	          var newValue = customizer
	            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
	            : undefined$1;
	          if (newValue === undefined$1) {
	            newValue = srcValue;
	          }
	          assignMergeValue(object, key, newValue);
	        }
	      }, keysIn);
	    }
	    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
	      var objValue = safeGet(object, key),
	          srcValue = safeGet(source, key),
	          stacked = stack.get(srcValue);
	      if (stacked) {
	        assignMergeValue(object, key, stacked);
	        return;
	      }
	      var newValue = customizer
	        ? customizer(objValue, srcValue, (key + ''), object, source, stack)
	        : undefined$1;
	      var isCommon = newValue === undefined$1;
	      if (isCommon) {
	        var isArr = isArray(srcValue),
	            isBuff = !isArr && isBuffer(srcValue),
	            isTyped = !isArr && !isBuff && isTypedArray(srcValue);
	        newValue = srcValue;
	        if (isArr || isBuff || isTyped) {
	          if (isArray(objValue)) {
	            newValue = objValue;
	          }
	          else if (isArrayLikeObject(objValue)) {
	            newValue = copyArray(objValue);
	          }
	          else if (isBuff) {
	            isCommon = false;
	            newValue = cloneBuffer(srcValue, true);
	          }
	          else if (isTyped) {
	            isCommon = false;
	            newValue = cloneTypedArray(srcValue, true);
	          }
	          else {
	            newValue = [];
	          }
	        }
	        else if (isPlainObject(srcValue) || isArguments(srcValue)) {
	          newValue = objValue;
	          if (isArguments(objValue)) {
	            newValue = toPlainObject(objValue);
	          }
	          else if (!isObject(objValue) || isFunction(objValue)) {
	            newValue = initCloneObject(srcValue);
	          }
	        }
	        else {
	          isCommon = false;
	        }
	      }
	      if (isCommon) {
	        stack.set(srcValue, newValue);
	        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
	        stack['delete'](srcValue);
	      }
	      assignMergeValue(object, key, newValue);
	    }
	    function baseNth(array, n) {
	      var length = array.length;
	      if (!length) {
	        return;
	      }
	      n += n < 0 ? length : 0;
	      return isIndex(n, length) ? array[n] : undefined$1;
	    }
	    function baseOrderBy(collection, iteratees, orders) {
	      if (iteratees.length) {
	        iteratees = arrayMap(iteratees, function(iteratee) {
	          if (isArray(iteratee)) {
	            return function(value) {
	              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
	            }
	          }
	          return iteratee;
	        });
	      } else {
	        iteratees = [identity];
	      }
	      var index = -1;
	      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
	      var result = baseMap(collection, function(value, key, collection) {
	        var criteria = arrayMap(iteratees, function(iteratee) {
	          return iteratee(value);
	        });
	        return { 'criteria': criteria, 'index': ++index, 'value': value };
	      });
	      return baseSortBy(result, function(object, other) {
	        return compareMultiple(object, other, orders);
	      });
	    }
	    function basePick(object, paths) {
	      return basePickBy(object, paths, function(value, path) {
	        return hasIn(object, path);
	      });
	    }
	    function basePickBy(object, paths, predicate) {
	      var index = -1,
	          length = paths.length,
	          result = {};
	      while (++index < length) {
	        var path = paths[index],
	            value = baseGet(object, path);
	        if (predicate(value, path)) {
	          baseSet(result, castPath(path, object), value);
	        }
	      }
	      return result;
	    }
	    function basePropertyDeep(path) {
	      return function(object) {
	        return baseGet(object, path);
	      };
	    }
	    function basePullAll(array, values, iteratee, comparator) {
	      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
	          index = -1,
	          length = values.length,
	          seen = array;
	      if (array === values) {
	        values = copyArray(values);
	      }
	      if (iteratee) {
	        seen = arrayMap(array, baseUnary(iteratee));
	      }
	      while (++index < length) {
	        var fromIndex = 0,
	            value = values[index],
	            computed = iteratee ? iteratee(value) : value;
	        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
	          if (seen !== array) {
	            splice.call(seen, fromIndex, 1);
	          }
	          splice.call(array, fromIndex, 1);
	        }
	      }
	      return array;
	    }
	    function basePullAt(array, indexes) {
	      var length = array ? indexes.length : 0,
	          lastIndex = length - 1;
	      while (length--) {
	        var index = indexes[length];
	        if (length == lastIndex || index !== previous) {
	          var previous = index;
	          if (isIndex(index)) {
	            splice.call(array, index, 1);
	          } else {
	            baseUnset(array, index);
	          }
	        }
	      }
	      return array;
	    }
	    function baseRandom(lower, upper) {
	      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
	    }
	    function baseRange(start, end, step, fromRight) {
	      var index = -1,
	          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
	          result = Array(length);
	      while (length--) {
	        result[fromRight ? length : ++index] = start;
	        start += step;
	      }
	      return result;
	    }
	    function baseRepeat(string, n) {
	      var result = '';
	      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
	        return result;
	      }
	      do {
	        if (n % 2) {
	          result += string;
	        }
	        n = nativeFloor(n / 2);
	        if (n) {
	          string += string;
	        }
	      } while (n);
	      return result;
	    }
	    function baseRest(func, start) {
	      return setToString(overRest(func, start, identity), func + '');
	    }
	    function baseSample(collection) {
	      return arraySample(values(collection));
	    }
	    function baseSampleSize(collection, n) {
	      var array = values(collection);
	      return shuffleSelf(array, baseClamp(n, 0, array.length));
	    }
	    function baseSet(object, path, value, customizer) {
	      if (!isObject(object)) {
	        return object;
	      }
	      path = castPath(path, object);
	      var index = -1,
	          length = path.length,
	          lastIndex = length - 1,
	          nested = object;
	      while (nested != null && ++index < length) {
	        var key = toKey(path[index]),
	            newValue = value;
	        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
	          return object;
	        }
	        if (index != lastIndex) {
	          var objValue = nested[key];
	          newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
	          if (newValue === undefined$1) {
	            newValue = isObject(objValue)
	              ? objValue
	              : (isIndex(path[index + 1]) ? [] : {});
	          }
	        }
	        assignValue(nested, key, newValue);
	        nested = nested[key];
	      }
	      return object;
	    }
	    var baseSetData = !metaMap ? identity : function(func, data) {
	      metaMap.set(func, data);
	      return func;
	    };
	    var baseSetToString = !defineProperty ? identity : function(func, string) {
	      return defineProperty(func, 'toString', {
	        'configurable': true,
	        'enumerable': false,
	        'value': constant(string),
	        'writable': true
	      });
	    };
	    function baseShuffle(collection) {
	      return shuffleSelf(values(collection));
	    }
	    function baseSlice(array, start, end) {
	      var index = -1,
	          length = array.length;
	      if (start < 0) {
	        start = -start > length ? 0 : (length + start);
	      }
	      end = end > length ? length : end;
	      if (end < 0) {
	        end += length;
	      }
	      length = start > end ? 0 : ((end - start) >>> 0);
	      start >>>= 0;
	      var result = Array(length);
	      while (++index < length) {
	        result[index] = array[index + start];
	      }
	      return result;
	    }
	    function baseSome(collection, predicate) {
	      var result;
	      baseEach(collection, function(value, index, collection) {
	        result = predicate(value, index, collection);
	        return !result;
	      });
	      return !!result;
	    }
	    function baseSortedIndex(array, value, retHighest) {
	      var low = 0,
	          high = array == null ? low : array.length;
	      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
	        while (low < high) {
	          var mid = (low + high) >>> 1,
	              computed = array[mid];
	          if (computed !== null && !isSymbol(computed) &&
	              (retHighest ? (computed <= value) : (computed < value))) {
	            low = mid + 1;
	          } else {
	            high = mid;
	          }
	        }
	        return high;
	      }
	      return baseSortedIndexBy(array, value, identity, retHighest);
	    }
	    function baseSortedIndexBy(array, value, iteratee, retHighest) {
	      var low = 0,
	          high = array == null ? 0 : array.length;
	      if (high === 0) {
	        return 0;
	      }
	      value = iteratee(value);
	      var valIsNaN = value !== value,
	          valIsNull = value === null,
	          valIsSymbol = isSymbol(value),
	          valIsUndefined = value === undefined$1;
	      while (low < high) {
	        var mid = nativeFloor((low + high) / 2),
	            computed = iteratee(array[mid]),
	            othIsDefined = computed !== undefined$1,
	            othIsNull = computed === null,
	            othIsReflexive = computed === computed,
	            othIsSymbol = isSymbol(computed);
	        if (valIsNaN) {
	          var setLow = retHighest || othIsReflexive;
	        } else if (valIsUndefined) {
	          setLow = othIsReflexive && (retHighest || othIsDefined);
	        } else if (valIsNull) {
	          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
	        } else if (valIsSymbol) {
	          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
	        } else if (othIsNull || othIsSymbol) {
	          setLow = false;
	        } else {
	          setLow = retHighest ? (computed <= value) : (computed < value);
	        }
	        if (setLow) {
	          low = mid + 1;
	        } else {
	          high = mid;
	        }
	      }
	      return nativeMin(high, MAX_ARRAY_INDEX);
	    }
	    function baseSortedUniq(array, iteratee) {
	      var index = -1,
	          length = array.length,
	          resIndex = 0,
	          result = [];
	      while (++index < length) {
	        var value = array[index],
	            computed = iteratee ? iteratee(value) : value;
	        if (!index || !eq(computed, seen)) {
	          var seen = computed;
	          result[resIndex++] = value === 0 ? 0 : value;
	        }
	      }
	      return result;
	    }
	    function baseToNumber(value) {
	      if (typeof value == 'number') {
	        return value;
	      }
	      if (isSymbol(value)) {
	        return NAN;
	      }
	      return +value;
	    }
	    function baseToString(value) {
	      if (typeof value == 'string') {
	        return value;
	      }
	      if (isArray(value)) {
	        return arrayMap(value, baseToString) + '';
	      }
	      if (isSymbol(value)) {
	        return symbolToString ? symbolToString.call(value) : '';
	      }
	      var result = (value + '');
	      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
	    }
	    function baseUniq(array, iteratee, comparator) {
	      var index = -1,
	          includes = arrayIncludes,
	          length = array.length,
	          isCommon = true,
	          result = [],
	          seen = result;
	      if (comparator) {
	        isCommon = false;
	        includes = arrayIncludesWith;
	      }
	      else if (length >= LARGE_ARRAY_SIZE) {
	        var set = iteratee ? null : createSet(array);
	        if (set) {
	          return setToArray(set);
	        }
	        isCommon = false;
	        includes = cacheHas;
	        seen = new SetCache;
	      }
	      else {
	        seen = iteratee ? [] : result;
	      }
	      outer:
	      while (++index < length) {
	        var value = array[index],
	            computed = iteratee ? iteratee(value) : value;
	        value = (comparator || value !== 0) ? value : 0;
	        if (isCommon && computed === computed) {
	          var seenIndex = seen.length;
	          while (seenIndex--) {
	            if (seen[seenIndex] === computed) {
	              continue outer;
	            }
	          }
	          if (iteratee) {
	            seen.push(computed);
	          }
	          result.push(value);
	        }
	        else if (!includes(seen, computed, comparator)) {
	          if (seen !== result) {
	            seen.push(computed);
	          }
	          result.push(value);
	        }
	      }
	      return result;
	    }
	    function baseUnset(object, path) {
	      path = castPath(path, object);
	      object = parent(object, path);
	      return object == null || delete object[toKey(last(path))];
	    }
	    function baseUpdate(object, path, updater, customizer) {
	      return baseSet(object, path, updater(baseGet(object, path)), customizer);
	    }
	    function baseWhile(array, predicate, isDrop, fromRight) {
	      var length = array.length,
	          index = fromRight ? length : -1;
	      while ((fromRight ? index-- : ++index < length) &&
	        predicate(array[index], index, array)) {}
	      return isDrop
	        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
	        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
	    }
	    function baseWrapperValue(value, actions) {
	      var result = value;
	      if (result instanceof LazyWrapper) {
	        result = result.value();
	      }
	      return arrayReduce(actions, function(result, action) {
	        return action.func.apply(action.thisArg, arrayPush([result], action.args));
	      }, result);
	    }
	    function baseXor(arrays, iteratee, comparator) {
	      var length = arrays.length;
	      if (length < 2) {
	        return length ? baseUniq(arrays[0]) : [];
	      }
	      var index = -1,
	          result = Array(length);
	      while (++index < length) {
	        var array = arrays[index],
	            othIndex = -1;
	        while (++othIndex < length) {
	          if (othIndex != index) {
	            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
	          }
	        }
	      }
	      return baseUniq(baseFlatten(result, 1), iteratee, comparator);
	    }
	    function baseZipObject(props, values, assignFunc) {
	      var index = -1,
	          length = props.length,
	          valsLength = values.length,
	          result = {};
	      while (++index < length) {
	        var value = index < valsLength ? values[index] : undefined$1;
	        assignFunc(result, props[index], value);
	      }
	      return result;
	    }
	    function castArrayLikeObject(value) {
	      return isArrayLikeObject(value) ? value : [];
	    }
	    function castFunction(value) {
	      return typeof value == 'function' ? value : identity;
	    }
	    function castPath(value, object) {
	      if (isArray(value)) {
	        return value;
	      }
	      return isKey(value, object) ? [value] : stringToPath(toString(value));
	    }
	    var castRest = baseRest;
	    function castSlice(array, start, end) {
	      var length = array.length;
	      end = end === undefined$1 ? length : end;
	      return (!start && end >= length) ? array : baseSlice(array, start, end);
	    }
	    var clearTimeout = ctxClearTimeout || function(id) {
	      return root.clearTimeout(id);
	    };
	    function cloneBuffer(buffer, isDeep) {
	      if (isDeep) {
	        return buffer.slice();
	      }
	      var length = buffer.length,
	          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
	      buffer.copy(result);
	      return result;
	    }
	    function cloneArrayBuffer(arrayBuffer) {
	      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
	      new Uint8Array(result).set(new Uint8Array(arrayBuffer));
	      return result;
	    }
	    function cloneDataView(dataView, isDeep) {
	      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
	      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
	    }
	    function cloneRegExp(regexp) {
	      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
	      result.lastIndex = regexp.lastIndex;
	      return result;
	    }
	    function cloneSymbol(symbol) {
	      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
	    }
	    function cloneTypedArray(typedArray, isDeep) {
	      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
	      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
	    }
	    function compareAscending(value, other) {
	      if (value !== other) {
	        var valIsDefined = value !== undefined$1,
	            valIsNull = value === null,
	            valIsReflexive = value === value,
	            valIsSymbol = isSymbol(value);
	        var othIsDefined = other !== undefined$1,
	            othIsNull = other === null,
	            othIsReflexive = other === other,
	            othIsSymbol = isSymbol(other);
	        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
	            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
	            (valIsNull && othIsDefined && othIsReflexive) ||
	            (!valIsDefined && othIsReflexive) ||
	            !valIsReflexive) {
	          return 1;
	        }
	        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
	            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
	            (othIsNull && valIsDefined && valIsReflexive) ||
	            (!othIsDefined && valIsReflexive) ||
	            !othIsReflexive) {
	          return -1;
	        }
	      }
	      return 0;
	    }
	    function compareMultiple(object, other, orders) {
	      var index = -1,
	          objCriteria = object.criteria,
	          othCriteria = other.criteria,
	          length = objCriteria.length,
	          ordersLength = orders.length;
	      while (++index < length) {
	        var result = compareAscending(objCriteria[index], othCriteria[index]);
	        if (result) {
	          if (index >= ordersLength) {
	            return result;
	          }
	          var order = orders[index];
	          return result * (order == 'desc' ? -1 : 1);
	        }
	      }
	      return object.index - other.index;
	    }
	    function composeArgs(args, partials, holders, isCurried) {
	      var argsIndex = -1,
	          argsLength = args.length,
	          holdersLength = holders.length,
	          leftIndex = -1,
	          leftLength = partials.length,
	          rangeLength = nativeMax(argsLength - holdersLength, 0),
	          result = Array(leftLength + rangeLength),
	          isUncurried = !isCurried;
	      while (++leftIndex < leftLength) {
	        result[leftIndex] = partials[leftIndex];
	      }
	      while (++argsIndex < holdersLength) {
	        if (isUncurried || argsIndex < argsLength) {
	          result[holders[argsIndex]] = args[argsIndex];
	        }
	      }
	      while (rangeLength--) {
	        result[leftIndex++] = args[argsIndex++];
	      }
	      return result;
	    }
	    function composeArgsRight(args, partials, holders, isCurried) {
	      var argsIndex = -1,
	          argsLength = args.length,
	          holdersIndex = -1,
	          holdersLength = holders.length,
	          rightIndex = -1,
	          rightLength = partials.length,
	          rangeLength = nativeMax(argsLength - holdersLength, 0),
	          result = Array(rangeLength + rightLength),
	          isUncurried = !isCurried;
	      while (++argsIndex < rangeLength) {
	        result[argsIndex] = args[argsIndex];
	      }
	      var offset = argsIndex;
	      while (++rightIndex < rightLength) {
	        result[offset + rightIndex] = partials[rightIndex];
	      }
	      while (++holdersIndex < holdersLength) {
	        if (isUncurried || argsIndex < argsLength) {
	          result[offset + holders[holdersIndex]] = args[argsIndex++];
	        }
	      }
	      return result;
	    }
	    function copyArray(source, array) {
	      var index = -1,
	          length = source.length;
	      array || (array = Array(length));
	      while (++index < length) {
	        array[index] = source[index];
	      }
	      return array;
	    }
	    function copyObject(source, props, object, customizer) {
	      var isNew = !object;
	      object || (object = {});
	      var index = -1,
	          length = props.length;
	      while (++index < length) {
	        var key = props[index];
	        var newValue = customizer
	          ? customizer(object[key], source[key], key, object, source)
	          : undefined$1;
	        if (newValue === undefined$1) {
	          newValue = source[key];
	        }
	        if (isNew) {
	          baseAssignValue(object, key, newValue);
	        } else {
	          assignValue(object, key, newValue);
	        }
	      }
	      return object;
	    }
	    function copySymbols(source, object) {
	      return copyObject(source, getSymbols(source), object);
	    }
	    function copySymbolsIn(source, object) {
	      return copyObject(source, getSymbolsIn(source), object);
	    }
	    function createAggregator(setter, initializer) {
	      return function(collection, iteratee) {
	        var func = isArray(collection) ? arrayAggregator : baseAggregator,
	            accumulator = initializer ? initializer() : {};
	        return func(collection, setter, getIteratee(iteratee, 2), accumulator);
	      };
	    }
	    function createAssigner(assigner) {
	      return baseRest(function(object, sources) {
	        var index = -1,
	            length = sources.length,
	            customizer = length > 1 ? sources[length - 1] : undefined$1,
	            guard = length > 2 ? sources[2] : undefined$1;
	        customizer = (assigner.length > 3 && typeof customizer == 'function')
	          ? (length--, customizer)
	          : undefined$1;
	        if (guard && isIterateeCall(sources[0], sources[1], guard)) {
	          customizer = length < 3 ? undefined$1 : customizer;
	          length = 1;
	        }
	        object = Object(object);
	        while (++index < length) {
	          var source = sources[index];
	          if (source) {
	            assigner(object, source, index, customizer);
	          }
	        }
	        return object;
	      });
	    }
	    function createBaseEach(eachFunc, fromRight) {
	      return function(collection, iteratee) {
	        if (collection == null) {
	          return collection;
	        }
	        if (!isArrayLike(collection)) {
	          return eachFunc(collection, iteratee);
	        }
	        var length = collection.length,
	            index = fromRight ? length : -1,
	            iterable = Object(collection);
	        while ((fromRight ? index-- : ++index < length)) {
	          if (iteratee(iterable[index], index, iterable) === false) {
	            break;
	          }
	        }
	        return collection;
	      };
	    }
	    function createBaseFor(fromRight) {
	      return function(object, iteratee, keysFunc) {
	        var index = -1,
	            iterable = Object(object),
	            props = keysFunc(object),
	            length = props.length;
	        while (length--) {
	          var key = props[fromRight ? length : ++index];
	          if (iteratee(iterable[key], key, iterable) === false) {
	            break;
	          }
	        }
	        return object;
	      };
	    }
	    function createBind(func, bitmask, thisArg) {
	      var isBind = bitmask & WRAP_BIND_FLAG,
	          Ctor = createCtor(func);
	      function wrapper() {
	        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
	        return fn.apply(isBind ? thisArg : this, arguments);
	      }
	      return wrapper;
	    }
	    function createCaseFirst(methodName) {
	      return function(string) {
	        string = toString(string);
	        var strSymbols = hasUnicode(string)
	          ? stringToArray(string)
	          : undefined$1;
	        var chr = strSymbols
	          ? strSymbols[0]
	          : string.charAt(0);
	        var trailing = strSymbols
	          ? castSlice(strSymbols, 1).join('')
	          : string.slice(1);
	        return chr[methodName]() + trailing;
	      };
	    }
	    function createCompounder(callback) {
	      return function(string) {
	        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
	      };
	    }
	    function createCtor(Ctor) {
	      return function() {
	        var args = arguments;
	        switch (args.length) {
	          case 0: return new Ctor;
	          case 1: return new Ctor(args[0]);
	          case 2: return new Ctor(args[0], args[1]);
	          case 3: return new Ctor(args[0], args[1], args[2]);
	          case 4: return new Ctor(args[0], args[1], args[2], args[3]);
	          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
	          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
	          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
	        }
	        var thisBinding = baseCreate(Ctor.prototype),
	            result = Ctor.apply(thisBinding, args);
	        return isObject(result) ? result : thisBinding;
	      };
	    }
	    function createCurry(func, bitmask, arity) {
	      var Ctor = createCtor(func);
	      function wrapper() {
	        var length = arguments.length,
	            args = Array(length),
	            index = length,
	            placeholder = getHolder(wrapper);
	        while (index--) {
	          args[index] = arguments[index];
	        }
	        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
	          ? []
	          : replaceHolders(args, placeholder);
	        length -= holders.length;
	        if (length < arity) {
	          return createRecurry(
	            func, bitmask, createHybrid, wrapper.placeholder, undefined$1,
	            args, holders, undefined$1, undefined$1, arity - length);
	        }
	        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
	        return apply(fn, this, args);
	      }
	      return wrapper;
	    }
	    function createFind(findIndexFunc) {
	      return function(collection, predicate, fromIndex) {
	        var iterable = Object(collection);
	        if (!isArrayLike(collection)) {
	          var iteratee = getIteratee(predicate, 3);
	          collection = keys(collection);
	          predicate = function(key) { return iteratee(iterable[key], key, iterable); };
	        }
	        var index = findIndexFunc(collection, predicate, fromIndex);
	        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined$1;
	      };
	    }
	    function createFlow(fromRight) {
	      return flatRest(function(funcs) {
	        var length = funcs.length,
	            index = length,
	            prereq = LodashWrapper.prototype.thru;
	        if (fromRight) {
	          funcs.reverse();
	        }
	        while (index--) {
	          var func = funcs[index];
	          if (typeof func != 'function') {
	            throw new TypeError(FUNC_ERROR_TEXT);
	          }
	          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
	            var wrapper = new LodashWrapper([], true);
	          }
	        }
	        index = wrapper ? index : length;
	        while (++index < length) {
	          func = funcs[index];
	          var funcName = getFuncName(func),
	              data = funcName == 'wrapper' ? getData(func) : undefined$1;
	          if (data && isLaziable(data[0]) &&
	                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
	                !data[4].length && data[9] == 1
	              ) {
	            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
	          } else {
	            wrapper = (func.length == 1 && isLaziable(func))
	              ? wrapper[funcName]()
	              : wrapper.thru(func);
	          }
	        }
	        return function() {
	          var args = arguments,
	              value = args[0];
	          if (wrapper && args.length == 1 && isArray(value)) {
	            return wrapper.plant(value).value();
	          }
	          var index = 0,
	              result = length ? funcs[index].apply(this, args) : value;
	          while (++index < length) {
	            result = funcs[index].call(this, result);
	          }
	          return result;
	        };
	      });
	    }
	    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
	      var isAry = bitmask & WRAP_ARY_FLAG,
	          isBind = bitmask & WRAP_BIND_FLAG,
	          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
	          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
	          isFlip = bitmask & WRAP_FLIP_FLAG,
	          Ctor = isBindKey ? undefined$1 : createCtor(func);
	      function wrapper() {
	        var length = arguments.length,
	            args = Array(length),
	            index = length;
	        while (index--) {
	          args[index] = arguments[index];
	        }
	        if (isCurried) {
	          var placeholder = getHolder(wrapper),
	              holdersCount = countHolders(args, placeholder);
	        }
	        if (partials) {
	          args = composeArgs(args, partials, holders, isCurried);
	        }
	        if (partialsRight) {
	          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
	        }
	        length -= holdersCount;
	        if (isCurried && length < arity) {
	          var newHolders = replaceHolders(args, placeholder);
	          return createRecurry(
	            func, bitmask, createHybrid, wrapper.placeholder, thisArg,
	            args, newHolders, argPos, ary, arity - length
	          );
	        }
	        var thisBinding = isBind ? thisArg : this,
	            fn = isBindKey ? thisBinding[func] : func;
	        length = args.length;
	        if (argPos) {
	          args = reorder(args, argPos);
	        } else if (isFlip && length > 1) {
	          args.reverse();
	        }
	        if (isAry && ary < length) {
	          args.length = ary;
	        }
	        if (this && this !== root && this instanceof wrapper) {
	          fn = Ctor || createCtor(fn);
	        }
	        return fn.apply(thisBinding, args);
	      }
	      return wrapper;
	    }
	    function createInverter(setter, toIteratee) {
	      return function(object, iteratee) {
	        return baseInverter(object, setter, toIteratee(iteratee), {});
	      };
	    }
	    function createMathOperation(operator, defaultValue) {
	      return function(value, other) {
	        var result;
	        if (value === undefined$1 && other === undefined$1) {
	          return defaultValue;
	        }
	        if (value !== undefined$1) {
	          result = value;
	        }
	        if (other !== undefined$1) {
	          if (result === undefined$1) {
	            return other;
	          }
	          if (typeof value == 'string' || typeof other == 'string') {
	            value = baseToString(value);
	            other = baseToString(other);
	          } else {
	            value = baseToNumber(value);
	            other = baseToNumber(other);
	          }
	          result = operator(value, other);
	        }
	        return result;
	      };
	    }
	    function createOver(arrayFunc) {
	      return flatRest(function(iteratees) {
	        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
	        return baseRest(function(args) {
	          var thisArg = this;
	          return arrayFunc(iteratees, function(iteratee) {
	            return apply(iteratee, thisArg, args);
	          });
	        });
	      });
	    }
	    function createPadding(length, chars) {
	      chars = chars === undefined$1 ? ' ' : baseToString(chars);
	      var charsLength = chars.length;
	      if (charsLength < 2) {
	        return charsLength ? baseRepeat(chars, length) : chars;
	      }
	      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
	      return hasUnicode(chars)
	        ? castSlice(stringToArray(result), 0, length).join('')
	        : result.slice(0, length);
	    }
	    function createPartial(func, bitmask, thisArg, partials) {
	      var isBind = bitmask & WRAP_BIND_FLAG,
	          Ctor = createCtor(func);
	      function wrapper() {
	        var argsIndex = -1,
	            argsLength = arguments.length,
	            leftIndex = -1,
	            leftLength = partials.length,
	            args = Array(leftLength + argsLength),
	            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
	        while (++leftIndex < leftLength) {
	          args[leftIndex] = partials[leftIndex];
	        }
	        while (argsLength--) {
	          args[leftIndex++] = arguments[++argsIndex];
	        }
	        return apply(fn, isBind ? thisArg : this, args);
	      }
	      return wrapper;
	    }
	    function createRange(fromRight) {
	      return function(start, end, step) {
	        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
	          end = step = undefined$1;
	        }
	        start = toFinite(start);
	        if (end === undefined$1) {
	          end = start;
	          start = 0;
	        } else {
	          end = toFinite(end);
	        }
	        step = step === undefined$1 ? (start < end ? 1 : -1) : toFinite(step);
	        return baseRange(start, end, step, fromRight);
	      };
	    }
	    function createRelationalOperation(operator) {
	      return function(value, other) {
	        if (!(typeof value == 'string' && typeof other == 'string')) {
	          value = toNumber(value);
	          other = toNumber(other);
	        }
	        return operator(value, other);
	      };
	    }
	    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
	      var isCurry = bitmask & WRAP_CURRY_FLAG,
	          newHolders = isCurry ? holders : undefined$1,
	          newHoldersRight = isCurry ? undefined$1 : holders,
	          newPartials = isCurry ? partials : undefined$1,
	          newPartialsRight = isCurry ? undefined$1 : partials;
	      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
	      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
	      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
	        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
	      }
	      var newData = [
	        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
	        newHoldersRight, argPos, ary, arity
	      ];
	      var result = wrapFunc.apply(undefined$1, newData);
	      if (isLaziable(func)) {
	        setData(result, newData);
	      }
	      result.placeholder = placeholder;
	      return setWrapToString(result, func, bitmask);
	    }
	    function createRound(methodName) {
	      var func = Math[methodName];
	      return function(number, precision) {
	        number = toNumber(number);
	        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
	        if (precision && nativeIsFinite(number)) {
	          var pair = (toString(number) + 'e').split('e'),
	              value = func(pair[0] + 'e' + (+pair[1] + precision));
	          pair = (toString(value) + 'e').split('e');
	          return +(pair[0] + 'e' + (+pair[1] - precision));
	        }
	        return func(number);
	      };
	    }
	    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
	      return new Set(values);
	    };
	    function createToPairs(keysFunc) {
	      return function(object) {
	        var tag = getTag(object);
	        if (tag == mapTag) {
	          return mapToArray(object);
	        }
	        if (tag == setTag) {
	          return setToPairs(object);
	        }
	        return baseToPairs(object, keysFunc(object));
	      };
	    }
	    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
	      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
	      if (!isBindKey && typeof func != 'function') {
	        throw new TypeError(FUNC_ERROR_TEXT);
	      }
	      var length = partials ? partials.length : 0;
	      if (!length) {
	        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
	        partials = holders = undefined$1;
	      }
	      ary = ary === undefined$1 ? ary : nativeMax(toInteger(ary), 0);
	      arity = arity === undefined$1 ? arity : toInteger(arity);
	      length -= holders ? holders.length : 0;
	      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
	        var partialsRight = partials,
	            holdersRight = holders;
	        partials = holders = undefined$1;
	      }
	      var data = isBindKey ? undefined$1 : getData(func);
	      var newData = [
	        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
	        argPos, ary, arity
	      ];
	      if (data) {
	        mergeData(newData, data);
	      }
	      func = newData[0];
	      bitmask = newData[1];
	      thisArg = newData[2];
	      partials = newData[3];
	      holders = newData[4];
	      arity = newData[9] = newData[9] === undefined$1
	        ? (isBindKey ? 0 : func.length)
	        : nativeMax(newData[9] - length, 0);
	      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
	        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
	      }
	      if (!bitmask || bitmask == WRAP_BIND_FLAG) {
	        var result = createBind(func, bitmask, thisArg);
	      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
	        result = createCurry(func, bitmask, arity);
	      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
	        result = createPartial(func, bitmask, thisArg, partials);
	      } else {
	        result = createHybrid.apply(undefined$1, newData);
	      }
	      var setter = data ? baseSetData : setData;
	      return setWrapToString(setter(result, newData), func, bitmask);
	    }
	    function customDefaultsAssignIn(objValue, srcValue, key, object) {
	      if (objValue === undefined$1 ||
	          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
	        return srcValue;
	      }
	      return objValue;
	    }
	    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
	      if (isObject(objValue) && isObject(srcValue)) {
	        stack.set(srcValue, objValue);
	        baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
	        stack['delete'](srcValue);
	      }
	      return objValue;
	    }
	    function customOmitClone(value) {
	      return isPlainObject(value) ? undefined$1 : value;
	    }
	    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
	      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
	          arrLength = array.length,
	          othLength = other.length;
	      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
	        return false;
	      }
	      var arrStacked = stack.get(array);
	      var othStacked = stack.get(other);
	      if (arrStacked && othStacked) {
	        return arrStacked == other && othStacked == array;
	      }
	      var index = -1,
	          result = true,
	          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined$1;
	      stack.set(array, other);
	      stack.set(other, array);
	      while (++index < arrLength) {
	        var arrValue = array[index],
	            othValue = other[index];
	        if (customizer) {
	          var compared = isPartial
	            ? customizer(othValue, arrValue, index, other, array, stack)
	            : customizer(arrValue, othValue, index, array, other, stack);
	        }
	        if (compared !== undefined$1) {
	          if (compared) {
	            continue;
	          }
	          result = false;
	          break;
	        }
	        if (seen) {
	          if (!arraySome(other, function(othValue, othIndex) {
	                if (!cacheHas(seen, othIndex) &&
	                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
	                  return seen.push(othIndex);
	                }
	              })) {
	            result = false;
	            break;
	          }
	        } else if (!(
	              arrValue === othValue ||
	                equalFunc(arrValue, othValue, bitmask, customizer, stack)
	            )) {
	          result = false;
	          break;
	        }
	      }
	      stack['delete'](array);
	      stack['delete'](other);
	      return result;
	    }
	    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
	      switch (tag) {
	        case dataViewTag:
	          if ((object.byteLength != other.byteLength) ||
	              (object.byteOffset != other.byteOffset)) {
	            return false;
	          }
	          object = object.buffer;
	          other = other.buffer;
	        case arrayBufferTag:
	          if ((object.byteLength != other.byteLength) ||
	              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
	            return false;
	          }
	          return true;
	        case boolTag:
	        case dateTag:
	        case numberTag:
	          return eq(+object, +other);
	        case errorTag:
	          return object.name == other.name && object.message == other.message;
	        case regexpTag:
	        case stringTag:
	          return object == (other + '');
	        case mapTag:
	          var convert = mapToArray;
	        case setTag:
	          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
	          convert || (convert = setToArray);
	          if (object.size != other.size && !isPartial) {
	            return false;
	          }
	          var stacked = stack.get(object);
	          if (stacked) {
	            return stacked == other;
	          }
	          bitmask |= COMPARE_UNORDERED_FLAG;
	          stack.set(object, other);
	          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
	          stack['delete'](object);
	          return result;
	        case symbolTag:
	          if (symbolValueOf) {
	            return symbolValueOf.call(object) == symbolValueOf.call(other);
	          }
	      }
	      return false;
	    }
	    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
	      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
	          objProps = getAllKeys(object),
	          objLength = objProps.length,
	          othProps = getAllKeys(other),
	          othLength = othProps.length;
	      if (objLength != othLength && !isPartial) {
	        return false;
	      }
	      var index = objLength;
	      while (index--) {
	        var key = objProps[index];
	        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
	          return false;
	        }
	      }
	      var objStacked = stack.get(object);
	      var othStacked = stack.get(other);
	      if (objStacked && othStacked) {
	        return objStacked == other && othStacked == object;
	      }
	      var result = true;
	      stack.set(object, other);
	      stack.set(other, object);
	      var skipCtor = isPartial;
	      while (++index < objLength) {
	        key = objProps[index];
	        var objValue = object[key],
	            othValue = other[key];
	        if (customizer) {
	          var compared = isPartial
	            ? customizer(othValue, objValue, key, other, object, stack)
	            : customizer(objValue, othValue, key, object, other, stack);
	        }
	        if (!(compared === undefined$1
	              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
	              : compared
	            )) {
	          result = false;
	          break;
	        }
	        skipCtor || (skipCtor = key == 'constructor');
	      }
	      if (result && !skipCtor) {
	        var objCtor = object.constructor,
	            othCtor = other.constructor;
	        if (objCtor != othCtor &&
	            ('constructor' in object && 'constructor' in other) &&
	            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
	              typeof othCtor == 'function' && othCtor instanceof othCtor)) {
	          result = false;
	        }
	      }
	      stack['delete'](object);
	      stack['delete'](other);
	      return result;
	    }
	    function flatRest(func) {
	      return setToString(overRest(func, undefined$1, flatten), func + '');
	    }
	    function getAllKeys(object) {
	      return baseGetAllKeys(object, keys, getSymbols);
	    }
	    function getAllKeysIn(object) {
	      return baseGetAllKeys(object, keysIn, getSymbolsIn);
	    }
	    var getData = !metaMap ? noop : function(func) {
	      return metaMap.get(func);
	    };
	    function getFuncName(func) {
	      var result = (func.name + ''),
	          array = realNames[result],
	          length = hasOwnProperty.call(realNames, result) ? array.length : 0;
	      while (length--) {
	        var data = array[length],
	            otherFunc = data.func;
	        if (otherFunc == null || otherFunc == func) {
	          return data.name;
	        }
	      }
	      return result;
	    }
	    function getHolder(func) {
	      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
	      return object.placeholder;
	    }
	    function getIteratee() {
	      var result = lodash.iteratee || iteratee;
	      result = result === iteratee ? baseIteratee : result;
	      return arguments.length ? result(arguments[0], arguments[1]) : result;
	    }
	    function getMapData(map, key) {
	      var data = map.__data__;
	      return isKeyable(key)
	        ? data[typeof key == 'string' ? 'string' : 'hash']
	        : data.map;
	    }
	    function getMatchData(object) {
	      var result = keys(object),
	          length = result.length;
	      while (length--) {
	        var key = result[length],
	            value = object[key];
	        result[length] = [key, value, isStrictComparable(value)];
	      }
	      return result;
	    }
	    function getNative(object, key) {
	      var value = getValue(object, key);
	      return baseIsNative(value) ? value : undefined$1;
	    }
	    function getRawTag(value) {
	      var isOwn = hasOwnProperty.call(value, symToStringTag),
	          tag = value[symToStringTag];
	      try {
	        value[symToStringTag] = undefined$1;
	        var unmasked = true;
	      } catch (e) {}
	      var result = nativeObjectToString.call(value);
	      if (unmasked) {
	        if (isOwn) {
	          value[symToStringTag] = tag;
	        } else {
	          delete value[symToStringTag];
	        }
	      }
	      return result;
	    }
	    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
	      if (object == null) {
	        return [];
	      }
	      object = Object(object);
	      return arrayFilter(nativeGetSymbols(object), function(symbol) {
	        return propertyIsEnumerable.call(object, symbol);
	      });
	    };
	    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
	      var result = [];
	      while (object) {
	        arrayPush(result, getSymbols(object));
	        object = getPrototype(object);
	      }
	      return result;
	    };
	    var getTag = baseGetTag;
	    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
	        (Map && getTag(new Map) != mapTag) ||
	        (Promise && getTag(Promise.resolve()) != promiseTag) ||
	        (Set && getTag(new Set) != setTag) ||
	        (WeakMap && getTag(new WeakMap) != weakMapTag)) {
	      getTag = function(value) {
	        var result = baseGetTag(value),
	            Ctor = result == objectTag ? value.constructor : undefined$1,
	            ctorString = Ctor ? toSource(Ctor) : '';
	        if (ctorString) {
	          switch (ctorString) {
	            case dataViewCtorString: return dataViewTag;
	            case mapCtorString: return mapTag;
	            case promiseCtorString: return promiseTag;
	            case setCtorString: return setTag;
	            case weakMapCtorString: return weakMapTag;
	          }
	        }
	        return result;
	      };
	    }
	    function getView(start, end, transforms) {
	      var index = -1,
	          length = transforms.length;
	      while (++index < length) {
	        var data = transforms[index],
	            size = data.size;
	        switch (data.type) {
	          case 'drop':      start += size; break;
	          case 'dropRight': end -= size; break;
	          case 'take':      end = nativeMin(end, start + size); break;
	          case 'takeRight': start = nativeMax(start, end - size); break;
	        }
	      }
	      return { 'start': start, 'end': end };
	    }
	    function getWrapDetails(source) {
	      var match = source.match(reWrapDetails);
	      return match ? match[1].split(reSplitDetails) : [];
	    }
	    function hasPath(object, path, hasFunc) {
	      path = castPath(path, object);
	      var index = -1,
	          length = path.length,
	          result = false;
	      while (++index < length) {
	        var key = toKey(path[index]);
	        if (!(result = object != null && hasFunc(object, key))) {
	          break;
	        }
	        object = object[key];
	      }
	      if (result || ++index != length) {
	        return result;
	      }
	      length = object == null ? 0 : object.length;
	      return !!length && isLength(length) && isIndex(key, length) &&
	        (isArray(object) || isArguments(object));
	    }
	    function initCloneArray(array) {
	      var length = array.length,
	          result = new array.constructor(length);
	      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
	        result.index = array.index;
	        result.input = array.input;
	      }
	      return result;
	    }
	    function initCloneObject(object) {
	      return (typeof object.constructor == 'function' && !isPrototype(object))
	        ? baseCreate(getPrototype(object))
	        : {};
	    }
	    function initCloneByTag(object, tag, isDeep) {
	      var Ctor = object.constructor;
	      switch (tag) {
	        case arrayBufferTag:
	          return cloneArrayBuffer(object);
	        case boolTag:
	        case dateTag:
	          return new Ctor(+object);
	        case dataViewTag:
	          return cloneDataView(object, isDeep);
	        case float32Tag: case float64Tag:
	        case int8Tag: case int16Tag: case int32Tag:
	        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
	          return cloneTypedArray(object, isDeep);
	        case mapTag:
	          return new Ctor;
	        case numberTag:
	        case stringTag:
	          return new Ctor(object);
	        case regexpTag:
	          return cloneRegExp(object);
	        case setTag:
	          return new Ctor;
	        case symbolTag:
	          return cloneSymbol(object);
	      }
	    }
	    function insertWrapDetails(source, details) {
	      var length = details.length;
	      if (!length) {
	        return source;
	      }
	      var lastIndex = length - 1;
	      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
	      details = details.join(length > 2 ? ', ' : ' ');
	      return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
	    }
	    function isFlattenable(value) {
	      return isArray(value) || isArguments(value) ||
	        !!(spreadableSymbol && value && value[spreadableSymbol]);
	    }
	    function isIndex(value, length) {
	      var type = typeof value;
	      length = length == null ? MAX_SAFE_INTEGER : length;
	      return !!length &&
	        (type == 'number' ||
	          (type != 'symbol' && reIsUint.test(value))) &&
	            (value > -1 && value % 1 == 0 && value < length);
	    }
	    function isIterateeCall(value, index, object) {
	      if (!isObject(object)) {
	        return false;
	      }
	      var type = typeof index;
	      if (type == 'number'
	            ? (isArrayLike(object) && isIndex(index, object.length))
	            : (type == 'string' && index in object)
	          ) {
	        return eq(object[index], value);
	      }
	      return false;
	    }
	    function isKey(value, object) {
	      if (isArray(value)) {
	        return false;
	      }
	      var type = typeof value;
	      if (type == 'number' || type == 'symbol' || type == 'boolean' ||
	          value == null || isSymbol(value)) {
	        return true;
	      }
	      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
	        (object != null && value in Object(object));
	    }
	    function isKeyable(value) {
	      var type = typeof value;
	      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
	        ? (value !== '__proto__')
	        : (value === null);
	    }
	    function isLaziable(func) {
	      var funcName = getFuncName(func),
	          other = lodash[funcName];
	      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
	        return false;
	      }
	      if (func === other) {
	        return true;
	      }
	      var data = getData(other);
	      return !!data && func === data[0];
	    }
	    function isMasked(func) {
	      return !!maskSrcKey && (maskSrcKey in func);
	    }
	    var isMaskable = coreJsData ? isFunction : stubFalse;
	    function isPrototype(value) {
	      var Ctor = value && value.constructor,
	          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
	      return value === proto;
	    }
	    function isStrictComparable(value) {
	      return value === value && !isObject(value);
	    }
	    function matchesStrictComparable(key, srcValue) {
	      return function(object) {
	        if (object == null) {
	          return false;
	        }
	        return object[key] === srcValue &&
	          (srcValue !== undefined$1 || (key in Object(object)));
	      };
	    }
	    function memoizeCapped(func) {
	      var result = memoize(func, function(key) {
	        if (cache.size === MAX_MEMOIZE_SIZE) {
	          cache.clear();
	        }
	        return key;
	      });
	      var cache = result.cache;
	      return result;
	    }
	    function mergeData(data, source) {
	      var bitmask = data[1],
	          srcBitmask = source[1],
	          newBitmask = bitmask | srcBitmask,
	          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
	      var isCombo =
	        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
	        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
	        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
	      if (!(isCommon || isCombo)) {
	        return data;
	      }
	      if (srcBitmask & WRAP_BIND_FLAG) {
	        data[2] = source[2];
	        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
	      }
	      var value = source[3];
	      if (value) {
	        var partials = data[3];
	        data[3] = partials ? composeArgs(partials, value, source[4]) : value;
	        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
	      }
	      value = source[5];
	      if (value) {
	        partials = data[5];
	        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
	        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
	      }
	      value = source[7];
	      if (value) {
	        data[7] = value;
	      }
	      if (srcBitmask & WRAP_ARY_FLAG) {
	        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
	      }
	      if (data[9] == null) {
	        data[9] = source[9];
	      }
	      data[0] = source[0];
	      data[1] = newBitmask;
	      return data;
	    }
	    function nativeKeysIn(object) {
	      var result = [];
	      if (object != null) {
	        for (var key in Object(object)) {
	          result.push(key);
	        }
	      }
	      return result;
	    }
	    function objectToString(value) {
	      return nativeObjectToString.call(value);
	    }
	    function overRest(func, start, transform) {
	      start = nativeMax(start === undefined$1 ? (func.length - 1) : start, 0);
	      return function() {
	        var args = arguments,
	            index = -1,
	            length = nativeMax(args.length - start, 0),
	            array = Array(length);
	        while (++index < length) {
	          array[index] = args[start + index];
	        }
	        index = -1;
	        var otherArgs = Array(start + 1);
	        while (++index < start) {
	          otherArgs[index] = args[index];
	        }
	        otherArgs[start] = transform(array);
	        return apply(func, this, otherArgs);
	      };
	    }
	    function parent(object, path) {
	      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
	    }
	    function reorder(array, indexes) {
	      var arrLength = array.length,
	          length = nativeMin(indexes.length, arrLength),
	          oldArray = copyArray(array);
	      while (length--) {
	        var index = indexes[length];
	        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined$1;
	      }
	      return array;
	    }
	    function safeGet(object, key) {
	      if (key === 'constructor' && typeof object[key] === 'function') {
	        return;
	      }
	      if (key == '__proto__') {
	        return;
	      }
	      return object[key];
	    }
	    var setData = shortOut(baseSetData);
	    var setTimeout = ctxSetTimeout || function(func, wait) {
	      return root.setTimeout(func, wait);
	    };
	    var setToString = shortOut(baseSetToString);
	    function setWrapToString(wrapper, reference, bitmask) {
	      var source = (reference + '');
	      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
	    }
	    function shortOut(func) {
	      var count = 0,
	          lastCalled = 0;
	      return function() {
	        var stamp = nativeNow(),
	            remaining = HOT_SPAN - (stamp - lastCalled);
	        lastCalled = stamp;
	        if (remaining > 0) {
	          if (++count >= HOT_COUNT) {
	            return arguments[0];
	          }
	        } else {
	          count = 0;
	        }
	        return func.apply(undefined$1, arguments);
	      };
	    }
	    function shuffleSelf(array, size) {
	      var index = -1,
	          length = array.length,
	          lastIndex = length - 1;
	      size = size === undefined$1 ? length : size;
	      while (++index < size) {
	        var rand = baseRandom(index, lastIndex),
	            value = array[rand];
	        array[rand] = array[index];
	        array[index] = value;
	      }
	      array.length = size;
	      return array;
	    }
	    var stringToPath = memoizeCapped(function(string) {
	      var result = [];
	      if (string.charCodeAt(0) === 46 ) {
	        result.push('');
	      }
	      string.replace(rePropName, function(match, number, quote, subString) {
	        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
	      });
	      return result;
	    });
	    function toKey(value) {
	      if (typeof value == 'string' || isSymbol(value)) {
	        return value;
	      }
	      var result = (value + '');
	      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
	    }
	    function toSource(func) {
	      if (func != null) {
	        try {
	          return funcToString.call(func);
	        } catch (e) {}
	        try {
	          return (func + '');
	        } catch (e) {}
	      }
	      return '';
	    }
	    function updateWrapDetails(details, bitmask) {
	      arrayEach(wrapFlags, function(pair) {
	        var value = '_.' + pair[0];
	        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
	          details.push(value);
	        }
	      });
	      return details.sort();
	    }
	    function wrapperClone(wrapper) {
	      if (wrapper instanceof LazyWrapper) {
	        return wrapper.clone();
	      }
	      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
	      result.__actions__ = copyArray(wrapper.__actions__);
	      result.__index__  = wrapper.__index__;
	      result.__values__ = wrapper.__values__;
	      return result;
	    }
	    function chunk(array, size, guard) {
	      if ((guard ? isIterateeCall(array, size, guard) : size === undefined$1)) {
	        size = 1;
	      } else {
	        size = nativeMax(toInteger(size), 0);
	      }
	      var length = array == null ? 0 : array.length;
	      if (!length || size < 1) {
	        return [];
	      }
	      var index = 0,
	          resIndex = 0,
	          result = Array(nativeCeil(length / size));
	      while (index < length) {
	        result[resIndex++] = baseSlice(array, index, (index += size));
	      }
	      return result;
	    }
	    function compact(array) {
	      var index = -1,
	          length = array == null ? 0 : array.length,
	          resIndex = 0,
	          result = [];
	      while (++index < length) {
	        var value = array[index];
	        if (value) {
	          result[resIndex++] = value;
	        }
	      }
	      return result;
	    }
	    function concat() {
	      var length = arguments.length;
	      if (!length) {
	        return [];
	      }
	      var args = Array(length - 1),
	          array = arguments[0],
	          index = length;
	      while (index--) {
	        args[index - 1] = arguments[index];
	      }
	      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
	    }
	    var difference = baseRest(function(array, values) {
	      return isArrayLikeObject(array)
	        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
	        : [];
	    });
	    var differenceBy = baseRest(function(array, values) {
	      var iteratee = last(values);
	      if (isArrayLikeObject(iteratee)) {
	        iteratee = undefined$1;
	      }
	      return isArrayLikeObject(array)
	        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
	        : [];
	    });
	    var differenceWith = baseRest(function(array, values) {
	      var comparator = last(values);
	      if (isArrayLikeObject(comparator)) {
	        comparator = undefined$1;
	      }
	      return isArrayLikeObject(array)
	        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined$1, comparator)
	        : [];
	    });
	    function drop(array, n, guard) {
	      var length = array == null ? 0 : array.length;
	      if (!length) {
	        return [];
	      }
	      n = (guard || n === undefined$1) ? 1 : toInteger(n);
	      return baseSlice(array, n < 0 ? 0 : n, length);
	    }
	    function dropRight(array, n, guard) {
	      var length = array == null ? 0 : array.length;
	      if (!length) {
	        return [];
	      }
	      n = (guard || n === undefined$1) ? 1 : toInteger(n);
	      n = length - n;
	      return baseSlice(array, 0, n < 0 ? 0 : n);
	    }
	    function dropRightWhile(array, predicate) {
	      return (array && array.length)
	        ? baseWhile(array, getIteratee(predicate, 3), true, true)
	        : [];
	    }
	    function dropWhile(array, predicate) {
	      return (array && array.length)
	        ? baseWhile(array, getIteratee(predicate, 3), true)
	        : [];
	    }
	    function fill(array, value, start, end) {
	      var length = array == null ? 0 : array.length;
	      if (!length) {
	        return [];
	      }
	      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
	        start = 0;
	        end = length;
	      }
	      return baseFill(array, value, start, end);
	    }
	    function findIndex(array, predicate, fromIndex) {
	      var length = array == null ? 0 : array.length;
	      if (!length) {
	        return -1;
	      }
	      var index = fromIndex == null ? 0 : toInteger(fromIndex);
	      if (index < 0) {
	        index = nativeMax(length + index, 0);
	      }
	      return baseFindIndex(array, getIteratee(predicate, 3), index);
	    }
	    function findLastIndex(array, predicate, fromIndex) {
	      var length = array == null ? 0 : array.length;
	      if (!length) {
	        return -1;
	      }
	      var index = length - 1;
	      if (fromIndex !== undefined$1) {
	        index = toInteger(fromIndex);
	        index = fromIndex < 0
	          ? nativeMax(length + index, 0)
	          : nativeMin(index, length - 1);
	      }
	      return baseFindIndex(array, getIteratee(predicate, 3), index, true);
	    }
	    function flatten(array) {
	      var length = array == null ? 0 : array.length;
	      return length ? baseFlatten(array, 1) : [];
	    }
	    function flattenDeep(array) {
	      var length = array == null ? 0 : array.length;
	      return length ? baseFlatten(array, INFINITY) : [];
	    }
	    function flattenDepth(array, depth) {
	      var length = array == null ? 0 : array.length;
	      if (!length) {
	        return [];
	      }
	      depth = depth === undefined$1 ? 1 : toInteger(depth);
	      return baseFlatten(array, depth);
	    }
	    function fromPairs(pairs) {
	      var index = -1,
	          length = pairs == null ? 0 : pairs.length,
	          result = {};
	      while (++index < length) {
	        var pair = pairs[index];
	        result[pair[0]] = pair[1];
	      }
	      return result;
	    }
	    function head(array) {
	      return (array && array.length) ? array[0] : undefined$1;
	    }
	    function indexOf(array, value, fromIndex) {
	      var length = array == null ? 0 : array.length;
	      if (!length) {
	        return -1;
	      }
	      var index = fromIndex == null ? 0 : toInteger(fromIndex);
	      if (index < 0) {
	        index = nativeMax(length + index, 0);
	      }
	      return baseIndexOf(array, value, index);
	    }
	    function initial(array) {
	      var length = array == null ? 0 : array.length;
	      return length ? baseSlice(array, 0, -1) : [];
	    }
	    var intersection = baseRest(function(arrays) {
	      var mapped = arrayMap(arrays, castArrayLikeObject);
	      return (mapped.length && mapped[0] === arrays[0])
	        ? baseIntersection(mapped)
	        : [];
	    });
	    var intersectionBy = baseRest(function(arrays) {
	      var iteratee = last(arrays),
	          mapped = arrayMap(arrays, castArrayLikeObject);
	      if (iteratee === last(mapped)) {
	        iteratee = undefined$1;
	      } else {
	        mapped.pop();
	      }
	      return (mapped.length && mapped[0] === arrays[0])
	        ? baseIntersection(mapped, getIteratee(iteratee, 2))
	        : [];
	    });
	    var intersectionWith = baseRest(function(arrays) {
	      var comparator = last(arrays),
	          mapped = arrayMap(arrays, castArrayLikeObject);
	      comparator = typeof comparator == 'function' ? comparator : undefined$1;
	      if (comparator) {
	        mapped.pop();
	      }
	      return (mapped.length && mapped[0] === arrays[0])
	        ? baseIntersection(mapped, undefined$1, comparator)
	        : [];
	    });
	    function join(array, separator) {
	      return array == null ? '' : nativeJoin.call(array, separator);
	    }
	    function last(array) {
	      var length = array == null ? 0 : array.length;
	      return length ? array[length - 1] : undefined$1;
	    }
	    function lastIndexOf(array, value, fromIndex) {
	      var length = array == null ? 0 : array.length;
	      if (!length) {
	        return -1;
	      }
	      var index = length;
	      if (fromIndex !== undefined$1) {
	        index = toInteger(fromIndex);
	        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
	      }
	      return value === value
	        ? strictLastIndexOf(array, value, index)
	        : baseFindIndex(array, baseIsNaN, index, true);
	    }
	    function nth(array, n) {
	      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined$1;
	    }
	    var pull = baseRest(pullAll);
	    function pullAll(array, values) {
	      return (array && array.length && values && values.length)
	        ? basePullAll(array, values)
	        : array;
	    }
	    function pullAllBy(array, values, iteratee) {
	      return (array && array.length && values && values.length)
	        ? basePullAll(array, values, getIteratee(iteratee, 2))
	        : array;
	    }
	    function pullAllWith(array, values, comparator) {
	      return (array && array.length && values && values.length)
	        ? basePullAll(array, values, undefined$1, comparator)
	        : array;
	    }
	    var pullAt = flatRest(function(array, indexes) {
	      var length = array == null ? 0 : array.length,
	          result = baseAt(array, indexes);
	      basePullAt(array, arrayMap(indexes, function(index) {
	        return isIndex(index, length) ? +index : index;
	      }).sort(compareAscending));
	      return result;
	    });
	    function remove(array, predicate) {
	      var result = [];
	      if (!(array && array.length)) {
	        return result;
	      }
	      var index = -1,
	          indexes = [],
	          length = array.length;
	      predicate = getIteratee(predicate, 3);
	      while (++index < length) {
	        var value = array[index];
	        if (predicate(value, index, array)) {
	          result.push(value);
	          indexes.push(index);
	        }
	      }
	      basePullAt(array, indexes);
	      return result;
	    }
	    function reverse(array) {
	      return array == null ? array : nativeReverse.call(array);
	    }
	    function slice(array, start, end) {
	      var length = array == null ? 0 : array.length;
	      if (!length) {
	        return [];
	      }
	      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
	        start = 0;
	        end = length;
	      }
	      else {
	        start = start == null ? 0 : toInteger(start);
	        end = end === undefined$1 ? length : toInteger(end);
	      }
	      return baseSlice(array, start, end);
	    }
	    function sortedIndex(array, value) {
	      return baseSortedIndex(array, value);
	    }
	    function sortedIndexBy(array, value, iteratee) {
	      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
	    }
	    function sortedIndexOf(array, value) {
	      var length = array == null ? 0 : array.length;
	      if (length) {
	        var index = baseSortedIndex(array, value);
	        if (index < length && eq(array[index], value)) {
	          return index;
	        }
	      }
	      return -1;
	    }
	    function sortedLastIndex(array, value) {
	      return baseSortedIndex(array, value, true);
	    }
	    function sortedLastIndexBy(array, value, iteratee) {
	      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
	    }
	    function sortedLastIndexOf(array, value) {
	      var length = array == null ? 0 : array.length;
	      if (length) {
	        var index = baseSortedIndex(array, value, true) - 1;
	        if (eq(array[index], value)) {
	          return index;
	        }
	      }
	      return -1;
	    }
	    function sortedUniq(array) {
	      return (array && array.length)
	        ? baseSortedUniq(array)
	        : [];
	    }
	    function sortedUniqBy(array, iteratee) {
	      return (array && array.length)
	        ? baseSortedUniq(array, getIteratee(iteratee, 2))
	        : [];
	    }
	    function tail(array) {
	      var length = array == null ? 0 : array.length;
	      return length ? baseSlice(array, 1, length) : [];
	    }
	    function take(array, n, guard) {
	      if (!(array && array.length)) {
	        return [];
	      }
	      n = (guard || n === undefined$1) ? 1 : toInteger(n);
	      return baseSlice(array, 0, n < 0 ? 0 : n);
	    }
	    function takeRight(array, n, guard) {
	      var length = array == null ? 0 : array.length;
	      if (!length) {
	        return [];
	      }
	      n = (guard || n === undefined$1) ? 1 : toInteger(n);
	      n = length - n;
	      return baseSlice(array, n < 0 ? 0 : n, length);
	    }
	    function takeRightWhile(array, predicate) {
	      return (array && array.length)
	        ? baseWhile(array, getIteratee(predicate, 3), false, true)
	        : [];
	    }
	    function takeWhile(array, predicate) {
	      return (array && array.length)
	        ? baseWhile(array, getIteratee(predicate, 3))
	        : [];
	    }
	    var union = baseRest(function(arrays) {
	      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
	    });
	    var unionBy = baseRest(function(arrays) {
	      var iteratee = last(arrays);
	      if (isArrayLikeObject(iteratee)) {
	        iteratee = undefined$1;
	      }
	      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
	    });
	    var unionWith = baseRest(function(arrays) {
	      var comparator = last(arrays);
	      comparator = typeof comparator == 'function' ? comparator : undefined$1;
	      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined$1, comparator);
	    });
	    function uniq(array) {
	      return (array && array.length) ? baseUniq(array) : [];
	    }
	    function uniqBy(array, iteratee) {
	      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
	    }
	    function uniqWith(array, comparator) {
	      comparator = typeof comparator == 'function' ? comparator : undefined$1;
	      return (array && array.length) ? baseUniq(array, undefined$1, comparator) : [];
	    }
	    function unzip(array) {
	      if (!(array && array.length)) {
	        return [];
	      }
	      var length = 0;
	      array = arrayFilter(array, function(group) {
	        if (isArrayLikeObject(group)) {
	          length = nativeMax(group.length, length);
	          return true;
	        }
	      });
	      return baseTimes(length, function(index) {
	        return arrayMap(array, baseProperty(index));
	      });
	    }
	    function unzipWith(array, iteratee) {
	      if (!(array && array.length)) {
	        return [];
	      }
	      var result = unzip(array);
	      if (iteratee == null) {
	        return result;
	      }
	      return arrayMap(result, function(group) {
	        return apply(iteratee, undefined$1, group);
	      });
	    }
	    var without = baseRest(function(array, values) {
	      return isArrayLikeObject(array)
	        ? baseDifference(array, values)
	        : [];
	    });
	    var xor = baseRest(function(arrays) {
	      return baseXor(arrayFilter(arrays, isArrayLikeObject));
	    });
	    var xorBy = baseRest(function(arrays) {
	      var iteratee = last(arrays);
	      if (isArrayLikeObject(iteratee)) {
	        iteratee = undefined$1;
	      }
	      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
	    });
	    var xorWith = baseRest(function(arrays) {
	      var comparator = last(arrays);
	      comparator = typeof comparator == 'function' ? comparator : undefined$1;
	      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined$1, comparator);
	    });
	    var zip = baseRest(unzip);
	    function zipObject(props, values) {
	      return baseZipObject(props || [], values || [], assignValue);
	    }
	    function zipObjectDeep(props, values) {
	      return baseZipObject(props || [], values || [], baseSet);
	    }
	    var zipWith = baseRest(function(arrays) {
	      var length = arrays.length,
	          iteratee = length > 1 ? arrays[length - 1] : undefined$1;
	      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined$1;
	      return unzipWith(arrays, iteratee);
	    });
	    function chain(value) {
	      var result = lodash(value);
	      result.__chain__ = true;
	      return result;
	    }
	    function tap(value, interceptor) {
	      interceptor(value);
	      return value;
	    }
	    function thru(value, interceptor) {
	      return interceptor(value);
	    }
	    var wrapperAt = flatRest(function(paths) {
	      var length = paths.length,
	          start = length ? paths[0] : 0,
	          value = this.__wrapped__,
	          interceptor = function(object) { return baseAt(object, paths); };
	      if (length > 1 || this.__actions__.length ||
	          !(value instanceof LazyWrapper) || !isIndex(start)) {
	        return this.thru(interceptor);
	      }
	      value = value.slice(start, +start + (length ? 1 : 0));
	      value.__actions__.push({
	        'func': thru,
	        'args': [interceptor],
	        'thisArg': undefined$1
	      });
	      return new LodashWrapper(value, this.__chain__).thru(function(array) {
	        if (length && !array.length) {
	          array.push(undefined$1);
	        }
	        return array;
	      });
	    });
	    function wrapperChain() {
	      return chain(this);
	    }
	    function wrapperCommit() {
	      return new LodashWrapper(this.value(), this.__chain__);
	    }
	    function wrapperNext() {
	      if (this.__values__ === undefined$1) {
	        this.__values__ = toArray(this.value());
	      }
	      var done = this.__index__ >= this.__values__.length,
	          value = done ? undefined$1 : this.__values__[this.__index__++];
	      return { 'done': done, 'value': value };
	    }
	    function wrapperToIterator() {
	      return this;
	    }
	    function wrapperPlant(value) {
	      var result,
	          parent = this;
	      while (parent instanceof baseLodash) {
	        var clone = wrapperClone(parent);
	        clone.__index__ = 0;
	        clone.__values__ = undefined$1;
	        if (result) {
	          previous.__wrapped__ = clone;
	        } else {
	          result = clone;
	        }
	        var previous = clone;
	        parent = parent.__wrapped__;
	      }
	      previous.__wrapped__ = value;
	      return result;
	    }
	    function wrapperReverse() {
	      var value = this.__wrapped__;
	      if (value instanceof LazyWrapper) {
	        var wrapped = value;
	        if (this.__actions__.length) {
	          wrapped = new LazyWrapper(this);
	        }
	        wrapped = wrapped.reverse();
	        wrapped.__actions__.push({
	          'func': thru,
	          'args': [reverse],
	          'thisArg': undefined$1
	        });
	        return new LodashWrapper(wrapped, this.__chain__);
	      }
	      return this.thru(reverse);
	    }
	    function wrapperValue() {
	      return baseWrapperValue(this.__wrapped__, this.__actions__);
	    }
	    var countBy = createAggregator(function(result, value, key) {
	      if (hasOwnProperty.call(result, key)) {
	        ++result[key];
	      } else {
	        baseAssignValue(result, key, 1);
	      }
	    });
	    function every(collection, predicate, guard) {
	      var func = isArray(collection) ? arrayEvery : baseEvery;
	      if (guard && isIterateeCall(collection, predicate, guard)) {
	        predicate = undefined$1;
	      }
	      return func(collection, getIteratee(predicate, 3));
	    }
	    function filter(collection, predicate) {
	      var func = isArray(collection) ? arrayFilter : baseFilter;
	      return func(collection, getIteratee(predicate, 3));
	    }
	    var find = createFind(findIndex);
	    var findLast = createFind(findLastIndex);
	    function flatMap(collection, iteratee) {
	      return baseFlatten(map(collection, iteratee), 1);
	    }
	    function flatMapDeep(collection, iteratee) {
	      return baseFlatten(map(collection, iteratee), INFINITY);
	    }
	    function flatMapDepth(collection, iteratee, depth) {
	      depth = depth === undefined$1 ? 1 : toInteger(depth);
	      return baseFlatten(map(collection, iteratee), depth);
	    }
	    function forEach(collection, iteratee) {
	      var func = isArray(collection) ? arrayEach : baseEach;
	      return func(collection, getIteratee(iteratee, 3));
	    }
	    function forEachRight(collection, iteratee) {
	      var func = isArray(collection) ? arrayEachRight : baseEachRight;
	      return func(collection, getIteratee(iteratee, 3));
	    }
	    var groupBy = createAggregator(function(result, value, key) {
	      if (hasOwnProperty.call(result, key)) {
	        result[key].push(value);
	      } else {
	        baseAssignValue(result, key, [value]);
	      }
	    });
	    function includes(collection, value, fromIndex, guard) {
	      collection = isArrayLike(collection) ? collection : values(collection);
	      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
	      var length = collection.length;
	      if (fromIndex < 0) {
	        fromIndex = nativeMax(length + fromIndex, 0);
	      }
	      return isString(collection)
	        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
	        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
	    }
	    var invokeMap = baseRest(function(collection, path, args) {
	      var index = -1,
	          isFunc = typeof path == 'function',
	          result = isArrayLike(collection) ? Array(collection.length) : [];
	      baseEach(collection, function(value) {
	        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
	      });
	      return result;
	    });
	    var keyBy = createAggregator(function(result, value, key) {
	      baseAssignValue(result, key, value);
	    });
	    function map(collection, iteratee) {
	      var func = isArray(collection) ? arrayMap : baseMap;
	      return func(collection, getIteratee(iteratee, 3));
	    }
	    function orderBy(collection, iteratees, orders, guard) {
	      if (collection == null) {
	        return [];
	      }
	      if (!isArray(iteratees)) {
	        iteratees = iteratees == null ? [] : [iteratees];
	      }
	      orders = guard ? undefined$1 : orders;
	      if (!isArray(orders)) {
	        orders = orders == null ? [] : [orders];
	      }
	      return baseOrderBy(collection, iteratees, orders);
	    }
	    var partition = createAggregator(function(result, value, key) {
	      result[key ? 0 : 1].push(value);
	    }, function() { return [[], []]; });
	    function reduce(collection, iteratee, accumulator) {
	      var func = isArray(collection) ? arrayReduce : baseReduce,
	          initAccum = arguments.length < 3;
	      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
	    }
	    function reduceRight(collection, iteratee, accumulator) {
	      var func = isArray(collection) ? arrayReduceRight : baseReduce,
	          initAccum = arguments.length < 3;
	      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
	    }
	    function reject(collection, predicate) {
	      var func = isArray(collection) ? arrayFilter : baseFilter;
	      return func(collection, negate(getIteratee(predicate, 3)));
	    }
	    function sample(collection) {
	      var func = isArray(collection) ? arraySample : baseSample;
	      return func(collection);
	    }
	    function sampleSize(collection, n, guard) {
	      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined$1)) {
	        n = 1;
	      } else {
	        n = toInteger(n);
	      }
	      var func = isArray(collection) ? arraySampleSize : baseSampleSize;
	      return func(collection, n);
	    }
	    function shuffle(collection) {
	      var func = isArray(collection) ? arrayShuffle : baseShuffle;
	      return func(collection);
	    }
	    function size(collection) {
	      if (collection == null) {
	        return 0;
	      }
	      if (isArrayLike(collection)) {
	        return isString(collection) ? stringSize(collection) : collection.length;
	      }
	      var tag = getTag(collection);
	      if (tag == mapTag || tag == setTag) {
	        return collection.size;
	      }
	      return baseKeys(collection).length;
	    }
	    function some(collection, predicate, guard) {
	      var func = isArray(collection) ? arraySome : baseSome;
	      if (guard && isIterateeCall(collection, predicate, guard)) {
	        predicate = undefined$1;
	      }
	      return func(collection, getIteratee(predicate, 3));
	    }
	    var sortBy = baseRest(function(collection, iteratees) {
	      if (collection == null) {
	        return [];
	      }
	      var length = iteratees.length;
	      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
	        iteratees = [];
	      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
	        iteratees = [iteratees[0]];
	      }
	      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
	    });
	    var now = ctxNow || function() {
	      return root.Date.now();
	    };
	    function after(n, func) {
	      if (typeof func != 'function') {
	        throw new TypeError(FUNC_ERROR_TEXT);
	      }
	      n = toInteger(n);
	      return function() {
	        if (--n < 1) {
	          return func.apply(this, arguments);
	        }
	      };
	    }
	    function ary(func, n, guard) {
	      n = guard ? undefined$1 : n;
	      n = (func && n == null) ? func.length : n;
	      return createWrap(func, WRAP_ARY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, n);
	    }
	    function before(n, func) {
	      var result;
	      if (typeof func != 'function') {
	        throw new TypeError(FUNC_ERROR_TEXT);
	      }
	      n = toInteger(n);
	      return function() {
	        if (--n > 0) {
	          result = func.apply(this, arguments);
	        }
	        if (n <= 1) {
	          func = undefined$1;
	        }
	        return result;
	      };
	    }
	    var bind = baseRest(function(func, thisArg, partials) {
	      var bitmask = WRAP_BIND_FLAG;
	      if (partials.length) {
	        var holders = replaceHolders(partials, getHolder(bind));
	        bitmask |= WRAP_PARTIAL_FLAG;
	      }
	      return createWrap(func, bitmask, thisArg, partials, holders);
	    });
	    var bindKey = baseRest(function(object, key, partials) {
	      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
	      if (partials.length) {
	        var holders = replaceHolders(partials, getHolder(bindKey));
	        bitmask |= WRAP_PARTIAL_FLAG;
	      }
	      return createWrap(key, bitmask, object, partials, holders);
	    });
	    function curry(func, arity, guard) {
	      arity = guard ? undefined$1 : arity;
	      var result = createWrap(func, WRAP_CURRY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity);
	      result.placeholder = curry.placeholder;
	      return result;
	    }
	    function curryRight(func, arity, guard) {
	      arity = guard ? undefined$1 : arity;
	      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity);
	      result.placeholder = curryRight.placeholder;
	      return result;
	    }
	    function debounce(func, wait, options) {
	      var lastArgs,
	          lastThis,
	          maxWait,
	          result,
	          timerId,
	          lastCallTime,
	          lastInvokeTime = 0,
	          leading = false,
	          maxing = false,
	          trailing = true;
	      if (typeof func != 'function') {
	        throw new TypeError(FUNC_ERROR_TEXT);
	      }
	      wait = toNumber(wait) || 0;
	      if (isObject(options)) {
	        leading = !!options.leading;
	        maxing = 'maxWait' in options;
	        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
	        trailing = 'trailing' in options ? !!options.trailing : trailing;
	      }
	      function invokeFunc(time) {
	        var args = lastArgs,
	            thisArg = lastThis;
	        lastArgs = lastThis = undefined$1;
	        lastInvokeTime = time;
	        result = func.apply(thisArg, args);
	        return result;
	      }
	      function leadingEdge(time) {
	        lastInvokeTime = time;
	        timerId = setTimeout(timerExpired, wait);
	        return leading ? invokeFunc(time) : result;
	      }
	      function remainingWait(time) {
	        var timeSinceLastCall = time - lastCallTime,
	            timeSinceLastInvoke = time - lastInvokeTime,
	            timeWaiting = wait - timeSinceLastCall;
	        return maxing
	          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
	          : timeWaiting;
	      }
	      function shouldInvoke(time) {
	        var timeSinceLastCall = time - lastCallTime,
	            timeSinceLastInvoke = time - lastInvokeTime;
	        return (lastCallTime === undefined$1 || (timeSinceLastCall >= wait) ||
	          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
	      }
	      function timerExpired() {
	        var time = now();
	        if (shouldInvoke(time)) {
	          return trailingEdge(time);
	        }
	        timerId = setTimeout(timerExpired, remainingWait(time));
	      }
	      function trailingEdge(time) {
	        timerId = undefined$1;
	        if (trailing && lastArgs) {
	          return invokeFunc(time);
	        }
	        lastArgs = lastThis = undefined$1;
	        return result;
	      }
	      function cancel() {
	        if (timerId !== undefined$1) {
	          clearTimeout(timerId);
	        }
	        lastInvokeTime = 0;
	        lastArgs = lastCallTime = lastThis = timerId = undefined$1;
	      }
	      function flush() {
	        return timerId === undefined$1 ? result : trailingEdge(now());
	      }
	      function debounced() {
	        var time = now(),
	            isInvoking = shouldInvoke(time);
	        lastArgs = arguments;
	        lastThis = this;
	        lastCallTime = time;
	        if (isInvoking) {
	          if (timerId === undefined$1) {
	            return leadingEdge(lastCallTime);
	          }
	          if (maxing) {
	            clearTimeout(timerId);
	            timerId = setTimeout(timerExpired, wait);
	            return invokeFunc(lastCallTime);
	          }
	        }
	        if (timerId === undefined$1) {
	          timerId = setTimeout(timerExpired, wait);
	        }
	        return result;
	      }
	      debounced.cancel = cancel;
	      debounced.flush = flush;
	      return debounced;
	    }
	    var defer = baseRest(function(func, args) {
	      return baseDelay(func, 1, args);
	    });
	    var delay = baseRest(function(func, wait, args) {
	      return baseDelay(func, toNumber(wait) || 0, args);
	    });
	    function flip(func) {
	      return createWrap(func, WRAP_FLIP_FLAG);
	    }
	    function memoize(func, resolver) {
	      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
	        throw new TypeError(FUNC_ERROR_TEXT);
	      }
	      var memoized = function() {
	        var args = arguments,
	            key = resolver ? resolver.apply(this, args) : args[0],
	            cache = memoized.cache;
	        if (cache.has(key)) {
	          return cache.get(key);
	        }
	        var result = func.apply(this, args);
	        memoized.cache = cache.set(key, result) || cache;
	        return result;
	      };
	      memoized.cache = new (memoize.Cache || MapCache);
	      return memoized;
	    }
	    memoize.Cache = MapCache;
	    function negate(predicate) {
	      if (typeof predicate != 'function') {
	        throw new TypeError(FUNC_ERROR_TEXT);
	      }
	      return function() {
	        var args = arguments;
	        switch (args.length) {
	          case 0: return !predicate.call(this);
	          case 1: return !predicate.call(this, args[0]);
	          case 2: return !predicate.call(this, args[0], args[1]);
	          case 3: return !predicate.call(this, args[0], args[1], args[2]);
	        }
	        return !predicate.apply(this, args);
	      };
	    }
	    function once(func) {
	      return before(2, func);
	    }
	    var overArgs = castRest(function(func, transforms) {
	      transforms = (transforms.length == 1 && isArray(transforms[0]))
	        ? arrayMap(transforms[0], baseUnary(getIteratee()))
	        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
	      var funcsLength = transforms.length;
	      return baseRest(function(args) {
	        var index = -1,
	            length = nativeMin(args.length, funcsLength);
	        while (++index < length) {
	          args[index] = transforms[index].call(this, args[index]);
	        }
	        return apply(func, this, args);
	      });
	    });
	    var partial = baseRest(function(func, partials) {
	      var holders = replaceHolders(partials, getHolder(partial));
	      return createWrap(func, WRAP_PARTIAL_FLAG, undefined$1, partials, holders);
	    });
	    var partialRight = baseRest(function(func, partials) {
	      var holders = replaceHolders(partials, getHolder(partialRight));
	      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined$1, partials, holders);
	    });
	    var rearg = flatRest(function(func, indexes) {
	      return createWrap(func, WRAP_REARG_FLAG, undefined$1, undefined$1, undefined$1, indexes);
	    });
	    function rest(func, start) {
	      if (typeof func != 'function') {
	        throw new TypeError(FUNC_ERROR_TEXT);
	      }
	      start = start === undefined$1 ? start : toInteger(start);
	      return baseRest(func, start);
	    }
	    function spread(func, start) {
	      if (typeof func != 'function') {
	        throw new TypeError(FUNC_ERROR_TEXT);
	      }
	      start = start == null ? 0 : nativeMax(toInteger(start), 0);
	      return baseRest(function(args) {
	        var array = args[start],
	            otherArgs = castSlice(args, 0, start);
	        if (array) {
	          arrayPush(otherArgs, array);
	        }
	        return apply(func, this, otherArgs);
	      });
	    }
	    function throttle(func, wait, options) {
	      var leading = true,
	          trailing = true;
	      if (typeof func != 'function') {
	        throw new TypeError(FUNC_ERROR_TEXT);
	      }
	      if (isObject(options)) {
	        leading = 'leading' in options ? !!options.leading : leading;
	        trailing = 'trailing' in options ? !!options.trailing : trailing;
	      }
	      return debounce(func, wait, {
	        'leading': leading,
	        'maxWait': wait,
	        'trailing': trailing
	      });
	    }
	    function unary(func) {
	      return ary(func, 1);
	    }
	    function wrap(value, wrapper) {
	      return partial(castFunction(wrapper), value);
	    }
	    function castArray() {
	      if (!arguments.length) {
	        return [];
	      }
	      var value = arguments[0];
	      return isArray(value) ? value : [value];
	    }
	    function clone(value) {
	      return baseClone(value, CLONE_SYMBOLS_FLAG);
	    }
	    function cloneWith(value, customizer) {
	      customizer = typeof customizer == 'function' ? customizer : undefined$1;
	      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
	    }
	    function cloneDeep(value) {
	      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
	    }
	    function cloneDeepWith(value, customizer) {
	      customizer = typeof customizer == 'function' ? customizer : undefined$1;
	      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
	    }
	    function conformsTo(object, source) {
	      return source == null || baseConformsTo(object, source, keys(source));
	    }
	    function eq(value, other) {
	      return value === other || (value !== value && other !== other);
	    }
	    var gt = createRelationalOperation(baseGt);
	    var gte = createRelationalOperation(function(value, other) {
	      return value >= other;
	    });
	    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
	      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
	        !propertyIsEnumerable.call(value, 'callee');
	    };
	    var isArray = Array.isArray;
	    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
	    function isArrayLike(value) {
	      return value != null && isLength(value.length) && !isFunction(value);
	    }
	    function isArrayLikeObject(value) {
	      return isObjectLike(value) && isArrayLike(value);
	    }
	    function isBoolean(value) {
	      return value === true || value === false ||
	        (isObjectLike(value) && baseGetTag(value) == boolTag);
	    }
	    var isBuffer = nativeIsBuffer || stubFalse;
	    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
	    function isElement(value) {
	      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
	    }
	    function isEmpty(value) {
	      if (value == null) {
	        return true;
	      }
	      if (isArrayLike(value) &&
	          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
	            isBuffer(value) || isTypedArray(value) || isArguments(value))) {
	        return !value.length;
	      }
	      var tag = getTag(value);
	      if (tag == mapTag || tag == setTag) {
	        return !value.size;
	      }
	      if (isPrototype(value)) {
	        return !baseKeys(value).length;
	      }
	      for (var key in value) {
	        if (hasOwnProperty.call(value, key)) {
	          return false;
	        }
	      }
	      return true;
	    }
	    function isEqual(value, other) {
	      return baseIsEqual(value, other);
	    }
	    function isEqualWith(value, other, customizer) {
	      customizer = typeof customizer == 'function' ? customizer : undefined$1;
	      var result = customizer ? customizer(value, other) : undefined$1;
	      return result === undefined$1 ? baseIsEqual(value, other, undefined$1, customizer) : !!result;
	    }
	    function isError(value) {
	      if (!isObjectLike(value)) {
	        return false;
	      }
	      var tag = baseGetTag(value);
	      return tag == errorTag || tag == domExcTag ||
	        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
	    }
	    function isFinite(value) {
	      return typeof value == 'number' && nativeIsFinite(value);
	    }
	    function isFunction(value) {
	      if (!isObject(value)) {
	        return false;
	      }
	      var tag = baseGetTag(value);
	      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
	    }
	    function isInteger(value) {
	      return typeof value == 'number' && value == toInteger(value);
	    }
	    function isLength(value) {
	      return typeof value == 'number' &&
	        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
	    }
	    function isObject(value) {
	      var type = typeof value;
	      return value != null && (type == 'object' || type == 'function');
	    }
	    function isObjectLike(value) {
	      return value != null && typeof value == 'object';
	    }
	    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
	    function isMatch(object, source) {
	      return object === source || baseIsMatch(object, source, getMatchData(source));
	    }
	    function isMatchWith(object, source, customizer) {
	      customizer = typeof customizer == 'function' ? customizer : undefined$1;
	      return baseIsMatch(object, source, getMatchData(source), customizer);
	    }
	    function isNaN(value) {
	      return isNumber(value) && value != +value;
	    }
	    function isNative(value) {
	      if (isMaskable(value)) {
	        throw new Error(CORE_ERROR_TEXT);
	      }
	      return baseIsNative(value);
	    }
	    function isNull(value) {
	      return value === null;
	    }
	    function isNil(value) {
	      return value == null;
	    }
	    function isNumber(value) {
	      return typeof value == 'number' ||
	        (isObjectLike(value) && baseGetTag(value) == numberTag);
	    }
	    function isPlainObject(value) {
	      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
	        return false;
	      }
	      var proto = getPrototype(value);
	      if (proto === null) {
	        return true;
	      }
	      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
	      return typeof Ctor == 'function' && Ctor instanceof Ctor &&
	        funcToString.call(Ctor) == objectCtorString;
	    }
	    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
	    function isSafeInteger(value) {
	      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
	    }
	    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
	    function isString(value) {
	      return typeof value == 'string' ||
	        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
	    }
	    function isSymbol(value) {
	      return typeof value == 'symbol' ||
	        (isObjectLike(value) && baseGetTag(value) == symbolTag);
	    }
	    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
	    function isUndefined(value) {
	      return value === undefined$1;
	    }
	    function isWeakMap(value) {
	      return isObjectLike(value) && getTag(value) == weakMapTag;
	    }
	    function isWeakSet(value) {
	      return isObjectLike(value) && baseGetTag(value) == weakSetTag;
	    }
	    var lt = createRelationalOperation(baseLt);
	    var lte = createRelationalOperation(function(value, other) {
	      return value <= other;
	    });
	    function toArray(value) {
	      if (!value) {
	        return [];
	      }
	      if (isArrayLike(value)) {
	        return isString(value) ? stringToArray(value) : copyArray(value);
	      }
	      if (symIterator && value[symIterator]) {
	        return iteratorToArray(value[symIterator]());
	      }
	      var tag = getTag(value),
	          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
	      return func(value);
	    }
	    function toFinite(value) {
	      if (!value) {
	        return value === 0 ? value : 0;
	      }
	      value = toNumber(value);
	      if (value === INFINITY || value === -INFINITY) {
	        var sign = (value < 0 ? -1 : 1);
	        return sign * MAX_INTEGER;
	      }
	      return value === value ? value : 0;
	    }
	    function toInteger(value) {
	      var result = toFinite(value),
	          remainder = result % 1;
	      return result === result ? (remainder ? result - remainder : result) : 0;
	    }
	    function toLength(value) {
	      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
	    }
	    function toNumber(value) {
	      if (typeof value == 'number') {
	        return value;
	      }
	      if (isSymbol(value)) {
	        return NAN;
	      }
	      if (isObject(value)) {
	        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
	        value = isObject(other) ? (other + '') : other;
	      }
	      if (typeof value != 'string') {
	        return value === 0 ? value : +value;
	      }
	      value = baseTrim(value);
	      var isBinary = reIsBinary.test(value);
	      return (isBinary || reIsOctal.test(value))
	        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
	        : (reIsBadHex.test(value) ? NAN : +value);
	    }
	    function toPlainObject(value) {
	      return copyObject(value, keysIn(value));
	    }
	    function toSafeInteger(value) {
	      return value
	        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
	        : (value === 0 ? value : 0);
	    }
	    function toString(value) {
	      return value == null ? '' : baseToString(value);
	    }
	    var assign = createAssigner(function(object, source) {
	      if (isPrototype(source) || isArrayLike(source)) {
	        copyObject(source, keys(source), object);
	        return;
	      }
	      for (var key in source) {
	        if (hasOwnProperty.call(source, key)) {
	          assignValue(object, key, source[key]);
	        }
	      }
	    });
	    var assignIn = createAssigner(function(object, source) {
	      copyObject(source, keysIn(source), object);
	    });
	    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
	      copyObject(source, keysIn(source), object, customizer);
	    });
	    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
	      copyObject(source, keys(source), object, customizer);
	    });
	    var at = flatRest(baseAt);
	    function create(prototype, properties) {
	      var result = baseCreate(prototype);
	      return properties == null ? result : baseAssign(result, properties);
	    }
	    var defaults = baseRest(function(object, sources) {
	      object = Object(object);
	      var index = -1;
	      var length = sources.length;
	      var guard = length > 2 ? sources[2] : undefined$1;
	      if (guard && isIterateeCall(sources[0], sources[1], guard)) {
	        length = 1;
	      }
	      while (++index < length) {
	        var source = sources[index];
	        var props = keysIn(source);
	        var propsIndex = -1;
	        var propsLength = props.length;
	        while (++propsIndex < propsLength) {
	          var key = props[propsIndex];
	          var value = object[key];
	          if (value === undefined$1 ||
	              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
	            object[key] = source[key];
	          }
	        }
	      }
	      return object;
	    });
	    var defaultsDeep = baseRest(function(args) {
	      args.push(undefined$1, customDefaultsMerge);
	      return apply(mergeWith, undefined$1, args);
	    });
	    function findKey(object, predicate) {
	      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
	    }
	    function findLastKey(object, predicate) {
	      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
	    }
	    function forIn(object, iteratee) {
	      return object == null
	        ? object
	        : baseFor(object, getIteratee(iteratee, 3), keysIn);
	    }
	    function forInRight(object, iteratee) {
	      return object == null
	        ? object
	        : baseForRight(object, getIteratee(iteratee, 3), keysIn);
	    }
	    function forOwn(object, iteratee) {
	      return object && baseForOwn(object, getIteratee(iteratee, 3));
	    }
	    function forOwnRight(object, iteratee) {
	      return object && baseForOwnRight(object, getIteratee(iteratee, 3));
	    }
	    function functions(object) {
	      return object == null ? [] : baseFunctions(object, keys(object));
	    }
	    function functionsIn(object) {
	      return object == null ? [] : baseFunctions(object, keysIn(object));
	    }
	    function get(object, path, defaultValue) {
	      var result = object == null ? undefined$1 : baseGet(object, path);
	      return result === undefined$1 ? defaultValue : result;
	    }
	    function has(object, path) {
	      return object != null && hasPath(object, path, baseHas);
	    }
	    function hasIn(object, path) {
	      return object != null && hasPath(object, path, baseHasIn);
	    }
	    var invert = createInverter(function(result, value, key) {
	      if (value != null &&
	          typeof value.toString != 'function') {
	        value = nativeObjectToString.call(value);
	      }
	      result[value] = key;
	    }, constant(identity));
	    var invertBy = createInverter(function(result, value, key) {
	      if (value != null &&
	          typeof value.toString != 'function') {
	        value = nativeObjectToString.call(value);
	      }
	      if (hasOwnProperty.call(result, value)) {
	        result[value].push(key);
	      } else {
	        result[value] = [key];
	      }
	    }, getIteratee);
	    var invoke = baseRest(baseInvoke);
	    function keys(object) {
	      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
	    }
	    function keysIn(object) {
	      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
	    }
	    function mapKeys(object, iteratee) {
	      var result = {};
	      iteratee = getIteratee(iteratee, 3);
	      baseForOwn(object, function(value, key, object) {
	        baseAssignValue(result, iteratee(value, key, object), value);
	      });
	      return result;
	    }
	    function mapValues(object, iteratee) {
	      var result = {};
	      iteratee = getIteratee(iteratee, 3);
	      baseForOwn(object, function(value, key, object) {
	        baseAssignValue(result, key, iteratee(value, key, object));
	      });
	      return result;
	    }
	    var merge = createAssigner(function(object, source, srcIndex) {
	      baseMerge(object, source, srcIndex);
	    });
	    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
	      baseMerge(object, source, srcIndex, customizer);
	    });
	    var omit = flatRest(function(object, paths) {
	      var result = {};
	      if (object == null) {
	        return result;
	      }
	      var isDeep = false;
	      paths = arrayMap(paths, function(path) {
	        path = castPath(path, object);
	        isDeep || (isDeep = path.length > 1);
	        return path;
	      });
	      copyObject(object, getAllKeysIn(object), result);
	      if (isDeep) {
	        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
	      }
	      var length = paths.length;
	      while (length--) {
	        baseUnset(result, paths[length]);
	      }
	      return result;
	    });
	    function omitBy(object, predicate) {
	      return pickBy(object, negate(getIteratee(predicate)));
	    }
	    var pick = flatRest(function(object, paths) {
	      return object == null ? {} : basePick(object, paths);
	    });
	    function pickBy(object, predicate) {
	      if (object == null) {
	        return {};
	      }
	      var props = arrayMap(getAllKeysIn(object), function(prop) {
	        return [prop];
	      });
	      predicate = getIteratee(predicate);
	      return basePickBy(object, props, function(value, path) {
	        return predicate(value, path[0]);
	      });
	    }
	    function result(object, path, defaultValue) {
	      path = castPath(path, object);
	      var index = -1,
	          length = path.length;
	      if (!length) {
	        length = 1;
	        object = undefined$1;
	      }
	      while (++index < length) {
	        var value = object == null ? undefined$1 : object[toKey(path[index])];
	        if (value === undefined$1) {
	          index = length;
	          value = defaultValue;
	        }
	        object = isFunction(value) ? value.call(object) : value;
	      }
	      return object;
	    }
	    function set(object, path, value) {
	      return object == null ? object : baseSet(object, path, value);
	    }
	    function setWith(object, path, value, customizer) {
	      customizer = typeof customizer == 'function' ? customizer : undefined$1;
	      return object == null ? object : baseSet(object, path, value, customizer);
	    }
	    var toPairs = createToPairs(keys);
	    var toPairsIn = createToPairs(keysIn);
	    function transform(object, iteratee, accumulator) {
	      var isArr = isArray(object),
	          isArrLike = isArr || isBuffer(object) || isTypedArray(object);
	      iteratee = getIteratee(iteratee, 4);
	      if (accumulator == null) {
	        var Ctor = object && object.constructor;
	        if (isArrLike) {
	          accumulator = isArr ? new Ctor : [];
	        }
	        else if (isObject(object)) {
	          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
	        }
	        else {
	          accumulator = {};
	        }
	      }
	      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
	        return iteratee(accumulator, value, index, object);
	      });
	      return accumulator;
	    }
	    function unset(object, path) {
	      return object == null ? true : baseUnset(object, path);
	    }
	    function update(object, path, updater) {
	      return object == null ? object : baseUpdate(object, path, castFunction(updater));
	    }
	    function updateWith(object, path, updater, customizer) {
	      customizer = typeof customizer == 'function' ? customizer : undefined$1;
	      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
	    }
	    function values(object) {
	      return object == null ? [] : baseValues(object, keys(object));
	    }
	    function valuesIn(object) {
	      return object == null ? [] : baseValues(object, keysIn(object));
	    }
	    function clamp(number, lower, upper) {
	      if (upper === undefined$1) {
	        upper = lower;
	        lower = undefined$1;
	      }
	      if (upper !== undefined$1) {
	        upper = toNumber(upper);
	        upper = upper === upper ? upper : 0;
	      }
	      if (lower !== undefined$1) {
	        lower = toNumber(lower);
	        lower = lower === lower ? lower : 0;
	      }
	      return baseClamp(toNumber(number), lower, upper);
	    }
	    function inRange(number, start, end) {
	      start = toFinite(start);
	      if (end === undefined$1) {
	        end = start;
	        start = 0;
	      } else {
	        end = toFinite(end);
	      }
	      number = toNumber(number);
	      return baseInRange(number, start, end);
	    }
	    function random(lower, upper, floating) {
	      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
	        upper = floating = undefined$1;
	      }
	      if (floating === undefined$1) {
	        if (typeof upper == 'boolean') {
	          floating = upper;
	          upper = undefined$1;
	        }
	        else if (typeof lower == 'boolean') {
	          floating = lower;
	          lower = undefined$1;
	        }
	      }
	      if (lower === undefined$1 && upper === undefined$1) {
	        lower = 0;
	        upper = 1;
	      }
	      else {
	        lower = toFinite(lower);
	        if (upper === undefined$1) {
	          upper = lower;
	          lower = 0;
	        } else {
	          upper = toFinite(upper);
	        }
	      }
	      if (lower > upper) {
	        var temp = lower;
	        lower = upper;
	        upper = temp;
	      }
	      if (floating || lower % 1 || upper % 1) {
	        var rand = nativeRandom();
	        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
	      }
	      return baseRandom(lower, upper);
	    }
	    var camelCase = createCompounder(function(result, word, index) {
	      word = word.toLowerCase();
	      return result + (index ? capitalize(word) : word);
	    });
	    function capitalize(string) {
	      return upperFirst(toString(string).toLowerCase());
	    }
	    function deburr(string) {
	      string = toString(string);
	      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
	    }
	    function endsWith(string, target, position) {
	      string = toString(string);
	      target = baseToString(target);
	      var length = string.length;
	      position = position === undefined$1
	        ? length
	        : baseClamp(toInteger(position), 0, length);
	      var end = position;
	      position -= target.length;
	      return position >= 0 && string.slice(position, end) == target;
	    }
	    function escape(string) {
	      string = toString(string);
	      return (string && reHasUnescapedHtml.test(string))
	        ? string.replace(reUnescapedHtml, escapeHtmlChar)
	        : string;
	    }
	    function escapeRegExp(string) {
	      string = toString(string);
	      return (string && reHasRegExpChar.test(string))
	        ? string.replace(reRegExpChar, '\\$&')
	        : string;
	    }
	    var kebabCase = createCompounder(function(result, word, index) {
	      return result + (index ? '-' : '') + word.toLowerCase();
	    });
	    var lowerCase = createCompounder(function(result, word, index) {
	      return result + (index ? ' ' : '') + word.toLowerCase();
	    });
	    var lowerFirst = createCaseFirst('toLowerCase');
	    function pad(string, length, chars) {
	      string = toString(string);
	      length = toInteger(length);
	      var strLength = length ? stringSize(string) : 0;
	      if (!length || strLength >= length) {
	        return string;
	      }
	      var mid = (length - strLength) / 2;
	      return (
	        createPadding(nativeFloor(mid), chars) +
	        string +
	        createPadding(nativeCeil(mid), chars)
	      );
	    }
	    function padEnd(string, length, chars) {
	      string = toString(string);
	      length = toInteger(length);
	      var strLength = length ? stringSize(string) : 0;
	      return (length && strLength < length)
	        ? (string + createPadding(length - strLength, chars))
	        : string;
	    }
	    function padStart(string, length, chars) {
	      string = toString(string);
	      length = toInteger(length);
	      var strLength = length ? stringSize(string) : 0;
	      return (length && strLength < length)
	        ? (createPadding(length - strLength, chars) + string)
	        : string;
	    }
	    function parseInt(string, radix, guard) {
	      if (guard || radix == null) {
	        radix = 0;
	      } else if (radix) {
	        radix = +radix;
	      }
	      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
	    }
	    function repeat(string, n, guard) {
	      if ((guard ? isIterateeCall(string, n, guard) : n === undefined$1)) {
	        n = 1;
	      } else {
	        n = toInteger(n);
	      }
	      return baseRepeat(toString(string), n);
	    }
	    function replace() {
	      var args = arguments,
	          string = toString(args[0]);
	      return args.length < 3 ? string : string.replace(args[1], args[2]);
	    }
	    var snakeCase = createCompounder(function(result, word, index) {
	      return result + (index ? '_' : '') + word.toLowerCase();
	    });
	    function split(string, separator, limit) {
	      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
	        separator = limit = undefined$1;
	      }
	      limit = limit === undefined$1 ? MAX_ARRAY_LENGTH : limit >>> 0;
	      if (!limit) {
	        return [];
	      }
	      string = toString(string);
	      if (string && (
	            typeof separator == 'string' ||
	            (separator != null && !isRegExp(separator))
	          )) {
	        separator = baseToString(separator);
	        if (!separator && hasUnicode(string)) {
	          return castSlice(stringToArray(string), 0, limit);
	        }
	      }
	      return string.split(separator, limit);
	    }
	    var startCase = createCompounder(function(result, word, index) {
	      return result + (index ? ' ' : '') + upperFirst(word);
	    });
	    function startsWith(string, target, position) {
	      string = toString(string);
	      position = position == null
	        ? 0
	        : baseClamp(toInteger(position), 0, string.length);
	      target = baseToString(target);
	      return string.slice(position, position + target.length) == target;
	    }
	    function template(string, options, guard) {
	      var settings = lodash.templateSettings;
	      if (guard && isIterateeCall(string, options, guard)) {
	        options = undefined$1;
	      }
	      string = toString(string);
	      options = assignInWith({}, options, settings, customDefaultsAssignIn);
	      var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
	          importsKeys = keys(imports),
	          importsValues = baseValues(imports, importsKeys);
	      var isEscaping,
	          isEvaluating,
	          index = 0,
	          interpolate = options.interpolate || reNoMatch,
	          source = "__p += '";
	      var reDelimiters = RegExp(
	        (options.escape || reNoMatch).source + '|' +
	        interpolate.source + '|' +
	        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
	        (options.evaluate || reNoMatch).source + '|$'
	      , 'g');
	      var sourceURL = '//# sourceURL=' +
	        (hasOwnProperty.call(options, 'sourceURL')
	          ? (options.sourceURL + '').replace(/\s/g, ' ')
	          : ('lodash.templateSources[' + (++templateCounter) + ']')
	        ) + '\n';
	      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
	        interpolateValue || (interpolateValue = esTemplateValue);
	        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
	        if (escapeValue) {
	          isEscaping = true;
	          source += "' +\n__e(" + escapeValue + ") +\n'";
	        }
	        if (evaluateValue) {
	          isEvaluating = true;
	          source += "';\n" + evaluateValue + ";\n__p += '";
	        }
	        if (interpolateValue) {
	          source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
	        }
	        index = offset + match.length;
	        return match;
	      });
	      source += "';\n";
	      var variable = hasOwnProperty.call(options, 'variable') && options.variable;
	      if (!variable) {
	        source = 'with (obj) {\n' + source + '\n}\n';
	      }
	      else if (reForbiddenIdentifierChars.test(variable)) {
	        throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
	      }
	      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
	        .replace(reEmptyStringMiddle, '$1')
	        .replace(reEmptyStringTrailing, '$1;');
	      source = 'function(' + (variable || 'obj') + ') {\n' +
	        (variable
	          ? ''
	          : 'obj || (obj = {});\n'
	        ) +
	        "var __t, __p = ''" +
	        (isEscaping
	           ? ', __e = _.escape'
	           : ''
	        ) +
	        (isEvaluating
	          ? ', __j = Array.prototype.join;\n' +
	            "function print() { __p += __j.call(arguments, '') }\n"
	          : ';\n'
	        ) +
	        source +
	        'return __p\n}';
	      var result = attempt(function() {
	        return Function(importsKeys, sourceURL + 'return ' + source)
	          .apply(undefined$1, importsValues);
	      });
	      result.source = source;
	      if (isError(result)) {
	        throw result;
	      }
	      return result;
	    }
	    function toLower(value) {
	      return toString(value).toLowerCase();
	    }
	    function toUpper(value) {
	      return toString(value).toUpperCase();
	    }
	    function trim(string, chars, guard) {
	      string = toString(string);
	      if (string && (guard || chars === undefined$1)) {
	        return baseTrim(string);
	      }
	      if (!string || !(chars = baseToString(chars))) {
	        return string;
	      }
	      var strSymbols = stringToArray(string),
	          chrSymbols = stringToArray(chars),
	          start = charsStartIndex(strSymbols, chrSymbols),
	          end = charsEndIndex(strSymbols, chrSymbols) + 1;
	      return castSlice(strSymbols, start, end).join('');
	    }
	    function trimEnd(string, chars, guard) {
	      string = toString(string);
	      if (string && (guard || chars === undefined$1)) {
	        return string.slice(0, trimmedEndIndex(string) + 1);
	      }
	      if (!string || !(chars = baseToString(chars))) {
	        return string;
	      }
	      var strSymbols = stringToArray(string),
	          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
	      return castSlice(strSymbols, 0, end).join('');
	    }
	    function trimStart(string, chars, guard) {
	      string = toString(string);
	      if (string && (guard || chars === undefined$1)) {
	        return string.replace(reTrimStart, '');
	      }
	      if (!string || !(chars = baseToString(chars))) {
	        return string;
	      }
	      var strSymbols = stringToArray(string),
	          start = charsStartIndex(strSymbols, stringToArray(chars));
	      return castSlice(strSymbols, start).join('');
	    }
	    function truncate(string, options) {
	      var length = DEFAULT_TRUNC_LENGTH,
	          omission = DEFAULT_TRUNC_OMISSION;
	      if (isObject(options)) {
	        var separator = 'separator' in options ? options.separator : separator;
	        length = 'length' in options ? toInteger(options.length) : length;
	        omission = 'omission' in options ? baseToString(options.omission) : omission;
	      }
	      string = toString(string);
	      var strLength = string.length;
	      if (hasUnicode(string)) {
	        var strSymbols = stringToArray(string);
	        strLength = strSymbols.length;
	      }
	      if (length >= strLength) {
	        return string;
	      }
	      var end = length - stringSize(omission);
	      if (end < 1) {
	        return omission;
	      }
	      var result = strSymbols
	        ? castSlice(strSymbols, 0, end).join('')
	        : string.slice(0, end);
	      if (separator === undefined$1) {
	        return result + omission;
	      }
	      if (strSymbols) {
	        end += (result.length - end);
	      }
	      if (isRegExp(separator)) {
	        if (string.slice(end).search(separator)) {
	          var match,
	              substring = result;
	          if (!separator.global) {
	            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
	          }
	          separator.lastIndex = 0;
	          while ((match = separator.exec(substring))) {
	            var newEnd = match.index;
	          }
	          result = result.slice(0, newEnd === undefined$1 ? end : newEnd);
	        }
	      } else if (string.indexOf(baseToString(separator), end) != end) {
	        var index = result.lastIndexOf(separator);
	        if (index > -1) {
	          result = result.slice(0, index);
	        }
	      }
	      return result + omission;
	    }
	    function unescape(string) {
	      string = toString(string);
	      return (string && reHasEscapedHtml.test(string))
	        ? string.replace(reEscapedHtml, unescapeHtmlChar)
	        : string;
	    }
	    var upperCase = createCompounder(function(result, word, index) {
	      return result + (index ? ' ' : '') + word.toUpperCase();
	    });
	    var upperFirst = createCaseFirst('toUpperCase');
	    function words(string, pattern, guard) {
	      string = toString(string);
	      pattern = guard ? undefined$1 : pattern;
	      if (pattern === undefined$1) {
	        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
	      }
	      return string.match(pattern) || [];
	    }
	    var attempt = baseRest(function(func, args) {
	      try {
	        return apply(func, undefined$1, args);
	      } catch (e) {
	        return isError(e) ? e : new Error(e);
	      }
	    });
	    var bindAll = flatRest(function(object, methodNames) {
	      arrayEach(methodNames, function(key) {
	        key = toKey(key);
	        baseAssignValue(object, key, bind(object[key], object));
	      });
	      return object;
	    });
	    function cond(pairs) {
	      var length = pairs == null ? 0 : pairs.length,
	          toIteratee = getIteratee();
	      pairs = !length ? [] : arrayMap(pairs, function(pair) {
	        if (typeof pair[1] != 'function') {
	          throw new TypeError(FUNC_ERROR_TEXT);
	        }
	        return [toIteratee(pair[0]), pair[1]];
	      });
	      return baseRest(function(args) {
	        var index = -1;
	        while (++index < length) {
	          var pair = pairs[index];
	          if (apply(pair[0], this, args)) {
	            return apply(pair[1], this, args);
	          }
	        }
	      });
	    }
	    function conforms(source) {
	      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
	    }
	    function constant(value) {
	      return function() {
	        return value;
	      };
	    }
	    function defaultTo(value, defaultValue) {
	      return (value == null || value !== value) ? defaultValue : value;
	    }
	    var flow = createFlow();
	    var flowRight = createFlow(true);
	    function identity(value) {
	      return value;
	    }
	    function iteratee(func) {
	      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
	    }
	    function matches(source) {
	      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
	    }
	    function matchesProperty(path, srcValue) {
	      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
	    }
	    var method = baseRest(function(path, args) {
	      return function(object) {
	        return baseInvoke(object, path, args);
	      };
	    });
	    var methodOf = baseRest(function(object, args) {
	      return function(path) {
	        return baseInvoke(object, path, args);
	      };
	    });
	    function mixin(object, source, options) {
	      var props = keys(source),
	          methodNames = baseFunctions(source, props);
	      if (options == null &&
	          !(isObject(source) && (methodNames.length || !props.length))) {
	        options = source;
	        source = object;
	        object = this;
	        methodNames = baseFunctions(source, keys(source));
	      }
	      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
	          isFunc = isFunction(object);
	      arrayEach(methodNames, function(methodName) {
	        var func = source[methodName];
	        object[methodName] = func;
	        if (isFunc) {
	          object.prototype[methodName] = function() {
	            var chainAll = this.__chain__;
	            if (chain || chainAll) {
	              var result = object(this.__wrapped__),
	                  actions = result.__actions__ = copyArray(this.__actions__);
	              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
	              result.__chain__ = chainAll;
	              return result;
	            }
	            return func.apply(object, arrayPush([this.value()], arguments));
	          };
	        }
	      });
	      return object;
	    }
	    function noConflict() {
	      if (root._ === this) {
	        root._ = oldDash;
	      }
	      return this;
	    }
	    function noop() {
	    }
	    function nthArg(n) {
	      n = toInteger(n);
	      return baseRest(function(args) {
	        return baseNth(args, n);
	      });
	    }
	    var over = createOver(arrayMap);
	    var overEvery = createOver(arrayEvery);
	    var overSome = createOver(arraySome);
	    function property(path) {
	      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
	    }
	    function propertyOf(object) {
	      return function(path) {
	        return object == null ? undefined$1 : baseGet(object, path);
	      };
	    }
	    var range = createRange();
	    var rangeRight = createRange(true);
	    function stubArray() {
	      return [];
	    }
	    function stubFalse() {
	      return false;
	    }
	    function stubObject() {
	      return {};
	    }
	    function stubString() {
	      return '';
	    }
	    function stubTrue() {
	      return true;
	    }
	    function times(n, iteratee) {
	      n = toInteger(n);
	      if (n < 1 || n > MAX_SAFE_INTEGER) {
	        return [];
	      }
	      var index = MAX_ARRAY_LENGTH,
	          length = nativeMin(n, MAX_ARRAY_LENGTH);
	      iteratee = getIteratee(iteratee);
	      n -= MAX_ARRAY_LENGTH;
	      var result = baseTimes(length, iteratee);
	      while (++index < n) {
	        iteratee(index);
	      }
	      return result;
	    }
	    function toPath(value) {
	      if (isArray(value)) {
	        return arrayMap(value, toKey);
	      }
	      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
	    }
	    function uniqueId(prefix) {
	      var id = ++idCounter;
	      return toString(prefix) + id;
	    }
	    var add = createMathOperation(function(augend, addend) {
	      return augend + addend;
	    }, 0);
	    var ceil = createRound('ceil');
	    var divide = createMathOperation(function(dividend, divisor) {
	      return dividend / divisor;
	    }, 1);
	    var floor = createRound('floor');
	    function max(array) {
	      return (array && array.length)
	        ? baseExtremum(array, identity, baseGt)
	        : undefined$1;
	    }
	    function maxBy(array, iteratee) {
	      return (array && array.length)
	        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
	        : undefined$1;
	    }
	    function mean(array) {
	      return baseMean(array, identity);
	    }
	    function meanBy(array, iteratee) {
	      return baseMean(array, getIteratee(iteratee, 2));
	    }
	    function min(array) {
	      return (array && array.length)
	        ? baseExtremum(array, identity, baseLt)
	        : undefined$1;
	    }
	    function minBy(array, iteratee) {
	      return (array && array.length)
	        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
	        : undefined$1;
	    }
	    var multiply = createMathOperation(function(multiplier, multiplicand) {
	      return multiplier * multiplicand;
	    }, 1);
	    var round = createRound('round');
	    var subtract = createMathOperation(function(minuend, subtrahend) {
	      return minuend - subtrahend;
	    }, 0);
	    function sum(array) {
	      return (array && array.length)
	        ? baseSum(array, identity)
	        : 0;
	    }
	    function sumBy(array, iteratee) {
	      return (array && array.length)
	        ? baseSum(array, getIteratee(iteratee, 2))
	        : 0;
	    }
	    lodash.after = after;
	    lodash.ary = ary;
	    lodash.assign = assign;
	    lodash.assignIn = assignIn;
	    lodash.assignInWith = assignInWith;
	    lodash.assignWith = assignWith;
	    lodash.at = at;
	    lodash.before = before;
	    lodash.bind = bind;
	    lodash.bindAll = bindAll;
	    lodash.bindKey = bindKey;
	    lodash.castArray = castArray;
	    lodash.chain = chain;
	    lodash.chunk = chunk;
	    lodash.compact = compact;
	    lodash.concat = concat;
	    lodash.cond = cond;
	    lodash.conforms = conforms;
	    lodash.constant = constant;
	    lodash.countBy = countBy;
	    lodash.create = create;
	    lodash.curry = curry;
	    lodash.curryRight = curryRight;
	    lodash.debounce = debounce;
	    lodash.defaults = defaults;
	    lodash.defaultsDeep = defaultsDeep;
	    lodash.defer = defer;
	    lodash.delay = delay;
	    lodash.difference = difference;
	    lodash.differenceBy = differenceBy;
	    lodash.differenceWith = differenceWith;
	    lodash.drop = drop;
	    lodash.dropRight = dropRight;
	    lodash.dropRightWhile = dropRightWhile;
	    lodash.dropWhile = dropWhile;
	    lodash.fill = fill;
	    lodash.filter = filter;
	    lodash.flatMap = flatMap;
	    lodash.flatMapDeep = flatMapDeep;
	    lodash.flatMapDepth = flatMapDepth;
	    lodash.flatten = flatten;
	    lodash.flattenDeep = flattenDeep;
	    lodash.flattenDepth = flattenDepth;
	    lodash.flip = flip;
	    lodash.flow = flow;
	    lodash.flowRight = flowRight;
	    lodash.fromPairs = fromPairs;
	    lodash.functions = functions;
	    lodash.functionsIn = functionsIn;
	    lodash.groupBy = groupBy;
	    lodash.initial = initial;
	    lodash.intersection = intersection;
	    lodash.intersectionBy = intersectionBy;
	    lodash.intersectionWith = intersectionWith;
	    lodash.invert = invert;
	    lodash.invertBy = invertBy;
	    lodash.invokeMap = invokeMap;
	    lodash.iteratee = iteratee;
	    lodash.keyBy = keyBy;
	    lodash.keys = keys;
	    lodash.keysIn = keysIn;
	    lodash.map = map;
	    lodash.mapKeys = mapKeys;
	    lodash.mapValues = mapValues;
	    lodash.matches = matches;
	    lodash.matchesProperty = matchesProperty;
	    lodash.memoize = memoize;
	    lodash.merge = merge;
	    lodash.mergeWith = mergeWith;
	    lodash.method = method;
	    lodash.methodOf = methodOf;
	    lodash.mixin = mixin;
	    lodash.negate = negate;
	    lodash.nthArg = nthArg;
	    lodash.omit = omit;
	    lodash.omitBy = omitBy;
	    lodash.once = once;
	    lodash.orderBy = orderBy;
	    lodash.over = over;
	    lodash.overArgs = overArgs;
	    lodash.overEvery = overEvery;
	    lodash.overSome = overSome;
	    lodash.partial = partial;
	    lodash.partialRight = partialRight;
	    lodash.partition = partition;
	    lodash.pick = pick;
	    lodash.pickBy = pickBy;
	    lodash.property = property;
	    lodash.propertyOf = propertyOf;
	    lodash.pull = pull;
	    lodash.pullAll = pullAll;
	    lodash.pullAllBy = pullAllBy;
	    lodash.pullAllWith = pullAllWith;
	    lodash.pullAt = pullAt;
	    lodash.range = range;
	    lodash.rangeRight = rangeRight;
	    lodash.rearg = rearg;
	    lodash.reject = reject;
	    lodash.remove = remove;
	    lodash.rest = rest;
	    lodash.reverse = reverse;
	    lodash.sampleSize = sampleSize;
	    lodash.set = set;
	    lodash.setWith = setWith;
	    lodash.shuffle = shuffle;
	    lodash.slice = slice;
	    lodash.sortBy = sortBy;
	    lodash.sortedUniq = sortedUniq;
	    lodash.sortedUniqBy = sortedUniqBy;
	    lodash.split = split;
	    lodash.spread = spread;
	    lodash.tail = tail;
	    lodash.take = take;
	    lodash.takeRight = takeRight;
	    lodash.takeRightWhile = takeRightWhile;
	    lodash.takeWhile = takeWhile;
	    lodash.tap = tap;
	    lodash.throttle = throttle;
	    lodash.thru = thru;
	    lodash.toArray = toArray;
	    lodash.toPairs = toPairs;
	    lodash.toPairsIn = toPairsIn;
	    lodash.toPath = toPath;
	    lodash.toPlainObject = toPlainObject;
	    lodash.transform = transform;
	    lodash.unary = unary;
	    lodash.union = union;
	    lodash.unionBy = unionBy;
	    lodash.unionWith = unionWith;
	    lodash.uniq = uniq;
	    lodash.uniqBy = uniqBy;
	    lodash.uniqWith = uniqWith;
	    lodash.unset = unset;
	    lodash.unzip = unzip;
	    lodash.unzipWith = unzipWith;
	    lodash.update = update;
	    lodash.updateWith = updateWith;
	    lodash.values = values;
	    lodash.valuesIn = valuesIn;
	    lodash.without = without;
	    lodash.words = words;
	    lodash.wrap = wrap;
	    lodash.xor = xor;
	    lodash.xorBy = xorBy;
	    lodash.xorWith = xorWith;
	    lodash.zip = zip;
	    lodash.zipObject = zipObject;
	    lodash.zipObjectDeep = zipObjectDeep;
	    lodash.zipWith = zipWith;
	    lodash.entries = toPairs;
	    lodash.entriesIn = toPairsIn;
	    lodash.extend = assignIn;
	    lodash.extendWith = assignInWith;
	    mixin(lodash, lodash);
	    lodash.add = add;
	    lodash.attempt = attempt;
	    lodash.camelCase = camelCase;
	    lodash.capitalize = capitalize;
	    lodash.ceil = ceil;
	    lodash.clamp = clamp;
	    lodash.clone = clone;
	    lodash.cloneDeep = cloneDeep;
	    lodash.cloneDeepWith = cloneDeepWith;
	    lodash.cloneWith = cloneWith;
	    lodash.conformsTo = conformsTo;
	    lodash.deburr = deburr;
	    lodash.defaultTo = defaultTo;
	    lodash.divide = divide;
	    lodash.endsWith = endsWith;
	    lodash.eq = eq;
	    lodash.escape = escape;
	    lodash.escapeRegExp = escapeRegExp;
	    lodash.every = every;
	    lodash.find = find;
	    lodash.findIndex = findIndex;
	    lodash.findKey = findKey;
	    lodash.findLast = findLast;
	    lodash.findLastIndex = findLastIndex;
	    lodash.findLastKey = findLastKey;
	    lodash.floor = floor;
	    lodash.forEach = forEach;
	    lodash.forEachRight = forEachRight;
	    lodash.forIn = forIn;
	    lodash.forInRight = forInRight;
	    lodash.forOwn = forOwn;
	    lodash.forOwnRight = forOwnRight;
	    lodash.get = get;
	    lodash.gt = gt;
	    lodash.gte = gte;
	    lodash.has = has;
	    lodash.hasIn = hasIn;
	    lodash.head = head;
	    lodash.identity = identity;
	    lodash.includes = includes;
	    lodash.indexOf = indexOf;
	    lodash.inRange = inRange;
	    lodash.invoke = invoke;
	    lodash.isArguments = isArguments;
	    lodash.isArray = isArray;
	    lodash.isArrayBuffer = isArrayBuffer;
	    lodash.isArrayLike = isArrayLike;
	    lodash.isArrayLikeObject = isArrayLikeObject;
	    lodash.isBoolean = isBoolean;
	    lodash.isBuffer = isBuffer;
	    lodash.isDate = isDate;
	    lodash.isElement = isElement;
	    lodash.isEmpty = isEmpty;
	    lodash.isEqual = isEqual;
	    lodash.isEqualWith = isEqualWith;
	    lodash.isError = isError;
	    lodash.isFinite = isFinite;
	    lodash.isFunction = isFunction;
	    lodash.isInteger = isInteger;
	    lodash.isLength = isLength;
	    lodash.isMap = isMap;
	    lodash.isMatch = isMatch;
	    lodash.isMatchWith = isMatchWith;
	    lodash.isNaN = isNaN;
	    lodash.isNative = isNative;
	    lodash.isNil = isNil;
	    lodash.isNull = isNull;
	    lodash.isNumber = isNumber;
	    lodash.isObject = isObject;
	    lodash.isObjectLike = isObjectLike;
	    lodash.isPlainObject = isPlainObject;
	    lodash.isRegExp = isRegExp;
	    lodash.isSafeInteger = isSafeInteger;
	    lodash.isSet = isSet;
	    lodash.isString = isString;
	    lodash.isSymbol = isSymbol;
	    lodash.isTypedArray = isTypedArray;
	    lodash.isUndefined = isUndefined;
	    lodash.isWeakMap = isWeakMap;
	    lodash.isWeakSet = isWeakSet;
	    lodash.join = join;
	    lodash.kebabCase = kebabCase;
	    lodash.last = last;
	    lodash.lastIndexOf = lastIndexOf;
	    lodash.lowerCase = lowerCase;
	    lodash.lowerFirst = lowerFirst;
	    lodash.lt = lt;
	    lodash.lte = lte;
	    lodash.max = max;
	    lodash.maxBy = maxBy;
	    lodash.mean = mean;
	    lodash.meanBy = meanBy;
	    lodash.min = min;
	    lodash.minBy = minBy;
	    lodash.stubArray = stubArray;
	    lodash.stubFalse = stubFalse;
	    lodash.stubObject = stubObject;
	    lodash.stubString = stubString;
	    lodash.stubTrue = stubTrue;
	    lodash.multiply = multiply;
	    lodash.nth = nth;
	    lodash.noConflict = noConflict;
	    lodash.noop = noop;
	    lodash.now = now;
	    lodash.pad = pad;
	    lodash.padEnd = padEnd;
	    lodash.padStart = padStart;
	    lodash.parseInt = parseInt;
	    lodash.random = random;
	    lodash.reduce = reduce;
	    lodash.reduceRight = reduceRight;
	    lodash.repeat = repeat;
	    lodash.replace = replace;
	    lodash.result = result;
	    lodash.round = round;
	    lodash.runInContext = runInContext;
	    lodash.sample = sample;
	    lodash.size = size;
	    lodash.snakeCase = snakeCase;
	    lodash.some = some;
	    lodash.sortedIndex = sortedIndex;
	    lodash.sortedIndexBy = sortedIndexBy;
	    lodash.sortedIndexOf = sortedIndexOf;
	    lodash.sortedLastIndex = sortedLastIndex;
	    lodash.sortedLastIndexBy = sortedLastIndexBy;
	    lodash.sortedLastIndexOf = sortedLastIndexOf;
	    lodash.startCase = startCase;
	    lodash.startsWith = startsWith;
	    lodash.subtract = subtract;
	    lodash.sum = sum;
	    lodash.sumBy = sumBy;
	    lodash.template = template;
	    lodash.times = times;
	    lodash.toFinite = toFinite;
	    lodash.toInteger = toInteger;
	    lodash.toLength = toLength;
	    lodash.toLower = toLower;
	    lodash.toNumber = toNumber;
	    lodash.toSafeInteger = toSafeInteger;
	    lodash.toString = toString;
	    lodash.toUpper = toUpper;
	    lodash.trim = trim;
	    lodash.trimEnd = trimEnd;
	    lodash.trimStart = trimStart;
	    lodash.truncate = truncate;
	    lodash.unescape = unescape;
	    lodash.uniqueId = uniqueId;
	    lodash.upperCase = upperCase;
	    lodash.upperFirst = upperFirst;
	    lodash.each = forEach;
	    lodash.eachRight = forEachRight;
	    lodash.first = head;
	    mixin(lodash, (function() {
	      var source = {};
	      baseForOwn(lodash, function(func, methodName) {
	        if (!hasOwnProperty.call(lodash.prototype, methodName)) {
	          source[methodName] = func;
	        }
	      });
	      return source;
	    }()), { 'chain': false });
	    lodash.VERSION = VERSION;
	    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
	      lodash[methodName].placeholder = lodash;
	    });
	    arrayEach(['drop', 'take'], function(methodName, index) {
	      LazyWrapper.prototype[methodName] = function(n) {
	        n = n === undefined$1 ? 1 : nativeMax(toInteger(n), 0);
	        var result = (this.__filtered__ && !index)
	          ? new LazyWrapper(this)
	          : this.clone();
	        if (result.__filtered__) {
	          result.__takeCount__ = nativeMin(n, result.__takeCount__);
	        } else {
	          result.__views__.push({
	            'size': nativeMin(n, MAX_ARRAY_LENGTH),
	            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
	          });
	        }
	        return result;
	      };
	      LazyWrapper.prototype[methodName + 'Right'] = function(n) {
	        return this.reverse()[methodName](n).reverse();
	      };
	    });
	    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
	      var type = index + 1,
	          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
	      LazyWrapper.prototype[methodName] = function(iteratee) {
	        var result = this.clone();
	        result.__iteratees__.push({
	          'iteratee': getIteratee(iteratee, 3),
	          'type': type
	        });
	        result.__filtered__ = result.__filtered__ || isFilter;
	        return result;
	      };
	    });
	    arrayEach(['head', 'last'], function(methodName, index) {
	      var takeName = 'take' + (index ? 'Right' : '');
	      LazyWrapper.prototype[methodName] = function() {
	        return this[takeName](1).value()[0];
	      };
	    });
	    arrayEach(['initial', 'tail'], function(methodName, index) {
	      var dropName = 'drop' + (index ? '' : 'Right');
	      LazyWrapper.prototype[methodName] = function() {
	        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
	      };
	    });
	    LazyWrapper.prototype.compact = function() {
	      return this.filter(identity);
	    };
	    LazyWrapper.prototype.find = function(predicate) {
	      return this.filter(predicate).head();
	    };
	    LazyWrapper.prototype.findLast = function(predicate) {
	      return this.reverse().find(predicate);
	    };
	    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
	      if (typeof path == 'function') {
	        return new LazyWrapper(this);
	      }
	      return this.map(function(value) {
	        return baseInvoke(value, path, args);
	      });
	    });
	    LazyWrapper.prototype.reject = function(predicate) {
	      return this.filter(negate(getIteratee(predicate)));
	    };
	    LazyWrapper.prototype.slice = function(start, end) {
	      start = toInteger(start);
	      var result = this;
	      if (result.__filtered__ && (start > 0 || end < 0)) {
	        return new LazyWrapper(result);
	      }
	      if (start < 0) {
	        result = result.takeRight(-start);
	      } else if (start) {
	        result = result.drop(start);
	      }
	      if (end !== undefined$1) {
	        end = toInteger(end);
	        result = end < 0 ? result.dropRight(-end) : result.take(end - start);
	      }
	      return result;
	    };
	    LazyWrapper.prototype.takeRightWhile = function(predicate) {
	      return this.reverse().takeWhile(predicate).reverse();
	    };
	    LazyWrapper.prototype.toArray = function() {
	      return this.take(MAX_ARRAY_LENGTH);
	    };
	    baseForOwn(LazyWrapper.prototype, function(func, methodName) {
	      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
	          isTaker = /^(?:head|last)$/.test(methodName),
	          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
	          retUnwrapped = isTaker || /^find/.test(methodName);
	      if (!lodashFunc) {
	        return;
	      }
	      lodash.prototype[methodName] = function() {
	        var value = this.__wrapped__,
	            args = isTaker ? [1] : arguments,
	            isLazy = value instanceof LazyWrapper,
	            iteratee = args[0],
	            useLazy = isLazy || isArray(value);
	        var interceptor = function(value) {
	          var result = lodashFunc.apply(lodash, arrayPush([value], args));
	          return (isTaker && chainAll) ? result[0] : result;
	        };
	        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
	          isLazy = useLazy = false;
	        }
	        var chainAll = this.__chain__,
	            isHybrid = !!this.__actions__.length,
	            isUnwrapped = retUnwrapped && !chainAll,
	            onlyLazy = isLazy && !isHybrid;
	        if (!retUnwrapped && useLazy) {
	          value = onlyLazy ? value : new LazyWrapper(this);
	          var result = func.apply(value, args);
	          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined$1 });
	          return new LodashWrapper(result, chainAll);
	        }
	        if (isUnwrapped && onlyLazy) {
	          return func.apply(this, args);
	        }
	        result = this.thru(interceptor);
	        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
	      };
	    });
	    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
	      var func = arrayProto[methodName],
	          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
	          retUnwrapped = /^(?:pop|shift)$/.test(methodName);
	      lodash.prototype[methodName] = function() {
	        var args = arguments;
	        if (retUnwrapped && !this.__chain__) {
	          var value = this.value();
	          return func.apply(isArray(value) ? value : [], args);
	        }
	        return this[chainName](function(value) {
	          return func.apply(isArray(value) ? value : [], args);
	        });
	      };
	    });
	    baseForOwn(LazyWrapper.prototype, function(func, methodName) {
	      var lodashFunc = lodash[methodName];
	      if (lodashFunc) {
	        var key = lodashFunc.name + '';
	        if (!hasOwnProperty.call(realNames, key)) {
	          realNames[key] = [];
	        }
	        realNames[key].push({ 'name': methodName, 'func': lodashFunc });
	      }
	    });
	    realNames[createHybrid(undefined$1, WRAP_BIND_KEY_FLAG).name] = [{
	      'name': 'wrapper',
	      'func': undefined$1
	    }];
	    LazyWrapper.prototype.clone = lazyClone;
	    LazyWrapper.prototype.reverse = lazyReverse;
	    LazyWrapper.prototype.value = lazyValue;
	    lodash.prototype.at = wrapperAt;
	    lodash.prototype.chain = wrapperChain;
	    lodash.prototype.commit = wrapperCommit;
	    lodash.prototype.next = wrapperNext;
	    lodash.prototype.plant = wrapperPlant;
	    lodash.prototype.reverse = wrapperReverse;
	    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
	    lodash.prototype.first = lodash.prototype.head;
	    if (symIterator) {
	      lodash.prototype[symIterator] = wrapperToIterator;
	    }
	    return lodash;
	  });
	  var _ = runInContext();
	  if (freeModule) {
	    (freeModule.exports = _)._ = _;
	    freeExports._ = _;
	  }
	  else {
	    root._ = _;
	  }
	}.call(commonjsGlobal));
} (lodash, lodash.exports));
var lodashExports = lodash.exports;
getDefaultExportFromCjs(lodashExports);

var umd = {exports: {}};

umd.exports;
(function (module, exports) {
	!function(t,e){module.exports=e();}(commonjsGlobal,(()=>(()=>{var t={975:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",i=0,o=-1,s=0,a=0;a<=t.length;++a){if(a<t.length)r=t.charCodeAt(a);else {if(47===r)break;r=47;}if(47===r){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var h=n.lastIndexOf("/");if(h!==n.length-1){-1===h?(n="",i=0):i=(n=n.slice(0,h)).length-1-n.lastIndexOf("/"),o=a,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=a,s=0;continue}e&&(n.length>0?n+="/..":n="..",i=2);}else n.length>0?n+="/"+t.slice(o+1,a):n=t.slice(o+1,a),i=a-o-1;o=a,s=0;}else 46===r&&-1!==s?++s:s=-1;}return n}var n={resolve:function(){for(var t,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=process.cwd()),s=t),e(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0));}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return ".";var n=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return ".";for(var t,r=0;r<arguments.length;++r){var i=arguments[r];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i);}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return "";if((t=n.resolve(t))===(r=n.resolve(r)))return "";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var o=t.length,s=o-i,a=1;a<r.length&&47===r.charCodeAt(a);++a);for(var h=r.length-a,c=s<h?s:h,f=-1,u=0;u<=c;++u){if(u===c){if(h>c){if(47===r.charCodeAt(a+u))return r.slice(a+u+1);if(0===u)return r.slice(a+u)}else s>c&&(47===t.charCodeAt(i+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(i+u);if(l!==r.charCodeAt(a+u))break;47===l&&(f=u);}var d="";for(u=i+f+1;u<=o;++u)u!==o&&47!==t.charCodeAt(u)||(0===d.length?d+="..":d+="/..");return d.length>0?d+r.slice(a+f):(a+=f,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return ".";for(var r=t.charCodeAt(0),n=47===r,i=-1,o=!0,s=t.length-1;s>=1;--s)if(47===(r=t.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return -1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return "";var a=r.length-1,h=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else -1===h&&(s=!1,h=n+1),a>=0&&(c===r.charCodeAt(a)?-1==--a&&(o=n):(a=-1,o=h));}return i===o?o=h:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){i=n+1;break}}else -1===o&&(s=!1,o=n+1);return -1===o?"":t.slice(i,o)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,o=!0,s=0,a=t.length-1;a>=0;--a){var h=t.charCodeAt(a);if(47!==h)-1===i&&(o=!1,i=a+1),46===h?-1===r?r=a:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=a+1;break}}return -1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,a=0,h=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(i=t.charCodeAt(f)))-1===h&&(c=!1,h=f+1),46===i?-1===s?s=f:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){a=f+1;break}return -1===s||-1===h||0===u||1===u&&s===h-1&&s===a+1?-1!==h&&(r.base=r.name=0===a&&o?t.slice(1,h):t.slice(a,h)):(0===a&&o?(r.name=t.slice(1,s),r.base=t.slice(1,h)):(r.name=t.slice(a,s),r.base=t.slice(a,h)),r.ext=t.slice(s,h)),a>0?r.dir=t.slice(0,a-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n;},70:(t,e)=>{if(Object.defineProperty(e,"__esModule",{value:!0}),e.isWindows=void 0,"object"==typeof process)e.isWindows="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e.isWindows=t.indexOf("Windows")>=0;}},231:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const n=r(70),i=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function a(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!i.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!o.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const h="",c="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(t){return t instanceof u||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,o=!1){"object"==typeof t?(this.scheme=t.scheme||h,this.authority=t.authority||h,this.path=t.path||h,this.query=t.query||h,this.fragment=t.fragment||h):(this.scheme=function(t,e){return t||e?t:"file"}(t,o),this.authority=e||h,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==c&&(e=c+e):e=c;}return e}(this.scheme,r||h),this.query=n||h,this.fragment=i||h,a(this,o));}get fsPath(){return v(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:o}=t;return void 0===e?e=this.scheme:null===e&&(e=h),void 0===r?r=this.authority:null===r&&(r=h),void 0===n?n=this.path:null===n&&(n=h),void 0===i?i=this.query:null===i&&(i=h),void 0===o?o=this.fragment:null===o&&(o=h),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new d(e,r,n,i,o)}static parse(t,e=!1){const r=f.exec(t);return r?new d(r[2]||h,w(r[4]||h),w(r[5]||h),w(r[7]||h),w(r[9]||h),e):new d(h,h,h,h,h)}static file(t){let e=h;if(n.isWindows&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const r=t.indexOf(c,2);-1===r?(e=t.substring(2),t=c):(e=t.substring(2,r),t=t.substring(r)||c);}return new d("file",e,t,h,h)}static from(t){const e=new d(t.scheme,t.authority,t.path,t.query,t.fragment);return a(e,!0),e}toString(t=!1){return y(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof u)return t;{const e=new d(t);return e._formatted=t.external,e._fsPath=t._sep===l?t.fsPath:null,e}}return t}}e.URI=u;const l=n.isWindows?1:void 0;class d extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(t=!1){return t?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=l),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 p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(t,e,r){let n,i=-1;for(let o=0;o<t.length;o++){const s=t.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||e&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),void 0!==n&&(n+=t.charAt(o));else {void 0===n&&(n=t.substr(0,o));const e=p[s];void 0!==e?(-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),n+=e):-1===i&&(i=o);}}return -1!==i&&(n+=encodeURIComponent(t.substring(i))),void 0!==n?n:t}function m(t){let e;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);35===n||63===n?(void 0===e&&(e=t.substr(0,r)),e+=p[n]):void 0!==e&&(e+=t[r]);}return void 0!==e?e:t}function v(t,e){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,n.isWindows&&(r=r.replace(/\//g,"\\")),r}function y(t,e){const r=e?m:g;let n="",{scheme:i,authority:o,path:s,query:a,fragment:h}=t;if(i&&(n+=i,n+=":"),(o||"file"===i)&&(n+=c,n+=c),o){let t=o.indexOf("@");if(-1!==t){const e=o.substr(0,t);o=o.substr(t+1),t=e.lastIndexOf(":"),-1===t?n+=r(e,!1,!1):(n+=r(e.substr(0,t),!1,!1),n+=":",n+=r(e.substr(t+1),!1,!0)),n+="@";}o=o.toLowerCase(),t=o.lastIndexOf(":"),-1===t?n+=r(o,!1,!0):(n+=r(o.substr(0,t),!1,!0),n+=o.substr(t));}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const t=s.charCodeAt(1);t>=65&&t<=90&&(s=`/${String.fromCharCode(t+32)}:${s.substr(3)}`);}else if(s.length>=2&&58===s.charCodeAt(1)){const t=s.charCodeAt(0);t>=65&&t<=90&&(s=`${String.fromCharCode(t+32)}:${s.substr(2)}`);}n+=r(s,!0,!1);}return a&&(n+="?",n+=r(a,!1,!1)),h&&(n+="#",n+=e?h:g(h,!1,!1)),n}function b(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+b(t.substr(3)):t}}e.uriToFsPath=v;const C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(t){return t.match(C)?t.replace(C,(t=>b(t))):t}},552:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i);}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r];}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e});}:function(t,e){t.default=e;}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=void 0;const s=o(r(975)),a=s.posix||s,h="/";var c;!function(t){t.joinPath=function(t,...e){return t.with({path:a.join(t.path,...e)})},t.resolvePath=function(t,...e){let r=t.path,n=!1;r[0]!==h&&(r=h+r,n=!0);let i=a.resolve(r,...e);return n&&i[0]===h&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===h)return t;let e=a.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return a.basename(t.path)},t.extname=function(t){return a.extname(t.path)};}(c||(e.Utils=c={}));}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}var n={};return (()=>{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.URI=void 0;const e=r(231);Object.defineProperty(t,"URI",{enumerable:!0,get:function(){return e.URI}});const i=r(552);Object.defineProperty(t,"Utils",{enumerable:!0,get:function(){return i.Utils}});})(),n})()));
} (umd, umd.exports));
var umdExports = umd.exports;
getDefaultExportFromCjs(umdExports);

Object.defineProperty(utils$6, "__esModule", { value: true });
utils$6.not = not;
utils$6.or = or;
utils$6.and = and;
utils$6.unique = unique;
utils$6.clamp = clamp$1;
utils$6.urlToPath = urlToPath;
utils$6.pathToUrl = pathToUrl;
utils$6.normalizePath = normalizePath$1;
utils$6.normalizeUri = normalizeUri;
utils$6.getLastPartOfPath = getLastPartOfPath;
utils$6.passMap = passMap;
utils$6.isInRange = isInRange;
utils$6.isZeroLengthRange = isZeroLengthRange;
utils$6.isRangeStartAfterEnd = isRangeStartAfterEnd;
utils$6.swapRangeStartEndIfNecessary = swapRangeStartEndIfNecessary;
utils$6.moveRangeStartToEndIfNecessary = moveRangeStartToEndIfNecessary;
utils$6.isBeforeOrEqualToPosition = isBeforeOrEqualToPosition;
utils$6.isPositionEqual = isPositionEqual;
utils$6.isNotNullOrUndefined = isNotNullOrUndefined;
utils$6.debounceSameArg = debounceSameArg;
utils$6.debounceThrottle = debounceThrottle;
utils$6.regexLastIndexOf = regexLastIndexOf;
utils$6.regexIndexOf = regexIndexOf;
utils$6.getRegExpMatches = getRegExpMatches;
utils$6.modifyLines = modifyLines;
utils$6.isSamePosition = isSamePosition;
utils$6.filterAsync = filterAsync;
utils$6.getIndent = getIndent$1;
utils$6.possiblyComponent = possiblyComponent;
utils$6.returnObjectIfHasKeys = returnObjectIfHasKeys;
utils$6.toFileNameLowerCase = toFileNameLowerCase;
utils$6.createGetCanonicalFileName = createGetCanonicalFileName;
utils$6.memoize = memoize;
utils$6.removeLineWithString = removeLineWithString;
utils$6.traverseTypeString = traverseTypeString;
const lodash_1$4 = lodashExports;
const vscode_uri_1$3 = umdExports;
function not(predicate) {
    return (x) => !predicate(x);
}
function or(...predicates) {
    return (x) => predicates.some((predicate) => predicate(x));
}
function and(...predicates) {
    return (x) => predicates.every((predicate) => predicate(x));
}
function unique(array) {
    return (0, lodash_1$4.uniqWith)(array, lodash_1$4.isEqual);
}
function clamp$1(num, min, max) {
    return Math.max(min, Math.min(max, num));
}
function urlToPath(stringUrl) {
    const url = vscode_uri_1$3.URI.parse(stringUrl);
    if (url.scheme !== 'file') {
        return null;
    }
    return url.fsPath.replace(/\\/g, '/');
}
function pathToUrl(path) {
    return vscode_uri_1$3.URI.file(path).toString();
}
const backslashRegEx = /\\/g;
function normalizePath$1(path) {
    return normalizeDriveLetter(path.replace(backslashRegEx, '/'));
}
function normalizeDriveLetter(path) {
    if (path.charCodeAt(1) !==  58) {
        return path;
    }
    const driveLetter = path.charCodeAt(0);
    if (driveLetter >=  65 && driveLetter <=  90) {
        return String.fromCharCode(driveLetter + 32) + path.slice(1);
    }
    return path;
}
function normalizeUri(uri) {
    return vscode_uri_1$3.URI.parse(uri).toString();
}
function getLastPartOfPath(path) {
    const lastSlash = path.lastIndexOf('/');
    const lastBackslash = path.lastIndexOf('\\');
    const lastSeparator = Math.max(lastSlash, lastBackslash);
    return lastSeparator === -1 ? path : path.slice(lastSeparator + 1);
}
function passMap(array, mapper) {
    return array.map((x) => {
        const mapped = mapper(x);
        return mapped === undefined ? x : mapped;
    });
}
function isInRange(range, positionToTest) {
    return (isBeforeOrEqualToPosition(range.end, positionToTest) &&
        isBeforeOrEqualToPosition(positionToTest, range.start));
}
function isZeroLengthRange(range) {
    return isPositionEqual(range.start, range.end);
}
function isRangeStartAfterEnd(range) {
    return (range.end.line < range.start.line ||
        (range.end.line === range.start.line && range.end.character < range.start.character));
}
function swapRangeStartEndIfNecessary(range) {
    if (isRangeStartAfterEnd(range)) {
        const start = range.start;
        range.start = range.end;
        range.end = start;
    }
    return range;
}
function moveRangeStartToEndIfNecessary(range) {
    if (isRangeStartAfterEnd(range)) {
        range.start = range.end;
    }
    return range;
}
function isBeforeOrEqualToPosition(position, positionToTest) {
    return (positionToTest.line < position.line ||
        (positionToTest.line === position.line && positionToTest.character <= position.character));
}
function isPositionEqual(position1, position2) {
    return position1.line === position2.line && position1.character === position2.character;
}
function isNotNullOrUndefined(val) {
    return val !== undefined && val !== null;
}
function debounceSameArg(fn, shouldCancelPrevious, miliseconds) {
    let timeout;
    let prevArg;
    return (arg) => {
        if (shouldCancelPrevious(arg, prevArg)) {
            clearTimeout(timeout);
        }
        prevArg = arg;
        timeout = setTimeout(() => {
            fn(arg);
            prevArg = undefined;
        }, miliseconds);
    };
}
function debounceThrottle(fn, miliseconds) {
    let timeout;
    let lastInvocation = Date.now() - miliseconds;
    function maybeCall() {
        clearTimeout(timeout);
        timeout = setTimeout(() => {
            if (Date.now() - lastInvocation < miliseconds) {
                maybeCall();
                return;
            }
            fn();
            lastInvocation = Date.now();
        }, miliseconds);
    }
    return maybeCall;
}
function regexLastIndexOf(text, regex, endPos) {
    if (endPos === undefined) {
        endPos = text.length;
    }
    else if (endPos < 0) {
        endPos = 0;
    }
    const stringToWorkWith = text.substring(0, endPos + 1);
    let lastIndexOf = -1;
    let result = null;
    while ((result = regex.exec(stringToWorkWith)) !== null) {
        lastIndexOf = result.index;
    }
    return lastIndexOf;
}
function regexIndexOf(text, regex, startPos) {
    if (startPos === undefined || startPos < 0) {
        startPos = 0;
    }
    const stringToWorkWith = text.substring(startPos);
    const result = regex.exec(stringToWorkWith);
    return result?.index ?? -1;
}
function getRegExpMatches(regex, str) {
    const matches = [];
    let match;
    while ((match = regex.exec(str))) {
        matches.push(match);
    }
    return matches;
}
function modifyLines(text, replacementFn) {
    let idx = 0;
    return text
        .split('\r\n')
        .map((l1) => l1
        .split('\n')
        .map((line) => replacementFn(line, idx++))
        .join('\n'))
        .join('\r\n');
}
function isSamePosition(position, another) {
    return position.line === another.line && position.character === another.character;
}
async function filterAsync(array, predicate) {
    const fail = Symbol();
    return (await Promise.all(array.map(async (item, idx) => ((await predicate(item, idx)) ? item : fail)))).filter((i) => i !== fail);
}
function getIndent$1(text) {
    return /^[ |\t]+/.exec(text)?.[0] ?? '';
}
function possiblyComponent(nodeOrTagName) {
    const charCode = (typeof nodeOrTagName === 'object' ? nodeOrTagName.tag : nodeOrTagName)?.charCodeAt(0);
    return charCode !== undefined && charCode >=  65 && charCode <=  90;
}
function returnObjectIfHasKeys(obj) {
    if (Object.keys(obj || {}).length > 0) {
        return obj;
    }
}
const fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g;
function toFileNameLowerCase(x) {
    return fileNameLowerCaseRegExp.test(x) ? x.replace(fileNameLowerCaseRegExp, toLowerCase) : x;
}
function toLowerCase(x) {
    return x.toLowerCase();
}
function createGetCanonicalFileName(useCaseSensitiveFileNames) {
    return useCaseSensitiveFileNames ? identity : toFileNameLowerCase;
}
function identity(x) {
    return x;
}
function memoize(callback) {
    let value;
    let callbackInner = callback;
    return () => {
        if (callbackInner) {
            value = callback();
            callbackInner = undefined;
        }
        return value;
    };
}
function removeLineWithString(str, keyword) {
    const lines = str.split('\n');
    const filteredLines = lines.filter((line) => !line.includes(keyword));
    return filteredLines.join('\n');
}
function traverseTypeString(str, start, endChar) {
    let singleQuoteOpen = false;
    let doubleQuoteOpen = false;
    let countCurlyBrace = 0;
    let countAngleBracket = 0;
    for (let i = start; i < str.length; i++) {
        const char = str[i];
        if (!doubleQuoteOpen && char === "'") {
            singleQuoteOpen = !singleQuoteOpen;
        }
        else if (!singleQuoteOpen && char === '"') {
            doubleQuoteOpen = !doubleQuoteOpen;
        }
        else if (!doubleQuoteOpen && !singleQuoteOpen) {
            if (char === '{') {
                countCurlyBrace++;
            }
            else if (char === '}') {
                countCurlyBrace--;
            }
            else if (char === '<') {
                countAngleBracket++;
            }
            else if (char === '>') {
                countAngleBracket--;
            }
        }
        if (!singleQuoteOpen &&
            !doubleQuoteOpen &&
            countCurlyBrace === 0 &&
            countAngleBracket === 0 &&
            char === endChar) {
            return i;
        }
    }
    return -1;
}

Object.defineProperty(DiagnosticsManager, "__esModule", { value: true });
DiagnosticsManager.PullDiagnosticsManager = DiagnosticsManager.PushDiagnosticsManager = void 0;
const vscode_languageserver_1$w = main$8;
const utils_1$N = utils$6;
class PushDiagnosticsManager {
    constructor(sendDiagnostics, docManager, getDiagnostics) {
        this.sendDiagnostics = sendDiagnostics;
        this.docManager = docManager;
        this.getDiagnostics = getDiagnostics;
        this.pendingUpdates = new Set();
        this.cancellationTokens = new Map();
        this.debouncedUpdateAll = (0, utils_1$N.debounceThrottle)(() => this.updateAll(), 1000);
        this.scheduleBatchUpdate = (0, utils_1$N.debounceThrottle)(() => {
            this.pendingUpdates.forEach((doc) => {
                this.update(doc);
            });
            this.pendingUpdates.clear();
        }, 500);
    }
    updateAll() {
        this.docManager.getAllOpenedByClient().forEach((doc) => {
            this.update(doc[1]);
        });
        this.pendingUpdates.clear();
    }
    scheduleUpdateAll() {
        this.cancellationTokens.forEach((token) => token.cancel());
        this.cancellationTokens.clear();
        this.pendingUpdates.clear();
        this.debouncedUpdateAll();
    }
    async update(document) {
        const uri = document.getURL();
        this.cancelStarted(uri);
        const tokenSource = new vscode_languageserver_1$w.CancellationTokenSource();
        this.cancellationTokens.set(uri, tokenSource);
        const diagnostics = await this.getDiagnostics({ uri: document.getURL() }, tokenSource.token);
        this.sendDiagnostics({
            uri: document.getURL(),
            diagnostics
        });
        tokenSource.dispose();
        if (this.cancellationTokens.get(uri) === tokenSource) {
            this.cancellationTokens.delete(uri);
        }
    }
    cancelStarted(uri) {
        const started = this.cancellationTokens.get(uri);
        if (started) {
            started.cancel();
        }
    }
    removeDiagnostics(document) {
        this.pendingUpdates.delete(document);
        this.sendDiagnostics({
            uri: document.getURL(),
            diagnostics: []
        });
    }
    scheduleUpdate(document) {
        if (!this.docManager.isOpenedInClient(document.getURL())) {
            return;
        }
        this.cancelStarted(document.getURL());
        this.pendingUpdates.add(document);
        this.scheduleBatchUpdate();
    }
}
DiagnosticsManager.PushDiagnosticsManager = PushDiagnosticsManager;
class PullDiagnosticsManager {
    constructor(sendDiagnostics, sendRefreshDiagnostics) {
        this.sendDiagnostics = sendDiagnostics;
        this.sendRefreshDiagnostics = sendRefreshDiagnostics;
        this.refreshTimeout = null;
    }
    scheduleUpdate() {
    }
    scheduleUpdateAll() {
        if (this.refreshTimeout) {
            clearTimeout(this.refreshTimeout);
        }
        this.refreshTimeout = setTimeout(() => {
            this.sendRefreshDiagnostics();
            this.refreshTimeout = null;
        }, 500);
    }
    removeDiagnostics(document) {
        this.sendDiagnostics({
            uri: document.getURL(),
            diagnostics: []
        });
    }
    cancelStarted() {
    }
}
DiagnosticsManager.PullDiagnosticsManager = PullDiagnosticsManager;

var documents = {};

var DocumentManager$1 = {};

var fileCollection = {};

var __importDefault$v = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(fileCollection, "__esModule", { value: true });
fileCollection.FileSet = fileCollection.FileMap = void 0;
const typescript_1$q = __importDefault$v(ts);
const utils_1$M = utils$6;
class FileMap {
    constructor(useCaseSensitiveFileNames = typescript_1$q.default.sys.useCaseSensitiveFileNames) {
        this.map = new Map();
        this.getCanonicalFileName = (0, utils_1$M.createGetCanonicalFileName)(useCaseSensitiveFileNames);
    }
    get(filePath) {
        return this.map.get(this.getCanonicalFileName(filePath));
    }
    set(filePath, value) {
        const canonicalFileName = this.getCanonicalFileName(filePath);
        return this.map.set(canonicalFileName, value);
    }
    has(filePath) {
        return this.map.has(this.getCanonicalFileName(filePath));
    }
    delete(filePath) {
        return this.map.delete(this.getCanonicalFileName(filePath));
    }
    entries() {
        return this.map.entries();
    }
    forEach(callbackfn) {
        return this.map.forEach(callbackfn);
    }
    values() {
        return this.map.values();
    }
    clear() {
        this.map.clear();
    }
    keys() {
        return this.map.keys();
    }
    get size() {
        return this.map.size;
    }
    [Symbol.iterator]() {
        return this.map[Symbol.iterator]();
    }
}
fileCollection.FileMap = FileMap;
class FileSet {
    constructor(useCaseSensitiveFileNames = typescript_1$q.default.sys.useCaseSensitiveFileNames) {
        this.set = new Set();
        this.getCanonicalFileName = (0, utils_1$M.createGetCanonicalFileName)(useCaseSensitiveFileNames);
    }
    add(filePath) {
        this.set.add(this.getCanonicalFileName(filePath));
    }
    has(filePath) {
        return this.set.has(this.getCanonicalFileName(filePath));
    }
    delete(filePath) {
        return this.set.delete(this.getCanonicalFileName(filePath));
    }
    clear() {
        this.set.clear();
    }
    get size() {
        return this.set.size;
    }
    [Symbol.iterator]() {
        return this.set[Symbol.iterator]();
    }
}
fileCollection.FileSet = FileSet;

var __importDefault$u = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(DocumentManager$1, "__esModule", { value: true });
DocumentManager$1.DocumentManager = void 0;
const events_1$1 = require$$0$4;
const utils_1$L = utils$6;
const typescript_1$p = __importDefault$u(ts);
const fileCollection_1$7 = fileCollection;
class DocumentManager {
    constructor(createDocument, options = {
        useCaseSensitiveFileNames: typescript_1$p.default.sys.useCaseSensitiveFileNames
    }) {
        this.createDocument = createDocument;
        this.emitter = new events_1$1.EventEmitter();
        this.documents = new fileCollection_1$7.FileMap(options.useCaseSensitiveFileNames);
        this.locked = new fileCollection_1$7.FileSet(options.useCaseSensitiveFileNames);
        this.deleteCandidates = new fileCollection_1$7.FileSet(options.useCaseSensitiveFileNames);
    }
    openClientDocument(textDocument) {
        return this.openDocument(textDocument,  true);
    }
    openDocument(textDocument, openedByClient) {
        textDocument = {
            ...textDocument,
            uri: (0, utils_1$L.normalizeUri)(textDocument.uri)
        };
        let document;
        if (this.documents.has(textDocument.uri)) {
            document = this.documents.get(textDocument.uri);
            document.openedByClient ||= openedByClient;
            document.setText(textDocument.text);
            this.notify('documentChange', document);
        }
        else {
            document = this.createDocument(textDocument);
            document.openedByClient = openedByClient;
            this.documents.set(textDocument.uri, document);
            this.notify('documentOpen', document);
        }
        return document;
    }
    lockDocument(uri) {
        this.locked.add((0, utils_1$L.normalizeUri)(uri));
    }
    markAsOpenedInClient(uri) {
        const document = this.documents.get((0, utils_1$L.normalizeUri)(uri));
        if (document) {
            document.openedByClient = true;
        }
    }
    getAllOpenedByClient() {
        return Array.from(this.documents.entries()).filter((doc) => doc[1].openedByClient);
    }
    isOpenedInClient(uri) {
        const document = this.documents.get((0, utils_1$L.normalizeUri)(uri));
        return !!document?.openedByClient;
    }
    releaseDocument(uri) {
        uri = (0, utils_1$L.normalizeUri)(uri);
        this.locked.delete(uri);
        const document = this.documents.get(uri);
        if (document) {
            document.openedByClient = false;
        }
        if (this.deleteCandidates.has(uri)) {
            this.deleteCandidates.delete(uri);
            this.closeDocument(uri);
        }
    }
    closeDocument(uri) {
        uri = (0, utils_1$L.normalizeUri)(uri);
        const document = this.documents.get(uri);
        if (!document) {
            throw new Error('Cannot call methods on an unopened document');
        }
        this.notify('documentClose', document);
        if (!this.locked.has(uri)) {
            this.documents.delete(uri);
        }
        else {
            this.deleteCandidates.add(uri);
        }
        document.openedByClient = false;
    }
    updateDocument(textDocument, changes) {
        const document = this.documents.get((0, utils_1$L.normalizeUri)(textDocument.uri));
        if (!document) {
            throw new Error('Cannot call methods on an unopened document');
        }
        document.update(changes);
        this.notify('documentChange', document);
    }
    on(name, listener) {
        this.emitter.on(name, listener);
    }
    get(uri) {
        return this.documents.get((0, utils_1$L.normalizeUri)(uri));
    }
    notify(name, document) {
        this.emitter.emit(name, document);
    }
}
DocumentManager$1.DocumentManager = DocumentManager;

var Document$2 = {};

var DocumentBase = {};

var utils$5 = {};

var parseHtml = {};

var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var main_exports = {};
__export(main_exports, {
  config: () => config,
  t: () => t
});
var main$4 = __toCommonJS(main_exports);
var import_fs = fs$1;
var import_promises = require$$1$3;
async function readFileFromUri(uri) {
  if (uri.protocol === "file:") {
    return await (0, import_promises.readFile)(uri, "utf8");
  }
  if (uri.protocol === "http:" || uri.protocol === "https:") {
    const res = await fetch(uri.toString(), {
      headers: {
        "Accept-Encoding": "gzip, deflate",
        "Accept": "application/json"
      },
      redirect: "follow"
    });
    if (!res.ok) {
      let error = `Unexpected ${res.status} response while trying to read ${uri}`;
      try {
        error += `: ${await res.text()}`;
      } catch {
      }
      throw new Error(error);
    }
    const decoded = await res.text();
    return decoded;
  }
  throw new Error("Unsupported protocol");
}
function readFileFromFsPath(fsPath) {
  return (0, import_fs.readFileSync)(fsPath, "utf8");
}
var bundle;
function config(config2) {
  if ("contents" in config2) {
    if (typeof config2.contents === "string") {
      bundle = JSON.parse(config2.contents);
    } else {
      bundle = config2.contents;
    }
    return;
  }
  if ("fsPath" in config2) {
    const fileContent = readFileFromFsPath(config2.fsPath);
    const content = JSON.parse(fileContent);
    bundle = isBuiltinExtension(content) ? content.contents.bundle : content;
    return;
  }
  if (config2.uri) {
    let uri = config2.uri;
    if (typeof config2.uri === "string") {
      uri = new URL(config2.uri);
    }
    return new Promise((resolve, reject) => {
      readFileFromUri(uri).then((uriContent) => {
        try {
          const content = JSON.parse(uriContent);
          bundle = isBuiltinExtension(content) ? content.contents.bundle : content;
          resolve();
        } catch (err) {
          reject(err);
        }
      }).catch((err) => {
        reject(err);
      });
    });
  }
}
function t(...args) {
  const firstArg = args[0];
  let key;
  let message;
  let formatArgs;
  if (typeof firstArg === "string") {
    key = firstArg;
    message = firstArg;
    args.splice(0, 1);
    formatArgs = !args || typeof args[0] !== "object" ? args : args[0];
  } else if (firstArg instanceof Array) {
    const replacements = args.slice(1);
    if (firstArg.length !== replacements.length + 1) {
      throw new Error("expected a string as the first argument to l10n.t");
    }
    let str = firstArg[0];
    for (let i = 1; i < firstArg.length; i++) {
      str += `{${i - 1}}` + firstArg[i];
    }
    return t(str, ...replacements);
  } else {
    message = firstArg.message;
    key = message;
    if (firstArg.comment && firstArg.comment.length > 0) {
      key += `/${Array.isArray(firstArg.comment) ? firstArg.comment.join("") : firstArg.comment}`;
    }
    formatArgs = firstArg.args ?? {};
  }
  const messageFromBundle = bundle?.[key];
  if (!messageFromBundle) {
    return format$2(message, formatArgs);
  }
  if (typeof messageFromBundle === "string") {
    return format$2(messageFromBundle, formatArgs);
  }
  if (messageFromBundle.comment) {
    return format$2(messageFromBundle.message, formatArgs);
  }
  return format$2(message, formatArgs);
}
var _format2Regexp = /{([^}]+)}/g;
function format$2(template, values) {
  if (Object.keys(values).length === 0) {
    return template;
  }
  return template.replace(_format2Regexp, (match, group) => values[group] ?? match);
}
function isBuiltinExtension(json) {
  return !!(typeof json?.contents?.bundle === "object" && typeof json?.version === "string");
}
getDefaultExportFromCjs(main$4);

var DocumentUri$1;
(function (DocumentUri) {
    function is(value) {
        return typeof value === 'string';
    }
    DocumentUri.is = is;
})(DocumentUri$1 || (DocumentUri$1 = {}));
var URI$3;
(function (URI) {
    function is(value) {
        return typeof value === 'string';
    }
    URI.is = is;
})(URI$3 || (URI$3 = {}));
var integer$1;
(function (integer) {
    integer.MIN_VALUE = -2147483648;
    integer.MAX_VALUE = 2147483647;
    function is(value) {
        return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;
    }
    integer.is = is;
})(integer$1 || (integer$1 = {}));
var uinteger$1;
(function (uinteger) {
    uinteger.MIN_VALUE = 0;
    uinteger.MAX_VALUE = 2147483647;
    function is(value) {
        return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;
    }
    uinteger.is = is;
})(uinteger$1 || (uinteger$1 = {}));
var Position$1;
(function (Position) {
    function create(line, character) {
        if (line === Number.MAX_VALUE) {
            line = uinteger$1.MAX_VALUE;
        }
        if (character === Number.MAX_VALUE) {
            character = uinteger$1.MAX_VALUE;
        }
        return { line, character };
    }
    Position.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.objectLiteral(candidate) && Is$1.uinteger(candidate.line) && Is$1.uinteger(candidate.character);
    }
    Position.is = is;
})(Position$1 || (Position$1 = {}));
var Range$1;
(function (Range) {
    function create(one, two, three, four) {
        if (Is$1.uinteger(one) && Is$1.uinteger(two) && Is$1.uinteger(three) && Is$1.uinteger(four)) {
            return { start: Position$1.create(one, two), end: Position$1.create(three, four) };
        }
        else if (Position$1.is(one) && Position$1.is(two)) {
            return { start: one, end: two };
        }
        else {
            throw new Error(`Range#create called with invalid arguments[${one}, ${two}, ${three}, ${four}]`);
        }
    }
    Range.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.objectLiteral(candidate) && Position$1.is(candidate.start) && Position$1.is(candidate.end);
    }
    Range.is = is;
})(Range$1 || (Range$1 = {}));
var Location$1;
(function (Location) {
    function create(uri, range) {
        return { uri, range };
    }
    Location.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.objectLiteral(candidate) && Range$1.is(candidate.range) && (Is$1.string(candidate.uri) || Is$1.undefined(candidate.uri));
    }
    Location.is = is;
})(Location$1 || (Location$1 = {}));
var LocationLink$1;
(function (LocationLink) {
    function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
        return { targetUri, targetRange, targetSelectionRange, originSelectionRange };
    }
    LocationLink.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.objectLiteral(candidate) && Range$1.is(candidate.targetRange) && Is$1.string(candidate.targetUri)
            && Range$1.is(candidate.targetSelectionRange)
            && (Range$1.is(candidate.originSelectionRange) || Is$1.undefined(candidate.originSelectionRange));
    }
    LocationLink.is = is;
})(LocationLink$1 || (LocationLink$1 = {}));
var Color$1;
(function (Color) {
    function create(red, green, blue, alpha) {
        return {
            red,
            green,
            blue,
            alpha,
        };
    }
    Color.create = create;
    function is(value) {
        const candidate = value;
        return Is$1.objectLiteral(candidate) && Is$1.numberRange(candidate.red, 0, 1)
            && Is$1.numberRange(candidate.green, 0, 1)
            && Is$1.numberRange(candidate.blue, 0, 1)
            && Is$1.numberRange(candidate.alpha, 0, 1);
    }
    Color.is = is;
})(Color$1 || (Color$1 = {}));
var ColorInformation$1;
(function (ColorInformation) {
    function create(range, color) {
        return {
            range,
            color,
        };
    }
    ColorInformation.create = create;
    function is(value) {
        const candidate = value;
        return Is$1.objectLiteral(candidate) && Range$1.is(candidate.range) && Color$1.is(candidate.color);
    }
    ColorInformation.is = is;
})(ColorInformation$1 || (ColorInformation$1 = {}));
var ColorPresentation$1;
(function (ColorPresentation) {
    function create(label, textEdit, additionalTextEdits) {
        return {
            label,
            textEdit,
            additionalTextEdits,
        };
    }
    ColorPresentation.create = create;
    function is(value) {
        const candidate = value;
        return Is$1.objectLiteral(candidate) && Is$1.string(candidate.label)
            && (Is$1.undefined(candidate.textEdit) || TextEdit$1.is(candidate))
            && (Is$1.undefined(candidate.additionalTextEdits) || Is$1.typedArray(candidate.additionalTextEdits, TextEdit$1.is));
    }
    ColorPresentation.is = is;
})(ColorPresentation$1 || (ColorPresentation$1 = {}));
var FoldingRangeKind$1;
(function (FoldingRangeKind) {
    FoldingRangeKind.Comment = 'comment';
    FoldingRangeKind.Imports = 'imports';
    FoldingRangeKind.Region = 'region';
})(FoldingRangeKind$1 || (FoldingRangeKind$1 = {}));
var FoldingRange$1;
(function (FoldingRange) {
    function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {
        const result = {
            startLine,
            endLine
        };
        if (Is$1.defined(startCharacter)) {
            result.startCharacter = startCharacter;
        }
        if (Is$1.defined(endCharacter)) {
            result.endCharacter = endCharacter;
        }
        if (Is$1.defined(kind)) {
            result.kind = kind;
        }
        if (Is$1.defined(collapsedText)) {
            result.collapsedText = collapsedText;
        }
        return result;
    }
    FoldingRange.create = create;
    function is(value) {
        const candidate = value;
        return Is$1.objectLiteral(candidate) && Is$1.uinteger(candidate.startLine) && Is$1.uinteger(candidate.startLine)
            && (Is$1.undefined(candidate.startCharacter) || Is$1.uinteger(candidate.startCharacter))
            && (Is$1.undefined(candidate.endCharacter) || Is$1.uinteger(candidate.endCharacter))
            && (Is$1.undefined(candidate.kind) || Is$1.string(candidate.kind));
    }
    FoldingRange.is = is;
})(FoldingRange$1 || (FoldingRange$1 = {}));
var DiagnosticRelatedInformation$1;
(function (DiagnosticRelatedInformation) {
    function create(location, message) {
        return {
            location,
            message
        };
    }
    DiagnosticRelatedInformation.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.defined(candidate) && Location$1.is(candidate.location) && Is$1.string(candidate.message);
    }
    DiagnosticRelatedInformation.is = is;
})(DiagnosticRelatedInformation$1 || (DiagnosticRelatedInformation$1 = {}));
var DiagnosticSeverity$1;
(function (DiagnosticSeverity) {
    DiagnosticSeverity.Error = 1;
    DiagnosticSeverity.Warning = 2;
    DiagnosticSeverity.Information = 3;
    DiagnosticSeverity.Hint = 4;
})(DiagnosticSeverity$1 || (DiagnosticSeverity$1 = {}));
var DiagnosticTag$1;
(function (DiagnosticTag) {
    DiagnosticTag.Unnecessary = 1;
    DiagnosticTag.Deprecated = 2;
})(DiagnosticTag$1 || (DiagnosticTag$1 = {}));
var CodeDescription$1;
(function (CodeDescription) {
    function is(value) {
        const candidate = value;
        return Is$1.objectLiteral(candidate) && Is$1.string(candidate.href);
    }
    CodeDescription.is = is;
})(CodeDescription$1 || (CodeDescription$1 = {}));
var Diagnostic$1;
(function (Diagnostic) {
    function create(range, message, severity, code, source, relatedInformation) {
        let result = { range, message };
        if (Is$1.defined(severity)) {
            result.severity = severity;
        }
        if (Is$1.defined(code)) {
            result.code = code;
        }
        if (Is$1.defined(source)) {
            result.source = source;
        }
        if (Is$1.defined(relatedInformation)) {
            result.relatedInformation = relatedInformation;
        }
        return result;
    }
    Diagnostic.create = create;
    function is(value) {
        var _a;
        let candidate = value;
        return Is$1.defined(candidate)
            && Range$1.is(candidate.range)
            && Is$1.string(candidate.message)
            && (Is$1.number(candidate.severity) || Is$1.undefined(candidate.severity))
            && (Is$1.integer(candidate.code) || Is$1.string(candidate.code) || Is$1.undefined(candidate.code))
            && (Is$1.undefined(candidate.codeDescription) || (Is$1.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))
            && (Is$1.string(candidate.source) || Is$1.undefined(candidate.source))
            && (Is$1.undefined(candidate.relatedInformation) || Is$1.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation$1.is));
    }
    Diagnostic.is = is;
})(Diagnostic$1 || (Diagnostic$1 = {}));
var Command$1;
(function (Command) {
    function create(title, command, ...args) {
        let result = { title, command };
        if (Is$1.defined(args) && args.length > 0) {
            result.arguments = args;
        }
        return result;
    }
    Command.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.defined(candidate) && Is$1.string(candidate.title) && Is$1.string(candidate.command);
    }
    Command.is = is;
})(Command$1 || (Command$1 = {}));
var TextEdit$1;
(function (TextEdit) {
    function replace(range, newText) {
        return { range, newText };
    }
    TextEdit.replace = replace;
    function insert(position, newText) {
        return { range: { start: position, end: position }, newText };
    }
    TextEdit.insert = insert;
    function del(range) {
        return { range, newText: '' };
    }
    TextEdit.del = del;
    function is(value) {
        const candidate = value;
        return Is$1.objectLiteral(candidate)
            && Is$1.string(candidate.newText)
            && Range$1.is(candidate.range);
    }
    TextEdit.is = is;
})(TextEdit$1 || (TextEdit$1 = {}));
var ChangeAnnotation$1;
(function (ChangeAnnotation) {
    function create(label, needsConfirmation, description) {
        const result = { label };
        if (needsConfirmation !== undefined) {
            result.needsConfirmation = needsConfirmation;
        }
        if (description !== undefined) {
            result.description = description;
        }
        return result;
    }
    ChangeAnnotation.create = create;
    function is(value) {
        const candidate = value;
        return Is$1.objectLiteral(candidate) && Is$1.string(candidate.label) &&
            (Is$1.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&
            (Is$1.string(candidate.description) || candidate.description === undefined);
    }
    ChangeAnnotation.is = is;
})(ChangeAnnotation$1 || (ChangeAnnotation$1 = {}));
var ChangeAnnotationIdentifier$1;
(function (ChangeAnnotationIdentifier) {
    function is(value) {
        const candidate = value;
        return Is$1.string(candidate);
    }
    ChangeAnnotationIdentifier.is = is;
})(ChangeAnnotationIdentifier$1 || (ChangeAnnotationIdentifier$1 = {}));
var AnnotatedTextEdit$1;
(function (AnnotatedTextEdit) {
    function replace(range, newText, annotation) {
        return { range, newText, annotationId: annotation };
    }
    AnnotatedTextEdit.replace = replace;
    function insert(position, newText, annotation) {
        return { range: { start: position, end: position }, newText, annotationId: annotation };
    }
    AnnotatedTextEdit.insert = insert;
    function del(range, annotation) {
        return { range, newText: '', annotationId: annotation };
    }
    AnnotatedTextEdit.del = del;
    function is(value) {
        const candidate = value;
        return TextEdit$1.is(candidate) && (ChangeAnnotation$1.is(candidate.annotationId) || ChangeAnnotationIdentifier$1.is(candidate.annotationId));
    }
    AnnotatedTextEdit.is = is;
})(AnnotatedTextEdit$1 || (AnnotatedTextEdit$1 = {}));
var TextDocumentEdit$1;
(function (TextDocumentEdit) {
    function create(textDocument, edits) {
        return { textDocument, edits };
    }
    TextDocumentEdit.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.defined(candidate)
            && OptionalVersionedTextDocumentIdentifier$1.is(candidate.textDocument)
            && Array.isArray(candidate.edits);
    }
    TextDocumentEdit.is = is;
})(TextDocumentEdit$1 || (TextDocumentEdit$1 = {}));
var CreateFile$1;
(function (CreateFile) {
    function create(uri, options, annotation) {
        let result = {
            kind: 'create',
            uri
        };
        if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
            result.options = options;
        }
        if (annotation !== undefined) {
            result.annotationId = annotation;
        }
        return result;
    }
    CreateFile.create = create;
    function is(value) {
        let candidate = value;
        return candidate && candidate.kind === 'create' && Is$1.string(candidate.uri) && (candidate.options === undefined ||
            ((candidate.options.overwrite === undefined || Is$1.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is$1.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier$1.is(candidate.annotationId));
    }
    CreateFile.is = is;
})(CreateFile$1 || (CreateFile$1 = {}));
var RenameFile$1;
(function (RenameFile) {
    function create(oldUri, newUri, options, annotation) {
        let result = {
            kind: 'rename',
            oldUri,
            newUri
        };
        if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
            result.options = options;
        }
        if (annotation !== undefined) {
            result.annotationId = annotation;
        }
        return result;
    }
    RenameFile.create = create;
    function is(value) {
        let candidate = value;
        return candidate && candidate.kind === 'rename' && Is$1.string(candidate.oldUri) && Is$1.string(candidate.newUri) && (candidate.options === undefined ||
            ((candidate.options.overwrite === undefined || Is$1.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is$1.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier$1.is(candidate.annotationId));
    }
    RenameFile.is = is;
})(RenameFile$1 || (RenameFile$1 = {}));
var DeleteFile$1;
(function (DeleteFile) {
    function create(uri, options, annotation) {
        let result = {
            kind: 'delete',
            uri
        };
        if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
            result.options = options;
        }
        if (annotation !== undefined) {
            result.annotationId = annotation;
        }
        return result;
    }
    DeleteFile.create = create;
    function is(value) {
        let candidate = value;
        return candidate && candidate.kind === 'delete' && Is$1.string(candidate.uri) && (candidate.options === undefined ||
            ((candidate.options.recursive === undefined || Is$1.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is$1.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier$1.is(candidate.annotationId));
    }
    DeleteFile.is = is;
})(DeleteFile$1 || (DeleteFile$1 = {}));
var WorkspaceEdit$1;
(function (WorkspaceEdit) {
    function is(value) {
        let candidate = value;
        return candidate &&
            (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
            (candidate.documentChanges === undefined || candidate.documentChanges.every((change) => {
                if (Is$1.string(change.kind)) {
                    return CreateFile$1.is(change) || RenameFile$1.is(change) || DeleteFile$1.is(change);
                }
                else {
                    return TextDocumentEdit$1.is(change);
                }
            }));
    }
    WorkspaceEdit.is = is;
})(WorkspaceEdit$1 || (WorkspaceEdit$1 = {}));
var TextDocumentIdentifier$1;
(function (TextDocumentIdentifier) {
    function create(uri) {
        return { uri };
    }
    TextDocumentIdentifier.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.defined(candidate) && Is$1.string(candidate.uri);
    }
    TextDocumentIdentifier.is = is;
})(TextDocumentIdentifier$1 || (TextDocumentIdentifier$1 = {}));
var VersionedTextDocumentIdentifier$1;
(function (VersionedTextDocumentIdentifier) {
    function create(uri, version) {
        return { uri, version };
    }
    VersionedTextDocumentIdentifier.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.defined(candidate) && Is$1.string(candidate.uri) && Is$1.integer(candidate.version);
    }
    VersionedTextDocumentIdentifier.is = is;
})(VersionedTextDocumentIdentifier$1 || (VersionedTextDocumentIdentifier$1 = {}));
var OptionalVersionedTextDocumentIdentifier$1;
(function (OptionalVersionedTextDocumentIdentifier) {
    function create(uri, version) {
        return { uri, version };
    }
    OptionalVersionedTextDocumentIdentifier.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.defined(candidate) && Is$1.string(candidate.uri) && (candidate.version === null || Is$1.integer(candidate.version));
    }
    OptionalVersionedTextDocumentIdentifier.is = is;
})(OptionalVersionedTextDocumentIdentifier$1 || (OptionalVersionedTextDocumentIdentifier$1 = {}));
var TextDocumentItem$1;
(function (TextDocumentItem) {
    function create(uri, languageId, version, text) {
        return { uri, languageId, version, text };
    }
    TextDocumentItem.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.defined(candidate) && Is$1.string(candidate.uri) && Is$1.string(candidate.languageId) && Is$1.integer(candidate.version) && Is$1.string(candidate.text);
    }
    TextDocumentItem.is = is;
})(TextDocumentItem$1 || (TextDocumentItem$1 = {}));
var MarkupKind$1;
(function (MarkupKind) {
    MarkupKind.PlainText = 'plaintext';
    MarkupKind.Markdown = 'markdown';
    function is(value) {
        const candidate = value;
        return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
    }
    MarkupKind.is = is;
})(MarkupKind$1 || (MarkupKind$1 = {}));
var MarkupContent$1;
(function (MarkupContent) {
    function is(value) {
        const candidate = value;
        return Is$1.objectLiteral(value) && MarkupKind$1.is(candidate.kind) && Is$1.string(candidate.value);
    }
    MarkupContent.is = is;
})(MarkupContent$1 || (MarkupContent$1 = {}));
var CompletionItemKind$1;
(function (CompletionItemKind) {
    CompletionItemKind.Text = 1;
    CompletionItemKind.Method = 2;
    CompletionItemKind.Function = 3;
    CompletionItemKind.Constructor = 4;
    CompletionItemKind.Field = 5;
    CompletionItemKind.Variable = 6;
    CompletionItemKind.Class = 7;
    CompletionItemKind.Interface = 8;
    CompletionItemKind.Module = 9;
    CompletionItemKind.Property = 10;
    CompletionItemKind.Unit = 11;
    CompletionItemKind.Value = 12;
    CompletionItemKind.Enum = 13;
    CompletionItemKind.Keyword = 14;
    CompletionItemKind.Snippet = 15;
    CompletionItemKind.Color = 16;
    CompletionItemKind.File = 17;
    CompletionItemKind.Reference = 18;
    CompletionItemKind.Folder = 19;
    CompletionItemKind.EnumMember = 20;
    CompletionItemKind.Constant = 21;
    CompletionItemKind.Struct = 22;
    CompletionItemKind.Event = 23;
    CompletionItemKind.Operator = 24;
    CompletionItemKind.TypeParameter = 25;
})(CompletionItemKind$1 || (CompletionItemKind$1 = {}));
var InsertTextFormat$1;
(function (InsertTextFormat) {
    InsertTextFormat.PlainText = 1;
    InsertTextFormat.Snippet = 2;
})(InsertTextFormat$1 || (InsertTextFormat$1 = {}));
var CompletionItemTag$1;
(function (CompletionItemTag) {
    CompletionItemTag.Deprecated = 1;
})(CompletionItemTag$1 || (CompletionItemTag$1 = {}));
var InsertReplaceEdit$1;
(function (InsertReplaceEdit) {
    function create(newText, insert, replace) {
        return { newText, insert, replace };
    }
    InsertReplaceEdit.create = create;
    function is(value) {
        const candidate = value;
        return candidate && Is$1.string(candidate.newText) && Range$1.is(candidate.insert) && Range$1.is(candidate.replace);
    }
    InsertReplaceEdit.is = is;
})(InsertReplaceEdit$1 || (InsertReplaceEdit$1 = {}));
var InsertTextMode$1;
(function (InsertTextMode) {
    InsertTextMode.asIs = 1;
    InsertTextMode.adjustIndentation = 2;
})(InsertTextMode$1 || (InsertTextMode$1 = {}));
var CompletionItemLabelDetails$1;
(function (CompletionItemLabelDetails) {
    function is(value) {
        const candidate = value;
        return candidate && (Is$1.string(candidate.detail) || candidate.detail === undefined) &&
            (Is$1.string(candidate.description) || candidate.description === undefined);
    }
    CompletionItemLabelDetails.is = is;
})(CompletionItemLabelDetails$1 || (CompletionItemLabelDetails$1 = {}));
var CompletionItem$1;
(function (CompletionItem) {
    function create(label) {
        return { label };
    }
    CompletionItem.create = create;
})(CompletionItem$1 || (CompletionItem$1 = {}));
var CompletionList$1;
(function (CompletionList) {
    function create(items, isIncomplete) {
        return { items: items ? items : [], isIncomplete: !!isIncomplete };
    }
    CompletionList.create = create;
})(CompletionList$1 || (CompletionList$1 = {}));
var MarkedString$1;
(function (MarkedString) {
    function fromPlainText(plainText) {
        return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&');
    }
    MarkedString.fromPlainText = fromPlainText;
    function is(value) {
        const candidate = value;
        return Is$1.string(candidate) || (Is$1.objectLiteral(candidate) && Is$1.string(candidate.language) && Is$1.string(candidate.value));
    }
    MarkedString.is = is;
})(MarkedString$1 || (MarkedString$1 = {}));
var Hover$1;
(function (Hover) {
    function is(value) {
        let candidate = value;
        return !!candidate && Is$1.objectLiteral(candidate) && (MarkupContent$1.is(candidate.contents) ||
            MarkedString$1.is(candidate.contents) ||
            Is$1.typedArray(candidate.contents, MarkedString$1.is)) && (value.range === undefined || Range$1.is(value.range));
    }
    Hover.is = is;
})(Hover$1 || (Hover$1 = {}));
var ParameterInformation$1;
(function (ParameterInformation) {
    function create(label, documentation) {
        return documentation ? { label, documentation } : { label };
    }
    ParameterInformation.create = create;
})(ParameterInformation$1 || (ParameterInformation$1 = {}));
var SignatureInformation$1;
(function (SignatureInformation) {
    function create(label, documentation, ...parameters) {
        let result = { label };
        if (Is$1.defined(documentation)) {
            result.documentation = documentation;
        }
        if (Is$1.defined(parameters)) {
            result.parameters = parameters;
        }
        else {
            result.parameters = [];
        }
        return result;
    }
    SignatureInformation.create = create;
})(SignatureInformation$1 || (SignatureInformation$1 = {}));
var DocumentHighlightKind$1;
(function (DocumentHighlightKind) {
    DocumentHighlightKind.Text = 1;
    DocumentHighlightKind.Read = 2;
    DocumentHighlightKind.Write = 3;
})(DocumentHighlightKind$1 || (DocumentHighlightKind$1 = {}));
var DocumentHighlight$1;
(function (DocumentHighlight) {
    function create(range, kind) {
        let result = { range };
        if (Is$1.number(kind)) {
            result.kind = kind;
        }
        return result;
    }
    DocumentHighlight.create = create;
})(DocumentHighlight$1 || (DocumentHighlight$1 = {}));
var SymbolKind$1;
(function (SymbolKind) {
    SymbolKind.File = 1;
    SymbolKind.Module = 2;
    SymbolKind.Namespace = 3;
    SymbolKind.Package = 4;
    SymbolKind.Class = 5;
    SymbolKind.Method = 6;
    SymbolKind.Property = 7;
    SymbolKind.Field = 8;
    SymbolKind.Constructor = 9;
    SymbolKind.Enum = 10;
    SymbolKind.Interface = 11;
    SymbolKind.Function = 12;
    SymbolKind.Variable = 13;
    SymbolKind.Constant = 14;
    SymbolKind.String = 15;
    SymbolKind.Number = 16;
    SymbolKind.Boolean = 17;
    SymbolKind.Array = 18;
    SymbolKind.Object = 19;
    SymbolKind.Key = 20;
    SymbolKind.Null = 21;
    SymbolKind.EnumMember = 22;
    SymbolKind.Struct = 23;
    SymbolKind.Event = 24;
    SymbolKind.Operator = 25;
    SymbolKind.TypeParameter = 26;
})(SymbolKind$1 || (SymbolKind$1 = {}));
var SymbolTag$1;
(function (SymbolTag) {
    SymbolTag.Deprecated = 1;
})(SymbolTag$1 || (SymbolTag$1 = {}));
var SymbolInformation$1;
(function (SymbolInformation) {
    function create(name, kind, range, uri, containerName) {
        let result = {
            name,
            kind,
            location: { uri, range }
        };
        if (containerName) {
            result.containerName = containerName;
        }
        return result;
    }
    SymbolInformation.create = create;
})(SymbolInformation$1 || (SymbolInformation$1 = {}));
var WorkspaceSymbol$1;
(function (WorkspaceSymbol) {
    function create(name, kind, uri, range) {
        return range !== undefined
            ? { name, kind, location: { uri, range } }
            : { name, kind, location: { uri } };
    }
    WorkspaceSymbol.create = create;
})(WorkspaceSymbol$1 || (WorkspaceSymbol$1 = {}));
var DocumentSymbol$1;
(function (DocumentSymbol) {
    function create(name, detail, kind, range, selectionRange, children) {
        let result = {
            name,
            detail,
            kind,
            range,
            selectionRange
        };
        if (children !== undefined) {
            result.children = children;
        }
        return result;
    }
    DocumentSymbol.create = create;
    function is(value) {
        let candidate = value;
        return candidate &&
            Is$1.string(candidate.name) && Is$1.number(candidate.kind) &&
            Range$1.is(candidate.range) && Range$1.is(candidate.selectionRange) &&
            (candidate.detail === undefined || Is$1.string(candidate.detail)) &&
            (candidate.deprecated === undefined || Is$1.boolean(candidate.deprecated)) &&
            (candidate.children === undefined || Array.isArray(candidate.children)) &&
            (candidate.tags === undefined || Array.isArray(candidate.tags));
    }
    DocumentSymbol.is = is;
})(DocumentSymbol$1 || (DocumentSymbol$1 = {}));
var CodeActionKind$1;
(function (CodeActionKind) {
    CodeActionKind.Empty = '';
    CodeActionKind.QuickFix = 'quickfix';
    CodeActionKind.Refactor = 'refactor';
    CodeActionKind.RefactorExtract = 'refactor.extract';
    CodeActionKind.RefactorInline = 'refactor.inline';
    CodeActionKind.RefactorRewrite = 'refactor.rewrite';
    CodeActionKind.Source = 'source';
    CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
    CodeActionKind.SourceFixAll = 'source.fixAll';
})(CodeActionKind$1 || (CodeActionKind$1 = {}));
var CodeActionTriggerKind$1;
(function (CodeActionTriggerKind) {
    CodeActionTriggerKind.Invoked = 1;
    CodeActionTriggerKind.Automatic = 2;
})(CodeActionTriggerKind$1 || (CodeActionTriggerKind$1 = {}));
var CodeActionContext$1;
(function (CodeActionContext) {
    function create(diagnostics, only, triggerKind) {
        let result = { diagnostics };
        if (only !== undefined && only !== null) {
            result.only = only;
        }
        if (triggerKind !== undefined && triggerKind !== null) {
            result.triggerKind = triggerKind;
        }
        return result;
    }
    CodeActionContext.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.defined(candidate) && Is$1.typedArray(candidate.diagnostics, Diagnostic$1.is)
            && (candidate.only === undefined || Is$1.typedArray(candidate.only, Is$1.string))
            && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind$1.Invoked || candidate.triggerKind === CodeActionTriggerKind$1.Automatic);
    }
    CodeActionContext.is = is;
})(CodeActionContext$1 || (CodeActionContext$1 = {}));
var CodeAction$1;
(function (CodeAction) {
    function create(title, kindOrCommandOrEdit, kind) {
        let result = { title };
        let checkKind = true;
        if (typeof kindOrCommandOrEdit === 'string') {
            checkKind = false;
            result.kind = kindOrCommandOrEdit;
        }
        else if (Command$1.is(kindOrCommandOrEdit)) {
            result.command = kindOrCommandOrEdit;
        }
        else {
            result.edit = kindOrCommandOrEdit;
        }
        if (checkKind && kind !== undefined) {
            result.kind = kind;
        }
        return result;
    }
    CodeAction.create = create;
    function is(value) {
        let candidate = value;
        return candidate && Is$1.string(candidate.title) &&
            (candidate.diagnostics === undefined || Is$1.typedArray(candidate.diagnostics, Diagnostic$1.is)) &&
            (candidate.kind === undefined || Is$1.string(candidate.kind)) &&
            (candidate.edit !== undefined || candidate.command !== undefined) &&
            (candidate.command === undefined || Command$1.is(candidate.command)) &&
            (candidate.isPreferred === undefined || Is$1.boolean(candidate.isPreferred)) &&
            (candidate.edit === undefined || WorkspaceEdit$1.is(candidate.edit));
    }
    CodeAction.is = is;
})(CodeAction$1 || (CodeAction$1 = {}));
var CodeLens$1;
(function (CodeLens) {
    function create(range, data) {
        let result = { range };
        if (Is$1.defined(data)) {
            result.data = data;
        }
        return result;
    }
    CodeLens.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.defined(candidate) && Range$1.is(candidate.range) && (Is$1.undefined(candidate.command) || Command$1.is(candidate.command));
    }
    CodeLens.is = is;
})(CodeLens$1 || (CodeLens$1 = {}));
var FormattingOptions$1;
(function (FormattingOptions) {
    function create(tabSize, insertSpaces) {
        return { tabSize, insertSpaces };
    }
    FormattingOptions.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.defined(candidate) && Is$1.uinteger(candidate.tabSize) && Is$1.boolean(candidate.insertSpaces);
    }
    FormattingOptions.is = is;
})(FormattingOptions$1 || (FormattingOptions$1 = {}));
var DocumentLink$1;
(function (DocumentLink) {
    function create(range, target, data) {
        return { range, target, data };
    }
    DocumentLink.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.defined(candidate) && Range$1.is(candidate.range) && (Is$1.undefined(candidate.target) || Is$1.string(candidate.target));
    }
    DocumentLink.is = is;
})(DocumentLink$1 || (DocumentLink$1 = {}));
var SelectionRange$1;
(function (SelectionRange) {
    function create(range, parent) {
        return { range, parent };
    }
    SelectionRange.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.objectLiteral(candidate) && Range$1.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
    }
    SelectionRange.is = is;
})(SelectionRange$1 || (SelectionRange$1 = {}));
var SemanticTokenTypes$1;
(function (SemanticTokenTypes) {
    SemanticTokenTypes["namespace"] = "namespace";
    SemanticTokenTypes["type"] = "type";
    SemanticTokenTypes["class"] = "class";
    SemanticTokenTypes["enum"] = "enum";
    SemanticTokenTypes["interface"] = "interface";
    SemanticTokenTypes["struct"] = "struct";
    SemanticTokenTypes["typeParameter"] = "typeParameter";
    SemanticTokenTypes["parameter"] = "parameter";
    SemanticTokenTypes["variable"] = "variable";
    SemanticTokenTypes["property"] = "property";
    SemanticTokenTypes["enumMember"] = "enumMember";
    SemanticTokenTypes["event"] = "event";
    SemanticTokenTypes["function"] = "function";
    SemanticTokenTypes["method"] = "method";
    SemanticTokenTypes["macro"] = "macro";
    SemanticTokenTypes["keyword"] = "keyword";
    SemanticTokenTypes["modifier"] = "modifier";
    SemanticTokenTypes["comment"] = "comment";
    SemanticTokenTypes["string"] = "string";
    SemanticTokenTypes["number"] = "number";
    SemanticTokenTypes["regexp"] = "regexp";
    SemanticTokenTypes["operator"] = "operator";
    SemanticTokenTypes["decorator"] = "decorator";
})(SemanticTokenTypes$1 || (SemanticTokenTypes$1 = {}));
var SemanticTokenModifiers$1;
(function (SemanticTokenModifiers) {
    SemanticTokenModifiers["declaration"] = "declaration";
    SemanticTokenModifiers["definition"] = "definition";
    SemanticTokenModifiers["readonly"] = "readonly";
    SemanticTokenModifiers["static"] = "static";
    SemanticTokenModifiers["deprecated"] = "deprecated";
    SemanticTokenModifiers["abstract"] = "abstract";
    SemanticTokenModifiers["async"] = "async";
    SemanticTokenModifiers["modification"] = "modification";
    SemanticTokenModifiers["documentation"] = "documentation";
    SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
})(SemanticTokenModifiers$1 || (SemanticTokenModifiers$1 = {}));
var SemanticTokens$1;
(function (SemanticTokens) {
    function is(value) {
        const candidate = value;
        return Is$1.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
            Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
    }
    SemanticTokens.is = is;
})(SemanticTokens$1 || (SemanticTokens$1 = {}));
var InlineValueText$1;
(function (InlineValueText) {
    function create(range, text) {
        return { range, text };
    }
    InlineValueText.create = create;
    function is(value) {
        const candidate = value;
        return candidate !== undefined && candidate !== null && Range$1.is(candidate.range) && Is$1.string(candidate.text);
    }
    InlineValueText.is = is;
})(InlineValueText$1 || (InlineValueText$1 = {}));
var InlineValueVariableLookup$1;
(function (InlineValueVariableLookup) {
    function create(range, variableName, caseSensitiveLookup) {
        return { range, variableName, caseSensitiveLookup };
    }
    InlineValueVariableLookup.create = create;
    function is(value) {
        const candidate = value;
        return candidate !== undefined && candidate !== null && Range$1.is(candidate.range) && Is$1.boolean(candidate.caseSensitiveLookup)
            && (Is$1.string(candidate.variableName) || candidate.variableName === undefined);
    }
    InlineValueVariableLookup.is = is;
})(InlineValueVariableLookup$1 || (InlineValueVariableLookup$1 = {}));
var InlineValueEvaluatableExpression$1;
(function (InlineValueEvaluatableExpression) {
    function create(range, expression) {
        return { range, expression };
    }
    InlineValueEvaluatableExpression.create = create;
    function is(value) {
        const candidate = value;
        return candidate !== undefined && candidate !== null && Range$1.is(candidate.range)
            && (Is$1.string(candidate.expression) || candidate.expression === undefined);
    }
    InlineValueEvaluatableExpression.is = is;
})(InlineValueEvaluatableExpression$1 || (InlineValueEvaluatableExpression$1 = {}));
var InlineValueContext$1;
(function (InlineValueContext) {
    function create(frameId, stoppedLocation) {
        return { frameId, stoppedLocation };
    }
    InlineValueContext.create = create;
    function is(value) {
        const candidate = value;
        return Is$1.defined(candidate) && Range$1.is(value.stoppedLocation);
    }
    InlineValueContext.is = is;
})(InlineValueContext$1 || (InlineValueContext$1 = {}));
var InlayHintKind$1;
(function (InlayHintKind) {
    InlayHintKind.Type = 1;
    InlayHintKind.Parameter = 2;
    function is(value) {
        return value === 1 || value === 2;
    }
    InlayHintKind.is = is;
})(InlayHintKind$1 || (InlayHintKind$1 = {}));
var InlayHintLabelPart$1;
(function (InlayHintLabelPart) {
    function create(value) {
        return { value };
    }
    InlayHintLabelPart.create = create;
    function is(value) {
        const candidate = value;
        return Is$1.objectLiteral(candidate)
            && (candidate.tooltip === undefined || Is$1.string(candidate.tooltip) || MarkupContent$1.is(candidate.tooltip))
            && (candidate.location === undefined || Location$1.is(candidate.location))
            && (candidate.command === undefined || Command$1.is(candidate.command));
    }
    InlayHintLabelPart.is = is;
})(InlayHintLabelPart$1 || (InlayHintLabelPart$1 = {}));
var InlayHint$1;
(function (InlayHint) {
    function create(position, label, kind) {
        const result = { position, label };
        if (kind !== undefined) {
            result.kind = kind;
        }
        return result;
    }
    InlayHint.create = create;
    function is(value) {
        const candidate = value;
        return Is$1.objectLiteral(candidate) && Position$1.is(candidate.position)
            && (Is$1.string(candidate.label) || Is$1.typedArray(candidate.label, InlayHintLabelPart$1.is))
            && (candidate.kind === undefined || InlayHintKind$1.is(candidate.kind))
            && (candidate.textEdits === undefined) || Is$1.typedArray(candidate.textEdits, TextEdit$1.is)
            && (candidate.tooltip === undefined || Is$1.string(candidate.tooltip) || MarkupContent$1.is(candidate.tooltip))
            && (candidate.paddingLeft === undefined || Is$1.boolean(candidate.paddingLeft))
            && (candidate.paddingRight === undefined || Is$1.boolean(candidate.paddingRight));
    }
    InlayHint.is = is;
})(InlayHint$1 || (InlayHint$1 = {}));
var StringValue;
(function (StringValue) {
    function createSnippet(value) {
        return { kind: 'snippet', value };
    }
    StringValue.createSnippet = createSnippet;
})(StringValue || (StringValue = {}));
var InlineCompletionItem;
(function (InlineCompletionItem) {
    function create(insertText, filterText, range, command) {
        return { insertText, filterText, range, command };
    }
    InlineCompletionItem.create = create;
})(InlineCompletionItem || (InlineCompletionItem = {}));
var InlineCompletionList;
(function (InlineCompletionList) {
    function create(items) {
        return { items };
    }
    InlineCompletionList.create = create;
})(InlineCompletionList || (InlineCompletionList = {}));
var InlineCompletionTriggerKind;
(function (InlineCompletionTriggerKind) {
    InlineCompletionTriggerKind.Invoked = 0;
    InlineCompletionTriggerKind.Automatic = 1;
})(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {}));
var SelectedCompletionInfo;
(function (SelectedCompletionInfo) {
    function create(range, text) {
        return { range, text };
    }
    SelectedCompletionInfo.create = create;
})(SelectedCompletionInfo || (SelectedCompletionInfo = {}));
var InlineCompletionContext;
(function (InlineCompletionContext) {
    function create(triggerKind, selectedCompletionInfo) {
        return { triggerKind, selectedCompletionInfo };
    }
    InlineCompletionContext.create = create;
})(InlineCompletionContext || (InlineCompletionContext = {}));
var WorkspaceFolder$1;
(function (WorkspaceFolder) {
    function is(value) {
        const candidate = value;
        return Is$1.objectLiteral(candidate) && URI$3.is(candidate.uri) && Is$1.string(candidate.name);
    }
    WorkspaceFolder.is = is;
})(WorkspaceFolder$1 || (WorkspaceFolder$1 = {}));
var TextDocument$2;
(function (TextDocument) {
    function create(uri, languageId, version, content) {
        return new FullTextDocument$2(uri, languageId, version, content);
    }
    TextDocument.create = create;
    function is(value) {
        let candidate = value;
        return Is$1.defined(candidate) && Is$1.string(candidate.uri) && (Is$1.undefined(candidate.languageId) || Is$1.string(candidate.languageId)) && Is$1.uinteger(candidate.lineCount)
            && Is$1.func(candidate.getText) && Is$1.func(candidate.positionAt) && Is$1.func(candidate.offsetAt) ? true : false;
    }
    TextDocument.is = is;
    function applyEdits(document, edits) {
        let text = document.getText();
        let sortedEdits = mergeSort(edits, (a, b) => {
            let diff = a.range.start.line - b.range.start.line;
            if (diff === 0) {
                return a.range.start.character - b.range.start.character;
            }
            return diff;
        });
        let lastModifiedOffset = text.length;
        for (let i = sortedEdits.length - 1; i >= 0; i--) {
            let e = sortedEdits[i];
            let startOffset = document.offsetAt(e.range.start);
            let endOffset = document.offsetAt(e.range.end);
            if (endOffset <= lastModifiedOffset) {
                text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
            }
            else {
                throw new Error('Overlapping edit');
            }
            lastModifiedOffset = startOffset;
        }
        return text;
    }
    TextDocument.applyEdits = applyEdits;
    function mergeSort(data, compare) {
        if (data.length <= 1) {
            return data;
        }
        const p = (data.length / 2) | 0;
        const left = data.slice(0, p);
        const right = data.slice(p);
        mergeSort(left, compare);
        mergeSort(right, compare);
        let leftIdx = 0;
        let rightIdx = 0;
        let i = 0;
        while (leftIdx < left.length && rightIdx < right.length) {
            let ret = compare(left[leftIdx], right[rightIdx]);
            if (ret <= 0) {
                data[i++] = left[leftIdx++];
            }
            else {
                data[i++] = right[rightIdx++];
            }
        }
        while (leftIdx < left.length) {
            data[i++] = left[leftIdx++];
        }
        while (rightIdx < right.length) {
            data[i++] = right[rightIdx++];
        }
        return data;
    }
})(TextDocument$2 || (TextDocument$2 = {}));
let FullTextDocument$2 = class FullTextDocument {
    constructor(uri, languageId, version, content) {
        this._uri = uri;
        this._languageId = languageId;
        this._version = version;
        this._content = content;
        this._lineOffsets = undefined;
    }
    get uri() {
        return this._uri;
    }
    get languageId() {
        return this._languageId;
    }
    get version() {
        return this._version;
    }
    getText(range) {
        if (range) {
            let start = this.offsetAt(range.start);
            let end = this.offsetAt(range.end);
            return this._content.substring(start, end);
        }
        return this._content;
    }
    update(event, version) {
        this._content = event.text;
        this._version = version;
        this._lineOffsets = undefined;
    }
    getLineOffsets() {
        if (this._lineOffsets === undefined) {
            let lineOffsets = [];
            let text = this._content;
            let isLineStart = true;
            for (let i = 0; i < text.length; i++) {
                if (isLineStart) {
                    lineOffsets.push(i);
                    isLineStart = false;
                }
                let ch = text.charAt(i);
                isLineStart = (ch === '\r' || ch === '\n');
                if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
                    i++;
                }
            }
            if (isLineStart && text.length > 0) {
                lineOffsets.push(text.length);
            }
            this._lineOffsets = lineOffsets;
        }
        return this._lineOffsets;
    }
    positionAt(offset) {
        offset = Math.max(Math.min(offset, this._content.length), 0);
        let lineOffsets = this.getLineOffsets();
        let low = 0, high = lineOffsets.length;
        if (high === 0) {
            return Position$1.create(0, offset);
        }
        while (low < high) {
            let mid = Math.floor((low + high) / 2);
            if (lineOffsets[mid] > offset) {
                high = mid;
            }
            else {
                low = mid + 1;
            }
        }
        let line = low - 1;
        return Position$1.create(line, offset - lineOffsets[line]);
    }
    offsetAt(position) {
        let lineOffsets = this.getLineOffsets();
        if (position.line >= lineOffsets.length) {
            return this._content.length;
        }
        else if (position.line < 0) {
            return 0;
        }
        let lineOffset = lineOffsets[position.line];
        let nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
        return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
    }
    get lineCount() {
        return this.getLineOffsets().length;
    }
};
var Is$1;
(function (Is) {
    const toString = Object.prototype.toString;
    function defined(value) {
        return typeof value !== 'undefined';
    }
    Is.defined = defined;
    function undefined$1(value) {
        return typeof value === 'undefined';
    }
    Is.undefined = undefined$1;
    function boolean(value) {
        return value === true || value === false;
    }
    Is.boolean = boolean;
    function string(value) {
        return toString.call(value) === '[object String]';
    }
    Is.string = string;
    function number(value) {
        return toString.call(value) === '[object Number]';
    }
    Is.number = number;
    function numberRange(value, min, max) {
        return toString.call(value) === '[object Number]' && min <= value && value <= max;
    }
    Is.numberRange = numberRange;
    function integer(value) {
        return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;
    }
    Is.integer = integer;
    function uinteger(value) {
        return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;
    }
    Is.uinteger = uinteger;
    function func(value) {
        return toString.call(value) === '[object Function]';
    }
    Is.func = func;
    function objectLiteral(value) {
        return value !== null && typeof value === 'object';
    }
    Is.objectLiteral = objectLiteral;
    function typedArray(value, check) {
        return Array.isArray(value) && value.every(check);
    }
    Is.typedArray = typedArray;
})(Is$1 || (Is$1 = {}));

let FullTextDocument$1 = class FullTextDocument {
    constructor(uri, languageId, version, content) {
        this._uri = uri;
        this._languageId = languageId;
        this._version = version;
        this._content = content;
        this._lineOffsets = undefined;
    }
    get uri() {
        return this._uri;
    }
    get languageId() {
        return this._languageId;
    }
    get version() {
        return this._version;
    }
    getText(range) {
        if (range) {
            const start = this.offsetAt(range.start);
            const end = this.offsetAt(range.end);
            return this._content.substring(start, end);
        }
        return this._content;
    }
    update(changes, version) {
        for (const change of changes) {
            if (FullTextDocument$1.isIncremental(change)) {
                const range = getWellformedRange(change.range);
                const startOffset = this.offsetAt(range.start);
                const endOffset = this.offsetAt(range.end);
                this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);
                const startLine = Math.max(range.start.line, 0);
                const endLine = Math.max(range.end.line, 0);
                let lineOffsets = this._lineOffsets;
                const addedLineOffsets = computeLineOffsets(change.text, false, startOffset);
                if (endLine - startLine === addedLineOffsets.length) {
                    for (let i = 0, len = addedLineOffsets.length; i < len; i++) {
                        lineOffsets[i + startLine + 1] = addedLineOffsets[i];
                    }
                }
                else {
                    if (addedLineOffsets.length < 10000) {
                        lineOffsets.splice(startLine + 1, endLine - startLine, ...addedLineOffsets);
                    }
                    else {
                        this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));
                    }
                }
                const diff = change.text.length - (endOffset - startOffset);
                if (diff !== 0) {
                    for (let i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {
                        lineOffsets[i] = lineOffsets[i] + diff;
                    }
                }
            }
            else if (FullTextDocument$1.isFull(change)) {
                this._content = change.text;
                this._lineOffsets = undefined;
            }
            else {
                throw new Error('Unknown change event received');
            }
        }
        this._version = version;
    }
    getLineOffsets() {
        if (this._lineOffsets === undefined) {
            this._lineOffsets = computeLineOffsets(this._content, true);
        }
        return this._lineOffsets;
    }
    positionAt(offset) {
        offset = Math.max(Math.min(offset, this._content.length), 0);
        const lineOffsets = this.getLineOffsets();
        let low = 0, high = lineOffsets.length;
        if (high === 0) {
            return { line: 0, character: offset };
        }
        while (low < high) {
            const mid = Math.floor((low + high) / 2);
            if (lineOffsets[mid] > offset) {
                high = mid;
            }
            else {
                low = mid + 1;
            }
        }
        const line = low - 1;
        offset = this.ensureBeforeEOL(offset, lineOffsets[line]);
        return { line, character: offset - lineOffsets[line] };
    }
    offsetAt(position) {
        const lineOffsets = this.getLineOffsets();
        if (position.line >= lineOffsets.length) {
            return this._content.length;
        }
        else if (position.line < 0) {
            return 0;
        }
        const lineOffset = lineOffsets[position.line];
        if (position.character <= 0) {
            return lineOffset;
        }
        const nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
        const offset = Math.min(lineOffset + position.character, nextLineOffset);
        return this.ensureBeforeEOL(offset, lineOffset);
    }
    ensureBeforeEOL(offset, lineOffset) {
        while (offset > lineOffset && isEOL$2(this._content.charCodeAt(offset - 1))) {
            offset--;
        }
        return offset;
    }
    get lineCount() {
        return this.getLineOffsets().length;
    }
    static isIncremental(event) {
        const candidate = event;
        return candidate !== undefined && candidate !== null &&
            typeof candidate.text === 'string' && candidate.range !== undefined &&
            (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
    }
    static isFull(event) {
        const candidate = event;
        return candidate !== undefined && candidate !== null &&
            typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
    }
};
var TextDocument$1;
(function (TextDocument) {
    function create(uri, languageId, version, content) {
        return new FullTextDocument$1(uri, languageId, version, content);
    }
    TextDocument.create = create;
    function update(document, changes, version) {
        if (document instanceof FullTextDocument$1) {
            document.update(changes, version);
            return document;
        }
        else {
            throw new Error('TextDocument.update: document must be created by TextDocument.create');
        }
    }
    TextDocument.update = update;
    function applyEdits(document, edits) {
        const text = document.getText();
        const sortedEdits = mergeSort(edits.map(getWellformedEdit), (a, b) => {
            const diff = a.range.start.line - b.range.start.line;
            if (diff === 0) {
                return a.range.start.character - b.range.start.character;
            }
            return diff;
        });
        let lastModifiedOffset = 0;
        const spans = [];
        for (const e of sortedEdits) {
            const startOffset = document.offsetAt(e.range.start);
            if (startOffset < lastModifiedOffset) {
                throw new Error('Overlapping edit');
            }
            else if (startOffset > lastModifiedOffset) {
                spans.push(text.substring(lastModifiedOffset, startOffset));
            }
            if (e.newText.length) {
                spans.push(e.newText);
            }
            lastModifiedOffset = document.offsetAt(e.range.end);
        }
        spans.push(text.substr(lastModifiedOffset));
        return spans.join('');
    }
    TextDocument.applyEdits = applyEdits;
})(TextDocument$1 || (TextDocument$1 = {}));
function mergeSort(data, compare) {
    if (data.length <= 1) {
        return data;
    }
    const p = (data.length / 2) | 0;
    const left = data.slice(0, p);
    const right = data.slice(p);
    mergeSort(left, compare);
    mergeSort(right, compare);
    let leftIdx = 0;
    let rightIdx = 0;
    let i = 0;
    while (leftIdx < left.length && rightIdx < right.length) {
        const ret = compare(left[leftIdx], right[rightIdx]);
        if (ret <= 0) {
            data[i++] = left[leftIdx++];
        }
        else {
            data[i++] = right[rightIdx++];
        }
    }
    while (leftIdx < left.length) {
        data[i++] = left[leftIdx++];
    }
    while (rightIdx < right.length) {
        data[i++] = right[rightIdx++];
    }
    return data;
}
function computeLineOffsets(text, isAtLineStart, textOffset = 0) {
    const result = isAtLineStart ? [textOffset] : [];
    for (let i = 0; i < text.length; i++) {
        const ch = text.charCodeAt(i);
        if (isEOL$2(ch)) {
            if (ch === 13  && i + 1 < text.length && text.charCodeAt(i + 1) === 10 ) {
                i++;
            }
            result.push(textOffset + i + 1);
        }
    }
    return result;
}
function isEOL$2(char) {
    return char === 13  || char === 10 ;
}
function getWellformedRange(range) {
    const start = range.start;
    const end = range.end;
    if (start.line > end.line || (start.line === end.line && start.character > end.character)) {
        return { start: end, end: start };
    }
    return range;
}
function getWellformedEdit(textEdit) {
    const range = getWellformedRange(textEdit.range);
    if (range !== textEdit.range) {
        return { newText: textEdit.newText, range };
    }
    return textEdit;
}

var TokenType$1;
(function (TokenType) {
    TokenType[TokenType["StartCommentTag"] = 0] = "StartCommentTag";
    TokenType[TokenType["Comment"] = 1] = "Comment";
    TokenType[TokenType["EndCommentTag"] = 2] = "EndCommentTag";
    TokenType[TokenType["StartTagOpen"] = 3] = "StartTagOpen";
    TokenType[TokenType["StartTagClose"] = 4] = "StartTagClose";
    TokenType[TokenType["StartTagSelfClose"] = 5] = "StartTagSelfClose";
    TokenType[TokenType["StartTag"] = 6] = "StartTag";
    TokenType[TokenType["EndTagOpen"] = 7] = "EndTagOpen";
    TokenType[TokenType["EndTagClose"] = 8] = "EndTagClose";
    TokenType[TokenType["EndTag"] = 9] = "EndTag";
    TokenType[TokenType["DelimiterAssign"] = 10] = "DelimiterAssign";
    TokenType[TokenType["AttributeName"] = 11] = "AttributeName";
    TokenType[TokenType["AttributeValue"] = 12] = "AttributeValue";
    TokenType[TokenType["StartDoctypeTag"] = 13] = "StartDoctypeTag";
    TokenType[TokenType["Doctype"] = 14] = "Doctype";
    TokenType[TokenType["EndDoctypeTag"] = 15] = "EndDoctypeTag";
    TokenType[TokenType["Content"] = 16] = "Content";
    TokenType[TokenType["Whitespace"] = 17] = "Whitespace";
    TokenType[TokenType["Unknown"] = 18] = "Unknown";
    TokenType[TokenType["Script"] = 19] = "Script";
    TokenType[TokenType["Styles"] = 20] = "Styles";
    TokenType[TokenType["EOS"] = 21] = "EOS";
})(TokenType$1 || (TokenType$1 = {}));
var ScannerState;
(function (ScannerState) {
    ScannerState[ScannerState["WithinContent"] = 0] = "WithinContent";
    ScannerState[ScannerState["AfterOpeningStartTag"] = 1] = "AfterOpeningStartTag";
    ScannerState[ScannerState["AfterOpeningEndTag"] = 2] = "AfterOpeningEndTag";
    ScannerState[ScannerState["WithinDoctype"] = 3] = "WithinDoctype";
    ScannerState[ScannerState["WithinTag"] = 4] = "WithinTag";
    ScannerState[ScannerState["WithinEndTag"] = 5] = "WithinEndTag";
    ScannerState[ScannerState["WithinComment"] = 6] = "WithinComment";
    ScannerState[ScannerState["WithinScriptContent"] = 7] = "WithinScriptContent";
    ScannerState[ScannerState["WithinStyleContent"] = 8] = "WithinStyleContent";
    ScannerState[ScannerState["AfterAttributeName"] = 9] = "AfterAttributeName";
    ScannerState[ScannerState["BeforeAttributeValue"] = 10] = "BeforeAttributeValue";
})(ScannerState || (ScannerState = {}));
var ClientCapabilities$1;
(function (ClientCapabilities) {
    ClientCapabilities.LATEST = {
        textDocument: {
            completion: {
                completionItem: {
                    documentationFormat: [MarkupKind$1.Markdown, MarkupKind$1.PlainText]
                }
            },
            hover: {
                contentFormat: [MarkupKind$1.Markdown, MarkupKind$1.PlainText]
            }
        }
    };
})(ClientCapabilities$1 || (ClientCapabilities$1 = {}));
var FileType$2;
(function (FileType) {
    FileType[FileType["Unknown"] = 0] = "Unknown";
    FileType[FileType["File"] = 1] = "File";
    FileType[FileType["Directory"] = 2] = "Directory";
    FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
})(FileType$2 || (FileType$2 = {}));

let MultiLineStream$1 = class MultiLineStream {
    constructor(source, position) {
        this.source = source;
        this.len = source.length;
        this.position = position;
    }
    eos() {
        return this.len <= this.position;
    }
    getSource() {
        return this.source;
    }
    pos() {
        return this.position;
    }
    goBackTo(pos) {
        this.position = pos;
    }
    goBack(n) {
        this.position -= n;
    }
    advance(n) {
        this.position += n;
    }
    goToEnd() {
        this.position = this.source.length;
    }
    nextChar() {
        return this.source.charCodeAt(this.position++) || 0;
    }
    peekChar(n = 0) {
        return this.source.charCodeAt(this.position + n) || 0;
    }
    advanceIfChar(ch) {
        if (ch === this.source.charCodeAt(this.position)) {
            this.position++;
            return true;
        }
        return false;
    }
    advanceIfChars(ch) {
        let i;
        if (this.position + ch.length > this.source.length) {
            return false;
        }
        for (i = 0; i < ch.length; i++) {
            if (this.source.charCodeAt(this.position + i) !== ch[i]) {
                return false;
            }
        }
        this.advance(i);
        return true;
    }
    advanceIfRegExp(regex) {
        const str = this.source.substr(this.position);
        const match = str.match(regex);
        if (match) {
            this.position = this.position + match.index + match[0].length;
            return match[0];
        }
        return '';
    }
    advanceUntilRegExp(regex) {
        const str = this.source.substr(this.position);
        const match = str.match(regex);
        if (match) {
            this.position = this.position + match.index;
            return match[0];
        }
        else {
            this.goToEnd();
        }
        return '';
    }
    advanceUntilChar(ch) {
        while (this.position < this.source.length) {
            if (this.source.charCodeAt(this.position) === ch) {
                return true;
            }
            this.advance(1);
        }
        return false;
    }
    advanceUntilChars(ch) {
        while (this.position + ch.length <= this.source.length) {
            let i = 0;
            for (; i < ch.length && this.source.charCodeAt(this.position + i) === ch[i]; i++) {
            }
            if (i === ch.length) {
                return true;
            }
            this.advance(1);
        }
        this.goToEnd();
        return false;
    }
    skipWhitespace() {
        const n = this.advanceWhileChar(ch => {
            return ch === _WSP$1 || ch === _TAB$1 || ch === _NWL$3 || ch === _LFD$3 || ch === _CAR$3;
        });
        return n > 0;
    }
    advanceWhileChar(condition) {
        const posNow = this.position;
        while (this.position < this.len && condition(this.source.charCodeAt(this.position))) {
            this.position++;
        }
        return this.position - posNow;
    }
};
const _BNG$2 = '!'.charCodeAt(0);
const _MIN$1 = '-'.charCodeAt(0);
const _LAN$2 = '<'.charCodeAt(0);
const _RAN$2 = '>'.charCodeAt(0);
const _FSL$3 = '/'.charCodeAt(0);
const _EQS$2 = '='.charCodeAt(0);
const _DQO$1 = '"'.charCodeAt(0);
const _SQO$1 = '\''.charCodeAt(0);
const _NWL$3 = '\n'.charCodeAt(0);
const _CAR$3 = '\r'.charCodeAt(0);
const _LFD$3 = '\f'.charCodeAt(0);
const _WSP$1 = ' '.charCodeAt(0);
const _TAB$1 = '\t'.charCodeAt(0);
const htmlScriptContents = {
    'text/x-handlebars-template': true,
    'text/html': true,
};
function createScanner$1(input, initialOffset = 0, initialState = ScannerState.WithinContent, emitPseudoCloseTags = false) {
    const stream = new MultiLineStream$1(input, initialOffset);
    let state = initialState;
    let tokenOffset = 0;
    let tokenType = TokenType$1.Unknown;
    let tokenError;
    let hasSpaceAfterTag;
    let lastTag;
    let lastAttributeName;
    let lastTypeValue;
    function nextElementName() {
        return stream.advanceIfRegExp(/^[_:\w][_:\w-.\d]*/).toLowerCase();
    }
    function nextAttributeName() {
        return stream.advanceIfRegExp(/^[^\s"'></=\x00-\x0F\x7F\x80-\x9F]*/).toLowerCase();
    }
    function finishToken(offset, type, errorMessage) {
        tokenType = type;
        tokenOffset = offset;
        tokenError = errorMessage;
        return type;
    }
    function scan() {
        const offset = stream.pos();
        const oldState = state;
        const token = internalScan();
        if (token !== TokenType$1.EOS && offset === stream.pos() && !(emitPseudoCloseTags && (token === TokenType$1.StartTagClose || token === TokenType$1.EndTagClose))) {
            console.warn('Scanner.scan has not advanced at offset ' + offset + ', state before: ' + oldState + ' after: ' + state);
            stream.advance(1);
            return finishToken(offset, TokenType$1.Unknown);
        }
        return token;
    }
    function internalScan() {
        const offset = stream.pos();
        if (stream.eos()) {
            return finishToken(offset, TokenType$1.EOS);
        }
        let errorMessage;
        switch (state) {
            case ScannerState.WithinComment:
                if (stream.advanceIfChars([_MIN$1, _MIN$1, _RAN$2])) {
                    state = ScannerState.WithinContent;
                    return finishToken(offset, TokenType$1.EndCommentTag);
                }
                stream.advanceUntilChars([_MIN$1, _MIN$1, _RAN$2]);
                return finishToken(offset, TokenType$1.Comment);
            case ScannerState.WithinDoctype:
                if (stream.advanceIfChar(_RAN$2)) {
                    state = ScannerState.WithinContent;
                    return finishToken(offset, TokenType$1.EndDoctypeTag);
                }
                stream.advanceUntilChar(_RAN$2);
                return finishToken(offset, TokenType$1.Doctype);
            case ScannerState.WithinContent:
                if (stream.advanceIfChar(_LAN$2)) {
                    if (!stream.eos() && stream.peekChar() === _BNG$2) {
                        if (stream.advanceIfChars([_BNG$2, _MIN$1, _MIN$1])) {
                            state = ScannerState.WithinComment;
                            return finishToken(offset, TokenType$1.StartCommentTag);
                        }
                        if (stream.advanceIfRegExp(/^!doctype/i)) {
                            state = ScannerState.WithinDoctype;
                            return finishToken(offset, TokenType$1.StartDoctypeTag);
                        }
                    }
                    if (stream.advanceIfChar(_FSL$3)) {
                        state = ScannerState.AfterOpeningEndTag;
                        return finishToken(offset, TokenType$1.EndTagOpen);
                    }
                    state = ScannerState.AfterOpeningStartTag;
                    return finishToken(offset, TokenType$1.StartTagOpen);
                }
                stream.advanceUntilChar(_LAN$2);
                return finishToken(offset, TokenType$1.Content);
            case ScannerState.AfterOpeningEndTag:
                const tagName = nextElementName();
                if (tagName.length > 0) {
                    state = ScannerState.WithinEndTag;
                    return finishToken(offset, TokenType$1.EndTag);
                }
                if (stream.skipWhitespace()) {
                    return finishToken(offset, TokenType$1.Whitespace, main$4.t('Tag name must directly follow the open bracket.'));
                }
                state = ScannerState.WithinEndTag;
                stream.advanceUntilChar(_RAN$2);
                if (offset < stream.pos()) {
                    return finishToken(offset, TokenType$1.Unknown, main$4.t('End tag name expected.'));
                }
                return internalScan();
            case ScannerState.WithinEndTag:
                if (stream.skipWhitespace()) {
                    return finishToken(offset, TokenType$1.Whitespace);
                }
                if (stream.advanceIfChar(_RAN$2)) {
                    state = ScannerState.WithinContent;
                    return finishToken(offset, TokenType$1.EndTagClose);
                }
                if (emitPseudoCloseTags && stream.peekChar() === _LAN$2) {
                    state = ScannerState.WithinContent;
                    return finishToken(offset, TokenType$1.EndTagClose, main$4.t('Closing bracket missing.'));
                }
                errorMessage = main$4.t('Closing bracket expected.');
                break;
            case ScannerState.AfterOpeningStartTag:
                lastTag = nextElementName();
                lastTypeValue = void 0;
                lastAttributeName = void 0;
                if (lastTag.length > 0) {
                    hasSpaceAfterTag = false;
                    state = ScannerState.WithinTag;
                    return finishToken(offset, TokenType$1.StartTag);
                }
                if (stream.skipWhitespace()) {
                    return finishToken(offset, TokenType$1.Whitespace, main$4.t('Tag name must directly follow the open bracket.'));
                }
                state = ScannerState.WithinTag;
                stream.advanceUntilChar(_RAN$2);
                if (offset < stream.pos()) {
                    return finishToken(offset, TokenType$1.Unknown, main$4.t('Start tag name expected.'));
                }
                return internalScan();
            case ScannerState.WithinTag:
                if (stream.skipWhitespace()) {
                    hasSpaceAfterTag = true;
                    return finishToken(offset, TokenType$1.Whitespace);
                }
                if (hasSpaceAfterTag) {
                    lastAttributeName = nextAttributeName();
                    if (lastAttributeName.length > 0) {
                        state = ScannerState.AfterAttributeName;
                        hasSpaceAfterTag = false;
                        return finishToken(offset, TokenType$1.AttributeName);
                    }
                }
                if (stream.advanceIfChars([_FSL$3, _RAN$2])) {
                    state = ScannerState.WithinContent;
                    return finishToken(offset, TokenType$1.StartTagSelfClose);
                }
                if (stream.advanceIfChar(_RAN$2)) {
                    if (lastTag === 'script') {
                        if (lastTypeValue && htmlScriptContents[lastTypeValue]) {
                            state = ScannerState.WithinContent;
                        }
                        else {
                            state = ScannerState.WithinScriptContent;
                        }
                    }
                    else if (lastTag === 'style') {
                        state = ScannerState.WithinStyleContent;
                    }
                    else {
                        state = ScannerState.WithinContent;
                    }
                    return finishToken(offset, TokenType$1.StartTagClose);
                }
                if (emitPseudoCloseTags && stream.peekChar() === _LAN$2) {
                    state = ScannerState.WithinContent;
                    return finishToken(offset, TokenType$1.StartTagClose, main$4.t('Closing bracket missing.'));
                }
                stream.advance(1);
                return finishToken(offset, TokenType$1.Unknown, main$4.t('Unexpected character in tag.'));
            case ScannerState.AfterAttributeName:
                if (stream.skipWhitespace()) {
                    hasSpaceAfterTag = true;
                    return finishToken(offset, TokenType$1.Whitespace);
                }
                if (stream.advanceIfChar(_EQS$2)) {
                    state = ScannerState.BeforeAttributeValue;
                    return finishToken(offset, TokenType$1.DelimiterAssign);
                }
                state = ScannerState.WithinTag;
                return internalScan();
            case ScannerState.BeforeAttributeValue:
                if (stream.skipWhitespace()) {
                    return finishToken(offset, TokenType$1.Whitespace);
                }
                let attributeValue = stream.advanceIfRegExp(/^[^\s"'`=<>]+/);
                if (attributeValue.length > 0) {
                    if (stream.peekChar() === _RAN$2 && stream.peekChar(-1) === _FSL$3) {
                        stream.goBack(1);
                        attributeValue = attributeValue.substring(0, attributeValue.length - 1);
                    }
                    if (lastAttributeName === 'type') {
                        lastTypeValue = attributeValue;
                    }
                    if (attributeValue.length > 0) {
                        state = ScannerState.WithinTag;
                        hasSpaceAfterTag = false;
                        return finishToken(offset, TokenType$1.AttributeValue);
                    }
                }
                const ch = stream.peekChar();
                if (ch === _SQO$1 || ch === _DQO$1) {
                    stream.advance(1);
                    if (stream.advanceUntilChar(ch)) {
                        stream.advance(1);
                    }
                    if (lastAttributeName === 'type') {
                        lastTypeValue = stream.getSource().substring(offset + 1, stream.pos() - 1);
                    }
                    state = ScannerState.WithinTag;
                    hasSpaceAfterTag = false;
                    return finishToken(offset, TokenType$1.AttributeValue);
                }
                state = ScannerState.WithinTag;
                hasSpaceAfterTag = false;
                return internalScan();
            case ScannerState.WithinScriptContent:
                let sciptState = 1;
                while (!stream.eos()) {
                    const match = stream.advanceIfRegExp(/<!--|-->|<\/?script\s*\/?>?/i);
                    if (match.length === 0) {
                        stream.goToEnd();
                        return finishToken(offset, TokenType$1.Script);
                    }
                    else if (match === '<!--') {
                        if (sciptState === 1) {
                            sciptState = 2;
                        }
                    }
                    else if (match === '-->') {
                        sciptState = 1;
                    }
                    else if (match[1] !== '/') {
                        if (sciptState === 2) {
                            sciptState = 3;
                        }
                    }
                    else {
                        if (sciptState === 3) {
                            sciptState = 2;
                        }
                        else {
                            stream.goBack(match.length);
                            break;
                        }
                    }
                }
                state = ScannerState.WithinContent;
                if (offset < stream.pos()) {
                    return finishToken(offset, TokenType$1.Script);
                }
                return internalScan();
            case ScannerState.WithinStyleContent:
                stream.advanceUntilRegExp(/<\/style/i);
                state = ScannerState.WithinContent;
                if (offset < stream.pos()) {
                    return finishToken(offset, TokenType$1.Styles);
                }
                return internalScan();
        }
        stream.advance(1);
        state = ScannerState.WithinContent;
        return finishToken(offset, TokenType$1.Unknown, errorMessage);
    }
    return {
        scan,
        getTokenType: () => tokenType,
        getTokenOffset: () => tokenOffset,
        getTokenLength: () => stream.pos() - tokenOffset,
        getTokenEnd: () => stream.pos(),
        getTokenText: () => stream.getSource().substring(tokenOffset, stream.pos()),
        getScannerState: () => state,
        getTokenError: () => tokenError
    };
}

function findFirst$1(array, p) {
    let low = 0, high = array.length;
    if (high === 0) {
        return 0;
    }
    while (low < high) {
        let mid = Math.floor((low + high) / 2);
        if (p(array[mid])) {
            high = mid;
        }
        else {
            low = mid + 1;
        }
    }
    return low;
}
function binarySearch(array, key, comparator) {
    let low = 0, high = array.length - 1;
    while (low <= high) {
        const mid = ((low + high) / 2) | 0;
        const comp = comparator(array[mid], key);
        if (comp < 0) {
            low = mid + 1;
        }
        else if (comp > 0) {
            high = mid - 1;
        }
        else {
            return mid;
        }
    }
    return -(low + 1);
}

let Node$1 = class Node {
    get attributeNames() { return this.attributes ? Object.keys(this.attributes) : []; }
    constructor(start, end, children, parent) {
        this.start = start;
        this.end = end;
        this.children = children;
        this.parent = parent;
        this.closed = false;
    }
    isSameTag(tagInLowerCase) {
        if (this.tag === undefined) {
            return tagInLowerCase === undefined;
        }
        else {
            return tagInLowerCase !== undefined && this.tag.length === tagInLowerCase.length && this.tag.toLowerCase() === tagInLowerCase;
        }
    }
    get firstChild() { return this.children[0]; }
    get lastChild() { return this.children.length ? this.children[this.children.length - 1] : void 0; }
    findNodeBefore(offset) {
        const idx = findFirst$1(this.children, c => offset <= c.start) - 1;
        if (idx >= 0) {
            const child = this.children[idx];
            if (offset > child.start) {
                if (offset < child.end) {
                    return child.findNodeBefore(offset);
                }
                const lastChild = child.lastChild;
                if (lastChild && lastChild.end === child.end) {
                    return child.findNodeBefore(offset);
                }
                return child;
            }
        }
        return this;
    }
    findNodeAt(offset) {
        const idx = findFirst$1(this.children, c => offset <= c.start) - 1;
        if (idx >= 0) {
            const child = this.children[idx];
            if (offset > child.start && offset <= child.end) {
                return child.findNodeAt(offset);
            }
        }
        return this;
    }
};
class HTMLParser {
    constructor(dataManager) {
        this.dataManager = dataManager;
    }
    parseDocument(document) {
        return this.parse(document.getText(), this.dataManager.getVoidElements(document.languageId));
    }
    parse(text, voidElements) {
        const scanner = createScanner$1(text, undefined, undefined, true);
        const htmlDocument = new Node$1(0, text.length, [], void 0);
        let curr = htmlDocument;
        let endTagStart = -1;
        let endTagName = undefined;
        let pendingAttribute = null;
        let token = scanner.scan();
        while (token !== TokenType$1.EOS) {
            switch (token) {
                case TokenType$1.StartTagOpen:
                    const child = new Node$1(scanner.getTokenOffset(), text.length, [], curr);
                    curr.children.push(child);
                    curr = child;
                    break;
                case TokenType$1.StartTag:
                    curr.tag = scanner.getTokenText();
                    break;
                case TokenType$1.StartTagClose:
                    if (curr.parent) {
                        curr.end = scanner.getTokenEnd();
                        if (scanner.getTokenLength()) {
                            curr.startTagEnd = scanner.getTokenEnd();
                            if (curr.tag && this.dataManager.isVoidElement(curr.tag, voidElements)) {
                                curr.closed = true;
                                curr = curr.parent;
                            }
                        }
                        else {
                            curr = curr.parent;
                        }
                    }
                    break;
                case TokenType$1.StartTagSelfClose:
                    if (curr.parent) {
                        curr.closed = true;
                        curr.end = scanner.getTokenEnd();
                        curr.startTagEnd = scanner.getTokenEnd();
                        curr = curr.parent;
                    }
                    break;
                case TokenType$1.EndTagOpen:
                    endTagStart = scanner.getTokenOffset();
                    endTagName = undefined;
                    break;
                case TokenType$1.EndTag:
                    endTagName = scanner.getTokenText().toLowerCase();
                    break;
                case TokenType$1.EndTagClose:
                    let node = curr;
                    while (!node.isSameTag(endTagName) && node.parent) {
                        node = node.parent;
                    }
                    if (node.parent) {
                        while (curr !== node) {
                            curr.end = endTagStart;
                            curr.closed = false;
                            curr = curr.parent;
                        }
                        curr.closed = true;
                        curr.endTagStart = endTagStart;
                        curr.end = scanner.getTokenEnd();
                        curr = curr.parent;
                    }
                    break;
                case TokenType$1.AttributeName: {
                    pendingAttribute = scanner.getTokenText();
                    let attributes = curr.attributes;
                    if (!attributes) {
                        curr.attributes = attributes = {};
                    }
                    attributes[pendingAttribute] = null;
                    break;
                }
                case TokenType$1.AttributeValue: {
                    const value = scanner.getTokenText();
                    const attributes = curr.attributes;
                    if (attributes && pendingAttribute) {
                        attributes[pendingAttribute] = value;
                        pendingAttribute = null;
                    }
                    break;
                }
            }
            token = scanner.scan();
        }
        while (curr.parent) {
            curr.end = text.length;
            curr.closed = false;
            curr = curr.parent;
        }
        return {
            roots: htmlDocument.children,
            findNodeBefore: htmlDocument.findNodeBefore.bind(htmlDocument),
            findNodeAt: htmlDocument.findNodeAt.bind(htmlDocument)
        };
    }
}

const entities = {
    "Aacute;": "\u00C1",
    "Aacute": "\u00C1",
    "aacute;": "\u00E1",
    "aacute": "\u00E1",
    "Abreve;": "\u0102",
    "abreve;": "\u0103",
    "ac;": "\u223E",
    "acd;": "\u223F",
    "acE;": "\u223E\u0333",
    "Acirc;": "\u00C2",
    "Acirc": "\u00C2",
    "acirc;": "\u00E2",
    "acirc": "\u00E2",
    "acute;": "\u00B4",
    "acute": "\u00B4",
    "Acy;": "\u0410",
    "acy;": "\u0430",
    "AElig;": "\u00C6",
    "AElig": "\u00C6",
    "aelig;": "\u00E6",
    "aelig": "\u00E6",
    "af;": "\u2061",
    "Afr;": "\uD835\uDD04",
    "afr;": "\uD835\uDD1E",
    "Agrave;": "\u00C0",
    "Agrave": "\u00C0",
    "agrave;": "\u00E0",
    "agrave": "\u00E0",
    "alefsym;": "\u2135",
    "aleph;": "\u2135",
    "Alpha;": "\u0391",
    "alpha;": "\u03B1",
    "Amacr;": "\u0100",
    "amacr;": "\u0101",
    "amalg;": "\u2A3F",
    "AMP;": "\u0026",
    "AMP": "\u0026",
    "amp;": "\u0026",
    "amp": "\u0026",
    "And;": "\u2A53",
    "and;": "\u2227",
    "andand;": "\u2A55",
    "andd;": "\u2A5C",
    "andslope;": "\u2A58",
    "andv;": "\u2A5A",
    "ang;": "\u2220",
    "ange;": "\u29A4",
    "angle;": "\u2220",
    "angmsd;": "\u2221",
    "angmsdaa;": "\u29A8",
    "angmsdab;": "\u29A9",
    "angmsdac;": "\u29AA",
    "angmsdad;": "\u29AB",
    "angmsdae;": "\u29AC",
    "angmsdaf;": "\u29AD",
    "angmsdag;": "\u29AE",
    "angmsdah;": "\u29AF",
    "angrt;": "\u221F",
    "angrtvb;": "\u22BE",
    "angrtvbd;": "\u299D",
    "angsph;": "\u2222",
    "angst;": "\u00C5",
    "angzarr;": "\u237C",
    "Aogon;": "\u0104",
    "aogon;": "\u0105",
    "Aopf;": "\uD835\uDD38",
    "aopf;": "\uD835\uDD52",
    "ap;": "\u2248",
    "apacir;": "\u2A6F",
    "apE;": "\u2A70",
    "ape;": "\u224A",
    "apid;": "\u224B",
    "apos;": "\u0027",
    "ApplyFunction;": "\u2061",
    "approx;": "\u2248",
    "approxeq;": "\u224A",
    "Aring;": "\u00C5",
    "Aring": "\u00C5",
    "aring;": "\u00E5",
    "aring": "\u00E5",
    "Ascr;": "\uD835\uDC9C",
    "ascr;": "\uD835\uDCB6",
    "Assign;": "\u2254",
    "ast;": "\u002A",
    "asymp;": "\u2248",
    "asympeq;": "\u224D",
    "Atilde;": "\u00C3",
    "Atilde": "\u00C3",
    "atilde;": "\u00E3",
    "atilde": "\u00E3",
    "Auml;": "\u00C4",
    "Auml": "\u00C4",
    "auml;": "\u00E4",
    "auml": "\u00E4",
    "awconint;": "\u2233",
    "awint;": "\u2A11",
    "backcong;": "\u224C",
    "backepsilon;": "\u03F6",
    "backprime;": "\u2035",
    "backsim;": "\u223D",
    "backsimeq;": "\u22CD",
    "Backslash;": "\u2216",
    "Barv;": "\u2AE7",
    "barvee;": "\u22BD",
    "Barwed;": "\u2306",
    "barwed;": "\u2305",
    "barwedge;": "\u2305",
    "bbrk;": "\u23B5",
    "bbrktbrk;": "\u23B6",
    "bcong;": "\u224C",
    "Bcy;": "\u0411",
    "bcy;": "\u0431",
    "bdquo;": "\u201E",
    "becaus;": "\u2235",
    "Because;": "\u2235",
    "because;": "\u2235",
    "bemptyv;": "\u29B0",
    "bepsi;": "\u03F6",
    "bernou;": "\u212C",
    "Bernoullis;": "\u212C",
    "Beta;": "\u0392",
    "beta;": "\u03B2",
    "beth;": "\u2136",
    "between;": "\u226C",
    "Bfr;": "\uD835\uDD05",
    "bfr;": "\uD835\uDD1F",
    "bigcap;": "\u22C2",
    "bigcirc;": "\u25EF",
    "bigcup;": "\u22C3",
    "bigodot;": "\u2A00",
    "bigoplus;": "\u2A01",
    "bigotimes;": "\u2A02",
    "bigsqcup;": "\u2A06",
    "bigstar;": "\u2605",
    "bigtriangledown;": "\u25BD",
    "bigtriangleup;": "\u25B3",
    "biguplus;": "\u2A04",
    "bigvee;": "\u22C1",
    "bigwedge;": "\u22C0",
    "bkarow;": "\u290D",
    "blacklozenge;": "\u29EB",
    "blacksquare;": "\u25AA",
    "blacktriangle;": "\u25B4",
    "blacktriangledown;": "\u25BE",
    "blacktriangleleft;": "\u25C2",
    "blacktriangleright;": "\u25B8",
    "blank;": "\u2423",
    "blk12;": "\u2592",
    "blk14;": "\u2591",
    "blk34;": "\u2593",
    "block;": "\u2588",
    "bne;": "\u003D\u20E5",
    "bnequiv;": "\u2261\u20E5",
    "bNot;": "\u2AED",
    "bnot;": "\u2310",
    "Bopf;": "\uD835\uDD39",
    "bopf;": "\uD835\uDD53",
    "bot;": "\u22A5",
    "bottom;": "\u22A5",
    "bowtie;": "\u22C8",
    "boxbox;": "\u29C9",
    "boxDL;": "\u2557",
    "boxDl;": "\u2556",
    "boxdL;": "\u2555",
    "boxdl;": "\u2510",
    "boxDR;": "\u2554",
    "boxDr;": "\u2553",
    "boxdR;": "\u2552",
    "boxdr;": "\u250C",
    "boxH;": "\u2550",
    "boxh;": "\u2500",
    "boxHD;": "\u2566",
    "boxHd;": "\u2564",
    "boxhD;": "\u2565",
    "boxhd;": "\u252C",
    "boxHU;": "\u2569",
    "boxHu;": "\u2567",
    "boxhU;": "\u2568",
    "boxhu;": "\u2534",
    "boxminus;": "\u229F",
    "boxplus;": "\u229E",
    "boxtimes;": "\u22A0",
    "boxUL;": "\u255D",
    "boxUl;": "\u255C",
    "boxuL;": "\u255B",
    "boxul;": "\u2518",
    "boxUR;": "\u255A",
    "boxUr;": "\u2559",
    "boxuR;": "\u2558",
    "boxur;": "\u2514",
    "boxV;": "\u2551",
    "boxv;": "\u2502",
    "boxVH;": "\u256C",
    "boxVh;": "\u256B",
    "boxvH;": "\u256A",
    "boxvh;": "\u253C",
    "boxVL;": "\u2563",
    "boxVl;": "\u2562",
    "boxvL;": "\u2561",
    "boxvl;": "\u2524",
    "boxVR;": "\u2560",
    "boxVr;": "\u255F",
    "boxvR;": "\u255E",
    "boxvr;": "\u251C",
    "bprime;": "\u2035",
    "Breve;": "\u02D8",
    "breve;": "\u02D8",
    "brvbar;": "\u00A6",
    "brvbar": "\u00A6",
    "Bscr;": "\u212C",
    "bscr;": "\uD835\uDCB7",
    "bsemi;": "\u204F",
    "bsim;": "\u223D",
    "bsime;": "\u22CD",
    "bsol;": "\u005C",
    "bsolb;": "\u29C5",
    "bsolhsub;": "\u27C8",
    "bull;": "\u2022",
    "bullet;": "\u2022",
    "bump;": "\u224E",
    "bumpE;": "\u2AAE",
    "bumpe;": "\u224F",
    "Bumpeq;": "\u224E",
    "bumpeq;": "\u224F",
    "Cacute;": "\u0106",
    "cacute;": "\u0107",
    "Cap;": "\u22D2",
    "cap;": "\u2229",
    "capand;": "\u2A44",
    "capbrcup;": "\u2A49",
    "capcap;": "\u2A4B",
    "capcup;": "\u2A47",
    "capdot;": "\u2A40",
    "CapitalDifferentialD;": "\u2145",
    "caps;": "\u2229\uFE00",
    "caret;": "\u2041",
    "caron;": "\u02C7",
    "Cayleys;": "\u212D",
    "ccaps;": "\u2A4D",
    "Ccaron;": "\u010C",
    "ccaron;": "\u010D",
    "Ccedil;": "\u00C7",
    "Ccedil": "\u00C7",
    "ccedil;": "\u00E7",
    "ccedil": "\u00E7",
    "Ccirc;": "\u0108",
    "ccirc;": "\u0109",
    "Cconint;": "\u2230",
    "ccups;": "\u2A4C",
    "ccupssm;": "\u2A50",
    "Cdot;": "\u010A",
    "cdot;": "\u010B",
    "cedil;": "\u00B8",
    "cedil": "\u00B8",
    "Cedilla;": "\u00B8",
    "cemptyv;": "\u29B2",
    "cent;": "\u00A2",
    "cent": "\u00A2",
    "CenterDot;": "\u00B7",
    "centerdot;": "\u00B7",
    "Cfr;": "\u212D",
    "cfr;": "\uD835\uDD20",
    "CHcy;": "\u0427",
    "chcy;": "\u0447",
    "check;": "\u2713",
    "checkmark;": "\u2713",
    "Chi;": "\u03A7",
    "chi;": "\u03C7",
    "cir;": "\u25CB",
    "circ;": "\u02C6",
    "circeq;": "\u2257",
    "circlearrowleft;": "\u21BA",
    "circlearrowright;": "\u21BB",
    "circledast;": "\u229B",
    "circledcirc;": "\u229A",
    "circleddash;": "\u229D",
    "CircleDot;": "\u2299",
    "circledR;": "\u00AE",
    "circledS;": "\u24C8",
    "CircleMinus;": "\u2296",
    "CirclePlus;": "\u2295",
    "CircleTimes;": "\u2297",
    "cirE;": "\u29C3",
    "cire;": "\u2257",
    "cirfnint;": "\u2A10",
    "cirmid;": "\u2AEF",
    "cirscir;": "\u29C2",
    "ClockwiseContourIntegral;": "\u2232",
    "CloseCurlyDoubleQuote;": "\u201D",
    "CloseCurlyQuote;": "\u2019",
    "clubs;": "\u2663",
    "clubsuit;": "\u2663",
    "Colon;": "\u2237",
    "colon;": "\u003A",
    "Colone;": "\u2A74",
    "colone;": "\u2254",
    "coloneq;": "\u2254",
    "comma;": "\u002C",
    "commat;": "\u0040",
    "comp;": "\u2201",
    "compfn;": "\u2218",
    "complement;": "\u2201",
    "complexes;": "\u2102",
    "cong;": "\u2245",
    "congdot;": "\u2A6D",
    "Congruent;": "\u2261",
    "Conint;": "\u222F",
    "conint;": "\u222E",
    "ContourIntegral;": "\u222E",
    "Copf;": "\u2102",
    "copf;": "\uD835\uDD54",
    "coprod;": "\u2210",
    "Coproduct;": "\u2210",
    "COPY;": "\u00A9",
    "COPY": "\u00A9",
    "copy;": "\u00A9",
    "copy": "\u00A9",
    "copysr;": "\u2117",
    "CounterClockwiseContourIntegral;": "\u2233",
    "crarr;": "\u21B5",
    "Cross;": "\u2A2F",
    "cross;": "\u2717",
    "Cscr;": "\uD835\uDC9E",
    "cscr;": "\uD835\uDCB8",
    "csub;": "\u2ACF",
    "csube;": "\u2AD1",
    "csup;": "\u2AD0",
    "csupe;": "\u2AD2",
    "ctdot;": "\u22EF",
    "cudarrl;": "\u2938",
    "cudarrr;": "\u2935",
    "cuepr;": "\u22DE",
    "cuesc;": "\u22DF",
    "cularr;": "\u21B6",
    "cularrp;": "\u293D",
    "Cup;": "\u22D3",
    "cup;": "\u222A",
    "cupbrcap;": "\u2A48",
    "CupCap;": "\u224D",
    "cupcap;": "\u2A46",
    "cupcup;": "\u2A4A",
    "cupdot;": "\u228D",
    "cupor;": "\u2A45",
    "cups;": "\u222A\uFE00",
    "curarr;": "\u21B7",
    "curarrm;": "\u293C",
    "curlyeqprec;": "\u22DE",
    "curlyeqsucc;": "\u22DF",
    "curlyvee;": "\u22CE",
    "curlywedge;": "\u22CF",
    "curren;": "\u00A4",
    "curren": "\u00A4",
    "curvearrowleft;": "\u21B6",
    "curvearrowright;": "\u21B7",
    "cuvee;": "\u22CE",
    "cuwed;": "\u22CF",
    "cwconint;": "\u2232",
    "cwint;": "\u2231",
    "cylcty;": "\u232D",
    "Dagger;": "\u2021",
    "dagger;": "\u2020",
    "daleth;": "\u2138",
    "Darr;": "\u21A1",
    "dArr;": "\u21D3",
    "darr;": "\u2193",
    "dash;": "\u2010",
    "Dashv;": "\u2AE4",
    "dashv;": "\u22A3",
    "dbkarow;": "\u290F",
    "dblac;": "\u02DD",
    "Dcaron;": "\u010E",
    "dcaron;": "\u010F",
    "Dcy;": "\u0414",
    "dcy;": "\u0434",
    "DD;": "\u2145",
    "dd;": "\u2146",
    "ddagger;": "\u2021",
    "ddarr;": "\u21CA",
    "DDotrahd;": "\u2911",
    "ddotseq;": "\u2A77",
    "deg;": "\u00B0",
    "deg": "\u00B0",
    "Del;": "\u2207",
    "Delta;": "\u0394",
    "delta;": "\u03B4",
    "demptyv;": "\u29B1",
    "dfisht;": "\u297F",
    "Dfr;": "\uD835\uDD07",
    "dfr;": "\uD835\uDD21",
    "dHar;": "\u2965",
    "dharl;": "\u21C3",
    "dharr;": "\u21C2",
    "DiacriticalAcute;": "\u00B4",
    "DiacriticalDot;": "\u02D9",
    "DiacriticalDoubleAcute;": "\u02DD",
    "DiacriticalGrave;": "\u0060",
    "DiacriticalTilde;": "\u02DC",
    "diam;": "\u22C4",
    "Diamond;": "\u22C4",
    "diamond;": "\u22C4",
    "diamondsuit;": "\u2666",
    "diams;": "\u2666",
    "die;": "\u00A8",
    "DifferentialD;": "\u2146",
    "digamma;": "\u03DD",
    "disin;": "\u22F2",
    "div;": "\u00F7",
    "divide;": "\u00F7",
    "divide": "\u00F7",
    "divideontimes;": "\u22C7",
    "divonx;": "\u22C7",
    "DJcy;": "\u0402",
    "djcy;": "\u0452",
    "dlcorn;": "\u231E",
    "dlcrop;": "\u230D",
    "dollar;": "\u0024",
    "Dopf;": "\uD835\uDD3B",
    "dopf;": "\uD835\uDD55",
    "Dot;": "\u00A8",
    "dot;": "\u02D9",
    "DotDot;": "\u20DC",
    "doteq;": "\u2250",
    "doteqdot;": "\u2251",
    "DotEqual;": "\u2250",
    "dotminus;": "\u2238",
    "dotplus;": "\u2214",
    "dotsquare;": "\u22A1",
    "doublebarwedge;": "\u2306",
    "DoubleContourIntegral;": "\u222F",
    "DoubleDot;": "\u00A8",
    "DoubleDownArrow;": "\u21D3",
    "DoubleLeftArrow;": "\u21D0",
    "DoubleLeftRightArrow;": "\u21D4",
    "DoubleLeftTee;": "\u2AE4",
    "DoubleLongLeftArrow;": "\u27F8",
    "DoubleLongLeftRightArrow;": "\u27FA",
    "DoubleLongRightArrow;": "\u27F9",
    "DoubleRightArrow;": "\u21D2",
    "DoubleRightTee;": "\u22A8",
    "DoubleUpArrow;": "\u21D1",
    "DoubleUpDownArrow;": "\u21D5",
    "DoubleVerticalBar;": "\u2225",
    "DownArrow;": "\u2193",
    "Downarrow;": "\u21D3",
    "downarrow;": "\u2193",
    "DownArrowBar;": "\u2913",
    "DownArrowUpArrow;": "\u21F5",
    "DownBreve;": "\u0311",
    "downdownarrows;": "\u21CA",
    "downharpoonleft;": "\u21C3",
    "downharpoonright;": "\u21C2",
    "DownLeftRightVector;": "\u2950",
    "DownLeftTeeVector;": "\u295E",
    "DownLeftVector;": "\u21BD",
    "DownLeftVectorBar;": "\u2956",
    "DownRightTeeVector;": "\u295F",
    "DownRightVector;": "\u21C1",
    "DownRightVectorBar;": "\u2957",
    "DownTee;": "\u22A4",
    "DownTeeArrow;": "\u21A7",
    "drbkarow;": "\u2910",
    "drcorn;": "\u231F",
    "drcrop;": "\u230C",
    "Dscr;": "\uD835\uDC9F",
    "dscr;": "\uD835\uDCB9",
    "DScy;": "\u0405",
    "dscy;": "\u0455",
    "dsol;": "\u29F6",
    "Dstrok;": "\u0110",
    "dstrok;": "\u0111",
    "dtdot;": "\u22F1",
    "dtri;": "\u25BF",
    "dtrif;": "\u25BE",
    "duarr;": "\u21F5",
    "duhar;": "\u296F",
    "dwangle;": "\u29A6",
    "DZcy;": "\u040F",
    "dzcy;": "\u045F",
    "dzigrarr;": "\u27FF",
    "Eacute;": "\u00C9",
    "Eacute": "\u00C9",
    "eacute;": "\u00E9",
    "eacute": "\u00E9",
    "easter;": "\u2A6E",
    "Ecaron;": "\u011A",
    "ecaron;": "\u011B",
    "ecir;": "\u2256",
    "Ecirc;": "\u00CA",
    "Ecirc": "\u00CA",
    "ecirc;": "\u00EA",
    "ecirc": "\u00EA",
    "ecolon;": "\u2255",
    "Ecy;": "\u042D",
    "ecy;": "\u044D",
    "eDDot;": "\u2A77",
    "Edot;": "\u0116",
    "eDot;": "\u2251",
    "edot;": "\u0117",
    "ee;": "\u2147",
    "efDot;": "\u2252",
    "Efr;": "\uD835\uDD08",
    "efr;": "\uD835\uDD22",
    "eg;": "\u2A9A",
    "Egrave;": "\u00C8",
    "Egrave": "\u00C8",
    "egrave;": "\u00E8",
    "egrave": "\u00E8",
    "egs;": "\u2A96",
    "egsdot;": "\u2A98",
    "el;": "\u2A99",
    "Element;": "\u2208",
    "elinters;": "\u23E7",
    "ell;": "\u2113",
    "els;": "\u2A95",
    "elsdot;": "\u2A97",
    "Emacr;": "\u0112",
    "emacr;": "\u0113",
    "empty;": "\u2205",
    "emptyset;": "\u2205",
    "EmptySmallSquare;": "\u25FB",
    "emptyv;": "\u2205",
    "EmptyVerySmallSquare;": "\u25AB",
    "emsp;": "\u2003",
    "emsp13;": "\u2004",
    "emsp14;": "\u2005",
    "ENG;": "\u014A",
    "eng;": "\u014B",
    "ensp;": "\u2002",
    "Eogon;": "\u0118",
    "eogon;": "\u0119",
    "Eopf;": "\uD835\uDD3C",
    "eopf;": "\uD835\uDD56",
    "epar;": "\u22D5",
    "eparsl;": "\u29E3",
    "eplus;": "\u2A71",
    "epsi;": "\u03B5",
    "Epsilon;": "\u0395",
    "epsilon;": "\u03B5",
    "epsiv;": "\u03F5",
    "eqcirc;": "\u2256",
    "eqcolon;": "\u2255",
    "eqsim;": "\u2242",
    "eqslantgtr;": "\u2A96",
    "eqslantless;": "\u2A95",
    "Equal;": "\u2A75",
    "equals;": "\u003D",
    "EqualTilde;": "\u2242",
    "equest;": "\u225F",
    "Equilibrium;": "\u21CC",
    "equiv;": "\u2261",
    "equivDD;": "\u2A78",
    "eqvparsl;": "\u29E5",
    "erarr;": "\u2971",
    "erDot;": "\u2253",
    "Escr;": "\u2130",
    "escr;": "\u212F",
    "esdot;": "\u2250",
    "Esim;": "\u2A73",
    "esim;": "\u2242",
    "Eta;": "\u0397",
    "eta;": "\u03B7",
    "ETH;": "\u00D0",
    "ETH": "\u00D0",
    "eth;": "\u00F0",
    "eth": "\u00F0",
    "Euml;": "\u00CB",
    "Euml": "\u00CB",
    "euml;": "\u00EB",
    "euml": "\u00EB",
    "euro;": "\u20AC",
    "excl;": "\u0021",
    "exist;": "\u2203",
    "Exists;": "\u2203",
    "expectation;": "\u2130",
    "ExponentialE;": "\u2147",
    "exponentiale;": "\u2147",
    "fallingdotseq;": "\u2252",
    "Fcy;": "\u0424",
    "fcy;": "\u0444",
    "female;": "\u2640",
    "ffilig;": "\uFB03",
    "fflig;": "\uFB00",
    "ffllig;": "\uFB04",
    "Ffr;": "\uD835\uDD09",
    "ffr;": "\uD835\uDD23",
    "filig;": "\uFB01",
    "FilledSmallSquare;": "\u25FC",
    "FilledVerySmallSquare;": "\u25AA",
    "fjlig;": "\u0066\u006A",
    "flat;": "\u266D",
    "fllig;": "\uFB02",
    "fltns;": "\u25B1",
    "fnof;": "\u0192",
    "Fopf;": "\uD835\uDD3D",
    "fopf;": "\uD835\uDD57",
    "ForAll;": "\u2200",
    "forall;": "\u2200",
    "fork;": "\u22D4",
    "forkv;": "\u2AD9",
    "Fouriertrf;": "\u2131",
    "fpartint;": "\u2A0D",
    "frac12;": "\u00BD",
    "frac12": "\u00BD",
    "frac13;": "\u2153",
    "frac14;": "\u00BC",
    "frac14": "\u00BC",
    "frac15;": "\u2155",
    "frac16;": "\u2159",
    "frac18;": "\u215B",
    "frac23;": "\u2154",
    "frac25;": "\u2156",
    "frac34;": "\u00BE",
    "frac34": "\u00BE",
    "frac35;": "\u2157",
    "frac38;": "\u215C",
    "frac45;": "\u2158",
    "frac56;": "\u215A",
    "frac58;": "\u215D",
    "frac78;": "\u215E",
    "frasl;": "\u2044",
    "frown;": "\u2322",
    "Fscr;": "\u2131",
    "fscr;": "\uD835\uDCBB",
    "gacute;": "\u01F5",
    "Gamma;": "\u0393",
    "gamma;": "\u03B3",
    "Gammad;": "\u03DC",
    "gammad;": "\u03DD",
    "gap;": "\u2A86",
    "Gbreve;": "\u011E",
    "gbreve;": "\u011F",
    "Gcedil;": "\u0122",
    "Gcirc;": "\u011C",
    "gcirc;": "\u011D",
    "Gcy;": "\u0413",
    "gcy;": "\u0433",
    "Gdot;": "\u0120",
    "gdot;": "\u0121",
    "gE;": "\u2267",
    "ge;": "\u2265",
    "gEl;": "\u2A8C",
    "gel;": "\u22DB",
    "geq;": "\u2265",
    "geqq;": "\u2267",
    "geqslant;": "\u2A7E",
    "ges;": "\u2A7E",
    "gescc;": "\u2AA9",
    "gesdot;": "\u2A80",
    "gesdoto;": "\u2A82",
    "gesdotol;": "\u2A84",
    "gesl;": "\u22DB\uFE00",
    "gesles;": "\u2A94",
    "Gfr;": "\uD835\uDD0A",
    "gfr;": "\uD835\uDD24",
    "Gg;": "\u22D9",
    "gg;": "\u226B",
    "ggg;": "\u22D9",
    "gimel;": "\u2137",
    "GJcy;": "\u0403",
    "gjcy;": "\u0453",
    "gl;": "\u2277",
    "gla;": "\u2AA5",
    "glE;": "\u2A92",
    "glj;": "\u2AA4",
    "gnap;": "\u2A8A",
    "gnapprox;": "\u2A8A",
    "gnE;": "\u2269",
    "gne;": "\u2A88",
    "gneq;": "\u2A88",
    "gneqq;": "\u2269",
    "gnsim;": "\u22E7",
    "Gopf;": "\uD835\uDD3E",
    "gopf;": "\uD835\uDD58",
    "grave;": "\u0060",
    "GreaterEqual;": "\u2265",
    "GreaterEqualLess;": "\u22DB",
    "GreaterFullEqual;": "\u2267",
    "GreaterGreater;": "\u2AA2",
    "GreaterLess;": "\u2277",
    "GreaterSlantEqual;": "\u2A7E",
    "GreaterTilde;": "\u2273",
    "Gscr;": "\uD835\uDCA2",
    "gscr;": "\u210A",
    "gsim;": "\u2273",
    "gsime;": "\u2A8E",
    "gsiml;": "\u2A90",
    "GT;": "\u003E",
    "GT": "\u003E",
    "Gt;": "\u226B",
    "gt;": "\u003E",
    "gt": "\u003E",
    "gtcc;": "\u2AA7",
    "gtcir;": "\u2A7A",
    "gtdot;": "\u22D7",
    "gtlPar;": "\u2995",
    "gtquest;": "\u2A7C",
    "gtrapprox;": "\u2A86",
    "gtrarr;": "\u2978",
    "gtrdot;": "\u22D7",
    "gtreqless;": "\u22DB",
    "gtreqqless;": "\u2A8C",
    "gtrless;": "\u2277",
    "gtrsim;": "\u2273",
    "gvertneqq;": "\u2269\uFE00",
    "gvnE;": "\u2269\uFE00",
    "Hacek;": "\u02C7",
    "hairsp;": "\u200A",
    "half;": "\u00BD",
    "hamilt;": "\u210B",
    "HARDcy;": "\u042A",
    "hardcy;": "\u044A",
    "hArr;": "\u21D4",
    "harr;": "\u2194",
    "harrcir;": "\u2948",
    "harrw;": "\u21AD",
    "Hat;": "\u005E",
    "hbar;": "\u210F",
    "Hcirc;": "\u0124",
    "hcirc;": "\u0125",
    "hearts;": "\u2665",
    "heartsuit;": "\u2665",
    "hellip;": "\u2026",
    "hercon;": "\u22B9",
    "Hfr;": "\u210C",
    "hfr;": "\uD835\uDD25",
    "HilbertSpace;": "\u210B",
    "hksearow;": "\u2925",
    "hkswarow;": "\u2926",
    "hoarr;": "\u21FF",
    "homtht;": "\u223B",
    "hookleftarrow;": "\u21A9",
    "hookrightarrow;": "\u21AA",
    "Hopf;": "\u210D",
    "hopf;": "\uD835\uDD59",
    "horbar;": "\u2015",
    "HorizontalLine;": "\u2500",
    "Hscr;": "\u210B",
    "hscr;": "\uD835\uDCBD",
    "hslash;": "\u210F",
    "Hstrok;": "\u0126",
    "hstrok;": "\u0127",
    "HumpDownHump;": "\u224E",
    "HumpEqual;": "\u224F",
    "hybull;": "\u2043",
    "hyphen;": "\u2010",
    "Iacute;": "\u00CD",
    "Iacute": "\u00CD",
    "iacute;": "\u00ED",
    "iacute": "\u00ED",
    "ic;": "\u2063",
    "Icirc;": "\u00CE",
    "Icirc": "\u00CE",
    "icirc;": "\u00EE",
    "icirc": "\u00EE",
    "Icy;": "\u0418",
    "icy;": "\u0438",
    "Idot;": "\u0130",
    "IEcy;": "\u0415",
    "iecy;": "\u0435",
    "iexcl;": "\u00A1",
    "iexcl": "\u00A1",
    "iff;": "\u21D4",
    "Ifr;": "\u2111",
    "ifr;": "\uD835\uDD26",
    "Igrave;": "\u00CC",
    "Igrave": "\u00CC",
    "igrave;": "\u00EC",
    "igrave": "\u00EC",
    "ii;": "\u2148",
    "iiiint;": "\u2A0C",
    "iiint;": "\u222D",
    "iinfin;": "\u29DC",
    "iiota;": "\u2129",
    "IJlig;": "\u0132",
    "ijlig;": "\u0133",
    "Im;": "\u2111",
    "Imacr;": "\u012A",
    "imacr;": "\u012B",
    "image;": "\u2111",
    "ImaginaryI;": "\u2148",
    "imagline;": "\u2110",
    "imagpart;": "\u2111",
    "imath;": "\u0131",
    "imof;": "\u22B7",
    "imped;": "\u01B5",
    "Implies;": "\u21D2",
    "in;": "\u2208",
    "incare;": "\u2105",
    "infin;": "\u221E",
    "infintie;": "\u29DD",
    "inodot;": "\u0131",
    "Int;": "\u222C",
    "int;": "\u222B",
    "intcal;": "\u22BA",
    "integers;": "\u2124",
    "Integral;": "\u222B",
    "intercal;": "\u22BA",
    "Intersection;": "\u22C2",
    "intlarhk;": "\u2A17",
    "intprod;": "\u2A3C",
    "InvisibleComma;": "\u2063",
    "InvisibleTimes;": "\u2062",
    "IOcy;": "\u0401",
    "iocy;": "\u0451",
    "Iogon;": "\u012E",
    "iogon;": "\u012F",
    "Iopf;": "\uD835\uDD40",
    "iopf;": "\uD835\uDD5A",
    "Iota;": "\u0399",
    "iota;": "\u03B9",
    "iprod;": "\u2A3C",
    "iquest;": "\u00BF",
    "iquest": "\u00BF",
    "Iscr;": "\u2110",
    "iscr;": "\uD835\uDCBE",
    "isin;": "\u2208",
    "isindot;": "\u22F5",
    "isinE;": "\u22F9",
    "isins;": "\u22F4",
    "isinsv;": "\u22F3",
    "isinv;": "\u2208",
    "it;": "\u2062",
    "Itilde;": "\u0128",
    "itilde;": "\u0129",
    "Iukcy;": "\u0406",
    "iukcy;": "\u0456",
    "Iuml;": "\u00CF",
    "Iuml": "\u00CF",
    "iuml;": "\u00EF",
    "iuml": "\u00EF",
    "Jcirc;": "\u0134",
    "jcirc;": "\u0135",
    "Jcy;": "\u0419",
    "jcy;": "\u0439",
    "Jfr;": "\uD835\uDD0D",
    "jfr;": "\uD835\uDD27",
    "jmath;": "\u0237",
    "Jopf;": "\uD835\uDD41",
    "jopf;": "\uD835\uDD5B",
    "Jscr;": "\uD835\uDCA5",
    "jscr;": "\uD835\uDCBF",
    "Jsercy;": "\u0408",
    "jsercy;": "\u0458",
    "Jukcy;": "\u0404",
    "jukcy;": "\u0454",
    "Kappa;": "\u039A",
    "kappa;": "\u03BA",
    "kappav;": "\u03F0",
    "Kcedil;": "\u0136",
    "kcedil;": "\u0137",
    "Kcy;": "\u041A",
    "kcy;": "\u043A",
    "Kfr;": "\uD835\uDD0E",
    "kfr;": "\uD835\uDD28",
    "kgreen;": "\u0138",
    "KHcy;": "\u0425",
    "khcy;": "\u0445",
    "KJcy;": "\u040C",
    "kjcy;": "\u045C",
    "Kopf;": "\uD835\uDD42",
    "kopf;": "\uD835\uDD5C",
    "Kscr;": "\uD835\uDCA6",
    "kscr;": "\uD835\uDCC0",
    "lAarr;": "\u21DA",
    "Lacute;": "\u0139",
    "lacute;": "\u013A",
    "laemptyv;": "\u29B4",
    "lagran;": "\u2112",
    "Lambda;": "\u039B",
    "lambda;": "\u03BB",
    "Lang;": "\u27EA",
    "lang;": "\u27E8",
    "langd;": "\u2991",
    "langle;": "\u27E8",
    "lap;": "\u2A85",
    "Laplacetrf;": "\u2112",
    "laquo;": "\u00AB",
    "laquo": "\u00AB",
    "Larr;": "\u219E",
    "lArr;": "\u21D0",
    "larr;": "\u2190",
    "larrb;": "\u21E4",
    "larrbfs;": "\u291F",
    "larrfs;": "\u291D",
    "larrhk;": "\u21A9",
    "larrlp;": "\u21AB",
    "larrpl;": "\u2939",
    "larrsim;": "\u2973",
    "larrtl;": "\u21A2",
    "lat;": "\u2AAB",
    "lAtail;": "\u291B",
    "latail;": "\u2919",
    "late;": "\u2AAD",
    "lates;": "\u2AAD\uFE00",
    "lBarr;": "\u290E",
    "lbarr;": "\u290C",
    "lbbrk;": "\u2772",
    "lbrace;": "\u007B",
    "lbrack;": "\u005B",
    "lbrke;": "\u298B",
    "lbrksld;": "\u298F",
    "lbrkslu;": "\u298D",
    "Lcaron;": "\u013D",
    "lcaron;": "\u013E",
    "Lcedil;": "\u013B",
    "lcedil;": "\u013C",
    "lceil;": "\u2308",
    "lcub;": "\u007B",
    "Lcy;": "\u041B",
    "lcy;": "\u043B",
    "ldca;": "\u2936",
    "ldquo;": "\u201C",
    "ldquor;": "\u201E",
    "ldrdhar;": "\u2967",
    "ldrushar;": "\u294B",
    "ldsh;": "\u21B2",
    "lE;": "\u2266",
    "le;": "\u2264",
    "LeftAngleBracket;": "\u27E8",
    "LeftArrow;": "\u2190",
    "Leftarrow;": "\u21D0",
    "leftarrow;": "\u2190",
    "LeftArrowBar;": "\u21E4",
    "LeftArrowRightArrow;": "\u21C6",
    "leftarrowtail;": "\u21A2",
    "LeftCeiling;": "\u2308",
    "LeftDoubleBracket;": "\u27E6",
    "LeftDownTeeVector;": "\u2961",
    "LeftDownVector;": "\u21C3",
    "LeftDownVectorBar;": "\u2959",
    "LeftFloor;": "\u230A",
    "leftharpoondown;": "\u21BD",
    "leftharpoonup;": "\u21BC",
    "leftleftarrows;": "\u21C7",
    "LeftRightArrow;": "\u2194",
    "Leftrightarrow;": "\u21D4",
    "leftrightarrow;": "\u2194",
    "leftrightarrows;": "\u21C6",
    "leftrightharpoons;": "\u21CB",
    "leftrightsquigarrow;": "\u21AD",
    "LeftRightVector;": "\u294E",
    "LeftTee;": "\u22A3",
    "LeftTeeArrow;": "\u21A4",
    "LeftTeeVector;": "\u295A",
    "leftthreetimes;": "\u22CB",
    "LeftTriangle;": "\u22B2",
    "LeftTriangleBar;": "\u29CF",
    "LeftTriangleEqual;": "\u22B4",
    "LeftUpDownVector;": "\u2951",
    "LeftUpTeeVector;": "\u2960",
    "LeftUpVector;": "\u21BF",
    "LeftUpVectorBar;": "\u2958",
    "LeftVector;": "\u21BC",
    "LeftVectorBar;": "\u2952",
    "lEg;": "\u2A8B",
    "leg;": "\u22DA",
    "leq;": "\u2264",
    "leqq;": "\u2266",
    "leqslant;": "\u2A7D",
    "les;": "\u2A7D",
    "lescc;": "\u2AA8",
    "lesdot;": "\u2A7F",
    "lesdoto;": "\u2A81",
    "lesdotor;": "\u2A83",
    "lesg;": "\u22DA\uFE00",
    "lesges;": "\u2A93",
    "lessapprox;": "\u2A85",
    "lessdot;": "\u22D6",
    "lesseqgtr;": "\u22DA",
    "lesseqqgtr;": "\u2A8B",
    "LessEqualGreater;": "\u22DA",
    "LessFullEqual;": "\u2266",
    "LessGreater;": "\u2276",
    "lessgtr;": "\u2276",
    "LessLess;": "\u2AA1",
    "lesssim;": "\u2272",
    "LessSlantEqual;": "\u2A7D",
    "LessTilde;": "\u2272",
    "lfisht;": "\u297C",
    "lfloor;": "\u230A",
    "Lfr;": "\uD835\uDD0F",
    "lfr;": "\uD835\uDD29",
    "lg;": "\u2276",
    "lgE;": "\u2A91",
    "lHar;": "\u2962",
    "lhard;": "\u21BD",
    "lharu;": "\u21BC",
    "lharul;": "\u296A",
    "lhblk;": "\u2584",
    "LJcy;": "\u0409",
    "ljcy;": "\u0459",
    "Ll;": "\u22D8",
    "ll;": "\u226A",
    "llarr;": "\u21C7",
    "llcorner;": "\u231E",
    "Lleftarrow;": "\u21DA",
    "llhard;": "\u296B",
    "lltri;": "\u25FA",
    "Lmidot;": "\u013F",
    "lmidot;": "\u0140",
    "lmoust;": "\u23B0",
    "lmoustache;": "\u23B0",
    "lnap;": "\u2A89",
    "lnapprox;": "\u2A89",
    "lnE;": "\u2268",
    "lne;": "\u2A87",
    "lneq;": "\u2A87",
    "lneqq;": "\u2268",
    "lnsim;": "\u22E6",
    "loang;": "\u27EC",
    "loarr;": "\u21FD",
    "lobrk;": "\u27E6",
    "LongLeftArrow;": "\u27F5",
    "Longleftarrow;": "\u27F8",
    "longleftarrow;": "\u27F5",
    "LongLeftRightArrow;": "\u27F7",
    "Longleftrightarrow;": "\u27FA",
    "longleftrightarrow;": "\u27F7",
    "longmapsto;": "\u27FC",
    "LongRightArrow;": "\u27F6",
    "Longrightarrow;": "\u27F9",
    "longrightarrow;": "\u27F6",
    "looparrowleft;": "\u21AB",
    "looparrowright;": "\u21AC",
    "lopar;": "\u2985",
    "Lopf;": "\uD835\uDD43",
    "lopf;": "\uD835\uDD5D",
    "loplus;": "\u2A2D",
    "lotimes;": "\u2A34",
    "lowast;": "\u2217",
    "lowbar;": "\u005F",
    "LowerLeftArrow;": "\u2199",
    "LowerRightArrow;": "\u2198",
    "loz;": "\u25CA",
    "lozenge;": "\u25CA",
    "lozf;": "\u29EB",
    "lpar;": "\u0028",
    "lparlt;": "\u2993",
    "lrarr;": "\u21C6",
    "lrcorner;": "\u231F",
    "lrhar;": "\u21CB",
    "lrhard;": "\u296D",
    "lrm;": "\u200E",
    "lrtri;": "\u22BF",
    "lsaquo;": "\u2039",
    "Lscr;": "\u2112",
    "lscr;": "\uD835\uDCC1",
    "Lsh;": "\u21B0",
    "lsh;": "\u21B0",
    "lsim;": "\u2272",
    "lsime;": "\u2A8D",
    "lsimg;": "\u2A8F",
    "lsqb;": "\u005B",
    "lsquo;": "\u2018",
    "lsquor;": "\u201A",
    "Lstrok;": "\u0141",
    "lstrok;": "\u0142",
    "LT;": "\u003C",
    "LT": "\u003C",
    "Lt;": "\u226A",
    "lt;": "\u003C",
    "lt": "\u003C",
    "ltcc;": "\u2AA6",
    "ltcir;": "\u2A79",
    "ltdot;": "\u22D6",
    "lthree;": "\u22CB",
    "ltimes;": "\u22C9",
    "ltlarr;": "\u2976",
    "ltquest;": "\u2A7B",
    "ltri;": "\u25C3",
    "ltrie;": "\u22B4",
    "ltrif;": "\u25C2",
    "ltrPar;": "\u2996",
    "lurdshar;": "\u294A",
    "luruhar;": "\u2966",
    "lvertneqq;": "\u2268\uFE00",
    "lvnE;": "\u2268\uFE00",
    "macr;": "\u00AF",
    "macr": "\u00AF",
    "male;": "\u2642",
    "malt;": "\u2720",
    "maltese;": "\u2720",
    "Map;": "\u2905",
    "map;": "\u21A6",
    "mapsto;": "\u21A6",
    "mapstodown;": "\u21A7",
    "mapstoleft;": "\u21A4",
    "mapstoup;": "\u21A5",
    "marker;": "\u25AE",
    "mcomma;": "\u2A29",
    "Mcy;": "\u041C",
    "mcy;": "\u043C",
    "mdash;": "\u2014",
    "mDDot;": "\u223A",
    "measuredangle;": "\u2221",
    "MediumSpace;": "\u205F",
    "Mellintrf;": "\u2133",
    "Mfr;": "\uD835\uDD10",
    "mfr;": "\uD835\uDD2A",
    "mho;": "\u2127",
    "micro;": "\u00B5",
    "micro": "\u00B5",
    "mid;": "\u2223",
    "midast;": "\u002A",
    "midcir;": "\u2AF0",
    "middot;": "\u00B7",
    "middot": "\u00B7",
    "minus;": "\u2212",
    "minusb;": "\u229F",
    "minusd;": "\u2238",
    "minusdu;": "\u2A2A",
    "MinusPlus;": "\u2213",
    "mlcp;": "\u2ADB",
    "mldr;": "\u2026",
    "mnplus;": "\u2213",
    "models;": "\u22A7",
    "Mopf;": "\uD835\uDD44",
    "mopf;": "\uD835\uDD5E",
    "mp;": "\u2213",
    "Mscr;": "\u2133",
    "mscr;": "\uD835\uDCC2",
    "mstpos;": "\u223E",
    "Mu;": "\u039C",
    "mu;": "\u03BC",
    "multimap;": "\u22B8",
    "mumap;": "\u22B8",
    "nabla;": "\u2207",
    "Nacute;": "\u0143",
    "nacute;": "\u0144",
    "nang;": "\u2220\u20D2",
    "nap;": "\u2249",
    "napE;": "\u2A70\u0338",
    "napid;": "\u224B\u0338",
    "napos;": "\u0149",
    "napprox;": "\u2249",
    "natur;": "\u266E",
    "natural;": "\u266E",
    "naturals;": "\u2115",
    "nbsp;": "\u00A0",
    "nbsp": "\u00A0",
    "nbump;": "\u224E\u0338",
    "nbumpe;": "\u224F\u0338",
    "ncap;": "\u2A43",
    "Ncaron;": "\u0147",
    "ncaron;": "\u0148",
    "Ncedil;": "\u0145",
    "ncedil;": "\u0146",
    "ncong;": "\u2247",
    "ncongdot;": "\u2A6D\u0338",
    "ncup;": "\u2A42",
    "Ncy;": "\u041D",
    "ncy;": "\u043D",
    "ndash;": "\u2013",
    "ne;": "\u2260",
    "nearhk;": "\u2924",
    "neArr;": "\u21D7",
    "nearr;": "\u2197",
    "nearrow;": "\u2197",
    "nedot;": "\u2250\u0338",
    "NegativeMediumSpace;": "\u200B",
    "NegativeThickSpace;": "\u200B",
    "NegativeThinSpace;": "\u200B",
    "NegativeVeryThinSpace;": "\u200B",
    "nequiv;": "\u2262",
    "nesear;": "\u2928",
    "nesim;": "\u2242\u0338",
    "NestedGreaterGreater;": "\u226B",
    "NestedLessLess;": "\u226A",
    "NewLine;": "\u000A",
    "nexist;": "\u2204",
    "nexists;": "\u2204",
    "Nfr;": "\uD835\uDD11",
    "nfr;": "\uD835\uDD2B",
    "ngE;": "\u2267\u0338",
    "nge;": "\u2271",
    "ngeq;": "\u2271",
    "ngeqq;": "\u2267\u0338",
    "ngeqslant;": "\u2A7E\u0338",
    "nges;": "\u2A7E\u0338",
    "nGg;": "\u22D9\u0338",
    "ngsim;": "\u2275",
    "nGt;": "\u226B\u20D2",
    "ngt;": "\u226F",
    "ngtr;": "\u226F",
    "nGtv;": "\u226B\u0338",
    "nhArr;": "\u21CE",
    "nharr;": "\u21AE",
    "nhpar;": "\u2AF2",
    "ni;": "\u220B",
    "nis;": "\u22FC",
    "nisd;": "\u22FA",
    "niv;": "\u220B",
    "NJcy;": "\u040A",
    "njcy;": "\u045A",
    "nlArr;": "\u21CD",
    "nlarr;": "\u219A",
    "nldr;": "\u2025",
    "nlE;": "\u2266\u0338",
    "nle;": "\u2270",
    "nLeftarrow;": "\u21CD",
    "nleftarrow;": "\u219A",
    "nLeftrightarrow;": "\u21CE",
    "nleftrightarrow;": "\u21AE",
    "nleq;": "\u2270",
    "nleqq;": "\u2266\u0338",
    "nleqslant;": "\u2A7D\u0338",
    "nles;": "\u2A7D\u0338",
    "nless;": "\u226E",
    "nLl;": "\u22D8\u0338",
    "nlsim;": "\u2274",
    "nLt;": "\u226A\u20D2",
    "nlt;": "\u226E",
    "nltri;": "\u22EA",
    "nltrie;": "\u22EC",
    "nLtv;": "\u226A\u0338",
    "nmid;": "\u2224",
    "NoBreak;": "\u2060",
    "NonBreakingSpace;": "\u00A0",
    "Nopf;": "\u2115",
    "nopf;": "\uD835\uDD5F",
    "Not;": "\u2AEC",
    "not;": "\u00AC",
    "not": "\u00AC",
    "NotCongruent;": "\u2262",
    "NotCupCap;": "\u226D",
    "NotDoubleVerticalBar;": "\u2226",
    "NotElement;": "\u2209",
    "NotEqual;": "\u2260",
    "NotEqualTilde;": "\u2242\u0338",
    "NotExists;": "\u2204",
    "NotGreater;": "\u226F",
    "NotGreaterEqual;": "\u2271",
    "NotGreaterFullEqual;": "\u2267\u0338",
    "NotGreaterGreater;": "\u226B\u0338",
    "NotGreaterLess;": "\u2279",
    "NotGreaterSlantEqual;": "\u2A7E\u0338",
    "NotGreaterTilde;": "\u2275",
    "NotHumpDownHump;": "\u224E\u0338",
    "NotHumpEqual;": "\u224F\u0338",
    "notin;": "\u2209",
    "notindot;": "\u22F5\u0338",
    "notinE;": "\u22F9\u0338",
    "notinva;": "\u2209",
    "notinvb;": "\u22F7",
    "notinvc;": "\u22F6",
    "NotLeftTriangle;": "\u22EA",
    "NotLeftTriangleBar;": "\u29CF\u0338",
    "NotLeftTriangleEqual;": "\u22EC",
    "NotLess;": "\u226E",
    "NotLessEqual;": "\u2270",
    "NotLessGreater;": "\u2278",
    "NotLessLess;": "\u226A\u0338",
    "NotLessSlantEqual;": "\u2A7D\u0338",
    "NotLessTilde;": "\u2274",
    "NotNestedGreaterGreater;": "\u2AA2\u0338",
    "NotNestedLessLess;": "\u2AA1\u0338",
    "notni;": "\u220C",
    "notniva;": "\u220C",
    "notnivb;": "\u22FE",
    "notnivc;": "\u22FD",
    "NotPrecedes;": "\u2280",
    "NotPrecedesEqual;": "\u2AAF\u0338",
    "NotPrecedesSlantEqual;": "\u22E0",
    "NotReverseElement;": "\u220C",
    "NotRightTriangle;": "\u22EB",
    "NotRightTriangleBar;": "\u29D0\u0338",
    "NotRightTriangleEqual;": "\u22ED",
    "NotSquareSubset;": "\u228F\u0338",
    "NotSquareSubsetEqual;": "\u22E2",
    "NotSquareSuperset;": "\u2290\u0338",
    "NotSquareSupersetEqual;": "\u22E3",
    "NotSubset;": "\u2282\u20D2",
    "NotSubsetEqual;": "\u2288",
    "NotSucceeds;": "\u2281",
    "NotSucceedsEqual;": "\u2AB0\u0338",
    "NotSucceedsSlantEqual;": "\u22E1",
    "NotSucceedsTilde;": "\u227F\u0338",
    "NotSuperset;": "\u2283\u20D2",
    "NotSupersetEqual;": "\u2289",
    "NotTilde;": "\u2241",
    "NotTildeEqual;": "\u2244",
    "NotTildeFullEqual;": "\u2247",
    "NotTildeTilde;": "\u2249",
    "NotVerticalBar;": "\u2224",
    "npar;": "\u2226",
    "nparallel;": "\u2226",
    "nparsl;": "\u2AFD\u20E5",
    "npart;": "\u2202\u0338",
    "npolint;": "\u2A14",
    "npr;": "\u2280",
    "nprcue;": "\u22E0",
    "npre;": "\u2AAF\u0338",
    "nprec;": "\u2280",
    "npreceq;": "\u2AAF\u0338",
    "nrArr;": "\u21CF",
    "nrarr;": "\u219B",
    "nrarrc;": "\u2933\u0338",
    "nrarrw;": "\u219D\u0338",
    "nRightarrow;": "\u21CF",
    "nrightarrow;": "\u219B",
    "nrtri;": "\u22EB",
    "nrtrie;": "\u22ED",
    "nsc;": "\u2281",
    "nsccue;": "\u22E1",
    "nsce;": "\u2AB0\u0338",
    "Nscr;": "\uD835\uDCA9",
    "nscr;": "\uD835\uDCC3",
    "nshortmid;": "\u2224",
    "nshortparallel;": "\u2226",
    "nsim;": "\u2241",
    "nsime;": "\u2244",
    "nsimeq;": "\u2244",
    "nsmid;": "\u2224",
    "nspar;": "\u2226",
    "nsqsube;": "\u22E2",
    "nsqsupe;": "\u22E3",
    "nsub;": "\u2284",
    "nsubE;": "\u2AC5\u0338",
    "nsube;": "\u2288",
    "nsubset;": "\u2282\u20D2",
    "nsubseteq;": "\u2288",
    "nsubseteqq;": "\u2AC5\u0338",
    "nsucc;": "\u2281",
    "nsucceq;": "\u2AB0\u0338",
    "nsup;": "\u2285",
    "nsupE;": "\u2AC6\u0338",
    "nsupe;": "\u2289",
    "nsupset;": "\u2283\u20D2",
    "nsupseteq;": "\u2289",
    "nsupseteqq;": "\u2AC6\u0338",
    "ntgl;": "\u2279",
    "Ntilde;": "\u00D1",
    "Ntilde": "\u00D1",
    "ntilde;": "\u00F1",
    "ntilde": "\u00F1",
    "ntlg;": "\u2278",
    "ntriangleleft;": "\u22EA",
    "ntrianglelefteq;": "\u22EC",
    "ntriangleright;": "\u22EB",
    "ntrianglerighteq;": "\u22ED",
    "Nu;": "\u039D",
    "nu;": "\u03BD",
    "num;": "\u0023",
    "numero;": "\u2116",
    "numsp;": "\u2007",
    "nvap;": "\u224D\u20D2",
    "nVDash;": "\u22AF",
    "nVdash;": "\u22AE",
    "nvDash;": "\u22AD",
    "nvdash;": "\u22AC",
    "nvge;": "\u2265\u20D2",
    "nvgt;": "\u003E\u20D2",
    "nvHarr;": "\u2904",
    "nvinfin;": "\u29DE",
    "nvlArr;": "\u2902",
    "nvle;": "\u2264\u20D2",
    "nvlt;": "\u003C\u20D2",
    "nvltrie;": "\u22B4\u20D2",
    "nvrArr;": "\u2903",
    "nvrtrie;": "\u22B5\u20D2",
    "nvsim;": "\u223C\u20D2",
    "nwarhk;": "\u2923",
    "nwArr;": "\u21D6",
    "nwarr;": "\u2196",
    "nwarrow;": "\u2196",
    "nwnear;": "\u2927",
    "Oacute;": "\u00D3",
    "Oacute": "\u00D3",
    "oacute;": "\u00F3",
    "oacute": "\u00F3",
    "oast;": "\u229B",
    "ocir;": "\u229A",
    "Ocirc;": "\u00D4",
    "Ocirc": "\u00D4",
    "ocirc;": "\u00F4",
    "ocirc": "\u00F4",
    "Ocy;": "\u041E",
    "ocy;": "\u043E",
    "odash;": "\u229D",
    "Odblac;": "\u0150",
    "odblac;": "\u0151",
    "odiv;": "\u2A38",
    "odot;": "\u2299",
    "odsold;": "\u29BC",
    "OElig;": "\u0152",
    "oelig;": "\u0153",
    "ofcir;": "\u29BF",
    "Ofr;": "\uD835\uDD12",
    "ofr;": "\uD835\uDD2C",
    "ogon;": "\u02DB",
    "Ograve;": "\u00D2",
    "Ograve": "\u00D2",
    "ograve;": "\u00F2",
    "ograve": "\u00F2",
    "ogt;": "\u29C1",
    "ohbar;": "\u29B5",
    "ohm;": "\u03A9",
    "oint;": "\u222E",
    "olarr;": "\u21BA",
    "olcir;": "\u29BE",
    "olcross;": "\u29BB",
    "oline;": "\u203E",
    "olt;": "\u29C0",
    "Omacr;": "\u014C",
    "omacr;": "\u014D",
    "Omega;": "\u03A9",
    "omega;": "\u03C9",
    "Omicron;": "\u039F",
    "omicron;": "\u03BF",
    "omid;": "\u29B6",
    "ominus;": "\u2296",
    "Oopf;": "\uD835\uDD46",
    "oopf;": "\uD835\uDD60",
    "opar;": "\u29B7",
    "OpenCurlyDoubleQuote;": "\u201C",
    "OpenCurlyQuote;": "\u2018",
    "operp;": "\u29B9",
    "oplus;": "\u2295",
    "Or;": "\u2A54",
    "or;": "\u2228",
    "orarr;": "\u21BB",
    "ord;": "\u2A5D",
    "order;": "\u2134",
    "orderof;": "\u2134",
    "ordf;": "\u00AA",
    "ordf": "\u00AA",
    "ordm;": "\u00BA",
    "ordm": "\u00BA",
    "origof;": "\u22B6",
    "oror;": "\u2A56",
    "orslope;": "\u2A57",
    "orv;": "\u2A5B",
    "oS;": "\u24C8",
    "Oscr;": "\uD835\uDCAA",
    "oscr;": "\u2134",
    "Oslash;": "\u00D8",
    "Oslash": "\u00D8",
    "oslash;": "\u00F8",
    "oslash": "\u00F8",
    "osol;": "\u2298",
    "Otilde;": "\u00D5",
    "Otilde": "\u00D5",
    "otilde;": "\u00F5",
    "otilde": "\u00F5",
    "Otimes;": "\u2A37",
    "otimes;": "\u2297",
    "otimesas;": "\u2A36",
    "Ouml;": "\u00D6",
    "Ouml": "\u00D6",
    "ouml;": "\u00F6",
    "ouml": "\u00F6",
    "ovbar;": "\u233D",
    "OverBar;": "\u203E",
    "OverBrace;": "\u23DE",
    "OverBracket;": "\u23B4",
    "OverParenthesis;": "\u23DC",
    "par;": "\u2225",
    "para;": "\u00B6",
    "para": "\u00B6",
    "parallel;": "\u2225",
    "parsim;": "\u2AF3",
    "parsl;": "\u2AFD",
    "part;": "\u2202",
    "PartialD;": "\u2202",
    "Pcy;": "\u041F",
    "pcy;": "\u043F",
    "percnt;": "\u0025",
    "period;": "\u002E",
    "permil;": "\u2030",
    "perp;": "\u22A5",
    "pertenk;": "\u2031",
    "Pfr;": "\uD835\uDD13",
    "pfr;": "\uD835\uDD2D",
    "Phi;": "\u03A6",
    "phi;": "\u03C6",
    "phiv;": "\u03D5",
    "phmmat;": "\u2133",
    "phone;": "\u260E",
    "Pi;": "\u03A0",
    "pi;": "\u03C0",
    "pitchfork;": "\u22D4",
    "piv;": "\u03D6",
    "planck;": "\u210F",
    "planckh;": "\u210E",
    "plankv;": "\u210F",
    "plus;": "\u002B",
    "plusacir;": "\u2A23",
    "plusb;": "\u229E",
    "pluscir;": "\u2A22",
    "plusdo;": "\u2214",
    "plusdu;": "\u2A25",
    "pluse;": "\u2A72",
    "PlusMinus;": "\u00B1",
    "plusmn;": "\u00B1",
    "plusmn": "\u00B1",
    "plussim;": "\u2A26",
    "plustwo;": "\u2A27",
    "pm;": "\u00B1",
    "Poincareplane;": "\u210C",
    "pointint;": "\u2A15",
    "Popf;": "\u2119",
    "popf;": "\uD835\uDD61",
    "pound;": "\u00A3",
    "pound": "\u00A3",
    "Pr;": "\u2ABB",
    "pr;": "\u227A",
    "prap;": "\u2AB7",
    "prcue;": "\u227C",
    "prE;": "\u2AB3",
    "pre;": "\u2AAF",
    "prec;": "\u227A",
    "precapprox;": "\u2AB7",
    "preccurlyeq;": "\u227C",
    "Precedes;": "\u227A",
    "PrecedesEqual;": "\u2AAF",
    "PrecedesSlantEqual;": "\u227C",
    "PrecedesTilde;": "\u227E",
    "preceq;": "\u2AAF",
    "precnapprox;": "\u2AB9",
    "precneqq;": "\u2AB5",
    "precnsim;": "\u22E8",
    "precsim;": "\u227E",
    "Prime;": "\u2033",
    "prime;": "\u2032",
    "primes;": "\u2119",
    "prnap;": "\u2AB9",
    "prnE;": "\u2AB5",
    "prnsim;": "\u22E8",
    "prod;": "\u220F",
    "Product;": "\u220F",
    "profalar;": "\u232E",
    "profline;": "\u2312",
    "profsurf;": "\u2313",
    "prop;": "\u221D",
    "Proportion;": "\u2237",
    "Proportional;": "\u221D",
    "propto;": "\u221D",
    "prsim;": "\u227E",
    "prurel;": "\u22B0",
    "Pscr;": "\uD835\uDCAB",
    "pscr;": "\uD835\uDCC5",
    "Psi;": "\u03A8",
    "psi;": "\u03C8",
    "puncsp;": "\u2008",
    "Qfr;": "\uD835\uDD14",
    "qfr;": "\uD835\uDD2E",
    "qint;": "\u2A0C",
    "Qopf;": "\u211A",
    "qopf;": "\uD835\uDD62",
    "qprime;": "\u2057",
    "Qscr;": "\uD835\uDCAC",
    "qscr;": "\uD835\uDCC6",
    "quaternions;": "\u210D",
    "quatint;": "\u2A16",
    "quest;": "\u003F",
    "questeq;": "\u225F",
    "QUOT;": "\u0022",
    "QUOT": "\u0022",
    "quot;": "\u0022",
    "quot": "\u0022",
    "rAarr;": "\u21DB",
    "race;": "\u223D\u0331",
    "Racute;": "\u0154",
    "racute;": "\u0155",
    "radic;": "\u221A",
    "raemptyv;": "\u29B3",
    "Rang;": "\u27EB",
    "rang;": "\u27E9",
    "rangd;": "\u2992",
    "range;": "\u29A5",
    "rangle;": "\u27E9",
    "raquo;": "\u00BB",
    "raquo": "\u00BB",
    "Rarr;": "\u21A0",
    "rArr;": "\u21D2",
    "rarr;": "\u2192",
    "rarrap;": "\u2975",
    "rarrb;": "\u21E5",
    "rarrbfs;": "\u2920",
    "rarrc;": "\u2933",
    "rarrfs;": "\u291E",
    "rarrhk;": "\u21AA",
    "rarrlp;": "\u21AC",
    "rarrpl;": "\u2945",
    "rarrsim;": "\u2974",
    "Rarrtl;": "\u2916",
    "rarrtl;": "\u21A3",
    "rarrw;": "\u219D",
    "rAtail;": "\u291C",
    "ratail;": "\u291A",
    "ratio;": "\u2236",
    "rationals;": "\u211A",
    "RBarr;": "\u2910",
    "rBarr;": "\u290F",
    "rbarr;": "\u290D",
    "rbbrk;": "\u2773",
    "rbrace;": "\u007D",
    "rbrack;": "\u005D",
    "rbrke;": "\u298C",
    "rbrksld;": "\u298E",
    "rbrkslu;": "\u2990",
    "Rcaron;": "\u0158",
    "rcaron;": "\u0159",
    "Rcedil;": "\u0156",
    "rcedil;": "\u0157",
    "rceil;": "\u2309",
    "rcub;": "\u007D",
    "Rcy;": "\u0420",
    "rcy;": "\u0440",
    "rdca;": "\u2937",
    "rdldhar;": "\u2969",
    "rdquo;": "\u201D",
    "rdquor;": "\u201D",
    "rdsh;": "\u21B3",
    "Re;": "\u211C",
    "real;": "\u211C",
    "realine;": "\u211B",
    "realpart;": "\u211C",
    "reals;": "\u211D",
    "rect;": "\u25AD",
    "REG;": "\u00AE",
    "REG": "\u00AE",
    "reg;": "\u00AE",
    "reg": "\u00AE",
    "ReverseElement;": "\u220B",
    "ReverseEquilibrium;": "\u21CB",
    "ReverseUpEquilibrium;": "\u296F",
    "rfisht;": "\u297D",
    "rfloor;": "\u230B",
    "Rfr;": "\u211C",
    "rfr;": "\uD835\uDD2F",
    "rHar;": "\u2964",
    "rhard;": "\u21C1",
    "rharu;": "\u21C0",
    "rharul;": "\u296C",
    "Rho;": "\u03A1",
    "rho;": "\u03C1",
    "rhov;": "\u03F1",
    "RightAngleBracket;": "\u27E9",
    "RightArrow;": "\u2192",
    "Rightarrow;": "\u21D2",
    "rightarrow;": "\u2192",
    "RightArrowBar;": "\u21E5",
    "RightArrowLeftArrow;": "\u21C4",
    "rightarrowtail;": "\u21A3",
    "RightCeiling;": "\u2309",
    "RightDoubleBracket;": "\u27E7",
    "RightDownTeeVector;": "\u295D",
    "RightDownVector;": "\u21C2",
    "RightDownVectorBar;": "\u2955",
    "RightFloor;": "\u230B",
    "rightharpoondown;": "\u21C1",
    "rightharpoonup;": "\u21C0",
    "rightleftarrows;": "\u21C4",
    "rightleftharpoons;": "\u21CC",
    "rightrightarrows;": "\u21C9",
    "rightsquigarrow;": "\u219D",
    "RightTee;": "\u22A2",
    "RightTeeArrow;": "\u21A6",
    "RightTeeVector;": "\u295B",
    "rightthreetimes;": "\u22CC",
    "RightTriangle;": "\u22B3",
    "RightTriangleBar;": "\u29D0",
    "RightTriangleEqual;": "\u22B5",
    "RightUpDownVector;": "\u294F",
    "RightUpTeeVector;": "\u295C",
    "RightUpVector;": "\u21BE",
    "RightUpVectorBar;": "\u2954",
    "RightVector;": "\u21C0",
    "RightVectorBar;": "\u2953",
    "ring;": "\u02DA",
    "risingdotseq;": "\u2253",
    "rlarr;": "\u21C4",
    "rlhar;": "\u21CC",
    "rlm;": "\u200F",
    "rmoust;": "\u23B1",
    "rmoustache;": "\u23B1",
    "rnmid;": "\u2AEE",
    "roang;": "\u27ED",
    "roarr;": "\u21FE",
    "robrk;": "\u27E7",
    "ropar;": "\u2986",
    "Ropf;": "\u211D",
    "ropf;": "\uD835\uDD63",
    "roplus;": "\u2A2E",
    "rotimes;": "\u2A35",
    "RoundImplies;": "\u2970",
    "rpar;": "\u0029",
    "rpargt;": "\u2994",
    "rppolint;": "\u2A12",
    "rrarr;": "\u21C9",
    "Rrightarrow;": "\u21DB",
    "rsaquo;": "\u203A",
    "Rscr;": "\u211B",
    "rscr;": "\uD835\uDCC7",
    "Rsh;": "\u21B1",
    "rsh;": "\u21B1",
    "rsqb;": "\u005D",
    "rsquo;": "\u2019",
    "rsquor;": "\u2019",
    "rthree;": "\u22CC",
    "rtimes;": "\u22CA",
    "rtri;": "\u25B9",
    "rtrie;": "\u22B5",
    "rtrif;": "\u25B8",
    "rtriltri;": "\u29CE",
    "RuleDelayed;": "\u29F4",
    "ruluhar;": "\u2968",
    "rx;": "\u211E",
    "Sacute;": "\u015A",
    "sacute;": "\u015B",
    "sbquo;": "\u201A",
    "Sc;": "\u2ABC",
    "sc;": "\u227B",
    "scap;": "\u2AB8",
    "Scaron;": "\u0160",
    "scaron;": "\u0161",
    "sccue;": "\u227D",
    "scE;": "\u2AB4",
    "sce;": "\u2AB0",
    "Scedil;": "\u015E",
    "scedil;": "\u015F",
    "Scirc;": "\u015C",
    "scirc;": "\u015D",
    "scnap;": "\u2ABA",
    "scnE;": "\u2AB6",
    "scnsim;": "\u22E9",
    "scpolint;": "\u2A13",
    "scsim;": "\u227F",
    "Scy;": "\u0421",
    "scy;": "\u0441",
    "sdot;": "\u22C5",
    "sdotb;": "\u22A1",
    "sdote;": "\u2A66",
    "searhk;": "\u2925",
    "seArr;": "\u21D8",
    "searr;": "\u2198",
    "searrow;": "\u2198",
    "sect;": "\u00A7",
    "sect": "\u00A7",
    "semi;": "\u003B",
    "seswar;": "\u2929",
    "setminus;": "\u2216",
    "setmn;": "\u2216",
    "sext;": "\u2736",
    "Sfr;": "\uD835\uDD16",
    "sfr;": "\uD835\uDD30",
    "sfrown;": "\u2322",
    "sharp;": "\u266F",
    "SHCHcy;": "\u0429",
    "shchcy;": "\u0449",
    "SHcy;": "\u0428",
    "shcy;": "\u0448",
    "ShortDownArrow;": "\u2193",
    "ShortLeftArrow;": "\u2190",
    "shortmid;": "\u2223",
    "shortparallel;": "\u2225",
    "ShortRightArrow;": "\u2192",
    "ShortUpArrow;": "\u2191",
    "shy;": "\u00AD",
    "shy": "\u00AD",
    "Sigma;": "\u03A3",
    "sigma;": "\u03C3",
    "sigmaf;": "\u03C2",
    "sigmav;": "\u03C2",
    "sim;": "\u223C",
    "simdot;": "\u2A6A",
    "sime;": "\u2243",
    "simeq;": "\u2243",
    "simg;": "\u2A9E",
    "simgE;": "\u2AA0",
    "siml;": "\u2A9D",
    "simlE;": "\u2A9F",
    "simne;": "\u2246",
    "simplus;": "\u2A24",
    "simrarr;": "\u2972",
    "slarr;": "\u2190",
    "SmallCircle;": "\u2218",
    "smallsetminus;": "\u2216",
    "smashp;": "\u2A33",
    "smeparsl;": "\u29E4",
    "smid;": "\u2223",
    "smile;": "\u2323",
    "smt;": "\u2AAA",
    "smte;": "\u2AAC",
    "smtes;": "\u2AAC\uFE00",
    "SOFTcy;": "\u042C",
    "softcy;": "\u044C",
    "sol;": "\u002F",
    "solb;": "\u29C4",
    "solbar;": "\u233F",
    "Sopf;": "\uD835\uDD4A",
    "sopf;": "\uD835\uDD64",
    "spades;": "\u2660",
    "spadesuit;": "\u2660",
    "spar;": "\u2225",
    "sqcap;": "\u2293",
    "sqcaps;": "\u2293\uFE00",
    "sqcup;": "\u2294",
    "sqcups;": "\u2294\uFE00",
    "Sqrt;": "\u221A",
    "sqsub;": "\u228F",
    "sqsube;": "\u2291",
    "sqsubset;": "\u228F",
    "sqsubseteq;": "\u2291",
    "sqsup;": "\u2290",
    "sqsupe;": "\u2292",
    "sqsupset;": "\u2290",
    "sqsupseteq;": "\u2292",
    "squ;": "\u25A1",
    "Square;": "\u25A1",
    "square;": "\u25A1",
    "SquareIntersection;": "\u2293",
    "SquareSubset;": "\u228F",
    "SquareSubsetEqual;": "\u2291",
    "SquareSuperset;": "\u2290",
    "SquareSupersetEqual;": "\u2292",
    "SquareUnion;": "\u2294",
    "squarf;": "\u25AA",
    "squf;": "\u25AA",
    "srarr;": "\u2192",
    "Sscr;": "\uD835\uDCAE",
    "sscr;": "\uD835\uDCC8",
    "ssetmn;": "\u2216",
    "ssmile;": "\u2323",
    "sstarf;": "\u22C6",
    "Star;": "\u22C6",
    "star;": "\u2606",
    "starf;": "\u2605",
    "straightepsilon;": "\u03F5",
    "straightphi;": "\u03D5",
    "strns;": "\u00AF",
    "Sub;": "\u22D0",
    "sub;": "\u2282",
    "subdot;": "\u2ABD",
    "subE;": "\u2AC5",
    "sube;": "\u2286",
    "subedot;": "\u2AC3",
    "submult;": "\u2AC1",
    "subnE;": "\u2ACB",
    "subne;": "\u228A",
    "subplus;": "\u2ABF",
    "subrarr;": "\u2979",
    "Subset;": "\u22D0",
    "subset;": "\u2282",
    "subseteq;": "\u2286",
    "subseteqq;": "\u2AC5",
    "SubsetEqual;": "\u2286",
    "subsetneq;": "\u228A",
    "subsetneqq;": "\u2ACB",
    "subsim;": "\u2AC7",
    "subsub;": "\u2AD5",
    "subsup;": "\u2AD3",
    "succ;": "\u227B",
    "succapprox;": "\u2AB8",
    "succcurlyeq;": "\u227D",
    "Succeeds;": "\u227B",
    "SucceedsEqual;": "\u2AB0",
    "SucceedsSlantEqual;": "\u227D",
    "SucceedsTilde;": "\u227F",
    "succeq;": "\u2AB0",
    "succnapprox;": "\u2ABA",
    "succneqq;": "\u2AB6",
    "succnsim;": "\u22E9",
    "succsim;": "\u227F",
    "SuchThat;": "\u220B",
    "Sum;": "\u2211",
    "sum;": "\u2211",
    "sung;": "\u266A",
    "Sup;": "\u22D1",
    "sup;": "\u2283",
    "sup1;": "\u00B9",
    "sup1": "\u00B9",
    "sup2;": "\u00B2",
    "sup2": "\u00B2",
    "sup3;": "\u00B3",
    "sup3": "\u00B3",
    "supdot;": "\u2ABE",
    "supdsub;": "\u2AD8",
    "supE;": "\u2AC6",
    "supe;": "\u2287",
    "supedot;": "\u2AC4",
    "Superset;": "\u2283",
    "SupersetEqual;": "\u2287",
    "suphsol;": "\u27C9",
    "suphsub;": "\u2AD7",
    "suplarr;": "\u297B",
    "supmult;": "\u2AC2",
    "supnE;": "\u2ACC",
    "supne;": "\u228B",
    "supplus;": "\u2AC0",
    "Supset;": "\u22D1",
    "supset;": "\u2283",
    "supseteq;": "\u2287",
    "supseteqq;": "\u2AC6",
    "supsetneq;": "\u228B",
    "supsetneqq;": "\u2ACC",
    "supsim;": "\u2AC8",
    "supsub;": "\u2AD4",
    "supsup;": "\u2AD6",
    "swarhk;": "\u2926",
    "swArr;": "\u21D9",
    "swarr;": "\u2199",
    "swarrow;": "\u2199",
    "swnwar;": "\u292A",
    "szlig;": "\u00DF",
    "szlig": "\u00DF",
    "Tab;": "\u0009",
    "target;": "\u2316",
    "Tau;": "\u03A4",
    "tau;": "\u03C4",
    "tbrk;": "\u23B4",
    "Tcaron;": "\u0164",
    "tcaron;": "\u0165",
    "Tcedil;": "\u0162",
    "tcedil;": "\u0163",
    "Tcy;": "\u0422",
    "tcy;": "\u0442",
    "tdot;": "\u20DB",
    "telrec;": "\u2315",
    "Tfr;": "\uD835\uDD17",
    "tfr;": "\uD835\uDD31",
    "there4;": "\u2234",
    "Therefore;": "\u2234",
    "therefore;": "\u2234",
    "Theta;": "\u0398",
    "theta;": "\u03B8",
    "thetasym;": "\u03D1",
    "thetav;": "\u03D1",
    "thickapprox;": "\u2248",
    "thicksim;": "\u223C",
    "ThickSpace;": "\u205F\u200A",
    "thinsp;": "\u2009",
    "ThinSpace;": "\u2009",
    "thkap;": "\u2248",
    "thksim;": "\u223C",
    "THORN;": "\u00DE",
    "THORN": "\u00DE",
    "thorn;": "\u00FE",
    "thorn": "\u00FE",
    "Tilde;": "\u223C",
    "tilde;": "\u02DC",
    "TildeEqual;": "\u2243",
    "TildeFullEqual;": "\u2245",
    "TildeTilde;": "\u2248",
    "times;": "\u00D7",
    "times": "\u00D7",
    "timesb;": "\u22A0",
    "timesbar;": "\u2A31",
    "timesd;": "\u2A30",
    "tint;": "\u222D",
    "toea;": "\u2928",
    "top;": "\u22A4",
    "topbot;": "\u2336",
    "topcir;": "\u2AF1",
    "Topf;": "\uD835\uDD4B",
    "topf;": "\uD835\uDD65",
    "topfork;": "\u2ADA",
    "tosa;": "\u2929",
    "tprime;": "\u2034",
    "TRADE;": "\u2122",
    "trade;": "\u2122",
    "triangle;": "\u25B5",
    "triangledown;": "\u25BF",
    "triangleleft;": "\u25C3",
    "trianglelefteq;": "\u22B4",
    "triangleq;": "\u225C",
    "triangleright;": "\u25B9",
    "trianglerighteq;": "\u22B5",
    "tridot;": "\u25EC",
    "trie;": "\u225C",
    "triminus;": "\u2A3A",
    "TripleDot;": "\u20DB",
    "triplus;": "\u2A39",
    "trisb;": "\u29CD",
    "tritime;": "\u2A3B",
    "trpezium;": "\u23E2",
    "Tscr;": "\uD835\uDCAF",
    "tscr;": "\uD835\uDCC9",
    "TScy;": "\u0426",
    "tscy;": "\u0446",
    "TSHcy;": "\u040B",
    "tshcy;": "\u045B",
    "Tstrok;": "\u0166",
    "tstrok;": "\u0167",
    "twixt;": "\u226C",
    "twoheadleftarrow;": "\u219E",
    "twoheadrightarrow;": "\u21A0",
    "Uacute;": "\u00DA",
    "Uacute": "\u00DA",
    "uacute;": "\u00FA",
    "uacute": "\u00FA",
    "Uarr;": "\u219F",
    "uArr;": "\u21D1",
    "uarr;": "\u2191",
    "Uarrocir;": "\u2949",
    "Ubrcy;": "\u040E",
    "ubrcy;": "\u045E",
    "Ubreve;": "\u016C",
    "ubreve;": "\u016D",
    "Ucirc;": "\u00DB",
    "Ucirc": "\u00DB",
    "ucirc;": "\u00FB",
    "ucirc": "\u00FB",
    "Ucy;": "\u0423",
    "ucy;": "\u0443",
    "udarr;": "\u21C5",
    "Udblac;": "\u0170",
    "udblac;": "\u0171",
    "udhar;": "\u296E",
    "ufisht;": "\u297E",
    "Ufr;": "\uD835\uDD18",
    "ufr;": "\uD835\uDD32",
    "Ugrave;": "\u00D9",
    "Ugrave": "\u00D9",
    "ugrave;": "\u00F9",
    "ugrave": "\u00F9",
    "uHar;": "\u2963",
    "uharl;": "\u21BF",
    "uharr;": "\u21BE",
    "uhblk;": "\u2580",
    "ulcorn;": "\u231C",
    "ulcorner;": "\u231C",
    "ulcrop;": "\u230F",
    "ultri;": "\u25F8",
    "Umacr;": "\u016A",
    "umacr;": "\u016B",
    "uml;": "\u00A8",
    "uml": "\u00A8",
    "UnderBar;": "\u005F",
    "UnderBrace;": "\u23DF",
    "UnderBracket;": "\u23B5",
    "UnderParenthesis;": "\u23DD",
    "Union;": "\u22C3",
    "UnionPlus;": "\u228E",
    "Uogon;": "\u0172",
    "uogon;": "\u0173",
    "Uopf;": "\uD835\uDD4C",
    "uopf;": "\uD835\uDD66",
    "UpArrow;": "\u2191",
    "Uparrow;": "\u21D1",
    "uparrow;": "\u2191",
    "UpArrowBar;": "\u2912",
    "UpArrowDownArrow;": "\u21C5",
    "UpDownArrow;": "\u2195",
    "Updownarrow;": "\u21D5",
    "updownarrow;": "\u2195",
    "UpEquilibrium;": "\u296E",
    "upharpoonleft;": "\u21BF",
    "upharpoonright;": "\u21BE",
    "uplus;": "\u228E",
    "UpperLeftArrow;": "\u2196",
    "UpperRightArrow;": "\u2197",
    "Upsi;": "\u03D2",
    "upsi;": "\u03C5",
    "upsih;": "\u03D2",
    "Upsilon;": "\u03A5",
    "upsilon;": "\u03C5",
    "UpTee;": "\u22A5",
    "UpTeeArrow;": "\u21A5",
    "upuparrows;": "\u21C8",
    "urcorn;": "\u231D",
    "urcorner;": "\u231D",
    "urcrop;": "\u230E",
    "Uring;": "\u016E",
    "uring;": "\u016F",
    "urtri;": "\u25F9",
    "Uscr;": "\uD835\uDCB0",
    "uscr;": "\uD835\uDCCA",
    "utdot;": "\u22F0",
    "Utilde;": "\u0168",
    "utilde;": "\u0169",
    "utri;": "\u25B5",
    "utrif;": "\u25B4",
    "uuarr;": "\u21C8",
    "Uuml;": "\u00DC",
    "Uuml": "\u00DC",
    "uuml;": "\u00FC",
    "uuml": "\u00FC",
    "uwangle;": "\u29A7",
    "vangrt;": "\u299C",
    "varepsilon;": "\u03F5",
    "varkappa;": "\u03F0",
    "varnothing;": "\u2205",
    "varphi;": "\u03D5",
    "varpi;": "\u03D6",
    "varpropto;": "\u221D",
    "vArr;": "\u21D5",
    "varr;": "\u2195",
    "varrho;": "\u03F1",
    "varsigma;": "\u03C2",
    "varsubsetneq;": "\u228A\uFE00",
    "varsubsetneqq;": "\u2ACB\uFE00",
    "varsupsetneq;": "\u228B\uFE00",
    "varsupsetneqq;": "\u2ACC\uFE00",
    "vartheta;": "\u03D1",
    "vartriangleleft;": "\u22B2",
    "vartriangleright;": "\u22B3",
    "Vbar;": "\u2AEB",
    "vBar;": "\u2AE8",
    "vBarv;": "\u2AE9",
    "Vcy;": "\u0412",
    "vcy;": "\u0432",
    "VDash;": "\u22AB",
    "Vdash;": "\u22A9",
    "vDash;": "\u22A8",
    "vdash;": "\u22A2",
    "Vdashl;": "\u2AE6",
    "Vee;": "\u22C1",
    "vee;": "\u2228",
    "veebar;": "\u22BB",
    "veeeq;": "\u225A",
    "vellip;": "\u22EE",
    "Verbar;": "\u2016",
    "verbar;": "\u007C",
    "Vert;": "\u2016",
    "vert;": "\u007C",
    "VerticalBar;": "\u2223",
    "VerticalLine;": "\u007C",
    "VerticalSeparator;": "\u2758",
    "VerticalTilde;": "\u2240",
    "VeryThinSpace;": "\u200A",
    "Vfr;": "\uD835\uDD19",
    "vfr;": "\uD835\uDD33",
    "vltri;": "\u22B2",
    "vnsub;": "\u2282\u20D2",
    "vnsup;": "\u2283\u20D2",
    "Vopf;": "\uD835\uDD4D",
    "vopf;": "\uD835\uDD67",
    "vprop;": "\u221D",
    "vrtri;": "\u22B3",
    "Vscr;": "\uD835\uDCB1",
    "vscr;": "\uD835\uDCCB",
    "vsubnE;": "\u2ACB\uFE00",
    "vsubne;": "\u228A\uFE00",
    "vsupnE;": "\u2ACC\uFE00",
    "vsupne;": "\u228B\uFE00",
    "Vvdash;": "\u22AA",
    "vzigzag;": "\u299A",
    "Wcirc;": "\u0174",
    "wcirc;": "\u0175",
    "wedbar;": "\u2A5F",
    "Wedge;": "\u22C0",
    "wedge;": "\u2227",
    "wedgeq;": "\u2259",
    "weierp;": "\u2118",
    "Wfr;": "\uD835\uDD1A",
    "wfr;": "\uD835\uDD34",
    "Wopf;": "\uD835\uDD4E",
    "wopf;": "\uD835\uDD68",
    "wp;": "\u2118",
    "wr;": "\u2240",
    "wreath;": "\u2240",
    "Wscr;": "\uD835\uDCB2",
    "wscr;": "\uD835\uDCCC",
    "xcap;": "\u22C2",
    "xcirc;": "\u25EF",
    "xcup;": "\u22C3",
    "xdtri;": "\u25BD",
    "Xfr;": "\uD835\uDD1B",
    "xfr;": "\uD835\uDD35",
    "xhArr;": "\u27FA",
    "xharr;": "\u27F7",
    "Xi;": "\u039E",
    "xi;": "\u03BE",
    "xlArr;": "\u27F8",
    "xlarr;": "\u27F5",
    "xmap;": "\u27FC",
    "xnis;": "\u22FB",
    "xodot;": "\u2A00",
    "Xopf;": "\uD835\uDD4F",
    "xopf;": "\uD835\uDD69",
    "xoplus;": "\u2A01",
    "xotime;": "\u2A02",
    "xrArr;": "\u27F9",
    "xrarr;": "\u27F6",
    "Xscr;": "\uD835\uDCB3",
    "xscr;": "\uD835\uDCCD",
    "xsqcup;": "\u2A06",
    "xuplus;": "\u2A04",
    "xutri;": "\u25B3",
    "xvee;": "\u22C1",
    "xwedge;": "\u22C0",
    "Yacute;": "\u00DD",
    "Yacute": "\u00DD",
    "yacute;": "\u00FD",
    "yacute": "\u00FD",
    "YAcy;": "\u042F",
    "yacy;": "\u044F",
    "Ycirc;": "\u0176",
    "ycirc;": "\u0177",
    "Ycy;": "\u042B",
    "ycy;": "\u044B",
    "yen;": "\u00A5",
    "yen": "\u00A5",
    "Yfr;": "\uD835\uDD1C",
    "yfr;": "\uD835\uDD36",
    "YIcy;": "\u0407",
    "yicy;": "\u0457",
    "Yopf;": "\uD835\uDD50",
    "yopf;": "\uD835\uDD6A",
    "Yscr;": "\uD835\uDCB4",
    "yscr;": "\uD835\uDCCE",
    "YUcy;": "\u042E",
    "yucy;": "\u044E",
    "Yuml;": "\u0178",
    "yuml;": "\u00FF",
    "yuml": "\u00FF",
    "Zacute;": "\u0179",
    "zacute;": "\u017A",
    "Zcaron;": "\u017D",
    "zcaron;": "\u017E",
    "Zcy;": "\u0417",
    "zcy;": "\u0437",
    "Zdot;": "\u017B",
    "zdot;": "\u017C",
    "zeetrf;": "\u2128",
    "ZeroWidthSpace;": "\u200B",
    "Zeta;": "\u0396",
    "zeta;": "\u03B6",
    "Zfr;": "\u2128",
    "zfr;": "\uD835\uDD37",
    "ZHcy;": "\u0416",
    "zhcy;": "\u0436",
    "zigrarr;": "\u21DD",
    "Zopf;": "\u2124",
    "zopf;": "\uD835\uDD6B",
    "Zscr;": "\uD835\uDCB5",
    "zscr;": "\uD835\uDCCF",
    "zwj;": "\u200D",
    "zwnj;": "\u200C"
};

function startsWith$1(haystack, needle) {
    if (haystack.length < needle.length) {
        return false;
    }
    for (let i = 0; i < needle.length; i++) {
        if (haystack[i] !== needle[i]) {
            return false;
        }
    }
    return true;
}
function endsWith$1(haystack, needle) {
    const diff = haystack.length - needle.length;
    if (diff > 0) {
        return haystack.lastIndexOf(needle) === diff;
    }
    else if (diff === 0) {
        return haystack === needle;
    }
    else {
        return false;
    }
}
function repeat$1(value, count) {
    let s = '';
    while (count > 0) {
        if ((count & 1) === 1) {
            s += value;
        }
        value += value;
        count = count >>> 1;
    }
    return s;
}
const _a$2 = 'a'.charCodeAt(0);
const _z$1 = 'z'.charCodeAt(0);
const _A$1 = 'A'.charCodeAt(0);
const _Z$1 = 'Z'.charCodeAt(0);
const _0$2 = '0'.charCodeAt(0);
const _9$2 = '9'.charCodeAt(0);
function isLetterOrDigit(text, index) {
    const c = text.charCodeAt(index);
    return (_a$2 <= c && c <= _z$1) || (_A$1 <= c && c <= _Z$1) || (_0$2 <= c && c <= _9$2);
}

function isDefined$1(obj) {
    return typeof obj !== 'undefined';
}

function normalizeMarkupContent(input) {
    if (!input) {
        return undefined;
    }
    if (typeof input === 'string') {
        return {
            kind: 'markdown',
            value: input
        };
    }
    return {
        kind: 'markdown',
        value: input.value
    };
}

const BaselineImages$1 = {
    BASELINE_LIMITED: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCA1NDAgMzAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxzdHlsZT4KICAgIC5ncmF5LXNoYXBlIHsKICAgICAgZmlsbDogI0M2QzZDNjsgLyogTGlnaHQgbW9kZSAqLwogICAgfQoKICAgIEBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspIHsKICAgICAgLmdyYXktc2hhcGUgewogICAgICAgIGZpbGw6ICM1NjU2NTY7IC8qIERhcmsgbW9kZSAqLwogICAgICB9CiAgICB9CiAgPC9zdHlsZT4KICA8cGF0aCBkPSJNMTUwIDBMMjQwIDkwTDIxMCAxMjBMMTIwIDMwTDE1MCAwWiIgZmlsbD0iI0YwOTQwOSIvPgogIDxwYXRoIGQ9Ik00MjAgMzBMNTQwIDE1MEw0MjAgMjcwTDM5MCAyNDBMNDgwIDE1MEwzOTAgNjBMNDIwIDMwWiIgY2xhc3M9ImdyYXktc2hhcGUiLz4KICA8cGF0aCBkPSJNMzMwIDE4MEwzMDAgMjEwTDM5MCAzMDBMNDIwIDI3MEwzMzAgMTgwWiIgZmlsbD0iI0YwOTQwOSIvPgogIDxwYXRoIGQ9Ik0xMjAgMzBMMTUwIDYwTDYwIDE1MEwxNTAgMjQwTDEyMCAyNzBMMCAxNTBMMTIwIDMwWiIgY2xhc3M9ImdyYXktc2hhcGUiLz4KICA8cGF0aCBkPSJNMzkwIDBMNDIwIDMwTDE1MCAzMDBMMTIwIDI3MEwzOTAgMFoiIGZpbGw9IiNGMDk0MDkiLz4KPC9zdmc+',
    BASELINE_LOW: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCA1NDAgMzAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxzdHlsZT4KICAgIC5ibHVlLXNoYXBlIHsKICAgICAgZmlsbDogI0E4QzdGQTsgLyogTGlnaHQgbW9kZSAqLwogICAgfQoKICAgIEBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspIHsKICAgICAgLmJsdWUtc2hhcGUgewogICAgICAgIGZpbGw6ICMyRDUwOUU7IC8qIERhcmsgbW9kZSAqLwogICAgICB9CiAgICB9CgogICAgLmRhcmtlci1ibHVlLXNoYXBlIHsKICAgICAgICBmaWxsOiAjMUI2RUYzOwogICAgfQoKICAgIEBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspIHsKICAgICAgICAuZGFya2VyLWJsdWUtc2hhcGUgewogICAgICAgICAgICBmaWxsOiAjNDE4NUZGOwogICAgICAgIH0KICAgIH0KCiAgPC9zdHlsZT4KICA8cGF0aCBkPSJNMTUwIDBMMTgwIDMwTDE1MCA2MEwxMjAgMzBMMTUwIDBaIiBjbGFzcz0iYmx1ZS1zaGFwZSIvPgogIDxwYXRoIGQ9Ik0yMTAgNjBMMjQwIDkwTDIxMCAxMjBMMTgwIDkwTDIxMCA2MFoiIGNsYXNzPSJibHVlLXNoYXBlIi8+CiAgPHBhdGggZD0iTTQ1MCA2MEw0ODAgOTBMNDUwIDEyMEw0MjAgOTBMNDUwIDYwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNNTEwIDEyMEw1NDAgMTUwTDUxMCAxODBMNDgwIDE1MEw1MTAgMTIwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNNDUwIDE4MEw0ODAgMjEwTDQ1MCAyNDBMNDIwIDIxMEw0NTAgMTgwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNMzkwIDI0MEw0MjAgMjcwTDM5MCAzMDBMMzYwIDI3MEwzOTAgMjQwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNMzMwIDE4MEwzNjAgMjEwTDMzMCAyNDBMMzAwIDIxMEwzMzAgMTgwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNOTAgNjBMMTIwIDkwTDkwIDEyMEw2MCA5MEw5MCA2MFoiIGNsYXNzPSJibHVlLXNoYXBlIi8+CiAgPHBhdGggZD0iTTM5MCAwTDQyMCAzMEwxNTAgMzAwTDAgMTUwTDMwIDEyMEwxNTAgMjQwTDM5MCAwWiIgY2xhc3M9ImRhcmtlci1ibHVlLXNoYXBlIi8+Cjwvc3ZnPg==',
    BASELINE_HIGH: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCA1NDAgMzAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxzdHlsZT4KICAgIC5ncmVlbi1zaGFwZSB7CiAgICAgIGZpbGw6ICNDNEVFRDA7IC8qIExpZ2h0IG1vZGUgKi8KICAgIH0KCiAgICBAbWVkaWEgKHByZWZlcnMtY29sb3Itc2NoZW1lOiBkYXJrKSB7CiAgICAgIC5ncmVlbi1zaGFwZSB7CiAgICAgICAgZmlsbDogIzEyNTIyNTsgLyogRGFyayBtb2RlICovCiAgICAgIH0KICAgIH0KICA8L3N0eWxlPgogIDxwYXRoIGQ9Ik00MjAgMzBMMzkwIDYwTDQ4MCAxNTBMMzkwIDI0MEwzMzAgMTgwTDMwMCAyMTBMMzkwIDMwMEw1NDAgMTUwTDQyMCAzMFoiIGNsYXNzPSJncmVlbi1zaGFwZSIvPgogIDxwYXRoIGQ9Ik0xNTAgMEwzMCAxMjBMNjAgMTUwTDE1MCA2MEwyMTAgMTIwTDI0MCA5MEwxNTAgMFoiIGNsYXNzPSJncmVlbi1zaGFwZSIvPgogIDxwYXRoIGQ9Ik0zOTAgMEw0MjAgMzBMMTUwIDMwMEwwIDE1MEwzMCAxMjBMMTUwIDI0MEwzOTAgMFoiIGZpbGw9IiMxRUE0NDYiLz4KPC9zdmc+'
};
function getEntryBaselineImage$1(status) {
    if (!status) {
        return '';
    }
    let baselineImg;
    switch (status?.baseline) {
        case 'low':
            baselineImg = BaselineImages$1.BASELINE_LOW;
            break;
        case 'high':
            baselineImg = BaselineImages$1.BASELINE_HIGH;
            break;
        default:
            baselineImg = BaselineImages$1.BASELINE_LIMITED;
    }
    return `![Baseline icon](${baselineImg})`;
}
function getEntryBaselineStatus$1(status, browsers) {
    if (!status) {
        return '';
    }
    if (status.baseline === false) {
        const missingBrowsers = getMissingBaselineBrowsers$1(browsers);
        let status = `Limited availability across major browsers`;
        if (missingBrowsers) {
            status += ` (Not fully implemented in ${missingBrowsers})`;
        }
        return status;
    }
    const baselineYear = status.baseline_low_date?.split('-')[0];
    return `${status.baseline === 'low' ? 'Newly' : 'Widely'} available across major browsers (Baseline since ${baselineYear})`;
}
const browserNames$1 = {
    'C': {
        name: 'Chrome',
        platform: 'desktop'
    },
    'CA': {
        name: 'Chrome',
        platform: 'Android'
    },
    'E': {
        name: 'Edge',
        platform: 'desktop'
    },
    'FF': {
        name: 'Firefox',
        platform: 'desktop'
    },
    'FFA': {
        name: 'Firefox',
        platform: 'Android'
    },
    'S': {
        name: 'Safari',
        platform: 'macOS'
    },
    'SM': {
        name: 'Safari',
        platform: 'iOS'
    }
};
const shortCompatPattern$1 = /(E|FFA|FF|SM|S|CA|C|IE|O)([\d|\.]+)?/;
const missingBaselineBrowserFormatter$1 = new Intl.ListFormat("en", {
    style: "long",
    type: "disjunction",
});
function getMissingBaselineBrowsers$1(browsers) {
    if (!browsers) {
        return '';
    }
    const missingBrowsers = new Map(Object.entries(browserNames$1));
    for (const shortCompatString of browsers) {
        const match = shortCompatPattern$1.exec(shortCompatString);
        if (!match) {
            continue;
        }
        const browser = match[1];
        missingBrowsers.delete(browser);
    }
    return missingBaselineBrowserFormatter$1.format(Object.values(Array.from(missingBrowsers.entries()).reduce((browsers, [browserId, browser]) => {
        if (browser.name in browsers || browserId === 'E') {
            browsers[browser.name] = browser.name;
            return browsers;
        }
        browsers[browser.name] = `${browser.name} on ${browser.platform}`;
        return browsers;
    }, {})));
}
class HTMLDataProvider {
    isApplicable() {
        return true;
    }
    constructor(id, customData) {
        this.id = id;
        this._tags = [];
        this._tagMap = {};
        this._valueSetMap = {};
        this._tags = customData.tags || [];
        this._globalAttributes = customData.globalAttributes || [];
        this._tags.forEach(t => {
            this._tagMap[t.name.toLowerCase()] = t;
        });
        if (customData.valueSets) {
            customData.valueSets.forEach(vs => {
                this._valueSetMap[vs.name] = vs.values;
            });
        }
    }
    getId() {
        return this.id;
    }
    provideTags() {
        return this._tags;
    }
    provideAttributes(tag) {
        const attributes = [];
        const processAttribute = (a) => {
            attributes.push(a);
        };
        const tagEntry = this._tagMap[tag.toLowerCase()];
        if (tagEntry) {
            tagEntry.attributes.forEach(processAttribute);
        }
        this._globalAttributes.forEach(processAttribute);
        return attributes;
    }
    provideValues(tag, attribute) {
        const values = [];
        attribute = attribute.toLowerCase();
        const processAttributes = (attributes) => {
            attributes.forEach(a => {
                if (a.name.toLowerCase() === attribute) {
                    if (a.values) {
                        a.values.forEach(v => {
                            values.push(v);
                        });
                    }
                    if (a.valueSet) {
                        if (this._valueSetMap[a.valueSet]) {
                            this._valueSetMap[a.valueSet].forEach(v => {
                                values.push(v);
                            });
                        }
                    }
                }
            });
        };
        const tagEntry = this._tagMap[tag.toLowerCase()];
        if (tagEntry) {
            processAttributes(tagEntry.attributes);
        }
        processAttributes(this._globalAttributes);
        return values;
    }
}
function generateDocumentation(item, settings = {}, doesSupportMarkdown) {
    const result = {
        kind: doesSupportMarkdown ? 'markdown' : 'plaintext',
        value: ''
    };
    if (item.description && settings.documentation !== false) {
        const normalizedDescription = normalizeMarkupContent(item.description);
        if (normalizedDescription) {
            result.value += normalizedDescription.value;
        }
    }
    if (item.status && settings.documentation !== false) {
        if (result.value.length) {
            result.value += `\n\n`;
        }
        const baselineStatus = getEntryBaselineStatus$1(item.status, item.browsers);
        if (doesSupportMarkdown) {
            result.value += `${getEntryBaselineImage$1(item.status)} _${baselineStatus}_`;
        }
        else {
            result.value += baselineStatus;
        }
    }
    if (item.references && item.references.length > 0 && settings.references !== false) {
        if (result.value.length) {
            result.value += `\n\n`;
        }
        if (doesSupportMarkdown) {
            result.value += item.references.map(r => {
                return `[${r.name}](${r.url})`;
            }).join(' | ');
        }
        else {
            result.value += item.references.map(r => {
                return `${r.name}: ${r.url}`;
            }).join('\n');
        }
    }
    if (result.value === '') {
        return undefined;
    }
    return result;
}

let PathCompletionParticipant$1 = class PathCompletionParticipant {
    constructor(dataManager, readDirectory) {
        this.dataManager = dataManager;
        this.readDirectory = readDirectory;
        this.atributeCompletions = [];
    }
    onHtmlAttributeValue(context) {
        if (this.dataManager.isPathAttribute(context.tag, context.attribute)) {
            this.atributeCompletions.push(context);
        }
    }
    async computeCompletions(document, documentContext) {
        const result = { items: [], isIncomplete: false };
        for (const attributeCompletion of this.atributeCompletions) {
            const fullValue = stripQuotes$1(document.getText(attributeCompletion.range));
            if (isCompletablePath(fullValue)) {
                if (fullValue === '.' || fullValue === '..') {
                    result.isIncomplete = true;
                }
                else {
                    const replaceRange = pathToReplaceRange$1(attributeCompletion.value, fullValue, attributeCompletion.range);
                    const suggestions = await this.providePathSuggestions(attributeCompletion.value, replaceRange, document, documentContext);
                    for (const item of suggestions) {
                        result.items.push(item);
                    }
                }
            }
        }
        return result;
    }
    async providePathSuggestions(valueBeforeCursor, replaceRange, document, documentContext) {
        const valueBeforeLastSlash = valueBeforeCursor.substring(0, valueBeforeCursor.lastIndexOf('/') + 1);
        let parentDir = documentContext.resolveReference(valueBeforeLastSlash || '.', document.uri);
        if (parentDir) {
            try {
                const result = [];
                const infos = await this.readDirectory(parentDir);
                for (const [name, type] of infos) {
                    if (name.charCodeAt(0) !== CharCode_dot$1) {
                        result.push(createCompletionItem$1(name, type === FileType$2.Directory, replaceRange));
                    }
                }
                return result;
            }
            catch (e) {
            }
        }
        return [];
    }
};
const CharCode_dot$1 = '.'.charCodeAt(0);
function stripQuotes$1(fullValue) {
    if (startsWith$1(fullValue, `'`) || startsWith$1(fullValue, `"`)) {
        return fullValue.slice(1, -1);
    }
    else {
        return fullValue;
    }
}
function isCompletablePath(value) {
    if (startsWith$1(value, 'http') || startsWith$1(value, 'https') || startsWith$1(value, '//')) {
        return false;
    }
    return true;
}
function pathToReplaceRange$1(valueBeforeCursor, fullValue, range) {
    let replaceRange;
    const lastIndexOfSlash = valueBeforeCursor.lastIndexOf('/');
    if (lastIndexOfSlash === -1) {
        replaceRange = shiftRange$1(range, 1, -1);
    }
    else {
        const valueAfterLastSlash = fullValue.slice(lastIndexOfSlash + 1);
        const startPos = shiftPosition$1(range.end, -1 - valueAfterLastSlash.length);
        const whitespaceIndex = valueAfterLastSlash.indexOf(' ');
        let endPos;
        if (whitespaceIndex !== -1) {
            endPos = shiftPosition$1(startPos, whitespaceIndex);
        }
        else {
            endPos = shiftPosition$1(range.end, -1);
        }
        replaceRange = Range$1.create(startPos, endPos);
    }
    return replaceRange;
}
function createCompletionItem$1(p, isDir, replaceRange) {
    if (isDir) {
        p = p + '/';
        return {
            label: p,
            kind: CompletionItemKind$1.Folder,
            textEdit: TextEdit$1.replace(replaceRange, p),
            command: {
                title: 'Suggest',
                command: 'editor.action.triggerSuggest'
            }
        };
    }
    else {
        return {
            label: p,
            kind: CompletionItemKind$1.File,
            textEdit: TextEdit$1.replace(replaceRange, p)
        };
    }
}
function shiftPosition$1(pos, offset) {
    return Position$1.create(pos.line, pos.character + offset);
}
function shiftRange$1(range, startOffset, endOffset) {
    const start = shiftPosition$1(range.start, startOffset);
    const end = shiftPosition$1(range.end, endOffset);
    return Range$1.create(start, end);
}

class HTMLCompletion {
    constructor(lsOptions, dataManager) {
        this.lsOptions = lsOptions;
        this.dataManager = dataManager;
        this.completionParticipants = [];
    }
    setCompletionParticipants(registeredCompletionParticipants) {
        this.completionParticipants = registeredCompletionParticipants || [];
    }
    async doComplete2(document, position, htmlDocument, documentContext, settings) {
        if (!this.lsOptions.fileSystemProvider || !this.lsOptions.fileSystemProvider.readDirectory) {
            return this.doComplete(document, position, htmlDocument, settings);
        }
        const participant = new PathCompletionParticipant$1(this.dataManager, this.lsOptions.fileSystemProvider.readDirectory);
        const contributedParticipants = this.completionParticipants;
        this.completionParticipants = [participant].concat(contributedParticipants);
        const result = this.doComplete(document, position, htmlDocument, settings);
        try {
            const pathCompletionResult = await participant.computeCompletions(document, documentContext);
            return {
                isIncomplete: result.isIncomplete || pathCompletionResult.isIncomplete,
                items: pathCompletionResult.items.concat(result.items)
            };
        }
        finally {
            this.completionParticipants = contributedParticipants;
        }
    }
    doComplete(document, position, htmlDocument, settings) {
        const result = this._doComplete(document, position, htmlDocument, settings);
        return this.convertCompletionList(result);
    }
    _doComplete(document, position, htmlDocument, settings) {
        const result = {
            isIncomplete: false,
            items: []
        };
        const completionParticipants = this.completionParticipants;
        const dataProviders = this.dataManager.getDataProviders().filter(p => p.isApplicable(document.languageId) && (!settings || settings[p.getId()] !== false));
        const doesSupportMarkdown = this.doesSupportMarkdown();
        const text = document.getText();
        const offset = document.offsetAt(position);
        const node = htmlDocument.findNodeBefore(offset);
        if (!node) {
            return result;
        }
        const scanner = createScanner$1(text, node.start);
        let currentTag = '';
        let currentAttributeName;
        let voidElements;
        function getReplaceRange(replaceStart, replaceEnd = offset) {
            if (replaceStart > offset) {
                replaceStart = offset;
            }
            return { start: document.positionAt(replaceStart), end: document.positionAt(replaceEnd) };
        }
        function collectOpenTagSuggestions(afterOpenBracket, tagNameEnd) {
            const range = getReplaceRange(afterOpenBracket, tagNameEnd);
            dataProviders.forEach((provider) => {
                provider.provideTags().forEach(tag => {
                    result.items.push({
                        label: tag.name,
                        kind: CompletionItemKind$1.Property,
                        documentation: generateDocumentation(tag, undefined, doesSupportMarkdown),
                        textEdit: TextEdit$1.replace(range, tag.name),
                        insertTextFormat: InsertTextFormat$1.PlainText
                    });
                });
            });
            return result;
        }
        function getLineIndent(offset) {
            let start = offset;
            while (start > 0) {
                const ch = text.charAt(start - 1);
                if ("\n\r".indexOf(ch) >= 0) {
                    return text.substring(start, offset);
                }
                if (!isWhiteSpace$5(ch)) {
                    return null;
                }
                start--;
            }
            return text.substring(0, offset);
        }
        function collectCloseTagSuggestions(afterOpenBracket, inOpenTag, tagNameEnd = offset) {
            const range = getReplaceRange(afterOpenBracket, tagNameEnd);
            const closeTag = isFollowedBy(text, tagNameEnd, ScannerState.WithinEndTag, TokenType$1.EndTagClose) ? '' : '>';
            let curr = node;
            if (inOpenTag) {
                curr = curr.parent;
            }
            while (curr) {
                const tag = curr.tag;
                if (tag && (!curr.closed || curr.endTagStart && (curr.endTagStart > offset))) {
                    const item = {
                        label: '/' + tag,
                        kind: CompletionItemKind$1.Property,
                        filterText: '/' + tag,
                        textEdit: TextEdit$1.replace(range, '/' + tag + closeTag),
                        insertTextFormat: InsertTextFormat$1.PlainText
                    };
                    const startIndent = getLineIndent(curr.start);
                    const endIndent = getLineIndent(afterOpenBracket - 1);
                    if (startIndent !== null && endIndent !== null && startIndent !== endIndent) {
                        const insertText = startIndent + '</' + tag + closeTag;
                        item.textEdit = TextEdit$1.replace(getReplaceRange(afterOpenBracket - 1 - endIndent.length), insertText);
                        item.filterText = endIndent + '</' + tag;
                    }
                    result.items.push(item);
                    return result;
                }
                curr = curr.parent;
            }
            if (inOpenTag) {
                return result;
            }
            dataProviders.forEach(provider => {
                provider.provideTags().forEach(tag => {
                    result.items.push({
                        label: '/' + tag.name,
                        kind: CompletionItemKind$1.Property,
                        documentation: generateDocumentation(tag, undefined, doesSupportMarkdown),
                        filterText: '/' + tag.name + closeTag,
                        textEdit: TextEdit$1.replace(range, '/' + tag.name + closeTag),
                        insertTextFormat: InsertTextFormat$1.PlainText
                    });
                });
            });
            return result;
        }
        const collectAutoCloseTagSuggestion = (tagCloseEnd, tag) => {
            if (settings && settings.hideAutoCompleteProposals) {
                return result;
            }
            voidElements ?? (voidElements = this.dataManager.getVoidElements(dataProviders));
            if (!this.dataManager.isVoidElement(tag, voidElements)) {
                const pos = document.positionAt(tagCloseEnd);
                result.items.push({
                    label: '</' + tag + '>',
                    kind: CompletionItemKind$1.Property,
                    filterText: '</' + tag + '>',
                    textEdit: TextEdit$1.insert(pos, '$0</' + tag + '>'),
                    insertTextFormat: InsertTextFormat$1.Snippet
                });
            }
            return result;
        };
        function collectTagSuggestions(tagStart, tagEnd) {
            collectOpenTagSuggestions(tagStart, tagEnd);
            collectCloseTagSuggestions(tagStart, true, tagEnd);
            return result;
        }
        function getExistingAttributes() {
            const existingAttributes = Object.create(null);
            node.attributeNames.forEach(attribute => {
                existingAttributes[attribute] = true;
            });
            return existingAttributes;
        }
        function collectAttributeNameSuggestions(nameStart, nameEnd = offset) {
            let replaceEnd = offset;
            while (replaceEnd < nameEnd && text[replaceEnd] !== '<') {
                replaceEnd++;
            }
            const currentAttribute = text.substring(nameStart, nameEnd);
            const range = getReplaceRange(nameStart, replaceEnd);
            let value = '';
            if (!isFollowedBy(text, nameEnd, ScannerState.AfterAttributeName, TokenType$1.DelimiterAssign)) {
                const defaultValue = settings?.attributeDefaultValue ?? 'doublequotes';
                if (defaultValue === 'empty') {
                    value = '=$1';
                }
                else if (defaultValue === 'singlequotes') {
                    value = '=\'$1\'';
                }
                else {
                    value = '="$1"';
                }
            }
            const seenAttributes = getExistingAttributes();
            seenAttributes[currentAttribute] = false;
            dataProviders.forEach(provider => {
                provider.provideAttributes(currentTag).forEach(attr => {
                    if (seenAttributes[attr.name]) {
                        return;
                    }
                    seenAttributes[attr.name] = true;
                    let codeSnippet = attr.name;
                    let command;
                    if (attr.valueSet !== 'v' && value.length) {
                        codeSnippet = codeSnippet + value;
                        if (attr.valueSet || attr.name === 'style') {
                            command = {
                                title: 'Suggest',
                                command: 'editor.action.triggerSuggest'
                            };
                        }
                    }
                    result.items.push({
                        label: attr.name,
                        kind: attr.valueSet === 'handler' ? CompletionItemKind$1.Function : CompletionItemKind$1.Value,
                        documentation: generateDocumentation(attr, undefined, doesSupportMarkdown),
                        textEdit: TextEdit$1.replace(range, codeSnippet),
                        insertTextFormat: InsertTextFormat$1.Snippet,
                        command
                    });
                });
            });
            collectDataAttributesSuggestions(range, seenAttributes);
            return result;
        }
        function collectDataAttributesSuggestions(range, seenAttributes) {
            const dataAttr = 'data-';
            const dataAttributes = {};
            dataAttributes[dataAttr] = `${dataAttr}$1="$2"`;
            function addNodeDataAttributes(node) {
                node.attributeNames.forEach(attr => {
                    if (startsWith$1(attr, dataAttr) && !dataAttributes[attr] && !seenAttributes[attr]) {
                        dataAttributes[attr] = attr + '="$1"';
                    }
                });
                node.children.forEach(child => addNodeDataAttributes(child));
            }
            if (htmlDocument) {
                htmlDocument.roots.forEach(root => addNodeDataAttributes(root));
            }
            Object.keys(dataAttributes).forEach(attr => result.items.push({
                label: attr,
                kind: CompletionItemKind$1.Value,
                textEdit: TextEdit$1.replace(range, dataAttributes[attr]),
                insertTextFormat: InsertTextFormat$1.Snippet
            }));
        }
        function collectAttributeValueSuggestions(valueStart, valueEnd = offset) {
            let range;
            let addQuotes;
            let valuePrefix;
            if (offset > valueStart && offset <= valueEnd && isQuote$3(text[valueStart])) {
                const valueContentStart = valueStart + 1;
                let valueContentEnd = valueEnd;
                if (valueEnd > valueStart && text[valueEnd - 1] === text[valueStart]) {
                    valueContentEnd--;
                }
                const wsBefore = getWordStart(text, offset, valueContentStart);
                const wsAfter = getWordEnd(text, offset, valueContentEnd);
                range = getReplaceRange(wsBefore, wsAfter);
                valuePrefix = offset >= valueContentStart && offset <= valueContentEnd ? text.substring(valueContentStart, offset) : '';
                addQuotes = false;
            }
            else {
                range = getReplaceRange(valueStart, valueEnd);
                valuePrefix = text.substring(valueStart, offset);
                addQuotes = true;
            }
            if (completionParticipants.length > 0) {
                const tag = currentTag.toLowerCase();
                const attribute = currentAttributeName.toLowerCase();
                const fullRange = getReplaceRange(valueStart, valueEnd);
                for (const participant of completionParticipants) {
                    if (participant.onHtmlAttributeValue) {
                        participant.onHtmlAttributeValue({ document, position, tag, attribute, value: valuePrefix, range: fullRange });
                    }
                }
            }
            dataProviders.forEach(provider => {
                provider.provideValues(currentTag, currentAttributeName).forEach(value => {
                    const insertText = addQuotes ? '"' + value.name + '"' : value.name;
                    result.items.push({
                        label: value.name,
                        filterText: insertText,
                        kind: CompletionItemKind$1.Unit,
                        documentation: generateDocumentation(value, undefined, doesSupportMarkdown),
                        textEdit: TextEdit$1.replace(range, insertText),
                        insertTextFormat: InsertTextFormat$1.PlainText
                    });
                });
            });
            collectCharacterEntityProposals();
            return result;
        }
        function scanNextForEndPos(nextToken) {
            if (offset === scanner.getTokenEnd()) {
                token = scanner.scan();
                if (token === nextToken && scanner.getTokenOffset() === offset) {
                    return scanner.getTokenEnd();
                }
            }
            return offset;
        }
        function collectInsideContent() {
            for (const participant of completionParticipants) {
                if (participant.onHtmlContent) {
                    participant.onHtmlContent({ document, position });
                }
            }
            return collectCharacterEntityProposals();
        }
        function collectCharacterEntityProposals() {
            let k = offset - 1;
            let characterStart = position.character;
            while (k >= 0 && isLetterOrDigit(text, k)) {
                k--;
                characterStart--;
            }
            if (k >= 0 && text[k] === '&') {
                const range = Range$1.create(Position$1.create(position.line, characterStart - 1), position);
                for (const entity in entities) {
                    if (endsWith$1(entity, ';')) {
                        const label = '&' + entity;
                        result.items.push({
                            label,
                            kind: CompletionItemKind$1.Keyword,
                            documentation: main$4.t('Character entity representing \'{0}\'', entities[entity]),
                            textEdit: TextEdit$1.replace(range, label),
                            insertTextFormat: InsertTextFormat$1.PlainText
                        });
                    }
                }
            }
            return result;
        }
        function suggestDoctype(replaceStart, replaceEnd) {
            const range = getReplaceRange(replaceStart, replaceEnd);
            result.items.push({
                label: '!DOCTYPE',
                kind: CompletionItemKind$1.Property,
                documentation: 'A preamble for an HTML document.',
                textEdit: TextEdit$1.replace(range, '!DOCTYPE html>'),
                insertTextFormat: InsertTextFormat$1.PlainText
            });
        }
        let token = scanner.scan();
        while (token !== TokenType$1.EOS && scanner.getTokenOffset() <= offset) {
            switch (token) {
                case TokenType$1.StartTagOpen:
                    if (scanner.getTokenEnd() === offset) {
                        const endPos = scanNextForEndPos(TokenType$1.StartTag);
                        if (position.line === 0) {
                            suggestDoctype(offset, endPos);
                        }
                        return collectTagSuggestions(offset, endPos);
                    }
                    break;
                case TokenType$1.StartTag:
                    if (scanner.getTokenOffset() <= offset && offset <= scanner.getTokenEnd()) {
                        return collectOpenTagSuggestions(scanner.getTokenOffset(), scanner.getTokenEnd());
                    }
                    currentTag = scanner.getTokenText();
                    break;
                case TokenType$1.AttributeName:
                    if (scanner.getTokenOffset() <= offset && offset <= scanner.getTokenEnd()) {
                        return collectAttributeNameSuggestions(scanner.getTokenOffset(), scanner.getTokenEnd());
                    }
                    currentAttributeName = scanner.getTokenText();
                    break;
                case TokenType$1.DelimiterAssign:
                    if (scanner.getTokenEnd() === offset) {
                        const endPos = scanNextForEndPos(TokenType$1.AttributeValue);
                        return collectAttributeValueSuggestions(offset, endPos);
                    }
                    break;
                case TokenType$1.AttributeValue:
                    if (scanner.getTokenOffset() <= offset && offset <= scanner.getTokenEnd()) {
                        return collectAttributeValueSuggestions(scanner.getTokenOffset(), scanner.getTokenEnd());
                    }
                    break;
                case TokenType$1.Whitespace:
                    if (offset <= scanner.getTokenEnd()) {
                        switch (scanner.getScannerState()) {
                            case ScannerState.AfterOpeningStartTag:
                                const startPos = scanner.getTokenOffset();
                                const endTagPos = scanNextForEndPos(TokenType$1.StartTag);
                                return collectTagSuggestions(startPos, endTagPos);
                            case ScannerState.WithinTag:
                            case ScannerState.AfterAttributeName:
                                return collectAttributeNameSuggestions(scanner.getTokenEnd());
                            case ScannerState.BeforeAttributeValue:
                                return collectAttributeValueSuggestions(scanner.getTokenEnd());
                            case ScannerState.AfterOpeningEndTag:
                                return collectCloseTagSuggestions(scanner.getTokenOffset() - 1, false);
                            case ScannerState.WithinContent:
                                return collectInsideContent();
                        }
                    }
                    break;
                case TokenType$1.EndTagOpen:
                    if (offset <= scanner.getTokenEnd()) {
                        const afterOpenBracket = scanner.getTokenOffset() + 1;
                        const endOffset = scanNextForEndPos(TokenType$1.EndTag);
                        return collectCloseTagSuggestions(afterOpenBracket, false, endOffset);
                    }
                    break;
                case TokenType$1.EndTag:
                    if (offset <= scanner.getTokenEnd()) {
                        let start = scanner.getTokenOffset() - 1;
                        while (start >= 0) {
                            const ch = text.charAt(start);
                            if (ch === '/') {
                                return collectCloseTagSuggestions(start, false, scanner.getTokenEnd());
                            }
                            else if (!isWhiteSpace$5(ch)) {
                                break;
                            }
                            start--;
                        }
                    }
                    break;
                case TokenType$1.StartTagClose:
                    if (offset <= scanner.getTokenEnd()) {
                        if (currentTag) {
                            return collectAutoCloseTagSuggestion(scanner.getTokenEnd(), currentTag);
                        }
                    }
                    break;
                case TokenType$1.Content:
                    if (offset <= scanner.getTokenEnd()) {
                        return collectInsideContent();
                    }
                    break;
                default:
                    if (offset <= scanner.getTokenEnd()) {
                        return result;
                    }
                    break;
            }
            token = scanner.scan();
        }
        return result;
    }
    doQuoteComplete(document, position, htmlDocument, settings) {
        const offset = document.offsetAt(position);
        if (offset <= 0) {
            return null;
        }
        const defaultValue = settings?.attributeDefaultValue ?? 'doublequotes';
        if (defaultValue === 'empty') {
            return null;
        }
        const char = document.getText().charAt(offset - 1);
        if (char !== '=') {
            return null;
        }
        const value = defaultValue === 'doublequotes' ? '"$1"' : '\'$1\'';
        const node = htmlDocument.findNodeBefore(offset);
        if (node && node.attributes && node.start < offset && (!node.endTagStart || node.endTagStart > offset)) {
            const scanner = createScanner$1(document.getText(), node.start);
            let token = scanner.scan();
            while (token !== TokenType$1.EOS && scanner.getTokenEnd() <= offset) {
                if (token === TokenType$1.AttributeName && scanner.getTokenEnd() === offset - 1) {
                    token = scanner.scan();
                    if (token !== TokenType$1.DelimiterAssign) {
                        return null;
                    }
                    token = scanner.scan();
                    if (token === TokenType$1.Unknown || token === TokenType$1.AttributeValue) {
                        return null;
                    }
                    return value;
                }
                token = scanner.scan();
            }
        }
        return null;
    }
    doTagComplete(document, position, htmlDocument) {
        const offset = document.offsetAt(position);
        if (offset <= 0) {
            return null;
        }
        const char = document.getText().charAt(offset - 1);
        if (char === '>') {
            const node = htmlDocument.findNodeBefore(offset);
            if (node && node.tag && node.start < offset && (!node.endTagStart || node.endTagStart > offset)) {
                const voidElements = this.dataManager.getVoidElements(document.languageId);
                if (!this.dataManager.isVoidElement(node.tag, voidElements)) {
                    const scanner = createScanner$1(document.getText(), node.start);
                    let token = scanner.scan();
                    while (token !== TokenType$1.EOS && scanner.getTokenEnd() <= offset) {
                        if (token === TokenType$1.StartTagClose && scanner.getTokenEnd() === offset) {
                            return `$0</${node.tag}>`;
                        }
                        token = scanner.scan();
                    }
                }
            }
        }
        else if (char === '/') {
            let node = htmlDocument.findNodeBefore(offset);
            while (node && node.closed && !(node.endTagStart && (node.endTagStart > offset))) {
                node = node.parent;
            }
            if (node && node.tag) {
                const scanner = createScanner$1(document.getText(), node.start);
                let token = scanner.scan();
                while (token !== TokenType$1.EOS && scanner.getTokenEnd() <= offset) {
                    if (token === TokenType$1.EndTagOpen && scanner.getTokenEnd() === offset) {
                        if (document.getText().charAt(offset) !== '>') {
                            return `${node.tag}>`;
                        }
                        else {
                            return node.tag;
                        }
                    }
                    token = scanner.scan();
                }
            }
        }
        return null;
    }
    convertCompletionList(list) {
        if (!this.doesSupportMarkdown()) {
            list.items.forEach(item => {
                if (item.documentation && typeof item.documentation !== 'string') {
                    item.documentation = {
                        kind: 'plaintext',
                        value: item.documentation.value
                    };
                }
            });
        }
        return list;
    }
    doesSupportMarkdown() {
        if (!isDefined$1(this.supportsMarkdown)) {
            if (!isDefined$1(this.lsOptions.clientCapabilities)) {
                this.supportsMarkdown = true;
                return this.supportsMarkdown;
            }
            const documentationFormat = this.lsOptions.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;
            this.supportsMarkdown = Array.isArray(documentationFormat) && documentationFormat.indexOf(MarkupKind$1.Markdown) !== -1;
        }
        return this.supportsMarkdown;
    }
}
function isQuote$3(s) {
    return /^["']*$/.test(s);
}
function isWhiteSpace$5(s) {
    return /^\s*$/.test(s);
}
function isFollowedBy(s, offset, intialState, expectedToken) {
    const scanner = createScanner$1(s, offset, intialState);
    let token = scanner.scan();
    while (token === TokenType$1.Whitespace) {
        token = scanner.scan();
    }
    return token === expectedToken;
}
function getWordStart(s, offset, limit) {
    while (offset > limit && !isWhiteSpace$5(s[offset - 1])) {
        offset--;
    }
    return offset;
}
function getWordEnd(s, offset, limit) {
    while (offset < limit && !isWhiteSpace$5(s[offset])) {
        offset++;
    }
    return offset;
}

class HTMLHover {
    constructor(lsOptions, dataManager) {
        this.lsOptions = lsOptions;
        this.dataManager = dataManager;
    }
    doHover(document, position, htmlDocument, options) {
        const convertContents = this.convertContents.bind(this);
        const doesSupportMarkdown = this.doesSupportMarkdown();
        const offset = document.offsetAt(position);
        const node = htmlDocument.findNodeAt(offset);
        const text = document.getText();
        if (!node || !node.tag) {
            return null;
        }
        const dataProviders = this.dataManager.getDataProviders().filter(p => p.isApplicable(document.languageId));
        function getTagHover(currTag, range, open) {
            for (const provider of dataProviders) {
                let hover = null;
                provider.provideTags().forEach(tag => {
                    if (tag.name.toLowerCase() === currTag.toLowerCase()) {
                        let markupContent = generateDocumentation(tag, options, doesSupportMarkdown);
                        if (!markupContent) {
                            markupContent = {
                                kind: doesSupportMarkdown ? 'markdown' : 'plaintext',
                                value: ''
                            };
                        }
                        hover = { contents: markupContent, range };
                    }
                });
                if (hover) {
                    hover.contents = convertContents(hover.contents);
                    return hover;
                }
            }
            return null;
        }
        function getAttrHover(currTag, currAttr, range) {
            for (const provider of dataProviders) {
                let hover = null;
                provider.provideAttributes(currTag).forEach(attr => {
                    if (currAttr === attr.name && attr.description) {
                        const contentsDoc = generateDocumentation(attr, options, doesSupportMarkdown);
                        if (contentsDoc) {
                            hover = { contents: contentsDoc, range };
                        }
                        else {
                            hover = null;
                        }
                    }
                });
                if (hover) {
                    hover.contents = convertContents(hover.contents);
                    return hover;
                }
            }
            return null;
        }
        function getAttrValueHover(currTag, currAttr, currAttrValue, range) {
            for (const provider of dataProviders) {
                let hover = null;
                provider.provideValues(currTag, currAttr).forEach(attrValue => {
                    if (currAttrValue === attrValue.name && attrValue.description) {
                        const contentsDoc = generateDocumentation(attrValue, options, doesSupportMarkdown);
                        if (contentsDoc) {
                            hover = { contents: contentsDoc, range };
                        }
                        else {
                            hover = null;
                        }
                    }
                });
                if (hover) {
                    hover.contents = convertContents(hover.contents);
                    return hover;
                }
            }
            return null;
        }
        function getEntityHover(text, range) {
            let currEntity = filterEntity(text);
            for (const entity in entities) {
                let hover = null;
                const label = '&' + entity;
                if (currEntity === label) {
                    let code = entities[entity].charCodeAt(0).toString(16).toUpperCase();
                    let hex = 'U+';
                    if (code.length < 4) {
                        const zeroes = 4 - code.length;
                        let k = 0;
                        while (k < zeroes) {
                            hex += '0';
                            k += 1;
                        }
                    }
                    hex += code;
                    const contentsDoc = main$4.t('Character entity representing \'{0}\', unicode equivalent \'{1}\'', entities[entity], hex);
                    if (contentsDoc) {
                        hover = { contents: contentsDoc, range };
                    }
                    else {
                        hover = null;
                    }
                }
                if (hover) {
                    hover.contents = convertContents(hover.contents);
                    return hover;
                }
            }
            return null;
        }
        function getTagNameRange(tokenType, startOffset) {
            const scanner = createScanner$1(document.getText(), startOffset);
            let token = scanner.scan();
            while (token !== TokenType$1.EOS && (scanner.getTokenEnd() < offset || scanner.getTokenEnd() === offset && token !== tokenType)) {
                token = scanner.scan();
            }
            if (token === tokenType && offset <= scanner.getTokenEnd()) {
                return { start: document.positionAt(scanner.getTokenOffset()), end: document.positionAt(scanner.getTokenEnd()) };
            }
            return null;
        }
        function getEntityRange() {
            let k = offset - 1;
            let characterStart = position.character;
            while (k >= 0 && isLetterOrDigit(text, k)) {
                k--;
                characterStart--;
            }
            let n = k + 1;
            let characterEnd = characterStart;
            while (isLetterOrDigit(text, n)) {
                n++;
                characterEnd++;
            }
            if (k >= 0 && text[k] === '&') {
                let range = null;
                if (text[n] === ';') {
                    range = Range$1.create(Position$1.create(position.line, characterStart), Position$1.create(position.line, characterEnd + 1));
                }
                else {
                    range = Range$1.create(Position$1.create(position.line, characterStart), Position$1.create(position.line, characterEnd));
                }
                return range;
            }
            return null;
        }
        function filterEntity(text) {
            let k = offset - 1;
            let newText = '&';
            while (k >= 0 && isLetterOrDigit(text, k)) {
                k--;
            }
            k = k + 1;
            while (isLetterOrDigit(text, k)) {
                newText += text[k];
                k += 1;
            }
            newText += ';';
            return newText;
        }
        if (node.endTagStart && offset >= node.endTagStart) {
            const tagRange = getTagNameRange(TokenType$1.EndTag, node.endTagStart);
            if (tagRange) {
                return getTagHover(node.tag, tagRange);
            }
            return null;
        }
        const tagRange = getTagNameRange(TokenType$1.StartTag, node.start);
        if (tagRange) {
            return getTagHover(node.tag, tagRange);
        }
        const attrRange = getTagNameRange(TokenType$1.AttributeName, node.start);
        if (attrRange) {
            const tag = node.tag;
            const attr = document.getText(attrRange);
            return getAttrHover(tag, attr, attrRange);
        }
        const entityRange = getEntityRange();
        if (entityRange) {
            return getEntityHover(text, entityRange);
        }
        function scanAttrAndAttrValue(nodeStart, attrValueStart) {
            const scanner = createScanner$1(document.getText(), nodeStart);
            let token = scanner.scan();
            let prevAttr = undefined;
            while (token !== TokenType$1.EOS && (scanner.getTokenEnd() <= attrValueStart)) {
                token = scanner.scan();
                if (token === TokenType$1.AttributeName) {
                    prevAttr = scanner.getTokenText();
                }
            }
            return prevAttr;
        }
        const attrValueRange = getTagNameRange(TokenType$1.AttributeValue, node.start);
        if (attrValueRange) {
            const tag = node.tag;
            const attrValue = trimQuotes(document.getText(attrValueRange));
            const matchAttr = scanAttrAndAttrValue(node.start, document.offsetAt(attrValueRange.start));
            if (matchAttr) {
                return getAttrValueHover(tag, matchAttr, attrValue, attrValueRange);
            }
        }
        return null;
    }
    convertContents(contents) {
        if (!this.doesSupportMarkdown()) {
            if (typeof contents === 'string') {
                return contents;
            }
            else if ('kind' in contents) {
                return {
                    kind: 'plaintext',
                    value: contents.value
                };
            }
            else if (Array.isArray(contents)) {
                contents.map(c => {
                    return typeof c === 'string' ? c : c.value;
                });
            }
            else {
                return contents.value;
            }
        }
        return contents;
    }
    doesSupportMarkdown() {
        if (!isDefined$1(this.supportsMarkdown)) {
            if (!isDefined$1(this.lsOptions.clientCapabilities)) {
                this.supportsMarkdown = true;
                return this.supportsMarkdown;
            }
            const contentFormat = this.lsOptions.clientCapabilities?.textDocument?.hover?.contentFormat;
            this.supportsMarkdown = Array.isArray(contentFormat) && contentFormat.indexOf(MarkupKind$1.Markdown) !== -1;
        }
        return this.supportsMarkdown;
    }
}
function trimQuotes(s) {
    if (s.length <= 1) {
        return s.replace(/['"]/, '');
    }
    if (s[0] === `'` || s[0] === `"`) {
        s = s.slice(1);
    }
    if (s[s.length - 1] === `'` || s[s.length - 1] === `"`) {
        s = s.slice(0, -1);
    }
    return s;
}

function js_beautify(js_source_text, options) {
    return js_source_text;
}

var legacy_beautify_css$1;
 (function() {
 	var __webpack_modules__ = ([
,
,
 (function(module) {
function OutputLine(parent) {
  this.__parent = parent;
  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 = [];
}
OutputLine.prototype.clone_empty = function() {
  var line = new OutputLine(this.__parent);
  line.set_indent(this.__indent_count, this.__alignment_count);
  return line;
};
OutputLine.prototype.item = function(index) {
  if (index < 0) {
    return this.__items[this.__items.length + index];
  } else {
    return this.__items[index];
  }
};
OutputLine.prototype.has_match = function(pattern) {
  for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {
    if (this.__items[lastCheckedOutput].match(pattern)) {
      return true;
    }
  }
  return false;
};
OutputLine.prototype.set_indent = function(indent, alignment) {
  if (this.is_empty()) {
    this.__indent_count = indent || 0;
    this.__alignment_count = alignment || 0;
    this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);
  }
};
OutputLine.prototype._set_wrap_point = function() {
  if (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;
  }
};
OutputLine.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;
};
OutputLine.prototype._allow_wrap = function() {
  if (this._should_wrap()) {
    this.__parent.add_new_line();
    var next = this.__parent.current_line;
    next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);
    next.__items = this.__items.slice(this.__wrap_point_index);
    this.__items = this.__items.slice(0, this.__wrap_point_index);
    next.__character_count += this.__character_count - this.__wrap_point_character_count;
    this.__character_count = this.__wrap_point_character_count;
    if (next.__items[0] === " ") {
      next.__items.splice(0, 1);
      next.__character_count -= 1;
    }
    return true;
  }
  return false;
};
OutputLine.prototype.is_empty = function() {
  return this.__items.length === 0;
};
OutputLine.prototype.last = function() {
  if (!this.is_empty()) {
    return this.__items[this.__items.length - 1];
  } else {
    return null;
  }
};
OutputLine.prototype.push = function(item) {
  this.__items.push(item);
  var last_newline_index = item.lastIndexOf('\n');
  if (last_newline_index !== -1) {
    this.__character_count = item.length - last_newline_index;
  } else {
    this.__character_count += item.length;
  }
};
OutputLine.prototype.pop = function() {
  var item = null;
  if (!this.is_empty()) {
    item = this.__items.pop();
    this.__character_count -= item.length;
  }
  return item;
};
OutputLine.prototype._remove_indent = function() {
  if (this.__indent_count > 0) {
    this.__indent_count -= 1;
    this.__character_count -= this.__parent.indent_size;
  }
};
OutputLine.prototype._remove_wrap_indent = function() {
  if (this.__wrap_point_indent_count > 0) {
    this.__wrap_point_indent_count -= 1;
  }
};
OutputLine.prototype.trim = function() {
  while (this.last() === ' ') {
    this.__items.pop();
    this.__character_count -= 1;
  }
};
OutputLine.prototype.toString = function() {
  var result = '';
  if (this.is_empty()) {
    if (this.__parent.indent_empty_lines) {
      result = this.__parent.get_indent_string(this.__indent_count);
    }
  } else {
    result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);
    result += this.__items.join('');
  }
  return result;
};
function IndentStringCache(options, baseIndentString) {
  this.__cache = [''];
  this.__indent_size = options.indent_size;
  this.__indent_string = options.indent_char;
  if (!options.indent_with_tabs) {
    this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);
  }
  baseIndentString = baseIndentString || '';
  if (options.indent_level > 0) {
    baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);
  }
  this.__base_string = baseIndentString;
  this.__base_string_length = baseIndentString.length;
}
IndentStringCache.prototype.get_indent_size = function(indent, column) {
  var result = this.__base_string_length;
  column = column || 0;
  if (indent < 0) {
    result = 0;
  }
  result += indent * this.__indent_size;
  result += column;
  return result;
};
IndentStringCache.prototype.get_indent_string = function(indent_level, column) {
  var result = this.__base_string;
  column = column || 0;
  if (indent_level < 0) {
    indent_level = 0;
    result = '';
  }
  column += indent_level * this.__indent_size;
  this.__ensure_cache(column);
  result += this.__cache[column];
  return result;
};
IndentStringCache.prototype.__ensure_cache = function(column) {
  while (column >= this.__cache.length) {
    this.__add_column();
  }
};
IndentStringCache.prototype.__add_column = function() {
  var column = this.__cache.length;
  var indent = 0;
  var result = '';
  if (this.__indent_size && column >= this.__indent_size) {
    indent = Math.floor(column / this.__indent_size);
    column -= indent * this.__indent_size;
    result = new Array(indent + 1).join(this.__indent_string);
  }
  if (column) {
    result += new Array(column + 1).join(' ');
  }
  this.__cache.push(result);
};
function Output(options, baseIndentString) {
  this.__indent_cache = new IndentStringCache(options, baseIndentString);
  this.raw = false;
  this._end_with_newline = options.end_with_newline;
  this.indent_size = options.indent_size;
  this.wrap_line_length = options.wrap_line_length;
  this.indent_empty_lines = options.indent_empty_lines;
  this.__lines = [];
  this.previous_line = null;
  this.current_line = null;
  this.next_line = new OutputLine(this);
  this.space_before_token = false;
  this.non_breaking_space = false;
  this.previous_token_wrapped = false;
  this.__add_outputline();
}
Output.prototype.__add_outputline = function() {
  this.previous_line = this.current_line;
  this.current_line = this.next_line.clone_empty();
  this.__lines.push(this.current_line);
};
Output.prototype.get_line_number = function() {
  return this.__lines.length;
};
Output.prototype.get_indent_string = function(indent, column) {
  return this.__indent_cache.get_indent_string(indent, column);
};
Output.prototype.get_indent_size = function(indent, column) {
  return this.__indent_cache.get_indent_size(indent, column);
};
Output.prototype.is_empty = function() {
  return !this.previous_line && this.current_line.is_empty();
};
Output.prototype.add_new_line = function(force_newline) {
  if (this.is_empty() ||
    (!force_newline && this.just_added_newline())) {
    return false;
  }
  if (!this.raw) {
    this.__add_outputline();
  }
  return true;
};
Output.prototype.get_code = function(eol) {
  this.trim(true);
  var last_item = this.current_line.pop();
  if (last_item) {
    if (last_item[last_item.length - 1] === '\n') {
      last_item = last_item.replace(/\n+$/g, '');
    }
    this.current_line.push(last_item);
  }
  if (this._end_with_newline) {
    this.__add_outputline();
  }
  var sweet_code = this.__lines.join('\n');
  if (eol !== '\n') {
    sweet_code = sweet_code.replace(/[\n]/g, eol);
  }
  return sweet_code;
};
Output.prototype.set_wrap_point = function() {
  this.current_line._set_wrap_point();
};
Output.prototype.set_indent = function(indent, alignment) {
  indent = indent || 0;
  alignment = alignment || 0;
  this.next_line.set_indent(indent, alignment);
  if (this.__lines.length > 1) {
    this.current_line.set_indent(indent, alignment);
    return true;
  }
  this.current_line.set_indent();
  return false;
};
Output.prototype.add_raw_token = function(token) {
  for (var x = 0; x < token.newlines; x++) {
    this.__add_outputline();
  }
  this.current_line.set_indent(-1);
  this.current_line.push(token.whitespace_before);
  this.current_line.push(token.text);
  this.space_before_token = false;
  this.non_breaking_space = false;
  this.previous_token_wrapped = false;
};
Output.prototype.add_token = function(printable_token) {
  this.__add_space_before_token();
  this.current_line.push(printable_token);
  this.space_before_token = false;
  this.non_breaking_space = false;
  this.previous_token_wrapped = this.current_line._allow_wrap();
};
Output.prototype.__add_space_before_token = function() {
  if (this.space_before_token && !this.just_added_newline()) {
    if (!this.non_breaking_space) {
      this.set_wrap_point();
    }
    this.current_line.push(' ');
  }
};
Output.prototype.remove_indent = function(index) {
  var output_length = this.__lines.length;
  while (index < output_length) {
    this.__lines[index]._remove_indent();
    index++;
  }
  this.current_line._remove_wrap_indent();
};
Output.prototype.trim = function(eat_newlines) {
  eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;
  this.current_line.trim();
  while (eat_newlines && 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;
};
Output.prototype.just_added_newline = function() {
  return this.current_line.is_empty();
};
Output.prototype.just_added_blankline = function() {
  return this.is_empty() ||
    (this.current_line.is_empty() && this.previous_line.is_empty());
};
Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) {
  var index = this.__lines.length - 2;
  while (index >= 0) {
    var potentialEmptyLine = this.__lines[index];
    if (potentialEmptyLine.is_empty()) {
      break;
    } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 &&
      potentialEmptyLine.item(-1) !== ends_with) {
      this.__lines.splice(index + 1, 0, new OutputLine(this));
      this.previous_line = this.__lines[this.__lines.length - 2];
      break;
    }
    index--;
  }
};
module.exports.Output = Output;
 }),
,
,
,
 (function(module) {
function Options(options, merge_child_field) {
  this.raw_options = _mergeOpts(options, merge_child_field);
  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', true);
  this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786);
  if (!this.preserve_newlines) {
    this.max_preserve_newlines = 0;
  }
  this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\t');
  if (this.indent_with_tabs) {
    this.indent_char = '\t';
    if (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', 'angular', 'django', 'erb', 'handlebars', 'php', 'smarty'], ['auto']);
}
Options.prototype._get_array = function(name, default_value) {
  var option_value = this.raw_options[name];
  var result = default_value || [];
  if (typeof option_value === 'object') {
    if (option_value !== null && typeof option_value.concat === 'function') {
      result = option_value.concat();
    }
  } else if (typeof option_value === 'string') {
    result = option_value.split(/[^a-zA-Z0-9_\/\-]+/);
  }
  return result;
};
Options.prototype._get_boolean = function(name, default_value) {
  var option_value = this.raw_options[name];
  var result = option_value === undefined ? !!default_value : !!option_value;
  return result;
};
Options.prototype._get_characters = function(name, default_value) {
  var option_value = this.raw_options[name];
  var result = default_value || '';
  if (typeof option_value === 'string') {
    result = option_value.replace(/\\r/, '\r').replace(/\\n/, '\n').replace(/\\t/, '\t');
  }
  return result;
};
Options.prototype._get_number = function(name, default_value) {
  var option_value = this.raw_options[name];
  default_value = parseInt(default_value, 10);
  if (isNaN(default_value)) {
    default_value = 0;
  }
  var result = parseInt(option_value, 10);
  if (isNaN(result)) {
    result = default_value;
  }
  return result;
};
Options.prototype._get_selection = function(name, selection_list, default_value) {
  var result = this._get_selection_list(name, selection_list, default_value);
  if (result.length !== 1) {
    throw new Error(
      "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" +
      selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
  }
  return result[0];
};
Options.prototype._get_selection_list = function(name, selection_list, default_value) {
  if (!selection_list || selection_list.length === 0) {
    throw new Error("Selection list cannot be empty.");
  }
  default_value = default_value || [selection_list[0]];
  if (!this._is_valid_selection(default_value, selection_list)) {
    throw new Error("Invalid Default Value!");
  }
  var result = this._get_array(name, default_value);
  if (!this._is_valid_selection(result, selection_list)) {
    throw new Error(
      "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" +
      selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
  }
  return result;
};
Options.prototype._is_valid_selection = function(result, selection_list) {
  return result.length && selection_list.length &&
    !result.some(function(item) { return selection_list.indexOf(item) === -1; });
};
function _mergeOpts(allOptions, childFieldName) {
  var finalOpts = {};
  allOptions = _normalizeOpts(allOptions);
  var name;
  for (name in allOptions) {
    if (name !== childFieldName) {
      finalOpts[name] = allOptions[name];
    }
  }
  if (childFieldName && allOptions[childFieldName]) {
    for (name in allOptions[childFieldName]) {
      finalOpts[name] = allOptions[childFieldName][name];
    }
  }
  return finalOpts;
}
function _normalizeOpts(options) {
  var convertedOpts = {};
  var key;
  for (key in options) {
    var newKey = key.replace(/-/g, "_");
    convertedOpts[newKey] = options[key];
  }
  return convertedOpts;
}
module.exports.Options = Options;
module.exports.normalizeOpts = _normalizeOpts;
module.exports.mergeOpts = _mergeOpts;
 }),
,
 (function(module) {
var regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky');
function InputScanner(input_string) {
  this.__input = input_string || '';
  this.__input_length = this.__input.length;
  this.__position = 0;
}
InputScanner.prototype.restart = function() {
  this.__position = 0;
};
InputScanner.prototype.back = function() {
  if (this.__position > 0) {
    this.__position -= 1;
  }
};
InputScanner.prototype.hasNext = function() {
  return this.__position < this.__input_length;
};
InputScanner.prototype.next = function() {
  var val = null;
  if (this.hasNext()) {
    val = this.__input.charAt(this.__position);
    this.__position += 1;
  }
  return val;
};
InputScanner.prototype.peek = function(index) {
  var val = null;
  index = index || 0;
  index += this.__position;
  if (index >= 0 && index < this.__input_length) {
    val = this.__input.charAt(index);
  }
  return val;
};
InputScanner.prototype.__match = function(pattern, index) {
  pattern.lastIndex = index;
  var pattern_match = pattern.exec(this.__input);
  if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {
    if (pattern_match.index !== index) {
      pattern_match = null;
    }
  }
  return pattern_match;
};
InputScanner.prototype.test = function(pattern, index) {
  index = index || 0;
  index += this.__position;
  if (index >= 0 && index < this.__input_length) {
    return !!this.__match(pattern, index);
  } else {
    return false;
  }
};
InputScanner.prototype.testChar = function(pattern, index) {
  var val = this.peek(index);
  pattern.lastIndex = 0;
  return val !== null && pattern.test(val);
};
InputScanner.prototype.match = function(pattern) {
  var pattern_match = this.__match(pattern, this.__position);
  if (pattern_match) {
    this.__position += pattern_match[0].length;
  } else {
    pattern_match = null;
  }
  return pattern_match;
};
InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {
  var val = '';
  var match;
  if (starting_pattern) {
    match = this.match(starting_pattern);
    if (match) {
      val += match[0];
    }
  }
  if (until_pattern && (match || !starting_pattern)) {
    val += this.readUntil(until_pattern, until_after);
  }
  return val;
};
InputScanner.prototype.readUntil = function(pattern, until_after) {
  var val = '';
  var match_index = this.__position;
  pattern.lastIndex = this.__position;
  var pattern_match = pattern.exec(this.__input);
  if (pattern_match) {
    match_index = pattern_match.index;
    if (until_after) {
      match_index += pattern_match[0].length;
    }
  } else {
    match_index = this.__input_length;
  }
  val = this.__input.substring(this.__position, match_index);
  this.__position = match_index;
  return val;
};
InputScanner.prototype.readUntilAfter = function(pattern) {
  return this.readUntil(pattern, true);
};
InputScanner.prototype.get_regexp = function(pattern, match_from) {
  var result = null;
  var flags = 'g';
  if (match_from && regexp_has_sticky) {
    flags = 'y';
  }
  if (typeof pattern === "string" && pattern !== '') {
    result = new RegExp(pattern, flags);
  } else if (pattern) {
    result = new RegExp(pattern.source, flags);
  }
  return result;
};
InputScanner.prototype.get_literal_regexp = function(literal_string) {
  return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'));
};
InputScanner.prototype.peekUntilAfter = function(pattern) {
  var start = this.__position;
  var val = this.readUntilAfter(pattern);
  this.__position = start;
  return val;
};
InputScanner.prototype.lookBack = function(testVal) {
  var start = this.__position - 1;
  return start >= testVal.length && this.__input.substring(start - testVal.length, start)
    .toLowerCase() === testVal;
};
module.exports.InputScanner = InputScanner;
 }),
,
,
,
,
 (function(module) {
function Directives(start_block_pattern, end_block_pattern) {
  start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source;
  end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source;
  this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, 'g');
  this.__directive_pattern = / (\w+)[:](\w+)/g;
  this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, 'g');
}
Directives.prototype.get_directives = function(text) {
  if (!text.match(this.__directives_block_pattern)) {
    return null;
  }
  var directives = {};
  this.__directive_pattern.lastIndex = 0;
  var directive_match = this.__directive_pattern.exec(text);
  while (directive_match) {
    directives[directive_match[1]] = directive_match[2];
    directive_match = this.__directive_pattern.exec(text);
  }
  return directives;
};
Directives.prototype.readIgnored = function(input) {
  return input.readUntilAfter(this.__directives_end_ignore_pattern);
};
module.exports.Directives = Directives;
 }),
,
 (function(module, __unused_webpack_exports, __webpack_require__) {
var Beautifier = (__webpack_require__(16).Beautifier),
  Options = (__webpack_require__(17).Options);
function css_beautify(source_text, options) {
  var beautifier = new Beautifier(source_text, options);
  return beautifier.beautify();
}
module.exports = css_beautify;
module.exports.defaultOptions = function() {
  return new Options();
};
 }),
 (function(module, __unused_webpack_exports, __webpack_require__) {
var Options = (__webpack_require__(17).Options);
var Output = (__webpack_require__(2).Output);
var InputScanner = (__webpack_require__(8).InputScanner);
var Directives = (__webpack_require__(13).Directives);
var directives_core = new Directives(/\/\*/, /\*\//);
var lineBreak = /\r\n|[\r\n]/;
var allLineBreaks = /\r\n|[\r\n]/g;
var whitespaceChar = /\s/;
var whitespacePattern = /(?:\s|\n)+/g;
var block_comment_pattern = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g;
var comment_pattern = /\/\/(?:[^\n\r\u2028\u2029]*)/g;
function Beautifier(source_text, options) {
  this._source_text = source_text || '';
  this._options = new Options(options);
  this._ch = null;
  this._input = null;
  this.NESTED_AT_RULE = {
    "page": true,
    "font-face": true,
    "keyframes": true,
    "media": true,
    "supports": true,
    "document": true
  };
  this.CONDITIONAL_GROUP_RULE = {
    "media": true,
    "supports": true,
    "document": true
  };
  this.NON_SEMICOLON_NEWLINE_PROPERTY = [
    "grid-template-areas",
    "grid-template"
  ];
}
Beautifier.prototype.eatString = function(endChars) {
  var result = '';
  this._ch = this._input.next();
  while (this._ch) {
    result += this._ch;
    if (this._ch === "\\") {
      result += this._input.next();
    } else if (endChars.indexOf(this._ch) !== -1 || this._ch === "\n") {
      break;
    }
    this._ch = this._input.next();
  }
  return result;
};
Beautifier.prototype.eatWhitespace = function(allowAtLeastOneNewLine) {
  var result = whitespaceChar.test(this._input.peek());
  var newline_count = 0;
  while (whitespaceChar.test(this._input.peek())) {
    this._ch = this._input.next();
    if (allowAtLeastOneNewLine && this._ch === '\n') {
      if (newline_count === 0 || newline_count < this._options.max_preserve_newlines) {
        newline_count++;
        this._output.add_new_line(true);
      }
    }
  }
  return result;
};
Beautifier.prototype.foundNestedPseudoClass = function() {
  var openParen = 0;
  var i = 1;
  var ch = this._input.peek(i);
  while (ch) {
    if (ch === "{") {
      return true;
    } else if (ch === '(') {
      openParen += 1;
    } else if (ch === ')') {
      if (openParen === 0) {
        return false;
      }
      openParen -= 1;
    } else if (ch === ";" || ch === "}") {
      return false;
    }
    i++;
    ch = this._input.peek(i);
  }
  return false;
};
Beautifier.prototype.print_string = function(output_string) {
  this._output.set_indent(this._indentLevel);
  this._output.non_breaking_space = true;
  this._output.add_token(output_string);
};
Beautifier.prototype.preserveSingleSpace = function(isAfterSpace) {
  if (isAfterSpace) {
    this._output.space_before_token = true;
  }
};
Beautifier.prototype.indent = function() {
  this._indentLevel++;
};
Beautifier.prototype.outdent = function() {
  if (this._indentLevel > 0) {
    this._indentLevel--;
  }
};
Beautifier.prototype.beautify = function() {
  if (this._options.disabled) {
    return this._source_text;
  }
  var source_text = this._source_text;
  var eol = this._options.eol;
  if (eol === 'auto') {
    eol = '\n';
    if (source_text && lineBreak.test(source_text || '')) {
      eol = source_text.match(lineBreak)[0];
    }
  }
  source_text = source_text.replace(allLineBreaks, '\n');
  var baseIndentString = source_text.match(/^[\t ]*/)[0];
  this._output = new Output(this._options, baseIndentString);
  this._input = new InputScanner(source_text);
  this._indentLevel = 0;
  this._nestedLevel = 0;
  this._ch = null;
  var parenLevel = 0;
  var insideRule = false;
  var insidePropertyValue = false;
  var enteringConditionalGroup = false;
  var insideNonNestedAtRule = false;
  var insideScssMap = false;
  var topCharacter = this._ch;
  var insideNonSemiColonValues = false;
  var whitespace;
  var isAfterSpace;
  var previous_ch;
  while (true) {
    whitespace = this._input.read(whitespacePattern);
    isAfterSpace = whitespace !== '';
    previous_ch = topCharacter;
    this._ch = this._input.next();
    if (this._ch === '\\' && this._input.hasNext()) {
      this._ch += this._input.next();
    }
    topCharacter = this._ch;
    if (!this._ch) {
      break;
    } else if (this._ch === '/' && this._input.peek() === '*') {
      this._output.add_new_line();
      this._input.back();
      var comment = this._input.read(block_comment_pattern);
      var directives = directives_core.get_directives(comment);
      if (directives && directives.ignore === 'start') {
        comment += directives_core.readIgnored(this._input);
      }
      this.print_string(comment);
      this.eatWhitespace(true);
      this._output.add_new_line();
    } else if (this._ch === '/' && this._input.peek() === '/') {
      this._output.space_before_token = true;
      this._input.back();
      this.print_string(this._input.read(comment_pattern));
      this.eatWhitespace(true);
    } else if (this._ch === '$') {
      this.preserveSingleSpace(isAfterSpace);
      this.print_string(this._ch);
      var variable = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
      if (variable.match(/[ :]$/)) {
        variable = this.eatString(": ").replace(/\s+$/, '');
        this.print_string(variable);
        this._output.space_before_token = true;
      }
      if (parenLevel === 0 && variable.indexOf(':') !== -1) {
        insidePropertyValue = true;
        this.indent();
      }
    } else if (this._ch === '@') {
      this.preserveSingleSpace(isAfterSpace);
      if (this._input.peek() === '{') {
        this.print_string(this._ch + this.eatString('}'));
      } else {
        this.print_string(this._ch);
        var variableOrRule = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
        if (variableOrRule.match(/[ :]$/)) {
          variableOrRule = this.eatString(": ").replace(/\s+$/, '');
          this.print_string(variableOrRule);
          this._output.space_before_token = true;
        }
        if (parenLevel === 0 && variableOrRule.indexOf(':') !== -1) {
          insidePropertyValue = true;
          this.indent();
        } else if (variableOrRule in this.NESTED_AT_RULE) {
          this._nestedLevel += 1;
          if (variableOrRule in this.CONDITIONAL_GROUP_RULE) {
            enteringConditionalGroup = true;
          }
        } else if (parenLevel === 0 && !insidePropertyValue) {
          insideNonNestedAtRule = true;
        }
      }
    } else if (this._ch === '#' && this._input.peek() === '{') {
      this.preserveSingleSpace(isAfterSpace);
      this.print_string(this._ch + this.eatString('}'));
    } else if (this._ch === '{') {
      if (insidePropertyValue) {
        insidePropertyValue = false;
        this.outdent();
      }
      insideNonNestedAtRule = false;
      if (enteringConditionalGroup) {
        enteringConditionalGroup = false;
        insideRule = (this._indentLevel >= this._nestedLevel);
      } else {
        insideRule = (this._indentLevel >= this._nestedLevel - 1);
      }
      if (this._options.newline_between_rules && insideRule) {
        if (this._output.previous_line && this._output.previous_line.item(-1) !== '{') {
          this._output.ensure_empty_line_above('/', ',');
        }
      }
      this._output.space_before_token = true;
      if (this._options.brace_style === 'expand') {
        this._output.add_new_line();
        this.print_string(this._ch);
        this.indent();
        this._output.set_indent(this._indentLevel);
      } else {
        if (previous_ch === '(') {
          this._output.space_before_token = false;
        } else if (previous_ch !== ',') {
          this.indent();
        }
        this.print_string(this._ch);
      }
      this.eatWhitespace(true);
      this._output.add_new_line();
    } else if (this._ch === '}') {
      this.outdent();
      this._output.add_new_line();
      if (previous_ch === '{') {
        this._output.trim(true);
      }
      if (insidePropertyValue) {
        this.outdent();
        insidePropertyValue = false;
      }
      this.print_string(this._ch);
      insideRule = false;
      if (this._nestedLevel) {
        this._nestedLevel--;
      }
      this.eatWhitespace(true);
      this._output.add_new_line();
      if (this._options.newline_between_rules && !this._output.just_added_blankline()) {
        if (this._input.peek() !== '}') {
          this._output.add_new_line(true);
        }
      }
      if (this._input.peek() === ')') {
        this._output.trim(true);
        if (this._options.brace_style === "expand") {
          this._output.add_new_line(true);
        }
      }
    } else if (this._ch === ":") {
      for (var i = 0; i < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; i++) {
        if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[i])) {
          insideNonSemiColonValues = true;
          break;
        }
      }
      if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideNonNestedAtRule && parenLevel === 0) {
        this.print_string(':');
        if (!insidePropertyValue) {
          insidePropertyValue = true;
          this._output.space_before_token = true;
          this.eatWhitespace(true);
          this.indent();
        }
      } else {
        if (this._input.lookBack(" ")) {
          this._output.space_before_token = true;
        }
        if (this._input.peek() === ":") {
          this._ch = this._input.next();
          this.print_string("::");
        } else {
          this.print_string(':');
        }
      }
    } else if (this._ch === '"' || this._ch === '\'') {
      var preserveQuoteSpace = previous_ch === '"' || previous_ch === '\'';
      this.preserveSingleSpace(preserveQuoteSpace || isAfterSpace);
      this.print_string(this._ch + this.eatString(this._ch));
      this.eatWhitespace(true);
    } else if (this._ch === ';') {
      insideNonSemiColonValues = false;
      if (parenLevel === 0) {
        if (insidePropertyValue) {
          this.outdent();
          insidePropertyValue = false;
        }
        insideNonNestedAtRule = false;
        this.print_string(this._ch);
        this.eatWhitespace(true);
        if (this._input.peek() !== '/') {
          this._output.add_new_line();
        }
      } else {
        this.print_string(this._ch);
        this.eatWhitespace(true);
        this._output.space_before_token = true;
      }
    } else if (this._ch === '(') {
      if (this._input.lookBack("url")) {
        this.print_string(this._ch);
        this.eatWhitespace();
        parenLevel++;
        this.indent();
        this._ch = this._input.next();
        if (this._ch === ')' || this._ch === '"' || this._ch === '\'') {
          this._input.back();
        } else if (this._ch) {
          this.print_string(this._ch + this.eatString(')'));
          if (parenLevel) {
            parenLevel--;
            this.outdent();
          }
        }
      } else {
        var space_needed = false;
        if (this._input.lookBack("with")) {
          space_needed = true;
        }
        this.preserveSingleSpace(isAfterSpace || space_needed);
        this.print_string(this._ch);
        if (insidePropertyValue && previous_ch === "$" && this._options.selector_separator_newline) {
          this._output.add_new_line();
          insideScssMap = true;
        } else {
          this.eatWhitespace();
          parenLevel++;
          this.indent();
        }
      }
    } else if (this._ch === ')') {
      if (parenLevel) {
        parenLevel--;
        this.outdent();
      }
      if (insideScssMap && this._input.peek() === ";" && this._options.selector_separator_newline) {
        insideScssMap = false;
        this.outdent();
        this._output.add_new_line();
      }
      this.print_string(this._ch);
    } else if (this._ch === ',') {
      this.print_string(this._ch);
      this.eatWhitespace(true);
      if (this._options.selector_separator_newline && (!insidePropertyValue || insideScssMap) && parenLevel === 0 && !insideNonNestedAtRule) {
        this._output.add_new_line();
      } else {
        this._output.space_before_token = true;
      }
    } else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !insidePropertyValue && parenLevel === 0) {
      if (this._options.space_around_combinator) {
        this._output.space_before_token = true;
        this.print_string(this._ch);
        this._output.space_before_token = true;
      } else {
        this.print_string(this._ch);
        this.eatWhitespace();
        if (this._ch && whitespaceChar.test(this._ch)) {
          this._ch = '';
        }
      }
    } else if (this._ch === ']') {
      this.print_string(this._ch);
    } else if (this._ch === '[') {
      this.preserveSingleSpace(isAfterSpace);
      this.print_string(this._ch);
    } else if (this._ch === '=') {
      this.eatWhitespace();
      this.print_string('=');
      if (whitespaceChar.test(this._ch)) {
        this._ch = '';
      }
    } else if (this._ch === '!' && !this._input.lookBack("\\")) {
      this._output.space_before_token = true;
      this.print_string(this._ch);
    } else {
      var preserveAfterSpace = previous_ch === '"' || previous_ch === '\'';
      this.preserveSingleSpace(preserveAfterSpace || isAfterSpace);
      this.print_string(this._ch);
      if (!this._output.just_added_newline() && this._input.peek() === '\n' && insideNonSemiColonValues) {
        this._output.add_new_line();
      }
    }
  }
  var sweetCode = this._output.get_code(eol);
  return sweetCode;
};
module.exports.Beautifier = Beautifier;
 }),
 (function(module, __unused_webpack_exports, __webpack_require__) {
var BaseOptions = (__webpack_require__(6).Options);
function Options(options) {
  BaseOptions.call(this, options, 'css');
  this.selector_separator_newline = this._get_boolean('selector_separator_newline', true);
  this.newline_between_rules = this._get_boolean('newline_between_rules', true);
  var space_around_selector_separator = this._get_boolean('space_around_selector_separator');
  this.space_around_combinator = this._get_boolean('space_around_combinator') || space_around_selector_separator;
  var brace_style_split = this._get_selection_list('brace_style', ['collapse', 'expand', 'end-expand', 'none', 'preserve-inline']);
  this.brace_style = 'collapse';
  for (var bs = 0; bs < brace_style_split.length; bs++) {
    if (brace_style_split[bs] !== 'expand') {
      this.brace_style = 'collapse';
    } else {
      this.brace_style = brace_style_split[bs];
    }
  }
}
Options.prototype = new BaseOptions();
module.exports.Options = Options;
 })
 	]);
 	var __webpack_module_cache__ = {};
 	function __webpack_require__(moduleId) {
 		var cachedModule = __webpack_module_cache__[moduleId];
 		if (cachedModule !== undefined) {
 			return cachedModule.exports;
 		}
 		var module = __webpack_module_cache__[moduleId] = {
 			exports: {}
 		};
 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
 		return module.exports;
 	}
 	var __webpack_exports__ = __webpack_require__(15);
 	legacy_beautify_css$1 = __webpack_exports__;
 })()
;
var css_beautify$1 = legacy_beautify_css$1;

var legacy_beautify_html;
 (function() {
 	var __webpack_modules__ = ([
,
,
 (function(module) {
function OutputLine(parent) {
  this.__parent = parent;
  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 = [];
}
OutputLine.prototype.clone_empty = function() {
  var line = new OutputLine(this.__parent);
  line.set_indent(this.__indent_count, this.__alignment_count);
  return line;
};
OutputLine.prototype.item = function(index) {
  if (index < 0) {
    return this.__items[this.__items.length + index];
  } else {
    return this.__items[index];
  }
};
OutputLine.prototype.has_match = function(pattern) {
  for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {
    if (this.__items[lastCheckedOutput].match(pattern)) {
      return true;
    }
  }
  return false;
};
OutputLine.prototype.set_indent = function(indent, alignment) {
  if (this.is_empty()) {
    this.__indent_count = indent || 0;
    this.__alignment_count = alignment || 0;
    this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);
  }
};
OutputLine.prototype._set_wrap_point = function() {
  if (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;
  }
};
OutputLine.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;
};
OutputLine.prototype._allow_wrap = function() {
  if (this._should_wrap()) {
    this.__parent.add_new_line();
    var next = this.__parent.current_line;
    next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);
    next.__items = this.__items.slice(this.__wrap_point_index);
    this.__items = this.__items.slice(0, this.__wrap_point_index);
    next.__character_count += this.__character_count - this.__wrap_point_character_count;
    this.__character_count = this.__wrap_point_character_count;
    if (next.__items[0] === " ") {
      next.__items.splice(0, 1);
      next.__character_count -= 1;
    }
    return true;
  }
  return false;
};
OutputLine.prototype.is_empty = function() {
  return this.__items.length === 0;
};
OutputLine.prototype.last = function() {
  if (!this.is_empty()) {
    return this.__items[this.__items.length - 1];
  } else {
    return null;
  }
};
OutputLine.prototype.push = function(item) {
  this.__items.push(item);
  var last_newline_index = item.lastIndexOf('\n');
  if (last_newline_index !== -1) {
    this.__character_count = item.length - last_newline_index;
  } else {
    this.__character_count += item.length;
  }
};
OutputLine.prototype.pop = function() {
  var item = null;
  if (!this.is_empty()) {
    item = this.__items.pop();
    this.__character_count -= item.length;
  }
  return item;
};
OutputLine.prototype._remove_indent = function() {
  if (this.__indent_count > 0) {
    this.__indent_count -= 1;
    this.__character_count -= this.__parent.indent_size;
  }
};
OutputLine.prototype._remove_wrap_indent = function() {
  if (this.__wrap_point_indent_count > 0) {
    this.__wrap_point_indent_count -= 1;
  }
};
OutputLine.prototype.trim = function() {
  while (this.last() === ' ') {
    this.__items.pop();
    this.__character_count -= 1;
  }
};
OutputLine.prototype.toString = function() {
  var result = '';
  if (this.is_empty()) {
    if (this.__parent.indent_empty_lines) {
      result = this.__parent.get_indent_string(this.__indent_count);
    }
  } else {
    result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);
    result += this.__items.join('');
  }
  return result;
};
function IndentStringCache(options, baseIndentString) {
  this.__cache = [''];
  this.__indent_size = options.indent_size;
  this.__indent_string = options.indent_char;
  if (!options.indent_with_tabs) {
    this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);
  }
  baseIndentString = baseIndentString || '';
  if (options.indent_level > 0) {
    baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);
  }
  this.__base_string = baseIndentString;
  this.__base_string_length = baseIndentString.length;
}
IndentStringCache.prototype.get_indent_size = function(indent, column) {
  var result = this.__base_string_length;
  column = column || 0;
  if (indent < 0) {
    result = 0;
  }
  result += indent * this.__indent_size;
  result += column;
  return result;
};
IndentStringCache.prototype.get_indent_string = function(indent_level, column) {
  var result = this.__base_string;
  column = column || 0;
  if (indent_level < 0) {
    indent_level = 0;
    result = '';
  }
  column += indent_level * this.__indent_size;
  this.__ensure_cache(column);
  result += this.__cache[column];
  return result;
};
IndentStringCache.prototype.__ensure_cache = function(column) {
  while (column >= this.__cache.length) {
    this.__add_column();
  }
};
IndentStringCache.prototype.__add_column = function() {
  var column = this.__cache.length;
  var indent = 0;
  var result = '';
  if (this.__indent_size && column >= this.__indent_size) {
    indent = Math.floor(column / this.__indent_size);
    column -= indent * this.__indent_size;
    result = new Array(indent + 1).join(this.__indent_string);
  }
  if (column) {
    result += new Array(column + 1).join(' ');
  }
  this.__cache.push(result);
};
function Output(options, baseIndentString) {
  this.__indent_cache = new IndentStringCache(options, baseIndentString);
  this.raw = false;
  this._end_with_newline = options.end_with_newline;
  this.indent_size = options.indent_size;
  this.wrap_line_length = options.wrap_line_length;
  this.indent_empty_lines = options.indent_empty_lines;
  this.__lines = [];
  this.previous_line = null;
  this.current_line = null;
  this.next_line = new OutputLine(this);
  this.space_before_token = false;
  this.non_breaking_space = false;
  this.previous_token_wrapped = false;
  this.__add_outputline();
}
Output.prototype.__add_outputline = function() {
  this.previous_line = this.current_line;
  this.current_line = this.next_line.clone_empty();
  this.__lines.push(this.current_line);
};
Output.prototype.get_line_number = function() {
  return this.__lines.length;
};
Output.prototype.get_indent_string = function(indent, column) {
  return this.__indent_cache.get_indent_string(indent, column);
};
Output.prototype.get_indent_size = function(indent, column) {
  return this.__indent_cache.get_indent_size(indent, column);
};
Output.prototype.is_empty = function() {
  return !this.previous_line && this.current_line.is_empty();
};
Output.prototype.add_new_line = function(force_newline) {
  if (this.is_empty() ||
    (!force_newline && this.just_added_newline())) {
    return false;
  }
  if (!this.raw) {
    this.__add_outputline();
  }
  return true;
};
Output.prototype.get_code = function(eol) {
  this.trim(true);
  var last_item = this.current_line.pop();
  if (last_item) {
    if (last_item[last_item.length - 1] === '\n') {
      last_item = last_item.replace(/\n+$/g, '');
    }
    this.current_line.push(last_item);
  }
  if (this._end_with_newline) {
    this.__add_outputline();
  }
  var sweet_code = this.__lines.join('\n');
  if (eol !== '\n') {
    sweet_code = sweet_code.replace(/[\n]/g, eol);
  }
  return sweet_code;
};
Output.prototype.set_wrap_point = function() {
  this.current_line._set_wrap_point();
};
Output.prototype.set_indent = function(indent, alignment) {
  indent = indent || 0;
  alignment = alignment || 0;
  this.next_line.set_indent(indent, alignment);
  if (this.__lines.length > 1) {
    this.current_line.set_indent(indent, alignment);
    return true;
  }
  this.current_line.set_indent();
  return false;
};
Output.prototype.add_raw_token = function(token) {
  for (var x = 0; x < token.newlines; x++) {
    this.__add_outputline();
  }
  this.current_line.set_indent(-1);
  this.current_line.push(token.whitespace_before);
  this.current_line.push(token.text);
  this.space_before_token = false;
  this.non_breaking_space = false;
  this.previous_token_wrapped = false;
};
Output.prototype.add_token = function(printable_token) {
  this.__add_space_before_token();
  this.current_line.push(printable_token);
  this.space_before_token = false;
  this.non_breaking_space = false;
  this.previous_token_wrapped = this.current_line._allow_wrap();
};
Output.prototype.__add_space_before_token = function() {
  if (this.space_before_token && !this.just_added_newline()) {
    if (!this.non_breaking_space) {
      this.set_wrap_point();
    }
    this.current_line.push(' ');
  }
};
Output.prototype.remove_indent = function(index) {
  var output_length = this.__lines.length;
  while (index < output_length) {
    this.__lines[index]._remove_indent();
    index++;
  }
  this.current_line._remove_wrap_indent();
};
Output.prototype.trim = function(eat_newlines) {
  eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;
  this.current_line.trim();
  while (eat_newlines && 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;
};
Output.prototype.just_added_newline = function() {
  return this.current_line.is_empty();
};
Output.prototype.just_added_blankline = function() {
  return this.is_empty() ||
    (this.current_line.is_empty() && this.previous_line.is_empty());
};
Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) {
  var index = this.__lines.length - 2;
  while (index >= 0) {
    var potentialEmptyLine = this.__lines[index];
    if (potentialEmptyLine.is_empty()) {
      break;
    } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 &&
      potentialEmptyLine.item(-1) !== ends_with) {
      this.__lines.splice(index + 1, 0, new OutputLine(this));
      this.previous_line = this.__lines[this.__lines.length - 2];
      break;
    }
    index--;
  }
};
module.exports.Output = Output;
 }),
 (function(module) {
function Token(type, text, newlines, whitespace_before) {
  this.type = type;
  this.text = text;
  this.comments_before = null;
  this.newlines = newlines || 0;
  this.whitespace_before = whitespace_before || '';
  this.parent = null;
  this.next = null;
  this.previous = null;
  this.opened = null;
  this.closed = null;
  this.directives = null;
}
module.exports.Token = Token;
 }),
,
,
 (function(module) {
function Options(options, merge_child_field) {
  this.raw_options = _mergeOpts(options, merge_child_field);
  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', true);
  this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786);
  if (!this.preserve_newlines) {
    this.max_preserve_newlines = 0;
  }
  this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\t');
  if (this.indent_with_tabs) {
    this.indent_char = '\t';
    if (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', 'angular', 'django', 'erb', 'handlebars', 'php', 'smarty'], ['auto']);
}
Options.prototype._get_array = function(name, default_value) {
  var option_value = this.raw_options[name];
  var result = default_value || [];
  if (typeof option_value === 'object') {
    if (option_value !== null && typeof option_value.concat === 'function') {
      result = option_value.concat();
    }
  } else if (typeof option_value === 'string') {
    result = option_value.split(/[^a-zA-Z0-9_\/\-]+/);
  }
  return result;
};
Options.prototype._get_boolean = function(name, default_value) {
  var option_value = this.raw_options[name];
  var result = option_value === undefined ? !!default_value : !!option_value;
  return result;
};
Options.prototype._get_characters = function(name, default_value) {
  var option_value = this.raw_options[name];
  var result = default_value || '';
  if (typeof option_value === 'string') {
    result = option_value.replace(/\\r/, '\r').replace(/\\n/, '\n').replace(/\\t/, '\t');
  }
  return result;
};
Options.prototype._get_number = function(name, default_value) {
  var option_value = this.raw_options[name];
  default_value = parseInt(default_value, 10);
  if (isNaN(default_value)) {
    default_value = 0;
  }
  var result = parseInt(option_value, 10);
  if (isNaN(result)) {
    result = default_value;
  }
  return result;
};
Options.prototype._get_selection = function(name, selection_list, default_value) {
  var result = this._get_selection_list(name, selection_list, default_value);
  if (result.length !== 1) {
    throw new Error(
      "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" +
      selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
  }
  return result[0];
};
Options.prototype._get_selection_list = function(name, selection_list, default_value) {
  if (!selection_list || selection_list.length === 0) {
    throw new Error("Selection list cannot be empty.");
  }
  default_value = default_value || [selection_list[0]];
  if (!this._is_valid_selection(default_value, selection_list)) {
    throw new Error("Invalid Default Value!");
  }
  var result = this._get_array(name, default_value);
  if (!this._is_valid_selection(result, selection_list)) {
    throw new Error(
      "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" +
      selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
  }
  return result;
};
Options.prototype._is_valid_selection = function(result, selection_list) {
  return result.length && selection_list.length &&
    !result.some(function(item) { return selection_list.indexOf(item) === -1; });
};
function _mergeOpts(allOptions, childFieldName) {
  var finalOpts = {};
  allOptions = _normalizeOpts(allOptions);
  var name;
  for (name in allOptions) {
    if (name !== childFieldName) {
      finalOpts[name] = allOptions[name];
    }
  }
  if (childFieldName && allOptions[childFieldName]) {
    for (name in allOptions[childFieldName]) {
      finalOpts[name] = allOptions[childFieldName][name];
    }
  }
  return finalOpts;
}
function _normalizeOpts(options) {
  var convertedOpts = {};
  var key;
  for (key in options) {
    var newKey = key.replace(/-/g, "_");
    convertedOpts[newKey] = options[key];
  }
  return convertedOpts;
}
module.exports.Options = Options;
module.exports.normalizeOpts = _normalizeOpts;
module.exports.mergeOpts = _mergeOpts;
 }),
,
 (function(module) {
var regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky');
function InputScanner(input_string) {
  this.__input = input_string || '';
  this.__input_length = this.__input.length;
  this.__position = 0;
}
InputScanner.prototype.restart = function() {
  this.__position = 0;
};
InputScanner.prototype.back = function() {
  if (this.__position > 0) {
    this.__position -= 1;
  }
};
InputScanner.prototype.hasNext = function() {
  return this.__position < this.__input_length;
};
InputScanner.prototype.next = function() {
  var val = null;
  if (this.hasNext()) {
    val = this.__input.charAt(this.__position);
    this.__position += 1;
  }
  return val;
};
InputScanner.prototype.peek = function(index) {
  var val = null;
  index = index || 0;
  index += this.__position;
  if (index >= 0 && index < this.__input_length) {
    val = this.__input.charAt(index);
  }
  return val;
};
InputScanner.prototype.__match = function(pattern, index) {
  pattern.lastIndex = index;
  var pattern_match = pattern.exec(this.__input);
  if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {
    if (pattern_match.index !== index) {
      pattern_match = null;
    }
  }
  return pattern_match;
};
InputScanner.prototype.test = function(pattern, index) {
  index = index || 0;
  index += this.__position;
  if (index >= 0 && index < this.__input_length) {
    return !!this.__match(pattern, index);
  } else {
    return false;
  }
};
InputScanner.prototype.testChar = function(pattern, index) {
  var val = this.peek(index);
  pattern.lastIndex = 0;
  return val !== null && pattern.test(val);
};
InputScanner.prototype.match = function(pattern) {
  var pattern_match = this.__match(pattern, this.__position);
  if (pattern_match) {
    this.__position += pattern_match[0].length;
  } else {
    pattern_match = null;
  }
  return pattern_match;
};
InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {
  var val = '';
  var match;
  if (starting_pattern) {
    match = this.match(starting_pattern);
    if (match) {
      val += match[0];
    }
  }
  if (until_pattern && (match || !starting_pattern)) {
    val += this.readUntil(until_pattern, until_after);
  }
  return val;
};
InputScanner.prototype.readUntil = function(pattern, until_after) {
  var val = '';
  var match_index = this.__position;
  pattern.lastIndex = this.__position;
  var pattern_match = pattern.exec(this.__input);
  if (pattern_match) {
    match_index = pattern_match.index;
    if (until_after) {
      match_index += pattern_match[0].length;
    }
  } else {
    match_index = this.__input_length;
  }
  val = this.__input.substring(this.__position, match_index);
  this.__position = match_index;
  return val;
};
InputScanner.prototype.readUntilAfter = function(pattern) {
  return this.readUntil(pattern, true);
};
InputScanner.prototype.get_regexp = function(pattern, match_from) {
  var result = null;
  var flags = 'g';
  if (match_from && regexp_has_sticky) {
    flags = 'y';
  }
  if (typeof pattern === "string" && pattern !== '') {
    result = new RegExp(pattern, flags);
  } else if (pattern) {
    result = new RegExp(pattern.source, flags);
  }
  return result;
};
InputScanner.prototype.get_literal_regexp = function(literal_string) {
  return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'));
};
InputScanner.prototype.peekUntilAfter = function(pattern) {
  var start = this.__position;
  var val = this.readUntilAfter(pattern);
  this.__position = start;
  return val;
};
InputScanner.prototype.lookBack = function(testVal) {
  var start = this.__position - 1;
  return start >= testVal.length && this.__input.substring(start - testVal.length, start)
    .toLowerCase() === testVal;
};
module.exports.InputScanner = InputScanner;
 }),
 (function(module, __unused_webpack_exports, __webpack_require__) {
var InputScanner = (__webpack_require__(8).InputScanner);
var Token = (__webpack_require__(3).Token);
var TokenStream = (__webpack_require__(10).TokenStream);
var WhitespacePattern = (__webpack_require__(11).WhitespacePattern);
var TOKEN = {
  START: 'TK_START',
  RAW: 'TK_RAW',
  EOF: 'TK_EOF'
};
var Tokenizer = function(input_string, options) {
  this._input = new InputScanner(input_string);
  this._options = options || {};
  this.__tokens = null;
  this._patterns = {};
  this._patterns.whitespace = new WhitespacePattern(this._input);
};
Tokenizer.prototype.tokenize = function() {
  this._input.restart();
  this.__tokens = new TokenStream();
  this._reset();
  var current;
  var previous = new Token(TOKEN.START, '');
  var open_token = null;
  var open_stack = [];
  var comments = new TokenStream();
  while (previous.type !== TOKEN.EOF) {
    current = this._get_next_token(previous, open_token);
    while (this._is_comment(current)) {
      comments.add(current);
      current = this._get_next_token(previous, open_token);
    }
    if (!comments.isEmpty()) {
      current.comments_before = comments;
      comments = new TokenStream();
    }
    current.parent = open_token;
    if (this._is_opening(current)) {
      open_stack.push(open_token);
      open_token = current;
    } else if (open_token && this._is_closing(current, open_token)) {
      current.opened = open_token;
      open_token.closed = current;
      open_token = open_stack.pop();
      current.parent = open_token;
    }
    current.previous = previous;
    previous.next = current;
    this.__tokens.add(current);
    previous = current;
  }
  return this.__tokens;
};
Tokenizer.prototype._is_first_token = function() {
  return this.__tokens.isEmpty();
};
Tokenizer.prototype._reset = function() {};
Tokenizer.prototype._get_next_token = function(previous_token, open_token) {
  this._readWhitespace();
  var resulting_string = this._input.read(/.+/g);
  if (resulting_string) {
    return this._create_token(TOKEN.RAW, resulting_string);
  } else {
    return this._create_token(TOKEN.EOF, '');
  }
};
Tokenizer.prototype._is_comment = function(current_token) {
  return false;
};
Tokenizer.prototype._is_opening = function(current_token) {
  return false;
};
Tokenizer.prototype._is_closing = function(current_token, open_token) {
  return false;
};
Tokenizer.prototype._create_token = function(type, text) {
  var token = new Token(type, text,
    this._patterns.whitespace.newline_count,
    this._patterns.whitespace.whitespace_before_token);
  return token;
};
Tokenizer.prototype._readWhitespace = function() {
  return this._patterns.whitespace.read();
};
module.exports.Tokenizer = Tokenizer;
module.exports.TOKEN = TOKEN;
 }),
 (function(module) {
function TokenStream(parent_token) {
  this.__tokens = [];
  this.__tokens_length = this.__tokens.length;
  this.__position = 0;
  this.__parent_token = parent_token;
}
TokenStream.prototype.restart = function() {
  this.__position = 0;
};
TokenStream.prototype.isEmpty = function() {
  return this.__tokens_length === 0;
};
TokenStream.prototype.hasNext = function() {
  return this.__position < this.__tokens_length;
};
TokenStream.prototype.next = function() {
  var val = null;
  if (this.hasNext()) {
    val = this.__tokens[this.__position];
    this.__position += 1;
  }
  return val;
};
TokenStream.prototype.peek = function(index) {
  var val = null;
  index = index || 0;
  index += this.__position;
  if (index >= 0 && index < this.__tokens_length) {
    val = this.__tokens[index];
  }
  return val;
};
TokenStream.prototype.add = function(token) {
  if (this.__parent_token) {
    token.parent = this.__parent_token;
  }
  this.__tokens.push(token);
  this.__tokens_length += 1;
};
module.exports.TokenStream = TokenStream;
 }),
 (function(module, __unused_webpack_exports, __webpack_require__) {
var Pattern = (__webpack_require__(12).Pattern);
function WhitespacePattern(input_scanner, parent) {
  Pattern.call(this, input_scanner, parent);
  if (parent) {
    this._line_regexp = this._input.get_regexp(parent._line_regexp);
  } else {
    this.__set_whitespace_patterns('', '');
  }
  this.newline_count = 0;
  this.whitespace_before_token = '';
}
WhitespacePattern.prototype = new Pattern();
WhitespacePattern.prototype.__set_whitespace_patterns = function(whitespace_chars, newline_chars) {
  whitespace_chars += '\\t ';
  newline_chars += '\\n\\r';
  this._match_pattern = this._input.get_regexp(
    '[' + whitespace_chars + newline_chars + ']+', true);
  this._newline_regexp = this._input.get_regexp(
    '\\r\\n|[' + newline_chars + ']');
};
WhitespacePattern.prototype.read = function() {
  this.newline_count = 0;
  this.whitespace_before_token = '';
  var resulting_string = this._input.read(this._match_pattern);
  if (resulting_string === ' ') {
    this.whitespace_before_token = ' ';
  } else if (resulting_string) {
    var matches = this.__split(this._newline_regexp, resulting_string);
    this.newline_count = matches.length - 1;
    this.whitespace_before_token = matches[this.newline_count];
  }
  return resulting_string;
};
WhitespacePattern.prototype.matching = function(whitespace_chars, newline_chars) {
  var result = this._create();
  result.__set_whitespace_patterns(whitespace_chars, newline_chars);
  result._update();
  return result;
};
WhitespacePattern.prototype._create = function() {
  return new WhitespacePattern(this._input, this);
};
WhitespacePattern.prototype.__split = function(regexp, input_string) {
  regexp.lastIndex = 0;
  var start_index = 0;
  var result = [];
  var next_match = regexp.exec(input_string);
  while (next_match) {
    result.push(input_string.substring(start_index, next_match.index));
    start_index = next_match.index + next_match[0].length;
    next_match = regexp.exec(input_string);
  }
  if (start_index < input_string.length) {
    result.push(input_string.substring(start_index, input_string.length));
  } else {
    result.push('');
  }
  return result;
};
module.exports.WhitespacePattern = WhitespacePattern;
 }),
 (function(module) {
function Pattern(input_scanner, parent) {
  this._input = input_scanner;
  this._starting_pattern = null;
  this._match_pattern = null;
  this._until_pattern = null;
  this._until_after = false;
  if (parent) {
    this._starting_pattern = this._input.get_regexp(parent._starting_pattern, true);
    this._match_pattern = this._input.get_regexp(parent._match_pattern, true);
    this._until_pattern = this._input.get_regexp(parent._until_pattern);
    this._until_after = parent._until_after;
  }
}
Pattern.prototype.read = function() {
  var result = this._input.read(this._starting_pattern);
  if (!this._starting_pattern || result) {
    result += this._input.read(this._match_pattern, this._until_pattern, this._until_after);
  }
  return result;
};
Pattern.prototype.read_match = function() {
  return this._input.match(this._match_pattern);
};
Pattern.prototype.until_after = function(pattern) {
  var result = this._create();
  result._until_after = true;
  result._until_pattern = this._input.get_regexp(pattern);
  result._update();
  return result;
};
Pattern.prototype.until = function(pattern) {
  var result = this._create();
  result._until_after = false;
  result._until_pattern = this._input.get_regexp(pattern);
  result._update();
  return result;
};
Pattern.prototype.starting_with = function(pattern) {
  var result = this._create();
  result._starting_pattern = this._input.get_regexp(pattern, true);
  result._update();
  return result;
};
Pattern.prototype.matching = function(pattern) {
  var result = this._create();
  result._match_pattern = this._input.get_regexp(pattern, true);
  result._update();
  return result;
};
Pattern.prototype._create = function() {
  return new Pattern(this._input, this);
};
Pattern.prototype._update = function() {};
module.exports.Pattern = Pattern;
 }),
 (function(module) {
function Directives(start_block_pattern, end_block_pattern) {
  start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source;
  end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source;
  this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, 'g');
  this.__directive_pattern = / (\w+)[:](\w+)/g;
  this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, 'g');
}
Directives.prototype.get_directives = function(text) {
  if (!text.match(this.__directives_block_pattern)) {
    return null;
  }
  var directives = {};
  this.__directive_pattern.lastIndex = 0;
  var directive_match = this.__directive_pattern.exec(text);
  while (directive_match) {
    directives[directive_match[1]] = directive_match[2];
    directive_match = this.__directive_pattern.exec(text);
  }
  return directives;
};
Directives.prototype.readIgnored = function(input) {
  return input.readUntilAfter(this.__directives_end_ignore_pattern);
};
module.exports.Directives = Directives;
 }),
 (function(module, __unused_webpack_exports, __webpack_require__) {
var Pattern = (__webpack_require__(12).Pattern);
var template_names = {
  django: false,
  erb: false,
  handlebars: false,
  php: false,
  smarty: false,
  angular: false
};
function TemplatablePattern(input_scanner, parent) {
  Pattern.call(this, input_scanner, parent);
  this.__template_pattern = null;
  this._disabled = Object.assign({}, template_names);
  this._excluded = Object.assign({}, template_names);
  if (parent) {
    this.__template_pattern = this._input.get_regexp(parent.__template_pattern);
    this._excluded = Object.assign(this._excluded, parent._excluded);
    this._disabled = Object.assign(this._disabled, parent._disabled);
  }
  var pattern = new Pattern(input_scanner);
  this.__patterns = {
    handlebars_comment: pattern.starting_with(/{{!--/).until_after(/--}}/),
    handlebars_unescaped: pattern.starting_with(/{{{/).until_after(/}}}/),
    handlebars: pattern.starting_with(/{{/).until_after(/}}/),
    php: pattern.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),
    erb: pattern.starting_with(/<%[^%]/).until_after(/[^%]%>/),
    django: pattern.starting_with(/{%/).until_after(/%}/),
    django_value: pattern.starting_with(/{{/).until_after(/}}/),
    django_comment: pattern.starting_with(/{#/).until_after(/#}/),
    smarty: pattern.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),
    smarty_comment: pattern.starting_with(/{\*/).until_after(/\*}/),
    smarty_literal: pattern.starting_with(/{literal}/).until_after(/{\/literal}/)
  };
}
TemplatablePattern.prototype = new Pattern();
TemplatablePattern.prototype._create = function() {
  return new TemplatablePattern(this._input, this);
};
TemplatablePattern.prototype._update = function() {
  this.__set_templated_pattern();
};
TemplatablePattern.prototype.disable = function(language) {
  var result = this._create();
  result._disabled[language] = true;
  result._update();
  return result;
};
TemplatablePattern.prototype.read_options = function(options) {
  var result = this._create();
  for (var language in template_names) {
    result._disabled[language] = options.templating.indexOf(language) === -1;
  }
  result._update();
  return result;
};
TemplatablePattern.prototype.exclude = function(language) {
  var result = this._create();
  result._excluded[language] = true;
  result._update();
  return result;
};
TemplatablePattern.prototype.read = function() {
  var result = '';
  if (this._match_pattern) {
    result = this._input.read(this._starting_pattern);
  } else {
    result = this._input.read(this._starting_pattern, this.__template_pattern);
  }
  var next = this._read_template();
  while (next) {
    if (this._match_pattern) {
      next += this._input.read(this._match_pattern);
    } else {
      next += this._input.readUntil(this.__template_pattern);
    }
    result += next;
    next = this._read_template();
  }
  if (this._until_after) {
    result += this._input.readUntilAfter(this._until_pattern);
  }
  return result;
};
TemplatablePattern.prototype.__set_templated_pattern = function() {
  var items = [];
  if (!this._disabled.php) {
    items.push(this.__patterns.php._starting_pattern.source);
  }
  if (!this._disabled.handlebars) {
    items.push(this.__patterns.handlebars._starting_pattern.source);
  }
  if (!this._disabled.angular) {
    items.push(this.__patterns.handlebars._starting_pattern.source);
  }
  if (!this._disabled.erb) {
    items.push(this.__patterns.erb._starting_pattern.source);
  }
  if (!this._disabled.django) {
    items.push(this.__patterns.django._starting_pattern.source);
    items.push(this.__patterns.django_value._starting_pattern.source);
    items.push(this.__patterns.django_comment._starting_pattern.source);
  }
  if (!this._disabled.smarty) {
    items.push(this.__patterns.smarty._starting_pattern.source);
  }
  if (this._until_pattern) {
    items.push(this._until_pattern.source);
  }
  this.__template_pattern = this._input.get_regexp('(?:' + items.join('|') + ')');
};
TemplatablePattern.prototype._read_template = function() {
  var resulting_string = '';
  var c = this._input.peek();
  if (c === '<') {
    var peek1 = this._input.peek(1);
    if (!this._disabled.php && !this._excluded.php && peek1 === '?') {
      resulting_string = resulting_string ||
        this.__patterns.php.read();
    }
    if (!this._disabled.erb && !this._excluded.erb && peek1 === '%') {
      resulting_string = resulting_string ||
        this.__patterns.erb.read();
    }
  } else if (c === '{') {
    if (!this._disabled.handlebars && !this._excluded.handlebars) {
      resulting_string = resulting_string ||
        this.__patterns.handlebars_comment.read();
      resulting_string = resulting_string ||
        this.__patterns.handlebars_unescaped.read();
      resulting_string = resulting_string ||
        this.__patterns.handlebars.read();
    }
    if (!this._disabled.django) {
      if (!this._excluded.django && !this._excluded.handlebars) {
        resulting_string = resulting_string ||
          this.__patterns.django_value.read();
      }
      if (!this._excluded.django) {
        resulting_string = resulting_string ||
          this.__patterns.django_comment.read();
        resulting_string = resulting_string ||
          this.__patterns.django.read();
      }
    }
    if (!this._disabled.smarty) {
      if (this._disabled.django && this._disabled.handlebars) {
        resulting_string = resulting_string ||
          this.__patterns.smarty_comment.read();
        resulting_string = resulting_string ||
          this.__patterns.smarty_literal.read();
        resulting_string = resulting_string ||
          this.__patterns.smarty.read();
      }
    }
  }
  return resulting_string;
};
module.exports.TemplatablePattern = TemplatablePattern;
 }),
,
,
,
 (function(module, __unused_webpack_exports, __webpack_require__) {
var Beautifier = (__webpack_require__(19).Beautifier),
  Options = (__webpack_require__(20).Options);
function style_html(html_source, options, js_beautify, css_beautify) {
  var beautifier = new Beautifier(html_source, options, js_beautify, css_beautify);
  return beautifier.beautify();
}
module.exports = style_html;
module.exports.defaultOptions = function() {
  return new Options();
};
 }),
 (function(module, __unused_webpack_exports, __webpack_require__) {
var Options = (__webpack_require__(20).Options);
var Output = (__webpack_require__(2).Output);
var Tokenizer = (__webpack_require__(21).Tokenizer);
var TOKEN = (__webpack_require__(21).TOKEN);
var lineBreak = /\r\n|[\r\n]/;
var allLineBreaks = /\r\n|[\r\n]/g;
var Printer = function(options, base_indent_string) {
  this.indent_level = 0;
  this.alignment_size = 0;
  this.max_preserve_newlines = options.max_preserve_newlines;
  this.preserve_newlines = options.preserve_newlines;
  this._output = new Output(options, base_indent_string);
};
Printer.prototype.current_line_has_match = function(pattern) {
  return this._output.current_line.has_match(pattern);
};
Printer.prototype.set_space_before_token = function(value, non_breaking) {
  this._output.space_before_token = value;
  this._output.non_breaking_space = non_breaking;
};
Printer.prototype.set_wrap_point = function() {
  this._output.set_indent(this.indent_level, this.alignment_size);
  this._output.set_wrap_point();
};
Printer.prototype.add_raw_token = function(token) {
  this._output.add_raw_token(token);
};
Printer.prototype.print_preserved_newlines = function(raw_token) {
  var newlines = 0;
  if (raw_token.type !== TOKEN.TEXT && raw_token.previous.type !== TOKEN.TEXT) {
    newlines = raw_token.newlines ? 1 : 0;
  }
  if (this.preserve_newlines) {
    newlines = raw_token.newlines < this.max_preserve_newlines + 1 ? raw_token.newlines : this.max_preserve_newlines + 1;
  }
  for (var n = 0; n < newlines; n++) {
    this.print_newline(n > 0);
  }
  return newlines !== 0;
};
Printer.prototype.traverse_whitespace = function(raw_token) {
  if (raw_token.whitespace_before || raw_token.newlines) {
    if (!this.print_preserved_newlines(raw_token)) {
      this._output.space_before_token = true;
    }
    return true;
  }
  return false;
};
Printer.prototype.previous_token_wrapped = function() {
  return this._output.previous_token_wrapped;
};
Printer.prototype.print_newline = function(force) {
  this._output.add_new_line(force);
};
Printer.prototype.print_token = function(token) {
  if (token.text) {
    this._output.set_indent(this.indent_level, this.alignment_size);
    this._output.add_token(token.text);
  }
};
Printer.prototype.indent = function() {
  this.indent_level++;
};
Printer.prototype.deindent = function() {
  if (this.indent_level > 0) {
    this.indent_level--;
    this._output.set_indent(this.indent_level, this.alignment_size);
  }
};
Printer.prototype.get_full_indent = function(level) {
  level = this.indent_level + (level || 0);
  if (level < 1) {
    return '';
  }
  return this._output.get_indent_string(level);
};
var get_type_attribute = function(start_token) {
  var result = null;
  var raw_token = start_token.next;
  while (raw_token.type !== TOKEN.EOF && start_token.closed !== raw_token) {
    if (raw_token.type === TOKEN.ATTRIBUTE && raw_token.text === 'type') {
      if (raw_token.next && raw_token.next.type === TOKEN.EQUALS &&
        raw_token.next.next && raw_token.next.next.type === TOKEN.VALUE) {
        result = raw_token.next.next.text;
      }
      break;
    }
    raw_token = raw_token.next;
  }
  return result;
};
var get_custom_beautifier_name = function(tag_check, raw_token) {
  var typeAttribute = null;
  var result = null;
  if (!raw_token.closed) {
    return null;
  }
  if (tag_check === 'script') {
    typeAttribute = 'text/javascript';
  } else if (tag_check === 'style') {
    typeAttribute = 'text/css';
  }
  typeAttribute = get_type_attribute(raw_token) || typeAttribute;
  if (typeAttribute.search('text/css') > -1) {
    result = 'css';
  } else if (typeAttribute.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/) > -1) {
    result = 'javascript';
  } else if (typeAttribute.search(/(text|application|dojo)\/(x-)?(html)/) > -1) {
    result = 'html';
  } else if (typeAttribute.search(/test\/null/) > -1) {
    result = 'null';
  }
  return result;
};
function in_array(what, arr) {
  return arr.indexOf(what) !== -1;
}
function TagFrame(parent, parser_token, indent_level) {
  this.parent = parent || null;
  this.tag = parser_token ? parser_token.tag_name : '';
  this.indent_level = indent_level || 0;
  this.parser_token = parser_token || null;
}
function TagStack(printer) {
  this._printer = printer;
  this._current_frame = null;
}
TagStack.prototype.get_parser_token = function() {
  return this._current_frame ? this._current_frame.parser_token : null;
};
TagStack.prototype.record_tag = function(parser_token) {
  var new_frame = new TagFrame(this._current_frame, parser_token, this._printer.indent_level);
  this._current_frame = new_frame;
};
TagStack.prototype._try_pop_frame = function(frame) {
  var parser_token = null;
  if (frame) {
    parser_token = frame.parser_token;
    this._printer.indent_level = frame.indent_level;
    this._current_frame = frame.parent;
  }
  return parser_token;
};
TagStack.prototype._get_frame = function(tag_list, stop_list) {
  var frame = this._current_frame;
  while (frame) {
    if (tag_list.indexOf(frame.tag) !== -1) {
      break;
    } else if (stop_list && stop_list.indexOf(frame.tag) !== -1) {
      frame = null;
      break;
    }
    frame = frame.parent;
  }
  return frame;
};
TagStack.prototype.try_pop = function(tag, stop_list) {
  var frame = this._get_frame([tag], stop_list);
  return this._try_pop_frame(frame);
};
TagStack.prototype.indent_to_tag = function(tag_list) {
  var frame = this._get_frame(tag_list);
  if (frame) {
    this._printer.indent_level = frame.indent_level;
  }
};
function Beautifier(source_text, options, js_beautify, css_beautify) {
  this._source_text = source_text || '';
  options = options || {};
  this._js_beautify = js_beautify;
  this._css_beautify = css_beautify;
  this._tag_stack = null;
  var optionHtml = new Options(options, 'html');
  this._options = optionHtml;
  this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, 'force'.length) === 'force';
  this._is_wrap_attributes_force_expand_multiline = (this._options.wrap_attributes === 'force-expand-multiline');
  this._is_wrap_attributes_force_aligned = (this._options.wrap_attributes === 'force-aligned');
  this._is_wrap_attributes_aligned_multiple = (this._options.wrap_attributes === 'aligned-multiple');
  this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, 'preserve'.length) === 'preserve';
  this._is_wrap_attributes_preserve_aligned = (this._options.wrap_attributes === 'preserve-aligned');
}
Beautifier.prototype.beautify = function() {
  if (this._options.disabled) {
    return this._source_text;
  }
  var source_text = this._source_text;
  var eol = this._options.eol;
  if (this._options.eol === 'auto') {
    eol = '\n';
    if (source_text && lineBreak.test(source_text)) {
      eol = source_text.match(lineBreak)[0];
    }
  }
  source_text = source_text.replace(allLineBreaks, '\n');
  var baseIndentString = source_text.match(/^[\t ]*/)[0];
  var last_token = {
    text: '',
    type: ''
  };
  var last_tag_token = new TagOpenParserToken(this._options);
  var printer = new Printer(this._options, baseIndentString);
  var tokens = new Tokenizer(source_text, this._options).tokenize();
  this._tag_stack = new TagStack(printer);
  var parser_token = null;
  var raw_token = tokens.next();
  while (raw_token.type !== TOKEN.EOF) {
    if (raw_token.type === TOKEN.TAG_OPEN || raw_token.type === TOKEN.COMMENT) {
      parser_token = this._handle_tag_open(printer, raw_token, last_tag_token, last_token, tokens);
      last_tag_token = parser_token;
    } else if ((raw_token.type === TOKEN.ATTRIBUTE || raw_token.type === TOKEN.EQUALS || raw_token.type === TOKEN.VALUE) ||
      (raw_token.type === TOKEN.TEXT && !last_tag_token.tag_complete)) {
      parser_token = this._handle_inside_tag(printer, raw_token, last_tag_token, last_token);
    } else if (raw_token.type === TOKEN.TAG_CLOSE) {
      parser_token = this._handle_tag_close(printer, raw_token, last_tag_token);
    } else if (raw_token.type === TOKEN.TEXT) {
      parser_token = this._handle_text(printer, raw_token, last_tag_token);
    } else if (raw_token.type === TOKEN.CONTROL_FLOW_OPEN) {
      parser_token = this._handle_control_flow_open(printer, raw_token);
    } else if (raw_token.type === TOKEN.CONTROL_FLOW_CLOSE) {
      parser_token = this._handle_control_flow_close(printer, raw_token);
    } else {
      printer.add_raw_token(raw_token);
    }
    last_token = parser_token;
    raw_token = tokens.next();
  }
  var sweet_code = printer._output.get_code(eol);
  return sweet_code;
};
Beautifier.prototype._handle_control_flow_open = function(printer, raw_token) {
  var parser_token = {
    text: raw_token.text,
    type: raw_token.type
  };
  printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);
  if (raw_token.newlines) {
    printer.print_preserved_newlines(raw_token);
  } else {
    printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);
  }
  printer.print_token(raw_token);
  printer.indent();
  return parser_token;
};
Beautifier.prototype._handle_control_flow_close = function(printer, raw_token) {
  var parser_token = {
    text: raw_token.text,
    type: raw_token.type
  };
  printer.deindent();
  if (raw_token.newlines) {
    printer.print_preserved_newlines(raw_token);
  } else {
    printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);
  }
  printer.print_token(raw_token);
  return parser_token;
};
Beautifier.prototype._handle_tag_close = function(printer, raw_token, last_tag_token) {
  var parser_token = {
    text: raw_token.text,
    type: raw_token.type
  };
  printer.alignment_size = 0;
  last_tag_token.tag_complete = true;
  printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);
  if (last_tag_token.is_unformatted) {
    printer.add_raw_token(raw_token);
  } else {
    if (last_tag_token.tag_start_char === '<') {
      printer.set_space_before_token(raw_token.text[0] === '/', true);
      if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.has_wrapped_attrs) {
        printer.print_newline(false);
      }
    }
    printer.print_token(raw_token);
  }
  if (last_tag_token.indent_content &&
    !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {
    printer.indent();
    last_tag_token.indent_content = false;
  }
  if (!last_tag_token.is_inline_element &&
    !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {
    printer.set_wrap_point();
  }
  return parser_token;
};
Beautifier.prototype._handle_inside_tag = function(printer, raw_token, last_tag_token, last_token) {
  var wrapped = last_tag_token.has_wrapped_attrs;
  var parser_token = {
    text: raw_token.text,
    type: raw_token.type
  };
  printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);
  if (last_tag_token.is_unformatted) {
    printer.add_raw_token(raw_token);
  } else if (last_tag_token.tag_start_char === '{' && raw_token.type === TOKEN.TEXT) {
    if (printer.print_preserved_newlines(raw_token)) {
      raw_token.newlines = 0;
      printer.add_raw_token(raw_token);
    } else {
      printer.print_token(raw_token);
    }
  } else {
    if (raw_token.type === TOKEN.ATTRIBUTE) {
      printer.set_space_before_token(true);
    } else if (raw_token.type === TOKEN.EQUALS) {
      printer.set_space_before_token(false);
    } else if (raw_token.type === TOKEN.VALUE && raw_token.previous.type === TOKEN.EQUALS) {
      printer.set_space_before_token(false);
    }
    if (raw_token.type === TOKEN.ATTRIBUTE && last_tag_token.tag_start_char === '<') {
      if (this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) {
        printer.traverse_whitespace(raw_token);
        wrapped = wrapped || raw_token.newlines !== 0;
      }
      if (this._is_wrap_attributes_force &&
        last_tag_token.attr_count >= this._options.wrap_attributes_min_attrs &&
        (last_token.type !== TOKEN.TAG_OPEN ||
          this._is_wrap_attributes_force_expand_multiline)) {
        printer.print_newline(false);
        wrapped = true;
      }
    }
    printer.print_token(raw_token);
    wrapped = wrapped || printer.previous_token_wrapped();
    last_tag_token.has_wrapped_attrs = wrapped;
  }
  return parser_token;
};
Beautifier.prototype._handle_text = function(printer, raw_token, last_tag_token) {
  var parser_token = {
    text: raw_token.text,
    type: 'TK_CONTENT'
  };
  if (last_tag_token.custom_beautifier_name) {
    this._print_custom_beatifier_text(printer, raw_token, last_tag_token);
  } else if (last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) {
    printer.add_raw_token(raw_token);
  } else {
    printer.traverse_whitespace(raw_token);
    printer.print_token(raw_token);
  }
  return parser_token;
};
Beautifier.prototype._print_custom_beatifier_text = function(printer, raw_token, last_tag_token) {
  var local = this;
  if (raw_token.text !== '') {
    var text = raw_token.text,
      _beautifier,
      script_indent_level = 1,
      pre = '',
      post = '';
    if (last_tag_token.custom_beautifier_name === 'javascript' && typeof this._js_beautify === 'function') {
      _beautifier = this._js_beautify;
    } else if (last_tag_token.custom_beautifier_name === 'css' && typeof this._css_beautify === 'function') {
      _beautifier = this._css_beautify;
    } else if (last_tag_token.custom_beautifier_name === 'html') {
      _beautifier = function(html_source, options) {
        var beautifier = new Beautifier(html_source, options, local._js_beautify, local._css_beautify);
        return beautifier.beautify();
      };
    }
    if (this._options.indent_scripts === "keep") {
      script_indent_level = 0;
    } else if (this._options.indent_scripts === "separate") {
      script_indent_level = -printer.indent_level;
    }
    var indentation = printer.get_full_indent(script_indent_level);
    text = text.replace(/\n[ \t]*$/, '');
    if (last_tag_token.custom_beautifier_name !== 'html' &&
      text[0] === '<' && text.match(/^(<!--|<!\[CDATA\[)/)) {
      var matched = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(text);
      if (!matched) {
        printer.add_raw_token(raw_token);
        return;
      }
      pre = indentation + matched[1] + '\n';
      text = matched[4];
      if (matched[5]) {
        post = indentation + matched[5];
      }
      text = text.replace(/\n[ \t]*$/, '');
      if (matched[2] || matched[3].indexOf('\n') !== -1) {
        matched = matched[3].match(/[ \t]+$/);
        if (matched) {
          raw_token.whitespace_before = matched[0];
        }
      }
    }
    if (text) {
      if (_beautifier) {
        var Child_options = function() {
          this.eol = '\n';
        };
        Child_options.prototype = this._options.raw_options;
        var child_options = new Child_options();
        text = _beautifier(indentation + text, child_options);
      } else {
        var white = raw_token.whitespace_before;
        if (white) {
          text = text.replace(new RegExp('\n(' + white + ')?', 'g'), '\n');
        }
        text = indentation + text.replace(/\n/g, '\n' + indentation);
      }
    }
    if (pre) {
      if (!text) {
        text = pre + post;
      } else {
        text = pre + text + '\n' + post;
      }
    }
    printer.print_newline(false);
    if (text) {
      raw_token.text = text;
      raw_token.whitespace_before = '';
      raw_token.newlines = 0;
      printer.add_raw_token(raw_token);
      printer.print_newline(true);
    }
  }
};
Beautifier.prototype._handle_tag_open = function(printer, raw_token, last_tag_token, last_token, tokens) {
  var parser_token = this._get_tag_open_token(raw_token);
  if ((last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) &&
    !last_tag_token.is_empty_element &&
    raw_token.type === TOKEN.TAG_OPEN && !parser_token.is_start_tag) {
    printer.add_raw_token(raw_token);
    parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name);
  } else {
    printer.traverse_whitespace(raw_token);
    this._set_tag_position(printer, raw_token, parser_token, last_tag_token, last_token);
    if (!parser_token.is_inline_element) {
      printer.set_wrap_point();
    }
    printer.print_token(raw_token);
  }
  if (parser_token.is_start_tag && this._is_wrap_attributes_force) {
    var peek_index = 0;
    var peek_token;
    do {
      peek_token = tokens.peek(peek_index);
      if (peek_token.type === TOKEN.ATTRIBUTE) {
        parser_token.attr_count += 1;
      }
      peek_index += 1;
    } while (peek_token.type !== TOKEN.EOF && peek_token.type !== TOKEN.TAG_CLOSE);
  }
  if (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) {
    parser_token.alignment_size = raw_token.text.length + 1;
  }
  if (!parser_token.tag_complete && !parser_token.is_unformatted) {
    printer.alignment_size = parser_token.alignment_size;
  }
  return parser_token;
};
var TagOpenParserToken = function(options, parent, raw_token) {
  this.parent = parent || null;
  this.text = '';
  this.type = 'TK_TAG_OPEN';
  this.tag_name = '';
  this.is_inline_element = false;
  this.is_unformatted = false;
  this.is_content_unformatted = false;
  this.is_empty_element = false;
  this.is_start_tag = false;
  this.is_end_tag = false;
  this.indent_content = false;
  this.multiline_content = false;
  this.custom_beautifier_name = null;
  this.start_tag_token = null;
  this.attr_count = 0;
  this.has_wrapped_attrs = false;
  this.alignment_size = 0;
  this.tag_complete = false;
  this.tag_start_char = '';
  this.tag_check = '';
  if (!raw_token) {
    this.tag_complete = true;
  } else {
    var tag_check_match;
    this.tag_start_char = raw_token.text[0];
    this.text = raw_token.text;
    if (this.tag_start_char === '<') {
      tag_check_match = raw_token.text.match(/^<([^\s>]*)/);
      this.tag_check = tag_check_match ? tag_check_match[1] : '';
    } else {
      tag_check_match = raw_token.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/);
      this.tag_check = tag_check_match ? tag_check_match[1] : '';
      if ((raw_token.text.startsWith('{{#>') || raw_token.text.startsWith('{{~#>')) && this.tag_check[0] === '>') {
        if (this.tag_check === '>' && raw_token.next !== null) {
          this.tag_check = raw_token.next.text.split(' ')[0];
        } else {
          this.tag_check = raw_token.text.split('>')[1];
        }
      }
    }
    this.tag_check = this.tag_check.toLowerCase();
    if (raw_token.type === TOKEN.COMMENT) {
      this.tag_complete = true;
    }
    this.is_start_tag = this.tag_check.charAt(0) !== '/';
    this.tag_name = !this.is_start_tag ? this.tag_check.substr(1) : this.tag_check;
    this.is_end_tag = !this.is_start_tag ||
      (raw_token.closed && raw_token.closed.text === '/>');
    var handlebar_starts = 2;
    if (this.tag_start_char === '{' && this.text.length >= 3) {
      if (this.text.charAt(2) === '~') {
        handlebar_starts = 3;
      }
    }
    this.is_end_tag = this.is_end_tag ||
      (this.tag_start_char === '{' && (!options.indent_handlebars || this.text.length < 3 || (/[^#\^]/.test(this.text.charAt(handlebar_starts)))));
  }
};
Beautifier.prototype._get_tag_open_token = function(raw_token) {
  var parser_token = new TagOpenParserToken(this._options, this._tag_stack.get_parser_token(), raw_token);
  parser_token.alignment_size = this._options.wrap_attributes_indent_size;
  parser_token.is_end_tag = parser_token.is_end_tag ||
    in_array(parser_token.tag_check, this._options.void_elements);
  parser_token.is_empty_element = parser_token.tag_complete ||
    (parser_token.is_start_tag && parser_token.is_end_tag);
  parser_token.is_unformatted = !parser_token.tag_complete && in_array(parser_token.tag_check, this._options.unformatted);
  parser_token.is_content_unformatted = !parser_token.is_empty_element && in_array(parser_token.tag_check, this._options.content_unformatted);
  parser_token.is_inline_element = in_array(parser_token.tag_name, this._options.inline) || (this._options.inline_custom_elements && parser_token.tag_name.includes("-")) || parser_token.tag_start_char === '{';
  return parser_token;
};
Beautifier.prototype._set_tag_position = function(printer, raw_token, parser_token, last_tag_token, last_token) {
  if (!parser_token.is_empty_element) {
    if (parser_token.is_end_tag) {
      parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name);
    } else {
      if (this._do_optional_end_element(parser_token)) {
        if (!parser_token.is_inline_element) {
          printer.print_newline(false);
        }
      }
      this._tag_stack.record_tag(parser_token);
      if ((parser_token.tag_name === 'script' || parser_token.tag_name === 'style') &&
        !(parser_token.is_unformatted || parser_token.is_content_unformatted)) {
        parser_token.custom_beautifier_name = get_custom_beautifier_name(parser_token.tag_check, raw_token);
      }
    }
  }
  if (in_array(parser_token.tag_check, this._options.extra_liners)) {
    printer.print_newline(false);
    if (!printer._output.just_added_blankline()) {
      printer.print_newline(true);
    }
  }
  if (parser_token.is_empty_element) {
    if (parser_token.tag_start_char === '{' && parser_token.tag_check === 'else') {
      this._tag_stack.indent_to_tag(['if', 'unless', 'each']);
      parser_token.indent_content = true;
      var foundIfOnCurrentLine = printer.current_line_has_match(/{{#if/);
      if (!foundIfOnCurrentLine) {
        printer.print_newline(false);
      }
    }
    if (parser_token.tag_name === '!--' && last_token.type === TOKEN.TAG_CLOSE &&
      last_tag_token.is_end_tag && parser_token.text.indexOf('\n') === -1) ; else {
      if (!(parser_token.is_inline_element || parser_token.is_unformatted)) {
        printer.print_newline(false);
      }
      this._calcluate_parent_multiline(printer, parser_token);
    }
  } else if (parser_token.is_end_tag) {
    var do_end_expand = false;
    do_end_expand = parser_token.start_tag_token && parser_token.start_tag_token.multiline_content;
    do_end_expand = do_end_expand || (!parser_token.is_inline_element &&
      !(last_tag_token.is_inline_element || last_tag_token.is_unformatted) &&
      !(last_token.type === TOKEN.TAG_CLOSE && parser_token.start_tag_token === last_tag_token) &&
      last_token.type !== 'TK_CONTENT'
    );
    if (parser_token.is_content_unformatted || parser_token.is_unformatted) {
      do_end_expand = false;
    }
    if (do_end_expand) {
      printer.print_newline(false);
    }
  } else {
    parser_token.indent_content = !parser_token.custom_beautifier_name;
    if (parser_token.tag_start_char === '<') {
      if (parser_token.tag_name === 'html') {
        parser_token.indent_content = this._options.indent_inner_html;
      } else if (parser_token.tag_name === 'head') {
        parser_token.indent_content = this._options.indent_head_inner_html;
      } else if (parser_token.tag_name === 'body') {
        parser_token.indent_content = this._options.indent_body_inner_html;
      }
    }
    if (!(parser_token.is_inline_element || parser_token.is_unformatted) &&
      (last_token.type !== 'TK_CONTENT' || parser_token.is_content_unformatted)) {
      printer.print_newline(false);
    }
    this._calcluate_parent_multiline(printer, parser_token);
  }
};
Beautifier.prototype._calcluate_parent_multiline = function(printer, parser_token) {
  if (parser_token.parent && printer._output.just_added_newline() &&
    !((parser_token.is_inline_element || parser_token.is_unformatted) && parser_token.parent.is_inline_element)) {
    parser_token.parent.multiline_content = true;
  }
};
var p_closers = ['address', 'article', 'aside', 'blockquote', 'details', 'div', 'dl', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'main', 'menu', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'];
var p_parent_excludes = ['a', 'audio', 'del', 'ins', 'map', 'noscript', 'video'];
Beautifier.prototype._do_optional_end_element = function(parser_token) {
  var result = null;
  if (parser_token.is_empty_element || !parser_token.is_start_tag || !parser_token.parent) {
    return;
  }
  if (parser_token.tag_name === 'body') {
    result = result || this._tag_stack.try_pop('head');
  } else if (parser_token.tag_name === 'li') {
    result = result || this._tag_stack.try_pop('li', ['ol', 'ul', 'menu']);
  } else if (parser_token.tag_name === 'dd' || parser_token.tag_name === 'dt') {
    result = result || this._tag_stack.try_pop('dt', ['dl']);
    result = result || this._tag_stack.try_pop('dd', ['dl']);
  } else if (parser_token.parent.tag_name === 'p' && p_closers.indexOf(parser_token.tag_name) !== -1) {
    var p_parent = parser_token.parent.parent;
    if (!p_parent || p_parent_excludes.indexOf(p_parent.tag_name) === -1) {
      result = result || this._tag_stack.try_pop('p');
    }
  } else if (parser_token.tag_name === 'rp' || parser_token.tag_name === 'rt') {
    result = result || this._tag_stack.try_pop('rt', ['ruby', 'rtc']);
    result = result || this._tag_stack.try_pop('rp', ['ruby', 'rtc']);
  } else if (parser_token.tag_name === 'optgroup') {
    result = result || this._tag_stack.try_pop('optgroup', ['select']);
  } else if (parser_token.tag_name === 'option') {
    result = result || this._tag_stack.try_pop('option', ['select', 'datalist', 'optgroup']);
  } else if (parser_token.tag_name === 'colgroup') {
    result = result || this._tag_stack.try_pop('caption', ['table']);
  } else if (parser_token.tag_name === 'thead') {
    result = result || this._tag_stack.try_pop('caption', ['table']);
    result = result || this._tag_stack.try_pop('colgroup', ['table']);
  } else if (parser_token.tag_name === 'tbody' || parser_token.tag_name === 'tfoot') {
    result = result || this._tag_stack.try_pop('caption', ['table']);
    result = result || this._tag_stack.try_pop('colgroup', ['table']);
    result = result || this._tag_stack.try_pop('thead', ['table']);
    result = result || this._tag_stack.try_pop('tbody', ['table']);
  } else if (parser_token.tag_name === 'tr') {
    result = result || this._tag_stack.try_pop('caption', ['table']);
    result = result || this._tag_stack.try_pop('colgroup', ['table']);
    result = result || this._tag_stack.try_pop('tr', ['table', 'thead', 'tbody', 'tfoot']);
  } else if (parser_token.tag_name === 'th' || parser_token.tag_name === 'td') {
    result = result || this._tag_stack.try_pop('td', ['table', 'thead', 'tbody', 'tfoot', 'tr']);
    result = result || this._tag_stack.try_pop('th', ['table', 'thead', 'tbody', 'tfoot', 'tr']);
  }
  parser_token.parent = this._tag_stack.get_parser_token();
  return result;
};
module.exports.Beautifier = Beautifier;
 }),
 (function(module, __unused_webpack_exports, __webpack_require__) {
var BaseOptions = (__webpack_require__(6).Options);
function Options(options) {
  BaseOptions.call(this, options, 'html');
  if (this.templating.length === 1 && this.templating[0] === 'auto') {
    this.templating = ['django', 'erb', 'handlebars', 'php'];
  }
  this.indent_inner_html = this._get_boolean('indent_inner_html');
  this.indent_body_inner_html = this._get_boolean('indent_body_inner_html', true);
  this.indent_head_inner_html = this._get_boolean('indent_head_inner_html', true);
  this.indent_handlebars = this._get_boolean('indent_handlebars', true);
  this.wrap_attributes = this._get_selection('wrap_attributes',
    ['auto', 'force', 'force-aligned', 'force-expand-multiline', 'aligned-multiple', 'preserve', 'preserve-aligned']);
  this.wrap_attributes_min_attrs = this._get_number('wrap_attributes_min_attrs', 2);
  this.wrap_attributes_indent_size = this._get_number('wrap_attributes_indent_size', this.indent_size);
  this.extra_liners = this._get_array('extra_liners', ['head', 'body', '/html']);
  this.inline = this._get_array('inline', [
    'a', 'abbr', 'area', 'audio', 'b', 'bdi', 'bdo', 'br', 'button', 'canvas', 'cite',
    'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'i', 'iframe', 'img',
    'input', 'ins', 'kbd', 'keygen', 'label', 'map', 'mark', 'math', 'meter', 'noscript',
    'object', 'output', 'progress', 'q', 'ruby', 's', 'samp',  'select', 'small',
    'span', 'strong', 'sub', 'sup', 'svg', 'template', 'textarea', 'time', 'u', 'var',
    'video', 'wbr', 'text',
    'acronym', 'big', 'strike', 'tt'
  ]);
  this.inline_custom_elements = this._get_boolean('inline_custom_elements', true);
  this.void_elements = this._get_array('void_elements', [
    'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen',
    'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr',
    '!doctype', '?xml',
    'basefont', 'isindex'
  ]);
  this.unformatted = this._get_array('unformatted', []);
  this.content_unformatted = this._get_array('content_unformatted', [
    'pre', 'textarea'
  ]);
  this.unformatted_content_delimiter = this._get_characters('unformatted_content_delimiter');
  this.indent_scripts = this._get_selection('indent_scripts', ['normal', 'keep', 'separate']);
}
Options.prototype = new BaseOptions();
module.exports.Options = Options;
 }),
 (function(module, __unused_webpack_exports, __webpack_require__) {
var BaseTokenizer = (__webpack_require__(9).Tokenizer);
var BASETOKEN = (__webpack_require__(9).TOKEN);
var Directives = (__webpack_require__(13).Directives);
var TemplatablePattern = (__webpack_require__(14).TemplatablePattern);
var Pattern = (__webpack_require__(12).Pattern);
var TOKEN = {
  TAG_OPEN: 'TK_TAG_OPEN',
  TAG_CLOSE: 'TK_TAG_CLOSE',
  CONTROL_FLOW_OPEN: 'TK_CONTROL_FLOW_OPEN',
  CONTROL_FLOW_CLOSE: 'TK_CONTROL_FLOW_CLOSE',
  ATTRIBUTE: 'TK_ATTRIBUTE',
  EQUALS: 'TK_EQUALS',
  VALUE: 'TK_VALUE',
  COMMENT: 'TK_COMMENT',
  TEXT: 'TK_TEXT',
  UNKNOWN: 'TK_UNKNOWN',
  START: BASETOKEN.START,
  RAW: BASETOKEN.RAW,
  EOF: BASETOKEN.EOF
};
var directives_core = new Directives(/<\!--/, /-->/);
var Tokenizer = function(input_string, options) {
  BaseTokenizer.call(this, input_string, options);
  this._current_tag_name = '';
  var templatable_reader = new TemplatablePattern(this._input).read_options(this._options);
  var pattern_reader = new Pattern(this._input);
  this.__patterns = {
    word: templatable_reader.until(/[\n\r\t <]/),
    word_control_flow_close_excluded: templatable_reader.until(/[\n\r\t <}]/),
    single_quote: templatable_reader.until_after(/'/),
    double_quote: templatable_reader.until_after(/"/),
    attribute: templatable_reader.until(/[\n\r\t =>]|\/>/),
    element_name: templatable_reader.until(/[\n\r\t >\/]/),
    angular_control_flow_start: pattern_reader.matching(/\@[a-zA-Z]+[^({]*[({]/),
    handlebars_comment: pattern_reader.starting_with(/{{!--/).until_after(/--}}/),
    handlebars: pattern_reader.starting_with(/{{/).until_after(/}}/),
    handlebars_open: pattern_reader.until(/[\n\r\t }]/),
    handlebars_raw_close: pattern_reader.until(/}}/),
    comment: pattern_reader.starting_with(/<!--/).until_after(/-->/),
    cdata: pattern_reader.starting_with(/<!\[CDATA\[/).until_after(/]]>/),
    conditional_comment: pattern_reader.starting_with(/<!\[/).until_after(/]>/),
    processing: pattern_reader.starting_with(/<\?/).until_after(/\?>/)
  };
  if (this._options.indent_handlebars) {
    this.__patterns.word = this.__patterns.word.exclude('handlebars');
    this.__patterns.word_control_flow_close_excluded = this.__patterns.word_control_flow_close_excluded.exclude('handlebars');
  }
  this._unformatted_content_delimiter = null;
  if (this._options.unformatted_content_delimiter) {
    var literal_regexp = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
    this.__patterns.unformatted_content_delimiter =
      pattern_reader.matching(literal_regexp)
      .until_after(literal_regexp);
  }
};
Tokenizer.prototype = new BaseTokenizer();
Tokenizer.prototype._is_comment = function(current_token) {
  return false;
};
Tokenizer.prototype._is_opening = function(current_token) {
  return current_token.type === TOKEN.TAG_OPEN || current_token.type === TOKEN.CONTROL_FLOW_OPEN;
};
Tokenizer.prototype._is_closing = function(current_token, open_token) {
  return (current_token.type === TOKEN.TAG_CLOSE &&
    (open_token && (
      ((current_token.text === '>' || current_token.text === '/>') && open_token.text[0] === '<') ||
      (current_token.text === '}}' && open_token.text[0] === '{' && open_token.text[1] === '{')))
  ) || (current_token.type === TOKEN.CONTROL_FLOW_CLOSE &&
    (current_token.text === '}' && open_token.text.endsWith('{')));
};
Tokenizer.prototype._reset = function() {
  this._current_tag_name = '';
};
Tokenizer.prototype._get_next_token = function(previous_token, open_token) {
  var token = null;
  this._readWhitespace();
  var c = this._input.peek();
  if (c === null) {
    return this._create_token(TOKEN.EOF, '');
  }
  token = token || this._read_open_handlebars(c, open_token);
  token = token || this._read_attribute(c, previous_token, open_token);
  token = token || this._read_close(c, open_token);
  token = token || this._read_script_and_style(c, previous_token);
  token = token || this._read_control_flows(c, open_token);
  token = token || this._read_raw_content(c, previous_token, open_token);
  token = token || this._read_content_word(c, open_token);
  token = token || this._read_comment_or_cdata(c);
  token = token || this._read_processing(c);
  token = token || this._read_open(c, open_token);
  token = token || this._create_token(TOKEN.UNKNOWN, this._input.next());
  return token;
};
Tokenizer.prototype._read_comment_or_cdata = function(c) {
  var token = null;
  var resulting_string = null;
  var directives = null;
  if (c === '<') {
    var peek1 = this._input.peek(1);
    if (peek1 === '!') {
      resulting_string = this.__patterns.comment.read();
      if (resulting_string) {
        directives = directives_core.get_directives(resulting_string);
        if (directives && directives.ignore === 'start') {
          resulting_string += directives_core.readIgnored(this._input);
        }
      } else {
        resulting_string = this.__patterns.cdata.read();
      }
    }
    if (resulting_string) {
      token = this._create_token(TOKEN.COMMENT, resulting_string);
      token.directives = directives;
    }
  }
  return token;
};
Tokenizer.prototype._read_processing = function(c) {
  var token = null;
  var resulting_string = null;
  var directives = null;
  if (c === '<') {
    var peek1 = this._input.peek(1);
    if (peek1 === '!' || peek1 === '?') {
      resulting_string = this.__patterns.conditional_comment.read();
      resulting_string = resulting_string || this.__patterns.processing.read();
    }
    if (resulting_string) {
      token = this._create_token(TOKEN.COMMENT, resulting_string);
      token.directives = directives;
    }
  }
  return token;
};
Tokenizer.prototype._read_open = function(c, open_token) {
  var resulting_string = null;
  var token = null;
  if (!open_token || open_token.type === TOKEN.CONTROL_FLOW_OPEN) {
    if (c === '<') {
      resulting_string = this._input.next();
      if (this._input.peek() === '/') {
        resulting_string += this._input.next();
      }
      resulting_string += this.__patterns.element_name.read();
      token = this._create_token(TOKEN.TAG_OPEN, resulting_string);
    }
  }
  return token;
};
Tokenizer.prototype._read_open_handlebars = function(c, open_token) {
  var resulting_string = null;
  var token = null;
  if (!open_token || open_token.type === TOKEN.CONTROL_FLOW_OPEN) {
    if ((this._options.templating.includes('angular') || this._options.indent_handlebars) && c === '{' && this._input.peek(1) === '{') {
      if (this._options.indent_handlebars && this._input.peek(2) === '!') {
        resulting_string = this.__patterns.handlebars_comment.read();
        resulting_string = resulting_string || this.__patterns.handlebars.read();
        token = this._create_token(TOKEN.COMMENT, resulting_string);
      } else {
        resulting_string = this.__patterns.handlebars_open.read();
        token = this._create_token(TOKEN.TAG_OPEN, resulting_string);
      }
    }
  }
  return token;
};
Tokenizer.prototype._read_control_flows = function(c, open_token) {
  var resulting_string = '';
  var token = null;
  if (!this._options.templating.includes('angular')) {
    return token;
  }
  if (c === '@') {
    resulting_string = this.__patterns.angular_control_flow_start.read();
    if (resulting_string === '') {
      return token;
    }
    var opening_parentheses_count = resulting_string.endsWith('(') ? 1 : 0;
    var closing_parentheses_count = 0;
    while (!(resulting_string.endsWith('{') && opening_parentheses_count === closing_parentheses_count)) {
      var next_char = this._input.next();
      if (next_char === null) {
        break;
      } else if (next_char === '(') {
        opening_parentheses_count++;
      } else if (next_char === ')') {
        closing_parentheses_count++;
      }
      resulting_string += next_char;
    }
    token = this._create_token(TOKEN.CONTROL_FLOW_OPEN, resulting_string);
  } else if (c === '}' && open_token && open_token.type === TOKEN.CONTROL_FLOW_OPEN) {
    resulting_string = this._input.next();
    token = this._create_token(TOKEN.CONTROL_FLOW_CLOSE, resulting_string);
  }
  return token;
};
Tokenizer.prototype._read_close = function(c, open_token) {
  var resulting_string = null;
  var token = null;
  if (open_token && open_token.type === TOKEN.TAG_OPEN) {
    if (open_token.text[0] === '<' && (c === '>' || (c === '/' && this._input.peek(1) === '>'))) {
      resulting_string = this._input.next();
      if (c === '/') {
        resulting_string += this._input.next();
      }
      token = this._create_token(TOKEN.TAG_CLOSE, resulting_string);
    } else if (open_token.text[0] === '{' && c === '}' && this._input.peek(1) === '}') {
      this._input.next();
      this._input.next();
      token = this._create_token(TOKEN.TAG_CLOSE, '}}');
    }
  }
  return token;
};
Tokenizer.prototype._read_attribute = function(c, previous_token, open_token) {
  var token = null;
  var resulting_string = '';
  if (open_token && open_token.text[0] === '<') {
    if (c === '=') {
      token = this._create_token(TOKEN.EQUALS, this._input.next());
    } else if (c === '"' || c === "'") {
      var content = this._input.next();
      if (c === '"') {
        content += this.__patterns.double_quote.read();
      } else {
        content += this.__patterns.single_quote.read();
      }
      token = this._create_token(TOKEN.VALUE, content);
    } else {
      resulting_string = this.__patterns.attribute.read();
      if (resulting_string) {
        if (previous_token.type === TOKEN.EQUALS) {
          token = this._create_token(TOKEN.VALUE, resulting_string);
        } else {
          token = this._create_token(TOKEN.ATTRIBUTE, resulting_string);
        }
      }
    }
  }
  return token;
};
Tokenizer.prototype._is_content_unformatted = function(tag_name) {
  return this._options.void_elements.indexOf(tag_name) === -1 &&
    (this._options.content_unformatted.indexOf(tag_name) !== -1 ||
      this._options.unformatted.indexOf(tag_name) !== -1);
};
Tokenizer.prototype._read_raw_content = function(c, previous_token, open_token) {
  var resulting_string = '';
  if (open_token && open_token.text[0] === '{') {
    resulting_string = this.__patterns.handlebars_raw_close.read();
  } else if (previous_token.type === TOKEN.TAG_CLOSE &&
    previous_token.opened.text[0] === '<' && previous_token.text[0] !== '/') {
    var tag_name = previous_token.opened.text.substr(1).toLowerCase();
    if (this._is_content_unformatted(tag_name)) {
      resulting_string = this._input.readUntil(new RegExp('</' + tag_name + '[\\n\\r\\t ]*?>', 'ig'));
    }
  }
  if (resulting_string) {
    return this._create_token(TOKEN.TEXT, resulting_string);
  }
  return null;
};
Tokenizer.prototype._read_script_and_style = function(c, previous_token) {
  if (previous_token.type === TOKEN.TAG_CLOSE && previous_token.opened.text[0] === '<' && previous_token.text[0] !== '/') {
    var tag_name = previous_token.opened.text.substr(1).toLowerCase();
    if (tag_name === 'script' || tag_name === 'style') {
      var token = this._read_comment_or_cdata(c);
      if (token) {
        token.type = TOKEN.TEXT;
        return token;
      }
      var resulting_string = this._input.readUntil(new RegExp('</' + tag_name + '[\\n\\r\\t ]*?>', 'ig'));
      if (resulting_string) {
        return this._create_token(TOKEN.TEXT, resulting_string);
      }
    }
  }
  return null;
};
Tokenizer.prototype._read_content_word = function(c, open_token) {
  var resulting_string = '';
  if (this._options.unformatted_content_delimiter) {
    if (c === this._options.unformatted_content_delimiter[0]) {
      resulting_string = this.__patterns.unformatted_content_delimiter.read();
    }
  }
  if (!resulting_string) {
    resulting_string = (open_token && open_token.type === TOKEN.CONTROL_FLOW_OPEN) ? this.__patterns.word_control_flow_close_excluded.read() : this.__patterns.word.read();
  }
  if (resulting_string) {
    return this._create_token(TOKEN.TEXT, resulting_string);
  }
  return null;
};
module.exports.Tokenizer = Tokenizer;
module.exports.TOKEN = TOKEN;
 })
 	]);
 	var __webpack_module_cache__ = {};
 	function __webpack_require__(moduleId) {
 		var cachedModule = __webpack_module_cache__[moduleId];
 		if (cachedModule !== undefined) {
 			return cachedModule.exports;
 		}
 		var module = __webpack_module_cache__[moduleId] = {
 			exports: {}
 		};
 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
 		return module.exports;
 	}
 	var __webpack_exports__ = __webpack_require__(18);
 	legacy_beautify_html = __webpack_exports__;
 })()
;
function html_beautify(html_source, options) {
    return legacy_beautify_html(html_source, options, js_beautify, css_beautify$1);
}

function format$1(document, range, options) {
    let value = document.getText();
    let includesEnd = true;
    let initialIndentLevel = 0;
    const tabSize = options.tabSize || 4;
    if (range) {
        let startOffset = document.offsetAt(range.start);
        let extendedStart = startOffset;
        while (extendedStart > 0 && isWhitespace$1(value, extendedStart - 1)) {
            extendedStart--;
        }
        if (extendedStart === 0 || isEOL$1(value, extendedStart - 1)) {
            startOffset = extendedStart;
        }
        else {
            if (extendedStart < startOffset) {
                startOffset = extendedStart + 1;
            }
        }
        let endOffset = document.offsetAt(range.end);
        let extendedEnd = endOffset;
        while (extendedEnd < value.length && isWhitespace$1(value, extendedEnd)) {
            extendedEnd++;
        }
        if (extendedEnd === value.length || isEOL$1(value, extendedEnd)) {
            endOffset = extendedEnd;
        }
        range = Range$1.create(document.positionAt(startOffset), document.positionAt(endOffset));
        const firstHalf = value.substring(0, startOffset);
        if (new RegExp(/.*[<][^>]*$/).test(firstHalf)) {
            value = value.substring(startOffset, endOffset);
            return [{
                    range: range,
                    newText: value
                }];
        }
        includesEnd = endOffset === value.length;
        value = value.substring(startOffset, endOffset);
        if (startOffset !== 0) {
            const startOfLineOffset = document.offsetAt(Position$1.create(range.start.line, 0));
            initialIndentLevel = computeIndentLevel$1(document.getText(), startOfLineOffset, options);
        }
    }
    else {
        range = Range$1.create(Position$1.create(0, 0), document.positionAt(value.length));
    }
    const htmlOptions = {
        indent_size: tabSize,
        indent_char: options.insertSpaces ? ' ' : '\t',
        indent_empty_lines: getFormatOption$1(options, 'indentEmptyLines', false),
        wrap_line_length: getFormatOption$1(options, 'wrapLineLength', 120),
        unformatted: getTagsFormatOption(options, 'unformatted', void 0),
        content_unformatted: getTagsFormatOption(options, 'contentUnformatted', void 0),
        indent_inner_html: getFormatOption$1(options, 'indentInnerHtml', false),
        preserve_newlines: getFormatOption$1(options, 'preserveNewLines', true),
        max_preserve_newlines: getFormatOption$1(options, 'maxPreserveNewLines', 32786),
        indent_handlebars: getFormatOption$1(options, 'indentHandlebars', false),
        end_with_newline: includesEnd && getFormatOption$1(options, 'endWithNewline', false),
        extra_liners: getTagsFormatOption(options, 'extraLiners', void 0),
        wrap_attributes: getFormatOption$1(options, 'wrapAttributes', 'auto'),
        wrap_attributes_indent_size: getFormatOption$1(options, 'wrapAttributesIndentSize', void 0),
        eol: '\n',
        indent_scripts: getFormatOption$1(options, 'indentScripts', 'normal'),
        templating: getTemplatingFormatOption(options, 'all'),
        unformatted_content_delimiter: getFormatOption$1(options, 'unformattedContentDelimiter', ''),
    };
    let result = html_beautify(trimLeft$1(value), htmlOptions);
    if (initialIndentLevel > 0) {
        const indent = options.insertSpaces ? repeat$1(' ', tabSize * initialIndentLevel) : repeat$1('\t', initialIndentLevel);
        result = result.split('\n').join('\n' + indent);
        if (range.start.character === 0) {
            result = indent + result;
        }
    }
    return [{
            range: range,
            newText: result
        }];
}
function trimLeft$1(str) {
    return str.replace(/^\s+/, '');
}
function getFormatOption$1(options, key, dflt) {
    if (options && options.hasOwnProperty(key)) {
        const value = options[key];
        if (value !== null) {
            return value;
        }
    }
    return dflt;
}
function getTagsFormatOption(options, key, dflt) {
    const list = getFormatOption$1(options, key, null);
    if (typeof list === 'string') {
        if (list.length > 0) {
            return list.split(',').map(t => t.trim().toLowerCase());
        }
        return [];
    }
    return dflt;
}
function getTemplatingFormatOption(options, dflt) {
    const value = getFormatOption$1(options, 'templating', dflt);
    if (value === true) {
        return ['auto'];
    }
    if (value === false || value === dflt || Array.isArray(value) === false) {
        return ['none'];
    }
    return value;
}
function computeIndentLevel$1(content, offset, options) {
    let i = offset;
    let nChars = 0;
    const tabSize = options.tabSize || 4;
    while (i < content.length) {
        const ch = content.charAt(i);
        if (ch === ' ') {
            nChars++;
        }
        else if (ch === '\t') {
            nChars += tabSize;
        }
        else {
            break;
        }
        i++;
    }
    return Math.floor(nChars / tabSize);
}
function isEOL$1(text, offset) {
    return '\r\n'.indexOf(text.charAt(offset)) !== -1;
}
function isWhitespace$1(text, offset) {
    return ' \t'.indexOf(text.charAt(offset)) !== -1;
}

var LIB;(()=>{var t={975:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",i=0,o=-1,s=0,h=0;h<=t.length;++h){if(h<t.length)r=t.charCodeAt(h);else {if(47===r)break;r=47;}if(47===r){if(o===h-1||1===s);else if(o!==h-1&&2===s){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var a=n.lastIndexOf("/");if(a!==n.length-1){-1===a?(n="",i=0):i=(n=n.slice(0,a)).length-1-n.lastIndexOf("/"),o=h,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=h,s=0;continue}e&&(n.length>0?n+="/..":n="..",i=2);}else n.length>0?n+="/"+t.slice(o+1,h):n=t.slice(o+1,h),i=h-o-1;o=h,s=0;}else 46===r&&-1!==s?++s:s=-1;}return n}var n={resolve:function(){for(var t,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=process.cwd()),s=t),e(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0));}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return ".";var n=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return ".";for(var t,r=0;r<arguments.length;++r){var i=arguments[r];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i);}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return "";if((t=n.resolve(t))===(r=n.resolve(r)))return "";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var o=t.length,s=o-i,h=1;h<r.length&&47===r.charCodeAt(h);++h);for(var a=r.length-h,c=s<a?s:a,f=-1,u=0;u<=c;++u){if(u===c){if(a>c){if(47===r.charCodeAt(h+u))return r.slice(h+u+1);if(0===u)return r.slice(h+u)}else s>c&&(47===t.charCodeAt(i+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(i+u);if(l!==r.charCodeAt(h+u))break;47===l&&(f=u);}var g="";for(u=i+f+1;u<=o;++u)u!==o&&47!==t.charCodeAt(u)||(0===g.length?g+="..":g+="/..");return g.length>0?g+r.slice(h+f):(h+=f,47===r.charCodeAt(h)&&++h,r.slice(h))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return ".";for(var r=t.charCodeAt(0),n=47===r,i=-1,o=!0,s=t.length-1;s>=1;--s)if(47===(r=t.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return -1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return "";var h=r.length-1,a=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else -1===a&&(s=!1,a=n+1),h>=0&&(c===r.charCodeAt(h)?-1==--h&&(o=n):(h=-1,o=a));}return i===o?o=a:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){i=n+1;break}}else -1===o&&(s=!1,o=n+1);return -1===o?"":t.slice(i,o)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,o=!0,s=0,h=t.length-1;h>=0;--h){var a=t.charCodeAt(h);if(47!==a)-1===i&&(o=!1,i=h+1),46===a?-1===r?r=h:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=h+1;break}}return -1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,h=0,a=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(i=t.charCodeAt(f)))-1===a&&(c=!1,a=f+1),46===i?-1===s?s=f:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){h=f+1;break}return -1===s||-1===a||0===u||1===u&&s===a-1&&s===h+1?-1!==a&&(r.base=r.name=0===h&&o?t.slice(1,a):t.slice(h,a)):(0===h&&o?(r.name=t.slice(1,s),r.base=t.slice(1,a)):(r.name=t.slice(h,s),r.base=t.slice(h,a)),r.ext=t.slice(s,a)),h>0?r.dir=t.slice(0,h-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n;}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]});},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0});};var n={};let i;if(r.r(n),r.d(n,{URI:()=>l,Utils:()=>I}),"object"==typeof process)i="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;i=t.indexOf("Windows")>=0;}const o=/^\w[\w\d+.-]*$/,s=/^\//,h=/^\/\//;function a(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!o.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!s.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(h.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",f="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class l{static isUri(t){return t instanceof l||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,o=!1){"object"==typeof t?(this.scheme=t.scheme||c,this.authority=t.authority||c,this.path=t.path||c,this.query=t.query||c,this.fragment=t.fragment||c):(this.scheme=function(t,e){return t||e?t:"file"}(t,o),this.authority=e||c,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==f&&(e=f+e):e=f;}return e}(this.scheme,r||c),this.query=n||c,this.fragment=i||c,a(this,o));}get fsPath(){return v(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:o}=t;return void 0===e?e=this.scheme:null===e&&(e=c),void 0===r?r=this.authority:null===r&&(r=c),void 0===n?n=this.path:null===n&&(n=c),void 0===i?i=this.query:null===i&&(i=c),void 0===o?o=this.fragment:null===o&&(o=c),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new d(e,r,n,i,o)}static parse(t,e=!1){const r=u.exec(t);return r?new d(r[2]||c,w(r[4]||c),w(r[5]||c),w(r[7]||c),w(r[9]||c),e):new d(c,c,c,c,c)}static file(t){let e=c;if(i&&(t=t.replace(/\\/g,f)),t[0]===f&&t[1]===f){const r=t.indexOf(f,2);-1===r?(e=t.substring(2),t=f):(e=t.substring(2,r),t=t.substring(r)||f);}return new d("file",e,t,c,c)}static from(t){const e=new d(t.scheme,t.authority,t.path,t.query,t.fragment);return a(e,!0),e}toString(t=!1){return b(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof l)return t;{const e=new d(t);return e._formatted=t.external,e._fsPath=t._sep===g?t.fsPath:null,e}}return t}}const g=i?1:void 0;class d extends l{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(t=!1){return t?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=g),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 p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function m(t,e,r){let n,i=-1;for(let o=0;o<t.length;o++){const s=t.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||e&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),void 0!==n&&(n+=t.charAt(o));else {void 0===n&&(n=t.substr(0,o));const e=p[s];void 0!==e?(-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),n+=e):-1===i&&(i=o);}}return -1!==i&&(n+=encodeURIComponent(t.substring(i))),void 0!==n?n:t}function y(t){let e;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);35===n||63===n?(void 0===e&&(e=t.substr(0,r)),e+=p[n]):void 0!==e&&(e+=t[r]);}return void 0!==e?e:t}function v(t,e){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,i&&(r=r.replace(/\//g,"\\")),r}function b(t,e){const r=e?y:m;let n="",{scheme:i,authority:o,path:s,query:h,fragment:a}=t;if(i&&(n+=i,n+=":"),(o||"file"===i)&&(n+=f,n+=f),o){let t=o.indexOf("@");if(-1!==t){const e=o.substr(0,t);o=o.substr(t+1),t=e.lastIndexOf(":"),-1===t?n+=r(e,!1,!1):(n+=r(e.substr(0,t),!1,!1),n+=":",n+=r(e.substr(t+1),!1,!0)),n+="@";}o=o.toLowerCase(),t=o.lastIndexOf(":"),-1===t?n+=r(o,!1,!0):(n+=r(o.substr(0,t),!1,!0),n+=o.substr(t));}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const t=s.charCodeAt(1);t>=65&&t<=90&&(s=`/${String.fromCharCode(t+32)}:${s.substr(3)}`);}else if(s.length>=2&&58===s.charCodeAt(1)){const t=s.charCodeAt(0);t>=65&&t<=90&&(s=`${String.fromCharCode(t+32)}:${s.substr(2)}`);}n+=r(s,!0,!1);}return h&&(n+="?",n+=r(h,!1,!1)),a&&(n+="#",n+=e?a:m(a,!1,!1)),n}function C(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+C(t.substr(3)):t}}const A=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(t){return t.match(A)?t.replace(A,(t=>C(t))):t}var x=r(975);const P=x.posix||x,_="/";var I;!function(t){t.joinPath=function(t,...e){return t.with({path:P.join(t.path,...e)})},t.resolvePath=function(t,...e){let r=t.path,n=!1;r[0]!==_&&(r=_+r,n=!0);let i=P.resolve(r,...e);return n&&i[0]===_&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===_)return t;let e=P.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return P.basename(t.path)},t.extname=function(t){return P.extname(t.path)};}(I||(I={})),LIB=n;})();const{URI: URI$2,Utils}=LIB;

function normalizeRef(url) {
    const first = url[0];
    const last = url[url.length - 1];
    if (first === last && (first === '\'' || first === '\"')) {
        url = url.substring(1, url.length - 1);
    }
    return url;
}
function validateRef(url, languageId) {
    if (!url.length) {
        return false;
    }
    if (languageId === 'handlebars' && /{{|}}/.test(url)) {
        return false;
    }
    return /\b(w[\w\d+.-]*:\/\/)?[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))/.test(url);
}
function getWorkspaceUrl(documentUri, tokenContent, documentContext, base) {
    if (/^\s*javascript\:/i.test(tokenContent) || /[\n\r]/.test(tokenContent)) {
        return undefined;
    }
    tokenContent = tokenContent.replace(/^\s*/g, '');
    const match = tokenContent.match(/^(\w[\w\d+.-]*):/);
    if (match) {
        const schema = match[1].toLowerCase();
        if (schema === 'http' || schema === 'https' || schema === 'file') {
            return tokenContent;
        }
        return undefined;
    }
    if (/^\#/i.test(tokenContent)) {
        return documentUri + tokenContent;
    }
    if (/^\/\//i.test(tokenContent)) {
        const pickedScheme = startsWith$1(documentUri, 'https://') ? 'https' : 'http';
        return pickedScheme + ':' + tokenContent.replace(/^\s*/g, '');
    }
    if (documentContext) {
        return documentContext.resolveReference(tokenContent, base || documentUri);
    }
    return tokenContent;
}
function createLink(document, documentContext, attributeValue, startOffset, endOffset, base) {
    const tokenContent = normalizeRef(attributeValue);
    if (!validateRef(tokenContent, document.languageId)) {
        return undefined;
    }
    if (tokenContent.length < attributeValue.length) {
        startOffset++;
        endOffset--;
    }
    const workspaceUrl = getWorkspaceUrl(document.uri, tokenContent, documentContext, base);
    if (!workspaceUrl) {
        return undefined;
    }
    const target = validateAndCleanURI(workspaceUrl, document);
    return {
        range: Range$1.create(document.positionAt(startOffset), document.positionAt(endOffset)),
        target
    };
}
const _hash = '#'.charCodeAt(0);
function validateAndCleanURI(uriStr, document) {
    try {
        let uri = URI$2.parse(uriStr);
        if (uri.scheme === 'file' && uri.query) {
            uri = uri.with({ query: null });
            uriStr = uri.toString( true);
        }
        if (uri.scheme === 'file' && uri.fragment && !(uriStr.startsWith(document.uri) && uriStr.charCodeAt(document.uri.length) === _hash)) {
            return uri.with({ fragment: null }).toString( true);
        }
        return uriStr;
    }
    catch (e) {
        return undefined;
    }
}
class HTMLDocumentLinks {
    constructor(dataManager) {
        this.dataManager = dataManager;
    }
    findDocumentLinks(document, documentContext) {
        const newLinks = [];
        const scanner = createScanner$1(document.getText(), 0);
        let token = scanner.scan();
        let lastAttributeName = undefined;
        let lastTagName = undefined;
        let afterBase = false;
        let base = void 0;
        const idLocations = {};
        while (token !== TokenType$1.EOS) {
            switch (token) {
                case TokenType$1.StartTag:
                    lastTagName = scanner.getTokenText().toLowerCase();
                    if (!base) {
                        afterBase = lastTagName === 'base';
                    }
                    break;
                case TokenType$1.AttributeName:
                    lastAttributeName = scanner.getTokenText().toLowerCase();
                    break;
                case TokenType$1.AttributeValue:
                    if (lastTagName && lastAttributeName && this.dataManager.isPathAttribute(lastTagName, lastAttributeName)) {
                        const attributeValue = scanner.getTokenText();
                        if (!afterBase) {
                            const link = createLink(document, documentContext, attributeValue, scanner.getTokenOffset(), scanner.getTokenEnd(), base);
                            if (link) {
                                newLinks.push(link);
                            }
                        }
                        if (afterBase && typeof base === 'undefined') {
                            base = normalizeRef(attributeValue);
                            if (base && documentContext) {
                                base = documentContext.resolveReference(base, document.uri);
                            }
                        }
                        afterBase = false;
                        lastAttributeName = undefined;
                    }
                    else if (lastAttributeName === 'id') {
                        const id = normalizeRef(scanner.getTokenText());
                        idLocations[id] = scanner.getTokenOffset();
                    }
                    break;
            }
            token = scanner.scan();
        }
        for (const link of newLinks) {
            const localWithHash = document.uri + '#';
            if (link.target && startsWith$1(link.target, localWithHash)) {
                const target = link.target.substring(localWithHash.length);
                const offset = idLocations[target];
                if (offset !== undefined) {
                    const pos = document.positionAt(offset);
                    link.target = `${localWithHash}${pos.line + 1},${pos.character + 1}`;
                }
                else {
                    link.target = document.uri;
                }
            }
        }
        return newLinks;
    }
}

function findDocumentHighlights(document, position, htmlDocument) {
    const offset = document.offsetAt(position);
    const node = htmlDocument.findNodeAt(offset);
    if (!node.tag) {
        return [];
    }
    const result = [];
    const startTagRange = getTagNameRange(TokenType$1.StartTag, document, node.start);
    const endTagRange = typeof node.endTagStart === 'number' && getTagNameRange(TokenType$1.EndTag, document, node.endTagStart);
    if (startTagRange && covers(startTagRange, position) || endTagRange && covers(endTagRange, position)) {
        if (startTagRange) {
            result.push({ kind: DocumentHighlightKind$1.Read, range: startTagRange });
        }
        if (endTagRange) {
            result.push({ kind: DocumentHighlightKind$1.Read, range: endTagRange });
        }
    }
    return result;
}
function isBeforeOrEqual(pos1, pos2) {
    return pos1.line < pos2.line || (pos1.line === pos2.line && pos1.character <= pos2.character);
}
function covers(range, position) {
    return isBeforeOrEqual(range.start, position) && isBeforeOrEqual(position, range.end);
}
function getTagNameRange(tokenType, document, startOffset) {
    const scanner = createScanner$1(document.getText(), startOffset);
    let token = scanner.scan();
    while (token !== TokenType$1.EOS && token !== tokenType) {
        token = scanner.scan();
    }
    if (token !== TokenType$1.EOS) {
        return { start: document.positionAt(scanner.getTokenOffset()), end: document.positionAt(scanner.getTokenEnd()) };
    }
    return null;
}

function findDocumentSymbols(document, htmlDocument) {
    const symbols = [];
    const symbols2 = findDocumentSymbols2(document, htmlDocument);
    for (const symbol of symbols2) {
        walk(symbol, undefined);
    }
    return symbols;
    function walk(node, parent) {
        const symbol = SymbolInformation$1.create(node.name, node.kind, node.range, document.uri, parent?.name);
        symbol.containerName ?? (symbol.containerName = '');
        symbols.push(symbol);
        if (node.children) {
            for (const child of node.children) {
                walk(child, node);
            }
        }
    }
}
function findDocumentSymbols2(document, htmlDocument) {
    const symbols = [];
    htmlDocument.roots.forEach(node => {
        provideFileSymbolsInternal(document, node, symbols);
    });
    return symbols;
}
function provideFileSymbolsInternal(document, node, symbols) {
    const name = nodeToName(node);
    const range = Range$1.create(document.positionAt(node.start), document.positionAt(node.end));
    const symbol = DocumentSymbol$1.create(name, undefined, SymbolKind$1.Field, range, range);
    symbols.push(symbol);
    node.children.forEach(child => {
        symbol.children ?? (symbol.children = []);
        provideFileSymbolsInternal(document, child, symbol.children);
    });
}
function nodeToName(node) {
    let name = node.tag;
    if (node.attributes) {
        const id = node.attributes['id'];
        const classes = node.attributes['class'];
        if (id) {
            name += `#${id.replace(/[\"\']/g, '')}`;
        }
        if (classes) {
            name += classes.replace(/[\"\']/g, '').split(/\s+/).map(className => `.${className}`).join('');
        }
    }
    return name || '?';
}

function doRename(document, position, newName, htmlDocument) {
    const offset = document.offsetAt(position);
    const node = htmlDocument.findNodeAt(offset);
    if (!node.tag) {
        return null;
    }
    if (!isWithinTagRange(node, offset, node.tag)) {
        return null;
    }
    const edits = [];
    const startTagRange = {
        start: document.positionAt(node.start + '<'.length),
        end: document.positionAt(node.start + '<'.length + node.tag.length)
    };
    edits.push({
        range: startTagRange,
        newText: newName
    });
    if (node.endTagStart) {
        const endTagRange = {
            start: document.positionAt(node.endTagStart + '</'.length),
            end: document.positionAt(node.endTagStart + '</'.length + node.tag.length)
        };
        edits.push({
            range: endTagRange,
            newText: newName
        });
    }
    const changes = {
        [document.uri.toString()]: edits
    };
    return {
        changes
    };
}
function isWithinTagRange(node, offset, nodeTag) {
    if (node.endTagStart) {
        if (node.endTagStart + '</'.length <= offset && offset <= node.endTagStart + '</'.length + nodeTag.length) {
            return true;
        }
    }
    return node.start + '<'.length <= offset && offset <= node.start + '<'.length + nodeTag.length;
}

function findMatchingTagPosition(document, position, htmlDocument) {
    const offset = document.offsetAt(position);
    const node = htmlDocument.findNodeAt(offset);
    if (!node.tag) {
        return null;
    }
    if (!node.endTagStart) {
        return null;
    }
    if (node.start + '<'.length <= offset && offset <= node.start + '<'.length + node.tag.length) {
        const mirrorOffset = (offset - '<'.length - node.start) + node.endTagStart + '</'.length;
        return document.positionAt(mirrorOffset);
    }
    if (node.endTagStart + '</'.length <= offset && offset <= node.endTagStart + '</'.length + node.tag.length) {
        const mirrorOffset = (offset - '</'.length - node.endTagStart) + node.start + '<'.length;
        return document.positionAt(mirrorOffset);
    }
    return null;
}

function findLinkedEditingRanges(document, position, htmlDocument) {
    const offset = document.offsetAt(position);
    const node = htmlDocument.findNodeAt(offset);
    const tagLength = node.tag ? node.tag.length : 0;
    if (!node.endTagStart) {
        return null;
    }
    if (
    (node.start + '<'.length <= offset && offset <= node.start + '<'.length + tagLength) ||
        node.endTagStart + '</'.length <= offset && offset <= node.endTagStart + '</'.length + tagLength) {
        return [
            Range$1.create(document.positionAt(node.start + '<'.length), document.positionAt(node.start + '<'.length + tagLength)),
            Range$1.create(document.positionAt(node.endTagStart + '</'.length), document.positionAt(node.endTagStart + '</'.length + tagLength))
        ];
    }
    return null;
}

class HTMLFolding {
    constructor(dataManager) {
        this.dataManager = dataManager;
    }
    limitRanges(ranges, rangeLimit) {
        ranges = ranges.sort((r1, r2) => {
            let diff = r1.startLine - r2.startLine;
            if (diff === 0) {
                diff = r1.endLine - r2.endLine;
            }
            return diff;
        });
        let top = void 0;
        const previous = [];
        const nestingLevels = [];
        const nestingLevelCounts = [];
        const setNestingLevel = (index, level) => {
            nestingLevels[index] = level;
            if (level < 30) {
                nestingLevelCounts[level] = (nestingLevelCounts[level] || 0) + 1;
            }
        };
        for (let i = 0; i < ranges.length; i++) {
            const entry = ranges[i];
            if (!top) {
                top = entry;
                setNestingLevel(i, 0);
            }
            else {
                if (entry.startLine > top.startLine) {
                    if (entry.endLine <= top.endLine) {
                        previous.push(top);
                        top = entry;
                        setNestingLevel(i, previous.length);
                    }
                    else if (entry.startLine > top.endLine) {
                        do {
                            top = previous.pop();
                        } while (top && entry.startLine > top.endLine);
                        if (top) {
                            previous.push(top);
                        }
                        top = entry;
                        setNestingLevel(i, previous.length);
                    }
                }
            }
        }
        let entries = 0;
        let maxLevel = 0;
        for (let i = 0; i < nestingLevelCounts.length; i++) {
            const n = nestingLevelCounts[i];
            if (n) {
                if (n + entries > rangeLimit) {
                    maxLevel = i;
                    break;
                }
                entries += n;
            }
        }
        const result = [];
        for (let i = 0; i < ranges.length; i++) {
            const level = nestingLevels[i];
            if (typeof level === 'number') {
                if (level < maxLevel || (level === maxLevel && entries++ < rangeLimit)) {
                    result.push(ranges[i]);
                }
            }
        }
        return result;
    }
    getFoldingRanges(document, context) {
        const scanner = createScanner$1(document.getText());
        let token = scanner.scan();
        const ranges = [];
        const stack = [];
        let lastTagName = null;
        let prevStart = -1;
        let voidElements;
        function addRange(range) {
            ranges.push(range);
            prevStart = range.startLine;
        }
        while (token !== TokenType$1.EOS) {
            switch (token) {
                case TokenType$1.StartTag: {
                    const tagName = scanner.getTokenText();
                    const startLine = document.positionAt(scanner.getTokenOffset()).line;
                    stack.push({ startLine, tagName });
                    lastTagName = tagName;
                    break;
                }
                case TokenType$1.EndTag: {
                    lastTagName = scanner.getTokenText();
                    break;
                }
                case TokenType$1.StartTagClose:
                    if (!lastTagName) {
                        break;
                    }
                    voidElements ?? (voidElements = this.dataManager.getVoidElements(document.languageId));
                    if (!this.dataManager.isVoidElement(lastTagName, voidElements)) {
                        break;
                    }
                case TokenType$1.EndTagClose:
                case TokenType$1.StartTagSelfClose: {
                    let i = stack.length - 1;
                    while (i >= 0 && stack[i].tagName !== lastTagName) {
                        i--;
                    }
                    if (i >= 0) {
                        const stackElement = stack[i];
                        stack.length = i;
                        const line = document.positionAt(scanner.getTokenOffset()).line;
                        const startLine = stackElement.startLine;
                        const endLine = line - 1;
                        if (endLine > startLine && prevStart !== startLine) {
                            addRange({ startLine, endLine });
                        }
                    }
                    break;
                }
                case TokenType$1.Comment: {
                    let startLine = document.positionAt(scanner.getTokenOffset()).line;
                    const text = scanner.getTokenText();
                    const m = text.match(/^\s*#(region\b)|(endregion\b)/);
                    if (m) {
                        if (m[1]) {
                            stack.push({ startLine, tagName: '' });
                        }
                        else {
                            let i = stack.length - 1;
                            while (i >= 0 && stack[i].tagName.length) {
                                i--;
                            }
                            if (i >= 0) {
                                const stackElement = stack[i];
                                stack.length = i;
                                const endLine = startLine;
                                startLine = stackElement.startLine;
                                if (endLine > startLine && prevStart !== startLine) {
                                    addRange({ startLine, endLine, kind: FoldingRangeKind$1.Region });
                                }
                            }
                        }
                    }
                    else {
                        const endLine = document.positionAt(scanner.getTokenOffset() + scanner.getTokenLength()).line;
                        if (startLine < endLine) {
                            addRange({ startLine, endLine, kind: FoldingRangeKind$1.Comment });
                        }
                    }
                    break;
                }
            }
            token = scanner.scan();
        }
        const rangeLimit = context && context.rangeLimit || Number.MAX_VALUE;
        if (ranges.length > rangeLimit) {
            return this.limitRanges(ranges, rangeLimit);
        }
        return ranges;
    }
}

class HTMLSelectionRange {
    constructor(htmlParser) {
        this.htmlParser = htmlParser;
    }
    getSelectionRanges(document, positions) {
        const htmlDocument = this.htmlParser.parseDocument(document);
        return positions.map(p => this.getSelectionRange(p, document, htmlDocument));
    }
    getSelectionRange(position, document, htmlDocument) {
        const applicableRanges = this.getApplicableRanges(document, position, htmlDocument);
        let prev = undefined;
        let current = undefined;
        for (let index = applicableRanges.length - 1; index >= 0; index--) {
            const range = applicableRanges[index];
            if (!prev || range[0] !== prev[0] || range[1] !== prev[1]) {
                current = SelectionRange$1.create(Range$1.create(document.positionAt(applicableRanges[index][0]), document.positionAt(applicableRanges[index][1])), current);
            }
            prev = range;
        }
        if (!current) {
            current = SelectionRange$1.create(Range$1.create(position, position));
        }
        return current;
    }
    getApplicableRanges(document, position, htmlDoc) {
        const currOffset = document.offsetAt(position);
        const currNode = htmlDoc.findNodeAt(currOffset);
        let result = this.getAllParentTagRanges(currNode);
        if (currNode.startTagEnd && !currNode.endTagStart) {
            if (currNode.startTagEnd !== currNode.end) {
                return [[currNode.start, currNode.end]];
            }
            const closeRange = Range$1.create(document.positionAt(currNode.startTagEnd - 2), document.positionAt(currNode.startTagEnd));
            const closeText = document.getText(closeRange);
            if (closeText === '/>') {
                result.unshift([currNode.start + 1, currNode.startTagEnd - 2]);
            }
            else {
                result.unshift([currNode.start + 1, currNode.startTagEnd - 1]);
            }
            const attributeLevelRanges = this.getAttributeLevelRanges(document, currNode, currOffset);
            result = attributeLevelRanges.concat(result);
            return result;
        }
        if (!currNode.startTagEnd || !currNode.endTagStart) {
            return result;
        }
        result.unshift([currNode.start, currNode.end]);
        if (currNode.start < currOffset && currOffset < currNode.startTagEnd) {
            result.unshift([currNode.start + 1, currNode.startTagEnd - 1]);
            const attributeLevelRanges = this.getAttributeLevelRanges(document, currNode, currOffset);
            result = attributeLevelRanges.concat(result);
            return result;
        }
        else if (currNode.startTagEnd <= currOffset && currOffset <= currNode.endTagStart) {
            result.unshift([currNode.startTagEnd, currNode.endTagStart]);
            return result;
        }
        else {
            if (currOffset >= currNode.endTagStart + 2) {
                result.unshift([currNode.endTagStart + 2, currNode.end - 1]);
            }
            return result;
        }
    }
    getAllParentTagRanges(initialNode) {
        let currNode = initialNode;
        const result = [];
        while (currNode.parent) {
            currNode = currNode.parent;
            this.getNodeRanges(currNode).forEach(r => result.push(r));
        }
        return result;
    }
    getNodeRanges(n) {
        if (n.startTagEnd && n.endTagStart && n.startTagEnd < n.endTagStart) {
            return [
                [n.startTagEnd, n.endTagStart],
                [n.start, n.end]
            ];
        }
        return [
            [n.start, n.end]
        ];
    }
    ;
    getAttributeLevelRanges(document, currNode, currOffset) {
        const currNodeRange = Range$1.create(document.positionAt(currNode.start), document.positionAt(currNode.end));
        const currNodeText = document.getText(currNodeRange);
        const relativeOffset = currOffset - currNode.start;
        const scanner = createScanner$1(currNodeText);
        let token = scanner.scan();
        const positionOffset = currNode.start;
        const result = [];
        let isInsideAttribute = false;
        let attrStart = -1;
        while (token !== TokenType$1.EOS) {
            switch (token) {
                case TokenType$1.AttributeName: {
                    if (relativeOffset < scanner.getTokenOffset()) {
                        isInsideAttribute = false;
                        break;
                    }
                    if (relativeOffset <= scanner.getTokenEnd()) {
                        result.unshift([scanner.getTokenOffset(), scanner.getTokenEnd()]);
                    }
                    isInsideAttribute = true;
                    attrStart = scanner.getTokenOffset();
                    break;
                }
                case TokenType$1.AttributeValue: {
                    if (!isInsideAttribute) {
                        break;
                    }
                    const valueText = scanner.getTokenText();
                    if (relativeOffset < scanner.getTokenOffset()) {
                        result.push([attrStart, scanner.getTokenEnd()]);
                        break;
                    }
                    if (relativeOffset >= scanner.getTokenOffset() && relativeOffset <= scanner.getTokenEnd()) {
                        result.unshift([scanner.getTokenOffset(), scanner.getTokenEnd()]);
                        if ((valueText[0] === `"` && valueText[valueText.length - 1] === `"`) || (valueText[0] === `'` && valueText[valueText.length - 1] === `'`)) {
                            if (relativeOffset >= scanner.getTokenOffset() + 1 && relativeOffset <= scanner.getTokenEnd() - 1) {
                                result.unshift([scanner.getTokenOffset() + 1, scanner.getTokenEnd() - 1]);
                            }
                        }
                        result.push([attrStart, scanner.getTokenEnd()]);
                    }
                    break;
                }
            }
            token = scanner.scan();
        }
        return result.map(pair => {
            return [pair[0] + positionOffset, pair[1] + positionOffset];
        });
    }
}

const htmlData$1 = {
    "version": 1.1,
    "tags": [
        {
            "name": "html",
            "description": {
                "kind": "markdown",
                "value": "The html element represents the root of an HTML document."
            },
            "attributes": [
                {
                    "name": "manifest",
                    "description": {
                        "kind": "markdown",
                        "value": "Specifies the URI of a resource manifest indicating resources that should be cached locally. See [Using the application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache) for details."
                    }
                },
                {
                    "name": "version",
                    "description": "Specifies the version of the HTML [Document Type Definition](https://developer.mozilla.org/en-US/docs/Glossary/DTD \"Document Type Definition: In HTML, the doctype is the required \"<!DOCTYPE html>\" preamble found at the top of all documents. Its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the \"<!DOCTYPE html>\" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.\") that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "xmlns",
                    "description": "Specifies the XML Namespace of the document. Default value is `\"http://www.w3.org/1999/xhtml\"`. This is required in documents parsed with XML parsers, and optional in text/html documents.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/html"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "head",
            "description": {
                "kind": "markdown",
                "value": "The head element represents a collection of metadata for the Document."
            },
            "attributes": [
                {
                    "name": "profile",
                    "description": "The URIs of one or more metadata profiles, separated by white space."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/head"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "title",
            "description": {
                "kind": "markdown",
                "value": "The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/title"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "base",
            "description": {
                "kind": "markdown",
                "value": "The base element allows authors to specify the document base URL for the purposes of resolving relative URLs, and the name of the default browsing context for the purposes of following hyperlinks. The element does not represent any content beyond this information."
            },
            "void": true,
            "attributes": [
                {
                    "name": "href",
                    "description": {
                        "kind": "markdown",
                        "value": "The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs. Absolute and relative URLs are allowed."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "target",
                    "valueSet": "target",
                    "description": {
                        "kind": "markdown",
                        "value": "A name or keyword indicating the default location to display the result when hyperlinks or forms cause navigation, for elements that do not have an explicit target reference. It is a name of, or keyword for, a _browsing context_ (for example: tab, window, or inline frame). The following keywords have special meanings:\n\n*   `_self`: Load the result into the same browsing context as the current one. This value is the default if the attribute is not specified.\n*   `_blank`: Load the result into a new unnamed browsing context.\n*   `_parent`: Load the result into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n*   `_top`: Load the result into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n\nIf this attribute is specified, this element must come before any other elements with attributes whose values are URLs."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/base"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S3",
                "SM2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "link",
            "description": {
                "kind": "markdown",
                "value": "The link element allows authors to link their document to other resources."
            },
            "void": true,
            "attributes": [
                {
                    "name": "href",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute specifies the [URL](https://developer.mozilla.org/en-US/docs/Glossary/URL \"URL: Uniform Resource Locator (URL) is a text string specifying where a resource can be found on the Internet.\") of the linked resource. A URL can be absolute or relative."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "crossorigin",
                    "valueSet": "xo",
                    "description": {
                        "kind": "markdown",
                        "value": "This enumerated attribute indicates whether [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS \"CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.\") must be used when fetching the resource. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") element without being _tainted_. The allowed values are:\n\n`anonymous`\n\nA cross-origin request (i.e. with an [`Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin \"The Origin request header indicates where a fetch originates from. It doesn't include any path information, but only the server name. It is sent with CORS requests, as well as with POST requests. It is similar to the Referer header, but, unlike this header, it doesn't disclose the whole path.\") HTTP header) is performed, but no credential is sent (i.e. no cookie, X.509 certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (by not setting the [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin \"The Access-Control-Allow-Origin response header indicates whether the response can be shared with requesting code from the given origin.\") HTTP header) the image will be tainted and its usage restricted.\n\n`use-credentials`\n\nA cross-origin request (i.e. with an `Origin` HTTP header) is performed along with a credential sent (i.e. a cookie, certificate, and/or HTTP Basic authentication is performed). If the server does not give credentials to the origin site (through [`Access-Control-Allow-Credentials`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials \"The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request's credentials mode (Request.credentials) is \"include\".\") HTTP header), the resource will be _tainted_ and its usage restricted.\n\nIf the attribute is not present, the resource is fetched without a [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS \"CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.\") request (i.e. without sending the `Origin` HTTP header), preventing its non-tainted usage. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for additional information."
                    },
                    "browsers": [
                        "C34",
                        "CA34",
                        "E17",
                        "FF18",
                        "FFA18",
                        "S10",
                        "SM10"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2018-04-30",
                        "baseline_high_date": "2020-10-30"
                    }
                },
                {
                    "name": "rel",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute names a relationship of the linked document to the current document. The attribute must be a space-separated list of the [link types values](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "media",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute specifies the media that the linked resource applies to. Its value must be a media type / [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries). This attribute is mainly useful when linking to external stylesheets — it allows the user agent to pick the best adapted one for the device it runs on.\n\n**Notes:**\n\n*   In HTML 4, this can only be a simple white-space-separated list of media description literals, i.e., [media types and groups](https://developer.mozilla.org/en-US/docs/Web/CSS/@media), where defined and allowed as values for this attribute, such as `print`, `screen`, `aural`, `braille`. HTML5 extended this to any kind of [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries), which are a superset of the allowed values of HTML 4.\n*   Browsers not supporting [CSS3 Media Queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries) won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "hreflang",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt). Use this attribute only if the [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute is present."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "type",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as **text/html**, **text/css**, and so on. The common use of this attribute is to define the type of stylesheet being referenced (such as **text/css**), but given that CSS is the only stylesheet language used on the web, not only is it possible to omit the `type` attribute, but is actually now recommended practice. It is also used on `rel=\"preload\"` link types, to make sure the browser only downloads file types that it supports."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "sizes",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute defines the sizes of the icons for visual media contained in the resource. It must be present only if the [`rel`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-rel) contains a value of `icon` or a non-standard type such as Apple's `apple-touch-icon`. It may have the following values:\n\n*   `any`, meaning that the icon can be scaled to any size as it is in a vector format, like `image/svg+xml`.\n*   a white-space separated list of sizes, each in the format `_<width in pixels>_x_<height in pixels>_` or `_<width in pixels>_X_<height in pixels>_`. Each of these sizes must be contained in the resource.\n\n**Note:** Most icon formats are only able to store one single icon; therefore most of the time the [`sizes`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-sizes) contains only one entry. MS's ICO format does, as well as Apple's ICNS. ICO is more ubiquitous; you should definitely use it."
                    },
                    "browsers": [
                        "C80",
                        "CA80",
                        "E80",
                        "FF72",
                        "FFA79",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "≤2020-07-28",
                        "baseline_high_date": "≤2023-01-28"
                    }
                },
                {
                    "name": "as",
                    "description": "This attribute is only used when `rel=\"preload\"` or `rel=\"prefetch\"` has been set on the `<link>` element. It specifies the type of content being loaded by the `<link>`, which is necessary for content prioritization, request matching, application of correct [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP), and setting of correct [`Accept`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept \"The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the Content-Type response header. Browsers set adequate values for this header depending on the context where the request is done: when fetching a CSS stylesheet a different value is set for the request than when fetching an image, video or a script.\") request header.",
                    "browsers": [
                        "C50",
                        "CA50",
                        "E17",
                        "FF56",
                        "FFA56",
                        "S10",
                        "SM10"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2018-04-30",
                        "baseline_high_date": "2020-10-30"
                    }
                },
                {
                    "name": "importance",
                    "description": "Indicates the relative importance of the resource. Priority hints are delegated using the values:"
                },
                {
                    "name": "importance",
                    "description": "**`auto`**: Indicates **no preference**. The browser may use its own heuristics to decide the priority of the resource.\n\n**`high`**: Indicates to the browser that the resource is of **high** priority.\n\n**`low`**: Indicates to the browser that the resource is of **low** priority.\n\n**Note:** The `importance` attribute may only be used for the `<link>` element if `rel=\"preload\"` or `rel=\"prefetch\"` is present."
                },
                {
                    "name": "integrity",
                    "description": "Contains inline metadata — a base64-encoded cryptographic hash of the resource (file) you’re telling the browser to fetch. The browser can use this to verify that the fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).",
                    "browsers": [
                        "C45",
                        "CA45",
                        "E17",
                        "FF43",
                        "FFA43",
                        "S11.1",
                        "SM11.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2018-04-30",
                        "baseline_high_date": "2020-10-30"
                    }
                },
                {
                    "name": "referrerpolicy",
                    "description": "A string indicating which referrer to use when fetching the resource:\n\n*   `no-referrer` means that the [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n*   `no-referrer-when-downgrade` means that no [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior, if no policy is otherwise specified.\n*   `origin` means that the referrer will be the origin of the page, which is roughly the scheme, the host, and the port.\n*   `origin-when-cross-origin` means that navigating to other origins will be limited to the scheme, the host, and the port, while navigating on the same origin will include the referrer's path.\n*   `unsafe-url` means that the referrer will include the origin and the path (but not the fragment, password, or username). This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins.",
                    "browsers": [
                        "C51",
                        "CA51",
                        "E79",
                        "FF50",
                        "FFA50",
                        "S14",
                        "SM14"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-09-16",
                        "baseline_high_date": "2023-03-16"
                    }
                },
                {
                    "name": "title",
                    "description": "The `title` attribute has special semantics on the `<link>` element. When used on a `<link rel=\"stylesheet\">` it defines a [preferred or an alternate stylesheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets). Incorrectly using it may [cause the stylesheet to be ignored](https://developer.mozilla.org/en-US/docs/Correctly_Using_Titles_With_External_Stylesheets)."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/link"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "meta",
            "description": {
                "kind": "markdown",
                "value": "The meta element represents various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements."
            },
            "void": true,
            "attributes": [
                {
                    "name": "name",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute defines the name of a piece of document-level metadata. It should not be set if one of the attributes [`itemprop`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-itemprop), [`http-equiv`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) is also set.\n\nThis metadata name is associated with the value contained by the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute. The possible values for the name attribute are:\n\n*   `application-name` which defines the name of the application running in the web page.\n    \n    **Note:**\n    \n    *   Browsers may use this to identify the application. It is different from the [`<title>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title \"The HTML Title element (<title>) defines the document's title that is shown in a browser's title bar or a page's tab.\") element, which usually contain the application name, but may also contain information like the document name or a status.\n    *   Simple web pages shouldn't define an application-name.\n    \n*   `author` which defines the name of the document's author.\n*   `description` which contains a short and accurate summary of the content of the page. Several browsers, like Firefox and Opera, use this as the default description of bookmarked pages.\n*   `generator` which contains the identifier of the software that generated the page.\n*   `keywords` which contains words relevant to the page's content separated by commas.\n*   `referrer` which controls the [`Referer` HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) attached to requests sent from the document:\n    \n    Values for the `content` attribute of `<meta name=\"referrer\">`\n    \n    `no-referrer`\n    \n    Do not send a HTTP `Referrer` header.\n    \n    `origin`\n    \n    Send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the document.\n    \n    `no-referrer-when-downgrade`\n    \n    Send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) as a referrer to URLs as secure as the current page, (https→https), but does not send a referrer to less secure URLs (https→http). This is the default behaviour.\n    \n    `origin-when-cross-origin`\n    \n    Send the full URL (stripped of parameters) for same-origin requests, but only send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) for other cases.\n    \n    `same-origin`\n    \n    A referrer will be sent for [same-site origins](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy), but cross-origin requests will contain no referrer information.\n    \n    `strict-origin`\n    \n    Only send the origin of the document as the referrer to a-priori as-much-secure destination (HTTPS->HTTPS), but don't send it to a less secure destination (HTTPS->HTTP).\n    \n    `strict-origin-when-cross-origin`\n    \n    Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP).\n    \n    `unsafe-URL`\n    \n    Send the full URL (stripped of parameters) for same-origin or cross-origin requests.\n    \n    **Notes:**\n    \n    *   Some browsers support the deprecated values of `always`, `default`, and `never` for referrer.\n    *   Dynamically inserting `<meta name=\"referrer\">` (with [`document.write`](https://developer.mozilla.org/en-US/docs/Web/API/Document/write) or [`appendChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)) makes the referrer behaviour unpredictable.\n    *   When several conflicting policies are defined, the no-referrer policy is applied.\n    \n\nThis attribute may also have a value taken from the extended list defined on [WHATWG Wiki MetaExtensions page](https://wiki.whatwg.org/wiki/MetaExtensions). Although none have been formally accepted yet, a few commonly used names are:\n\n*   `creator` which defines the name of the creator of the document, such as an organization or institution. If there are more than one, several [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") elements should be used.\n*   `googlebot`, a synonym of `robots`, is only followed by Googlebot (the indexing crawler for Google).\n*   `publisher` which defines the name of the document's publisher.\n*   `robots` which defines the behaviour that cooperative crawlers, or \"robots\", should use with the page. It is a comma-separated list of the values below:\n    \n    Values for the content of `<meta name=\"robots\">`\n    \n    Value\n    \n    Description\n    \n    Used by\n    \n    `index`\n    \n    Allows the robot to index the page (default).\n    \n    All\n    \n    `noindex`\n    \n    Requests the robot to not index the page.\n    \n    All\n    \n    `follow`\n    \n    Allows the robot to follow the links on the page (default).\n    \n    All\n    \n    `nofollow`\n    \n    Requests the robot to not follow the links on the page.\n    \n    All\n    \n    `none`\n    \n    Equivalent to `noindex, nofollow`\n    \n    [Google](https://support.google.com/webmasters/answer/79812)\n    \n    `noodp`\n    \n    Prevents using the [Open Directory Project](https://www.dmoz.org/) description, if any, as the page description in search engine results.\n    \n    [Google](https://support.google.com/webmasters/answer/35624#nodmoz), [Yahoo](https://help.yahoo.com/kb/search-for-desktop/meta-tags-robotstxt-yahoo-search-sln2213.html#cont5), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n    \n    `noarchive`\n    \n    Requests the search engine not to cache the page content.\n    \n    [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives), [Yahoo](https://help.yahoo.com/kb/search-for-desktop/SLN2213.html), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n    \n    `nosnippet`\n    \n    Prevents displaying any description of the page in search engine results.\n    \n    [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n    \n    `noimageindex`\n    \n    Requests this page not to appear as the referring page of an indexed image.\n    \n    [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives)\n    \n    `nocache`\n    \n    Synonym of `noarchive`.\n    \n    [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n    \n    **Notes:**\n    \n    *   Only cooperative robots follow these rules. Do not expect to prevent e-mail harvesters with them.\n    *   The robot still needs to access the page in order to read these rules. To prevent bandwidth consumption, use a _[robots.txt](https://developer.mozilla.org/en-US/docs/Glossary/robots.txt \"robots.txt: Robots.txt is a file which is usually placed in the root of any website. It decides whether crawlers are permitted or forbidden access to the web site.\")_ file.\n    *   If you want to remove a page, `noindex` will work, but only after the robot visits the page again. Ensure that the `robots.txt` file is not preventing revisits.\n    *   Some values are mutually exclusive, like `index` and `noindex`, or `follow` and `nofollow`. In these cases the robot's behaviour is undefined and may vary between them.\n    *   Some crawler robots, like Google, Yahoo and Bing, support the same values for the HTTP header `X-Robots-Tag`; this allows non-HTML documents like images to use these rules.\n    \n*   `slurp`, is a synonym of `robots`, but only for Slurp - the crawler for Yahoo Search.\n*   `viewport`, which gives hints about the size of the initial size of the [viewport](https://developer.mozilla.org/en-US/docs/Glossary/viewport \"viewport: A viewport represents a polygonal (normally rectangular) area in computer graphics that is currently being viewed. In web browser terms, it refers to the part of the document you're viewing which is currently visible in its window (or the screen, if the document is being viewed in full screen mode). Content outside the viewport is not visible onscreen until scrolled into view.\"). Used by mobile devices only.\n    \n    Values for the content of `<meta name=\"viewport\">`\n    \n    Value\n    \n    Possible subvalues\n    \n    Description\n    \n    `width`\n    \n    A positive integer number, or the text `device-width`\n    \n    Defines the pixel width of the viewport that you want the web site to be rendered at.\n    \n    `height`\n    \n    A positive integer, or the text `device-height`\n    \n    Defines the height of the viewport. Not used by any browser.\n    \n    `initial-scale`\n    \n    A positive number between `0.0` and `10.0`\n    \n    Defines the ratio between the device width (`device-width` in portrait mode or `device-height` in landscape mode) and the viewport size.\n    \n    `maximum-scale`\n    \n    A positive number between `0.0` and `10.0`\n    \n    Defines the maximum amount to zoom in. It must be greater or equal to the `minimum-scale` or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default.\n    \n    `minimum-scale`\n    \n    A positive number between `0.0` and `10.0`\n    \n    Defines the minimum zoom level. It must be smaller or equal to the `maximum-scale` or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default.\n    \n    `user-scalable`\n    \n    `yes` or `no`\n    \n    If set to `no`, the user is not able to zoom in the webpage. The default is `yes`. Browser settings can ignore this rule, and iOS10+ ignores it by default.\n    \n    Specification\n    \n    Status\n    \n    Comment\n    \n    [CSS Device Adaptation  \n    The definition of '<meta name=\"viewport\">' in that specification.](https://drafts.csswg.org/css-device-adapt/#viewport-meta)\n    \n    Working Draft\n    \n    Non-normatively describes the Viewport META element\n    \n    See also: [`@viewport`](https://developer.mozilla.org/en-US/docs/Web/CSS/@viewport \"The @viewport CSS at-rule lets you configure the viewport through which the document is viewed. It's primarily used for mobile devices, but is also used by desktop browsers that support features like \"snap to edge\" (such as Microsoft Edge).\")\n    \n    **Notes:**\n    \n    *   Though unstandardized, this declaration is respected by most mobile browsers due to de-facto dominance.\n    *   The default values may vary between devices and browsers.\n    *   To learn about this declaration in Firefox for Mobile, see [this article](https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag \"Mobile/Viewport meta tag\")."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "http-equiv",
                    "description": {
                        "kind": "markdown",
                        "value": "Defines a pragma directive. The attribute is named `**http-equiv**(alent)` because all the allowed values are names of particular HTTP headers:\n\n*   `\"content-language\"`  \n    Defines the default language of the page. It can be overridden by the [lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) attribute on any element.\n    \n    **Warning:** Do not use this value, as it is obsolete. Prefer the `lang` attribute on the [`<html>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html \"The HTML <html> element represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.\") element.\n    \n*   `\"content-security-policy\"`  \n    Allows page authors to define a [content policy](https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives) for the current page. Content policies mostly specify allowed server origins and script endpoints which help guard against cross-site scripting attacks.\n*   `\"content-type\"`  \n    Defines the [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type) of the document, followed by its character encoding. It follows the same syntax as the HTTP `content-type` entity-header field, but as it is inside a HTML page, most values other than `text/html` are impossible. Therefore the valid syntax for its `content` is the string '`text/html`' followed by a character set with the following syntax: '`; charset=_IANAcharset_`', where `IANAcharset` is the _preferred MIME name_ for a character set as [defined by the IANA.](https://www.iana.org/assignments/character-sets)\n    \n    **Warning:** Do not use this value, as it is obsolete. Use the [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) attribute on the [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element.\n    \n    **Note:** As [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") can't change documents' types in XHTML or HTML5's XHTML serialization, never set the MIME type to an XHTML MIME type with `<meta>`.\n    \n*   `\"refresh\"`  \n    This instruction specifies:\n    *   The number of seconds until the page should be reloaded - only if the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute contains a positive integer.\n    *   The number of seconds until the page should redirect to another - only if the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute contains a positive integer followed by the string '`;url=`', and a valid URL.\n*   `\"set-cookie\"`  \n    Defines a [cookie](https://developer.mozilla.org/en-US/docs/cookie) for the page. Its content must follow the syntax defined in the [IETF HTTP Cookie Specification](https://tools.ietf.org/html/draft-ietf-httpstate-cookie-14).\n    \n    **Warning:** Do not use this instruction, as it is obsolete. Use the HTTP header [`Set-Cookie`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) instead."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "content",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute contains the value for the [`http-equiv`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-name) attribute, depending on which is used."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "charset",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute declares the page's character encoding. It must contain a [standard IANA MIME name for character encodings](https://www.iana.org/assignments/character-sets). Although the standard doesn't request a specific encoding, it suggests:\n\n*   Authors are encouraged to use [`UTF-8`](https://developer.mozilla.org/en-US/docs/Glossary/UTF-8).\n*   Authors should not use ASCII-incompatible encodings to avoid security risk: browsers not supporting them may interpret harmful content as HTML. This happens with the `JIS_C6226-1983`, `JIS_X0212-1990`, `HZ-GB-2312`, `JOHAB`, the ISO-2022 family and the EBCDIC family.\n\n**Note:** ASCII-incompatible encodings are those that don't map the 8-bit code points `0x20` to `0x7E` to the `0x0020` to `0x007E` Unicode code points)\n\n*   Authors **must not** use `CESU-8`, `UTF-7`, `BOCU-1` and/or `SCSU` as [cross-site scripting](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting) attacks with these encodings have been demonstrated.\n*   Authors should not use `UTF-32` because not all HTML5 encoding algorithms can distinguish it from `UTF-16`.\n\n**Notes:**\n\n*   The declared character encoding must match the one the page was saved with to avoid garbled characters and security holes.\n*   The [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element declaring the encoding must be inside the [`<head>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head \"The HTML <head> element provides general information (metadata) about the document, including its title and links to its scripts and style sheets.\") element and **within the first 1024 bytes** of the HTML as some browsers only look at those bytes before choosing an encoding.\n*   This [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element is only one part of the [algorithm to determine a page's character set](https://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#encoding-sniffing-algorithm \"Algorithm charset page\"). The [`Content-Type` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) and any [Byte-Order Marks](https://developer.mozilla.org/en-US/docs/Glossary/Byte-Order_Mark \"The definition of that term (Byte-Order Marks) has not been written yet; please consider contributing it!\") override this element.\n*   It is strongly recommended to define the character encoding. If a page's encoding is undefined, cross-scripting techniques are possible, such as the [`UTF-7` fallback cross-scripting technique](https://code.google.com/p/doctype-mirror/wiki/ArticleUtf7).\n*   The [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element with a `charset` attribute is a synonym for the pre-HTML5 `<meta http-equiv=\"Content-Type\" content=\"text/html; charset=_IANAcharset_\">`, where _`IANAcharset`_ contains the value of the equivalent [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) attribute. This syntax is still allowed, although no longer recommended."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "scheme",
                    "description": "This attribute defines the scheme in which metadata is described. A scheme is a context leading to the correct interpretations of the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) value, like a format.\n\n**Warning:** Do not use this value, as it is obsolete. There is no replacement as there was no real usage for it.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/meta"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "style",
            "description": {
                "kind": "markdown",
                "value": "The style element allows authors to embed style information in their documents. The style element is one of several inputs to the styling processing model. The element does not represent content for the user."
            },
            "attributes": [
                {
                    "name": "media",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute defines which media the style should be applied to. Its value is a [media query](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries), which defaults to `all` if the attribute is missing."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "nonce",
                    "description": {
                        "kind": "markdown",
                        "value": "A cryptographic nonce (number used once) used to allow inline styles in a [style-src Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src). The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource’s policy is otherwise trivial."
                    }
                },
                {
                    "name": "type",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute defines the styling language as a MIME type (charset should not be specified). This attribute is optional and defaults to `text/css` if it is not specified — there is very little reason to include this in modern web documents."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "scoped",
                    "valueSet": "v"
                },
                {
                    "name": "title",
                    "description": "This attribute specifies [alternative style sheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets) sets."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/style"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "body",
            "description": {
                "kind": "markdown",
                "value": "The body element represents the content of the document."
            },
            "attributes": [
                {
                    "name": "onafterprint",
                    "description": {
                        "kind": "markdown",
                        "value": "Function to call after the user has printed the document."
                    }
                },
                {
                    "name": "onbeforeprint",
                    "description": {
                        "kind": "markdown",
                        "value": "Function to call when the user requests printing of the document."
                    }
                },
                {
                    "name": "onbeforeunload",
                    "description": {
                        "kind": "markdown",
                        "value": "Function to call when the document is about to be unloaded."
                    }
                },
                {
                    "name": "onhashchange",
                    "description": {
                        "kind": "markdown",
                        "value": "Function to call when the fragment identifier part (starting with the hash (`'#'`) character) of the document's current address has changed."
                    }
                },
                {
                    "name": "onlanguagechange",
                    "description": {
                        "kind": "markdown",
                        "value": "Function to call when the preferred languages changed."
                    }
                },
                {
                    "name": "onmessage",
                    "description": {
                        "kind": "markdown",
                        "value": "Function to call when the document has received a message."
                    }
                },
                {
                    "name": "onoffline",
                    "description": {
                        "kind": "markdown",
                        "value": "Function to call when network communication has failed."
                    }
                },
                {
                    "name": "ononline",
                    "description": {
                        "kind": "markdown",
                        "value": "Function to call when network communication has been restored."
                    }
                },
                {
                    "name": "onpagehide"
                },
                {
                    "name": "onpageshow"
                },
                {
                    "name": "onpopstate",
                    "description": {
                        "kind": "markdown",
                        "value": "Function to call when the user has navigated session history."
                    }
                },
                {
                    "name": "onstorage",
                    "description": {
                        "kind": "markdown",
                        "value": "Function to call when the storage area has changed."
                    }
                },
                {
                    "name": "onunload",
                    "description": {
                        "kind": "markdown",
                        "value": "Function to call when the document is going away."
                    }
                },
                {
                    "name": "alink",
                    "description": "Color of text for hyperlinks when selected. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property in conjunction with the [`:active`](https://developer.mozilla.org/en-US/docs/Web/CSS/:active \"The :active CSS pseudo-class represents an element (such as a button) that is being activated by the user.\") pseudo-class instead._",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "background",
                    "description": "URI of a image to use as a background. _This method is non-conforming, use CSS [`background`](https://developer.mozilla.org/en-US/docs/Web/CSS/background \"The background shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method.\") property on the element instead._",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "bgcolor",
                    "description": "Background color for the document. _This method is non-conforming, use CSS [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color \"The background-color CSS property sets the background color of an element.\") property on the element instead._",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "bottommargin",
                    "description": "The margin of the bottom of the body. _This method is non-conforming, use CSS [`margin-bottom`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom \"The margin-bottom CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E79",
                        "FF35",
                        "FFA35",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "leftmargin",
                    "description": "The margin of the left of the body. _This method is non-conforming, use CSS [`margin-left`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left \"The margin-left CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E79",
                        "FF35",
                        "FFA35",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "link",
                    "description": "Color of text for unvisited hypertext links. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property in conjunction with the [`:link`](https://developer.mozilla.org/en-US/docs/Web/CSS/:link \"The :link CSS pseudo-class represents an element that has not yet been visited. It matches every unvisited <a>, <area>, or <link> element that has an href attribute.\") pseudo-class instead._",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "onblur",
                    "description": "Function to call when the document loses focus."
                },
                {
                    "name": "onerror",
                    "description": "Function to call when the document fails to load properly."
                },
                {
                    "name": "onfocus",
                    "description": "Function to call when the document receives focus."
                },
                {
                    "name": "onload",
                    "description": "Function to call when the document has finished loading."
                },
                {
                    "name": "onredo",
                    "description": "Function to call when the user has moved forward in undo transaction history."
                },
                {
                    "name": "onresize",
                    "description": "Function to call when the document has been resized."
                },
                {
                    "name": "onundo",
                    "description": "Function to call when the user has moved backward in undo transaction history."
                },
                {
                    "name": "rightmargin",
                    "description": "The margin of the right of the body. _This method is non-conforming, use CSS [`margin-right`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right \"The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E79",
                        "FF35",
                        "FFA35",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "text",
                    "description": "Foreground color of text. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property on the element instead._",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "topmargin",
                    "description": "The margin of the top of the body. _This method is non-conforming, use CSS [`margin-top`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top \"The margin-top CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E79",
                        "FF35",
                        "FFA35",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "vlink",
                    "description": "Color of text for visited hypertext links. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property in conjunction with the [`:visited`](https://developer.mozilla.org/en-US/docs/Web/CSS/:visited \"The :visited CSS pseudo-class represents links that the user has already visited. For privacy reasons, the styles that can be modified using this selector are very limited.\") pseudo-class instead._",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/body"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "article",
            "description": {
                "kind": "markdown",
                "value": "The article element represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content. Each article should be identified, typically by including a heading (h1–h6 element) as a child of the article element."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/article"
                }
            ],
            "browsers": [
                "C5",
                "CA18",
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "section",
            "description": {
                "kind": "markdown",
                "value": "The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content. Each section should be identified, typically by including a heading ( h1- h6 element) as a child of the section element."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/section"
                }
            ],
            "browsers": [
                "C5",
                "CA18",
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "nav",
            "description": {
                "kind": "markdown",
                "value": "The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/nav"
                }
            ],
            "browsers": [
                "C5",
                "CA18",
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "aside",
            "description": {
                "kind": "markdown",
                "value": "The aside element represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/aside"
                }
            ],
            "browsers": [
                "C5",
                "CA18",
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "h1",
            "description": {
                "kind": "markdown",
                "value": "The h1 element represents a section heading."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "h2",
            "description": {
                "kind": "markdown",
                "value": "The h2 element represents a section heading."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "h3",
            "description": {
                "kind": "markdown",
                "value": "The h3 element represents a section heading."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "h4",
            "description": {
                "kind": "markdown",
                "value": "The h4 element represents a section heading."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "h5",
            "description": {
                "kind": "markdown",
                "value": "The h5 element represents a section heading."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "h6",
            "description": {
                "kind": "markdown",
                "value": "The h6 element represents a section heading."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "header",
            "description": {
                "kind": "markdown",
                "value": "The header element represents introductory content for its nearest ancestor sectioning content or sectioning root element. A header typically contains a group of introductory or navigational aids. When the nearest ancestor sectioning content or sectioning root element is the body element, then it applies to the whole page."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/header"
                }
            ],
            "browsers": [
                "C5",
                "CA18",
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "footer",
            "description": {
                "kind": "markdown",
                "value": "The footer element represents a footer for its nearest ancestor sectioning content or sectioning root element. A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/footer"
                }
            ],
            "browsers": [
                "C5",
                "CA18",
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "address",
            "description": {
                "kind": "markdown",
                "value": "The address element represents the contact information for its nearest article or body element ancestor. If that is the body element, then the contact information applies to the document as a whole."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/address"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "p",
            "description": {
                "kind": "markdown",
                "value": "The p element represents a paragraph."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/p"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "hr",
            "description": {
                "kind": "markdown",
                "value": "The hr element represents a paragraph-level thematic break, e.g. a scene change in a story, or a transition to another topic within a section of a reference book."
            },
            "void": true,
            "attributes": [
                {
                    "name": "align",
                    "description": "Sets the alignment of the rule on the page. If no value is specified, the default value is `left`.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "color",
                    "description": "Sets the color of the rule through color name or hexadecimal value.",
                    "browsers": [
                        "C33",
                        "CA33",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S10.1",
                        "SM10.3"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "noshade",
                    "description": "Sets the rule to have no shading.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "size",
                    "description": "Sets the height, in pixels, of the rule.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "width",
                    "description": "Sets the length of the rule on the page through a pixel or percentage value.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/hr"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S3",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "pre",
            "description": {
                "kind": "markdown",
                "value": "The pre element represents a block of preformatted text, in which structure is represented by typographic conventions rather than by elements."
            },
            "attributes": [
                {
                    "name": "cols",
                    "description": "Contains the _preferred_ count of characters that a line should have. It was a non-standard synonym of [`width`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre#attr-width). To achieve such an effect, use CSS [`width`](https://developer.mozilla.org/en-US/docs/Web/CSS/width \"The width CSS property sets an element's width. By default it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area.\") instead."
                },
                {
                    "name": "width",
                    "description": "Contains the _preferred_ count of characters that a line should have. Though technically still implemented, this attribute has no visual effect; to achieve such an effect, use CSS [`width`](https://developer.mozilla.org/en-US/docs/Web/CSS/width \"The width CSS property sets an element's width. By default it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area.\") instead.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "wrap",
                    "description": "Is a _hint_ indicating how the overflow must happen. In modern browser this hint is ignored and no visual effect results in its present; to achieve such an effect, use CSS [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space \"The white-space CSS property sets how white space inside an element is handled.\") instead."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/pre"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "blockquote",
            "description": {
                "kind": "markdown",
                "value": "The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a footer or cite element, and optionally with in-line changes such as annotations and abbreviations."
            },
            "attributes": [
                {
                    "name": "cite",
                    "description": {
                        "kind": "markdown",
                        "value": "A URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/blockquote"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "ol",
            "description": {
                "kind": "markdown",
                "value": "The ol element represents a list of items, where the items have been intentionally ordered, such that changing the order would change the meaning of the document."
            },
            "attributes": [
                {
                    "name": "reversed",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute specifies that the items of the list are specified in reversed order."
                    },
                    "browsers": [
                        "C18",
                        "CA18",
                        "E79",
                        "FF18",
                        "FFA18",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "≤2020-01-15",
                        "baseline_high_date": "≤2022-07-15"
                    }
                },
                {
                    "name": "start",
                    "description": {
                        "kind": "markdown",
                        "value": "This integer attribute specifies the start value for numbering the individual list items. Although the ordering type of list elements might be Roman numerals, such as XXXI, or letters, the value of start is always represented as a number. To start numbering elements from the letter \"C\", use `<ol start=\"3\">`.\n\n**Note**: This attribute was deprecated in HTML4, but reintroduced in HTML5."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "type",
                    "valueSet": "lt",
                    "description": {
                        "kind": "markdown",
                        "value": "Indicates the numbering type:\n\n*   `'a'` indicates lowercase letters,\n*   `'A'` indicates uppercase letters,\n*   `'i'` indicates lowercase Roman numerals,\n*   `'I'` indicates uppercase Roman numerals,\n*   and `'1'` indicates numbers (default).\n\nThe type set is used for the entire list unless a different [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li#attr-type) attribute is used within an enclosed [`<li>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li \"The HTML <li> element is used to represent an item in a list. It must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.\") element.\n\n**Note:** This attribute was deprecated in HTML4, but reintroduced in HTML5.\n\nUnless the value of the list number matters (e.g. in legal or technical documents where items are to be referenced by their number/letter), the CSS [`list-style-type`](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type \"The list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element.\") property should be used instead."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "compact",
                    "description": "This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn't work in all browsers.\n\n**Warning:** Do not use this attribute, as it has been deprecated: the [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol \"The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To give an effect similar to the `compact` attribute, the [CSS](https://developer.mozilla.org/en-US/docs/CSS) property [`line-height`](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height \"The line-height CSS property sets the amount of space used for lines, such as in text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height.\") can be used with a value of `80%`.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/ol"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "ul",
            "description": {
                "kind": "markdown",
                "value": "The ul element represents a list of items, where the order of the items is not important — that is, where changing the order would not materially change the meaning of the document."
            },
            "attributes": [
                {
                    "name": "compact",
                    "description": "This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn't work in all browsers.\n\n**Usage note: **Do not use this attribute, as it has been deprecated: the [`<ul>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul \"The HTML <ul> element represents an unordered list of items, typically rendered as a bulleted list.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To give a similar effect as the `compact` attribute, the [CSS](https://developer.mozilla.org/en-US/docs/CSS) property [line-height](https://developer.mozilla.org/en-US/docs/CSS/line-height) can be used with a value of `80%`.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/ul"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "li",
            "description": {
                "kind": "markdown",
                "value": "The li element represents a list item. If its parent element is an ol, ul, or menu element, then the element is an item of the parent element's list, as defined for those elements. Otherwise, the list item has no defined list-related relationship to any other li element."
            },
            "attributes": [
                {
                    "name": "value",
                    "description": {
                        "kind": "markdown",
                        "value": "This integer attribute indicates the current ordinal value of the list item as defined by the [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol \"The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.\") element. The only allowed value for this attribute is a number, even if the list is displayed with Roman numerals or letters. List items that follow this one continue numbering from the value set. The **value** attribute has no meaning for unordered lists ([`<ul>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul \"The HTML <ul> element represents an unordered list of items, typically rendered as a bulleted list.\")) or for menus ([`<menu>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu \"The HTML <menu> element represents a group of commands that a user can perform or activate. This includes both list menus, which might appear across the top of a screen, as well as context menus, such as those that might appear underneath a button after it has been clicked.\")).\n\n**Note**: This attribute was deprecated in HTML4, but reintroduced in HTML5.\n\n**Note:** Prior to Gecko 9.0, negative values were incorrectly converted to 0. Starting in Gecko 9.0 all integer values are correctly parsed."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "type",
                    "description": "This character attribute indicates the numbering type:\n\n*   `a`: lowercase letters\n*   `A`: uppercase letters\n*   `i`: lowercase Roman numerals\n*   `I`: uppercase Roman numerals\n*   `1`: numbers\n\nThis type overrides the one used by its parent [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol \"The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.\") element, if any.\n\n**Usage note:** This attribute has been deprecated: use the CSS [`list-style-type`](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type \"The list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element.\") property instead.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/li"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S3",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "dl",
            "description": {
                "kind": "markdown",
                "value": "The dl element represents an association list consisting of zero or more name-value groups (a description list). A name-value group consists of one or more names (dt elements) followed by one or more values (dd elements), ignoring any nodes other than dt and dd elements. Within a single dl element, there should not be more than one dt element for each name."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/dl"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "dt",
            "description": {
                "kind": "markdown",
                "value": "The dt element represents the term, or name, part of a term-description group in a description list (dl element)."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/dt"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "dd",
            "description": {
                "kind": "markdown",
                "value": "The dd element represents the description, definition, or value, part of a term-description group in a description list (dl element)."
            },
            "attributes": [
                {
                    "name": "nowrap",
                    "description": "If the value of this attribute is set to `yes`, the definition text will not wrap. The default value is `no`."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/dd"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "figure",
            "description": {
                "kind": "markdown",
                "value": "The figure element represents some flow content, optionally with a caption, that is self-contained (like a complete sentence) and is typically referenced as a single unit from the main flow of the document."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/figure"
                }
            ],
            "browsers": [
                "C8",
                "CA18",
                "E12",
                "FF4",
                "FFA4",
                "S5.1",
                "SM5"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "figcaption",
            "description": {
                "kind": "markdown",
                "value": "The figcaption element represents a caption or legend for the rest of the contents of the figcaption element's parent figure element, if any."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/figcaption"
                }
            ],
            "browsers": [
                "C8",
                "CA18",
                "E12",
                "FF4",
                "FFA4",
                "S5.1",
                "SM5"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "main",
            "description": {
                "kind": "markdown",
                "value": "The main element represents the main content of the body of a document or application. The main content area consists of content that is directly related to or expands upon the central topic of a document or central functionality of an application."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/main"
                }
            ],
            "browsers": [
                "C26",
                "CA26",
                "E12",
                "FF21",
                "FFA21",
                "S7",
                "SM7"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "div",
            "description": {
                "kind": "markdown",
                "value": "The div element has no special meaning at all. It represents its children. It can be used with the class, lang, and title attributes to mark up semantics common to a group of consecutive elements."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/div"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "a",
            "description": {
                "kind": "markdown",
                "value": "If the a element has an href attribute, then it represents a hyperlink (a hypertext anchor) labeled by its contents."
            },
            "attributes": [
                {
                    "name": "href",
                    "description": {
                        "kind": "markdown",
                        "value": "Contains a URL or a URL fragment that the hyperlink points to.\nA URL fragment is a name preceded by a hash mark (`#`), which specifies an internal target location (an [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-id) of an HTML element) within the current document. URLs are not restricted to Web (HTTP)-based documents, but can use any protocol supported by the browser. For example, [`file:`](https://en.wikipedia.org/wiki/File_URI_scheme), `ftp:`, and `mailto:` work in most browsers.\n\n**Note:** You can use `href=\"#top\"` or the empty fragment `href=\"#\"` to link to the top of the current page. [This behavior is specified by HTML5](https://www.w3.org/TR/html5/single-page.html#scroll-to-fragid)."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "target",
                    "valueSet": "target",
                    "description": {
                        "kind": "markdown",
                        "value": "Specifies where to display the linked URL. It is a name of, or keyword for, a _browsing context_: a tab, window, or `<iframe>`. The following keywords have special meanings:\n\n*   `_self`: Load the URL into the same browsing context as the current one. This is the default behavior.\n*   `_blank`: Load the URL into a new browsing context. This is usually a tab, but users can configure browsers to use new windows instead.\n*   `_parent`: Load the URL into the parent browsing context of the current one. If there is no parent, this behaves the same way as `_self`.\n*   `_top`: Load the URL into the top-level browsing context (that is, the \"highest\" browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this behaves the same way as `_self`.\n\n**Note:** When using `target`, consider adding `rel=\"noreferrer\"` to avoid exploitation of the `window.opener` API.\n\n**Note:** Linking to another page using `target=\"_blank\"` will run the new page on the same process as your page. If the new page is executing expensive JS, your page's performance may suffer. To avoid this use `rel=\"noopener\"`."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "download",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. If the attribute has a value, it is used as the pre-filled file name in the Save prompt (the user can still change the file name if they want). There are no restrictions on allowed values, though `/` and `\\` are converted to underscores. Most file systems limit some punctuation in file names, and browsers will adjust the suggested name accordingly.\n\n**Notes:**\n\n*   This attribute only works for [same-origin URLs](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy).\n*   Although HTTP(s) URLs need to be in the same-origin, [`blob:` URLs](https://developer.mozilla.org/en-US/docs/Web/API/URL.createObjectURL) and [`data:` URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) are allowed so that content generated by JavaScript, such as pictures created in an image-editor Web app, can be downloaded.\n*   If the HTTP header [`Content-Disposition:`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) gives a different filename than this attribute, the HTTP header takes priority over this attribute.\n*   If `Content-Disposition:` is set to `inline`, Firefox prioritizes `Content-Disposition`, like the filename case, while Chrome prioritizes the `download` attribute."
                    },
                    "browsers": [
                        "C14",
                        "CA18",
                        "E18",
                        "FF20",
                        "FFA20",
                        "S10.1",
                        "SM13"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2019-09-19",
                        "baseline_high_date": "2022-03-19"
                    }
                },
                {
                    "name": "ping",
                    "description": {
                        "kind": "markdown",
                        "value": "Contains a space-separated list of URLs to which, when the hyperlink is followed, [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST \"The HTTP POST method sends data to the server. The type of the body of the request is indicated by the Content-Type header.\") requests with the body `PING` will be sent by the browser (in the background). Typically used for tracking."
                    },
                    "browsers": [
                        "C12",
                        "CA18",
                        "E17",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "rel",
                    "description": {
                        "kind": "markdown",
                        "value": "Specifies the relationship of the target object to the link object. The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "hreflang",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute indicates the human language of the linked resource. It is purely advisory, with no built-in functionality. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt \"Tags for Identifying Languages\")."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "type",
                    "description": {
                        "kind": "markdown",
                        "value": "Specifies the media type in the form of a [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type \"MIME type: A MIME type (now properly called \"media type\", but also sometimes \"content type\") is a string sent along with a file indicating the type of the file (describing the content format, for example, a sound file might be labeled audio/ogg, or an image file image/png).\") for the linked URL. It is purely advisory, with no built-in functionality."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "referrerpolicy",
                    "description": "Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) to send when fetching the URL:\n\n*   `'no-referrer'` means the `Referer:` header will not be sent.\n*   `'no-referrer-when-downgrade'` means no `Referer:` header will be sent when navigating to an origin without HTTPS. This is the default behavior.\n*   `'origin'` means the referrer will be the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the page, not including information after the domain.\n*   `'origin-when-cross-origin'` meaning that navigations to other origins will be limited to the scheme, the host and the port, while navigations on the same origin will include the referrer's path.\n*   `'strict-origin-when-cross-origin'`\n*   `'unsafe-url'` means the referrer will include the origin and path, but not the fragment, password, or username. This is unsafe because it can leak data from secure URLs to insecure ones.",
                    "browsers": [
                        "C51",
                        "CA51",
                        "E79",
                        "FF50",
                        "FFA50",
                        "S14",
                        "SM14"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-09-16",
                        "baseline_high_date": "2023-03-16"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/a"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "em",
            "description": {
                "kind": "markdown",
                "value": "The em element represents stress emphasis of its contents."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/em"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "strong",
            "description": {
                "kind": "markdown",
                "value": "The strong element represents strong importance, seriousness, or urgency for its contents."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/strong"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "small",
            "description": {
                "kind": "markdown",
                "value": "The small element represents side comments such as small print."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/small"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "s",
            "description": {
                "kind": "markdown",
                "value": "The s element represents contents that are no longer accurate or no longer relevant."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/s"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "cite",
            "description": {
                "kind": "markdown",
                "value": "The cite element represents a reference to a creative work. It must include the title of the work or the name of the author(person, people or organization) or an URL reference, or a reference in abbreviated form as per the conventions used for the addition of citation metadata."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/cite"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "q",
            "description": {
                "kind": "markdown",
                "value": "The q element represents some phrasing content quoted from another source."
            },
            "attributes": [
                {
                    "name": "cite",
                    "description": {
                        "kind": "markdown",
                        "value": "The value of this attribute is a URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/q"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S3",
                "SM2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "dfn",
            "description": {
                "kind": "markdown",
                "value": "The dfn element represents the defining instance of a term. The paragraph, description list group, or section that is the nearest ancestor of the dfn element must also contain the definition(s) for the term given by the dfn element."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/dfn"
                }
            ],
            "browsers": [
                "C15",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S6",
                "SM6"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "abbr",
            "description": {
                "kind": "markdown",
                "value": "The abbr element represents an abbreviation or acronym, optionally with its expansion. The title attribute may be used to provide an expansion of the abbreviation. The attribute, if specified, must contain an expansion of the abbreviation, and nothing else."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/abbr"
                }
            ],
            "browsers": [
                "C2",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "ruby",
            "description": {
                "kind": "markdown",
                "value": "The ruby element allows one or more spans of phrasing content to be marked with ruby annotations. Ruby annotations are short runs of text presented alongside base text, primarily used in East Asian typography as a guide for pronunciation or to include other annotations. In Japanese, this form of typography is also known as furigana. Ruby text can appear on either side, and sometimes both sides, of the base text, and it is possible to control its position using CSS. A more complete introduction to ruby can be found in the Use Cases & Exploratory Approaches for Ruby Markup document as well as in CSS Ruby Module Level 1. [RUBY-UC] [CSSRUBY]"
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/ruby"
                }
            ],
            "browsers": [
                "C5",
                "CA18",
                "E12",
                "FF38",
                "FFA38",
                "S5",
                "SM4.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "rb",
            "description": {
                "kind": "markdown",
                "value": "The rb element marks the base text component of a ruby annotation. When it is the child of a ruby element, it doesn't represent anything itself, but its parent ruby element uses it as part of determining what it represents."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/rb"
                }
            ]
        },
        {
            "name": "rt",
            "description": {
                "kind": "markdown",
                "value": "The rt element marks the ruby text component of a ruby annotation. When it is the child of a ruby element or of an rtc element that is itself the child of a ruby element, it doesn't represent anything itself, but its ancestor ruby element uses it as part of determining what it represents."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/rt"
                }
            ],
            "browsers": [
                "C5",
                "CA18",
                "E12",
                "FF38",
                "FFA38",
                "S5",
                "SM4.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "rp",
            "description": {
                "kind": "markdown",
                "value": "The rp element is used to provide fallback text to be shown by user agents that don't support ruby annotations. One widespread convention is to provide parentheses around the ruby text component of a ruby annotation."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/rp"
                }
            ],
            "browsers": [
                "C5",
                "CA18",
                "E12",
                "FF38",
                "FFA38",
                "S5",
                "SM4.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "time",
            "description": {
                "kind": "markdown",
                "value": "The time element represents its contents, along with a machine-readable form of those contents in the datetime attribute. The kind of content is limited to various kinds of dates, times, time-zone offsets, and durations, as described below."
            },
            "attributes": [
                {
                    "name": "datetime",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute indicates the time and/or date of the element and must be in one of the formats described below."
                    },
                    "browsers": [
                        "C62",
                        "CA62",
                        "E14",
                        "FF22",
                        "FFA22",
                        "S7",
                        "SM4"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2017-10-24",
                        "baseline_high_date": "2020-04-24"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/time"
                }
            ],
            "browsers": [
                "C62",
                "CA62",
                "E14",
                "FF22",
                "FFA22",
                "S7",
                "SM4"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2017-10-24",
                "baseline_high_date": "2020-04-24"
            }
        },
        {
            "name": "code",
            "description": {
                "kind": "markdown",
                "value": "The code element represents a fragment of computer code. This could be an XML element name, a file name, a computer program, or any other string that a computer would recognize."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/code"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "var",
            "description": {
                "kind": "markdown",
                "value": "The var element represents a variable. This could be an actual variable in a mathematical expression or programming context, an identifier representing a constant, a symbol identifying a physical quantity, a function parameter, or just be a term used as a placeholder in prose."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/var"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "samp",
            "description": {
                "kind": "markdown",
                "value": "The samp element represents sample or quoted output from another program or computing system."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/samp"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "kbd",
            "description": {
                "kind": "markdown",
                "value": "The kbd element represents user input (typically keyboard input, although it may also be used to represent other input, such as voice commands)."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/kbd"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "sub",
            "description": {
                "kind": "markdown",
                "value": "The sub element represents a subscript."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/sub"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "sup",
            "description": {
                "kind": "markdown",
                "value": "The sup element represents a superscript."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/sup"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "i",
            "description": {
                "kind": "markdown",
                "value": "The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/i"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "b",
            "description": {
                "kind": "markdown",
                "value": "The b element represents a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood, such as key words in a document abstract, product names in a review, actionable words in interactive text-driven software, or an article lede."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/b"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "u",
            "description": {
                "kind": "markdown",
                "value": "The u element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelt."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/u"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "mark",
            "description": {
                "kind": "markdown",
                "value": "The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. When used in a quotation or other block of text referred to from the prose, it indicates a highlight that was not originally present but which has been added to bring the reader's attention to a part of the text that might not have been considered important by the original author when the block was originally written, but which is now under previously unexpected scrutiny. When used in the main prose of a document, it indicates a part of the document that has been highlighted due to its likely relevance to the user's current activity."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/mark"
                }
            ],
            "browsers": [
                "C7",
                "CA18",
                "E12",
                "FF4",
                "FFA4",
                "S5.1",
                "SM5"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "bdi",
            "description": {
                "kind": "markdown",
                "value": "The bdi element represents a span of text that is to be isolated from its surroundings for the purposes of bidirectional text formatting. [BIDI]"
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/bdi"
                }
            ],
            "browsers": [
                "C16",
                "CA18",
                "E79",
                "FF10",
                "FFA10",
                "S6",
                "SM6"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            }
        },
        {
            "name": "bdo",
            "description": {
                "kind": "markdown",
                "value": "The bdo element represents explicit text directionality formatting control for its children. It allows authors to override the Unicode bidirectional algorithm by explicitly specifying a direction override. [BIDI]"
            },
            "attributes": [
                {
                    "name": "dir",
                    "description": "The direction in which text should be rendered in this element's contents. Possible values are:\n\n*   `ltr`: Indicates that the text should go in a left-to-right direction.\n*   `rtl`: Indicates that the text should go in a right-to-left direction."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/bdo"
                }
            ],
            "browsers": [
                "C15",
                "CA18",
                "E12",
                "FF10",
                "FFA10",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "span",
            "description": {
                "kind": "markdown",
                "value": "The span element doesn't mean anything on its own, but can be useful when used together with the global attributes, e.g. class, lang, or dir. It represents its children."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/span"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "br",
            "description": {
                "kind": "markdown",
                "value": "The br element represents a line break."
            },
            "void": true,
            "attributes": [
                {
                    "name": "clear",
                    "description": "Indicates where to begin the next line after the break.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/br"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "wbr",
            "description": {
                "kind": "markdown",
                "value": "The wbr element represents a line break opportunity."
            },
            "void": true,
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/wbr"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "ins",
            "description": {
                "kind": "markdown",
                "value": "The ins element represents an addition to the document."
            },
            "attributes": [
                {
                    "name": "cite",
                    "description": "This attribute defines the URI of a resource that explains the change, such as a link to meeting minutes or a ticket in a troubleshooting system.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "datetime",
                    "description": "This attribute indicates the time and date of the change and must be a valid date with an optional time string. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. For the format of the string without a time, see [Format of a valid date string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_date_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\"). The format of the string if it includes both date and time is covered in [Format of a valid local date and time string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_local_date_and_time_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\").",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/ins"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "del",
            "description": {
                "kind": "markdown",
                "value": "The del element represents a removal from the document."
            },
            "attributes": [
                {
                    "name": "cite",
                    "description": {
                        "kind": "markdown",
                        "value": "A URI for a resource that explains the change (for example, meeting minutes)."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "datetime",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute indicates the time and date of the change and must be a valid date string with an optional time. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. For the format of the string without a time, see [Format of a valid date string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_date_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\"). The format of the string if it includes both date and time is covered in [Format of a valid local date and time string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_local_date_and_time_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\")."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/del"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "picture",
            "description": {
                "kind": "markdown",
                "value": "The picture element is a container which provides multiple sources to its contained img element to allow authors to declaratively control or give hints to the user agent about which image resource to use, based on the screen pixel density, viewport size, image format, and other factors. It represents its children."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/picture"
                }
            ],
            "browsers": [
                "C38",
                "CA38",
                "E13",
                "FF38",
                "FFA38",
                "S9.1",
                "SM9.3"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2016-03-21",
                "baseline_high_date": "2018-09-21"
            }
        },
        {
            "name": "img",
            "description": {
                "kind": "markdown",
                "value": "An img element represents an image."
            },
            "void": true,
            "attributes": [
                {
                    "name": "alt",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute defines an alternative text description of the image.\n\n**Note:** Browsers do not always display the image referenced by the element. This is the case for non-graphical browsers (including those used by people with visual impairments), if the user chooses not to display images, or if the browser cannot display the image because it is invalid or an [unsupported type](#Supported_image_formats). In these cases, the browser may replace the image with the text defined in this element's `alt` attribute. You should, for these reasons and others, provide a useful value for `alt` whenever possible.\n\n**Note:** Omitting this attribute altogether indicates that the image is a key part of the content, and no textual equivalent is available. Setting this attribute to an empty string (`alt=\"\"`) indicates that this image is _not_ a key part of the content (decorative), and that non-visual browsers may omit it from rendering."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "src",
                    "description": {
                        "kind": "markdown",
                        "value": "The image URL. This attribute is mandatory for the `<img>` element. On browsers supporting `srcset`, `src` is treated like a candidate image with a pixel density descriptor `1x` unless an image with this pixel density descriptor is already defined in `srcset,` or unless `srcset` contains '`w`' descriptors."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "srcset",
                    "description": {
                        "kind": "markdown",
                        "value": "A list of one or more strings separated by commas indicating a set of possible image sources for the user agent to use. Each string is composed of:\n\n1.  a URL to an image,\n2.  optionally, whitespace followed by one of:\n    *   A width descriptor, or a positive integer directly followed by '`w`'. The width descriptor is divided by the source size given in the `sizes` attribute to calculate the effective pixel density.\n    *   A pixel density descriptor, which is a positive floating point number directly followed by '`x`'.\n\nIf no descriptor is specified, the source is assigned the default descriptor: `1x`.\n\nIt is incorrect to mix width descriptors and pixel density descriptors in the same `srcset` attribute. Duplicate descriptors (for instance, two sources in the same `srcset` which are both described with '`2x`') are also invalid.\n\nThe user agent selects any one of the available sources at its discretion. This provides them with significant leeway to tailor their selection based on things like user preferences or bandwidth conditions. See our [Responsive images](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images) tutorial for an example."
                    },
                    "browsers": [
                        "C34",
                        "CA34",
                        "E12",
                        "FF38",
                        "FFA38",
                        "S8",
                        "SM8"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "crossorigin",
                    "valueSet": "xo",
                    "description": {
                        "kind": "markdown",
                        "value": "This enumerated attribute indicates if the fetching of the related image must be done using CORS or not. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") element without being \"[tainted](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image#What_is_a_tainted_canvas).\" The allowed values are:\n`anonymous`\n\nA cross-origin request (i.e., with `Origin:` HTTP header) is performed, but no credential is sent (i.e., no cookie, X.509 certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (by not setting the [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin \"The Access-Control-Allow-Origin response header indicates whether the response can be shared with requesting code from the given origin.\") HTTP header), the image will be tainted and its usage restricted.\n\n`use-credentials`\n\nA cross-origin request (i.e., with the [`Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin \"The Origin request header indicates where a fetch originates from. It doesn't include any path information, but only the server name. It is sent with CORS requests, as well as with POST requests. It is similar to the Referer header, but, unlike this header, it doesn't disclose the whole path.\") HTTP header) performed along with credentials sent (i.e., a cookie, certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (through the `Access-Control-Allow-Credentials` HTTP header), the image will be tainted and its usage restricted.\n\nIf the attribute is not present, the resource is fetched without a CORS request (i.e., without sending the `Origin` HTTP header), preventing its non-tainted usage in [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") elements. If invalid, it is handled as if the `anonymous` value was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/HTML/CORS_settings_attributes) for additional information."
                    },
                    "browsers": [
                        "C13",
                        "CA18",
                        "E12",
                        "FF8",
                        "FFA8",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "usemap",
                    "description": {
                        "kind": "markdown",
                        "value": "The partial URL (starting with '#') of an [image map](https://developer.mozilla.org/en-US/docs/HTML/Element/map) associated with the element.\n\n**Note:** You cannot use this attribute if the `<img>` element is a descendant of an [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a \"The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.\") or [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") element."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "ismap",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute indicates that the image is part of a server-side map. If so, the precise coordinates of a click are sent to the server.\n\n**Note:** This attribute is allowed only if the `<img>` element is a descendant of an [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a \"The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.\") element with a valid [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "width",
                    "description": {
                        "kind": "markdown",
                        "value": "The intrinsic width of the image in pixels."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "height",
                    "description": {
                        "kind": "markdown",
                        "value": "The intrinsic height of the image in pixels."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "decoding",
                    "valueSet": "decoding",
                    "description": {
                        "kind": "markdown",
                        "value": "Provides an image decoding hint to the browser. The allowed values are:\n`sync`\n\nDecode the image synchronously for atomic presentation with other content.\n\n`async`\n\nDecode the image asynchronously to reduce delay in presenting other content.\n\n`auto`\n\nDefault mode, which indicates no preference for the decoding mode. The browser decides what is best for the user."
                    },
                    "browsers": [
                        "C65",
                        "CA65",
                        "E79",
                        "FF63",
                        "FFA63",
                        "S11.1",
                        "SM11.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "≤2020-01-15",
                        "baseline_high_date": "≤2022-07-15"
                    }
                },
                {
                    "name": "loading",
                    "valueSet": "loading",
                    "description": {
                        "kind": "markdown",
                        "value": "Indicates how the browser should load the image."
                    },
                    "browsers": [
                        "C77",
                        "CA77",
                        "E79",
                        "FF75",
                        "FFA79",
                        "S15.4",
                        "SM15.4"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2022-03-14",
                        "baseline_high_date": "2024-09-14"
                    }
                },
                {
                    "name": "fetchpriority",
                    "valueSet": "fetchpriority",
                    "description": {
                        "kind": "markdown",
                        "value": "Provides a hint of the relative priority to use when fetching the image."
                    },
                    "browsers": [
                        "C101",
                        "CA101",
                        "E101",
                        "FF132",
                        "FFA132",
                        "S17.2",
                        "SM17.2"
                    ],
                    "status": {
                        "baseline": "low",
                        "baseline_low_date": "2024-10-29"
                    }
                },
                {
                    "name": "referrerpolicy",
                    "valueSet": "referrerpolicy",
                    "description": {
                        "kind": "markdown",
                        "value": "A string indicating which referrer to use when fetching the resource:\n\n*   `no-referrer:` The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n*   `no-referrer-when-downgrade:` No `Referer` header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior if no policy is otherwise specified.\n*   `origin:` The `Referer` header will include the page of origin's scheme, the host, and the port.\n*   `origin-when-cross-origin:` Navigating to other origins will limit the included referral data to the scheme, the host and the port, while navigating from the same origin will include the referrer's full path.\n*   `unsafe-url:` The `Referer` header will include the origin and the path, but not the fragment, password, or username. This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins."
                    },
                    "browsers": [
                        "C51",
                        "CA51",
                        "E79",
                        "FF50",
                        "FFA50",
                        "S14",
                        "SM14"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-09-16",
                        "baseline_high_date": "2023-03-16"
                    }
                },
                {
                    "name": "sizes",
                    "description": {
                        "kind": "markdown",
                        "value": "A list of one or more strings separated by commas indicating a set of source sizes. Each source size consists of:\n\n1.  a media condition. This must be omitted for the last item.\n2.  a source size value.\n\nSource size values specify the intended display size of the image. User agents use the current source size to select one of the sources supplied by the `srcset` attribute, when those sources are described using width ('`w`') descriptors. The selected source size affects the intrinsic size of the image (the image’s display size if no CSS styling is applied). If the `srcset` attribute is absent, or contains no values with a width (`w`) descriptor, then the `sizes` attribute has no effect."
                    },
                    "browsers": [
                        "C38",
                        "CA38",
                        "E12",
                        "FF38",
                        "FFA38",
                        "S9.1",
                        "SM9.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2016-03-21",
                        "baseline_high_date": "2018-09-21"
                    }
                },
                {
                    "name": "importance",
                    "description": "Indicates the relative importance of the resource. Priority hints are delegated using the values:"
                },
                {
                    "name": "importance",
                    "description": "`auto`: Indicates **no preference**. The browser may use its own heuristics to decide the priority of the image.\n\n`high`: Indicates to the browser that the image is of **high** priority.\n\n`low`: Indicates to the browser that the image is of **low** priority."
                },
                {
                    "name": "intrinsicsize",
                    "description": "This attribute tells the browser to ignore the actual intrinsic size of the image and pretend it’s the size specified in the attribute. Specifically, the image would raster at these dimensions and `naturalWidth`/`naturalHeight` on images would return the values specified in this attribute. [Explainer](https://github.com/ojanvafai/intrinsicsize-attribute), [examples](https://googlechrome.github.io/samples/intrinsic-size/index.html)"
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/img"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "iframe",
            "description": {
                "kind": "markdown",
                "value": "The iframe element represents a nested browsing context."
            },
            "attributes": [
                {
                    "name": "src",
                    "description": {
                        "kind": "markdown",
                        "value": "The URL of the page to embed. Use a value of `about:blank` to embed an empty page that conforms to the [same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Inherited_origins). Also note that programatically removing an `<iframe>`'s src attribute (e.g. via [`Element.removeAttribute()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute \"The Element method removeAttribute() removes the attribute with the specified name from the element.\")) causes `about:blank` to be loaded in the frame in Firefox (from version 65), Chromium-based browsers, and Safari/iOS."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "srcdoc",
                    "description": {
                        "kind": "markdown",
                        "value": "Inline HTML to embed, overriding the `src` attribute. If a browser does not support the `srcdoc` attribute, it will fall back to the URL in the `src` attribute."
                    },
                    "browsers": [
                        "C20",
                        "CA25",
                        "E79",
                        "FF25",
                        "FFA25",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-01-15",
                        "baseline_high_date": "2022-07-15"
                    }
                },
                {
                    "name": "name",
                    "description": {
                        "kind": "markdown",
                        "value": "A targetable name for the embedded browsing context. This can be used in the `target` attribute of the [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a \"The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.\"), [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\"), or [`<base>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base \"The HTML <base> element specifies the base URL to use for all relative URLs contained within a document. There can be only one <base> element in a document.\") elements; the `formtarget` attribute of the [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") or [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") elements; or the `windowName` parameter in the [`window.open()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open \"The Window interface's open() method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name. If the name doesn't exist, then a new window is opened and the specified resource is loaded into its browsing context.\") method."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "sandbox",
                    "valueSet": "sb",
                    "description": {
                        "kind": "markdown",
                        "value": "Applies extra restrictions to the content in the frame. The value of the attribute can either be empty to apply all restrictions, or space-separated tokens to lift particular restrictions:\n\n*   `allow-forms`: Allows the resource to submit forms. If this keyword is not used, form submission is blocked.\n*   `allow-modals`: Lets the resource [open modal windows](https://html.spec.whatwg.org/multipage/origin.html#sandboxed-modals-flag).\n*   `allow-orientation-lock`: Lets the resource [lock the screen orientation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation).\n*   `allow-pointer-lock`: Lets the resource use the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/WebAPI/Pointer_Lock).\n*   `allow-popups`: Allows popups (such as `window.open()`, `target=\"_blank\"`, or `showModalDialog()`). If this keyword is not used, the popup will silently fail to open.\n*   `allow-popups-to-escape-sandbox`: Lets the sandboxed document open new windows without those windows inheriting the sandboxing. For example, this can safely sandbox an advertisement without forcing the same restrictions upon the page the ad links to.\n*   `allow-presentation`: Lets the resource start a [presentation session](https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest).\n*   `allow-same-origin`: If this token is not used, the resource is treated as being from a special origin that always fails the [same-origin policy](https://developer.mozilla.org/en-US/docs/Glossary/same-origin_policy \"same-origin policy: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.\").\n*   `allow-scripts`: Lets the resource run scripts (but not create popup windows).\n*   `allow-storage-access-by-user-activation` : Lets the resource request access to the parent's storage capabilities with the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).\n*   `allow-top-navigation`: Lets the resource navigate the top-level browsing context (the one named `_top`).\n*   `allow-top-navigation-by-user-activation`: Lets the resource navigate the top-level browsing context, but only if initiated by a user gesture.\n\n**Notes about sandboxing:**\n\n*   When the embedded document has the same origin as the embedding page, it is **strongly discouraged** to use both `allow-scripts` and `allow-same-origin`, as that lets the embedded document remove the `sandbox` attribute — making it no more secure than not using the `sandbox` attribute at all.\n*   Sandboxing is useless if the attacker can display content outside a sandboxed `iframe` — such as if the viewer opens the frame in a new tab. Such content should be also served from a _separate origin_ to limit potential damage.\n*   The `sandbox` attribute is unsupported in Internet Explorer 9 and earlier."
                    },
                    "browsers": [
                        "C5",
                        "CA18",
                        "E12",
                        "FF17",
                        "FFA17",
                        "S5",
                        "SM4"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "seamless",
                    "valueSet": "v"
                },
                {
                    "name": "allowfullscreen",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "Set to `true` if the `<iframe>` can activate fullscreen mode by calling the [`requestFullscreen()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullscreen \"The Element.requestFullscreen() method issues an asynchronous request to make the element be displayed in full-screen mode.\") method.\nThis attribute is considered a legacy attribute and redefined as `allow=\"fullscreen\"`."
                    },
                    "browsers": [
                        "C38",
                        "CA38",
                        "E12",
                        "FF18",
                        "FFA18",
                        "S10.1"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "width",
                    "description": {
                        "kind": "markdown",
                        "value": "The width of the frame in CSS pixels. Default is `300`."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "height",
                    "description": {
                        "kind": "markdown",
                        "value": "The height of the frame in CSS pixels. Default is `150`."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "allow",
                    "description": "Specifies a [feature policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy) for the `<iframe>`.",
                    "browsers": [
                        "C60",
                        "CA60",
                        "E79",
                        "FF74",
                        "FFA79",
                        "S11.1",
                        "SM11.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-07-28",
                        "baseline_high_date": "2023-01-28"
                    }
                },
                {
                    "name": "allowpaymentrequest",
                    "description": "Set to `true` if a cross-origin `<iframe>` should be allowed to invoke the [Payment Request API](https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API).",
                    "browsers": [
                        "C60",
                        "CA60",
                        "E79"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "allowpaymentrequest",
                    "description": "This attribute is considered a legacy attribute and redefined as `allow=\"payment\"`.",
                    "browsers": [
                        "C60",
                        "CA60",
                        "E79"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "csp",
                    "description": "A [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) enforced for the embedded resource. See [`HTMLIFrameElement.csp`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/csp \"The csp property of the HTMLIFrameElement interface specifies the Content Security Policy that an embedded document must agree to enforce upon itself.\") for details.",
                    "browsers": [
                        "C61",
                        "CA61",
                        "E79"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "importance",
                    "description": "The download priority of the resource in the `<iframe>`'s `src` attribute. Allowed values:\n\n`auto` (default)\n\nNo preference. The browser uses its own heuristics to decide the priority of the resource.\n\n`high`\n\nThe resource should be downloaded before other lower-priority page resources.\n\n`low`\n\nThe resource should be downloaded after other higher-priority page resources."
                },
                {
                    "name": "referrerpolicy",
                    "description": "Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer) to send when fetching the frame's resource:\n\n*   `no-referrer`: The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n*   `no-referrer-when-downgrade` (default): The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent to [origin](https://developer.mozilla.org/en-US/docs/Glossary/origin \"origin: Web content's origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Two objects have the same origin only when the scheme, host, and port all match.\")s without [TLS](https://developer.mozilla.org/en-US/docs/Glossary/TLS \"TLS: Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.\") ([HTTPS](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS \"HTTPS: HTTPS (HTTP Secure) is an encrypted version of the HTTP protocol. It usually uses SSL or TLS to encrypt all communication between a client and a server. This secure connection allows clients to safely exchange sensitive data with a server, for example for banking activities or online shopping.\")).\n*   `origin`: The sent referrer will be limited to the origin of the referring page: its [scheme](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/URIScheme), [host](https://developer.mozilla.org/en-US/docs/Glossary/host \"host: A host is a device connected to the Internet (or a local network). Some hosts called servers offer additional services like serving webpages or storing files and emails.\"), and [port](https://developer.mozilla.org/en-US/docs/Glossary/port \"port: For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol.\").\n*   `origin-when-cross-origin`: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.\n*   `same-origin`: A referrer will be sent for [same origin](https://developer.mozilla.org/en-US/docs/Glossary/Same-origin_policy \"same origin: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.\"), but cross-origin requests will contain no referrer information.\n*   `strict-origin`: Only send the origin of the document as the referrer when the protocol security level stays the same (HTTPS→HTTPS), but don't send it to a less secure destination (HTTPS→HTTP).\n*   `strict-origin-when-cross-origin`: Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS→HTTPS), and send no header to a less secure destination (HTTPS→HTTP).\n*   `unsafe-url`: The referrer will include the origin _and_ the path (but not the [fragment](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/hash), [password](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/password), or [username](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/username)). **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins.",
                    "browsers": [
                        "C51",
                        "CA51",
                        "E79",
                        "FF50",
                        "FFA50",
                        "S14",
                        "SM14"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-09-16",
                        "baseline_high_date": "2023-03-16"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/iframe"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "embed",
            "description": {
                "kind": "markdown",
                "value": "The embed element provides an integration point for an external (typically non-HTML) application or interactive content."
            },
            "void": true,
            "attributes": [
                {
                    "name": "src",
                    "description": {
                        "kind": "markdown",
                        "value": "The URL of the resource being embedded."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "type",
                    "description": {
                        "kind": "markdown",
                        "value": "The MIME type to use to select the plug-in to instantiate."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E79",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-01-15",
                        "baseline_high_date": "2022-07-15"
                    }
                },
                {
                    "name": "width",
                    "description": {
                        "kind": "markdown",
                        "value": "The displayed width of the resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). This must be an absolute value; percentages are _not_ allowed."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "height",
                    "description": {
                        "kind": "markdown",
                        "value": "The displayed height of the resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). This must be an absolute value; percentages are _not_ allowed."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/embed"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "object",
            "description": {
                "kind": "markdown",
                "value": "The object element can represent an external resource, which, depending on the type of the resource, will either be treated as an image, as a nested browsing context, or as an external resource to be processed by a plugin."
            },
            "attributes": [
                {
                    "name": "data",
                    "description": {
                        "kind": "markdown",
                        "value": "The address of the resource as a valid URL. At least one of **data** and **type** must be defined."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "type",
                    "description": {
                        "kind": "markdown",
                        "value": "The [content type](https://developer.mozilla.org/en-US/docs/Glossary/Content_type) of the resource specified by **data**. At least one of **data** and **type** must be defined."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "typemustmatch",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute indicates if the **type** attribute and the actual [content type](https://developer.mozilla.org/en-US/docs/Glossary/Content_type) of the resource must match to be used."
                    }
                },
                {
                    "name": "name",
                    "description": {
                        "kind": "markdown",
                        "value": "The name of valid browsing context (HTML5), or the name of the control (HTML 4)."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "usemap",
                    "description": {
                        "kind": "markdown",
                        "value": "A hash-name reference to a [`<map>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map \"The HTML <map> element is used with <area> elements to define an image map (a clickable link area).\") element; that is a '#' followed by the value of a [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map#attr-name) of a map element."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "form",
                    "description": {
                        "kind": "markdown",
                        "value": "The form element, if any, that the object element is associated with (its _form owner_). The value of the attribute must be an ID of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element in the same document."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "width",
                    "description": {
                        "kind": "markdown",
                        "value": "The width of the display resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). -- (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes))"
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "height",
                    "description": {
                        "kind": "markdown",
                        "value": "The height of the displayed resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). -- (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes))"
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "archive",
                    "description": "A space-separated list of URIs for archives of resources for the object.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "border",
                    "description": "The width of a border around the control, in pixels.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "classid",
                    "description": "The URI of the object's implementation. It can be used together with, or in place of, the **data** attribute.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "codebase",
                    "description": "The base path used to resolve relative URIs specified by **classid**, **data**, or **archive**. If not specified, the default is the base URI of the current document.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "codetype",
                    "description": "The content type of the data specified by **classid**.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "declare",
                    "description": "The presence of this Boolean attribute makes this element a declaration only. The object must be instantiated by a subsequent `<object>` element. In HTML5, repeat the <object> element completely each that that the resource is reused.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "standby",
                    "description": "A message that the browser can show while loading the object's implementation and data.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "tabindex",
                    "description": "The position of the element in the tabbing navigation order for the current document."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/object"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S3",
                "SM2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "param",
            "description": {
                "kind": "markdown",
                "value": "The param element defines parameters for plugins invoked by object elements. It does not represent anything on its own."
            },
            "void": true,
            "attributes": [
                {
                    "name": "name",
                    "description": {
                        "kind": "markdown",
                        "value": "Name of the parameter."
                    }
                },
                {
                    "name": "value",
                    "description": {
                        "kind": "markdown",
                        "value": "Specifies the value of the parameter."
                    }
                },
                {
                    "name": "type",
                    "description": "Only used if the `valuetype` is set to \"ref\". Specifies the MIME type of values found at the URI specified by value."
                },
                {
                    "name": "valuetype",
                    "description": "Specifies the type of the `value` attribute. Possible values are:\n\n*   data: Default value. The value is passed to the object's implementation as a string.\n*   ref: The value is a URI to a resource where run-time values are stored.\n*   object: An ID of another [`<object>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object \"The HTML <object> element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.\") in the same document."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/param"
                }
            ]
        },
        {
            "name": "video",
            "description": {
                "kind": "markdown",
                "value": "A video element is used for playing videos or movies, and audio files with captions."
            },
            "attributes": [
                {
                    "name": "src",
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF3.5",
                        "FFA4",
                        "S3.1",
                        "SM3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "crossorigin",
                    "valueSet": "xo",
                    "browsers": [
                        "C33",
                        "CA33",
                        "E18",
                        "FF74",
                        "FFA79",
                        "S10",
                        "SM10"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-07-28",
                        "baseline_high_date": "2023-01-28"
                    }
                },
                {
                    "name": "poster",
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF3.6",
                        "FFA4",
                        "S3.1",
                        "SM3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "preload",
                    "valueSet": "pl",
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S3.1",
                        "SM3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "autoplay",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "A Boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data.\n**Note**: Sites that automatically play audio (or video with an audio track) can be an unpleasant experience for users, so it should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). However, this can be useful when creating media elements whose source will be set at a later time, under user control.\n\nTo disable video autoplay, `autoplay=\"false\"` will not work; the video will autoplay if the attribute is there in the `<video>` tag at all. To remove autoplay the attribute needs to be removed altogether.\n\nIn some browsers (e.g. Chrome 70.0) autoplay is not working if no `muted` attribute is present."
                    },
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF3.5",
                        "FFA4",
                        "S3.1",
                        "SM10"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2016-09-13",
                        "baseline_high_date": "2019-03-13"
                    }
                },
                {
                    "name": "mediagroup"
                },
                {
                    "name": "loop",
                    "valueSet": "v",
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF11",
                        "FFA14",
                        "S3.1",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "muted",
                    "valueSet": "v",
                    "browsers": [
                        "C30",
                        "CA30",
                        "E12",
                        "FF11",
                        "FFA14",
                        "S5",
                        "SM4.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "controls",
                    "valueSet": "v",
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF3.5",
                        "FFA4",
                        "S3.1",
                        "SM3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "width",
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF3.5",
                        "FFA4",
                        "S3.1",
                        "SM3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "height",
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF3.5",
                        "FFA4",
                        "S3.1",
                        "SM3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/video"
                }
            ],
            "browsers": [
                "C3",
                "CA18",
                "E12",
                "FF3.5",
                "FFA4",
                "S3.1",
                "SM3"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "audio",
            "description": {
                "kind": "markdown",
                "value": "An audio element represents a sound or audio stream."
            },
            "attributes": [
                {
                    "name": "src",
                    "description": {
                        "kind": "markdown",
                        "value": "The URL of the audio to embed. This is subject to [HTTP access controls](https://developer.mozilla.org/en-US/docs/HTTP_access_control). This is optional; you may instead use the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element within the audio block to specify the audio to embed."
                    },
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF3.5",
                        "FFA4",
                        "S3.1",
                        "SM3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "crossorigin",
                    "valueSet": "xo",
                    "description": {
                        "kind": "markdown",
                        "value": "This enumerated attribute indicates whether to use CORS to fetch the related image. [CORS-enabled resources](https://developer.mozilla.org/en-US/docs/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") element without being _tainted_. The allowed values are:\n\nanonymous\n\nSends a cross-origin request without a credential. In other words, it sends the `Origin:` HTTP header without a cookie, X.509 certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (by not setting the `Access-Control-Allow-Origin:` HTTP header), the image will be _tainted_, and its usage restricted.\n\nuse-credentials\n\nSends a cross-origin request with a credential. In other words, it sends the `Origin:` HTTP header with a cookie, a certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (through `Access-Control-Allow-Credentials:` HTTP header), the image will be _tainted_ and its usage restricted.\n\nWhen not present, the resource is fetched without a CORS request (i.e. without sending the `Origin:` HTTP header), preventing its non-tainted used in [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") elements. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/HTML/CORS_settings_attributes) for additional information."
                    },
                    "browsers": [
                        "C33",
                        "CA33",
                        "E18",
                        "FF74",
                        "FFA79",
                        "S10",
                        "SM10"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-07-28",
                        "baseline_high_date": "2023-01-28"
                    }
                },
                {
                    "name": "preload",
                    "valueSet": "pl",
                    "description": {
                        "kind": "markdown",
                        "value": "This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:\n\n*   `none`: Indicates that the audio should not be preloaded.\n*   `metadata`: Indicates that only audio metadata (e.g. length) is fetched.\n*   `auto`: Indicates that the whole audio file can be downloaded, even if the user is not expected to use it.\n*   _empty string_: A synonym of the `auto` value.\n\nIf not set, `preload`'s default value is browser-defined (i.e. each browser may have its own default value). The spec advises it to be set to `metadata`.\n\n**Usage notes:**\n\n*   The `autoplay` attribute has precedence over `preload`. If `autoplay` is specified, the browser would obviously need to start downloading the audio for playback.\n*   The browser is not forced by the specification to follow the value of this attribute; it is a mere hint."
                    },
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S3.1",
                        "SM3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "autoplay",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "A Boolean attribute: if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading.\n\n**Note**: Sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). However, this can be useful when creating media elements whose source will be set at a later time, under user control."
                    },
                    "browsers": [],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "mediagroup"
                },
                {
                    "name": "loop",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "A Boolean attribute: if specified, the audio player will automatically seek back to the start upon reaching the end of the audio."
                    },
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF11",
                        "FFA14",
                        "S3.1",
                        "SM3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "muted",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "A Boolean attribute that indicates whether the audio will be initially silenced. Its default value is `false`."
                    },
                    "browsers": [
                        "C15",
                        "CA18",
                        "E18",
                        "FF11",
                        "FFA14",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "≤2018-10-02",
                        "baseline_high_date": "≤2021-04-02"
                    }
                },
                {
                    "name": "controls",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "If this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback."
                    },
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF3.5",
                        "FFA4",
                        "S3.1",
                        "SM3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/audio"
                }
            ],
            "browsers": [
                "C3",
                "CA18",
                "E12",
                "FF3.5",
                "FFA4",
                "S3.1",
                "SM3"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "source",
            "description": {
                "kind": "markdown",
                "value": "The source element allows authors to specify multiple alternative media resources for media elements. It does not represent anything on its own."
            },
            "void": true,
            "attributes": [
                {
                    "name": "src",
                    "description": {
                        "kind": "markdown",
                        "value": "Required for [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio \"The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.\") and [`<video>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video \"The HTML Video element (<video>) embeds a media player which supports video playback into the document.\"), address of the media resource. The value of this attribute is ignored when the `<source>` element is placed inside a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element."
                    },
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF3.5",
                        "FFA4",
                        "S3.1",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "type",
                    "description": {
                        "kind": "markdown",
                        "value": "The MIME-type of the resource, optionally with a `codecs` parameter. See [RFC 4281](https://tools.ietf.org/html/rfc4281) for information about how to specify codecs."
                    },
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF3.5",
                        "FFA4",
                        "S3.1",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "sizes",
                    "description": "Is a list of source sizes that describes the final rendered width of the image represented by the source. Each source size consists of a comma-separated list of media condition-length pairs. This information is used by the browser to determine, before laying the page out, which image defined in [`srcset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-srcset) to use.  \nThe `sizes` attribute has an effect only when the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element is the direct child of a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element.",
                    "browsers": [
                        "C34",
                        "CA34",
                        "E13",
                        "FF38",
                        "FFA38",
                        "S9.1",
                        "SM9.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2016-03-21",
                        "baseline_high_date": "2018-09-21"
                    }
                },
                {
                    "name": "srcset",
                    "description": "A list of one or more strings separated by commas indicating a set of possible images represented by the source for the browser to use. Each string is composed of:\n\n1.  one URL to an image,\n2.  a width descriptor, that is a positive integer directly followed by `'w'`. The default value, if missing, is the infinity.\n3.  a pixel density descriptor, that is a positive floating number directly followed by `'x'`. The default value, if missing, is `1x`.\n\nEach string in the list must have at least a width descriptor or a pixel density descriptor to be valid. Among the list, there must be only one string containing the same tuple of width descriptor and pixel density descriptor.  \nThe browser chooses the most adequate image to display at a given point of time.  \nThe `srcset` attribute has an effect only when the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element is the direct child of a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element.",
                    "browsers": [
                        "C34",
                        "CA34",
                        "E13",
                        "FF38",
                        "FFA38",
                        "S9.1",
                        "SM9.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2016-03-21",
                        "baseline_high_date": "2018-09-21"
                    }
                },
                {
                    "name": "media",
                    "description": "[Media query](https://developer.mozilla.org/en-US/docs/CSS/Media_queries) of the resource's intended media; this should be used only in a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element.",
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF15",
                        "FFA15",
                        "S3.1",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/source"
                }
            ],
            "browsers": [
                "C3",
                "CA18",
                "E12",
                "FF3.5",
                "FFA4",
                "S3.1",
                "SM2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "track",
            "description": {
                "kind": "markdown",
                "value": "The track element allows authors to specify explicit external timed text tracks for media elements. It does not represent anything on its own."
            },
            "void": true,
            "attributes": [
                {
                    "name": "default",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate. This may only be used on one `track` element per media element."
                    },
                    "browsers": [
                        "C23",
                        "CA25",
                        "E12",
                        "FF31",
                        "FFA31",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "kind",
                    "valueSet": "tk",
                    "description": {
                        "kind": "markdown",
                        "value": "How the text track is meant to be used. If omitted the default kind is `subtitles`. If the attribute is not present, it will use the `subtitles`. If the attribute contains an invalid value, it will use `metadata`. (Versions of Chrome earlier than 52 treated an invalid value as `subtitles`.) The following keywords are allowed:\n\n*   `subtitles`\n    *   Subtitles provide translation of content that cannot be understood by the viewer. For example dialogue or text that is not English in an English language film.\n    *   Subtitles may contain additional content, usually extra background information. For example the text at the beginning of the Star Wars films, or the date, time, and location of a scene.\n*   `captions`\n    *   Closed captions provide a transcription and possibly a translation of audio.\n    *   It may include important non-verbal information such as music cues or sound effects. It may indicate the cue's source (e.g. music, text, character).\n    *   Suitable for users who are deaf or when the sound is muted.\n*   `descriptions`\n    *   Textual description of the video content.\n    *   Suitable for users who are blind or where the video cannot be seen.\n*   `chapters`\n    *   Chapter titles are intended to be used when the user is navigating the media resource.\n*   `metadata`\n    *   Tracks used by scripts. Not visible to the user."
                    },
                    "browsers": [
                        "C23",
                        "CA25",
                        "E12",
                        "FF31",
                        "FFA31",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "label",
                    "description": {
                        "kind": "markdown",
                        "value": "A user-readable title of the text track which is used by the browser when listing available text tracks."
                    },
                    "browsers": [
                        "C23",
                        "CA25",
                        "E12",
                        "FF31",
                        "FFA31",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "src",
                    "description": {
                        "kind": "markdown",
                        "value": "Address of the track (`.vtt` file). Must be a valid URL. This attribute must be specified and its URL value must have the same origin as the document — unless the [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio \"The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.\") or [`<video>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video \"The HTML Video element (<video>) embeds a media player which supports video playback into the document.\") parent element of the `track` element has a [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) attribute."
                    },
                    "browsers": [
                        "C23",
                        "CA25",
                        "E12",
                        "FF50",
                        "FFA50",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2016-11-15",
                        "baseline_high_date": "2019-05-15"
                    }
                },
                {
                    "name": "srclang",
                    "description": {
                        "kind": "markdown",
                        "value": "Language of the track text data. It must be a valid [BCP 47](https://r12a.github.io/app-subtags/) language tag. If the `kind` attribute is set to `subtitles,` then `srclang` must be defined."
                    },
                    "browsers": [
                        "C23",
                        "CA25",
                        "E12",
                        "FF31",
                        "FFA31",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/track"
                }
            ],
            "browsers": [
                "C23",
                "CA25",
                "E12",
                "FF31",
                "FFA31",
                "S6",
                "SM6"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "map",
            "description": {
                "kind": "markdown",
                "value": "The map element, in conjunction with an img element and any area element descendants, defines an image map. The element represents its children."
            },
            "attributes": [
                {
                    "name": "name",
                    "description": {
                        "kind": "markdown",
                        "value": "The name attribute gives the map a name so that it can be referenced. The attribute must be present and must have a non-empty value with no space characters. The value of the name attribute must not be a compatibility-caseless match for the value of the name attribute of another map element in the same document. If the id attribute is also specified, both attributes must have the same value."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/map"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "area",
            "description": {
                "kind": "markdown",
                "value": "The area element represents either a hyperlink with some text and a corresponding area on an image map, or a dead area on an image map."
            },
            "void": true,
            "attributes": [
                {
                    "name": "alt",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "coords",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "shape",
                    "valueSet": "sh",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "href",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "target",
                    "valueSet": "target",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "download",
                    "browsers": [
                        "C54",
                        "CA54",
                        "E12",
                        "FF20",
                        "FFA20",
                        "S10.1",
                        "SM10.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2017-03-27",
                        "baseline_high_date": "2019-09-27"
                    }
                },
                {
                    "name": "ping",
                    "browsers": [
                        "C12",
                        "CA18",
                        "E17",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "rel",
                    "browsers": [
                        "C16",
                        "CA18",
                        "E12",
                        "FF30",
                        "FFA30",
                        "S5",
                        "SM4.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "hreflang"
                },
                {
                    "name": "type"
                },
                {
                    "name": "accesskey",
                    "description": "Specifies a keyboard navigation accelerator for the element. Pressing ALT or a similar key in association with the specified character selects the form control correlated with that key sequence. Page designers are forewarned to avoid key sequences already bound to browsers. This attribute is global since HTML5."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/area"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "table",
            "description": {
                "kind": "markdown",
                "value": "The table element represents data with more than one dimension, in the form of a table."
            },
            "attributes": [
                {
                    "name": "border",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "align",
                    "description": "This enumerated attribute indicates how the table must be aligned inside the containing document. It may have the following values:\n\n*   left: the table is displayed on the left side of the document;\n*   center: the table is displayed in the center of the document;\n*   right: the table is displayed on the right side of the document.\n\n**Usage Note**\n\n*   **Do not use this attribute**, as it has been deprecated. The [`<table>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table \"The HTML <table> element represents tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). Set [`margin-left`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left \"The margin-left CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") and [`margin-right`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right \"The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") to `auto` or [`margin`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin \"The margin CSS property sets the margin area on all four sides of an element. It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left.\") to `0 auto` to achieve an effect that is similar to the align attribute.\n*   Prior to Firefox 4, Firefox also supported the `middle`, `absmiddle`, and `abscenter` values as synonyms of `center`, in quirks mode only.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/table"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "caption",
            "description": {
                "kind": "markdown",
                "value": "The caption element represents the title of the table that is its parent, if it has a parent and that is a table element."
            },
            "attributes": [
                {
                    "name": "align",
                    "description": "This enumerated attribute indicates how the caption must be aligned with respect to the table. It may have one of the following values:\n\n`left`\n\nThe caption is displayed to the left of the table.\n\n`top`\n\nThe caption is displayed above the table.\n\n`right`\n\nThe caption is displayed to the right of the table.\n\n`bottom`\n\nThe caption is displayed below the table.\n\n**Usage note:** Do not use this attribute, as it has been deprecated. The [`<caption>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption \"The HTML Table Caption element (<caption>) specifies the caption (or title) of a table, and if used is always the first child of a <table>.\") element should be styled using the [CSS](https://developer.mozilla.org/en-US/docs/CSS) properties [`caption-side`](https://developer.mozilla.org/en-US/docs/Web/CSS/caption-side \"The caption-side CSS property puts the content of a table's <caption> on the specified side. The values are relative to the writing-mode of the table.\") and [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\").",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/caption"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "colgroup",
            "description": {
                "kind": "markdown",
                "value": "The colgroup element represents a group of one or more columns in the table that is its parent, if it has a parent and that is a table element."
            },
            "attributes": [
                {
                    "name": "span",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "align",
                    "description": "This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:\n\n*   `left`, aligning the content to the left of the cell\n*   `center`, centering the content in the cell\n*   `right`, aligning the content to the right of the cell\n*   `justify`, inserting spaces into the textual content so that the content is justified in the cell\n*   `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, the `left` value is assumed. The descendant [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col \"The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.\") elements may override this value using their own [`align`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-align) attribute.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values:\n    *   Do not try to set the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on a selector giving a [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup \"The HTML <colgroup> element defines a group of columns within a table.\") element. Because [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td \"The HTML <td> element defines a cell of a table that contains data. It participates in the table model.\") elements are not descendant of the [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup \"The HTML <colgroup> element defines a group of columns within a table.\") element, they won't inherit it.\n    *   If the table doesn't use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, use one `td:nth-child(an+b)` CSS selector per column, where a is the total number of the columns in the table and b is the ordinal position of this column in the table. Only after this selector the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property can be used.\n    *   If the table does use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.\n*   To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/colgroup"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "col",
            "description": {
                "kind": "markdown",
                "value": "If a col element has a parent and that is a colgroup element that itself has a parent that is a table element, then the col element represents one or more columns in the column group represented by that colgroup."
            },
            "void": true,
            "attributes": [
                {
                    "name": "span",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "align",
                    "description": "This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:\n\n*   `left`, aligning the content to the left of the cell\n*   `center`, centering the content in the cell\n*   `right`, aligning the content to the right of the cell\n*   `justify`, inserting spaces into the textual content so that the content is justified in the cell\n*   `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, its value is inherited from the [`align`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#attr-align) of the [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup \"The HTML <colgroup> element defines a group of columns within a table.\") element this `<col>` element belongs too. If there are none, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values:\n    *   Do not try to set the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on a selector giving a [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col \"The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.\") element. Because [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td \"The HTML <td> element defines a cell of a table that contains data. It participates in the table model.\") elements are not descendant of the [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col \"The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.\") element, they won't inherit it.\n    *   If the table doesn't use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, use the `td:nth-child(an+b)` CSS selector. Set `a` to zero and `b` to the position of the column in the table, e.g. `td:nth-child(2) { text-align: right; }` to right-align the second column.\n    *   If the table does use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.\n*   To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/col"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "tbody",
            "description": {
                "kind": "markdown",
                "value": "The tbody element represents a block of rows that consist of a body of data for the parent table element, if the tbody element has a parent and it is a table."
            },
            "attributes": [
                {
                    "name": "align",
                    "description": "This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n*   `left`, aligning the content to the left of the cell\n*   `center`, centering the content in the cell\n*   `right`, aligning the content to the right of the cell\n*   `justify`, inserting spaces into the textual content so that the content is justified in the cell\n*   `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-charoff) attributes.\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on it.\n*   To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/tbody"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "thead",
            "description": {
                "kind": "markdown",
                "value": "The thead element represents the block of rows that consist of the column labels (headers) for the parent table element, if the thead element has a parent and it is a table."
            },
            "attributes": [
                {
                    "name": "align",
                    "description": "This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n*   `left`, aligning the content to the left of the cell\n*   `center`, centering the content in the cell\n*   `right`, aligning the content to the right of the cell\n*   `justify`, inserting spaces into the textual content so that the content is justified in the cell\n*   `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on it.\n*   To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/thead"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "tfoot",
            "description": {
                "kind": "markdown",
                "value": "The tfoot element represents the block of rows that consist of the column summaries (footers) for the parent table element, if the tfoot element has a parent and it is a table."
            },
            "attributes": [
                {
                    "name": "align",
                    "description": "This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n*   `left`, aligning the content to the left of the cell\n*   `center`, centering the content in the cell\n*   `right`, aligning the content to the right of the cell\n*   `justify`, inserting spaces into the textual content so that the content is justified in the cell\n*   `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on it.\n*   To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/tfoot"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "tr",
            "description": {
                "kind": "markdown",
                "value": "The tr element represents a row of cells in a table."
            },
            "attributes": [
                {
                    "name": "align",
                    "description": "A [`DOMString`](https://developer.mozilla.org/en-US/docs/Web/API/DOMString \"DOMString is a UTF-16 String. As JavaScript already uses such strings, DOMString is mapped directly to a String.\") which specifies how the cell's context should be aligned horizontally within the cells in the row; this is shorthand for using `align` on every cell in the row individually. Possible values are:\n\n`left`\n\nAlign the content of each cell at its left edge.\n\n`center`\n\nCenter the contents of each cell between their left and right edges.\n\n`right`\n\nAlign the content of each cell at its right edge.\n\n`justify`\n\nWiden whitespaces within the text of each cell so that the text fills the full width of each cell (full justification).\n\n`char`\n\nAlign each cell in the row on a specific character (such that each row in the column that is configured this way will horizontally align its cells on that character). This uses the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr#attr-charoff) to establish the alignment character (typically \".\" or \",\" when aligning numerical data) and the number of characters that should follow the alignment character. This alignment type was never widely supported.\n\nIf no value is expressly set for `align`, the parent node's value is inherited.\n\nInstead of using the obsolete `align` attribute, you should instead use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to establish `left`, `center`, `right`, or `justify` alignment for the row's cells. To apply character-based alignment, set the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to the alignment character (such as `\".\"` or `\",\"`).",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/tr"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "td",
            "description": {
                "kind": "markdown",
                "value": "The td element represents a data cell in a table."
            },
            "attributes": [
                {
                    "name": "colspan",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "rowspan",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "headers",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "abbr",
                    "description": "This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard. Alternatively, you can put the abbreviated description inside the cell and place the long content in the **title** attribute.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "align",
                    "description": "This enumerated attribute specifies how the cell content's horizontal alignment will be handled. Possible values are:\n\n*   `left`: The content is aligned to the left of the cell.\n*   `center`: The content is centered in the cell.\n*   `right`: The content is aligned to the right of the cell.\n*   `justify` (with text only): The content is stretched out inside the cell so that it covers its entire width.\n*   `char` (with text only): The content is aligned to a character inside the `<th>` element with minimal offset. This character is defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nThe default value when this attribute is not specified is `left`.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values, apply the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to the element.\n*   To achieve the same effect as the `char` value, give the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property the same value you would use for the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-char). Unimplemented in CSS3.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "axis",
                    "description": "This attribute contains a list of space-separated strings. Each string is the `id` of a group of cells that this header applies to.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "bgcolor",
                    "description": "This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in [sRGB](https://www.w3.org/Graphics/Color/sRGB) and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings:\n\n \n\n`black` = \"#000000\"\n\n \n\n`green` = \"#008000\"\n\n \n\n`silver` = \"#C0C0C0\"\n\n \n\n`lime` = \"#00FF00\"\n\n \n\n`gray` = \"#808080\"\n\n \n\n`olive` = \"#808000\"\n\n \n\n`white` = \"#FFFFFF\"\n\n \n\n`yellow` = \"#FFFF00\"\n\n \n\n`maroon` = \"#800000\"\n\n \n\n`navy` = \"#000080\"\n\n \n\n`red` = \"#FF0000\"\n\n \n\n`blue` = \"#0000FF\"\n\n \n\n`purple` = \"#800080\"\n\n \n\n`teal` = \"#008080\"\n\n \n\n`fuchsia` = \"#FF00FF\"\n\n \n\n`aqua` = \"#00FFFF\"\n\n**Note:** Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td \"The HTML <td> element defines a cell of a table that contains data. It participates in the table model.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To create a similar effect use the [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color \"The background-color CSS property sets the background color of an element.\") property in [CSS](https://developer.mozilla.org/en-US/docs/CSS) instead.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/td"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "th",
            "description": {
                "kind": "markdown",
                "value": "The th element represents a header cell in a table."
            },
            "attributes": [
                {
                    "name": "colspan",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "rowspan",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "headers",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "scope",
                    "valueSet": "s",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "sorted"
                },
                {
                    "name": "abbr",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "align",
                    "description": "This enumerated attribute specifies how the cell content's horizontal alignment will be handled. Possible values are:\n\n*   `left`: The content is aligned to the left of the cell.\n*   `center`: The content is centered in the cell.\n*   `right`: The content is aligned to the right of the cell.\n*   `justify` (with text only): The content is stretched out inside the cell so that it covers its entire width.\n*   `char` (with text only): The content is aligned to a character inside the `<th>` element with minimal offset. This character is defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-charoff) attributes.\n\nThe default value when this attribute is not specified is `left`.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values, apply the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to the element.\n*   To achieve the same effect as the `char` value, give the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property the same value you would use for the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-char). Unimplemented in CSS3.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "axis",
                    "description": "This attribute contains a list of space-separated strings. Each string is the `id` of a group of cells that this header applies to.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard: use the [`scope`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-scope) attribute instead.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "bgcolor",
                    "description": "This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in [sRGB](https://www.w3.org/Graphics/Color/sRGB) and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings:\n\n \n\n`black` = \"#000000\"\n\n \n\n`green` = \"#008000\"\n\n \n\n`silver` = \"#C0C0C0\"\n\n \n\n`lime` = \"#00FF00\"\n\n \n\n`gray` = \"#808080\"\n\n \n\n`olive` = \"#808000\"\n\n \n\n`white` = \"#FFFFFF\"\n\n \n\n`yellow` = \"#FFFF00\"\n\n \n\n`maroon` = \"#800000\"\n\n \n\n`navy` = \"#000080\"\n\n \n\n`red` = \"#FF0000\"\n\n \n\n`blue` = \"#0000FF\"\n\n \n\n`purple` = \"#800080\"\n\n \n\n`teal` = \"#008080\"\n\n \n\n`fuchsia` = \"#FF00FF\"\n\n \n\n`aqua` = \"#00FFFF\"\n\n**Note:** Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The [`<th>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th \"The HTML <th> element defines a cell as header of a group of table cells. The exact nature of this group is defined by the scope and headers attributes.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS). To create a similar effect use the [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color \"The background-color CSS property sets the background color of an element.\") property in [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) instead.",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/th"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "form",
            "description": {
                "kind": "markdown",
                "value": "The form element represents a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing."
            },
            "attributes": [
                {
                    "name": "accept-charset",
                    "description": {
                        "kind": "markdown",
                        "value": "A space- or comma-delimited list of character encodings that the server accepts. The browser uses them in the order in which they are listed. The default value, the reserved string `\"UNKNOWN\"`, indicates the same encoding as that of the document containing the form element.  \nIn previous versions of HTML, the different character encodings could be delimited by spaces or commas. In HTML5, only spaces are allowed as delimiters."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "action",
                    "description": {
                        "kind": "markdown",
                        "value": "The URI of a program that processes the form information. This value can be overridden by a [`formaction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formaction) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "autocomplete",
                    "valueSet": "o",
                    "description": {
                        "kind": "markdown",
                        "value": "Indicates whether input elements can by default have their values automatically completed by the browser. This setting can be overridden by an `autocomplete` attribute on an element belonging to the form. Possible values are:\n\n*   `off`: The user must explicitly enter a value into each field for every use, or the document provides its own auto-completion method; the browser does not automatically complete entries.\n*   `on`: The browser can automatically complete values based on values that the user has previously entered in the form.\n\nFor most modern browsers (including Firefox 38+, Google Chrome 34+, IE 11+) setting the autocomplete attribute will not prevent a browser's password manager from asking the user if they want to store login fields (username and password), if the user permits the storage the browser will autofill the login the next time the user visits the page. See [The autocomplete attribute and login fields](https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#The_autocomplete_attribute_and_login_fields).\n**Note:** If you set `autocomplete` to `off` in a form because the document provides its own auto-completion, then you should also set `autocomplete` to `off` for each of the form's `input` elements that the document can auto-complete. For details, see the note regarding Google Chrome in the [Browser Compatibility chart](#compatChart)."
                    },
                    "browsers": [
                        "C14",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "enctype",
                    "valueSet": "et",
                    "description": {
                        "kind": "markdown",
                        "value": "When the value of the `method` attribute is `post`, enctype is the [MIME type](https://en.wikipedia.org/wiki/Mime_type) of content that is used to submit the form to the server. Possible values are:\n\n*   `application/x-www-form-urlencoded`: The default value if the attribute is not specified.\n*   `multipart/form-data`: The value used for an [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element with the `type` attribute set to \"file\".\n*   `text/plain`: (HTML5)\n\nThis value can be overridden by a [`formenctype`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formenctype) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "method",
                    "valueSet": "m",
                    "description": {
                        "kind": "markdown",
                        "value": "The [HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP) method that the browser uses to submit the form. Possible values are:\n\n*   `post`: Corresponds to the HTTP [POST method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5) ; form data are included in the body of the form and sent to the server.\n*   `get`: Corresponds to the HTTP [GET method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3); form data are appended to the `action` attribute URI with a '?' as separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.\n*   `dialog`: Use when the form is inside a [`<dialog>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog \"The HTML <dialog> element represents a dialog box or other interactive component, such as an inspector or window.\") element to close the dialog when submitted.\n\nThis value can be overridden by a [`formmethod`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formmethod) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "name",
                    "description": {
                        "kind": "markdown",
                        "value": "The name of the form. In HTML 4, its use is deprecated (`id` should be used instead). It must be unique among the forms in a document and not just an empty string in HTML 5."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "novalidate",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute indicates that the form is not to be validated when submitted. If this attribute is not specified (and therefore the form is validated), this default setting can be overridden by a [`formnovalidate`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formnovalidate) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element belonging to the form."
                    },
                    "browsers": [
                        "C10",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S10.1",
                        "SM10.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2017-03-27",
                        "baseline_high_date": "2019-09-27"
                    }
                },
                {
                    "name": "target",
                    "valueSet": "target",
                    "description": {
                        "kind": "markdown",
                        "value": "A name or keyword indicating where to display the response that is received after submitting the form. In HTML 4, this is the name/keyword for a frame. In HTML5, it is a name/keyword for a _browsing context_ (for example, tab, window, or inline frame). The following keywords have special meanings:\n\n*   `_self`: Load the response into the same HTML 4 frame (or HTML5 browsing context) as the current one. This value is the default if the attribute is not specified.\n*   `_blank`: Load the response into a new unnamed HTML 4 window or HTML5 browsing context.\n*   `_parent`: Load the response into the HTML 4 frameset parent of the current frame, or HTML5 parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n*   `_top`: HTML 4: Load the response into the full original window, and cancel all other frames. HTML5: Load the response into the top-level browsing context (i.e., the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n*   _iframename_: The response is displayed in a named [`<iframe>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe \"The HTML Inline Frame element (<iframe>) represents a nested browsing context, embedding another HTML page into the current one.\").\n\nHTML5: This value can be overridden by a [`formtarget`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formtarget) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "accept",
                    "description": "A comma-separated list of content types that the server accepts.\n\n**Usage note:** This attribute has been removed in HTML5 and should no longer be used. Instead, use the [`accept`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept) attribute of the specific [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
                },
                {
                    "name": "autocapitalize",
                    "description": "This is a nonstandard attribute used by iOS Safari Mobile which controls whether and how the text value for textual form control descendants should be automatically capitalized as it is entered/edited by the user. If the `autocapitalize` attribute is specified on an individual form control descendant, it trumps the form-wide `autocapitalize` setting. The non-deprecated values are available in iOS 5 and later. The default value is `sentences`. Possible values are:\n\n*   `none`: Completely disables automatic capitalization\n*   `sentences`: Automatically capitalize the first letter of sentences.\n*   `words`: Automatically capitalize the first letter of words.\n*   `characters`: Automatically capitalize all characters.\n*   `on`: Deprecated since iOS 5.\n*   `off`: Deprecated since iOS 5."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/form"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S3",
                "SM2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "label",
            "description": {
                "kind": "markdown",
                "value": "The label element represents a caption in a user interface. The caption can be associated with a specific form control, known as the label element's labeled control, either using the for attribute, or by putting the form control inside the label element itself."
            },
            "attributes": [
                {
                    "name": "form",
                    "description": {
                        "kind": "markdown",
                        "value": "The [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element with which the label is associated (its _form owner_). If specified, the value of the attribute is the `id` of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element in the same document. This lets you place label elements anywhere within a document, not just as descendants of their form elements."
                    }
                },
                {
                    "name": "for",
                    "description": {
                        "kind": "markdown",
                        "value": "The [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-id) of a [labelable](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Form_labelable) form-related element in the same document as the `<label>` element. The first element in the document with an `id` matching the value of the `for` attribute is the _labeled control_ for this label element, if it is a labelable element. If it is not labelable then the `for` attribute has no effect. If there are other elements which also match the `id` value, later in the document, they are not considered.\n\n**Note**: A `<label>` element can have both a `for` attribute and a contained control element, as long as the `for` attribute points to the contained control element."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/label"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "input",
            "description": {
                "kind": "markdown",
                "value": "The input element represents a typed data field, usually with a form control to allow the user to edit the data."
            },
            "void": true,
            "attributes": [
                {
                    "name": "accept",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "alt",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "autocomplete",
                    "valueSet": "inputautocomplete",
                    "browsers": [
                        "C14",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "autofocus",
                    "valueSet": "v"
                },
                {
                    "name": "checked",
                    "valueSet": "v",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "dirname",
                    "browsers": [
                        "C17",
                        "CA18",
                        "E79",
                        "FF116",
                        "FFA116",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "low",
                        "baseline_low_date": "2023-08-01"
                    }
                },
                {
                    "name": "disabled",
                    "valueSet": "v",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "form",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "formaction",
                    "browsers": [
                        "C9",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5",
                        "SM4.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "formenctype",
                    "valueSet": "et",
                    "browsers": [
                        "C9",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5",
                        "SM4.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "formmethod",
                    "valueSet": "fm",
                    "browsers": [
                        "C9",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5",
                        "SM4.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "formnovalidate",
                    "valueSet": "v",
                    "browsers": [
                        "C4",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5",
                        "SM4"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "formtarget",
                    "browsers": [
                        "C9",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5",
                        "SM4.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "height"
                },
                {
                    "name": "inputmode",
                    "valueSet": "im"
                },
                {
                    "name": "list",
                    "browsers": [
                        "C20",
                        "CA25",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S12.1",
                        "SM12.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2019-03-25",
                        "baseline_high_date": "2021-09-25"
                    }
                },
                {
                    "name": "max",
                    "browsers": [
                        "C4",
                        "CA18",
                        "E12",
                        "FF16",
                        "FFA16",
                        "S5",
                        "SM4"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "maxlength",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "min",
                    "browsers": [
                        "C4",
                        "CA18",
                        "E12",
                        "FF16",
                        "FFA16",
                        "S5",
                        "SM4"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "minlength",
                    "browsers": [
                        "C40",
                        "CA40",
                        "E17",
                        "FF51",
                        "FFA51",
                        "S10.1",
                        "SM10.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2018-04-30",
                        "baseline_high_date": "2020-10-30"
                    }
                },
                {
                    "name": "multiple",
                    "valueSet": "v",
                    "browsers": [
                        "C2",
                        "CA18",
                        "E12",
                        "FF3.6",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "name",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "pattern",
                    "browsers": [
                        "C4",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5",
                        "SM4"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "placeholder",
                    "browsers": [
                        "C3",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "popovertarget",
                    "browsers": [
                        "C114",
                        "CA114",
                        "E114",
                        "FF125",
                        "FFA125",
                        "S17",
                        "SM17"
                    ],
                    "status": {
                        "baseline": "low",
                        "baseline_low_date": "2024-04-16"
                    }
                },
                {
                    "name": "popovertargetaction",
                    "browsers": [
                        "C114",
                        "CA114",
                        "E114",
                        "FF125",
                        "FFA125",
                        "S17",
                        "SM17"
                    ],
                    "status": {
                        "baseline": "low",
                        "baseline_low_date": "2024-04-16"
                    }
                },
                {
                    "name": "readonly",
                    "valueSet": "v",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "required",
                    "valueSet": "v",
                    "browsers": [
                        "C4",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5",
                        "SM4"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "size",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "src",
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "step",
                    "browsers": [
                        "C5",
                        "CA18",
                        "E12",
                        "FF16",
                        "FFA16",
                        "S5",
                        "SM4"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "type",
                    "valueSet": "t"
                },
                {
                    "name": "value"
                },
                {
                    "name": "width"
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/input"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "button",
            "description": {
                "kind": "markdown",
                "value": "The button element represents a button labeled by its contents."
            },
            "attributes": [
                {
                    "name": "autofocus",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute lets you specify that the button should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form-associated element in a document can have this attribute specified."
                    }
                },
                {
                    "name": "disabled",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute indicates that the user cannot interact with the button. If this attribute is not specified, the button inherits its setting from the containing element, for example [`<fieldset>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset \"The HTML <fieldset> element is used to group several controls as well as labels (<label>) within a web form.\"); if there is no containing element with the **disabled** attribute set, then the button is enabled.\n\nFirefox will, unlike other browsers, by default, [persist the dynamic disabled state](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) of a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") across page loads. Use the [`autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-autocomplete) attribute to control this feature."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "form",
                    "description": {
                        "kind": "markdown",
                        "value": "The form element that the button is associated with (its _form owner_). The value of the attribute must be the **id** attribute of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element in the same document. If this attribute is not specified, the `<button>` element will be associated to an ancestor [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element, if one exists. This attribute enables you to associate `<button>` elements to [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") elements anywhere within a document, not just as descendants of [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") elements."
                    },
                    "browsers": [
                        "C9",
                        "CA18",
                        "E16",
                        "FF4",
                        "FFA4",
                        "S5.1",
                        "SM5"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2017-10-17",
                        "baseline_high_date": "2020-04-17"
                    }
                },
                {
                    "name": "formaction",
                    "description": {
                        "kind": "markdown",
                        "value": "The URI of a program that processes the information submitted by the button. If specified, it overrides the [`action`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-action) attribute of the button's form owner."
                    },
                    "browsers": [
                        "C9",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5.1",
                        "SM5"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "formenctype",
                    "valueSet": "et",
                    "description": {
                        "kind": "markdown",
                        "value": "If the button is a submit button, this attribute specifies the type of content that is used to submit the form to the server. Possible values are:\n\n*   `application/x-www-form-urlencoded`: The default value if the attribute is not specified.\n*   `multipart/form-data`: Use this value if you are using an [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element with the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-type) attribute set to `file`.\n*   `text/plain`\n\nIf this attribute is specified, it overrides the [`enctype`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-enctype) attribute of the button's form owner."
                    },
                    "browsers": [
                        "C9",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5.1",
                        "SM5"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "formmethod",
                    "valueSet": "fm",
                    "description": {
                        "kind": "markdown",
                        "value": "If the button is a submit button, this attribute specifies the HTTP method that the browser uses to submit the form. Possible values are:\n\n*   `post`: The data from the form are included in the body of the form and sent to the server.\n*   `get`: The data from the form are appended to the **form** attribute URI, with a '?' as a separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.\n\nIf specified, this attribute overrides the [`method`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-method) attribute of the button's form owner."
                    },
                    "browsers": [
                        "C9",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5.1",
                        "SM5"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "formnovalidate",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the [`novalidate`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-novalidate) attribute of the button's form owner."
                    },
                    "browsers": [
                        "C9",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5.1",
                        "SM5"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "formtarget",
                    "description": {
                        "kind": "markdown",
                        "value": "If the button is a submit button, this attribute is a name or keyword indicating where to display the response that is received after submitting the form. This is a name of, or keyword for, a _browsing context_ (for example, tab, window, or inline frame). If this attribute is specified, it overrides the [`target`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-target) attribute of the button's form owner. The following keywords have special meanings:\n\n*   `_self`: Load the response into the same browsing context as the current one. This value is the default if the attribute is not specified.\n*   `_blank`: Load the response into a new unnamed browsing context.\n*   `_parent`: Load the response into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n*   `_top`: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`."
                    },
                    "browsers": [
                        "C9",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5.1",
                        "SM5"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "name",
                    "description": {
                        "kind": "markdown",
                        "value": "The name of the button, which is submitted with the form data."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "popovertarget",
                    "description": {
                        "kind": "markdown",
                        "value": "Turns the button into a popover control button; takes the ID of the popover element to control as its value."
                    },
                    "browsers": [
                        "C114",
                        "CA114",
                        "E114",
                        "FF125",
                        "FFA125",
                        "S17",
                        "SM17"
                    ],
                    "status": {
                        "baseline": "low",
                        "baseline_low_date": "2024-04-16"
                    }
                },
                {
                    "name": "popovertargetaction",
                    "description": {
                        "kind": "markdown",
                        "value": "Specifies the action to be performed on a popover element being controlled by the button."
                    },
                    "browsers": [
                        "C114",
                        "CA114",
                        "E114",
                        "FF125",
                        "FFA125",
                        "S17",
                        "SM17"
                    ],
                    "status": {
                        "baseline": "low",
                        "baseline_low_date": "2024-04-16"
                    }
                },
                {
                    "name": "type",
                    "valueSet": "bt",
                    "description": {
                        "kind": "markdown",
                        "value": "The type of the button. Possible values are:\n\n*   `submit`: The button submits the form data to the server. This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value.\n*   `reset`: The button resets all the controls to their initial values.\n*   `button`: The button has no default behavior. It can have client-side scripts associated with the element's events, which are triggered when the events occur."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "value",
                    "description": {
                        "kind": "markdown",
                        "value": "The initial value of the button. It defines the value associated with the button which is submitted with the form data. This value is passed to the server in params when the form is submitted."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "autocomplete",
                    "description": "The use of this attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") is nonstandard and Firefox-specific. By default, unlike other browsers, [Firefox persists the dynamic disabled state](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) of a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") across page loads. Setting the value of this attribute to `off` (i.e. `autocomplete=\"off\"`) disables this feature. See [bug 654072](https://bugzilla.mozilla.org/show_bug.cgi?id=654072 \"if disabled state is changed with javascript, the normal state doesn't return after refreshing the page\")."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/button"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "select",
            "description": {
                "kind": "markdown",
                "value": "The select element represents a control for selecting amongst a set of options."
            },
            "attributes": [
                {
                    "name": "autocomplete",
                    "valueSet": "inputautocomplete",
                    "description": {
                        "kind": "markdown",
                        "value": "A [`DOMString`](https://developer.mozilla.org/en-US/docs/Web/API/DOMString \"DOMString is a UTF-16 String. As JavaScript already uses such strings, DOMString is mapped directly to a String.\") providing a hint for a [user agent's](https://developer.mozilla.org/en-US/docs/Glossary/user_agent \"user agent's: A user agent is a computer program representing a person, for example, a browser in a Web context.\") autocomplete feature. See [The HTML autocomplete attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for a complete list of values and details on how to use autocomplete."
                    },
                    "browsers": [
                        "C66",
                        "CA66",
                        "E79",
                        "FF59",
                        "FFA59",
                        "S9.1",
                        "SM9.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-01-15",
                        "baseline_high_date": "2022-07-15"
                    }
                },
                {
                    "name": "autofocus",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form element in a document can have the `autofocus` attribute."
                    }
                },
                {
                    "name": "disabled",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example `fieldset`; if there is no containing element with the `disabled` attribute set, then the control is enabled."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "form",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute lets you specify the form element to which the select element is associated (that is, its \"form owner\"). If this attribute is specified, its value must be the same as the `id` of a form element in the same document. This enables you to place select elements anywhere within a document, not just as descendants of their form elements."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "multiple",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute indicates that multiple options can be selected in the list. If it is not specified, then only one option can be selected at a time. When `multiple` is specified, most browsers will show a scrolling list box instead of a single line dropdown."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "name",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute is used to specify the name of the control."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "required",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "A Boolean attribute indicating that an option with a non-empty string value must be selected."
                    },
                    "browsers": [
                        "C10",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5.1",
                        "SM5"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "size",
                    "description": {
                        "kind": "markdown",
                        "value": "If the control is presented as a scrolling list box (e.g. when `multiple` is specified), this attribute represents the number of rows in the list that should be visible at one time. Browsers are not required to present a select element as a scrolled list box. The default value is 0.\n\n**Note:** According to the HTML5 specification, the default value for size should be 1; however, in practice, this has been found to break some web sites, and no other browser currently does that, so Mozilla has opted to continue to return 0 for the time being with Firefox."
                    },
                    "browsers": [
                        "C1",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S3"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/select"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "datalist",
            "description": {
                "kind": "markdown",
                "value": "The datalist element represents a set of option elements that represent predefined options for other controls. In the rendering, the datalist element represents nothing and it, along with its children, should be hidden."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/datalist"
                }
            ],
            "browsers": [
                "C20",
                "CA33",
                "E12",
                "S12.1",
                "SM12.2"
            ],
            "status": {
                "baseline": false
            }
        },
        {
            "name": "optgroup",
            "description": {
                "kind": "markdown",
                "value": "The optgroup element represents a group of option elements with a common label."
            },
            "attributes": [
                {
                    "name": "disabled",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "If this Boolean attribute is set, none of the items in this option group is selectable. Often browsers grey out such control and it won't receive any browsing events, like mouse clicks or focus-related ones."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "label",
                    "description": {
                        "kind": "markdown",
                        "value": "The name of the group of options, which the browser can use when labeling the options in the user interface. This attribute is mandatory if this element is used."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/optgroup"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "option",
            "description": {
                "kind": "markdown",
                "value": "The option element represents an option in a select element or as part of a list of suggestions in a datalist element."
            },
            "attributes": [
                {
                    "name": "disabled",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "If this Boolean attribute is set, this option is not checkable. Often browsers grey out such control and it won't receive any browsing event, like mouse clicks or focus-related ones. If this attribute is not set, the element can still be disabled if one of its ancestors is a disabled [`<optgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup \"The HTML <optgroup> element creates a grouping of options within a <select> element.\") element."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "label",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute is text for the label indicating the meaning of the option. If the `label` attribute isn't defined, its value is that of the element text content."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "selected",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "If present, this Boolean attribute indicates that the option is initially selected. If the `<option>` element is the descendant of a [`<select>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select \"The HTML <select> element represents a control that provides a menu of options\") element whose [`multiple`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple) attribute is not set, only one single `<option>` of this [`<select>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select \"The HTML <select> element represents a control that provides a menu of options\") element may have the `selected` attribute."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "value",
                    "description": {
                        "kind": "markdown",
                        "value": "The content of this attribute represents the value to be submitted with the form, should this option be selected. If this attribute is omitted, the value is taken from the text content of the option element."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/option"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "textarea",
            "description": {
                "kind": "markdown",
                "value": "The textarea element represents a multiline plain text edit control for the element's raw value. The contents of the control represent the control's default value."
            },
            "attributes": [
                {
                    "name": "autocomplete",
                    "valueSet": "inputautocomplete",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute indicates whether the value of the control can be automatically completed by the browser. Possible values are:\n\n*   `off`: The user must explicitly enter a value into this field for every use, or the document provides its own auto-completion method; the browser does not automatically complete the entry.\n*   `on`: The browser can automatically complete the value based on values that the user has entered during previous uses.\n\nIf the `autocomplete` attribute is not specified on a `<textarea>` element, then the browser uses the `autocomplete` attribute value of the `<textarea>` element's form owner. The form owner is either the [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element that this `<textarea>` element is a descendant of or the form element whose `id` is specified by the `form` attribute of the input element. For more information, see the [`autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-autocomplete) attribute in [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\")."
                    },
                    "browsers": [
                        "C66",
                        "CA66",
                        "E79",
                        "FF59",
                        "FFA59",
                        "S9.1",
                        "SM9.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-01-15",
                        "baseline_high_date": "2022-07-15"
                    }
                },
                {
                    "name": "autofocus",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form-associated element in a document can have this attribute specified."
                    }
                },
                {
                    "name": "cols",
                    "description": {
                        "kind": "markdown",
                        "value": "The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is `20`."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "dirname",
                    "browsers": [
                        "C17",
                        "CA18",
                        "E79",
                        "FF116",
                        "FFA116",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "low",
                        "baseline_low_date": "2023-08-01"
                    }
                },
                {
                    "name": "disabled",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example [`<fieldset>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset \"The HTML <fieldset> element is used to group several controls as well as labels (<label>) within a web form.\"); if there is no containing element when the `disabled` attribute is set, the control is enabled."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "form",
                    "description": {
                        "kind": "markdown",
                        "value": "The form element that the `<textarea>` element is associated with (its \"form owner\"). The value of the attribute must be the `id` of a form element in the same document. If this attribute is not specified, the `<textarea>` element must be a descendant of a form element. This attribute enables you to place `<textarea>` elements anywhere within a document, not just as descendants of form elements."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "inputmode",
                    "valueSet": "im"
                },
                {
                    "name": "maxlength",
                    "description": {
                        "kind": "markdown",
                        "value": "The maximum number of characters (unicode code points) that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters."
                    },
                    "browsers": [
                        "C4",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5",
                        "SM4.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "minlength",
                    "description": {
                        "kind": "markdown",
                        "value": "The minimum number of characters (unicode code points) required that the user should enter."
                    },
                    "browsers": [
                        "C40",
                        "CA40",
                        "E17",
                        "FF51",
                        "FFA51",
                        "S10.1",
                        "SM10.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2018-04-30",
                        "baseline_high_date": "2020-10-30"
                    }
                },
                {
                    "name": "name",
                    "description": {
                        "kind": "markdown",
                        "value": "The name of the control."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "placeholder",
                    "description": {
                        "kind": "markdown",
                        "value": "A hint to the user of what can be entered in the control. Carriage returns or line-feeds within the placeholder text must be treated as line breaks when rendering the hint.\n\n**Note:** Placeholders should only be used to show an example of the type of data that should be entered into a form; they are _not_ a substitute for a proper [`<label>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label \"The HTML <label> element represents a caption for an item in a user interface.\") element tied to the input. See [Labels and placeholders](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Labels_and_placeholders \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") in [<input>: The Input (Form Input) element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") for a full explanation."
                    },
                    "browsers": [
                        "C4",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5",
                        "SM5"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "readonly",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute indicates that the user cannot modify the value of the control. Unlike the `disabled` attribute, the `readonly` attribute does not prevent the user from clicking or selecting in the control. The value of a read-only control is still submitted with the form."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "required",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute specifies that the user must fill in a value before submitting a form."
                    },
                    "browsers": [
                        "C4",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S5",
                        "SM5"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "rows",
                    "description": {
                        "kind": "markdown",
                        "value": "The number of visible text lines for the control."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "wrap",
                    "valueSet": "w",
                    "description": {
                        "kind": "markdown",
                        "value": "Indicates how the control wraps text. Possible values are:\n\n*   `hard`: The browser automatically inserts line breaks (CR+LF) so that each line has no more than the width of the control; the `cols` attribute must also be specified for this to take effect.\n*   `soft`: The browser ensures that all line breaks in the value consist of a CR+LF pair, but does not insert any additional line breaks.\n*   `off` : Like `soft` but changes appearance to `white-space: pre` so line segments exceeding `cols` are not wrapped and the `<textarea>` becomes horizontally scrollable.\n\nIf this attribute is not specified, `soft` is its default value."
                    },
                    "browsers": [
                        "C16",
                        "CA18",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "autocapitalize",
                    "description": "This is a non-standard attribute supported by WebKit on iOS (therefore nearly all browsers running on iOS, including Safari, Firefox, and Chrome), which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user. The non-deprecated values are available in iOS 5 and later. Possible values are:\n\n*   `none`: Completely disables automatic capitalization.\n*   `sentences`: Automatically capitalize the first letter of sentences.\n*   `words`: Automatically capitalize the first letter of words.\n*   `characters`: Automatically capitalize all characters.\n*   `on`: Deprecated since iOS 5.\n*   `off`: Deprecated since iOS 5."
                },
                {
                    "name": "spellcheck",
                    "description": "Specifies whether the `<textarea>` is subject to spell checking by the underlying browser/OS. the value can be:\n\n*   `true`: Indicates that the element needs to have its spelling and grammar checked.\n*   `default` : Indicates that the element is to act according to a default behavior, possibly based on the parent element's own `spellcheck` value.\n*   `false` : Indicates that the element should not be spell checked.",
                    "browsers": [
                        "C9",
                        "CA18",
                        "E12",
                        "FF2",
                        "FFA4",
                        "S5.1",
                        "SM5"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/textarea"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "output",
            "description": {
                "kind": "markdown",
                "value": "The output element represents the result of a calculation performed by the application, or the result of a user action."
            },
            "attributes": [
                {
                    "name": "for",
                    "description": {
                        "kind": "markdown",
                        "value": "A space-separated list of other elements’ [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id)s, indicating that those elements contributed input values to (or otherwise affected) the calculation."
                    },
                    "browsers": [
                        "C10",
                        "CA18",
                        "E18",
                        "FF4",
                        "FFA4",
                        "S7",
                        "SM7"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "≤2018-10-02",
                        "baseline_high_date": "≤2021-04-02"
                    }
                },
                {
                    "name": "form",
                    "description": {
                        "kind": "markdown",
                        "value": "The [form element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) that this element is associated with (its \"form owner\"). The value of the attribute must be an `id` of a form element in the same document. If this attribute is not specified, the output element must be a descendant of a form element. This attribute enables you to place output elements anywhere within a document, not just as descendants of their form elements."
                    },
                    "browsers": [
                        "C10",
                        "CA18",
                        "E18",
                        "FF4",
                        "FFA4",
                        "S7",
                        "SM7"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "≤2018-10-02",
                        "baseline_high_date": "≤2021-04-02"
                    }
                },
                {
                    "name": "name",
                    "description": {
                        "kind": "markdown",
                        "value": "The name of the element, exposed in the [`HTMLFormElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement \"The HTMLFormElement interface represents a <form> element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements.\") API."
                    },
                    "browsers": [
                        "C10",
                        "CA18",
                        "E18",
                        "FF4",
                        "FFA4",
                        "S7",
                        "SM7"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "≤2018-10-02",
                        "baseline_high_date": "≤2021-04-02"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/output"
                }
            ],
            "browsers": [
                "C10",
                "CA18",
                "E18",
                "FF4",
                "FFA4",
                "S7",
                "SM7"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "≤2018-10-02",
                "baseline_high_date": "≤2021-04-02"
            }
        },
        {
            "name": "progress",
            "description": {
                "kind": "markdown",
                "value": "The progress element represents the completion progress of a task. The progress is either indeterminate, indicating that progress is being made but that it is not clear how much more work remains to be done before the task is complete (e.g. because the task is waiting for a remote host to respond), or the progress is a number in the range zero to a maximum, giving the fraction of work that has so far been completed."
            },
            "attributes": [
                {
                    "name": "value",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute specifies how much of the task that has been completed. It must be a valid floating point number between 0 and `max`, or between 0 and 1 if `max` is omitted. If there is no `value` attribute, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take."
                    },
                    "browsers": [
                        "C6",
                        "CA18",
                        "E12",
                        "FF6",
                        "FFA6",
                        "S6",
                        "SM7"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "max",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute describes how much work the task indicated by the `progress` element requires. The `max` attribute, if present, must have a value greater than zero and be a valid floating point number. The default value is 1."
                    },
                    "browsers": [
                        "C6",
                        "CA18",
                        "E12",
                        "FF6",
                        "FFA6",
                        "S6",
                        "SM7"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/progress"
                }
            ],
            "browsers": [
                "C6",
                "CA18",
                "E12",
                "FF6",
                "FFA6",
                "S6",
                "SM7"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "meter",
            "description": {
                "kind": "markdown",
                "value": "The meter element represents a scalar measurement within a known range, or a fractional value; for example disk usage, the relevance of a query result, or the fraction of a voting population to have selected a particular candidate."
            },
            "attributes": [
                {
                    "name": "value",
                    "description": {
                        "kind": "markdown",
                        "value": "The current numeric value. This must be between the minimum and maximum values (`min` attribute and `max` attribute) if they are specified. If unspecified or malformed, the value is 0. If specified, but not within the range given by the `min` attribute and `max` attribute, the value is equal to the nearest end of the range.\n\n**Usage note:** Unless the `value` attribute is between `0` and `1` (inclusive), the `min` and `max` attributes should define the range so that the `value` attribute's value is within it."
                    },
                    "browsers": [
                        "C6",
                        "CA18",
                        "E13",
                        "FF16",
                        "FFA16",
                        "S6",
                        "SM10.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2017-03-27",
                        "baseline_high_date": "2019-09-27"
                    }
                },
                {
                    "name": "min",
                    "description": {
                        "kind": "markdown",
                        "value": "The lower numeric bound of the measured range. This must be less than the maximum value (`max` attribute), if specified. If unspecified, the minimum value is 0."
                    },
                    "browsers": [
                        "C6",
                        "CA18",
                        "E13",
                        "FF16",
                        "FFA16",
                        "S6",
                        "SM10.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2017-03-27",
                        "baseline_high_date": "2019-09-27"
                    }
                },
                {
                    "name": "max",
                    "description": {
                        "kind": "markdown",
                        "value": "The upper numeric bound of the measured range. This must be greater than the minimum value (`min` attribute), if specified. If unspecified, the maximum value is 1."
                    },
                    "browsers": [
                        "C6",
                        "CA18",
                        "E13",
                        "FF16",
                        "FFA16",
                        "S6",
                        "SM10.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2017-03-27",
                        "baseline_high_date": "2019-09-27"
                    }
                },
                {
                    "name": "low",
                    "description": {
                        "kind": "markdown",
                        "value": "The upper numeric bound of the low end of the measured range. This must be greater than the minimum value (`min` attribute), and it also must be less than the high value and maximum value (`high` attribute and `max` attribute, respectively), if any are specified. If unspecified, or if less than the minimum value, the `low` value is equal to the minimum value."
                    },
                    "browsers": [
                        "C6",
                        "CA18",
                        "E13",
                        "FF16",
                        "FFA16",
                        "S6",
                        "SM10.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2017-03-27",
                        "baseline_high_date": "2019-09-27"
                    }
                },
                {
                    "name": "high",
                    "description": {
                        "kind": "markdown",
                        "value": "The lower numeric bound of the high end of the measured range. This must be less than the maximum value (`max` attribute), and it also must be greater than the low value and minimum value (`low` attribute and **min** attribute, respectively), if any are specified. If unspecified, or if greater than the maximum value, the `high` value is equal to the maximum value."
                    },
                    "browsers": [
                        "C6",
                        "CA18",
                        "E13",
                        "FF16",
                        "FFA16",
                        "S6",
                        "SM10.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2017-03-27",
                        "baseline_high_date": "2019-09-27"
                    }
                },
                {
                    "name": "optimum",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute indicates the optimal numeric value. It must be within the range (as defined by the `min` attribute and `max` attribute). When used with the `low` attribute and `high` attribute, it gives an indication where along the range is considered preferable. For example, if it is between the `min` attribute and the `low` attribute, then the lower range is considered preferred."
                    },
                    "browsers": [
                        "C6",
                        "CA18",
                        "E13",
                        "FF16",
                        "FFA16",
                        "S6",
                        "SM10.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2017-03-27",
                        "baseline_high_date": "2019-09-27"
                    }
                },
                {
                    "name": "form",
                    "description": "This attribute associates the element with a `form` element that has ownership of the `meter` element. For example, a `meter` might be displaying a range corresponding to an `input` element of `type` _number_. This attribute is only used if the `meter` element is being used as a form-associated element; even then, it may be omitted if the element appears as a descendant of a `form` element."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/meter"
                }
            ],
            "browsers": [
                "C6",
                "CA18",
                "E13",
                "FF16",
                "FFA16",
                "S6",
                "SM10.3"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2017-03-27",
                "baseline_high_date": "2019-09-27"
            }
        },
        {
            "name": "fieldset",
            "description": {
                "kind": "markdown",
                "value": "The fieldset element represents a set of form controls optionally grouped under a common name."
            },
            "attributes": [
                {
                    "name": "disabled",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "If this Boolean attribute is set, all form controls that are descendants of the `<fieldset>`, are disabled, meaning they are not editable and won't be submitted along with the `<form>`. They won't receive any browsing events, like mouse clicks or focus-related events. By default browsers display such controls grayed out. Note that form elements inside the [`<legend>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend \"The HTML <legend> element represents a caption for the content of its parent <fieldset>.\") element won't be disabled."
                    },
                    "browsers": [
                        "C20",
                        "CA25",
                        "E79",
                        "FF4",
                        "FFA4",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-01-15",
                        "baseline_high_date": "2022-07-15"
                    }
                },
                {
                    "name": "form",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute takes the value of the `id` attribute of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element you want the `<fieldset>` to be part of, even if it is not inside the form."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "name",
                    "description": {
                        "kind": "markdown",
                        "value": "The name associated with the group.\n\n**Note**: The caption for the fieldset is given by the first [`<legend>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend \"The HTML <legend> element represents a caption for the content of its parent <fieldset>.\") element nested inside it."
                    },
                    "browsers": [
                        "C19",
                        "CA25",
                        "E12",
                        "FF4",
                        "FFA4",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/fieldset"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "legend",
            "description": {
                "kind": "markdown",
                "value": "The legend element represents a caption for the rest of the contents of the legend element's parent fieldset element, if any."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/legend"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S3",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "details",
            "description": {
                "kind": "markdown",
                "value": "The details element represents a disclosure widget from which the user can obtain additional information or controls."
            },
            "attributes": [
                {
                    "name": "open",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute indicates whether or not the details — that is, the contents of the `<details>` element — are currently visible. The default, `false`, means the details are not visible."
                    },
                    "browsers": [
                        "C12",
                        "CA18",
                        "E79",
                        "FF49",
                        "FFA49",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-01-15",
                        "baseline_high_date": "2022-07-15"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/details"
                }
            ],
            "browsers": [
                "C12",
                "CA18",
                "E79",
                "FF49",
                "FFA49",
                "S6",
                "SM6"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            }
        },
        {
            "name": "summary",
            "description": {
                "kind": "markdown",
                "value": "The summary element represents a summary, caption, or legend for the rest of the contents of the summary element's parent details element, if any."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/summary"
                }
            ],
            "browsers": [
                "C12",
                "CA18",
                "E79",
                "FF49",
                "FFA49",
                "S6",
                "SM6"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            }
        },
        {
            "name": "dialog",
            "description": {
                "kind": "markdown",
                "value": "The dialog element represents a part of an application that a user interacts with to perform a task, for example a dialog box, inspector, or window."
            },
            "attributes": [
                {
                    "name": "open",
                    "description": "Indicates that the dialog is active and available for interaction. When the `open` attribute is not set, the dialog shouldn't be shown to the user.",
                    "browsers": [
                        "C37",
                        "CA37",
                        "E79",
                        "FF98",
                        "FFA98",
                        "S15.4",
                        "SM15.4"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2022-03-14",
                        "baseline_high_date": "2024-09-14"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/dialog"
                }
            ],
            "browsers": [
                "C37",
                "CA37",
                "E79",
                "FF98",
                "FFA98",
                "S15.4",
                "SM15.4"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            }
        },
        {
            "name": "script",
            "description": {
                "kind": "markdown",
                "value": "The script element allows authors to include dynamic script and data blocks in their documents. The element does not represent content for the user."
            },
            "attributes": [
                {
                    "name": "src",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute specifies the URI of an external script; this can be used as an alternative to embedding a script directly within a document.\n\nIf a `script` element has a `src` attribute specified, it should not have a script embedded inside its tags."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "type",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute indicates the type of script represented. The value of this attribute will be in one of the following categories:\n\n*   **Omitted or a JavaScript MIME type:** For HTML5-compliant browsers this indicates the script is JavaScript. HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type. In earlier browsers, this identified the scripting language of the embedded or imported (via the `src` attribute) code. JavaScript MIME types are [listed in the specification](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#JavaScript_types).\n*   **`module`:** For HTML5-compliant browsers the code is treated as a JavaScript module. The processing of the script contents is not affected by the `charset` and `defer` attributes. For information on using `module`, see [ES6 in Depth: Modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/). Code may behave differently when the `module` keyword is used.\n*   **Any other value:** The embedded content is treated as a data block which won't be processed by the browser. Developers must use a valid MIME type that is not a JavaScript MIME type to denote data blocks. The `src` attribute will be ignored.\n\n**Note:** in Firefox you could specify the version of JavaScript contained in a `<script>` element by including a non-standard `version` parameter inside the `type` attribute — for example `type=\"text/javascript;version=1.8\"`. This has been removed in Firefox 59 (see [bug 1428745](https://bugzilla.mozilla.org/show_bug.cgi?id=1428745 \"FIXED: Remove support for version parameter from script loader\"))."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "charset"
                },
                {
                    "name": "async",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This is a Boolean attribute indicating that the browser should, if possible, load the script asynchronously.\n\nThis attribute must not be used if the `src` attribute is absent (i.e. for inline scripts). If it is included in this case it will have no effect.\n\nBrowsers usually assume the worst case scenario and load scripts synchronously, (i.e. `async=\"false\"`) during HTML parsing.\n\nDynamically inserted scripts (using [`document.createElement()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement \"In an HTML document, the document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized.\")) load asynchronously by default, so to turn on synchronous loading (i.e. scripts load in the order they were inserted) set `async=\"false\"`.\n\nSee [Browser compatibility](#Browser_compatibility) for notes on browser support. See also [Async scripts for asm.js](https://developer.mozilla.org/en-US/docs/Games/Techniques/Async_scripts)."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF3.6",
                        "FFA4",
                        "S4",
                        "SM3.2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "defer",
                    "valueSet": "v",
                    "description": {
                        "kind": "markdown",
                        "value": "This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded \"/en-US/docs/Web/Events/DOMContentLoaded\").\n\nScripts with the `defer` attribute will prevent the `DOMContentLoaded` event from firing until the script has loaded and finished evaluating.\n\nThis attribute must not be used if the `src` attribute is absent (i.e. for inline scripts), in this case it would have no effect.\n\nTo achieve a similar effect for dynamically inserted scripts use `async=\"false\"` instead. Scripts with the `defer` attribute will execute in the order in which they appear in the document."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF3.5",
                        "FFA4",
                        "S3",
                        "SM2"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "crossorigin",
                    "valueSet": "xo",
                    "description": {
                        "kind": "markdown",
                        "value": "Normal `script` elements pass minimal information to the [`window.onerror`](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror \"The onerror property of the GlobalEventHandlers mixin is an EventHandler that processes error events.\") for scripts which do not pass the standard [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS \"CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.\") checks. To allow error logging for sites which use a separate domain for static media, use this attribute. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for a more descriptive explanation of its valid arguments."
                    },
                    "browsers": [
                        "C19",
                        "CA25",
                        "E14",
                        "FF14",
                        "FFA14",
                        "S6",
                        "SM6"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2016-08-02",
                        "baseline_high_date": "2019-02-02"
                    }
                },
                {
                    "name": "nonce",
                    "description": {
                        "kind": "markdown",
                        "value": "A cryptographic nonce (number used once) to list the allowed inline scripts in a [script-src Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src). The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial."
                    }
                },
                {
                    "name": "integrity",
                    "description": "This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).",
                    "browsers": [
                        "C45",
                        "CA45",
                        "E17",
                        "FF43",
                        "FFA43",
                        "S11.1",
                        "SM11.3"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2018-04-30",
                        "baseline_high_date": "2020-10-30"
                    }
                },
                {
                    "name": "nomodule",
                    "description": "This Boolean attribute is set to indicate that the script should not be executed in browsers that support [ES2015 modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/) — in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code.",
                    "browsers": [
                        "C61",
                        "CA61",
                        "E16",
                        "FF60",
                        "FFA60",
                        "S11",
                        "SM11"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2018-05-09",
                        "baseline_high_date": "2020-11-09"
                    }
                },
                {
                    "name": "referrerpolicy",
                    "description": "Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer) to send when fetching the script, or resources fetched by the script:\n\n*   `no-referrer`: The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n*   `no-referrer-when-downgrade` (default): The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent to [origin](https://developer.mozilla.org/en-US/docs/Glossary/origin \"origin: Web content's origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Two objects have the same origin only when the scheme, host, and port all match.\")s without [TLS](https://developer.mozilla.org/en-US/docs/Glossary/TLS \"TLS: Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.\") ([HTTPS](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS \"HTTPS: HTTPS (HTTP Secure) is an encrypted version of the HTTP protocol. It usually uses SSL or TLS to encrypt all communication between a client and a server. This secure connection allows clients to safely exchange sensitive data with a server, for example for banking activities or online shopping.\")).\n*   `origin`: The sent referrer will be limited to the origin of the referring page: its [scheme](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/URIScheme), [host](https://developer.mozilla.org/en-US/docs/Glossary/host \"host: A host is a device connected to the Internet (or a local network). Some hosts called servers offer additional services like serving webpages or storing files and emails.\"), and [port](https://developer.mozilla.org/en-US/docs/Glossary/port \"port: For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol.\").\n*   `origin-when-cross-origin`: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.\n*   `same-origin`: A referrer will be sent for [same origin](https://developer.mozilla.org/en-US/docs/Glossary/Same-origin_policy \"same origin: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.\"), but cross-origin requests will contain no referrer information.\n*   `strict-origin`: Only send the origin of the document as the referrer when the protocol security level stays the same (e.g. HTTPS→HTTPS), but don't send it to a less secure destination (e.g. HTTPS→HTTP).\n*   `strict-origin-when-cross-origin`: Send a full URL when performing a same-origin request, but only send the origin when the protocol security level stays the same (e.g.HTTPS→HTTPS), and send no header to a less secure destination (e.g. HTTPS→HTTP).\n*   `unsafe-url`: The referrer will include the origin _and_ the path (but not the [fragment](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/hash), [password](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/password), or [username](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/username)). **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins.\n\n**Note**: An empty string value (`\"\"`) is both the default value, and a fallback value if `referrerpolicy` is not supported. If `referrerpolicy` is not explicitly specified on the `<script>` element, it will adopt a higher-level referrer policy, i.e. one set on the whole document or domain. If a higher-level policy is not available, the empty string is treated as being equivalent to `no-referrer-when-downgrade`.",
                    "browsers": [
                        "C70",
                        "CA70",
                        "E79",
                        "FF65",
                        "FFA65",
                        "S14",
                        "SM14"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-09-16",
                        "baseline_high_date": "2023-03-16"
                    }
                },
                {
                    "name": "text",
                    "description": "Like the `textContent` attribute, this attribute sets the text content of the element. Unlike the `textContent` attribute, however, this attribute is evaluated as executable code after the node is inserted into the DOM."
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/script"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S3",
                "SM2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "noscript",
            "description": {
                "kind": "markdown",
                "value": "The noscript element represents nothing if scripting is enabled, and represents its children if scripting is disabled. It is used to present different markup to user agents that support scripting and those that don't support scripting, by affecting how the document is parsed."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/noscript"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S3",
                "SM2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "template",
            "description": {
                "kind": "markdown",
                "value": "The template element is used to declare fragments of HTML that can be cloned and inserted in the document by script."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/template"
                }
            ],
            "browsers": [
                "C26",
                "CA26",
                "E13",
                "FF22",
                "FFA22",
                "S8",
                "SM8"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-11-12",
                "baseline_high_date": "2018-05-12"
            }
        },
        {
            "name": "canvas",
            "description": {
                "kind": "markdown",
                "value": "The canvas element provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, art, or other visual images on the fly."
            },
            "attributes": [
                {
                    "name": "width",
                    "description": {
                        "kind": "markdown",
                        "value": "The width of the coordinate space in CSS pixels. Defaults to 300."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1.5",
                        "FFA4",
                        "S2",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "height",
                    "description": {
                        "kind": "markdown",
                        "value": "The height of the coordinate space in CSS pixels. Defaults to 150."
                    },
                    "browsers": [
                        "C1",
                        "CA18",
                        "E12",
                        "FF1.5",
                        "FFA4",
                        "S2",
                        "SM1"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2015-07-29",
                        "baseline_high_date": "2018-01-29"
                    }
                },
                {
                    "name": "moz-opaque",
                    "description": "Lets the canvas know whether or not translucency will be a factor. If the canvas knows there's no translucency, painting performance can be optimized. This is only supported by Mozilla-based browsers; use the standardized [`canvas.getContext('2d', { alpha: false })`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext \"The HTMLCanvasElement.getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\") instead.",
                    "browsers": [
                        "FF3.5",
                        "FFA4"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/canvas"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1.5",
                "FFA4",
                "S2",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "slot",
            "description": {
                "kind": "markdown",
                "value": "The slot element is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together."
            },
            "attributes": [
                {
                    "name": "name",
                    "description": {
                        "kind": "markdown",
                        "value": "The slot's name.\nA **named slot** is a `<slot>` element with a `name` attribute."
                    },
                    "browsers": [
                        "C53",
                        "CA53",
                        "E79",
                        "FF63",
                        "FFA63",
                        "S10",
                        "SM10"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2020-01-15",
                        "baseline_high_date": "2022-07-15"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/slot"
                }
            ],
            "browsers": [
                "C53",
                "CA53",
                "E79",
                "FF63",
                "FFA63",
                "S10",
                "SM10"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            }
        },
        {
            "name": "data",
            "description": {
                "kind": "markdown",
                "value": "The data element links a given piece of content with a machine-readable translation."
            },
            "attributes": [
                {
                    "name": "value",
                    "description": {
                        "kind": "markdown",
                        "value": "This attribute specifies the machine-readable translation of the content of the element."
                    },
                    "browsers": [
                        "C62",
                        "CA62",
                        "E14",
                        "FF22",
                        "FFA22",
                        "S10",
                        "SM10"
                    ],
                    "status": {
                        "baseline": "high",
                        "baseline_low_date": "2017-10-24",
                        "baseline_high_date": "2020-04-24"
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/data"
                }
            ],
            "browsers": [
                "C62",
                "CA62",
                "E14",
                "FF22",
                "FFA22",
                "S10",
                "SM10"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2017-10-24",
                "baseline_high_date": "2020-04-24"
            }
        },
        {
            "name": "hgroup",
            "description": {
                "kind": "markdown",
                "value": "The hgroup element represents a heading and related content. It groups a single h1–h6 element with one or more p."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/hgroup"
                }
            ],
            "browsers": [
                "C5",
                "CA18",
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "menu",
            "description": {
                "kind": "markdown",
                "value": "The menu element represents an unordered list of interactive items."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/menu"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S3",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "search",
            "description": {
                "kind": "markdown",
                "value": "The search element represents the parts of the document or application with form controls or other content related to performing a search or filtering operation."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/search"
                }
            ],
            "browsers": [
                "C118",
                "CA118",
                "E118",
                "FF118",
                "FFA118",
                "S17",
                "SM17"
            ],
            "status": {
                "baseline": "low",
                "baseline_low_date": "2023-10-13"
            }
        },
        {
            "name": "fencedframe",
            "description": {
                "kind": "markdown",
                "value": "The fencedframe element represents a nested browsing context, embedding another HTML page into the current one."
            },
            "attributes": [
                {
                    "name": "allow",
                    "browsers": [
                        "C115",
                        "CA115",
                        "E115"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "height",
                    "browsers": [
                        "C115",
                        "CA115",
                        "E115"
                    ],
                    "status": {
                        "baseline": false
                    }
                },
                {
                    "name": "width",
                    "browsers": [
                        "C115",
                        "CA115",
                        "E115"
                    ],
                    "status": {
                        "baseline": false
                    }
                }
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/fencedframe"
                }
            ],
            "browsers": [
                "C115",
                "CA115",
                "E115"
            ],
            "status": {
                "baseline": false
            }
        },
        {
            "name": "selectedcontent",
            "description": {
                "kind": "markdown",
                "value": "The selectedcontent element can be used to display the content of the currently selected option element inside of a closed select element."
            },
            "attributes": [],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/selectedcontent"
                }
            ],
            "browsers": [
                "C134",
                "CA134",
                "E134"
            ],
            "status": {
                "baseline": false
            }
        }
    ],
    "globalAttributes": [
        {
            "name": "accesskey",
            "description": {
                "kind": "markdown",
                "value": "Provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a space-separated list of characters. The browser should use the first one that exists on the computer keyboard layout."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/accesskey"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "autocapitalize",
            "description": {
                "kind": "markdown",
                "value": "Controls whether and how text input is automatically capitalized as it is entered/edited by the user. It can have the following values:\n\n*   `off` or `none`, no autocapitalization is applied (all letters default to lowercase)\n*   `on` or `sentences`, the first letter of each sentence defaults to a capital letter; all other letters default to lowercase\n*   `words`, the first letter of each word defaults to a capital letter; all other letters default to lowercase\n*   `characters`, all letters should default to uppercase"
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/autocapitalize"
                }
            ],
            "browsers": [
                "C43",
                "CA43",
                "E79",
                "FF111",
                "FFA111",
                "SM5"
            ],
            "status": {
                "baseline": false
            }
        },
        {
            "name": "autocorrect",
            "description": {
                "kind": "markdown",
                "value": "Controls whether autocorrection of editable text is enabled for spelling and/or punctuation errors."
            },
            "valueSet": "o",
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/autocorrect"
                }
            ],
            "browsers": [
                "FF136",
                "FFA136"
            ],
            "status": {
                "baseline": false
            }
        },
        {
            "name": "autofocus",
            "description": {
                "kind": "markdown",
                "value": "Indicates that an element should be focused on page load, or when the [`<dialog>`](https://developer.mozilla.org/docs/Web/HTML/Element/dialog) that it is part of is displayed."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/autofocus"
                }
            ],
            "browsers": [
                "C79",
                "CA79",
                "E79",
                "FF110",
                "FFA110",
                "S15.4",
                "SM16.4"
            ],
            "status": {
                "baseline": "low",
                "baseline_low_date": "2023-03-27"
            }
        },
        {
            "name": "class",
            "description": {
                "kind": "markdown",
                "value": "A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the [class selectors](https://developer.mozilla.org/docs/Web/CSS/Class_selectors) or functions like the method [`Document.getElementsByClassName()`](https://developer.mozilla.org/docs/Web/API/Document/getElementsByClassName \"returns an array-like object of all child elements which have all of the given class names.\")."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/class"
                }
            ]
        },
        {
            "name": "contenteditable",
            "description": {
                "kind": "markdown",
                "value": "An enumerated attribute indicating if the element should be editable by the user. If so, the browser modifies its widget to allow editing. The attribute must take one of the following values:\n\n*   `true` or the _empty string_, which indicates that the element must be editable;\n*   `false`, which indicates that the element must not be editable."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/contenteditable"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF3",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "contextmenu",
            "description": {
                "kind": "markdown",
                "value": "The `[**id**](#attr-id)` of a [`<menu>`](https://developer.mozilla.org/docs/Web/HTML/Element/menu \"The HTML <menu> element represents a group of commands that a user can perform or activate. This includes both list menus, which might appear across the top of a screen, as well as context menus, such as those that might appear underneath a button after it has been clicked.\") to use as the contextual menu for this element."
            }
        },
        {
            "name": "dir",
            "description": {
                "kind": "markdown",
                "value": "An enumerated attribute indicating the directionality of the element's text. It can have the following values:\n\n*   `ltr`, which means _left to right_ and is to be used for languages that are written from the left to the right (like English);\n*   `rtl`, which means _right to left_ and is to be used for languages that are written from the right to the left (like Arabic);\n*   `auto`, which lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then it applies that directionality to the whole element."
            },
            "valueSet": "d",
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/dir"
                }
            ]
        },
        {
            "name": "draggable",
            "description": {
                "kind": "markdown",
                "value": "An enumerated attribute indicating whether the element can be dragged, using the [Drag and Drop API](https://developer.mozilla.org/docs/DragDrop/Drag_and_Drop). It can have the following values:\n\n*   `true`, which indicates that the element may be dragged\n*   `false`, which indicates that the element may not be dragged."
            },
            "valueSet": "b",
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/draggable"
                }
            ]
        },
        {
            "name": "dropzone",
            "description": {
                "kind": "markdown",
                "value": "An enumerated attribute indicating what types of content can be dropped on an element, using the [Drag and Drop API](https://developer.mozilla.org/docs/DragDrop/Drag_and_Drop). It can have the following values:\n\n*   `copy`, which indicates that dropping will create a copy of the element that was dragged\n*   `move`, which indicates that the element that was dragged will be moved to this new location.\n*   `link`, will create a link to the dragged data."
            }
        },
        {
            "name": "enterkeyhint",
            "description": {
                "kind": "markdown",
                "value": "An enumerated attribute defining what action label (or icon) to present for the enter key on virtual keyboards."
            },
            "valueSet": "enterkeyhint",
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/enterkeyhint"
                }
            ],
            "browsers": [
                "C77",
                "CA77",
                "E79",
                "FF94",
                "FFA94",
                "S13.1",
                "SM13.4"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2021-11-02",
                "baseline_high_date": "2024-05-02"
            }
        },
        {
            "name": "exportparts",
            "description": {
                "kind": "markdown",
                "value": "Used to transitively export shadow parts from a nested shadow tree into a containing light tree."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/exportparts"
                }
            ],
            "browsers": [
                "C73",
                "CA73",
                "E79",
                "FF72",
                "FFA79",
                "S13.1",
                "SM13.4"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            }
        },
        {
            "name": "hidden",
            "description": {
                "kind": "markdown",
                "value": "A Boolean attribute indicates that the element is not yet, or is no longer, _relevant_. For example, it can be used to hide elements of the page that can't be used until the login process has been completed. The browser won't render such elements. This attribute must not be used to hide content that could legitimately be shown."
            },
            "valueSet": "v",
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/hidden"
                }
            ]
        },
        {
            "name": "id",
            "description": {
                "kind": "markdown",
                "value": "Defines a unique identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS)."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/id"
                }
            ]
        },
        {
            "name": "inert",
            "description": {
                "kind": "markdown",
                "value": "Indicates that the element and all of its flat tree descendants become _inert_. Modal `<dialog>`s generated with [`showModal()`](https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/showModal) escape inertness, meaning that they don't inherit inertness from their ancestors, but can only be made inert by having the `inert` attribute explicitly set on themselves."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/inert"
                }
            ],
            "browsers": [
                "C102",
                "CA102",
                "E102",
                "FF112",
                "FFA112",
                "S15.5",
                "SM15.5"
            ],
            "status": {
                "baseline": "low",
                "baseline_low_date": "2023-04-11"
            }
        },
        {
            "name": "inputmode",
            "description": {
                "kind": "markdown",
                "value": "Provides a hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents. Used primarily on [`<input>`](https://developer.mozilla.org/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") elements, but is usable on any element while in `[contenteditable](https://developer.mozilla.org/docs/Web/HTML/Global_attributes#attr-contenteditable)` mode."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/inputmode"
                }
            ],
            "browsers": [
                "C66",
                "CA66",
                "E79",
                "FF95",
                "FFA79",
                "S12.1",
                "SM12.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2021-12-07",
                "baseline_high_date": "2024-06-07"
            }
        },
        {
            "name": "is",
            "description": {
                "kind": "markdown",
                "value": "Allows you to specify that a standard HTML element should behave like a registered custom built-in element (see [Using custom elements](https://developer.mozilla.org/docs/Web/Web_Components/Using_custom_elements) for more details)."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/is"
                }
            ],
            "browsers": [
                "C67",
                "CA67",
                "E79",
                "FF63",
                "FFA63"
            ],
            "status": {
                "baseline": false
            }
        },
        {
            "name": "itemid",
            "description": {
                "kind": "markdown",
                "value": "The unique, global identifier of an item."
            }
        },
        {
            "name": "itemprop",
            "description": {
                "kind": "markdown",
                "value": "Used to add properties to an item. Every HTML element may have an `itemprop` attribute specified, where an `itemprop` consists of a name and value pair."
            }
        },
        {
            "name": "itemref",
            "description": {
                "kind": "markdown",
                "value": "Properties that are not descendants of an element with the `itemscope` attribute can be associated with the item using an `itemref`. It provides a list of element ids (not `itemid`s) with additional properties elsewhere in the document."
            }
        },
        {
            "name": "itemscope",
            "description": {
                "kind": "markdown",
                "value": "`itemscope` (usually) works along with `[itemtype](https://developer.mozilla.org/docs/Web/HTML/Global_attributes#attr-itemtype)` to specify that the HTML contained in a block is about a particular item. `itemscope` creates the Item and defines the scope of the `itemtype` associated with it. `itemtype` is a valid URL of a vocabulary (such as [schema.org](https://schema.org/)) that describes the item and its properties context."
            },
            "valueSet": "v"
        },
        {
            "name": "itemtype",
            "description": {
                "kind": "markdown",
                "value": "Specifies the URL of the vocabulary that will be used to define `itemprop`s (item properties) in the data structure. `[itemscope](https://developer.mozilla.org/docs/Web/HTML/Global_attributes#attr-itemscope)` is used to set the scope of where in the data structure the vocabulary set by `itemtype` will be active."
            }
        },
        {
            "name": "lang",
            "description": {
                "kind": "markdown",
                "value": "Helps define the language of an element: the language that non-editable elements are in, or the language that editable elements should be written in by the user. The attribute contains one “language tag” (made of hyphen-separated “language subtags”) in the format defined in [_Tags for Identifying Languages (BCP47)_](https://www.ietf.org/rfc/bcp/bcp47.txt). [**xml:lang**](#attr-xml:lang) has priority over it."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/lang"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "nonce",
            "description": {
                "kind": "markdown",
                "value": "Defines a cryptographic nonce (\"number used once\") which can be used by [Content Security Policy](https://developer.mozilla.org/docs/Web/HTTP/Guides/CSP) to determine whether or not a given fetch will be allowed to proceed for a given element."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/nonce"
                }
            ],
            "browsers": [
                "C61",
                "CA61",
                "E79",
                "FF31",
                "FFA31",
                "S15.4",
                "SM15.4"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            }
        },
        {
            "name": "part",
            "description": {
                "kind": "markdown",
                "value": "A space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the [`::part`](https://developer.mozilla.org/docs/Web/CSS/::part \"The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute.\") pseudo-element."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/part"
                }
            ],
            "browsers": [
                "C73",
                "CA73",
                "E79",
                "FF72",
                "FFA79",
                "S13.1",
                "SM13.4"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            }
        },
        {
            "name": "popover",
            "description": {
                "kind": "markdown",
                "value": "Designates an element as a popover element."
            },
            "valueSet": "popover",
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/popover"
                }
            ],
            "browsers": [
                "C114",
                "CA114",
                "E114",
                "FF125",
                "FFA125",
                "S17",
                "SM17"
            ],
            "status": {
                "baseline": "low",
                "baseline_low_date": "2024-04-16"
            }
        },
        {
            "name": "role",
            "valueSet": "roles"
        },
        {
            "name": "slot",
            "description": {
                "kind": "markdown",
                "value": "Assigns a slot in a [shadow DOM](https://developer.mozilla.org/docs/Web/Web_Components/Shadow_DOM) shadow tree to an element: An element with a `slot` attribute is assigned to the slot created by the [`<slot>`](https://developer.mozilla.org/docs/Web/HTML/Element/slot \"The HTML <slot> element—part of the Web Components technology suite—is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together.\") element whose `[name](https://developer.mozilla.org/docs/Web/HTML/Element/slot#attr-name)` attribute's value matches that `slot` attribute's value."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/slot"
                }
            ],
            "browsers": [
                "C53",
                "CA53",
                "E79",
                "FF63",
                "FFA63",
                "S10",
                "SM10"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "≤2020-01-15",
                "baseline_high_date": "≤2022-07-15"
            }
        },
        {
            "name": "spellcheck",
            "description": {
                "kind": "markdown",
                "value": "An enumerated attribute defines whether the element may be checked for spelling errors. It may have the following values:\n\n*   `true`, which indicates that the element should be, if possible, checked for spelling errors;\n*   `false`, which indicates that the element should not be checked for spelling errors."
            },
            "valueSet": "b",
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/spellcheck"
                }
            ],
            "browsers": [
                "C9",
                "CA47",
                "E12",
                "FF2",
                "FFA57",
                "S5.1",
                "SM9.3"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2017-11-28",
                "baseline_high_date": "2020-05-28"
            }
        },
        {
            "name": "style",
            "description": {
                "kind": "markdown",
                "value": "Contains [CSS](https://developer.mozilla.org/docs/Web/CSS) styling declarations to be applied to the element. Note that it is recommended for styles to be defined in a separate file or files. This attribute and the [`<style>`](https://developer.mozilla.org/docs/Web/HTML/Element/style \"The HTML <style> element contains style information for a document, or part of a document.\") element have mainly the purpose of allowing for quick styling, for example for testing purposes."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/style"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "tabindex",
            "description": {
                "kind": "markdown",
                "value": "An integer attribute indicating if the element can take input focus (is _focusable_), if it should participate to sequential keyboard navigation, and if so, at what position. It can take several values:\n\n*   a _negative value_ means that the element should be focusable, but should not be reachable via sequential keyboard navigation;\n*   `0` means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention;\n*   a _positive value_ means that the element should be focusable and reachable via sequential keyboard navigation; the order in which the elements are focused is the increasing value of the [**tabindex**](#attr-tabindex). If several elements share the same tabindex, their relative order follows their relative positions in the document."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/tabindex"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1.5",
                "FFA4",
                "S3.1",
                "SM2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "title",
            "description": {
                "kind": "markdown",
                "value": "Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip."
            },
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/title"
                }
            ],
            "browsers": [
                "C1",
                "CA18",
                "E12",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2"
            ],
            "status": {
                "baseline": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            }
        },
        {
            "name": "translate",
            "description": {
                "kind": "markdown",
                "value": "An enumerated attribute that is used to specify whether an element's attribute values and the values of its [`Text`](https://developer.mozilla.org/docs/Web/API/Text \"The Text interface represents the textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.\") node children are to be translated when the page is localized, or whether to leave them unchanged. It can have the following values:\n\n*   empty string and `yes`, which indicates that the element will be translated.\n*   `no`, which indicates that the element will not be translated."
            },
            "valueSet": "y",
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/translate"
                }
            ],
            "browsers": [
                "C19",
                "CA25",
                "E79",
                "FF111",
                "FFA111",
                "S6",
                "SM6"
            ],
            "status": {
                "baseline": "low",
                "baseline_low_date": "2023-03-14"
            }
        },
        {
            "name": "virtualkeyboardpolicy",
            "description": {
                "kind": "markdown",
                "value": "When specified on an element that the element's content is editable (for example, it is an `<input>` or `<textarea>` element, or an element with the `contenteditable` attribute set), it controls the on-screen virtual keyboard behavior on devices such as tablets, mobile phones, or other devices where a hardware keyboard may not be available."
            },
            "valueSet": "b",
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/virtualkeyboardpolicy"
                }
            ],
            "browsers": [
                "C94",
                "CA94",
                "E94"
            ],
            "status": {
                "baseline": false
            }
        },
        {
            "name": "onabort",
            "description": {
                "kind": "markdown",
                "value": "The loading of a resource has been aborted."
            }
        },
        {
            "name": "onblur",
            "description": {
                "kind": "markdown",
                "value": "An element has lost focus (does not bubble)."
            }
        },
        {
            "name": "oncanplay",
            "description": {
                "kind": "markdown",
                "value": "The user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content."
            }
        },
        {
            "name": "oncanplaythrough",
            "description": {
                "kind": "markdown",
                "value": "The user agent can play the media up to its end without having to stop for further buffering of content."
            }
        },
        {
            "name": "onchange",
            "description": {
                "kind": "markdown",
                "value": "The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user."
            }
        },
        {
            "name": "onclick",
            "description": {
                "kind": "markdown",
                "value": "A pointing device button has been pressed and released on an element."
            }
        },
        {
            "name": "oncontextmenu",
            "description": {
                "kind": "markdown",
                "value": "The right button of the mouse is clicked (before the context menu is displayed)."
            }
        },
        {
            "name": "ondblclick",
            "description": {
                "kind": "markdown",
                "value": "A pointing device button is clicked twice on an element."
            }
        },
        {
            "name": "ondrag",
            "description": {
                "kind": "markdown",
                "value": "An element or text selection is being dragged (every 350ms)."
            }
        },
        {
            "name": "ondragend",
            "description": {
                "kind": "markdown",
                "value": "A drag operation is being ended (by releasing a mouse button or hitting the escape key)."
            }
        },
        {
            "name": "ondragenter",
            "description": {
                "kind": "markdown",
                "value": "A dragged element or text selection enters a valid drop target."
            }
        },
        {
            "name": "ondragleave",
            "description": {
                "kind": "markdown",
                "value": "A dragged element or text selection leaves a valid drop target."
            }
        },
        {
            "name": "ondragover",
            "description": {
                "kind": "markdown",
                "value": "An element or text selection is being dragged over a valid drop target (every 350ms)."
            }
        },
        {
            "name": "ondragstart",
            "description": {
                "kind": "markdown",
                "value": "The user starts dragging an element or text selection."
            }
        },
        {
            "name": "ondrop",
            "description": {
                "kind": "markdown",
                "value": "An element is dropped on a valid drop target."
            }
        },
        {
            "name": "ondurationchange",
            "description": {
                "kind": "markdown",
                "value": "The duration attribute has been updated."
            }
        },
        {
            "name": "onemptied",
            "description": {
                "kind": "markdown",
                "value": "The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it."
            }
        },
        {
            "name": "onended",
            "description": {
                "kind": "markdown",
                "value": "Playback has stopped because the end of the media was reached."
            }
        },
        {
            "name": "onerror",
            "description": {
                "kind": "markdown",
                "value": "A resource failed to load."
            }
        },
        {
            "name": "onfocus",
            "description": {
                "kind": "markdown",
                "value": "An element has received focus (does not bubble)."
            }
        },
        {
            "name": "onformchange"
        },
        {
            "name": "onforminput"
        },
        {
            "name": "oninput",
            "description": {
                "kind": "markdown",
                "value": "The value of an element changes or the content of an element with the attribute contenteditable is modified."
            }
        },
        {
            "name": "oninvalid",
            "description": {
                "kind": "markdown",
                "value": "A submittable element has been checked and doesn't satisfy its constraints."
            }
        },
        {
            "name": "onkeydown",
            "description": {
                "kind": "markdown",
                "value": "A key is pressed down."
            }
        },
        {
            "name": "onkeypress",
            "description": {
                "kind": "markdown",
                "value": "A key is pressed down and that key normally produces a character value (use input instead)."
            }
        },
        {
            "name": "onkeyup",
            "description": {
                "kind": "markdown",
                "value": "A key is released."
            }
        },
        {
            "name": "onload",
            "description": {
                "kind": "markdown",
                "value": "A resource and its dependent resources have finished loading."
            }
        },
        {
            "name": "onloadeddata",
            "description": {
                "kind": "markdown",
                "value": "The first frame of the media has finished loading."
            }
        },
        {
            "name": "onloadedmetadata",
            "description": {
                "kind": "markdown",
                "value": "The metadata has been loaded."
            }
        },
        {
            "name": "onloadstart",
            "description": {
                "kind": "markdown",
                "value": "Progress has begun."
            }
        },
        {
            "name": "onmousedown",
            "description": {
                "kind": "markdown",
                "value": "A pointing device button (usually a mouse) is pressed on an element."
            }
        },
        {
            "name": "onmousemove",
            "description": {
                "kind": "markdown",
                "value": "A pointing device is moved over an element."
            }
        },
        {
            "name": "onmouseout",
            "description": {
                "kind": "markdown",
                "value": "A pointing device is moved off the element that has the listener attached or off one of its children."
            }
        },
        {
            "name": "onmouseover",
            "description": {
                "kind": "markdown",
                "value": "A pointing device is moved onto the element that has the listener attached or onto one of its children."
            }
        },
        {
            "name": "onmouseup",
            "description": {
                "kind": "markdown",
                "value": "A pointing device button is released over an element."
            }
        },
        {
            "name": "onmousewheel"
        },
        {
            "name": "onmouseenter",
            "description": {
                "kind": "markdown",
                "value": "A pointing device is moved onto the element that has the listener attached."
            }
        },
        {
            "name": "onmouseleave",
            "description": {
                "kind": "markdown",
                "value": "A pointing device is moved off the element that has the listener attached."
            }
        },
        {
            "name": "onpause",
            "description": {
                "kind": "markdown",
                "value": "Playback has been paused."
            }
        },
        {
            "name": "onplay",
            "description": {
                "kind": "markdown",
                "value": "Playback has begun."
            }
        },
        {
            "name": "onplaying",
            "description": {
                "kind": "markdown",
                "value": "Playback is ready to start after having been paused or delayed due to lack of data."
            }
        },
        {
            "name": "onprogress",
            "description": {
                "kind": "markdown",
                "value": "In progress."
            }
        },
        {
            "name": "onratechange",
            "description": {
                "kind": "markdown",
                "value": "The playback rate has changed."
            }
        },
        {
            "name": "onreset",
            "description": {
                "kind": "markdown",
                "value": "A form is reset."
            }
        },
        {
            "name": "onresize",
            "description": {
                "kind": "markdown",
                "value": "The document view has been resized."
            }
        },
        {
            "name": "onreadystatechange",
            "description": {
                "kind": "markdown",
                "value": "The readyState attribute of a document has changed."
            }
        },
        {
            "name": "onscroll",
            "description": {
                "kind": "markdown",
                "value": "The document view or an element has been scrolled."
            }
        },
        {
            "name": "onseeked",
            "description": {
                "kind": "markdown",
                "value": "A seek operation completed."
            }
        },
        {
            "name": "onseeking",
            "description": {
                "kind": "markdown",
                "value": "A seek operation began."
            }
        },
        {
            "name": "onselect",
            "description": {
                "kind": "markdown",
                "value": "Some text is being selected."
            }
        },
        {
            "name": "onshow",
            "description": {
                "kind": "markdown",
                "value": "A contextmenu event was fired on/bubbled to an element that has a contextmenu attribute"
            }
        },
        {
            "name": "onstalled",
            "description": {
                "kind": "markdown",
                "value": "The user agent is trying to fetch media data, but data is unexpectedly not forthcoming."
            }
        },
        {
            "name": "onsubmit",
            "description": {
                "kind": "markdown",
                "value": "A form is submitted."
            }
        },
        {
            "name": "onsuspend",
            "description": {
                "kind": "markdown",
                "value": "Media data loading has been suspended."
            }
        },
        {
            "name": "ontimeupdate",
            "description": {
                "kind": "markdown",
                "value": "The time indicated by the currentTime attribute has been updated."
            }
        },
        {
            "name": "onvolumechange",
            "description": {
                "kind": "markdown",
                "value": "The volume has changed."
            }
        },
        {
            "name": "onwaiting",
            "description": {
                "kind": "markdown",
                "value": "Playback has stopped because of a temporary lack of data."
            }
        },
        {
            "name": "onpointercancel",
            "description": {
                "kind": "markdown",
                "value": "The pointer is unlikely to produce any more events."
            }
        },
        {
            "name": "onpointerdown",
            "description": {
                "kind": "markdown",
                "value": "The pointer enters the active buttons state."
            }
        },
        {
            "name": "onpointerenter",
            "description": {
                "kind": "markdown",
                "value": "Pointing device is moved inside the hit-testing boundary."
            }
        },
        {
            "name": "onpointerleave",
            "description": {
                "kind": "markdown",
                "value": "Pointing device is moved out of the hit-testing boundary."
            }
        },
        {
            "name": "onpointerlockchange",
            "description": {
                "kind": "markdown",
                "value": "The pointer was locked or released."
            }
        },
        {
            "name": "onpointerlockerror",
            "description": {
                "kind": "markdown",
                "value": "It was impossible to lock the pointer for technical reasons or because the permission was denied."
            }
        },
        {
            "name": "onpointermove",
            "description": {
                "kind": "markdown",
                "value": "The pointer changed coordinates."
            }
        },
        {
            "name": "onpointerout",
            "description": {
                "kind": "markdown",
                "value": "The pointing device moved out of hit-testing boundary or leaves detectable hover range."
            }
        },
        {
            "name": "onpointerover",
            "description": {
                "kind": "markdown",
                "value": "The pointing device is moved into the hit-testing boundary."
            }
        },
        {
            "name": "onpointerup",
            "description": {
                "kind": "markdown",
                "value": "The pointer leaves the active buttons state."
            }
        },
        {
            "name": "aria-activedescendant",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-activedescendant"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Identifies the currently active element when DOM focus is on a [`composite`](https://www.w3.org/TR/wai-aria-1.1/#composite) widget, [`textbox`](https://www.w3.org/TR/wai-aria-1.1/#textbox), [`group`](https://www.w3.org/TR/wai-aria-1.1/#group), or [`application`](https://www.w3.org/TR/wai-aria-1.1/#application)."
            }
        },
        {
            "name": "aria-atomic",
            "valueSet": "b",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-atomic"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates whether [assistive technologies](https://www.w3.org/TR/wai-aria-1.1/#dfn-assistive-technology) will present all, or only parts of, the changed region based on the change notifications defined by the [`aria-relevant`](https://www.w3.org/TR/wai-aria-1.1/#aria-relevant) attribute."
            }
        },
        {
            "name": "aria-autocomplete",
            "valueSet": "autocomplete",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-autocomplete"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made."
            }
        },
        {
            "name": "aria-busy",
            "valueSet": "b",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-busy"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates an element is being modified and that assistive technologies _MAY_ want to wait until the modifications are complete before exposing them to the user."
            }
        },
        {
            "name": "aria-checked",
            "valueSet": "tristate",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-checked"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates the current \"checked\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of checkboxes, radio buttons, and other [widgets](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.1/#aria-pressed) and [`aria-selected`](https://www.w3.org/TR/wai-aria-1.1/#aria-selected)."
            }
        },
        {
            "name": "aria-colcount",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-colcount"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines the total number of columns in a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-colindex)."
            }
        },
        {
            "name": "aria-colindex",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-colindex"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines an [element's](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) column index or position with respect to the total number of columns within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colcount`](https://www.w3.org/TR/wai-aria-1.1/#aria-colcount) and [`aria-colspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-colspan)."
            }
        },
        {
            "name": "aria-colspan",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-colspan"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines the number of columns spanned by a cell or gridcell within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-colindex) and [`aria-rowspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan)."
            }
        },
        {
            "name": "aria-controls",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-controls"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) whose contents or presence are controlled by the current element. See related [`aria-owns`](https://www.w3.org/TR/wai-aria-1.1/#aria-owns)."
            }
        },
        {
            "name": "aria-current",
            "valueSet": "current",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-current"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that represents the current item within a container or set of related elements."
            }
        },
        {
            "name": "aria-describedby",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-describedby"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) that describes the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-labelledby`](https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby)."
            }
        },
        {
            "name": "aria-disabled",
            "valueSet": "b",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-disabled"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates that the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is [perceivable](https://www.w3.org/TR/wai-aria-1.1/#dfn-perceivable) but disabled, so it is not editable or otherwise [operable](https://www.w3.org/TR/wai-aria-1.1/#dfn-operable). See related [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.1/#aria-hidden) and [`aria-readonly`](https://www.w3.org/TR/wai-aria-1.1/#aria-readonly)."
            }
        },
        {
            "name": "aria-dropeffect",
            "valueSet": "dropeffect",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-dropeffect"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "\\[Deprecated in ARIA 1.1\\] Indicates what functions can be performed when a dragged object is released on the drop target."
            }
        },
        {
            "name": "aria-errormessage",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that provides an error message for the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-invalid`](https://www.w3.org/TR/wai-aria-1.1/#aria-invalid) and [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."
            }
        },
        {
            "name": "aria-expanded",
            "valueSet": "u",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-expanded"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed."
            }
        },
        {
            "name": "aria-flowto",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-flowto"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Identifies the next [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order."
            }
        },
        {
            "name": "aria-grabbed",
            "valueSet": "u",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-grabbed"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "\\[Deprecated in ARIA 1.1\\] Indicates an element's \"grabbed\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) in a drag-and-drop operation."
            }
        },
        {
            "name": "aria-haspopup",
            "valueSet": "haspopup",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)."
            }
        },
        {
            "name": "aria-hidden",
            "valueSet": "b",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-hidden"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates whether the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is exposed to an accessibility API. See related [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.1/#aria-disabled)."
            }
        },
        {
            "name": "aria-invalid",
            "valueSet": "invalid",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-invalid"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates the entered value does not conform to the format expected by the application. See related [`aria-errormessage`](https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage)."
            }
        },
        {
            "name": "aria-label",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-label"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines a string value that labels the current element. See related [`aria-labelledby`](https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby)."
            }
        },
        {
            "name": "aria-labelledby",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) that labels the current element. See related [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."
            }
        },
        {
            "name": "aria-level",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-level"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines the hierarchical level of an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) within a structure."
            }
        },
        {
            "name": "aria-live",
            "valueSet": "live",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-live"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates that an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) will be updated, and describes the types of updates the [user agents](https://www.w3.org/TR/wai-aria-1.1/#dfn-user-agent), [assistive technologies](https://www.w3.org/TR/wai-aria-1.1/#dfn-assistive-technology), and user can expect from the [live region](https://www.w3.org/TR/wai-aria-1.1/#dfn-live-region)."
            }
        },
        {
            "name": "aria-modal",
            "valueSet": "b",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-modal"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates whether an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is modal when displayed."
            }
        },
        {
            "name": "aria-multiline",
            "valueSet": "b",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-multiline"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates whether a text box accepts multiple lines of input or only a single line."
            }
        },
        {
            "name": "aria-multiselectable",
            "valueSet": "b",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-multiselectable"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates that the user may select more than one item from the current selectable descendants."
            }
        },
        {
            "name": "aria-orientation",
            "valueSet": "orientation",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-orientation"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous."
            }
        },
        {
            "name": "aria-owns",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-owns"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Identifies an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) in order to define a visual, functional, or contextual parent/child [relationship](https://www.w3.org/TR/wai-aria-1.1/#dfn-relationship) between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See related [`aria-controls`](https://www.w3.org/TR/wai-aria-1.1/#aria-controls)."
            }
        },
        {
            "name": "aria-placeholder",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-placeholder"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format."
            }
        },
        {
            "name": "aria-posinset",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-posinset"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)'s number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related [`aria-setsize`](https://www.w3.org/TR/wai-aria-1.1/#aria-setsize)."
            }
        },
        {
            "name": "aria-pressed",
            "valueSet": "tristate",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-pressed"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates the current \"pressed\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of toggle buttons. See related [`aria-checked`](https://www.w3.org/TR/wai-aria-1.1/#aria-checked) and [`aria-selected`](https://www.w3.org/TR/wai-aria-1.1/#aria-selected)."
            }
        },
        {
            "name": "aria-readonly",
            "valueSet": "b",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-readonly"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates that the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is not editable, but is otherwise [operable](https://www.w3.org/TR/wai-aria-1.1/#dfn-operable). See related [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.1/#aria-disabled)."
            }
        },
        {
            "name": "aria-relevant",
            "valueSet": "relevant",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-relevant"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See related [`aria-atomic`](https://www.w3.org/TR/wai-aria-1.1/#aria-atomic)."
            }
        },
        {
            "name": "aria-required",
            "valueSet": "b",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-required"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates that user input is required on the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) before a form may be submitted."
            }
        },
        {
            "name": "aria-roledescription",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-roledescription"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines a human-readable, author-localized description for the [role](https://www.w3.org/TR/wai-aria-1.1/#dfn-role) of an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)."
            }
        },
        {
            "name": "aria-rowcount",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-rowcount"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines the total number of rows in a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex)."
            }
        },
        {
            "name": "aria-rowindex",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines an [element's](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) row index or position with respect to the total number of rows within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowcount`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowcount) and [`aria-rowspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan)."
            }
        },
        {
            "name": "aria-rowspan",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines the number of rows spanned by a cell or gridcell within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex) and [`aria-colspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-colspan)."
            }
        },
        {
            "name": "aria-selected",
            "valueSet": "u",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-selected"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates the current \"selected\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of various [widgets](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-checked`](https://www.w3.org/TR/wai-aria-1.1/#aria-checked) and [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.1/#aria-pressed)."
            }
        },
        {
            "name": "aria-setsize",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-setsize"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related [`aria-posinset`](https://www.w3.org/TR/wai-aria-1.1/#aria-posinset)."
            }
        },
        {
            "name": "aria-sort",
            "valueSet": "sort",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-sort"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Indicates if items in a table or grid are sorted in ascending or descending order."
            }
        },
        {
            "name": "aria-valuemax",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuemax"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines the maximum allowed value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."
            }
        },
        {
            "name": "aria-valuemin",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuemin"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines the minimum allowed value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."
            }
        },
        {
            "name": "aria-valuenow",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuenow"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines the current value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-valuetext`](https://www.w3.org/TR/wai-aria-1.1/#aria-valuetext)."
            }
        },
        {
            "name": "aria-valuetext",
            "references": [
                {
                    "name": "WAI-ARIA Reference",
                    "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuetext"
                }
            ],
            "description": {
                "kind": "markdown",
                "value": "Defines the human readable text alternative of [`aria-valuenow`](https://www.w3.org/TR/wai-aria-1.1/#aria-valuenow) for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."
            }
        },
        {
            "name": "aria-details",
            "description": {
                "kind": "markdown",
                "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that provides a detailed, extended description for the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."
            }
        },
        {
            "name": "aria-keyshortcuts",
            "description": {
                "kind": "markdown",
                "value": "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element."
            }
        }
    ],
    "valueSets": [
        {
            "name": "b",
            "values": [
                {
                    "name": "true"
                },
                {
                    "name": "false"
                }
            ]
        },
        {
            "name": "u",
            "values": [
                {
                    "name": "true"
                },
                {
                    "name": "false"
                },
                {
                    "name": "undefined"
                }
            ]
        },
        {
            "name": "o",
            "values": [
                {
                    "name": "on"
                },
                {
                    "name": "off"
                }
            ]
        },
        {
            "name": "y",
            "values": [
                {
                    "name": "yes"
                },
                {
                    "name": "no"
                }
            ]
        },
        {
            "name": "w",
            "values": [
                {
                    "name": "soft"
                },
                {
                    "name": "hard"
                }
            ]
        },
        {
            "name": "d",
            "values": [
                {
                    "name": "ltr"
                },
                {
                    "name": "rtl"
                },
                {
                    "name": "auto"
                }
            ]
        },
        {
            "name": "m",
            "values": [
                {
                    "name": "get",
                    "description": {
                        "kind": "markdown",
                        "value": "Corresponds to the HTTP [GET method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3); form data are appended to the `action` attribute URI with a '?' as separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters."
                    }
                },
                {
                    "name": "post",
                    "description": {
                        "kind": "markdown",
                        "value": "Corresponds to the HTTP [POST method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5); form data are included in the body of the form and sent to the server."
                    }
                },
                {
                    "name": "dialog",
                    "description": {
                        "kind": "markdown",
                        "value": "Use when the form is inside a [`<dialog>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog) element to close the dialog when submitted."
                    }
                }
            ]
        },
        {
            "name": "fm",
            "values": [
                {
                    "name": "get"
                },
                {
                    "name": "post"
                }
            ]
        },
        {
            "name": "s",
            "values": [
                {
                    "name": "row"
                },
                {
                    "name": "col"
                },
                {
                    "name": "rowgroup"
                },
                {
                    "name": "colgroup"
                }
            ]
        },
        {
            "name": "t",
            "values": [
                {
                    "name": "hidden"
                },
                {
                    "name": "text"
                },
                {
                    "name": "search"
                },
                {
                    "name": "tel"
                },
                {
                    "name": "url"
                },
                {
                    "name": "email"
                },
                {
                    "name": "password"
                },
                {
                    "name": "datetime"
                },
                {
                    "name": "date"
                },
                {
                    "name": "month"
                },
                {
                    "name": "week"
                },
                {
                    "name": "time"
                },
                {
                    "name": "datetime-local"
                },
                {
                    "name": "number"
                },
                {
                    "name": "range"
                },
                {
                    "name": "color"
                },
                {
                    "name": "checkbox"
                },
                {
                    "name": "radio"
                },
                {
                    "name": "file"
                },
                {
                    "name": "submit"
                },
                {
                    "name": "image"
                },
                {
                    "name": "reset"
                },
                {
                    "name": "button"
                }
            ]
        },
        {
            "name": "im",
            "values": [
                {
                    "name": "verbatim"
                },
                {
                    "name": "latin"
                },
                {
                    "name": "latin-name"
                },
                {
                    "name": "latin-prose"
                },
                {
                    "name": "full-width-latin"
                },
                {
                    "name": "kana"
                },
                {
                    "name": "kana-name"
                },
                {
                    "name": "katakana"
                },
                {
                    "name": "numeric"
                },
                {
                    "name": "tel"
                },
                {
                    "name": "email"
                },
                {
                    "name": "url"
                }
            ]
        },
        {
            "name": "bt",
            "values": [
                {
                    "name": "button"
                },
                {
                    "name": "submit"
                },
                {
                    "name": "reset"
                },
                {
                    "name": "menu"
                }
            ]
        },
        {
            "name": "lt",
            "values": [
                {
                    "name": "1"
                },
                {
                    "name": "a"
                },
                {
                    "name": "A"
                },
                {
                    "name": "i"
                },
                {
                    "name": "I"
                }
            ]
        },
        {
            "name": "mt",
            "values": [
                {
                    "name": "context"
                },
                {
                    "name": "toolbar"
                }
            ]
        },
        {
            "name": "mit",
            "values": [
                {
                    "name": "command"
                },
                {
                    "name": "checkbox"
                },
                {
                    "name": "radio"
                }
            ]
        },
        {
            "name": "et",
            "values": [
                {
                    "name": "application/x-www-form-urlencoded"
                },
                {
                    "name": "multipart/form-data"
                },
                {
                    "name": "text/plain"
                }
            ]
        },
        {
            "name": "tk",
            "values": [
                {
                    "name": "subtitles"
                },
                {
                    "name": "captions"
                },
                {
                    "name": "descriptions"
                },
                {
                    "name": "chapters"
                },
                {
                    "name": "metadata"
                }
            ]
        },
        {
            "name": "pl",
            "values": [
                {
                    "name": "none"
                },
                {
                    "name": "metadata"
                },
                {
                    "name": "auto"
                }
            ]
        },
        {
            "name": "sh",
            "values": [
                {
                    "name": "circle"
                },
                {
                    "name": "default"
                },
                {
                    "name": "poly"
                },
                {
                    "name": "rect"
                }
            ]
        },
        {
            "name": "xo",
            "values": [
                {
                    "name": "anonymous"
                },
                {
                    "name": "use-credentials"
                }
            ]
        },
        {
            "name": "target",
            "values": [
                {
                    "name": "_self"
                },
                {
                    "name": "_blank"
                },
                {
                    "name": "_parent"
                },
                {
                    "name": "_top"
                }
            ]
        },
        {
            "name": "sb",
            "values": [
                {
                    "name": "allow-forms"
                },
                {
                    "name": "allow-modals"
                },
                {
                    "name": "allow-pointer-lock"
                },
                {
                    "name": "allow-popups"
                },
                {
                    "name": "allow-popups-to-escape-sandbox"
                },
                {
                    "name": "allow-same-origin"
                },
                {
                    "name": "allow-scripts"
                },
                {
                    "name": "allow-top-navigation"
                }
            ]
        },
        {
            "name": "tristate",
            "values": [
                {
                    "name": "true"
                },
                {
                    "name": "false"
                },
                {
                    "name": "mixed"
                },
                {
                    "name": "undefined"
                }
            ]
        },
        {
            "name": "inputautocomplete",
            "values": [
                {
                    "name": "additional-name"
                },
                {
                    "name": "address-level1"
                },
                {
                    "name": "address-level2"
                },
                {
                    "name": "address-level3"
                },
                {
                    "name": "address-level4"
                },
                {
                    "name": "address-line1"
                },
                {
                    "name": "address-line2"
                },
                {
                    "name": "address-line3"
                },
                {
                    "name": "bday"
                },
                {
                    "name": "bday-year"
                },
                {
                    "name": "bday-day"
                },
                {
                    "name": "bday-month"
                },
                {
                    "name": "billing"
                },
                {
                    "name": "cc-additional-name"
                },
                {
                    "name": "cc-csc"
                },
                {
                    "name": "cc-exp"
                },
                {
                    "name": "cc-exp-month"
                },
                {
                    "name": "cc-exp-year"
                },
                {
                    "name": "cc-family-name"
                },
                {
                    "name": "cc-given-name"
                },
                {
                    "name": "cc-name"
                },
                {
                    "name": "cc-number"
                },
                {
                    "name": "cc-type"
                },
                {
                    "name": "country"
                },
                {
                    "name": "country-name"
                },
                {
                    "name": "current-password"
                },
                {
                    "name": "email"
                },
                {
                    "name": "family-name"
                },
                {
                    "name": "fax"
                },
                {
                    "name": "given-name"
                },
                {
                    "name": "home"
                },
                {
                    "name": "honorific-prefix"
                },
                {
                    "name": "honorific-suffix"
                },
                {
                    "name": "impp"
                },
                {
                    "name": "language"
                },
                {
                    "name": "mobile"
                },
                {
                    "name": "name"
                },
                {
                    "name": "new-password"
                },
                {
                    "name": "nickname"
                },
                {
                    "name": "off"
                },
                {
                    "name": "on"
                },
                {
                    "name": "organization"
                },
                {
                    "name": "organization-title"
                },
                {
                    "name": "pager"
                },
                {
                    "name": "photo"
                },
                {
                    "name": "postal-code"
                },
                {
                    "name": "sex"
                },
                {
                    "name": "shipping"
                },
                {
                    "name": "street-address"
                },
                {
                    "name": "tel-area-code"
                },
                {
                    "name": "tel"
                },
                {
                    "name": "tel-country-code"
                },
                {
                    "name": "tel-extension"
                },
                {
                    "name": "tel-local"
                },
                {
                    "name": "tel-local-prefix"
                },
                {
                    "name": "tel-local-suffix"
                },
                {
                    "name": "tel-national"
                },
                {
                    "name": "transaction-amount"
                },
                {
                    "name": "transaction-currency"
                },
                {
                    "name": "url"
                },
                {
                    "name": "username"
                },
                {
                    "name": "work"
                }
            ]
        },
        {
            "name": "autocomplete",
            "values": [
                {
                    "name": "inline"
                },
                {
                    "name": "list"
                },
                {
                    "name": "both"
                },
                {
                    "name": "none"
                }
            ]
        },
        {
            "name": "current",
            "values": [
                {
                    "name": "page"
                },
                {
                    "name": "step"
                },
                {
                    "name": "location"
                },
                {
                    "name": "date"
                },
                {
                    "name": "time"
                },
                {
                    "name": "true"
                },
                {
                    "name": "false"
                }
            ]
        },
        {
            "name": "dropeffect",
            "values": [
                {
                    "name": "copy"
                },
                {
                    "name": "move"
                },
                {
                    "name": "link"
                },
                {
                    "name": "execute"
                },
                {
                    "name": "popup"
                },
                {
                    "name": "none"
                }
            ]
        },
        {
            "name": "invalid",
            "values": [
                {
                    "name": "grammar"
                },
                {
                    "name": "false"
                },
                {
                    "name": "spelling"
                },
                {
                    "name": "true"
                }
            ]
        },
        {
            "name": "live",
            "values": [
                {
                    "name": "off"
                },
                {
                    "name": "polite"
                },
                {
                    "name": "assertive"
                }
            ]
        },
        {
            "name": "orientation",
            "values": [
                {
                    "name": "vertical"
                },
                {
                    "name": "horizontal"
                },
                {
                    "name": "undefined"
                }
            ]
        },
        {
            "name": "relevant",
            "values": [
                {
                    "name": "additions"
                },
                {
                    "name": "removals"
                },
                {
                    "name": "text"
                },
                {
                    "name": "all"
                },
                {
                    "name": "additions text"
                }
            ]
        },
        {
            "name": "sort",
            "values": [
                {
                    "name": "ascending"
                },
                {
                    "name": "descending"
                },
                {
                    "name": "none"
                },
                {
                    "name": "other"
                }
            ]
        },
        {
            "name": "roles",
            "values": [
                {
                    "name": "alert"
                },
                {
                    "name": "alertdialog"
                },
                {
                    "name": "button"
                },
                {
                    "name": "checkbox"
                },
                {
                    "name": "dialog"
                },
                {
                    "name": "gridcell"
                },
                {
                    "name": "link"
                },
                {
                    "name": "log"
                },
                {
                    "name": "marquee"
                },
                {
                    "name": "menuitem"
                },
                {
                    "name": "menuitemcheckbox"
                },
                {
                    "name": "menuitemradio"
                },
                {
                    "name": "option"
                },
                {
                    "name": "progressbar"
                },
                {
                    "name": "radio"
                },
                {
                    "name": "scrollbar"
                },
                {
                    "name": "searchbox"
                },
                {
                    "name": "slider"
                },
                {
                    "name": "spinbutton"
                },
                {
                    "name": "status"
                },
                {
                    "name": "switch"
                },
                {
                    "name": "tab"
                },
                {
                    "name": "tabpanel"
                },
                {
                    "name": "textbox"
                },
                {
                    "name": "timer"
                },
                {
                    "name": "tooltip"
                },
                {
                    "name": "treeitem"
                },
                {
                    "name": "combobox"
                },
                {
                    "name": "grid"
                },
                {
                    "name": "listbox"
                },
                {
                    "name": "menu"
                },
                {
                    "name": "menubar"
                },
                {
                    "name": "radiogroup"
                },
                {
                    "name": "tablist"
                },
                {
                    "name": "tree"
                },
                {
                    "name": "treegrid"
                },
                {
                    "name": "application"
                },
                {
                    "name": "article"
                },
                {
                    "name": "cell"
                },
                {
                    "name": "columnheader"
                },
                {
                    "name": "definition"
                },
                {
                    "name": "directory"
                },
                {
                    "name": "document"
                },
                {
                    "name": "feed"
                },
                {
                    "name": "figure"
                },
                {
                    "name": "group"
                },
                {
                    "name": "heading"
                },
                {
                    "name": "img"
                },
                {
                    "name": "list"
                },
                {
                    "name": "listitem"
                },
                {
                    "name": "math"
                },
                {
                    "name": "none"
                },
                {
                    "name": "note"
                },
                {
                    "name": "presentation"
                },
                {
                    "name": "region"
                },
                {
                    "name": "row"
                },
                {
                    "name": "rowgroup"
                },
                {
                    "name": "rowheader"
                },
                {
                    "name": "separator"
                },
                {
                    "name": "table"
                },
                {
                    "name": "term"
                },
                {
                    "name": "text"
                },
                {
                    "name": "toolbar"
                },
                {
                    "name": "banner"
                },
                {
                    "name": "complementary"
                },
                {
                    "name": "contentinfo"
                },
                {
                    "name": "form"
                },
                {
                    "name": "main"
                },
                {
                    "name": "navigation"
                },
                {
                    "name": "region"
                },
                {
                    "name": "search"
                },
                {
                    "name": "doc-abstract"
                },
                {
                    "name": "doc-acknowledgments"
                },
                {
                    "name": "doc-afterword"
                },
                {
                    "name": "doc-appendix"
                },
                {
                    "name": "doc-backlink"
                },
                {
                    "name": "doc-biblioentry"
                },
                {
                    "name": "doc-bibliography"
                },
                {
                    "name": "doc-biblioref"
                },
                {
                    "name": "doc-chapter"
                },
                {
                    "name": "doc-colophon"
                },
                {
                    "name": "doc-conclusion"
                },
                {
                    "name": "doc-cover"
                },
                {
                    "name": "doc-credit"
                },
                {
                    "name": "doc-credits"
                },
                {
                    "name": "doc-dedication"
                },
                {
                    "name": "doc-endnote"
                },
                {
                    "name": "doc-endnotes"
                },
                {
                    "name": "doc-epigraph"
                },
                {
                    "name": "doc-epilogue"
                },
                {
                    "name": "doc-errata"
                },
                {
                    "name": "doc-example"
                },
                {
                    "name": "doc-footnote"
                },
                {
                    "name": "doc-foreword"
                },
                {
                    "name": "doc-glossary"
                },
                {
                    "name": "doc-glossref"
                },
                {
                    "name": "doc-index"
                },
                {
                    "name": "doc-introduction"
                },
                {
                    "name": "doc-noteref"
                },
                {
                    "name": "doc-notice"
                },
                {
                    "name": "doc-pagebreak"
                },
                {
                    "name": "doc-pagelist"
                },
                {
                    "name": "doc-part"
                },
                {
                    "name": "doc-preface"
                },
                {
                    "name": "doc-prologue"
                },
                {
                    "name": "doc-pullquote"
                },
                {
                    "name": "doc-qna"
                },
                {
                    "name": "doc-subtitle"
                },
                {
                    "name": "doc-tip"
                },
                {
                    "name": "doc-toc"
                }
            ]
        },
        {
            "name": "metanames",
            "values": [
                {
                    "name": "application-name"
                },
                {
                    "name": "author"
                },
                {
                    "name": "description"
                },
                {
                    "name": "format-detection"
                },
                {
                    "name": "generator"
                },
                {
                    "name": "keywords"
                },
                {
                    "name": "publisher"
                },
                {
                    "name": "referrer"
                },
                {
                    "name": "robots"
                },
                {
                    "name": "theme-color"
                },
                {
                    "name": "viewport"
                }
            ]
        },
        {
            "name": "haspopup",
            "values": [
                {
                    "name": "false",
                    "description": {
                        "kind": "markdown",
                        "value": "(default) Indicates the element does not have a popup."
                    }
                },
                {
                    "name": "true",
                    "description": {
                        "kind": "markdown",
                        "value": "Indicates the popup is a menu."
                    }
                },
                {
                    "name": "menu",
                    "description": {
                        "kind": "markdown",
                        "value": "Indicates the popup is a menu."
                    }
                },
                {
                    "name": "listbox",
                    "description": {
                        "kind": "markdown",
                        "value": "Indicates the popup is a listbox."
                    }
                },
                {
                    "name": "tree",
                    "description": {
                        "kind": "markdown",
                        "value": "Indicates the popup is a tree."
                    }
                },
                {
                    "name": "grid",
                    "description": {
                        "kind": "markdown",
                        "value": "Indicates the popup is a grid."
                    }
                },
                {
                    "name": "dialog",
                    "description": {
                        "kind": "markdown",
                        "value": "Indicates the popup is a dialog."
                    }
                }
            ]
        },
        {
            "name": "decoding",
            "values": [
                {
                    "name": "sync"
                },
                {
                    "name": "async"
                },
                {
                    "name": "auto"
                }
            ]
        },
        {
            "name": "loading",
            "values": [
                {
                    "name": "eager",
                    "description": {
                        "kind": "markdown",
                        "value": "Loads the image immediately, regardless of whether or not the image is currently within the visible viewport (this is the default value)."
                    }
                },
                {
                    "name": "lazy",
                    "description": {
                        "kind": "markdown",
                        "value": "Defers loading the image until it reaches a calculated distance from the viewport, as defined by the browser. The intent is to avoid the network and storage bandwidth needed to handle the image until it's reasonably certain that it will be needed. This generally improves the performance of the content in most typical use cases."
                    }
                }
            ]
        },
        {
            "name": "referrerpolicy",
            "values": [
                {
                    "name": "no-referrer"
                },
                {
                    "name": "no-referrer-when-downgrade"
                },
                {
                    "name": "origin"
                },
                {
                    "name": "origin-when-cross-origin"
                },
                {
                    "name": "same-origin"
                },
                {
                    "name": "strict-origin"
                },
                {
                    "name": "strict-origin-when-cross-origin"
                },
                {
                    "name": "unsafe-url"
                }
            ]
        },
        {
            "name": "enterkeyhint",
            "values": [
                {
                    "name": "enter"
                },
                {
                    "name": "done"
                },
                {
                    "name": "go"
                },
                {
                    "name": "next"
                },
                {
                    "name": "previous"
                },
                {
                    "name": "search"
                },
                {
                    "name": "send"
                }
            ]
        },
        {
            "name": "popover",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "hint"
                },
                {
                    "name": "manual"
                }
            ]
        },
        {
            "name": "fetchpriority",
            "values": [
                {
                    "name": "high"
                },
                {
                    "name": "low"
                },
                {
                    "name": "auto"
                }
            ]
        }
    ]
};

class HTMLDataManager {
    constructor(options) {
        this.dataProviders = [];
        this.setDataProviders(options.useDefaultDataProvider !== false, options.customDataProviders || []);
    }
    setDataProviders(builtIn, providers) {
        this.dataProviders = [];
        if (builtIn) {
            this.dataProviders.push(new HTMLDataProvider('html5', htmlData$1));
        }
        this.dataProviders.push(...providers);
    }
    getDataProviders() {
        return this.dataProviders;
    }
    isVoidElement(e, voidElements) {
        return !!e && binarySearch(voidElements, e.toLowerCase(), (s1, s2) => s1.localeCompare(s2)) >= 0;
    }
    getVoidElements(languageOrProviders) {
        const dataProviders = Array.isArray(languageOrProviders) ? languageOrProviders : this.getDataProviders().filter(p => p.isApplicable(languageOrProviders));
        const voidTags = [];
        dataProviders.forEach((provider) => {
            provider.provideTags().filter(tag => tag.void).forEach(tag => voidTags.push(tag.name));
        });
        return voidTags.sort();
    }
    isPathAttribute(tag, attr) {
        if (attr === 'src' || attr === 'href') {
            return true;
        }
        const a = PATH_TAG_AND_ATTR[tag];
        if (a) {
            if (typeof a === 'string') {
                return a === attr;
            }
            else {
                return a.indexOf(attr) !== -1;
            }
        }
        return false;
    }
}
const PATH_TAG_AND_ATTR = {
    a: 'href',
    area: 'href',
    body: 'background',
    blockquote: 'cite',
    del: 'cite',
    form: 'action',
    frame: ['src', 'longdesc'],
    img: ['src', 'longdesc'],
    ins: 'cite',
    link: 'href',
    object: 'data',
    q: 'cite',
    script: 'src',
    audio: 'src',
    button: 'formaction',
    command: 'icon',
    embed: 'src',
    html: 'manifest',
    input: ['src', 'formaction'],
    source: 'src',
    track: 'src',
    video: ['src', 'poster']
};

const defaultLanguageServiceOptions$1 = {};
function getLanguageService$1(options = defaultLanguageServiceOptions$1) {
    const dataManager = new HTMLDataManager(options);
    const htmlHover = new HTMLHover(options, dataManager);
    const htmlCompletion = new HTMLCompletion(options, dataManager);
    const htmlParser = new HTMLParser(dataManager);
    const htmlSelectionRange = new HTMLSelectionRange(htmlParser);
    const htmlFolding = new HTMLFolding(dataManager);
    const htmlDocumentLinks = new HTMLDocumentLinks(dataManager);
    return {
        setDataProviders: dataManager.setDataProviders.bind(dataManager),
        createScanner: createScanner$1,
        parseHTMLDocument: htmlParser.parseDocument.bind(htmlParser),
        doComplete: htmlCompletion.doComplete.bind(htmlCompletion),
        doComplete2: htmlCompletion.doComplete2.bind(htmlCompletion),
        setCompletionParticipants: htmlCompletion.setCompletionParticipants.bind(htmlCompletion),
        doHover: htmlHover.doHover.bind(htmlHover),
        format: format$1,
        findDocumentHighlights,
        findDocumentLinks: htmlDocumentLinks.findDocumentLinks.bind(htmlDocumentLinks),
        findDocumentSymbols,
        findDocumentSymbols2,
        getFoldingRanges: htmlFolding.getFoldingRanges.bind(htmlFolding),
        getSelectionRanges: htmlSelectionRange.getSelectionRanges.bind(htmlSelectionRange),
        doQuoteComplete: htmlCompletion.doQuoteComplete.bind(htmlCompletion),
        doTagComplete: htmlCompletion.doTagComplete.bind(htmlCompletion),
        doRename,
        findMatchingTagPosition,
        findOnTypeRenameRanges: findLinkedEditingRanges,
        findLinkedEditingRanges
    };
}
function newHTMLDataProvider(id, customData) {
    return new HTMLDataProvider(id, customData);
}
function getDefaultHTMLDataProvider() {
    return newHTMLDataProvider('default', htmlData$1);
}

var htmlLanguageService = /*#__PURE__*/Object.freeze({
	__proto__: null,
	getLanguageService: getLanguageService$1,
	newHTMLDataProvider: newHTMLDataProvider,
	getDefaultHTMLDataProvider: getDefaultHTMLDataProvider,
	get TextDocument () { return TextDocument$1; },
	get Position () { return Position$1; },
	get Range () { return Range$1; },
	get Location () { return Location$1; },
	get MarkupContent () { return MarkupContent$1; },
	get MarkupKind () { return MarkupKind$1; },
	get MarkedString () { return MarkedString$1; },
	get DocumentUri () { return DocumentUri$1; },
	get SelectionRange () { return SelectionRange$1; },
	get WorkspaceEdit () { return WorkspaceEdit$1; },
	get CompletionList () { return CompletionList$1; },
	get CompletionItemKind () { return CompletionItemKind$1; },
	get CompletionItem () { return CompletionItem$1; },
	get CompletionItemTag () { return CompletionItemTag$1; },
	get InsertTextMode () { return InsertTextMode$1; },
	get Command () { return Command$1; },
	get SymbolInformation () { return SymbolInformation$1; },
	get DocumentSymbol () { return DocumentSymbol$1; },
	get SymbolKind () { return SymbolKind$1; },
	get Hover () { return Hover$1; },
	get TextEdit () { return TextEdit$1; },
	get InsertReplaceEdit () { return InsertReplaceEdit$1; },
	get InsertTextFormat () { return InsertTextFormat$1; },
	get DocumentHighlight () { return DocumentHighlight$1; },
	get DocumentHighlightKind () { return DocumentHighlightKind$1; },
	get DocumentLink () { return DocumentLink$1; },
	get FoldingRange () { return FoldingRange$1; },
	get FoldingRangeKind () { return FoldingRangeKind$1; },
	get Diagnostic () { return Diagnostic$1; },
	get FormattingOptions () { return FormattingOptions$1; },
	get Color () { return Color$1; },
	get ColorInformation () { return ColorInformation$1; },
	get ColorPresentation () { return ColorPresentation$1; },
	get TokenType () { return TokenType$1; },
	get ScannerState () { return ScannerState; },
	get ClientCapabilities () { return ClientCapabilities$1; },
	get FileType () { return FileType$2; }
});

var require$$1$2 = /*@__PURE__*/getAugmentedNamespace(htmlLanguageService);

var hasRequiredParseHtml;
function requireParseHtml () {
	if (hasRequiredParseHtml) return parseHtml;
	hasRequiredParseHtml = 1;
	Object.defineProperty(parseHtml, "__esModule", { value: true });
	parseHtml.HTMLNode = void 0;
	parseHtml.parseHtml = parseHtml$1;
	parseHtml.getAttributeContextAtPosition = getAttributeContextAtPosition;
	const vscode_html_languageservice_1 = require$$1$2;
	const utils_1 = requireUtils$2();
	const voidElements = new Set((0, vscode_html_languageservice_1.getDefaultHTMLDataProvider)()
	    .provideTags()
	    .filter((tag) => tag.void)
	    .map((tag) => tag.name));
	const createScanner = (0, vscode_html_languageservice_1.getLanguageService)()
	    .createScanner;
	const braceStartCode = '{'.charCodeAt(0);
	const singleQuoteCode = "'".charCodeAt(0);
	const doubleQuoteCode = '"'.charCodeAt(0);
	function parseHtml$1(text) {
	    let scanner = createScanner(text, undefined, undefined, true);
	    const htmlDocument = new HTMLNode(0, text.length, [], undefined);
	    let curr = htmlDocument;
	    let endTagStart = -1;
	    let endTagName = undefined;
	    let pendingAttribute = null;
	    let token = scanner.scan();
	    while (token !== vscode_html_languageservice_1.TokenType.EOS) {
	        switch (token) {
	            case vscode_html_languageservice_1.TokenType.StartTagOpen:
	                const child = new HTMLNode(scanner.getTokenOffset(), text.length, [], curr);
	                curr.children.push(child);
	                curr = child;
	                break;
	            case vscode_html_languageservice_1.TokenType.StartTag:
	                curr.tag = scanner.getTokenText();
	                break;
	            case vscode_html_languageservice_1.TokenType.StartTagClose:
	                if (curr.parent) {
	                    curr.end = scanner.getTokenEnd();
	                    if (scanner.getTokenLength()) {
	                        curr.startTagEnd = scanner.getTokenEnd();
	                        if (curr.tag && voidElements.has(curr.tag)) {
	                            curr.closed = true;
	                            curr = curr.parent;
	                        }
	                    }
	                    else {
	                        curr = curr.parent;
	                    }
	                }
	                break;
	            case vscode_html_languageservice_1.TokenType.StartTagSelfClose:
	                if (curr.parent) {
	                    curr.closed = true;
	                    curr.end = scanner.getTokenEnd();
	                    curr.startTagEnd = scanner.getTokenEnd();
	                    curr = curr.parent;
	                }
	                break;
	            case vscode_html_languageservice_1.TokenType.EndTagOpen:
	                endTagStart = scanner.getTokenOffset();
	                endTagName = undefined;
	                break;
	            case vscode_html_languageservice_1.TokenType.EndTag:
	                endTagName = scanner.getTokenText().toLowerCase();
	                break;
	            case vscode_html_languageservice_1.TokenType.EndTagClose:
	                let node = curr;
	                while (!node.isSameTag(endTagName) && node.parent) {
	                    node = node.parent;
	                }
	                if (node.parent) {
	                    while (curr !== node) {
	                        curr.end = endTagStart;
	                        curr.closed = false;
	                        curr = curr.parent;
	                    }
	                    curr.closed = true;
	                    curr.endTagStart = endTagStart;
	                    curr.end = scanner.getTokenEnd();
	                    curr = curr.parent;
	                }
	                break;
	            case vscode_html_languageservice_1.TokenType.AttributeName: {
	                pendingAttribute = scanner.getTokenText();
	                let attributes = curr.attributes;
	                if (!attributes) {
	                    curr.attributes = attributes = {};
	                }
	                attributes[pendingAttribute] = null;
	                break;
	            }
	            case vscode_html_languageservice_1.TokenType.DelimiterAssign: {
	                const afterAssign = scanner.getTokenEnd();
	                if (text.charCodeAt(afterAssign) === braceStartCode) {
	                    const result = (0, utils_1.scanMatchingBraces)(text, afterAssign);
	                    restartScannerAt(result.endOffset, vscode_html_languageservice_1.ScannerState.WithinTag);
	                    finishAttribute(afterAssign, result.endOffset);
	                }
	                break;
	            }
	            case vscode_html_languageservice_1.TokenType.Whitespace: {
	                const afterWhitespace = scanner.getTokenEnd();
	                if (text.charCodeAt(afterWhitespace) === braceStartCode) {
	                    if (scanner.getScannerState() === vscode_html_languageservice_1.ScannerState.BeforeAttributeValue) {
	                        const result = (0, utils_1.scanMatchingBraces)(text, afterWhitespace);
	                        restartScannerAt(result.endOffset, vscode_html_languageservice_1.ScannerState.WithinTag);
	                        finishAttribute(afterWhitespace, result.endOffset);
	                    }
	                    else {
	                        parseSpreadOrShorthandAttribute(afterWhitespace);
	                    }
	                }
	                break;
	            }
	            case vscode_html_languageservice_1.TokenType.AttributeValue:
	                parseAttributeValue();
	                break;
	            case vscode_html_languageservice_1.TokenType.Unknown: {
	                const tokenOffset = scanner.getTokenOffset();
	                if (isInsideTagScannerState() &&
	                    text.charCodeAt(tokenOffset) === '/'.charCodeAt(0)) {
	                    const nextCharCode = text.charCodeAt(tokenOffset + 1);
	                    if (nextCharCode === '/'.charCodeAt(0)) {
	                        const newlineOffset = text.indexOf('\n', tokenOffset + 2);
	                        const commentEndOffset = newlineOffset === -1 ? text.length : newlineOffset;
	                        restartScannerAt(commentEndOffset, vscode_html_languageservice_1.ScannerState.WithinTag);
	                    }
	                    else if (nextCharCode === '*'.charCodeAt(0)) {
	                        const blockCommentEnd = text.indexOf('*/', tokenOffset + 2);
	                        const commentEndOffset = blockCommentEnd === -1 ? text.length : blockCommentEnd + 2;
	                        restartScannerAt(commentEndOffset, vscode_html_languageservice_1.ScannerState.WithinTag);
	                    }
	                }
	                break;
	            }
	            case vscode_html_languageservice_1.TokenType.Content: {
	                const expressionEnd = skipExpressionInCurrentRange();
	                if (expressionEnd > scanner.getTokenEnd()) {
	                    restartScannerAt(expressionEnd, vscode_html_languageservice_1.ScannerState.WithinContent);
	                }
	                break;
	            }
	        }
	        token = scanner.scan();
	    }
	    while (curr.parent) {
	        curr.end = text.length;
	        curr.closed = false;
	        curr = curr.parent;
	    }
	    return {
	        roots: htmlDocument.children,
	        findNodeBefore: htmlDocument.findNodeBefore.bind(htmlDocument),
	        findNodeAt: htmlDocument.findNodeAt.bind(htmlDocument)
	    };
	    function skipExpressionInCurrentRange() {
	        const start = scanner.getTokenOffset();
	        const end = scanner.getTokenEnd();
	        let index = start;
	        while (index < end) {
	            if (text.charCodeAt(index) !== braceStartCode) {
	                index++;
	                continue;
	            }
	            const matchResult = (0, utils_1.scanMatchingBraces)(text, index);
	            index = matchResult.endOffset;
	        }
	        return Math.max(index, end);
	    }
	    function restartScannerAt(offset, scannerState) {
	        if (offset <= scanner.getTokenEnd()) {
	            return;
	        }
	        scanner = createScanner(text, offset, scannerState,  true);
	    }
	    function finishAttribute(start, end) {
	        if (!pendingAttribute || !curr.attributes) {
	            return;
	        }
	        curr.attributes[pendingAttribute] = text.substring(start, end);
	        pendingAttribute = null;
	    }
	    function parseSpreadOrShorthandAttribute(startOffset) {
	        const scanResult = (0, utils_1.scanMatchingBraces)(text, startOffset);
	        const end = scanResult.endOffset;
	        restartScannerAt(end, vscode_html_languageservice_1.ScannerState.WithinTag);
	        const expressionStart = startOffset + 1;
	        const expressionEnd = end - 1;
	        const expression = text.substring(expressionStart, expressionEnd).trim();
	        if (text.substring(expressionStart).startsWith('...')) {
	            return;
	        }
	        curr.attributes ??= {};
	        curr.attributes[expression] = text.substring(startOffset, end);
	    }
	    function parseAttributeValue() {
	        const quote = text.charCodeAt(scanner.getTokenOffset());
	        if (!isQuote(quote)) {
	            finishAttribute(scanner.getTokenOffset(), scanner.getTokenEnd());
	            return;
	        }
	        const start = scanner.getTokenOffset();
	        const tokenEnd = scanner.getTokenEnd();
	        let expressionTagEnd = skipExpressionInCurrentRange();
	        if (expressionTagEnd > tokenEnd) {
	            const indexOfQuote = text.indexOf(String.fromCharCode(quote), expressionTagEnd);
	            expressionTagEnd = indexOfQuote !== -1 ? indexOfQuote + 1 : text.length;
	            restartScannerAt(expressionTagEnd, vscode_html_languageservice_1.ScannerState.WithinTag);
	        }
	        finishAttribute(start, expressionTagEnd);
	    }
	    function isInsideTagScannerState() {
	        const scannerState = scanner.getScannerState();
	        return (scannerState === vscode_html_languageservice_1.ScannerState.WithinTag ||
	            scannerState === vscode_html_languageservice_1.ScannerState.AfterAttributeName ||
	            scannerState === vscode_html_languageservice_1.ScannerState.BeforeAttributeValue ||
	            scannerState === vscode_html_languageservice_1.ScannerState.AfterOpeningStartTag);
	    }
	}
	function getAttributeContextAtPosition(document, position) {
	    const offset = document.offsetAt(position);
	    const { html } = document;
	    const tag = html.findNodeAt(offset);
	    if (!inStartTag(offset, tag) || !tag.attributes) {
	        return null;
	    }
	    const text = document.getText();
	    const beforeStartTagEnd = text.substring(0, tag.startTagEnd);
	    let scanner = createScanner(beforeStartTagEnd, tag.start);
	    let token = scanner.scan();
	    let currentAttributeName;
	    const inTokenRange = () => scanner.getTokenOffset() <= offset && offset <= scanner.getTokenEnd();
	    while (token != vscode_html_languageservice_1.TokenType.EOS) {
	        if (token === vscode_html_languageservice_1.TokenType.AttributeName) {
	            currentAttributeName = scanner.getTokenText();
	            if (inTokenRange()) {
	                return {
	                    elementTag: tag,
	                    name: currentAttributeName,
	                    inValue: false
	                };
	            }
	        }
	        else if (token === vscode_html_languageservice_1.TokenType.DelimiterAssign) {
	            const afterAssign = scanner.getTokenEnd();
	            if (afterAssign === offset && currentAttributeName) {
	                const nextToken = scanner.scan();
	                return {
	                    elementTag: tag,
	                    name: currentAttributeName,
	                    inValue: true,
	                    valueRange: [
	                        offset,
	                        nextToken === vscode_html_languageservice_1.TokenType.AttributeValue ? scanner.getTokenEnd() : offset
	                    ]
	                };
	            }
	            if (text.charCodeAt(afterAssign) === braceStartCode) {
	                const scanResult = (0, utils_1.scanMatchingBraces)(text, afterAssign);
	                restartScannerAt(scanResult.endOffset, vscode_html_languageservice_1.ScannerState.WithinTag);
	            }
	        }
	        else if (token === vscode_html_languageservice_1.TokenType.AttributeValue) {
	            if (inTokenRange() && currentAttributeName) {
	                let start = scanner.getTokenOffset();
	                let end = scanner.getTokenEnd();
	                if (isQuote(text.charCodeAt(start))) {
	                    start++;
	                    end--;
	                }
	                return {
	                    elementTag: tag,
	                    name: currentAttributeName,
	                    inValue: true,
	                    valueRange: [start, end]
	                };
	            }
	            currentAttributeName = undefined;
	        }
	        else if (token === vscode_html_languageservice_1.TokenType.Whitespace) {
	            const afterWhitespace = scanner.getTokenEnd();
	            if (text.charCodeAt(afterWhitespace) === braceStartCode) {
	                if (scanner.getScannerState() === vscode_html_languageservice_1.ScannerState.BeforeAttributeValue) {
	                    const scanResult = (0, utils_1.scanMatchingBraces)(text, afterWhitespace);
	                    restartScannerAt(scanResult.endOffset, vscode_html_languageservice_1.ScannerState.WithinTag);
	                }
	                else {
	                    parseSpreadOrShorthandAttribute(afterWhitespace);
	                }
	            }
	        }
	        token = scanner.scan();
	        function parseSpreadOrShorthandAttribute(startOffset) {
	            const scanResult = (0, utils_1.scanMatchingBraces)(text, startOffset);
	            const end = scanResult.endOffset;
	            restartScannerAt(end, vscode_html_languageservice_1.ScannerState.WithinTag);
	        }
	    }
	    return null;
	    function restartScannerAt(offset, scannerState) {
	        if (offset <= scanner.getTokenEnd()) {
	            return;
	        }
	        scanner = createScanner(beforeStartTagEnd, offset, scannerState);
	    }
	}
	function isQuote(charCode) {
	    return charCode === singleQuoteCode || charCode === doubleQuoteCode;
	}
	function inStartTag(offset, node) {
	    return offset > node.start && node.startTagEnd != undefined && offset < node.startTagEnd;
	}
	class HTMLNode {
	    get attributeNames() {
	        return this.attributes ? Object.keys(this.attributes) : [];
	    }
	    constructor(start, end, children, parent) {
	        this.start = start;
	        this.end = end;
	        this.children = children;
	        this.parent = parent;
	        this.closed = false;
	    }
	    isSameTag(tagInLowerCase) {
	        if (this.tag === undefined) {
	            return tagInLowerCase === undefined;
	        }
	        else {
	            return (tagInLowerCase !== undefined &&
	                this.tag.length === tagInLowerCase.length &&
	                this.tag.toLowerCase() === tagInLowerCase);
	        }
	    }
	    get firstChild() {
	        return this.children[0];
	    }
	    get lastChild() {
	        return this.children.length ? this.children[this.children.length - 1] : void 0;
	    }
	    findNodeBefore(offset) {
	        const idx = HTMLNode.findFirst(this.children, (c) => offset <= c.start) - 1;
	        if (idx >= 0) {
	            const child = this.children[idx];
	            if (offset > child.start) {
	                if (offset < child.end) {
	                    return child.findNodeBefore(offset);
	                }
	                const lastChild = child.lastChild;
	                if (lastChild && lastChild.end === child.end) {
	                    return child.findNodeBefore(offset);
	                }
	                return child;
	            }
	        }
	        return this;
	    }
	    findNodeAt(offset) {
	        const idx = HTMLNode.findFirst(this.children, (c) => offset <= c.start) - 1;
	        if (idx >= 0) {
	            const child = this.children[idx];
	            if (offset > child.start && offset <= child.end) {
	                return child.findNodeAt(offset);
	            }
	        }
	        return this;
	    }
	    static findFirst(array, p) {
	        let low = 0, high = array.length;
	        if (high === 0) {
	            return 0;
	        }
	        while (low < high) {
	            let mid = Math.floor((low + high) / 2);
	            if (p(array[mid])) {
	                high = mid;
	            }
	            else {
	                low = mid + 1;
	            }
	        }
	        return low;
	    }
	}
	parseHtml.HTMLNode = HTMLNode;
	return parseHtml;
}

var hasRequiredUtils$2;
function requireUtils$2 () {
	if (hasRequiredUtils$2) return utils$5;
	hasRequiredUtils$2 = 1;
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
	    Object.defineProperty(o, "default", { enumerable: true, value: v });
	}) : function(o, v) {
	    o["default"] = v;
	});
	var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || (function () {
	    var ownKeys = function(o) {
	        ownKeys = Object.getOwnPropertyNames || function (o) {
	            var ar = [];
	            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
	            return ar;
	        };
	        return ownKeys(o);
	    };
	    return function (mod) {
	        if (mod && mod.__esModule) return mod;
	        var result = {};
	        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
	        __setModuleDefault(result, mod);
	        return result;
	    };
	})();
	Object.defineProperty(utils$5, "__esModule", { value: true });
	utils$5.extractScriptTags = extractScriptTags;
	utils$5.extractStyleTag = extractStyleTag;
	utils$5.extractTemplateTag = extractTemplateTag;
	utils$5.positionAt = positionAt;
	utils$5.offsetAt = offsetAt;
	utils$5.getLineOffsets = getLineOffsets;
	utils$5.isInTag = isInTag;
	utils$5.isRangeInTag = isRangeInTag;
	utils$5.getTextInRange = getTextInRange;
	utils$5.getLineAtPosition = getLineAtPosition;
	utils$5.isAtEndOfLine = isAtEndOfLine;
	utils$5.updateRelativeImport = updateRelativeImport;
	utils$5.getNodeIfIsInComponentStartTag = getNodeIfIsInComponentStartTag;
	utils$5.getNodeIfIsInHTMLStartTag = getNodeIfIsInHTMLStartTag;
	utils$5.getNodeIfIsInTagName = getNodeIfIsInTagName;
	utils$5.getNodeIfIsInStartTag = getNodeIfIsInStartTag;
	utils$5.isInHTMLTagRange = isInHTMLTagRange;
	utils$5.getWordRangeAt = getWordRangeAt;
	utils$5.getWordAt = getWordAt;
	utils$5.toRange = toRange;
	utils$5.getLangAttribute = getLangAttribute;
	utils$5.inStyleOrScript = inStyleOrScript;
	utils$5.scanMatchingBraces = scanMatchingBraces;
	utils$5.isInsideMoustacheTag = isInsideMoustacheTag;
	const utils_1 = utils$6;
	const vscode_languageserver_1 = main$8;
	const path = __importStar(path$1);
	const parseHtml_1 = requireParseHtml();
	function parseAttributes(rawAttrs) {
	    const attrs = {};
	    if (!rawAttrs) {
	        return attrs;
	    }
	    Object.keys(rawAttrs).forEach((attrName) => {
	        const attrValue = rawAttrs[attrName];
	        attrs[attrName] = attrValue === null ? attrName : removeOuterQuotes(attrValue);
	    });
	    return attrs;
	    function removeOuterQuotes(attrValue) {
	        if ((attrValue.startsWith('"') && attrValue.endsWith('"')) ||
	            (attrValue.startsWith("'") && attrValue.endsWith("'"))) {
	            return attrValue.slice(1, attrValue.length - 1);
	        }
	        return attrValue;
	    }
	}
	const regexIf = new RegExp('{\\s*#if\\s.*?}', 'gms');
	const regexIfEnd = new RegExp('{\\s*/if}', 'gms');
	const regexEach = new RegExp('{\\s*#each\\s.*?}', 'gms');
	const regexEachEnd = new RegExp('{\\s*/each}', 'gms');
	const regexAwait = new RegExp('{\\s*#await\\s.*?}', 'gms');
	const regexAwaitEnd = new RegExp('{\\s*/await}', 'gms');
	const regexHtml = new RegExp('{\\s*@html\\s.*?', 'gms');
	function extractTags(text, tag, html) {
	    const rootNodes = html?.roots || (0, parseHtml_1.parseHtml)(text).roots;
	    const matchedNodes = rootNodes
	        .filter((node) => node.tag === tag)
	        .filter((tag) => {
	        return isNotInsideControlFlowTag(tag) && isNotInsideHtmlTag(tag);
	    });
	    return matchedNodes.map(transformToTagInfo);
	    function isNotInsideControlFlowTag(tag) {
	        const tagIndex = rootNodes.indexOf(tag);
	        if (tagIndex === 0) {
	            const startContent = text.substring(0, tag.start);
	            if (startContent.trim() === '') {
	                return true;
	            }
	        }
	        const nodes = rootNodes.slice(tagIndex);
	        const rootContentAfterTag = nodes
	            .map((node, idx) => {
	            const start = node.startTagEnd ? node.end : node.start + (node.tag?.length || 0);
	            return text.substring(start, nodes[idx + 1]?.start);
	        })
	            .join('');
	        return ![
	            [regexIf, regexIfEnd],
	            [regexEach, regexEachEnd],
	            [regexAwait, regexAwaitEnd]
	        ].some((pair) => {
	            pair[0].lastIndex = 0;
	            pair[1].lastIndex = 0;
	            const start = pair[0].exec(rootContentAfterTag);
	            const end = pair[1].exec(rootContentAfterTag);
	            return (end?.index ?? text.length) < (start?.index ?? text.length);
	        });
	    }
	    function isNotInsideHtmlTag(tag) {
	        const nodes = rootNodes.slice(0, rootNodes.indexOf(tag));
	        const rootContentBeforeTag = [{ start: 0, end: 0 }, ...nodes]
	            .map((node, idx) => {
	            return text.substring(node.end, nodes[idx]?.start);
	        })
	            .join('');
	        return !((0, utils_1.regexLastIndexOf)(rootContentBeforeTag, regexHtml) >
	            rootContentBeforeTag.lastIndexOf('}'));
	    }
	    function transformToTagInfo(matchedNode) {
	        const start = matchedNode.startTagEnd ?? matchedNode.start;
	        const end = matchedNode.endTagStart ?? matchedNode.end;
	        const startPos = positionAt(start, text);
	        const endPos = positionAt(end, text);
	        const container = {
	            start: matchedNode.start,
	            end: matchedNode.end
	        };
	        const content = text.substring(start, end);
	        return {
	            content,
	            attributes: parseAttributes(matchedNode.attributes),
	            start,
	            end,
	            startPos,
	            endPos,
	            container
	        };
	    }
	}
	function extractScriptTags(source, html) {
	    const scripts = extractTags(source, 'script', html);
	    if (!scripts.length) {
	        return null;
	    }
	    const script = scripts.find((s) => s.attributes['context'] !== 'module' && !('module' in s.attributes));
	    const moduleScript = scripts.find((s) => s.attributes['context'] === 'module' || 'module' in s.attributes);
	    return { script, moduleScript };
	}
	function extractStyleTag(source, html) {
	    const styles = extractTags(source, 'style', html);
	    if (!styles.length) {
	        return null;
	    }
	    return styles[0];
	}
	function extractTemplateTag(source, html) {
	    const templates = extractTags(source, 'template', html);
	    if (!templates.length) {
	        return null;
	    }
	    return templates[0];
	}
	function positionAt(offset, text, lineOffsets = getLineOffsets(text)) {
	    offset = (0, utils_1.clamp)(offset, 0, text.length);
	    let low = 0;
	    let high = lineOffsets.length;
	    if (high === 0) {
	        return vscode_languageserver_1.Position.create(0, offset);
	    }
	    while (low <= high) {
	        const mid = Math.floor((low + high) / 2);
	        const lineOffset = lineOffsets[mid];
	        if (lineOffset === offset) {
	            return vscode_languageserver_1.Position.create(mid, 0);
	        }
	        else if (offset > lineOffset) {
	            low = mid + 1;
	        }
	        else {
	            high = mid - 1;
	        }
	    }
	    const line = low - 1;
	    return vscode_languageserver_1.Position.create(line, offset - lineOffsets[line]);
	}
	function offsetAt(position, text, lineOffsets = getLineOffsets(text)) {
	    if (position.line >= lineOffsets.length) {
	        return text.length;
	    }
	    else if (position.line < 0) {
	        return 0;
	    }
	    const lineOffset = lineOffsets[position.line];
	    const nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : text.length;
	    return (0, utils_1.clamp)(nextLineOffset, lineOffset, lineOffset + position.character);
	}
	function getLineOffsets(text) {
	    const lineOffsets = [];
	    let isLineStart = true;
	    for (let i = 0; i < text.length; i++) {
	        if (isLineStart) {
	            lineOffsets.push(i);
	            isLineStart = false;
	        }
	        const ch = text.charAt(i);
	        isLineStart = ch === '\r' || ch === '\n';
	        if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
	            i++;
	        }
	    }
	    if (isLineStart && text.length > 0) {
	        lineOffsets.push(text.length);
	    }
	    return lineOffsets;
	}
	function isInTag(position, tagInfo) {
	    return !!tagInfo && (0, utils_1.isInRange)(vscode_languageserver_1.Range.create(tagInfo.startPos, tagInfo.endPos), position);
	}
	function isRangeInTag(range, tagInfo) {
	    return isInTag(range.start, tagInfo) && isInTag(range.end, tagInfo);
	}
	function getTextInRange(range, text) {
	    return text.substring(offsetAt(range.start, text), offsetAt(range.end, text));
	}
	function getLineAtPosition(position, text) {
	    return text.substring(offsetAt({ line: position.line, character: 0 }, text), offsetAt({ line: position.line, character: Number.MAX_VALUE }, text));
	}
	function isAtEndOfLine(line, offset) {
	    return [undefined, '\r', '\n'].includes(line[offset]);
	}
	function updateRelativeImport(oldPath, newPath, relativeImportPath) {
	    let newImportPath = path
	        .join(path.relative(newPath, oldPath), relativeImportPath)
	        .replace(/\\/g, '/');
	    if (!newImportPath.startsWith('.')) {
	        newImportPath = './' + newImportPath;
	    }
	    return newImportPath;
	}
	function getNodeIfIsInComponentStartTag(html, document, offset) {
	    const node = html.findNodeAt(offset);
	    if (!!node.tag &&
	        (node.tag[0] === node.tag[0].toUpperCase() ||
	            (document.isSvelte5 && node.tag.includes('.'))) &&
	        (!node.startTagEnd || offset < node.startTagEnd)) {
	        return node;
	    }
	}
	function getNodeIfIsInHTMLStartTag(html, offset) {
	    const node = html.findNodeAt(offset);
	    if (!!node.tag &&
	        node.tag[0] === node.tag[0].toLowerCase() &&
	        (!node.startTagEnd || offset < node.startTagEnd)) {
	        return node;
	    }
	}
	function getNodeIfIsInTagName(html, offset) {
	    const node = html.findNodeAt(offset);
	    if (!!node.tag &&
	        node.tag[0] === node.tag[0].toLowerCase() &&
	        (offset <= node.start + 1 + (node.tag.length ?? 0) ||
	            (node.endTagStart && offset >= node.endTagStart && offset <= node.end))) {
	        return node;
	    }
	}
	function getNodeIfIsInStartTag(html, offset) {
	    const node = html.findNodeAt(offset);
	    if (!!node.tag && (!node.startTagEnd || offset < node.startTagEnd)) {
	        return node;
	    }
	}
	function isInHTMLTagRange(html, offset) {
	    const node = html.findNodeAt(offset);
	    return (!!node.tag &&
	        node.tag[0] === node.tag[0].toLowerCase() &&
	        (node.start + node.tag.length + 1 >= offset ||
	            (!!node.endTagStart && node.endTagStart <= offset)));
	}
	function getWordRangeAt(str, pos, delimiterRegex = { left: /\S+$/, right: /\s/ }) {
	    let start = str.slice(0, pos).search(delimiterRegex.left);
	    if (start < 0) {
	        start = pos;
	    }
	    let end = str.slice(pos).search(delimiterRegex.right);
	    if (end < 0) {
	        end = str.length;
	    }
	    else {
	        end = end + pos;
	    }
	    return { start, end };
	}
	function getWordAt(str, pos, delimiterRegex = { left: /\S+$/, right: /\s/ }) {
	    const { start, end } = getWordRangeAt(str, pos, delimiterRegex);
	    return str.slice(start, end);
	}
	function toRange(str, start, end) {
	    if (typeof str === 'string') {
	        return vscode_languageserver_1.Range.create(positionAt(start, str), positionAt(end, str));
	    }
	    return vscode_languageserver_1.Range.create(str.positionAt(start), str.positionAt(end));
	}
	function getLangAttribute(...tags) {
	    const tag = tags.find((tag) => tag?.attributes.lang || tag?.attributes.type);
	    if (!tag) {
	        return null;
	    }
	    const attribute = tag.attributes.lang || tag.attributes.type;
	    if (!attribute) {
	        return null;
	    }
	    return attribute.replace(/^text\//, '');
	}
	function inStyleOrScript(document, position) {
	    return (isInTag(position, document.styleInfo) ||
	        isInTag(position, document.scriptInfo) ||
	        isInTag(position, document.moduleScriptInfo));
	}
	const backtickCode = '`'.charCodeAt(0);
	const braceStartCode = '{'.charCodeAt(0);
	const braceEndCode = '}'.charCodeAt(0);
	const singleQuoteCode = "'".charCodeAt(0);
	const doubleQuoteCode = '"'.charCodeAt(0);
	const forwardSlashCode = '/'.charCodeAt(0);
	const starCode = '*'.charCodeAt(0);
	const crCode = '\r'.charCodeAt(0);
	const lfCode = '\n'.charCodeAt(0);
	const escapeCode = 92;
	const dollarCode = '$'.charCodeAt(0);
	function scanMatchingBraces(html, startOffset) {
	    if (html.charCodeAt(startOffset) !== braceStartCode) {
	        return { terminated: true, endOffset: startOffset };
	    }
	    let depth = 0;
	    let templateStack;
	    let index = startOffset;
	    while (index < html.length) {
	        const char = html.charCodeAt(index);
	        switch (char) {
	            case braceStartCode:
	                depth++;
	                break;
	            case braceEndCode:
	                if (depth > 0) {
	                    depth--;
	                }
	                if (depth === 0 && templateStack !== undefined && templateStack.length > 0) {
	                    depth = templateStack.pop() || 0;
	                    scanTemplateString();
	                }
	                break;
	            case singleQuoteCode:
	            case doubleQuoteCode: {
	                index++;
	                scanString(char);
	                break;
	            }
	            case backtickCode:
	                index++;
	                scanTemplateString();
	                break;
	            case forwardSlashCode: {
	                const nextChar = html.charCodeAt(index + 1);
	                if (nextChar === forwardSlashCode) {
	                    skipToNewLine();
	                }
	                else if (nextChar === starCode) {
	                    index += 2;
	                    skipToEndOfMultiLineComment();
	                }
	                break;
	            }
	        }
	        index++;
	        if (depth === 0 && (templateStack === undefined || templateStack.length === 0)) {
	            return { terminated: true, endOffset: index };
	        }
	    }
	    return { terminated: false, endOffset: index };
	    function scanString(quote) {
	        while (index < html.length) {
	            const char = html.charCodeAt(index);
	            if (char === quote || char == lfCode) {
	                return;
	            }
	            if (char === escapeCode) {
	                index += 2;
	                continue;
	            }
	            index++;
	        }
	    }
	    function scanTemplateString() {
	        while (index < html.length) {
	            const char = html.charCodeAt(index);
	            switch (char) {
	                case backtickCode:
	                    return;
	                case dollarCode:
	                    if (html.charCodeAt(index + 1) === braceStartCode) {
	                        templateStack = templateStack || [];
	                        templateStack.push(depth);
	                        depth = 0;
	                        return;
	                    }
	                    break;
	                case escapeCode:
	                    index++;
	                    break;
	            }
	            index++;
	        }
	        return;
	    }
	    function skipToNewLine() {
	        while (index < html.length) {
	            const char = html.charCodeAt(index);
	            if (char === crCode || char === lfCode) {
	                return;
	            }
	            index++;
	        }
	    }
	    function skipToEndOfMultiLineComment() {
	        while (index < html.length) {
	            const char = html.charCodeAt(index);
	            if (char === starCode && html.charCodeAt(index + 1) === forwardSlashCode) {
	                index += 2;
	                return;
	            }
	            index++;
	        }
	    }
	}
	function isInsideMoustacheTag(text, tagStart, offset) {
	    const firstBraceIndex = text.indexOf('{', tagStart);
	    if (firstBraceIndex > offset) {
	        return false;
	    }
	    let index = firstBraceIndex;
	    while (index < offset) {
	        if (text.charCodeAt(index) !== braceStartCode) {
	            index++;
	            continue;
	        }
	        const result = scanMatchingBraces(text, index);
	        if (!result.terminated) {
	            return true;
	        }
	        index = result.endOffset;
	    }
	    return index > offset;
	}
	return utils$5;
}

Object.defineProperty(DocumentBase, "__esModule", { value: true });
DocumentBase.WritableDocument = DocumentBase.ReadableDocument = void 0;
const utils_1$K = requireUtils$2();
class ReadableDocument {
    constructor() {
        this.version = 0;
    }
    getTextLength() {
        return this.getText().length;
    }
    positionAt(offset) {
        return (0, utils_1$K.positionAt)(offset, this.getText(), this.getLineOffsets());
    }
    offsetAt(position) {
        return (0, utils_1$K.offsetAt)(position, this.getText(), this.getLineOffsets());
    }
    getLineOffsets() {
        if (!this.lineOffsets) {
            this.lineOffsets = (0, utils_1$K.getLineOffsets)(this.getText());
        }
        return this.lineOffsets;
    }
    get uri() {
        return this.getURL();
    }
    get lineCount() {
        return this.getLineOffsets().length;
    }
}
DocumentBase.ReadableDocument = ReadableDocument;
class WritableDocument extends ReadableDocument {
    update(changes) {
        let newText = this.getText();
        for (const change of changes) {
            if ('range' in change) {
                const lineOffsets = (0, utils_1$K.getLineOffsets)(newText);
                const start = (0, utils_1$K.offsetAt)(change.range.start, newText, lineOffsets);
                const end = (0, utils_1$K.offsetAt)(change.range.end, newText, lineOffsets);
                newText = newText.slice(0, start) + change.text + newText.slice(end);
            }
            else {
                newText = change.text;
            }
        }
        this.setText(newText);
    }
}
DocumentBase.WritableDocument = WritableDocument;

var configLoader = {};

var logger = {};

Object.defineProperty(logger, "__esModule", { value: true });
logger.Logger = void 0;
class Logger {
    static setLogErrorsOnly(logErrorsOnly) {
        Logger.logErrorsOnly = logErrorsOnly;
    }
    static setDebug(debug) {
        this.logDebug = debug;
    }
    static log(...args) {
        if (!Logger.logErrorsOnly) {
            console.log(...args);
        }
    }
    static error(...args) {
        console.error(...args);
    }
    static debug(...args) {
        if (!Logger.logErrorsOnly && this.logDebug) {
            console.log(...args);
        }
    }
}
logger.Logger = Logger;
Logger.logErrorsOnly = false;
Logger.logDebug = false;

var importPackage = {};

Object.defineProperty(importPackage, "__esModule", { value: true });
importPackage.setIsTrusted = setIsTrusted;
importPackage.getPackageInfo = getPackageInfo;
importPackage.importPrettier = importPrettier;
importPackage.importSvelte = importSvelte;
importPackage.importSveltePreprocess = importSveltePreprocess;
const path_1$g = path$1;
const logger_1$a = logger;
let isTrusted = true;
function setIsTrusted(_isTrusted) {
    isTrusted = _isTrusted;
}
function dynamicRequire(dynamicFileToRequire) {
    return require(dynamicFileToRequire);
}
function getPackageInfo(packageName, fromPath, use_fallback = true) {
    const paths = [];
    if (isTrusted) {
        paths.push(fromPath);
    }
    if (use_fallback) {
        paths.push(__dirname);
    }
    const packageJSONPath = require.resolve(`${packageName}/package.json`, {
        paths
    });
    const { version } = dynamicRequire(packageJSONPath);
    const [major, minor, patch] = version.split('.');
    return {
        path: (0, path_1$g.dirname)(packageJSONPath),
        version: {
            full: version,
            major: Number(major),
            minor: Number(minor),
            patch: Number(patch)
        }
    };
}
function importPrettier(fromPath) {
    const pkg = getPackageInfo('prettier', fromPath);
    const main = (0, path_1$g.resolve)(pkg.path);
    logger_1$a.Logger.debug('Using Prettier v' + pkg.version.full, 'from', main);
    return dynamicRequire(main);
}
function importSvelte(fromPath) {
    const pkg = getPackageInfo('svelte', fromPath);
    const main = (0, path_1$g.resolve)(pkg.path, 'compiler');
    logger_1$a.Logger.debug('Using Svelte v' + pkg.version.full, 'from', main);
    if (pkg.version.major === 4) {
        return dynamicRequire(main + '.cjs');
    }
    else {
        return dynamicRequire(main);
    }
}
function importSveltePreprocess(fromPath) {
    const pkg = getPackageInfo('svelte-preprocess', fromPath, false
    );
    const main = (0, path_1$g.resolve)(pkg.path);
    logger_1$a.Logger.debug('Using svelte-preprocess v' + pkg.version.full, 'from', main);
    return dynamicRequire(main);
}

var dist = {};

var builder = {};

var apiBuilder = {};

var async = {};

var walker = {};

var utils$4 = {};

Object.defineProperty(utils$4, "__esModule", { value: true });
utils$4.convertSlashes = utils$4.cleanPath = void 0;
const path_1$f = path$1;
function cleanPath(path) {
    let normalized = (0, path_1$f.normalize)(path);
    if (normalized.length > 1 && normalized[normalized.length - 1] === path_1$f.sep)
        normalized = normalized.substring(0, normalized.length - 1);
    return normalized;
}
utils$4.cleanPath = cleanPath;
const SLASHES_REGEX = /[\\/]/g;
function convertSlashes(path, separator) {
    return path.replace(SLASHES_REGEX, separator);
}
utils$4.convertSlashes = convertSlashes;

var joinPath$4 = {};

Object.defineProperty(joinPath$4, "__esModule", { value: true });
joinPath$4.build = joinPath$4.joinDirectoryPath = void 0;
function joinPathWithBasePath(filename, directoryPath) {
    return directoryPath + filename;
}
function joinPathWithRelativePath(root) {
    return function (filename, directoryPath) {
        return directoryPath.substring(root.length) + filename;
    };
}
function joinPath$3(filename) {
    return filename;
}
function joinDirectoryPath(filename, directoryPath, separator) {
    return directoryPath + filename + separator;
}
joinPath$4.joinDirectoryPath = joinDirectoryPath;
function build$7(root, options) {
    const { relativePaths, includeBasePath } = options;
    return relativePaths && root
        ? joinPathWithRelativePath(root)
        : includeBasePath
            ? joinPathWithBasePath
            : joinPath$3;
}
joinPath$4.build = build$7;

var pushDirectory$2 = {};

Object.defineProperty(pushDirectory$2, "__esModule", { value: true });
pushDirectory$2.build = void 0;
function pushDirectoryWithRelativePath(root) {
    return function (directoryPath, paths) {
        paths.push((directoryPath || ".").substring(root.length));
    };
}
function pushDirectoryFilterWithRelativePath(root) {
    return function (directoryPath, paths, filters) {
        const relativePath = directoryPath.substring(root.length);
        if (filters.every((filter) => filter(relativePath, true))) {
            paths.push(relativePath);
        }
    };
}
const pushDirectory$1 = (directoryPath, paths) => {
    paths.push(directoryPath || ".");
};
const pushDirectoryFilter = (directoryPath, paths, filters) => {
    if (filters.every((filter) => filter(directoryPath, true))) {
        paths.push(directoryPath);
    }
};
const empty$2 = () => { };
function build$6(root, options) {
    const { includeDirs, filters, relativePaths } = options;
    if (!includeDirs)
        return empty$2;
    if (relativePaths)
        return filters && filters.length
            ? pushDirectoryFilterWithRelativePath(root)
            : pushDirectoryWithRelativePath(root);
    return filters && filters.length ? pushDirectoryFilter : pushDirectory$1;
}
pushDirectory$2.build = build$6;

var pushFile$2 = {};

Object.defineProperty(pushFile$2, "__esModule", { value: true });
pushFile$2.build = void 0;
const pushFileFilterAndCount = (filename, _paths, counts, filters) => {
    if (filters.every((filter) => filter(filename, false)))
        counts.files++;
};
const pushFileFilter = (filename, paths, _counts, filters) => {
    if (filters.every((filter) => filter(filename, false)))
        paths.push(filename);
};
const pushFileCount = (_filename, _paths, counts, _filters) => {
    counts.files++;
};
const pushFile$1 = (filename, paths) => {
    paths.push(filename);
};
const empty$1 = () => { };
function build$5(options) {
    const { excludeFiles, filters, onlyCounts } = options;
    if (excludeFiles)
        return empty$1;
    if (filters && filters.length) {
        return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
    }
    else if (onlyCounts) {
        return pushFileCount;
    }
    else {
        return pushFile$1;
    }
}
pushFile$2.build = build$5;

var getArray$2 = {};

Object.defineProperty(getArray$2, "__esModule", { value: true });
getArray$2.build = void 0;
const getArray$1 = (paths) => {
    return paths;
};
const getArrayGroup = () => {
    return [""].slice(0, 0);
};
function build$4(options) {
    return options.group ? getArrayGroup : getArray$1;
}
getArray$2.build = build$4;

var groupFiles$2 = {};

Object.defineProperty(groupFiles$2, "__esModule", { value: true });
groupFiles$2.build = void 0;
const groupFiles$1 = (groups, directory, files) => {
    groups.push({ directory, files, dir: directory });
};
const empty = () => { };
function build$3(options) {
    return options.group ? groupFiles$1 : empty;
}
groupFiles$2.build = build$3;

var resolveSymlink$1 = {};

var __importDefault$t = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(resolveSymlink$1, "__esModule", { value: true });
resolveSymlink$1.build = void 0;
const fs_1$3 = __importDefault$t(fs$1);
const resolveSymlinksAsync = function (path, state, callback) {
    const { queue, options: { suppressErrors }, } = state;
    queue.enqueue();
    fs_1$3.default.realpath(path, (error, resolvedPath) => {
        if (error) {
            queue.dequeue(suppressErrors ? null : error, state);
            return;
        }
        fs_1$3.default.lstat(resolvedPath, (_error, stat) => {
            callback(stat, resolvedPath);
            queue.dequeue(null, state);
        });
    });
};
const resolveSymlinksSync = function (path, state, callback) {
    try {
        const resolvedPath = fs_1$3.default.realpathSync(path);
        const stat = fs_1$3.default.lstatSync(resolvedPath);
        callback(stat, resolvedPath);
    }
    catch (e) {
        if (!state.options.suppressErrors)
            throw e;
    }
};
function build$2(options, isSynchronous) {
    if (!options.resolveSymlinks)
        return null;
    return isSynchronous ? resolveSymlinksSync : resolveSymlinksAsync;
}
resolveSymlink$1.build = build$2;

var invokeCallback$1 = {};

Object.defineProperty(invokeCallback$1, "__esModule", { value: true });
invokeCallback$1.build = void 0;
const onlyCountsSync = (state) => {
    return state.counts;
};
const groupsSync = (state) => {
    return state.groups;
};
const defaultSync = (state) => {
    return state.paths;
};
const limitFilesSync = (state) => {
    return state.paths.slice(0, state.options.maxFiles);
};
const onlyCountsAsync = (state, error, callback) => {
    report(error, callback, state.counts, state.options.suppressErrors);
    return null;
};
const defaultAsync = (state, error, callback) => {
    report(error, callback, state.paths, state.options.suppressErrors);
    return null;
};
const limitFilesAsync = (state, error, callback) => {
    report(error, callback, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
    return null;
};
const groupsAsync = (state, error, callback) => {
    report(error, callback, state.groups, state.options.suppressErrors);
    return null;
};
function report(error, callback, output, suppressErrors) {
    if (error && !suppressErrors)
        callback(error, output);
    else
        callback(null, output);
}
function build$1(options, isSynchronous) {
    const { onlyCounts, group, maxFiles } = options;
    if (onlyCounts)
        return isSynchronous
            ? onlyCountsSync
            : onlyCountsAsync;
    else if (group)
        return isSynchronous
            ? groupsSync
            : groupsAsync;
    else if (maxFiles)
        return isSynchronous
            ? limitFilesSync
            : limitFilesAsync;
    else
        return isSynchronous
            ? defaultSync
            : defaultAsync;
}
invokeCallback$1.build = build$1;

var walkDirectory$1 = {};

var __importDefault$s = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(walkDirectory$1, "__esModule", { value: true });
walkDirectory$1.build = void 0;
const fs_1$2 = __importDefault$s(fs$1);
const readdirOpts = { withFileTypes: true };
const walkAsync = (state, directoryPath, currentDepth, callback) => {
    state.queue.enqueue();
    if (currentDepth < 0) {
        state.queue.dequeue(null, state);
        return;
    }
    state.counts.directories++;
    fs_1$2.default.readdir(directoryPath || ".", readdirOpts, function process(error, entries = []) {
        callback(entries, directoryPath, currentDepth);
        state.queue.dequeue(state.options.suppressErrors ? null : error, state);
    });
};
const walkSync = (state, directoryPath, currentDepth, callback) => {
    if (currentDepth < 0) {
        return;
    }
    state.counts.directories++;
    let entries = [];
    try {
        entries = fs_1$2.default.readdirSync(directoryPath || ".", readdirOpts);
    }
    catch (e) {
        if (!state.options.suppressErrors)
            throw e;
    }
    callback(entries, directoryPath, currentDepth);
};
function build(isSynchronous) {
    return isSynchronous ? walkSync : walkAsync;
}
walkDirectory$1.build = build;

var queue = {};

Object.defineProperty(queue, "__esModule", { value: true });
queue.Queue = void 0;
class Queue {
    onQueueEmpty;
    count = 0;
    constructor(onQueueEmpty) {
        this.onQueueEmpty = onQueueEmpty;
    }
    enqueue() {
        this.count++;
    }
    dequeue(error, output) {
        if (--this.count === 0 || error)
            this.onQueueEmpty(error, output);
    }
}
queue.Queue = Queue;

var counter = {};

Object.defineProperty(counter, "__esModule", { value: true });
counter.Counter = void 0;
class Counter {
    _files = 0;
    _directories = 0;
    set files(num) {
        this._files = num;
    }
    get files() {
        return this._files;
    }
    set directories(num) {
        this._directories = num;
    }
    get directories() {
        return this._directories;
    }
    get dirs() {
        return this._directories;
    }
}
counter.Counter = Counter;

var __createBinding$2 = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault$2 = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar$2 = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$2(result, mod, k);
    __setModuleDefault$2(result, mod);
    return result;
};
Object.defineProperty(walker, "__esModule", { value: true });
walker.Walker = void 0;
const path_1$e = path$1;
const utils_1$J = utils$4;
const joinPath$2 = __importStar$2(joinPath$4);
const pushDirectory = __importStar$2(pushDirectory$2);
const pushFile = __importStar$2(pushFile$2);
const getArray = __importStar$2(getArray$2);
const groupFiles = __importStar$2(groupFiles$2);
const resolveSymlink = __importStar$2(resolveSymlink$1);
const invokeCallback = __importStar$2(invokeCallback$1);
const walkDirectory = __importStar$2(walkDirectory$1);
const queue_1 = queue;
const counter_1 = counter;
class Walker {
    root;
    isSynchronous;
    state;
    joinPath;
    pushDirectory;
    pushFile;
    getArray;
    groupFiles;
    resolveSymlink;
    walkDirectory;
    callbackInvoker;
    constructor(root, options, callback) {
        this.isSynchronous = !callback;
        this.callbackInvoker = invokeCallback.build(options, this.isSynchronous);
        this.state = {
            paths: [""].slice(0, 0),
            groups: [],
            counts: new counter_1.Counter(),
            options,
            queue: new queue_1.Queue((error, state) => this.callbackInvoker(state, error, callback)),
        };
        this.root = this.normalizePath(root);
        this.joinPath = joinPath$2.build(this.root, options);
        this.pushDirectory = pushDirectory.build(this.root, options);
        this.pushFile = pushFile.build(options);
        this.getArray = getArray.build(options);
        this.groupFiles = groupFiles.build(options);
        this.resolveSymlink = resolveSymlink.build(options, this.isSynchronous);
        this.walkDirectory = walkDirectory.build(this.isSynchronous);
    }
    start() {
        this.walkDirectory(this.state, this.root, this.state.options.maxDepth, this.walk);
        return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
    }
    normalizePath(path) {
        const { resolvePaths, normalizePath, pathSeparator } = this.state.options;
        const pathNeedsCleaning = (process.platform === "win32" && path.includes("/")) ||
            path.startsWith(".");
        if (resolvePaths)
            path = (0, path_1$e.resolve)(path);
        if (normalizePath || pathNeedsCleaning)
            path = (0, utils_1$J.cleanPath)(path);
        if (path === ".")
            return "";
        const needsSeperator = path[path.length - 1] !== pathSeparator;
        return (0, utils_1$J.convertSlashes)(needsSeperator ? path + pathSeparator : path, pathSeparator);
    }
    walk = (entries, directoryPath, depth) => {
        const { paths, options: { filters, resolveSymlinks, exclude, maxFiles, signal }, } = this.state;
        if ((signal && signal.aborted) || (maxFiles && paths.length > maxFiles))
            return;
        this.pushDirectory(directoryPath, paths, filters);
        const files = this.getArray(this.state.paths);
        for (let i = 0; i < entries.length; ++i) {
            const entry = entries[i];
            if (entry.isFile() || (entry.isSymbolicLink() && !resolveSymlinks)) {
                const filename = this.joinPath(entry.name, directoryPath);
                this.pushFile(filename, files, this.state.counts, filters);
            }
            else if (entry.isDirectory()) {
                let path = joinPath$2.joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
                if (exclude && exclude(entry.name, path))
                    continue;
                this.walkDirectory(this.state, path, depth - 1, this.walk);
            }
            else if (entry.isSymbolicLink() && resolveSymlinks) {
                let path = joinPath$2.joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
                this.resolveSymlink(path, this.state, (stat, resolvedPath) => {
                    if (stat.isDirectory()) {
                        resolvedPath = this.normalizePath(resolvedPath);
                        if (exclude && exclude(entry.name, resolvedPath))
                            return;
                        this.walkDirectory(this.state, resolvedPath, depth - 1, this.walk);
                    }
                    else {
                        this.pushFile(resolvedPath, files, this.state.counts, filters);
                    }
                });
            }
        }
        this.groupFiles(this.state.groups, directoryPath, files);
    };
}
walker.Walker = Walker;

Object.defineProperty(async, "__esModule", { value: true });
async.callback = async.promise = void 0;
const walker_1$1 = walker;
function promise(root, options) {
    return new Promise((resolve, reject) => {
        callback(root, options, (err, output) => {
            if (err)
                return reject(err);
            resolve(output);
        });
    });
}
async.promise = promise;
function callback(root, options, callback) {
    let walker = new walker_1$1.Walker(root, options, callback);
    walker.start();
}
async.callback = callback;

var sync$1 = {};

Object.defineProperty(sync$1, "__esModule", { value: true });
sync$1.sync = void 0;
const walker_1 = walker;
function sync(root, options) {
    const walker = new walker_1.Walker(root, options);
    return walker.start();
}
sync$1.sync = sync;

Object.defineProperty(apiBuilder, "__esModule", { value: true });
apiBuilder.APIBuilder = void 0;
const async_1 = async;
const sync_1 = sync$1;
class APIBuilder {
    root;
    options;
    constructor(root, options) {
        this.root = root;
        this.options = options;
    }
    withPromise() {
        return (0, async_1.promise)(this.root, this.options);
    }
    withCallback(cb) {
        (0, async_1.callback)(this.root, this.options, cb);
    }
    sync() {
        return (0, sync_1.sync)(this.root, this.options);
    }
}
apiBuilder.APIBuilder = APIBuilder;

var utils$3 = {};

var constants;
var hasRequiredConstants;
function requireConstants () {
	if (hasRequiredConstants) return constants;
	hasRequiredConstants = 1;
	const WIN_SLASH = '\\\\/';
	const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
	const DOT_LITERAL = '\\.';
	const PLUS_LITERAL = '\\+';
	const QMARK_LITERAL = '\\?';
	const SLASH_LITERAL = '\\/';
	const ONE_CHAR = '(?=.)';
	const QMARK = '[^/]';
	const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
	const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
	const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
	const NO_DOT = `(?!${DOT_LITERAL})`;
	const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
	const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
	const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
	const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
	const STAR = `${QMARK}*?`;
	const SEP = '/';
	const POSIX_CHARS = {
	  DOT_LITERAL,
	  PLUS_LITERAL,
	  QMARK_LITERAL,
	  SLASH_LITERAL,
	  ONE_CHAR,
	  QMARK,
	  END_ANCHOR,
	  DOTS_SLASH,
	  NO_DOT,
	  NO_DOTS,
	  NO_DOT_SLASH,
	  NO_DOTS_SLASH,
	  QMARK_NO_DOT,
	  STAR,
	  START_ANCHOR,
	  SEP
	};
	const WINDOWS_CHARS = {
	  ...POSIX_CHARS,
	  SLASH_LITERAL: `[${WIN_SLASH}]`,
	  QMARK: WIN_NO_SLASH,
	  STAR: `${WIN_NO_SLASH}*?`,
	  DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
	  NO_DOT: `(?!${DOT_LITERAL})`,
	  NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
	  NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
	  NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
	  QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
	  START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
	  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
	  SEP: '\\'
	};
	const POSIX_REGEX_SOURCE = {
	  alnum: 'a-zA-Z0-9',
	  alpha: 'a-zA-Z',
	  ascii: '\\x00-\\x7F',
	  blank: ' \\t',
	  cntrl: '\\x00-\\x1F\\x7F',
	  digit: '0-9',
	  graph: '\\x21-\\x7E',
	  lower: 'a-z',
	  print: '\\x20-\\x7E ',
	  punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
	  space: ' \\t\\r\\n\\v\\f',
	  upper: 'A-Z',
	  word: 'A-Za-z0-9_',
	  xdigit: 'A-Fa-f0-9'
	};
	constants = {
	  MAX_LENGTH: 1024 * 64,
	  POSIX_REGEX_SOURCE,
	  REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
	  REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
	  REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
	  REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
	  REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
	  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
	  REPLACEMENTS: {
	    __proto__: null,
	    '***': '*',
	    '**/**': '**',
	    '**/**/**': '**'
	  },
	  CHAR_0: 48,
	  CHAR_9: 57,
	  CHAR_UPPERCASE_A: 65,
	  CHAR_LOWERCASE_A: 97,
	  CHAR_UPPERCASE_Z: 90,
	  CHAR_LOWERCASE_Z: 122,
	  CHAR_LEFT_PARENTHESES: 40,
	  CHAR_RIGHT_PARENTHESES: 41,
	  CHAR_ASTERISK: 42,
	  CHAR_AMPERSAND: 38,
	  CHAR_AT: 64,
	  CHAR_BACKWARD_SLASH: 92,
	  CHAR_CARRIAGE_RETURN: 13,
	  CHAR_CIRCUMFLEX_ACCENT: 94,
	  CHAR_COLON: 58,
	  CHAR_COMMA: 44,
	  CHAR_DOT: 46,
	  CHAR_DOUBLE_QUOTE: 34,
	  CHAR_EQUAL: 61,
	  CHAR_EXCLAMATION_MARK: 33,
	  CHAR_FORM_FEED: 12,
	  CHAR_FORWARD_SLASH: 47,
	  CHAR_GRAVE_ACCENT: 96,
	  CHAR_HASH: 35,
	  CHAR_HYPHEN_MINUS: 45,
	  CHAR_LEFT_ANGLE_BRACKET: 60,
	  CHAR_LEFT_CURLY_BRACE: 123,
	  CHAR_LEFT_SQUARE_BRACKET: 91,
	  CHAR_LINE_FEED: 10,
	  CHAR_NO_BREAK_SPACE: 160,
	  CHAR_PERCENT: 37,
	  CHAR_PLUS: 43,
	  CHAR_QUESTION_MARK: 63,
	  CHAR_RIGHT_ANGLE_BRACKET: 62,
	  CHAR_RIGHT_CURLY_BRACE: 125,
	  CHAR_RIGHT_SQUARE_BRACKET: 93,
	  CHAR_SEMICOLON: 59,
	  CHAR_SINGLE_QUOTE: 39,
	  CHAR_SPACE: 32,
	  CHAR_TAB: 9,
	  CHAR_UNDERSCORE: 95,
	  CHAR_VERTICAL_LINE: 124,
	  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
	  extglobChars(chars) {
	    return {
	      '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
	      '?': { type: 'qmark', open: '(?:', close: ')?' },
	      '+': { type: 'plus', open: '(?:', close: ')+' },
	      '*': { type: 'star', open: '(?:', close: ')*' },
	      '@': { type: 'at', open: '(?:', close: ')' }
	    };
	  },
	  globChars(win32) {
	    return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
	  }
	};
	return constants;
}

var hasRequiredUtils$1;
function requireUtils$1 () {
	if (hasRequiredUtils$1) return utils$3;
	hasRequiredUtils$1 = 1;
	(function (exports) {
		const {
		  REGEX_BACKSLASH,
		  REGEX_REMOVE_BACKSLASH,
		  REGEX_SPECIAL_CHARS,
		  REGEX_SPECIAL_CHARS_GLOBAL
		} = requireConstants();
		exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
		exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
		exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
		exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
		exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
		exports.isWindows = () => {
		  if (typeof navigator !== 'undefined' && navigator.platform) {
		    const platform = navigator.platform.toLowerCase();
		    return platform === 'win32' || platform === 'windows';
		  }
		  if (typeof process !== 'undefined' && process.platform) {
		    return process.platform === 'win32';
		  }
		  return false;
		};
		exports.removeBackslashes = str => {
		  return str.replace(REGEX_REMOVE_BACKSLASH, match => {
		    return match === '\\' ? '' : match;
		  });
		};
		exports.escapeLast = (input, char, lastIdx) => {
		  const idx = input.lastIndexOf(char, lastIdx);
		  if (idx === -1) return input;
		  if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
		  return `${input.slice(0, idx)}\\${input.slice(idx)}`;
		};
		exports.removePrefix = (input, state = {}) => {
		  let output = input;
		  if (output.startsWith('./')) {
		    output = output.slice(2);
		    state.prefix = './';
		  }
		  return output;
		};
		exports.wrapOutput = (input, state = {}, options = {}) => {
		  const prepend = options.contains ? '' : '^';
		  const append = options.contains ? '' : '$';
		  let output = `${prepend}(?:${input})${append}`;
		  if (state.negated === true) {
		    output = `(?:^(?!${output}).*$)`;
		  }
		  return output;
		};
		exports.basename = (path, { windows } = {}) => {
		  const segs = path.split(windows ? /[\\/]/ : '/');
		  const last = segs[segs.length - 1];
		  if (last === '') {
		    return segs[segs.length - 2];
		  }
		  return last;
		};
	} (utils$3));
	return utils$3;
}

var scan_1;
var hasRequiredScan;
function requireScan () {
	if (hasRequiredScan) return scan_1;
	hasRequiredScan = 1;
	const utils = requireUtils$1();
	const {
	  CHAR_ASTERISK,
	  CHAR_AT,
	  CHAR_BACKWARD_SLASH,
	  CHAR_COMMA,
	  CHAR_DOT,
	  CHAR_EXCLAMATION_MARK,
	  CHAR_FORWARD_SLASH,
	  CHAR_LEFT_CURLY_BRACE,
	  CHAR_LEFT_PARENTHESES,
	  CHAR_LEFT_SQUARE_BRACKET,
	  CHAR_PLUS,
	  CHAR_QUESTION_MARK,
	  CHAR_RIGHT_CURLY_BRACE,
	  CHAR_RIGHT_PARENTHESES,
	  CHAR_RIGHT_SQUARE_BRACKET
	} = requireConstants();
	const isPathSeparator = code => {
	  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
	};
	const depth = token => {
	  if (token.isPrefix !== true) {
	    token.depth = token.isGlobstar ? Infinity : 1;
	  }
	};
	const scan = (input, options) => {
	  const opts = options || {};
	  const length = input.length - 1;
	  const scanToEnd = opts.parts === true || opts.scanToEnd === true;
	  const slashes = [];
	  const tokens = [];
	  const parts = [];
	  let str = input;
	  let index = -1;
	  let start = 0;
	  let lastIndex = 0;
	  let isBrace = false;
	  let isBracket = false;
	  let isGlob = false;
	  let isExtglob = false;
	  let isGlobstar = false;
	  let braceEscaped = false;
	  let backslashes = false;
	  let negated = false;
	  let negatedExtglob = false;
	  let finished = false;
	  let braces = 0;
	  let prev;
	  let code;
	  let token = { value: '', depth: 0, isGlob: false };
	  const eos = () => index >= length;
	  const peek = () => str.charCodeAt(index + 1);
	  const advance = () => {
	    prev = code;
	    return str.charCodeAt(++index);
	  };
	  while (index < length) {
	    code = advance();
	    let next;
	    if (code === CHAR_BACKWARD_SLASH) {
	      backslashes = token.backslashes = true;
	      code = advance();
	      if (code === CHAR_LEFT_CURLY_BRACE) {
	        braceEscaped = true;
	      }
	      continue;
	    }
	    if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
	      braces++;
	      while (eos() !== true && (code = advance())) {
	        if (code === CHAR_BACKWARD_SLASH) {
	          backslashes = token.backslashes = true;
	          advance();
	          continue;
	        }
	        if (code === CHAR_LEFT_CURLY_BRACE) {
	          braces++;
	          continue;
	        }
	        if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
	          isBrace = token.isBrace = true;
	          isGlob = token.isGlob = true;
	          finished = true;
	          if (scanToEnd === true) {
	            continue;
	          }
	          break;
	        }
	        if (braceEscaped !== true && code === CHAR_COMMA) {
	          isBrace = token.isBrace = true;
	          isGlob = token.isGlob = true;
	          finished = true;
	          if (scanToEnd === true) {
	            continue;
	          }
	          break;
	        }
	        if (code === CHAR_RIGHT_CURLY_BRACE) {
	          braces--;
	          if (braces === 0) {
	            braceEscaped = false;
	            isBrace = token.isBrace = true;
	            finished = true;
	            break;
	          }
	        }
	      }
	      if (scanToEnd === true) {
	        continue;
	      }
	      break;
	    }
	    if (code === CHAR_FORWARD_SLASH) {
	      slashes.push(index);
	      tokens.push(token);
	      token = { value: '', depth: 0, isGlob: false };
	      if (finished === true) continue;
	      if (prev === CHAR_DOT && index === (start + 1)) {
	        start += 2;
	        continue;
	      }
	      lastIndex = index + 1;
	      continue;
	    }
	    if (opts.noext !== true) {
	      const isExtglobChar = code === CHAR_PLUS
	        || code === CHAR_AT
	        || code === CHAR_ASTERISK
	        || code === CHAR_QUESTION_MARK
	        || code === CHAR_EXCLAMATION_MARK;
	      if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
	        isGlob = token.isGlob = true;
	        isExtglob = token.isExtglob = true;
	        finished = true;
	        if (code === CHAR_EXCLAMATION_MARK && index === start) {
	          negatedExtglob = true;
	        }
	        if (scanToEnd === true) {
	          while (eos() !== true && (code = advance())) {
	            if (code === CHAR_BACKWARD_SLASH) {
	              backslashes = token.backslashes = true;
	              code = advance();
	              continue;
	            }
	            if (code === CHAR_RIGHT_PARENTHESES) {
	              isGlob = token.isGlob = true;
	              finished = true;
	              break;
	            }
	          }
	          continue;
	        }
	        break;
	      }
	    }
	    if (code === CHAR_ASTERISK) {
	      if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
	      isGlob = token.isGlob = true;
	      finished = true;
	      if (scanToEnd === true) {
	        continue;
	      }
	      break;
	    }
	    if (code === CHAR_QUESTION_MARK) {
	      isGlob = token.isGlob = true;
	      finished = true;
	      if (scanToEnd === true) {
	        continue;
	      }
	      break;
	    }
	    if (code === CHAR_LEFT_SQUARE_BRACKET) {
	      while (eos() !== true && (next = advance())) {
	        if (next === CHAR_BACKWARD_SLASH) {
	          backslashes = token.backslashes = true;
	          advance();
	          continue;
	        }
	        if (next === CHAR_RIGHT_SQUARE_BRACKET) {
	          isBracket = token.isBracket = true;
	          isGlob = token.isGlob = true;
	          finished = true;
	          break;
	        }
	      }
	      if (scanToEnd === true) {
	        continue;
	      }
	      break;
	    }
	    if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
	      negated = token.negated = true;
	      start++;
	      continue;
	    }
	    if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
	      isGlob = token.isGlob = true;
	      if (scanToEnd === true) {
	        while (eos() !== true && (code = advance())) {
	          if (code === CHAR_LEFT_PARENTHESES) {
	            backslashes = token.backslashes = true;
	            code = advance();
	            continue;
	          }
	          if (code === CHAR_RIGHT_PARENTHESES) {
	            finished = true;
	            break;
	          }
	        }
	        continue;
	      }
	      break;
	    }
	    if (isGlob === true) {
	      finished = true;
	      if (scanToEnd === true) {
	        continue;
	      }
	      break;
	    }
	  }
	  if (opts.noext === true) {
	    isExtglob = false;
	    isGlob = false;
	  }
	  let base = str;
	  let prefix = '';
	  let glob = '';
	  if (start > 0) {
	    prefix = str.slice(0, start);
	    str = str.slice(start);
	    lastIndex -= start;
	  }
	  if (base && isGlob === true && lastIndex > 0) {
	    base = str.slice(0, lastIndex);
	    glob = str.slice(lastIndex);
	  } else if (isGlob === true) {
	    base = '';
	    glob = str;
	  } else {
	    base = str;
	  }
	  if (base && base !== '' && base !== '/' && base !== str) {
	    if (isPathSeparator(base.charCodeAt(base.length - 1))) {
	      base = base.slice(0, -1);
	    }
	  }
	  if (opts.unescape === true) {
	    if (glob) glob = utils.removeBackslashes(glob);
	    if (base && backslashes === true) {
	      base = utils.removeBackslashes(base);
	    }
	  }
	  const state = {
	    prefix,
	    input,
	    start,
	    base,
	    glob,
	    isBrace,
	    isBracket,
	    isGlob,
	    isExtglob,
	    isGlobstar,
	    negated,
	    negatedExtglob
	  };
	  if (opts.tokens === true) {
	    state.maxDepth = 0;
	    if (!isPathSeparator(code)) {
	      tokens.push(token);
	    }
	    state.tokens = tokens;
	  }
	  if (opts.parts === true || opts.tokens === true) {
	    let prevIndex;
	    for (let idx = 0; idx < slashes.length; idx++) {
	      const n = prevIndex ? prevIndex + 1 : start;
	      const i = slashes[idx];
	      const value = input.slice(n, i);
	      if (opts.tokens) {
	        if (idx === 0 && start !== 0) {
	          tokens[idx].isPrefix = true;
	          tokens[idx].value = prefix;
	        } else {
	          tokens[idx].value = value;
	        }
	        depth(tokens[idx]);
	        state.maxDepth += tokens[idx].depth;
	      }
	      if (idx !== 0 || value !== '') {
	        parts.push(value);
	      }
	      prevIndex = i;
	    }
	    if (prevIndex && prevIndex + 1 < input.length) {
	      const value = input.slice(prevIndex + 1);
	      parts.push(value);
	      if (opts.tokens) {
	        tokens[tokens.length - 1].value = value;
	        depth(tokens[tokens.length - 1]);
	        state.maxDepth += tokens[tokens.length - 1].depth;
	      }
	    }
	    state.slashes = slashes;
	    state.parts = parts;
	  }
	  return state;
	};
	scan_1 = scan;
	return scan_1;
}

var parse_1;
var hasRequiredParse;
function requireParse () {
	if (hasRequiredParse) return parse_1;
	hasRequiredParse = 1;
	const constants = requireConstants();
	const utils = requireUtils$1();
	const {
	  MAX_LENGTH,
	  POSIX_REGEX_SOURCE,
	  REGEX_NON_SPECIAL_CHARS,
	  REGEX_SPECIAL_CHARS_BACKREF,
	  REPLACEMENTS
	} = constants;
	const expandRange = (args, options) => {
	  if (typeof options.expandRange === 'function') {
	    return options.expandRange(...args, options);
	  }
	  args.sort();
	  const value = `[${args.join('-')}]`;
	  try {
	    new RegExp(value);
	  } catch (ex) {
	    return args.map(v => utils.escapeRegex(v)).join('..');
	  }
	  return value;
	};
	const syntaxError = (type, char) => {
	  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
	};
	const parse = (input, options) => {
	  if (typeof input !== 'string') {
	    throw new TypeError('Expected a string');
	  }
	  input = REPLACEMENTS[input] || input;
	  const opts = { ...options };
	  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
	  let len = input.length;
	  if (len > max) {
	    throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
	  }
	  const bos = { type: 'bos', value: '', output: opts.prepend || '' };
	  const tokens = [bos];
	  const capture = opts.capture ? '' : '?:';
	  const PLATFORM_CHARS = constants.globChars(opts.windows);
	  const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
	  const {
	    DOT_LITERAL,
	    PLUS_LITERAL,
	    SLASH_LITERAL,
	    ONE_CHAR,
	    DOTS_SLASH,
	    NO_DOT,
	    NO_DOT_SLASH,
	    NO_DOTS_SLASH,
	    QMARK,
	    QMARK_NO_DOT,
	    STAR,
	    START_ANCHOR
	  } = PLATFORM_CHARS;
	  const globstar = opts => {
	    return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
	  };
	  const nodot = opts.dot ? '' : NO_DOT;
	  const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
	  let star = opts.bash === true ? globstar(opts) : STAR;
	  if (opts.capture) {
	    star = `(${star})`;
	  }
	  if (typeof opts.noext === 'boolean') {
	    opts.noextglob = opts.noext;
	  }
	  const state = {
	    input,
	    index: -1,
	    start: 0,
	    dot: opts.dot === true,
	    consumed: '',
	    output: '',
	    prefix: '',
	    backtrack: false,
	    negated: false,
	    brackets: 0,
	    braces: 0,
	    parens: 0,
	    quotes: 0,
	    globstar: false,
	    tokens
	  };
	  input = utils.removePrefix(input, state);
	  len = input.length;
	  const extglobs = [];
	  const braces = [];
	  const stack = [];
	  let prev = bos;
	  let value;
	  const eos = () => state.index === len - 1;
	  const peek = state.peek = (n = 1) => input[state.index + n];
	  const advance = state.advance = () => input[++state.index] || '';
	  const remaining = () => input.slice(state.index + 1);
	  const consume = (value = '', num = 0) => {
	    state.consumed += value;
	    state.index += num;
	  };
	  const append = token => {
	    state.output += token.output != null ? token.output : token.value;
	    consume(token.value);
	  };
	  const negate = () => {
	    let count = 1;
	    while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
	      advance();
	      state.start++;
	      count++;
	    }
	    if (count % 2 === 0) {
	      return false;
	    }
	    state.negated = true;
	    state.start++;
	    return true;
	  };
	  const increment = type => {
	    state[type]++;
	    stack.push(type);
	  };
	  const decrement = type => {
	    state[type]--;
	    stack.pop();
	  };
	  const push = tok => {
	    if (prev.type === 'globstar') {
	      const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
	      const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));
	      if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
	        state.output = state.output.slice(0, -prev.output.length);
	        prev.type = 'star';
	        prev.value = '*';
	        prev.output = star;
	        state.output += prev.output;
	      }
	    }
	    if (extglobs.length && tok.type !== 'paren') {
	      extglobs[extglobs.length - 1].inner += tok.value;
	    }
	    if (tok.value || tok.output) append(tok);
	    if (prev && prev.type === 'text' && tok.type === 'text') {
	      prev.output = (prev.output || prev.value) + tok.value;
	      prev.value += tok.value;
	      return;
	    }
	    tok.prev = prev;
	    tokens.push(tok);
	    prev = tok;
	  };
	  const extglobOpen = (type, value) => {
	    const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
	    token.prev = prev;
	    token.parens = state.parens;
	    token.output = state.output;
	    const output = (opts.capture ? '(' : '') + token.open;
	    increment('parens');
	    push({ type, value, output: state.output ? '' : ONE_CHAR });
	    push({ type: 'paren', extglob: true, value: advance(), output });
	    extglobs.push(token);
	  };
	  const extglobClose = token => {
	    let output = token.close + (opts.capture ? ')' : '');
	    let rest;
	    if (token.type === 'negate') {
	      let extglobStar = star;
	      if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
	        extglobStar = globstar(opts);
	      }
	      if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
	        output = token.close = `)$))${extglobStar}`;
	      }
	      if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
	        const expression = parse(rest, { ...options, fastpaths: false }).output;
	        output = token.close = `)${expression})${extglobStar})`;
	      }
	      if (token.prev.type === 'bos') {
	        state.negatedExtglob = true;
	      }
	    }
	    push({ type: 'paren', extglob: true, value, output });
	    decrement('parens');
	  };
	  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
	    let backslashes = false;
	    let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
	      if (first === '\\') {
	        backslashes = true;
	        return m;
	      }
	      if (first === '?') {
	        if (esc) {
	          return esc + first + (rest ? QMARK.repeat(rest.length) : '');
	        }
	        if (index === 0) {
	          return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
	        }
	        return QMARK.repeat(chars.length);
	      }
	      if (first === '.') {
	        return DOT_LITERAL.repeat(chars.length);
	      }
	      if (first === '*') {
	        if (esc) {
	          return esc + first + (rest ? star : '');
	        }
	        return star;
	      }
	      return esc ? m : `\\${m}`;
	    });
	    if (backslashes === true) {
	      if (opts.unescape === true) {
	        output = output.replace(/\\/g, '');
	      } else {
	        output = output.replace(/\\+/g, m => {
	          return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
	        });
	      }
	    }
	    if (output === input && opts.contains === true) {
	      state.output = input;
	      return state;
	    }
	    state.output = utils.wrapOutput(output, state, options);
	    return state;
	  }
	  while (!eos()) {
	    value = advance();
	    if (value === '\u0000') {
	      continue;
	    }
	    if (value === '\\') {
	      const next = peek();
	      if (next === '/' && opts.bash !== true) {
	        continue;
	      }
	      if (next === '.' || next === ';') {
	        continue;
	      }
	      if (!next) {
	        value += '\\';
	        push({ type: 'text', value });
	        continue;
	      }
	      const match = /^\\+/.exec(remaining());
	      let slashes = 0;
	      if (match && match[0].length > 2) {
	        slashes = match[0].length;
	        state.index += slashes;
	        if (slashes % 2 !== 0) {
	          value += '\\';
	        }
	      }
	      if (opts.unescape === true) {
	        value = advance();
	      } else {
	        value += advance();
	      }
	      if (state.brackets === 0) {
	        push({ type: 'text', value });
	        continue;
	      }
	    }
	    if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
	      if (opts.posix !== false && value === ':') {
	        const inner = prev.value.slice(1);
	        if (inner.includes('[')) {
	          prev.posix = true;
	          if (inner.includes(':')) {
	            const idx = prev.value.lastIndexOf('[');
	            const pre = prev.value.slice(0, idx);
	            const rest = prev.value.slice(idx + 2);
	            const posix = POSIX_REGEX_SOURCE[rest];
	            if (posix) {
	              prev.value = pre + posix;
	              state.backtrack = true;
	              advance();
	              if (!bos.output && tokens.indexOf(prev) === 1) {
	                bos.output = ONE_CHAR;
	              }
	              continue;
	            }
	          }
	        }
	      }
	      if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
	        value = `\\${value}`;
	      }
	      if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
	        value = `\\${value}`;
	      }
	      if (opts.posix === true && value === '!' && prev.value === '[') {
	        value = '^';
	      }
	      prev.value += value;
	      append({ value });
	      continue;
	    }
	    if (state.quotes === 1 && value !== '"') {
	      value = utils.escapeRegex(value);
	      prev.value += value;
	      append({ value });
	      continue;
	    }
	    if (value === '"') {
	      state.quotes = state.quotes === 1 ? 0 : 1;
	      if (opts.keepQuotes === true) {
	        push({ type: 'text', value });
	      }
	      continue;
	    }
	    if (value === '(') {
	      increment('parens');
	      push({ type: 'paren', value });
	      continue;
	    }
	    if (value === ')') {
	      if (state.parens === 0 && opts.strictBrackets === true) {
	        throw new SyntaxError(syntaxError('opening', '('));
	      }
	      const extglob = extglobs[extglobs.length - 1];
	      if (extglob && state.parens === extglob.parens + 1) {
	        extglobClose(extglobs.pop());
	        continue;
	      }
	      push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
	      decrement('parens');
	      continue;
	    }
	    if (value === '[') {
	      if (opts.nobracket === true || !remaining().includes(']')) {
	        if (opts.nobracket !== true && opts.strictBrackets === true) {
	          throw new SyntaxError(syntaxError('closing', ']'));
	        }
	        value = `\\${value}`;
	      } else {
	        increment('brackets');
	      }
	      push({ type: 'bracket', value });
	      continue;
	    }
	    if (value === ']') {
	      if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
	        push({ type: 'text', value, output: `\\${value}` });
	        continue;
	      }
	      if (state.brackets === 0) {
	        if (opts.strictBrackets === true) {
	          throw new SyntaxError(syntaxError('opening', '['));
	        }
	        push({ type: 'text', value, output: `\\${value}` });
	        continue;
	      }
	      decrement('brackets');
	      const prevValue = prev.value.slice(1);
	      if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
	        value = `/${value}`;
	      }
	      prev.value += value;
	      append({ value });
	      if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
	        continue;
	      }
	      const escaped = utils.escapeRegex(prev.value);
	      state.output = state.output.slice(0, -prev.value.length);
	      if (opts.literalBrackets === true) {
	        state.output += escaped;
	        prev.value = escaped;
	        continue;
	      }
	      prev.value = `(${capture}${escaped}|${prev.value})`;
	      state.output += prev.value;
	      continue;
	    }
	    if (value === '{' && opts.nobrace !== true) {
	      increment('braces');
	      const open = {
	        type: 'brace',
	        value,
	        output: '(',
	        outputIndex: state.output.length,
	        tokensIndex: state.tokens.length
	      };
	      braces.push(open);
	      push(open);
	      continue;
	    }
	    if (value === '}') {
	      const brace = braces[braces.length - 1];
	      if (opts.nobrace === true || !brace) {
	        push({ type: 'text', value, output: value });
	        continue;
	      }
	      let output = ')';
	      if (brace.dots === true) {
	        const arr = tokens.slice();
	        const range = [];
	        for (let i = arr.length - 1; i >= 0; i--) {
	          tokens.pop();
	          if (arr[i].type === 'brace') {
	            break;
	          }
	          if (arr[i].type !== 'dots') {
	            range.unshift(arr[i].value);
	          }
	        }
	        output = expandRange(range, opts);
	        state.backtrack = true;
	      }
	      if (brace.comma !== true && brace.dots !== true) {
	        const out = state.output.slice(0, brace.outputIndex);
	        const toks = state.tokens.slice(brace.tokensIndex);
	        brace.value = brace.output = '\\{';
	        value = output = '\\}';
	        state.output = out;
	        for (const t of toks) {
	          state.output += (t.output || t.value);
	        }
	      }
	      push({ type: 'brace', value, output });
	      decrement('braces');
	      braces.pop();
	      continue;
	    }
	    if (value === '|') {
	      if (extglobs.length > 0) {
	        extglobs[extglobs.length - 1].conditions++;
	      }
	      push({ type: 'text', value });
	      continue;
	    }
	    if (value === ',') {
	      let output = value;
	      const brace = braces[braces.length - 1];
	      if (brace && stack[stack.length - 1] === 'braces') {
	        brace.comma = true;
	        output = '|';
	      }
	      push({ type: 'comma', value, output });
	      continue;
	    }
	    if (value === '/') {
	      if (prev.type === 'dot' && state.index === state.start + 1) {
	        state.start = state.index + 1;
	        state.consumed = '';
	        state.output = '';
	        tokens.pop();
	        prev = bos;
	        continue;
	      }
	      push({ type: 'slash', value, output: SLASH_LITERAL });
	      continue;
	    }
	    if (value === '.') {
	      if (state.braces > 0 && prev.type === 'dot') {
	        if (prev.value === '.') prev.output = DOT_LITERAL;
	        const brace = braces[braces.length - 1];
	        prev.type = 'dots';
	        prev.output += value;
	        prev.value += value;
	        brace.dots = true;
	        continue;
	      }
	      if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
	        push({ type: 'text', value, output: DOT_LITERAL });
	        continue;
	      }
	      push({ type: 'dot', value, output: DOT_LITERAL });
	      continue;
	    }
	    if (value === '?') {
	      const isGroup = prev && prev.value === '(';
	      if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
	        extglobOpen('qmark', value);
	        continue;
	      }
	      if (prev && prev.type === 'paren') {
	        const next = peek();
	        let output = value;
	        if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
	          output = `\\${value}`;
	        }
	        push({ type: 'text', value, output });
	        continue;
	      }
	      if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
	        push({ type: 'qmark', value, output: QMARK_NO_DOT });
	        continue;
	      }
	      push({ type: 'qmark', value, output: QMARK });
	      continue;
	    }
	    if (value === '!') {
	      if (opts.noextglob !== true && peek() === '(') {
	        if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
	          extglobOpen('negate', value);
	          continue;
	        }
	      }
	      if (opts.nonegate !== true && state.index === 0) {
	        negate();
	        continue;
	      }
	    }
	    if (value === '+') {
	      if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
	        extglobOpen('plus', value);
	        continue;
	      }
	      if ((prev && prev.value === '(') || opts.regex === false) {
	        push({ type: 'plus', value, output: PLUS_LITERAL });
	        continue;
	      }
	      if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {
	        push({ type: 'plus', value });
	        continue;
	      }
	      push({ type: 'plus', value: PLUS_LITERAL });
	      continue;
	    }
	    if (value === '@') {
	      if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
	        push({ type: 'at', extglob: true, value, output: '' });
	        continue;
	      }
	      push({ type: 'text', value });
	      continue;
	    }
	    if (value !== '*') {
	      if (value === '$' || value === '^') {
	        value = `\\${value}`;
	      }
	      const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
	      if (match) {
	        value += match[0];
	        state.index += match[0].length;
	      }
	      push({ type: 'text', value });
	      continue;
	    }
	    if (prev && (prev.type === 'globstar' || prev.star === true)) {
	      prev.type = 'star';
	      prev.star = true;
	      prev.value += value;
	      prev.output = star;
	      state.backtrack = true;
	      state.globstar = true;
	      consume(value);
	      continue;
	    }
	    let rest = remaining();
	    if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
	      extglobOpen('star', value);
	      continue;
	    }
	    if (prev.type === 'star') {
	      if (opts.noglobstar === true) {
	        consume(value);
	        continue;
	      }
	      const prior = prev.prev;
	      const before = prior.prev;
	      const isStart = prior.type === 'slash' || prior.type === 'bos';
	      const afterStar = before && (before.type === 'star' || before.type === 'globstar');
	      if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
	        push({ type: 'star', value, output: '' });
	        continue;
	      }
	      const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
	      const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
	      if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
	        push({ type: 'star', value, output: '' });
	        continue;
	      }
	      while (rest.slice(0, 3) === '/**') {
	        const after = input[state.index + 4];
	        if (after && after !== '/') {
	          break;
	        }
	        rest = rest.slice(3);
	        consume('/**', 3);
	      }
	      if (prior.type === 'bos' && eos()) {
	        prev.type = 'globstar';
	        prev.value += value;
	        prev.output = globstar(opts);
	        state.output = prev.output;
	        state.globstar = true;
	        consume(value);
	        continue;
	      }
	      if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
	        state.output = state.output.slice(0, -(prior.output + prev.output).length);
	        prior.output = `(?:${prior.output}`;
	        prev.type = 'globstar';
	        prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
	        prev.value += value;
	        state.globstar = true;
	        state.output += prior.output + prev.output;
	        consume(value);
	        continue;
	      }
	      if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
	        const end = rest[1] !== void 0 ? '|$' : '';
	        state.output = state.output.slice(0, -(prior.output + prev.output).length);
	        prior.output = `(?:${prior.output}`;
	        prev.type = 'globstar';
	        prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
	        prev.value += value;
	        state.output += prior.output + prev.output;
	        state.globstar = true;
	        consume(value + advance());
	        push({ type: 'slash', value: '/', output: '' });
	        continue;
	      }
	      if (prior.type === 'bos' && rest[0] === '/') {
	        prev.type = 'globstar';
	        prev.value += value;
	        prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
	        state.output = prev.output;
	        state.globstar = true;
	        consume(value + advance());
	        push({ type: 'slash', value: '/', output: '' });
	        continue;
	      }
	      state.output = state.output.slice(0, -prev.output.length);
	      prev.type = 'globstar';
	      prev.output = globstar(opts);
	      prev.value += value;
	      state.output += prev.output;
	      state.globstar = true;
	      consume(value);
	      continue;
	    }
	    const token = { type: 'star', value, output: star };
	    if (opts.bash === true) {
	      token.output = '.*?';
	      if (prev.type === 'bos' || prev.type === 'slash') {
	        token.output = nodot + token.output;
	      }
	      push(token);
	      continue;
	    }
	    if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
	      token.output = value;
	      push(token);
	      continue;
	    }
	    if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
	      if (prev.type === 'dot') {
	        state.output += NO_DOT_SLASH;
	        prev.output += NO_DOT_SLASH;
	      } else if (opts.dot === true) {
	        state.output += NO_DOTS_SLASH;
	        prev.output += NO_DOTS_SLASH;
	      } else {
	        state.output += nodot;
	        prev.output += nodot;
	      }
	      if (peek() !== '*') {
	        state.output += ONE_CHAR;
	        prev.output += ONE_CHAR;
	      }
	    }
	    push(token);
	  }
	  while (state.brackets > 0) {
	    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
	    state.output = utils.escapeLast(state.output, '[');
	    decrement('brackets');
	  }
	  while (state.parens > 0) {
	    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
	    state.output = utils.escapeLast(state.output, '(');
	    decrement('parens');
	  }
	  while (state.braces > 0) {
	    if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
	    state.output = utils.escapeLast(state.output, '{');
	    decrement('braces');
	  }
	  if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
	    push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
	  }
	  if (state.backtrack === true) {
	    state.output = '';
	    for (const token of state.tokens) {
	      state.output += token.output != null ? token.output : token.value;
	      if (token.suffix) {
	        state.output += token.suffix;
	      }
	    }
	  }
	  return state;
	};
	parse.fastpaths = (input, options) => {
	  const opts = { ...options };
	  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
	  const len = input.length;
	  if (len > max) {
	    throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
	  }
	  input = REPLACEMENTS[input] || input;
	  const {
	    DOT_LITERAL,
	    SLASH_LITERAL,
	    ONE_CHAR,
	    DOTS_SLASH,
	    NO_DOT,
	    NO_DOTS,
	    NO_DOTS_SLASH,
	    STAR,
	    START_ANCHOR
	  } = constants.globChars(opts.windows);
	  const nodot = opts.dot ? NO_DOTS : NO_DOT;
	  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
	  const capture = opts.capture ? '' : '?:';
	  const state = { negated: false, prefix: '' };
	  let star = opts.bash === true ? '.*?' : STAR;
	  if (opts.capture) {
	    star = `(${star})`;
	  }
	  const globstar = opts => {
	    if (opts.noglobstar === true) return star;
	    return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
	  };
	  const create = str => {
	    switch (str) {
	      case '*':
	        return `${nodot}${ONE_CHAR}${star}`;
	      case '.*':
	        return `${DOT_LITERAL}${ONE_CHAR}${star}`;
	      case '*.*':
	        return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
	      case '*/*':
	        return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
	      case '**':
	        return nodot + globstar(opts);
	      case '**/*':
	        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
	      case '**/*.*':
	        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
	      case '**/.*':
	        return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
	      default: {
	        const match = /^(.*?)\.(\w+)$/.exec(str);
	        if (!match) return;
	        const source = create(match[1]);
	        if (!source) return;
	        return source + DOT_LITERAL + match[2];
	      }
	    }
	  };
	  const output = utils.removePrefix(input, state);
	  let source = create(output);
	  if (source && opts.strictSlashes !== true) {
	    source += `${SLASH_LITERAL}?`;
	  }
	  return source;
	};
	parse_1 = parse;
	return parse_1;
}

var picomatch_1$1;
var hasRequiredPicomatch$1;
function requirePicomatch$1 () {
	if (hasRequiredPicomatch$1) return picomatch_1$1;
	hasRequiredPicomatch$1 = 1;
	const scan = requireScan();
	const parse = requireParse();
	const utils = requireUtils$1();
	const constants = requireConstants();
	const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
	const picomatch = (glob, options, returnState = false) => {
	  if (Array.isArray(glob)) {
	    const fns = glob.map(input => picomatch(input, options, returnState));
	    const arrayMatcher = str => {
	      for (const isMatch of fns) {
	        const state = isMatch(str);
	        if (state) return state;
	      }
	      return false;
	    };
	    return arrayMatcher;
	  }
	  const isState = isObject(glob) && glob.tokens && glob.input;
	  if (glob === '' || (typeof glob !== 'string' && !isState)) {
	    throw new TypeError('Expected pattern to be a non-empty string');
	  }
	  const opts = options || {};
	  const posix = opts.windows;
	  const regex = isState
	    ? picomatch.compileRe(glob, options)
	    : picomatch.makeRe(glob, options, false, true);
	  const state = regex.state;
	  delete regex.state;
	  let isIgnored = () => false;
	  if (opts.ignore) {
	    const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
	    isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
	  }
	  const matcher = (input, returnObject = false) => {
	    const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
	    const result = { glob, state, regex, posix, input, output, match, isMatch };
	    if (typeof opts.onResult === 'function') {
	      opts.onResult(result);
	    }
	    if (isMatch === false) {
	      result.isMatch = false;
	      return returnObject ? result : false;
	    }
	    if (isIgnored(input)) {
	      if (typeof opts.onIgnore === 'function') {
	        opts.onIgnore(result);
	      }
	      result.isMatch = false;
	      return returnObject ? result : false;
	    }
	    if (typeof opts.onMatch === 'function') {
	      opts.onMatch(result);
	    }
	    return returnObject ? result : true;
	  };
	  if (returnState) {
	    matcher.state = state;
	  }
	  return matcher;
	};
	picomatch.test = (input, regex, options, { glob, posix } = {}) => {
	  if (typeof input !== 'string') {
	    throw new TypeError('Expected input to be a string');
	  }
	  if (input === '') {
	    return { isMatch: false, output: '' };
	  }
	  const opts = options || {};
	  const format = opts.format || (posix ? utils.toPosixSlashes : null);
	  let match = input === glob;
	  let output = (match && format) ? format(input) : input;
	  if (match === false) {
	    output = format ? format(input) : input;
	    match = output === glob;
	  }
	  if (match === false || opts.capture === true) {
	    if (opts.matchBase === true || opts.basename === true) {
	      match = picomatch.matchBase(input, regex, options, posix);
	    } else {
	      match = regex.exec(output);
	    }
	  }
	  return { isMatch: Boolean(match), match, output };
	};
	picomatch.matchBase = (input, glob, options) => {
	  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
	  return regex.test(utils.basename(input));
	};
	picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
	picomatch.parse = (pattern, options) => {
	  if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
	  return parse(pattern, { ...options, fastpaths: false });
	};
	picomatch.scan = (input, options) => scan(input, options);
	picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
	  if (returnOutput === true) {
	    return state.output;
	  }
	  const opts = options || {};
	  const prepend = opts.contains ? '' : '^';
	  const append = opts.contains ? '' : '$';
	  let source = `${prepend}(?:${state.output})${append}`;
	  if (state && state.negated === true) {
	    source = `^(?!${source}).*$`;
	  }
	  const regex = picomatch.toRegex(source, options);
	  if (returnState === true) {
	    regex.state = state;
	  }
	  return regex;
	};
	picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
	  if (!input || typeof input !== 'string') {
	    throw new TypeError('Expected a non-empty string');
	  }
	  let parsed = { negated: false, fastpaths: true };
	  if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
	    parsed.output = parse.fastpaths(input, options);
	  }
	  if (!parsed.output) {
	    parsed = parse(input, options);
	  }
	  return picomatch.compileRe(parsed, options, returnOutput, returnState);
	};
	picomatch.toRegex = (source, options) => {
	  try {
	    const opts = options || {};
	    return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
	  } catch (err) {
	    if (options && options.debug === true) throw err;
	    return /$^/;
	  }
	};
	picomatch.constants = constants;
	picomatch_1$1 = picomatch;
	return picomatch_1$1;
}

var picomatch_1;
var hasRequiredPicomatch;
function requirePicomatch () {
	if (hasRequiredPicomatch) return picomatch_1;
	hasRequiredPicomatch = 1;
	const pico = requirePicomatch$1();
	const utils = requireUtils$1();
	function picomatch(glob, options, returnState = false) {
	  if (options && (options.windows === null || options.windows === undefined)) {
	    options = { ...options, windows: utils.isWindows() };
	  }
	  return pico(glob, options, returnState);
	}
	Object.assign(picomatch, pico);
	picomatch_1 = picomatch;
	return picomatch_1;
}

Object.defineProperty(builder, "__esModule", { value: true });
builder.Builder = void 0;
const path_1$d = path$1;
const api_builder_1 = apiBuilder;
var pm = null;
try {
    require.resolve("picomatch");
    pm = requirePicomatch();
}
catch (_e) {
}
class Builder {
    globCache = {};
    options = {
        maxDepth: Infinity,
        suppressErrors: true,
        pathSeparator: path_1$d.sep,
        filters: [],
    };
    constructor(options) {
        this.options = { ...this.options, ...options };
    }
    group() {
        this.options.group = true;
        return this;
    }
    withPathSeparator(separator) {
        this.options.pathSeparator = separator;
        return this;
    }
    withBasePath() {
        this.options.includeBasePath = true;
        return this;
    }
    withRelativePaths() {
        this.options.relativePaths = true;
        return this;
    }
    withDirs() {
        this.options.includeDirs = true;
        return this;
    }
    withMaxDepth(depth) {
        this.options.maxDepth = depth;
        return this;
    }
    withMaxFiles(limit) {
        this.options.maxFiles = limit;
        return this;
    }
    withFullPaths() {
        this.options.resolvePaths = true;
        this.options.includeBasePath = true;
        return this;
    }
    withErrors() {
        this.options.suppressErrors = false;
        return this;
    }
    withSymlinks() {
        this.options.resolveSymlinks = true;
        return this.withFullPaths();
    }
    withAbortSignal(signal) {
        this.options.signal = signal;
        return this;
    }
    normalize() {
        this.options.normalizePath = true;
        return this;
    }
    filter(predicate) {
        this.options.filters.push(predicate);
        return this;
    }
    onlyDirs() {
        this.options.excludeFiles = true;
        this.options.includeDirs = true;
        return this;
    }
    exclude(predicate) {
        this.options.exclude = predicate;
        return this;
    }
    onlyCounts() {
        this.options.onlyCounts = true;
        return this;
    }
    crawl(root) {
        return new api_builder_1.APIBuilder(root || ".", this.options);
    }
    crawlWithOptions(root, options) {
        this.options = { ...this.options, ...options };
        return new api_builder_1.APIBuilder(root || ".", this.options);
    }
    glob(...patterns) {
        return this.globWithOptions(patterns, { dot: true });
    }
    globWithOptions(patterns, options) {
        if (!pm) {
            throw new Error(`Please install picomatch: "npm i picomatch" to use glob matching.`);
        }
        var isMatch = this.globCache[patterns.join("\0")];
        if (!isMatch) {
            isMatch = pm(patterns, options);
            this.globCache[patterns.join("\0")] = isMatch;
        }
        this.options.filters.push((path) => isMatch(path));
        return this;
    }
}
builder.Builder = Builder;

var src = {};

var types = {};

Object.defineProperty(types, "__esModule", { value: true });

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	__exportStar(types, exports);
} (src));
getDefaultExportFromCjs(src);

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.fdir = void 0;
	const builder_1 = builder;
	Object.defineProperty(exports, "fdir", { enumerable: true, get: function () { return builder_1.Builder; } });
	__exportStar(src, exports);
} (dist));
getDefaultExportFromCjs(dist);

var __importDefault$r = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(configLoader, "__esModule", { value: true });
configLoader.configLoader = configLoader.ConfigLoader = void 0;
const logger_1$9 = logger;
const importPackage_1$6 = importPackage;
const fdir_1 = dist;
const path_1$c = __importDefault$r(path$1);
const fs_1$1 = __importDefault$r(fs$1);
const url_1$1 = require$$5;
const fileCollection_1$6 = fileCollection;
const typescript_1$o = __importDefault$r(ts);
const DEFAULT_OPTIONS = {
    dev: true
};
const NO_GENERATE = {
    generate: false
};
const _dynamicImport = new Function('modulePath', 'return import(modulePath)');
const configRegex = /\/svelte\.config\.(js|cjs|mjs)$/;
class ConfigLoader {
    constructor(globSync, fs, path, dynamicImport) {
        this.globSync = globSync;
        this.fs = fs;
        this.path = path;
        this.dynamicImport = dynamicImport;
        this.configFiles = new fileCollection_1$6.FileMap();
        this.configFilesAsync = new fileCollection_1$6.FileMap();
        this.filePathToConfigPath = new fileCollection_1$6.FileMap();
        this.disabled = false;
    }
    setDisabled(disabled) {
        this.disabled = disabled;
    }
    async loadConfigs(directory) {
        logger_1$9.Logger.log('Trying to load configs for', directory);
        try {
            const pathResults = new this.globSync({})
                .withPathSeparator('/')
                .exclude((_, path) => {
                return path.includes('node_modules/') || path.includes('/.') || path[0] === '.';
            })
                .filter((path, isDir) => {
                return !isDir && configRegex.test(path);
            })
                .withRelativePaths()
                .crawl(directory)
                .sync();
            const someConfigIsImmediateFileInDirectory = pathResults.length > 0 && pathResults.some((res) => !this.path.dirname(res));
            if (!someConfigIsImmediateFileInDirectory) {
                const configPathUpwards = this.searchConfigPathUpwards(directory);
                if (configPathUpwards) {
                    pathResults.push(this.path.relative(directory, configPathUpwards));
                }
            }
            if (pathResults.length === 0) {
                this.addFallbackConfig(directory);
                return;
            }
            const promises = pathResults
                .map((pathResult) => this.path.join(directory, pathResult))
                .filter((pathResult) => {
                const config = this.configFiles.get(pathResult);
                return !config || config.loadConfigError;
            })
                .map(async (pathResult) => {
                await this.loadAndCacheConfig(pathResult, directory);
            });
            await Promise.all(promises);
        }
        catch (e) {
            logger_1$9.Logger.error(e);
        }
    }
    addFallbackConfig(directory) {
        const fallback = this.useFallbackPreprocessor(directory, false);
        const path = this.path.join(directory, 'svelte.config.js');
        this.configFilesAsync.set(path, Promise.resolve(fallback));
        this.configFiles.set(path, fallback);
    }
    searchConfigPathUpwards(path) {
        let currentDir = path;
        let nextDir = this.path.dirname(path);
        while (currentDir !== nextDir) {
            const tryFindConfigPath = (ending) => {
                const path = this.path.join(currentDir, `svelte.config.${ending}`);
                return this.fs.existsSync(path) ? path : undefined;
            };
            const configPath = tryFindConfigPath('js') || tryFindConfigPath('cjs') || tryFindConfigPath('mjs');
            if (configPath) {
                return configPath;
            }
            currentDir = nextDir;
            nextDir = this.path.dirname(currentDir);
        }
    }
    async loadAndCacheConfig(configPath, directory) {
        const loadingConfig = this.configFilesAsync.get(configPath);
        if (loadingConfig) {
            await loadingConfig;
        }
        else {
            const newConfig = this.loadConfig(configPath, directory);
            this.configFilesAsync.set(configPath, newConfig);
            this.configFiles.set(configPath, await newConfig);
        }
    }
    async loadConfig(configPath, directory) {
        try {
            let config = this.disabled
                ? {}
                : (await this.dynamicImport((0, url_1$1.pathToFileURL)(configPath)))?.default;
            if (!config) {
                throw new Error('Missing exports in the config. Make sure to include "export default config" or "module.exports = config"');
            }
            config = {
                ...config,
                compilerOptions: {
                    ...DEFAULT_OPTIONS,
                    ...config.compilerOptions,
                    ...NO_GENERATE
                }
            };
            logger_1$9.Logger.log('Loaded config at ', configPath);
            return config;
        }
        catch (err) {
            logger_1$9.Logger.error('Error while loading config at ', configPath);
            logger_1$9.Logger.error(err);
            const config = {
                ...this.useFallbackPreprocessor(directory, true),
                compilerOptions: {
                    ...DEFAULT_OPTIONS,
                    ...NO_GENERATE
                },
                loadConfigError: err
            };
            return config;
        }
    }
    getConfig(file) {
        const cached = this.filePathToConfigPath.get(file);
        if (cached) {
            return this.configFiles.get(cached);
        }
        let currentDir = file;
        let nextDir = this.path.dirname(file);
        while (currentDir !== nextDir) {
            currentDir = nextDir;
            const config = this.tryGetConfig(file, currentDir, 'js') ||
                this.tryGetConfig(file, currentDir, 'cjs') ||
                this.tryGetConfig(file, currentDir, 'mjs');
            if (config) {
                return config;
            }
            nextDir = this.path.dirname(currentDir);
        }
    }
    async awaitConfig(file) {
        const config = this.getConfig(file);
        if (config) {
            return config;
        }
        const fileDirectory = this.path.dirname(file);
        const configPath = this.searchConfigPathUpwards(fileDirectory);
        if (configPath) {
            await this.loadAndCacheConfig(configPath, fileDirectory);
        }
        else {
            this.addFallbackConfig(fileDirectory);
        }
        return this.getConfig(file);
    }
    tryGetConfig(file, fromDirectory, configFileEnding) {
        const path = this.path.join(fromDirectory, `svelte.config.${configFileEnding}`);
        const config = this.configFiles.get(path);
        if (config) {
            this.filePathToConfigPath.set(file, path);
            return config;
        }
    }
    useFallbackPreprocessor(path, foundConfig) {
        try {
            const sveltePreprocess = (0, importPackage_1$6.importSveltePreprocess)(path);
            logger_1$9.Logger.log((foundConfig
                ? 'Found svelte.config.js but there was an error loading it. '
                : 'No svelte.config.js found. ') +
                'Using https://github.com/sveltejs/svelte-preprocess as fallback');
            return {
                preprocess: sveltePreprocess({
                    typescript: {
                        transpileOnly: true,
                        compilerOptions: { sourceMap: true, inlineSourceMap: false }
                    }
                }),
                isFallbackConfig: true
            };
        }
        catch (e) {
            return {
                preprocess: {
                    // @ts-ignore name property exists in Svelte 4 onwards
                    name: 'svelte-language-tools-ts-fallback-preprocessor',
                    script: ({ content, attributes, filename }) => {
                        if (attributes.lang !== 'ts')
                            return;
                        const { outputText, sourceMapText } = typescript_1$o.default.transpileModule(content, {
                            fileName: filename,
                            compilerOptions: {
                                module: typescript_1$o.default.ModuleKind.ESNext,
                                target: typescript_1$o.default.ScriptTarget.ESNext,
                                sourceMap: true,
                                verbatimModuleSyntax: true
                            }
                        });
                        return { code: outputText, map: sourceMapText };
                    }
                },
                isFallbackConfig: true
            };
        }
    }
}
configLoader.ConfigLoader = ConfigLoader;
configLoader.configLoader = new ConfigLoader(fdir_1.fdir, fs_1$1.default, path_1$c.default, _dynamicImport);

Object.defineProperty(Document$2, "__esModule", { value: true });
Document$2.Document = void 0;
const utils_1$I = utils$6;
const DocumentBase_1 = DocumentBase;
const utils_2$o = requireUtils$2();
const parseHtml_1$5 = requireParseHtml();
const configLoader_1$2 = configLoader;
const importPackage_1$5 = importPackage;
let Document$1 = class Document extends DocumentBase_1.WritableDocument {
    get compiler() {
        return this.getCompiler();
    }
    get isSvelte5() {
        return this.getSvelteVersion()[0] > 4;
    }
    constructor(url, content, skipConfigLoading = false) {
        super();
        this.url = url;
        this.content = content;
        this.languageId = 'svelte';
        this.scriptInfo = null;
        this.moduleScriptInfo = null;
        this.styleInfo = null;
        this.templateInfo = null;
        this.openedByClient = false;
        this.path = (0, utils_1$I.urlToPath)(this.url);
        this.configPromise = skipConfigLoading
            ? Promise.resolve(undefined)
            : configLoader_1$2.configLoader.awaitConfig(this.getFilePath() || '');
        this.updateDocInfo();
    }
    static createForTest(url, content) {
        return new Document$1(url, content,  true);
    }
    getCompiler() {
        if (!this._compiler) {
            this._compiler = (0, importPackage_1$5.importSvelte)(this.getFilePath() || '');
        }
        return this._compiler;
    }
    updateDocInfo() {
        this.html = (0, parseHtml_1$5.parseHtml)(this.content);
        const update = (config) => {
            const scriptTags = (0, utils_2$o.extractScriptTags)(this.content, this.html);
            this.config = config;
            this.scriptInfo = this.addDefaultLanguage(config, scriptTags?.script || null, 'script');
            this.moduleScriptInfo = this.addDefaultLanguage(config, scriptTags?.moduleScript || null, 'script');
            this.styleInfo = this.addDefaultLanguage(config, (0, utils_2$o.extractStyleTag)(this.content, this.html), 'style');
            this.templateInfo = this.addDefaultLanguage(config, (0, utils_2$o.extractTemplateTag)(this.content, this.html), 'markup');
        };
        const config = configLoader_1$2.configLoader.getConfig(this.getFilePath() || '');
        if (config && !config.loadConfigError) {
            update(config);
        }
        else {
            update(undefined);
            this.configPromise.then((c) => update(c));
        }
    }
    getSvelteVersion() {
        if (!this.svelteVersion) {
            const [major, minor] = this.compiler.VERSION.split('.');
            this.svelteVersion = [Number(major), Number(minor)];
        }
        return this.svelteVersion;
    }
    getText(range) {
        if (range) {
            return this.content.substring(this.offsetAt(range.start), this.offsetAt(range.end));
        }
        return this.content;
    }
    setText(text) {
        this.content = text;
        this.version++;
        this.lineOffsets = undefined;
        this.updateDocInfo();
    }
    getFilePath() {
        return this.path;
    }
    getURL() {
        return this.url;
    }
    getLanguageAttribute(tag) {
        const attrs = (tag === 'style'
            ? this.styleInfo?.attributes
            : tag === 'script'
                ? this.scriptInfo?.attributes || this.moduleScriptInfo?.attributes
                : this.templateInfo?.attributes) || {};
        const lang = attrs.lang || attrs.type || '';
        return lang.replace(/^text\//, '');
    }
    hasLanguageAttribute() {
        return (!!this.getLanguageAttribute('script') ||
            !!this.getLanguageAttribute('style') ||
            !!this.getLanguageAttribute('template'));
    }
    addDefaultLanguage(config, tagInfo, tag) {
        if (!tagInfo || !config) {
            return tagInfo;
        }
        const defaultLang = Array.isArray(config.preprocess)
            ? config.preprocess.find((group) => group.defaultLanguages?.[tag])?.defaultLanguages?.[tag]
            : config.preprocess?.defaultLanguages?.[tag];
        if (!tagInfo.attributes.lang && !tagInfo.attributes.type && defaultLang) {
            tagInfo.attributes.lang = defaultLang;
        }
        return tagInfo;
    }
};
Document$2.Document = Document$1;

var DocumentMapper$1 = {};

Object.defineProperty(DocumentMapper$1, "__esModule", { value: true });
DocumentMapper$1.SourceMapDocumentMapper = DocumentMapper$1.FragmentMapper = DocumentMapper$1.IdentityMapper = void 0;
DocumentMapper$1.mapRangeToOriginal = mapRangeToOriginal;
DocumentMapper$1.mapLocationToOriginal = mapLocationToOriginal;
DocumentMapper$1.mapRangeToGenerated = mapRangeToGenerated;
DocumentMapper$1.mapCompletionItemToOriginal = mapCompletionItemToOriginal;
DocumentMapper$1.mapHoverToParent = mapHoverToParent;
DocumentMapper$1.mapObjWithRangeToOriginal = mapObjWithRangeToOriginal;
DocumentMapper$1.mapInsertReplaceEditToOriginal = mapInsertReplaceEditToOriginal;
DocumentMapper$1.mapEditToOriginal = mapEditToOriginal;
DocumentMapper$1.mapDiagnosticToGenerated = mapDiagnosticToGenerated;
DocumentMapper$1.mapColorPresentationToOriginal = mapColorPresentationToOriginal;
DocumentMapper$1.mapSymbolInformationToOriginal = mapSymbolInformationToOriginal;
DocumentMapper$1.mapLocationLinkToOriginal = mapLocationLinkToOriginal;
DocumentMapper$1.mapTextDocumentEditToOriginal = mapTextDocumentEditToOriginal;
DocumentMapper$1.mapCodeActionToOriginal = mapCodeActionToOriginal;
DocumentMapper$1.mapSelectionRangeToParent = mapSelectionRangeToParent;
const vscode_languageserver_1$v = main$8;
const utils_1$H = requireUtils$2();
const logger_1$8 = logger;
const trace_mapping_1$1 = require$$0$5;
class IdentityMapper {
    constructor(url, parent) {
        this.url = url;
        this.parent = parent;
    }
    getOriginalPosition(generatedPosition) {
        if (this.parent) {
            generatedPosition = this.getOriginalPosition(generatedPosition);
        }
        return generatedPosition;
    }
    getGeneratedPosition(originalPosition) {
        if (this.parent) {
            originalPosition = this.getGeneratedPosition(originalPosition);
        }
        return originalPosition;
    }
    isInGenerated(position) {
        if (this.parent && !this.parent.isInGenerated(position)) {
            return false;
        }
        return true;
    }
    getURL() {
        return this.url;
    }
}
DocumentMapper$1.IdentityMapper = IdentityMapper;
class FragmentMapper {
    constructor(originalText, tagInfo, url) {
        this.originalText = originalText;
        this.tagInfo = tagInfo;
        this.url = url;
        this.lineOffsetsOriginal = (0, utils_1$H.getLineOffsets)(this.originalText);
        this.lineOffsetsGenerated = (0, utils_1$H.getLineOffsets)(this.tagInfo.content);
    }
    getOriginalPosition(generatedPosition) {
        const parentOffset = this.offsetInParent((0, utils_1$H.offsetAt)(generatedPosition, this.tagInfo.content, this.lineOffsetsGenerated));
        return (0, utils_1$H.positionAt)(parentOffset, this.originalText, this.lineOffsetsOriginal);
    }
    offsetInParent(offset) {
        return this.tagInfo.start + offset;
    }
    getGeneratedPosition(originalPosition) {
        const fragmentOffset = (0, utils_1$H.offsetAt)(originalPosition, this.originalText, this.lineOffsetsOriginal) -
            this.tagInfo.start;
        return (0, utils_1$H.positionAt)(fragmentOffset, this.tagInfo.content, this.lineOffsetsGenerated);
    }
    isInGenerated(pos) {
        const offset = (0, utils_1$H.offsetAt)(pos, this.originalText, this.lineOffsetsOriginal);
        return offset >= this.tagInfo.start && offset <= this.tagInfo.end;
    }
    getURL() {
        return this.url;
    }
}
DocumentMapper$1.FragmentMapper = FragmentMapper;
class SourceMapDocumentMapper {
    constructor(traceMap, sourceUri, parent) {
        this.traceMap = traceMap;
        this.sourceUri = sourceUri;
        this.parent = parent;
    }
    getOriginalPosition(generatedPosition) {
        if (this.parent) {
            generatedPosition = this.parent.getOriginalPosition(generatedPosition);
        }
        if (generatedPosition.line < 0) {
            return { line: -1, character: -1 };
        }
        const mapped = (0, trace_mapping_1$1.originalPositionFor)(this.traceMap, {
            line: generatedPosition.line + 1,
            column: generatedPosition.character
        });
        if (!mapped) {
            return { line: -1, character: -1 };
        }
        if (mapped.line === 0) {
            logger_1$8.Logger.debug('Got 0 mapped line from', generatedPosition, 'col was', mapped.column);
        }
        return {
            line: (mapped.line || 0) - 1,
            character: mapped.column || 0
        };
    }
    getGeneratedPosition(originalPosition) {
        if (this.parent) {
            originalPosition = this.parent.getGeneratedPosition(originalPosition);
        }
        const mapped = (0, trace_mapping_1$1.generatedPositionFor)(this.traceMap, {
            line: originalPosition.line + 1,
            column: originalPosition.character,
            source: this.sourceUri
        });
        if (!mapped) {
            return { line: -1, character: -1 };
        }
        const result = {
            line: (mapped.line || 0) - 1,
            character: mapped.column || 0
        };
        if (result.line < 0) {
            return result;
        }
        return result;
    }
    isInGenerated(position) {
        if (this.parent && !this.isInGenerated(position)) {
            return false;
        }
        const generated = this.getGeneratedPosition(position);
        return generated.line >= 0;
    }
    getURL() {
        return this.sourceUri;
    }
}
DocumentMapper$1.SourceMapDocumentMapper = SourceMapDocumentMapper;
function mapRangeToOriginal(fragment, range) {
    const originalRange = {
        start: fragment.getOriginalPosition(range.start),
        end: fragment.getOriginalPosition(range.end)
    };
    checkRangeLength(originalRange, range);
    return originalRange;
}
function checkRangeLength(originalRange, range) {
    if (originalRange.start.line === originalRange.end.line &&
        range.start.line === range.end.line &&
        originalRange.end.character - originalRange.start.character ===
            range.end.character - range.start.character - 1) {
        originalRange.end.character += 1;
    }
}
function mapLocationToOriginal(fragment, range) {
    const map = (fragment.getOriginalFilePosition ??
        fragment.getOriginalPosition).bind(fragment);
    const start = map(range.start);
    const end = map(range.end);
    const originalRange = {
        start: { line: start.line, character: start.character },
        end: { line: end.line, character: end.character }
    };
    checkRangeLength(originalRange, range);
    return {
        range: originalRange,
        uri: start.uri ? start.uri : fragment.getURL()
    };
}
function mapRangeToGenerated(fragment, range) {
    return vscode_languageserver_1$v.Range.create(fragment.getGeneratedPosition(range.start), fragment.getGeneratedPosition(range.end));
}
function mapCompletionItemToOriginal(fragment, item) {
    if (!item.textEdit) {
        return item;
    }
    return {
        ...item,
        textEdit: mapEditToOriginal(fragment, item.textEdit)
    };
}
function mapHoverToParent(fragment, hover) {
    if (!hover.range) {
        return hover;
    }
    return { ...hover, range: mapRangeToOriginal(fragment, hover.range) };
}
function mapObjWithRangeToOriginal(fragment, objWithRange) {
    return { ...objWithRange, range: mapRangeToOriginal(fragment, objWithRange.range) };
}
function mapInsertReplaceEditToOriginal(fragment, edit) {
    return {
        ...edit,
        insert: mapRangeToOriginal(fragment, edit.insert),
        replace: mapRangeToOriginal(fragment, edit.replace)
    };
}
function mapEditToOriginal(fragment, edit) {
    return vscode_languageserver_1$v.TextEdit.is(edit)
        ? mapObjWithRangeToOriginal(fragment, edit)
        : mapInsertReplaceEditToOriginal(fragment, edit);
}
function mapDiagnosticToGenerated(fragment, diagnostic) {
    return { ...diagnostic, range: mapRangeToGenerated(fragment, diagnostic.range) };
}
function mapColorPresentationToOriginal(fragment, presentation) {
    const item = {
        ...presentation
    };
    if (item.textEdit) {
        item.textEdit = mapObjWithRangeToOriginal(fragment, item.textEdit);
    }
    if (item.additionalTextEdits) {
        item.additionalTextEdits = item.additionalTextEdits.map((edit) => mapObjWithRangeToOriginal(fragment, edit));
    }
    return item;
}
function mapSymbolInformationToOriginal(fragment, info) {
    return { ...info, location: mapObjWithRangeToOriginal(fragment, info.location) };
}
function mapLocationLinkToOriginal(fragment, def) {
    return vscode_languageserver_1$v.LocationLink.create(def.targetUri, fragment.getURL() === def.targetUri
        ? mapRangeToOriginal(fragment, def.targetRange)
        : def.targetRange, fragment.getURL() === def.targetUri
        ? mapRangeToOriginal(fragment, def.targetSelectionRange)
        : def.targetSelectionRange, def.originSelectionRange
        ? mapRangeToOriginal(fragment, def.originSelectionRange)
        : undefined);
}
function mapTextDocumentEditToOriginal(fragment, edit) {
    if (edit.textDocument.uri !== fragment.getURL()) {
        return edit;
    }
    return vscode_languageserver_1$v.TextDocumentEdit.create(edit.textDocument, edit.edits.map((textEdit) => mapObjWithRangeToOriginal(fragment, textEdit)));
}
function mapCodeActionToOriginal(fragment, codeAction) {
    return vscode_languageserver_1$v.CodeAction.create(codeAction.title, {
        documentChanges: codeAction.edit.documentChanges.map((edit) => mapTextDocumentEditToOriginal(fragment, edit))
    }, codeAction.kind);
}
function mapSelectionRangeToParent(fragment, selectionRange) {
    const { range, parent } = selectionRange;
    return vscode_languageserver_1$v.SelectionRange.create(mapRangeToOriginal(fragment, range), parent && mapSelectionRangeToParent(fragment, parent));
}

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	__exportStar(DocumentManager$1, exports);
	__exportStar(Document$2, exports);
	__exportStar(DocumentBase, exports);
	__exportStar(DocumentMapper$1, exports);
	__exportStar(requireUtils$2(), exports);
} (documents));
getDefaultExportFromCjs(documents);

var semanticTokenLegend = {};

Object.defineProperty(semanticTokenLegend, "__esModule", { value: true });
semanticTokenLegend.getSemanticTokenLegends = getSemanticTokenLegends;
const vscode_languageserver_1$u = main$8;
function getSemanticTokenLegends() {
    const tokenModifiers = [];
    [
        [0 , vscode_languageserver_1$u.SemanticTokenModifiers.declaration],
        [1 , vscode_languageserver_1$u.SemanticTokenModifiers.static],
        [2 , vscode_languageserver_1$u.SemanticTokenModifiers.async],
        [3 , vscode_languageserver_1$u.SemanticTokenModifiers.readonly],
        [4 , vscode_languageserver_1$u.SemanticTokenModifiers.defaultLibrary],
        [5 , 'local']
    ].forEach(([tsModifier, legend]) => (tokenModifiers[tsModifier] = legend));
    const tokenTypes = [];
    [
        [0 , vscode_languageserver_1$u.SemanticTokenTypes.class],
        [1 , vscode_languageserver_1$u.SemanticTokenTypes.enum],
        [2 , vscode_languageserver_1$u.SemanticTokenTypes.interface],
        [3 , vscode_languageserver_1$u.SemanticTokenTypes.namespace],
        [4 , vscode_languageserver_1$u.SemanticTokenTypes.typeParameter],
        [5 , vscode_languageserver_1$u.SemanticTokenTypes.type],
        [6 , vscode_languageserver_1$u.SemanticTokenTypes.parameter],
        [7 , vscode_languageserver_1$u.SemanticTokenTypes.variable],
        [8 , vscode_languageserver_1$u.SemanticTokenTypes.enumMember],
        [9 , vscode_languageserver_1$u.SemanticTokenTypes.property],
        [10 , vscode_languageserver_1$u.SemanticTokenTypes.function],
        [11 , vscode_languageserver_1$u.SemanticTokenTypes.method],
        [12 , vscode_languageserver_1$u.SemanticTokenTypes.event]
    ].forEach(([tokenType, legend]) => (tokenTypes[tokenType] = legend));
    return {
        tokenModifiers,
        tokenTypes
    };
}

var lsConfig = {};

var __importDefault$q = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(lsConfig, "__esModule", { value: true });
lsConfig.LSConfigManager = void 0;
const lodash_1$3 = lodashExports;
const typescript_1$n = __importDefault$q(ts);
const importPackage_1$4 = importPackage;
const utils_1$G = utils$6;
const path_1$b = __importDefault$q(path$1);
const fileCollection_1$5 = fileCollection;
const defaultLSConfig = {
    typescript: {
        enable: true,
        diagnostics: { enable: true },
        hover: { enable: true },
        completions: { enable: true },
        documentSymbols: { enable: true },
        codeActions: { enable: true },
        selectionRange: { enable: true },
        signatureHelp: { enable: true },
        semanticTokens: { enable: true },
        workspaceSymbols: { enable: true }
    },
    css: {
        enable: true,
        globals: '',
        diagnostics: { enable: true },
        hover: { enable: true },
        completions: { enable: true, emmet: true },
        documentColors: { enable: true },
        colorPresentations: { enable: true },
        documentSymbols: { enable: true },
        selectionRange: { enable: true }
    },
    html: {
        enable: true,
        hover: { enable: true },
        completions: { enable: true, emmet: true },
        tagComplete: { enable: true },
        documentSymbols: { enable: true },
        linkedEditing: { enable: true }
    },
    svelte: {
        enable: true,
        compilerWarnings: {},
        diagnostics: { enable: true },
        rename: { enable: true },
        format: {
            enable: true,
            config: {
                svelteSortOrder: 'options-scripts-markup-styles',
                svelteStrictMode: false,
                svelteAllowShorthand: true,
                svelteBracketNewLine: true,
                svelteIndentScriptAndStyle: true,
                printWidth: 80,
                singleQuote: false
            }
        },
        completions: { enable: true },
        hover: { enable: true },
        codeActions: { enable: true },
        selectionRange: { enable: true },
        runesLegacyModeCodeLens: { enable: true },
        defaultScriptLanguage: 'none'
    }
};
class LSConfigManager {
    constructor() {
        this.config = defaultLSConfig;
        this.listeners = [];
        this.tsUserPreferences = {
            typescript: {},
            javascript: {}
        };
        this.rawTsUserConfig = {
            typescript: {},
            javascript: {}
        };
        this.resolvedAutoImportExcludeCache = new fileCollection_1$5.FileMap();
        this.tsFormatCodeOptions = {
            typescript: this.getDefaultFormatCodeOptions(),
            javascript: this.getDefaultFormatCodeOptions()
        };
        this.prettierConfig = {};
        this.emmetConfig = {};
        this.isTrusted = true;
        this._updateTsUserPreferences('javascript', {});
        this._updateTsUserPreferences('typescript', {});
    }
    update(config) {
        this.config = (0, lodash_1$3.merge)({}, defaultLSConfig, this.config, config);
        if (config?.svelte?.compilerWarnings) {
            this.config.svelte.compilerWarnings = config.svelte.compilerWarnings;
        }
        this.notifyListeners();
    }
    enabled(key) {
        return !!this.get(key);
    }
    get(key) {
        return (0, lodash_1$3.get)(this.config, key);
    }
    getConfig() {
        return this.config;
    }
    onChange(callback) {
        this.listeners.push(callback);
    }
    updateEmmetConfig(config) {
        this.emmetConfig = config || {};
        this.notifyListeners();
    }
    getEmmetConfig() {
        return this.emmetConfig;
    }
    updatePrettierConfig(config) {
        this.prettierConfig = config || {};
        this.notifyListeners();
    }
    getPrettierConfig() {
        return this.prettierConfig;
    }
    getMergedPrettierConfig(prettierFromFileConfig, overridesWhenNoPrettierConfig = {}) {
        return ((0, utils_1$G.returnObjectIfHasKeys)(prettierFromFileConfig) ||
            (0, lodash_1$3.merge)({},
            this.get('svelte.format.config'), (0, utils_1$G.returnObjectIfHasKeys)(this.getPrettierConfig()) ||
                overridesWhenNoPrettierConfig ||
                {}));
    }
    updateTsJsUserPreferences(config) {
        const shared = config['js/ts'];
        ['typescript', 'javascript'].forEach((lang) => {
            if (config[lang]) {
                this._updateTsUserPreferences(lang, config[lang], shared);
                this.rawTsUserConfig[lang] = config[lang];
            }
        });
        this.notifyListeners();
        this.resolvedAutoImportExcludeCache.clear();
    }
    getIsTrusted() {
        return this.isTrusted;
    }
    updateIsTrusted(isTrusted) {
        this.isTrusted = isTrusted;
        this.notifyListeners();
    }
    _updateTsUserPreferences(lang, config, shared) {
        const { inlayHints } = config;
        this.tsUserPreferences[lang] = {
            ...this.tsUserPreferences[lang],
            importModuleSpecifierPreference: config.preferences?.importModuleSpecifier,
            importModuleSpecifierEnding: config.preferences?.importModuleSpecifierEnding,
            includePackageJsonAutoImports: config.preferences?.includePackageJsonAutoImports,
            quotePreference: config.preferences?.quoteStyle,
            includeCompletionsForModuleExports: config.suggest?.autoImports ?? true,
            includeCompletionsForImportStatements: config.suggest?.includeCompletionsForImportStatements ?? true,
            includeAutomaticOptionalChainCompletions: config.suggest?.includeAutomaticOptionalChainCompletions ?? true,
            includeCompletionsWithInsertText: true,
            autoImportFileExcludePatterns: config.preferences?.autoImportFileExcludePatterns,
            useLabelDetailsInCompletionEntries: true,
            includeCompletionsWithSnippetText: config.suggest?.includeCompletionsWithSnippetText ?? true,
            includeCompletionsWithClassMemberSnippets: config.suggest?.classMemberSnippets?.enabled ?? true,
            includeCompletionsWithObjectLiteralMethodSnippets: config.suggest?.objectLiteralMethodSnippets?.enabled ?? true,
            preferTypeOnlyAutoImports: config.preferences?.preferTypeOnlyAutoImports,
            maximumHoverLength: shared?.hover?.maximumLength,
            allowIncompleteCompletions: true,
            includeInlayEnumMemberValueHints: inlayHints?.enumMemberValues?.enabled,
            includeInlayFunctionLikeReturnTypeHints: inlayHints?.functionLikeReturnTypes?.enabled,
            includeInlayParameterNameHints: inlayHints?.parameterNames?.enabled,
            includeInlayParameterNameHintsWhenArgumentMatchesName: inlayHints?.parameterNames?.suppressWhenArgumentMatchesName === false,
            includeInlayFunctionParameterTypeHints: inlayHints?.parameterTypes?.enabled,
            includeInlayVariableTypeHints: inlayHints?.variableTypes?.enabled,
            includeInlayPropertyDeclarationTypeHints: inlayHints?.propertyDeclarationTypes?.enabled,
            includeInlayVariableTypeHintsWhenTypeMatchesName: inlayHints?.variableTypes?.suppressWhenTypeMatchesName === false,
            interactiveInlayHints: true,
            autoImportSpecifierExcludeRegexes: config.preferences?.autoImportSpecifierExcludeRegexes,
            organizeImportsAccentCollation: config.preferences?.organizeImports?.accentCollation,
            organizeImportsCollation: config.preferences?.organizeImports?.collation,
            organizeImportsCaseFirst: this.withDefaultAsUndefined(config.preferences?.organizeImports?.caseFirst, 'default'),
            organizeImportsIgnoreCase: this.withDefaultAsUndefined(config.preferences?.organizeImports?.caseSensitivity, 'auto'),
            organizeImportsLocale: config.preferences?.organizeImports?.locale,
            organizeImportsNumericCollation: config.preferences?.organizeImports?.numericCollation,
            organizeImportsTypeOrder: this.withDefaultAsUndefined(config.preferences?.organizeImports?.typeOrder, 'auto'),
            excludeLibrarySymbolsInNavTo: config.workspaceSymbols?.excludeLibrarySymbols ?? true
        };
    }
    withDefaultAsUndefined(value, def) {
        return value === def ? undefined : value;
    }
    getTsUserPreferences(lang, normalizedWorkspacePath) {
        const userPreferences = this.tsUserPreferences[lang];
        if (!normalizedWorkspacePath || !userPreferences.autoImportFileExcludePatterns) {
            return userPreferences;
        }
        let autoImportFileExcludePatterns = this.resolvedAutoImportExcludeCache.get(normalizedWorkspacePath);
        if (!autoImportFileExcludePatterns) {
            const version = typescript_1$n.default.version.split('.');
            const major = parseInt(version[0]);
            const minor = parseInt(version[1]);
            const gte5_4 = major > 5 || (major === 5 && minor >= 4);
            autoImportFileExcludePatterns = userPreferences.autoImportFileExcludePatterns.map((p) => {
                const slashNormalized = p.replace(/\\/g, '/');
                const isRelative = /^\.\.?($|\/)/.test(slashNormalized);
                if (path_1$b.default.isAbsolute(p)) {
                    return p;
                }
                const wildcardPrefix = gte5_4 ? '' : path_1$b.default.parse(normalizedWorkspacePath).root;
                return p.startsWith('*')
                    ? wildcardPrefix + slashNormalized
                    : isRelative
                        ? path_1$b.default.join(normalizedWorkspacePath, p)
                        : wildcardPrefix + '**/' + slashNormalized;
            });
            this.resolvedAutoImportExcludeCache.set(normalizedWorkspacePath, autoImportFileExcludePatterns);
        }
        return {
            ...userPreferences,
            autoImportFileExcludePatterns
        };
    }
    getClientTsUserConfig(lang) {
        return this.rawTsUserConfig[lang];
    }
    updateCssConfig(config) {
        this.cssConfig = config;
        this.notifyListeners();
    }
    getCssConfig() {
        return this.cssConfig;
    }
    updateScssConfig(config) {
        this.scssConfig = config;
        this.notifyListeners();
    }
    getScssConfig() {
        return this.scssConfig;
    }
    updateLessConfig(config) {
        this.lessConfig = config;
        this.notifyListeners();
    }
    getLessConfig() {
        return this.lessConfig;
    }
    updateHTMLConfig(config) {
        this.htmlConfig = config;
        this.notifyListeners();
    }
    getHTMLConfig() {
        return this.htmlConfig;
    }
    updateTsJsFormateConfig(config) {
        ['typescript', 'javascript'].forEach((lang) => {
            if (config[lang]) {
                this._updateTsFormatConfig(lang, config[lang]);
            }
        });
        this.notifyListeners();
    }
    getDefaultFormatCodeOptions() {
        return {
            indentSize: 4,
            tabSize: 4,
            convertTabsToSpaces: true,
            indentStyle: typescript_1$n.default.IndentStyle.Smart,
            insertSpaceAfterConstructor: false,
            insertSpaceAfterCommaDelimiter: true,
            insertSpaceAfterSemicolonInForStatements: true,
            insertSpaceBeforeAndAfterBinaryOperators: true,
            insertSpaceAfterKeywordsInControlFlowStatements: true,
            insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,
            insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,
            insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: true,
            insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,
            insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false,
            insertSpaceBeforeFunctionParenthesis: false,
            placeOpenBraceOnNewLineForFunctions: false,
            placeOpenBraceOnNewLineForControlBlocks: false,
            trimTrailingWhitespace: true,
            semicolons: typescript_1$n.default.SemicolonPreference.Ignore,
            insertSpaceAfterFunctionKeywordForAnonymousFunctions: true
        };
    }
    _updateTsFormatConfig(lang, config) {
        this.tsFormatCodeOptions[lang] = {
            ...this.tsFormatCodeOptions[lang],
            ...(config.format ?? {})
        };
    }
    async getFormatCodeSettingsForFile(document, scriptKind) {
        const filePath = document.getFilePath();
        const configLang = scriptKind === typescript_1$n.default.ScriptKind.TS || scriptKind === typescript_1$n.default.ScriptKind.TSX
            ? 'typescript'
            : 'javascript';
        const tsFormatCodeOptions = this.tsFormatCodeOptions[configLang];
        if (!filePath) {
            return tsFormatCodeOptions;
        }
        const prettierConfig = this.getMergedPrettierConfig(await (0, importPackage_1$4.importPrettier)(filePath).resolveConfig(filePath, {
            editorconfig: true
        }));
        const useSemicolons = prettierConfig.semi ?? true;
        const documentUseLf = document.getText().includes('\n') && !document.getText().includes('\r\n');
        const indentSize = (typeof prettierConfig.tabWidth === 'number' ? prettierConfig.tabWidth : null) ??
            tsFormatCodeOptions.tabSize;
        return {
            ...tsFormatCodeOptions,
            newLineCharacter: documentUseLf ? '\n' : typescript_1$n.default.sys.newLine,
            baseIndentSize: prettierConfig.svelteIndentScriptAndStyle === false ? 0 : indentSize,
            indentSize,
            convertTabsToSpaces: !prettierConfig.useTabs,
            semicolons: useSemicolons
                ? typescript_1$n.default.SemicolonPreference.Insert
                : typescript_1$n.default.SemicolonPreference.Remove,
            tabSize: indentSize
        };
    }
    notifyListeners() {
        if (this.scheduledUpdate) {
            clearTimeout(this.scheduledUpdate);
        }
        this.scheduledUpdate = setTimeout(() => {
            this.scheduledUpdate = undefined;
            this.listeners.forEach((listener) => listener(this));
        });
    }
    updateClientCapabilities(clientCapabilities) {
        this.clientCapabilities = clientCapabilities;
        this.notifyListeners();
    }
    getClientCapabilities() {
        return this.clientCapabilities;
    }
}
lsConfig.LSConfigManager = LSConfigManager;

var plugins = {};

var CSSPlugin$1 = {};

function createScanner(text, ignoreTrivia) {
    if (ignoreTrivia === void 0) { ignoreTrivia = false; }
    var len = text.length;
    var pos = 0, value = '', tokenOffset = 0, token = 16 , lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0 ;
    function scanHexDigits(count, exact) {
        var digits = 0;
        var value = 0;
        while (digits < count || !exact) {
            var ch = text.charCodeAt(pos);
            if (ch >= 48  && ch <= 57 ) {
                value = value * 16 + ch - 48 ;
            }
            else if (ch >= 65  && ch <= 70 ) {
                value = value * 16 + ch - 65  + 10;
            }
            else if (ch >= 97  && ch <= 102 ) {
                value = value * 16 + ch - 97  + 10;
            }
            else {
                break;
            }
            pos++;
            digits++;
        }
        if (digits < count) {
            value = -1;
        }
        return value;
    }
    function setPosition(newPosition) {
        pos = newPosition;
        value = '';
        tokenOffset = 0;
        token = 16 ;
        scanError = 0 ;
    }
    function scanNumber() {
        var start = pos;
        if (text.charCodeAt(pos) === 48 ) {
            pos++;
        }
        else {
            pos++;
            while (pos < text.length && isDigit(text.charCodeAt(pos))) {
                pos++;
            }
        }
        if (pos < text.length && text.charCodeAt(pos) === 46 ) {
            pos++;
            if (pos < text.length && isDigit(text.charCodeAt(pos))) {
                pos++;
                while (pos < text.length && isDigit(text.charCodeAt(pos))) {
                    pos++;
                }
            }
            else {
                scanError = 3 ;
                return text.substring(start, pos);
            }
        }
        var end = pos;
        if (pos < text.length && (text.charCodeAt(pos) === 69  || text.charCodeAt(pos) === 101 )) {
            pos++;
            if (pos < text.length && text.charCodeAt(pos) === 43  || text.charCodeAt(pos) === 45 ) {
                pos++;
            }
            if (pos < text.length && isDigit(text.charCodeAt(pos))) {
                pos++;
                while (pos < text.length && isDigit(text.charCodeAt(pos))) {
                    pos++;
                }
                end = pos;
            }
            else {
                scanError = 3 ;
            }
        }
        return text.substring(start, end);
    }
    function scanString() {
        var result = '', start = pos;
        while (true) {
            if (pos >= len) {
                result += text.substring(start, pos);
                scanError = 2 ;
                break;
            }
            var ch = text.charCodeAt(pos);
            if (ch === 34 ) {
                result += text.substring(start, pos);
                pos++;
                break;
            }
            if (ch === 92 ) {
                result += text.substring(start, pos);
                pos++;
                if (pos >= len) {
                    scanError = 2 ;
                    break;
                }
                var ch2 = text.charCodeAt(pos++);
                switch (ch2) {
                    case 34 :
                        result += '\"';
                        break;
                    case 92 :
                        result += '\\';
                        break;
                    case 47 :
                        result += '/';
                        break;
                    case 98 :
                        result += '\b';
                        break;
                    case 102 :
                        result += '\f';
                        break;
                    case 110 :
                        result += '\n';
                        break;
                    case 114 :
                        result += '\r';
                        break;
                    case 116 :
                        result += '\t';
                        break;
                    case 117 :
                        var ch3 = scanHexDigits(4, true);
                        if (ch3 >= 0) {
                            result += String.fromCharCode(ch3);
                        }
                        else {
                            scanError = 4 ;
                        }
                        break;
                    default:
                        scanError = 5 ;
                }
                start = pos;
                continue;
            }
            if (ch >= 0 && ch <= 0x1f) {
                if (isLineBreak(ch)) {
                    result += text.substring(start, pos);
                    scanError = 2 ;
                    break;
                }
                else {
                    scanError = 6 ;
                }
            }
            pos++;
        }
        return result;
    }
    function scanNext() {
        value = '';
        scanError = 0 ;
        tokenOffset = pos;
        lineStartOffset = lineNumber;
        prevTokenLineStartOffset = tokenLineStartOffset;
        if (pos >= len) {
            tokenOffset = len;
            return token = 17 ;
        }
        var code = text.charCodeAt(pos);
        if (isWhiteSpace$4(code)) {
            do {
                pos++;
                value += String.fromCharCode(code);
                code = text.charCodeAt(pos);
            } while (isWhiteSpace$4(code));
            return token = 15 ;
        }
        if (isLineBreak(code)) {
            pos++;
            value += String.fromCharCode(code);
            if (code === 13  && text.charCodeAt(pos) === 10 ) {
                pos++;
                value += '\n';
            }
            lineNumber++;
            tokenLineStartOffset = pos;
            return token = 14 ;
        }
        switch (code) {
            case 123 :
                pos++;
                return token = 1 ;
            case 125 :
                pos++;
                return token = 2 ;
            case 91 :
                pos++;
                return token = 3 ;
            case 93 :
                pos++;
                return token = 4 ;
            case 58 :
                pos++;
                return token = 6 ;
            case 44 :
                pos++;
                return token = 5 ;
            case 34 :
                pos++;
                value = scanString();
                return token = 10 ;
            case 47 :
                var start = pos - 1;
                if (text.charCodeAt(pos + 1) === 47 ) {
                    pos += 2;
                    while (pos < len) {
                        if (isLineBreak(text.charCodeAt(pos))) {
                            break;
                        }
                        pos++;
                    }
                    value = text.substring(start, pos);
                    return token = 12 ;
                }
                if (text.charCodeAt(pos + 1) === 42 ) {
                    pos += 2;
                    var safeLength = len - 1;
                    var commentClosed = false;
                    while (pos < safeLength) {
                        var ch = text.charCodeAt(pos);
                        if (ch === 42  && text.charCodeAt(pos + 1) === 47 ) {
                            pos += 2;
                            commentClosed = true;
                            break;
                        }
                        pos++;
                        if (isLineBreak(ch)) {
                            if (ch === 13  && text.charCodeAt(pos) === 10 ) {
                                pos++;
                            }
                            lineNumber++;
                            tokenLineStartOffset = pos;
                        }
                    }
                    if (!commentClosed) {
                        pos++;
                        scanError = 1 ;
                    }
                    value = text.substring(start, pos);
                    return token = 13 ;
                }
                value += String.fromCharCode(code);
                pos++;
                return token = 16 ;
            case 45 :
                value += String.fromCharCode(code);
                pos++;
                if (pos === len || !isDigit(text.charCodeAt(pos))) {
                    return token = 16 ;
                }
            case 48 :
            case 49 :
            case 50 :
            case 51 :
            case 52 :
            case 53 :
            case 54 :
            case 55 :
            case 56 :
            case 57 :
                value += scanNumber();
                return token = 11 ;
            default:
                while (pos < len && isUnknownContentCharacter(code)) {
                    pos++;
                    code = text.charCodeAt(pos);
                }
                if (tokenOffset !== pos) {
                    value = text.substring(tokenOffset, pos);
                    switch (value) {
                        case 'true': return token = 8 ;
                        case 'false': return token = 9 ;
                        case 'null': return token = 7 ;
                    }
                    return token = 16 ;
                }
                value += String.fromCharCode(code);
                pos++;
                return token = 16 ;
        }
    }
    function isUnknownContentCharacter(code) {
        if (isWhiteSpace$4(code) || isLineBreak(code)) {
            return false;
        }
        switch (code) {
            case 125 :
            case 93 :
            case 123 :
            case 91 :
            case 34 :
            case 58 :
            case 44 :
            case 47 :
                return false;
        }
        return true;
    }
    function scanNextNonTrivia() {
        var result;
        do {
            result = scanNext();
        } while (result >= 12  && result <= 15 );
        return result;
    }
    return {
        setPosition: setPosition,
        getPosition: function () { return pos; },
        scan: ignoreTrivia ? scanNextNonTrivia : scanNext,
        getToken: function () { return token; },
        getTokenValue: function () { return value; },
        getTokenOffset: function () { return tokenOffset; },
        getTokenLength: function () { return pos - tokenOffset; },
        getTokenStartLine: function () { return lineStartOffset; },
        getTokenStartCharacter: function () { return tokenOffset - prevTokenLineStartOffset; },
        getTokenError: function () { return scanError; },
    };
}
function isWhiteSpace$4(ch) {
    return ch === 32  || ch === 9  || ch === 11  || ch === 12  ||
        ch === 160  || ch === 5760  || ch >= 8192  && ch <= 8203  ||
        ch === 8239  || ch === 8287  || ch === 12288  || ch === 65279 ;
}
function isLineBreak(ch) {
    return ch === 10  || ch === 13  || ch === 8232  || ch === 8233 ;
}
function isDigit(ch) {
    return ch >= 48  && ch <= 57 ;
}

var ParseOptions;
(function (ParseOptions) {
    ParseOptions.DEFAULT = {
        allowTrailingComma: false
    };
})(ParseOptions || (ParseOptions = {}));
function parse$4(text, errors, options) {
    if (errors === void 0) { errors = []; }
    if (options === void 0) { options = ParseOptions.DEFAULT; }
    var currentProperty = null;
    var currentParent = [];
    var previousParents = [];
    function onValue(value) {
        if (Array.isArray(currentParent)) {
            currentParent.push(value);
        }
        else if (currentProperty !== null) {
            currentParent[currentProperty] = value;
        }
    }
    var visitor = {
        onObjectBegin: function () {
            var object = {};
            onValue(object);
            previousParents.push(currentParent);
            currentParent = object;
            currentProperty = null;
        },
        onObjectProperty: function (name) {
            currentProperty = name;
        },
        onObjectEnd: function () {
            currentParent = previousParents.pop();
        },
        onArrayBegin: function () {
            var array = [];
            onValue(array);
            previousParents.push(currentParent);
            currentParent = array;
            currentProperty = null;
        },
        onArrayEnd: function () {
            currentParent = previousParents.pop();
        },
        onLiteralValue: onValue,
        onError: function (error, offset, length) {
            errors.push({ error: error, offset: offset, length: length });
        }
    };
    visit(text, visitor, options);
    return currentParent[0];
}
function visit(text, visitor, options) {
    if (options === void 0) { options = ParseOptions.DEFAULT; }
    var _scanner = createScanner(text, false);
    function toNoArgVisit(visitFunction) {
        return visitFunction ? function () { return visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()); } : function () { return true; };
    }
    function toOneArgVisit(visitFunction) {
        return visitFunction ? function (arg) { return visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()); } : function () { return true; };
    }
    var onObjectBegin = toNoArgVisit(visitor.onObjectBegin), onObjectProperty = toOneArgVisit(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisit(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisit(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);
    var disallowComments = options && options.disallowComments;
    var allowTrailingComma = options && options.allowTrailingComma;
    function scanNext() {
        while (true) {
            var token = _scanner.scan();
            switch (_scanner.getTokenError()) {
                case 4 :
                    handleError(14 );
                    break;
                case 5 :
                    handleError(15 );
                    break;
                case 3 :
                    handleError(13 );
                    break;
                case 1 :
                    if (!disallowComments) {
                        handleError(11 );
                    }
                    break;
                case 2 :
                    handleError(12 );
                    break;
                case 6 :
                    handleError(16 );
                    break;
            }
            switch (token) {
                case 12 :
                case 13 :
                    if (disallowComments) {
                        handleError(10 );
                    }
                    else {
                        onComment();
                    }
                    break;
                case 16 :
                    handleError(1 );
                    break;
                case 15 :
                case 14 :
                    break;
                default:
                    return token;
            }
        }
    }
    function handleError(error, skipUntilAfter, skipUntil) {
        if (skipUntilAfter === void 0) { skipUntilAfter = []; }
        if (skipUntil === void 0) { skipUntil = []; }
        onError(error);
        if (skipUntilAfter.length + skipUntil.length > 0) {
            var token = _scanner.getToken();
            while (token !== 17 ) {
                if (skipUntilAfter.indexOf(token) !== -1) {
                    scanNext();
                    break;
                }
                else if (skipUntil.indexOf(token) !== -1) {
                    break;
                }
                token = scanNext();
            }
        }
    }
    function parseString(isValue) {
        var value = _scanner.getTokenValue();
        if (isValue) {
            onLiteralValue(value);
        }
        else {
            onObjectProperty(value);
        }
        scanNext();
        return true;
    }
    function parseLiteral() {
        switch (_scanner.getToken()) {
            case 11 :
                var tokenValue = _scanner.getTokenValue();
                var value = Number(tokenValue);
                if (isNaN(value)) {
                    handleError(2 );
                    value = 0;
                }
                onLiteralValue(value);
                break;
            case 7 :
                onLiteralValue(null);
                break;
            case 8 :
                onLiteralValue(true);
                break;
            case 9 :
                onLiteralValue(false);
                break;
            default:
                return false;
        }
        scanNext();
        return true;
    }
    function parseProperty() {
        if (_scanner.getToken() !== 10 ) {
            handleError(3 , [], [2 , 5 ]);
            return false;
        }
        parseString(false);
        if (_scanner.getToken() === 6 ) {
            onSeparator(':');
            scanNext();
            if (!parseValue()) {
                handleError(4 , [], [2 , 5 ]);
            }
        }
        else {
            handleError(5 , [], [2 , 5 ]);
        }
        return true;
    }
    function parseObject() {
        onObjectBegin();
        scanNext();
        var needsComma = false;
        while (_scanner.getToken() !== 2  && _scanner.getToken() !== 17 ) {
            if (_scanner.getToken() === 5 ) {
                if (!needsComma) {
                    handleError(4 , [], []);
                }
                onSeparator(',');
                scanNext();
                if (_scanner.getToken() === 2  && allowTrailingComma) {
                    break;
                }
            }
            else if (needsComma) {
                handleError(6 , [], []);
            }
            if (!parseProperty()) {
                handleError(4 , [], [2 , 5 ]);
            }
            needsComma = true;
        }
        onObjectEnd();
        if (_scanner.getToken() !== 2 ) {
            handleError(7 , [2 ], []);
        }
        else {
            scanNext();
        }
        return true;
    }
    function parseArray() {
        onArrayBegin();
        scanNext();
        var needsComma = false;
        while (_scanner.getToken() !== 4  && _scanner.getToken() !== 17 ) {
            if (_scanner.getToken() === 5 ) {
                if (!needsComma) {
                    handleError(4 , [], []);
                }
                onSeparator(',');
                scanNext();
                if (_scanner.getToken() === 4  && allowTrailingComma) {
                    break;
                }
            }
            else if (needsComma) {
                handleError(6 , [], []);
            }
            if (!parseValue()) {
                handleError(4 , [], [4 , 5 ]);
            }
            needsComma = true;
        }
        onArrayEnd();
        if (_scanner.getToken() !== 4 ) {
            handleError(8 , [4 ], []);
        }
        else {
            scanNext();
        }
        return true;
    }
    function parseValue() {
        switch (_scanner.getToken()) {
            case 3 :
                return parseArray();
            case 1 :
                return parseObject();
            case 10 :
                return parseString(true);
            default:
                return parseLiteral();
        }
    }
    scanNext();
    if (_scanner.getToken() === 17 ) {
        if (options.allowEmptyContent) {
            return true;
        }
        handleError(4 , [], []);
        return false;
    }
    if (!parseValue()) {
        handleError(4 , [], []);
        return false;
    }
    if (_scanner.getToken() !== 17 ) {
        handleError(9 , [], []);
    }
    return true;
}

var parse$3 = parse$4;
function printParseErrorCode(code) {
    switch (code) {
        case 1 : return 'InvalidSymbol';
        case 2 : return 'InvalidNumberFormat';
        case 3 : return 'PropertyNameExpected';
        case 4 : return 'ValueExpected';
        case 5 : return 'ColonExpected';
        case 6 : return 'CommaExpected';
        case 7 : return 'CloseBraceExpected';
        case 8 : return 'CloseBracketExpected';
        case 9 : return 'EndOfFileExpected';
        case 10 : return 'InvalidCommentToken';
        case 11 : return 'UnexpectedEndOfComment';
        case 12 : return 'UnexpectedEndOfString';
        case 13 : return 'UnexpectedEndOfNumber';
        case 14 : return 'InvalidUnicode';
        case 15 : return 'InvalidEscapeCharacter';
        case 16 : return 'InvalidCharacter';
    }
    return '<unknown ParseErrorCode>';
}

const cssData$1 = {
    "properties": ["additive-symbols", "align-content", "align-items", "justify-items", "justify-self", "justify-items", "align-self", "all", "alt", "animation", "animation-delay", "animation-direction", "animation-duration", "animation-fill-mode", "animation-iteration-count", "animation-name", "animation-play-state", "animation-timing-function", "backface-visibility", "background", "background-attachment", "background-blend-mode", "background-clip", "background-color", "background-image", "background-origin", "background-position", "background-position-x", "background-position-y", "background-repeat", "background-size", "behavior", "block-size", "border", "border-block-end", "border-block-start", "border-block-end-color", "border-block-start-color", "border-block-end-style", "border-block-start-style", "border-block-end-width", "border-block-start-width", "border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius", "border-bottom-style", "border-bottom-width", "border-collapse", "border-color", "border-image", "border-image-outset", "border-image-repeat", "border-image-slice", "border-image-source", "border-image-width", "border-inline-end", "border-inline-start", "border-inline-end-color", "border-inline-start-color", "border-inline-end-style", "border-inline-start-style", "border-inline-end-width", "border-inline-start-width", "border-left", "border-left-color", "border-left-style", "border-left-width", "border-radius", "border-right", "border-right-color", "border-right-style", "border-right-width", "border-spacing", "border-style", "border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style", "border-top-width", "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing", "break-after", "break-before", "break-inside", "caption-side", "caret-color", "clear", "clip", "clip-path", "clip-rule", "color", "color-interpolation-filters", "column-count", "column-fill", "column-gap", "column-rule", "column-rule-color", "column-rule-style", "column-rule-width", "columns", "column-span", "column-width", "contain", "content", "counter-increment", "counter-reset", "cursor", "direction", "display", "empty-cells", "enable-background", "fallback", "fill", "fill-opacity", "fill-rule", "filter", "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "float", "flood-color", "flood-opacity", "font", "font-family", "font-feature-settings", "font-kerning", "font-language-override", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-synthesis", "font-variant", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position", "font-weight", "glyph-orientation-horizontal", "glyph-orientation-vertical", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows", "grid-column", "grid-column-end", "grid-column-gap", "grid-column-start", "grid-gap", "grid-row", "grid-row-end", "grid-row-gap", "grid-row-start", "grid-template", "grid-template-areas", "grid-template-columns", "grid-template-rows", "height", "hyphens", "image-orientation", "image-rendering", "ime-mode", "inline-size", "isolation", "justify-content", "kerning", "left", "letter-spacing", "lighting-color", "line-break", "line-height", "list-style", "list-style-image", "list-style-position", "list-style-type", "margin", "margin-block-end", "margin-block-start", "margin-bottom", "margin-inline-end", "margin-inline-start", "margin-left", "margin-right", "margin-top", "marker", "marker-end", "marker-mid", "marker-start", "mask-type", "max-block-size", "max-height", "max-inline-size", "max-width", "min-block-size", "min-height", "min-inline-size", "min-width", "mix-blend-mode", "motion", "motion-offset", "motion-path", "motion-rotation", "-moz-animation", "-moz-animation-delay", "-moz-animation-direction", "-moz-animation-duration", "-moz-animation-iteration-count", "-moz-animation-name", "-moz-animation-play-state", "-moz-animation-timing-function", "-moz-appearance", "-moz-backface-visibility", "-moz-background-clip", "-moz-background-inline-policy", "-moz-background-origin", "-moz-border-bottom-colors", "-moz-border-image", "-moz-border-left-colors", "-moz-border-right-colors", "-moz-border-top-colors", "-moz-box-align", "-moz-box-direction", "-moz-box-flex", "-moz-box-flexgroup", "-moz-box-ordinal-group", "-moz-box-orient", "-moz-box-pack", "-moz-box-sizing", "-moz-column-count", "-moz-column-gap", "-moz-column-rule", "-moz-column-rule-color", "-moz-column-rule-style", "-moz-column-rule-width", "-moz-columns", "-moz-column-width", "-moz-font-feature-settings", "-moz-hyphens", "-moz-perspective", "-moz-perspective-origin", "-moz-text-align-last", "-moz-text-decoration-color", "-moz-text-decoration-line", "-moz-text-decoration-style", "-moz-text-size-adjust", "-moz-transform", "-moz-transform-origin", "-moz-transition", "-moz-transition-delay", "-moz-transition-duration", "-moz-transition-property", "-moz-transition-timing-function", "-moz-user-focus", "-moz-user-select", "-ms-accelerator", "-ms-behavior", "-ms-block-progression", "-ms-content-zoom-chaining", "-ms-content-zooming", "-ms-content-zoom-limit", "-ms-content-zoom-limit-max", "-ms-content-zoom-limit-min", "-ms-content-zoom-snap", "-ms-content-zoom-snap-points", "-ms-content-zoom-snap-type", "-ms-filter", "-ms-flex", "-ms-flex-align", "-ms-flex-direction", "-ms-flex-flow", "-ms-flex-item-align", "-ms-flex-line-pack", "-ms-flex-order", "-ms-flex-pack", "-ms-flex-wrap", "-ms-flow-from", "-ms-flow-into", "-ms-grid-column", "-ms-grid-column-align", "-ms-grid-columns", "-ms-grid-column-span", "-ms-grid-layer", "-ms-grid-row", "-ms-grid-row-align", "-ms-grid-rows", "-ms-grid-row-span", "-ms-high-contrast-adjust", "-ms-hyphenate-limit-chars", "-ms-hyphenate-limit-lines", "-ms-hyphenate-limit-zone", "-ms-hyphens", "-ms-ime-mode", "-ms-interpolation-mode", "-ms-layout-grid", "-ms-layout-grid-char", "-ms-layout-grid-line", "-ms-layout-grid-mode", "-ms-layout-grid-type", "-ms-line-break", "-ms-overflow-style", "-ms-perspective", "-ms-perspective-origin", "-ms-perspective-origin-x", "-ms-perspective-origin-y", "-ms-progress-appearance", "-ms-scrollbar-3dlight-color", "-ms-scrollbar-arrow-color", "-ms-scrollbar-base-color", "-ms-scrollbar-darkshadow-color", "-ms-scrollbar-face-color", "-ms-scrollbar-highlight-color", "-ms-scrollbar-shadow-color", "-ms-scrollbar-track-color", "-ms-scroll-chaining", "-ms-scroll-limit", "-ms-scroll-limit-x-max", "-ms-scroll-limit-x-min", "-ms-scroll-limit-y-max", "-ms-scroll-limit-y-min", "-ms-scroll-rails", "-ms-scroll-snap-points-x", "-ms-scroll-snap-points-y", "-ms-scroll-snap-type", "-ms-scroll-snap-x", "-ms-scroll-snap-y", "-ms-scroll-translation", "-ms-text-align-last", "-ms-text-autospace", "-ms-text-combine-horizontal", "-ms-text-justify", "-ms-text-kashida-space", "-ms-text-overflow", "-ms-text-size-adjust", "-ms-text-underline-position", "-ms-touch-action", "-ms-touch-select", "-ms-transform", "-ms-transform-origin", "-ms-transform-origin-x", "-ms-transform-origin-y", "-ms-transform-origin-z", "-ms-user-select", "-ms-word-break", "-ms-word-wrap", "-ms-wrap-flow", "-ms-wrap-margin", "-ms-wrap-through", "-ms-writing-mode", "-ms-zoom", "-ms-zoom-animation", "nav-down", "nav-index", "nav-left", "nav-right", "nav-up", "negative", "-o-animation", "-o-animation-delay", "-o-animation-direction", "-o-animation-duration", "-o-animation-fill-mode", "-o-animation-iteration-count", "-o-animation-name", "-o-animation-play-state", "-o-animation-timing-function", "object-fit", "object-position", "-o-border-image", "-o-object-fit", "-o-object-position", "opacity", "order", "orphans", "-o-table-baseline", "-o-tab-size", "-o-text-overflow", "-o-transform", "-o-transform-origin", "-o-transition", "-o-transition-delay", "-o-transition-duration", "-o-transition-property", "-o-transition-timing-function", "offset-block-end", "offset-block-start", "offset-inline-end", "offset-inline-start", "outline", "outline-color", "outline-offset", "outline-style", "outline-width", "overflow", "overflow-wrap", "overflow-x", "overflow-y", "pad", "padding", "padding-bottom", "padding-block-end", "padding-block-start", "padding-inline-end", "padding-inline-start", "padding-left", "padding-right", "padding-top", "page-break-after", "page-break-before", "page-break-inside", "paint-order", "perspective", "perspective-origin", "pointer-events", "position", "prefix", "quotes", "range", "resize", "right", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span", "scrollbar-3dlight-color", "scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-darkshadow-color", "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color", "scrollbar-track-color", "scroll-behavior", "scroll-snap-coordinate", "scroll-snap-destination", "scroll-snap-points-x", "scroll-snap-points-y", "scroll-snap-type", "shape-image-threshold", "shape-margin", "shape-outside", "shape-rendering", "size", "src", "stop-color", "stop-opacity", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "suffix", "system", "symbols", "table-layout", "tab-size", "text-align", "text-align-last", "text-anchor", "text-decoration", "text-decoration-color", "text-decoration-line", "text-decoration-style", "text-indent", "text-justify", "text-orientation", "text-overflow", "text-rendering", "text-shadow", "text-transform", "text-underline-position", "top", "touch-action", "transform", "transform-origin", "transform-style", "transition", "transition-delay", "transition-duration", "transition-property", "transition-timing-function", "unicode-bidi", "unicode-range", "user-select", "vertical-align", "visibility", "-webkit-animation", "-webkit-animation-delay", "-webkit-animation-direction", "-webkit-animation-duration", "-webkit-animation-fill-mode", "-webkit-animation-iteration-count", "-webkit-animation-name", "-webkit-animation-play-state", "-webkit-animation-timing-function", "-webkit-appearance", "-webkit-backdrop-filter", "-webkit-backface-visibility", "-webkit-background-clip", "-webkit-background-composite", "-webkit-background-origin", "-webkit-border-image", "-webkit-box-align", "-webkit-box-direction", "-webkit-box-flex", "-webkit-box-flex-group", "-webkit-box-ordinal-group", "-webkit-box-orient", "-webkit-box-pack", "-webkit-box-reflect", "-webkit-box-sizing", "-webkit-break-after", "-webkit-break-before", "-webkit-break-inside", "-webkit-column-break-after", "-webkit-column-break-before", "-webkit-column-break-inside", "-webkit-column-count", "-webkit-column-gap", "-webkit-column-rule", "-webkit-column-rule-color", "-webkit-column-rule-style", "-webkit-column-rule-width", "-webkit-columns", "-webkit-column-span", "-webkit-column-width", "-webkit-filter", "-webkit-flow-from", "-webkit-flow-into", "-webkit-font-feature-settings", "-webkit-hyphens", "-webkit-line-break", "-webkit-margin-bottom-collapse", "-webkit-margin-collapse", "-webkit-margin-start", "-webkit-margin-top-collapse", "-webkit-mask-clip", "-webkit-mask-image", "-webkit-mask-origin", "-webkit-mask-repeat", "-webkit-mask-size", "-webkit-nbsp-mode", "-webkit-overflow-scrolling", "-webkit-padding-start", "-webkit-perspective", "-webkit-perspective-origin", "-webkit-region-fragment", "-webkit-tap-highlight-color", "-webkit-text-fill-color", "-webkit-text-size-adjust", "-webkit-text-stroke", "-webkit-text-stroke-color", "-webkit-text-stroke-width", "-webkit-touch-callout", "-webkit-transform", "-webkit-transform-origin", "-webkit-transform-origin-x", "-webkit-transform-origin-y", "-webkit-transform-origin-z", "-webkit-transform-style", "-webkit-transition", "-webkit-transition-delay", "-webkit-transition-duration", "-webkit-transition-property", "-webkit-transition-timing-function", "-webkit-user-drag", "-webkit-user-modify", "-webkit-user-select", "white-space", "widows", "width", "will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index", "zoom"]
};
const htmlData = {
    "tags": [
        "body", "head", "html",
        "address", "blockquote", "dd", "div", "section", "article", "aside", "header", "footer", "nav", "menu", "dl", "dt", "fieldset", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "iframe", "noframes", "object", "ol", "p", "ul", "applet", "center", "dir", "hr", "pre",
        "a", "abbr", "acronym", "area", "b", "base", "basefont", "bdo", "big", "br", "button", "caption", "cite", "code", "col", "colgroup", "del", "dfn", "em", "font", "i", "img", "input", "ins", "isindex", "kbd", "label", "legend", "li", "link", "map", "meta", "noscript", "optgroup", "option", "param", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "style", "sub", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "title", "tr", "tt", "u", "var",
        "canvas", "main", "figure", "plaintext", "figcaption", "hgroup", "details", "summary"
    ]
};

var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var _a$1;
var isWindows;
if (typeof process === 'object') {
    isWindows = process.platform === 'win32';
}
else if (typeof navigator === 'object') {
    var userAgent = navigator.userAgent;
    isWindows = userAgent.indexOf('Windows') >= 0;
}
var _schemePattern = /^\w[\w\d+.-]*$/;
var _singleSlashStart = /^\//;
var _doubleSlashStart = /^\/\//;
function _validateUri(ret, _strict) {
    if (!ret.scheme && _strict) {
        throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
    }
    if (ret.scheme && !_schemePattern.test(ret.scheme)) {
        throw new Error('[UriError]: Scheme contains illegal characters.');
    }
    if (ret.path) {
        if (ret.authority) {
            if (!_singleSlashStart.test(ret.path)) {
                throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
            }
        }
        else {
            if (_doubleSlashStart.test(ret.path)) {
                throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
            }
        }
    }
}
function _schemeFix(scheme, _strict) {
    if (!scheme && !_strict) {
        return 'file';
    }
    return scheme;
}
function _referenceResolution(scheme, path) {
    switch (scheme) {
        case 'https':
        case 'http':
        case 'file':
            if (!path) {
                path = _slash;
            }
            else if (path[0] !== _slash) {
                path = _slash + path;
            }
            break;
    }
    return path;
}
var _empty = '';
var _slash = '/';
var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
var URI$1 =  (function () {
    function URI(schemeOrData, authority, path, query, fragment, _strict) {
        if (_strict === void 0) { _strict = false; }
        if (typeof schemeOrData === 'object') {
            this.scheme = schemeOrData.scheme || _empty;
            this.authority = schemeOrData.authority || _empty;
            this.path = schemeOrData.path || _empty;
            this.query = schemeOrData.query || _empty;
            this.fragment = schemeOrData.fragment || _empty;
        }
        else {
            this.scheme = _schemeFix(schemeOrData, _strict);
            this.authority = authority || _empty;
            this.path = _referenceResolution(this.scheme, path || _empty);
            this.query = query || _empty;
            this.fragment = fragment || _empty;
            _validateUri(this, _strict);
        }
    }
    URI.isUri = function (thing) {
        if (thing instanceof URI) {
            return true;
        }
        if (!thing) {
            return false;
        }
        return typeof thing.authority === 'string'
            && typeof thing.fragment === 'string'
            && typeof thing.path === 'string'
            && typeof thing.query === 'string'
            && typeof thing.scheme === 'string'
            && typeof thing.fsPath === 'function'
            && typeof thing.with === 'function'
            && typeof thing.toString === 'function';
    };
    Object.defineProperty(URI.prototype, "fsPath", {
        get: function () {
            return uriToFsPath(this, false);
        },
        enumerable: true,
        configurable: true
    });
    URI.prototype.with = function (change) {
        if (!change) {
            return this;
        }
        var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
        if (scheme === undefined) {
            scheme = this.scheme;
        }
        else if (scheme === null) {
            scheme = _empty;
        }
        if (authority === undefined) {
            authority = this.authority;
        }
        else if (authority === null) {
            authority = _empty;
        }
        if (path === undefined) {
            path = this.path;
        }
        else if (path === null) {
            path = _empty;
        }
        if (query === undefined) {
            query = this.query;
        }
        else if (query === null) {
            query = _empty;
        }
        if (fragment === undefined) {
            fragment = this.fragment;
        }
        else if (fragment === null) {
            fragment = _empty;
        }
        if (scheme === this.scheme
            && authority === this.authority
            && path === this.path
            && query === this.query
            && fragment === this.fragment) {
            return this;
        }
        return new _URI(scheme, authority, path, query, fragment);
    };
    URI.parse = function (value, _strict) {
        if (_strict === void 0) { _strict = false; }
        var match = _regexp.exec(value);
        if (!match) {
            return new _URI(_empty, _empty, _empty, _empty, _empty);
        }
        return new _URI(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);
    };
    URI.file = function (path) {
        var authority = _empty;
        if (isWindows) {
            path = path.replace(/\\/g, _slash);
        }
        if (path[0] === _slash && path[1] === _slash) {
            var idx = path.indexOf(_slash, 2);
            if (idx === -1) {
                authority = path.substring(2);
                path = _slash;
            }
            else {
                authority = path.substring(2, idx);
                path = path.substring(idx) || _slash;
            }
        }
        return new _URI('file', authority, path, _empty, _empty);
    };
    URI.from = function (components) {
        return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
    };
    URI.prototype.toString = function (skipEncoding) {
        if (skipEncoding === void 0) { skipEncoding = false; }
        return _asFormatted(this, skipEncoding);
    };
    URI.prototype.toJSON = function () {
        return this;
    };
    URI.revive = function (data) {
        if (!data) {
            return data;
        }
        else if (data instanceof URI) {
            return data;
        }
        else {
            var result = new _URI(data);
            result._formatted = data.external;
            result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
            return result;
        }
    };
    return URI;
}());
var _pathSepMarker = isWindows ? 1 : undefined;
var _URI =  (function (_super) {
    __extends(_URI, _super);
    function _URI() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._formatted = null;
        _this._fsPath = null;
        return _this;
    }
    Object.defineProperty(_URI.prototype, "fsPath", {
        get: function () {
            if (!this._fsPath) {
                this._fsPath = uriToFsPath(this, false);
            }
            return this._fsPath;
        },
        enumerable: true,
        configurable: true
    });
    _URI.prototype.toString = function (skipEncoding) {
        if (skipEncoding === void 0) { skipEncoding = false; }
        if (!skipEncoding) {
            if (!this._formatted) {
                this._formatted = _asFormatted(this, false);
            }
            return this._formatted;
        }
        else {
            return _asFormatted(this, true);
        }
    };
    _URI.prototype.toJSON = function () {
        var res = {
            $mid: 1
        };
        if (this._fsPath) {
            res.fsPath = this._fsPath;
            res._sep = _pathSepMarker;
        }
        if (this._formatted) {
            res.external = this._formatted;
        }
        if (this.path) {
            res.path = this.path;
        }
        if (this.scheme) {
            res.scheme = this.scheme;
        }
        if (this.authority) {
            res.authority = this.authority;
        }
        if (this.query) {
            res.query = this.query;
        }
        if (this.fragment) {
            res.fragment = this.fragment;
        }
        return res;
    };
    return _URI;
}(URI$1));
var encodeTable = (_a$1 = {},
    _a$1[58 ] = '%3A',
    _a$1[47 ] = '%2F',
    _a$1[63 ] = '%3F',
    _a$1[35 ] = '%23',
    _a$1[91 ] = '%5B',
    _a$1[93 ] = '%5D',
    _a$1[64 ] = '%40',
    _a$1[33 ] = '%21',
    _a$1[36 ] = '%24',
    _a$1[38 ] = '%26',
    _a$1[39 ] = '%27',
    _a$1[40 ] = '%28',
    _a$1[41 ] = '%29',
    _a$1[42 ] = '%2A',
    _a$1[43 ] = '%2B',
    _a$1[44 ] = '%2C',
    _a$1[59 ] = '%3B',
    _a$1[61 ] = '%3D',
    _a$1[32 ] = '%20',
    _a$1);
function encodeURIComponentFast(uriComponent, allowSlash) {
    var res = undefined;
    var nativeEncodePos = -1;
    for (var pos = 0; pos < uriComponent.length; pos++) {
        var code = uriComponent.charCodeAt(pos);
        if ((code >= 97  && code <= 122 )
            || (code >= 65  && code <= 90 )
            || (code >= 48  && code <= 57 )
            || code === 45
            || code === 46
            || code === 95
            || code === 126
            || (allowSlash && code === 47 )) {
            if (nativeEncodePos !== -1) {
                res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
                nativeEncodePos = -1;
            }
            if (res !== undefined) {
                res += uriComponent.charAt(pos);
            }
        }
        else {
            if (res === undefined) {
                res = uriComponent.substr(0, pos);
            }
            var escaped = encodeTable[code];
            if (escaped !== undefined) {
                if (nativeEncodePos !== -1) {
                    res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
                    nativeEncodePos = -1;
                }
                res += escaped;
            }
            else if (nativeEncodePos === -1) {
                nativeEncodePos = pos;
            }
        }
    }
    if (nativeEncodePos !== -1) {
        res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
    }
    return res !== undefined ? res : uriComponent;
}
function encodeURIComponentMinimal(path) {
    var res = undefined;
    for (var pos = 0; pos < path.length; pos++) {
        var code = path.charCodeAt(pos);
        if (code === 35  || code === 63 ) {
            if (res === undefined) {
                res = path.substr(0, pos);
            }
            res += encodeTable[code];
        }
        else {
            if (res !== undefined) {
                res += path[pos];
            }
        }
    }
    return res !== undefined ? res : path;
}
function uriToFsPath(uri, keepDriveLetterCasing) {
    var value;
    if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
        value = "//" + uri.authority + uri.path;
    }
    else if (uri.path.charCodeAt(0) === 47
        && (uri.path.charCodeAt(1) >= 65  && uri.path.charCodeAt(1) <= 90  || uri.path.charCodeAt(1) >= 97  && uri.path.charCodeAt(1) <= 122 )
        && uri.path.charCodeAt(2) === 58 ) {
        if (!keepDriveLetterCasing) {
            value = uri.path[1].toLowerCase() + uri.path.substr(2);
        }
        else {
            value = uri.path.substr(1);
        }
    }
    else {
        value = uri.path;
    }
    if (isWindows) {
        value = value.replace(/\//g, '\\');
    }
    return value;
}
function _asFormatted(uri, skipEncoding) {
    var encoder = !skipEncoding
        ? encodeURIComponentFast
        : encodeURIComponentMinimal;
    var res = '';
    var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
    if (scheme) {
        res += scheme;
        res += ':';
    }
    if (authority || scheme === 'file') {
        res += _slash;
        res += _slash;
    }
    if (authority) {
        var idx = authority.indexOf('@');
        if (idx !== -1) {
            var userinfo = authority.substr(0, idx);
            authority = authority.substr(idx + 1);
            idx = userinfo.indexOf(':');
            if (idx === -1) {
                res += encoder(userinfo, false);
            }
            else {
                res += encoder(userinfo.substr(0, idx), false);
                res += ':';
                res += encoder(userinfo.substr(idx + 1), false);
            }
            res += '@';
        }
        authority = authority.toLowerCase();
        idx = authority.indexOf(':');
        if (idx === -1) {
            res += encoder(authority, false);
        }
        else {
            res += encoder(authority.substr(0, idx), false);
            res += authority.substr(idx);
        }
    }
    if (path) {
        if (path.length >= 3 && path.charCodeAt(0) === 47  && path.charCodeAt(2) === 58 ) {
            var code = path.charCodeAt(1);
            if (code >= 65  && code <= 90 ) {
                path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3);
            }
        }
        else if (path.length >= 2 && path.charCodeAt(1) === 58 ) {
            var code = path.charCodeAt(0);
            if (code >= 65  && code <= 90 ) {
                path = String.fromCharCode(code + 32) + ":" + path.substr(2);
            }
        }
        res += encoder(path, true);
    }
    if (query) {
        res += '?';
        res += encoder(query, false);
    }
    if (fragment) {
        res += '#';
        res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
    }
    return res;
}
function decodeURIComponentGraceful(str) {
    try {
        return decodeURIComponent(str);
    }
    catch (_a) {
        if (str.length > 3) {
            return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));
        }
        else {
            return str;
        }
    }
}
var _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
function percentDecode(str) {
    if (!str.match(_rEncodedAsHex)) {
        return str;
    }
    return str.replace(_rEncodedAsHex, function (match) { return decodeURIComponentGraceful(match); });
}

var FileType$1;
(function (FileType) {
    FileType[FileType["Unknown"] = 0] = "Unknown";
    FileType[FileType["File"] = 1] = "File";
    FileType[FileType["Directory"] = 2] = "Directory";
    FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
})(FileType$1 || (FileType$1 = {}));
const PathMatchRegex = new RegExp('^(/|//|\\\\\\\\|[A-Za-z]:(/|\\\\))');
const Dot = '.'.charCodeAt(0);
function isAbsolutePath(path) {
    return PathMatchRegex.test(path);
}
function normalizePath(parts) {
    const newParts = [];
    for (const part of parts) {
        if (part.length === 0 || part.length === 1 && part.charCodeAt(0) === Dot) ;
        else if (part.length === 2 && part.charCodeAt(0) === Dot && part.charCodeAt(1) === Dot) {
            newParts.pop();
        }
        else {
            newParts.push(part);
        }
    }
    if (parts.length > 1 && parts[parts.length - 1].length === 0) {
        newParts.push('');
    }
    let res = newParts.join('/');
    if (parts[0].length === 0) {
        res = '/' + res;
    }
    return res;
}
function joinPath$1(uri, ...paths) {
    const parts = uri.path.split('/');
    for (const path of paths) {
        parts.push(...path.split('/'));
    }
    return uri.with({ path: normalizePath(parts) });
}

var emmet = {};

Object.defineProperty(emmet, '__esModule', { value: true });

/**
 * Check if given code is a number
 */
function isNumber$1(code) {
    return code > 47 && code < 58;
}
/**
 * Check if given character code is alpha code (letter through A to Z)
 */
function isAlpha$1(code, from, to) {
    from = from || 65; // A
    to = to || 90; // Z
    code &= ~32; // quick hack to convert any char code to uppercase char code
    return code >= from && code <= to;
}
function isAlphaNumericWord(code) {
    return isNumber$1(code) || isAlphaWord(code);
}
function isAlphaWord(code) {
    return code === 95 /* _ */ || isAlpha$1(code);
}
/**
 * Check for Umlauts i.e. ä, Ä, ö, Ö, ü and Ü
 */
function isUmlaut(code) {
    return code === 196
        || code == 214
        || code === 220
        || code === 228
        || code === 246
        || code === 252;
}
/**
 * Check if given character code is a white-space character: a space character
 * or line breaks
 */
function isWhiteSpace$3(code) {
    return code === 32 /* space */
        || code === 9 /* tab */
        || code === 160; /* non-breaking space */
}
/**
 * Check if given character code is a space character
 */
function isSpace(code) {
    return isWhiteSpace$3(code)
        || code === 10 /* LF */
        || code === 13; /* CR */
}
/**
 * Check if given character code is a quote character
 */
function isQuote$2(code) {
    return code === 39 /* ' */ || code === 34 /* " */;
}

/**
 * A streaming, character code-based string reader
 */
let Scanner$1 = class Scanner {
    constructor(str, start, end) {
        if (end == null && typeof str === 'string') {
            end = str.length;
        }
        this.string = str;
        this.pos = this.start = start || 0;
        this.end = end || 0;
    }
    /**
     * Returns true only if the stream is at the end of the file.
     */
    eof() {
        return this.pos >= this.end;
    }
    /**
     * Creates a new stream instance which is limited to given `start` and `end`
     * range. E.g. its `eof()` method will look at `end` property, not actual
     * stream end
     */
    limit(start, end) {
        return new Scanner$1(this.string, start, end);
    }
    /**
     * Returns the next character code in the stream without advancing it.
     * Will return NaN at the end of the file.
     */
    peek() {
        return this.string.charCodeAt(this.pos);
    }
    /**
     * Returns the next character in the stream and advances it.
     * Also returns <code>undefined</code> when no more characters are available.
     */
    next() {
        if (this.pos < this.string.length) {
            return this.string.charCodeAt(this.pos++);
        }
    }
    /**
     * `match` can be a character code or a function that takes a character code
     * and returns a boolean. If the next character in the stream 'matches'
     * the given argument, it is consumed and returned.
     * Otherwise, `false` is returned.
     */
    eat(match) {
        const ch = this.peek();
        const ok = typeof match === 'function' ? match(ch) : ch === match;
        if (ok) {
            this.next();
        }
        return ok;
    }
    /**
     * Repeatedly calls <code>eat</code> with the given argument, until it
     * fails. Returns <code>true</code> if any characters were eaten.
     */
    eatWhile(match) {
        const start = this.pos;
        while (!this.eof() && this.eat(match)) { /* */ }
        return this.pos !== start;
    }
    /**
     * Backs up the stream n characters. Backing it up further than the
     * start of the current token will cause things to break, so be careful.
     */
    backUp(n) {
        this.pos -= (n || 1);
    }
    /**
     * Get the string between the start of the current token and the
     * current stream position.
     */
    current() {
        return this.substring(this.start, this.pos);
    }
    /**
     * Returns substring for given range
     */
    substring(start, end) {
        return this.string.slice(start, end);
    }
    /**
     * Creates error object with current stream state
     */
    error(message, pos = this.pos) {
        return new ScannerError(`${message} at ${pos + 1}`, pos, this.string);
    }
};
class ScannerError extends Error {
    constructor(message, pos, str) {
        super(message);
        this.pos = pos;
        this.string = str;
    }
}

function tokenScanner$1(tokens) {
    return {
        tokens,
        start: 0,
        pos: 0,
        size: tokens.length
    };
}
function peek$3(scanner) {
    return scanner.tokens[scanner.pos];
}
function next(scanner) {
    return scanner.tokens[scanner.pos++];
}
function slice(scanner, from = scanner.start, to = scanner.pos) {
    return scanner.tokens.slice(from, to);
}
function readable$1(scanner) {
    return scanner.pos < scanner.size;
}
function consume$2(scanner, test) {
    const token = peek$3(scanner);
    if (token && test(token)) {
        scanner.pos++;
        return true;
    }
    return false;
}
function error$1(scanner, message, token = peek$3(scanner)) {
    if (token && token.start != null) {
        message += ` at ${token.start}`;
    }
    const err = new Error(message);
    err['pos'] = token && token.start;
    return err;
}

function abbreviation(abbr, options = {}) {
    const scanner = tokenScanner$1(abbr);
    const result = statements(scanner, options);
    if (readable$1(scanner)) {
        throw error$1(scanner, 'Unexpected character');
    }
    return result;
}
function statements(scanner, options) {
    const result = {
        type: 'TokenGroup',
        elements: []
    };
    let ctx = result;
    let node;
    const stack = [];
    while (readable$1(scanner)) {
        if (node = element$2(scanner, options) || group(scanner, options)) {
            ctx.elements.push(node);
            if (consume$2(scanner, isChildOperator)) {
                stack.push(ctx);
                ctx = node;
            }
            else if (consume$2(scanner, isSiblingOperator$1)) {
                continue;
            }
            else if (consume$2(scanner, isClimbOperator)) {
                do {
                    if (stack.length) {
                        ctx = stack.pop();
                    }
                } while (consume$2(scanner, isClimbOperator));
            }
        }
        else {
            break;
        }
    }
    return result;
}
/**
 * Consumes group from given scanner
 */
function group(scanner, options) {
    if (consume$2(scanner, isGroupStart)) {
        const result = statements(scanner, options);
        const token = next(scanner);
        if (isBracket$2(token, 'group', false)) {
            result.repeat = repeater$1(scanner);
        }
        return result;
    }
}
/**
 * Consumes single element from given scanner
 */
function element$2(scanner, options) {
    let attr;
    const elem = {
        type: 'TokenElement',
        name: void 0,
        attributes: void 0,
        value: void 0,
        repeat: void 0,
        selfClose: false,
        elements: []
    };
    if (elementName(scanner, options)) {
        elem.name = slice(scanner);
    }
    while (readable$1(scanner)) {
        scanner.start = scanner.pos;
        if (!elem.repeat && !isEmpty(elem) && consume$2(scanner, isRepeater)) {
            elem.repeat = scanner.tokens[scanner.pos - 1];
        }
        else if (!elem.value && text(scanner)) {
            elem.value = getText(scanner);
        }
        else if (attr = shortAttribute(scanner, 'id', options) || shortAttribute(scanner, 'class', options) || attributeSet(scanner)) {
            if (!elem.attributes) {
                elem.attributes = Array.isArray(attr) ? attr.slice() : [attr];
            }
            else {
                elem.attributes = elem.attributes.concat(attr);
            }
        }
        else {
            if (!isEmpty(elem) && consume$2(scanner, isCloseOperator)) {
                elem.selfClose = true;
                if (!elem.repeat && consume$2(scanner, isRepeater)) {
                    elem.repeat = scanner.tokens[scanner.pos - 1];
                }
            }
            break;
        }
    }
    return !isEmpty(elem) ? elem : void 0;
}
/**
 * Consumes attribute set from given scanner
 */
function attributeSet(scanner) {
    if (consume$2(scanner, isAttributeSetStart)) {
        const attributes = [];
        let attr;
        while (readable$1(scanner)) {
            if (attr = attribute(scanner)) {
                attributes.push(attr);
            }
            else if (consume$2(scanner, isAttributeSetEnd)) {
                break;
            }
            else if (!consume$2(scanner, isWhiteSpace$2)) {
                throw error$1(scanner, `Unexpected "${peek$3(scanner).type}" token`);
            }
        }
        return attributes;
    }
}
/**
 * Consumes attribute shorthand (class or id) from given scanner
 */
function shortAttribute(scanner, type, options) {
    if (isOperator$1(peek$3(scanner), type)) {
        scanner.pos++;
        // Consume multiple operators
        let count = 1;
        while (isOperator$1(peek$3(scanner), type)) {
            scanner.pos++;
            count++;
        }
        const attr = {
            name: [createLiteral$1(type)]
        };
        if (count > 1) {
            attr.multiple = true;
        }
        // Consume expression after shorthand start for React-like components
        if (options.jsx && text(scanner)) {
            attr.value = getText(scanner);
            attr.expression = true;
        }
        else {
            attr.value = literal$1$1(scanner) ? slice(scanner) : void 0;
        }
        return attr;
    }
}
/**
 * Consumes single attribute from given scanner
 */
function attribute(scanner) {
    if (quoted(scanner)) {
        // Consumed quoted value: it’s a value for default attribute
        return {
            value: slice(scanner)
        };
    }
    if (literal$1$1(scanner, true)) {
        const name = slice(scanner);
        let value;
        if (consume$2(scanner, isEquals)) {
            if (quoted(scanner) || literal$1$1(scanner, true)) {
                value = slice(scanner);
            }
        }
        return { name, value };
    }
}
function repeater$1(scanner) {
    return isRepeater(peek$3(scanner))
        ? scanner.tokens[scanner.pos++]
        : void 0;
}
/**
 * Consumes quoted value from given scanner, if possible
 */
function quoted(scanner) {
    const start = scanner.pos;
    const quote = peek$3(scanner);
    if (isQuote$1(quote)) {
        scanner.pos++;
        while (readable$1(scanner)) {
            if (isQuote$1(next(scanner), quote.single)) {
                scanner.start = start;
                return true;
            }
        }
        throw error$1(scanner, 'Unclosed quote', quote);
    }
    return false;
}
/**
 * Consumes literal (unquoted value) from given scanner
 */
function literal$1$1(scanner, allowBrackets) {
    const start = scanner.pos;
    const brackets = {
        attribute: 0,
        expression: 0,
        group: 0
    };
    while (readable$1(scanner)) {
        const token = peek$3(scanner);
        if (brackets.expression) {
            // If we’re inside expression, we should consume all content in it
            if (isBracket$2(token, 'expression')) {
                brackets[token.context] += token.open ? 1 : -1;
            }
        }
        else if (isQuote$1(token) || isOperator$1(token) || isWhiteSpace$2(token) || isRepeater(token)) {
            break;
        }
        else if (isBracket$2(token)) {
            if (!allowBrackets) {
                break;
            }
            if (token.open) {
                brackets[token.context]++;
            }
            else if (!brackets[token.context]) {
                // Stop if found unmatched closing brace: it must be handled
                // by parent consumer
                break;
            }
            else {
                brackets[token.context]--;
            }
        }
        scanner.pos++;
    }
    if (start !== scanner.pos) {
        scanner.start = start;
        return true;
    }
    return false;
}
/**
 * Consumes element name from given scanner
 */
function elementName(scanner, options) {
    const start = scanner.pos;
    if (options.jsx && consume$2(scanner, isCapitalizedLiteral)) {
        // Check for edge case: consume immediate capitalized class names
        // for React-like components, e.g. `Foo.Bar.Baz`
        while (readable$1(scanner)) {
            const { pos } = scanner;
            if (!consume$2(scanner, isClassNameOperator) || !consume$2(scanner, isCapitalizedLiteral)) {
                scanner.pos = pos;
                break;
            }
        }
    }
    while (readable$1(scanner) && consume$2(scanner, isElementName$1)) {
        // empty
    }
    if (scanner.pos !== start) {
        scanner.start = start;
        return true;
    }
    return false;
}
/**
 * Consumes text value from given scanner
 */
function text(scanner) {
    const start = scanner.pos;
    if (consume$2(scanner, isTextStart)) {
        let brackets = 0;
        while (readable$1(scanner)) {
            const token = next(scanner);
            if (isBracket$2(token, 'expression')) {
                if (token.open) {
                    brackets++;
                }
                else if (!brackets) {
                    break;
                }
                else {
                    brackets--;
                }
            }
        }
        scanner.start = start;
        return true;
    }
    return false;
}
function getText(scanner) {
    let from = scanner.start;
    let to = scanner.pos;
    if (isBracket$2(scanner.tokens[from], 'expression', true)) {
        from++;
    }
    if (isBracket$2(scanner.tokens[to - 1], 'expression', false)) {
        to--;
    }
    return slice(scanner, from, to);
}
function isBracket$2(token, context, isOpen) {
    return Boolean(token && token.type === 'Bracket'
        && (!context || token.context === context)
        && (isOpen == null || token.open === isOpen));
}
function isOperator$1(token, type) {
    return Boolean(token && token.type === 'Operator' && (!type || token.operator === type));
}
function isQuote$1(token, isSingle) {
    return Boolean(token && token.type === 'Quote' && (isSingle == null || token.single === isSingle));
}
function isWhiteSpace$2(token) {
    return Boolean(token && token.type === 'WhiteSpace');
}
function isEquals(token) {
    return isOperator$1(token, 'equal');
}
function isRepeater(token) {
    return Boolean(token && token.type === 'Repeater');
}
function isLiteral$2(token) {
    return token.type === 'Literal';
}
function isCapitalizedLiteral(token) {
    if (isLiteral$2(token)) {
        const ch = token.value.charCodeAt(0);
        return ch >= 65 && ch <= 90;
    }
    return false;
}
function isElementName$1(token) {
    return token.type === 'Literal' || token.type === 'RepeaterNumber' || token.type === 'RepeaterPlaceholder';
}
function isClassNameOperator(token) {
    return isOperator$1(token, 'class');
}
function isAttributeSetStart(token) {
    return isBracket$2(token, 'attribute', true);
}
function isAttributeSetEnd(token) {
    return isBracket$2(token, 'attribute', false);
}
function isTextStart(token) {
    return isBracket$2(token, 'expression', true);
}
function isGroupStart(token) {
    return isBracket$2(token, 'group', true);
}
function createLiteral$1(value) {
    return { type: 'Literal', value };
}
function isEmpty(elem) {
    return !elem.name && !elem.value && !elem.attributes;
}
function isChildOperator(token) {
    return isOperator$1(token, 'child');
}
function isSiblingOperator$1(token) {
    return isOperator$1(token, 'sibling');
}
function isClimbOperator(token) {
    return isOperator$1(token, 'climb');
}
function isCloseOperator(token) {
    return isOperator$1(token, 'close');
}

var Chars$3;
(function (Chars) {
    /** `{` character */
    Chars[Chars["CurlyBracketOpen"] = 123] = "CurlyBracketOpen";
    /** `}` character */
    Chars[Chars["CurlyBracketClose"] = 125] = "CurlyBracketClose";
    /** `\\` character */
    Chars[Chars["Escape"] = 92] = "Escape";
    /** `=` character */
    Chars[Chars["Equals"] = 61] = "Equals";
    /** `[` character */
    Chars[Chars["SquareBracketOpen"] = 91] = "SquareBracketOpen";
    /** `]` character */
    Chars[Chars["SquareBracketClose"] = 93] = "SquareBracketClose";
    /** `*` character */
    Chars[Chars["Asterisk"] = 42] = "Asterisk";
    /** `#` character */
    Chars[Chars["Hash"] = 35] = "Hash";
    /** `$` character */
    Chars[Chars["Dollar"] = 36] = "Dollar";
    /** `-` character */
    Chars[Chars["Dash"] = 45] = "Dash";
    /** `.` character */
    Chars[Chars["Dot"] = 46] = "Dot";
    /** `/` character */
    Chars[Chars["Slash"] = 47] = "Slash";
    /** `:` character */
    Chars[Chars["Colon"] = 58] = "Colon";
    /** `!` character */
    Chars[Chars["Excl"] = 33] = "Excl";
    /** `@` character */
    Chars[Chars["At"] = 64] = "At";
    /** `_` character */
    Chars[Chars["Underscore"] = 95] = "Underscore";
    /** `(` character */
    Chars[Chars["RoundBracketOpen"] = 40] = "RoundBracketOpen";
    /** `)` character */
    Chars[Chars["RoundBracketClose"] = 41] = "RoundBracketClose";
    /** `+` character */
    Chars[Chars["Sibling"] = 43] = "Sibling";
    /** `>` character */
    Chars[Chars["Child"] = 62] = "Child";
    /** `^` character */
    Chars[Chars["Climb"] = 94] = "Climb";
    /** `'` character */
    Chars[Chars["SingleQuote"] = 39] = "SingleQuote";
    /** `""` character */
    Chars[Chars["DoubleQuote"] = 34] = "DoubleQuote";
})(Chars$3 || (Chars$3 = {}));
/**
 * If consumes escape character, sets current stream range to escaped value
 */
function escaped(scanner) {
    if (scanner.eat(Chars$3.Escape)) {
        scanner.start = scanner.pos;
        if (!scanner.eof()) {
            scanner.pos++;
        }
        return true;
    }
    return false;
}

function tokenize$1(source) {
    const scanner = new Scanner$1(source);
    const result = [];
    const ctx = {
        group: 0,
        attribute: 0,
        expression: 0,
        quote: 0
    };
    let ch = 0;
    let token;
    while (!scanner.eof()) {
        ch = scanner.peek();
        token = getToken$1(scanner, ctx);
        if (token) {
            result.push(token);
            if (token.type === 'Quote') {
                ctx.quote = ch === ctx.quote ? 0 : ch;
            }
            else if (token.type === 'Bracket') {
                ctx[token.context] += token.open ? 1 : -1;
            }
        }
        else {
            throw scanner.error('Unexpected character');
        }
    }
    return result;
}
/**
 * Returns next token from given scanner, if possible
 */
function getToken$1(scanner, ctx) {
    return field$2(scanner, ctx)
        || repeaterPlaceholder(scanner)
        || repeaterNumber(scanner)
        || repeater(scanner)
        || whiteSpace$1(scanner)
        || literal$2(scanner, ctx)
        || operator$1(scanner)
        || quote(scanner)
        || bracket$1(scanner);
}
/**
 * Consumes literal from given scanner
 */
function literal$2(scanner, ctx) {
    const start = scanner.pos;
    const expressionStart = ctx.expression;
    let value = '';
    while (!scanner.eof()) {
        // Consume escaped sequence no matter of context
        if (escaped(scanner)) {
            value += scanner.current();
            continue;
        }
        const ch = scanner.peek();
        if (ch === Chars$3.Slash && !ctx.quote && !ctx.expression && !ctx.attribute) {
            // Special case for `/` character between numbers in class names
            const prev = scanner.string.charCodeAt(scanner.pos - 1);
            const next = scanner.string.charCodeAt(scanner.pos + 1);
            if (isNumber$1(prev) && isNumber$1(next)) {
                value += scanner.string[scanner.pos++];
                continue;
            }
        }
        if (ch === ctx.quote || ch === Chars$3.Dollar || isAllowedOperator(ch, ctx)) {
            // 1. Found matching quote
            // 2. The `$` character has special meaning in every context
            // 3. Depending on context, some characters should be treated as operators
            break;
        }
        if (expressionStart) {
            // Consume nested expressions, e.g. span{{foo}}
            if (ch === Chars$3.CurlyBracketOpen) {
                ctx.expression++;
            }
            else if (ch === Chars$3.CurlyBracketClose) {
                if (ctx.expression > expressionStart) {
                    ctx.expression--;
                }
                else {
                    break;
                }
            }
        }
        else if (!ctx.quote) {
            // Consuming element name
            if (!ctx.attribute && !isElementName(ch)) {
                break;
            }
            if (isAllowedSpace(ch, ctx) || isAllowedRepeater(ch, ctx) || isQuote$2(ch) || bracketType(ch)) {
                // Stop for characters not allowed in unquoted literal
                break;
            }
        }
        value += scanner.string[scanner.pos++];
    }
    if (start !== scanner.pos) {
        scanner.start = start;
        return {
            type: 'Literal',
            value,
            start,
            end: scanner.pos
        };
    }
}
/**
 * Consumes white space characters as string literal from given scanner
 */
function whiteSpace$1(scanner) {
    const start = scanner.pos;
    if (scanner.eatWhile(isSpace)) {
        return {
            type: 'WhiteSpace',
            start,
            end: scanner.pos,
            value: scanner.substring(start, scanner.pos)
        };
    }
}
/**
 * Consumes quote from given scanner
 */
function quote(scanner) {
    const ch = scanner.peek();
    if (isQuote$2(ch)) {
        return {
            type: 'Quote',
            single: ch === Chars$3.SingleQuote,
            start: scanner.pos++,
            end: scanner.pos
        };
    }
}
/**
 * Consumes bracket from given scanner
 */
function bracket$1(scanner) {
    const ch = scanner.peek();
    const context = bracketType(ch);
    if (context) {
        return {
            type: 'Bracket',
            open: isOpenBracket$2(ch),
            context,
            start: scanner.pos++,
            end: scanner.pos
        };
    }
}
/**
 * Consumes operator from given scanner
 */
function operator$1(scanner) {
    const op = operatorType$1(scanner.peek());
    if (op) {
        return {
            type: 'Operator',
            operator: op,
            start: scanner.pos++,
            end: scanner.pos
        };
    }
}
/**
 * Consumes node repeat token from current stream position and returns its
 * parsed value
 */
function repeater(scanner) {
    const start = scanner.pos;
    if (scanner.eat(Chars$3.Asterisk)) {
        scanner.start = scanner.pos;
        let count = 1;
        let implicit = false;
        if (scanner.eatWhile(isNumber$1)) {
            count = Number(scanner.current());
        }
        else {
            implicit = true;
        }
        return {
            type: 'Repeater',
            count,
            value: 0,
            implicit,
            start,
            end: scanner.pos
        };
    }
}
/**
 * Consumes repeater placeholder `$#` from given scanner
 */
function repeaterPlaceholder(scanner) {
    const start = scanner.pos;
    if (scanner.eat(Chars$3.Dollar) && scanner.eat(Chars$3.Hash)) {
        return {
            type: 'RepeaterPlaceholder',
            value: void 0,
            start,
            end: scanner.pos
        };
    }
    scanner.pos = start;
}
/**
 * Consumes numbering token like `$` from given scanner state
 */
function repeaterNumber(scanner) {
    const start = scanner.pos;
    if (scanner.eatWhile(Chars$3.Dollar)) {
        const size = scanner.pos - start;
        let reverse = false;
        let base = 1;
        let parent = 0;
        if (scanner.eat(Chars$3.At)) {
            // Consume numbering modifiers
            while (scanner.eat(Chars$3.Climb)) {
                parent++;
            }
            reverse = scanner.eat(Chars$3.Dash);
            scanner.start = scanner.pos;
            if (scanner.eatWhile(isNumber$1)) {
                base = Number(scanner.current());
            }
        }
        scanner.start = start;
        return {
            type: 'RepeaterNumber',
            size,
            reverse,
            base,
            parent,
            start,
            end: scanner.pos
        };
    }
}
function field$2(scanner, ctx) {
    const start = scanner.pos;
    // Fields are allowed inside expressions and attributes
    if ((ctx.expression || ctx.attribute) && scanner.eat(Chars$3.Dollar) && scanner.eat(Chars$3.CurlyBracketOpen)) {
        scanner.start = scanner.pos;
        let index;
        let name = '';
        if (scanner.eatWhile(isNumber$1)) {
            // It’s a field
            index = Number(scanner.current());
            name = scanner.eat(Chars$3.Colon) ? consumePlaceholder$2(scanner) : '';
        }
        else if (isAlpha$1(scanner.peek())) {
            // It’s a variable
            name = consumePlaceholder$2(scanner);
        }
        if (scanner.eat(Chars$3.CurlyBracketClose)) {
            return {
                type: 'Field',
                index, name,
                start,
                end: scanner.pos
            };
        }
        throw scanner.error('Expecting }');
    }
    // If we reached here then there’s no valid field here, revert
    // back to starting position
    scanner.pos = start;
}
/**
 * Consumes a placeholder: value right after `:` in field. Could be empty
 */
function consumePlaceholder$2(stream) {
    const stack = [];
    stream.start = stream.pos;
    while (!stream.eof()) {
        if (stream.eat(Chars$3.CurlyBracketOpen)) {
            stack.push(stream.pos);
        }
        else if (stream.eat(Chars$3.CurlyBracketClose)) {
            if (!stack.length) {
                stream.pos--;
                break;
            }
            stack.pop();
        }
        else {
            stream.pos++;
        }
    }
    if (stack.length) {
        stream.pos = stack.pop();
        throw stream.error(`Expecting }`);
    }
    return stream.current();
}
/**
 * Check if given character code is an operator and it’s allowed in current context
 */
function isAllowedOperator(ch, ctx) {
    const op = operatorType$1(ch);
    if (!op || ctx.quote || ctx.expression) {
        // No operators inside quoted values or expressions
        return false;
    }
    // Inside attributes, only `equals` is allowed
    return !ctx.attribute || op === 'equal';
}
/**
 * Check if given character is a space character and is allowed to be consumed
 * as a space token in current context
 */
function isAllowedSpace(ch, ctx) {
    return isSpace(ch) && !ctx.expression;
}
/**
 * Check if given character can be consumed as repeater in current context
 */
function isAllowedRepeater(ch, ctx) {
    return ch === Chars$3.Asterisk && !ctx.attribute && !ctx.expression;
}
/**
 * If given character is a bracket, returns it’s type
 */
function bracketType(ch) {
    if (ch === Chars$3.RoundBracketOpen || ch === Chars$3.RoundBracketClose) {
        return 'group';
    }
    if (ch === Chars$3.SquareBracketOpen || ch === Chars$3.SquareBracketClose) {
        return 'attribute';
    }
    if (ch === Chars$3.CurlyBracketOpen || ch === Chars$3.CurlyBracketClose) {
        return 'expression';
    }
}
/**
 * If given character is an operator, returns it’s type
 */
function operatorType$1(ch) {
    return (ch === Chars$3.Child && 'child')
        || (ch === Chars$3.Sibling && 'sibling')
        || (ch === Chars$3.Climb && 'climb')
        || (ch === Chars$3.Dot && 'class')
        || (ch === Chars$3.Hash && 'id')
        || (ch === Chars$3.Slash && 'close')
        || (ch === Chars$3.Equals && 'equal')
        || void 0;
}
/**
 * Check if given character is an open bracket
 */
function isOpenBracket$2(ch) {
    return ch === Chars$3.CurlyBracketOpen
        || ch === Chars$3.SquareBracketOpen
        || ch === Chars$3.RoundBracketOpen;
}
/**
 * Check if given character is allowed in element name
 */
function isElementName(ch) {
    return isAlphaNumericWord(ch)
        || isUmlaut(ch)
        || ch === Chars$3.Dash
        || ch === Chars$3.Colon
        || ch === Chars$3.Excl;
}

const operators = {
    child: '>',
    class: '.',
    climb: '^',
    id: '#',
    equal: '=',
    close: '/',
    sibling: '+'
};
const tokenVisitor = {
    Literal(token) {
        return token.value;
    },
    Quote(token) {
        return token.single ? '\'' : '"';
    },
    Bracket(token) {
        if (token.context === 'attribute') {
            return token.open ? '[' : ']';
        }
        else if (token.context === 'expression') {
            return token.open ? '{' : '}';
        }
        else {
            return token.open ? '(' : '}';
        }
    },
    Operator(token) {
        return operators[token.operator];
    },
    Field(token, state) {
        if (token.index != null) {
            // It’s a field: by default, return TextMate-compatible field
            return token.name
                ? `\${${token.index}:${token.name}}`
                : `\${${token.index}`;
        }
        else if (token.name) {
            // It’s a variable
            return state.getVariable(token.name);
        }
        return '';
    },
    RepeaterPlaceholder(token, state) {
        // Find closest implicit repeater
        let repeater;
        for (let i = state.repeaters.length - 1; i >= 0; i--) {
            if (state.repeaters[i].implicit) {
                repeater = state.repeaters[i];
                break;
            }
        }
        state.inserted = true;
        return state.getText(repeater && repeater.value);
    },
    RepeaterNumber(token, state) {
        let value = 1;
        const lastIx = state.repeaters.length - 1;
        // const repeaterIx = Math.max(0, state.repeaters.length - 1 - token.parent);
        const repeater = state.repeaters[lastIx];
        if (repeater) {
            value = token.reverse
                ? token.base + repeater.count - repeater.value - 1
                : token.base + repeater.value;
            if (token.parent) {
                const parentIx = Math.max(0, lastIx - token.parent);
                if (parentIx !== lastIx) {
                    const parentRepeater = state.repeaters[parentIx];
                    value += repeater.count * parentRepeater.value;
                }
            }
        }
        let result = String(value);
        while (result.length < token.size) {
            result = '0' + result;
        }
        return result;
    },
    WhiteSpace(token) {
        return token.value;
    }
};
/**
 * Converts given value token to string
 */
function stringify$1(token, state) {
    if (!tokenVisitor[token.type]) {
        throw new Error(`Unknown token ${token.type}`);
    }
    return tokenVisitor[token.type](token, state);
}

const urlRegex = /^((https?:|ftp:|file:)?\/\/|(www|ftp)\.)[^ ]*$/;
const emailRegex = /^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,5}$/;
/**
 * Converts given token-based abbreviation into simplified and unrolled node-based
 * abbreviation
 */
function convert(abbr, options = {}) {
    let textInserted = false;
    let cleanText;
    if (options.text) {
        if (Array.isArray(options.text)) {
            cleanText = options.text.filter(s => s.trim());
        }
        else {
            cleanText = options.text;
        }
    }
    const result = {
        type: 'Abbreviation',
        children: convertGroup(abbr, {
            inserted: false,
            repeaters: [],
            text: options.text,
            cleanText,
            repeatGuard: options.maxRepeat || Number.POSITIVE_INFINITY,
            getText(pos) {
                var _a;
                textInserted = true;
                let value;
                if (Array.isArray(options.text)) {
                    if (pos !== undefined && pos >= 0 && pos < cleanText.length) {
                        return cleanText[pos];
                    }
                    value = pos !== undefined ? options.text[pos] : options.text.join('\n');
                }
                else {
                    value = (_a = options.text) !== null && _a !== void 0 ? _a : '';
                }
                return value;
            },
            getVariable(name) {
                const varValue = options.variables && options.variables[name];
                return varValue != null ? varValue : name;
            }
        })
    };
    if (options.text != null && !textInserted) {
        // Text given but no implicitly repeated elements: insert it into
        // deepest child
        const deepest = deepestNode(last$1(result.children));
        if (deepest) {
            const text = Array.isArray(options.text) ? options.text.join('\n') : options.text;
            insertText(deepest, text);
            if (deepest.name === 'a' && options.href) {
                // Automatically update value of `<a>` element if inserting URL or email
                insertHref(deepest, text);
            }
        }
    }
    return result;
}
/**
 * Converts given statement to abbreviation nodes
 */
function convertStatement(node, state) {
    let result = [];
    if (node.repeat) {
        // Node is repeated: we should create copies of given node
        // and supply context token with actual repeater state
        const original = node.repeat;
        const repeat = Object.assign({}, original);
        repeat.count = repeat.implicit && Array.isArray(state.text)
            ? state.cleanText.length
            : (repeat.count || 1);
        let items;
        state.repeaters.push(repeat);
        for (let i = 0; i < repeat.count; i++) {
            repeat.value = i;
            node.repeat = repeat;
            items = isGroup(node)
                ? convertGroup(node, state)
                : convertElement(node, state);
            if (repeat.implicit && !state.inserted) {
                // It’s an implicit repeater but no repeater placeholders found inside,
                // we should insert text into deepest node
                const target = last$1(items);
                const deepest = target && deepestNode(target);
                if (deepest) {
                    insertText(deepest, state.getText(repeat.value));
                }
            }
            result = result.concat(items);
            // We should output at least one repeated item even if it’s reached
            // repeat limit
            if (--state.repeatGuard <= 0) {
                break;
            }
        }
        state.repeaters.pop();
        node.repeat = original;
        if (repeat.implicit) {
            state.inserted = true;
        }
    }
    else {
        result = result.concat(isGroup(node) ? convertGroup(node, state) : convertElement(node, state));
    }
    return result;
}
function convertElement(node, state) {
    let children = [];
    const elem = {
        type: 'AbbreviationNode',
        name: node.name && stringifyName(node.name, state),
        value: node.value && stringifyValue$1(node.value, state),
        attributes: void 0,
        children,
        repeat: node.repeat && Object.assign({}, node.repeat),
        selfClosing: node.selfClose,
    };
    let result = [elem];
    for (const child of node.elements) {
        children = children.concat(convertStatement(child, state));
    }
    if (node.attributes) {
        elem.attributes = [];
        for (const attr of node.attributes) {
            elem.attributes.push(convertAttribute(attr, state));
        }
    }
    // In case if current node is a text-only snippet without fields, we should
    // put all children as siblings
    if (!elem.name && !elem.attributes && elem.value && !elem.value.some(isField$1)) {
        // XXX it’s unclear that `children` is not bound to `elem`
        // due to concat operation
        result = result.concat(children);
    }
    else {
        elem.children = children;
    }
    return result;
}
function convertGroup(node, state) {
    let result = [];
    for (const child of node.elements) {
        result = result.concat(convertStatement(child, state));
    }
    if (node.repeat) {
        result = attachRepeater(result, node.repeat);
    }
    return result;
}
function convertAttribute(node, state) {
    let implied = false;
    let isBoolean = false;
    let valueType = node.expression ? 'expression' : 'raw';
    let value;
    const name = node.name && stringifyName(node.name, state);
    if (name && name[0] === '!') {
        implied = true;
    }
    if (name && name[name.length - 1] === '.') {
        isBoolean = true;
    }
    if (node.value) {
        const tokens = node.value.slice();
        if (isQuote$1(tokens[0])) {
            // It’s a quoted value: remove quotes from output but mark attribute
            // value as quoted
            const quote = tokens.shift();
            if (tokens.length && last$1(tokens).type === quote.type) {
                tokens.pop();
            }
            valueType = quote.single ? 'singleQuote' : 'doubleQuote';
        }
        else if (isBracket$2(tokens[0], 'expression', true)) {
            // Value is expression: remove brackets but mark value type
            valueType = 'expression';
            tokens.shift();
            if (isBracket$2(last$1(tokens), 'expression', false)) {
                tokens.pop();
            }
        }
        value = stringifyValue$1(tokens, state);
    }
    return {
        name: isBoolean || implied
            ? name.slice(implied ? 1 : 0, isBoolean ? -1 : void 0)
            : name,
        value,
        boolean: isBoolean,
        implied,
        valueType,
        multiple: node.multiple
    };
}
/**
 * Converts given token list to string
 */
function stringifyName(tokens, state) {
    let str = '';
    for (let i = 0; i < tokens.length; i++) {
        str += stringify$1(tokens[i], state);
    }
    return str;
}
/**
 * Converts given token list to value list
 */
function stringifyValue$1(tokens, state) {
    const result = [];
    let str = '';
    for (let i = 0, token; i < tokens.length; i++) {
        token = tokens[i];
        if (isField$1(token)) {
            // We should keep original fields in output since some editors has their
            // own syntax for field or doesn’t support fields at all so we should
            // capture actual field location in output stream
            if (str) {
                result.push(str);
                str = '';
            }
            result.push(token);
        }
        else {
            str += stringify$1(token, state);
        }
    }
    if (str) {
        result.push(str);
    }
    return result;
}
function isGroup(node) {
    return node.type === 'TokenGroup';
}
function isField$1(token) {
    return typeof token === 'object' && token.type === 'Field' && token.index != null;
}
function last$1(arr) {
    return arr[arr.length - 1];
}
function deepestNode(node) {
    return node.children.length ? deepestNode(last$1(node.children)) : node;
}
function insertText(node, text) {
    if (node.value) {
        const lastToken = last$1(node.value);
        if (typeof lastToken === 'string') {
            node.value[node.value.length - 1] += text;
        }
        else {
            node.value.push(text);
        }
    }
    else {
        node.value = [text];
    }
}
function insertHref(node, text) {
    var _a;
    let href = '';
    if (urlRegex.test(text)) {
        href = text;
        if (!/\w+:/.test(href) && !href.startsWith('//')) {
            href = `http://${href}`;
        }
    }
    else if (emailRegex.test(text)) {
        href = `mailto:${text}`;
    }
    const hrefAttribute = (_a = node.attributes) === null || _a === void 0 ? void 0 : _a.find(attr => attr.name === 'href');
    if (!hrefAttribute) {
        if (!node.attributes) {
            node.attributes = [];
        }
        node.attributes.push({ name: 'href', value: [href], valueType: 'doubleQuote' });
    }
    else if (!hrefAttribute.value) {
        hrefAttribute.value = [href];
    }
}
function attachRepeater(items, repeater) {
    for (const item of items) {
        if (!item.repeat) {
            item.repeat = Object.assign({}, repeater);
        }
    }
    return items;
}

/**
 * Parses given abbreviation into node tree
 */
function parseAbbreviation$1(abbr, options) {
    try {
        const tokens = typeof abbr === 'string' ? tokenize$1(abbr) : abbr;
        return convert(abbreviation(tokens, options), options);
    }
    catch (err) {
        if (err instanceof ScannerError && typeof abbr === 'string') {
            err.message += `\n${abbr}\n${'-'.repeat(err.pos)}^`;
        }
        throw err;
    }
}

var OperatorType;
(function (OperatorType) {
    OperatorType["Sibling"] = "+";
    OperatorType["Important"] = "!";
    OperatorType["ArgumentDelimiter"] = ",";
    OperatorType["ValueDelimiter"] = "-";
    OperatorType["PropertyDelimiter"] = ":";
})(OperatorType || (OperatorType = {}));

var Chars$2;
(function (Chars) {
    /** `#` character */
    Chars[Chars["Hash"] = 35] = "Hash";
    /** `$` character */
    Chars[Chars["Dollar"] = 36] = "Dollar";
    /** `-` character */
    Chars[Chars["Dash"] = 45] = "Dash";
    /** `.` character */
    Chars[Chars["Dot"] = 46] = "Dot";
    /** `:` character */
    Chars[Chars["Colon"] = 58] = "Colon";
    /** `,` character */
    Chars[Chars["Comma"] = 44] = "Comma";
    /** `!` character */
    Chars[Chars["Excl"] = 33] = "Excl";
    /** `@` character */
    Chars[Chars["At"] = 64] = "At";
    /** `%` character */
    Chars[Chars["Percent"] = 37] = "Percent";
    /** `_` character */
    Chars[Chars["Underscore"] = 95] = "Underscore";
    /** `(` character */
    Chars[Chars["RoundBracketOpen"] = 40] = "RoundBracketOpen";
    /** `)` character */
    Chars[Chars["RoundBracketClose"] = 41] = "RoundBracketClose";
    /** `{` character */
    Chars[Chars["CurlyBracketOpen"] = 123] = "CurlyBracketOpen";
    /** `}` character */
    Chars[Chars["CurlyBracketClose"] = 125] = "CurlyBracketClose";
    /** `+` character */
    Chars[Chars["Sibling"] = 43] = "Sibling";
    /** `'` character */
    Chars[Chars["SingleQuote"] = 39] = "SingleQuote";
    /** `"` character */
    Chars[Chars["DoubleQuote"] = 34] = "DoubleQuote";
    /** `t` character */
    Chars[Chars["Transparent"] = 116] = "Transparent";
    /** `/` character */
    Chars[Chars["Slash"] = 47] = "Slash";
})(Chars$2 || (Chars$2 = {}));

function tokenize(abbr, isValue) {
    let brackets = 0;
    let token;
    const scanner = new Scanner$1(abbr);
    const tokens = [];
    while (!scanner.eof()) {
        token = getToken(scanner, brackets === 0 && !isValue);
        if (!token) {
            throw scanner.error('Unexpected character');
        }
        if (token.type === 'Bracket') {
            if (!brackets && token.open) {
                mergeTokens(scanner, tokens);
            }
            brackets += token.open ? 1 : -1;
            if (brackets < 0) {
                throw scanner.error('Unexpected bracket', token.start);
            }
        }
        tokens.push(token);
        // Forcibly consume next operator after unit-less numeric value or color:
        // next dash `-` must be used as value delimiter
        if (shouldConsumeDashAfter(token) && (token = operator(scanner))) {
            tokens.push(token);
        }
    }
    return tokens;
}
/**
 * Returns next token from given scanner, if possible
 */
function getToken(scanner, short) {
    return field$1(scanner)
        || customProperty(scanner)
        || numberValue(scanner)
        || colorValue(scanner)
        || stringValue(scanner)
        || bracket(scanner)
        || operator(scanner)
        || whiteSpace(scanner)
        || literal$1(scanner, short);
}
function field$1(scanner) {
    const start = scanner.pos;
    if (scanner.eat(Chars$2.Dollar) && scanner.eat(Chars$2.CurlyBracketOpen)) {
        scanner.start = scanner.pos;
        let index;
        let name = '';
        if (scanner.eatWhile(isNumber$1)) {
            // It’s a field
            index = Number(scanner.current());
            name = scanner.eat(Chars$2.Colon) ? consumePlaceholder$1(scanner) : '';
        }
        else if (isAlpha$1(scanner.peek())) {
            // It’s a variable
            name = consumePlaceholder$1(scanner);
        }
        if (scanner.eat(Chars$2.CurlyBracketClose)) {
            return {
                type: 'Field',
                index, name,
                start,
                end: scanner.pos
            };
        }
        throw scanner.error('Expecting }');
    }
    // If we reached here then there’s no valid field here, revert
    // back to starting position
    scanner.pos = start;
}
/**
 * Consumes a placeholder: value right after `:` in field. Could be empty
 */
function consumePlaceholder$1(stream) {
    const stack = [];
    stream.start = stream.pos;
    while (!stream.eof()) {
        if (stream.eat(Chars$2.CurlyBracketOpen)) {
            stack.push(stream.pos);
        }
        else if (stream.eat(Chars$2.CurlyBracketClose)) {
            if (!stack.length) {
                stream.pos--;
                break;
            }
            stack.pop();
        }
        else {
            stream.pos++;
        }
    }
    if (stack.length) {
        stream.pos = stack.pop();
        throw stream.error(`Expecting }`);
    }
    return stream.current();
}
/**
 * Consumes literal from given scanner
 * @param short Use short notation for consuming value.
 * The difference between “short” and “full” notation is that first one uses
 * alpha characters only and used for extracting keywords from abbreviation,
 * while “full” notation also supports numbers and dashes
 */
function literal$1(scanner, short) {
    const start = scanner.pos;
    if (scanner.eat(isIdentPrefix)) {
        // SCSS or LESS variable
        // NB a bit dirty hack: if abbreviation starts with identifier prefix,
        // consume alpha characters only to allow embedded variables
        scanner.eatWhile(start ? isKeyword : isLiteral$1);
    }
    else if (scanner.eat(isAlphaWord)) {
        scanner.eatWhile(short ? isLiteral$1 : isKeyword);
    }
    else {
        // Allow dots only at the beginning of literal
        scanner.eat(Chars$2.Dot);
        scanner.eatWhile(isLiteral$1);
    }
    if (start !== scanner.pos) {
        scanner.start = start;
        return createLiteral(scanner, scanner.start = start);
    }
}
function createLiteral(scanner, start = scanner.start, end = scanner.pos) {
    return {
        type: 'Literal',
        value: scanner.substring(start, end),
        start,
        end
    };
}
/**
 * Consumes numeric CSS value (number with optional unit) from current stream,
 * if possible
 */
function numberValue(scanner) {
    const start = scanner.pos;
    if (consumeNumber(scanner)) {
        scanner.start = start;
        const rawValue = scanner.current();
        // eat unit, which can be a % or alpha word
        scanner.start = scanner.pos;
        scanner.eat(Chars$2.Percent) || scanner.eatWhile(isAlphaWord);
        return {
            type: 'NumberValue',
            value: Number(rawValue),
            rawValue,
            unit: scanner.current(),
            start,
            end: scanner.pos
        };
    }
}
/**
 * Consumes quoted string value from given scanner
 */
function stringValue(scanner) {
    const ch = scanner.peek();
    const start = scanner.pos;
    let finished = false;
    if (isQuote$2(ch)) {
        scanner.pos++;
        while (!scanner.eof()) {
            // Do not throw error on malformed string
            if (scanner.eat(ch)) {
                finished = true;
                break;
            }
            else {
                scanner.pos++;
            }
        }
        scanner.start = start;
        return {
            type: 'StringValue',
            value: scanner.substring(start + 1, scanner.pos - (finished ? 1 : 0)),
            quote: ch === Chars$2.SingleQuote ? 'single' : 'double',
            start,
            end: scanner.pos
        };
    }
}
/**
 * Consumes a color token from given string
 */
function colorValue(scanner) {
    // supported color variations:
    // #abc   → #aabbccc
    // #0     → #000000
    // #fff.5 → rgba(255, 255, 255, 0.5)
    // #t     → transparent
    const start = scanner.pos;
    if (scanner.eat(Chars$2.Hash)) {
        const valueStart = scanner.pos;
        let color = '';
        let alpha = '';
        if (scanner.eatWhile(isHex)) {
            color = scanner.substring(valueStart, scanner.pos);
            alpha = colorAlpha(scanner);
        }
        else if (scanner.eat(Chars$2.Transparent)) {
            color = '0';
            alpha = colorAlpha(scanner) || '0';
        }
        else {
            alpha = colorAlpha(scanner);
        }
        if (color || alpha || scanner.eof()) {
            const { r, g, b, a } = parseColor(color, alpha);
            return {
                type: 'ColorValue',
                r, g, b, a,
                raw: scanner.substring(start + 1, scanner.pos),
                start,
                end: scanner.pos
            };
        }
        else {
            // Consumed # but no actual value: invalid color value, treat it as literal
            return createLiteral(scanner, start);
        }
    }
    scanner.pos = start;
}
/**
 * Consumes alpha value of color: `.1`
 */
function colorAlpha(scanner) {
    const start = scanner.pos;
    if (scanner.eat(Chars$2.Dot)) {
        scanner.start = start;
        if (scanner.eatWhile(isNumber$1)) {
            return scanner.current();
        }
        return '1';
    }
    return '';
}
/**
 * Consumes white space characters as string literal from given scanner
 */
function whiteSpace(scanner) {
    const start = scanner.pos;
    if (scanner.eatWhile(isSpace)) {
        return {
            type: 'WhiteSpace',
            start,
            end: scanner.pos
        };
    }
}
/**
 * Consumes custom CSS property: --foo-bar
 */
function customProperty(scanner) {
    const start = scanner.pos;
    if (scanner.eat(Chars$2.Dash) && scanner.eat(Chars$2.Dash)) {
        scanner.start = start;
        scanner.eatWhile(isKeyword);
        return {
            type: 'CustomProperty',
            value: scanner.current(),
            start,
            end: scanner.pos
        };
    }
    scanner.pos = start;
}
/**
 * Consumes bracket from given scanner
 */
function bracket(scanner) {
    const ch = scanner.peek();
    if (isBracket$1(ch)) {
        return {
            type: 'Bracket',
            open: ch === Chars$2.RoundBracketOpen,
            start: scanner.pos++,
            end: scanner.pos
        };
    }
}
/**
 * Consumes operator from given scanner
 */
function operator(scanner) {
    const op = operatorType(scanner.peek());
    if (op) {
        return {
            type: 'Operator',
            operator: op,
            start: scanner.pos++,
            end: scanner.pos
        };
    }
}
/**
 * Eats number value from given stream
 * @return Returns `true` if number was consumed
 */
function consumeNumber(stream) {
    const start = stream.pos;
    stream.eat(Chars$2.Dash);
    const afterNegative = stream.pos;
    const hasDecimal = stream.eatWhile(isNumber$1);
    const prevPos = stream.pos;
    if (stream.eat(Chars$2.Dot)) {
        // It’s perfectly valid to have numbers like `1.`, which enforces
        // value to float unit type
        const hasFloat = stream.eatWhile(isNumber$1);
        if (!hasDecimal && !hasFloat) {
            // Lone dot
            stream.pos = prevPos;
        }
    }
    // Edge case: consumed dash only: not a number, bail-out
    if (stream.pos === afterNegative) {
        stream.pos = start;
    }
    return stream.pos !== start;
}
function isIdentPrefix(code) {
    return code === Chars$2.At || code === Chars$2.Dollar;
}
/**
 * If given character is an operator, returns it’s type
 */
function operatorType(ch) {
    return (ch === Chars$2.Sibling && OperatorType.Sibling)
        || (ch === Chars$2.Excl && OperatorType.Important)
        || (ch === Chars$2.Comma && OperatorType.ArgumentDelimiter)
        || (ch === Chars$2.Colon && OperatorType.PropertyDelimiter)
        || (ch === Chars$2.Dash && OperatorType.ValueDelimiter)
        || void 0;
}
/**
 * Check if given code is a hex value (/0-9a-f/)
 */
function isHex(code) {
    return isNumber$1(code) || isAlpha$1(code, 65, 70); // A-F
}
function isKeyword(code) {
    return isAlphaNumericWord(code) || code === Chars$2.Dash;
}
function isBracket$1(code) {
    return code === Chars$2.RoundBracketOpen || code === Chars$2.RoundBracketClose;
}
function isLiteral$1(code) {
    return isAlphaWord(code) || code === Chars$2.Percent || code === Chars$2.Slash;
}
/**
 * Parses given color value from abbreviation into RGBA format
 */
function parseColor(value, alpha) {
    let r = '0';
    let g = '0';
    let b = '0';
    let a = Number(alpha != null && alpha !== '' ? alpha : 1);
    if (value === 't') {
        a = 0;
    }
    else {
        switch (value.length) {
            case 0:
                break;
            case 1:
                r = g = b = value + value;
                break;
            case 2:
                r = g = b = value;
                break;
            case 3:
                r = value[0] + value[0];
                g = value[1] + value[1];
                b = value[2] + value[2];
                break;
            default:
                value += value;
                r = value.slice(0, 2);
                g = value.slice(2, 4);
                b = value.slice(4, 6);
        }
    }
    return {
        r: parseInt(r, 16),
        g: parseInt(g, 16),
        b: parseInt(b, 16),
        a
    };
}
/**
 * Check if scanner reader must consume dash after given token.
 * Used in cases where user must explicitly separate numeric values
 */
function shouldConsumeDashAfter(token) {
    return token.type === 'ColorValue' || (token.type === 'NumberValue' && !token.unit);
}
/**
 * Merges last adjacent tokens into a single literal.
 * This function is used to overcome edge case when function name was parsed
 * as a list of separate tokens. For example, a `scale3d()` value will be
 * parsed as literal and number tokens (`scale` and `3d`) which is a perfectly
 * valid abbreviation but undesired result. This function will detect last adjacent
 * literal and number values and combine them into single literal
 */
function mergeTokens(scanner, tokens) {
    let start = 0;
    let end = 0;
    while (tokens.length) {
        const token = last(tokens);
        if (token.type === 'Literal' || token.type === 'NumberValue') {
            start = token.start;
            if (!end) {
                end = token.end;
            }
            tokens.pop();
        }
        else {
            break;
        }
    }
    if (start !== end) {
        tokens.push(createLiteral(scanner, start, end));
    }
}
function last(arr) {
    return arr[arr.length - 1];
}

function tokenScanner(tokens) {
    return {
        tokens,
        start: 0,
        pos: 0,
        size: tokens.length
    };
}
function peek$2(scanner) {
    return scanner.tokens[scanner.pos];
}
function readable(scanner) {
    return scanner.pos < scanner.size;
}
function consume$1(scanner, test) {
    if (test(peek$2(scanner))) {
        scanner.pos++;
        return true;
    }
    return false;
}
function error$2(scanner, message, token = peek$2(scanner)) {
    if (token && token.start != null) {
        message += ` at ${token.start}`;
    }
    const err = new Error(message);
    err['pos'] = token && token.start;
    return err;
}

function parser(tokens, options = {}) {
    const scanner = tokenScanner(tokens);
    const result = [];
    let property;
    while (readable(scanner)) {
        if (property = consumeProperty(scanner, options)) {
            result.push(property);
        }
        else if (!consume$1(scanner, isSiblingOperator)) {
            throw error$2(scanner, 'Unexpected token');
        }
    }
    return result;
}
/**
 * Consumes single CSS property
 */
function consumeProperty(scanner, options) {
    let name;
    let important = false;
    let valueFragment;
    const value = [];
    const token = peek$2(scanner);
    const valueMode = !!options.value;
    if (!valueMode && isLiteral(token) && !isFunctionStart(scanner)) {
        scanner.pos++;
        name = token.value;
        // Consume any following value delimiter after property name
        consume$1(scanner, isValueDelimiter);
    }
    // Skip whitespace right after property name, if any
    if (valueMode) {
        consume$1(scanner, isWhiteSpace$1);
    }
    while (readable(scanner)) {
        if (consume$1(scanner, isImportant)) {
            important = true;
        }
        else if (valueFragment = consumeValue(scanner, valueMode)) {
            value.push(valueFragment);
        }
        else if (!consume$1(scanner, isFragmentDelimiter)) {
            break;
        }
    }
    if (name || value.length || important) {
        return { name, value, important };
    }
}
/**
 * Consumes single value fragment, e.g. all value tokens before comma
 */
function consumeValue(scanner, inArgument) {
    const result = [];
    let token;
    let args;
    while (readable(scanner)) {
        token = peek$2(scanner);
        if (isValue(token)) {
            scanner.pos++;
            if (isLiteral(token) && (args = consumeArguments(scanner))) {
                result.push({
                    type: 'FunctionCall',
                    name: token.value,
                    arguments: args
                });
            }
            else {
                result.push(token);
            }
        }
        else if (isValueDelimiter(token) || (inArgument && isWhiteSpace$1(token))) {
            scanner.pos++;
        }
        else {
            break;
        }
    }
    return result.length
        ? { type: 'CSSValue', value: result }
        : void 0;
}
function consumeArguments(scanner) {
    const start = scanner.pos;
    if (consume$1(scanner, isOpenBracket$1)) {
        const args = [];
        let value;
        while (readable(scanner) && !consume$1(scanner, isCloseBracket$1)) {
            if (value = consumeValue(scanner, true)) {
                args.push(value);
            }
            else if (!consume$1(scanner, isWhiteSpace$1) && !consume$1(scanner, isArgumentDelimiter)) {
                throw error$2(scanner, 'Unexpected token');
            }
        }
        scanner.start = start;
        return args;
    }
}
function isLiteral(token) {
    return token && token.type === 'Literal';
}
function isBracket(token, open) {
    return token && token.type === 'Bracket' && (open == null || token.open === open);
}
function isOpenBracket$1(token) {
    return isBracket(token, true);
}
function isCloseBracket$1(token) {
    return isBracket(token, false);
}
function isWhiteSpace$1(token) {
    return token && token.type === 'WhiteSpace';
}
function isOperator(token, operator) {
    return token && token.type === 'Operator' && (!operator || token.operator === operator);
}
function isSiblingOperator(token) {
    return isOperator(token, OperatorType.Sibling);
}
function isArgumentDelimiter(token) {
    return isOperator(token, OperatorType.ArgumentDelimiter);
}
function isFragmentDelimiter(token) {
    return isArgumentDelimiter(token);
}
function isImportant(token) {
    return isOperator(token, OperatorType.Important);
}
function isValue(token) {
    return token.type === 'StringValue'
        || token.type === 'ColorValue'
        || token.type === 'NumberValue'
        || token.type === 'Literal'
        || token.type === 'Field'
        || token.type === 'CustomProperty';
}
function isValueDelimiter(token) {
    return isOperator(token, OperatorType.PropertyDelimiter)
        || isOperator(token, OperatorType.ValueDelimiter);
}
function isFunctionStart(scanner) {
    const t1 = scanner.tokens[scanner.pos];
    const t2 = scanner.tokens[scanner.pos + 1];
    return t1 && t2 && isLiteral(t1) && t2.type === 'Bracket';
}

/**
 * Parses given abbreviation into property set
 */
function parse$2(abbr, options) {
    try {
        const tokens = typeof abbr === 'string' ? tokenize(abbr, options && options.value) : abbr;
        return parser(tokens, options);
    }
    catch (err) {
        if (err instanceof ScannerError && typeof abbr === 'string') {
            err.message += `\n${abbr}\n${'-'.repeat(err.pos)}^`;
        }
        throw err;
    }
}

/**
 * Merges attributes in current node: de-duplicates attributes with the same name
 * and merges class names
 */
function mergeAttributes(node, config) {
    if (!node.attributes) {
        return;
    }
    const attributes = [];
    const lookup = {};
    for (const attr of node.attributes) {
        if (attr.name) {
            const attrName = attr.name;
            if (attrName in lookup) {
                const prev = lookup[attrName];
                if (attrName === 'class') {
                    prev.value = mergeValue(prev.value, attr.value, ' ');
                }
                else {
                    mergeDeclarations(prev, attr, config);
                }
            }
            else {
                // Create new attribute instance so we can safely modify it later
                attributes.push(lookup[attrName] = Object.assign({}, attr));
            }
        }
        else {
            attributes.push(attr);
        }
    }
    node.attributes = attributes;
}
/**
 * Merges two token lists into single list. Adjacent strings are merged together
 */
function mergeValue(prev, next, glue) {
    if (prev && next) {
        if (prev.length && glue) {
            append(prev, glue);
        }
        for (const t of next) {
            append(prev, t);
        }
        return prev;
    }
    const result = prev || next;
    return result && result.slice();
}
/**
 * Merges data from `src` attribute into `dest` and returns it
 */
function mergeDeclarations(dest, src, config) {
    dest.name = src.name;
    if (!config.options['output.reverseAttributes']) {
        dest.value = src.value;
    }
    // Keep high-priority properties
    if (!dest.implied) {
        dest.implied = src.implied;
    }
    if (!dest.boolean) {
        dest.boolean = src.boolean;
    }
    if (dest.valueType !== 'expression') {
        dest.valueType = src.valueType;
    }
    return dest;
}
function append(tokens, value) {
    const lastIx = tokens.length - 1;
    if (typeof tokens[lastIx] === 'string' && typeof value === 'string') {
        tokens[lastIx] += value;
    }
    else {
        tokens.push(value);
    }
}

/**
 * Walks over each child node of given markup abbreviation AST node (not including
 * given one) and invokes `fn` on each node.
 * The `fn` callback accepts context node, list of ancestor nodes and optional
 * state object
 */
function walk$1$1(node, fn, state) {
    const ancestors = [node];
    const callback = (ctx) => {
        fn(ctx, ancestors, state);
        ancestors.push(ctx);
        ctx.children.forEach(callback);
        ancestors.pop();
    };
    node.children.forEach(callback);
}
/**
 * Finds node which is the deepest for in current node or node itself.
 */
function findDeepest(node) {
    let parent;
    while (node.children.length) {
        parent = node;
        node = node.children[node.children.length - 1];
    }
    return { parent, node };
}
function isNode(node) {
    return node.type === 'AbbreviationNode';
}

/**
 * Finds matching snippet from `registry` and resolves it into a parsed abbreviation.
 * Resolved node is then updated or replaced with matched abbreviation tree.
 *
 * A HTML registry basically contains aliases to another Emmet abbreviations,
 * e.g. a predefined set of name, attributes and so on, possibly a complex
 * abbreviation with multiple elements. So we have to get snippet, parse it
 * and recursively resolve it.
 */
function resolveSnippets(abbr, config) {
    const stack = [];
    const reversed = config.options['output.reverseAttributes'];
    const resolve = (child) => {
        const snippet = child.name && config.snippets[child.name];
        // A snippet in stack means circular reference.
        // It can be either a user error or a perfectly valid snippet like
        // "img": "img[src alt]/", e.g. an element with predefined shape.
        // In any case, simply stop parsing and keep element as is
        if (!snippet || stack.includes(snippet)) {
            return null;
        }
        const snippetAbbr = parseAbbreviation$1(snippet, config);
        stack.push(snippet);
        walkResolve(snippetAbbr, resolve);
        stack.pop();
        // Add attributes from current node into every top-level node of parsed abbreviation
        for (const topNode of snippetAbbr.children) {
            if (child.attributes) {
                const from = topNode.attributes || [];
                const to = child.attributes || [];
                topNode.attributes = reversed ? to.concat(from) : from.concat(to);
            }
            mergeNodes(child, topNode);
        }
        return snippetAbbr;
    };
    walkResolve(abbr, resolve);
    return abbr;
}
function walkResolve(node, resolve, config) {
    let children = [];
    for (const child of node.children) {
        const resolved = resolve(child);
        if (resolved) {
            children = children.concat(resolved.children);
            const deepest = findDeepest(resolved);
            if (isNode(deepest.node)) {
                deepest.node.children = deepest.node.children.concat(walkResolve(child, resolve));
            }
        }
        else {
            children.push(child);
            child.children = walkResolve(child, resolve);
        }
    }
    return node.children = children;
}
/**
 * Adds data from first node into second node
 */
function mergeNodes(from, to) {
    if (from.selfClosing) {
        to.selfClosing = true;
    }
    if (from.value != null) {
        to.value = from.value;
    }
    if (from.repeat) {
        to.repeat = from.repeat;
    }
}

const expressionStart = '{';
const expressionEnd = '}';
function createOutputStream(options, level = 0) {
    return {
        options,
        value: '',
        level,
        offset: 0,
        line: 0,
        column: 0
    };
}
/**
 * Pushes plain string into output stream without newline processing
 */
function push(stream, text) {
    const processText = stream.options['output.text'];
    _push(stream, processText(text, stream.offset, stream.line, stream.column));
}
/**
 * Pushes given string with possible newline formatting into output
 */
function pushString(stream, value) {
    // If given value contains newlines, we should push content line-by-line and
    // use `pushNewline()` to maintain proper line/column state
    const lines = splitByLines$1(value);
    for (let i = 0, il = lines.length - 1; i <= il; i++) {
        push(stream, lines[i]);
        if (i !== il) {
            pushNewline(stream, true);
        }
    }
}
/**
 * Pushes new line into given output stream
 */
function pushNewline(stream, indent) {
    const baseIndent = stream.options['output.baseIndent'];
    const newline = stream.options['output.newline'];
    push(stream, newline + baseIndent);
    stream.line++;
    stream.column = baseIndent.length;
    if (indent) {
        pushIndent(stream, indent === true ? stream.level : indent);
    }
}
/**
 * Adds indentation of `size` to current output stream
 */
function pushIndent(stream, size = stream.level) {
    const indent = stream.options['output.indent'];
    push(stream, indent.repeat(Math.max(size, 0)));
}
/**
 * Pushes field/tabstop into output stream
 */
function pushField(stream, index, placeholder) {
    const field = stream.options['output.field'];
    // NB: use `_push` instead of `push` to skip text processing
    _push(stream, field(index, placeholder, stream.offset, stream.line, stream.column));
}
/**
 * Returns given tag name formatted according to given config
 */
function tagName(name, config) {
    return strCase(name, config.options['output.tagCase']);
}
/**
 * Returns given attribute name formatted according to given config
 */
function attrName(name, config) {
    return strCase(name, config.options['output.attributeCase']);
}
/**
 * Returns character for quoting value of given attribute
 */
function attrQuote(attr, config, isOpen) {
    if (attr.valueType === 'expression') {
        return isOpen ? expressionStart : expressionEnd;
    }
    return config.options['output.attributeQuotes'] === 'single' ? '\'' : '"';
}
/**
 * Check if given attribute is boolean
 */
function isBooleanAttribute(attr, config) {
    return attr.boolean
        || config.options['output.booleanAttributes'].includes((attr.name || '').toLowerCase());
}
/**
 * Returns a token for self-closing tag, depending on current options
 */
function selfClose(config) {
    switch (config.options['output.selfClosingStyle']) {
        case 'xhtml': return ' /';
        case 'xml': return '/';
        default: return '';
    }
}
/**
 * Check if given tag name belongs to inline-level element
 * @param node Parsed node or tag name
 */
function isInline(node, config) {
    if (typeof node === 'string') {
        return config.options.inlineElements.includes(node.toLowerCase());
    }
    // inline node is a node either with inline-level name or text-only node
    return node.name ? isInline(node.name, config) : Boolean(node.value && !node.attributes);
}
/**
 * Splits given text by lines
 */
function splitByLines$1(text) {
    return text.split(/\r\n|\r|\n/g);
}
/**
 * Pushes raw string into output stream without any processing
 */
function _push(stream, text) {
    stream.value += text;
    stream.offset += text.length;
    stream.column += text.length;
}
function strCase(str, type) {
    if (type) {
        return type === 'upper' ? str.toUpperCase() : str.toLowerCase();
    }
    return str;
}

const elementMap = {
    p: 'span',
    ul: 'li',
    ol: 'li',
    table: 'tr',
    tr: 'td',
    tbody: 'tr',
    thead: 'tr',
    tfoot: 'tr',
    colgroup: 'col',
    select: 'option',
    optgroup: 'option',
    audio: 'source',
    video: 'source',
    object: 'param',
    map: 'area'
};
function implicitTag(node, ancestors, config) {
    if (!node.name && node.attributes) {
        resolveImplicitTag(node, ancestors, config);
    }
}
function resolveImplicitTag(node, ancestors, config) {
    const parent = getParentElement(ancestors);
    const contextName = config.context ? config.context.name : '';
    const parentName = lowercase(parent ? parent.name : contextName);
    node.name = elementMap[parentName]
        || (isInline(parentName, config) ? 'span' : 'div');
}
function lowercase(str) {
    return (str || '').toLowerCase();
}
/**
 * Returns closest element node from given ancestors list
 */
function getParentElement(ancestors) {
    for (let i = ancestors.length - 1; i >= 0; i--) {
        const elem = ancestors[i];
        if (isNode(elem)) {
            return elem;
        }
    }
}

var latin = {
	"common": ["lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipisicing", "elit"],
	"words": ["exercitationem", "perferendis", "perspiciatis", "laborum", "eveniet",
		"sunt", "iure", "nam", "nobis", "eum", "cum", "officiis", "excepturi",
		"odio", "consectetur", "quasi", "aut", "quisquam", "vel", "eligendi",
		"itaque", "non", "odit", "tempore", "quaerat", "dignissimos",
		"facilis", "neque", "nihil", "expedita", "vitae", "vero", "ipsum",
		"nisi", "animi", "cumque", "pariatur", "velit", "modi", "natus",
		"iusto", "eaque", "sequi", "illo", "sed", "ex", "et", "voluptatibus",
		"tempora", "veritatis", "ratione", "assumenda", "incidunt", "nostrum",
		"placeat", "aliquid", "fuga", "provident", "praesentium", "rem",
		"necessitatibus", "suscipit", "adipisci", "quidem", "possimus",
		"voluptas", "debitis", "sint", "accusantium", "unde", "sapiente",
		"voluptate", "qui", "aspernatur", "laudantium", "soluta", "amet",
		"quo", "aliquam", "saepe", "culpa", "libero", "ipsa", "dicta",
		"reiciendis", "nesciunt", "doloribus", "autem", "impedit", "minima",
		"maiores", "repudiandae", "ipsam", "obcaecati", "ullam", "enim",
		"totam", "delectus", "ducimus", "quis", "voluptates", "dolores",
		"molestiae", "harum", "dolorem", "quia", "voluptatem", "molestias",
		"magni", "distinctio", "omnis", "illum", "dolorum", "voluptatum", "ea",
		"quas", "quam", "corporis", "quae", "blanditiis", "atque", "deserunt",
		"laboriosam", "earum", "consequuntur", "hic", "cupiditate",
		"quibusdam", "accusamus", "ut", "rerum", "error", "minus", "eius",
		"ab", "ad", "nemo", "fugit", "officia", "at", "in", "id", "quos",
		"reprehenderit", "numquam", "iste", "fugiat", "sit", "inventore",
		"beatae", "repellendus", "magnam", "recusandae", "quod", "explicabo",
		"doloremque", "aperiam", "consequatur", "asperiores", "commodi",
		"optio", "dolor", "labore", "temporibus", "repellat", "veniam",
		"architecto", "est", "esse", "mollitia", "nulla", "a", "similique",
		"eos", "alias", "dolore", "tenetur", "deleniti", "porro", "facere",
		"maxime", "corrupti"]
};

var ru = {
	"common": ["далеко-далеко", "за", "словесными", "горами", "в стране", "гласных", "и согласных", "живут", "рыбные", "тексты"],
	"words": ["вдали", "от всех", "они", "буквенных", "домах", "на берегу", "семантика",
		"большого", "языкового", "океана", "маленький", "ручеек", "даль",
		"журчит", "по всей", "обеспечивает", "ее","всеми", "необходимыми",
		"правилами", "эта", "парадигматическая", "страна", "которой", "жаренные",
		"предложения", "залетают", "прямо", "рот", "даже", "всемогущая",
		"пунктуация", "не", "имеет", "власти", "над", "рыбными", "текстами",
		"ведущими", "безорфографичный", "образ", "жизни", "однажды", "одна",
		"маленькая", "строчка","рыбного", "текста", "имени", "lorem", "ipsum",
		"решила", "выйти", "большой", "мир", "грамматики", "великий", "оксмокс",
		"предупреждал", "о", "злых", "запятых", "диких", "знаках", "вопроса",
		"коварных", "точках", "запятой", "но", "текст", "дал", "сбить",
		"себя", "толку", "он", "собрал", "семь", "своих", "заглавных", "букв",
		"подпоясал", "инициал", "за", "пояс", "пустился", "дорогу",
		"взобравшись", "первую", "вершину", "курсивных", "гор", "бросил",
		"последний", "взгляд", "назад", "силуэт", "своего", "родного", "города",
		"буквоград", "заголовок", "деревни", "алфавит", "подзаголовок", "своего",
		"переулка", "грустный", "реторический", "вопрос", "скатился", "его",
		"щеке", "продолжил", "свой", "путь", "дороге", "встретил", "рукопись",
		"она", "предупредила",  "моей", "все", "переписывается", "несколько",
		"раз", "единственное", "что", "меня", "осталось", "это", "приставка",
		"возвращайся", "ты", "лучше", "свою", "безопасную", "страну", "послушавшись",
		"рукописи", "наш", "продолжил", "свой", "путь", "вскоре", "ему",
		"повстречался", "коварный", "составитель", "рекламных", "текстов",
		"напоивший", "языком", "речью", "заманивший", "свое", "агентство",
		"которое", "использовало", "снова", "снова", "своих", "проектах",
		"если", "переписали", "то", "живет", "там", "до", "сих", "пор"]
};

var sp = {
	"common": ["mujer", "uno", "dolor", "más", "de", "poder", "mismo", "si"],
	"words": ["ejercicio", "preferencia", "perspicacia", "laboral", "paño",
		"suntuoso", "molde", "namibia", "planeador", "mirar", "demás", "oficinista", "excepción",
		"odio", "consecuencia", "casi", "auto", "chicharra", "velo", "elixir",
		"ataque", "no", "odio", "temporal", "cuórum", "dignísimo",
		"facilismo", "letra", "nihilista", "expedición", "alma", "alveolar", "aparte",
		"león", "animal", "como", "paria", "belleza", "modo", "natividad",
		"justo", "ataque", "séquito", "pillo", "sed", "ex", "y", "voluminoso",
		"temporalidad", "verdades", "racional", "asunción", "incidente", "marejada",
		"placenta", "amanecer", "fuga", "previsor", "presentación", "lejos",
		"necesariamente", "sospechoso", "adiposidad", "quindío", "pócima",
		"voluble", "débito", "sintió", "accesorio", "falda", "sapiencia",
		"volutas", "queso", "permacultura", "laudo", "soluciones", "entero",
		"pan", "litro", "tonelada", "culpa", "libertario", "mosca", "dictado",
		"reincidente", "nascimiento", "dolor", "escolar", "impedimento", "mínima",
		"mayores", "repugnante", "dulce", "obcecado", "montaña", "enigma",
		"total", "deletéreo", "décima", "cábala", "fotografía", "dolores",
		"molesto", "olvido", "paciencia", "resiliencia", "voluntad", "molestias",
		"magnífico", "distinción", "ovni", "marejada", "cerro", "torre", "y",
		"abogada", "manantial", "corporal", "agua", "crepúsculo", "ataque", "desierto",
		"laboriosamente", "angustia", "afortunado", "alma", "encefalograma",
		"materialidad", "cosas", "o", "renuncia", "error", "menos", "conejo",
		"abadía", "analfabeto", "remo", "fugacidad", "oficio", "en", "almácigo", "vos", "pan",
		"represión", "números", "triste", "refugiado", "trote", "inventor",
		"corchea", "repelente", "magma", "recusado", "patrón", "explícito",
		"paloma", "síndrome", "inmune", "autoinmune", "comodidad",
		"ley", "vietnamita", "demonio", "tasmania", "repeler", "apéndice",
		"arquitecto", "columna", "yugo", "computador", "mula", "a", "propósito",
		"fantasía", "alias", "rayo", "tenedor", "deleznable", "ventana", "cara",
		"anemia", "corrupto"]
};

const vocabularies = { ru, sp, latin };
const reLorem = /^lorem([a-z]*)(\d*)(-\d*)?$/i;
function lorem(node, ancestors, config) {
    let m;
    if (node.name && (m = node.name.match(reLorem))) {
        const db = vocabularies[m[1]] || vocabularies.latin;
        const minWordCount = m[2] ? Math.max(1, Number(m[2])) : 30;
        const maxWordCount = m[3] ? Math.max(minWordCount, Number(m[3].slice(1))) : minWordCount;
        const wordCount = rand(minWordCount, maxWordCount);
        const repeat = node.repeat || findRepeater(ancestors);
        node.name = node.attributes = void 0;
        node.value = [paragraph(db, wordCount, !repeat || repeat.value === 0)];
        if (node.repeat && ancestors.length > 1) {
            resolveImplicitTag(node, ancestors, config);
        }
    }
}
/**
 * Returns random integer between <code>from</code> and <code>to</code> values
 */
function rand(from, to) {
    return Math.floor(Math.random() * (to - from) + from);
}
function sample(arr, count) {
    const len = arr.length;
    const iterations = Math.min(len, count);
    const result = [];
    while (result.length < iterations) {
        const str = arr[rand(0, len)];
        if (!result.includes(str)) {
            result.push(str);
        }
    }
    return result;
}
function choice(val) {
    return val[rand(0, val.length - 1)];
}
function sentence(words, end) {
    if (words.length) {
        words = [capitalize(words[0])].concat(words.slice(1));
    }
    return words.join(' ') + (end || choice('?!...')); // more dots than question marks
}
function capitalize(word) {
    return word[0].toUpperCase() + word.slice(1);
}
/**
 * Insert commas at randomly selected words. This function modifies values
 * inside `words` array
 */
function insertCommas(words) {
    if (words.length < 2) {
        return words;
    }
    words = words.slice();
    const len = words.length;
    const hasComma = /,$/;
    let totalCommas = 0;
    if (len > 3 && len <= 6) {
        totalCommas = rand(0, 1);
    }
    else if (len > 6 && len <= 12) {
        totalCommas = rand(0, 2);
    }
    else {
        totalCommas = rand(1, 4);
    }
    for (let i = 0, pos; i < totalCommas; i++) {
        pos = rand(0, len - 2);
        if (!hasComma.test(words[pos])) {
            words[pos] += ',';
        }
    }
    return words;
}
/**
 * Generate a paragraph of "Lorem ipsum" text
 * @param dict Words dictionary
 * @param wordCount Words count in paragraph
 * @param startWithCommon Should paragraph start with common "lorem ipsum" sentence.
 */
function paragraph(dict, wordCount, startWithCommon) {
    const result = [];
    let totalWords = 0;
    let words;
    if (startWithCommon && dict.common) {
        words = dict.common.slice(0, wordCount);
        totalWords += words.length;
        result.push(sentence(insertCommas(words), '.'));
    }
    while (totalWords < wordCount) {
        words = sample(dict.words, Math.min(rand(2, 30), wordCount - totalWords));
        totalWords += words.length;
        result.push(sentence(insertCommas(words)));
    }
    return result.join(' ');
}
function findRepeater(ancestors) {
    for (let i = ancestors.length - 1; i >= 0; i--) {
        const element = ancestors[i];
        if (element.type === 'AbbreviationNode' && element.repeat) {
            return element.repeat;
        }
    }
}

/**
 * XSL transformer: removes `select` attributes from certain nodes that contain
 * children
 */
function xsl(node) {
    if (matchesName(node.name) && node.attributes && (node.children.length || node.value)) {
        node.attributes = node.attributes.filter(isAllowed);
    }
}
function isAllowed(attr) {
    return attr.name !== 'select';
}
function matchesName(name) {
    return name === 'xsl:variable' || name === 'xsl:with-param';
}

const reElement = /^(-+)([a-z0-9]+[a-z0-9-]*)/i;
const reModifier = /^(_+)([a-z0-9]+[a-z0-9-_]*)/i;
const blockCandidates1 = (className) => /^[a-z]\-/i.test(className);
const blockCandidates2 = (className) => /^[a-z]/i.test(className);
function bem(node, ancestors, config) {
    expandClassNames(node);
    expandShortNotation(node, ancestors, config);
}
/**
 * Expands existing class names in BEM notation in given `node`.
 * For example, if node contains `b__el_mod` class name, this method ensures
 * that element contains `b__el` class as well
 */
function expandClassNames(node) {
    const data = getBEMData(node);
    const classNames = [];
    for (const cl of data.classNames) {
        // remove all modifiers and element prefixes from class name to get a base element name
        const ix = cl.indexOf('_');
        if (ix > 0 && !cl.startsWith('-')) {
            classNames.push(cl.slice(0, ix));
            classNames.push(cl.slice(ix));
        }
        else {
            classNames.push(cl);
        }
    }
    if (classNames.length) {
        data.classNames = classNames.filter(uniqueClass);
        data.block = findBlockName(data.classNames);
        updateClass(node, data.classNames.join(' '));
    }
}
/**
 * Expands short BEM notation, e.g. `-element` and `_modifier`
 */
function expandShortNotation(node, ancestors, config) {
    const data = getBEMData(node);
    const classNames = [];
    const { options } = config;
    const path = ancestors.slice(1).concat(node);
    for (let cl of data.classNames) {
        let prefix = '';
        let m;
        const originalClass = cl;
        // parse element definition (could be only one)
        if (m = cl.match(reElement)) {
            prefix = getBlockName(path, m[1].length, config.context) + options['bem.element'] + m[2];
            classNames.push(prefix);
            cl = cl.slice(m[0].length);
        }
        // parse modifiers definitions
        if (m = cl.match(reModifier)) {
            if (!prefix) {
                prefix = getBlockName(path, m[1].length);
                classNames.push(prefix);
            }
            classNames.push(`${prefix}${options['bem.modifier']}${m[2]}`);
            cl = cl.slice(m[0].length);
        }
        if (cl === originalClass) {
            // class name wasn’t modified: it’s not a BEM-specific class,
            // add it as-is into output
            classNames.push(originalClass);
        }
    }
    const arrClassNames = classNames.filter(uniqueClass);
    if (arrClassNames.length) {
        updateClass(node, arrClassNames.join(' '));
    }
}
/**
 * Returns BEM data from given abbreviation node
 */
function getBEMData(node) {
    if (!node._bem) {
        let classValue = '';
        if (node.attributes) {
            for (const attr of node.attributes) {
                if (attr.name === 'class' && attr.value) {
                    classValue = stringifyValue(attr.value);
                    break;
                }
            }
        }
        node._bem = parseBEM(classValue);
    }
    return node._bem;
}
function getBEMDataFromContext(context) {
    if (!context._bem) {
        context._bem = parseBEM(context.attributes && context.attributes.class || '');
    }
    return context._bem;
}
/**
 * Parses BEM data from given class name
 */
function parseBEM(classValue) {
    const classNames = classValue ? classValue.split(/\s+/) : [];
    return {
        classNames,
        block: findBlockName(classNames)
    };
}
/**
 * Returns block name for given `node` by `prefix`, which tells the depth of
 * of parent node lookup
 */
function getBlockName(ancestors, depth = 0, context) {
    const maxParentIx = 0;
    let parentIx = Math.max(ancestors.length - depth, maxParentIx);
    do {
        const parent = ancestors[parentIx];
        if (parent) {
            const data = getBEMData(parent);
            if (data.block) {
                return data.block;
            }
        }
    } while (maxParentIx < parentIx--);
    if (context) {
        const data = getBEMDataFromContext(context);
        if (data.block) {
            return data.block;
        }
    }
    return '';
}
function findBlockName(classNames) {
    return find(classNames, blockCandidates1)
        || find(classNames, blockCandidates2)
        || void 0;
}
/**
 * Finds class name from given list which may be used as block name
 */
function find(classNames, filter) {
    for (const cl of classNames) {
        if (reElement.test(cl) || reModifier.test(cl)) {
            break;
        }
        if (filter(cl)) {
            return cl;
        }
    }
}
function updateClass(node, value) {
    for (const attr of node.attributes) {
        if (attr.name === 'class') {
            attr.value = [value];
            break;
        }
    }
}
function stringifyValue(value) {
    let result = '';
    for (const t of value) {
        result += typeof t === 'string' ? t : t.name;
    }
    return result;
}
function uniqueClass(item, ix, arr) {
    return !!item && arr.indexOf(item) === ix;
}

function walk$2(abbr, visitor, state) {
    const callback = (ctx, index, items) => {
        const { parent, current } = state;
        state.parent = current;
        state.current = ctx;
        visitor(ctx, index, items, state, next);
        state.current = current;
        state.parent = parent;
    };
    const next = (node, index, items) => {
        state.ancestors.push(state.current);
        callback(node, index, items);
        state.ancestors.pop();
    };
    abbr.children.forEach(callback);
}
function createWalkState(config) {
    return {
        // @ts-ignore: Will set value in iterator
        current: null,
        parent: void 0,
        ancestors: [],
        config,
        field: 1,
        out: createOutputStream(config.options)
    };
}

const caret = [{ type: 'Field', index: 0, name: '' }];
/**
 * Check if given node is a snippet: a node without name and attributes
 */
function isSnippet(node) {
    return node ? !node.name && !node.attributes : false;
}
/**
 * Check if given node is inline-level element, e.g. element with explicitly
 * defined node name
 */
function isInlineElement(node, config) {
    return node ? isInline(node, config) : false;
}
/**
 * Check if given value token is a field
 */
function isField(token) {
    return typeof token === 'object' && token.type === 'Field';
}
function pushTokens(tokens, state) {
    const { out } = state;
    let largestIndex = -1;
    for (const t of tokens) {
        if (typeof t === 'string') {
            pushString(out, t);
        }
        else {
            pushField(out, state.field + t.index, t.name);
            if (t.index > largestIndex) {
                largestIndex = t.index;
            }
        }
    }
    if (largestIndex !== -1) {
        state.field += largestIndex + 1;
    }
}
/**
 * Splits given value token by lines: returns array where each entry is a token list
 * for a single line
 */
function splitByLines(tokens) {
    const result = [];
    let line = [];
    for (const t of tokens) {
        if (typeof t === 'string') {
            const lines = t.split(/\r\n?|\n/g);
            line.push(lines.shift() || '');
            while (lines.length) {
                result.push(line);
                line = [lines.shift() || ''];
            }
        }
        else {
            line.push(t);
        }
    }
    line.length && result.push(line);
    return result;
}
/**
 * Check if given attribute should be outputted
 */
function shouldOutputAttribute(attr) {
    // In case if attribute is implied, check if it has a defined value:
    // either non-empty value or quoted empty value
    return !attr.implied || attr.valueType !== 'raw' || (!!attr.value && attr.value.length > 0);
}

var TemplateChars;
(function (TemplateChars) {
    /** `[` character */
    TemplateChars[TemplateChars["Start"] = 91] = "Start";
    /** `]` character */
    TemplateChars[TemplateChars["End"] = 93] = "End";
    /* `_` character */
    TemplateChars[TemplateChars["Underscore"] = 95] = "Underscore";
    /* `-` character */
    TemplateChars[TemplateChars["Dash"] = 45] = "Dash";
})(TemplateChars || (TemplateChars = {}));
/**
 * Splits given string into template tokens.
 * Template is a string which contains placeholders which are uppercase names
 * between `[` and `]`, for example: `[PLACEHOLDER]`.
 * Unlike other templates, a placeholder may contain extra characters before and
 * after name: `[%PLACEHOLDER.]`. If data for `PLACEHOLDER` is defined, it will
 * be outputted with with these extra character, otherwise will be completely omitted.
 */
function template(text) {
    const tokens = [];
    const scanner = { pos: 0, text };
    let placeholder;
    let offset = scanner.pos;
    let pos = scanner.pos;
    while (scanner.pos < scanner.text.length) {
        pos = scanner.pos;
        if (placeholder = consumePlaceholder(scanner)) {
            if (offset !== scanner.pos) {
                tokens.push(text.slice(offset, pos));
            }
            tokens.push(placeholder);
            offset = scanner.pos;
        }
        else {
            scanner.pos++;
        }
    }
    if (offset !== scanner.pos) {
        tokens.push(text.slice(offset));
    }
    return tokens;
}
/**
 * Consumes placeholder like `[#ID]` from given scanner
 */
function consumePlaceholder(scanner) {
    if (peek$1(scanner) === TemplateChars.Start) {
        const start = ++scanner.pos;
        let namePos = start;
        let afterPos = start;
        let stack = 1;
        while (scanner.pos < scanner.text.length) {
            const code = peek$1(scanner);
            if (isTokenStart(code)) {
                namePos = scanner.pos;
                while (isToken(peek$1(scanner))) {
                    scanner.pos++;
                }
                afterPos = scanner.pos;
            }
            else {
                if (code === TemplateChars.Start) {
                    stack++;
                }
                else if (code === TemplateChars.End) {
                    if (--stack === 0) {
                        return {
                            before: scanner.text.slice(start, namePos),
                            after: scanner.text.slice(afterPos, scanner.pos++),
                            name: scanner.text.slice(namePos, afterPos)
                        };
                    }
                }
                scanner.pos++;
            }
        }
    }
}
function peek$1(scanner, pos = scanner.pos) {
    return scanner.text.charCodeAt(pos);
}
function isTokenStart(code) {
    return code >= 65 && code <= 90; // A-Z
}
function isToken(code) {
    return isTokenStart(code)
        || (code > 47 && code < 58) /* 0-9 */
        || code === TemplateChars.Underscore
        || code === TemplateChars.Dash;
}

function createCommentState(config) {
    const { options } = config;
    return {
        enabled: options['comment.enabled'],
        trigger: options['comment.trigger'],
        before: options['comment.before'] ? template(options['comment.before']) : void 0,
        after: options['comment.after'] ? template(options['comment.after']) : void 0
    };
}
/**
 * Adds comment prefix for given node, if required
 */
function commentNodeBefore(node, state) {
    if (shouldComment(node, state) && state.comment.before) {
        output(node, state.comment.before, state);
    }
}
/**
 * Adds comment suffix for given node, if required
 */
function commentNodeAfter(node, state) {
    if (shouldComment(node, state) && state.comment.after) {
        output(node, state.comment.after, state);
    }
}
/**
 * Check if given node should be commented
 */
function shouldComment(node, state) {
    const { comment } = state;
    if (!comment.enabled || !comment.trigger || !node.name || !node.attributes) {
        return false;
    }
    for (const attr of node.attributes) {
        if (attr.name && comment.trigger.includes(attr.name)) {
            return true;
        }
    }
    return false;
}
/**
 * Pushes given template tokens into output stream
 */
function output(node, tokens, state) {
    const attrs = {};
    const { out } = state;
    // Collect attributes payload
    for (const attr of node.attributes) {
        if (attr.name && attr.value) {
            attrs[attr.name.toUpperCase()] = attr.value;
        }
    }
    // Output parsed tokens
    for (const token of tokens) {
        if (typeof token === 'string') {
            pushString(out, token);
        }
        else if (attrs[token.name]) {
            pushString(out, token.before);
            pushTokens(attrs[token.name], state);
            pushString(out, token.after);
        }
    }
}

const htmlTagRegex = /^<([\w\-:]+)[\s>]/;
const reservedKeywords = new Set([
    'for', 'while', 'of', 'async', 'await', 'const', 'let', 'var', 'continue',
    'break', 'debugger', 'do', 'export', 'import', 'in', 'instanceof', 'new', 'return',
    'switch', 'this', 'throw', 'try', 'catch', 'typeof', 'void', 'with', 'yield'
]);
function html(abbr, config) {
    const state = createWalkState(config);
    state.comment = createCommentState(config);
    walk$2(abbr, element$1, state);
    return state.out.value;
}
/**
 * Outputs `node` content to output stream of `state`
 * @param node Context node
 * @param index Index of `node` in `items`
 * @param items List of `node`’s siblings
 * @param state Current walk state
 */
function element$1(node, index, items, state, next) {
    const { out, config } = state;
    const format = shouldFormat$1(node, index, items, state);
    // Pick offset level for current node
    const level = getIndent(state);
    out.level += level;
    format && pushNewline(out, true);
    if (node.name) {
        const name = tagName(node.name, config);
        commentNodeBefore(node, state);
        pushString(out, `<${name}`);
        if (node.attributes) {
            for (const attr of node.attributes) {
                if (shouldOutputAttribute(attr)) {
                    pushAttribute(attr, state);
                }
            }
        }
        if (node.selfClosing && !node.children.length && !node.value) {
            pushString(out, `${selfClose(config)}>`);
        }
        else {
            pushString(out, '>');
            if (!pushSnippet(node, state, next)) {
                if (node.value) {
                    const innerFormat = node.value.some(hasNewline) || startsWithBlockTag(node.value, config);
                    innerFormat && pushNewline(state.out, ++out.level);
                    pushTokens(node.value, state);
                    innerFormat && pushNewline(state.out, --out.level);
                }
                node.children.forEach(next);
                if (!node.value && !node.children.length) {
                    const innerFormat = config.options['output.formatLeafNode']
                        || config.options['output.formatForce'].includes(node.name);
                    innerFormat && pushNewline(state.out, ++out.level);
                    pushTokens(caret, state);
                    innerFormat && pushNewline(state.out, --out.level);
                }
            }
            pushString(out, `</${name}>`);
            commentNodeAfter(node, state);
        }
    }
    else if (!pushSnippet(node, state, next) && node.value) {
        // A text-only node (snippet)
        pushTokens(node.value, state);
        node.children.forEach(next);
    }
    if (format && index === items.length - 1 && state.parent) {
        const offset = isSnippet(state.parent) ? 0 : 1;
        pushNewline(out, out.level - offset);
    }
    out.level -= level;
}
/**
 * Outputs given attribute’s content into output stream
 */
function pushAttribute(attr, state) {
    const { out, config } = state;
    if (attr.name) {
        const attributes = config.options['markup.attributes'];
        const valuePrefix = config.options['markup.valuePrefix'];
        let { name, value } = attr;
        let lQuote = attrQuote(attr, config, true);
        let rQuote = attrQuote(attr, config);
        if (attributes) {
            name = getMultiValue(name, attributes, attr.multiple) || name;
        }
        name = attrName(name, config);
        const prefix = valuePrefix
            ? getMultiValue(attr.name, valuePrefix, attr.multiple)
            : null;
        if (prefix && (value === null || value === void 0 ? void 0 : value.length) === 1 && typeof value[0] === 'string') {
            // Add given prefix in object notation
            const val = value[0];
            value = [isPropKey(val) ? `${prefix}.${val}` : `${prefix}['${val}']`];
            if (config.options['jsx.enabled']) {
                lQuote = expressionStart;
                rQuote = expressionEnd;
            }
        }
        if (isBooleanAttribute(attr, config) && !value) {
            // If attribute value is omitted and it’s a boolean value, check for
            // `compactBoolean` option: if it’s disabled, set value to attribute name
            // (XML style)
            if (!config.options['output.compactBoolean']) {
                value = [name];
            }
        }
        else if (!value) {
            value = caret;
        }
        pushString(out, ' ' + name);
        if (value) {
            pushString(out, '=' + lQuote);
            pushTokens(value, state);
            pushString(out, rQuote);
        }
        else if (config.options['output.selfClosingStyle'] !== 'html') {
            pushString(out, '=' + lQuote + rQuote);
        }
    }
}
function pushSnippet(node, state, next) {
    if (node.value && node.children.length) {
        // We have a value and child nodes. In case if value contains fields,
        // we should output children as a content of first field
        const fieldIx = node.value.findIndex(isField);
        if (fieldIx !== -1) {
            pushTokens(node.value.slice(0, fieldIx), state);
            const line = state.out.line;
            let pos = fieldIx + 1;
            node.children.forEach(next);
            // If there was a line change, trim leading whitespace for better result
            if (state.out.line !== line && typeof node.value[pos] === 'string') {
                pushString(state.out, node.value[pos++].trimLeft());
            }
            pushTokens(node.value.slice(pos), state);
            return true;
        }
    }
    return false;
}
/**
 * Check if given node should be formatted in its parent context
 */
function shouldFormat$1(node, index, items, state) {
    const { config, parent } = state;
    if (!config.options['output.format']) {
        return false;
    }
    if (index === 0 && !parent) {
        // Do not format very first node
        return false;
    }
    // Do not format single child of snippet
    if (parent && isSnippet(parent) && items.length === 1) {
        return false;
    }
    /**
     * Adjacent text-only/snippet nodes
     */
    if (isSnippet(node)) {
        // Adjacent text-only/snippet nodes
        const format = isSnippet(items[index - 1]) || isSnippet(items[index + 1])
            // Has newlines: looks like wrapping code fragment
            || node.value.some(hasNewline)
            // Format as wrapper: contains children which will be outputted as field content
            || (node.value.some(isField) && node.children.length);
        if (format) {
            return true;
        }
    }
    if (isInline(node, config)) {
        // Check if inline node is the next sibling of block-level node
        if (index === 0) {
            // First node in parent: format if it’s followed by a block-level element
            for (let i = 0; i < items.length; i++) {
                if (!isInline(items[i], config)) {
                    return true;
                }
            }
        }
        else if (!isInline(items[index - 1], config)) {
            // Node is right after block-level element
            return true;
        }
        if (config.options['output.inlineBreak']) {
            // check for adjacent inline elements before and after current element
            let adjacentInline = 1;
            let before = index;
            let after = index;
            while (isInlineElement(items[--before], config)) {
                adjacentInline++;
            }
            while (isInlineElement(items[++after], config)) {
                adjacentInline++;
            }
            if (adjacentInline >= config.options['output.inlineBreak']) {
                return true;
            }
        }
        // Edge case: inline node contains node that should receive formatting
        for (let i = 0, il = node.children.length; i < il; i++) {
            if (shouldFormat$1(node.children[i], i, node.children, state)) {
                return true;
            }
        }
        return false;
    }
    return true;
}
/**
 * Returns indentation offset for given node
 */
function getIndent(state) {
    const { config, parent } = state;
    if (!parent || isSnippet(parent) || (parent.name && config.options['output.formatSkip'].includes(parent.name))) {
        return 0;
    }
    return 1;
}
/**
 * Check if given node value contains newlines
 */
function hasNewline(value) {
    return typeof value === 'string' && /\r|\n/.test(value);
}
/**
 * Check if given node value starts with block-level tag
 */
function startsWithBlockTag(value, config) {
    if (value.length && typeof value[0] === 'string') {
        const matches = htmlTagRegex.exec(value[0]);
        if ((matches === null || matches === void 0 ? void 0 : matches.length) && !config.options['inlineElements'].includes(matches[1].toLowerCase())) {
            return true;
        }
    }
    return false;
}
function getMultiValue(key, data, multiple) {
    return (multiple && data[`${key}*`]) || data[key];
}
function isPropKey(name) {
    return !reservedKeywords.has(name) && /^[a-zA-Z_$][\w_$]*$/.test(name);
}

function indentFormat(abbr, config, options) {
    const state = createWalkState(config);
    state.options = options || {};
    walk$2(abbr, element, state);
    return state.out.value;
}
/**
 * Outputs `node` content to output stream of `state`
 * @param node Context node
 * @param index Index of `node` in `items`
 * @param items List of `node`’s siblings
 * @param state Current walk state
 */
function element(node, index, items, state, next) {
    const { out, options } = state;
    const { primary, secondary } = collectAttributes(node);
    // Pick offset level for current node
    const level = state.parent ? 1 : 0;
    out.level += level;
    // Do not indent top-level elements
    if (shouldFormat(node, index, items, state)) {
        pushNewline(out, true);
    }
    if (node.name && (node.name !== 'div' || !primary.length)) {
        pushString(out, (options.beforeName || '') + node.name + (options.afterName || ''));
    }
    pushPrimaryAttributes(primary, state);
    pushSecondaryAttributes(secondary.filter(shouldOutputAttribute), state);
    if (node.selfClosing && !node.value && !node.children.length) {
        if (state.options.selfClose) {
            pushString(out, state.options.selfClose);
        }
    }
    else {
        pushValue(node, state);
        node.children.forEach(next);
    }
    out.level -= level;
}
/**
 * From given node, collects all attributes as `primary` (id, class) and
 * `secondary` (all the rest) lists. In most indent-based syntaxes, primary attribute
 * has special syntax
 */
function collectAttributes(node) {
    const primary = [];
    const secondary = [];
    if (node.attributes) {
        for (const attr of node.attributes) {
            if (isPrimaryAttribute(attr)) {
                primary.push(attr);
            }
            else {
                secondary.push(attr);
            }
        }
    }
    return { primary, secondary };
}
/**
 * Outputs given attributes as primary into output stream
 */
function pushPrimaryAttributes(attrs, state) {
    for (const attr of attrs) {
        if (attr.value) {
            if (attr.name === 'class') {
                pushString(state.out, '.');
                // All whitespace characters must be replaced with dots in class names
                const tokens = attr.value.map(t => typeof t === 'string' ? t.replace(/\s+/g, '.') : t);
                pushTokens(tokens, state);
            }
            else {
                // ID attribute
                pushString(state.out, '#');
                pushTokens(attr.value, state);
            }
        }
    }
}
/**
 * Outputs given attributes as secondary into output stream
 */
function pushSecondaryAttributes(attrs, state) {
    if (attrs.length) {
        const { out, config, options } = state;
        options.beforeAttribute && pushString(out, options.beforeAttribute);
        for (let i = 0; i < attrs.length; i++) {
            const attr = attrs[i];
            pushString(out, attrName(attr.name || '', config));
            if (isBooleanAttribute(attr, config) && !attr.value) {
                if (!config.options['output.compactBoolean'] && options.booleanValue) {
                    pushString(out, '=' + options.booleanValue);
                }
            }
            else {
                pushString(out, '=' + attrQuote(attr, config, true));
                pushTokens(attr.value || caret, state);
                pushString(out, attrQuote(attr, config));
            }
            if (i !== attrs.length - 1 && options.glueAttribute) {
                pushString(out, options.glueAttribute);
            }
        }
        options.afterAttribute && pushString(out, options.afterAttribute);
    }
}
/**
 * Outputs given node value into state output stream
 */
function pushValue(node, state) {
    // We should either output value or add caret but for leaf nodes only (no children)
    if (!node.value && node.children.length) {
        return;
    }
    const value = node.value || caret;
    const lines = splitByLines(value);
    const { out, options } = state;
    if (lines.length === 1) {
        if (node.name || node.attributes) {
            push(out, ' ');
        }
        pushTokens(value, state);
    }
    else {
        // We should format multi-line value with terminating `|` character
        // and same line length
        const lineLengths = [];
        let maxLength = 0;
        // Calculate lengths of all lines and max line length
        for (const line of lines) {
            const len = valueLength(line);
            lineLengths.push(len);
            if (len > maxLength) {
                maxLength = len;
            }
        }
        // Output each line, padded to max length
        out.level++;
        for (let i = 0; i < lines.length; i++) {
            pushNewline(out, true);
            options.beforeTextLine && push(out, options.beforeTextLine);
            pushTokens(lines[i], state);
            if (options.afterTextLine) {
                push(out, ' '.repeat(maxLength - lineLengths[i]));
                push(out, options.afterTextLine);
            }
        }
        out.level--;
    }
}
function isPrimaryAttribute(attr) {
    return attr.name === 'class' || attr.name === 'id';
}
/**
 * Calculates string length from given tokens
 */
function valueLength(tokens) {
    let len = 0;
    for (const token of tokens) {
        len += typeof token === 'string' ? token.length : token.name.length;
    }
    return len;
}
function shouldFormat(node, index, items, state) {
    // Do not format first top-level element or snippets
    if (!state.parent && index === 0) {
        return false;
    }
    return !isSnippet(node);
}

function haml(abbr, config) {
    return indentFormat(abbr, config, {
        beforeName: '%',
        beforeAttribute: '(',
        afterAttribute: ')',
        glueAttribute: ' ',
        afterTextLine: ' |',
        booleanValue: 'true',
        selfClose: '/'
    });
}

function slim(abbr, config) {
    return indentFormat(abbr, config, {
        beforeAttribute: ' ',
        glueAttribute: ' ',
        beforeTextLine: '| ',
        selfClose: '/'
    });
}

function pug(abbr, config) {
    return indentFormat(abbr, config, {
        beforeAttribute: '(',
        afterAttribute: ')',
        glueAttribute: ', ',
        beforeTextLine: '| ',
        selfClose: config.options['output.selfClosingStyle'] === 'xml' ? '/' : ''
    });
}

const formatters = { html, haml, slim, pug };
/**
 * Parses given Emmet abbreviation into a final abbreviation tree with all
 * required transformations applied
 */
function parse$1(abbr, config) {
    let oldTextValue;
    if (typeof abbr === 'string') {
        const parseOpt = Object.assign({}, config);
        if (config.options['jsx.enabled']) {
            parseOpt.jsx = true;
        }
        if (config.options['markup.href']) {
            parseOpt.href = true;
        }
        abbr = parseAbbreviation$1(abbr, parseOpt);
        // remove text field before snippets(abbr, config) call
        // as abbreviation(abbr, parseOpt) already handled it
        oldTextValue = config.text;
        config.text = undefined;
    }
    // Run abbreviation resolve in two passes:
    // 1. Map each node to snippets, which are abbreviations as well. A single snippet
    // may produce multiple nodes
    // 2. Transform every resolved node
    abbr = resolveSnippets(abbr, config);
    walk$1$1(abbr, transform$1, config);
    config.text = oldTextValue !== null && oldTextValue !== void 0 ? oldTextValue : config.text;
    return abbr;
}
/**
 * Converts given abbreviation to string according to provided `config`
 */
function stringify(abbr, config) {
    const formatter = formatters[config.syntax] || html;
    return formatter(abbr, config);
}
/**
 * Modifies given node and prepares it for output
 */
function transform$1(node, ancestors, config) {
    implicitTag(node, ancestors, config);
    mergeAttributes(node, config);
    lorem(node, ancestors, config);
    if (config.syntax === 'xsl') {
        xsl(node);
    }
    if (config.options['bem.enabled']) {
        bem(node, ancestors, config);
    }
}

var CSSSnippetType;
(function (CSSSnippetType) {
    CSSSnippetType["Raw"] = "Raw";
    CSSSnippetType["Property"] = "Property";
})(CSSSnippetType || (CSSSnippetType = {}));
const reProperty = /^([a-z-]+)(?:\s*:\s*([^\n\r;]+?);*)?$/;
const opt = { value: true };
/**
 * Creates structure for holding resolved CSS snippet
 */
function createSnippet(key, value) {
    // A snippet could be a raw text snippet (e.g. arbitrary text string) or a
    // CSS property with possible values separated by `|`.
    // In latter case, we have to parse snippet as CSS abbreviation
    const m = value.match(reProperty);
    if (m) {
        const keywords = {};
        const parsed = m[2] ? m[2].split('|').map(parseValue) : [];
        for (const item of parsed) {
            for (const cssVal of item) {
                collectKeywords(cssVal, keywords);
            }
        }
        return {
            type: CSSSnippetType.Property,
            key,
            property: m[1],
            value: parsed,
            keywords,
            dependencies: []
        };
    }
    return { type: CSSSnippetType.Raw, key, value };
}
/**
 * Nests more specific CSS properties into shorthand ones, e.g.
 * `background-position-x` -> `background-position` -> `background`
 */
function nest(snippets) {
    snippets = snippets.slice().sort(snippetsSort);
    const stack = [];
    let prev;
    // For sorted list of CSS properties, create dependency graph where each
    // shorthand property contains its more specific one, e.g.
    // background -> background-position -> background-position-x
    for (const cur of snippets.filter(isProperty)) {
        // Check if current property belongs to one from parent stack.
        // Since `snippets` array is sorted, items are perfectly aligned
        // from shorthands to more specific variants
        while (stack.length) {
            prev = stack[stack.length - 1];
            if (cur.property.startsWith(prev.property)
                && cur.property.charCodeAt(prev.property.length) === 45 /* - */) {
                prev.dependencies.push(cur);
                stack.push(cur);
                break;
            }
            stack.pop();
        }
        if (!stack.length) {
            stack.push(cur);
        }
    }
    return snippets;
}
/**
 * A sorting function for array of snippets
 */
function snippetsSort(a, b) {
    if (a.key === b.key) {
        return 0;
    }
    return a.key < b.key ? -1 : 1;
}
function parseValue(value) {
    return parse$2(value.trim(), opt)[0].value;
}
function isProperty(snippet) {
    return snippet.type === CSSSnippetType.Property;
}
function collectKeywords(cssVal, dest) {
    for (const v of cssVal.value) {
        if (v.type === 'Literal') {
            dest[v.value] = v;
        }
        else if (v.type === 'FunctionCall') {
            dest[v.name] = v;
        }
        else if (v.type === 'Field') {
            // Create literal from field, if available
            const value = v.name.trim();
            if (value) {
                dest[value] = { type: 'Literal', value };
            }
        }
    }
}

/**
 * Calculates how close `str1` matches `str2` using fuzzy match.
 * How matching works:
 * – first characters of both `str1` and `str2` *must* match
 * – `str1` length larger than `str2` length is allowed only when `unmatched` is true
 * – ideal match is when `str1` equals to `str2` (score: 1)
 * – next best match is `str2` starts with `str1` (score: 1 × percent of matched characters)
 * – other scores depend on how close characters of `str1` to the beginning of `str2`
 * @param partialMatch Allow length `str1` to be greater than `str2` length
 */
function scoreMatch(str1, str2, partialMatch = false) {
    str1 = str1.toLowerCase();
    str2 = str2.toLowerCase();
    if (str1 === str2) {
        return 1;
    }
    // Both strings MUST start with the same character
    if (!str1 || !str2 || str1.charCodeAt(0) !== str2.charCodeAt(0)) {
        return 0;
    }
    const str1Len = str1.length;
    const str2Len = str2.length;
    if (!partialMatch && str1Len > str2Len) {
        return 0;
    }
    // Characters from `str1` which are closer to the beginning of a `str2` should
    // have higher score.
    // For example, if `str2` is `abcde`, it’s max score is:
    // 5 + 4 + 3 + 2 + 1 = 15 (sum of character positions in reverse order)
    // Matching `abd` against `abcde` should produce:
    // 5 + 4 + 2 = 11
    // Acronym bonus for match right after `-`. Matching `abd` against `abc-de`
    // should produce:
    // 6 + 5 + 4 (use `d` position in `abd`, not in abc-de`)
    const minLength = Math.min(str1Len, str2Len);
    const maxLength = Math.max(str1Len, str2Len);
    let i = 1;
    let j = 1;
    let score = maxLength;
    let ch1 = 0;
    let ch2 = 0;
    let found = false;
    let acronym = false;
    while (i < str1Len) {
        ch1 = str1.charCodeAt(i);
        found = false;
        acronym = false;
        while (j < str2Len) {
            ch2 = str2.charCodeAt(j);
            if (ch1 === ch2) {
                found = true;
                score += maxLength - (acronym ? i : j);
                break;
            }
            // add acronym bonus for exactly next match after unmatched `-`
            acronym = ch2 === 45 /* - */;
            j++;
        }
        if (!found) {
            if (!partialMatch) {
                return 0;
            }
            break;
        }
        i++;
    }
    const matchRatio = i / maxLength;
    const delta = maxLength - minLength;
    const maxScore = sum(maxLength) - sum(delta);
    return (score * matchRatio) / maxScore;
}
/**
 * Calculates sum of first `n` numbers, e.g. 1+2+3+...n
 */
function sum(n) {
    return n * (n + 1) / 2;
}

function color(token, shortHex) {
    if (!token.r && !token.g && !token.b && !token.a) {
        return 'transparent';
    }
    else if (token.a === 1) {
        return asHex(token, shortHex);
    }
    return asRGB(token);
}
/**
 * Output given color as hex value
 * @param short Produce short value (e.g. #fff instead of #ffffff), if possible
 */
function asHex(token, short) {
    const fn = (short && isShortHex(token.r) && isShortHex(token.g) && isShortHex(token.b))
        ? toShortHex : toHex;
    return '#' + fn(token.r) + fn(token.g) + fn(token.b);
}
/**
 * Output current color as `rgba?(...)` CSS color
 */
function asRGB(token) {
    const values = [token.r, token.g, token.b];
    if (token.a !== 1) {
        values.push(frac(token.a, 8));
    }
    return `${values.length === 3 ? 'rgb' : 'rgba'}(${values.join(', ')})`;
}
function frac(num, digits = 4) {
    return num.toFixed(digits).replace(/\.?0+$/, '');
}
function isShortHex(hex) {
    return !(hex % 17);
}
function toShortHex(num) {
    return (num >> 4).toString(16);
}
function toHex(num) {
    return pad(num.toString(16), 2);
}
function pad(value, len) {
    while (value.length < len) {
        value = '0' + value;
    }
    return value;
}

const CSSAbbreviationScope = {
    /** Include all possible snippets in match */
    Global: '@@global',
    /** Include raw snippets only (e.g. no properties) in abbreviation match */
    Section: '@@section',
    /** Include properties only in abbreviation match */
    Property: '@@property',
    /** Resolve abbreviation in context of CSS property value */
    Value: '@@value',
};
function css(abbr, config) {
    var _a;
    const out = createOutputStream(config.options);
    const format = config.options['output.format'];
    if (((_a = config.context) === null || _a === void 0 ? void 0 : _a.name) === CSSAbbreviationScope.Section) {
        // For section context, filter out unmatched snippets
        abbr = abbr.filter(node => node.snippet);
    }
    for (let i = 0; i < abbr.length; i++) {
        if (format && i !== 0) {
            pushNewline(out, true);
        }
        property(abbr[i], out, config);
    }
    return out.value;
}
/**
 * Outputs given abbreviation node into output stream
 */
function property(node, out, config) {
    const isJSON = config.options['stylesheet.json'];
    if (node.name) {
        // It’s a CSS property
        const name = isJSON ? toCamelCase(node.name) : node.name;
        pushString(out, name + config.options['stylesheet.between']);
        if (node.value.length) {
            propertyValue(node, out, config);
        }
        else {
            pushField(out, 0, '');
        }
        if (isJSON) {
            // For CSS-in-JS, always finalize property with comma
            // NB: seems like `important` is not available in CSS-in-JS syntaxes
            push(out, ',');
        }
        else {
            outputImportant(node, out, true);
            push(out, config.options['stylesheet.after']);
        }
    }
    else {
        // It’s a regular snippet, output plain tokens without any additional formatting
        for (const cssVal of node.value) {
            for (const v of cssVal.value) {
                outputToken(v, out, config);
            }
        }
        outputImportant(node, out, node.value.length > 0);
    }
}
function propertyValue(node, out, config) {
    const isJSON = config.options['stylesheet.json'];
    const num = isJSON ? getSingleNumeric(node) : null;
    if (num && (!num.unit || num.unit === 'px')) {
        // For CSS-in-JS, if property contains single numeric value, output it
        // as JS number
        push(out, String(num.value));
    }
    else {
        const quote = getQuote(config);
        isJSON && push(out, quote);
        for (let i = 0; i < node.value.length; i++) {
            if (i !== 0) {
                push(out, ', ');
            }
            outputValue(node.value[i], out, config);
        }
        isJSON && push(out, quote);
    }
}
function outputImportant(node, out, separator) {
    if (node.important) {
        if (separator) {
            push(out, ' ');
        }
        push(out, '!important');
    }
}
function outputValue(value, out, config) {
    for (let i = 0, prevEnd = -1; i < value.value.length; i++) {
        const token = value.value[i];
        // Handle edge case: a field is written close to previous token like this: `foo${bar}`.
        // We should not add delimiter here
        if (i !== 0 && (token.type !== 'Field' || token.start !== prevEnd)) {
            push(out, ' ');
        }
        outputToken(token, out, config);
        prevEnd = token['end'];
    }
}
function outputToken(token, out, config) {
    if (token.type === 'ColorValue') {
        push(out, color(token, config.options['stylesheet.shortHex']));
    }
    else if (token.type === 'Literal' || token.type === 'CustomProperty') {
        pushString(out, token.value);
    }
    else if (token.type === 'NumberValue') {
        pushString(out, frac(token.value, 4) + token.unit);
    }
    else if (token.type === 'StringValue') {
        const quote = token.quote === 'double' ? '"' : '\'';
        pushString(out, quote + token.value + quote);
    }
    else if (token.type === 'Field') {
        pushField(out, token.index, token.name);
    }
    else if (token.type === 'FunctionCall') {
        push(out, token.name + '(');
        for (let i = 0; i < token.arguments.length; i++) {
            if (i) {
                push(out, ', ');
            }
            outputValue(token.arguments[i], out, config);
        }
        push(out, ')');
    }
}
/**
 * If value of given property is a single numeric value, returns this token
 */
function getSingleNumeric(node) {
    if (node.value.length === 1) {
        const cssVal = node.value[0];
        if (cssVal.value.length === 1 && cssVal.value[0].type === 'NumberValue') {
            return cssVal.value[0];
        }
    }
}
/**
 * Converts kebab-case string to camelCase
 */
function toCamelCase(str) {
    return str.replace(/\-(\w)/g, (_, letter) => letter.toUpperCase());
}
function getQuote(config) {
    return config.options['stylesheet.jsonDoubleQuotes'] ? '"' : '\'';
}

const gradientName = 'lg';
/**
 * Parses given Emmet abbreviation into a final abbreviation tree with all
 * required transformations applied
 */
function parse(abbr, config) {
    var _a;
    const snippets = ((_a = config.cache) === null || _a === void 0 ? void 0 : _a.stylesheetSnippets) || convertSnippets(config.snippets);
    if (config.cache) {
        config.cache.stylesheetSnippets = snippets;
    }
    if (typeof abbr === 'string') {
        abbr = parse$2(abbr, { value: isValueScope(config) });
    }
    const filteredSnippets = getSnippetsForScope(snippets, config);
    for (const node of abbr) {
        resolveNode(node, filteredSnippets, config);
    }
    return abbr;
}
/**
 * Converts given raw snippets into internal snippets representation
 */
function convertSnippets(snippets) {
    const result = [];
    for (const key of Object.keys(snippets)) {
        result.push(createSnippet(key, snippets[key]));
    }
    return nest(result);
}
/**
 * Resolves given node: finds matched CSS snippets using fuzzy match and resolves
 * keyword aliases from node value
 */
function resolveNode(node, snippets, config) {
    if (!resolveGradient(node, config)) {
        const score = config.options['stylesheet.fuzzySearchMinScore'];
        if (isValueScope(config)) {
            // Resolve as value of given CSS property
            const propName = config.context.name;
            const snippet = snippets.find(s => s.type === CSSSnippetType.Property && s.property === propName);
            resolveValueKeywords(node, config, snippet, score);
            node.snippet = snippet;
        }
        else if (node.name) {
            const snippet = findBestMatch(node.name, snippets, score, true);
            node.snippet = snippet;
            if (snippet) {
                if (snippet.type === CSSSnippetType.Property) {
                    resolveAsProperty(node, snippet, config);
                }
                else {
                    resolveAsSnippet(node, snippet);
                }
            }
        }
    }
    if (node.name || config.context) {
        // Resolve numeric values for CSS properties only
        resolveNumericValue(node, config);
    }
    return node;
}
/**
 * Resolves CSS gradient shortcut from given property, if possible
 */
function resolveGradient(node, config) {
    let gradientFn = null;
    const cssVal = node.value.length === 1 ? node.value[0] : null;
    if (cssVal && cssVal.value.length === 1) {
        const v = cssVal.value[0];
        if (v.type === 'FunctionCall' && v.name === gradientName) {
            gradientFn = v;
        }
    }
    if (gradientFn || node.name === gradientName) {
        if (!gradientFn) {
            gradientFn = {
                type: 'FunctionCall',
                name: 'linear-gradient',
                arguments: [cssValue(field(0, ''))]
            };
        }
        else {
            gradientFn = Object.assign(Object.assign({}, gradientFn), { name: 'linear-gradient' });
        }
        if (!config.context) {
            node.name = 'background-image';
        }
        node.value = [cssValue(gradientFn)];
        return true;
    }
    return false;
}
/**
 * Resolves given parsed abbreviation node as CSS property
 */
function resolveAsProperty(node, snippet, config) {
    const abbr = node.name;
    // Check for unmatched part of abbreviation
    // For example, in `dib` abbreviation the matched part is `d` and `ib` should
    // be considered as inline value. If unmatched fragment exists, we should check
    // if it matches actual value of snippet. If either explicit value is specified
    // or unmatched fragment did not resolve to to a keyword, we should consider
    // matched snippet as invalid
    const inlineValue = getUnmatchedPart(abbr, snippet.key);
    if (inlineValue) {
        if (node.value.length) {
            // Already have value: unmatched part indicates matched snippet is invalid
            return node;
        }
        const kw = resolveKeyword(inlineValue, config, snippet);
        if (!kw) {
            return node;
        }
        node.value.push(cssValue(kw));
    }
    node.name = snippet.property;
    if (node.value.length) {
        // Replace keyword alias from current abbreviation node with matched keyword
        resolveValueKeywords(node, config, snippet);
    }
    else if (snippet.value.length) {
        const defaultValue = snippet.value[0];
        // https://github.com/emmetio/emmet/issues/558
        // We should auto-select inserted value only if there’s multiple value
        // choice
        node.value = snippet.value.length === 1 || defaultValue.some(hasField)
            ? defaultValue
            : defaultValue.map(n => wrapWithField(n, config));
    }
    return node;
}
function resolveValueKeywords(node, config, snippet, minScore) {
    for (const cssVal of node.value) {
        const value = [];
        for (const token of cssVal.value) {
            if (token.type === 'Literal') {
                value.push(resolveKeyword(token.value, config, snippet, minScore) || token);
            }
            else if (token.type === 'FunctionCall') {
                // For function calls, we should find matching function call
                // and merge arguments
                const match = resolveKeyword(token.name, config, snippet, minScore);
                if (match && match.type === 'FunctionCall') {
                    value.push(Object.assign(Object.assign({}, match), { arguments: token.arguments.concat(match.arguments.slice(token.arguments.length)) }));
                }
                else {
                    value.push(token);
                }
            }
            else {
                value.push(token);
            }
        }
        cssVal.value = value;
    }
}
/**
 * Resolves given parsed abbreviation node as a snippet: a plain code chunk
 */
function resolveAsSnippet(node, snippet) {
    // When resolving snippets, we have to do the following:
    // 1. Replace field placeholders with actual field tokens.
    // 2. If input values given, put them instead of fields
    let offset = 0;
    let m;
    const reField = /\$\{(\d+)(:[^}]+)?\}/g;
    const inputValue = node.value[0];
    const outputValue = [];
    while (m = reField.exec(snippet.value)) {
        if (offset !== m.index) {
            outputValue.push(literal(snippet.value.slice(offset, m.index)));
        }
        offset = m.index + m[0].length;
        if (inputValue && inputValue.value.length) {
            outputValue.push(inputValue.value.shift());
        }
        else {
            outputValue.push(field(Number(m[1]), m[2] ? m[2].slice(1) : ''));
        }
    }
    const tail = snippet.value.slice(offset);
    if (tail) {
        outputValue.push(literal(tail));
    }
    node.name = void 0;
    node.value = [cssValue(...outputValue)];
    return node;
}
/**
 * Finds best matching item from `items` array
 * @param abbr  Abbreviation to match
 * @param items List of items for match
 * @param minScore The minimum score the best matched item should have to be a valid match.
 */
function findBestMatch(abbr, items, minScore = 0, partialMatch = false) {
    let matchedItem = null;
    let maxScore = 0;
    for (const item of items) {
        const score = scoreMatch(abbr, getScoringPart(item), partialMatch);
        if (score === 1) {
            // direct hit, no need to look further
            return item;
        }
        if (score && score >= maxScore) {
            maxScore = score;
            matchedItem = item;
        }
    }
    return maxScore >= minScore ? matchedItem : null;
}
function getScoringPart(item) {
    return typeof item === 'string' ? item : item.key;
}
/**
 * Returns a part of `abbr` that wasn’t directly matched against `str`.
 * For example, if abbreviation `poas` is matched against `position`,
 * the unmatched part will be `as` since `a` wasn’t found in string stream
 */
function getUnmatchedPart(abbr, str) {
    for (let i = 0, lastPos = 0; i < abbr.length; i++) {
        lastPos = str.indexOf(abbr[i], lastPos);
        if (lastPos === -1) {
            return abbr.slice(i);
        }
        lastPos++;
    }
    return '';
}
/**
 * Resolves given keyword shorthand into matched snippet keyword or global keyword,
 * if possible
 */
function resolveKeyword(kw, config, snippet, minScore) {
    let ref;
    if (snippet) {
        if (ref = findBestMatch(kw, Object.keys(snippet.keywords), minScore)) {
            return snippet.keywords[ref];
        }
        for (const dep of snippet.dependencies) {
            if (ref = findBestMatch(kw, Object.keys(dep.keywords), minScore)) {
                return dep.keywords[ref];
            }
        }
    }
    if (ref = findBestMatch(kw, config.options['stylesheet.keywords'], minScore)) {
        return literal(ref);
    }
    return null;
}
/**
 * Resolves numeric values in given abbreviation node
 */
function resolveNumericValue(node, config) {
    const aliases = config.options['stylesheet.unitAliases'];
    const unitless = config.options['stylesheet.unitless'];
    for (const v of node.value) {
        for (const t of v.value) {
            if (t.type === 'NumberValue') {
                if (t.unit) {
                    t.unit = aliases[t.unit] || t.unit;
                }
                else if (t.value !== 0 && !unitless.includes(node.name)) {
                    t.unit = t.rawValue.includes('.')
                        ? config.options['stylesheet.floatUnit']
                        : config.options['stylesheet.intUnit'];
                }
            }
        }
    }
}
/**
 * Constructs CSS value token
 */
function cssValue(...args) {
    return {
        type: 'CSSValue',
        value: args
    };
}
/**
 * Constructs literal token
 */
function literal(value) {
    return { type: 'Literal', value };
}
/**
 * Constructs field token
 */
function field(index, name) {
    return { type: 'Field', index, name };
}
/**
 * Check if given value contains fields
 */
function hasField(value) {
    for (const v of value.value) {
        if (v.type === 'Field' || (v.type === 'FunctionCall' && v.arguments.some(hasField))) {
            return true;
        }
    }
    return false;
}
/**
 * Wraps tokens of given abbreviation with fields
 */
function wrapWithField(node, config, state = { index: 1 }) {
    let value = [];
    for (const v of node.value) {
        switch (v.type) {
            case 'ColorValue':
                value.push(field(state.index++, color(v, config.options['stylesheet.shortHex'])));
                break;
            case 'Literal':
                value.push(field(state.index++, v.value));
                break;
            case 'NumberValue':
                value.push(field(state.index++, `${v.value}${v.unit}`));
                break;
            case 'StringValue':
                const q = v.quote === 'single' ? '\'' : '"';
                value.push(field(state.index++, q + v.value + q));
                break;
            case 'FunctionCall':
                value.push(field(state.index++, v.name), literal('('));
                for (let i = 0, il = v.arguments.length; i < il; i++) {
                    value = value.concat(wrapWithField(v.arguments[i], config, state).value);
                    if (i !== il - 1) {
                        value.push(literal(', '));
                    }
                }
                value.push(literal(')'));
                break;
            default:
                value.push(v);
        }
    }
    return Object.assign(Object.assign({}, node), { value });
}
/**
 * Check if abbreviation should be expanded in CSS value context
 */
function isValueScope(config) {
    if (config.context) {
        return config.context.name === CSSAbbreviationScope.Value || !config.context.name.startsWith('@@');
    }
    return false;
}
/**
 * Returns snippets for given scope
 */
function getSnippetsForScope(snippets, config) {
    if (config.context) {
        if (config.context.name === CSSAbbreviationScope.Section) {
            return snippets.filter(s => s.type === CSSSnippetType.Raw);
        }
        if (config.context.name === CSSAbbreviationScope.Property) {
            return snippets.filter(s => s.type === CSSSnippetType.Property);
        }
    }
    return snippets;
}

var markupSnippets = {
	"a": "a[href]",
	"a:blank": "a[href='http://${0}' target='_blank' rel='noopener noreferrer']",
	"a:link": "a[href='http://${0}']",
	"a:mail": "a[href='mailto:${0}']",
	"a:tel": "a[href='tel:+${0}']",
	"abbr": "abbr[title]",
	"acr|acronym": "acronym[title]",
	"base": "base[href]/",
	"basefont": "basefont/",
	"br": "br/",
	"frame": "frame/",
	"hr": "hr/",
	"bdo": "bdo[dir]",
	"bdo:r": "bdo[dir=rtl]",
	"bdo:l": "bdo[dir=ltr]",
	"col": "col/",
	"link": "link[rel=stylesheet href]/",
	"link:css": "link[href='${1:style}.css']",
	"link:print": "link[href='${1:print}.css' media=print]",
	"link:favicon": "link[rel='shortcut icon' type=image/x-icon href='${1:favicon.ico}']",
	"link:mf|link:manifest": "link[rel='manifest' href='${1:manifest.json}']",
	"link:touch": "link[rel=apple-touch-icon href='${1:favicon.png}']",
	"link:rss": "link[rel=alternate type=application/rss+xml title=RSS href='${1:rss.xml}']",
	"link:atom": "link[rel=alternate type=application/atom+xml title=Atom href='${1:atom.xml}']",
	"link:im|link:import": "link[rel=import href='${1:component}.html']",
	"meta": "meta/",
	"meta:utf": "meta[http-equiv=Content-Type content='text/html;charset=UTF-8']",
	"meta:vp": "meta[name=viewport content='width=${1:device-width}, initial-scale=${2:1.0}']",
	"meta:compat": "meta[http-equiv=X-UA-Compatible content='${1:IE=7}']",
	"meta:edge": "meta:compat[content='${1:ie=edge}']",
	"meta:redirect": "meta[http-equiv=refresh content='0; url=${1:http://example.com}']",
	"meta:refresh": "meta[http-equiv=refresh content='${1:5}']",
	"meta:kw": "meta[name=keywords content]",
	"meta:desc": "meta[name=description content]",
	"style": "style",
	"script": "script",
	"script:src": "script[src]",
	"script:module": "script[type=module src]",
	"img": "img[src alt]/",
	"img:s|img:srcset": "img[srcset src alt]",
	"img:z|img:sizes": "img[sizes srcset src alt]",
	"picture": "picture",
	"src|source": "source/",
	"src:sc|source:src": "source[src type]",
	"src:s|source:srcset": "source[srcset]",
	"src:t|source:type": "source[srcset type='${1:image/}']",
	"src:z|source:sizes": "source[sizes srcset]",
	"src:m|source:media": "source[media='(${1:min-width: })' srcset]",
	"src:mt|source:media:type": "source:media[type='${2:image/}']",
	"src:mz|source:media:sizes": "source:media[sizes srcset]",
	"src:zt|source:sizes:type": "source[sizes srcset type='${1:image/}']",
	"iframe": "iframe[src frameborder=0]",
	"embed": "embed[src type]/",
	"object": "object[data type]",
	"param": "param[name value]/",
	"map": "map[name]",
	"area": "area[shape coords href alt]/",
	"area:d": "area[shape=default]",
	"area:c": "area[shape=circle]",
	"area:r": "area[shape=rect]",
	"area:p": "area[shape=poly]",
	"form": "form[action]",
	"form:get": "form[method=get]",
	"form:post": "form[method=post]",
	"label": "label[for]",
	"input": "input[type=${1:text}]/",
	"inp": "input[name=${1} id=${1}]",
	"input:h|input:hidden": "input[type=hidden name]",
	"input:t|input:text": "inp[type=text]",
	"input:search": "inp[type=search]",
	"input:email": "inp[type=email]",
	"input:url": "inp[type=url]",
	"input:p|input:password": "inp[type=password]",
	"input:datetime": "inp[type=datetime]",
	"input:date": "inp[type=date]",
	"input:datetime-local": "inp[type=datetime-local]",
	"input:month": "inp[type=month]",
	"input:week": "inp[type=week]",
	"input:time": "inp[type=time]",
	"input:tel": "inp[type=tel]",
	"input:number": "inp[type=number]",
	"input:color": "inp[type=color]",
	"input:c|input:checkbox": "inp[type=checkbox]",
	"input:r|input:radio": "inp[type=radio]",
	"input:range": "inp[type=range]",
	"input:f|input:file": "inp[type=file]",
	"input:s|input:submit": "input[type=submit value]",
	"input:i|input:image": "input[type=image src alt]",
	"input:b|input:btn|input:button": "input[type=button value]",
	"input:reset": "input:button[type=reset]",
	"isindex": "isindex/",
	"select": "select[name=${1} id=${1}]",
	"select:d|select:disabled": "select[disabled.]",
	"opt|option": "option[value]",
	"textarea": "textarea[name=${1} id=${1} cols=${2:30} rows=${3:10}]",
	"marquee": "marquee[behavior direction]",
	"menu:c|menu:context": "menu[type=context]",
	"menu:t|menu:toolbar": "menu[type=toolbar]",
	"video": "video[src]",
	"audio": "audio[src]",
	"html:xml": "html[xmlns=http://www.w3.org/1999/xhtml]",
	"keygen": "keygen/",
	"command": "command/",
	"btn:s|button:s|button:submit" : "button[type=submit]",
	"btn:r|button:r|button:reset" : "button[type=reset]",
	"btn:b|button:b|button:button" : "button[type=button]",
	"btn:d|button:d|button:disabled" : "button[disabled.]",
	"fst:d|fset:d|fieldset:d|fieldset:disabled" : "fieldset[disabled.]",

	"bq": "blockquote",
	"fig": "figure",
	"figc": "figcaption",
	"pic": "picture",
	"ifr": "iframe",
	"emb": "embed",
	"obj": "object",
	"cap": "caption",
	"colg": "colgroup",
	"fst": "fieldset",
	"btn": "button",
	"optg": "optgroup",
	"tarea": "textarea",
	"leg": "legend",
	"sect": "section",
	"art": "article",
	"hdr": "header",
	"ftr": "footer",
	"adr": "address",
	"dlg": "dialog",
	"str": "strong",
	"prog": "progress",
	"mn": "main",
	"tem": "template",
	"fset": "fieldset",
	"datag": "datagrid",
	"datal": "datalist",
	"kg": "keygen",
	"out": "output",
	"det": "details",
	"sum": "summary",
	"cmd": "command",

	"ri:d|ri:dpr": "img:s",
	"ri:v|ri:viewport": "img:z",
	"ri:a|ri:art": "pic>src:m+img",
	"ri:t|ri:type": "pic>src:t+img",

	"!!!": "{<!DOCTYPE html>}",
	"doc": "html[lang=${lang}]>(head>meta[charset=${charset}]+meta:vp+title{${1:Document}})+body",
	"!|html:5": "!!!+doc",

	"c": "{<!-- ${0} -->}",
	"cc:ie": "{<!--[if IE]>${0}<![endif]-->}",
	"cc:noie": "{<!--[if !IE]><!-->${0}<!--<![endif]-->}"
};

var stylesheetSnippets = {
	"@f": "@font-face {\n\tfont-family: ${1};\n\tsrc: url(${2});\n}",
	"@ff": "@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}",
	"@i|@import": "@import url(${0});",
	"@kf": "@keyframes ${1:identifier} {\n\t${2}\n}",
	"@m|@media": "@media ${1:screen} {\n\t${0}\n}",
	"ac": "align-content:start|end|flex-start|flex-end|center|space-between|space-around|stretch|space-evenly",
	"ai": "align-items:start|end|flex-start|flex-end|center|baseline|stretch",
	"anim": "animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode}",
	"animdel": "animation-delay:time",
	"animdir": "animation-direction:normal|reverse|alternate|alternate-reverse",
	"animdur": "animation-duration:${1:0}s",
	"animfm": "animation-fill-mode:both|forwards|backwards",
	"animic": "animation-iteration-count:1|infinite",
	"animn": "animation-name",
	"animps": "animation-play-state:running|paused",
	"animtf": "animation-timing-function:linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1})",
	"ap": "appearance:none",
	"as": "align-self:start|end|auto|flex-start|flex-end|center|baseline|stretch",
	"b": "bottom",
	"bd": "border:${1:1px} ${2:solid} ${3:#000}",
	"bdb": "border-bottom:${1:1px} ${2:solid} ${3:#000}",
	"bdbc": "border-bottom-color:${1:#000}",
	"bdbi": "border-bottom-image:url(${0})",
	"bdbk": "border-break:close",
	"bdbli": "border-bottom-left-image:url(${0})|continue",
	"bdblrs": "border-bottom-left-radius",
	"bdbri": "border-bottom-right-image:url(${0})|continue",
	"bdbrrs": "border-bottom-right-radius",
	"bdbs": "border-bottom-style",
	"bdbw": "border-bottom-width",
	"bdc": "border-color:${1:#000}",
	"bdci": "border-corner-image:url(${0})|continue",
	"bdcl": "border-collapse:collapse|separate",
	"bdf": "border-fit:repeat|clip|scale|stretch|overwrite|overflow|space",
	"bdi": "border-image:url(${0})",
	"bdl": "border-left:${1:1px} ${2:solid} ${3:#000}",
	"bdlc": "border-left-color:${1:#000}",
	"bdlen": "border-length",
	"bdli": "border-left-image:url(${0})",
	"bdls": "border-left-style",
	"bdlw": "border-left-width",
	"bdr": "border-right:${1:1px} ${2:solid} ${3:#000}",
	"bdrc": "border-right-color:${1:#000}",
	"bdri": "border-right-image:url(${0})",
	"bdrs": "border-radius",
	"bdrst": "border-right-style",
	"bdrw": "border-right-width",
	"bds": "border-style:none|hidden|dotted|dashed|solid|double|dot-dash|dot-dot-dash|wave|groove|ridge|inset|outset",
	"bdsp": "border-spacing",
	"bdt": "border-top:${1:1px} ${2:solid} ${3:#000}",
	"bdtc": "border-top-color:${1:#000}",
	"bdti": "border-top-image:url(${0})",
	"bdtli": "border-top-left-image:url(${0})|continue",
	"bdtlrs": "border-top-left-radius",
	"bdtri": "border-top-right-image:url(${0})|continue",
	"bdtrrs": "border-top-right-radius",
	"bdts": "border-top-style",
	"bdtw": "border-top-width",
	"bdw": "border-width",
  "bbs": "border-block-start",
  "bbe": "border-block-end",
  "bis": "border-inline-start",
  "bie": "border-inline-end",
	"bfv": "backface-visibility:hidden|visible",
	"bg": "background:${1:#000}",
	"bg:n": "background: none",
	"bga": "background-attachment:fixed|scroll",
	"bgbk": "background-break:bounding-box|each-box|continuous",
	"bgc": "background-color:${1:#fff}",
	"bgcp": "background-clip:padding-box|border-box|content-box|no-clip",
	"bgi": "background-image:url(${0})",
	"bgo": "background-origin:padding-box|border-box|content-box",
	"bgp": "background-position:${1:0} ${2:0}",
	"bgpx": "background-position-x",
	"bgpy": "background-position-y",
	"bgr": "background-repeat:no-repeat|repeat-x|repeat-y|space|round",
	"bgsz": "background-size:contain|cover",
  "bs": "block-size",
	"bxsh": "box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:#000}|none",
	"bxsz": "box-sizing:border-box|content-box|border-box",
	"c": "color:${1:#000}",
	"cr": "color:rgb(${1:0}, ${2:0}, ${3:0})",
	"cra": "color:rgba(${1:0}, ${2:0}, ${3:0}, ${4:.5})",
	"cl": "clear:both|left|right|none",
	"cm": "/* ${0} */",
	"cnt": "content:'${0}'|normal|open-quote|no-open-quote|close-quote|no-close-quote|attr(${0})|counter(${0})|counters(${0})",
	"coi": "counter-increment",
	"colm": "columns",
	"colmc": "column-count",
	"colmf": "column-fill",
	"colmg": "column-gap",
	"colmr": "column-rule",
	"colmrc": "column-rule-color",
	"colmrs": "column-rule-style",
	"colmrw": "column-rule-width",
	"colms": "column-span",
	"colmw": "column-width",
	"cor": "counter-reset",
	"cp": "clip:auto|rect(${1:top} ${2:right} ${3:bottom} ${4:left})",
	"cps": "caption-side:top|bottom",
	"cur": "cursor:pointer|auto|default|crosshair|hand|help|move|pointer|text",
	"d": "display:block|none|flex|inline-flex|inline|inline-block|grid|inline-grid|subgrid|list-item|run-in|contents|table|inline-table|table-caption|table-column|table-column-group|table-header-group|table-footer-group|table-row|table-row-group|table-cell|ruby|ruby-base|ruby-base-group|ruby-text|ruby-text-group",
	"ec": "empty-cells:show|hide",
	"f": "font:${1:1em} ${2:sans-serif}",
	"fd": "font-display:auto|block|swap|fallback|optional",
	"fef": "font-effect:none|engrave|emboss|outline",
	"fem": "font-emphasize",
	"femp": "font-emphasize-position:before|after",
	"fems": "font-emphasize-style:none|accent|dot|circle|disc",
	"ff": "font-family:serif|sans-serif|cursive|fantasy|monospace",
	"fft": "font-family:\"Times New Roman\", Times, Baskerville, Georgia, serif",
	"ffa": "font-family:Arial, \"Helvetica Neue\", Helvetica, sans-serif",
	"ffv": "font-family:Verdana, Geneva, sans-serif",
	"fl": "float:left|right|none",
	"fs": "font-style:italic|normal|oblique",
	"fsm": "font-smoothing:antialiased|subpixel-antialiased|none",
	"fst": "font-stretch:normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded",
	"fv": "font-variant:normal|small-caps",
	"fvs": "font-variation-settings:normal|inherit|initial|unset",
	"fw": "font-weight:normal|bold|bolder|lighter",
	"fx": "flex",
	"fxb": "flex-basis:fill|max-content|min-content|fit-content|content",
	"fxd": "flex-direction:row|row-reverse|column|column-reverse",
	"fxf": "flex-flow",
	"fxg": "flex-grow",
	"fxsh": "flex-shrink",
	"fxw": "flex-wrap:nowrap|wrap|wrap-reverse",
	"fsz": "font-size",
	"fsza": "font-size-adjust",
	"g": "gap",
	"gtc": "grid-template-columns:repeat(${0})|minmax()",
	"gtr": "grid-template-rows:repeat(${0})|minmax()",
	"gta": "grid-template-areas",
	"gt": "grid-template",
	"gg": "grid-gap",
	"gcg": "grid-column-gap",
	"grg": "grid-row-gap",
	"gac": "grid-auto-columns:auto|minmax()",
	"gar": "grid-auto-rows:auto|minmax()",
	"gaf": "grid-auto-flow:row|column|dense|inherit|initial|unset",
	"gd": "grid",
	"gc": "grid-column",
	"gcs": "grid-column-start",
	"gce": "grid-column-end",
	"gr": "grid-row",
	"grs": "grid-row-start",
	"gre": "grid-row-end",
	"ga": "grid-area",
	"h": "height",
  "is": "inline-size",
	"jc": "justify-content:start|end|stretch|flex-start|flex-end|center|space-between|space-around|space-evenly",
	"ji": "justify-items:start|end|center|stretch",
	"js": "justify-self:start|end|center|stretch",
	"l": "left",
	"lg": "background-image:linear-gradient(${1})",
	"lh": "line-height",
	"lis": "list-style",
	"lisi": "list-style-image",
	"lisp": "list-style-position:inside|outside",
	"list": "list-style-type:disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman",
	"lts": "letter-spacing:normal",
	"m": "margin",
	"mah": "max-height",
	"mar": "max-resolution",
	"maw": "max-width",
	"mb": "margin-bottom",
	"mih": "min-height",
	"mir": "min-resolution",
	"miw": "min-width",
	"ml": "margin-left",
	"mr": "margin-right",
	"mt": "margin-top",
  "mbs": "margin-block-start",
  "mbe": "margin-block-end",
  "mis": "margin-inline-start",
  "mie": "margin-inline-end",
	"ol": "outline",
	"olc": "outline-color:${1:#000}|invert",
	"olo": "outline-offset",
	"ols": "outline-style:none|dotted|dashed|solid|double|groove|ridge|inset|outset",
	"olw": "outline-width|thin|medium|thick",
	"op|opa": "opacity",
	"ord": "order",
	"ori": "orientation:landscape|portrait",
	"orp": "orphans",
	"ov": "overflow:hidden|visible|hidden|scroll|auto",
	"ovs": "overflow-style:scrollbar|auto|scrollbar|panner|move|marquee",
	"ovx": "overflow-x:hidden|visible|hidden|scroll|auto",
	"ovy": "overflow-y:hidden|visible|hidden|scroll|auto",
	"p": "padding",
	"pb": "padding-bottom",
	"pgba": "page-break-after:auto|always|left|right",
	"pgbb": "page-break-before:auto|always|left|right",
	"pgbi": "page-break-inside:auto|avoid",
	"pl": "padding-left",
	"pos": "position:relative|absolute|relative|fixed|static",
	"pr": "padding-right",
	"pt": "padding-top",
  "pbs": "padding-block-start",
  "pbe": "padding-block-end",
  "pis": "padding-inline-start",
  "pie": "padding-inline-end",
  "spbs": "scroll-padding-block-start",
  "spbe": "scroll-padding-block-end",
  "spis": "scroll-padding-inline-start",
  "spie": "scroll-padding-inline-end",
	"q": "quotes",
	"qen": "quotes:'\\201C' '\\201D' '\\2018' '\\2019'",
	"qru": "quotes:'\\00AB' '\\00BB' '\\201E' '\\201C'",
	"r": "right",
	"rsz": "resize:none|both|horizontal|vertical",
	"t": "top",
	"ta": "text-align:left|center|right|justify",
	"tal": "text-align-last:left|center|right",
	"tbl": "table-layout:fixed",
	"td": "text-decoration:none|underline|overline|line-through",
	"te": "text-emphasis:none|accent|dot|circle|disc|before|after",
	"th": "text-height:auto|font-size|text-size|max-size",
	"ti": "text-indent",
	"tj": "text-justify:auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|tibetan",
	"to": "text-outline:${1:0} ${2:0} ${3:#000}",
	"tov": "text-overflow:ellipsis|clip",
	"tr": "text-replace",
	"trf": "transform:${1}|skewX(${1:angle})|skewY(${1:angle})|scale(${1:x}, ${2:y})|scaleX(${1:x})|scaleY(${1:y})|scaleZ(${1:z})|scale3d(${1:x}, ${2:y}, ${3:z})|rotate(${1:angle})|rotateX(${1:angle})|rotateY(${1:angle})|rotateZ(${1:angle})|translate(${1:x}, ${2:y})|translateX(${1:x})|translateY(${1:y})|translateZ(${1:z})|translate3d(${1:tx}, ${2:ty}, ${3:tz})",
	"trfo": "transform-origin",
	"trfs": "transform-style:preserve-3d",
	"trs": "transition:${1:prop} ${2:time}",
	"trsde": "transition-delay:${1:time}",
	"trsdu": "transition-duration:${1:time}",
	"trsp": "transition-property:${1:prop}",
	"trstf": "transition-timing-function:${1:fn}",
	"tsh": "text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000}",
	"tt": "text-transform:uppercase|lowercase|capitalize|none",
	"tw": "text-wrap:none|normal|unrestricted|suppress",
	"us": "user-select:none",
	"v": "visibility:hidden|visible|collapse",
	"va": "vertical-align:top|super|text-top|middle|baseline|bottom|text-bottom|sub",
	"w": "width",
	"whs": "white-space:nowrap|pre|pre-wrap|pre-line|normal",
	"whsc": "white-space-collapse:normal|keep-all|loose|break-strict|break-all",
	"wid": "widows",
	"wm": "writing-mode:lr-tb|lr-tb|lr-bt|rl-tb|rl-bt|tb-rl|tb-lr|bt-lr|bt-rl",
	"wob": "word-break:normal|keep-all|break-all",
	"wos": "word-spacing",
	"wow": "word-wrap:none|unrestricted|suppress|break-word|normal",
	"z": "z-index",
	"zom": "zoom:1"
};

var xslSnippets = {
    "tm|tmatch": "xsl:template[match mode]",
    "tn|tname": "xsl:template[name]",
    "call": "xsl:call-template[name]",
    "ap": "xsl:apply-templates[select mode]",
    "api": "xsl:apply-imports",
    "imp": "xsl:import[href]",
    "inc": "xsl:include[href]",
    "ch": "xsl:choose",
    "wh|xsl:when": "xsl:when[test]",
    "ot": "xsl:otherwise",
    "if": "xsl:if[test]",
    "par": "xsl:param[name]",
    "pare": "xsl:param[name select]",
    "var": "xsl:variable[name]",
    "vare": "xsl:variable[name select]",
    "wp": "xsl:with-param[name select]",
    "key": "xsl:key[name match use]",
    "elem": "xsl:element[name]",
    "attr": "xsl:attribute[name]",
    "attrs": "xsl:attribute-set[name]",
    "cp": "xsl:copy[select]",
    "co": "xsl:copy-of[select]",
    "val": "xsl:value-of[select]",
    "for|each": "xsl:for-each[select]",
    "tex": "xsl:text",
    "com": "xsl:comment",
    "msg": "xsl:message[terminate=no]",
    "fall": "xsl:fallback",
    "num": "xsl:number[value]",
    "nam": "namespace-alias[stylesheet-prefix result-prefix]",
    "pres": "xsl:preserve-space[elements]",
    "strip": "xsl:strip-space[elements]",
    "proc": "xsl:processing-instruction[name]",
    "sort": "xsl:sort[select order]",
    "choose": "xsl:choose>xsl:when+xsl:otherwise",
    "xsl": "!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\n|}",
    "!!!": "{<?xml version=\"1.0\" encoding=\"UTF-8\"?>}"
};

var pugSnippets = {
	"!!!": "{doctype html}"
};

var variables = {
	"lang": "en",
	"locale": "en-US",
	"charset": "UTF-8",
	"indentation": "\t",
	"newline": "\n"
};

/**
 * Default syntaxes for abbreviation types
 */
const defaultSyntaxes = {
    markup: 'html',
    stylesheet: 'css'
};
const defaultOptions$1 = {
    'inlineElements': [
        'a', 'abbr', 'acronym', 'applet', 'b', 'basefont', 'bdo',
        'big', 'br', 'button', 'cite', 'code', 'del', 'dfn', 'em', 'font', 'i',
        'iframe', 'img', 'input', 'ins', 'kbd', 'label', 'map', 'object', 'q',
        's', 'samp', 'select', 'small', 'span', 'strike', 'strong', 'sub', 'sup',
        'textarea', 'tt', 'u', 'var'
    ],
    'output.indent': '\t',
    'output.baseIndent': '',
    'output.newline': '\n',
    'output.tagCase': '',
    'output.attributeCase': '',
    'output.attributeQuotes': 'double',
    'output.format': true,
    'output.formatLeafNode': false,
    'output.formatSkip': ['html'],
    'output.formatForce': ['body'],
    'output.inlineBreak': 3,
    'output.compactBoolean': false,
    'output.booleanAttributes': [
        'contenteditable', 'seamless', 'async', 'autofocus',
        'autoplay', 'checked', 'controls', 'defer', 'disabled', 'formnovalidate',
        'hidden', 'ismap', 'loop', 'multiple', 'muted', 'novalidate', 'readonly',
        'required', 'reversed', 'selected', 'typemustmatch'
    ],
    'output.reverseAttributes': false,
    'output.selfClosingStyle': 'html',
    'output.field': (index, placeholder) => placeholder,
    'output.text': text => text,
    'markup.href': true,
    'comment.enabled': false,
    'comment.trigger': ['id', 'class'],
    'comment.before': '',
    'comment.after': '\n<!-- /[#ID][.CLASS] -->',
    'bem.enabled': false,
    'bem.element': '__',
    'bem.modifier': '_',
    'jsx.enabled': false,
    'stylesheet.keywords': ['auto', 'inherit', 'unset', 'none'],
    'stylesheet.unitless': ['z-index', 'line-height', 'opacity', 'font-weight', 'zoom', 'flex', 'flex-grow', 'flex-shrink'],
    'stylesheet.shortHex': true,
    'stylesheet.between': ': ',
    'stylesheet.after': ';',
    'stylesheet.intUnit': 'px',
    'stylesheet.floatUnit': 'em',
    'stylesheet.unitAliases': { e: 'em', p: '%', x: 'ex', r: 'rem' },
    'stylesheet.json': false,
    'stylesheet.jsonDoubleQuotes': false,
    'stylesheet.fuzzySearchMinScore': 0
};
const defaultConfig = {
    type: 'markup',
    syntax: 'html',
    variables,
    snippets: {},
    options: defaultOptions$1
};
/**
 * Default per-syntax config
 */
const syntaxConfig = {
    markup: {
        snippets: parseSnippets$1(markupSnippets),
    },
    xhtml: {
        options: {
            'output.selfClosingStyle': 'xhtml'
        }
    },
    xml: {
        options: {
            'output.selfClosingStyle': 'xml'
        }
    },
    xsl: {
        snippets: parseSnippets$1(xslSnippets),
        options: {
            'output.selfClosingStyle': 'xml'
        }
    },
    jsx: {
        options: {
            'jsx.enabled': true,
            'markup.attributes': {
                'class': 'className',
                'class*': 'styleName',
                'for': 'htmlFor'
            },
            'markup.valuePrefix': {
                'class*': 'styles'
            }
        }
    },
    vue: {
        options: {
            'markup.attributes': {
                'class*': ':class',
            }
        }
    },
    svelte: {
        options: {
            'jsx.enabled': true
        }
    },
    pug: {
        snippets: parseSnippets$1(pugSnippets)
    },
    stylesheet: {
        snippets: parseSnippets$1(stylesheetSnippets)
    },
    sass: {
        options: {
            'stylesheet.after': ''
        }
    },
    stylus: {
        options: {
            'stylesheet.between': ' ',
            'stylesheet.after': '',
        }
    }
};
/**
 * Parses raw snippets definitions with possibly multiple keys into a plan
 * snippet map
 */
function parseSnippets$1(snippets) {
    const result = {};
    Object.keys(snippets).forEach(k => {
        for (const name of k.split('|')) {
            result[name] = snippets[k];
        }
    });
    return result;
}
function resolveConfig(config = {}, globals = {}) {
    const type = config.type || 'markup';
    const syntax = config.syntax || defaultSyntaxes[type];
    return Object.assign(Object.assign(Object.assign({}, defaultConfig), config), { type,
        syntax, variables: mergedData(type, syntax, 'variables', config, globals), snippets: mergedData(type, syntax, 'snippets', config, globals), options: mergedData(type, syntax, 'options', config, globals) });
}
function mergedData(type, syntax, key, config, globals = {}) {
    const typeDefaults = syntaxConfig[type];
    const typeOverride = globals[type];
    const syntaxDefaults = syntaxConfig[syntax];
    const syntaxOverride = globals[syntax];
    return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, defaultConfig[key]), (typeDefaults && typeDefaults[key])), (syntaxDefaults && syntaxDefaults[key])), (typeOverride && typeOverride[key])), (syntaxOverride && syntaxOverride[key])), config[key]);
}

/**
 * Creates structure for scanning given string in backward direction
 */
function backwardScanner(text, start = 0) {
    return { text, start, pos: text.length };
}
/**
 * Check if given scanner position is at start of scanned text
 */
function sol(scanner) {
    return scanner.pos === scanner.start;
}
/**
 * “Peeks” character code an current scanner location without advancing it
 */
function peek(scanner, offset = 0) {
    return scanner.text.charCodeAt(scanner.pos - 1 + offset);
}
/**
 * Returns current character code and moves character location one symbol back
 */
function previous(scanner) {
    if (!sol(scanner)) {
        return scanner.text.charCodeAt(--scanner.pos);
    }
}
/**
 * Consumes current character code if it matches given `match` code or function
 */
function consume(scanner, match) {
    if (sol(scanner)) {
        return false;
    }
    const ok = typeof match === 'function'
        ? match(peek(scanner))
        : match === peek(scanner);
    if (ok) {
        scanner.pos--;
    }
    return !!ok;
}
function consumeWhile(scanner, match) {
    const start = scanner.pos;
    while (consume(scanner, match)) {
        // empty
    }
    return scanner.pos < start;
}

var Chars$1;
(function (Chars) {
    Chars[Chars["SingleQuote"] = 39] = "SingleQuote";
    Chars[Chars["DoubleQuote"] = 34] = "DoubleQuote";
    Chars[Chars["Escape"] = 92] = "Escape";
})(Chars$1 || (Chars$1 = {}));
/**
 * Check if given character code is a quote
 */
function isQuote(c) {
    return c === Chars$1.SingleQuote || c === Chars$1.DoubleQuote;
}
/**
 * Consumes quoted value, if possible
 * @return Returns `true` is value was consumed
 */
function consumeQuoted(scanner) {
    const start = scanner.pos;
    const quote = previous(scanner);
    if (isQuote(quote)) {
        while (!sol(scanner)) {
            if (previous(scanner) === quote && peek(scanner) !== Chars$1.Escape) {
                return true;
            }
        }
    }
    scanner.pos = start;
    return false;
}

var Brackets;
(function (Brackets) {
    Brackets[Brackets["SquareL"] = 91] = "SquareL";
    Brackets[Brackets["SquareR"] = 93] = "SquareR";
    Brackets[Brackets["RoundL"] = 40] = "RoundL";
    Brackets[Brackets["RoundR"] = 41] = "RoundR";
    Brackets[Brackets["CurlyL"] = 123] = "CurlyL";
    Brackets[Brackets["CurlyR"] = 125] = "CurlyR";
})(Brackets || (Brackets = {}));
const bracePairs = {
    [Brackets.SquareL]: Brackets.SquareR,
    [Brackets.RoundL]: Brackets.RoundR,
    [Brackets.CurlyL]: Brackets.CurlyR,
};

var Chars;
(function (Chars) {
    Chars[Chars["Tab"] = 9] = "Tab";
    Chars[Chars["Space"] = 32] = "Space";
    /** `-` character */
    Chars[Chars["Dash"] = 45] = "Dash";
    /** `/` character */
    Chars[Chars["Slash"] = 47] = "Slash";
    /** `:` character */
    Chars[Chars["Colon"] = 58] = "Colon";
    /** `=` character */
    Chars[Chars["Equals"] = 61] = "Equals";
    /** `<` character */
    Chars[Chars["AngleLeft"] = 60] = "AngleLeft";
    /** `>` character */
    Chars[Chars["AngleRight"] = 62] = "AngleRight";
})(Chars || (Chars = {}));
/**
 * Check if given reader’s current position points at the end of HTML tag
 */
function isHtml(scanner) {
    const start = scanner.pos;
    if (!consume(scanner, Chars.AngleRight)) {
        return false;
    }
    let ok = false;
    consume(scanner, Chars.Slash); // possibly self-closed element
    while (!sol(scanner)) {
        consumeWhile(scanner, isWhiteSpace);
        if (consumeIdent(scanner)) {
            // ate identifier: could be a tag name, boolean attribute or unquoted
            // attribute value
            if (consume(scanner, Chars.Slash)) {
                // either closing tag or invalid tag
                ok = consume(scanner, Chars.AngleLeft);
                break;
            }
            else if (consume(scanner, Chars.AngleLeft)) {
                // opening tag
                ok = true;
                break;
            }
            else if (consume(scanner, isWhiteSpace)) {
                // boolean attribute
                continue;
            }
            else if (consume(scanner, Chars.Equals)) {
                // simple unquoted value or invalid attribute
                if (consumeIdent(scanner)) {
                    continue;
                }
                break;
            }
            else if (consumeAttributeWithUnquotedValue(scanner)) {
                // identifier was a part of unquoted value
                ok = true;
                break;
            }
            // invalid tag
            break;
        }
        if (consumeAttribute(scanner)) {
            continue;
        }
        break;
    }
    scanner.pos = start;
    return ok;
}
/**
 * Consumes HTML attribute from given string.
 * @return `true` if attribute was consumed.
 */
function consumeAttribute(scanner) {
    return consumeAttributeWithQuotedValue(scanner) || consumeAttributeWithUnquotedValue(scanner);
}
function consumeAttributeWithQuotedValue(scanner) {
    const start = scanner.pos;
    if (consumeQuoted(scanner) && consume(scanner, Chars.Equals) && consumeIdent(scanner)) {
        return true;
    }
    scanner.pos = start;
    return false;
}
function consumeAttributeWithUnquotedValue(scanner) {
    const start = scanner.pos;
    const stack = [];
    while (!sol(scanner)) {
        const ch = peek(scanner);
        if (isCloseBracket(ch)) {
            stack.push(ch);
        }
        else if (isOpenBracket(ch)) {
            if (stack.pop() !== bracePairs[ch]) {
                // Unexpected open bracket
                break;
            }
        }
        else if (!isUnquotedValue(ch)) {
            break;
        }
        scanner.pos--;
    }
    if (start !== scanner.pos && consume(scanner, Chars.Equals) && consumeIdent(scanner)) {
        return true;
    }
    scanner.pos = start;
    return false;
}
/**
 * Consumes HTML identifier from stream
 */
function consumeIdent(scanner) {
    return consumeWhile(scanner, isIdent);
}
/**
 * Check if given character code belongs to HTML identifier
 */
function isIdent(ch) {
    return ch === Chars.Colon || ch === Chars.Dash || isAlpha(ch) || isNumber(ch);
}
/**
 * Check if given character code is alpha code (letter though A to Z)
 */
function isAlpha(ch) {
    ch &= ~32; // quick hack to convert any char code to uppercase char code
    return ch >= 65 && ch <= 90; // A-Z
}
/**
 * Check if given code is a number
 */
function isNumber(ch) {
    return ch > 47 && ch < 58;
}
/**
 * Check if given code is a whitespace
 */
function isWhiteSpace(ch) {
    return ch === Chars.Space || ch === Chars.Tab;
}
/**
 * Check if given code may belong to unquoted attribute value
 */
function isUnquotedValue(ch) {
    return !isNaN(ch) && ch !== Chars.Equals && !isWhiteSpace(ch) && !isQuote(ch);
}
function isOpenBracket(ch) {
    return ch === Brackets.CurlyL || ch === Brackets.RoundL || ch === Brackets.SquareL;
}
function isCloseBracket(ch) {
    return ch === Brackets.CurlyR || ch === Brackets.RoundR || ch === Brackets.SquareR;
}

const code = (ch) => ch.charCodeAt(0);
const specialChars = '#.*:$-_!@%^+>/'.split('').map(code);
const defaultOptions = {
    type: 'markup',
    lookAhead: true,
    prefix: ''
};
/**
 * Extracts Emmet abbreviation from given string.
 * The goal of this module is to extract abbreviation from current editor’s line,
 * e.g. like this: `<span>.foo[title=bar|]</span>` -> `.foo[title=bar]`, where
 * `|` is a current caret position.
 * @param line A text line where abbreviation should be expanded
 * @param pos Caret position in line. If not given, uses end of line
 * @param options Extracting options
 */
function extractAbbreviation$1(line, pos = line.length, options = {}) {
    // make sure `pos` is within line range
    const opt = Object.assign(Object.assign({}, defaultOptions), options);
    pos = Math.min(line.length, Math.max(0, pos == null ? line.length : pos));
    if (opt.lookAhead) {
        pos = offsetPastAutoClosed(line, pos, opt);
    }
    let ch;
    const start = getStartOffset(line, pos, opt.prefix || '');
    if (start === -1) {
        return void 0;
    }
    const scanner = backwardScanner(line, start);
    scanner.pos = pos;
    const stack = [];
    while (!sol(scanner)) {
        ch = peek(scanner);
        if (stack.includes(Brackets.CurlyR)) {
            if (ch === Brackets.CurlyR) {
                stack.push(ch);
                scanner.pos--;
                continue;
            }
            if (ch !== Brackets.CurlyL) {
                scanner.pos--;
                continue;
            }
        }
        if (isCloseBrace(ch, opt.type)) {
            stack.push(ch);
        }
        else if (isOpenBrace(ch, opt.type)) {
            if (stack.pop() !== bracePairs[ch]) {
                // unexpected brace
                break;
            }
        }
        else if (stack.includes(Brackets.SquareR) || stack.includes(Brackets.CurlyR)) {
            // respect all characters inside attribute sets or text nodes
            scanner.pos--;
            continue;
        }
        else if (isHtml(scanner) || !isAbbreviation(ch)) {
            break;
        }
        scanner.pos--;
    }
    if (!stack.length && scanner.pos !== pos) {
        // Found something, remove some invalid symbols from the
        // beginning and return abbreviation
        const abbreviation = line.slice(scanner.pos, pos).replace(/^[*+>^]+/, '');
        return {
            abbreviation,
            location: pos - abbreviation.length,
            start: options.prefix
                ? start - options.prefix.length
                : pos - abbreviation.length,
            end: pos
        };
    }
}
/**
 * Returns new `line` index which is right after characters beyound `pos` that
 * editor will likely automatically close, e.g. }, ], and quotes
 */
function offsetPastAutoClosed(line, pos, options) {
    // closing quote is allowed only as a next character
    if (isQuote(line.charCodeAt(pos))) {
        pos++;
    }
    // offset pointer until non-autoclosed character is found
    while (isCloseBrace(line.charCodeAt(pos), options.type)) {
        pos++;
    }
    return pos;
}
/**
 * Returns start offset (left limit) in `line` where we should stop looking for
 * abbreviation: it’s nearest to `pos` location of `prefix` token
 */
function getStartOffset(line, pos, prefix) {
    if (!prefix) {
        return 0;
    }
    const scanner = backwardScanner(line);
    const compiledPrefix = prefix.split('').map(code);
    scanner.pos = pos;
    let result;
    while (!sol(scanner)) {
        if (consumePair(scanner, Brackets.SquareR, Brackets.SquareL) || consumePair(scanner, Brackets.CurlyR, Brackets.CurlyL)) {
            continue;
        }
        result = scanner.pos;
        if (consumeArray(scanner, compiledPrefix)) {
            return result;
        }
        scanner.pos--;
    }
    return -1;
}
/**
 * Consumes full character pair, if possible
 */
function consumePair(scanner, close, open) {
    const start = scanner.pos;
    if (consume(scanner, close)) {
        while (!sol(scanner)) {
            if (consume(scanner, open)) {
                return true;
            }
            scanner.pos--;
        }
    }
    scanner.pos = start;
    return false;
}
/**
 * Consumes all character codes from given array, right-to-left, if possible
 */
function consumeArray(scanner, arr) {
    const start = scanner.pos;
    let consumed = false;
    for (let i = arr.length - 1; i >= 0 && !sol(scanner); i--) {
        if (!consume(scanner, arr[i])) {
            break;
        }
        consumed = i === 0;
    }
    if (!consumed) {
        scanner.pos = start;
    }
    return consumed;
}
function isAbbreviation(ch) {
    return (ch > 64 && ch < 91) // uppercase letter
        || (ch > 96 && ch < 123) // lowercase letter
        || (ch > 47 && ch < 58) // number
        || specialChars.includes(ch); // special character
}
function isOpenBrace(ch, syntax) {
    return ch === Brackets.RoundL || (syntax === 'markup' && (ch === Brackets.SquareL || ch === Brackets.CurlyL));
}
function isCloseBrace(ch, syntax) {
    return ch === Brackets.RoundR || (syntax === 'markup' && (ch === Brackets.SquareR || ch === Brackets.CurlyR));
}

function expandAbbreviation$1(abbr, config) {
    const resolvedConfig = resolveConfig(config);
    return resolvedConfig.type === 'stylesheet'
        ? stylesheet(abbr, resolvedConfig)
        : markup(abbr, resolvedConfig);
}
/**
 * Expands given *markup* abbreviation (e.g. regular Emmet abbreviation that
 * produces structured output like HTML) and outputs it according to options
 * provided in config
 */
function markup(abbr, config) {
    return stringify(parse$1(abbr, config), config);
}
/**
 * Expands given *stylesheet* abbreviation (a special Emmet abbreviation designed for
 * stylesheet languages like CSS, SASS etc.) and outputs it according to options
 * provided in config
 */
function stylesheet(abbr, config) {
    return css(parse(abbr, config), config);
}

emmet.CSSAbbreviationScope = CSSAbbreviationScope;
var _default = emmet.default = expandAbbreviation$1;
var extract = emmet.extract = extractAbbreviation$1;
emmet.markup = markup;
emmet.markupAbbreviation = parseAbbreviation$1;
var parseMarkup = emmet.parseMarkup = parse$1;
var parseStylesheet = emmet.parseStylesheet = parse;
emmet.parseStylesheetSnippets = convertSnippets;
var resolveConfig_1 = emmet.resolveConfig = resolveConfig;
var stringifyMarkup = emmet.stringifyMarkup = stringify;
var stringifyStylesheet = emmet.stringifyStylesheet = css;
emmet.stylesheet = stylesheet;
emmet.stylesheetAbbreviation = parse$2;

function parseSnippets(snippets) {
    const result = {};
    Object.keys(snippets).forEach(k => {
        for (const name of k.split('|')) {
            result[name] = snippets[k];
        }
    });
    return result;
}
const syntaxes = {
    markup: ['html', 'xml', 'xsl', 'jsx', 'js', 'pug', 'slim', 'haml'],
    stylesheet: ['css', 'sass', 'scss', 'less', 'sss', 'stylus']
};

var main$3 = {};

var ral$1 = {};

Object.defineProperty(ral$1, "__esModule", { value: true });
var _ral$1;
function RAL$1() {
    if (_ral$1 === undefined) {
        throw new Error("No runtime abstraction layer installed");
    }
    return _ral$1;
}
(function (RAL) {
    function install(ral) {
        if (ral === undefined) {
            throw new Error("No runtime abstraction layer provided");
        }
        _ral$1 = ral;
    }
    RAL.install = install;
})(RAL$1 || (RAL$1 = {}));
ral$1.default = RAL$1;

var common = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.config = exports.loadMessageBundle = exports.localize = exports.format = exports.setPseudo = exports.isPseudo = exports.isDefined = exports.BundleFormat = exports.MessageFormat = void 0;
	var ral_1 = ral$1;
	(function (MessageFormat) {
	    MessageFormat["file"] = "file";
	    MessageFormat["bundle"] = "bundle";
	    MessageFormat["both"] = "both";
	})(exports.MessageFormat || (exports.MessageFormat = {}));
	(function (BundleFormat) {
	    BundleFormat["standalone"] = "standalone";
	    BundleFormat["languagePack"] = "languagePack";
	})(exports.BundleFormat || (exports.BundleFormat = {}));
	var LocalizeInfo;
	(function (LocalizeInfo) {
	    function is(value) {
	        var candidate = value;
	        return candidate && isDefined(candidate.key) && isDefined(candidate.comment);
	    }
	    LocalizeInfo.is = is;
	})(LocalizeInfo || (LocalizeInfo = {}));
	function isDefined(value) {
	    return typeof value !== 'undefined';
	}
	exports.isDefined = isDefined;
	exports.isPseudo = false;
	function setPseudo(pseudo) {
	    exports.isPseudo = pseudo;
	}
	exports.setPseudo = setPseudo;
	function format(message, args) {
	    var result;
	    if (exports.isPseudo) {
	        message = '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D';
	    }
	    if (args.length === 0) {
	        result = message;
	    }
	    else {
	        result = message.replace(/\{(\d+)\}/g, function (match, rest) {
	            var index = rest[0];
	            var arg = args[index];
	            var replacement = match;
	            if (typeof arg === 'string') {
	                replacement = arg;
	            }
	            else if (typeof arg === 'number' || typeof arg === 'boolean' || arg === void 0 || arg === null) {
	                replacement = String(arg);
	            }
	            return replacement;
	        });
	    }
	    return result;
	}
	exports.format = format;
	function localize(_key, message) {
	    var args = [];
	    for (var _i = 2; _i < arguments.length; _i++) {
	        args[_i - 2] = arguments[_i];
	    }
	    return format(message, args);
	}
	exports.localize = localize;
	function loadMessageBundle(file) {
	    return (0, ral_1.default)().loadMessageBundle(file);
	}
	exports.loadMessageBundle = loadMessageBundle;
	function config(opts) {
	    return (0, ral_1.default)().config(opts);
	}
	exports.config = config;
} (common));
getDefaultExportFromCjs(common);

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.config = exports.loadMessageBundle = exports.BundleFormat = exports.MessageFormat = void 0;
	var path = path$1;
	var fs = fs$1;
	var ral_1 = ral$1;
	var common_1 = common;
	var common_2 = common;
	Object.defineProperty(exports, "MessageFormat", { enumerable: true, get: function () { return common_2.MessageFormat; } });
	Object.defineProperty(exports, "BundleFormat", { enumerable: true, get: function () { return common_2.BundleFormat; } });
	var toString = Object.prototype.toString;
	function isNumber(value) {
	    return toString.call(value) === '[object Number]';
	}
	function isString(value) {
	    return toString.call(value) === '[object String]';
	}
	function isBoolean(value) {
	    return value === true || value === false;
	}
	function readJsonFileSync(filename) {
	    return JSON.parse(fs.readFileSync(filename, 'utf8'));
	}
	var resolvedBundles;
	var options;
	function initializeSettings() {
	    options = { locale: undefined, language: undefined, languagePackSupport: false, cacheLanguageResolution: true, messageFormat: common_1.MessageFormat.bundle };
	    if (isString(process.env.VSCODE_NLS_CONFIG)) {
	        try {
	            var vscodeOptions_1 = JSON.parse(process.env.VSCODE_NLS_CONFIG);
	            var language = void 0;
	            if (vscodeOptions_1.availableLanguages) {
	                var value = vscodeOptions_1.availableLanguages['*'];
	                if (isString(value)) {
	                    language = value;
	                }
	            }
	            if (isString(vscodeOptions_1.locale)) {
	                options.locale = vscodeOptions_1.locale.toLowerCase();
	            }
	            if (language === undefined) {
	                options.language = options.locale;
	            }
	            else if (language !== 'en') {
	                options.language = language;
	            }
	            if (isBoolean(vscodeOptions_1._languagePackSupport)) {
	                options.languagePackSupport = vscodeOptions_1._languagePackSupport;
	            }
	            if (isString(vscodeOptions_1._cacheRoot)) {
	                options.cacheRoot = vscodeOptions_1._cacheRoot;
	            }
	            if (isString(vscodeOptions_1._languagePackId)) {
	                options.languagePackId = vscodeOptions_1._languagePackId;
	            }
	            if (isString(vscodeOptions_1._translationsConfigFile)) {
	                options.translationsConfigFile = vscodeOptions_1._translationsConfigFile;
	                try {
	                    options.translationsConfig = readJsonFileSync(options.translationsConfigFile);
	                }
	                catch (error) {
	                    if (vscodeOptions_1._corruptedFile) {
	                        var dirname = path.dirname(vscodeOptions_1._corruptedFile);
	                        fs.exists(dirname, function (exists) {
	                            if (exists) {
	                                fs.writeFile(vscodeOptions_1._corruptedFile, 'corrupted', 'utf8', function (err) {
	                                    console.error(err);
	                                });
	                            }
	                        });
	                    }
	                }
	            }
	        }
	        catch (_a) {
	        }
	    }
	    (0, common_1.setPseudo)(options.locale === 'pseudo');
	    resolvedBundles = Object.create(null);
	}
	initializeSettings();
	function supportsLanguagePack() {
	    return options.languagePackSupport === true && options.cacheRoot !== undefined && options.languagePackId !== undefined && options.translationsConfigFile !== undefined
	        && options.translationsConfig !== undefined;
	}
	function createScopedLocalizeFunction(messages) {
	    return function (key, message) {
	        var args = [];
	        for (var _i = 2; _i < arguments.length; _i++) {
	            args[_i - 2] = arguments[_i];
	        }
	        if (isNumber(key)) {
	            if (key >= messages.length) {
	                console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: ".concat(new Error('').stack));
	                return;
	            }
	            return (0, common_1.format)(messages[key], args);
	        }
	        else {
	            if (isString(message)) {
	                console.warn("Message ".concat(message, " didn't get externalized correctly."));
	                return (0, common_1.format)(message, args);
	            }
	            else {
	                console.error("Broken localize call found. Stacktrace is\n: ".concat(new Error('').stack));
	            }
	        }
	    };
	}
	function resolveLanguage(file) {
	    var resolvedLanguage;
	    if (options.cacheLanguageResolution && resolvedLanguage) {
	        resolvedLanguage = resolvedLanguage;
	    }
	    else {
	        if (common_1.isPseudo || !options.language) {
	            resolvedLanguage = '.nls.json';
	        }
	        else {
	            var locale = options.language;
	            while (locale) {
	                var candidate = '.nls.' + locale + '.json';
	                if (fs.existsSync(file + candidate)) {
	                    resolvedLanguage = candidate;
	                    break;
	                }
	                else {
	                    var index = locale.lastIndexOf('-');
	                    if (index > 0) {
	                        locale = locale.substring(0, index);
	                    }
	                    else {
	                        resolvedLanguage = '.nls.json';
	                        locale = null;
	                    }
	                }
	            }
	        }
	        if (options.cacheLanguageResolution) {
	            resolvedLanguage = resolvedLanguage;
	        }
	    }
	    return file + resolvedLanguage;
	}
	function findInTheBoxBundle(root) {
	    var language = options.language;
	    while (language) {
	        var candidate = path.join(root, "nls.bundle.".concat(language, ".json"));
	        if (fs.existsSync(candidate)) {
	            return candidate;
	        }
	        else {
	            var index = language.lastIndexOf('-');
	            if (index > 0) {
	                language = language.substring(0, index);
	            }
	            else {
	                language = undefined;
	            }
	        }
	    }
	    if (language === undefined) {
	        var candidate = path.join(root, 'nls.bundle.json');
	        if (fs.existsSync(candidate)) {
	            return candidate;
	        }
	    }
	    return undefined;
	}
	function createDefaultNlsBundle(folder) {
	    var metaData = readJsonFileSync(path.join(folder, 'nls.metadata.json'));
	    var result = Object.create(null);
	    for (var module_1 in metaData) {
	        var entry = metaData[module_1];
	        result[module_1] = entry.messages;
	    }
	    return result;
	}
	function createNLSBundle(header, metaDataPath) {
	    var languagePackLocation = options.translationsConfig[header.id];
	    if (!languagePackLocation) {
	        return undefined;
	    }
	    var languagePack = readJsonFileSync(languagePackLocation).contents;
	    var metaData = readJsonFileSync(path.join(metaDataPath, 'nls.metadata.json'));
	    var result = Object.create(null);
	    for (var module_2 in metaData) {
	        var entry = metaData[module_2];
	        var translations = languagePack["".concat(header.outDir, "/").concat(module_2)];
	        if (translations) {
	            var resultMessages = [];
	            for (var i = 0; i < entry.keys.length; i++) {
	                var messageKey = entry.keys[i];
	                var key = isString(messageKey) ? messageKey : messageKey.key;
	                var translatedMessage = translations[key];
	                if (translatedMessage === undefined) {
	                    translatedMessage = entry.messages[i];
	                }
	                resultMessages.push(translatedMessage);
	            }
	            result[module_2] = resultMessages;
	        }
	        else {
	            result[module_2] = entry.messages;
	        }
	    }
	    return result;
	}
	function touch(file) {
	    var d = new Date();
	    fs.utimes(file, d, d, function () {
	    });
	}
	function cacheBundle(key, bundle) {
	    resolvedBundles[key] = bundle;
	    return bundle;
	}
	function loadNlsBundleOrCreateFromI18n(header, bundlePath) {
	    var result;
	    var bundle = path.join(options.cacheRoot, "".concat(header.id, "-").concat(header.hash, ".json"));
	    var useMemoryOnly = false;
	    var writeBundle = false;
	    try {
	        result = JSON.parse(fs.readFileSync(bundle, { encoding: 'utf8', flag: 'r' }));
	        touch(bundle);
	        return result;
	    }
	    catch (err) {
	        if (err.code === 'ENOENT') {
	            writeBundle = true;
	        }
	        else if (err instanceof SyntaxError) {
	            console.log("Syntax error parsing message bundle: ".concat(err.message, "."));
	            fs.unlink(bundle, function (err) {
	                if (err) {
	                    console.error("Deleting corrupted bundle ".concat(bundle, " failed."));
	                }
	            });
	            useMemoryOnly = true;
	        }
	        else {
	            throw err;
	        }
	    }
	    result = createNLSBundle(header, bundlePath);
	    if (!result || useMemoryOnly) {
	        return result;
	    }
	    if (writeBundle) {
	        try {
	            fs.writeFileSync(bundle, JSON.stringify(result), { encoding: 'utf8', flag: 'wx' });
	        }
	        catch (err) {
	            if (err.code === 'EEXIST') {
	                return result;
	            }
	            throw err;
	        }
	    }
	    return result;
	}
	function loadDefaultNlsBundle(bundlePath) {
	    try {
	        return createDefaultNlsBundle(bundlePath);
	    }
	    catch (err) {
	        console.log("Generating default bundle from meta data failed.", err);
	        return undefined;
	    }
	}
	function loadNlsBundle(header, bundlePath) {
	    var result;
	    if (supportsLanguagePack()) {
	        try {
	            result = loadNlsBundleOrCreateFromI18n(header, bundlePath);
	        }
	        catch (err) {
	            console.log("Load or create bundle failed ", err);
	        }
	    }
	    if (!result) {
	        if (options.languagePackSupport) {
	            return loadDefaultNlsBundle(bundlePath);
	        }
	        var candidate = findInTheBoxBundle(bundlePath);
	        if (candidate) {
	            try {
	                return readJsonFileSync(candidate);
	            }
	            catch (err) {
	                console.log("Loading in the box message bundle failed.", err);
	            }
	        }
	        result = loadDefaultNlsBundle(bundlePath);
	    }
	    return result;
	}
	function tryFindMetaDataHeaderFile(file) {
	    var result;
	    var dirname = path.dirname(file);
	    while (true) {
	        result = path.join(dirname, 'nls.metadata.header.json');
	        if (fs.existsSync(result)) {
	            break;
	        }
	        var parent = path.dirname(dirname);
	        if (parent === dirname) {
	            result = undefined;
	            break;
	        }
	        else {
	            dirname = parent;
	        }
	    }
	    return result;
	}
	function loadMessageBundle(file) {
	    if (!file) {
	        return common_1.localize;
	    }
	    var ext = path.extname(file);
	    if (ext) {
	        file = file.substr(0, file.length - ext.length);
	    }
	    if (options.messageFormat === common_1.MessageFormat.both || options.messageFormat === common_1.MessageFormat.bundle) {
	        var headerFile = tryFindMetaDataHeaderFile(file);
	        if (headerFile) {
	            var bundlePath = path.dirname(headerFile);
	            var bundle = resolvedBundles[bundlePath];
	            if (bundle === undefined) {
	                try {
	                    var header = JSON.parse(fs.readFileSync(headerFile, 'utf8'));
	                    try {
	                        var nlsBundle = loadNlsBundle(header, bundlePath);
	                        bundle = cacheBundle(bundlePath, nlsBundle ? { header: header, nlsBundle: nlsBundle } : null);
	                    }
	                    catch (err) {
	                        console.error('Failed to load nls bundle', err);
	                        bundle = cacheBundle(bundlePath, null);
	                    }
	                }
	                catch (err) {
	                    console.error('Failed to read header file', err);
	                    bundle = cacheBundle(bundlePath, null);
	                }
	            }
	            if (bundle) {
	                var module_3 = file.substr(bundlePath.length + 1).replace(/\\/g, '/');
	                var messages = bundle.nlsBundle[module_3];
	                if (messages === undefined) {
	                    console.error("Messages for file ".concat(file, " not found. See console for details."));
	                    return function () {
	                        return 'Messages not found.';
	                    };
	                }
	                return createScopedLocalizeFunction(messages);
	            }
	        }
	    }
	    if (options.messageFormat === common_1.MessageFormat.both || options.messageFormat === common_1.MessageFormat.file) {
	        try {
	            var json = readJsonFileSync(resolveLanguage(file));
	            if (Array.isArray(json)) {
	                return createScopedLocalizeFunction(json);
	            }
	            else {
	                if ((0, common_1.isDefined)(json.messages) && (0, common_1.isDefined)(json.keys)) {
	                    return createScopedLocalizeFunction(json.messages);
	                }
	                else {
	                    console.error("String bundle '".concat(file, "' uses an unsupported format."));
	                    return function () {
	                        return 'File bundle has unsupported format. See console for details';
	                    };
	                }
	            }
	        }
	        catch (err) {
	            if (err.code !== 'ENOENT') {
	                console.error('Failed to load single file bundle', err);
	            }
	        }
	    }
	    console.error("Failed to load message bundle for file ".concat(file));
	    return function () {
	        return 'Failed to load message bundle. See console for details.';
	    };
	}
	exports.loadMessageBundle = loadMessageBundle;
	function config(opts) {
	    if (opts) {
	        if (isString(opts.locale)) {
	            options.locale = opts.locale.toLowerCase();
	            options.language = options.locale;
	            resolvedBundles = Object.create(null);
	        }
	        if (opts.messageFormat !== undefined) {
	            options.messageFormat = opts.messageFormat;
	        }
	        if (opts.bundleFormat === common_1.BundleFormat.standalone && options.languagePackSupport === true) {
	            options.languagePackSupport = false;
	        }
	    }
	    (0, common_1.setPseudo)(options.locale === 'pseudo');
	    return loadMessageBundle;
	}
	exports.config = config;
	ral_1.default.install(Object.freeze({
	    loadMessageBundle: loadMessageBundle,
	    config: config
	}));
} (main$3));
getDefaultExportFromCjs(main$3);

var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
const localize = main$3.loadMessageBundle();
const snippetKeyCache = new Map();
let markupSnippetKeys;
const stylesheetCustomSnippetsKeyCache = new Map();
const htmlAbbreviationStartRegex = /^[a-z,A-Z,!,(,[,#,\.\{]/;
const jsxAbbreviationStartRegex = /^[a-z,A-Z,!,(,[,#,\.]/;
const cssAbbreviationRegex = /^-?[a-z,A-Z,!,@,#]/;
const htmlAbbreviationRegex = /[a-z,A-Z\.]/;
const commonlyUsedTags = [...htmlData.tags, 'lorem'];
const bemFilterSuffix = 'bem';
const filterDelimitor = '|';
const trimFilterSuffix = 't';
const commentFilterSuffix = 'c';
const maxFilters = 3;
function doComplete(document, position, syntax, emmetConfig) {
    var _a, _b;
    if (emmetConfig.showExpandedAbbreviation === 'never' || !getEmmetMode(syntax, emmetConfig.excludeLanguages)) {
        return;
    }
    const isStyleSheetRes = isStyleSheet(syntax);
    if (!isStyleSheetRes) {
        if (!snippetKeyCache.has(syntax)) {
            const registry = Object.assign(Object.assign({}, getDefaultSnippets(syntax)), customSnippetsRegistry[syntax]);
            snippetKeyCache.set(syntax, Object.keys(registry));
        }
        markupSnippetKeys = (_a = snippetKeyCache.get(syntax)) !== null && _a !== void 0 ? _a : [];
    }
    const extractOptions = { lookAhead: !isStyleSheetRes, type: isStyleSheetRes ? 'stylesheet' : 'markup' };
    const extractedValue = extractAbbreviation(document, position, extractOptions);
    if (!extractedValue) {
        return;
    }
    const { abbreviationRange, abbreviation, filter } = extractedValue;
    const currentLineTillPosition = getCurrentLine(document, position).substr(0, position.character);
    const currentWord = getCurrentWord$1(currentLineTillPosition);
    if (currentWord === abbreviation
        && currentLineTillPosition.endsWith(`<${abbreviation}`)
        && syntaxes.markup.includes(syntax)) {
        return;
    }
    const expandOptions = getExpandOptions(syntax, emmetConfig, filter);
    let expandedText = "";
    let expandedAbbr;
    let completionItems = [];
    const createExpandedAbbr = (syntax, abbr) => {
        if (!isAbbreviationValid(syntax, abbreviation)) {
            return;
        }
        try {
            expandedText = _default(abbr, expandOptions);
            if (isStyleSheetRes && '!important'.startsWith(abbr)) {
                expandedText = '!important';
            }
        }
        catch (e) {
        }
        if (!expandedText || isExpandedTextNoise(syntax, abbr, expandedText, expandOptions.options)) {
            return;
        }
        expandedAbbr = CompletionItem$1.create(abbr);
        expandedAbbr.textEdit = TextEdit$1.replace(abbreviationRange, escapeNonTabStopDollar(addFinalTabStop(expandedText)));
        expandedAbbr.documentation = replaceTabStopsWithCursors(expandedText);
        expandedAbbr.insertTextFormat = InsertTextFormat$1.Snippet;
        expandedAbbr.detail = localize('Emmet abbreviation', "Emmet Abbreviation");
        expandedAbbr.label = abbreviation;
        expandedAbbr.label += filter ? '|' + filter.replace(',', '|') : "";
        completionItems = [expandedAbbr];
    };
    if (isStyleSheet(syntax)) {
        createExpandedAbbr(syntax, abbreviation);
        if (abbreviation.length > 4
            && cssData$1.properties.find(x => x.startsWith(abbreviation))) {
            return CompletionList$1.create([], true);
        }
        if (expandedAbbr && expandedText.length) {
            expandedAbbr.textEdit = TextEdit$1.replace(abbreviationRange, escapeNonTabStopDollar(addFinalTabStop(expandedText)));
            expandedAbbr.documentation = replaceTabStopsWithCursors(expandedText);
            expandedAbbr.label = removeTabStops(expandedText);
            expandedAbbr.filterText = abbreviation;
            const stylesheetCustomSnippetsKeys = stylesheetCustomSnippetsKeyCache.has(syntax) ?
                stylesheetCustomSnippetsKeyCache.get(syntax) : stylesheetCustomSnippetsKeyCache.get('css');
            completionItems = makeSnippetSuggestion(stylesheetCustomSnippetsKeys !== null && stylesheetCustomSnippetsKeys !== void 0 ? stylesheetCustomSnippetsKeys : [], abbreviation, abbreviation, abbreviationRange, expandOptions, 'Emmet Custom Snippet', false);
            if (!completionItems.find(x => { var _a, _b, _c; return ((_a = x.textEdit) === null || _a === void 0 ? void 0 : _a.newText) && ((_b = x.textEdit) === null || _b === void 0 ? void 0 : _b.newText) === ((_c = expandedAbbr === null || expandedAbbr === void 0 ? void 0 : expandedAbbr.textEdit) === null || _c === void 0 ? void 0 : _c.newText); })) {
                const abbrRegex = new RegExp('.*' + abbreviation.split('').map(x => (x === '$' || x === '+') ? '\\' + x : x).join('.*') + '.*', 'i');
                if (/\d/.test(abbreviation) || abbrRegex.test(expandedAbbr.label)) {
                    completionItems.push(expandedAbbr);
                }
            }
        }
    }
    else {
        createExpandedAbbr(syntax, abbreviation);
        let tagToFindMoreSuggestionsFor = abbreviation;
        const newTagMatches = abbreviation.match(/(>|\+)([\w:-]+)$/);
        if (newTagMatches && newTagMatches.length === 3) {
            tagToFindMoreSuggestionsFor = newTagMatches[2];
        }
        if (syntax !== 'xml') {
            const commonlyUsedTagSuggestions = makeSnippetSuggestion(commonlyUsedTags, tagToFindMoreSuggestionsFor, abbreviation, abbreviationRange, expandOptions, 'Emmet Abbreviation');
            completionItems = completionItems.concat(commonlyUsedTagSuggestions);
        }
        if (emmetConfig.showAbbreviationSuggestions === true) {
            const abbreviationSuggestions = makeSnippetSuggestion(markupSnippetKeys.filter(x => !commonlyUsedTags.includes(x)), tagToFindMoreSuggestionsFor, abbreviation, abbreviationRange, expandOptions, 'Emmet Abbreviation');
            if (expandedAbbr && abbreviationSuggestions.length > 0 && tagToFindMoreSuggestionsFor !== abbreviation) {
                expandedAbbr.sortText = '0' + expandedAbbr.label;
                abbreviationSuggestions.forEach(item => {
                    item.filterText = abbreviation;
                    item.sortText = '9' + abbreviation;
                });
            }
            completionItems = completionItems.concat(abbreviationSuggestions);
        }
        if (syntax === 'html' && completionItems.length >= 2 && abbreviation.includes(":")
            && ((_b = expandedAbbr === null || expandedAbbr === void 0 ? void 0 : expandedAbbr.textEdit) === null || _b === void 0 ? void 0 : _b.newText) === `<${abbreviation}>\${0}</${abbreviation}>`) {
            completionItems = completionItems.filter(item => item.label !== abbreviation);
        }
    }
    if (emmetConfig.showSuggestionsAsSnippets === true) {
        completionItems.forEach(x => x.kind = CompletionItemKind$1.Snippet);
    }
    return completionItems.length ? CompletionList$1.create(completionItems, true) : undefined;
}
function makeSnippetSuggestion(snippetKeys, prefix, abbreviation, abbreviationRange, expandOptions, snippetDetail, skipFullMatch = true) {
    if (!prefix || !snippetKeys) {
        return [];
    }
    const snippetCompletions = [];
    snippetKeys.forEach(snippetKey => {
        if (!snippetKey.startsWith(prefix.toLowerCase()) || (skipFullMatch && snippetKey === prefix.toLowerCase())) {
            return;
        }
        const currentAbbr = abbreviation + snippetKey.substr(prefix.length);
        let expandedAbbr;
        try {
            expandedAbbr = _default(currentAbbr, expandOptions);
        }
        catch (e) {
        }
        if (!expandedAbbr) {
            return;
        }
        const item = CompletionItem$1.create(prefix + snippetKey.substr(prefix.length));
        item.documentation = replaceTabStopsWithCursors(expandedAbbr);
        item.detail = snippetDetail;
        item.textEdit = TextEdit$1.replace(abbreviationRange, escapeNonTabStopDollar(addFinalTabStop(expandedAbbr)));
        item.insertTextFormat = InsertTextFormat$1.Snippet;
        snippetCompletions.push(item);
    });
    return snippetCompletions;
}
function getCurrentWord$1(currentLineTillPosition) {
    if (currentLineTillPosition) {
        const matches = currentLineTillPosition.match(/[\w,:,-,\.]*$/);
        if (matches) {
            return matches[0];
        }
    }
}
function replaceTabStopsWithCursors(expandedWord) {
    return expandedWord.replace(/([^\\])\$\{\d+\}/g, '$1|').replace(/\$\{\d+:([^\}]+)\}/g, '$1');
}
function removeTabStops(expandedWord) {
    return expandedWord.replace(/([^\\])\$\{\d+\}/g, '$1').replace(/\$\{\d+:([^\}]+)\}/g, '$1');
}
function escapeNonTabStopDollar(text) {
    return text ? text.replace(/([^\\])(\$)([^\{])/g, '$1\\$2$3') : text;
}
function addFinalTabStop(text) {
    if (!text || !text.trim()) {
        return text;
    }
    let maxTabStop = -1;
    let maxTabStopRanges = [];
    let foundLastStop = false;
    let replaceWithLastStop = false;
    let i = 0;
    const n = text.length;
    try {
        while (i < n && !foundLastStop) {
            if (text[i++] != '$' || text[i++] != '{') {
                continue;
            }
            let numberStart = -1;
            let numberEnd = -1;
            while (i < n && /\d/.test(text[i])) {
                numberStart = numberStart < 0 ? i : numberStart;
                numberEnd = i + 1;
                i++;
            }
            if (numberStart === -1 || numberEnd === -1 || i >= n || (text[i] != '}' && text[i] != ':')) {
                continue;
            }
            const currentTabStop = text.substring(numberStart, numberEnd);
            foundLastStop = currentTabStop === '0';
            if (foundLastStop) {
                break;
            }
            let foundPlaceholder = false;
            if (text[i++] == ':') {
                while (i < n) {
                    if (text[i] == '}') {
                        foundPlaceholder = true;
                        break;
                    }
                    i++;
                }
            }
            if (Number(currentTabStop) > Number(maxTabStop)) {
                maxTabStop = Number(currentTabStop);
                maxTabStopRanges = [{ numberStart, numberEnd }];
                replaceWithLastStop = !foundPlaceholder;
            }
            else if (Number(currentTabStop) === maxTabStop) {
                maxTabStopRanges.push({ numberStart, numberEnd });
            }
        }
    }
    catch (e) {
    }
    if (replaceWithLastStop && !foundLastStop) {
        for (let i = 0; i < maxTabStopRanges.length; i++) {
            const rangeStart = maxTabStopRanges[i].numberStart;
            const rangeEnd = maxTabStopRanges[i].numberEnd;
            text = text.substr(0, rangeStart) + '0' + text.substr(rangeEnd);
        }
    }
    return text;
}
function getCurrentLine(document, position) {
    const offset = document.offsetAt(position);
    const text = document.getText();
    let start = 0;
    let end = text.length;
    for (let i = offset - 1; i >= 0; i--) {
        if (text[i] === '\n') {
            start = i + 1;
            break;
        }
    }
    for (let i = offset; i < text.length; i++) {
        if (text[i] === '\n') {
            end = i;
            break;
        }
    }
    return text.substring(start, end);
}
let customSnippetsRegistry = {};
let variablesFromFile = {};
let profilesFromFile = {};
const emmetSnippetField = (index, placeholder) => `\${${index}${placeholder ? ':' + placeholder : ''}}`;
function isStyleSheet(syntax) {
    return syntaxes.stylesheet.includes(syntax);
}
function getSyntaxType(syntax) {
    return isStyleSheet(syntax) ? 'stylesheet' : 'markup';
}
function getDefaultSyntax(syntax) {
    return isStyleSheet(syntax) ? 'css' : 'html';
}
function getDefaultSnippets(syntax) {
    const syntaxType = getSyntaxType(syntax);
    const emptyUserConfig = { type: syntaxType, syntax };
    const resolvedConfig = resolveConfig_1(emptyUserConfig);
    return syntax === 'xml' ? {} : resolvedConfig.snippets;
}
function getFilters(text, pos) {
    let filter;
    for (let i = 0; i < maxFilters; i++) {
        if (text.endsWith(`${filterDelimitor}${bemFilterSuffix}`, pos)) {
            pos -= bemFilterSuffix.length + 1;
            filter = filter ? bemFilterSuffix + ',' + filter : bemFilterSuffix;
        }
        else if (text.endsWith(`${filterDelimitor}${commentFilterSuffix}`, pos)) {
            pos -= commentFilterSuffix.length + 1;
            filter = filter ? commentFilterSuffix + ',' + filter : commentFilterSuffix;
        }
        else if (text.endsWith(`${filterDelimitor}${trimFilterSuffix}`, pos)) {
            pos -= trimFilterSuffix.length + 1;
            filter = filter ? trimFilterSuffix + ',' + filter : trimFilterSuffix;
        }
        else {
            break;
        }
    }
    return {
        pos: pos,
        filter: filter
    };
}
function extractAbbreviation(document, position, options) {
    const currentLine = getCurrentLine(document, position);
    const currentLineTillPosition = currentLine.substr(0, position.character);
    const { pos, filter } = getFilters(currentLineTillPosition, position.character);
    const lengthOccupiedByFilter = filter ? filter.length + 1 : 0;
    const result = extract(currentLine, pos, options);
    if (!result) {
        return;
    }
    const rangeToReplace = Range$1.create(position.line, result.location, position.line, result.location + result.abbreviation.length + lengthOccupiedByFilter);
    return {
        abbreviationRange: rangeToReplace,
        abbreviation: result.abbreviation,
        filter
    };
}
function extractAbbreviationFromText(text, syntax) {
    if (!text) {
        return;
    }
    const { pos, filter } = getFilters(text, text.length);
    const extractOptions = (isStyleSheet(syntax) || syntax === 'stylesheet') ?
        { syntax: 'stylesheet', lookAhead: false } :
        { lookAhead: true };
    const result = extract(text, pos, extractOptions);
    if (!result) {
        return;
    }
    return {
        abbreviation: result.abbreviation,
        filter
    };
}
function isAbbreviationValid(syntax, abbreviation) {
    if (!abbreviation) {
        return false;
    }
    if (isStyleSheet(syntax)) {
        if (abbreviation.includes('#')) {
            if (abbreviation.startsWith('#')) {
                const hexColorRegex = /^#[\d,a-f,A-F]{1,6}$/;
                return hexColorRegex.test(abbreviation);
            }
            else if (commonlyUsedTags.includes(abbreviation.substring(0, abbreviation.indexOf('#')))) {
                return false;
            }
        }
        return cssAbbreviationRegex.test(abbreviation);
    }
    if (abbreviation.startsWith('!')) {
        return !/[^!]/.test(abbreviation);
    }
    if ((/\(/.test(abbreviation) || /\)/.test(abbreviation))
        && !/\{[^\}\{]*[\(\)]+[^\}\{]*\}(?:[>\+\*\^]|$)/.test(abbreviation)
        && !/\(.*\)[>\+\*\^]/.test(abbreviation)
        && !/\[[^\[\]\(\)]+=".*"\]/.test(abbreviation)
        && !/[>\+\*\^]\(.*\)/.test(abbreviation)) {
        return false;
    }
    if (syntax === 'jsx') {
        return (jsxAbbreviationStartRegex.test(abbreviation) && htmlAbbreviationRegex.test(abbreviation));
    }
    return (htmlAbbreviationStartRegex.test(abbreviation) && htmlAbbreviationRegex.test(abbreviation));
}
function isExpandedTextNoise(syntax, abbreviation, expandedText, options) {
    var _a, _b;
    if (isStyleSheet(syntax) && options) {
        const between = (_a = options['stylesheet.between']) !== null && _a !== void 0 ? _a : ': ';
        const after = (_b = options['stylesheet.after']) !== null && _b !== void 0 ? _b : ';';
        let endPrefixIndex = abbreviation.indexOf(between[0], Math.max(abbreviation.length - between.length, 0));
        endPrefixIndex = endPrefixIndex >= 0 ? endPrefixIndex : abbreviation.length;
        const abbr = abbreviation.substring(0, endPrefixIndex);
        return expandedText === `${abbr}${between}\${0}${after}` ||
            expandedText.replace(/\s/g, '') === abbreviation.replace(/\s/g, '') + after;
    }
    if (syntax === 'xml' &&
        commonlyUsedTags.some(tag => tag.startsWith(abbreviation.toLowerCase()))) {
        return true;
    }
    if (commonlyUsedTags.includes(abbreviation.toLowerCase()) ||
        markupSnippetKeys.includes(abbreviation)) {
        return false;
    }
    if (/[-,:]/.test(abbreviation) && !/--|::/.test(abbreviation) &&
        !abbreviation.endsWith(':')) {
        return false;
    }
    if (abbreviation === '.') {
        return false;
    }
    const dotMatches = abbreviation.match(/^([a-z,A-Z,\d]*)\.$/);
    if (dotMatches) {
        if (dotMatches[1] && htmlData.tags.includes(dotMatches[1])) {
            return false;
        }
        return true;
    }
    if (syntax === 'jsx' && /^([A-Z][A-Za-z0-9]*)+$/.test(abbreviation)) {
        return false;
    }
    return (expandedText.toLowerCase() === `<${abbreviation.toLowerCase()}>\${1}</${abbreviation.toLowerCase()}>`);
}
function getExpandOptions(syntax, emmetConfig, filter) {
    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
    emmetConfig = emmetConfig !== null && emmetConfig !== void 0 ? emmetConfig : {};
    emmetConfig['preferences'] = (_a = emmetConfig['preferences']) !== null && _a !== void 0 ? _a : {};
    const preferences = emmetConfig['preferences'];
    const stylesheetSyntax = isStyleSheet(syntax) ? syntax : 'css';
    const profile = getProfile(syntax, (_b = emmetConfig['syntaxProfiles']) !== null && _b !== void 0 ? _b : {});
    const filtersFromProfile = (profile && profile['filters']) ? profile['filters'].split(',') : [];
    const trimmedFilters = filtersFromProfile.map(filterFromProfile => filterFromProfile.trim());
    const bemEnabled = (filter && filter.split(',').some(x => x.trim() === 'bem')) || trimmedFilters.includes('bem');
    const commentEnabled = (filter && filter.split(',').some(x => x.trim() === 'c')) || trimmedFilters.includes('c');
    const formatters = getFormatters(syntax, emmetConfig['preferences']);
    const unitAliases = ((formatters === null || formatters === void 0 ? void 0 : formatters.stylesheet) && formatters.stylesheet['unitAliases']) || {};
    const defaultVSCodeOptions = {
        'output.formatSkip': ['html'],
        'output.formatForce': ['body'],
        'output.inlineBreak': 0,
        'output.compactBoolean': false,
        'output.reverseAttributes': false,
        'output.field': emmetSnippetField,
        'markup.href': true,
        'comment.enabled': false,
        'comment.trigger': ['id', 'class'],
        'comment.before': '',
        'comment.after': '\n<!-- /[#ID][.CLASS] -->',
        'bem.enabled': false,
        'bem.element': '__',
        'bem.modifier': '_',
        'jsx.enabled': syntax === 'jsx',
        'stylesheet.shortHex': true,
        'stylesheet.between': syntax === 'stylus' ? ' ' : ': ',
        'stylesheet.after': (syntax === 'sass' || syntax === 'stylus') ? '' : ';',
        'stylesheet.intUnit': 'px',
        'stylesheet.floatUnit': 'em',
        'stylesheet.unitAliases': { e: 'em', p: '%', x: 'ex', r: 'rem' },
        'stylesheet.fuzzySearchMinScore': 0.3,
    };
    const userPreferenceOptions = {
        'output.tagCase': profile['tagCase'],
        'output.attributeCase': profile['attributeCase'],
        'output.attributeQuotes': profile['attributeQuotes'],
        'output.format': (_c = profile['format']) !== null && _c !== void 0 ? _c : true,
        'output.formatSkip': preferences['format.noIndentTags'],
        'output.formatForce': preferences['format.forceIndentationForTags'],
        'output.inlineBreak': (_d = profile['inlineBreak']) !== null && _d !== void 0 ? _d : preferences['output.inlineBreak'],
        'output.compactBoolean': (_e = profile['compactBooleanAttributes']) !== null && _e !== void 0 ? _e : preferences['profile.allowCompactBoolean'],
        'output.reverseAttributes': preferences['output.reverseAttributes'],
        'output.selfClosingStyle': (_g = (_f = profile['selfClosingStyle']) !== null && _f !== void 0 ? _f : preferences['output.selfClosingStyle']) !== null && _g !== void 0 ? _g : getClosingStyle(syntax),
        'output.field': emmetSnippetField,
        'comment.enabled': commentEnabled,
        'comment.trigger': preferences['filter.commentTrigger'],
        'comment.before': preferences['filter.commentBefore'],
        'comment.after': preferences['filter.commentAfter'],
        'bem.enabled': bemEnabled,
        'bem.element': (_h = preferences['bem.elementSeparator']) !== null && _h !== void 0 ? _h : '__',
        'bem.modifier': (_j = preferences['bem.modifierSeparator']) !== null && _j !== void 0 ? _j : '_',
        'jsx.enabled': syntax === 'jsx',
        'stylesheet.shortHex': preferences['css.color.short'],
        'stylesheet.between': preferences[`${stylesheetSyntax}.valueSeparator`],
        'stylesheet.after': preferences[`${stylesheetSyntax}.propertyEnd`],
        'stylesheet.intUnit': preferences['css.intUnit'],
        'stylesheet.floatUnit': preferences['css.floatUnit'],
        'stylesheet.unitAliases': unitAliases,
        'stylesheet.fuzzySearchMinScore': preferences['css.fuzzySearchMinScore'],
    };
    const combinedOptions = {};
    [...Object.keys(defaultVSCodeOptions), ...Object.keys(userPreferenceOptions)].forEach(key => {
        var _a;
        const castKey = key;
        combinedOptions[castKey] = (_a = userPreferenceOptions[castKey]) !== null && _a !== void 0 ? _a : defaultVSCodeOptions[castKey];
    });
    const mergedAliases = Object.assign(Object.assign({}, defaultVSCodeOptions['stylesheet.unitAliases']), userPreferenceOptions['stylesheet.unitAliases']);
    combinedOptions['stylesheet.unitAliases'] = mergedAliases;
    const type = getSyntaxType(syntax);
    const variables = getVariables(emmetConfig['variables']);
    const baseSyntax = getDefaultSyntax(syntax);
    const snippets = (type === 'stylesheet') ?
        ((_k = customSnippetsRegistry[syntax]) !== null && _k !== void 0 ? _k : customSnippetsRegistry[baseSyntax]) :
        customSnippetsRegistry[syntax];
    return {
        type,
        options: combinedOptions,
        variables,
        snippets,
        syntax,
        text: undefined,
        maxRepeat: 1000,
    };
}
function getClosingStyle(syntax) {
    switch (syntax) {
        case 'xhtml': return 'xhtml';
        case 'xml': return 'xml';
        case 'xsl': return 'xml';
        case 'jsx': return 'xhtml';
        default: return 'html';
    }
}
function parseAbbreviation(abbreviation, options) {
    const resolvedOptions = resolveConfig_1(options);
    return (options.type === 'stylesheet') ?
        parseStylesheet(abbreviation, resolvedOptions) :
        parseMarkup(abbreviation, resolvedOptions);
}
function expandAbbreviation(abbreviation, config) {
    let expandedText;
    const resolvedConfig = resolveConfig_1(config);
    if (config.type === 'stylesheet') {
        if (typeof abbreviation === 'string') {
            expandedText = _default(abbreviation, resolvedConfig);
        }
        else {
            expandedText = stringifyStylesheet(abbreviation, resolvedConfig);
        }
    }
    else {
        if (typeof abbreviation === 'string') {
            expandedText = _default(abbreviation, resolvedConfig);
        }
        else {
            expandedText = stringifyMarkup(abbreviation, resolvedConfig);
        }
    }
    return escapeNonTabStopDollar(addFinalTabStop(expandedText));
}
function getProfile(syntax, profilesFromSettings) {
    if (!profilesFromSettings) {
        profilesFromSettings = {};
    }
    const profilesConfig = Object.assign({}, profilesFromFile, profilesFromSettings);
    const options = profilesConfig[syntax];
    if (!options || typeof options === 'string') {
        if (options === 'xhtml') {
            return {
                selfClosingStyle: 'xhtml'
            };
        }
        return {};
    }
    const newOptions = {};
    for (const key in options) {
        switch (key) {
            case 'tag_case':
                newOptions['tagCase'] = (options[key] === 'lower' || options[key] === 'upper') ? options[key] : '';
                break;
            case 'attr_case':
                newOptions['attributeCase'] = (options[key] === 'lower' || options[key] === 'upper') ? options[key] : '';
                break;
            case 'attr_quotes':
                newOptions['attributeQuotes'] = options[key];
                break;
            case 'tag_nl':
                newOptions['format'] = (options[key] === true || options[key] === false) ? options[key] : true;
                break;
            case 'inline_break':
                newOptions['inlineBreak'] = options[key];
                break;
            case 'self_closing_tag':
                if (options[key] === true) {
                    newOptions['selfClosingStyle'] = 'xml';
                    break;
                }
                if (options[key] === false) {
                    newOptions['selfClosingStyle'] = 'html';
                    break;
                }
                newOptions['selfClosingStyle'] = options[key];
                break;
            case 'compact_bool':
                newOptions['compactBooleanAttributes'] = options[key];
                break;
            default:
                newOptions[key] = options[key];
                break;
        }
    }
    return newOptions;
}
function getVariables(variablesFromSettings) {
    if (!variablesFromSettings) {
        return variablesFromFile;
    }
    return Object.assign({}, variablesFromFile, variablesFromSettings);
}
function getFormatters(syntax, preferences) {
    if (!preferences || typeof preferences !== 'object') {
        return {};
    }
    if (!isStyleSheet(syntax)) {
        const commentFormatter = {};
        for (const key in preferences) {
            switch (key) {
                case 'filter.commentAfter':
                    commentFormatter['after'] = preferences[key];
                    break;
                case 'filter.commentBefore':
                    commentFormatter['before'] = preferences[key];
                    break;
                case 'filter.commentTrigger':
                    commentFormatter['trigger'] = preferences[key];
                    break;
            }
        }
        return {
            comment: commentFormatter
        };
    }
    let fuzzySearchMinScore = typeof (preferences === null || preferences === void 0 ? void 0 : preferences['css.fuzzySearchMinScore']) === 'number' ? preferences['css.fuzzySearchMinScore'] : 0.3;
    if (fuzzySearchMinScore > 1) {
        fuzzySearchMinScore = 1;
    }
    else if (fuzzySearchMinScore < 0) {
        fuzzySearchMinScore = 0;
    }
    const stylesheetFormatter = {
        'fuzzySearchMinScore': fuzzySearchMinScore
    };
    for (const key in preferences) {
        switch (key) {
            case 'css.floatUnit':
                stylesheetFormatter['floatUnit'] = preferences[key];
                break;
            case 'css.intUnit':
                stylesheetFormatter['intUnit'] = preferences[key];
                break;
            case 'css.unitAliases':
                const unitAliases = {};
                preferences[key].split(',').forEach((alias) => {
                    if (!alias || !alias.trim() || !alias.includes(':')) {
                        return;
                    }
                    const aliasName = alias.substr(0, alias.indexOf(':'));
                    const aliasValue = alias.substr(aliasName.length + 1);
                    if (!aliasName.trim() || !aliasValue) {
                        return;
                    }
                    unitAliases[aliasName.trim()] = aliasValue;
                });
                stylesheetFormatter['unitAliases'] = unitAliases;
                break;
            case `${syntax}.valueSeparator`:
                stylesheetFormatter['between'] = preferences[key];
                break;
            case `${syntax}.propertyEnd`:
                stylesheetFormatter['after'] = preferences[key];
                break;
        }
    }
    return {
        stylesheet: stylesheetFormatter
    };
}
function updateExtensionsPath(emmetExtensionsPathSetting, fs, workspaceFolderPaths, homeDir) {
    return __awaiter(this, void 0, void 0, function* () {
        resetSettingsFromFile();
        if (!emmetExtensionsPathSetting.length) {
            return;
        }
        const emmetExtensionsPathUri = [];
        for (let emmetExtensionsPath of emmetExtensionsPathSetting) {
            if (emmetExtensionsPath) {
                emmetExtensionsPath = emmetExtensionsPath.trim();
            }
            if (emmetExtensionsPath.length && emmetExtensionsPath[0] === '~') {
                if (homeDir) {
                    emmetExtensionsPathUri.push(joinPath$1(homeDir, emmetExtensionsPath.substr(1)));
                }
            }
            else if (!isAbsolutePath(emmetExtensionsPath)) {
                if (workspaceFolderPaths) {
                    for (const workspacePath of workspaceFolderPaths) {
                        emmetExtensionsPathUri.push(joinPath$1(workspacePath, emmetExtensionsPath));
                    }
                }
            }
            else {
                emmetExtensionsPathUri.push(URI$1.file(emmetExtensionsPath));
            }
        }
        for (const uri of emmetExtensionsPathUri) {
            try {
                if ((yield fs.stat(uri)).type !== FileType$1.Directory) {
                    continue;
                }
            }
            catch (e) {
                continue;
            }
            const snippetsPath = joinPath$1(uri, 'snippets.json');
            const profilesPath = joinPath$1(uri, 'syntaxProfiles.json');
            let decoder;
            if (typeof globalThis.TextDecoder === 'function') {
                decoder = new globalThis.TextDecoder();
            }
            else {
                decoder = new require$$0$2.TextDecoder();
            }
            let snippetsDataStr = "";
            try {
                const snippetsData = yield fs.readFile(snippetsPath);
                snippetsDataStr = decoder.decode(snippetsData);
            }
            catch (e) {
            }
            if (snippetsDataStr.length) {
                try {
                    const snippetsJson = tryParseFile(snippetsPath, snippetsDataStr);
                    if (snippetsJson['variables']) {
                        updateVariables(snippetsJson['variables']);
                    }
                    updateSnippets(snippetsJson);
                }
                catch (e) {
                    resetSettingsFromFile();
                    throw e;
                }
            }
            let profilesDataStr = "";
            try {
                const profilesData = yield fs.readFile(profilesPath);
                profilesDataStr = decoder.decode(profilesData);
            }
            catch (e) {
            }
            if (profilesDataStr.length) {
                try {
                    const profilesJson = tryParseFile(profilesPath, profilesDataStr);
                    updateProfiles(profilesJson);
                }
                catch (e) {
                    resetSettingsFromFile();
                    throw e;
                }
            }
        }
    });
}
function tryParseFile(strPath, dataStr) {
    let errors = [];
    const json = parse$3(dataStr, errors);
    if (errors.length) {
        throw new Error(`Found error ${printParseErrorCode(errors[0].error)} while parsing the file ${strPath} at offset ${errors[0].offset}`);
    }
    return json;
}
function updateVariables(varsJson) {
    if (typeof varsJson === 'object' && varsJson) {
        variablesFromFile = Object.assign({}, variablesFromFile, varsJson);
    }
    else {
        throw new Error(localize("emmetInvalidVariables", "Invalid emmet.variables field. See https://code.visualstudio.com/docs/editor/emmet#_emmet-configuration for a valid example."));
    }
}
function updateProfiles(profileJson) {
    if (typeof profileJson === 'object' && profileJson) {
        profilesFromFile = Object.assign({}, profilesFromFile, profileJson);
    }
    else {
        throw new Error(localize("emmetInvalidProfiles", "Invalid syntax profile. See https://code.visualstudio.com/docs/editor/emmet#_emmet-configuration for a valid example."));
    }
}
function updateSnippets(snippetsJson) {
    if (typeof snippetsJson === 'object' && snippetsJson) {
        Object.keys(snippetsJson).forEach(syntax => {
            if (!snippetsJson[syntax]['snippets']) {
                return;
            }
            const baseSyntax = getDefaultSyntax(syntax);
            let customSnippets = snippetsJson[syntax]['snippets'];
            if (snippetsJson[baseSyntax] && snippetsJson[baseSyntax]['snippets'] && baseSyntax !== syntax) {
                customSnippets = Object.assign({}, snippetsJson[baseSyntax]['snippets'], snippetsJson[syntax]['snippets']);
            }
            if (!isStyleSheet(syntax)) {
                for (const snippetKey in customSnippets) {
                    if (customSnippets.hasOwnProperty(snippetKey)
                        && customSnippets[snippetKey].startsWith('<')
                        && customSnippets[snippetKey].endsWith('>')) {
                        customSnippets[snippetKey] = `{${customSnippets[snippetKey]}}`;
                    }
                }
            }
            else {
                const prevSnippetKeys = stylesheetCustomSnippetsKeyCache.get(syntax);
                const mergedSnippetKeys = Object.assign([], prevSnippetKeys, Object.keys(customSnippets));
                stylesheetCustomSnippetsKeyCache.set(syntax, mergedSnippetKeys);
            }
            const prevSnippetsRegistry = customSnippetsRegistry[syntax];
            const newSnippets = parseSnippets(customSnippets);
            const mergedSnippets = Object.assign({}, prevSnippetsRegistry, newSnippets);
            customSnippetsRegistry[syntax] = mergedSnippets;
        });
    }
    else {
        throw new Error(localize("emmetInvalidSnippets", "Invalid snippets file. See https://code.visualstudio.com/docs/editor/emmet#_using-custom-emmet-snippets for a valid example."));
    }
}
function resetSettingsFromFile() {
    customSnippetsRegistry = {};
    snippetKeyCache.clear();
    stylesheetCustomSnippetsKeyCache.clear();
    profilesFromFile = {};
    variablesFromFile = {};
}
function getEmmetMode(language, excludedLanguages = []) {
    if (!language || excludedLanguages.includes(language)) {
        return;
    }
    if (/\b(typescriptreact|javascriptreact|jsx-tags)\b/.test(language)) {
        return 'jsx';
    }
    if (language === 'sass-indented') {
        return 'sass';
    }
    if (language === 'jade') {
        return 'pug';
    }
    if (syntaxes.markup.includes(language) || syntaxes.stylesheet.includes(language)) {
        return language;
    }
}

var emmetHelper = /*#__PURE__*/Object.freeze({
	__proto__: null,
	get FileType () { return FileType$1; },
	doComplete: doComplete,
	emmetSnippetField: emmetSnippetField,
	isStyleSheet: isStyleSheet,
	getSyntaxType: getSyntaxType,
	getDefaultSyntax: getDefaultSyntax,
	getDefaultSnippets: getDefaultSnippets,
	extractAbbreviation: extractAbbreviation,
	extractAbbreviationFromText: extractAbbreviationFromText,
	isAbbreviationValid: isAbbreviationValid,
	getExpandOptions: getExpandOptions,
	parseAbbreviation: parseAbbreviation,
	expandAbbreviation: expandAbbreviation,
	updateExtensionsPath: updateExtensionsPath,
	getEmmetMode: getEmmetMode
});

var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(emmetHelper);

var CSSDocument$1 = {};

var service$1 = {};

var TokenType;
(function (TokenType) {
    TokenType[TokenType["Ident"] = 0] = "Ident";
    TokenType[TokenType["AtKeyword"] = 1] = "AtKeyword";
    TokenType[TokenType["String"] = 2] = "String";
    TokenType[TokenType["BadString"] = 3] = "BadString";
    TokenType[TokenType["UnquotedString"] = 4] = "UnquotedString";
    TokenType[TokenType["Hash"] = 5] = "Hash";
    TokenType[TokenType["Num"] = 6] = "Num";
    TokenType[TokenType["Percentage"] = 7] = "Percentage";
    TokenType[TokenType["Dimension"] = 8] = "Dimension";
    TokenType[TokenType["UnicodeRange"] = 9] = "UnicodeRange";
    TokenType[TokenType["CDO"] = 10] = "CDO";
    TokenType[TokenType["CDC"] = 11] = "CDC";
    TokenType[TokenType["Colon"] = 12] = "Colon";
    TokenType[TokenType["SemiColon"] = 13] = "SemiColon";
    TokenType[TokenType["CurlyL"] = 14] = "CurlyL";
    TokenType[TokenType["CurlyR"] = 15] = "CurlyR";
    TokenType[TokenType["ParenthesisL"] = 16] = "ParenthesisL";
    TokenType[TokenType["ParenthesisR"] = 17] = "ParenthesisR";
    TokenType[TokenType["BracketL"] = 18] = "BracketL";
    TokenType[TokenType["BracketR"] = 19] = "BracketR";
    TokenType[TokenType["Whitespace"] = 20] = "Whitespace";
    TokenType[TokenType["Includes"] = 21] = "Includes";
    TokenType[TokenType["Dashmatch"] = 22] = "Dashmatch";
    TokenType[TokenType["SubstringOperator"] = 23] = "SubstringOperator";
    TokenType[TokenType["PrefixOperator"] = 24] = "PrefixOperator";
    TokenType[TokenType["SuffixOperator"] = 25] = "SuffixOperator";
    TokenType[TokenType["Delim"] = 26] = "Delim";
    TokenType[TokenType["EMS"] = 27] = "EMS";
    TokenType[TokenType["EXS"] = 28] = "EXS";
    TokenType[TokenType["Length"] = 29] = "Length";
    TokenType[TokenType["Angle"] = 30] = "Angle";
    TokenType[TokenType["Time"] = 31] = "Time";
    TokenType[TokenType["Freq"] = 32] = "Freq";
    TokenType[TokenType["Exclamation"] = 33] = "Exclamation";
    TokenType[TokenType["Resolution"] = 34] = "Resolution";
    TokenType[TokenType["Comma"] = 35] = "Comma";
    TokenType[TokenType["Charset"] = 36] = "Charset";
    TokenType[TokenType["EscapedJavaScript"] = 37] = "EscapedJavaScript";
    TokenType[TokenType["BadEscapedJavaScript"] = 38] = "BadEscapedJavaScript";
    TokenType[TokenType["Comment"] = 39] = "Comment";
    TokenType[TokenType["SingleLineComment"] = 40] = "SingleLineComment";
    TokenType[TokenType["EOF"] = 41] = "EOF";
    TokenType[TokenType["ContainerQueryLength"] = 42] = "ContainerQueryLength";
    TokenType[TokenType["CustomToken"] = 43] = "CustomToken";
})(TokenType || (TokenType = {}));
class MultiLineStream {
    constructor(source) {
        this.source = source;
        this.len = source.length;
        this.position = 0;
    }
    substring(from, to = this.position) {
        return this.source.substring(from, to);
    }
    eos() {
        return this.len <= this.position;
    }
    pos() {
        return this.position;
    }
    goBackTo(pos) {
        this.position = pos;
    }
    goBack(n) {
        this.position -= n;
    }
    advance(n) {
        this.position += n;
    }
    nextChar() {
        return this.source.charCodeAt(this.position++) || 0;
    }
    peekChar(n = 0) {
        return this.source.charCodeAt(this.position + n) || 0;
    }
    lookbackChar(n = 0) {
        return this.source.charCodeAt(this.position - n) || 0;
    }
    advanceIfChar(ch) {
        if (ch === this.source.charCodeAt(this.position)) {
            this.position++;
            return true;
        }
        return false;
    }
    advanceIfChars(ch) {
        if (this.position + ch.length > this.source.length) {
            return false;
        }
        let i = 0;
        for (; i < ch.length; i++) {
            if (this.source.charCodeAt(this.position + i) !== ch[i]) {
                return false;
            }
        }
        this.advance(i);
        return true;
    }
    advanceWhileChar(condition) {
        const posNow = this.position;
        while (this.position < this.len && condition(this.source.charCodeAt(this.position))) {
            this.position++;
        }
        return this.position - posNow;
    }
}
const _a = 'a'.charCodeAt(0);
const _f = 'f'.charCodeAt(0);
const _z = 'z'.charCodeAt(0);
const _A = 'A'.charCodeAt(0);
const _F = 'F'.charCodeAt(0);
const _Z = 'Z'.charCodeAt(0);
const _0$1 = '0'.charCodeAt(0);
const _9$1 = '9'.charCodeAt(0);
const _TLD = '~'.charCodeAt(0);
const _HAT = '^'.charCodeAt(0);
const _EQS$1 = '='.charCodeAt(0);
const _PIP = '|'.charCodeAt(0);
const _MIN = '-'.charCodeAt(0);
const _USC = '_'.charCodeAt(0);
const _PRC = '%'.charCodeAt(0);
const _MUL = '*'.charCodeAt(0);
const _LPA = '('.charCodeAt(0);
const _RPA = ')'.charCodeAt(0);
const _LAN$1 = '<'.charCodeAt(0);
const _RAN$1 = '>'.charCodeAt(0);
const _ATS = '@'.charCodeAt(0);
const _HSH$1 = '#'.charCodeAt(0);
const _DLR$1 = '$'.charCodeAt(0);
const _BSL = '\\'.charCodeAt(0);
const _FSL$2 = '/'.charCodeAt(0);
const _NWL$2 = '\n'.charCodeAt(0);
const _CAR$2 = '\r'.charCodeAt(0);
const _LFD$2 = '\f'.charCodeAt(0);
const _DQO = '"'.charCodeAt(0);
const _SQO = '\''.charCodeAt(0);
const _WSP = ' '.charCodeAt(0);
const _TAB = '\t'.charCodeAt(0);
const _SEM = ';'.charCodeAt(0);
const _COL = ':'.charCodeAt(0);
const _CUL$2 = '{'.charCodeAt(0);
const _CUR$1 = '}'.charCodeAt(0);
const _BRL = '['.charCodeAt(0);
const _BRR = ']'.charCodeAt(0);
const _CMA = ','.charCodeAt(0);
const _DOT$2 = '.'.charCodeAt(0);
const _BNG$1 = '!'.charCodeAt(0);
const _QSM = '?'.charCodeAt(0);
const _PLS = '+'.charCodeAt(0);
const staticTokenTable = {};
staticTokenTable[_SEM] = TokenType.SemiColon;
staticTokenTable[_COL] = TokenType.Colon;
staticTokenTable[_CUL$2] = TokenType.CurlyL;
staticTokenTable[_CUR$1] = TokenType.CurlyR;
staticTokenTable[_BRR] = TokenType.BracketR;
staticTokenTable[_BRL] = TokenType.BracketL;
staticTokenTable[_LPA] = TokenType.ParenthesisL;
staticTokenTable[_RPA] = TokenType.ParenthesisR;
staticTokenTable[_CMA] = TokenType.Comma;
const staticUnitTable = {};
staticUnitTable['em'] = TokenType.EMS;
staticUnitTable['ex'] = TokenType.EXS;
staticUnitTable['px'] = TokenType.Length;
staticUnitTable['cm'] = TokenType.Length;
staticUnitTable['mm'] = TokenType.Length;
staticUnitTable['in'] = TokenType.Length;
staticUnitTable['pt'] = TokenType.Length;
staticUnitTable['pc'] = TokenType.Length;
staticUnitTable['deg'] = TokenType.Angle;
staticUnitTable['rad'] = TokenType.Angle;
staticUnitTable['grad'] = TokenType.Angle;
staticUnitTable['ms'] = TokenType.Time;
staticUnitTable['s'] = TokenType.Time;
staticUnitTable['hz'] = TokenType.Freq;
staticUnitTable['khz'] = TokenType.Freq;
staticUnitTable['%'] = TokenType.Percentage;
staticUnitTable['fr'] = TokenType.Percentage;
staticUnitTable['dpi'] = TokenType.Resolution;
staticUnitTable['dpcm'] = TokenType.Resolution;
staticUnitTable['cqw'] = TokenType.ContainerQueryLength;
staticUnitTable['cqh'] = TokenType.ContainerQueryLength;
staticUnitTable['cqi'] = TokenType.ContainerQueryLength;
staticUnitTable['cqb'] = TokenType.ContainerQueryLength;
staticUnitTable['cqmin'] = TokenType.ContainerQueryLength;
staticUnitTable['cqmax'] = TokenType.ContainerQueryLength;
class Scanner {
    constructor() {
        this.stream = new MultiLineStream('');
        this.ignoreComment = true;
        this.ignoreWhitespace = true;
        this.inURL = false;
    }
    setSource(input) {
        this.stream = new MultiLineStream(input);
    }
    finishToken(offset, type, text) {
        return {
            offset: offset,
            len: this.stream.pos() - offset,
            type: type,
            text: text || this.stream.substring(offset)
        };
    }
    substring(offset, len) {
        return this.stream.substring(offset, offset + len);
    }
    pos() {
        return this.stream.pos();
    }
    goBackTo(pos) {
        this.stream.goBackTo(pos);
    }
    scanUnquotedString() {
        const offset = this.stream.pos();
        const content = [];
        if (this._unquotedString(content)) {
            return this.finishToken(offset, TokenType.UnquotedString, content.join(''));
        }
        return null;
    }
    scan() {
        const triviaToken = this.trivia();
        if (triviaToken !== null) {
            return triviaToken;
        }
        const offset = this.stream.pos();
        if (this.stream.eos()) {
            return this.finishToken(offset, TokenType.EOF);
        }
        return this.scanNext(offset);
    }
    tryScanUnicode() {
        const offset = this.stream.pos();
        if (!this.stream.eos() && this._unicodeRange()) {
            return this.finishToken(offset, TokenType.UnicodeRange);
        }
        this.stream.goBackTo(offset);
        return undefined;
    }
    scanNext(offset) {
        if (this.stream.advanceIfChars([_LAN$1, _BNG$1, _MIN, _MIN])) {
            return this.finishToken(offset, TokenType.CDO);
        }
        if (this.stream.advanceIfChars([_MIN, _MIN, _RAN$1])) {
            return this.finishToken(offset, TokenType.CDC);
        }
        let content = [];
        if (this.ident(content)) {
            return this.finishToken(offset, TokenType.Ident, content.join(''));
        }
        if (this.stream.advanceIfChar(_ATS)) {
            content = ['@'];
            if (this._name(content)) {
                const keywordText = content.join('');
                if (keywordText === '@charset') {
                    return this.finishToken(offset, TokenType.Charset, keywordText);
                }
                return this.finishToken(offset, TokenType.AtKeyword, keywordText);
            }
            else {
                return this.finishToken(offset, TokenType.Delim);
            }
        }
        if (this.stream.advanceIfChar(_HSH$1)) {
            content = ['#'];
            if (this._name(content)) {
                return this.finishToken(offset, TokenType.Hash, content.join(''));
            }
            else {
                return this.finishToken(offset, TokenType.Delim);
            }
        }
        if (this.stream.advanceIfChar(_BNG$1)) {
            return this.finishToken(offset, TokenType.Exclamation);
        }
        if (this._number()) {
            const pos = this.stream.pos();
            content = [this.stream.substring(offset, pos)];
            if (this.stream.advanceIfChar(_PRC)) {
                return this.finishToken(offset, TokenType.Percentage);
            }
            else if (this.ident(content)) {
                const dim = this.stream.substring(pos).toLowerCase();
                const tokenType = staticUnitTable[dim];
                if (typeof tokenType !== 'undefined') {
                    return this.finishToken(offset, tokenType, content.join(''));
                }
                else {
                    return this.finishToken(offset, TokenType.Dimension, content.join(''));
                }
            }
            return this.finishToken(offset, TokenType.Num);
        }
        content = [];
        let tokenType = this._string(content);
        if (tokenType !== null) {
            return this.finishToken(offset, tokenType, content.join(''));
        }
        tokenType = staticTokenTable[this.stream.peekChar()];
        if (typeof tokenType !== 'undefined') {
            this.stream.advance(1);
            return this.finishToken(offset, tokenType);
        }
        if (this.stream.peekChar(0) === _TLD && this.stream.peekChar(1) === _EQS$1) {
            this.stream.advance(2);
            return this.finishToken(offset, TokenType.Includes);
        }
        if (this.stream.peekChar(0) === _PIP && this.stream.peekChar(1) === _EQS$1) {
            this.stream.advance(2);
            return this.finishToken(offset, TokenType.Dashmatch);
        }
        if (this.stream.peekChar(0) === _MUL && this.stream.peekChar(1) === _EQS$1) {
            this.stream.advance(2);
            return this.finishToken(offset, TokenType.SubstringOperator);
        }
        if (this.stream.peekChar(0) === _HAT && this.stream.peekChar(1) === _EQS$1) {
            this.stream.advance(2);
            return this.finishToken(offset, TokenType.PrefixOperator);
        }
        if (this.stream.peekChar(0) === _DLR$1 && this.stream.peekChar(1) === _EQS$1) {
            this.stream.advance(2);
            return this.finishToken(offset, TokenType.SuffixOperator);
        }
        this.stream.nextChar();
        return this.finishToken(offset, TokenType.Delim);
    }
    trivia() {
        while (true) {
            const offset = this.stream.pos();
            if (this._whitespace()) {
                if (!this.ignoreWhitespace) {
                    return this.finishToken(offset, TokenType.Whitespace);
                }
            }
            else if (this.comment()) {
                if (!this.ignoreComment) {
                    return this.finishToken(offset, TokenType.Comment);
                }
            }
            else {
                return null;
            }
        }
    }
    comment() {
        if (this.stream.advanceIfChars([_FSL$2, _MUL])) {
            let success = false, hot = false;
            this.stream.advanceWhileChar((ch) => {
                if (hot && ch === _FSL$2) {
                    success = true;
                    return false;
                }
                hot = ch === _MUL;
                return true;
            });
            if (success) {
                this.stream.advance(1);
            }
            return true;
        }
        return false;
    }
    _number() {
        let npeek = 0;
        let hasDot = false;
        const peekFirst = this.stream.peekChar();
        if (peekFirst === _PLS || peekFirst === _MIN) {
            npeek++;
        }
        if (this.stream.peekChar(npeek) === _DOT$2) {
            npeek++;
            hasDot = true;
        }
        const ch = this.stream.peekChar(npeek);
        if (ch >= _0$1 && ch <= _9$1) {
            this.stream.advance(npeek + 1);
            this.stream.advanceWhileChar((ch) => {
                return ch >= _0$1 && ch <= _9$1 || !hasDot && ch === _DOT$2;
            });
            return true;
        }
        return false;
    }
    _newline(result) {
        const ch = this.stream.peekChar();
        switch (ch) {
            case _CAR$2:
            case _LFD$2:
            case _NWL$2:
                this.stream.advance(1);
                result.push(String.fromCharCode(ch));
                if (ch === _CAR$2 && this.stream.advanceIfChar(_NWL$2)) {
                    result.push('\n');
                }
                return true;
        }
        return false;
    }
    _escape(result, includeNewLines) {
        let ch = this.stream.peekChar();
        if (ch === _BSL) {
            this.stream.advance(1);
            ch = this.stream.peekChar();
            let hexNumCount = 0;
            while (hexNumCount < 6 && (ch >= _0$1 && ch <= _9$1 || ch >= _a && ch <= _f || ch >= _A && ch <= _F)) {
                this.stream.advance(1);
                ch = this.stream.peekChar();
                hexNumCount++;
            }
            if (hexNumCount > 0) {
                try {
                    const hexVal = parseInt(this.stream.substring(this.stream.pos() - hexNumCount), 16);
                    if (hexVal) {
                        result.push(String.fromCharCode(hexVal));
                    }
                }
                catch (e) {
                }
                if (ch === _WSP || ch === _TAB) {
                    this.stream.advance(1);
                }
                else {
                    this._newline([]);
                }
                return true;
            }
            if (ch !== _CAR$2 && ch !== _LFD$2 && ch !== _NWL$2) {
                this.stream.advance(1);
                result.push(String.fromCharCode(ch));
                return true;
            }
            else if (includeNewLines) {
                return this._newline(result);
            }
        }
        return false;
    }
    _stringChar(closeQuote, result) {
        const ch = this.stream.peekChar();
        if (ch !== 0 && ch !== closeQuote && ch !== _BSL && ch !== _CAR$2 && ch !== _LFD$2 && ch !== _NWL$2) {
            this.stream.advance(1);
            result.push(String.fromCharCode(ch));
            return true;
        }
        return false;
    }
    _string(result) {
        if (this.stream.peekChar() === _SQO || this.stream.peekChar() === _DQO) {
            const closeQuote = this.stream.nextChar();
            result.push(String.fromCharCode(closeQuote));
            while (this._stringChar(closeQuote, result) || this._escape(result, true)) {
            }
            if (this.stream.peekChar() === closeQuote) {
                this.stream.nextChar();
                result.push(String.fromCharCode(closeQuote));
                return TokenType.String;
            }
            else {
                return TokenType.BadString;
            }
        }
        return null;
    }
    _unquotedChar(result) {
        const ch = this.stream.peekChar();
        if (ch !== 0 && ch !== _BSL && ch !== _SQO && ch !== _DQO && ch !== _LPA && ch !== _RPA && ch !== _WSP && ch !== _TAB && ch !== _NWL$2 && ch !== _LFD$2 && ch !== _CAR$2) {
            this.stream.advance(1);
            result.push(String.fromCharCode(ch));
            return true;
        }
        return false;
    }
    _unquotedString(result) {
        let hasContent = false;
        while (this._unquotedChar(result) || this._escape(result)) {
            hasContent = true;
        }
        return hasContent;
    }
    _whitespace() {
        const n = this.stream.advanceWhileChar((ch) => {
            return ch === _WSP || ch === _TAB || ch === _NWL$2 || ch === _LFD$2 || ch === _CAR$2;
        });
        return n > 0;
    }
    _name(result) {
        let matched = false;
        while (this._identChar(result) || this._escape(result)) {
            matched = true;
        }
        return matched;
    }
    ident(result) {
        const pos = this.stream.pos();
        const hasMinus = this._minus(result);
        if (hasMinus) {
            if (this._minus(result)  || this._identFirstChar(result) || this._escape(result)) {
                while (this._identChar(result) || this._escape(result)) {
                }
                return true;
            }
        }
        else if (this._identFirstChar(result) || this._escape(result)) {
            while (this._identChar(result) || this._escape(result)) {
            }
            return true;
        }
        this.stream.goBackTo(pos);
        return false;
    }
    _identFirstChar(result) {
        const ch = this.stream.peekChar();
        if (ch === _USC ||
            ch >= _a && ch <= _z ||
            ch >= _A && ch <= _Z ||
            ch >= 0x80 && ch <= 0xFFFF) {
            this.stream.advance(1);
            result.push(String.fromCharCode(ch));
            return true;
        }
        return false;
    }
    _minus(result) {
        const ch = this.stream.peekChar();
        if (ch === _MIN) {
            this.stream.advance(1);
            result.push(String.fromCharCode(ch));
            return true;
        }
        return false;
    }
    _identChar(result) {
        const ch = this.stream.peekChar();
        if (ch === _USC ||
            ch === _MIN ||
            ch >= _a && ch <= _z ||
            ch >= _A && ch <= _Z ||
            ch >= _0$1 && ch <= _9$1 ||
            ch >= 0x80 && ch <= 0xFFFF) {
            this.stream.advance(1);
            result.push(String.fromCharCode(ch));
            return true;
        }
        return false;
    }
    _unicodeRange() {
        if (this.stream.advanceIfChar(_PLS)) {
            const isHexDigit = (ch) => (ch >= _0$1 && ch <= _9$1 || ch >= _a && ch <= _f || ch >= _A && ch <= _F);
            const codePoints = this.stream.advanceWhileChar(isHexDigit) + this.stream.advanceWhileChar(ch => ch === _QSM);
            if (codePoints >= 1 && codePoints <= 6) {
                if (this.stream.advanceIfChar(_MIN)) {
                    const digits = this.stream.advanceWhileChar(isHexDigit);
                    if (digits >= 1 && digits <= 6) {
                        return true;
                    }
                }
                else {
                    return true;
                }
            }
        }
        return false;
    }
}

function startsWith(haystack, needle) {
    if (haystack.length < needle.length) {
        return false;
    }
    for (let i = 0; i < needle.length; i++) {
        if (haystack[i] !== needle[i]) {
            return false;
        }
    }
    return true;
}
function endsWith(haystack, needle) {
    let diff = haystack.length - needle.length;
    if (diff > 0) {
        return haystack.lastIndexOf(needle) === diff;
    }
    else if (diff === 0) {
        return haystack === needle;
    }
    else {
        return false;
    }
}
function difference(first, second, maxLenDelta = 4) {
    let lengthDifference = Math.abs(first.length - second.length);
    if (lengthDifference > maxLenDelta) {
        return 0;
    }
    let LCS = [];
    let zeroArray = [];
    let i, j;
    for (i = 0; i < second.length + 1; ++i) {
        zeroArray.push(0);
    }
    for (i = 0; i < first.length + 1; ++i) {
        LCS.push(zeroArray);
    }
    for (i = 1; i < first.length + 1; ++i) {
        for (j = 1; j < second.length + 1; ++j) {
            if (first[i - 1] === second[j - 1]) {
                LCS[i][j] = LCS[i - 1][j - 1] + 1;
            }
            else {
                LCS[i][j] = Math.max(LCS[i - 1][j], LCS[i][j - 1]);
            }
        }
    }
    return LCS[first.length][second.length] - Math.sqrt(lengthDifference);
}
function getLimitedString(str, ellipsis = true) {
    if (!str) {
        return '';
    }
    if (str.length < 140) {
        return str;
    }
    return str.slice(0, 140) + (ellipsis ? '\u2026' : '');
}
function trim(str, regexp) {
    const m = regexp.exec(str);
    if (m && m[0].length) {
        return str.substr(0, str.length - m[0].length);
    }
    return str;
}
function repeat(value, count) {
    let s = '';
    while (count > 0) {
        if ((count & 1) === 1) {
            s += value;
        }
        value += value;
        count = count >>> 1;
    }
    return s;
}
function convertSimple2RegExpPattern(pattern) {
    return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, '\\$&').replace(/[\*]/g, '.*');
}

var NodeType$1;
(function (NodeType) {
    NodeType[NodeType["Undefined"] = 0] = "Undefined";
    NodeType[NodeType["Identifier"] = 1] = "Identifier";
    NodeType[NodeType["Stylesheet"] = 2] = "Stylesheet";
    NodeType[NodeType["Ruleset"] = 3] = "Ruleset";
    NodeType[NodeType["Selector"] = 4] = "Selector";
    NodeType[NodeType["SimpleSelector"] = 5] = "SimpleSelector";
    NodeType[NodeType["SelectorInterpolation"] = 6] = "SelectorInterpolation";
    NodeType[NodeType["SelectorCombinator"] = 7] = "SelectorCombinator";
    NodeType[NodeType["SelectorCombinatorParent"] = 8] = "SelectorCombinatorParent";
    NodeType[NodeType["SelectorCombinatorSibling"] = 9] = "SelectorCombinatorSibling";
    NodeType[NodeType["SelectorCombinatorAllSiblings"] = 10] = "SelectorCombinatorAllSiblings";
    NodeType[NodeType["SelectorCombinatorShadowPiercingDescendant"] = 11] = "SelectorCombinatorShadowPiercingDescendant";
    NodeType[NodeType["Page"] = 12] = "Page";
    NodeType[NodeType["PageBoxMarginBox"] = 13] = "PageBoxMarginBox";
    NodeType[NodeType["ClassSelector"] = 14] = "ClassSelector";
    NodeType[NodeType["IdentifierSelector"] = 15] = "IdentifierSelector";
    NodeType[NodeType["ElementNameSelector"] = 16] = "ElementNameSelector";
    NodeType[NodeType["PseudoSelector"] = 17] = "PseudoSelector";
    NodeType[NodeType["AttributeSelector"] = 18] = "AttributeSelector";
    NodeType[NodeType["Declaration"] = 19] = "Declaration";
    NodeType[NodeType["Declarations"] = 20] = "Declarations";
    NodeType[NodeType["Property"] = 21] = "Property";
    NodeType[NodeType["Expression"] = 22] = "Expression";
    NodeType[NodeType["BinaryExpression"] = 23] = "BinaryExpression";
    NodeType[NodeType["Term"] = 24] = "Term";
    NodeType[NodeType["Operator"] = 25] = "Operator";
    NodeType[NodeType["Value"] = 26] = "Value";
    NodeType[NodeType["StringLiteral"] = 27] = "StringLiteral";
    NodeType[NodeType["URILiteral"] = 28] = "URILiteral";
    NodeType[NodeType["EscapedValue"] = 29] = "EscapedValue";
    NodeType[NodeType["Function"] = 30] = "Function";
    NodeType[NodeType["NumericValue"] = 31] = "NumericValue";
    NodeType[NodeType["HexColorValue"] = 32] = "HexColorValue";
    NodeType[NodeType["RatioValue"] = 33] = "RatioValue";
    NodeType[NodeType["MixinDeclaration"] = 34] = "MixinDeclaration";
    NodeType[NodeType["MixinReference"] = 35] = "MixinReference";
    NodeType[NodeType["VariableName"] = 36] = "VariableName";
    NodeType[NodeType["VariableDeclaration"] = 37] = "VariableDeclaration";
    NodeType[NodeType["Prio"] = 38] = "Prio";
    NodeType[NodeType["Interpolation"] = 39] = "Interpolation";
    NodeType[NodeType["NestedProperties"] = 40] = "NestedProperties";
    NodeType[NodeType["ExtendsReference"] = 41] = "ExtendsReference";
    NodeType[NodeType["SelectorPlaceholder"] = 42] = "SelectorPlaceholder";
    NodeType[NodeType["Debug"] = 43] = "Debug";
    NodeType[NodeType["If"] = 44] = "If";
    NodeType[NodeType["Else"] = 45] = "Else";
    NodeType[NodeType["For"] = 46] = "For";
    NodeType[NodeType["Each"] = 47] = "Each";
    NodeType[NodeType["While"] = 48] = "While";
    NodeType[NodeType["MixinContentReference"] = 49] = "MixinContentReference";
    NodeType[NodeType["MixinContentDeclaration"] = 50] = "MixinContentDeclaration";
    NodeType[NodeType["Media"] = 51] = "Media";
    NodeType[NodeType["Scope"] = 52] = "Scope";
    NodeType[NodeType["Keyframe"] = 53] = "Keyframe";
    NodeType[NodeType["FontFace"] = 54] = "FontFace";
    NodeType[NodeType["Import"] = 55] = "Import";
    NodeType[NodeType["Namespace"] = 56] = "Namespace";
    NodeType[NodeType["Invocation"] = 57] = "Invocation";
    NodeType[NodeType["FunctionDeclaration"] = 58] = "FunctionDeclaration";
    NodeType[NodeType["ReturnStatement"] = 59] = "ReturnStatement";
    NodeType[NodeType["MediaQuery"] = 60] = "MediaQuery";
    NodeType[NodeType["MediaCondition"] = 61] = "MediaCondition";
    NodeType[NodeType["MediaFeature"] = 62] = "MediaFeature";
    NodeType[NodeType["FunctionParameter"] = 63] = "FunctionParameter";
    NodeType[NodeType["FunctionArgument"] = 64] = "FunctionArgument";
    NodeType[NodeType["KeyframeSelector"] = 65] = "KeyframeSelector";
    NodeType[NodeType["ViewPort"] = 66] = "ViewPort";
    NodeType[NodeType["Document"] = 67] = "Document";
    NodeType[NodeType["AtApplyRule"] = 68] = "AtApplyRule";
    NodeType[NodeType["CustomPropertyDeclaration"] = 69] = "CustomPropertyDeclaration";
    NodeType[NodeType["CustomPropertySet"] = 70] = "CustomPropertySet";
    NodeType[NodeType["ListEntry"] = 71] = "ListEntry";
    NodeType[NodeType["Supports"] = 72] = "Supports";
    NodeType[NodeType["SupportsCondition"] = 73] = "SupportsCondition";
    NodeType[NodeType["NamespacePrefix"] = 74] = "NamespacePrefix";
    NodeType[NodeType["GridLine"] = 75] = "GridLine";
    NodeType[NodeType["Plugin"] = 76] = "Plugin";
    NodeType[NodeType["UnknownAtRule"] = 77] = "UnknownAtRule";
    NodeType[NodeType["Use"] = 78] = "Use";
    NodeType[NodeType["ModuleConfiguration"] = 79] = "ModuleConfiguration";
    NodeType[NodeType["Forward"] = 80] = "Forward";
    NodeType[NodeType["ForwardVisibility"] = 81] = "ForwardVisibility";
    NodeType[NodeType["Module"] = 82] = "Module";
    NodeType[NodeType["UnicodeRange"] = 83] = "UnicodeRange";
    NodeType[NodeType["Layer"] = 84] = "Layer";
    NodeType[NodeType["LayerNameList"] = 85] = "LayerNameList";
    NodeType[NodeType["LayerName"] = 86] = "LayerName";
    NodeType[NodeType["PropertyAtRule"] = 87] = "PropertyAtRule";
    NodeType[NodeType["Container"] = 88] = "Container";
    NodeType[NodeType["ModuleConfig"] = 89] = "ModuleConfig";
    NodeType[NodeType["SelectorList"] = 90] = "SelectorList";
    NodeType[NodeType["StartingStyleAtRule"] = 91] = "StartingStyleAtRule";
})(NodeType$1 || (NodeType$1 = {}));
var ReferenceType;
(function (ReferenceType) {
    ReferenceType[ReferenceType["Mixin"] = 0] = "Mixin";
    ReferenceType[ReferenceType["Rule"] = 1] = "Rule";
    ReferenceType[ReferenceType["Variable"] = 2] = "Variable";
    ReferenceType[ReferenceType["Function"] = 3] = "Function";
    ReferenceType[ReferenceType["Keyframe"] = 4] = "Keyframe";
    ReferenceType[ReferenceType["Unknown"] = 5] = "Unknown";
    ReferenceType[ReferenceType["Module"] = 6] = "Module";
    ReferenceType[ReferenceType["Forward"] = 7] = "Forward";
    ReferenceType[ReferenceType["ForwardVisibility"] = 8] = "ForwardVisibility";
    ReferenceType[ReferenceType["Property"] = 9] = "Property";
})(ReferenceType || (ReferenceType = {}));
function getNodeAtOffset(node, offset) {
    let candidate = null;
    if (!node || offset < node.offset || offset > node.end) {
        return null;
    }
    node.accept((node) => {
        if (node.offset === -1 && node.length === -1) {
            return true;
        }
        if (node.offset <= offset && node.end >= offset) {
            if (!candidate) {
                candidate = node;
            }
            else if (node.length <= candidate.length) {
                candidate = node;
            }
            return true;
        }
        return false;
    });
    return candidate;
}
function getNodePath(node, offset) {
    let candidate = getNodeAtOffset(node, offset);
    const path = [];
    while (candidate) {
        path.unshift(candidate);
        candidate = candidate.parent;
    }
    return path;
}
function getParentDeclaration(node) {
    const decl = node.findParent(NodeType$1.Declaration);
    const value = decl && decl.getValue();
    if (value && value.encloses(node)) {
        return decl;
    }
    return null;
}
class Node {
    get end() { return this.offset + this.length; }
    constructor(offset = -1, len = -1, nodeType) {
        this.parent = null;
        this.offset = offset;
        this.length = len;
        if (nodeType) {
            this.nodeType = nodeType;
        }
    }
    set type(type) {
        this.nodeType = type;
    }
    get type() {
        return this.nodeType || NodeType$1.Undefined;
    }
    getTextProvider() {
        let node = this;
        while (node && !node.textProvider) {
            node = node.parent;
        }
        if (node) {
            return node.textProvider;
        }
        return () => { return 'unknown'; };
    }
    getText() {
        return this.getTextProvider()(this.offset, this.length);
    }
    matches(str) {
        return this.length === str.length && this.getTextProvider()(this.offset, this.length) === str;
    }
    startsWith(str) {
        return this.length >= str.length && this.getTextProvider()(this.offset, str.length) === str;
    }
    endsWith(str) {
        return this.length >= str.length && this.getTextProvider()(this.end - str.length, str.length) === str;
    }
    accept(visitor) {
        if (visitor(this) && this.children) {
            for (const child of this.children) {
                child.accept(visitor);
            }
        }
    }
    acceptVisitor(visitor) {
        this.accept(visitor.visitNode.bind(visitor));
    }
    adoptChild(node, index = -1) {
        if (node.parent && node.parent.children) {
            const idx = node.parent.children.indexOf(node);
            if (idx >= 0) {
                node.parent.children.splice(idx, 1);
            }
        }
        node.parent = this;
        let children = this.children;
        if (!children) {
            children = this.children = [];
        }
        if (index !== -1) {
            children.splice(index, 0, node);
        }
        else {
            children.push(node);
        }
        return node;
    }
    attachTo(parent, index = -1) {
        if (parent) {
            parent.adoptChild(this, index);
        }
        return this;
    }
    collectIssues(results) {
        if (this.issues) {
            results.push.apply(results, this.issues);
        }
    }
    addIssue(issue) {
        if (!this.issues) {
            this.issues = [];
        }
        this.issues.push(issue);
    }
    hasIssue(rule) {
        return Array.isArray(this.issues) && this.issues.some(i => i.getRule() === rule);
    }
    isErroneous(recursive = false) {
        if (this.issues && this.issues.length > 0) {
            return true;
        }
        return recursive && Array.isArray(this.children) && this.children.some(c => c.isErroneous(true));
    }
    setNode(field, node, index = -1) {
        if (node) {
            node.attachTo(this, index);
            this[field] = node;
            return true;
        }
        return false;
    }
    addChild(node) {
        if (node) {
            if (!this.children) {
                this.children = [];
            }
            node.attachTo(this);
            this.updateOffsetAndLength(node);
            return true;
        }
        return false;
    }
    updateOffsetAndLength(node) {
        if (node.offset < this.offset || this.offset === -1) {
            this.offset = node.offset;
        }
        const nodeEnd = node.end;
        if ((nodeEnd > this.end) || this.length === -1) {
            this.length = nodeEnd - this.offset;
        }
    }
    hasChildren() {
        return !!this.children && this.children.length > 0;
    }
    getChildren() {
        return this.children ? this.children.slice(0) : [];
    }
    getChild(index) {
        if (this.children && index < this.children.length) {
            return this.children[index];
        }
        return null;
    }
    addChildren(nodes) {
        for (const node of nodes) {
            this.addChild(node);
        }
    }
    findFirstChildBeforeOffset(offset) {
        if (this.children) {
            let current = null;
            for (let i = this.children.length - 1; i >= 0; i--) {
                current = this.children[i];
                if (current.offset <= offset) {
                    return current;
                }
            }
        }
        return null;
    }
    findChildAtOffset(offset, goDeep) {
        const current = this.findFirstChildBeforeOffset(offset);
        if (current && current.end >= offset) {
            if (goDeep) {
                return current.findChildAtOffset(offset, true) || current;
            }
            return current;
        }
        return null;
    }
    encloses(candidate) {
        return this.offset <= candidate.offset && this.offset + this.length >= candidate.offset + candidate.length;
    }
    getParent() {
        let result = this.parent;
        while (result instanceof Nodelist) {
            result = result.parent;
        }
        return result;
    }
    findParent(type) {
        let result = this;
        while (result && result.type !== type) {
            result = result.parent;
        }
        return result;
    }
    findAParent(...types) {
        let result = this;
        while (result && !types.some(t => result.type === t)) {
            result = result.parent;
        }
        return result;
    }
    setData(key, value) {
        if (!this.options) {
            this.options = {};
        }
        this.options[key] = value;
    }
    getData(key) {
        if (!this.options || !this.options.hasOwnProperty(key)) {
            return null;
        }
        return this.options[key];
    }
}
class Nodelist extends Node {
    constructor(parent, index = -1) {
        super(-1, -1);
        this.attachTo(parent, index);
        this.offset = -1;
        this.length = -1;
    }
}
class UnicodeRange extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.UnicodeRange;
    }
    setRangeStart(rangeStart) {
        return this.setNode('rangeStart', rangeStart);
    }
    getRangeStart() {
        return this.rangeStart;
    }
    setRangeEnd(rangeEnd) {
        return this.setNode('rangeEnd', rangeEnd);
    }
    getRangeEnd() {
        return this.rangeEnd;
    }
}
class Identifier extends Node {
    constructor(offset, length) {
        super(offset, length);
        this.isCustomProperty = false;
    }
    get type() {
        return NodeType$1.Identifier;
    }
    containsInterpolation() {
        return this.hasChildren();
    }
}
class Stylesheet extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Stylesheet;
    }
}
class Declarations extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Declarations;
    }
}
class BodyDeclaration extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    getDeclarations() {
        return this.declarations;
    }
    setDeclarations(decls) {
        return this.setNode('declarations', decls);
    }
}
class RuleSet extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Ruleset;
    }
    getSelectors() {
        if (!this.selectors) {
            this.selectors = new Nodelist(this);
        }
        return this.selectors;
    }
    isNested() {
        return !!this.parent && this.parent.findParent(NodeType$1.Declarations) !== null;
    }
}
class Selector extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Selector;
    }
}
class SimpleSelector extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.SimpleSelector;
    }
}
class AbstractDeclaration extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
}
class CustomPropertySet extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.CustomPropertySet;
    }
}
class Declaration extends AbstractDeclaration {
    constructor(offset, length) {
        super(offset, length);
        this.property = null;
    }
    get type() {
        return NodeType$1.Declaration;
    }
    setProperty(node) {
        return this.setNode('property', node);
    }
    getProperty() {
        return this.property;
    }
    getFullPropertyName() {
        const propertyName = this.property ? this.property.getName() : 'unknown';
        if (this.parent instanceof Declarations && this.parent.getParent() instanceof NestedProperties) {
            const parentDecl = this.parent.getParent().getParent();
            if (parentDecl instanceof Declaration) {
                return parentDecl.getFullPropertyName() + propertyName;
            }
        }
        return propertyName;
    }
    getNonPrefixedPropertyName() {
        const propertyName = this.getFullPropertyName();
        if (propertyName && propertyName.charAt(0) === '-') {
            const vendorPrefixEnd = propertyName.indexOf('-', 1);
            if (vendorPrefixEnd !== -1) {
                return propertyName.substring(vendorPrefixEnd + 1);
            }
        }
        return propertyName;
    }
    setValue(value) {
        return this.setNode('value', value);
    }
    getValue() {
        return this.value;
    }
    setNestedProperties(value) {
        return this.setNode('nestedProperties', value);
    }
    getNestedProperties() {
        return this.nestedProperties;
    }
}
class CustomPropertyDeclaration extends Declaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.CustomPropertyDeclaration;
    }
    setPropertySet(value) {
        return this.setNode('propertySet', value);
    }
    getPropertySet() {
        return this.propertySet;
    }
}
class Property extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Property;
    }
    setIdentifier(value) {
        return this.setNode('identifier', value);
    }
    getIdentifier() {
        return this.identifier;
    }
    getName() {
        return trim(this.getText(), /[_\+]+$/);
    }
    isCustomProperty() {
        return !!this.identifier && this.identifier.isCustomProperty;
    }
}
class Invocation extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Invocation;
    }
    getArguments() {
        if (!this.arguments) {
            this.arguments = new Nodelist(this);
        }
        return this.arguments;
    }
}
let Function$1 = class Function extends Invocation {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Function;
    }
    setIdentifier(node) {
        return this.setNode('identifier', node, 0);
    }
    getIdentifier() {
        return this.identifier;
    }
    getName() {
        return this.identifier ? this.identifier.getText() : '';
    }
};
class FunctionParameter extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.FunctionParameter;
    }
    setIdentifier(node) {
        return this.setNode('identifier', node, 0);
    }
    getIdentifier() {
        return this.identifier;
    }
    getName() {
        return this.identifier ? this.identifier.getText() : '';
    }
    setDefaultValue(node) {
        return this.setNode('defaultValue', node, 0);
    }
    getDefaultValue() {
        return this.defaultValue;
    }
}
class FunctionArgument extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.FunctionArgument;
    }
    setIdentifier(node) {
        return this.setNode('identifier', node, 0);
    }
    getIdentifier() {
        return this.identifier;
    }
    getName() {
        return this.identifier ? this.identifier.getText() : '';
    }
    setValue(node) {
        return this.setNode('value', node, 0);
    }
    getValue() {
        return this.value;
    }
}
class IfStatement extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.If;
    }
    setExpression(node) {
        return this.setNode('expression', node, 0);
    }
    setElseClause(elseClause) {
        return this.setNode('elseClause', elseClause);
    }
}
class ForStatement extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.For;
    }
    setVariable(node) {
        return this.setNode('variable', node, 0);
    }
}
class EachStatement extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Each;
    }
    getVariables() {
        if (!this.variables) {
            this.variables = new Nodelist(this);
        }
        return this.variables;
    }
}
class WhileStatement extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.While;
    }
}
class ElseStatement extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Else;
    }
}
class FunctionDeclaration extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.FunctionDeclaration;
    }
    setIdentifier(node) {
        return this.setNode('identifier', node, 0);
    }
    getIdentifier() {
        return this.identifier;
    }
    getName() {
        return this.identifier ? this.identifier.getText() : '';
    }
    getParameters() {
        if (!this.parameters) {
            this.parameters = new Nodelist(this);
        }
        return this.parameters;
    }
}
class ViewPort extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.ViewPort;
    }
}
class FontFace extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.FontFace;
    }
}
class NestedProperties extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.NestedProperties;
    }
}
class Keyframe extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Keyframe;
    }
    setKeyword(keyword) {
        return this.setNode('keyword', keyword, 0);
    }
    getKeyword() {
        return this.keyword;
    }
    setIdentifier(node) {
        return this.setNode('identifier', node, 0);
    }
    getIdentifier() {
        return this.identifier;
    }
    getName() {
        return this.identifier ? this.identifier.getText() : '';
    }
}
class KeyframeSelector extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.KeyframeSelector;
    }
}
class Import extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Import;
    }
    setMedialist(node) {
        if (node) {
            node.attachTo(this);
            return true;
        }
        return false;
    }
}
class Use extends Node {
    get type() {
        return NodeType$1.Use;
    }
    setParameters(value) {
        return this.setNode('parameters', value);
    }
    getParameters() {
        return this.parameters;
    }
    setIdentifier(node) {
        return this.setNode('identifier', node, 0);
    }
    getIdentifier() {
        return this.identifier;
    }
}
class ModuleConfiguration extends Node {
    get type() {
        return NodeType$1.ModuleConfiguration;
    }
    setIdentifier(node) {
        return this.setNode('identifier', node, 0);
    }
    getIdentifier() {
        return this.identifier;
    }
    getName() {
        return this.identifier ? this.identifier.getText() : '';
    }
    setValue(node) {
        return this.setNode('value', node, 0);
    }
    getValue() {
        return this.value;
    }
}
class Forward extends Node {
    get type() {
        return NodeType$1.Forward;
    }
    setIdentifier(node) {
        return this.setNode('identifier', node, 0);
    }
    getIdentifier() {
        return this.identifier;
    }
    setParameters(value) {
        return this.setNode('parameters', value);
    }
    getParameters() {
        return this.parameters;
    }
}
class ForwardVisibility extends Node {
    get type() {
        return NodeType$1.ForwardVisibility;
    }
    setIdentifier(node) {
        return this.setNode('identifier', node, 0);
    }
    getIdentifier() {
        return this.identifier;
    }
}
class Namespace extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Namespace;
    }
}
class Media extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Media;
    }
}
let Scope$3 = class Scope extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Scope;
    }
};
class ScopeLimits extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Scope;
    }
    getScopeStart() {
        return this.scopeStart;
    }
    setScopeStart(right) {
        return this.setNode('scopeStart', right);
    }
    getScopeEnd() {
        return this.scopeEnd;
    }
    setScopeEnd(right) {
        return this.setNode('scopeEnd', right);
    }
    getName() {
        let name = '';
        if (this.scopeStart) {
            name += this.scopeStart.getText();
        }
        if (this.scopeEnd) {
            name += `${this.scopeStart ? ' ' : ''}→ ${this.scopeEnd.getText()}`;
        }
        return name;
    }
}
class Supports extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Supports;
    }
}
class Layer extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Layer;
    }
    setNames(names) {
        return this.setNode('names', names);
    }
    getNames() {
        return this.names;
    }
}
class PropertyAtRule extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.PropertyAtRule;
    }
    setName(node) {
        if (node) {
            node.attachTo(this);
            this.name = node;
            return true;
        }
        return false;
    }
    getName() {
        return this.name;
    }
}
class StartingStyleAtRule extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.StartingStyleAtRule;
    }
}
class Document extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Document;
    }
}
class Container extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Container;
    }
}
class Medialist extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
}
class MediaQuery extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.MediaQuery;
    }
}
class MediaCondition extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.MediaCondition;
    }
}
class MediaFeature extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.MediaFeature;
    }
}
class SupportsCondition extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.SupportsCondition;
    }
}
class Page extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Page;
    }
}
class PageBoxMarginBox extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.PageBoxMarginBox;
    }
}
class Expression extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Expression;
    }
}
class BinaryExpression extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.BinaryExpression;
    }
    setLeft(left) {
        return this.setNode('left', left);
    }
    getLeft() {
        return this.left;
    }
    setRight(right) {
        return this.setNode('right', right);
    }
    getRight() {
        return this.right;
    }
    setOperator(value) {
        return this.setNode('operator', value);
    }
    getOperator() {
        return this.operator;
    }
}
class Term extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Term;
    }
    setOperator(value) {
        return this.setNode('operator', value);
    }
    getOperator() {
        return this.operator;
    }
    setExpression(value) {
        return this.setNode('expression', value);
    }
    getExpression() {
        return this.expression;
    }
}
class AttributeSelector extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.AttributeSelector;
    }
    setNamespacePrefix(value) {
        return this.setNode('namespacePrefix', value);
    }
    getNamespacePrefix() {
        return this.namespacePrefix;
    }
    setIdentifier(value) {
        return this.setNode('identifier', value);
    }
    getIdentifier() {
        return this.identifier;
    }
    setOperator(operator) {
        return this.setNode('operator', operator);
    }
    getOperator() {
        return this.operator;
    }
    setValue(value) {
        return this.setNode('value', value);
    }
    getValue() {
        return this.value;
    }
}
class HexColorValue extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.HexColorValue;
    }
}
class RatioValue extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.RatioValue;
    }
}
const _dot = '.'.charCodeAt(0), _0 = '0'.charCodeAt(0), _9 = '9'.charCodeAt(0);
class NumericValue extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.NumericValue;
    }
    getValue() {
        const raw = this.getText();
        let unitIdx = 0;
        let code;
        for (let i = 0, len = raw.length; i < len; i++) {
            code = raw.charCodeAt(i);
            if (!(_0 <= code && code <= _9 || code === _dot)) {
                break;
            }
            unitIdx += 1;
        }
        return {
            value: raw.substring(0, unitIdx),
            unit: unitIdx < raw.length ? raw.substring(unitIdx) : undefined
        };
    }
}
class VariableDeclaration extends AbstractDeclaration {
    constructor(offset, length) {
        super(offset, length);
        this.needsSemicolon = true;
    }
    get type() {
        return NodeType$1.VariableDeclaration;
    }
    setVariable(node) {
        if (node) {
            node.attachTo(this);
            this.variable = node;
            return true;
        }
        return false;
    }
    getVariable() {
        return this.variable;
    }
    getName() {
        return this.variable ? this.variable.getName() : '';
    }
    setValue(node) {
        if (node) {
            node.attachTo(this);
            this.value = node;
            return true;
        }
        return false;
    }
    getValue() {
        return this.value;
    }
}
class Interpolation extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.Interpolation;
    }
}
class Variable extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.VariableName;
    }
    getName() {
        return this.getText();
    }
}
class ExtendsReference extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.ExtendsReference;
    }
    getSelectors() {
        if (!this.selectors) {
            this.selectors = new Nodelist(this);
        }
        return this.selectors;
    }
}
class MixinContentReference extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.MixinContentReference;
    }
    getArguments() {
        if (!this.arguments) {
            this.arguments = new Nodelist(this);
        }
        return this.arguments;
    }
}
class MixinContentDeclaration extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.MixinContentDeclaration;
    }
    getParameters() {
        if (!this.parameters) {
            this.parameters = new Nodelist(this);
        }
        return this.parameters;
    }
}
class MixinReference extends Node {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.MixinReference;
    }
    getNamespaces() {
        if (!this.namespaces) {
            this.namespaces = new Nodelist(this);
        }
        return this.namespaces;
    }
    setIdentifier(node) {
        return this.setNode('identifier', node, 0);
    }
    getIdentifier() {
        return this.identifier;
    }
    getName() {
        return this.identifier ? this.identifier.getText() : '';
    }
    getArguments() {
        if (!this.arguments) {
            this.arguments = new Nodelist(this);
        }
        return this.arguments;
    }
    setContent(node) {
        return this.setNode('content', node);
    }
    getContent() {
        return this.content;
    }
}
class MixinDeclaration extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.MixinDeclaration;
    }
    setIdentifier(node) {
        return this.setNode('identifier', node, 0);
    }
    getIdentifier() {
        return this.identifier;
    }
    getName() {
        return this.identifier ? this.identifier.getText() : '';
    }
    getParameters() {
        if (!this.parameters) {
            this.parameters = new Nodelist(this);
        }
        return this.parameters;
    }
    setGuard(node) {
        if (node) {
            node.attachTo(this);
            this.guard = node;
        }
        return false;
    }
}
class UnknownAtRule extends BodyDeclaration {
    constructor(offset, length) {
        super(offset, length);
    }
    get type() {
        return NodeType$1.UnknownAtRule;
    }
    setAtRuleName(atRuleName) {
        this.atRuleName = atRuleName;
    }
    getAtRuleName() {
        return this.atRuleName;
    }
}
class ListEntry extends Node {
    get type() {
        return NodeType$1.ListEntry;
    }
    setKey(node) {
        return this.setNode('key', node, 0);
    }
    setValue(node) {
        return this.setNode('value', node, 1);
    }
}
class LessGuard extends Node {
    getConditions() {
        if (!this.conditions) {
            this.conditions = new Nodelist(this);
        }
        return this.conditions;
    }
}
class GuardCondition extends Node {
    setVariable(node) {
        return this.setNode('variable', node);
    }
}
class Module extends Node {
    get type() {
        return NodeType$1.Module;
    }
    setIdentifier(node) {
        return this.setNode('identifier', node, 0);
    }
    getIdentifier() {
        return this.identifier;
    }
}
var Level;
(function (Level) {
    Level[Level["Ignore"] = 1] = "Ignore";
    Level[Level["Warning"] = 2] = "Warning";
    Level[Level["Error"] = 4] = "Error";
})(Level || (Level = {}));
class Marker {
    constructor(node, rule, level, message, offset = node.offset, length = node.length) {
        this.node = node;
        this.rule = rule;
        this.level = level;
        this.message = message || rule.message;
        this.offset = offset;
        this.length = length;
    }
    getRule() {
        return this.rule;
    }
    getLevel() {
        return this.level;
    }
    getOffset() {
        return this.offset;
    }
    getLength() {
        return this.length;
    }
    getNode() {
        return this.node;
    }
    getMessage() {
        return this.message;
    }
}
class ParseErrorCollector {
    static entries(node) {
        const visitor = new ParseErrorCollector();
        node.acceptVisitor(visitor);
        return visitor.entries;
    }
    constructor() {
        this.entries = [];
    }
    visitNode(node) {
        if (node.isErroneous()) {
            node.collectIssues(this.entries);
        }
        return true;
    }
}

class CSSIssueType {
    constructor(id, message) {
        this.id = id;
        this.message = message;
    }
}
const ParseError = {
    NumberExpected: new CSSIssueType('css-numberexpected', main$4.t("number expected")),
    ConditionExpected: new CSSIssueType('css-conditionexpected', main$4.t("condition expected")),
    RuleOrSelectorExpected: new CSSIssueType('css-ruleorselectorexpected', main$4.t("at-rule or selector expected")),
    DotExpected: new CSSIssueType('css-dotexpected', main$4.t("dot expected")),
    ColonExpected: new CSSIssueType('css-colonexpected', main$4.t("colon expected")),
    SemiColonExpected: new CSSIssueType('css-semicolonexpected', main$4.t("semi-colon expected")),
    TermExpected: new CSSIssueType('css-termexpected', main$4.t("term expected")),
    ExpressionExpected: new CSSIssueType('css-expressionexpected', main$4.t("expression expected")),
    OperatorExpected: new CSSIssueType('css-operatorexpected', main$4.t("operator expected")),
    IdentifierExpected: new CSSIssueType('css-identifierexpected', main$4.t("identifier expected")),
    PercentageExpected: new CSSIssueType('css-percentageexpected', main$4.t("percentage expected")),
    URIOrStringExpected: new CSSIssueType('css-uriorstringexpected', main$4.t("uri or string expected")),
    URIExpected: new CSSIssueType('css-uriexpected', main$4.t("URI expected")),
    VariableNameExpected: new CSSIssueType('css-varnameexpected', main$4.t("variable name expected")),
    VariableValueExpected: new CSSIssueType('css-varvalueexpected', main$4.t("variable value expected")),
    PropertyValueExpected: new CSSIssueType('css-propertyvalueexpected', main$4.t("property value expected")),
    LeftCurlyExpected: new CSSIssueType('css-lcurlyexpected', main$4.t("{ expected")),
    RightCurlyExpected: new CSSIssueType('css-rcurlyexpected', main$4.t("} expected")),
    LeftSquareBracketExpected: new CSSIssueType('css-rbracketexpected', main$4.t("[ expected")),
    RightSquareBracketExpected: new CSSIssueType('css-lbracketexpected', main$4.t("] expected")),
    LeftParenthesisExpected: new CSSIssueType('css-lparentexpected', main$4.t("( expected")),
    RightParenthesisExpected: new CSSIssueType('css-rparentexpected', main$4.t(") expected")),
    CommaExpected: new CSSIssueType('css-commaexpected', main$4.t("comma expected")),
    PageDirectiveOrDeclarationExpected: new CSSIssueType('css-pagedirordeclexpected', main$4.t("page directive or declaraton expected")),
    UnknownAtRule: new CSSIssueType('css-unknownatrule', main$4.t("at-rule unknown")),
    UnknownKeyword: new CSSIssueType('css-unknownkeyword', main$4.t("unknown keyword")),
    SelectorExpected: new CSSIssueType('css-selectorexpected', main$4.t("selector expected")),
    StringLiteralExpected: new CSSIssueType('css-stringliteralexpected', main$4.t("string literal expected")),
    WhitespaceExpected: new CSSIssueType('css-whitespaceexpected', main$4.t("whitespace expected")),
    MediaQueryExpected: new CSSIssueType('css-mediaqueryexpected', main$4.t("media query expected")),
    IdentifierOrWildcardExpected: new CSSIssueType('css-idorwildcardexpected', main$4.t("identifier or wildcard expected")),
    WildcardExpected: new CSSIssueType('css-wildcardexpected', main$4.t("wildcard expected")),
    IdentifierOrVariableExpected: new CSSIssueType('css-idorvarexpected', main$4.t("identifier or variable expected")),
};

var ClientCapabilities;
(function (ClientCapabilities) {
    ClientCapabilities.LATEST = {
        textDocument: {
            completion: {
                completionItem: {
                    documentationFormat: [MarkupKind$1.Markdown, MarkupKind$1.PlainText]
                }
            },
            hover: {
                contentFormat: [MarkupKind$1.Markdown, MarkupKind$1.PlainText]
            }
        }
    };
})(ClientCapabilities || (ClientCapabilities = {}));
var FileType;
(function (FileType) {
    FileType[FileType["Unknown"] = 0] = "Unknown";
    FileType[FileType["File"] = 1] = "File";
    FileType[FileType["Directory"] = 2] = "Directory";
    FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
})(FileType || (FileType = {}));

const browserNames = {
    'C': {
        name: 'Chrome',
        platform: 'desktop'
    },
    'CA': {
        name: 'Chrome',
        platform: 'Android'
    },
    'E': {
        name: 'Edge',
        platform: 'desktop'
    },
    'FF': {
        name: 'Firefox',
        platform: 'desktop'
    },
    'FFA': {
        name: 'Firefox',
        platform: 'Android'
    },
    'S': {
        name: 'Safari',
        platform: 'macOS'
    },
    'SM': {
        name: 'Safari',
        platform: 'iOS'
    }
};
const shortCompatPattern = /(E|FFA|FF|SM|S|CA|C|IE|O)([\d|\.]+)?/;
const BaselineImages = {
    BASELINE_LIMITED: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCA1NDAgMzAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxzdHlsZT4KICAgIC5ncmF5LXNoYXBlIHsKICAgICAgZmlsbDogI0M2QzZDNjsgLyogTGlnaHQgbW9kZSAqLwogICAgfQoKICAgIEBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspIHsKICAgICAgLmdyYXktc2hhcGUgewogICAgICAgIGZpbGw6ICM1NjU2NTY7IC8qIERhcmsgbW9kZSAqLwogICAgICB9CiAgICB9CiAgPC9zdHlsZT4KICA8cGF0aCBkPSJNMTUwIDBMMjQwIDkwTDIxMCAxMjBMMTIwIDMwTDE1MCAwWiIgZmlsbD0iI0YwOTQwOSIvPgogIDxwYXRoIGQ9Ik00MjAgMzBMNTQwIDE1MEw0MjAgMjcwTDM5MCAyNDBMNDgwIDE1MEwzOTAgNjBMNDIwIDMwWiIgY2xhc3M9ImdyYXktc2hhcGUiLz4KICA8cGF0aCBkPSJNMzMwIDE4MEwzMDAgMjEwTDM5MCAzMDBMNDIwIDI3MEwzMzAgMTgwWiIgZmlsbD0iI0YwOTQwOSIvPgogIDxwYXRoIGQ9Ik0xMjAgMzBMMTUwIDYwTDYwIDE1MEwxNTAgMjQwTDEyMCAyNzBMMCAxNTBMMTIwIDMwWiIgY2xhc3M9ImdyYXktc2hhcGUiLz4KICA8cGF0aCBkPSJNMzkwIDBMNDIwIDMwTDE1MCAzMDBMMTIwIDI3MEwzOTAgMFoiIGZpbGw9IiNGMDk0MDkiLz4KPC9zdmc+',
    BASELINE_LOW: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCA1NDAgMzAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxzdHlsZT4KICAgIC5ibHVlLXNoYXBlIHsKICAgICAgZmlsbDogI0E4QzdGQTsgLyogTGlnaHQgbW9kZSAqLwogICAgfQoKICAgIEBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspIHsKICAgICAgLmJsdWUtc2hhcGUgewogICAgICAgIGZpbGw6ICMyRDUwOUU7IC8qIERhcmsgbW9kZSAqLwogICAgICB9CiAgICB9CgogICAgLmRhcmtlci1ibHVlLXNoYXBlIHsKICAgICAgICBmaWxsOiAjMUI2RUYzOwogICAgfQoKICAgIEBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspIHsKICAgICAgICAuZGFya2VyLWJsdWUtc2hhcGUgewogICAgICAgICAgICBmaWxsOiAjNDE4NUZGOwogICAgICAgIH0KICAgIH0KCiAgPC9zdHlsZT4KICA8cGF0aCBkPSJNMTUwIDBMMTgwIDMwTDE1MCA2MEwxMjAgMzBMMTUwIDBaIiBjbGFzcz0iYmx1ZS1zaGFwZSIvPgogIDxwYXRoIGQ9Ik0yMTAgNjBMMjQwIDkwTDIxMCAxMjBMMTgwIDkwTDIxMCA2MFoiIGNsYXNzPSJibHVlLXNoYXBlIi8+CiAgPHBhdGggZD0iTTQ1MCA2MEw0ODAgOTBMNDUwIDEyMEw0MjAgOTBMNDUwIDYwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNNTEwIDEyMEw1NDAgMTUwTDUxMCAxODBMNDgwIDE1MEw1MTAgMTIwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNNDUwIDE4MEw0ODAgMjEwTDQ1MCAyNDBMNDIwIDIxMEw0NTAgMTgwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNMzkwIDI0MEw0MjAgMjcwTDM5MCAzMDBMMzYwIDI3MEwzOTAgMjQwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNMzMwIDE4MEwzNjAgMjEwTDMzMCAyNDBMMzAwIDIxMEwzMzAgMTgwWiIgY2xhc3M9ImJsdWUtc2hhcGUiLz4KICA8cGF0aCBkPSJNOTAgNjBMMTIwIDkwTDkwIDEyMEw2MCA5MEw5MCA2MFoiIGNsYXNzPSJibHVlLXNoYXBlIi8+CiAgPHBhdGggZD0iTTM5MCAwTDQyMCAzMEwxNTAgMzAwTDAgMTUwTDMwIDEyMEwxNTAgMjQwTDM5MCAwWiIgY2xhc3M9ImRhcmtlci1ibHVlLXNoYXBlIi8+Cjwvc3ZnPg==',
    BASELINE_HIGH: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCA1NDAgMzAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxzdHlsZT4KICAgIC5ncmVlbi1zaGFwZSB7CiAgICAgIGZpbGw6ICNDNEVFRDA7IC8qIExpZ2h0IG1vZGUgKi8KICAgIH0KCiAgICBAbWVkaWEgKHByZWZlcnMtY29sb3Itc2NoZW1lOiBkYXJrKSB7CiAgICAgIC5ncmVlbi1zaGFwZSB7CiAgICAgICAgZmlsbDogIzEyNTIyNTsgLyogRGFyayBtb2RlICovCiAgICAgIH0KICAgIH0KICA8L3N0eWxlPgogIDxwYXRoIGQ9Ik00MjAgMzBMMzkwIDYwTDQ4MCAxNTBMMzkwIDI0MEwzMzAgMTgwTDMwMCAyMTBMMzkwIDMwMEw1NDAgMTUwTDQyMCAzMFoiIGNsYXNzPSJncmVlbi1zaGFwZSIvPgogIDxwYXRoIGQ9Ik0xNTAgMEwzMCAxMjBMNjAgMTUwTDE1MCA2MEwyMTAgMTIwTDI0MCA5MEwxNTAgMFoiIGNsYXNzPSJncmVlbi1zaGFwZSIvPgogIDxwYXRoIGQ9Ik0zOTAgMEw0MjAgMzBMMTUwIDMwMEwwIDE1MEwzMCAxMjBMMTUwIDI0MEwzOTAgMFoiIGZpbGw9IiMxRUE0NDYiLz4KPC9zdmc+'
};
function getEntryStatus(status) {
    switch (status) {
        case 'nonstandard':
            return '🚨️ Property is nonstandard. Avoid using it.\n\n';
        case 'obsolete':
            return '🚨️️️ Property is obsolete. Avoid using it.\n\n';
        default:
            return '';
    }
}
function getEntryBaselineStatus(baseline, browsers) {
    if (baseline.status === "false") {
        const missingBrowsers = getMissingBaselineBrowsers(browsers);
        let status = `Limited availability across major browsers`;
        if (missingBrowsers) {
            status += ` (Not fully implemented in ${missingBrowsers})`;
        }
        return status;
    }
    const baselineYear = baseline.baseline_low_date?.split('-')[0];
    return `${baseline.status === 'low' ? 'Newly' : 'Widely'} available across major browsers (Baseline since ${baselineYear})`;
}
function getEntryBaselineImage(baseline) {
    if (!baseline) {
        return '';
    }
    let baselineImg;
    switch (baseline?.status) {
        case 'low':
            baselineImg = BaselineImages.BASELINE_LOW;
            break;
        case 'high':
            baselineImg = BaselineImages.BASELINE_HIGH;
            break;
        default:
            baselineImg = BaselineImages.BASELINE_LIMITED;
    }
    return `![Baseline icon](${baselineImg})`;
}
function getEntryDescription(entry, doesSupportMarkdown, settings) {
    let result;
    if (doesSupportMarkdown) {
        result = {
            kind: 'markdown',
            value: getEntryMarkdownDescription(entry, settings)
        };
    }
    else {
        result = {
            kind: 'plaintext',
            value: getEntryStringDescription(entry, settings)
        };
    }
    if (result.value === '') {
        return undefined;
    }
    return result;
}
function textToMarkedString(text) {
    text = text.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&');
    return text.replace(/</g, '&lt;').replace(/>/g, '&gt;');
}
function getEntryStringDescription(entry, settings) {
    if (!entry.description || entry.description === '') {
        return '';
    }
    if (typeof entry.description !== 'string') {
        return entry.description.value;
    }
    let result = '';
    if (settings?.documentation !== false) {
        let status = '';
        if (entry.status) {
            status = getEntryStatus(entry.status);
            result += status;
        }
        result += entry.description;
        if (entry.baseline && !status) {
            result += `\n\n${getEntryBaselineStatus(entry.baseline, entry.browsers)}`;
        }
        if ('syntax' in entry) {
            result += `\n\nSyntax: ${entry.syntax}`;
        }
    }
    if (entry.references && entry.references.length > 0 && settings?.references !== false) {
        if (result.length > 0) {
            result += '\n\n';
        }
        result += entry.references.map(r => {
            return `${r.name}: ${r.url}`;
        }).join(' | ');
    }
    return result;
}
function getEntryMarkdownDescription(entry, settings) {
    if (!entry.description || entry.description === '') {
        return '';
    }
    let result = '';
    if (settings?.documentation !== false) {
        let status = '';
        if (entry.status) {
            status = getEntryStatus(entry.status);
            result += status;
        }
        if (typeof entry.description === 'string') {
            result += textToMarkedString(entry.description);
        }
        else {
            result += entry.description.kind === MarkupKind$1.Markdown ? entry.description.value : textToMarkedString(entry.description.value);
        }
        if (entry.baseline && !status) {
            result += `\n\n${getEntryBaselineImage(entry.baseline)} _${getEntryBaselineStatus(entry.baseline, entry.browsers)}_`;
        }
        if ('syntax' in entry && entry.syntax) {
            result += `\n\nSyntax: ${textToMarkedString(entry.syntax)}`;
        }
    }
    if (entry.references && entry.references.length > 0 && settings?.references !== false) {
        if (result.length > 0) {
            result += '\n\n';
        }
        result += entry.references.map(r => {
            return `[${r.name}](${r.url})`;
        }).join(' | ');
    }
    return result;
}
const missingBaselineBrowserFormatter = new Intl.ListFormat("en", {
    style: "long",
    type: "disjunction",
});
function getMissingBaselineBrowsers(browsers) {
    if (!browsers) {
        return '';
    }
    const missingBrowsers = new Map(Object.entries(browserNames));
    for (const shortCompatString of browsers) {
        const match = shortCompatPattern.exec(shortCompatString);
        if (!match) {
            continue;
        }
        const browser = match[1];
        missingBrowsers.delete(browser);
    }
    return missingBaselineBrowserFormatter.format(Object.values(Array.from(missingBrowsers.entries()).reduce((browsers, [browserId, browser]) => {
        if (browser.name in browsers || browserId === 'E') {
            browsers[browser.name] = browser.name;
            return browsers;
        }
        browsers[browser.name] = `${browser.name} on ${browser.platform}`;
        return browsers;
    }, {})));
}

const hexColorRegExp = /(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i;
const colorFunctions = [
    {
        label: 'rgb',
        func: 'rgb($red, $green, $blue)',
        insertText: 'rgb(${1:red}, ${2:green}, ${3:blue})',
        desc: main$4.t('Creates a Color from red, green, and blue values.')
    },
    {
        label: 'rgba',
        func: 'rgba($red, $green, $blue, $alpha)',
        insertText: 'rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})',
        desc: main$4.t('Creates a Color from red, green, blue, and alpha values.')
    },
    {
        label: 'rgb relative',
        func: 'rgb(from $color $red $green $blue)',
        insertText: 'rgb(from ${1:color} ${2:r} ${3:g} ${4:b})',
        desc: main$4.t('Creates a Color from the red, green, and blue values of another Color.')
    },
    {
        label: 'hsl',
        func: 'hsl($hue, $saturation, $lightness)',
        insertText: 'hsl(${1:hue}, ${2:saturation}, ${3:lightness})',
        desc: main$4.t('Creates a Color from hue, saturation, and lightness values.')
    },
    {
        label: 'hsla',
        func: 'hsla($hue, $saturation, $lightness, $alpha)',
        insertText: 'hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})',
        desc: main$4.t('Creates a Color from hue, saturation, lightness, and alpha values.')
    },
    {
        label: 'hsl relative',
        func: 'hsl(from $color $hue $saturation $lightness)',
        insertText: 'hsl(from ${1:color} ${2:h} ${3:s} ${4:l})',
        desc: main$4.t('Creates a Color from the hue, saturation, and lightness values of another Color.')
    },
    {
        label: 'hwb',
        func: 'hwb($hue $white $black)',
        insertText: 'hwb(${1:hue} ${2:white} ${3:black})',
        desc: main$4.t('Creates a Color from hue, white, and black values.')
    },
    {
        label: 'hwb relative',
        func: 'hwb(from $color $hue $white $black)',
        insertText: 'hwb(from ${1:color} ${2:h} ${3:w} ${4:b})',
        desc: main$4.t('Creates a Color from the hue, white, and black values of another Color.')
    },
    {
        label: 'lab',
        func: 'lab($lightness $a $b)',
        insertText: 'lab(${1:lightness} ${2:a} ${3:b})',
        desc: main$4.t('Creates a Color from lightness, a, and b values.')
    },
    {
        label: 'lab relative',
        func: 'lab(from $color $lightness $a $b)',
        insertText: 'lab(from ${1:color} ${2:l} ${3:a} ${4:b})',
        desc: main$4.t('Creates a Color from the lightness, a, and b values of another Color.')
    },
    {
        label: 'oklab',
        func: 'oklab($lightness $a $b)',
        insertText: 'oklab(${1:lightness} ${2:a} ${3:b})',
        desc: main$4.t('Creates a Color from lightness, a, and b values.')
    },
    {
        label: 'oklab relative',
        func: 'oklab(from $color $lightness $a $b)',
        insertText: 'oklab(from ${1:color} ${2:l} ${3:a} ${4:b})',
        desc: main$4.t('Creates a Color from the lightness, a, and b values of another Color.')
    },
    {
        label: 'lch',
        func: 'lch($lightness $chroma $hue)',
        insertText: 'lch(${1:lightness} ${2:chroma} ${3:hue})',
        desc: main$4.t('Creates a Color from lightness, chroma, and hue values.')
    },
    {
        label: 'lch relative',
        func: 'lch(from $color $lightness $chroma $hue)',
        insertText: 'lch(from ${1:color} ${2:l} ${3:c} ${4:h})',
        desc: main$4.t('Creates a Color from the lightness, chroma, and hue values of another Color.')
    },
    {
        label: 'oklch',
        func: 'oklch($lightness $chroma $hue)',
        insertText: 'oklch(${1:lightness} ${2:chroma} ${3:hue})',
        desc: main$4.t('Creates a Color from lightness, chroma, and hue values.')
    },
    {
        label: 'oklch relative',
        func: 'oklch(from $color $lightness $chroma $hue)',
        insertText: 'oklch(from ${1:color} ${2:l} ${3:c} ${4:h})',
        desc: main$4.t('Creates a Color from the lightness, chroma, and hue values of another Color.')
    },
    {
        label: 'color',
        func: 'color($color-space $red $green $blue)',
        insertText: 'color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})',
        desc: main$4.t('Creates a Color in a specific color space from red, green, and blue values.')
    },
    {
        label: 'color relative',
        func: 'color(from $color $color-space $red $green $blue)',
        insertText: 'color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})',
        desc: main$4.t('Creates a Color in a specific color space from the red, green, and blue values of another Color.')
    },
    {
        label: 'color-mix',
        func: 'color-mix(in $color-space, $color $percentage, $color $percentage)',
        insertText: 'color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})',
        desc: main$4.t('Mix two colors together in a rectangular color space.')
    },
    {
        label: 'color-mix hue',
        func: 'color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)',
        insertText: 'color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})',
        desc: main$4.t('Mix two colors together in a polar color space.')
    },
    {
        label: 'lab',
        func: 'lab($lightness $channel_a $channel_b $alpha)',
        insertText: 'lab(${1:lightness} ${2:a} ${3:b} ${4:alpha})',
        desc: main$4.t('css.builtin.lab', 'Creates a Color from Lightness, Channel a, Channel b and alpha values.')
    },
    {
        label: 'lab relative',
        func: 'lab(from $color $lightness $channel_a $channel_b $alpha)',
        insertText: 'lab(from ${1:color} ${2:lightness} ${3:channel_a} ${4:channel_b} ${5:alpha})',
        desc: main$4.t('css.builtin.lab', 'Creates a Color from Lightness, Channel a, Channel b and alpha values of another Color.')
    },
    {
        label: 'lch',
        func: 'lch($lightness $chrome $hue $alpha)',
        insertText: 'lch(${1:lightness} ${2:chrome} ${3:hue} ${4:alpha})',
        desc: main$4.t('css.builtin.lab', 'Creates a Color from Lightness, Chroma, Hue and alpha values.')
    },
    {
        label: 'lch relative',
        func: 'lch(from $color $lightness $chrome $hue $alpha)',
        insertText: 'lch(from ${1:color} ${2:lightness} ${3:chrome} ${4:hue} ${5:alpha})',
        desc: main$4.t('css.builtin.lab', 'Creates a Color from Lightness, Chroma, Hue and alpha values of another Color.')
    }
];
const colorFunctionNameRegExp = /^(rgb|rgba|hsl|hsla|hwb|lab|lch)$/i;
const colors = {
    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'
};
const colorsRegExp = new RegExp(`^(${Object.keys(colors).join('|')})$`, "i");
const colorKeywords = {
    '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.',
};
const colorKeywordsRegExp = new RegExp(`^(${Object.keys(colorKeywords).join('|')})$`, "i");
function getNumericValue(node, factor, lowerLimit = 0, upperLimit = 1) {
    const val = node.getText();
    const m = val.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);
    if (m) {
        if (m[2]) {
            factor = 100.0;
        }
        const result = parseFloat(m[1]) / factor;
        if (result >= lowerLimit && result <= upperLimit) {
            return result;
        }
    }
    throw new Error();
}
function getAngle(node) {
    const val = node.getText();
    const m = val.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);
    if (m) {
        switch (m[2]) {
            case 'deg':
                return parseFloat(val) % 360;
            case 'rad':
                return (parseFloat(val) * 180 / Math.PI) % 360;
            case 'grad':
                return (parseFloat(val) * 0.9) % 360;
            case 'turn':
                return (parseFloat(val) * 360) % 360;
            default:
                if ('undefined' === typeof m[2]) {
                    return parseFloat(val) % 360;
                }
        }
    }
    throw new Error();
}
function isColorConstructor(node) {
    const name = node.getName();
    if (!name) {
        return false;
    }
    return colorFunctionNameRegExp.test(name);
}
function isColorString(s) {
    return hexColorRegExp.test(s) || colorsRegExp.test(s) || colorKeywordsRegExp.test(s);
}
const Digit0 = 48;
const Digit9 = 57;
const A = 65;
const a = 97;
const f = 102;
function hexDigit(charCode) {
    if (charCode < Digit0) {
        return 0;
    }
    if (charCode <= Digit9) {
        return charCode - Digit0;
    }
    if (charCode < a) {
        charCode += (a - A);
    }
    if (charCode >= a && charCode <= f) {
        return charCode - a + 10;
    }
    return 0;
}
function colorFromHex(text) {
    if (text[0] !== '#') {
        return null;
    }
    switch (text.length) {
        case 4:
            return {
                red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
                green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
                blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
                alpha: 1
            };
        case 5:
            return {
                red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
                green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
                blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
                alpha: (hexDigit(text.charCodeAt(4)) * 0x11) / 255.0,
            };
        case 7:
            return {
                red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
                green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
                blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
                alpha: 1
            };
        case 9:
            return {
                red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
                green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
                blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
                alpha: (hexDigit(text.charCodeAt(7)) * 0x10 + hexDigit(text.charCodeAt(8))) / 255.0
            };
    }
    return null;
}
function colorFromHSL(hue, sat, light, alpha = 1.0) {
    hue = hue / 60.0;
    if (sat === 0) {
        return { red: light, green: light, blue: light, alpha };
    }
    else {
        const hueToRgb = (t1, t2, hue) => {
            while (hue < 0) {
                hue += 6;
            }
            while (hue >= 6) {
                hue -= 6;
            }
            if (hue < 1) {
                return (t2 - t1) * hue + t1;
            }
            if (hue < 3) {
                return t2;
            }
            if (hue < 4) {
                return (t2 - t1) * (4 - hue) + t1;
            }
            return t1;
        };
        const t2 = light <= 0.5 ? (light * (sat + 1)) : (light + sat - (light * sat));
        const t1 = light * 2 - t2;
        return { red: hueToRgb(t1, t2, hue + 2), green: hueToRgb(t1, t2, hue), blue: hueToRgb(t1, t2, hue - 2), alpha };
    }
}
function hslFromColor(rgba) {
    const r = rgba.red;
    const g = rgba.green;
    const b = rgba.blue;
    const a = rgba.alpha;
    const max = Math.max(r, g, b);
    const min = Math.min(r, g, b);
    let h = 0;
    let s = 0;
    const l = (min + max) / 2;
    const chroma = max - min;
    if (chroma > 0) {
        s = Math.min((l <= 0.5 ? chroma / (2 * l) : chroma / (2 - (2 * l))), 1);
        switch (max) {
            case r:
                h = (g - b) / chroma + (g < b ? 6 : 0);
                break;
            case g:
                h = (b - r) / chroma + 2;
                break;
            case b:
                h = (r - g) / chroma + 4;
                break;
        }
        h *= 60;
        h = Math.round(h);
    }
    return { h, s, l, a };
}
function colorFromHWB(hue, white, black, alpha = 1.0) {
    if (white + black >= 1) {
        const gray = white / (white + black);
        return { red: gray, green: gray, blue: gray, alpha };
    }
    const rgb = colorFromHSL(hue, 1, 0.5, alpha);
    let red = rgb.red;
    red *= (1 - white - black);
    red += white;
    let green = rgb.green;
    green *= (1 - white - black);
    green += white;
    let blue = rgb.blue;
    blue *= (1 - white - black);
    blue += white;
    return {
        red: red,
        green: green,
        blue: blue,
        alpha
    };
}
function hwbFromColor(rgba) {
    const hsl = hslFromColor(rgba);
    const white = Math.min(rgba.red, rgba.green, rgba.blue);
    const black = 1 - Math.max(rgba.red, rgba.green, rgba.blue);
    return {
        h: hsl.h,
        w: white,
        b: black,
        a: hsl.a
    };
}
function xyzFromLAB(lab) {
    const xyz = {
        x: 0,
        y: 0,
        z: 0,
        alpha: lab.alpha ?? 1
    };
    xyz.y = (lab.l + 16.0) / 116.0;
    xyz.x = (lab.a / 500.0) + xyz.y;
    xyz.z = xyz.y - (lab.b / 200.0);
    let key;
    for (key in xyz) {
        let pow = xyz[key] * xyz[key] * xyz[key];
        if (pow > 0.008856) {
            xyz[key] = pow;
        }
        else {
            xyz[key] = (xyz[key] - 16.0 / 116.0) / 7.787;
        }
    }
    xyz.x = xyz.x * 95.047;
    xyz.y = xyz.y * 100.0;
    xyz.z = xyz.z * 108.883;
    return xyz;
}
function xyzToRGB(xyz) {
    const x = xyz.x / 100;
    const y = xyz.y / 100;
    const z = xyz.z / 100;
    const r = 3.2406254773200533 * x - 1.5372079722103187 * y - 0.4986285986982479 * z;
    const g = -0.9689307147293197 * x + 1.8757560608852415 * y + 0.041517523842953964 * z;
    const b = 0.055710120445510616 * x + -0.2040210505984867 * y + 1.0569959422543882 * z;
    const compand = (c) => {
        return c <= 0.0031308 ?
            12.92 * c :
            Math.min(1.055 * Math.pow(c, 1 / 2.4) - 0.055, 1);
    };
    return {
        red: Math.round(compand(r) * 255.0),
        blue: Math.round(compand(b) * 255.0),
        green: Math.round(compand(g) * 255.0),
        alpha: xyz.alpha
    };
}
function RGBtoXYZ(rgba) {
    let r = rgba.red, g = rgba.green, b = rgba.blue;
    if (r > 0.04045) {
        r = Math.pow((r + 0.055) / 1.055, 2.4);
    }
    else {
        r = r / 12.92;
    }
    if (g > 0.04045) {
        g = Math.pow((g + 0.055) / 1.055, 2.4);
    }
    else {
        g = g / 12.92;
    }
    if (b > 0.04045) {
        b = Math.pow((b + 0.055) / 1.055, 2.4);
    }
    else {
        b = b / 12.92;
    }
    r = r * 100;
    g = g * 100;
    b = b * 100;
    const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
    const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
    const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
    return { x, y, z, alpha: rgba.alpha };
}
function XYZtoLAB(xyz, round = true) {
    const ref_X = 95.047, ref_Y = 100.000, ref_Z = 108.883;
    let x = xyz.x / ref_X, y = xyz.y / ref_Y, z = xyz.z / ref_Z;
    if (x > 0.008856) {
        x = Math.pow(x, 1 / 3);
    }
    else {
        x = (7.787 * x) + (16 / 116);
    }
    if (y > 0.008856) {
        y = Math.pow(y, 1 / 3);
    }
    else {
        y = (7.787 * y) + (16 / 116);
    }
    if (z > 0.008856) {
        z = Math.pow(z, 1 / 3);
    }
    else {
        z = (7.787 * z) + (16 / 116);
    }
    const l = (116 * y) - 16, a = 500 * (x - y), b = 200 * (y - z);
    if (round) {
        return {
            l: Math.round((l + Number.EPSILON) * 100) / 100,
            a: Math.round((a + Number.EPSILON) * 100) / 100,
            b: Math.round((b + Number.EPSILON) * 100) / 100,
            alpha: xyz.alpha
        };
    }
    else {
        return {
            l, a, b,
            alpha: xyz.alpha
        };
    }
}
function labFromColor(rgba, round = true) {
    const xyz = RGBtoXYZ(rgba);
    const lab = XYZtoLAB(xyz, round);
    return lab;
}
function lchFromColor(rgba) {
    const lab = labFromColor(rgba, false);
    const c = Math.sqrt(Math.pow(lab.a, 2) + Math.pow(lab.b, 2));
    let h = Math.atan2(lab.b, lab.a) * (180 / Math.PI);
    while (h < 0) {
        h = h + 360;
    }
    return {
        l: Math.round((lab.l + Number.EPSILON) * 100) / 100,
        c: Math.round((c + Number.EPSILON) * 100) / 100,
        h: Math.round((h + Number.EPSILON) * 100) / 100,
        alpha: lab.alpha
    };
}
function colorFromLAB(l, a, b, alpha = 1.0) {
    const lab = {
        l,
        a,
        b,
        alpha
    };
    const xyz = xyzFromLAB(lab);
    const rgb = xyzToRGB(xyz);
    return {
        red: (rgb.red >= 0 ? (rgb.red <= 255 ? rgb.red : 255) : 0) / 255.0,
        green: (rgb.green >= 0 ? (rgb.green <= 255 ? rgb.green : 255) : 0) / 255.0,
        blue: (rgb.blue >= 0 ? (rgb.blue <= 255 ? rgb.blue : 255) : 0) / 255.0,
        alpha
    };
}
function labFromLCH(l, c, h, alpha = 1.0) {
    return {
        l: l,
        a: c * Math.cos(h * (Math.PI / 180)),
        b: c * Math.sin(h * (Math.PI / 180)),
        alpha: alpha
    };
}
function colorFromLCH(l, c, h, alpha = 1.0) {
    const lab = labFromLCH(l, c, h, alpha);
    return colorFromLAB(lab.l, lab.a, lab.b, alpha);
}
function getColorValue(node) {
    if (node.type === NodeType$1.HexColorValue) {
        const text = node.getText();
        return colorFromHex(text);
    }
    else if (node.type === NodeType$1.Function) {
        const functionNode = node;
        const name = functionNode.getName();
        let colorValues = functionNode.getArguments().getChildren();
        if (colorValues.length === 1) {
            const functionArg = colorValues[0].getChildren();
            if (functionArg.length === 1 && functionArg[0].type === NodeType$1.Expression) {
                colorValues = functionArg[0].getChildren();
                if (colorValues.length === 3) {
                    const lastValue = colorValues[2];
                    if (lastValue instanceof BinaryExpression) {
                        const left = lastValue.getLeft(), right = lastValue.getRight(), operator = lastValue.getOperator();
                        if (left && right && operator && operator.matches('/')) {
                            colorValues = [colorValues[0], colorValues[1], left, right];
                        }
                    }
                }
            }
        }
        if (!name || colorValues.length < 3 || colorValues.length > 4) {
            return null;
        }
        try {
            const alpha = colorValues.length === 4 ? getNumericValue(colorValues[3], 1) : 1;
            if (name === 'rgb' || name === 'rgba') {
                return {
                    red: getNumericValue(colorValues[0], 255.0),
                    green: getNumericValue(colorValues[1], 255.0),
                    blue: getNumericValue(colorValues[2], 255.0),
                    alpha
                };
            }
            else if (name === 'hsl' || name === 'hsla') {
                const h = getAngle(colorValues[0]);
                const s = getNumericValue(colorValues[1], 100.0);
                const l = getNumericValue(colorValues[2], 100.0);
                return colorFromHSL(h, s, l, alpha);
            }
            else if (name === 'hwb') {
                const h = getAngle(colorValues[0]);
                const w = getNumericValue(colorValues[1], 100.0);
                const b = getNumericValue(colorValues[2], 100.0);
                return colorFromHWB(h, w, b, alpha);
            }
            else if (name === 'lab') {
                const l = getNumericValue(colorValues[0], 100.0);
                const a = getNumericValue(colorValues[1], 125.0, -1);
                const b = getNumericValue(colorValues[2], 125.0, -1);
                return colorFromLAB(l * 100, a * 125, b * 125, alpha);
            }
            else if (name === 'lch') {
                const l = getNumericValue(colorValues[0], 100.0);
                const c = getNumericValue(colorValues[1], 230.0);
                const h = getAngle(colorValues[2]);
                return colorFromLCH(l * 100, c * 230, h, alpha);
            }
        }
        catch (e) {
            return null;
        }
    }
    else if (node.type === NodeType$1.Identifier) {
        if (node.parent && node.parent.type !== NodeType$1.Term) {
            return null;
        }
        const term = node.parent;
        if (term && term.parent && term.parent.type === NodeType$1.BinaryExpression) {
            const expression = term.parent;
            if (expression.parent && expression.parent.type === NodeType$1.ListEntry && expression.parent.key === expression) {
                return null;
            }
        }
        const candidateColor = node.getText().toLowerCase();
        if (candidateColor === 'none') {
            return null;
        }
        const colorHex = colors[candidateColor];
        if (colorHex) {
            return colorFromHex(colorHex);
        }
    }
    return null;
}

const positionKeywords = {
    '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.'
};
const repeatStyleKeywords = {
    '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.'
};
const lineStyleKeywords = {
    '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.'
};
const lineWidthKeywords = ['medium', 'thick', 'thin'];
const boxKeywords = {
    '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.'
};
const geometryBoxKeywords = {
    '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.'
};
const cssWideKeywords = {
    '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.'
};
const cssWideFunctions = {
    'var()': 'Evaluates the value of a custom variable.',
    'calc()': 'Evaluates an mathematical expression. The following operators can be used: + - * /.'
};
const imageFunctions = {
    '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.'
};
const transitionTimingFunctions = {
    '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.'
};
const basicShapeFunctions = {
    'circle()': 'Defines a circle.',
    'ellipse()': 'Defines an ellipse.',
    'inset()': 'Defines an inset rectangle.',
    'polygon()': 'Defines a polygon.'
};
const units = {
    'length': ['cap', 'ch', 'cm', 'cqb', 'cqh', 'cqi', 'cqmax', 'cqmin', 'cqw', 'dvb', 'dvh', 'dvi', 'dvw', 'em', 'ex', 'ic', 'in', 'lh', 'lvb', 'lvh', 'lvi', 'lvw', 'mm', 'pc', 'pt', 'px', 'q', 'rcap', 'rch', 'rem', 'rex', 'ric', 'rlh', 'svb', 'svh', 'svi', 'svw', 'vb', 'vh', 'vi', 'vmax', 'vmin', 'vw'],
    'angle': ['deg', 'rad', 'grad', 'turn'],
    'time': ['ms', 's'],
    'frequency': ['Hz', 'kHz'],
    'resolution': ['dpi', 'dpcm', 'dppx'],
    'percentage': ['%', 'fr']
};
const html5Tags = ['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'];
const svgElements = ['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'];
const pageBoxDirectives = [
    '@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 values(obj) {
    return Object.keys(obj).map(key => obj[key]);
}
function isDefined(obj) {
    return typeof obj !== 'undefined';
}

class Parser {
    constructor(scnr = new Scanner()) {
        this.keyframeRegex = /^@(\-(webkit|ms|moz|o)\-)?keyframes$/i;
        this.scanner = scnr;
        this.token = { type: TokenType.EOF, offset: -1, len: 0, text: '' };
        this.prevToken = undefined;
    }
    peekIdent(text) {
        return TokenType.Ident === this.token.type && text.length === this.token.text.length && text === this.token.text.toLowerCase();
    }
    peekKeyword(text) {
        return TokenType.AtKeyword === this.token.type && text.length === this.token.text.length && text === this.token.text.toLowerCase();
    }
    peekDelim(text) {
        return TokenType.Delim === this.token.type && text === this.token.text;
    }
    peek(type) {
        return type === this.token.type;
    }
    peekOne(...types) {
        return types.indexOf(this.token.type) !== -1;
    }
    peekRegExp(type, regEx) {
        if (type !== this.token.type) {
            return false;
        }
        return regEx.test(this.token.text);
    }
    hasWhitespace() {
        return !!this.prevToken && (this.prevToken.offset + this.prevToken.len !== this.token.offset);
    }
    consumeToken() {
        this.prevToken = this.token;
        this.token = this.scanner.scan();
    }
    acceptUnicodeRange() {
        const token = this.scanner.tryScanUnicode();
        if (token) {
            this.prevToken = token;
            this.token = this.scanner.scan();
            return true;
        }
        return false;
    }
    mark() {
        return {
            prev: this.prevToken,
            curr: this.token,
            pos: this.scanner.pos()
        };
    }
    restoreAtMark(mark) {
        this.prevToken = mark.prev;
        this.token = mark.curr;
        this.scanner.goBackTo(mark.pos);
    }
    try(func) {
        const pos = this.mark();
        const node = func();
        if (!node) {
            this.restoreAtMark(pos);
            return null;
        }
        return node;
    }
    acceptOneKeyword(keywords) {
        if (TokenType.AtKeyword === this.token.type) {
            for (const keyword of keywords) {
                if (keyword.length === this.token.text.length && keyword === this.token.text.toLowerCase()) {
                    this.consumeToken();
                    return true;
                }
            }
        }
        return false;
    }
    accept(type) {
        if (type === this.token.type) {
            this.consumeToken();
            return true;
        }
        return false;
    }
    acceptIdent(text) {
        if (this.peekIdent(text)) {
            this.consumeToken();
            return true;
        }
        return false;
    }
    acceptKeyword(text) {
        if (this.peekKeyword(text)) {
            this.consumeToken();
            return true;
        }
        return false;
    }
    acceptDelim(text) {
        if (this.peekDelim(text)) {
            this.consumeToken();
            return true;
        }
        return false;
    }
    acceptRegexp(regEx) {
        if (regEx.test(this.token.text)) {
            this.consumeToken();
            return true;
        }
        return false;
    }
    _parseRegexp(regEx) {
        let node = this.createNode(NodeType$1.Identifier);
        do { } while (this.acceptRegexp(regEx));
        return this.finish(node);
    }
    acceptUnquotedString() {
        const pos = this.scanner.pos();
        this.scanner.goBackTo(this.token.offset);
        const unquoted = this.scanner.scanUnquotedString();
        if (unquoted) {
            this.token = unquoted;
            this.consumeToken();
            return true;
        }
        this.scanner.goBackTo(pos);
        return false;
    }
    resync(resyncTokens, resyncStopTokens) {
        while (true) {
            if (resyncTokens && resyncTokens.indexOf(this.token.type) !== -1) {
                this.consumeToken();
                return true;
            }
            else if (resyncStopTokens && resyncStopTokens.indexOf(this.token.type) !== -1) {
                return true;
            }
            else {
                if (this.token.type === TokenType.EOF) {
                    return false;
                }
                this.token = this.scanner.scan();
            }
        }
    }
    createNode(nodeType) {
        return new Node(this.token.offset, this.token.len, nodeType);
    }
    create(ctor) {
        return new ctor(this.token.offset, this.token.len);
    }
    finish(node, error, resyncTokens, resyncStopTokens) {
        if (!(node instanceof Nodelist)) {
            if (error) {
                this.markError(node, error, resyncTokens, resyncStopTokens);
            }
            if (this.prevToken) {
                const prevEnd = this.prevToken.offset + this.prevToken.len;
                node.length = prevEnd > node.offset ? prevEnd - node.offset : 0;
            }
        }
        return node;
    }
    markError(node, error, resyncTokens, resyncStopTokens) {
        if (this.token !== this.lastErrorToken) {
            node.addIssue(new Marker(node, error, Level.Error, undefined, this.token.offset, this.token.len));
            this.lastErrorToken = this.token;
        }
        if (resyncTokens || resyncStopTokens) {
            this.resync(resyncTokens, resyncStopTokens);
        }
    }
    parseStylesheet(textDocument) {
        const versionId = textDocument.version;
        const text = textDocument.getText();
        const textProvider = (offset, length) => {
            if (textDocument.version !== versionId) {
                throw new Error('Underlying model has changed, AST is no longer valid');
            }
            return text.substr(offset, length);
        };
        return this.internalParse(text, this._parseStylesheet, textProvider);
    }
    internalParse(input, parseFunc, textProvider) {
        this.scanner.setSource(input);
        this.token = this.scanner.scan();
        const node = parseFunc.bind(this)();
        if (node) {
            if (textProvider) {
                node.textProvider = textProvider;
            }
            else {
                node.textProvider = (offset, length) => { return input.substr(offset, length); };
            }
        }
        return node;
    }
    _parseStylesheet() {
        const node = this.create(Stylesheet);
        while (node.addChild(this._parseStylesheetStart())) {
        }
        let inRecovery = false;
        do {
            let hasMatch = false;
            do {
                hasMatch = false;
                const statement = this._parseStylesheetStatement();
                if (statement) {
                    node.addChild(statement);
                    hasMatch = true;
                    inRecovery = false;
                    if (!this.peek(TokenType.EOF) && this._needsSemicolonAfter(statement) && !this.accept(TokenType.SemiColon)) {
                        this.markError(node, ParseError.SemiColonExpected);
                    }
                }
                while (this.accept(TokenType.SemiColon) || this.accept(TokenType.CDO) || this.accept(TokenType.CDC)) {
                    hasMatch = true;
                    inRecovery = false;
                }
            } while (hasMatch);
            if (this.peek(TokenType.EOF)) {
                break;
            }
            if (!inRecovery) {
                if (this.peek(TokenType.AtKeyword)) {
                    this.markError(node, ParseError.UnknownAtRule);
                }
                else {
                    this.markError(node, ParseError.RuleOrSelectorExpected);
                }
                inRecovery = true;
            }
            this.consumeToken();
        } while (!this.peek(TokenType.EOF));
        return this.finish(node);
    }
    _parseStylesheetStart() {
        return this._parseCharset();
    }
    _parseStylesheetStatement(isNested = false) {
        if (this.peek(TokenType.AtKeyword)) {
            return this._parseStylesheetAtStatement(isNested);
        }
        return this._parseRuleset(isNested);
    }
    _parseStylesheetAtStatement(isNested = false) {
        return this._parseImport()
            || this._parseMedia(isNested)
            || this._parseScope()
            || this._parsePage()
            || this._parseFontFace()
            || this._parseKeyframe()
            || this._parseSupports(isNested)
            || this._parseLayer(isNested)
            || this._parsePropertyAtRule()
            || this._parseViewPort()
            || this._parseNamespace()
            || this._parseDocument()
            || this._parseContainer(isNested)
            || this._parseStartingStyleAtRule(isNested)
            || this._parseUnknownAtRule();
    }
    _tryParseRuleset(isNested) {
        const mark = this.mark();
        if (this._parseSelector(isNested)) {
            while (this.accept(TokenType.Comma) && this._parseSelector(isNested)) {
            }
            if (this.accept(TokenType.CurlyL)) {
                this.restoreAtMark(mark);
                return this._parseRuleset(isNested);
            }
        }
        this.restoreAtMark(mark);
        return null;
    }
    _parseRuleset(isNested = false) {
        const node = this.create(RuleSet);
        const selectors = node.getSelectors();
        if (!selectors.addChild(this._parseSelector(isNested))) {
            return null;
        }
        while (this.accept(TokenType.Comma)) {
            if (!selectors.addChild(this._parseSelector(isNested))) {
                return this.finish(node, ParseError.SelectorExpected);
            }
        }
        return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
    }
    _parseRuleSetDeclarationAtStatement() {
        return this._parseMedia(true)
            || this._parseScope()
            || this._parseSupports(true)
            || this._parseLayer(true)
            || this._parseContainer(true)
            || this._parseStartingStyleAtRule(true)
            || this._parseUnknownAtRule();
    }
    _parseRuleSetDeclaration() {
        if (this.peek(TokenType.AtKeyword)) {
            return this._parseRuleSetDeclarationAtStatement();
        }
        if (!this.peek(TokenType.Ident)) {
            return this._parseRuleset(true);
        }
        return this._tryParseRuleset(true) || this._parseDeclaration();
    }
    _needsSemicolonAfter(node) {
        switch (node.type) {
            case NodeType$1.Keyframe:
            case NodeType$1.ViewPort:
            case NodeType$1.Media:
            case NodeType$1.Ruleset:
            case NodeType$1.Namespace:
            case NodeType$1.If:
            case NodeType$1.For:
            case NodeType$1.Each:
            case NodeType$1.While:
            case NodeType$1.MixinDeclaration:
            case NodeType$1.FunctionDeclaration:
            case NodeType$1.MixinContentDeclaration:
            case NodeType$1.Scope:
                return false;
            case NodeType$1.ExtendsReference:
            case NodeType$1.MixinContentReference:
            case NodeType$1.ReturnStatement:
            case NodeType$1.MediaQuery:
            case NodeType$1.Debug:
            case NodeType$1.Import:
            case NodeType$1.AtApplyRule:
            case NodeType$1.CustomPropertyDeclaration:
                return true;
            case NodeType$1.VariableDeclaration:
                return node.needsSemicolon;
            case NodeType$1.MixinReference:
                return !node.getContent();
            case NodeType$1.Declaration:
                return !node.getNestedProperties();
        }
        return false;
    }
    _parseDeclarations(parseDeclaration) {
        const node = this.create(Declarations);
        if (!this.accept(TokenType.CurlyL)) {
            return null;
        }
        let decl = parseDeclaration();
        while (node.addChild(decl)) {
            if (this.peek(TokenType.CurlyR)) {
                break;
            }
            if (this._needsSemicolonAfter(decl) && !this.accept(TokenType.SemiColon)) {
                return this.finish(node, ParseError.SemiColonExpected, [TokenType.SemiColon, TokenType.CurlyR]);
            }
            if (decl && this.prevToken && this.prevToken.type === TokenType.SemiColon) {
                decl.semicolonPosition = this.prevToken.offset;
            }
            while (this.accept(TokenType.SemiColon)) {
            }
            decl = parseDeclaration();
        }
        if (!this.accept(TokenType.CurlyR)) {
            return this.finish(node, ParseError.RightCurlyExpected, [TokenType.CurlyR, TokenType.SemiColon]);
        }
        return this.finish(node);
    }
    _parseBody(node, parseDeclaration) {
        if (!node.setDeclarations(this._parseDeclarations(parseDeclaration))) {
            return this.finish(node, ParseError.LeftCurlyExpected, [TokenType.CurlyR, TokenType.SemiColon]);
        }
        return this.finish(node);
    }
    _parseSelector(isNested) {
        const node = this.create(Selector);
        let hasContent = false;
        if (isNested) {
            hasContent = node.addChild(this._parseCombinator());
        }
        while (node.addChild(this._parseSimpleSelector())) {
            hasContent = true;
            node.addChild(this._parseCombinator());
        }
        return hasContent ? this.finish(node) : null;
    }
    _parseDeclaration(stopTokens) {
        const customProperty = this._tryParseCustomPropertyDeclaration(stopTokens);
        if (customProperty) {
            return customProperty;
        }
        const node = this.create(Declaration);
        if (!node.setProperty(this._parseProperty())) {
            return null;
        }
        if (!this.accept(TokenType.Colon)) {
            return this.finish(node, ParseError.ColonExpected, [TokenType.Colon], stopTokens || [TokenType.SemiColon]);
        }
        if (this.prevToken) {
            node.colonPosition = this.prevToken.offset;
        }
        if (!node.setValue(this._parseExpr())) {
            return this.finish(node, ParseError.PropertyValueExpected);
        }
        node.addChild(this._parsePrio());
        if (this.peek(TokenType.SemiColon)) {
            node.semicolonPosition = this.token.offset;
        }
        return this.finish(node);
    }
    _tryParseCustomPropertyDeclaration(stopTokens) {
        if (!this.peekRegExp(TokenType.Ident, /^--/)) {
            return null;
        }
        const node = this.create(CustomPropertyDeclaration);
        if (!node.setProperty(this._parseProperty())) {
            return null;
        }
        if (!this.accept(TokenType.Colon)) {
            return this.finish(node, ParseError.ColonExpected, [TokenType.Colon]);
        }
        if (this.prevToken) {
            node.colonPosition = this.prevToken.offset;
        }
        const mark = this.mark();
        if (this.peek(TokenType.CurlyL)) {
            const propertySet = this.create(CustomPropertySet);
            const declarations = this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));
            if (propertySet.setDeclarations(declarations) && !declarations.isErroneous(true)) {
                propertySet.addChild(this._parsePrio());
                if (this.peek(TokenType.SemiColon)) {
                    this.finish(propertySet);
                    node.setPropertySet(propertySet);
                    node.semicolonPosition = this.token.offset;
                    return this.finish(node);
                }
            }
            this.restoreAtMark(mark);
        }
        const expression = this._parseExpr();
        if (expression && !expression.isErroneous(true)) {
            this._parsePrio();
            if (this.peekOne(...(stopTokens || []), TokenType.SemiColon, TokenType.EOF)) {
                node.setValue(expression);
                if (this.peek(TokenType.SemiColon)) {
                    node.semicolonPosition = this.token.offset;
                }
                return this.finish(node);
            }
        }
        this.restoreAtMark(mark);
        node.addChild(this._parseCustomPropertyValue(stopTokens));
        node.addChild(this._parsePrio());
        if (isDefined(node.colonPosition) && this.token.offset === node.colonPosition + 1) {
            return this.finish(node, ParseError.PropertyValueExpected);
        }
        return this.finish(node);
    }
    _parseCustomPropertyValue(stopTokens = [TokenType.CurlyR]) {
        const node = this.create(Node);
        const isTopLevel = () => curlyDepth === 0 && parensDepth === 0 && bracketsDepth === 0;
        const onStopToken = () => stopTokens.indexOf(this.token.type) !== -1;
        let curlyDepth = 0;
        let parensDepth = 0;
        let bracketsDepth = 0;
        done: while (true) {
            switch (this.token.type) {
                case TokenType.SemiColon:
                    if (isTopLevel()) {
                        break done;
                    }
                    break;
                case TokenType.Exclamation:
                    if (isTopLevel()) {
                        break done;
                    }
                    break;
                case TokenType.CurlyL:
                    curlyDepth++;
                    break;
                case TokenType.CurlyR:
                    curlyDepth--;
                    if (curlyDepth < 0) {
                        if (onStopToken() && parensDepth === 0 && bracketsDepth === 0) {
                            break done;
                        }
                        return this.finish(node, ParseError.LeftCurlyExpected);
                    }
                    break;
                case TokenType.ParenthesisL:
                    parensDepth++;
                    break;
                case TokenType.ParenthesisR:
                    parensDepth--;
                    if (parensDepth < 0) {
                        if (onStopToken() && bracketsDepth === 0 && curlyDepth === 0) {
                            break done;
                        }
                        return this.finish(node, ParseError.LeftParenthesisExpected);
                    }
                    break;
                case TokenType.BracketL:
                    bracketsDepth++;
                    break;
                case TokenType.BracketR:
                    bracketsDepth--;
                    if (bracketsDepth < 0) {
                        return this.finish(node, ParseError.LeftSquareBracketExpected);
                    }
                    break;
                case TokenType.BadString:
                    break done;
                case TokenType.EOF:
                    let error = ParseError.RightCurlyExpected;
                    if (bracketsDepth > 0) {
                        error = ParseError.RightSquareBracketExpected;
                    }
                    else if (parensDepth > 0) {
                        error = ParseError.RightParenthesisExpected;
                    }
                    return this.finish(node, error);
            }
            this.consumeToken();
        }
        return this.finish(node);
    }
    _tryToParseDeclaration(stopTokens) {
        const mark = this.mark();
        if (this._parseProperty() && this.accept(TokenType.Colon)) {
            this.restoreAtMark(mark);
            return this._parseDeclaration(stopTokens);
        }
        this.restoreAtMark(mark);
        return null;
    }
    _parseProperty() {
        const node = this.create(Property);
        const mark = this.mark();
        if (this.acceptDelim('*') || this.acceptDelim('_')) {
            if (this.hasWhitespace()) {
                this.restoreAtMark(mark);
                return null;
            }
        }
        if (node.setIdentifier(this._parsePropertyIdentifier())) {
            return this.finish(node);
        }
        return null;
    }
    _parsePropertyIdentifier() {
        return this._parseIdent();
    }
    _parseCharset() {
        if (!this.peek(TokenType.Charset)) {
            return null;
        }
        const node = this.create(Node);
        this.consumeToken();
        if (!this.accept(TokenType.String)) {
            return this.finish(node, ParseError.IdentifierExpected);
        }
        if (!this.accept(TokenType.SemiColon)) {
            return this.finish(node, ParseError.SemiColonExpected);
        }
        return this.finish(node);
    }
    _parseImport() {
        if (!this.peekKeyword('@import')) {
            return null;
        }
        const node = this.create(Import);
        this.consumeToken();
        if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
            return this.finish(node, ParseError.URIOrStringExpected);
        }
        return this._completeParseImport(node);
    }
    _completeParseImport(node) {
        if (this.acceptIdent('layer')) {
            if (this.accept(TokenType.ParenthesisL)) {
                if (!node.addChild(this._parseLayerName())) {
                    return this.finish(node, ParseError.IdentifierExpected, [TokenType.SemiColon]);
                }
                if (!this.accept(TokenType.ParenthesisR)) {
                    return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.ParenthesisR], []);
                }
            }
        }
        if (this.acceptIdent('supports')) {
            if (this.accept(TokenType.ParenthesisL)) {
                node.addChild(this._tryToParseDeclaration() || this._parseSupportsCondition());
                if (!this.accept(TokenType.ParenthesisR)) {
                    return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.ParenthesisR], []);
                }
            }
        }
        if (!this.peek(TokenType.SemiColon) && !this.peek(TokenType.EOF)) {
            node.setMedialist(this._parseMediaQueryList());
        }
        return this.finish(node);
    }
    _parseNamespace() {
        if (!this.peekKeyword('@namespace')) {
            return null;
        }
        const node = this.create(Namespace);
        this.consumeToken();
        if (!node.addChild(this._parseURILiteral())) {
            node.addChild(this._parseIdent());
            if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
                return this.finish(node, ParseError.URIExpected, [TokenType.SemiColon]);
            }
        }
        if (!this.accept(TokenType.SemiColon)) {
            return this.finish(node, ParseError.SemiColonExpected);
        }
        return this.finish(node);
    }
    _parseFontFace() {
        if (!this.peekKeyword('@font-face')) {
            return null;
        }
        const node = this.create(FontFace);
        this.consumeToken();
        return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
    }
    _parseViewPort() {
        if (!this.peekKeyword('@-ms-viewport') &&
            !this.peekKeyword('@-o-viewport') &&
            !this.peekKeyword('@viewport')) {
            return null;
        }
        const node = this.create(ViewPort);
        this.consumeToken();
        return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
    }
    _parseKeyframe() {
        if (!this.peekRegExp(TokenType.AtKeyword, this.keyframeRegex)) {
            return null;
        }
        const node = this.create(Keyframe);
        const atNode = this.create(Node);
        this.consumeToken();
        node.setKeyword(this.finish(atNode));
        if (atNode.matches('@-ms-keyframes')) {
            this.markError(atNode, ParseError.UnknownKeyword);
        }
        if (!node.setIdentifier(this._parseKeyframeIdent())) {
            return this.finish(node, ParseError.IdentifierExpected, [TokenType.CurlyR]);
        }
        return this._parseBody(node, this._parseKeyframeSelector.bind(this));
    }
    _parseKeyframeIdent() {
        return this._parseIdent([ReferenceType.Keyframe]);
    }
    _parseKeyframeSelector() {
        const node = this.create(KeyframeSelector);
        let hasContent = false;
        if (node.addChild(this._parseIdent())) {
            hasContent = true;
        }
        if (this.accept(TokenType.Percentage)) {
            hasContent = true;
        }
        if (!hasContent) {
            return null;
        }
        while (this.accept(TokenType.Comma)) {
            hasContent = false;
            if (node.addChild(this._parseIdent())) {
                hasContent = true;
            }
            if (this.accept(TokenType.Percentage)) {
                hasContent = true;
            }
            if (!hasContent) {
                return this.finish(node, ParseError.PercentageExpected);
            }
        }
        return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
    }
    _tryParseKeyframeSelector() {
        const node = this.create(KeyframeSelector);
        const pos = this.mark();
        let hasContent = false;
        if (node.addChild(this._parseIdent())) {
            hasContent = true;
        }
        if (this.accept(TokenType.Percentage)) {
            hasContent = true;
        }
        if (!hasContent) {
            return null;
        }
        while (this.accept(TokenType.Comma)) {
            hasContent = false;
            if (node.addChild(this._parseIdent())) {
                hasContent = true;
            }
            if (this.accept(TokenType.Percentage)) {
                hasContent = true;
            }
            if (!hasContent) {
                this.restoreAtMark(pos);
                return null;
            }
        }
        if (!this.peek(TokenType.CurlyL)) {
            this.restoreAtMark(pos);
            return null;
        }
        return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
    }
    _parsePropertyAtRule() {
        if (!this.peekKeyword('@property')) {
            return null;
        }
        const node = this.create(PropertyAtRule);
        this.consumeToken();
        if (!this.peekRegExp(TokenType.Ident, /^--/) || !node.setName(this._parseIdent([ReferenceType.Property]))) {
            return this.finish(node, ParseError.IdentifierExpected);
        }
        return this._parseBody(node, this._parseDeclaration.bind(this));
    }
    _parseStartingStyleAtRule(isNested = false) {
        if (!this.peekKeyword("@starting-style")) {
            return null;
        }
        const node = this.create(StartingStyleAtRule);
        this.consumeToken();
        return this._parseBody(node, this._parseStartingStyleDeclaration.bind(this, isNested));
    }
    _parseStartingStyleDeclaration(isNested = false) {
        if (isNested) {
            return this._tryParseRuleset(true)
                || this._tryToParseDeclaration()
                || this._parseStylesheetStatement(true);
        }
        return this._parseStylesheetStatement(false);
    }
    _parseLayer(isNested = false) {
        if (!this.peekKeyword('@layer')) {
            return null;
        }
        const node = this.create(Layer);
        this.consumeToken();
        const names = this._parseLayerNameList();
        if (names) {
            node.setNames(names);
        }
        if ((!names || names.getChildren().length === 1) && this.peek(TokenType.CurlyL)) {
            return this._parseBody(node, this._parseLayerDeclaration.bind(this, isNested));
        }
        if (!this.accept(TokenType.SemiColon)) {
            return this.finish(node, ParseError.SemiColonExpected);
        }
        return this.finish(node);
    }
    _parseLayerDeclaration(isNested = false) {
        if (isNested) {
            return this._tryParseRuleset(true)
                || this._tryToParseDeclaration()
                || this._parseStylesheetStatement(true);
        }
        return this._parseStylesheetStatement(false);
    }
    _parseLayerNameList() {
        const node = this.createNode(NodeType$1.LayerNameList);
        if (!node.addChild(this._parseLayerName())) {
            return null;
        }
        while (this.accept(TokenType.Comma)) {
            if (!node.addChild(this._parseLayerName())) {
                return this.finish(node, ParseError.IdentifierExpected);
            }
        }
        return this.finish(node);
    }
    _parseLayerName() {
        const node = this.createNode(NodeType$1.LayerName);
        if (!node.addChild(this._parseIdent())) {
            return null;
        }
        while (!this.hasWhitespace() && this.acceptDelim('.')) {
            if (this.hasWhitespace() || !node.addChild(this._parseIdent())) {
                return this.finish(node, ParseError.IdentifierExpected);
            }
        }
        return this.finish(node);
    }
    _parseSupports(isNested = false) {
        if (!this.peekKeyword('@supports')) {
            return null;
        }
        const node = this.create(Supports);
        this.consumeToken();
        node.addChild(this._parseSupportsCondition());
        return this._parseBody(node, this._parseSupportsDeclaration.bind(this, isNested));
    }
    _parseSupportsDeclaration(isNested = false) {
        if (isNested) {
            return this._tryParseRuleset(true)
                || this._tryToParseDeclaration()
                || this._parseStylesheetStatement(true);
        }
        return this._parseStylesheetStatement(false);
    }
    _parseSupportsCondition() {
        const node = this.create(SupportsCondition);
        if (this.acceptIdent('not')) {
            node.addChild(this._parseSupportsConditionInParens());
        }
        else {
            node.addChild(this._parseSupportsConditionInParens());
            if (this.peekRegExp(TokenType.Ident, /^(and|or)$/i)) {
                const text = this.token.text.toLowerCase();
                while (this.acceptIdent(text)) {
                    node.addChild(this._parseSupportsConditionInParens());
                }
            }
        }
        return this.finish(node);
    }
    _parseSupportsConditionInParens() {
        const node = this.create(SupportsCondition);
        if (this.accept(TokenType.ParenthesisL)) {
            if (this.prevToken) {
                node.lParent = this.prevToken.offset;
            }
            if (!node.addChild(this._tryToParseDeclaration([TokenType.ParenthesisR]))) {
                if (!this._parseSupportsCondition()) {
                    return this.finish(node, ParseError.ConditionExpected);
                }
            }
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.ParenthesisR], []);
            }
            if (this.prevToken) {
                node.rParent = this.prevToken.offset;
            }
            return this.finish(node);
        }
        else if (this.peek(TokenType.Ident)) {
            const pos = this.mark();
            this.consumeToken();
            if (!this.hasWhitespace() && this.accept(TokenType.ParenthesisL)) {
                let openParentCount = 1;
                while (this.token.type !== TokenType.EOF && openParentCount !== 0) {
                    if (this.token.type === TokenType.ParenthesisL) {
                        openParentCount++;
                    }
                    else if (this.token.type === TokenType.ParenthesisR) {
                        openParentCount--;
                    }
                    this.consumeToken();
                }
                return this.finish(node);
            }
            else {
                this.restoreAtMark(pos);
            }
        }
        return this.finish(node, ParseError.LeftParenthesisExpected, [], [TokenType.ParenthesisL]);
    }
    _parseMediaDeclaration(isNested = false) {
        if (isNested) {
            return this._tryParseRuleset(true)
                || this._tryToParseDeclaration()
                || this._parseStylesheetStatement(true);
        }
        return this._parseStylesheetStatement(false);
    }
    _parseMedia(isNested = false) {
        if (!this.peekKeyword('@media')) {
            return null;
        }
        const node = this.create(Media);
        this.consumeToken();
        if (!node.addChild(this._parseMediaQueryList())) {
            return this.finish(node, ParseError.MediaQueryExpected);
        }
        return this._parseBody(node, this._parseMediaDeclaration.bind(this, isNested));
    }
    _parseMediaQueryList() {
        const node = this.create(Medialist);
        if (!node.addChild(this._parseMediaQuery())) {
            return this.finish(node, ParseError.MediaQueryExpected);
        }
        while (this.accept(TokenType.Comma)) {
            if (!node.addChild(this._parseMediaQuery())) {
                return this.finish(node, ParseError.MediaQueryExpected);
            }
        }
        return this.finish(node);
    }
    _parseMediaQuery() {
        const node = this.create(MediaQuery);
        const pos = this.mark();
        this.acceptIdent('not');
        if (!this.peek(TokenType.ParenthesisL)) {
            if (this.acceptIdent('only')) ;
            if (!node.addChild(this._parseIdent())) {
                return null;
            }
            if (this.acceptIdent('and')) {
                node.addChild(this._parseMediaCondition());
            }
        }
        else {
            this.restoreAtMark(pos);
            node.addChild(this._parseMediaCondition());
        }
        return this.finish(node);
    }
    _parseRatio() {
        const pos = this.mark();
        const node = this.create(RatioValue);
        if (!this._parseNumeric()) {
            return null;
        }
        if (!this.acceptDelim('/')) {
            this.restoreAtMark(pos);
            return null;
        }
        if (!this._parseNumeric()) {
            return this.finish(node, ParseError.NumberExpected);
        }
        return this.finish(node);
    }
    _parseMediaCondition() {
        const node = this.create(MediaCondition);
        this.acceptIdent('not');
        let parseExpression = true;
        while (parseExpression) {
            if (!this.accept(TokenType.ParenthesisL)) {
                return this.finish(node, ParseError.LeftParenthesisExpected, [], [TokenType.CurlyL]);
            }
            if (this.peek(TokenType.ParenthesisL) || this.peekIdent('not')) {
                node.addChild(this._parseMediaCondition());
            }
            else {
                node.addChild(this._parseMediaFeature());
            }
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected, [], [TokenType.CurlyL]);
            }
            parseExpression = this.acceptIdent('and') || this.acceptIdent('or');
        }
        return this.finish(node);
    }
    _parseMediaFeature() {
        const resyncStopToken = [TokenType.ParenthesisR];
        const node = this.create(MediaFeature);
        if (node.addChild(this._parseMediaFeatureName())) {
            if (this.accept(TokenType.Colon)) {
                if (!node.addChild(this._parseMediaFeatureValue())) {
                    return this.finish(node, ParseError.TermExpected, [], resyncStopToken);
                }
            }
            else if (this._parseMediaFeatureRangeOperator()) {
                if (!node.addChild(this._parseMediaFeatureValue())) {
                    return this.finish(node, ParseError.TermExpected, [], resyncStopToken);
                }
                if (this._parseMediaFeatureRangeOperator()) {
                    if (!node.addChild(this._parseMediaFeatureValue())) {
                        return this.finish(node, ParseError.TermExpected, [], resyncStopToken);
                    }
                }
            }
            else ;
        }
        else if (node.addChild(this._parseMediaFeatureValue())) {
            if (!this._parseMediaFeatureRangeOperator()) {
                return this.finish(node, ParseError.OperatorExpected, [], resyncStopToken);
            }
            if (!node.addChild(this._parseMediaFeatureName())) {
                return this.finish(node, ParseError.IdentifierExpected, [], resyncStopToken);
            }
            if (this._parseMediaFeatureRangeOperator()) {
                if (!node.addChild(this._parseMediaFeatureValue())) {
                    return this.finish(node, ParseError.TermExpected, [], resyncStopToken);
                }
            }
        }
        else {
            return this.finish(node, ParseError.IdentifierExpected, [], resyncStopToken);
        }
        return this.finish(node);
    }
    _parseMediaFeatureRangeOperator() {
        if (this.acceptDelim('<') || this.acceptDelim('>')) {
            if (!this.hasWhitespace()) {
                this.acceptDelim('=');
            }
            return true;
        }
        else if (this.acceptDelim('=')) {
            return true;
        }
        return false;
    }
    _parseMediaFeatureName() {
        return this._parseIdent();
    }
    _parseMediaFeatureValue() {
        return this._parseRatio() || this._parseTermExpression();
    }
    _parseScope() {
        if (!this.peekKeyword('@scope')) {
            return null;
        }
        const node = this.create(Scope$3);
        this.consumeToken();
        node.addChild(this._parseScopeLimits());
        return this._parseBody(node, this._parseScopeDeclaration.bind(this));
    }
    _parseScopeDeclaration() {
        const isNested = true;
        return this._tryParseRuleset(isNested)
            || this._tryToParseDeclaration()
            || this._parseStylesheetStatement(isNested);
    }
    _parseScopeLimits() {
        const node = this.create(ScopeLimits);
        if (this.accept(TokenType.ParenthesisL)) {
            if (!node.setScopeStart(this._parseSelector(true))) {
                return this.finish(node, ParseError.SelectorExpected, [], [TokenType.ParenthesisR]);
            }
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected, [], [TokenType.CurlyL]);
            }
        }
        if (this.acceptIdent('to')) {
            if (!this.accept(TokenType.ParenthesisL)) {
                return this.finish(node, ParseError.LeftParenthesisExpected, [], [TokenType.CurlyL]);
            }
            if (!node.setScopeEnd(this._parseSelector(true))) {
                return this.finish(node, ParseError.SelectorExpected, [], [TokenType.ParenthesisR]);
            }
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected, [], [TokenType.CurlyL]);
            }
        }
        return this.finish(node);
    }
    _parseMedium() {
        const node = this.create(Node);
        if (node.addChild(this._parseIdent())) {
            return this.finish(node);
        }
        else {
            return null;
        }
    }
    _parsePageDeclaration() {
        return this._parsePageMarginBox() || this._parseRuleSetDeclaration();
    }
    _parsePage() {
        if (!this.peekKeyword('@page')) {
            return null;
        }
        const node = this.create(Page);
        this.consumeToken();
        if (node.addChild(this._parsePageSelector())) {
            while (this.accept(TokenType.Comma)) {
                if (!node.addChild(this._parsePageSelector())) {
                    return this.finish(node, ParseError.IdentifierExpected);
                }
            }
        }
        return this._parseBody(node, this._parsePageDeclaration.bind(this));
    }
    _parsePageMarginBox() {
        if (!this.peek(TokenType.AtKeyword)) {
            return null;
        }
        const node = this.create(PageBoxMarginBox);
        if (!this.acceptOneKeyword(pageBoxDirectives)) {
            this.markError(node, ParseError.UnknownAtRule, [], [TokenType.CurlyL]);
        }
        return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
    }
    _parsePageSelector() {
        if (!this.peek(TokenType.Ident) && !this.peek(TokenType.Colon)) {
            return null;
        }
        const node = this.create(Node);
        node.addChild(this._parseIdent());
        if (this.accept(TokenType.Colon)) {
            if (!node.addChild(this._parseIdent())) {
                return this.finish(node, ParseError.IdentifierExpected);
            }
        }
        return this.finish(node);
    }
    _parseDocument() {
        if (!this.peekKeyword('@-moz-document')) {
            return null;
        }
        const node = this.create(Document);
        this.consumeToken();
        this.resync([], [TokenType.CurlyL]);
        return this._parseBody(node, this._parseStylesheetStatement.bind(this));
    }
    _parseContainerDeclaration(isNested = false) {
        if (isNested) {
            return this._tryParseRuleset(true) || this._tryToParseDeclaration() || this._parseStylesheetStatement(true);
        }
        return this._parseStylesheetStatement(false);
    }
    _parseContainer(isNested = false) {
        if (!this.peekKeyword('@container')) {
            return null;
        }
        const node = this.create(Container);
        this.consumeToken();
        node.addChild(this._parseIdent());
        node.addChild(this._parseContainerQuery());
        return this._parseBody(node, this._parseContainerDeclaration.bind(this, isNested));
    }
    _parseContainerQuery() {
        const node = this.create(Node);
        if (this.acceptIdent('not')) {
            node.addChild(this._parseContainerQueryInParens());
        }
        else {
            node.addChild(this._parseContainerQueryInParens());
            if (this.peekIdent('and')) {
                while (this.acceptIdent('and')) {
                    node.addChild(this._parseContainerQueryInParens());
                }
            }
            else if (this.peekIdent('or')) {
                while (this.acceptIdent('or')) {
                    node.addChild(this._parseContainerQueryInParens());
                }
            }
        }
        return this.finish(node);
    }
    _parseContainerQueryInParens() {
        const node = this.create(Node);
        if (this.accept(TokenType.ParenthesisL)) {
            if (this.peekIdent('not') || this.peek(TokenType.ParenthesisL)) {
                node.addChild(this._parseContainerQuery());
            }
            else {
                node.addChild(this._parseMediaFeature());
            }
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected, [], [TokenType.CurlyL]);
            }
        }
        else if (this.acceptIdent('style')) {
            if (this.hasWhitespace() || !this.accept(TokenType.ParenthesisL)) {
                return this.finish(node, ParseError.LeftParenthesisExpected, [], [TokenType.CurlyL]);
            }
            node.addChild(this._parseStyleQuery());
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected, [], [TokenType.CurlyL]);
            }
        }
        else {
            return this.finish(node, ParseError.LeftParenthesisExpected, [], [TokenType.CurlyL]);
        }
        return this.finish(node);
    }
    _parseStyleQuery() {
        const node = this.create(Node);
        if (this.acceptIdent('not')) {
            node.addChild(this._parseStyleInParens());
        }
        else if (this.peek(TokenType.ParenthesisL)) {
            node.addChild(this._parseStyleInParens());
            if (this.peekIdent('and')) {
                while (this.acceptIdent('and')) {
                    node.addChild(this._parseStyleInParens());
                }
            }
            else if (this.peekIdent('or')) {
                while (this.acceptIdent('or')) {
                    node.addChild(this._parseStyleInParens());
                }
            }
        }
        else {
            node.addChild(this._parseDeclaration([TokenType.ParenthesisR]));
        }
        return this.finish(node);
    }
    _parseStyleInParens() {
        const node = this.create(Node);
        if (this.accept(TokenType.ParenthesisL)) {
            node.addChild(this._parseStyleQuery());
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected, [], [TokenType.CurlyL]);
            }
        }
        else {
            return this.finish(node, ParseError.LeftParenthesisExpected, [], [TokenType.CurlyL]);
        }
        return this.finish(node);
    }
    _parseUnknownAtRule() {
        if (!this.peek(TokenType.AtKeyword)) {
            return null;
        }
        const node = this.create(UnknownAtRule);
        node.addChild(this._parseUnknownAtRuleName());
        const isTopLevel = () => curlyDepth === 0 && parensDepth === 0 && bracketsDepth === 0;
        let curlyLCount = 0;
        let curlyDepth = 0;
        let parensDepth = 0;
        let bracketsDepth = 0;
        done: while (true) {
            switch (this.token.type) {
                case TokenType.SemiColon:
                    if (isTopLevel()) {
                        break done;
                    }
                    break;
                case TokenType.EOF:
                    if (curlyDepth > 0) {
                        return this.finish(node, ParseError.RightCurlyExpected);
                    }
                    else if (bracketsDepth > 0) {
                        return this.finish(node, ParseError.RightSquareBracketExpected);
                    }
                    else if (parensDepth > 0) {
                        return this.finish(node, ParseError.RightParenthesisExpected);
                    }
                    else {
                        return this.finish(node);
                    }
                case TokenType.CurlyL:
                    curlyLCount++;
                    curlyDepth++;
                    break;
                case TokenType.CurlyR:
                    curlyDepth--;
                    if (curlyLCount > 0 && curlyDepth === 0) {
                        this.consumeToken();
                        if (bracketsDepth > 0) {
                            return this.finish(node, ParseError.RightSquareBracketExpected);
                        }
                        else if (parensDepth > 0) {
                            return this.finish(node, ParseError.RightParenthesisExpected);
                        }
                        break done;
                    }
                    if (curlyDepth < 0) {
                        if (parensDepth === 0 && bracketsDepth === 0) {
                            break done;
                        }
                        return this.finish(node, ParseError.LeftCurlyExpected);
                    }
                    break;
                case TokenType.ParenthesisL:
                    parensDepth++;
                    break;
                case TokenType.ParenthesisR:
                    parensDepth--;
                    if (parensDepth < 0) {
                        return this.finish(node, ParseError.LeftParenthesisExpected);
                    }
                    break;
                case TokenType.BracketL:
                    bracketsDepth++;
                    break;
                case TokenType.BracketR:
                    bracketsDepth--;
                    if (bracketsDepth < 0) {
                        return this.finish(node, ParseError.LeftSquareBracketExpected);
                    }
                    break;
            }
            this.consumeToken();
        }
        return node;
    }
    _parseUnknownAtRuleName() {
        const node = this.create(Node);
        if (this.accept(TokenType.AtKeyword)) {
            return this.finish(node);
        }
        return node;
    }
    _parseOperator() {
        if (this.peekDelim('/') ||
            this.peekDelim('*') ||
            this.peekDelim('+') ||
            this.peekDelim('-') ||
            this.peek(TokenType.Dashmatch) ||
            this.peek(TokenType.Includes) ||
            this.peek(TokenType.SubstringOperator) ||
            this.peek(TokenType.PrefixOperator) ||
            this.peek(TokenType.SuffixOperator) ||
            this.peekDelim('=')) {
            const node = this.createNode(NodeType$1.Operator);
            this.consumeToken();
            return this.finish(node);
        }
        else {
            return null;
        }
    }
    _parseUnaryOperator() {
        if (!this.peekDelim('+') && !this.peekDelim('-')) {
            return null;
        }
        const node = this.create(Node);
        this.consumeToken();
        return this.finish(node);
    }
    _parseCombinator() {
        if (this.peekDelim('>')) {
            const node = this.create(Node);
            this.consumeToken();
            const mark = this.mark();
            if (!this.hasWhitespace() && this.acceptDelim('>')) {
                if (!this.hasWhitespace() && this.acceptDelim('>')) {
                    node.type = NodeType$1.SelectorCombinatorShadowPiercingDescendant;
                    return this.finish(node);
                }
                this.restoreAtMark(mark);
            }
            node.type = NodeType$1.SelectorCombinatorParent;
            return this.finish(node);
        }
        else if (this.peekDelim('+')) {
            const node = this.create(Node);
            this.consumeToken();
            node.type = NodeType$1.SelectorCombinatorSibling;
            return this.finish(node);
        }
        else if (this.peekDelim('~')) {
            const node = this.create(Node);
            this.consumeToken();
            node.type = NodeType$1.SelectorCombinatorAllSiblings;
            return this.finish(node);
        }
        else if (this.peekDelim('/')) {
            const node = this.create(Node);
            this.consumeToken();
            const mark = this.mark();
            if (!this.hasWhitespace() && this.acceptIdent('deep') && !this.hasWhitespace() && this.acceptDelim('/')) {
                node.type = NodeType$1.SelectorCombinatorShadowPiercingDescendant;
                return this.finish(node);
            }
            this.restoreAtMark(mark);
        }
        return null;
    }
    _parseSimpleSelector() {
        const node = this.create(SimpleSelector);
        let c = 0;
        if (node.addChild(this._parseElementName() || this._parseNestingSelector())) {
            c++;
        }
        while ((c === 0 || !this.hasWhitespace()) && node.addChild(this._parseSimpleSelectorBody())) {
            c++;
        }
        return c > 0 ? this.finish(node) : null;
    }
    _parseNestingSelector() {
        if (this.peekDelim('&')) {
            const node = this.createNode(NodeType$1.SelectorCombinator);
            this.consumeToken();
            return this.finish(node);
        }
        return null;
    }
    _parseSimpleSelectorBody() {
        return this._parsePseudo() || this._parseHash() || this._parseClass() || this._parseAttrib();
    }
    _parseSelectorIdent() {
        return this._parseIdent();
    }
    _parseHash() {
        if (!this.peek(TokenType.Hash) && !this.peekDelim('#')) {
            return null;
        }
        const node = this.createNode(NodeType$1.IdentifierSelector);
        if (this.acceptDelim('#')) {
            if (this.hasWhitespace() || !node.addChild(this._parseSelectorIdent())) {
                return this.finish(node, ParseError.IdentifierExpected);
            }
        }
        else {
            this.consumeToken();
        }
        return this.finish(node);
    }
    _parseClass() {
        if (!this.peekDelim('.')) {
            return null;
        }
        const node = this.createNode(NodeType$1.ClassSelector);
        this.consumeToken();
        if (this.hasWhitespace() || !node.addChild(this._parseSelectorIdent())) {
            return this.finish(node, ParseError.IdentifierExpected);
        }
        return this.finish(node);
    }
    _parseElementName() {
        const pos = this.mark();
        const node = this.createNode(NodeType$1.ElementNameSelector);
        node.addChild(this._parseNamespacePrefix());
        if (!node.addChild(this._parseSelectorIdent()) && !this.acceptDelim('*')) {
            this.restoreAtMark(pos);
            return null;
        }
        return this.finish(node);
    }
    _parseNamespacePrefix() {
        const pos = this.mark();
        const node = this.createNode(NodeType$1.NamespacePrefix);
        if (!node.addChild(this._parseIdent()) && !this.acceptDelim('*')) ;
        if (!this.acceptDelim('|')) {
            this.restoreAtMark(pos);
            return null;
        }
        return this.finish(node);
    }
    _parseAttrib() {
        if (!this.peek(TokenType.BracketL)) {
            return null;
        }
        const node = this.create(AttributeSelector);
        this.consumeToken();
        node.setNamespacePrefix(this._parseNamespacePrefix());
        if (!node.setIdentifier(this._parseIdent())) {
            return this.finish(node, ParseError.IdentifierExpected);
        }
        if (node.setOperator(this._parseOperator())) {
            node.setValue(this._parseBinaryExpr());
            this.acceptIdent('i');
            this.acceptIdent('s');
        }
        if (!this.accept(TokenType.BracketR)) {
            return this.finish(node, ParseError.RightSquareBracketExpected);
        }
        return this.finish(node);
    }
    _parsePseudo() {
        const node = this._tryParsePseudoIdentifier();
        if (node) {
            if (!this.hasWhitespace() && this.accept(TokenType.ParenthesisL)) {
                const tryAsSelector = () => {
                    const selectors = this.createNode(NodeType$1.SelectorList);
                    if (!selectors.addChild(this._parseSelector(true))) {
                        return null;
                    }
                    while (this.accept(TokenType.Comma) && selectors.addChild(this._parseSelector(true))) {
                    }
                    if (this.peek(TokenType.ParenthesisR)) {
                        return this.finish(selectors);
                    }
                    return null;
                };
                let hasSelector = node.addChild(this.try(tryAsSelector));
                if (!hasSelector) {
                    while (!this.peekIdent('of') && (node.addChild(this._parseTerm()) || node.addChild(this._parseOperator()))) {
                    }
                    if (this.acceptIdent('of') &&
                        !node.addChild(this.try(tryAsSelector))) {
                        return this.finish(node, ParseError.SelectorExpected);
                    }
                }
                if (!this.accept(TokenType.ParenthesisR)) {
                    return this.finish(node, ParseError.RightParenthesisExpected);
                }
            }
            return this.finish(node);
        }
        return null;
    }
    _tryParsePseudoIdentifier() {
        if (!this.peek(TokenType.Colon)) {
            return null;
        }
        const pos = this.mark();
        const node = this.createNode(NodeType$1.PseudoSelector);
        this.consumeToken();
        if (this.hasWhitespace()) {
            this.restoreAtMark(pos);
            return null;
        }
        this.accept(TokenType.Colon);
        if (this.hasWhitespace() || !node.addChild(this._parseIdent())) {
            return this.finish(node, ParseError.IdentifierExpected);
        }
        return this.finish(node);
    }
    _tryParsePrio() {
        const mark = this.mark();
        const prio = this._parsePrio();
        if (prio) {
            return prio;
        }
        this.restoreAtMark(mark);
        return null;
    }
    _parsePrio() {
        if (!this.peek(TokenType.Exclamation)) {
            return null;
        }
        const node = this.createNode(NodeType$1.Prio);
        if (this.accept(TokenType.Exclamation) && this.acceptIdent('important')) {
            return this.finish(node);
        }
        return null;
    }
    _parseExpr(stopOnComma = false) {
        const node = this.create(Expression);
        if (!node.addChild(this._parseBinaryExpr())) {
            return null;
        }
        while (true) {
            if (this.peek(TokenType.Comma)) {
                if (stopOnComma) {
                    return this.finish(node);
                }
                this.consumeToken();
            }
            if (!node.addChild(this._parseBinaryExpr())) {
                break;
            }
        }
        return this.finish(node);
    }
    _parseUnicodeRange() {
        if (!this.peekIdent('u')) {
            return null;
        }
        const node = this.create(UnicodeRange);
        if (!this.acceptUnicodeRange()) {
            return null;
        }
        return this.finish(node);
    }
    _parseNamedLine() {
        if (!this.peek(TokenType.BracketL)) {
            return null;
        }
        const node = this.createNode(NodeType$1.GridLine);
        this.consumeToken();
        while (node.addChild(this._parseIdent())) {
        }
        if (!this.accept(TokenType.BracketR)) {
            return this.finish(node, ParseError.RightSquareBracketExpected);
        }
        return this.finish(node);
    }
    _parseBinaryExpr(preparsedLeft, preparsedOper) {
        let node = this.create(BinaryExpression);
        if (!node.setLeft((preparsedLeft || this._parseTerm()))) {
            return null;
        }
        if (!node.setOperator(preparsedOper || this._parseOperator())) {
            return this.finish(node);
        }
        if (!node.setRight(this._parseTerm())) {
            return this.finish(node, ParseError.TermExpected);
        }
        node = this.finish(node);
        const operator = this._parseOperator();
        if (operator) {
            node = this._parseBinaryExpr(node, operator);
        }
        return this.finish(node);
    }
    _parseTerm() {
        let node = this.create(Term);
        node.setOperator(this._parseUnaryOperator());
        if (node.setExpression(this._parseTermExpression())) {
            return this.finish(node);
        }
        return null;
    }
    _parseTermExpression() {
        return this._parseURILiteral() ||
            this._parseUnicodeRange() ||
            this._parseFunction() ||
            this._parseIdent() ||
            this._parseStringLiteral() ||
            this._parseNumeric() ||
            this._parseHexColor() ||
            this._parseOperation() ||
            this._parseNamedLine();
    }
    _parseOperation() {
        if (!this.peek(TokenType.ParenthesisL)) {
            return null;
        }
        const node = this.create(Node);
        this.consumeToken();
        node.addChild(this._parseExpr());
        if (!this.accept(TokenType.ParenthesisR)) {
            return this.finish(node, ParseError.RightParenthesisExpected);
        }
        return this.finish(node);
    }
    _parseNumeric() {
        if (this.peek(TokenType.Num) ||
            this.peek(TokenType.Percentage) ||
            this.peek(TokenType.Resolution) ||
            this.peek(TokenType.Length) ||
            this.peek(TokenType.EMS) ||
            this.peek(TokenType.EXS) ||
            this.peek(TokenType.Angle) ||
            this.peek(TokenType.Time) ||
            this.peek(TokenType.Dimension) ||
            this.peek(TokenType.ContainerQueryLength) ||
            this.peek(TokenType.Freq)) {
            const node = this.create(NumericValue);
            this.consumeToken();
            return this.finish(node);
        }
        return null;
    }
    _parseStringLiteral() {
        if (!this.peek(TokenType.String) && !this.peek(TokenType.BadString)) {
            return null;
        }
        const node = this.createNode(NodeType$1.StringLiteral);
        this.consumeToken();
        return this.finish(node);
    }
    _parseURILiteral() {
        if (!this.peekRegExp(TokenType.Ident, /^url(-prefix)?$/i)) {
            return null;
        }
        const pos = this.mark();
        const node = this.createNode(NodeType$1.URILiteral);
        this.accept(TokenType.Ident);
        if (this.hasWhitespace() || !this.peek(TokenType.ParenthesisL)) {
            this.restoreAtMark(pos);
            return null;
        }
        this.scanner.inURL = true;
        this.consumeToken();
        node.addChild(this._parseURLArgument());
        this.scanner.inURL = false;
        if (!this.accept(TokenType.ParenthesisR)) {
            return this.finish(node, ParseError.RightParenthesisExpected);
        }
        return this.finish(node);
    }
    _parseURLArgument() {
        const node = this.create(Node);
        if (!this.accept(TokenType.String) && !this.accept(TokenType.BadString) && !this.acceptUnquotedString()) {
            return null;
        }
        return this.finish(node);
    }
    _parseIdent(referenceTypes) {
        if (!this.peek(TokenType.Ident)) {
            return null;
        }
        const node = this.create(Identifier);
        if (referenceTypes) {
            node.referenceTypes = referenceTypes;
        }
        node.isCustomProperty = this.peekRegExp(TokenType.Ident, /^--/);
        this.consumeToken();
        return this.finish(node);
    }
    _parseFunction() {
        const pos = this.mark();
        const node = this.create(Function$1);
        if (!node.setIdentifier(this._parseFunctionIdentifier())) {
            return null;
        }
        if (this.hasWhitespace() || !this.accept(TokenType.ParenthesisL)) {
            this.restoreAtMark(pos);
            return null;
        }
        if (node.getArguments().addChild(this._parseFunctionArgument())) {
            while (this.accept(TokenType.Comma)) {
                if (this.peek(TokenType.ParenthesisR)) {
                    break;
                }
                if (!node.getArguments().addChild(this._parseFunctionArgument())) {
                    this.markError(node, ParseError.ExpressionExpected);
                }
            }
        }
        if (!this.accept(TokenType.ParenthesisR)) {
            return this.finish(node, ParseError.RightParenthesisExpected);
        }
        return this.finish(node);
    }
    _parseFunctionIdentifier() {
        if (!this.peek(TokenType.Ident)) {
            return null;
        }
        const node = this.create(Identifier);
        node.referenceTypes = [ReferenceType.Function];
        if (this.acceptIdent('progid')) {
            if (this.accept(TokenType.Colon)) {
                while (this.accept(TokenType.Ident) && this.acceptDelim('.')) {
                }
            }
            return this.finish(node);
        }
        this.consumeToken();
        return this.finish(node);
    }
    _parseFunctionArgument() {
        const node = this.create(FunctionArgument);
        if (node.setValue(this._parseExpr(true))) {
            return this.finish(node);
        }
        return null;
    }
    _parseHexColor() {
        if (this.peekRegExp(TokenType.Hash, /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)) {
            const node = this.create(HexColorValue);
            this.consumeToken();
            return this.finish(node);
        }
        else {
            return null;
        }
    }
}

function findFirst(array, p) {
    let low = 0, high = array.length;
    if (high === 0) {
        return 0;
    }
    while (low < high) {
        let mid = Math.floor((low + high) / 2);
        if (p(array[mid])) {
            high = mid;
        }
        else {
            low = mid + 1;
        }
    }
    return low;
}
function includes(array, item) {
    return array.indexOf(item) !== -1;
}
function union(...arrays) {
    const result = [];
    for (const array of arrays) {
        for (const item of array) {
            if (!includes(result, item)) {
                result.push(item);
            }
        }
    }
    return result;
}

let Scope$2 = class Scope {
    constructor(offset, length) {
        this.offset = offset;
        this.length = length;
        this.symbols = [];
        this.parent = null;
        this.children = [];
    }
    addChild(scope) {
        this.children.push(scope);
        scope.setParent(this);
    }
    setParent(scope) {
        this.parent = scope;
    }
    findScope(offset, length = 0) {
        if (this.offset <= offset && this.offset + this.length > offset + length || this.offset === offset && this.length === length) {
            return this.findInScope(offset, length);
        }
        return null;
    }
    findInScope(offset, length = 0) {
        const end = offset + length;
        const idx = findFirst(this.children, s => s.offset > end);
        if (idx === 0) {
            return this;
        }
        const res = this.children[idx - 1];
        if (res.offset <= offset && res.offset + res.length >= offset + length) {
            return res.findInScope(offset, length);
        }
        return this;
    }
    addSymbol(symbol) {
        this.symbols.push(symbol);
    }
    getSymbol(name, type) {
        for (let index = 0; index < this.symbols.length; index++) {
            const symbol = this.symbols[index];
            if (symbol.name === name && symbol.type === type) {
                return symbol;
            }
        }
        return null;
    }
    getSymbols() {
        return this.symbols;
    }
};
class GlobalScope extends Scope$2 {
    constructor() {
        super(0, Number.MAX_VALUE);
    }
}
let Symbol$1 = class Symbol {
    constructor(name, value, node, type) {
        this.name = name;
        this.value = value;
        this.node = node;
        this.type = type;
    }
};
class ScopeBuilder {
    constructor(scope) {
        this.scope = scope;
    }
    addSymbol(node, name, value, type) {
        if (node.offset !== -1) {
            const current = this.scope.findScope(node.offset, node.length);
            if (current) {
                current.addSymbol(new Symbol$1(name, value, node, type));
            }
        }
    }
    addScope(node) {
        if (node.offset !== -1) {
            const current = this.scope.findScope(node.offset, node.length);
            if (current && (current.offset !== node.offset || current.length !== node.length)) {
                const newScope = new Scope$2(node.offset, node.length);
                current.addChild(newScope);
                return newScope;
            }
            return current;
        }
        return null;
    }
    addSymbolToChildScope(scopeNode, node, name, value, type) {
        if (scopeNode && scopeNode.offset !== -1) {
            const current = this.addScope(scopeNode);
            if (current) {
                current.addSymbol(new Symbol$1(name, value, node, type));
            }
        }
    }
    visitNode(node) {
        switch (node.type) {
            case NodeType$1.Keyframe:
                this.addSymbol(node, node.getName(), void 0, ReferenceType.Keyframe);
                return true;
            case NodeType$1.CustomPropertyDeclaration:
                return this.visitCustomPropertyDeclarationNode(node);
            case NodeType$1.VariableDeclaration:
                return this.visitVariableDeclarationNode(node);
            case NodeType$1.Ruleset:
                return this.visitRuleSet(node);
            case NodeType$1.MixinDeclaration:
                this.addSymbol(node, node.getName(), void 0, ReferenceType.Mixin);
                return true;
            case NodeType$1.FunctionDeclaration:
                this.addSymbol(node, node.getName(), void 0, ReferenceType.Function);
                return true;
            case NodeType$1.FunctionParameter: {
                return this.visitFunctionParameterNode(node);
            }
            case NodeType$1.Declarations:
                this.addScope(node);
                return true;
            case NodeType$1.For:
                const forNode = node;
                const scopeNode = forNode.getDeclarations();
                if (scopeNode && forNode.variable) {
                    this.addSymbolToChildScope(scopeNode, forNode.variable, forNode.variable.getName(), void 0, ReferenceType.Variable);
                }
                return true;
            case NodeType$1.Each: {
                const eachNode = node;
                const scopeNode = eachNode.getDeclarations();
                if (scopeNode) {
                    const variables = eachNode.getVariables().getChildren();
                    for (const variable of variables) {
                        this.addSymbolToChildScope(scopeNode, variable, variable.getName(), void 0, ReferenceType.Variable);
                    }
                }
                return true;
            }
        }
        return true;
    }
    visitRuleSet(node) {
        const current = this.scope.findScope(node.offset, node.length);
        if (current) {
            for (const child of node.getSelectors().getChildren()) {
                if (child instanceof Selector) {
                    if (child.getChildren().length === 1) {
                        current.addSymbol(new Symbol$1(child.getChild(0).getText(), void 0, child, ReferenceType.Rule));
                    }
                }
            }
        }
        return true;
    }
    visitVariableDeclarationNode(node) {
        const value = node.getValue() ? node.getValue().getText() : void 0;
        this.addSymbol(node, node.getName(), value, ReferenceType.Variable);
        return true;
    }
    visitFunctionParameterNode(node) {
        const scopeNode = node.getParent().getDeclarations();
        if (scopeNode) {
            const valueNode = node.getDefaultValue();
            const value = valueNode ? valueNode.getText() : void 0;
            this.addSymbolToChildScope(scopeNode, node, node.getName(), value, ReferenceType.Variable);
        }
        return true;
    }
    visitCustomPropertyDeclarationNode(node) {
        const value = node.getValue() ? node.getValue().getText() : '';
        this.addCSSVariable(node.getProperty(), node.getProperty().getName(), value, ReferenceType.Variable);
        return true;
    }
    addCSSVariable(node, name, value, type) {
        if (node.offset !== -1) {
            this.scope.addSymbol(new Symbol$1(name, value, node, type));
        }
    }
}
class Symbols {
    constructor(node) {
        this.global = new GlobalScope();
        node.acceptVisitor(new ScopeBuilder(this.global));
    }
    findSymbolsAtOffset(offset, referenceType) {
        let scope = this.global.findScope(offset, 0);
        const result = [];
        const names = {};
        while (scope) {
            const symbols = scope.getSymbols();
            for (let i = 0; i < symbols.length; i++) {
                const symbol = symbols[i];
                if (symbol.type === referenceType && !names[symbol.name]) {
                    result.push(symbol);
                    names[symbol.name] = true;
                }
            }
            scope = scope.parent;
        }
        return result;
    }
    internalFindSymbol(node, referenceTypes) {
        let scopeNode = node;
        if (node.parent instanceof FunctionParameter && node.parent.getParent() instanceof BodyDeclaration) {
            scopeNode = node.parent.getParent().getDeclarations();
        }
        if (node.parent instanceof FunctionArgument && node.parent.getParent() instanceof Function$1) {
            const funcId = node.parent.getParent().getIdentifier();
            if (funcId) {
                const functionSymbol = this.internalFindSymbol(funcId, [ReferenceType.Function]);
                if (functionSymbol) {
                    scopeNode = functionSymbol.node.getDeclarations();
                }
            }
        }
        if (!scopeNode) {
            return null;
        }
        const name = node.getText();
        let scope = this.global.findScope(scopeNode.offset, scopeNode.length);
        while (scope) {
            for (let index = 0; index < referenceTypes.length; index++) {
                const type = referenceTypes[index];
                const symbol = scope.getSymbol(name, type);
                if (symbol) {
                    return symbol;
                }
            }
            scope = scope.parent;
        }
        return null;
    }
    evaluateReferenceTypes(node) {
        if (node instanceof Identifier) {
            const referenceTypes = node.referenceTypes;
            if (referenceTypes) {
                return referenceTypes;
            }
            else {
                if (node.isCustomProperty) {
                    return [ReferenceType.Variable];
                }
                const decl = getParentDeclaration(node);
                if (decl) {
                    const propertyName = decl.getNonPrefixedPropertyName();
                    if ((propertyName === 'animation' || propertyName === 'animation-name')
                        && decl.getValue() && decl.getValue().offset === node.offset) {
                        return [ReferenceType.Keyframe];
                    }
                }
            }
        }
        else if (node instanceof Variable) {
            return [ReferenceType.Variable];
        }
        const selector = node.findAParent(NodeType$1.Selector, NodeType$1.ExtendsReference);
        if (selector) {
            return [ReferenceType.Rule];
        }
        return null;
    }
    findSymbolFromNode(node) {
        if (!node) {
            return null;
        }
        while (node.type === NodeType$1.Interpolation) {
            node = node.getParent();
        }
        const referenceTypes = this.evaluateReferenceTypes(node);
        if (referenceTypes) {
            return this.internalFindSymbol(node, referenceTypes);
        }
        return null;
    }
    matchesSymbol(node, symbol) {
        if (!node) {
            return false;
        }
        while (node.type === NodeType$1.Interpolation) {
            node = node.getParent();
        }
        if (!node.matches(symbol.name)) {
            return false;
        }
        const referenceTypes = this.evaluateReferenceTypes(node);
        if (!referenceTypes || referenceTypes.indexOf(symbol.type) === -1) {
            return false;
        }
        const nodeSymbol = this.internalFindSymbol(node, referenceTypes);
        return nodeSymbol === symbol;
    }
    findSymbol(name, type, offset) {
        let scope = this.global.findScope(offset);
        while (scope) {
            const symbol = scope.getSymbol(name, type);
            if (symbol) {
                return symbol;
            }
            scope = scope.parent;
        }
        return null;
    }
}

function dirname(uriString) {
    return Utils.dirname(URI$2.parse(uriString)).toString(true);
}
function joinPath(uriString, ...paths) {
    return Utils.joinPath(URI$2.parse(uriString), ...paths).toString(true);
}

class PathCompletionParticipant {
    constructor(readDirectory) {
        this.readDirectory = readDirectory;
        this.literalCompletions = [];
        this.importCompletions = [];
    }
    onCssURILiteralValue(context) {
        this.literalCompletions.push(context);
    }
    onCssImportPath(context) {
        this.importCompletions.push(context);
    }
    async computeCompletions(document, documentContext) {
        const result = { items: [], isIncomplete: false };
        for (const literalCompletion of this.literalCompletions) {
            const uriValue = literalCompletion.uriValue;
            const fullValue = stripQuotes(uriValue);
            if (fullValue === '.' || fullValue === '..') {
                result.isIncomplete = true;
            }
            else {
                const items = await this.providePathSuggestions(uriValue, literalCompletion.position, literalCompletion.range, document, documentContext);
                for (let item of items) {
                    result.items.push(item);
                }
            }
        }
        for (const importCompletion of this.importCompletions) {
            const pathValue = importCompletion.pathValue;
            const fullValue = stripQuotes(pathValue);
            if (fullValue === '.' || fullValue === '..') {
                result.isIncomplete = true;
            }
            else {
                let suggestions = await this.providePathSuggestions(pathValue, importCompletion.position, importCompletion.range, document, documentContext);
                if (document.languageId === 'scss') {
                    suggestions.forEach(s => {
                        if (startsWith(s.label, '_') && endsWith(s.label, '.scss')) {
                            if (s.textEdit) {
                                s.textEdit.newText = s.label.slice(1, -5);
                            }
                            else {
                                s.label = s.label.slice(1, -5);
                            }
                        }
                    });
                }
                for (let item of suggestions) {
                    result.items.push(item);
                }
            }
        }
        return result;
    }
    async providePathSuggestions(pathValue, position, range, document, documentContext) {
        const fullValue = stripQuotes(pathValue);
        const isValueQuoted = startsWith(pathValue, `'`) || startsWith(pathValue, `"`);
        const valueBeforeCursor = isValueQuoted
            ? fullValue.slice(0, position.character - (range.start.character + 1))
            : fullValue.slice(0, position.character - range.start.character);
        const currentDocUri = document.uri;
        const fullValueRange = isValueQuoted ? shiftRange(range, 1, -1) : range;
        const replaceRange = pathToReplaceRange(valueBeforeCursor, fullValue, fullValueRange);
        const valueBeforeLastSlash = valueBeforeCursor.substring(0, valueBeforeCursor.lastIndexOf('/') + 1);
        let parentDir = documentContext.resolveReference(valueBeforeLastSlash || '.', currentDocUri);
        if (parentDir) {
            try {
                const result = [];
                const infos = await this.readDirectory(parentDir);
                for (const [name, type] of infos) {
                    if (name.charCodeAt(0) !== CharCode_dot && (type === FileType.Directory || joinPath(parentDir, name) !== currentDocUri)) {
                        result.push(createCompletionItem(name, type === FileType.Directory, replaceRange));
                    }
                }
                return result;
            }
            catch (e) {
            }
        }
        return [];
    }
}
const CharCode_dot = '.'.charCodeAt(0);
function stripQuotes(fullValue) {
    if (startsWith(fullValue, `'`) || startsWith(fullValue, `"`)) {
        return fullValue.slice(1, -1);
    }
    else {
        return fullValue;
    }
}
function pathToReplaceRange(valueBeforeCursor, fullValue, fullValueRange) {
    let replaceRange;
    const lastIndexOfSlash = valueBeforeCursor.lastIndexOf('/');
    if (lastIndexOfSlash === -1) {
        replaceRange = fullValueRange;
    }
    else {
        const valueAfterLastSlash = fullValue.slice(lastIndexOfSlash + 1);
        const startPos = shiftPosition(fullValueRange.end, -valueAfterLastSlash.length);
        const whitespaceIndex = valueAfterLastSlash.indexOf(' ');
        let endPos;
        if (whitespaceIndex !== -1) {
            endPos = shiftPosition(startPos, whitespaceIndex);
        }
        else {
            endPos = fullValueRange.end;
        }
        replaceRange = Range$1.create(startPos, endPos);
    }
    return replaceRange;
}
function createCompletionItem(name, isDir, replaceRange) {
    if (isDir) {
        name = name + '/';
        return {
            label: escapePath(name),
            kind: CompletionItemKind$1.Folder,
            textEdit: TextEdit$1.replace(replaceRange, escapePath(name)),
            command: {
                title: 'Suggest',
                command: 'editor.action.triggerSuggest'
            }
        };
    }
    else {
        return {
            label: escapePath(name),
            kind: CompletionItemKind$1.File,
            textEdit: TextEdit$1.replace(replaceRange, escapePath(name))
        };
    }
}
function escapePath(p) {
    return p.replace(/(\s|\(|\)|,|"|')/g, '\\$1');
}
function shiftPosition(pos, offset) {
    return Position$1.create(pos.line, pos.character + offset);
}
function shiftRange(range, startOffset, endOffset) {
    const start = shiftPosition(range.start, startOffset);
    const end = shiftPosition(range.end, endOffset);
    return Range$1.create(start, end);
}

const SnippetFormat = InsertTextFormat$1.Snippet;
const retriggerCommand = {
    title: 'Suggest',
    command: 'editor.action.triggerSuggest'
};
var SortTexts;
(function (SortTexts) {
    SortTexts["Enums"] = " ";
    SortTexts["Normal"] = "d";
    SortTexts["VendorPrefixed"] = "x";
    SortTexts["Term"] = "y";
    SortTexts["Variable"] = "z";
})(SortTexts || (SortTexts = {}));
class CSSCompletion {
    constructor(variablePrefix = null, lsOptions, cssDataManager) {
        this.variablePrefix = variablePrefix;
        this.lsOptions = lsOptions;
        this.cssDataManager = cssDataManager;
        this.completionParticipants = [];
    }
    configure(settings) {
        this.defaultSettings = settings;
    }
    getSymbolContext() {
        if (!this.symbolContext) {
            this.symbolContext = new Symbols(this.styleSheet);
        }
        return this.symbolContext;
    }
    setCompletionParticipants(registeredCompletionParticipants) {
        this.completionParticipants = registeredCompletionParticipants || [];
    }
    async doComplete2(document, position, styleSheet, documentContext, completionSettings = this.defaultSettings) {
        if (!this.lsOptions.fileSystemProvider || !this.lsOptions.fileSystemProvider.readDirectory) {
            return this.doComplete(document, position, styleSheet, completionSettings);
        }
        const participant = new PathCompletionParticipant(this.lsOptions.fileSystemProvider.readDirectory);
        const contributedParticipants = this.completionParticipants;
        this.completionParticipants = [participant].concat(contributedParticipants);
        const result = this.doComplete(document, position, styleSheet, completionSettings);
        try {
            const pathCompletionResult = await participant.computeCompletions(document, documentContext);
            return {
                isIncomplete: result.isIncomplete || pathCompletionResult.isIncomplete,
                itemDefaults: result.itemDefaults,
                items: pathCompletionResult.items.concat(result.items)
            };
        }
        finally {
            this.completionParticipants = contributedParticipants;
        }
    }
    doComplete(document, position, styleSheet, documentSettings) {
        this.offset = document.offsetAt(position);
        this.position = position;
        this.currentWord = getCurrentWord(document, this.offset);
        this.defaultReplaceRange = Range$1.create(Position$1.create(this.position.line, this.position.character - this.currentWord.length), this.position);
        this.textDocument = document;
        this.styleSheet = styleSheet;
        this.documentSettings = documentSettings;
        try {
            const result = {
                isIncomplete: false,
                itemDefaults: {
                    editRange: {
                        start: { line: position.line, character: position.character - this.currentWord.length },
                        end: position
                    }
                },
                items: []
            };
            this.nodePath = getNodePath(this.styleSheet, this.offset);
            for (let i = this.nodePath.length - 1; i >= 0; i--) {
                const node = this.nodePath[i];
                if (node instanceof Property) {
                    this.getCompletionsForDeclarationProperty(node.getParent(), result);
                }
                else if (node instanceof Expression) {
                    if (node.parent instanceof Interpolation) {
                        this.getVariableProposals(null, result);
                    }
                    else {
                        this.getCompletionsForExpression(node, result);
                    }
                }
                else if (node instanceof SimpleSelector) {
                    const parentRef = node.findAParent(NodeType$1.ExtendsReference, NodeType$1.Ruleset);
                    if (parentRef) {
                        if (parentRef.type === NodeType$1.ExtendsReference) {
                            this.getCompletionsForExtendsReference(parentRef, node, result);
                        }
                        else {
                            const parentRuleSet = parentRef;
                            this.getCompletionsForSelector(parentRuleSet, parentRuleSet && parentRuleSet.isNested(), result);
                        }
                    }
                }
                else if (node instanceof FunctionArgument) {
                    this.getCompletionsForFunctionArgument(node, node.getParent(), result);
                }
                else if (node instanceof Declarations) {
                    this.getCompletionsForDeclarations(node, result);
                }
                else if (node instanceof VariableDeclaration) {
                    this.getCompletionsForVariableDeclaration(node, result);
                }
                else if (node instanceof RuleSet) {
                    this.getCompletionsForRuleSet(node, result);
                }
                else if (node instanceof Interpolation) {
                    this.getCompletionsForInterpolation(node, result);
                }
                else if (node instanceof FunctionDeclaration) {
                    this.getCompletionsForFunctionDeclaration(node, result);
                }
                else if (node instanceof MixinReference) {
                    this.getCompletionsForMixinReference(node, result);
                }
                else if (node instanceof Function$1) {
                    this.getCompletionsForFunctionArgument(null, node, result);
                }
                else if (node instanceof Supports) {
                    this.getCompletionsForSupports(node, result);
                }
                else if (node instanceof SupportsCondition) {
                    this.getCompletionsForSupportsCondition(node, result);
                }
                else if (node instanceof ExtendsReference) {
                    this.getCompletionsForExtendsReference(node, null, result);
                }
                else if (node.type === NodeType$1.URILiteral) {
                    this.getCompletionForUriLiteralValue(node, result);
                }
                else if (node.parent === null) {
                    this.getCompletionForTopLevel(result);
                }
                else if (node.type === NodeType$1.StringLiteral && this.isImportPathParent(node.parent.type)) {
                    this.getCompletionForImportPath(node, result);
                }
                else {
                    continue;
                }
                if (result.items.length > 0 || this.offset > node.offset) {
                    return this.finalize(result);
                }
            }
            this.getCompletionsForStylesheet(result);
            if (result.items.length === 0) {
                if (this.variablePrefix && this.currentWord.indexOf(this.variablePrefix) === 0) {
                    this.getVariableProposals(null, result);
                }
            }
            return this.finalize(result);
        }
        finally {
            this.position = null;
            this.currentWord = null;
            this.textDocument = null;
            this.styleSheet = null;
            this.symbolContext = null;
            this.defaultReplaceRange = null;
            this.nodePath = null;
        }
    }
    isImportPathParent(type) {
        return type === NodeType$1.Import;
    }
    finalize(result) {
        return result;
    }
    findInNodePath(...types) {
        for (let i = this.nodePath.length - 1; i >= 0; i--) {
            const node = this.nodePath[i];
            if (types.indexOf(node.type) !== -1) {
                return node;
            }
        }
        return null;
    }
    getCompletionsForDeclarationProperty(declaration, result) {
        return this.getPropertyProposals(declaration, result);
    }
    getPropertyProposals(declaration, result) {
        const triggerPropertyValueCompletion = this.isTriggerPropertyValueCompletionEnabled;
        const completePropertyWithSemicolon = this.isCompletePropertyWithSemicolonEnabled;
        const properties = this.cssDataManager.getProperties();
        properties.forEach(entry => {
            let range;
            let insertText;
            let retrigger = false;
            if (declaration) {
                range = this.getCompletionRange(declaration.getProperty());
                insertText = entry.name;
                if (!isDefined(declaration.colonPosition)) {
                    insertText += ': ';
                    retrigger = true;
                }
            }
            else {
                range = this.getCompletionRange(null);
                insertText = entry.name + ': ';
                retrigger = true;
            }
            if (!declaration && completePropertyWithSemicolon) {
                insertText += '$0;';
            }
            if (declaration && !declaration.semicolonPosition) {
                if (completePropertyWithSemicolon && this.offset >= this.textDocument.offsetAt(range.end)) {
                    insertText += '$0;';
                }
            }
            const item = {
                label: entry.name,
                documentation: getEntryDescription(entry, this.doesSupportMarkdown()),
                tags: isDeprecated(entry) ? [CompletionItemTag$1.Deprecated] : [],
                textEdit: TextEdit$1.replace(range, insertText),
                insertTextFormat: InsertTextFormat$1.Snippet,
                kind: CompletionItemKind$1.Property
            };
            if (!entry.restrictions) {
                retrigger = false;
            }
            if (triggerPropertyValueCompletion && retrigger) {
                item.command = retriggerCommand;
            }
            const relevance = typeof entry.relevance === 'number' ? Math.min(Math.max(entry.relevance, 0), 99) : 50;
            const sortTextSuffix = (255 - relevance).toString(16);
            const sortTextPrefix = startsWith(entry.name, '-') ? SortTexts.VendorPrefixed : SortTexts.Normal;
            item.sortText = sortTextPrefix + '_' + sortTextSuffix;
            result.items.push(item);
        });
        this.completionParticipants.forEach(participant => {
            if (participant.onCssProperty) {
                participant.onCssProperty({
                    propertyName: this.currentWord,
                    range: this.defaultReplaceRange
                });
            }
        });
        return result;
    }
    get isTriggerPropertyValueCompletionEnabled() {
        return this.documentSettings?.triggerPropertyValueCompletion ?? true;
    }
    get isCompletePropertyWithSemicolonEnabled() {
        return this.documentSettings?.completePropertyWithSemicolon ?? true;
    }
    getCompletionsForDeclarationValue(node, result) {
        const propertyName = node.getFullPropertyName();
        const entry = this.cssDataManager.getProperty(propertyName);
        let existingNode = node.getValue() || null;
        while (existingNode && existingNode.hasChildren()) {
            existingNode = existingNode.findChildAtOffset(this.offset, false);
        }
        this.completionParticipants.forEach(participant => {
            if (participant.onCssPropertyValue) {
                participant.onCssPropertyValue({
                    propertyName,
                    propertyValue: this.currentWord,
                    range: this.getCompletionRange(existingNode)
                });
            }
        });
        if (entry) {
            if (entry.restrictions) {
                for (const restriction of entry.restrictions) {
                    switch (restriction) {
                        case 'color':
                            this.getColorProposals(entry, existingNode, result);
                            break;
                        case 'position':
                            this.getPositionProposals(entry, existingNode, result);
                            break;
                        case 'repeat':
                            this.getRepeatStyleProposals(entry, existingNode, result);
                            break;
                        case 'line-style':
                            this.getLineStyleProposals(entry, existingNode, result);
                            break;
                        case 'line-width':
                            this.getLineWidthProposals(entry, existingNode, result);
                            break;
                        case 'geometry-box':
                            this.getGeometryBoxProposals(entry, existingNode, result);
                            break;
                        case 'box':
                            this.getBoxProposals(entry, existingNode, result);
                            break;
                        case 'image':
                            this.getImageProposals(entry, existingNode, result);
                            break;
                        case 'timing-function':
                            this.getTimingFunctionProposals(entry, existingNode, result);
                            break;
                        case 'shape':
                            this.getBasicShapeProposals(entry, existingNode, result);
                            break;
                    }
                }
            }
            this.getValueEnumProposals(entry, existingNode, result);
            this.getCSSWideKeywordProposals(entry, existingNode, result);
            this.getUnitProposals(entry, existingNode, result);
        }
        else {
            const existingValues = collectValues(this.styleSheet, node);
            for (const existingValue of existingValues.getEntries()) {
                result.items.push({
                    label: existingValue,
                    textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), existingValue),
                    kind: CompletionItemKind$1.Value
                });
            }
        }
        this.getVariableProposals(existingNode, result);
        this.getTermProposals(entry, existingNode, result);
        return result;
    }
    getValueEnumProposals(entry, existingNode, result) {
        if (entry.values) {
            for (const value of entry.values) {
                let insertString = value.name;
                let insertTextFormat;
                if (endsWith(insertString, ')')) {
                    const from = insertString.lastIndexOf('(');
                    if (from !== -1) {
                        insertString = insertString.substring(0, from + 1) + '$1' + insertString.substring(from + 1);
                        insertTextFormat = SnippetFormat;
                    }
                }
                let sortText = SortTexts.Enums;
                if (startsWith(value.name, '-')) {
                    sortText += SortTexts.VendorPrefixed;
                }
                const item = {
                    label: value.name,
                    documentation: getEntryDescription(value, this.doesSupportMarkdown()),
                    tags: isDeprecated(entry) ? [CompletionItemTag$1.Deprecated] : [],
                    textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), insertString),
                    sortText,
                    kind: CompletionItemKind$1.Value,
                    insertTextFormat
                };
                result.items.push(item);
            }
        }
        return result;
    }
    getCSSWideKeywordProposals(entry, existingNode, result) {
        for (const keywords in cssWideKeywords) {
            result.items.push({
                label: keywords,
                documentation: cssWideKeywords[keywords],
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), keywords),
                kind: CompletionItemKind$1.Value
            });
        }
        for (const func in cssWideFunctions) {
            const insertText = moveCursorInsideParenthesis(func);
            result.items.push({
                label: func,
                documentation: cssWideFunctions[func],
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), insertText),
                kind: CompletionItemKind$1.Function,
                insertTextFormat: SnippetFormat,
                command: startsWith(func, 'var') ? retriggerCommand : undefined
            });
        }
        return result;
    }
    getCompletionsForInterpolation(node, result) {
        if (this.offset >= node.offset + 2) {
            this.getVariableProposals(null, result);
        }
        return result;
    }
    getVariableProposals(existingNode, result) {
        const symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, ReferenceType.Variable);
        for (const symbol of symbols) {
            const insertText = startsWith(symbol.name, '--') ? `var(${symbol.name})` : symbol.name;
            const completionItem = {
                label: symbol.name,
                documentation: symbol.value ? getLimitedString(symbol.value) : symbol.value,
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), insertText),
                kind: CompletionItemKind$1.Variable,
                sortText: SortTexts.Variable
            };
            if (typeof completionItem.documentation === 'string' && isColorString(completionItem.documentation)) {
                completionItem.kind = CompletionItemKind$1.Color;
            }
            if (symbol.node.type === NodeType$1.FunctionParameter) {
                const mixinNode = (symbol.node.getParent());
                if (mixinNode.type === NodeType$1.MixinDeclaration) {
                    completionItem.detail = main$4.t('argument from \'{0}\'', mixinNode.getName());
                }
            }
            result.items.push(completionItem);
        }
        return result;
    }
    getVariableProposalsForCSSVarFunction(result) {
        const allReferencedVariables = new Set$1();
        this.styleSheet.acceptVisitor(new VariableCollector(allReferencedVariables, this.offset));
        let symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, ReferenceType.Variable);
        for (const symbol of symbols) {
            if (startsWith(symbol.name, '--')) {
                const completionItem = {
                    label: symbol.name,
                    documentation: symbol.value ? getLimitedString(symbol.value) : symbol.value,
                    textEdit: TextEdit$1.replace(this.getCompletionRange(null), symbol.name),
                    kind: CompletionItemKind$1.Variable
                };
                if (typeof completionItem.documentation === 'string' && isColorString(completionItem.documentation)) {
                    completionItem.kind = CompletionItemKind$1.Color;
                }
                result.items.push(completionItem);
            }
            allReferencedVariables.remove(symbol.name);
        }
        for (const name of allReferencedVariables.getEntries()) {
            if (startsWith(name, '--')) {
                const completionItem = {
                    label: name,
                    textEdit: TextEdit$1.replace(this.getCompletionRange(null), name),
                    kind: CompletionItemKind$1.Variable
                };
                result.items.push(completionItem);
            }
        }
        return result;
    }
    getUnitProposals(entry, existingNode, result) {
        let currentWord = '0';
        if (this.currentWord.length > 0) {
            const numMatch = this.currentWord.match(/^-?\d[\.\d+]*/);
            if (numMatch) {
                currentWord = numMatch[0];
                result.isIncomplete = currentWord.length === this.currentWord.length;
            }
        }
        else if (this.currentWord.length === 0) {
            result.isIncomplete = true;
        }
        if (existingNode && existingNode.parent && existingNode.parent.type === NodeType$1.Term) {
            existingNode = existingNode.getParent();
        }
        if (entry.restrictions) {
            for (const restriction of entry.restrictions) {
                const units$1 = units[restriction];
                if (units$1) {
                    for (const unit of units$1) {
                        const insertText = currentWord + unit;
                        result.items.push({
                            label: insertText,
                            textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), insertText),
                            kind: CompletionItemKind$1.Unit
                        });
                    }
                }
            }
        }
        return result;
    }
    getCompletionRange(existingNode) {
        if (existingNode && existingNode.offset <= this.offset && this.offset <= existingNode.end) {
            const end = existingNode.end !== -1 ? this.textDocument.positionAt(existingNode.end) : this.position;
            const start = this.textDocument.positionAt(existingNode.offset);
            if (start.line === end.line) {
                return Range$1.create(start, end);
            }
        }
        return this.defaultReplaceRange;
    }
    getColorProposals(entry, existingNode, result) {
        for (const color in colors) {
            result.items.push({
                label: color,
                documentation: colors[color],
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), color),
                kind: CompletionItemKind$1.Color
            });
        }
        for (const color in colorKeywords) {
            result.items.push({
                label: color,
                documentation: colorKeywords[color],
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), color),
                kind: CompletionItemKind$1.Value
            });
        }
        const colorValues = new Set$1();
        this.styleSheet.acceptVisitor(new ColorValueCollector(colorValues, this.offset));
        for (const color of colorValues.getEntries()) {
            result.items.push({
                label: color,
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), color),
                kind: CompletionItemKind$1.Color
            });
        }
        for (const p of colorFunctions) {
            result.items.push({
                label: p.label,
                detail: p.func,
                documentation: p.desc,
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), p.insertText),
                insertTextFormat: SnippetFormat,
                kind: CompletionItemKind$1.Function
            });
        }
        return result;
    }
    getPositionProposals(entry, existingNode, result) {
        for (const position in positionKeywords) {
            result.items.push({
                label: position,
                documentation: positionKeywords[position],
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), position),
                kind: CompletionItemKind$1.Value
            });
        }
        return result;
    }
    getRepeatStyleProposals(entry, existingNode, result) {
        for (const repeat in repeatStyleKeywords) {
            result.items.push({
                label: repeat,
                documentation: repeatStyleKeywords[repeat],
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), repeat),
                kind: CompletionItemKind$1.Value
            });
        }
        return result;
    }
    getLineStyleProposals(entry, existingNode, result) {
        for (const lineStyle in lineStyleKeywords) {
            result.items.push({
                label: lineStyle,
                documentation: lineStyleKeywords[lineStyle],
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), lineStyle),
                kind: CompletionItemKind$1.Value
            });
        }
        return result;
    }
    getLineWidthProposals(entry, existingNode, result) {
        for (const lineWidth of lineWidthKeywords) {
            result.items.push({
                label: lineWidth,
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), lineWidth),
                kind: CompletionItemKind$1.Value
            });
        }
        return result;
    }
    getGeometryBoxProposals(entry, existingNode, result) {
        for (const box in geometryBoxKeywords) {
            result.items.push({
                label: box,
                documentation: geometryBoxKeywords[box],
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), box),
                kind: CompletionItemKind$1.Value
            });
        }
        return result;
    }
    getBoxProposals(entry, existingNode, result) {
        for (const box in boxKeywords) {
            result.items.push({
                label: box,
                documentation: boxKeywords[box],
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), box),
                kind: CompletionItemKind$1.Value
            });
        }
        return result;
    }
    getImageProposals(entry, existingNode, result) {
        for (const image in imageFunctions) {
            const insertText = moveCursorInsideParenthesis(image);
            result.items.push({
                label: image,
                documentation: imageFunctions[image],
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), insertText),
                kind: CompletionItemKind$1.Function,
                insertTextFormat: image !== insertText ? SnippetFormat : void 0
            });
        }
        return result;
    }
    getTimingFunctionProposals(entry, existingNode, result) {
        for (const timing in transitionTimingFunctions) {
            const insertText = moveCursorInsideParenthesis(timing);
            result.items.push({
                label: timing,
                documentation: transitionTimingFunctions[timing],
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), insertText),
                kind: CompletionItemKind$1.Function,
                insertTextFormat: timing !== insertText ? SnippetFormat : void 0
            });
        }
        return result;
    }
    getBasicShapeProposals(entry, existingNode, result) {
        for (const shape in basicShapeFunctions) {
            const insertText = moveCursorInsideParenthesis(shape);
            result.items.push({
                label: shape,
                documentation: basicShapeFunctions[shape],
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), insertText),
                kind: CompletionItemKind$1.Function,
                insertTextFormat: shape !== insertText ? SnippetFormat : void 0
            });
        }
        return result;
    }
    getCompletionsForStylesheet(result) {
        const node = this.styleSheet.findFirstChildBeforeOffset(this.offset);
        if (!node) {
            return this.getCompletionForTopLevel(result);
        }
        if (node instanceof RuleSet) {
            return this.getCompletionsForRuleSet(node, result);
        }
        if (node instanceof Supports) {
            return this.getCompletionsForSupports(node, result);
        }
        return result;
    }
    getCompletionForTopLevel(result) {
        this.cssDataManager.getAtDirectives().forEach(entry => {
            result.items.push({
                label: entry.name,
                textEdit: TextEdit$1.replace(this.getCompletionRange(null), entry.name),
                documentation: getEntryDescription(entry, this.doesSupportMarkdown()),
                tags: isDeprecated(entry) ? [CompletionItemTag$1.Deprecated] : [],
                kind: CompletionItemKind$1.Keyword
            });
        });
        this.getCompletionsForSelector(null, false, result);
        return result;
    }
    getCompletionsForRuleSet(ruleSet, result) {
        const declarations = ruleSet.getDeclarations();
        const isAfter = declarations && declarations.endsWith('}') && this.offset >= declarations.end;
        if (isAfter) {
            return this.getCompletionForTopLevel(result);
        }
        const isInSelectors = !declarations || this.offset <= declarations.offset;
        if (isInSelectors) {
            return this.getCompletionsForSelector(ruleSet, ruleSet.isNested(), result);
        }
        return this.getCompletionsForDeclarations(ruleSet.getDeclarations(), result);
    }
    getCompletionsForSelector(ruleSet, isNested, result) {
        const existingNode = this.findInNodePath(NodeType$1.PseudoSelector, NodeType$1.IdentifierSelector, NodeType$1.ClassSelector, NodeType$1.ElementNameSelector);
        if (!existingNode && this.hasCharacterAtPosition(this.offset - this.currentWord.length - 1, ':')) {
            this.currentWord = ':' + this.currentWord;
            if (this.hasCharacterAtPosition(this.offset - this.currentWord.length - 1, ':')) {
                this.currentWord = ':' + this.currentWord;
            }
            this.defaultReplaceRange = Range$1.create(Position$1.create(this.position.line, this.position.character - this.currentWord.length), this.position);
        }
        const pseudoClasses = this.cssDataManager.getPseudoClasses();
        pseudoClasses.forEach(entry => {
            const insertText = moveCursorInsideParenthesis(entry.name);
            const item = {
                label: entry.name,
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), insertText),
                documentation: getEntryDescription(entry, this.doesSupportMarkdown()),
                tags: isDeprecated(entry) ? [CompletionItemTag$1.Deprecated] : [],
                kind: CompletionItemKind$1.Function,
                insertTextFormat: entry.name !== insertText ? SnippetFormat : void 0
            };
            if (startsWith(entry.name, ':-')) {
                item.sortText = SortTexts.VendorPrefixed;
            }
            result.items.push(item);
        });
        const pseudoElements = this.cssDataManager.getPseudoElements();
        pseudoElements.forEach(entry => {
            const insertText = moveCursorInsideParenthesis(entry.name);
            const item = {
                label: entry.name,
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), insertText),
                documentation: getEntryDescription(entry, this.doesSupportMarkdown()),
                tags: isDeprecated(entry) ? [CompletionItemTag$1.Deprecated] : [],
                kind: CompletionItemKind$1.Function,
                insertTextFormat: entry.name !== insertText ? SnippetFormat : void 0
            };
            if (startsWith(entry.name, '::-')) {
                item.sortText = SortTexts.VendorPrefixed;
            }
            result.items.push(item);
        });
        if (!isNested) {
            for (const entry of html5Tags) {
                result.items.push({
                    label: entry,
                    textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), entry),
                    kind: CompletionItemKind$1.Keyword
                });
            }
            for (const entry of svgElements) {
                result.items.push({
                    label: entry,
                    textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), entry),
                    kind: CompletionItemKind$1.Keyword
                });
            }
        }
        const visited = {};
        visited[this.currentWord] = true;
        const docText = this.textDocument.getText();
        this.styleSheet.accept(n => {
            if (n.type === NodeType$1.SimpleSelector && n.length > 0) {
                const selector = docText.substr(n.offset, n.length);
                if (selector.charAt(0) === '.' && !visited[selector]) {
                    visited[selector] = true;
                    result.items.push({
                        label: selector,
                        textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), selector),
                        kind: CompletionItemKind$1.Keyword
                    });
                }
                return false;
            }
            return true;
        });
        if (ruleSet && ruleSet.isNested()) {
            const selector = ruleSet.getSelectors().findFirstChildBeforeOffset(this.offset);
            if (selector && ruleSet.getSelectors().getChildren().indexOf(selector) === 0) {
                this.getPropertyProposals(null, result);
            }
        }
        return result;
    }
    getCompletionsForDeclarations(declarations, result) {
        if (!declarations || this.offset === declarations.offset) {
            return result;
        }
        const node = declarations.findFirstChildBeforeOffset(this.offset);
        if (!node) {
            return this.getCompletionsForDeclarationProperty(null, result);
        }
        if (node instanceof AbstractDeclaration) {
            const declaration = node;
            if (!isDefined(declaration.colonPosition) || this.offset <= declaration.colonPosition) {
                return this.getCompletionsForDeclarationProperty(declaration, result);
            }
            else if ((isDefined(declaration.semicolonPosition) && declaration.semicolonPosition < this.offset)) {
                if (this.offset === declaration.semicolonPosition + 1) {
                    return result;
                }
                return this.getCompletionsForDeclarationProperty(null, result);
            }
            if (declaration instanceof Declaration) {
                return this.getCompletionsForDeclarationValue(declaration, result);
            }
        }
        else if (node instanceof ExtendsReference) {
            this.getCompletionsForExtendsReference(node, null, result);
        }
        else if (this.currentWord && this.currentWord[0] === '@') {
            this.getCompletionsForDeclarationProperty(null, result);
        }
        else if (node instanceof RuleSet) {
            this.getCompletionsForDeclarationProperty(null, result);
        }
        return result;
    }
    getCompletionsForVariableDeclaration(declaration, result) {
        if (this.offset && isDefined(declaration.colonPosition) && this.offset > declaration.colonPosition) {
            this.getVariableProposals(declaration.getValue() || null, result);
        }
        return result;
    }
    getCompletionsForExpression(expression, result) {
        const parent = expression.getParent();
        if (parent instanceof FunctionArgument) {
            this.getCompletionsForFunctionArgument(parent, parent.getParent(), result);
            return result;
        }
        const declaration = expression.findParent(NodeType$1.Declaration);
        if (!declaration) {
            this.getTermProposals(undefined, null, result);
            return result;
        }
        const node = expression.findChildAtOffset(this.offset, true);
        if (!node) {
            return this.getCompletionsForDeclarationValue(declaration, result);
        }
        if (node instanceof NumericValue || node instanceof Identifier) {
            return this.getCompletionsForDeclarationValue(declaration, result);
        }
        return result;
    }
    getCompletionsForFunctionArgument(arg, func, result) {
        const identifier = func.getIdentifier();
        if (identifier && identifier.matches('var')) {
            if (!func.getArguments().hasChildren() || func.getArguments().getChild(0) === arg) {
                this.getVariableProposalsForCSSVarFunction(result);
            }
        }
        return result;
    }
    getCompletionsForFunctionDeclaration(decl, result) {
        const declarations = decl.getDeclarations();
        if (declarations && this.offset > declarations.offset && this.offset < declarations.end) {
            this.getTermProposals(undefined, null, result);
        }
        return result;
    }
    getCompletionsForMixinReference(ref, result) {
        const allMixins = this.getSymbolContext().findSymbolsAtOffset(this.offset, ReferenceType.Mixin);
        for (const mixinSymbol of allMixins) {
            if (mixinSymbol.node instanceof MixinDeclaration) {
                result.items.push(this.makeTermProposal(mixinSymbol, mixinSymbol.node.getParameters(), null));
            }
        }
        const identifierNode = ref.getIdentifier() || null;
        this.completionParticipants.forEach(participant => {
            if (participant.onCssMixinReference) {
                participant.onCssMixinReference({
                    mixinName: this.currentWord,
                    range: this.getCompletionRange(identifierNode)
                });
            }
        });
        return result;
    }
    getTermProposals(entry, existingNode, result) {
        const allFunctions = this.getSymbolContext().findSymbolsAtOffset(this.offset, ReferenceType.Function);
        for (const functionSymbol of allFunctions) {
            if (functionSymbol.node instanceof FunctionDeclaration) {
                result.items.push(this.makeTermProposal(functionSymbol, functionSymbol.node.getParameters(), existingNode));
            }
        }
        return result;
    }
    makeTermProposal(symbol, parameters, existingNode) {
        symbol.node;
        const params = parameters.getChildren().map((c) => {
            return (c instanceof FunctionParameter) ? c.getName() : c.getText();
        });
        const insertText = symbol.name + '(' + params.map((p, index) => '${' + (index + 1) + ':' + p + '}').join(', ') + ')';
        return {
            label: symbol.name,
            detail: symbol.name + '(' + params.join(', ') + ')',
            textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), insertText),
            insertTextFormat: SnippetFormat,
            kind: CompletionItemKind$1.Function,
            sortText: SortTexts.Term
        };
    }
    getCompletionsForSupportsCondition(supportsCondition, result) {
        const child = supportsCondition.findFirstChildBeforeOffset(this.offset);
        if (child) {
            if (child instanceof Declaration) {
                if (!isDefined(child.colonPosition) || this.offset <= child.colonPosition) {
                    return this.getCompletionsForDeclarationProperty(child, result);
                }
                else {
                    return this.getCompletionsForDeclarationValue(child, result);
                }
            }
            else if (child instanceof SupportsCondition) {
                return this.getCompletionsForSupportsCondition(child, result);
            }
        }
        if (isDefined(supportsCondition.lParent) && this.offset > supportsCondition.lParent && (!isDefined(supportsCondition.rParent) || this.offset <= supportsCondition.rParent)) {
            return this.getCompletionsForDeclarationProperty(null, result);
        }
        return result;
    }
    getCompletionsForSupports(supports, result) {
        const declarations = supports.getDeclarations();
        const inInCondition = !declarations || this.offset <= declarations.offset;
        if (inInCondition) {
            const child = supports.findFirstChildBeforeOffset(this.offset);
            if (child instanceof SupportsCondition) {
                return this.getCompletionsForSupportsCondition(child, result);
            }
            return result;
        }
        return this.getCompletionForTopLevel(result);
    }
    getCompletionsForExtendsReference(extendsRef, existingNode, result) {
        return result;
    }
    getCompletionForUriLiteralValue(uriLiteralNode, result) {
        let uriValue;
        let position;
        let range;
        if (!uriLiteralNode.hasChildren()) {
            uriValue = '';
            position = this.position;
            const emptyURIValuePosition = this.textDocument.positionAt(uriLiteralNode.offset + 'url('.length);
            range = Range$1.create(emptyURIValuePosition, emptyURIValuePosition);
        }
        else {
            const uriValueNode = uriLiteralNode.getChild(0);
            uriValue = uriValueNode.getText();
            position = this.position;
            range = this.getCompletionRange(uriValueNode);
        }
        this.completionParticipants.forEach(participant => {
            if (participant.onCssURILiteralValue) {
                participant.onCssURILiteralValue({
                    uriValue,
                    position,
                    range
                });
            }
        });
        return result;
    }
    getCompletionForImportPath(importPathNode, result) {
        this.completionParticipants.forEach(participant => {
            if (participant.onCssImportPath) {
                participant.onCssImportPath({
                    pathValue: importPathNode.getText(),
                    position: this.position,
                    range: this.getCompletionRange(importPathNode)
                });
            }
        });
        return result;
    }
    hasCharacterAtPosition(offset, char) {
        const text = this.textDocument.getText();
        return (offset >= 0 && offset < text.length) && text.charAt(offset) === char;
    }
    doesSupportMarkdown() {
        if (!isDefined(this.supportsMarkdown)) {
            if (!isDefined(this.lsOptions.clientCapabilities)) {
                this.supportsMarkdown = true;
                return this.supportsMarkdown;
            }
            const documentationFormat = this.lsOptions.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;
            this.supportsMarkdown = Array.isArray(documentationFormat) && documentationFormat.indexOf(MarkupKind$1.Markdown) !== -1;
        }
        return this.supportsMarkdown;
    }
}
function isDeprecated(entry) {
    if (entry.status && (entry.status === 'nonstandard' || entry.status === 'obsolete')) {
        return true;
    }
    return false;
}
let Set$1 = class Set {
    constructor() {
        this.entries = {};
    }
    add(entry) {
        this.entries[entry] = true;
    }
    remove(entry) {
        delete this.entries[entry];
    }
    getEntries() {
        return Object.keys(this.entries);
    }
};
function moveCursorInsideParenthesis(text) {
    return text.replace(/\(\)$/, "($1)");
}
function collectValues(styleSheet, declaration) {
    const fullPropertyName = declaration.getFullPropertyName();
    const entries = new Set$1();
    function visitValue(node) {
        if (node instanceof Identifier || node instanceof NumericValue || node instanceof HexColorValue) {
            entries.add(node.getText());
        }
        return true;
    }
    function matchesProperty(decl) {
        const propertyName = decl.getFullPropertyName();
        return fullPropertyName === propertyName;
    }
    function vistNode(node) {
        if (node instanceof Declaration && node !== declaration) {
            if (matchesProperty(node)) {
                const value = node.getValue();
                if (value) {
                    value.accept(visitValue);
                }
            }
        }
        return true;
    }
    styleSheet.accept(vistNode);
    return entries;
}
class ColorValueCollector {
    constructor(entries, currentOffset) {
        this.entries = entries;
        this.currentOffset = currentOffset;
    }
    visitNode(node) {
        if (node instanceof HexColorValue || (node instanceof Function$1 && isColorConstructor(node))) {
            if (this.currentOffset < node.offset || node.end < this.currentOffset) {
                this.entries.add(node.getText());
            }
        }
        return true;
    }
}
class VariableCollector {
    constructor(entries, currentOffset) {
        this.entries = entries;
        this.currentOffset = currentOffset;
    }
    visitNode(node) {
        if (node instanceof Identifier && node.isCustomProperty) {
            if (this.currentOffset < node.offset || node.end < this.currentOffset) {
                this.entries.add(node.getText());
            }
        }
        return true;
    }
}
function getCurrentWord(document, offset) {
    let i = offset - 1;
    const text = document.getText();
    while (i >= 0 && ' \t\n\r":{[()]},*>+'.indexOf(text.charAt(i)) === -1) {
        i--;
    }
    return text.substring(i + 1, offset);
}

let Element$2 = class Element {
    constructor() {
        this.parent = null;
        this.children = null;
        this.attributes = null;
    }
    findAttribute(name) {
        if (this.attributes) {
            for (const attribute of this.attributes) {
                if (attribute.name === name) {
                    return attribute.value;
                }
            }
        }
        return null;
    }
    addChild(child) {
        if (child instanceof Element$2) {
            child.parent = this;
        }
        if (!this.children) {
            this.children = [];
        }
        this.children.push(child);
    }
    append(text) {
        if (this.attributes) {
            const last = this.attributes[this.attributes.length - 1];
            last.value = last.value + text;
        }
    }
    prepend(text) {
        if (this.attributes) {
            const first = this.attributes[0];
            first.value = text + first.value;
        }
    }
    findRoot() {
        let curr = this;
        while (curr.parent && !(curr.parent instanceof RootElement)) {
            curr = curr.parent;
        }
        return curr;
    }
    removeChild(child) {
        if (this.children) {
            const index = this.children.indexOf(child);
            if (index !== -1) {
                this.children.splice(index, 1);
                return true;
            }
        }
        return false;
    }
    addAttr(name, value) {
        if (!this.attributes) {
            this.attributes = [];
        }
        for (const attribute of this.attributes) {
            if (attribute.name === name) {
                attribute.value += ' ' + value;
                return;
            }
        }
        this.attributes.push({ name, value });
    }
    clone(cloneChildren = true) {
        const elem = new Element$2();
        if (this.attributes) {
            elem.attributes = [];
            for (const attribute of this.attributes) {
                elem.addAttr(attribute.name, attribute.value);
            }
        }
        if (cloneChildren && this.children) {
            elem.children = [];
            for (let index = 0; index < this.children.length; index++) {
                elem.addChild(this.children[index].clone());
            }
        }
        return elem;
    }
    cloneWithParent() {
        const clone = this.clone(false);
        if (this.parent && !(this.parent instanceof RootElement)) {
            const parentClone = this.parent.cloneWithParent();
            parentClone.addChild(clone);
        }
        return clone;
    }
};
class RootElement extends Element$2 {
}
class LabelElement extends Element$2 {
    constructor(label) {
        super();
        this.addAttr('name', label);
    }
}
class MarkedStringPrinter {
    constructor(quote) {
        this.quote = quote;
        this.result = [];
    }
    print(element, selectorContexts) {
        this.result = [];
        if (element instanceof RootElement) {
            if (element.children) {
                this.doPrint(element.children, 0);
            }
        }
        else {
            this.doPrint([element], 0);
        }
        let value;
        if (selectorContexts) {
            value = [...selectorContexts, ...this.result].join('\n');
        }
        else {
            value = this.result.join('\n');
        }
        return [{ language: 'html', value }];
    }
    doPrint(elements, indent) {
        for (const element of elements) {
            this.doPrintElement(element, indent);
            if (element.children) {
                this.doPrint(element.children, indent + 1);
            }
        }
    }
    writeLine(level, content) {
        const indent = new Array(level + 1).join('  ');
        this.result.push(indent + content);
    }
    doPrintElement(element, indent) {
        const name = element.findAttribute('name');
        if (element instanceof LabelElement || name === '\u2026') {
            this.writeLine(indent, name);
            return;
        }
        const content = ['<'];
        if (name) {
            content.push(name);
        }
        else {
            content.push('element');
        }
        if (element.attributes) {
            for (const attr of element.attributes) {
                if (attr.name !== 'name') {
                    content.push(' ');
                    content.push(attr.name);
                    const value = attr.value;
                    if (value) {
                        content.push('=');
                        content.push(quotes.ensure(value, this.quote));
                    }
                }
            }
        }
        content.push('>');
        this.writeLine(indent, content.join(''));
    }
}
var quotes;
(function (quotes) {
    function ensure(value, which) {
        return which + remove(value) + which;
    }
    quotes.ensure = ensure;
    function remove(value) {
        const match = value.match(/^['"](.*)["']$/);
        if (match) {
            return match[1];
        }
        return value;
    }
    quotes.remove = remove;
})(quotes || (quotes = {}));
class Specificity {
    constructor() {
        this.id = 0;
        this.attr = 0;
        this.tag = 0;
    }
}
function toElement(node, parentElement) {
    let result = new Element$2();
    for (const child of node.getChildren()) {
        switch (child.type) {
            case NodeType$1.SelectorCombinator:
                if (parentElement) {
                    const segments = child.getText().split('&');
                    if (segments.length === 1) {
                        result.addAttr('name', segments[0]);
                        break;
                    }
                    result = parentElement.cloneWithParent();
                    if (segments[0]) {
                        const root = result.findRoot();
                        root.prepend(segments[0]);
                    }
                    for (let i = 1; i < segments.length; i++) {
                        if (i > 1) {
                            const clone = parentElement.cloneWithParent();
                            result.addChild(clone.findRoot());
                            result = clone;
                        }
                        result.append(segments[i]);
                    }
                }
                break;
            case NodeType$1.SelectorPlaceholder:
                if (child.matches('@at-root')) {
                    return result;
                }
            case NodeType$1.ElementNameSelector:
                const text = child.getText();
                result.addAttr('name', text === '*' ? 'element' : unescape$1(text));
                break;
            case NodeType$1.ClassSelector:
                result.addAttr('class', unescape$1(child.getText().substring(1)));
                break;
            case NodeType$1.IdentifierSelector:
                result.addAttr('id', unescape$1(child.getText().substring(1)));
                break;
            case NodeType$1.MixinDeclaration:
                result.addAttr('class', child.getName());
                break;
            case NodeType$1.PseudoSelector:
                result.addAttr(unescape$1(child.getText()), '');
                break;
            case NodeType$1.AttributeSelector:
                const selector = child;
                const identifier = selector.getIdentifier();
                if (identifier) {
                    const expression = selector.getValue();
                    const operator = selector.getOperator();
                    let value;
                    if (expression && operator) {
                        switch (unescape$1(operator.getText())) {
                            case '|=':
                                value = `${quotes.remove(unescape$1(expression.getText()))}-\u2026`;
                                break;
                            case '^=':
                                value = `${quotes.remove(unescape$1(expression.getText()))}\u2026`;
                                break;
                            case '$=':
                                value = `\u2026${quotes.remove(unescape$1(expression.getText()))}`;
                                break;
                            case '~=':
                                value = ` \u2026 ${quotes.remove(unescape$1(expression.getText()))} \u2026 `;
                                break;
                            case '*=':
                                value = `\u2026${quotes.remove(unescape$1(expression.getText()))}\u2026`;
                                break;
                            default:
                                value = quotes.remove(unescape$1(expression.getText()));
                                break;
                        }
                    }
                    result.addAttr(unescape$1(identifier.getText()), value);
                }
                break;
        }
    }
    return result;
}
function unescape$1(content) {
    const scanner = new Scanner();
    scanner.setSource(content);
    const token = scanner.scanUnquotedString();
    if (token) {
        return token.text;
    }
    return content;
}
class SelectorPrinting {
    constructor(cssDataManager) {
        this.cssDataManager = cssDataManager;
    }
    selectorToMarkedString(node, selectorContexts) {
        const root = selectorToElement(node);
        if (root) {
            const markedStrings = new MarkedStringPrinter('"').print(root, selectorContexts);
            markedStrings.push(this.selectorToSpecificityMarkedString(node));
            return markedStrings;
        }
        else {
            return [];
        }
    }
    simpleSelectorToMarkedString(node) {
        const element = toElement(node);
        const markedStrings = new MarkedStringPrinter('"').print(element);
        markedStrings.push(this.selectorToSpecificityMarkedString(node));
        return markedStrings;
    }
    isPseudoElementIdentifier(text) {
        const match = text.match(/^::?([\w-]+)/);
        if (!match) {
            return false;
        }
        return !!this.cssDataManager.getPseudoElement('::' + match[1]);
    }
    selectorToSpecificityMarkedString(node) {
        const calculateMostSpecificListItem = (childElements) => {
            const specificity = new Specificity();
            let mostSpecificListItem = new Specificity();
            for (const containerElement of childElements) {
                for (const childElement of containerElement.getChildren()) {
                    const itemSpecificity = calculateScore(childElement);
                    if (itemSpecificity.id > mostSpecificListItem.id) {
                        mostSpecificListItem = itemSpecificity;
                        continue;
                    }
                    else if (itemSpecificity.id < mostSpecificListItem.id) {
                        continue;
                    }
                    if (itemSpecificity.attr > mostSpecificListItem.attr) {
                        mostSpecificListItem = itemSpecificity;
                        continue;
                    }
                    else if (itemSpecificity.attr < mostSpecificListItem.attr) {
                        continue;
                    }
                    if (itemSpecificity.tag > mostSpecificListItem.tag) {
                        mostSpecificListItem = itemSpecificity;
                        continue;
                    }
                }
            }
            specificity.id += mostSpecificListItem.id;
            specificity.attr += mostSpecificListItem.attr;
            specificity.tag += mostSpecificListItem.tag;
            return specificity;
        };
        const calculateScore = (node) => {
            const specificity = new Specificity();
            elementLoop: for (const element of node.getChildren()) {
                switch (element.type) {
                    case NodeType$1.IdentifierSelector:
                        specificity.id++;
                        break;
                    case NodeType$1.ClassSelector:
                    case NodeType$1.AttributeSelector:
                        specificity.attr++;
                        break;
                    case NodeType$1.ElementNameSelector:
                        if (element.matches('*')) {
                            break;
                        }
                        specificity.tag++;
                        break;
                    case NodeType$1.PseudoSelector:
                        const text = element.getText();
                        const childElements = element.getChildren();
                        if (this.isPseudoElementIdentifier(text)) {
                            if (text.match(/^::slotted/i) && childElements.length > 0) {
                                specificity.tag++;
                                let mostSpecificListItem = calculateMostSpecificListItem(childElements);
                                specificity.id += mostSpecificListItem.id;
                                specificity.attr += mostSpecificListItem.attr;
                                specificity.tag += mostSpecificListItem.tag;
                                continue elementLoop;
                            }
                            specificity.tag++;
                            continue elementLoop;
                        }
                        if (text.match(/^:where/i)) {
                            continue elementLoop;
                        }
                        if (text.match(/^:(?:not|has|is)/i) && childElements.length > 0) {
                            let mostSpecificListItem = calculateMostSpecificListItem(childElements);
                            specificity.id += mostSpecificListItem.id;
                            specificity.attr += mostSpecificListItem.attr;
                            specificity.tag += mostSpecificListItem.tag;
                            continue elementLoop;
                        }
                        if (text.match(/^:(?:host|host-context)/i) && childElements.length > 0) {
                            specificity.attr++;
                            let mostSpecificListItem = calculateMostSpecificListItem(childElements);
                            specificity.id += mostSpecificListItem.id;
                            specificity.attr += mostSpecificListItem.attr;
                            specificity.tag += mostSpecificListItem.tag;
                            continue elementLoop;
                        }
                        if (text.match(/^:(?:nth-child|nth-last-child)/i) && childElements.length > 0) {
                            specificity.attr++;
                            const lastChild = childElements[childElements.length - 1];
                            if (childElements.length > 2 && lastChild.type === NodeType$1.SelectorList) {
                                let mostSpecificListItem = calculateMostSpecificListItem(lastChild.getChildren());
                                specificity.id += mostSpecificListItem.id;
                                specificity.attr += mostSpecificListItem.attr;
                                specificity.tag += mostSpecificListItem.tag;
                                continue elementLoop;
                            }
                            const parser = new Parser();
                            const pseudoSelectorText = childElements[1].getText();
                            parser.scanner.setSource(pseudoSelectorText);
                            const firstToken = parser.scanner.scan();
                            const secondToken = parser.scanner.scan();
                            if (firstToken.text === 'n' || (firstToken.text === '-n' && secondToken.text === 'of')) {
                                const complexSelectorListNodes = [];
                                const complexSelectorText = pseudoSelectorText.slice(secondToken.offset + 2);
                                const complexSelectorArray = complexSelectorText.split(',');
                                for (const selector of complexSelectorArray) {
                                    const node = parser.internalParse(selector, parser._parseSelector);
                                    if (node) {
                                        complexSelectorListNodes.push(node);
                                    }
                                }
                                let mostSpecificListItem = calculateMostSpecificListItem(complexSelectorListNodes);
                                specificity.id += mostSpecificListItem.id;
                                specificity.attr += mostSpecificListItem.attr;
                                specificity.tag += mostSpecificListItem.tag;
                                continue elementLoop;
                            }
                            continue elementLoop;
                        }
                        specificity.attr++;
                        continue elementLoop;
                }
                if (element.getChildren().length > 0) {
                    const itemSpecificity = calculateScore(element);
                    specificity.id += itemSpecificity.id;
                    specificity.attr += itemSpecificity.attr;
                    specificity.tag += itemSpecificity.tag;
                }
            }
            return specificity;
        };
        const specificity = calculateScore(node);
        return `[${main$4.t('Selector Specificity')}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${specificity.id}, ${specificity.attr}, ${specificity.tag})`;
    }
}
class SelectorElementBuilder {
    constructor(element) {
        this.prev = null;
        this.element = element;
    }
    processSelector(selector) {
        let parentElement = null;
        if (!(this.element instanceof RootElement)) {
            if (selector.getChildren().some((c) => c.hasChildren() && c.getChild(0).type === NodeType$1.SelectorCombinator)) {
                const curr = this.element.findRoot();
                if (curr.parent instanceof RootElement) {
                    parentElement = this.element;
                    this.element = curr.parent;
                    this.element.removeChild(curr);
                    this.prev = null;
                }
            }
        }
        for (const selectorChild of selector.getChildren()) {
            if (selectorChild instanceof SimpleSelector) {
                if (this.prev instanceof SimpleSelector) {
                    const labelElement = new LabelElement('\u2026');
                    this.element.addChild(labelElement);
                    this.element = labelElement;
                }
                else if (this.prev && (this.prev.matches('+') || this.prev.matches('~')) && this.element.parent) {
                    this.element = this.element.parent;
                }
                if (this.prev && this.prev.matches('~')) {
                    this.element.addChild(new LabelElement('\u22EE'));
                }
                const thisElement = toElement(selectorChild, parentElement);
                const root = thisElement.findRoot();
                this.element.addChild(root);
                this.element = thisElement;
            }
            if (selectorChild instanceof SimpleSelector ||
                selectorChild.type === NodeType$1.SelectorCombinatorParent ||
                selectorChild.type === NodeType$1.SelectorCombinatorShadowPiercingDescendant ||
                selectorChild.type === NodeType$1.SelectorCombinatorSibling ||
                selectorChild.type === NodeType$1.SelectorCombinatorAllSiblings) {
                this.prev = selectorChild;
            }
        }
    }
}
function isNewSelectorContext(node) {
    switch (node.type) {
        case NodeType$1.MixinDeclaration:
        case NodeType$1.Stylesheet:
            return true;
    }
    return false;
}
function selectorToElement(node) {
    if (node.matches('@at-root')) {
        return null;
    }
    const root = new RootElement();
    const parentRuleSets = [];
    const ruleSet = node.getParent();
    if (ruleSet instanceof RuleSet) {
        let parent = ruleSet.getParent();
        while (parent && !isNewSelectorContext(parent)) {
            if (parent instanceof RuleSet) {
                if (parent.getSelectors().matches('@at-root')) {
                    break;
                }
                parentRuleSets.push(parent);
            }
            parent = parent.getParent();
        }
    }
    const builder = new SelectorElementBuilder(root);
    for (let i = parentRuleSets.length - 1; i >= 0; i--) {
        const selector = parentRuleSets[i].getSelectors().getChild(0);
        if (selector) {
            builder.processSelector(selector);
        }
    }
    builder.processSelector(node);
    return root;
}

class CSSHover {
    constructor(clientCapabilities, cssDataManager) {
        this.clientCapabilities = clientCapabilities;
        this.cssDataManager = cssDataManager;
        this.selectorPrinting = new SelectorPrinting(cssDataManager);
    }
    configure(settings) {
        this.defaultSettings = settings;
    }
    doHover(document, position, stylesheet, settings = this.defaultSettings) {
        function getRange(node) {
            return Range$1.create(document.positionAt(node.offset), document.positionAt(node.end));
        }
        const offset = document.offsetAt(position);
        const nodepath = getNodePath(stylesheet, offset);
        let hover = null;
        let selectorContexts = [];
        for (let i = 0; i < nodepath.length; i++) {
            const node = nodepath[i];
            if (node instanceof Scope$3) {
                const scopeLimits = node.getChild(0);
                if (scopeLimits instanceof ScopeLimits) {
                    const scopeName = `${scopeLimits.getName()}`;
                    selectorContexts.push(`@scope${scopeName ? ` ${scopeName}` : ''}`);
                }
            }
            if (node instanceof Media) {
                const mediaList = node.getChild(0);
                if (mediaList instanceof Medialist) {
                    const name = '@media ' + mediaList.getText();
                    selectorContexts.push(name);
                }
            }
            if (node instanceof Selector) {
                hover = {
                    contents: this.selectorPrinting.selectorToMarkedString(node, selectorContexts),
                    range: getRange(node),
                };
                break;
            }
            if (node instanceof SimpleSelector) {
                if (!startsWith(node.getText(), '@')) {
                    hover = {
                        contents: this.selectorPrinting.simpleSelectorToMarkedString(node),
                        range: getRange(node),
                    };
                }
                break;
            }
            if (node instanceof Declaration) {
                const propertyName = node.getFullPropertyName();
                const entry = this.cssDataManager.getProperty(propertyName);
                if (entry) {
                    const contents = getEntryDescription(entry, this.doesSupportMarkdown(), settings);
                    if (contents) {
                        hover = {
                            contents,
                            range: getRange(node),
                        };
                    }
                    else {
                        hover = null;
                    }
                }
                continue;
            }
            if (node instanceof UnknownAtRule) {
                const atRuleName = node.getText();
                const entry = this.cssDataManager.getAtDirective(atRuleName);
                if (entry) {
                    const contents = getEntryDescription(entry, this.doesSupportMarkdown(), settings);
                    if (contents) {
                        hover = {
                            contents,
                            range: getRange(node),
                        };
                    }
                    else {
                        hover = null;
                    }
                }
                continue;
            }
            if (node instanceof Node && node.type === NodeType$1.PseudoSelector) {
                const selectorName = node.getText();
                const entry = selectorName.slice(0, 2) === '::' ? this.cssDataManager.getPseudoElement(selectorName) : this.cssDataManager.getPseudoClass(selectorName);
                if (entry) {
                    const contents = getEntryDescription(entry, this.doesSupportMarkdown(), settings);
                    if (contents) {
                        hover = {
                            contents,
                            range: getRange(node),
                        };
                    }
                    else {
                        hover = null;
                    }
                }
                continue;
            }
        }
        if (hover) {
            hover.contents = this.convertContents(hover.contents);
        }
        return hover;
    }
    convertContents(contents) {
        if (!this.doesSupportMarkdown()) {
            if (typeof contents === 'string') {
                return contents;
            }
            else if ('kind' in contents) {
                return {
                    kind: 'plaintext',
                    value: contents.value,
                };
            }
            else if (Array.isArray(contents)) {
                return contents.map((c) => {
                    return typeof c === 'string' ? c : c.value;
                });
            }
            else {
                return contents.value;
            }
        }
        return contents;
    }
    doesSupportMarkdown() {
        if (!isDefined(this.supportsMarkdown)) {
            if (!isDefined(this.clientCapabilities)) {
                this.supportsMarkdown = true;
                return this.supportsMarkdown;
            }
            const hover = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover;
            this.supportsMarkdown = hover && hover.contentFormat && Array.isArray(hover.contentFormat) && hover.contentFormat.indexOf(MarkupKind$1.Markdown) !== -1;
        }
        return this.supportsMarkdown;
    }
}

const startsWithSchemeRegex = /^\w+:\/\//;
const startsWithData = /^data:/;
class CSSNavigation {
    constructor(fileSystemProvider, resolveModuleReferences) {
        this.fileSystemProvider = fileSystemProvider;
        this.resolveModuleReferences = resolveModuleReferences;
    }
    configure(settings) {
        this.defaultSettings = settings;
    }
    findDefinition(document, position, stylesheet) {
        const symbols = new Symbols(stylesheet);
        const offset = document.offsetAt(position);
        const node = getNodeAtOffset(stylesheet, offset);
        if (!node) {
            return null;
        }
        const symbol = symbols.findSymbolFromNode(node);
        if (!symbol) {
            return null;
        }
        return {
            uri: document.uri,
            range: getRange(symbol.node, document)
        };
    }
    findReferences(document, position, stylesheet) {
        const highlights = this.findDocumentHighlights(document, position, stylesheet);
        return highlights.map(h => {
            return {
                uri: document.uri,
                range: h.range
            };
        });
    }
    getHighlightNode(document, position, stylesheet) {
        const offset = document.offsetAt(position);
        let node = getNodeAtOffset(stylesheet, offset);
        if (!node || node.type === NodeType$1.Stylesheet || node.type === NodeType$1.Declarations || node.type === NodeType$1.ModuleConfig) {
            return;
        }
        if (node.type === NodeType$1.Identifier && node.parent && node.parent.type === NodeType$1.ClassSelector) {
            node = node.parent;
        }
        return node;
    }
    findDocumentHighlights(document, position, stylesheet) {
        const result = [];
        const node = this.getHighlightNode(document, position, stylesheet);
        if (!node) {
            return result;
        }
        const symbols = new Symbols(stylesheet);
        const symbol = symbols.findSymbolFromNode(node);
        const name = node.getText();
        stylesheet.accept(candidate => {
            if (symbol) {
                if (symbols.matchesSymbol(candidate, symbol)) {
                    result.push({
                        kind: getHighlightKind(candidate),
                        range: getRange(candidate, document)
                    });
                    return false;
                }
            }
            else if (node && node.type === candidate.type && candidate.matches(name)) {
                result.push({
                    kind: getHighlightKind(candidate),
                    range: getRange(candidate, document)
                });
            }
            return true;
        });
        return result;
    }
    isRawStringDocumentLinkNode(node) {
        return node.type === NodeType$1.Import;
    }
    findDocumentLinks(document, stylesheet, documentContext) {
        const linkData = this.findUnresolvedLinks(document, stylesheet);
        const resolvedLinks = [];
        for (let data of linkData) {
            const link = data.link;
            const target = link.target;
            if (!target || startsWithData.test(target)) ;
            else if (startsWithSchemeRegex.test(target)) {
                resolvedLinks.push(link);
            }
            else {
                const resolved = documentContext.resolveReference(target, document.uri);
                if (resolved) {
                    link.target = resolved;
                }
                resolvedLinks.push(link);
            }
        }
        return resolvedLinks;
    }
    async findDocumentLinks2(document, stylesheet, documentContext) {
        const linkData = this.findUnresolvedLinks(document, stylesheet);
        const resolvedLinks = [];
        for (let data of linkData) {
            const link = data.link;
            const target = link.target;
            if (!target || startsWithData.test(target)) ;
            else if (startsWithSchemeRegex.test(target)) {
                resolvedLinks.push(link);
            }
            else {
                const resolvedTarget = await this.resolveReference(target, document.uri, documentContext, data.isRawLink);
                if (resolvedTarget !== undefined) {
                    link.target = resolvedTarget;
                    resolvedLinks.push(link);
                }
            }
        }
        return resolvedLinks;
    }
    findUnresolvedLinks(document, stylesheet) {
        const result = [];
        const collect = (uriStringNode) => {
            let rawUri = uriStringNode.getText();
            const range = getRange(uriStringNode, document);
            if (range.start.line === range.end.line && range.start.character === range.end.character) {
                return;
            }
            if (startsWith(rawUri, `'`) || startsWith(rawUri, `"`)) {
                rawUri = rawUri.slice(1, -1);
            }
            const isRawLink = uriStringNode.parent ? this.isRawStringDocumentLinkNode(uriStringNode.parent) : false;
            result.push({ link: { target: rawUri, range }, isRawLink });
        };
        stylesheet.accept(candidate => {
            if (candidate.type === NodeType$1.URILiteral) {
                const first = candidate.getChild(0);
                if (first) {
                    collect(first);
                }
                return false;
            }
            if (candidate.parent && this.isRawStringDocumentLinkNode(candidate.parent)) {
                const rawText = candidate.getText();
                if (startsWith(rawText, `'`) || startsWith(rawText, `"`)) {
                    collect(candidate);
                }
                return false;
            }
            return true;
        });
        return result;
    }
    findSymbolInformations(document, stylesheet) {
        const result = [];
        const addSymbolInformation = (name, kind, symbolNodeOrRange) => {
            const range = symbolNodeOrRange instanceof Node ? getRange(symbolNodeOrRange, document) : symbolNodeOrRange;
            const entry = {
                name: name || main$4.t('<undefined>'),
                kind,
                location: Location$1.create(document.uri, range)
            };
            result.push(entry);
        };
        this.collectDocumentSymbols(document, stylesheet, addSymbolInformation);
        return result;
    }
    findDocumentSymbols(document, stylesheet) {
        const result = [];
        const parents = [];
        const addDocumentSymbol = (name, kind, symbolNodeOrRange, nameNodeOrRange, bodyNode) => {
            const range = symbolNodeOrRange instanceof Node ? getRange(symbolNodeOrRange, document) : symbolNodeOrRange;
            let selectionRange = nameNodeOrRange instanceof Node ? getRange(nameNodeOrRange, document) : nameNodeOrRange;
            if (!selectionRange || !containsRange(range, selectionRange)) {
                selectionRange = Range$1.create(range.start, range.start);
            }
            const entry = {
                name: name || main$4.t('<undefined>'),
                kind,
                range,
                selectionRange
            };
            let top = parents.pop();
            while (top && !containsRange(top[1], range)) {
                top = parents.pop();
            }
            if (top) {
                const topSymbol = top[0];
                if (!topSymbol.children) {
                    topSymbol.children = [];
                }
                topSymbol.children.push(entry);
                parents.push(top);
            }
            else {
                result.push(entry);
            }
            if (bodyNode) {
                parents.push([entry, getRange(bodyNode, document)]);
            }
        };
        this.collectDocumentSymbols(document, stylesheet, addDocumentSymbol);
        return result;
    }
    collectDocumentSymbols(document, stylesheet, collect) {
        stylesheet.accept(node => {
            if (node instanceof RuleSet) {
                for (const selector of node.getSelectors().getChildren()) {
                    if (selector instanceof Selector) {
                        const range = Range$1.create(document.positionAt(selector.offset), document.positionAt(node.end));
                        collect(selector.getText(), SymbolKind$1.Class, range, selector, node.getDeclarations());
                    }
                }
            }
            else if (node instanceof VariableDeclaration) {
                collect(node.getName(), SymbolKind$1.Variable, node, node.getVariable(), undefined);
            }
            else if (node instanceof MixinDeclaration) {
                collect(node.getName(), SymbolKind$1.Method, node, node.getIdentifier(), node.getDeclarations());
            }
            else if (node instanceof FunctionDeclaration) {
                collect(node.getName(), SymbolKind$1.Function, node, node.getIdentifier(), node.getDeclarations());
            }
            else if (node instanceof Keyframe) {
                const name = main$4.t("@keyframes {0}", node.getName());
                collect(name, SymbolKind$1.Class, node, node.getIdentifier(), node.getDeclarations());
            }
            else if (node instanceof FontFace) {
                const name = main$4.t("@font-face");
                collect(name, SymbolKind$1.Class, node, undefined, node.getDeclarations());
            }
            else if (node instanceof Media) {
                const mediaList = node.getChild(0);
                if (mediaList instanceof Medialist) {
                    const name = '@media ' + mediaList.getText();
                    collect(name, SymbolKind$1.Module, node, mediaList, node.getDeclarations());
                }
            }
            else if (node instanceof Scope$3) {
                let scopeName = '';
                const scopeLimits = node.getChild(0);
                if (scopeLimits instanceof ScopeLimits) {
                    scopeName = `${scopeLimits.getName()}`;
                }
                collect(`@scope${scopeName ? ` ${scopeName}` : ''}`, SymbolKind$1.Module, node, scopeLimits ?? undefined, node.getDeclarations());
            }
            return true;
        });
    }
    findDocumentColors(document, stylesheet) {
        const result = [];
        stylesheet.accept((node) => {
            const colorInfo = getColorInformation(node, document);
            if (colorInfo) {
                result.push(colorInfo);
            }
            return true;
        });
        return result;
    }
    getColorPresentations(document, stylesheet, color, range) {
        const result = [];
        const red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255);
        let label;
        if (color.alpha === 1) {
            label = `rgb(${red256}, ${green256}, ${blue256})`;
        }
        else {
            label = `rgba(${red256}, ${green256}, ${blue256}, ${color.alpha})`;
        }
        result.push({ label: label, textEdit: TextEdit$1.replace(range, label) });
        if (color.alpha === 1) {
            label = `#${toTwoDigitHex(red256)}${toTwoDigitHex(green256)}${toTwoDigitHex(blue256)}`;
        }
        else {
            label = `#${toTwoDigitHex(red256)}${toTwoDigitHex(green256)}${toTwoDigitHex(blue256)}${toTwoDigitHex(Math.round(color.alpha * 255))}`;
        }
        result.push({ label: label, textEdit: TextEdit$1.replace(range, label) });
        const hsl = hslFromColor(color);
        if (hsl.a === 1) {
            label = `hsl(${hsl.h}, ${Math.round(hsl.s * 100)}%, ${Math.round(hsl.l * 100)}%)`;
        }
        else {
            label = `hsla(${hsl.h}, ${Math.round(hsl.s * 100)}%, ${Math.round(hsl.l * 100)}%, ${hsl.a})`;
        }
        result.push({ label: label, textEdit: TextEdit$1.replace(range, label) });
        const hwb = hwbFromColor(color);
        if (hwb.a === 1) {
            label = `hwb(${hwb.h} ${Math.round(hwb.w * 100)}% ${Math.round(hwb.b * 100)}%)`;
        }
        else {
            label = `hwb(${hwb.h} ${Math.round(hwb.w * 100)}% ${Math.round(hwb.b * 100)}% / ${hwb.a})`;
        }
        result.push({ label: label, textEdit: TextEdit$1.replace(range, label) });
        const lab = labFromColor(color);
        if (lab.alpha === 1) {
            label = `lab(${lab.l}% ${lab.a} ${lab.b})`;
        }
        else {
            label = `lab(${lab.l}% ${lab.a} ${lab.b} / ${lab.alpha})`;
        }
        result.push({ label: label, textEdit: TextEdit$1.replace(range, label) });
        const lch = lchFromColor(color);
        if (lab.alpha === 1) {
            label = `lch(${lch.l}% ${lch.c} ${lch.h})`;
        }
        else {
            label = `lch(${lch.l}% ${lch.c} ${lch.h} / ${lch.alpha})`;
        }
        result.push({ label: label, textEdit: TextEdit$1.replace(range, label) });
        return result;
    }
    prepareRename(document, position, stylesheet) {
        const node = this.getHighlightNode(document, position, stylesheet);
        if (node) {
            return Range$1.create(document.positionAt(node.offset), document.positionAt(node.end));
        }
    }
    doRename(document, position, newName, stylesheet) {
        const highlights = this.findDocumentHighlights(document, position, stylesheet);
        const edits = highlights.map(h => TextEdit$1.replace(h.range, newName));
        return {
            changes: { [document.uri]: edits }
        };
    }
    async resolveModuleReference(ref, documentUri, documentContext) {
        if (startsWith(documentUri, 'file://')) {
            const moduleName = getModuleNameFromPath(ref);
            if (moduleName && moduleName !== '.' && moduleName !== '..') {
                const rootFolderUri = documentContext.resolveReference('/', documentUri);
                const documentFolderUri = dirname(documentUri);
                const modulePath = await this.resolvePathToModule(moduleName, documentFolderUri, rootFolderUri);
                if (modulePath) {
                    const pathWithinModule = ref.substring(moduleName.length + 1);
                    return joinPath(modulePath, pathWithinModule);
                }
            }
        }
        return undefined;
    }
    async mapReference(target, isRawLink) {
        return target;
    }
    async resolveReference(target, documentUri, documentContext, isRawLink = false, settings = this.defaultSettings) {
        if (target[0] === '~' && target[1] !== '/' && this.fileSystemProvider) {
            target = target.substring(1);
            return this.mapReference(await this.resolveModuleReference(target, documentUri, documentContext), isRawLink);
        }
        const ref = await this.mapReference(documentContext.resolveReference(target, documentUri), isRawLink);
        if (this.resolveModuleReferences) {
            if (ref && await this.fileExists(ref)) {
                return ref;
            }
            const moduleReference = await this.mapReference(await this.resolveModuleReference(target, documentUri, documentContext), isRawLink);
            if (moduleReference) {
                return moduleReference;
            }
        }
        if (ref && !(await this.fileExists(ref))) {
            const rootFolderUri = documentContext.resolveReference('/', documentUri);
            if (settings && rootFolderUri) {
                if (target in settings) {
                    return this.mapReference(joinPath(rootFolderUri, settings[target]), isRawLink);
                }
                const firstSlash = target.indexOf('/');
                const prefix = `${target.substring(0, firstSlash)}/`;
                if (prefix in settings) {
                    const aliasPath = (settings[prefix]).slice(0, -1);
                    let newPath = joinPath(rootFolderUri, aliasPath);
                    return this.mapReference(newPath = joinPath(newPath, target.substring(prefix.length - 1)), isRawLink);
                }
            }
        }
        return ref;
    }
    async resolvePathToModule(_moduleName, documentFolderUri, rootFolderUri) {
        const packPath = joinPath(documentFolderUri, 'node_modules', _moduleName, 'package.json');
        if (await this.fileExists(packPath)) {
            return dirname(packPath);
        }
        else if (rootFolderUri && documentFolderUri.startsWith(rootFolderUri) && (documentFolderUri.length !== rootFolderUri.length)) {
            return this.resolvePathToModule(_moduleName, dirname(documentFolderUri), rootFolderUri);
        }
        return undefined;
    }
    async fileExists(uri) {
        if (!this.fileSystemProvider) {
            return false;
        }
        try {
            const stat = await this.fileSystemProvider.stat(uri);
            if (stat.type === FileType.Unknown && stat.size === -1) {
                return false;
            }
            return true;
        }
        catch (err) {
            return false;
        }
    }
    async getContent(uri) {
        if (!this.fileSystemProvider || !this.fileSystemProvider.getContent) {
            return null;
        }
        try {
            return await this.fileSystemProvider.getContent(uri);
        }
        catch (err) {
            return null;
        }
    }
}
function getColorInformation(node, document) {
    const color = getColorValue(node);
    if (color) {
        const range = getRange(node, document);
        return { color, range };
    }
    return null;
}
function getRange(node, document) {
    return Range$1.create(document.positionAt(node.offset), document.positionAt(node.end));
}
function containsRange(range, otherRange) {
    const otherStartLine = otherRange.start.line, otherEndLine = otherRange.end.line;
    const rangeStartLine = range.start.line, rangeEndLine = range.end.line;
    if (otherStartLine < rangeStartLine || otherEndLine < rangeStartLine) {
        return false;
    }
    if (otherStartLine > rangeEndLine || otherEndLine > rangeEndLine) {
        return false;
    }
    if (otherStartLine === rangeStartLine && otherRange.start.character < range.start.character) {
        return false;
    }
    if (otherEndLine === rangeEndLine && otherRange.end.character > range.end.character) {
        return false;
    }
    return true;
}
function getHighlightKind(node) {
    if (node.type === NodeType$1.Selector) {
        return DocumentHighlightKind$1.Write;
    }
    if (node instanceof Identifier) {
        if (node.parent && node.parent instanceof Property) {
            if (node.isCustomProperty) {
                return DocumentHighlightKind$1.Write;
            }
        }
    }
    if (node.parent) {
        switch (node.parent.type) {
            case NodeType$1.FunctionDeclaration:
            case NodeType$1.MixinDeclaration:
            case NodeType$1.Keyframe:
            case NodeType$1.VariableDeclaration:
            case NodeType$1.FunctionParameter:
                return DocumentHighlightKind$1.Write;
        }
    }
    return DocumentHighlightKind$1.Read;
}
function toTwoDigitHex(n) {
    const r = n.toString(16);
    return r.length !== 2 ? '0' + r : r;
}
function getModuleNameFromPath(path) {
    const firstSlash = path.indexOf('/');
    if (firstSlash === -1) {
        return '';
    }
    if (path[0] === '@') {
        const secondSlash = path.indexOf('/', firstSlash + 1);
        if (secondSlash === -1) {
            return path;
        }
        return path.substring(0, secondSlash);
    }
    return path.substring(0, firstSlash);
}

const Warning = Level.Warning;
const Error$1 = Level.Error;
const Ignore = Level.Ignore;
class Rule {
    constructor(id, message, defaultValue) {
        this.id = id;
        this.message = message;
        this.defaultValue = defaultValue;
    }
}
class Setting {
    constructor(id, message, defaultValue) {
        this.id = id;
        this.message = message;
        this.defaultValue = defaultValue;
    }
}
const Rules = {
    AllVendorPrefixes: new Rule('compatibleVendorPrefixes', main$4.t("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"), Ignore),
    IncludeStandardPropertyWhenUsingVendorPrefix: new Rule('vendorPrefix', main$4.t("When using a vendor-specific prefix also include the standard property"), Warning),
    DuplicateDeclarations: new Rule('duplicateProperties', main$4.t("Do not use duplicate style definitions"), Ignore),
    EmptyRuleSet: new Rule('emptyRules', main$4.t("Do not use empty rulesets"), Warning),
    ImportStatemement: new Rule('importStatement', main$4.t("Import statements do not load in parallel"), Ignore),
    BewareOfBoxModelSize: new Rule('boxModel', main$4.t("Do not use width or height when using padding or border"), Ignore),
    UniversalSelector: new Rule('universalSelector', main$4.t("The universal selector (*) is known to be slow"), Ignore),
    ZeroWithUnit: new Rule('zeroUnits', main$4.t("No unit for zero needed"), Ignore),
    RequiredPropertiesForFontFace: new Rule('fontFaceProperties', main$4.t("@font-face rule must define 'src' and 'font-family' properties"), Warning),
    HexColorLength: new Rule('hexColorLength', main$4.t("Hex colors must consist of three, four, six or eight hex numbers"), Error$1),
    ArgsInColorFunction: new Rule('argumentsInColorFunction', main$4.t("Invalid number of parameters"), Error$1),
    UnknownProperty: new Rule('unknownProperties', main$4.t("Unknown property."), Warning),
    UnknownAtRules: new Rule('unknownAtRules', main$4.t("Unknown at-rule."), Warning),
    IEStarHack: new Rule('ieHack', main$4.t("IE hacks are only necessary when supporting IE7 and older"), Ignore),
    UnknownVendorSpecificProperty: new Rule('unknownVendorSpecificProperties', main$4.t("Unknown vendor specific property."), Ignore),
    PropertyIgnoredDueToDisplay: new Rule('propertyIgnoredDueToDisplay', main$4.t("Property is ignored due to the display."), Warning),
    AvoidImportant: new Rule('important', main$4.t("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."), Ignore),
    AvoidFloat: new Rule('float', main$4.t("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."), Ignore),
    AvoidIdSelector: new Rule('idSelector', main$4.t("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."), Ignore),
};
const Settings = {
    ValidProperties: new Setting('validProperties', main$4.t("A list of properties that are not validated against the `unknownProperties` rule."), [])
};
class LintConfigurationSettings {
    constructor(conf = {}) {
        this.conf = conf;
    }
    getRule(rule) {
        if (this.conf.hasOwnProperty(rule.id)) {
            const level = toLevel(this.conf[rule.id]);
            if (level) {
                return level;
            }
        }
        return rule.defaultValue;
    }
    getSetting(setting) {
        return this.conf[setting.id];
    }
}
function toLevel(level) {
    switch (level) {
        case 'ignore': return Level.Ignore;
        case 'warning': return Level.Warning;
        case 'error': return Level.Error;
    }
    return null;
}

class CSSCodeActions {
    constructor(cssDataManager) {
        this.cssDataManager = cssDataManager;
    }
    doCodeActions(document, range, context, stylesheet) {
        return this.doCodeActions2(document, range, context, stylesheet).map(ca => {
            const textDocumentEdit = ca.edit && ca.edit.documentChanges && ca.edit.documentChanges[0];
            return Command$1.create(ca.title, '_css.applyCodeAction', document.uri, document.version, textDocumentEdit && textDocumentEdit.edits);
        });
    }
    doCodeActions2(document, range, context, stylesheet) {
        const result = [];
        if (context.diagnostics) {
            for (const diagnostic of context.diagnostics) {
                this.appendFixesForMarker(document, stylesheet, diagnostic, result);
            }
        }
        return result;
    }
    getFixesForUnknownProperty(document, property, marker, result) {
        const propertyName = property.getName();
        const candidates = [];
        this.cssDataManager.getProperties().forEach(p => {
            const score = difference(propertyName, p.name);
            if (score >= propertyName.length / 2 ) {
                candidates.push({ property: p.name, score });
            }
        });
        candidates.sort((a, b) => {
            return b.score - a.score || a.property.localeCompare(b.property);
        });
        let maxActions = 3;
        for (const candidate of candidates) {
            const propertyName = candidate.property;
            const title = main$4.t("Rename to '{0}'", propertyName);
            const edit = TextEdit$1.replace(marker.range, propertyName);
            const documentIdentifier = VersionedTextDocumentIdentifier$1.create(document.uri, document.version);
            const workspaceEdit = { documentChanges: [TextDocumentEdit$1.create(documentIdentifier, [edit])] };
            const codeAction = CodeAction$1.create(title, workspaceEdit, CodeActionKind$1.QuickFix);
            codeAction.diagnostics = [marker];
            result.push(codeAction);
            if (--maxActions <= 0) {
                return;
            }
        }
    }
    appendFixesForMarker(document, stylesheet, marker, result) {
        if (marker.code !== Rules.UnknownProperty.id) {
            return;
        }
        const offset = document.offsetAt(marker.range.start);
        const end = document.offsetAt(marker.range.end);
        const nodepath = getNodePath(stylesheet, offset);
        for (let i = nodepath.length - 1; i >= 0; i--) {
            const node = nodepath[i];
            if (node instanceof Declaration) {
                const property = node.getProperty();
                if (property && property.offset === offset && property.end === end) {
                    this.getFixesForUnknownProperty(document, property, marker, result);
                    return;
                }
            }
        }
    }
}

let Element$1 = class Element {
    constructor(decl) {
        this.fullPropertyName = decl.getFullPropertyName().toLowerCase();
        this.node = decl;
    }
};
function setSide(model, side, value, property) {
    const state = model[side];
    state.value = value;
    if (value) {
        if (!includes(state.properties, property)) {
            state.properties.push(property);
        }
    }
}
function setAllSides(model, value, property) {
    setSide(model, 'top', value, property);
    setSide(model, 'right', value, property);
    setSide(model, 'bottom', value, property);
    setSide(model, 'left', value, property);
}
function updateModelWithValue(model, side, value, property) {
    if (side === 'top' || side === 'right' ||
        side === 'bottom' || side === 'left') {
        setSide(model, side, value, property);
    }
    else {
        setAllSides(model, value, property);
    }
}
function updateModelWithList(model, values, property) {
    switch (values.length) {
        case 1:
            updateModelWithValue(model, undefined, values[0], property);
            break;
        case 2:
            updateModelWithValue(model, 'top', values[0], property);
            updateModelWithValue(model, 'bottom', values[0], property);
            updateModelWithValue(model, 'right', values[1], property);
            updateModelWithValue(model, 'left', values[1], property);
            break;
        case 3:
            updateModelWithValue(model, 'top', values[0], property);
            updateModelWithValue(model, 'right', values[1], property);
            updateModelWithValue(model, 'left', values[1], property);
            updateModelWithValue(model, 'bottom', values[2], property);
            break;
        case 4:
            updateModelWithValue(model, 'top', values[0], property);
            updateModelWithValue(model, 'right', values[1], property);
            updateModelWithValue(model, 'bottom', values[2], property);
            updateModelWithValue(model, 'left', values[3], property);
            break;
    }
}
function matches(value, candidates) {
    for (let candidate of candidates) {
        if (value.matches(candidate)) {
            return true;
        }
    }
    return false;
}
function checkLineWidth(value, allowsKeywords = true) {
    if (allowsKeywords && matches(value, ['initial', 'unset'])) {
        return false;
    }
    return parseFloat(value.getText()) !== 0;
}
function checkLineWidthList(nodes, allowsKeywords = true) {
    return nodes.map(node => checkLineWidth(node, allowsKeywords));
}
function checkLineStyle(valueNode, allowsKeywords = true) {
    if (matches(valueNode, ['none', 'hidden'])) {
        return false;
    }
    if (allowsKeywords && matches(valueNode, ['initial', 'unset'])) {
        return false;
    }
    return true;
}
function checkLineStyleList(nodes, allowsKeywords = true) {
    return nodes.map(node => checkLineStyle(node, allowsKeywords));
}
function checkBorderShorthand(node) {
    const children = node.getChildren();
    if (children.length === 1) {
        const value = children[0];
        return checkLineWidth(value) && checkLineStyle(value);
    }
    for (const child of children) {
        const value = child;
        if (!checkLineWidth(value,  false) ||
            !checkLineStyle(value,  false)) {
            return false;
        }
    }
    return true;
}
function calculateBoxModel(propertyTable) {
    const model = {
        top: { value: false, properties: [] },
        right: { value: false, properties: [] },
        bottom: { value: false, properties: [] },
        left: { value: false, properties: [] },
    };
    for (const property of propertyTable) {
        const value = property.node.value;
        if (typeof value === 'undefined') {
            continue;
        }
        switch (property.fullPropertyName) {
            case 'box-sizing':
                return {
                    top: { value: false, properties: [] },
                    right: { value: false, properties: [] },
                    bottom: { value: false, properties: [] },
                    left: { value: false, properties: [] },
                };
            case 'width':
                model.width = property;
                break;
            case 'height':
                model.height = property;
                break;
            default:
                const segments = property.fullPropertyName.split('-');
                switch (segments[0]) {
                    case 'border':
                        switch (segments[1]) {
                            case undefined:
                            case 'top':
                            case 'right':
                            case 'bottom':
                            case 'left':
                                switch (segments[2]) {
                                    case undefined:
                                        updateModelWithValue(model, segments[1], checkBorderShorthand(value), property);
                                        break;
                                    case 'width':
                                        updateModelWithValue(model, segments[1], checkLineWidth(value, false), property);
                                        break;
                                    case 'style':
                                        updateModelWithValue(model, segments[1], checkLineStyle(value, true), property);
                                        break;
                                }
                                break;
                            case 'width':
                                updateModelWithList(model, checkLineWidthList(value.getChildren(), false), property);
                                break;
                            case 'style':
                                updateModelWithList(model, checkLineStyleList(value.getChildren(), true), property);
                                break;
                        }
                        break;
                    case 'padding':
                        if (segments.length === 1) {
                            updateModelWithList(model, checkLineWidthList(value.getChildren(), true), property);
                        }
                        else {
                            updateModelWithValue(model, segments[1], checkLineWidth(value, true), property);
                        }
                        break;
                }
                break;
        }
    }
    return model;
}

class NodesByRootMap {
    constructor() {
        this.data = {};
    }
    add(root, name, node) {
        let entry = this.data[root];
        if (!entry) {
            entry = { nodes: [], names: [] };
            this.data[root] = entry;
        }
        entry.names.push(name);
        if (node) {
            entry.nodes.push(node);
        }
    }
}
class LintVisitor {
    static entries(node, document, settings, cssDataManager, entryFilter) {
        const visitor = new LintVisitor(document, settings, cssDataManager);
        node.acceptVisitor(visitor);
        visitor.completeValidations();
        return visitor.getEntries(entryFilter);
    }
    constructor(document, settings, cssDataManager) {
        this.cssDataManager = cssDataManager;
        this.warnings = [];
        this.settings = settings;
        this.documentText = document.getText();
        this.keyframes = new NodesByRootMap();
        this.validProperties = {};
        const properties = settings.getSetting(Settings.ValidProperties);
        if (Array.isArray(properties)) {
            properties.forEach((p) => {
                if (typeof p === 'string') {
                    const name = p.trim().toLowerCase();
                    if (name.length) {
                        this.validProperties[name] = true;
                    }
                }
            });
        }
    }
    isValidPropertyDeclaration(element) {
        const propertyName = element.fullPropertyName;
        return this.validProperties[propertyName];
    }
    fetch(input, s) {
        const elements = [];
        for (const curr of input) {
            if (curr.fullPropertyName === s) {
                elements.push(curr);
            }
        }
        return elements;
    }
    fetchWithValue(input, s, v) {
        const elements = [];
        for (const inputElement of input) {
            if (inputElement.fullPropertyName === s) {
                const expression = inputElement.node.getValue();
                if (expression && this.findValueInExpression(expression, v)) {
                    elements.push(inputElement);
                }
            }
        }
        return elements;
    }
    findValueInExpression(expression, v) {
        let found = false;
        expression.accept(node => {
            if (node.type === NodeType$1.Identifier && node.matches(v)) {
                found = true;
            }
            return !found;
        });
        return found;
    }
    getEntries(filter = (Level.Warning | Level.Error)) {
        return this.warnings.filter(entry => {
            return (entry.getLevel() & filter) !== 0;
        });
    }
    addEntry(node, rule, details) {
        const entry = new Marker(node, rule, this.settings.getRule(rule), details);
        this.warnings.push(entry);
    }
    getMissingNames(expected, actual) {
        const expectedClone = expected.slice(0);
        for (let i = 0; i < actual.length; i++) {
            const k = expectedClone.indexOf(actual[i]);
            if (k !== -1) {
                expectedClone[k] = null;
            }
        }
        let result = null;
        for (let i = 0; i < expectedClone.length; i++) {
            const curr = expectedClone[i];
            if (curr) {
                if (result === null) {
                    result = main$4.t("'{0}'", curr);
                }
                else {
                    result = main$4.t("{0}, '{1}'", result, curr);
                }
            }
        }
        return result;
    }
    visitNode(node) {
        switch (node.type) {
            case NodeType$1.UnknownAtRule:
                return this.visitUnknownAtRule(node);
            case NodeType$1.Keyframe:
                return this.visitKeyframe(node);
            case NodeType$1.FontFace:
                return this.visitFontFace(node);
            case NodeType$1.Ruleset:
                return this.visitRuleSet(node);
            case NodeType$1.SimpleSelector:
                return this.visitSimpleSelector(node);
            case NodeType$1.Function:
                return this.visitFunction(node);
            case NodeType$1.NumericValue:
                return this.visitNumericValue(node);
            case NodeType$1.Import:
                return this.visitImport(node);
            case NodeType$1.HexColorValue:
                return this.visitHexColorValue(node);
            case NodeType$1.Prio:
                return this.visitPrio(node);
            case NodeType$1.IdentifierSelector:
                return this.visitIdentifierSelector(node);
        }
        return true;
    }
    completeValidations() {
        this.validateKeyframes();
    }
    visitUnknownAtRule(node) {
        const atRuleName = node.getChild(0);
        if (!atRuleName) {
            return false;
        }
        const atDirective = this.cssDataManager.getAtDirective(atRuleName.getText());
        if (atDirective) {
            return false;
        }
        this.addEntry(atRuleName, Rules.UnknownAtRules, `Unknown at rule ${atRuleName.getText()}`);
        return true;
    }
    visitKeyframe(node) {
        const keyword = node.getKeyword();
        if (!keyword) {
            return false;
        }
        const text = keyword.getText();
        this.keyframes.add(node.getName(), text, (text !== '@keyframes') ? keyword : null);
        return true;
    }
    validateKeyframes() {
        const expected = ['@-webkit-keyframes', '@-moz-keyframes', '@-o-keyframes'];
        for (const name in this.keyframes.data) {
            const actual = this.keyframes.data[name].names;
            const needsStandard = (actual.indexOf('@keyframes') === -1);
            if (!needsStandard && actual.length === 1) {
                continue;
            }
            const missingVendorSpecific = this.getMissingNames(expected, actual);
            if (missingVendorSpecific || needsStandard) {
                for (const node of this.keyframes.data[name].nodes) {
                    if (needsStandard) {
                        const message = main$4.t("Always define standard rule '@keyframes' when defining keyframes.");
                        this.addEntry(node, Rules.IncludeStandardPropertyWhenUsingVendorPrefix, message);
                    }
                    if (missingVendorSpecific) {
                        const message = main$4.t("Always include all vendor specific rules: Missing: {0}", missingVendorSpecific);
                        this.addEntry(node, Rules.AllVendorPrefixes, message);
                    }
                }
            }
        }
        return true;
    }
    visitSimpleSelector(node) {
        const firstChar = this.documentText.charAt(node.offset);
        if (node.length === 1 && firstChar === '*') {
            this.addEntry(node, Rules.UniversalSelector);
        }
        return true;
    }
    visitIdentifierSelector(node) {
        this.addEntry(node, Rules.AvoidIdSelector);
        return true;
    }
    visitImport(node) {
        this.addEntry(node, Rules.ImportStatemement);
        return true;
    }
    visitRuleSet(node) {
        const declarations = node.getDeclarations();
        if (!declarations) {
            return false;
        }
        if (!declarations.hasChildren()) {
            this.addEntry(node.getSelectors(), Rules.EmptyRuleSet);
        }
        const propertyTable = [];
        for (const element of declarations.getChildren()) {
            if (element instanceof Declaration) {
                propertyTable.push(new Element$1(element));
            }
        }
        const boxModel = calculateBoxModel(propertyTable);
        if (boxModel.width) {
            let properties = [];
            if (boxModel.right.value) {
                properties = union(properties, boxModel.right.properties);
            }
            if (boxModel.left.value) {
                properties = union(properties, boxModel.left.properties);
            }
            if (properties.length !== 0) {
                for (const item of properties) {
                    this.addEntry(item.node, Rules.BewareOfBoxModelSize);
                }
                this.addEntry(boxModel.width.node, Rules.BewareOfBoxModelSize);
            }
        }
        if (boxModel.height) {
            let properties = [];
            if (boxModel.top.value) {
                properties = union(properties, boxModel.top.properties);
            }
            if (boxModel.bottom.value) {
                properties = union(properties, boxModel.bottom.properties);
            }
            if (properties.length !== 0) {
                for (const item of properties) {
                    this.addEntry(item.node, Rules.BewareOfBoxModelSize);
                }
                this.addEntry(boxModel.height.node, Rules.BewareOfBoxModelSize);
            }
        }
        let displayElems = this.fetchWithValue(propertyTable, 'display', 'inline-block');
        if (displayElems.length > 0) {
            const elem = this.fetch(propertyTable, 'float');
            for (let index = 0; index < elem.length; index++) {
                const node = elem[index].node;
                const value = node.getValue();
                if (value && !value.matches('none')) {
                    this.addEntry(node, Rules.PropertyIgnoredDueToDisplay, main$4.t("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'"));
                }
            }
        }
        displayElems = this.fetchWithValue(propertyTable, 'display', 'block');
        if (displayElems.length > 0) {
            const elem = this.fetch(propertyTable, 'vertical-align');
            for (let index = 0; index < elem.length; index++) {
                this.addEntry(elem[index].node, Rules.PropertyIgnoredDueToDisplay, main$4.t("Property is ignored due to the display. With 'display: block', vertical-align should not be used."));
            }
        }
        const elements = this.fetch(propertyTable, 'float');
        for (let index = 0; index < elements.length; index++) {
            const element = elements[index];
            if (!this.isValidPropertyDeclaration(element)) {
                this.addEntry(element.node, Rules.AvoidFloat);
            }
        }
        for (let i = 0; i < propertyTable.length; i++) {
            const element = propertyTable[i];
            if (element.fullPropertyName !== 'background' && !this.validProperties[element.fullPropertyName]) {
                const value = element.node.getValue();
                if (value && this.documentText.charAt(value.offset) !== '-') {
                    const elements = this.fetch(propertyTable, element.fullPropertyName);
                    if (elements.length > 1) {
                        for (let k = 0; k < elements.length; k++) {
                            const value = elements[k].node.getValue();
                            if (value && this.documentText.charAt(value.offset) !== '-' && elements[k] !== element) {
                                this.addEntry(element.node, Rules.DuplicateDeclarations);
                            }
                        }
                    }
                }
            }
        }
        const isExportBlock = node.getSelectors().matches(":export");
        if (!isExportBlock) {
            const propertiesBySuffix = new NodesByRootMap();
            let containsUnknowns = false;
            for (const element of propertyTable) {
                const decl = element.node;
                if (this.isCSSDeclaration(decl)) {
                    let name = element.fullPropertyName;
                    const firstChar = name.charAt(0);
                    if (firstChar === '-') {
                        if (name.charAt(1) !== '-') {
                            if (!this.cssDataManager.isKnownProperty(name) && !this.validProperties[name]) {
                                this.addEntry(decl.getProperty(), Rules.UnknownVendorSpecificProperty);
                            }
                            const nonPrefixedName = decl.getNonPrefixedPropertyName();
                            propertiesBySuffix.add(nonPrefixedName, name, decl.getProperty());
                        }
                    }
                    else {
                        const fullName = name;
                        if (firstChar === '*' || firstChar === '_') {
                            this.addEntry(decl.getProperty(), Rules.IEStarHack);
                            name = name.substr(1);
                        }
                        if (!this.cssDataManager.isKnownProperty(fullName) && !this.cssDataManager.isKnownProperty(name)) {
                            if (!this.validProperties[name]) {
                                this.addEntry(decl.getProperty(), Rules.UnknownProperty, main$4.t("Unknown property: '{0}'", decl.getFullPropertyName()));
                            }
                        }
                        propertiesBySuffix.add(name, name, null);
                    }
                }
                else {
                    containsUnknowns = true;
                }
            }
            if (!containsUnknowns) {
                for (const suffix in propertiesBySuffix.data) {
                    const entry = propertiesBySuffix.data[suffix];
                    const actual = entry.names;
                    const needsStandard = this.cssDataManager.isStandardProperty(suffix) && (actual.indexOf(suffix) === -1);
                    if (!needsStandard && actual.length === 1) {
                        continue;
                    }
                    const entriesThatNeedStandard = new Set(needsStandard ? entry.nodes : []);
                    if (needsStandard) {
                        const pseudoElements = this.getContextualVendorSpecificPseudoElements(node);
                        for (const node of entry.nodes) {
                            const propertyName = node.getName();
                            const prefix = propertyName.substring(0, propertyName.length - suffix.length);
                            if (pseudoElements.some(x => x.startsWith(prefix))) {
                                entriesThatNeedStandard.delete(node);
                            }
                        }
                    }
                    const expected = [];
                    for (let i = 0, len = LintVisitor.prefixes.length; i < len; i++) {
                        const prefix = LintVisitor.prefixes[i];
                        if (this.cssDataManager.isStandardProperty(prefix + suffix)) {
                            expected.push(prefix + suffix);
                        }
                    }
                    const missingVendorSpecific = this.getMissingNames(expected, actual);
                    if (missingVendorSpecific || needsStandard) {
                        for (const node of entry.nodes) {
                            if (needsStandard && entriesThatNeedStandard.has(node)) {
                                const message = main$4.t("Also define the standard property '{0}' for compatibility", suffix);
                                this.addEntry(node, Rules.IncludeStandardPropertyWhenUsingVendorPrefix, message);
                            }
                            if (missingVendorSpecific) {
                                const message = main$4.t("Always include all vendor specific properties: Missing: {0}", missingVendorSpecific);
                                this.addEntry(node, Rules.AllVendorPrefixes, message);
                            }
                        }
                    }
                }
            }
        }
        return true;
    }
    getContextualVendorSpecificPseudoElements(node) {
        function walkDown(s, n) {
            for (const child of n.getChildren()) {
                if (child.type === NodeType$1.PseudoSelector) {
                    const pseudoElement = child.getChildren()[0]?.getText();
                    if (pseudoElement) {
                        s.add(pseudoElement);
                    }
                }
                walkDown(s, child);
            }
        }
        function walkUp(s, n) {
            if (n.type === NodeType$1.Ruleset) {
                for (const selector of n.getSelectors().getChildren()) {
                    walkDown(s, selector);
                }
            }
            return n.parent ? walkUp(s, n.parent) : undefined;
        }
        const result = new Set();
        walkUp(result, node);
        return Array.from(result);
    }
    visitPrio(node) {
        this.addEntry(node, Rules.AvoidImportant);
        return true;
    }
    visitNumericValue(node) {
        const funcDecl = node.findParent(NodeType$1.Function);
        if (funcDecl && funcDecl.getName() === 'calc') {
            return true;
        }
        const decl = node.findParent(NodeType$1.Declaration);
        if (decl) {
            const declValue = decl.getValue();
            if (declValue) {
                const value = node.getValue();
                if (!value.unit || units.length.indexOf(value.unit.toLowerCase()) === -1) {
                    return true;
                }
                if (parseFloat(value.value) === 0.0 && !!value.unit && !this.validProperties[decl.getFullPropertyName()]) {
                    this.addEntry(node, Rules.ZeroWithUnit);
                }
            }
        }
        return true;
    }
    visitFontFace(node) {
        const declarations = node.getDeclarations();
        if (!declarations) {
            return false;
        }
        let definesSrc = false, definesFontFamily = false;
        let containsUnknowns = false;
        for (const node of declarations.getChildren()) {
            if (this.isCSSDeclaration(node)) {
                const name = node.getProperty().getName().toLowerCase();
                if (name === 'src') {
                    definesSrc = true;
                }
                if (name === 'font-family') {
                    definesFontFamily = true;
                }
            }
            else {
                containsUnknowns = true;
            }
        }
        if (!containsUnknowns && (!definesSrc || !definesFontFamily)) {
            this.addEntry(node, Rules.RequiredPropertiesForFontFace);
        }
        return true;
    }
    isCSSDeclaration(node) {
        if (node instanceof Declaration) {
            if (!node.getValue()) {
                return false;
            }
            const property = node.getProperty();
            if (!property) {
                return false;
            }
            const identifier = property.getIdentifier();
            if (!identifier || identifier.containsInterpolation()) {
                return false;
            }
            return true;
        }
        return false;
    }
    visitHexColorValue(node) {
        const length = node.length;
        if (length !== 9 && length !== 7 && length !== 5 && length !== 4) {
            this.addEntry(node, Rules.HexColorLength);
        }
        return false;
    }
    visitFunction(node) {
        const fnName = node.getName().toLowerCase();
        let expectedAttrCount = -1;
        let actualAttrCount = 0;
        switch (fnName) {
            case 'rgb(':
            case 'hsl(':
                expectedAttrCount = 3;
                break;
            case 'rgba(':
            case 'hsla(':
                expectedAttrCount = 4;
                break;
        }
        if (expectedAttrCount !== -1) {
            node.getArguments().accept(n => {
                if (n instanceof BinaryExpression) {
                    actualAttrCount += 1;
                    return false;
                }
                return true;
            });
            if (actualAttrCount !== expectedAttrCount) {
                this.addEntry(node, Rules.ArgsInColorFunction);
            }
        }
        return true;
    }
}
LintVisitor.prefixes = [
    '-ms-', '-moz-', '-o-', '-webkit-',
];

class CSSValidation {
    constructor(cssDataManager) {
        this.cssDataManager = cssDataManager;
    }
    configure(settings) {
        this.settings = settings;
    }
    doValidation(document, stylesheet, settings = this.settings) {
        if (settings && settings.validate === false) {
            return [];
        }
        const entries = [];
        entries.push.apply(entries, ParseErrorCollector.entries(stylesheet));
        entries.push.apply(entries, LintVisitor.entries(stylesheet, document, new LintConfigurationSettings(settings && settings.lint), this.cssDataManager));
        const ruleIds = [];
        for (const r in Rules) {
            ruleIds.push(Rules[r].id);
        }
        function toDiagnostic(marker) {
            const range = Range$1.create(document.positionAt(marker.getOffset()), document.positionAt(marker.getOffset() + marker.getLength()));
            const source = document.languageId;
            return {
                code: marker.getRule().id,
                source: source,
                message: marker.getMessage(),
                severity: marker.getLevel() === Level.Warning ? DiagnosticSeverity$1.Warning : DiagnosticSeverity$1.Error,
                range: range
            };
        }
        return entries.filter(entry => entry.getLevel() !== Level.Ignore).map(toDiagnostic);
    }
}

const _FSL$1 = '/'.charCodeAt(0);
const _NWL$1 = '\n'.charCodeAt(0);
const _CAR$1 = '\r'.charCodeAt(0);
const _LFD$1 = '\f'.charCodeAt(0);
const _DLR = '$'.charCodeAt(0);
const _HSH = '#'.charCodeAt(0);
const _CUL$1 = '{'.charCodeAt(0);
const _EQS = '='.charCodeAt(0);
const _BNG = '!'.charCodeAt(0);
const _LAN = '<'.charCodeAt(0);
const _RAN = '>'.charCodeAt(0);
const _DOT$1 = '.'.charCodeAt(0);
let customTokenValue$1 = TokenType.CustomToken;
const VariableName = customTokenValue$1++;
const InterpolationFunction = customTokenValue$1++;
customTokenValue$1++;
const EqualsOperator = customTokenValue$1++;
const NotEqualsOperator = customTokenValue$1++;
const GreaterEqualsOperator = customTokenValue$1++;
const SmallerEqualsOperator = customTokenValue$1++;
const Ellipsis$1 = customTokenValue$1++;
customTokenValue$1++;
class SCSSScanner extends Scanner {
    scanNext(offset) {
        if (this.stream.advanceIfChar(_DLR)) {
            const content = ['$'];
            if (this.ident(content)) {
                return this.finishToken(offset, VariableName, content.join(''));
            }
            else {
                this.stream.goBackTo(offset);
            }
        }
        if (this.stream.advanceIfChars([_HSH, _CUL$1])) {
            return this.finishToken(offset, InterpolationFunction);
        }
        if (this.stream.advanceIfChars([_EQS, _EQS])) {
            return this.finishToken(offset, EqualsOperator);
        }
        if (this.stream.advanceIfChars([_BNG, _EQS])) {
            return this.finishToken(offset, NotEqualsOperator);
        }
        if (this.stream.advanceIfChar(_LAN)) {
            if (this.stream.advanceIfChar(_EQS)) {
                return this.finishToken(offset, SmallerEqualsOperator);
            }
            return this.finishToken(offset, TokenType.Delim);
        }
        if (this.stream.advanceIfChar(_RAN)) {
            if (this.stream.advanceIfChar(_EQS)) {
                return this.finishToken(offset, GreaterEqualsOperator);
            }
            return this.finishToken(offset, TokenType.Delim);
        }
        if (this.stream.advanceIfChars([_DOT$1, _DOT$1, _DOT$1])) {
            return this.finishToken(offset, Ellipsis$1);
        }
        return super.scanNext(offset);
    }
    comment() {
        if (super.comment()) {
            return true;
        }
        if (!this.inURL && this.stream.advanceIfChars([_FSL$1, _FSL$1])) {
            this.stream.advanceWhileChar((ch) => {
                switch (ch) {
                    case _NWL$1:
                    case _CAR$1:
                    case _LFD$1:
                        return false;
                    default:
                        return true;
                }
            });
            return true;
        }
        else {
            return false;
        }
    }
}

class SCSSIssueType {
    constructor(id, message) {
        this.id = id;
        this.message = message;
    }
}
const SCSSParseError = {
    FromExpected: new SCSSIssueType('scss-fromexpected', main$4.t("'from' expected")),
    ThroughOrToExpected: new SCSSIssueType('scss-throughexpected', main$4.t("'through' or 'to' expected")),
    InExpected: new SCSSIssueType('scss-fromexpected', main$4.t("'in' expected")),
};

class SCSSParser extends Parser {
    constructor() {
        super(new SCSSScanner());
    }
    _parseStylesheetStatement(isNested = false) {
        if (this.peek(TokenType.AtKeyword)) {
            return this._parseWarnAndDebug()
                || this._parseControlStatement()
                || this._parseMixinDeclaration()
                || this._parseMixinContent()
                || this._parseMixinReference()
                || this._parseFunctionDeclaration()
                || this._parseForward()
                || this._parseUse()
                || this._parseRuleset(isNested)
                || super._parseStylesheetAtStatement(isNested);
        }
        return this._parseRuleset(true) || this._parseVariableDeclaration();
    }
    _parseImport() {
        if (!this.peekKeyword('@import')) {
            return null;
        }
        const node = this.create(Import);
        this.consumeToken();
        if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
            return this.finish(node, ParseError.URIOrStringExpected);
        }
        while (this.accept(TokenType.Comma)) {
            if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
                return this.finish(node, ParseError.URIOrStringExpected);
            }
        }
        return this._completeParseImport(node);
    }
    _parseVariableDeclaration(panic = []) {
        if (!this.peek(VariableName)) {
            return null;
        }
        const node = this.create(VariableDeclaration);
        if (!node.setVariable(this._parseVariable())) {
            return null;
        }
        if (!this.accept(TokenType.Colon)) {
            return this.finish(node, ParseError.ColonExpected);
        }
        if (this.prevToken) {
            node.colonPosition = this.prevToken.offset;
        }
        if (!node.setValue(this._parseExpr())) {
            return this.finish(node, ParseError.VariableValueExpected, [], panic);
        }
        while (this.peek(TokenType.Exclamation)) {
            if (node.addChild(this._tryParsePrio())) ;
            else {
                this.consumeToken();
                if (!this.peekRegExp(TokenType.Ident, /^(default|global)$/)) {
                    return this.finish(node, ParseError.UnknownKeyword);
                }
                this.consumeToken();
            }
        }
        if (this.peek(TokenType.SemiColon)) {
            node.semicolonPosition = this.token.offset;
        }
        return this.finish(node);
    }
    _parseMediaCondition() {
        return this._parseInterpolation() || super._parseMediaCondition();
    }
    _parseMediaFeatureRangeOperator() {
        return this.accept(SmallerEqualsOperator) || this.accept(GreaterEqualsOperator) || super._parseMediaFeatureRangeOperator();
    }
    _parseMediaFeatureName() {
        return this._parseModuleMember()
            || this._parseFunction()
            || this._parseIdent()
            || this._parseVariable();
    }
    _parseKeyframeSelector() {
        return this._tryParseKeyframeSelector()
            || this._parseControlStatement(this._parseKeyframeSelector.bind(this))
            || this._parseWarnAndDebug()
            || this._parseMixinReference()
            || this._parseFunctionDeclaration()
            || this._parseVariableDeclaration()
            || this._parseMixinContent();
    }
    _parseVariable() {
        if (!this.peek(VariableName)) {
            return null;
        }
        const node = this.create(Variable);
        this.consumeToken();
        return node;
    }
    _parseModuleMember() {
        const pos = this.mark();
        const node = this.create(Module);
        if (!node.setIdentifier(this._parseIdent([ReferenceType.Module]))) {
            return null;
        }
        if (this.hasWhitespace()
            || !this.acceptDelim('.')
            || this.hasWhitespace()) {
            this.restoreAtMark(pos);
            return null;
        }
        if (!node.addChild(this._parseVariable() || this._parseFunction())) {
            return this.finish(node, ParseError.IdentifierOrVariableExpected);
        }
        return node;
    }
    _parseIdent(referenceTypes) {
        if (!this.peek(TokenType.Ident) && !this.peek(InterpolationFunction) && !this.peekDelim('-')) {
            return null;
        }
        const node = this.create(Identifier);
        node.referenceTypes = referenceTypes;
        node.isCustomProperty = this.peekRegExp(TokenType.Ident, /^--/);
        let hasContent = false;
        const indentInterpolation = () => {
            const pos = this.mark();
            if (this.acceptDelim('-')) {
                if (!this.hasWhitespace()) {
                    this.acceptDelim('-');
                }
                if (this.hasWhitespace()) {
                    this.restoreAtMark(pos);
                    return null;
                }
            }
            return this._parseInterpolation();
        };
        while (this.accept(TokenType.Ident) || node.addChild(indentInterpolation()) || (hasContent && this.acceptRegexp(/^[\w-]/))) {
            hasContent = true;
            if (this.hasWhitespace()) {
                break;
            }
        }
        return hasContent ? this.finish(node) : null;
    }
    _parseTermExpression() {
        return this._parseModuleMember() ||
            this._parseVariable() ||
            this._parseNestingSelector() ||
            super._parseTermExpression();
    }
    _parseInterpolation() {
        if (this.peek(InterpolationFunction)) {
            const node = this.create(Interpolation);
            this.consumeToken();
            if (!node.addChild(this._parseExpr()) && !this._parseNestingSelector()) {
                if (this.accept(TokenType.CurlyR)) {
                    return this.finish(node);
                }
                return this.finish(node, ParseError.ExpressionExpected);
            }
            if (!this.accept(TokenType.CurlyR)) {
                return this.finish(node, ParseError.RightCurlyExpected);
            }
            return this.finish(node);
        }
        return null;
    }
    _parseOperator() {
        if (this.peek(EqualsOperator) || this.peek(NotEqualsOperator)
            || this.peek(GreaterEqualsOperator) || this.peek(SmallerEqualsOperator)
            || this.peekDelim('>') || this.peekDelim('<')
            || this.peekIdent('and') || this.peekIdent('or')
            || this.peekDelim('%')) {
            const node = this.createNode(NodeType$1.Operator);
            this.consumeToken();
            return this.finish(node);
        }
        return super._parseOperator();
    }
    _parseUnaryOperator() {
        if (this.peekIdent('not')) {
            const node = this.create(Node);
            this.consumeToken();
            return this.finish(node);
        }
        return super._parseUnaryOperator();
    }
    _parseRuleSetDeclaration() {
        if (this.peek(TokenType.AtKeyword)) {
            return this._parseKeyframe()
                || this._parseImport()
                || this._parseMedia(true)
                || this._parseFontFace()
                || this._parseWarnAndDebug()
                || this._parseControlStatement()
                || this._parseFunctionDeclaration()
                || this._parseExtends()
                || this._parseMixinReference()
                || this._parseMixinContent()
                || this._parseMixinDeclaration()
                || this._parseRuleset(true)
                || this._parseSupports(true)
                || this._parseLayer()
                || this._parsePropertyAtRule()
                || this._parseContainer(true)
                || this._parseRuleSetDeclarationAtStatement();
        }
        return this._parseVariableDeclaration()
            || this._tryParseRuleset(true)
            || this._parseDeclaration();
    }
    _parseDeclaration(stopTokens) {
        const custonProperty = this._tryParseCustomPropertyDeclaration(stopTokens);
        if (custonProperty) {
            return custonProperty;
        }
        const node = this.create(Declaration);
        if (!node.setProperty(this._parseProperty())) {
            return null;
        }
        if (!this.accept(TokenType.Colon)) {
            return this.finish(node, ParseError.ColonExpected, [TokenType.Colon], stopTokens || [TokenType.SemiColon]);
        }
        if (this.prevToken) {
            node.colonPosition = this.prevToken.offset;
        }
        let hasContent = false;
        if (node.setValue(this._parseExpr())) {
            hasContent = true;
            node.addChild(this._parsePrio());
        }
        if (this.peek(TokenType.CurlyL)) {
            node.setNestedProperties(this._parseNestedProperties());
        }
        else {
            if (!hasContent) {
                return this.finish(node, ParseError.PropertyValueExpected);
            }
        }
        if (this.peek(TokenType.SemiColon)) {
            node.semicolonPosition = this.token.offset;
        }
        return this.finish(node);
    }
    _parseNestedProperties() {
        const node = this.create(NestedProperties);
        return this._parseBody(node, this._parseDeclaration.bind(this));
    }
    _parseExtends() {
        if (this.peekKeyword('@extend')) {
            const node = this.create(ExtendsReference);
            this.consumeToken();
            if (!node.getSelectors().addChild(this._parseSimpleSelector())) {
                return this.finish(node, ParseError.SelectorExpected);
            }
            while (this.accept(TokenType.Comma)) {
                node.getSelectors().addChild(this._parseSimpleSelector());
            }
            if (this.accept(TokenType.Exclamation)) {
                if (!this.acceptIdent('optional')) {
                    return this.finish(node, ParseError.UnknownKeyword);
                }
            }
            return this.finish(node);
        }
        return null;
    }
    _parseSimpleSelectorBody() {
        return this._parseSelectorPlaceholder() || super._parseSimpleSelectorBody();
    }
    _parseNestingSelector() {
        if (this.peekDelim('&')) {
            const node = this.createNode(NodeType$1.SelectorCombinator);
            this.consumeToken();
            while (!this.hasWhitespace() && (this.acceptDelim('-') || this.accept(TokenType.Num) || this.accept(TokenType.Dimension) || node.addChild(this._parseIdent()) || this.acceptDelim('&'))) {
            }
            return this.finish(node);
        }
        return null;
    }
    _parseSelectorPlaceholder() {
        if (this.peekDelim('%')) {
            const node = this.createNode(NodeType$1.SelectorPlaceholder);
            this.consumeToken();
            this._parseIdent();
            return this.finish(node);
        }
        else if (this.peekKeyword('@at-root')) {
            const node = this.createNode(NodeType$1.SelectorPlaceholder);
            this.consumeToken();
            if (this.accept(TokenType.ParenthesisL)) {
                if (!this.acceptIdent('with') && !this.acceptIdent('without')) {
                    return this.finish(node, ParseError.IdentifierExpected);
                }
                if (!this.accept(TokenType.Colon)) {
                    return this.finish(node, ParseError.ColonExpected);
                }
                if (!node.addChild(this._parseIdent())) {
                    return this.finish(node, ParseError.IdentifierExpected);
                }
                if (!this.accept(TokenType.ParenthesisR)) {
                    return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.CurlyR]);
                }
            }
            return this.finish(node);
        }
        return null;
    }
    _parseElementName() {
        const pos = this.mark();
        const node = super._parseElementName();
        if (node && !this.hasWhitespace() && this.peek(TokenType.ParenthesisL)) {
            this.restoreAtMark(pos);
            return null;
        }
        return node;
    }
    _tryParsePseudoIdentifier() {
        return this._parseInterpolation() || super._tryParsePseudoIdentifier();
    }
    _parseWarnAndDebug() {
        if (!this.peekKeyword('@debug')
            && !this.peekKeyword('@warn')
            && !this.peekKeyword('@error')) {
            return null;
        }
        const node = this.createNode(NodeType$1.Debug);
        this.consumeToken();
        node.addChild(this._parseExpr());
        return this.finish(node);
    }
    _parseControlStatement(parseStatement = this._parseRuleSetDeclaration.bind(this)) {
        if (!this.peek(TokenType.AtKeyword)) {
            return null;
        }
        return this._parseIfStatement(parseStatement) || this._parseForStatement(parseStatement)
            || this._parseEachStatement(parseStatement) || this._parseWhileStatement(parseStatement);
    }
    _parseIfStatement(parseStatement) {
        if (!this.peekKeyword('@if')) {
            return null;
        }
        return this._internalParseIfStatement(parseStatement);
    }
    _internalParseIfStatement(parseStatement) {
        const node = this.create(IfStatement);
        this.consumeToken();
        if (!node.setExpression(this._parseExpr(true))) {
            return this.finish(node, ParseError.ExpressionExpected);
        }
        this._parseBody(node, parseStatement);
        if (this.acceptKeyword('@else')) {
            if (this.peekIdent('if')) {
                node.setElseClause(this._internalParseIfStatement(parseStatement));
            }
            else if (this.peek(TokenType.CurlyL)) {
                const elseNode = this.create(ElseStatement);
                this._parseBody(elseNode, parseStatement);
                node.setElseClause(elseNode);
            }
        }
        return this.finish(node);
    }
    _parseForStatement(parseStatement) {
        if (!this.peekKeyword('@for')) {
            return null;
        }
        const node = this.create(ForStatement);
        this.consumeToken();
        if (!node.setVariable(this._parseVariable())) {
            return this.finish(node, ParseError.VariableNameExpected, [TokenType.CurlyR]);
        }
        if (!this.acceptIdent('from')) {
            return this.finish(node, SCSSParseError.FromExpected, [TokenType.CurlyR]);
        }
        if (!node.addChild(this._parseBinaryExpr())) {
            return this.finish(node, ParseError.ExpressionExpected, [TokenType.CurlyR]);
        }
        if (!this.acceptIdent('to') && !this.acceptIdent('through')) {
            return this.finish(node, SCSSParseError.ThroughOrToExpected, [TokenType.CurlyR]);
        }
        if (!node.addChild(this._parseBinaryExpr())) {
            return this.finish(node, ParseError.ExpressionExpected, [TokenType.CurlyR]);
        }
        return this._parseBody(node, parseStatement);
    }
    _parseEachStatement(parseStatement) {
        if (!this.peekKeyword('@each')) {
            return null;
        }
        const node = this.create(EachStatement);
        this.consumeToken();
        const variables = node.getVariables();
        if (!variables.addChild(this._parseVariable())) {
            return this.finish(node, ParseError.VariableNameExpected, [TokenType.CurlyR]);
        }
        while (this.accept(TokenType.Comma)) {
            if (!variables.addChild(this._parseVariable())) {
                return this.finish(node, ParseError.VariableNameExpected, [TokenType.CurlyR]);
            }
        }
        this.finish(variables);
        if (!this.acceptIdent('in')) {
            return this.finish(node, SCSSParseError.InExpected, [TokenType.CurlyR]);
        }
        if (!node.addChild(this._parseExpr())) {
            return this.finish(node, ParseError.ExpressionExpected, [TokenType.CurlyR]);
        }
        return this._parseBody(node, parseStatement);
    }
    _parseWhileStatement(parseStatement) {
        if (!this.peekKeyword('@while')) {
            return null;
        }
        const node = this.create(WhileStatement);
        this.consumeToken();
        if (!node.addChild(this._parseBinaryExpr())) {
            return this.finish(node, ParseError.ExpressionExpected, [TokenType.CurlyR]);
        }
        return this._parseBody(node, parseStatement);
    }
    _parseFunctionBodyDeclaration() {
        return this._parseVariableDeclaration() || this._parseReturnStatement() || this._parseWarnAndDebug()
            || this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this));
    }
    _parseFunctionDeclaration() {
        if (!this.peekKeyword('@function')) {
            return null;
        }
        const node = this.create(FunctionDeclaration);
        this.consumeToken();
        if (!node.setIdentifier(this._parseIdent([ReferenceType.Function]))) {
            return this.finish(node, ParseError.IdentifierExpected, [TokenType.CurlyR]);
        }
        if (!this.accept(TokenType.ParenthesisL)) {
            return this.finish(node, ParseError.LeftParenthesisExpected, [TokenType.CurlyR]);
        }
        if (node.getParameters().addChild(this._parseParameterDeclaration())) {
            while (this.accept(TokenType.Comma)) {
                if (this.peek(TokenType.ParenthesisR)) {
                    break;
                }
                if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
                    return this.finish(node, ParseError.VariableNameExpected);
                }
            }
        }
        if (!this.accept(TokenType.ParenthesisR)) {
            return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.CurlyR]);
        }
        return this._parseBody(node, this._parseFunctionBodyDeclaration.bind(this));
    }
    _parseReturnStatement() {
        if (!this.peekKeyword('@return')) {
            return null;
        }
        const node = this.createNode(NodeType$1.ReturnStatement);
        this.consumeToken();
        if (!node.addChild(this._parseExpr())) {
            return this.finish(node, ParseError.ExpressionExpected);
        }
        return this.finish(node);
    }
    _parseMixinDeclaration() {
        if (!this.peekKeyword('@mixin')) {
            return null;
        }
        const node = this.create(MixinDeclaration);
        this.consumeToken();
        if (!node.setIdentifier(this._parseIdent([ReferenceType.Mixin]))) {
            return this.finish(node, ParseError.IdentifierExpected, [TokenType.CurlyR]);
        }
        if (this.accept(TokenType.ParenthesisL)) {
            if (node.getParameters().addChild(this._parseParameterDeclaration())) {
                while (this.accept(TokenType.Comma)) {
                    if (this.peek(TokenType.ParenthesisR)) {
                        break;
                    }
                    if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
                        return this.finish(node, ParseError.VariableNameExpected);
                    }
                }
            }
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.CurlyR]);
            }
        }
        return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
    }
    _parseParameterDeclaration() {
        const node = this.create(FunctionParameter);
        if (!node.setIdentifier(this._parseVariable())) {
            return null;
        }
        if (this.accept(Ellipsis$1)) ;
        if (this.accept(TokenType.Colon)) {
            if (!node.setDefaultValue(this._parseExpr(true))) {
                return this.finish(node, ParseError.VariableValueExpected, [], [TokenType.Comma, TokenType.ParenthesisR]);
            }
        }
        return this.finish(node);
    }
    _parseMixinContent() {
        if (!this.peekKeyword('@content')) {
            return null;
        }
        const node = this.create(MixinContentReference);
        this.consumeToken();
        if (this.accept(TokenType.ParenthesisL)) {
            if (node.getArguments().addChild(this._parseFunctionArgument())) {
                while (this.accept(TokenType.Comma)) {
                    if (this.peek(TokenType.ParenthesisR)) {
                        break;
                    }
                    if (!node.getArguments().addChild(this._parseFunctionArgument())) {
                        return this.finish(node, ParseError.ExpressionExpected);
                    }
                }
            }
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected);
            }
        }
        return this.finish(node);
    }
    _parseMixinReference() {
        if (!this.peekKeyword('@include')) {
            return null;
        }
        const node = this.create(MixinReference);
        this.consumeToken();
        const firstIdent = this._parseIdent([ReferenceType.Mixin]);
        if (!node.setIdentifier(firstIdent)) {
            return this.finish(node, ParseError.IdentifierExpected, [TokenType.CurlyR]);
        }
        if (!this.hasWhitespace() && this.acceptDelim('.') && !this.hasWhitespace()) {
            const secondIdent = this._parseIdent([ReferenceType.Mixin]);
            if (!secondIdent) {
                return this.finish(node, ParseError.IdentifierExpected, [TokenType.CurlyR]);
            }
            const moduleToken = this.create(Module);
            firstIdent.referenceTypes = [ReferenceType.Module];
            moduleToken.setIdentifier(firstIdent);
            node.setIdentifier(secondIdent);
            node.addChild(moduleToken);
        }
        if (this.accept(TokenType.ParenthesisL)) {
            if (node.getArguments().addChild(this._parseFunctionArgument())) {
                while (this.accept(TokenType.Comma)) {
                    if (this.peek(TokenType.ParenthesisR)) {
                        break;
                    }
                    if (!node.getArguments().addChild(this._parseFunctionArgument())) {
                        return this.finish(node, ParseError.ExpressionExpected);
                    }
                }
            }
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected);
            }
        }
        if (this.peekIdent('using') || this.peek(TokenType.CurlyL)) {
            node.setContent(this._parseMixinContentDeclaration());
        }
        return this.finish(node);
    }
    _parseMixinContentDeclaration() {
        const node = this.create(MixinContentDeclaration);
        if (this.acceptIdent('using')) {
            if (!this.accept(TokenType.ParenthesisL)) {
                return this.finish(node, ParseError.LeftParenthesisExpected, [TokenType.CurlyL]);
            }
            if (node.getParameters().addChild(this._parseParameterDeclaration())) {
                while (this.accept(TokenType.Comma)) {
                    if (this.peek(TokenType.ParenthesisR)) {
                        break;
                    }
                    if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
                        return this.finish(node, ParseError.VariableNameExpected);
                    }
                }
            }
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.CurlyL]);
            }
        }
        if (this.peek(TokenType.CurlyL)) {
            this._parseBody(node, this._parseMixinReferenceBodyStatement.bind(this));
        }
        return this.finish(node);
    }
    _parseMixinReferenceBodyStatement() {
        return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration();
    }
    _parseFunctionArgument() {
        const node = this.create(FunctionArgument);
        const pos = this.mark();
        const argument = this._parseVariable();
        if (argument) {
            if (!this.accept(TokenType.Colon)) {
                if (this.accept(Ellipsis$1)) {
                    node.setValue(argument);
                    return this.finish(node);
                }
                else {
                    this.restoreAtMark(pos);
                }
            }
            else {
                node.setIdentifier(argument);
            }
        }
        if (node.setValue(this._parseExpr(true))) {
            this.accept(Ellipsis$1);
            node.addChild(this._parsePrio());
            return this.finish(node);
        }
        else if (node.setValue(this._tryParsePrio())) {
            return this.finish(node);
        }
        return null;
    }
    _parseURLArgument() {
        const pos = this.mark();
        const node = super._parseURLArgument();
        if (!node || !this.peek(TokenType.ParenthesisR)) {
            this.restoreAtMark(pos);
            const node = this.create(Node);
            node.addChild(this._parseBinaryExpr());
            return this.finish(node);
        }
        return node;
    }
    _parseOperation() {
        if (!this.peek(TokenType.ParenthesisL)) {
            return null;
        }
        const node = this.create(Node);
        this.consumeToken();
        while (node.addChild(this._parseListElement())) {
            this.accept(TokenType.Comma);
        }
        if (!this.accept(TokenType.ParenthesisR)) {
            return this.finish(node, ParseError.RightParenthesisExpected);
        }
        return this.finish(node);
    }
    _parseListElement() {
        const node = this.create(ListEntry);
        const child = this._parseBinaryExpr();
        if (!child) {
            return null;
        }
        if (this.accept(TokenType.Colon)) {
            node.setKey(child);
            if (!node.setValue(this._parseBinaryExpr())) {
                return this.finish(node, ParseError.ExpressionExpected);
            }
        }
        else {
            node.setValue(child);
        }
        return this.finish(node);
    }
    _parseUse() {
        if (!this.peekKeyword('@use')) {
            return null;
        }
        const node = this.create(Use);
        this.consumeToken();
        if (!node.addChild(this._parseStringLiteral())) {
            return this.finish(node, ParseError.StringLiteralExpected);
        }
        if (!this.peek(TokenType.SemiColon) && !this.peek(TokenType.EOF)) {
            if (!this.peekRegExp(TokenType.Ident, /as|with/)) {
                return this.finish(node, ParseError.UnknownKeyword);
            }
            if (this.acceptIdent('as') &&
                (!node.setIdentifier(this._parseIdent([ReferenceType.Module])) && !this.acceptDelim('*'))) {
                return this.finish(node, ParseError.IdentifierOrWildcardExpected);
            }
            if (this.acceptIdent('with')) {
                if (!node.setParameters(this._parseModuleConfig())) {
                    return this.finish(node, ParseError.LeftParenthesisExpected, [TokenType.ParenthesisR]);
                }
            }
        }
        if (!this.accept(TokenType.SemiColon) && !this.accept(TokenType.EOF)) {
            return this.finish(node, ParseError.SemiColonExpected);
        }
        return this.finish(node);
    }
    _parseModuleConfig() {
        const node = this.createNode(NodeType$1.ModuleConfig);
        if (!this.accept(TokenType.ParenthesisL)) {
            return null;
        }
        if (!node.addChild(this._parseModuleConfigDeclaration())) {
            return this.finish(node, ParseError.VariableNameExpected);
        }
        while (this.accept(TokenType.Comma)) {
            if (this.peek(TokenType.ParenthesisR)) {
                break;
            }
            if (!node.addChild(this._parseModuleConfigDeclaration())) {
                return this.finish(node, ParseError.VariableNameExpected);
            }
        }
        if (!this.accept(TokenType.ParenthesisR)) {
            return this.finish(node, ParseError.RightParenthesisExpected);
        }
        return this.finish(node);
    }
    _parseModuleConfigDeclaration() {
        const node = this.create(ModuleConfiguration);
        if (!node.setIdentifier(this._parseVariable())) {
            return null;
        }
        if (!this.accept(TokenType.Colon) || !node.setValue(this._parseExpr(true))) {
            return this.finish(node, ParseError.VariableValueExpected, [], [TokenType.Comma, TokenType.ParenthesisR]);
        }
        if (this.accept(TokenType.Exclamation)) {
            if (this.hasWhitespace() || !this.acceptIdent('default')) {
                return this.finish(node, ParseError.UnknownKeyword);
            }
        }
        return this.finish(node);
    }
    _parseForward() {
        if (!this.peekKeyword('@forward')) {
            return null;
        }
        const node = this.create(Forward);
        this.consumeToken();
        if (!node.addChild(this._parseStringLiteral())) {
            return this.finish(node, ParseError.StringLiteralExpected);
        }
        if (this.acceptIdent('as')) {
            const identifier = this._parseIdent([ReferenceType.Forward]);
            if (!node.setIdentifier(identifier)) {
                return this.finish(node, ParseError.IdentifierExpected);
            }
            if (this.hasWhitespace() || !this.acceptDelim('*')) {
                return this.finish(node, ParseError.WildcardExpected);
            }
        }
        if (this.acceptIdent('with')) {
            if (!node.setParameters(this._parseModuleConfig())) {
                return this.finish(node, ParseError.LeftParenthesisExpected, [TokenType.ParenthesisR]);
            }
        }
        else if (this.peekIdent('hide') || this.peekIdent('show')) {
            if (!node.addChild(this._parseForwardVisibility())) {
                return this.finish(node, ParseError.IdentifierOrVariableExpected);
            }
        }
        if (!this.accept(TokenType.SemiColon) && !this.accept(TokenType.EOF)) {
            return this.finish(node, ParseError.SemiColonExpected);
        }
        return this.finish(node);
    }
    _parseForwardVisibility() {
        const node = this.create(ForwardVisibility);
        node.setIdentifier(this._parseIdent());
        while (node.addChild(this._parseVariable() || this._parseIdent())) {
            this.accept(TokenType.Comma);
        }
        return node.getChildren().length > 1 ? node : null;
    }
    _parseSupportsCondition() {
        return this._parseInterpolation() || super._parseSupportsCondition();
    }
}

const sassDocumentationName = main$4.t('Sass documentation');
class SCSSCompletion extends CSSCompletion {
    constructor(lsServiceOptions, cssDataManager) {
        super('$', lsServiceOptions, cssDataManager);
        addReferencesToDocumentation(SCSSCompletion.scssModuleLoaders);
        addReferencesToDocumentation(SCSSCompletion.scssModuleBuiltIns);
    }
    isImportPathParent(type) {
        return type === NodeType$1.Forward
            || type === NodeType$1.Use
            || super.isImportPathParent(type);
    }
    getCompletionForImportPath(importPathNode, result) {
        const parentType = importPathNode.getParent().type;
        if (parentType === NodeType$1.Forward || parentType === NodeType$1.Use) {
            for (let p of SCSSCompletion.scssModuleBuiltIns) {
                const item = {
                    label: p.label,
                    documentation: p.documentation,
                    textEdit: TextEdit$1.replace(this.getCompletionRange(importPathNode), `'${p.label}'`),
                    kind: CompletionItemKind$1.Module
                };
                result.items.push(item);
            }
        }
        return super.getCompletionForImportPath(importPathNode, result);
    }
    createReplaceFunction() {
        let tabStopCounter = 1;
        return (_match, p1) => {
            return '\\' + p1 + ': ${' + tabStopCounter++ + ':' + (SCSSCompletion.variableDefaults[p1] || '') + '}';
        };
    }
    createFunctionProposals(proposals, existingNode, sortToEnd, result) {
        for (const p of proposals) {
            const insertText = p.func.replace(/\[?(\$\w+)\]?/g, this.createReplaceFunction());
            const label = p.func.substr(0, p.func.indexOf('('));
            const item = {
                label: label,
                detail: p.func,
                documentation: p.desc,
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), insertText),
                insertTextFormat: InsertTextFormat$1.Snippet,
                kind: CompletionItemKind$1.Function
            };
            if (sortToEnd) {
                item.sortText = 'z';
            }
            result.items.push(item);
        }
        return result;
    }
    getCompletionsForSelector(ruleSet, isNested, result) {
        this.createFunctionProposals(SCSSCompletion.selectorFuncs, null, true, result);
        return super.getCompletionsForSelector(ruleSet, isNested, result);
    }
    getTermProposals(entry, existingNode, result) {
        let functions = SCSSCompletion.builtInFuncs;
        if (entry) {
            functions = functions.filter(f => !f.type || !entry.restrictions || entry.restrictions.indexOf(f.type) !== -1);
        }
        this.createFunctionProposals(functions, existingNode, true, result);
        return super.getTermProposals(entry, existingNode, result);
    }
    getColorProposals(entry, existingNode, result) {
        this.createFunctionProposals(SCSSCompletion.colorProposals, existingNode, false, result);
        return super.getColorProposals(entry, existingNode, result);
    }
    getCompletionsForDeclarationProperty(declaration, result) {
        this.getCompletionForAtDirectives(result);
        this.getCompletionsForSelector(null, true, result);
        return super.getCompletionsForDeclarationProperty(declaration, result);
    }
    getCompletionsForExtendsReference(_extendsRef, existingNode, result) {
        const symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, ReferenceType.Rule);
        for (const symbol of symbols) {
            const suggest = {
                label: symbol.name,
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), symbol.name),
                kind: CompletionItemKind$1.Function,
            };
            result.items.push(suggest);
        }
        return result;
    }
    getCompletionForAtDirectives(result) {
        result.items.push(...SCSSCompletion.scssAtDirectives);
        return result;
    }
    getCompletionForTopLevel(result) {
        this.getCompletionForAtDirectives(result);
        this.getCompletionForModuleLoaders(result);
        super.getCompletionForTopLevel(result);
        return result;
    }
    getCompletionForModuleLoaders(result) {
        result.items.push(...SCSSCompletion.scssModuleLoaders);
        return result;
    }
}
SCSSCompletion.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'
};
SCSSCompletion.colorProposals = [
    { func: 'red($color)', desc: main$4.t('Gets the red component of a color.') },
    { func: 'green($color)', desc: main$4.t('Gets the green component of a color.') },
    { func: 'blue($color)', desc: main$4.t('Gets the blue component of a color.') },
    { func: 'mix($color, $color, [$weight])', desc: main$4.t('Mixes two colors together.') },
    { func: 'hue($color)', desc: main$4.t('Gets the hue component of a color.') },
    { func: 'saturation($color)', desc: main$4.t('Gets the saturation component of a color.') },
    { func: 'lightness($color)', desc: main$4.t('Gets the lightness component of a color.') },
    { func: 'adjust-hue($color, $degrees)', desc: main$4.t('Changes the hue of a color.') },
    { func: 'lighten($color, $amount)', desc: main$4.t('Makes a color lighter.') },
    { func: 'darken($color, $amount)', desc: main$4.t('Makes a color darker.') },
    { func: 'saturate($color, $amount)', desc: main$4.t('Makes a color more saturated.') },
    { func: 'desaturate($color, $amount)', desc: main$4.t('Makes a color less saturated.') },
    { func: 'grayscale($color)', desc: main$4.t('Converts a color to grayscale.') },
    { func: 'complement($color)', desc: main$4.t('Returns the complement of a color.') },
    { func: 'invert($color)', desc: main$4.t('Returns the inverse of a color.') },
    { func: 'alpha($color)', desc: main$4.t('Gets the opacity component of a color.') },
    { func: 'opacity($color)', desc: 'Gets the alpha component (opacity) of a color.' },
    { func: 'rgba($color, $alpha)', desc: main$4.t('Changes the alpha component for a color.') },
    { func: 'opacify($color, $amount)', desc: main$4.t('Makes a color more opaque.') },
    { func: 'fade-in($color, $amount)', desc: main$4.t('Makes a color more opaque.') },
    { func: 'transparentize($color, $amount)', desc: main$4.t('Makes a color more transparent.') },
    { func: 'fade-out($color, $amount)', desc: main$4.t('Makes a color more transparent.') },
    { func: 'adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])', desc: main$4.t('Increases or decreases one or more components of a color.') },
    { func: 'scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])', desc: main$4.t('Fluidly scales one or more properties of a color.') },
    { func: 'change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])', desc: main$4.t('Changes one or more properties of a color.') },
    { func: 'ie-hex-str($color)', desc: main$4.t('Converts a color into the format understood by IE filters.') }
];
SCSSCompletion.selectorFuncs = [
    { func: 'selector-nest($selectors…)', desc: main$4.t('Nests selector beneath one another like they would be nested in the stylesheet.') },
    { func: 'selector-append($selectors…)', desc: main$4.t('Appends selectors to one another without spaces in between.') },
    { func: 'selector-extend($selector, $extendee, $extender)', desc: main$4.t('Extends $extendee with $extender within $selector.') },
    { func: 'selector-replace($selector, $original, $replacement)', desc: main$4.t('Replaces $original with $replacement within $selector.') },
    { func: 'selector-unify($selector1, $selector2)', desc: main$4.t('Unifies two selectors to produce a selector that matches elements matched by both.') },
    { func: 'is-superselector($super, $sub)', desc: main$4.t('Returns whether $super matches all the elements $sub does, and possibly more.') },
    { func: 'simple-selectors($selector)', desc: main$4.t('Returns the simple selectors that comprise a compound selector.') },
    { func: 'selector-parse($selector)', desc: main$4.t('Parses a selector into the format returned by &.') }
];
SCSSCompletion.builtInFuncs = [
    { func: 'unquote($string)', desc: main$4.t('Removes quotes from a string.') },
    { func: 'quote($string)', desc: main$4.t('Adds quotes to a string.') },
    { func: 'str-length($string)', desc: main$4.t('Returns the number of characters in a string.') },
    { func: 'str-insert($string, $insert, $index)', desc: main$4.t('Inserts $insert into $string at $index.') },
    { func: 'str-index($string, $substring)', desc: main$4.t('Returns the index of the first occurance of $substring in $string.') },
    { func: 'str-slice($string, $start-at, [$end-at])', desc: main$4.t('Extracts a substring from $string.') },
    { func: 'to-upper-case($string)', desc: main$4.t('Converts a string to upper case.') },
    { func: 'to-lower-case($string)', desc: main$4.t('Converts a string to lower case.') },
    { func: 'percentage($number)', desc: main$4.t('Converts a unitless number to a percentage.'), type: 'percentage' },
    { func: 'round($number)', desc: main$4.t('Rounds a number to the nearest whole number.') },
    { func: 'ceil($number)', desc: main$4.t('Rounds a number up to the next whole number.') },
    { func: 'floor($number)', desc: main$4.t('Rounds a number down to the previous whole number.') },
    { func: 'abs($number)', desc: main$4.t('Returns the absolute value of a number.') },
    { func: 'min($numbers)', desc: main$4.t('Finds the minimum of several numbers.') },
    { func: 'max($numbers)', desc: main$4.t('Finds the maximum of several numbers.') },
    { func: 'random([$limit])', desc: main$4.t('Returns a random number.') },
    { func: 'length($list)', desc: main$4.t('Returns the length of a list.') },
    { func: 'nth($list, $n)', desc: main$4.t('Returns a specific item in a list.') },
    { func: 'set-nth($list, $n, $value)', desc: main$4.t('Replaces the nth item in a list.') },
    { func: 'join($list1, $list2, [$separator])', desc: main$4.t('Joins together two lists into one.') },
    { func: 'append($list1, $val, [$separator])', desc: main$4.t('Appends a single value onto the end of a list.') },
    { func: 'zip($lists)', desc: main$4.t('Combines several lists into a single multidimensional list.') },
    { func: 'index($list, $value)', desc: main$4.t('Returns the position of a value within a list.') },
    { func: 'list-separator(#list)', desc: main$4.t('Returns the separator of a list.') },
    { func: 'map-get($map, $key)', desc: main$4.t('Returns the value in a map associated with a given key.') },
    { func: 'map-merge($map1, $map2)', desc: main$4.t('Merges two maps together into a new map.') },
    { func: 'map-remove($map, $keys)', desc: main$4.t('Returns a new map with keys removed.') },
    { func: 'map-keys($map)', desc: main$4.t('Returns a list of all keys in a map.') },
    { func: 'map-values($map)', desc: main$4.t('Returns a list of all values in a map.') },
    { func: 'map-has-key($map, $key)', desc: main$4.t('Returns whether a map has a value associated with a given key.') },
    { func: 'keywords($args)', desc: main$4.t('Returns the keywords passed to a function that takes variable arguments.') },
    { func: 'feature-exists($feature)', desc: main$4.t('Returns whether a feature exists in the current Sass runtime.') },
    { func: 'variable-exists($name)', desc: main$4.t('Returns whether a variable with the given name exists in the current scope.') },
    { func: 'global-variable-exists($name)', desc: main$4.t('Returns whether a variable with the given name exists in the global scope.') },
    { func: 'function-exists($name)', desc: main$4.t('Returns whether a function with the given name exists.') },
    { func: 'mixin-exists($name)', desc: main$4.t('Returns whether a mixin with the given name exists.') },
    { func: 'inspect($value)', desc: main$4.t('Returns the string representation of a value as it would be represented in Sass.') },
    { func: 'type-of($value)', desc: main$4.t('Returns the type of a value.') },
    { func: 'unit($number)', desc: main$4.t('Returns the unit(s) associated with a number.') },
    { func: 'unitless($number)', desc: main$4.t('Returns whether a number has units.') },
    { func: 'comparable($number1, $number2)', desc: main$4.t('Returns whether two numbers can be added, subtracted, or compared.') },
    { func: 'call($name, $args…)', desc: main$4.t('Dynamically calls a Sass function.') }
];
SCSSCompletion.scssAtDirectives = [
    {
        label: "@extend",
        documentation: main$4.t("Inherits the styles of another selector."),
        kind: CompletionItemKind$1.Keyword
    },
    {
        label: "@at-root",
        documentation: main$4.t("Causes one or more rules to be emitted at the root of the document."),
        kind: CompletionItemKind$1.Keyword
    },
    {
        label: "@debug",
        documentation: main$4.t("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),
        kind: CompletionItemKind$1.Keyword
    },
    {
        label: "@warn",
        documentation: main$4.t("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: CompletionItemKind$1.Keyword
    },
    {
        label: "@error",
        documentation: main$4.t("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),
        kind: CompletionItemKind$1.Keyword
    },
    {
        label: "@if",
        documentation: main$4.t("Includes the body if the expression does not evaluate to `false` or `null`."),
        insertText: "@if ${1:expr} {\n\t$0\n}",
        insertTextFormat: InsertTextFormat$1.Snippet,
        kind: CompletionItemKind$1.Keyword
    },
    {
        label: "@for",
        documentation: main$4.t("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\t$0\n}",
        insertTextFormat: InsertTextFormat$1.Snippet,
        kind: CompletionItemKind$1.Keyword
    },
    {
        label: "@each",
        documentation: main$4.t("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\t$0\n}",
        insertTextFormat: InsertTextFormat$1.Snippet,
        kind: CompletionItemKind$1.Keyword
    },
    {
        label: "@while",
        documentation: main$4.t("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),
        insertText: "@while ${1:condition} {\n\t$0\n}",
        insertTextFormat: InsertTextFormat$1.Snippet,
        kind: CompletionItemKind$1.Keyword
    },
    {
        label: "@mixin",
        documentation: main$4.t("Defines styles that can be re-used throughout the stylesheet with `@include`."),
        insertText: "@mixin ${1:name} {\n\t$0\n}",
        insertTextFormat: InsertTextFormat$1.Snippet,
        kind: CompletionItemKind$1.Keyword
    },
    {
        label: "@include",
        documentation: main$4.t("Includes the styles defined by another mixin into the current rule."),
        kind: CompletionItemKind$1.Keyword
    },
    {
        label: "@function",
        documentation: main$4.t("Defines complex operations that can be re-used throughout stylesheets."),
        kind: CompletionItemKind$1.Keyword
    }
];
SCSSCompletion.scssModuleLoaders = [
    {
        label: "@use",
        documentation: main$4.t("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),
        references: [{ name: sassDocumentationName, url: 'https://sass-lang.com/documentation/at-rules/use' }],
        insertText: "@use $0;",
        insertTextFormat: InsertTextFormat$1.Snippet,
        kind: CompletionItemKind$1.Keyword
    },
    {
        label: "@forward",
        documentation: main$4.t("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),
        references: [{ name: sassDocumentationName, url: 'https://sass-lang.com/documentation/at-rules/forward' }],
        insertText: "@forward $0;",
        insertTextFormat: InsertTextFormat$1.Snippet,
        kind: CompletionItemKind$1.Keyword
    },
];
SCSSCompletion.scssModuleBuiltIns = [
    {
        label: 'sass:math',
        documentation: main$4.t('Provides functions that operate on numbers.'),
        references: [{ name: sassDocumentationName, url: 'https://sass-lang.com/documentation/modules/math' }]
    },
    {
        label: 'sass:string',
        documentation: main$4.t('Makes it easy to combine, search, or split apart strings.'),
        references: [{ name: sassDocumentationName, url: 'https://sass-lang.com/documentation/modules/string' }]
    },
    {
        label: 'sass:color',
        documentation: main$4.t('Generates new colors based on existing ones, making it easy to build color themes.'),
        references: [{ name: sassDocumentationName, url: 'https://sass-lang.com/documentation/modules/color' }]
    },
    {
        label: 'sass:list',
        documentation: main$4.t('Lets you access and modify values in lists.'),
        references: [{ name: sassDocumentationName, url: 'https://sass-lang.com/documentation/modules/list' }]
    },
    {
        label: 'sass:map',
        documentation: main$4.t('Makes it possible to look up the value associated with a key in a map, and much more.'),
        references: [{ name: sassDocumentationName, url: 'https://sass-lang.com/documentation/modules/map' }]
    },
    {
        label: 'sass:selector',
        documentation: main$4.t('Provides access to Sass’s powerful selector engine.'),
        references: [{ name: sassDocumentationName, url: 'https://sass-lang.com/documentation/modules/selector' }]
    },
    {
        label: 'sass:meta',
        documentation: main$4.t('Exposes the details of Sass’s inner workings.'),
        references: [{ name: sassDocumentationName, url: 'https://sass-lang.com/documentation/modules/meta' }]
    },
];
function addReferencesToDocumentation(items) {
    items.forEach(i => {
        if (i.documentation && i.references && i.references.length > 0) {
            const markdownDoc = typeof i.documentation === 'string'
                ? { kind: 'markdown', value: i.documentation }
                : { kind: 'markdown', value: i.documentation.value };
            markdownDoc.value += '\n\n';
            markdownDoc.value += i.references
                .map(r => {
                return `[${r.name}](${r.url})`;
            })
                .join(' | ');
            i.documentation = markdownDoc;
        }
    });
}

const _FSL = '/'.charCodeAt(0);
const _NWL = '\n'.charCodeAt(0);
const _CAR = '\r'.charCodeAt(0);
const _LFD = '\f'.charCodeAt(0);
const _TIC = '`'.charCodeAt(0);
const _DOT = '.'.charCodeAt(0);
let customTokenValue = TokenType.CustomToken;
const Ellipsis = customTokenValue++;
class LESSScanner extends Scanner {
    scanNext(offset) {
        const tokenType = this.escapedJavaScript();
        if (tokenType !== null) {
            return this.finishToken(offset, tokenType);
        }
        if (this.stream.advanceIfChars([_DOT, _DOT, _DOT])) {
            return this.finishToken(offset, Ellipsis);
        }
        return super.scanNext(offset);
    }
    comment() {
        if (super.comment()) {
            return true;
        }
        if (!this.inURL && this.stream.advanceIfChars([_FSL, _FSL])) {
            this.stream.advanceWhileChar((ch) => {
                switch (ch) {
                    case _NWL:
                    case _CAR:
                    case _LFD:
                        return false;
                    default:
                        return true;
                }
            });
            return true;
        }
        else {
            return false;
        }
    }
    escapedJavaScript() {
        const ch = this.stream.peekChar();
        if (ch === _TIC) {
            this.stream.advance(1);
            this.stream.advanceWhileChar((ch) => { return ch !== _TIC; });
            return this.stream.advanceIfChar(_TIC) ? TokenType.EscapedJavaScript : TokenType.BadEscapedJavaScript;
        }
        return null;
    }
}

class LESSParser extends Parser {
    constructor() {
        super(new LESSScanner());
    }
    _parseStylesheetStatement(isNested = false) {
        if (this.peek(TokenType.AtKeyword)) {
            return this._parseVariableDeclaration()
                || this._parsePlugin()
                || super._parseStylesheetAtStatement(isNested);
        }
        return this._tryParseMixinDeclaration()
            || this._tryParseMixinReference()
            || this._parseFunction()
            || this._parseRuleset(true);
    }
    _parseImport() {
        if (!this.peekKeyword('@import') && !this.peekKeyword('@import-once') ) {
            return null;
        }
        const node = this.create(Import);
        this.consumeToken();
        if (this.accept(TokenType.ParenthesisL)) {
            if (!this.accept(TokenType.Ident)) {
                return this.finish(node, ParseError.IdentifierExpected, [TokenType.SemiColon]);
            }
            do {
                if (!this.accept(TokenType.Comma)) {
                    break;
                }
            } while (this.accept(TokenType.Ident));
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected, [TokenType.SemiColon]);
            }
        }
        if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
            return this.finish(node, ParseError.URIOrStringExpected, [TokenType.SemiColon]);
        }
        if (!this.peek(TokenType.SemiColon) && !this.peek(TokenType.EOF)) {
            node.setMedialist(this._parseMediaQueryList());
        }
        return this._completeParseImport(node);
    }
    _parsePlugin() {
        if (!this.peekKeyword('@plugin')) {
            return null;
        }
        const node = this.createNode(NodeType$1.Plugin);
        this.consumeToken();
        if (!node.addChild(this._parseStringLiteral())) {
            return this.finish(node, ParseError.StringLiteralExpected);
        }
        if (!this.accept(TokenType.SemiColon)) {
            return this.finish(node, ParseError.SemiColonExpected);
        }
        return this.finish(node);
    }
    _parseMediaQuery() {
        const node = super._parseMediaQuery();
        if (!node) {
            const node = this.create(MediaQuery);
            if (node.addChild(this._parseVariable())) {
                return this.finish(node);
            }
            return null;
        }
        return node;
    }
    _parseMediaDeclaration(isNested = false) {
        return this._tryParseRuleset(isNested)
            || this._tryToParseDeclaration()
            || this._tryParseMixinDeclaration()
            || this._tryParseMixinReference()
            || this._parseDetachedRuleSetMixin()
            || this._parseStylesheetStatement(isNested);
    }
    _parseMediaFeatureName() {
        return this._parseIdent() || this._parseVariable();
    }
    _parseVariableDeclaration(panic = []) {
        const node = this.create(VariableDeclaration);
        const mark = this.mark();
        if (!node.setVariable(this._parseVariable(true))) {
            return null;
        }
        if (this.accept(TokenType.Colon)) {
            if (this.prevToken) {
                node.colonPosition = this.prevToken.offset;
            }
            if (node.setValue(this._parseDetachedRuleSet())) {
                node.needsSemicolon = false;
            }
            else if (!node.setValue(this._parseExpr())) {
                return this.finish(node, ParseError.VariableValueExpected, [], panic);
            }
            node.addChild(this._parsePrio());
        }
        else {
            this.restoreAtMark(mark);
            return null;
        }
        if (this.peek(TokenType.SemiColon)) {
            node.semicolonPosition = this.token.offset;
        }
        return this.finish(node);
    }
    _parseDetachedRuleSet() {
        let mark = this.mark();
        if (this.peekDelim('#') || this.peekDelim('.')) {
            this.consumeToken();
            if (!this.hasWhitespace() && this.accept(TokenType.ParenthesisL)) {
                let node = this.create(MixinDeclaration);
                if (node.getParameters().addChild(this._parseMixinParameter())) {
                    while (this.accept(TokenType.Comma) || this.accept(TokenType.SemiColon)) {
                        if (this.peek(TokenType.ParenthesisR)) {
                            break;
                        }
                        if (!node.getParameters().addChild(this._parseMixinParameter())) {
                            this.markError(node, ParseError.IdentifierExpected, [], [TokenType.ParenthesisR]);
                        }
                    }
                }
                if (!this.accept(TokenType.ParenthesisR)) {
                    this.restoreAtMark(mark);
                    return null;
                }
            }
            else {
                this.restoreAtMark(mark);
                return null;
            }
        }
        if (!this.peek(TokenType.CurlyL)) {
            return null;
        }
        const content = this.create(BodyDeclaration);
        this._parseBody(content, this._parseDetachedRuleSetBody.bind(this));
        return this.finish(content);
    }
    _parseDetachedRuleSetBody() {
        return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration();
    }
    _addLookupChildren(node) {
        if (!node.addChild(this._parseLookupValue())) {
            return false;
        }
        let expectsValue = false;
        while (true) {
            if (this.peek(TokenType.BracketL)) {
                expectsValue = true;
            }
            if (!node.addChild(this._parseLookupValue())) {
                break;
            }
            expectsValue = false;
        }
        return !expectsValue;
    }
    _parseLookupValue() {
        const node = this.create(Node);
        const mark = this.mark();
        if (!this.accept(TokenType.BracketL)) {
            this.restoreAtMark(mark);
            return null;
        }
        if (((node.addChild(this._parseVariable(false, true)) ||
            node.addChild(this._parsePropertyIdentifier())) &&
            this.accept(TokenType.BracketR)) || this.accept(TokenType.BracketR)) {
            return node;
        }
        this.restoreAtMark(mark);
        return null;
    }
    _parseVariable(declaration = false, insideLookup = false) {
        const isPropertyReference = !declaration && this.peekDelim('$');
        if (!this.peekDelim('@') && !isPropertyReference && !this.peek(TokenType.AtKeyword)) {
            return null;
        }
        const node = this.create(Variable);
        const mark = this.mark();
        while (this.acceptDelim('@') || (!declaration && this.acceptDelim('$'))) {
            if (this.hasWhitespace()) {
                this.restoreAtMark(mark);
                return null;
            }
        }
        if (!this.accept(TokenType.AtKeyword) && !this.accept(TokenType.Ident)) {
            this.restoreAtMark(mark);
            return null;
        }
        if (!insideLookup && this.peek(TokenType.BracketL)) {
            if (!this._addLookupChildren(node)) {
                this.restoreAtMark(mark);
                return null;
            }
        }
        return node;
    }
    _parseTermExpression() {
        return this._parseVariable() ||
            this._parseEscaped() ||
            super._parseTermExpression() ||
            this._tryParseMixinReference(false);
    }
    _parseEscaped() {
        if (this.peek(TokenType.EscapedJavaScript) ||
            this.peek(TokenType.BadEscapedJavaScript)) {
            const node = this.createNode(NodeType$1.EscapedValue);
            this.consumeToken();
            return this.finish(node);
        }
        if (this.peekDelim('~')) {
            const node = this.createNode(NodeType$1.EscapedValue);
            this.consumeToken();
            if (this.accept(TokenType.String) || this.accept(TokenType.EscapedJavaScript)) {
                return this.finish(node);
            }
            else {
                return this.finish(node, ParseError.TermExpected);
            }
        }
        return null;
    }
    _parseOperator() {
        const node = this._parseGuardOperator();
        if (node) {
            return node;
        }
        else {
            return super._parseOperator();
        }
    }
    _parseGuardOperator() {
        if (this.peekDelim('>')) {
            const node = this.createNode(NodeType$1.Operator);
            this.consumeToken();
            this.acceptDelim('=');
            return node;
        }
        else if (this.peekDelim('=')) {
            const node = this.createNode(NodeType$1.Operator);
            this.consumeToken();
            this.acceptDelim('<');
            return node;
        }
        else if (this.peekDelim('<')) {
            const node = this.createNode(NodeType$1.Operator);
            this.consumeToken();
            this.acceptDelim('=');
            return node;
        }
        return null;
    }
    _parseRuleSetDeclaration() {
        if (this.peek(TokenType.AtKeyword)) {
            return this._parseKeyframe()
                || this._parseMedia(true)
                || this._parseImport()
                || this._parseSupports(true)
                || this._parseLayer()
                || this._parsePropertyAtRule()
                || this._parseContainer(true)
                || this._parseDetachedRuleSetMixin()
                || this._parseVariableDeclaration()
                || this._parseRuleSetDeclarationAtStatement();
        }
        return this._tryParseMixinDeclaration()
            || this._tryParseRuleset(true)
            || this._tryParseMixinReference()
            || this._parseFunction()
            || this._parseExtend()
            || this._parseDeclaration();
    }
    _parseKeyframeIdent() {
        return this._parseIdent([ReferenceType.Keyframe]) || this._parseVariable();
    }
    _parseKeyframeSelector() {
        return this._parseDetachedRuleSetMixin()
            || super._parseKeyframeSelector();
    }
    _parseSelector(isNested) {
        const node = this.create(Selector);
        let hasContent = false;
        if (isNested) {
            hasContent = node.addChild(this._parseCombinator());
        }
        while (node.addChild(this._parseSimpleSelector())) {
            hasContent = true;
            const mark = this.mark();
            if (node.addChild(this._parseGuard()) && this.peek(TokenType.CurlyL)) {
                break;
            }
            this.restoreAtMark(mark);
            node.addChild(this._parseCombinator());
        }
        return hasContent ? this.finish(node) : null;
    }
    _parseNestingSelector() {
        if (this.peekDelim('&')) {
            const node = this.createNode(NodeType$1.SelectorCombinator);
            this.consumeToken();
            while (!this.hasWhitespace() && (this.acceptDelim('-') || this.accept(TokenType.Num) || this.accept(TokenType.Dimension) || node.addChild(this._parseIdent()) || this.acceptDelim('&'))) {
            }
            return this.finish(node);
        }
        return null;
    }
    _parseSelectorIdent() {
        if (!this.peekInterpolatedIdent()) {
            return null;
        }
        const node = this.createNode(NodeType$1.SelectorInterpolation);
        const hasContent = this._acceptInterpolatedIdent(node);
        return hasContent ? this.finish(node) : null;
    }
    _parsePropertyIdentifier(inLookup = false) {
        const propertyRegex = /^[\w-]+/;
        if (!this.peekInterpolatedIdent() && !this.peekRegExp(this.token.type, propertyRegex)) {
            return null;
        }
        const mark = this.mark();
        const node = this.create(Identifier);
        node.isCustomProperty = this.acceptDelim('-') && this.acceptDelim('-');
        let childAdded = false;
        if (!inLookup) {
            if (node.isCustomProperty) {
                childAdded = this._acceptInterpolatedIdent(node);
            }
            else {
                childAdded = this._acceptInterpolatedIdent(node, propertyRegex);
            }
        }
        else {
            if (node.isCustomProperty) {
                childAdded = node.addChild(this._parseIdent());
            }
            else {
                childAdded = node.addChild(this._parseRegexp(propertyRegex));
            }
        }
        if (!childAdded) {
            this.restoreAtMark(mark);
            return null;
        }
        if (!inLookup && !this.hasWhitespace()) {
            this.acceptDelim('+');
            if (!this.hasWhitespace()) {
                this.acceptIdent('_');
            }
        }
        return this.finish(node);
    }
    peekInterpolatedIdent() {
        return this.peek(TokenType.Ident) ||
            this.peekDelim('@') ||
            this.peekDelim('$') ||
            this.peekDelim('-');
    }
    _acceptInterpolatedIdent(node, identRegex) {
        let hasContent = false;
        const indentInterpolation = () => {
            const pos = this.mark();
            if (this.acceptDelim('-')) {
                if (!this.hasWhitespace()) {
                    this.acceptDelim('-');
                }
                if (this.hasWhitespace()) {
                    this.restoreAtMark(pos);
                    return null;
                }
            }
            return this._parseInterpolation();
        };
        const accept = identRegex ?
            () => this.acceptRegexp(identRegex) :
            () => this.accept(TokenType.Ident);
        while (accept() ||
            node.addChild(this._parseInterpolation() ||
                this.try(indentInterpolation))) {
            hasContent = true;
            if (this.hasWhitespace()) {
                break;
            }
        }
        return hasContent;
    }
    _parseInterpolation() {
        const mark = this.mark();
        if (this.peekDelim('@') || this.peekDelim('$')) {
            const node = this.createNode(NodeType$1.Interpolation);
            this.consumeToken();
            if (this.hasWhitespace() || !this.accept(TokenType.CurlyL)) {
                this.restoreAtMark(mark);
                return null;
            }
            if (!node.addChild(this._parseIdent())) {
                return this.finish(node, ParseError.IdentifierExpected);
            }
            if (!this.accept(TokenType.CurlyR)) {
                return this.finish(node, ParseError.RightCurlyExpected);
            }
            return this.finish(node);
        }
        return null;
    }
    _tryParseMixinDeclaration() {
        const mark = this.mark();
        const node = this.create(MixinDeclaration);
        if (!node.setIdentifier(this._parseMixinDeclarationIdentifier()) || !this.accept(TokenType.ParenthesisL)) {
            this.restoreAtMark(mark);
            return null;
        }
        if (node.getParameters().addChild(this._parseMixinParameter())) {
            while (this.accept(TokenType.Comma) || this.accept(TokenType.SemiColon)) {
                if (this.peek(TokenType.ParenthesisR)) {
                    break;
                }
                if (!node.getParameters().addChild(this._parseMixinParameter())) {
                    this.markError(node, ParseError.IdentifierExpected, [], [TokenType.ParenthesisR]);
                }
            }
        }
        if (!this.accept(TokenType.ParenthesisR)) {
            this.restoreAtMark(mark);
            return null;
        }
        node.setGuard(this._parseGuard());
        if (!this.peek(TokenType.CurlyL)) {
            this.restoreAtMark(mark);
            return null;
        }
        return this._parseBody(node, this._parseMixInBodyDeclaration.bind(this));
    }
    _parseMixInBodyDeclaration() {
        return this._parseFontFace() || this._parseRuleSetDeclaration();
    }
    _parseMixinDeclarationIdentifier() {
        let identifier;
        if (this.peekDelim('#') || this.peekDelim('.')) {
            identifier = this.create(Identifier);
            this.consumeToken();
            if (this.hasWhitespace() || !identifier.addChild(this._parseIdent())) {
                return null;
            }
        }
        else if (this.peek(TokenType.Hash)) {
            identifier = this.create(Identifier);
            this.consumeToken();
        }
        else {
            return null;
        }
        identifier.referenceTypes = [ReferenceType.Mixin];
        return this.finish(identifier);
    }
    _parsePseudo() {
        if (!this.peek(TokenType.Colon)) {
            return null;
        }
        const mark = this.mark();
        const node = this.create(ExtendsReference);
        this.consumeToken();
        if (this.acceptIdent('extend')) {
            return this._completeExtends(node);
        }
        this.restoreAtMark(mark);
        return super._parsePseudo();
    }
    _parseExtend() {
        if (!this.peekDelim('&')) {
            return null;
        }
        const mark = this.mark();
        const node = this.create(ExtendsReference);
        this.consumeToken();
        if (this.hasWhitespace() || !this.accept(TokenType.Colon) || !this.acceptIdent('extend')) {
            this.restoreAtMark(mark);
            return null;
        }
        return this._completeExtends(node);
    }
    _completeExtends(node) {
        if (!this.accept(TokenType.ParenthesisL)) {
            return this.finish(node, ParseError.LeftParenthesisExpected);
        }
        const selectors = node.getSelectors();
        if (!selectors.addChild(this._parseSelector(true))) {
            return this.finish(node, ParseError.SelectorExpected);
        }
        while (this.accept(TokenType.Comma)) {
            if (!selectors.addChild(this._parseSelector(true))) {
                return this.finish(node, ParseError.SelectorExpected);
            }
        }
        if (!this.accept(TokenType.ParenthesisR)) {
            return this.finish(node, ParseError.RightParenthesisExpected);
        }
        return this.finish(node);
    }
    _parseDetachedRuleSetMixin() {
        if (!this.peek(TokenType.AtKeyword)) {
            return null;
        }
        const mark = this.mark();
        const node = this.create(MixinReference);
        if (node.addChild(this._parseVariable(true)) && (this.hasWhitespace() || !this.accept(TokenType.ParenthesisL))) {
            this.restoreAtMark(mark);
            return null;
        }
        if (!this.accept(TokenType.ParenthesisR)) {
            return this.finish(node, ParseError.RightParenthesisExpected);
        }
        return this.finish(node);
    }
    _tryParseMixinReference(atRoot = true) {
        const mark = this.mark();
        const node = this.create(MixinReference);
        let identifier = this._parseMixinDeclarationIdentifier();
        while (identifier) {
            this.acceptDelim('>');
            const nextId = this._parseMixinDeclarationIdentifier();
            if (nextId) {
                node.getNamespaces().addChild(identifier);
                identifier = nextId;
            }
            else {
                break;
            }
        }
        if (!node.setIdentifier(identifier)) {
            this.restoreAtMark(mark);
            return null;
        }
        let hasArguments = false;
        if (this.accept(TokenType.ParenthesisL)) {
            hasArguments = true;
            if (node.getArguments().addChild(this._parseMixinArgument())) {
                while (this.accept(TokenType.Comma) || this.accept(TokenType.SemiColon)) {
                    if (this.peek(TokenType.ParenthesisR)) {
                        break;
                    }
                    if (!node.getArguments().addChild(this._parseMixinArgument())) {
                        return this.finish(node, ParseError.ExpressionExpected);
                    }
                }
            }
            if (!this.accept(TokenType.ParenthesisR)) {
                return this.finish(node, ParseError.RightParenthesisExpected);
            }
            identifier.referenceTypes = [ReferenceType.Mixin];
        }
        else {
            identifier.referenceTypes = [ReferenceType.Mixin, ReferenceType.Rule];
        }
        if (this.peek(TokenType.BracketL)) {
            if (!atRoot) {
                this._addLookupChildren(node);
            }
        }
        else {
            node.addChild(this._parsePrio());
        }
        if (!hasArguments && !this.peek(TokenType.SemiColon) && !this.peek(TokenType.CurlyR) && !this.peek(TokenType.EOF)) {
            this.restoreAtMark(mark);
            return null;
        }
        return this.finish(node);
    }
    _parseMixinArgument() {
        const node = this.create(FunctionArgument);
        const pos = this.mark();
        const argument = this._parseVariable();
        if (argument) {
            if (!this.accept(TokenType.Colon)) {
                this.restoreAtMark(pos);
            }
            else {
                node.setIdentifier(argument);
            }
        }
        if (node.setValue(this._parseDetachedRuleSet() || this._parseExpr(true))) {
            return this.finish(node);
        }
        this.restoreAtMark(pos);
        return null;
    }
    _parseMixinParameter() {
        const node = this.create(FunctionParameter);
        if (this.peekKeyword('@rest')) {
            const restNode = this.create(Node);
            this.consumeToken();
            if (!this.accept(Ellipsis)) {
                return this.finish(node, ParseError.DotExpected, [], [TokenType.Comma, TokenType.ParenthesisR]);
            }
            node.setIdentifier(this.finish(restNode));
            return this.finish(node);
        }
        if (this.peek(Ellipsis)) {
            const varargsNode = this.create(Node);
            this.consumeToken();
            node.setIdentifier(this.finish(varargsNode));
            return this.finish(node);
        }
        let hasContent = false;
        if (node.setIdentifier(this._parseVariable())) {
            this.accept(TokenType.Colon);
            hasContent = true;
        }
        if (!node.setDefaultValue(this._parseDetachedRuleSet() || this._parseExpr(true)) && !hasContent) {
            return null;
        }
        return this.finish(node);
    }
    _parseGuard() {
        if (!this.peekIdent('when')) {
            return null;
        }
        const node = this.create(LessGuard);
        this.consumeToken();
        if (!node.getConditions().addChild(this._parseGuardCondition())) {
            return this.finish(node, ParseError.ConditionExpected);
        }
        while (this.acceptIdent('and') || this.accept(TokenType.Comma)) {
            if (!node.getConditions().addChild(this._parseGuardCondition())) {
                return this.finish(node, ParseError.ConditionExpected);
            }
        }
        return this.finish(node);
    }
    _parseGuardCondition() {
        const node = this.create(GuardCondition);
        node.isNegated = this.acceptIdent('not');
        if (!this.accept(TokenType.ParenthesisL)) {
            if (node.isNegated) {
                return this.finish(node, ParseError.LeftParenthesisExpected);
            }
            return null;
        }
        if (!node.addChild(this._parseExpr())) ;
        if (!this.accept(TokenType.ParenthesisR)) {
            return this.finish(node, ParseError.RightParenthesisExpected);
        }
        return this.finish(node);
    }
    _parseFunction() {
        const pos = this.mark();
        const node = this.create(Function$1);
        if (!node.setIdentifier(this._parseFunctionIdentifier())) {
            return null;
        }
        if (this.hasWhitespace() || !this.accept(TokenType.ParenthesisL)) {
            this.restoreAtMark(pos);
            return null;
        }
        if (node.getArguments().addChild(this._parseMixinArgument())) {
            while (this.accept(TokenType.Comma) || this.accept(TokenType.SemiColon)) {
                if (this.peek(TokenType.ParenthesisR)) {
                    break;
                }
                if (!node.getArguments().addChild(this._parseMixinArgument())) {
                    return this.finish(node, ParseError.ExpressionExpected);
                }
            }
        }
        if (!this.accept(TokenType.ParenthesisR)) {
            return this.finish(node, ParseError.RightParenthesisExpected);
        }
        return this.finish(node);
    }
    _parseFunctionIdentifier() {
        if (this.peekDelim('%')) {
            const node = this.create(Identifier);
            node.referenceTypes = [ReferenceType.Function];
            this.consumeToken();
            return this.finish(node);
        }
        return super._parseFunctionIdentifier();
    }
    _parseURLArgument() {
        const pos = this.mark();
        const node = super._parseURLArgument();
        if (!node || !this.peek(TokenType.ParenthesisR)) {
            this.restoreAtMark(pos);
            const node = this.create(Node);
            node.addChild(this._parseBinaryExpr());
            return this.finish(node);
        }
        return node;
    }
}

class LESSCompletion extends CSSCompletion {
    constructor(lsOptions, cssDataManager) {
        super('@', lsOptions, cssDataManager);
    }
    createFunctionProposals(proposals, existingNode, sortToEnd, result) {
        for (const p of proposals) {
            const item = {
                label: p.name,
                detail: p.example,
                documentation: p.description,
                textEdit: TextEdit$1.replace(this.getCompletionRange(existingNode), p.name + '($0)'),
                insertTextFormat: InsertTextFormat$1.Snippet,
                kind: CompletionItemKind$1.Function
            };
            if (sortToEnd) {
                item.sortText = 'z';
            }
            result.items.push(item);
        }
        return result;
    }
    getTermProposals(entry, existingNode, result) {
        let functions = LESSCompletion.builtInProposals;
        if (entry) {
            functions = functions.filter(f => !f.type || !entry.restrictions || entry.restrictions.indexOf(f.type) !== -1);
        }
        this.createFunctionProposals(functions, existingNode, true, result);
        return super.getTermProposals(entry, existingNode, result);
    }
    getColorProposals(entry, existingNode, result) {
        this.createFunctionProposals(LESSCompletion.colorProposals, existingNode, false, result);
        return super.getColorProposals(entry, existingNode, result);
    }
    getCompletionsForDeclarationProperty(declaration, result) {
        this.getCompletionsForSelector(null, true, result);
        return super.getCompletionsForDeclarationProperty(declaration, result);
    }
}
LESSCompletion.builtInProposals = [
    {
        'name': 'if',
        'example': 'if(condition, trueValue [, falseValue]);',
        'description': main$4.t('returns one of two values depending on a condition.')
    },
    {
        'name': 'boolean',
        'example': 'boolean(condition);',
        'description': main$4.t('"store" a boolean test for later evaluation in a guard or if().')
    },
    {
        'name': 'length',
        'example': 'length(@list);',
        'description': main$4.t('returns the number of elements in a value list')
    },
    {
        'name': 'extract',
        'example': 'extract(@list, index);',
        'description': main$4.t('returns a value at the specified position in the list')
    },
    {
        'name': 'range',
        'example': 'range([start, ] end [, step]);',
        'description': main$4.t('generate a list spanning a range of values')
    },
    {
        'name': 'each',
        'example': 'each(@list, ruleset);',
        'description': main$4.t('bind the evaluation of a ruleset to each member of a list.')
    },
    {
        'name': 'escape',
        'example': 'escape(@string);',
        'description': main$4.t('URL encodes a string')
    },
    {
        'name': 'e',
        'example': 'e(@string);',
        'description': main$4.t('escape string content')
    },
    {
        'name': 'replace',
        'example': 'replace(@string, @pattern, @replacement[, @flags]);',
        'description': main$4.t('string replace')
    },
    {
        'name': 'unit',
        'example': 'unit(@dimension, [@unit: \'\']);',
        'description': main$4.t('remove or change the unit of a dimension')
    },
    {
        'name': 'color',
        'example': 'color(@string);',
        'description': main$4.t('parses a string to a color'),
        'type': 'color'
    },
    {
        'name': 'convert',
        'example': 'convert(@value, unit);',
        'description': main$4.t('converts numbers from one type into another')
    },
    {
        'name': 'data-uri',
        'example': 'data-uri([mimetype,] url);',
        'description': main$4.t('inlines a resource and falls back to `url()`'),
        'type': 'url'
    },
    {
        'name': 'abs',
        'description': main$4.t('absolute value of a number'),
        'example': 'abs(number);'
    },
    {
        'name': 'acos',
        'description': main$4.t('arccosine - inverse of cosine function'),
        'example': 'acos(number);'
    },
    {
        'name': 'asin',
        'description': main$4.t('arcsine - inverse of sine function'),
        'example': 'asin(number);'
    },
    {
        'name': 'ceil',
        'example': 'ceil(@number);',
        'description': main$4.t('rounds up to an integer')
    },
    {
        'name': 'cos',
        'description': main$4.t('cosine function'),
        'example': 'cos(number);'
    },
    {
        'name': 'floor',
        'description': main$4.t('rounds down to an integer'),
        'example': 'floor(@number);'
    },
    {
        'name': 'percentage',
        'description': main$4.t('converts to a %, e.g. 0.5 > 50%'),
        'example': 'percentage(@number);',
        'type': 'percentage'
    },
    {
        'name': 'round',
        'description': main$4.t('rounds a number to a number of places'),
        'example': 'round(number, [places: 0]);'
    },
    {
        'name': 'sqrt',
        'description': main$4.t('calculates square root of a number'),
        'example': 'sqrt(number);'
    },
    {
        'name': 'sin',
        'description': main$4.t('sine function'),
        'example': 'sin(number);'
    },
    {
        'name': 'tan',
        'description': main$4.t('tangent function'),
        'example': 'tan(number);'
    },
    {
        'name': 'atan',
        'description': main$4.t('arctangent - inverse of tangent function'),
        'example': 'atan(number);'
    },
    {
        'name': 'pi',
        'description': main$4.t('returns pi'),
        'example': 'pi();'
    },
    {
        'name': 'pow',
        'description': main$4.t('first argument raised to the power of the second argument'),
        'example': 'pow(@base, @exponent);'
    },
    {
        'name': 'mod',
        'description': main$4.t('first argument modulus second argument'),
        'example': 'mod(number, number);'
    },
    {
        'name': 'min',
        'description': main$4.t('returns the lowest of one or more values'),
        'example': 'min(@x, @y);'
    },
    {
        'name': 'max',
        'description': main$4.t('returns the lowest of one or more values'),
        'example': 'max(@x, @y);'
    }
];
LESSCompletion.colorProposals = [
    {
        'name': 'argb',
        'example': 'argb(@color);',
        'description': main$4.t('creates a #AARRGGBB')
    },
    {
        'name': 'hsl',
        'example': 'hsl(@hue, @saturation, @lightness);',
        'description': main$4.t('creates a color')
    },
    {
        'name': 'hsla',
        'example': 'hsla(@hue, @saturation, @lightness, @alpha);',
        'description': main$4.t('creates a color')
    },
    {
        'name': 'hsv',
        'example': 'hsv(@hue, @saturation, @value);',
        'description': main$4.t('creates a color')
    },
    {
        'name': 'hsva',
        'example': 'hsva(@hue, @saturation, @value, @alpha);',
        'description': main$4.t('creates a color')
    },
    {
        'name': 'hue',
        'example': 'hue(@color);',
        'description': main$4.t('returns the `hue` channel of `@color` in the HSL space')
    },
    {
        'name': 'saturation',
        'example': 'saturation(@color);',
        'description': main$4.t('returns the `saturation` channel of `@color` in the HSL space')
    },
    {
        'name': 'lightness',
        'example': 'lightness(@color);',
        'description': main$4.t('returns the `lightness` channel of `@color` in the HSL space')
    },
    {
        'name': 'hsvhue',
        'example': 'hsvhue(@color);',
        'description': main$4.t('returns the `hue` channel of `@color` in the HSV space')
    },
    {
        'name': 'hsvsaturation',
        'example': 'hsvsaturation(@color);',
        'description': main$4.t('returns the `saturation` channel of `@color` in the HSV space')
    },
    {
        'name': 'hsvvalue',
        'example': 'hsvvalue(@color);',
        'description': main$4.t('returns the `value` channel of `@color` in the HSV space')
    },
    {
        'name': 'red',
        'example': 'red(@color);',
        'description': main$4.t('returns the `red` channel of `@color`')
    },
    {
        'name': 'green',
        'example': 'green(@color);',
        'description': main$4.t('returns the `green` channel of `@color`')
    },
    {
        'name': 'blue',
        'example': 'blue(@color);',
        'description': main$4.t('returns the `blue` channel of `@color`')
    },
    {
        'name': 'alpha',
        'example': 'alpha(@color);',
        'description': main$4.t('returns the `alpha` channel of `@color`')
    },
    {
        'name': 'luma',
        'example': 'luma(@color);',
        'description': main$4.t('returns the `luma` value (perceptual brightness) of `@color`')
    },
    {
        'name': 'saturate',
        'example': 'saturate(@color, 10%);',
        'description': main$4.t('return `@color` 10% points more saturated')
    },
    {
        'name': 'desaturate',
        'example': 'desaturate(@color, 10%);',
        'description': main$4.t('return `@color` 10% points less saturated')
    },
    {
        'name': 'lighten',
        'example': 'lighten(@color, 10%);',
        'description': main$4.t('return `@color` 10% points lighter')
    },
    {
        'name': 'darken',
        'example': 'darken(@color, 10%);',
        'description': main$4.t('return `@color` 10% points darker')
    },
    {
        'name': 'fadein',
        'example': 'fadein(@color, 10%);',
        'description': main$4.t('return `@color` 10% points less transparent')
    },
    {
        'name': 'fadeout',
        'example': 'fadeout(@color, 10%);',
        'description': main$4.t('return `@color` 10% points more transparent')
    },
    {
        'name': 'fade',
        'example': 'fade(@color, 50%);',
        'description': main$4.t('return `@color` with 50% transparency')
    },
    {
        'name': 'spin',
        'example': 'spin(@color, 10);',
        'description': main$4.t('return `@color` with a 10 degree larger in hue')
    },
    {
        'name': 'mix',
        'example': 'mix(@color1, @color2, [@weight: 50%]);',
        'description': main$4.t('return a mix of `@color1` and `@color2`')
    },
    {
        'name': 'greyscale',
        'example': 'greyscale(@color);',
        'description': main$4.t('returns a grey, 100% desaturated color'),
    },
    {
        'name': 'contrast',
        'example': 'contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);',
        'description': main$4.t('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);'
    }
];

function getFoldingRanges(document, context) {
    const ranges = computeFoldingRanges(document);
    return limitFoldingRanges(ranges, context);
}
function computeFoldingRanges(document) {
    function getStartLine(t) {
        return document.positionAt(t.offset).line;
    }
    function getEndLine(t) {
        return document.positionAt(t.offset + t.len).line;
    }
    function getScanner() {
        switch (document.languageId) {
            case 'scss':
                return new SCSSScanner();
            case 'less':
                return new LESSScanner();
            default:
                return new Scanner();
        }
    }
    function tokenToRange(t, kind) {
        const startLine = getStartLine(t);
        const endLine = getEndLine(t);
        if (startLine !== endLine) {
            return {
                startLine,
                endLine,
                kind
            };
        }
        else {
            return null;
        }
    }
    const ranges = [];
    const delimiterStack = [];
    const scanner = getScanner();
    scanner.ignoreComment = false;
    scanner.setSource(document.getText());
    let token = scanner.scan();
    let prevToken = null;
    while (token.type !== TokenType.EOF) {
        switch (token.type) {
            case TokenType.CurlyL:
            case InterpolationFunction:
                {
                    delimiterStack.push({ line: getStartLine(token), type: 'brace', isStart: true });
                    break;
                }
            case TokenType.CurlyR: {
                if (delimiterStack.length !== 0) {
                    const prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'brace');
                    if (!prevDelimiter) {
                        break;
                    }
                    let endLine = getEndLine(token);
                    if (prevDelimiter.type === 'brace') {
                        if (prevToken && getEndLine(prevToken) !== endLine) {
                            endLine--;
                        }
                        if (prevDelimiter.line !== endLine) {
                            ranges.push({
                                startLine: prevDelimiter.line,
                                endLine,
                                kind: undefined
                            });
                        }
                    }
                }
                break;
            }
            case TokenType.Comment: {
                const commentRegionMarkerToDelimiter = (marker) => {
                    if (marker === '#region') {
                        return { line: getStartLine(token), type: 'comment', isStart: true };
                    }
                    else {
                        return { line: getEndLine(token), type: 'comment', isStart: false };
                    }
                };
                const getCurrDelimiter = (token) => {
                    const matches = token.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);
                    if (matches) {
                        return commentRegionMarkerToDelimiter(matches[1]);
                    }
                    else if (document.languageId === 'scss' || document.languageId === 'less') {
                        const matches = token.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);
                        if (matches) {
                            return commentRegionMarkerToDelimiter(matches[1]);
                        }
                    }
                    return null;
                };
                const currDelimiter = getCurrDelimiter(token);
                if (currDelimiter) {
                    if (currDelimiter.isStart) {
                        delimiterStack.push(currDelimiter);
                    }
                    else {
                        const prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'comment');
                        if (!prevDelimiter) {
                            break;
                        }
                        if (prevDelimiter.type === 'comment') {
                            if (prevDelimiter.line !== currDelimiter.line) {
                                ranges.push({
                                    startLine: prevDelimiter.line,
                                    endLine: currDelimiter.line,
                                    kind: 'region'
                                });
                            }
                        }
                    }
                }
                else {
                    const range = tokenToRange(token, 'comment');
                    if (range) {
                        ranges.push(range);
                    }
                }
                break;
            }
        }
        prevToken = token;
        token = scanner.scan();
    }
    return ranges;
}
function popPrevStartDelimiterOfType(stack, type) {
    if (stack.length === 0) {
        return null;
    }
    for (let i = stack.length - 1; i >= 0; i--) {
        if (stack[i].type === type && stack[i].isStart) {
            return stack.splice(i, 1)[0];
        }
    }
    return null;
}
function limitFoldingRanges(ranges, context) {
    const maxRanges = context && context.rangeLimit || Number.MAX_VALUE;
    const sortedRanges = ranges.sort((r1, r2) => {
        let diff = r1.startLine - r2.startLine;
        if (diff === 0) {
            diff = r1.endLine - r2.endLine;
        }
        return diff;
    });
    const validRanges = [];
    let prevEndLine = -1;
    sortedRanges.forEach(r => {
        if (!(r.startLine < prevEndLine && prevEndLine < r.endLine)) {
            validRanges.push(r);
            prevEndLine = r.endLine;
        }
    });
    if (validRanges.length < maxRanges) {
        return validRanges;
    }
    else {
        return validRanges.slice(0, maxRanges);
    }
}

var legacy_beautify_css;
 (function() {
 	var __webpack_modules__ = ([
,
,
 (function(module) {
function OutputLine(parent) {
  this.__parent = parent;
  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 = [];
}
OutputLine.prototype.clone_empty = function() {
  var line = new OutputLine(this.__parent);
  line.set_indent(this.__indent_count, this.__alignment_count);
  return line;
};
OutputLine.prototype.item = function(index) {
  if (index < 0) {
    return this.__items[this.__items.length + index];
  } else {
    return this.__items[index];
  }
};
OutputLine.prototype.has_match = function(pattern) {
  for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {
    if (this.__items[lastCheckedOutput].match(pattern)) {
      return true;
    }
  }
  return false;
};
OutputLine.prototype.set_indent = function(indent, alignment) {
  if (this.is_empty()) {
    this.__indent_count = indent || 0;
    this.__alignment_count = alignment || 0;
    this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);
  }
};
OutputLine.prototype._set_wrap_point = function() {
  if (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;
  }
};
OutputLine.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;
};
OutputLine.prototype._allow_wrap = function() {
  if (this._should_wrap()) {
    this.__parent.add_new_line();
    var next = this.__parent.current_line;
    next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);
    next.__items = this.__items.slice(this.__wrap_point_index);
    this.__items = this.__items.slice(0, this.__wrap_point_index);
    next.__character_count += this.__character_count - this.__wrap_point_character_count;
    this.__character_count = this.__wrap_point_character_count;
    if (next.__items[0] === " ") {
      next.__items.splice(0, 1);
      next.__character_count -= 1;
    }
    return true;
  }
  return false;
};
OutputLine.prototype.is_empty = function() {
  return this.__items.length === 0;
};
OutputLine.prototype.last = function() {
  if (!this.is_empty()) {
    return this.__items[this.__items.length - 1];
  } else {
    return null;
  }
};
OutputLine.prototype.push = function(item) {
  this.__items.push(item);
  var last_newline_index = item.lastIndexOf('\n');
  if (last_newline_index !== -1) {
    this.__character_count = item.length - last_newline_index;
  } else {
    this.__character_count += item.length;
  }
};
OutputLine.prototype.pop = function() {
  var item = null;
  if (!this.is_empty()) {
    item = this.__items.pop();
    this.__character_count -= item.length;
  }
  return item;
};
OutputLine.prototype._remove_indent = function() {
  if (this.__indent_count > 0) {
    this.__indent_count -= 1;
    this.__character_count -= this.__parent.indent_size;
  }
};
OutputLine.prototype._remove_wrap_indent = function() {
  if (this.__wrap_point_indent_count > 0) {
    this.__wrap_point_indent_count -= 1;
  }
};
OutputLine.prototype.trim = function() {
  while (this.last() === ' ') {
    this.__items.pop();
    this.__character_count -= 1;
  }
};
OutputLine.prototype.toString = function() {
  var result = '';
  if (this.is_empty()) {
    if (this.__parent.indent_empty_lines) {
      result = this.__parent.get_indent_string(this.__indent_count);
    }
  } else {
    result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);
    result += this.__items.join('');
  }
  return result;
};
function IndentStringCache(options, baseIndentString) {
  this.__cache = [''];
  this.__indent_size = options.indent_size;
  this.__indent_string = options.indent_char;
  if (!options.indent_with_tabs) {
    this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);
  }
  baseIndentString = baseIndentString || '';
  if (options.indent_level > 0) {
    baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);
  }
  this.__base_string = baseIndentString;
  this.__base_string_length = baseIndentString.length;
}
IndentStringCache.prototype.get_indent_size = function(indent, column) {
  var result = this.__base_string_length;
  column = column || 0;
  if (indent < 0) {
    result = 0;
  }
  result += indent * this.__indent_size;
  result += column;
  return result;
};
IndentStringCache.prototype.get_indent_string = function(indent_level, column) {
  var result = this.__base_string;
  column = column || 0;
  if (indent_level < 0) {
    indent_level = 0;
    result = '';
  }
  column += indent_level * this.__indent_size;
  this.__ensure_cache(column);
  result += this.__cache[column];
  return result;
};
IndentStringCache.prototype.__ensure_cache = function(column) {
  while (column >= this.__cache.length) {
    this.__add_column();
  }
};
IndentStringCache.prototype.__add_column = function() {
  var column = this.__cache.length;
  var indent = 0;
  var result = '';
  if (this.__indent_size && column >= this.__indent_size) {
    indent = Math.floor(column / this.__indent_size);
    column -= indent * this.__indent_size;
    result = new Array(indent + 1).join(this.__indent_string);
  }
  if (column) {
    result += new Array(column + 1).join(' ');
  }
  this.__cache.push(result);
};
function Output(options, baseIndentString) {
  this.__indent_cache = new IndentStringCache(options, baseIndentString);
  this.raw = false;
  this._end_with_newline = options.end_with_newline;
  this.indent_size = options.indent_size;
  this.wrap_line_length = options.wrap_line_length;
  this.indent_empty_lines = options.indent_empty_lines;
  this.__lines = [];
  this.previous_line = null;
  this.current_line = null;
  this.next_line = new OutputLine(this);
  this.space_before_token = false;
  this.non_breaking_space = false;
  this.previous_token_wrapped = false;
  this.__add_outputline();
}
Output.prototype.__add_outputline = function() {
  this.previous_line = this.current_line;
  this.current_line = this.next_line.clone_empty();
  this.__lines.push(this.current_line);
};
Output.prototype.get_line_number = function() {
  return this.__lines.length;
};
Output.prototype.get_indent_string = function(indent, column) {
  return this.__indent_cache.get_indent_string(indent, column);
};
Output.prototype.get_indent_size = function(indent, column) {
  return this.__indent_cache.get_indent_size(indent, column);
};
Output.prototype.is_empty = function() {
  return !this.previous_line && this.current_line.is_empty();
};
Output.prototype.add_new_line = function(force_newline) {
  if (this.is_empty() ||
    (!force_newline && this.just_added_newline())) {
    return false;
  }
  if (!this.raw) {
    this.__add_outputline();
  }
  return true;
};
Output.prototype.get_code = function(eol) {
  this.trim(true);
  var last_item = this.current_line.pop();
  if (last_item) {
    if (last_item[last_item.length - 1] === '\n') {
      last_item = last_item.replace(/\n+$/g, '');
    }
    this.current_line.push(last_item);
  }
  if (this._end_with_newline) {
    this.__add_outputline();
  }
  var sweet_code = this.__lines.join('\n');
  if (eol !== '\n') {
    sweet_code = sweet_code.replace(/[\n]/g, eol);
  }
  return sweet_code;
};
Output.prototype.set_wrap_point = function() {
  this.current_line._set_wrap_point();
};
Output.prototype.set_indent = function(indent, alignment) {
  indent = indent || 0;
  alignment = alignment || 0;
  this.next_line.set_indent(indent, alignment);
  if (this.__lines.length > 1) {
    this.current_line.set_indent(indent, alignment);
    return true;
  }
  this.current_line.set_indent();
  return false;
};
Output.prototype.add_raw_token = function(token) {
  for (var x = 0; x < token.newlines; x++) {
    this.__add_outputline();
  }
  this.current_line.set_indent(-1);
  this.current_line.push(token.whitespace_before);
  this.current_line.push(token.text);
  this.space_before_token = false;
  this.non_breaking_space = false;
  this.previous_token_wrapped = false;
};
Output.prototype.add_token = function(printable_token) {
  this.__add_space_before_token();
  this.current_line.push(printable_token);
  this.space_before_token = false;
  this.non_breaking_space = false;
  this.previous_token_wrapped = this.current_line._allow_wrap();
};
Output.prototype.__add_space_before_token = function() {
  if (this.space_before_token && !this.just_added_newline()) {
    if (!this.non_breaking_space) {
      this.set_wrap_point();
    }
    this.current_line.push(' ');
  }
};
Output.prototype.remove_indent = function(index) {
  var output_length = this.__lines.length;
  while (index < output_length) {
    this.__lines[index]._remove_indent();
    index++;
  }
  this.current_line._remove_wrap_indent();
};
Output.prototype.trim = function(eat_newlines) {
  eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;
  this.current_line.trim();
  while (eat_newlines && 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;
};
Output.prototype.just_added_newline = function() {
  return this.current_line.is_empty();
};
Output.prototype.just_added_blankline = function() {
  return this.is_empty() ||
    (this.current_line.is_empty() && this.previous_line.is_empty());
};
Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) {
  var index = this.__lines.length - 2;
  while (index >= 0) {
    var potentialEmptyLine = this.__lines[index];
    if (potentialEmptyLine.is_empty()) {
      break;
    } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 &&
      potentialEmptyLine.item(-1) !== ends_with) {
      this.__lines.splice(index + 1, 0, new OutputLine(this));
      this.previous_line = this.__lines[this.__lines.length - 2];
      break;
    }
    index--;
  }
};
module.exports.Output = Output;
 }),
,
,
,
 (function(module) {
function Options(options, merge_child_field) {
  this.raw_options = _mergeOpts(options, merge_child_field);
  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', true);
  this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786);
  if (!this.preserve_newlines) {
    this.max_preserve_newlines = 0;
  }
  this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\t');
  if (this.indent_with_tabs) {
    this.indent_char = '\t';
    if (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', 'angular', 'django', 'erb', 'handlebars', 'php', 'smarty'], ['auto']);
}
Options.prototype._get_array = function(name, default_value) {
  var option_value = this.raw_options[name];
  var result = default_value || [];
  if (typeof option_value === 'object') {
    if (option_value !== null && typeof option_value.concat === 'function') {
      result = option_value.concat();
    }
  } else if (typeof option_value === 'string') {
    result = option_value.split(/[^a-zA-Z0-9_\/\-]+/);
  }
  return result;
};
Options.prototype._get_boolean = function(name, default_value) {
  var option_value = this.raw_options[name];
  var result = option_value === undefined ? !!default_value : !!option_value;
  return result;
};
Options.prototype._get_characters = function(name, default_value) {
  var option_value = this.raw_options[name];
  var result = default_value || '';
  if (typeof option_value === 'string') {
    result = option_value.replace(/\\r/, '\r').replace(/\\n/, '\n').replace(/\\t/, '\t');
  }
  return result;
};
Options.prototype._get_number = function(name, default_value) {
  var option_value = this.raw_options[name];
  default_value = parseInt(default_value, 10);
  if (isNaN(default_value)) {
    default_value = 0;
  }
  var result = parseInt(option_value, 10);
  if (isNaN(result)) {
    result = default_value;
  }
  return result;
};
Options.prototype._get_selection = function(name, selection_list, default_value) {
  var result = this._get_selection_list(name, selection_list, default_value);
  if (result.length !== 1) {
    throw new Error(
      "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" +
      selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
  }
  return result[0];
};
Options.prototype._get_selection_list = function(name, selection_list, default_value) {
  if (!selection_list || selection_list.length === 0) {
    throw new Error("Selection list cannot be empty.");
  }
  default_value = default_value || [selection_list[0]];
  if (!this._is_valid_selection(default_value, selection_list)) {
    throw new Error("Invalid Default Value!");
  }
  var result = this._get_array(name, default_value);
  if (!this._is_valid_selection(result, selection_list)) {
    throw new Error(
      "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" +
      selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
  }
  return result;
};
Options.prototype._is_valid_selection = function(result, selection_list) {
  return result.length && selection_list.length &&
    !result.some(function(item) { return selection_list.indexOf(item) === -1; });
};
function _mergeOpts(allOptions, childFieldName) {
  var finalOpts = {};
  allOptions = _normalizeOpts(allOptions);
  var name;
  for (name in allOptions) {
    if (name !== childFieldName) {
      finalOpts[name] = allOptions[name];
    }
  }
  if (childFieldName && allOptions[childFieldName]) {
    for (name in allOptions[childFieldName]) {
      finalOpts[name] = allOptions[childFieldName][name];
    }
  }
  return finalOpts;
}
function _normalizeOpts(options) {
  var convertedOpts = {};
  var key;
  for (key in options) {
    var newKey = key.replace(/-/g, "_");
    convertedOpts[newKey] = options[key];
  }
  return convertedOpts;
}
module.exports.Options = Options;
module.exports.normalizeOpts = _normalizeOpts;
module.exports.mergeOpts = _mergeOpts;
 }),
,
 (function(module) {
var regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky');
function InputScanner(input_string) {
  this.__input = input_string || '';
  this.__input_length = this.__input.length;
  this.__position = 0;
}
InputScanner.prototype.restart = function() {
  this.__position = 0;
};
InputScanner.prototype.back = function() {
  if (this.__position > 0) {
    this.__position -= 1;
  }
};
InputScanner.prototype.hasNext = function() {
  return this.__position < this.__input_length;
};
InputScanner.prototype.next = function() {
  var val = null;
  if (this.hasNext()) {
    val = this.__input.charAt(this.__position);
    this.__position += 1;
  }
  return val;
};
InputScanner.prototype.peek = function(index) {
  var val = null;
  index = index || 0;
  index += this.__position;
  if (index >= 0 && index < this.__input_length) {
    val = this.__input.charAt(index);
  }
  return val;
};
InputScanner.prototype.__match = function(pattern, index) {
  pattern.lastIndex = index;
  var pattern_match = pattern.exec(this.__input);
  if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {
    if (pattern_match.index !== index) {
      pattern_match = null;
    }
  }
  return pattern_match;
};
InputScanner.prototype.test = function(pattern, index) {
  index = index || 0;
  index += this.__position;
  if (index >= 0 && index < this.__input_length) {
    return !!this.__match(pattern, index);
  } else {
    return false;
  }
};
InputScanner.prototype.testChar = function(pattern, index) {
  var val = this.peek(index);
  pattern.lastIndex = 0;
  return val !== null && pattern.test(val);
};
InputScanner.prototype.match = function(pattern) {
  var pattern_match = this.__match(pattern, this.__position);
  if (pattern_match) {
    this.__position += pattern_match[0].length;
  } else {
    pattern_match = null;
  }
  return pattern_match;
};
InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {
  var val = '';
  var match;
  if (starting_pattern) {
    match = this.match(starting_pattern);
    if (match) {
      val += match[0];
    }
  }
  if (until_pattern && (match || !starting_pattern)) {
    val += this.readUntil(until_pattern, until_after);
  }
  return val;
};
InputScanner.prototype.readUntil = function(pattern, until_after) {
  var val = '';
  var match_index = this.__position;
  pattern.lastIndex = this.__position;
  var pattern_match = pattern.exec(this.__input);
  if (pattern_match) {
    match_index = pattern_match.index;
    if (until_after) {
      match_index += pattern_match[0].length;
    }
  } else {
    match_index = this.__input_length;
  }
  val = this.__input.substring(this.__position, match_index);
  this.__position = match_index;
  return val;
};
InputScanner.prototype.readUntilAfter = function(pattern) {
  return this.readUntil(pattern, true);
};
InputScanner.prototype.get_regexp = function(pattern, match_from) {
  var result = null;
  var flags = 'g';
  if (match_from && regexp_has_sticky) {
    flags = 'y';
  }
  if (typeof pattern === "string" && pattern !== '') {
    result = new RegExp(pattern, flags);
  } else if (pattern) {
    result = new RegExp(pattern.source, flags);
  }
  return result;
};
InputScanner.prototype.get_literal_regexp = function(literal_string) {
  return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'));
};
InputScanner.prototype.peekUntilAfter = function(pattern) {
  var start = this.__position;
  var val = this.readUntilAfter(pattern);
  this.__position = start;
  return val;
};
InputScanner.prototype.lookBack = function(testVal) {
  var start = this.__position - 1;
  return start >= testVal.length && this.__input.substring(start - testVal.length, start)
    .toLowerCase() === testVal;
};
module.exports.InputScanner = InputScanner;
 }),
,
,
,
,
 (function(module) {
function Directives(start_block_pattern, end_block_pattern) {
  start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source;
  end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source;
  this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, 'g');
  this.__directive_pattern = / (\w+)[:](\w+)/g;
  this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, 'g');
}
Directives.prototype.get_directives = function(text) {
  if (!text.match(this.__directives_block_pattern)) {
    return null;
  }
  var directives = {};
  this.__directive_pattern.lastIndex = 0;
  var directive_match = this.__directive_pattern.exec(text);
  while (directive_match) {
    directives[directive_match[1]] = directive_match[2];
    directive_match = this.__directive_pattern.exec(text);
  }
  return directives;
};
Directives.prototype.readIgnored = function(input) {
  return input.readUntilAfter(this.__directives_end_ignore_pattern);
};
module.exports.Directives = Directives;
 }),
,
 (function(module, __unused_webpack_exports, __webpack_require__) {
var Beautifier = (__webpack_require__(16).Beautifier),
  Options = (__webpack_require__(17).Options);
function css_beautify(source_text, options) {
  var beautifier = new Beautifier(source_text, options);
  return beautifier.beautify();
}
module.exports = css_beautify;
module.exports.defaultOptions = function() {
  return new Options();
};
 }),
 (function(module, __unused_webpack_exports, __webpack_require__) {
var Options = (__webpack_require__(17).Options);
var Output = (__webpack_require__(2).Output);
var InputScanner = (__webpack_require__(8).InputScanner);
var Directives = (__webpack_require__(13).Directives);
var directives_core = new Directives(/\/\*/, /\*\//);
var lineBreak = /\r\n|[\r\n]/;
var allLineBreaks = /\r\n|[\r\n]/g;
var whitespaceChar = /\s/;
var whitespacePattern = /(?:\s|\n)+/g;
var block_comment_pattern = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g;
var comment_pattern = /\/\/(?:[^\n\r\u2028\u2029]*)/g;
function Beautifier(source_text, options) {
  this._source_text = source_text || '';
  this._options = new Options(options);
  this._ch = null;
  this._input = null;
  this.NESTED_AT_RULE = {
    "page": true,
    "font-face": true,
    "keyframes": true,
    "media": true,
    "supports": true,
    "document": true
  };
  this.CONDITIONAL_GROUP_RULE = {
    "media": true,
    "supports": true,
    "document": true
  };
  this.NON_SEMICOLON_NEWLINE_PROPERTY = [
    "grid-template-areas",
    "grid-template"
  ];
}
Beautifier.prototype.eatString = function(endChars) {
  var result = '';
  this._ch = this._input.next();
  while (this._ch) {
    result += this._ch;
    if (this._ch === "\\") {
      result += this._input.next();
    } else if (endChars.indexOf(this._ch) !== -1 || this._ch === "\n") {
      break;
    }
    this._ch = this._input.next();
  }
  return result;
};
Beautifier.prototype.eatWhitespace = function(allowAtLeastOneNewLine) {
  var result = whitespaceChar.test(this._input.peek());
  var newline_count = 0;
  while (whitespaceChar.test(this._input.peek())) {
    this._ch = this._input.next();
    if (allowAtLeastOneNewLine && this._ch === '\n') {
      if (newline_count === 0 || newline_count < this._options.max_preserve_newlines) {
        newline_count++;
        this._output.add_new_line(true);
      }
    }
  }
  return result;
};
Beautifier.prototype.foundNestedPseudoClass = function() {
  var openParen = 0;
  var i = 1;
  var ch = this._input.peek(i);
  while (ch) {
    if (ch === "{") {
      return true;
    } else if (ch === '(') {
      openParen += 1;
    } else if (ch === ')') {
      if (openParen === 0) {
        return false;
      }
      openParen -= 1;
    } else if (ch === ";" || ch === "}") {
      return false;
    }
    i++;
    ch = this._input.peek(i);
  }
  return false;
};
Beautifier.prototype.print_string = function(output_string) {
  this._output.set_indent(this._indentLevel);
  this._output.non_breaking_space = true;
  this._output.add_token(output_string);
};
Beautifier.prototype.preserveSingleSpace = function(isAfterSpace) {
  if (isAfterSpace) {
    this._output.space_before_token = true;
  }
};
Beautifier.prototype.indent = function() {
  this._indentLevel++;
};
Beautifier.prototype.outdent = function() {
  if (this._indentLevel > 0) {
    this._indentLevel--;
  }
};
Beautifier.prototype.beautify = function() {
  if (this._options.disabled) {
    return this._source_text;
  }
  var source_text = this._source_text;
  var eol = this._options.eol;
  if (eol === 'auto') {
    eol = '\n';
    if (source_text && lineBreak.test(source_text || '')) {
      eol = source_text.match(lineBreak)[0];
    }
  }
  source_text = source_text.replace(allLineBreaks, '\n');
  var baseIndentString = source_text.match(/^[\t ]*/)[0];
  this._output = new Output(this._options, baseIndentString);
  this._input = new InputScanner(source_text);
  this._indentLevel = 0;
  this._nestedLevel = 0;
  this._ch = null;
  var parenLevel = 0;
  var insideRule = false;
  var insidePropertyValue = false;
  var enteringConditionalGroup = false;
  var insideNonNestedAtRule = false;
  var insideScssMap = false;
  var topCharacter = this._ch;
  var insideNonSemiColonValues = false;
  var whitespace;
  var isAfterSpace;
  var previous_ch;
  while (true) {
    whitespace = this._input.read(whitespacePattern);
    isAfterSpace = whitespace !== '';
    previous_ch = topCharacter;
    this._ch = this._input.next();
    if (this._ch === '\\' && this._input.hasNext()) {
      this._ch += this._input.next();
    }
    topCharacter = this._ch;
    if (!this._ch) {
      break;
    } else if (this._ch === '/' && this._input.peek() === '*') {
      this._output.add_new_line();
      this._input.back();
      var comment = this._input.read(block_comment_pattern);
      var directives = directives_core.get_directives(comment);
      if (directives && directives.ignore === 'start') {
        comment += directives_core.readIgnored(this._input);
      }
      this.print_string(comment);
      this.eatWhitespace(true);
      this._output.add_new_line();
    } else if (this._ch === '/' && this._input.peek() === '/') {
      this._output.space_before_token = true;
      this._input.back();
      this.print_string(this._input.read(comment_pattern));
      this.eatWhitespace(true);
    } else if (this._ch === '$') {
      this.preserveSingleSpace(isAfterSpace);
      this.print_string(this._ch);
      var variable = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
      if (variable.match(/[ :]$/)) {
        variable = this.eatString(": ").replace(/\s+$/, '');
        this.print_string(variable);
        this._output.space_before_token = true;
      }
      if (parenLevel === 0 && variable.indexOf(':') !== -1) {
        insidePropertyValue = true;
        this.indent();
      }
    } else if (this._ch === '@') {
      this.preserveSingleSpace(isAfterSpace);
      if (this._input.peek() === '{') {
        this.print_string(this._ch + this.eatString('}'));
      } else {
        this.print_string(this._ch);
        var variableOrRule = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
        if (variableOrRule.match(/[ :]$/)) {
          variableOrRule = this.eatString(": ").replace(/\s+$/, '');
          this.print_string(variableOrRule);
          this._output.space_before_token = true;
        }
        if (parenLevel === 0 && variableOrRule.indexOf(':') !== -1) {
          insidePropertyValue = true;
          this.indent();
        } else if (variableOrRule in this.NESTED_AT_RULE) {
          this._nestedLevel += 1;
          if (variableOrRule in this.CONDITIONAL_GROUP_RULE) {
            enteringConditionalGroup = true;
          }
        } else if (parenLevel === 0 && !insidePropertyValue) {
          insideNonNestedAtRule = true;
        }
      }
    } else if (this._ch === '#' && this._input.peek() === '{') {
      this.preserveSingleSpace(isAfterSpace);
      this.print_string(this._ch + this.eatString('}'));
    } else if (this._ch === '{') {
      if (insidePropertyValue) {
        insidePropertyValue = false;
        this.outdent();
      }
      insideNonNestedAtRule = false;
      if (enteringConditionalGroup) {
        enteringConditionalGroup = false;
        insideRule = (this._indentLevel >= this._nestedLevel);
      } else {
        insideRule = (this._indentLevel >= this._nestedLevel - 1);
      }
      if (this._options.newline_between_rules && insideRule) {
        if (this._output.previous_line && this._output.previous_line.item(-1) !== '{') {
          this._output.ensure_empty_line_above('/', ',');
        }
      }
      this._output.space_before_token = true;
      if (this._options.brace_style === 'expand') {
        this._output.add_new_line();
        this.print_string(this._ch);
        this.indent();
        this._output.set_indent(this._indentLevel);
      } else {
        if (previous_ch === '(') {
          this._output.space_before_token = false;
        } else if (previous_ch !== ',') {
          this.indent();
        }
        this.print_string(this._ch);
      }
      this.eatWhitespace(true);
      this._output.add_new_line();
    } else if (this._ch === '}') {
      this.outdent();
      this._output.add_new_line();
      if (previous_ch === '{') {
        this._output.trim(true);
      }
      if (insidePropertyValue) {
        this.outdent();
        insidePropertyValue = false;
      }
      this.print_string(this._ch);
      insideRule = false;
      if (this._nestedLevel) {
        this._nestedLevel--;
      }
      this.eatWhitespace(true);
      this._output.add_new_line();
      if (this._options.newline_between_rules && !this._output.just_added_blankline()) {
        if (this._input.peek() !== '}') {
          this._output.add_new_line(true);
        }
      }
      if (this._input.peek() === ')') {
        this._output.trim(true);
        if (this._options.brace_style === "expand") {
          this._output.add_new_line(true);
        }
      }
    } else if (this._ch === ":") {
      for (var i = 0; i < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; i++) {
        if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[i])) {
          insideNonSemiColonValues = true;
          break;
        }
      }
      if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideNonNestedAtRule && parenLevel === 0) {
        this.print_string(':');
        if (!insidePropertyValue) {
          insidePropertyValue = true;
          this._output.space_before_token = true;
          this.eatWhitespace(true);
          this.indent();
        }
      } else {
        if (this._input.lookBack(" ")) {
          this._output.space_before_token = true;
        }
        if (this._input.peek() === ":") {
          this._ch = this._input.next();
          this.print_string("::");
        } else {
          this.print_string(':');
        }
      }
    } else if (this._ch === '"' || this._ch === '\'') {
      var preserveQuoteSpace = previous_ch === '"' || previous_ch === '\'';
      this.preserveSingleSpace(preserveQuoteSpace || isAfterSpace);
      this.print_string(this._ch + this.eatString(this._ch));
      this.eatWhitespace(true);
    } else if (this._ch === ';') {
      insideNonSemiColonValues = false;
      if (parenLevel === 0) {
        if (insidePropertyValue) {
          this.outdent();
          insidePropertyValue = false;
        }
        insideNonNestedAtRule = false;
        this.print_string(this._ch);
        this.eatWhitespace(true);
        if (this._input.peek() !== '/') {
          this._output.add_new_line();
        }
      } else {
        this.print_string(this._ch);
        this.eatWhitespace(true);
        this._output.space_before_token = true;
      }
    } else if (this._ch === '(') {
      if (this._input.lookBack("url")) {
        this.print_string(this._ch);
        this.eatWhitespace();
        parenLevel++;
        this.indent();
        this._ch = this._input.next();
        if (this._ch === ')' || this._ch === '"' || this._ch === '\'') {
          this._input.back();
        } else if (this._ch) {
          this.print_string(this._ch + this.eatString(')'));
          if (parenLevel) {
            parenLevel--;
            this.outdent();
          }
        }
      } else {
        var space_needed = false;
        if (this._input.lookBack("with")) {
          space_needed = true;
        }
        this.preserveSingleSpace(isAfterSpace || space_needed);
        this.print_string(this._ch);
        if (insidePropertyValue && previous_ch === "$" && this._options.selector_separator_newline) {
          this._output.add_new_line();
          insideScssMap = true;
        } else {
          this.eatWhitespace();
          parenLevel++;
          this.indent();
        }
      }
    } else if (this._ch === ')') {
      if (parenLevel) {
        parenLevel--;
        this.outdent();
      }
      if (insideScssMap && this._input.peek() === ";" && this._options.selector_separator_newline) {
        insideScssMap = false;
        this.outdent();
        this._output.add_new_line();
      }
      this.print_string(this._ch);
    } else if (this._ch === ',') {
      this.print_string(this._ch);
      this.eatWhitespace(true);
      if (this._options.selector_separator_newline && (!insidePropertyValue || insideScssMap) && parenLevel === 0 && !insideNonNestedAtRule) {
        this._output.add_new_line();
      } else {
        this._output.space_before_token = true;
      }
    } else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !insidePropertyValue && parenLevel === 0) {
      if (this._options.space_around_combinator) {
        this._output.space_before_token = true;
        this.print_string(this._ch);
        this._output.space_before_token = true;
      } else {
        this.print_string(this._ch);
        this.eatWhitespace();
        if (this._ch && whitespaceChar.test(this._ch)) {
          this._ch = '';
        }
      }
    } else if (this._ch === ']') {
      this.print_string(this._ch);
    } else if (this._ch === '[') {
      this.preserveSingleSpace(isAfterSpace);
      this.print_string(this._ch);
    } else if (this._ch === '=') {
      this.eatWhitespace();
      this.print_string('=');
      if (whitespaceChar.test(this._ch)) {
        this._ch = '';
      }
    } else if (this._ch === '!' && !this._input.lookBack("\\")) {
      this._output.space_before_token = true;
      this.print_string(this._ch);
    } else {
      var preserveAfterSpace = previous_ch === '"' || previous_ch === '\'';
      this.preserveSingleSpace(preserveAfterSpace || isAfterSpace);
      this.print_string(this._ch);
      if (!this._output.just_added_newline() && this._input.peek() === '\n' && insideNonSemiColonValues) {
        this._output.add_new_line();
      }
    }
  }
  var sweetCode = this._output.get_code(eol);
  return sweetCode;
};
module.exports.Beautifier = Beautifier;
 }),
 (function(module, __unused_webpack_exports, __webpack_require__) {
var BaseOptions = (__webpack_require__(6).Options);
function Options(options) {
  BaseOptions.call(this, options, 'css');
  this.selector_separator_newline = this._get_boolean('selector_separator_newline', true);
  this.newline_between_rules = this._get_boolean('newline_between_rules', true);
  var space_around_selector_separator = this._get_boolean('space_around_selector_separator');
  this.space_around_combinator = this._get_boolean('space_around_combinator') || space_around_selector_separator;
  var brace_style_split = this._get_selection_list('brace_style', ['collapse', 'expand', 'end-expand', 'none', 'preserve-inline']);
  this.brace_style = 'collapse';
  for (var bs = 0; bs < brace_style_split.length; bs++) {
    if (brace_style_split[bs] !== 'expand') {
      this.brace_style = 'collapse';
    } else {
      this.brace_style = brace_style_split[bs];
    }
  }
}
Options.prototype = new BaseOptions();
module.exports.Options = Options;
 })
 	]);
 	var __webpack_module_cache__ = {};
 	function __webpack_require__(moduleId) {
 		var cachedModule = __webpack_module_cache__[moduleId];
 		if (cachedModule !== undefined) {
 			return cachedModule.exports;
 		}
 		var module = __webpack_module_cache__[moduleId] = {
 			exports: {}
 		};
 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
 		return module.exports;
 	}
 	var __webpack_exports__ = __webpack_require__(15);
 	legacy_beautify_css = __webpack_exports__;
 })()
;
var css_beautify = legacy_beautify_css;

function format(document, range, options) {
    let value = document.getText();
    let includesEnd = true;
    let initialIndentLevel = 0;
    let inRule = false;
    const tabSize = options.tabSize || 4;
    if (range) {
        let startOffset = document.offsetAt(range.start);
        let extendedStart = startOffset;
        while (extendedStart > 0 && isWhitespace(value, extendedStart - 1)) {
            extendedStart--;
        }
        if (extendedStart === 0 || isEOL(value, extendedStart - 1)) {
            startOffset = extendedStart;
        }
        else {
            if (extendedStart < startOffset) {
                startOffset = extendedStart + 1;
            }
        }
        let endOffset = document.offsetAt(range.end);
        let extendedEnd = endOffset;
        while (extendedEnd < value.length && isWhitespace(value, extendedEnd)) {
            extendedEnd++;
        }
        if (extendedEnd === value.length || isEOL(value, extendedEnd)) {
            endOffset = extendedEnd;
        }
        range = Range$1.create(document.positionAt(startOffset), document.positionAt(endOffset));
        inRule = isInRule(value, startOffset);
        includesEnd = endOffset === value.length;
        value = value.substring(startOffset, endOffset);
        if (startOffset !== 0) {
            const startOfLineOffset = document.offsetAt(Position$1.create(range.start.line, 0));
            initialIndentLevel = computeIndentLevel(document.getText(), startOfLineOffset, options);
        }
        if (inRule) {
            value = `{\n${trimLeft(value)}`;
        }
    }
    else {
        range = Range$1.create(Position$1.create(0, 0), document.positionAt(value.length));
    }
    const cssOptions = {
        indent_size: tabSize,
        indent_char: options.insertSpaces ? ' ' : '\t',
        end_with_newline: includesEnd && getFormatOption(options, 'insertFinalNewline', false),
        selector_separator_newline: getFormatOption(options, 'newlineBetweenSelectors', true),
        newline_between_rules: getFormatOption(options, 'newlineBetweenRules', true),
        space_around_selector_separator: getFormatOption(options, 'spaceAroundSelectorSeparator', false),
        brace_style: getFormatOption(options, 'braceStyle', 'collapse'),
        indent_empty_lines: getFormatOption(options, 'indentEmptyLines', false),
        max_preserve_newlines: getFormatOption(options, 'maxPreserveNewLines', undefined),
        preserve_newlines: getFormatOption(options, 'preserveNewLines', true),
        wrap_line_length: getFormatOption(options, 'wrapLineLength', undefined),
        eol: '\n'
    };
    let result = css_beautify(value, cssOptions);
    if (inRule) {
        result = trimLeft(result.substring(2));
    }
    if (initialIndentLevel > 0) {
        const indent = options.insertSpaces ? repeat(' ', tabSize * initialIndentLevel) : repeat('\t', initialIndentLevel);
        result = result.split('\n').join('\n' + indent);
        if (range.start.character === 0) {
            result = indent + result;
        }
    }
    return [{
            range: range,
            newText: result
        }];
}
function trimLeft(str) {
    return str.replace(/^\s+/, '');
}
const _CUL = '{'.charCodeAt(0);
const _CUR = '}'.charCodeAt(0);
function isInRule(str, offset) {
    while (offset >= 0) {
        const ch = str.charCodeAt(offset);
        if (ch === _CUL) {
            return true;
        }
        else if (ch === _CUR) {
            return false;
        }
        offset--;
    }
    return false;
}
function getFormatOption(options, key, dflt) {
    if (options && options.hasOwnProperty(key)) {
        const value = options[key];
        if (value !== null) {
            return value;
        }
    }
    return dflt;
}
function computeIndentLevel(content, offset, options) {
    let i = offset;
    let nChars = 0;
    const tabSize = options.tabSize || 4;
    while (i < content.length) {
        const ch = content.charAt(i);
        if (ch === ' ') {
            nChars++;
        }
        else if (ch === '\t') {
            nChars += tabSize;
        }
        else {
            break;
        }
        i++;
    }
    return Math.floor(nChars / tabSize);
}
function isEOL(text, offset) {
    return '\r\n'.indexOf(text.charAt(offset)) !== -1;
}
function isWhitespace(text, offset) {
    return ' \t'.indexOf(text.charAt(offset)) !== -1;
}

const cssData = {
    "version": 1.1,
    "properties": [
        {
            "name": "additive-symbols",
            "browsers": [
                "FF33"
            ],
            "atRule": "@counter-style",
            "syntax": "[ <integer [0,∞]> && <symbol> ]#",
            "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",
            "browsers": [
                "E12",
                "FF28",
                "FFA28",
                "S9",
                "SM9",
                "C29",
                "CA29",
                "IE11",
                "O16"
            ],
            "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."
                },
                {
                    "name": "start"
                },
                {
                    "name": "end"
                },
                {
                    "name": "normal"
                },
                {
                    "name": "baseline"
                },
                {
                    "name": "first baseline"
                },
                {
                    "name": "last baseline"
                },
                {
                    "name": "space-around"
                },
                {
                    "name": "space-between"
                },
                {
                    "name": "space-evenly"
                },
                {
                    "name": "stretch"
                },
                {
                    "name": "safe"
                },
                {
                    "name": "unsafe"
                }
            ],
            "syntax": "normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>",
            "relevance": 67,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/align-content"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "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",
            "browsers": [
                "E12",
                "FF20",
                "FFA20",
                "S9",
                "SM9",
                "C29",
                "CA29",
                "IE11",
                "O16"
            ],
            "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."
                },
                {
                    "name": "normal"
                },
                {
                    "name": "start"
                },
                {
                    "name": "end"
                },
                {
                    "name": "self-start"
                },
                {
                    "name": "self-end"
                },
                {
                    "name": "first baseline"
                },
                {
                    "name": "last baseline"
                },
                {
                    "name": "stretch"
                },
                {
                    "name": "safe"
                },
                {
                    "name": "unsafe"
                }
            ],
            "syntax": "normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]",
            "relevance": 88,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/align-items"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Aligns flex items along the cross axis of the current line of the flex container.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "justify-items",
            "browsers": [
                "E12",
                "FF20",
                "FFA20",
                "S9",
                "SM9",
                "C52",
                "CA52",
                "IE11",
                "O12.1"
            ],
            "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": "safe"
                },
                {
                    "name": "unsafe"
                },
                {
                    "name": "legacy"
                }
            ],
            "syntax": "normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]",
            "relevance": 57,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/justify-items"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2016-07-27",
                "baseline_high_date": "2019-01-27"
            },
            "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",
            "browsers": [
                "E16",
                "FF45",
                "FFA45",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "IE10",
                "O44"
            ],
            "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 | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]",
            "relevance": 56,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/justify-self"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "Defines the way of justifying a box inside its container along the appropriate axis.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "align-self",
            "browsers": [
                "E12",
                "FF20",
                "FFA20",
                "S9",
                "SM9",
                "C29",
                "CA29",
                "IE10",
                "O12.1"
            ],
            "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": "normal"
                },
                {
                    "name": "self-end"
                },
                {
                    "name": "self-start"
                },
                {
                    "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."
                },
                {
                    "name": "baseline"
                },
                {
                    "name": "first baseline"
                },
                {
                    "name": "last baseline"
                },
                {
                    "name": "safe"
                },
                {
                    "name": "unsafe"
                }
            ],
            "syntax": "auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>",
            "relevance": 75,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/align-self"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Allows the default alignment along the cross axis to be overridden for individual flex items.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "all",
            "browsers": [
                "E79",
                "FF27",
                "FFA27",
                "S9.1",
                "SM9.3",
                "C37",
                "CA37",
                "O24"
            ],
            "values": [],
            "syntax": "initial | inherit | unset | revert | revert-layer",
            "relevance": 56,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/all"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "alt",
            "values": [],
            "relevance": 50,
            "baseline": {
                "status": "false"
            },
            "description": "Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",
            "restrictions": [
                "string",
                "enum"
            ]
        },
        {
            "name": "animation",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "IE10",
                "O30"
            ],
            "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": "<single-animation>#",
            "relevance": 83,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Shorthand property combines six of the animation properties into a single property.",
            "restrictions": [
                "time",
                "timing-function",
                "enum",
                "identifier",
                "number"
            ]
        },
        {
            "name": "animation-delay",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "IE10",
                "O30"
            ],
            "syntax": "<time>#",
            "relevance": 67,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-delay"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Defines when the animation will start.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "animation-direction",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "IE10",
                "O30"
            ],
            "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": "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": "<single-animation-direction>#",
            "relevance": 58,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-direction"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "animation-duration",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "IE10",
                "O30"
            ],
            "syntax": "<time>#",
            "relevance": 72,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-duration"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Defines the length of time that an animation takes to complete one cycle.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "animation-fill-mode",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "IE10",
                "O30"
            ],
            "values": [
                {
                    "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": "none",
                    "description": "There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."
                }
            ],
            "syntax": "<single-animation-fill-mode>#",
            "relevance": 65,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Defines what values are applied by the animation outside the time it is executing.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "animation-iteration-count",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "IE10",
                "O30"
            ],
            "values": [
                {
                    "name": "infinite",
                    "description": "Causes the animation to repeat forever."
                }
            ],
            "syntax": "<single-animation-iteration-count>#",
            "relevance": 66,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",
            "restrictions": [
                "number",
                "enum"
            ]
        },
        {
            "name": "animation-name",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "IE10",
                "O30"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No animation is performed"
                }
            ],
            "syntax": "[ none | <keyframes-name> ]#",
            "relevance": 71,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-name"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",
            "restrictions": [
                "identifier",
                "enum"
            ]
        },
        {
            "name": "animation-play-state",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "IE10",
                "O30"
            ],
            "values": [
                {
                    "name": "paused",
                    "description": "A running animation will be paused."
                },
                {
                    "name": "running",
                    "description": "Resume playback of a paused animation."
                }
            ],
            "syntax": "<single-animation-play-state>#",
            "relevance": 55,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-play-state"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Defines whether the animation is running or paused.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "animation-timing-function",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "IE10",
                "O30"
            ],
            "syntax": "<easing-function>#",
            "relevance": 73,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-timing-function"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Describes how the animation will progress over one cycle of its duration.",
            "restrictions": [
                "timing-function"
            ]
        },
        {
            "name": "backface-visibility",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S15.4",
                "SM15.4",
                "C36",
                "CA36",
                "IE10",
                "O23"
            ],
            "values": [
                {
                    "name": "hidden",
                    "description": "Back side is hidden."
                },
                {
                    "name": "visible",
                    "description": "Back side is visible."
                }
            ],
            "syntax": "visible | hidden",
            "relevance": 59,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/backface-visibility"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            },
            "description": "Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "background",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [
                {
                    "name": "fixed",
                    "description": "The background is fixed with regard to the viewport. In paged media where there is no viewport, a 'fixed' background is fixed with respect to the page box and therefore replicated on every page."
                },
                {
                    "name": "local",
                    "description": "The background is fixed with regard to the element's contents: if the element has a scrolling mechanism, the background scrolls with the element's contents."
                },
                {
                    "name": "none",
                    "description": "A value of 'none' counts as an image layer but draws nothing."
                },
                {
                    "name": "scroll",
                    "description": "The background is fixed with regard to the element itself and does not scroll with its contents. (It is effectively attached to the element's border.)"
                }
            ],
            "syntax": "[ <bg-layer> , ]* <final-bg-layer>",
            "relevance": 93,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/background"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property for setting most background properties at the same place in the style sheet.",
            "restrictions": [
                "enum",
                "image",
                "color",
                "position",
                "length",
                "repeat",
                "percentage",
                "box"
            ]
        },
        {
            "name": "background-attachment",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM3.2",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [
                {
                    "name": "fixed",
                    "description": "The background is fixed with regard to the viewport. In paged media where there is no viewport, a 'fixed' background is fixed with respect to the page box and therefore replicated on every page."
                },
                {
                    "name": "local",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM3.2",
                        "C1",
                        "CA18",
                        "IE4",
                        "O3.5"
                    ],
                    "description": "The background is fixed with regard to the element's contents: if the element has a scrolling mechanism, the background scrolls with the element's contents."
                },
                {
                    "name": "scroll",
                    "description": "The background is fixed with regard to the element itself and does not scroll with its contents. (It is effectively attached to the element's border.)"
                }
            ],
            "syntax": "<attachment>#",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/background-attachment"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies whether the background images are fixed with regard to the viewport ('fixed') or scroll along with the element ('scroll') or its contents ('local').",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "background-blend-mode",
            "browsers": [
                "E79",
                "FF30",
                "FFA30",
                "S8",
                "SM8",
                "C35",
                "CA35",
                "O22"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "Default attribute which specifies no blending"
                },
                {
                    "name": "multiply",
                    "description": "The source color is multiplied by the destination color and replaces the destination."
                },
                {
                    "name": "screen",
                    "description": "Multiplies the complements of the backdrop and source color values, then complements the result."
                },
                {
                    "name": "overlay",
                    "description": "Multiplies or screens the colors, depending on the backdrop color value."
                },
                {
                    "name": "darken",
                    "description": "Selects the darker of the backdrop and source colors."
                },
                {
                    "name": "lighten",
                    "description": "Selects the lighter of the backdrop and source colors."
                },
                {
                    "name": "color-dodge",
                    "description": "Brightens the backdrop color to reflect the source color."
                },
                {
                    "name": "color-burn",
                    "description": "Darkens the backdrop color to reflect the source color."
                },
                {
                    "name": "hard-light",
                    "description": "Multiplies or screens the colors, depending on the source color value."
                },
                {
                    "name": "soft-light",
                    "description": "Darkens or lightens the colors, depending on the source color value."
                },
                {
                    "name": "difference",
                    "description": "Subtracts the darker of the two constituent colors from the lighter color.."
                },
                {
                    "name": "exclusion",
                    "description": "Produces an effect similar to that of the Difference mode but lower in contrast."
                },
                {
                    "name": "hue",
                    "browsers": [
                        "E79",
                        "FF30",
                        "FFA30",
                        "S8",
                        "SM8",
                        "C35",
                        "CA35",
                        "O22"
                    ],
                    "description": "Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color."
                },
                {
                    "name": "saturation",
                    "browsers": [
                        "E79",
                        "FF30",
                        "FFA30",
                        "S8",
                        "SM8",
                        "C35",
                        "CA35",
                        "O22"
                    ],
                    "description": "Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color."
                },
                {
                    "name": "color",
                    "browsers": [
                        "E79",
                        "FF30",
                        "FFA30",
                        "S8",
                        "SM8",
                        "C35",
                        "CA35",
                        "O22"
                    ],
                    "description": "Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color."
                },
                {
                    "name": "luminosity",
                    "browsers": [
                        "E79",
                        "FF30",
                        "FFA30",
                        "S8",
                        "SM8",
                        "C35",
                        "CA35",
                        "O22"
                    ],
                    "description": "Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color."
                }
            ],
            "syntax": "<blend-mode>#",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/background-blend-mode"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Defines the blending mode of each background layer.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "background-clip",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM5",
                "C1",
                "CA18",
                "IE9",
                "O10.5"
            ],
            "syntax": "<bg-clip>#",
            "relevance": 70,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/background-clip"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Determines the background painting area.",
            "restrictions": [
                "box"
            ]
        },
        {
            "name": "background-color",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<color>",
            "relevance": 94,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/background-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the background color of an element.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "background-image",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Counts as an image layer but draws nothing."
                }
            ],
            "syntax": "<bg-image>#",
            "relevance": 89,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/background-image"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the background image(s) of an element.",
            "restrictions": [
                "image",
                "enum"
            ]
        },
        {
            "name": "background-origin",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S3",
                "SM1",
                "C1",
                "CA18",
                "IE9",
                "O10.5"
            ],
            "syntax": "<visual-box>#",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/background-origin"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",
            "restrictions": [
                "box"
            ]
        },
        {
            "name": "background-position",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<bg-position>#",
            "relevance": 87,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/background-position"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies the initial position of the background image(s) (after any resizing) within their corresponding background positioning area.",
            "restrictions": [
                "position",
                "length",
                "percentage"
            ]
        },
        {
            "name": "background-position-x",
            "browsers": [
                "E12",
                "FF49",
                "FFA49",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE6",
                "O15"
            ],
            "values": [
                {
                    "name": "center",
                    "description": "Equivalent 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."
                },
                {
                    "name": "left",
                    "description": "Equivalent 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."
                },
                {
                    "name": "right",
                    "description": "Equivalent 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."
                }
            ],
            "syntax": "[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#",
            "relevance": 56,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/background-position-x"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2016-09-20",
                "baseline_high_date": "2019-03-20"
            },
            "description": "If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "background-position-y",
            "browsers": [
                "E12",
                "FF49",
                "FFA49",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE6",
                "O15"
            ],
            "values": [
                {
                    "name": "bottom",
                    "description": "Equivalent 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."
                },
                {
                    "name": "center",
                    "description": "Equivalent 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."
                },
                {
                    "name": "top",
                    "description": "Equivalent 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."
                }
            ],
            "syntax": "[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/background-position-y"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2016-09-20",
                "baseline_high_date": "2019-03-20"
            },
            "description": "If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "background-repeat",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [],
            "syntax": "<repeat-style>#",
            "relevance": 86,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/background-repeat"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies how background images are tiled after they have been sized and positioned.",
            "restrictions": [
                "repeat"
            ]
        },
        {
            "name": "background-size",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2",
                "C3",
                "CA18",
                "IE9",
                "O10"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Resolved by using the image's intrinsic ratio and the size of the other dimension, or failing that, using the image's intrinsic size, or failing that, treating it as 100%."
                },
                {
                    "name": "contain",
                    "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."
                },
                {
                    "name": "cover",
                    "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."
                }
            ],
            "syntax": "<bg-size>#",
            "relevance": 86,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/background-size"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies the size of the background images.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "behavior",
            "browsers": [
                "IE6"
            ],
            "relevance": 50,
            "description": "IE only. Used to extend behaviors of the browser.",
            "restrictions": [
                "url"
            ]
        },
        {
            "name": "block-size",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Depends on the values of other properties."
                }
            ],
            "syntax": "<'width'>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/block-size"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Size of an element in the direction opposite that of the direction specified by 'writing-mode'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "border",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<line-width> || <line-style> || <color>",
            "relevance": 95,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property for setting border width, style, and color.",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color"
            ]
        },
        {
            "name": "border-block-end",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-width'> || <'border-top-style'> || <color>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-bottom'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color"
            ]
        },
        {
            "name": "border-block-start",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-width'> || <'border-top-style'> || <color>",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-top'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color"
            ]
        },
        {
            "name": "border-block-end-color",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-color'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-bottom-color'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "border-block-start-color",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-color'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-top-color'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "border-block-end-style",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-style'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-bottom-style'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "line-style"
            ]
        },
        {
            "name": "border-block-start-style",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-style'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-top-style'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "line-style"
            ]
        },
        {
            "name": "border-block-end-width",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-width'>",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-bottom-width'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "border-block-start-width",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-width'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-top-width'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "border-bottom",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<line-width> || <line-style> || <color>",
            "relevance": 88,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property for setting border width, style and color.",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color"
            ]
        },
        {
            "name": "border-bottom-color",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<'border-top-color'>",
            "relevance": 70,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the color of the bottom border.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "border-bottom-left-radius",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2",
                "C4",
                "CA18",
                "IE9",
                "O10.5"
            ],
            "syntax": "<length-percentage>{1,2}",
            "relevance": 76,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Defines the radii of the bottom left outer border edge.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "border-bottom-right-radius",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2",
                "C4",
                "CA18",
                "IE9",
                "O10.5"
            ],
            "syntax": "<length-percentage>{1,2}",
            "relevance": 76,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Defines the radii of the bottom right outer border edge.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "border-bottom-style",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE5.5",
                "O9.2"
            ],
            "syntax": "<line-style>",
            "relevance": 59,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the style of the bottom border.",
            "restrictions": [
                "line-style"
            ]
        },
        {
            "name": "border-bottom-width",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<line-width>",
            "relevance": 64,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the thickness of the bottom border.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "border-collapse",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1.1",
                "SM1",
                "C1",
                "CA18",
                "IE5",
                "O4"
            ],
            "values": [
                {
                    "name": "collapse",
                    "description": "Selects the collapsing borders model."
                },
                {
                    "name": "separate",
                    "description": "Selects the separated borders border model."
                }
            ],
            "syntax": "collapse | separate",
            "relevance": 74,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-collapse"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Selects a table's border model.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "border-color",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [],
            "syntax": "<color>{1,4}",
            "relevance": 88,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "The color of the border around all four edges of an element.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "border-image",
            "browsers": [
                "E12",
                "FF15",
                "FFA15",
                "S6",
                "SM6",
                "C16",
                "CA18",
                "IE11",
                "O11"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
                },
                {
                    "name": "fill",
                    "description": "Causes the middle part of the border-image to be preserved."
                },
                {
                    "name": "none",
                    "description": "Use the border styles."
                },
                {
                    "name": "repeat",
                    "description": "The image is tiled (repeated) to fill the area."
                },
                {
                    "name": "round",
                    "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
                },
                {
                    "name": "space",
                    "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
                },
                {
                    "name": "stretch",
                    "description": "The image is stretched to fill the area."
                },
                {
                    "name": "url()"
                }
            ],
            "syntax": "<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>",
            "relevance": 52,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-image"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",
            "restrictions": [
                "length",
                "percentage",
                "number",
                "url",
                "enum"
            ]
        },
        {
            "name": "border-image-outset",
            "browsers": [
                "E12",
                "FF15",
                "FFA15",
                "S6",
                "SM6",
                "C15",
                "CA18",
                "IE11",
                "O15"
            ],
            "syntax": "[ <length> | <number> ]{1,4}",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-outset"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "The values specify the amount by which the border image area extends beyond the border box on the top, right, bottom, and left sides respectively. If the fourth value is absent, it is the same as the second. If the third one is also absent, it is the same as the first. If the second one is also absent, it is the same as the first. Numbers represent multiples of the corresponding border-width.",
            "restrictions": [
                "length",
                "number"
            ]
        },
        {
            "name": "border-image-repeat",
            "browsers": [
                "E12",
                "FF15",
                "FFA15",
                "S6",
                "SM9.3",
                "C15",
                "CA18",
                "IE11",
                "O15"
            ],
            "values": [
                {
                    "name": "repeat",
                    "description": "The image is tiled (repeated) to fill the area."
                },
                {
                    "name": "round",
                    "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
                },
                {
                    "name": "space",
                    "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
                },
                {
                    "name": "stretch",
                    "description": "The image is stretched to fill the area."
                }
            ],
            "syntax": "[ stretch | repeat | round | space ]{1,2}",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-repeat"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2016-03-21",
                "baseline_high_date": "2018-09-21"
            },
            "description": "Specifies how the images for the sides and the middle part of the border image are scaled and tiled. If the second keyword is absent, it is assumed to be the same as the first.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "border-image-slice",
            "browsers": [
                "E12",
                "FF15",
                "FFA15",
                "S6",
                "SM6",
                "C15",
                "CA18",
                "IE11",
                "O15"
            ],
            "values": [
                {
                    "name": "fill",
                    "description": "Causes the middle part of the border-image to be preserved."
                }
            ],
            "syntax": "<number-percentage>{1,4} && fill?",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-slice"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies inward offsets from the top, right, bottom, and left edges of the image, dividing it into nine regions: four corners, four edges and a middle.",
            "restrictions": [
                "number",
                "percentage"
            ]
        },
        {
            "name": "border-image-source",
            "browsers": [
                "E12",
                "FF15",
                "FFA15",
                "S6",
                "SM6",
                "C15",
                "CA18",
                "IE11",
                "O15"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Use the border styles."
                }
            ],
            "syntax": "none | <image>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-source"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies an image to use instead of the border styles given by the 'border-style' properties and as an additional background layer for the element. If the value is 'none' or if the image cannot be displayed, the border styles will be used.",
            "restrictions": [
                "image"
            ]
        },
        {
            "name": "border-image-width",
            "browsers": [
                "E12",
                "FF13",
                "FFA14",
                "S6",
                "SM6",
                "C16",
                "CA18",
                "IE11",
                "O15"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
                }
            ],
            "syntax": "[ <length-percentage> | <number> | auto ]{1,4}",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "The four values of 'border-image-width' specify offsets that are used to divide the border image area into nine parts. They represent inward distances from the top, right, bottom, and left sides of the area, respectively.",
            "restrictions": [
                "length",
                "percentage",
                "number"
            ]
        },
        {
            "name": "border-inline-end",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-width'> || <'border-top-style'> || <color>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-right'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color"
            ]
        },
        {
            "name": "border-inline-start",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-width'> || <'border-top-style'> || <color>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-left'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color"
            ]
        },
        {
            "name": "border-inline-end-color",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-color'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-right-color'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "border-inline-start-color",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-color'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-left-color'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "border-inline-end-style",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-style'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-right-style'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "line-style"
            ]
        },
        {
            "name": "border-inline-start-style",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-style'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-left-style'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "line-style"
            ]
        },
        {
            "name": "border-inline-end-width",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-width'>",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-right-width'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "border-inline-start-width",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'border-top-width'>",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'border-left-width'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "border-left",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<line-width> || <line-style> || <color>",
            "relevance": 82,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-left"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property for setting border width, style and color",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color"
            ]
        },
        {
            "name": "border-left-color",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<color>",
            "relevance": 67,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the color of the left border.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "border-left-style",
            "browsers": [
                "E12",
                "FF1",
                "FFA14",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE5.5",
                "O9.2"
            ],
            "syntax": "<line-style>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the style of the left border.",
            "restrictions": [
                "line-style"
            ]
        },
        {
            "name": "border-left-width",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<line-width>",
            "relevance": 65,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the thickness of the left border.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "border-radius",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2",
                "C4",
                "CA18",
                "IE9",
                "O10.5"
            ],
            "syntax": "<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?",
            "relevance": 92,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-radius"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Defines the radii of the outer border edge.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "border-right",
            "browsers": [
                "E12",
                "FF1",
                "FFA14",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE5.5",
                "O9.2"
            ],
            "syntax": "<line-width> || <line-style> || <color>",
            "relevance": 81,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-right"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property for setting border width, style and color",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color"
            ]
        },
        {
            "name": "border-right-color",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<color>",
            "relevance": 66,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the color of the right border.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "border-right-style",
            "browsers": [
                "E12",
                "FF1",
                "FFA14",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE5.5",
                "O9.2"
            ],
            "syntax": "<line-style>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the style of the right border.",
            "restrictions": [
                "line-style"
            ]
        },
        {
            "name": "border-right-width",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<line-width>",
            "relevance": 64,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the thickness of the right border.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "border-spacing",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE8",
                "O4"
            ],
            "syntax": "<length> <length>?",
            "relevance": 66,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-spacing"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "The lengths specify the distance that separates adjoining cell borders. If one length is specified, it gives both the horizontal and vertical spacing. If two are specified, the first gives the horizontal spacing and the second the vertical spacing. Lengths may not be negative.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "border-style",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [],
            "syntax": "<line-style>{1,4}",
            "relevance": 80,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "The style of the border around edges of an element.",
            "restrictions": [
                "line-style"
            ]
        },
        {
            "name": "border-top",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<line-width> || <line-style> || <color>",
            "relevance": 86,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-top"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property for setting border width, style and color",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color"
            ]
        },
        {
            "name": "border-top-color",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<color>",
            "relevance": 71,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the color of the top border.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "border-top-left-radius",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2",
                "C4",
                "CA18",
                "IE9",
                "O10.5"
            ],
            "syntax": "<length-percentage>{1,2}",
            "relevance": 76,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Defines the radii of the top left outer border edge.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "border-top-right-radius",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM4.2",
                "C4",
                "CA18",
                "IE9",
                "O10.5"
            ],
            "syntax": "<length-percentage>{1,2}",
            "relevance": 76,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Defines the radii of the top right outer border edge.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "border-top-style",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE5.5",
                "O9.2"
            ],
            "syntax": "<line-style>",
            "relevance": 56,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the style of the top border.",
            "restrictions": [
                "line-style"
            ]
        },
        {
            "name": "border-top-width",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<line-width>",
            "relevance": 63,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the thickness of the top border.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "border-width",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM3",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [],
            "syntax": "<line-width>{1,4}",
            "relevance": 83,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand that sets the four 'border-*-width' properties. If it has four values, they set top, right, bottom and left in that order. If left is missing, it is the same as right; if bottom is missing, it is the same as top; if right is missing, it is the same as top.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "bottom",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE5",
                "O6"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
                }
            ],
            "syntax": "<length> | <percentage> | auto",
            "relevance": 90,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/bottom"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies how far an absolutely positioned box's bottom margin edge is offset above the bottom edge of the box's 'containing block'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "box-decoration-break",
            "browsers": [
                "E130",
                "FF32",
                "FFA32",
                "C130",
                "CA130",
                "O115"
            ],
            "values": [
                {
                    "name": "clone",
                    "description": "Each box is independently wrapped with the border and padding."
                },
                {
                    "name": "slice",
                    "description": "The effect is as though the element were rendered with no breaks present, and then sliced by the breaks afterward."
                }
            ],
            "syntax": "slice | clone",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/box-decoration-break"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Specifies whether individual boxes are treated as broken pieces of one continuous box, or whether each box is individually wrapped with the border and padding.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "box-shadow",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S5.1",
                "SM5",
                "C10",
                "CA18",
                "IE9",
                "O10.5"
            ],
            "values": [
                {
                    "name": "inset",
                    "description": "Changes the drop shadow from an outer shadow (one that shadows the box onto the canvas, as if it were lifted above the canvas) to an inner shadow (one that shadows the canvas onto the box, as if the box were cut out of the canvas and shifted behind it)."
                },
                {
                    "name": "none",
                    "description": "No shadow."
                }
            ],
            "syntax": "none | <shadow>#",
            "relevance": 90,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/box-shadow"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Attaches one or more drop-shadows to the box. The property is a comma-separated list of shadows, each specified by 2-4 length values, an optional color, and an optional 'inset' keyword. Omitted lengths are 0; omitted colors are a user agent chosen color.",
            "restrictions": [
                "length",
                "color",
                "enum"
            ]
        },
        {
            "name": "box-sizing",
            "browsers": [
                "E12",
                "FF29",
                "FFA29",
                "S5.1",
                "SM6",
                "C10",
                "CA18",
                "IE8",
                "O7"
            ],
            "values": [
                {
                    "name": "border-box",
                    "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
                },
                {
                    "name": "content-box",
                    "description": "Behavior of width and height as specified by CSS2.1. The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element."
                }
            ],
            "syntax": "content-box | border-box",
            "relevance": 92,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/box-sizing"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies the behavior of the 'width' and 'height' properties.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "break-after",
            "browsers": [
                "E12",
                "FF65",
                "FFA65",
                "S10",
                "SM10",
                "C50",
                "CA50",
                "IE10",
                "O37"
            ],
            "values": [
                {
                    "name": "always",
                    "description": "Always force a page break before/after the generated box."
                },
                {
                    "name": "auto",
                    "description": "Neither force nor forbid a page/column break before/after the principal box."
                },
                {
                    "name": "avoid",
                    "description": "Avoid a break before/after the principal box."
                },
                {
                    "name": "avoid-column",
                    "description": "Avoid a column break before/after the principal box."
                },
                {
                    "name": "avoid-page",
                    "description": "Avoid a page break before/after the principal box."
                },
                {
                    "name": "column",
                    "description": "Always force a column break before/after the principal box."
                },
                {
                    "name": "left",
                    "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
                },
                {
                    "name": "page",
                    "description": "Always force a page break before/after the principal box."
                },
                {
                    "name": "right",
                    "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
                }
            ],
            "syntax": "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/break-after"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2019-01-29",
                "baseline_high_date": "2021-07-29"
            },
            "description": "Describes the page/column/region break behavior after the generated box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "break-before",
            "browsers": [
                "E12",
                "FF65",
                "FFA65",
                "S10",
                "SM10",
                "C50",
                "CA50",
                "IE10",
                "O37"
            ],
            "values": [
                {
                    "name": "always",
                    "description": "Always force a page break before/after the generated box."
                },
                {
                    "name": "auto",
                    "description": "Neither force nor forbid a page/column break before/after the principal box."
                },
                {
                    "name": "avoid",
                    "description": "Avoid a break before/after the principal box."
                },
                {
                    "name": "avoid-column",
                    "description": "Avoid a column break before/after the principal box."
                },
                {
                    "name": "avoid-page",
                    "description": "Avoid a page break before/after the principal box."
                },
                {
                    "name": "column",
                    "description": "Always force a column break before/after the principal box."
                },
                {
                    "name": "left",
                    "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
                },
                {
                    "name": "page",
                    "description": "Always force a page break before/after the principal box."
                },
                {
                    "name": "right",
                    "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
                }
            ],
            "syntax": "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/break-before"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2019-01-29",
                "baseline_high_date": "2021-07-29"
            },
            "description": "Describes the page/column/region break behavior before the generated box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "break-inside",
            "browsers": [
                "E12",
                "FF65",
                "FFA65",
                "S10",
                "SM10",
                "C50",
                "CA50",
                "IE10",
                "O37"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Impose no additional breaking constraints within the box."
                },
                {
                    "name": "avoid",
                    "description": "Avoid breaks within the box."
                },
                {
                    "name": "avoid-column",
                    "description": "Avoid a column break within the box."
                },
                {
                    "name": "avoid-page",
                    "description": "Avoid a page break within the box."
                }
            ],
            "syntax": "auto | avoid | avoid-page | avoid-column | avoid-region",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/break-inside"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2019-01-29",
                "baseline_high_date": "2021-07-29"
            },
            "description": "Describes the page/column/region break behavior inside the principal box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "caption-side",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE8",
                "O4"
            ],
            "values": [
                {
                    "name": "bottom",
                    "description": "Positions the caption box below the table box."
                },
                {
                    "name": "top",
                    "description": "Positions the caption box above the table box."
                }
            ],
            "syntax": "top | bottom",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/caption-side"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies the position of the caption box with respect to the table box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "caret-color",
            "browsers": [
                "E79",
                "FF53",
                "FFA53",
                "S11.1",
                "SM11.3",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The user agent selects an appropriate color for the caret. This is generally currentcolor, but the user agent may choose a different color to ensure good visibility and contrast with the surrounding content, taking into account the value of currentcolor, the background, shadows, and other factors."
                }
            ],
            "syntax": "auto | <color>",
            "relevance": 56,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/caret-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Controls the color of the text insertion indicator.",
            "restrictions": [
                "color",
                "enum"
            ]
        },
        {
            "name": "clear",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [
                {
                    "name": "both",
                    "description": "The clearance of the generated box is set to the amount necessary to place the top border edge below the bottom outer edge of any right-floating and left-floating boxes that resulted from elements earlier in the source document."
                },
                {
                    "name": "left",
                    "description": "The clearance of the generated box is set to the amount necessary to place the top border edge below the bottom outer edge of any left-floating boxes that resulted from elements earlier in the source document."
                },
                {
                    "name": "none",
                    "description": "No constraint on the box's position with respect to floats."
                },
                {
                    "name": "right",
                    "description": "The clearance of the generated box is set to the amount necessary to place the top border edge below the bottom outer edge of any right-floating boxes that resulted from elements earlier in the source document."
                }
            ],
            "syntax": "none | left | right | both | inline-start | inline-end",
            "relevance": 82,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/clear"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Indicates which sides of an element's box(es) may not be adjacent to an earlier floating box. The 'clear' property does not consider floats inside the element itself or in other block formatting contexts.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "clip",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The element does not clip."
                },
                {
                    "name": "rect()",
                    "description": "Specifies offsets from the edges of the border box."
                }
            ],
            "status": "obsolete",
            "syntax": "<shape> | auto",
            "relevance": 25,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/clip"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Deprecated. Use the 'clip-path' property when support allows. Defines the visible portion of an element's box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "clip-path",
            "browsers": [
                "E79",
                "FF3.5",
                "FFA4",
                "S9.1",
                "SM9.3",
                "C55",
                "CA55",
                "IE10",
                "O42"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No clipping path gets created."
                },
                {
                    "name": "url()",
                    "description": "References a <clipPath> element to create a clipping path."
                }
            ],
            "syntax": "<clip-source> | [ <basic-shape> || <geometry-box> ] | none",
            "relevance": 67,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/clip-path"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Specifies a clipping path where everything inside the path is visible and everything outside is clipped out.",
            "restrictions": [
                "url",
                "shape",
                "geometry-box",
                "enum"
            ]
        },
        {
            "name": "clip-rule",
            "browsers": [
                "E79",
                "FF3.5",
                "FFA4",
                "S5",
                "SM4.2",
                "C15",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "evenodd",
                    "description": "Determines the 'insideness' of a point on the canvas by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses."
                },
                {
                    "name": "nonzero",
                    "description": "Determines the 'insideness' of a point on the canvas by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray."
                }
            ],
            "syntax": "nonzero | evenodd",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/clip-rule"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "color",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "syntax": "<color>",
            "relevance": 95,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the color of an element's text",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "color-interpolation-filters",
            "browsers": [
                "E79",
                "FF3",
                "FFA4",
                "S3",
                "SM2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Color operations are not required to occur in a particular color space."
                },
                {
                    "name": "linearRGB",
                    "description": "Color operations should occur in the linearized RGB color space."
                },
                {
                    "name": "sRGB",
                    "description": "Color operations should occur in the sRGB color space."
                }
            ],
            "syntax": "auto | sRGB | linearRGB",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/color-interpolation-filters"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Specifies the color space for imaging operations performed via filter effects.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "column-count",
            "browsers": [
                "E12",
                "FF52",
                "FFA52",
                "S9",
                "SM9",
                "C50",
                "CA50",
                "IE10",
                "O37"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Determines the number of columns by the 'column-width' property and the element width."
                }
            ],
            "syntax": "<integer> | auto",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/column-count"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-03-07",
                "baseline_high_date": "2019-09-07"
            },
            "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
            "restrictions": [
                "integer",
                "enum"
            ]
        },
        {
            "name": "column-fill",
            "browsers": [
                "E12",
                "FF52",
                "FFA52",
                "S9",
                "SM9",
                "C50",
                "CA50",
                "IE10",
                "O37"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Fills columns sequentially."
                },
                {
                    "name": "balance",
                    "description": "Balance content equally between columns, if possible."
                }
            ],
            "syntax": "auto | balance",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/column-fill"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-03-07",
                "baseline_high_date": "2019-09-07"
            },
            "description": "In continuous media, this property will only be consulted if the length of columns has been constrained. Otherwise, columns will automatically be balanced.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "column-gap",
            "browsers": [
                "E12",
                "FF1.5",
                "FFA4",
                "S3",
                "SM2",
                "C1",
                "CA18",
                "IE10",
                "O11.1"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "User agent specific and typically equivalent to 1em."
                }
            ],
            "syntax": "normal | <length-percentage>",
            "relevance": 65,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/column-gap"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
            "restrictions": [
                "length",
                "enum"
            ]
        },
        {
            "name": "column-rule",
            "browsers": [
                "E12",
                "FF52",
                "FFA52",
                "S9",
                "SM9",
                "C50",
                "CA50",
                "IE10",
                "O11.1"
            ],
            "syntax": "<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-03-07",
                "baseline_high_date": "2019-09-07"
            },
            "description": "Shorthand for setting 'column-rule-width', 'column-rule-style', and 'column-rule-color' at the same place in the style sheet. Omitted values are set to their initial values.",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color"
            ]
        },
        {
            "name": "column-rule-color",
            "browsers": [
                "E12",
                "FF52",
                "FFA52",
                "S9",
                "SM9",
                "C50",
                "CA50",
                "IE10",
                "O11.1"
            ],
            "syntax": "<color>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-03-07",
                "baseline_high_date": "2019-09-07"
            },
            "description": "Sets the color of the column rule",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "column-rule-style",
            "browsers": [
                "E12",
                "FF52",
                "FFA52",
                "S9",
                "SM9",
                "C50",
                "CA50",
                "IE10",
                "O11.1"
            ],
            "syntax": "<'border-style'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-03-07",
                "baseline_high_date": "2019-09-07"
            },
            "description": "Sets the style of the rule between columns of an element.",
            "restrictions": [
                "line-style"
            ]
        },
        {
            "name": "column-rule-width",
            "browsers": [
                "E12",
                "FF52",
                "FFA52",
                "S9",
                "SM9",
                "C50",
                "CA50",
                "IE10",
                "O11.1"
            ],
            "syntax": "<'border-width'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-03-07",
                "baseline_high_date": "2019-09-07"
            },
            "description": "Sets the width of the rule between columns. Negative values are not allowed.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "columns",
            "browsers": [
                "E12",
                "FF52",
                "FFA52",
                "S9",
                "SM9",
                "C50",
                "CA50",
                "IE10",
                "O11.1"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The width depends on the values of other properties."
                }
            ],
            "syntax": "<'column-width'> || <'column-count'>",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/columns"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-03-07",
                "baseline_high_date": "2019-09-07"
            },
            "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
            "restrictions": [
                "length",
                "integer",
                "enum"
            ]
        },
        {
            "name": "column-span",
            "browsers": [
                "E12",
                "FF71",
                "FFA79",
                "S9",
                "SM9",
                "C50",
                "CA50",
                "IE10",
                "O37"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "The element spans across all columns. Content in the normal flow that appears before the element is automatically balanced across all columns before the element appear."
                },
                {
                    "name": "none",
                    "description": "The element does not span multiple columns."
                }
            ],
            "syntax": "none | all",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/column-span"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "Describes the page/column break behavior after the generated box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "column-width",
            "browsers": [
                "E12",
                "FF50",
                "FFA50",
                "S9",
                "SM9",
                "C50",
                "CA50",
                "IE10",
                "O11.1"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The width depends on the values of other properties."
                }
            ],
            "syntax": "<length> | auto",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/column-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2016-11-15",
                "baseline_high_date": "2019-05-15"
            },
            "description": "Describes the width of columns in multicol elements.",
            "restrictions": [
                "length",
                "enum"
            ]
        },
        {
            "name": "contain",
            "browsers": [
                "E79",
                "FF69",
                "FFA79",
                "S15.4",
                "SM15.4",
                "C52",
                "CA52",
                "O39"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Indicates that the property has no effect."
                },
                {
                    "name": "strict",
                    "description": "Turns on all forms of containment for the element."
                },
                {
                    "name": "content",
                    "description": "All containment rules except size are applied to the element."
                },
                {
                    "name": "size",
                    "description": "For properties that can have effects on more than just an element and its descendants, those effects don't escape the containing element."
                },
                {
                    "name": "layout",
                    "description": "Turns on layout containment for the element."
                },
                {
                    "name": "style",
                    "description": "Turns on style containment for the element."
                },
                {
                    "name": "paint",
                    "description": "Turns on paint containment for the element."
                }
            ],
            "syntax": "none | strict | content | [ [ size || inline-size ] || layout || style || paint ]",
            "relevance": 59,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/contain"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            },
            "description": "Indicates that an element and its contents are, as much as possible, independent of the rest of the document tree.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "content",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE8",
                "O4"
            ],
            "values": [
                {
                    "name": "attr()",
                    "description": "The attr(n) function returns as a string the value of attribute n for the subject of the selector."
                },
                {
                    "name": "counter(name)",
                    "description": "Counters are denoted by identifiers (see the 'counter-increment' and 'counter-reset' properties)."
                },
                {
                    "name": "icon",
                    "description": "The (pseudo-)element is replaced in its entirety by the resource referenced by its 'icon' property, and treated as a replaced element."
                },
                {
                    "name": "none",
                    "description": "On elements, this inhibits the children of the element from being rendered as children of this element, as if the element was empty. On pseudo-elements it causes the pseudo-element to have no content."
                },
                {
                    "name": "normal",
                    "description": "See http://www.w3.org/TR/css3-content/#content for computation rules."
                },
                {
                    "name": "url()"
                }
            ],
            "syntax": "normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> ]+ ]?",
            "relevance": 90,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/content"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Determines which page-based occurrence of a given element is applied to a counter or string value.",
            "restrictions": [
                "string",
                "url"
            ]
        },
        {
            "name": "counter-increment",
            "browsers": [
                "E12",
                "FF1",
                "FFA25",
                "S3",
                "SM1",
                "C2",
                "CA18",
                "IE8",
                "O9.2"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "This element does not alter the value of any counters."
                }
            ],
            "syntax": "[ <counter-name> <integer>? ]+ | none",
            "relevance": 55,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/counter-increment"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Manipulate the value of existing counters.",
            "restrictions": [
                "identifier",
                "integer"
            ]
        },
        {
            "name": "counter-reset",
            "browsers": [
                "E12",
                "FF1",
                "FFA25",
                "S3",
                "SM1",
                "C2",
                "CA18",
                "IE8",
                "O9.2"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "The counter is not modified."
                }
            ],
            "syntax": "[ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/counter-reset"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Property accepts one or more names of counters (identifiers), each one optionally followed by an integer. The integer gives the value that the counter is set to on each occurrence of the element.",
            "restrictions": [
                "identifier",
                "integer"
            ]
        },
        {
            "name": "cursor",
            "browsers": [
                "E12",
                "FF1",
                "FFA95",
                "S1.2",
                "SM13.4",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "alias",
                    "description": "Indicates an alias of/shortcut to something is to be created. Often rendered as an arrow with a small curved arrow next to it."
                },
                {
                    "name": "all-scroll",
                    "description": "Indicates that the something can be scrolled in any direction. Often rendered as arrows pointing up, down, left, and right with a dot in the middle."
                },
                {
                    "name": "auto",
                    "description": "The UA determines the cursor to display based on the current context."
                },
                {
                    "name": "cell",
                    "description": "Indicates that a cell or set of cells may be selected. Often rendered as a thick plus-sign with a dot in the middle."
                },
                {
                    "name": "col-resize",
                    "description": "Indicates that the item/column can be resized horizontally. Often rendered as arrows pointing left and right with a vertical bar separating them."
                },
                {
                    "name": "context-menu",
                    "description": "A context menu is available for the object under the cursor. Often rendered as an arrow with a small menu-like graphic next to it."
                },
                {
                    "name": "copy",
                    "description": "Indicates something is to be copied. Often rendered as an arrow with a small plus sign next to it."
                },
                {
                    "name": "crosshair",
                    "description": "A simple crosshair (e.g., short line segments resembling a '+' sign). Often used to indicate a two dimensional bitmap selection mode."
                },
                {
                    "name": "default",
                    "description": "The platform-dependent default cursor. Often rendered as an arrow."
                },
                {
                    "name": "e-resize",
                    "description": "Indicates that east edge is to be moved."
                },
                {
                    "name": "ew-resize",
                    "description": "Indicates a bidirectional east-west resize cursor."
                },
                {
                    "name": "grab",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA95",
                        "S1.2",
                        "SM13.4",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Indicates that something can be grabbed."
                },
                {
                    "name": "grabbing",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA95",
                        "S1.2",
                        "SM13.4",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Indicates that something is being grabbed."
                },
                {
                    "name": "help",
                    "description": "Help is available for the object under the cursor. Often rendered as a question mark or a balloon."
                },
                {
                    "name": "move",
                    "description": "Indicates something is to be moved."
                },
                {
                    "name": "-moz-grab",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA95",
                        "S1.2",
                        "SM13.4",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Indicates that something can be grabbed."
                },
                {
                    "name": "-moz-grabbing",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA95",
                        "S1.2",
                        "SM13.4",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Indicates that something is being grabbed."
                },
                {
                    "name": "-moz-zoom-in",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA95",
                        "S1.2",
                        "SM13.4",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Indicates that something can be zoomed (magnified) in."
                },
                {
                    "name": "-moz-zoom-out",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA95",
                        "S1.2",
                        "SM13.4",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Indicates that something can be zoomed (magnified) out."
                },
                {
                    "name": "ne-resize",
                    "description": "Indicates that movement starts from north-east corner."
                },
                {
                    "name": "nesw-resize",
                    "description": "Indicates a bidirectional north-east/south-west cursor."
                },
                {
                    "name": "no-drop",
                    "description": "Indicates that the dragged item cannot be dropped at the current cursor location. Often rendered as a hand or pointer with a small circle with a line through it."
                },
                {
                    "name": "none",
                    "description": "No cursor is rendered for the element."
                },
                {
                    "name": "not-allowed",
                    "description": "Indicates that the requested action will not be carried out. Often rendered as a circle with a line through it."
                },
                {
                    "name": "n-resize",
                    "description": "Indicates that north edge is to be moved."
                },
                {
                    "name": "ns-resize",
                    "description": "Indicates a bidirectional north-south cursor."
                },
                {
                    "name": "nw-resize",
                    "description": "Indicates that movement starts from north-west corner."
                },
                {
                    "name": "nwse-resize",
                    "description": "Indicates a bidirectional north-west/south-east cursor."
                },
                {
                    "name": "pointer",
                    "description": "The cursor is a pointer that indicates a link."
                },
                {
                    "name": "progress",
                    "description": "A progress indicator. The program is performing some processing, but is different from 'wait' in that the user may still interact with the program. Often rendered as a spinning beach ball, or an arrow with a watch or hourglass."
                },
                {
                    "name": "row-resize",
                    "description": "Indicates that the item/row can be resized vertically. Often rendered as arrows pointing up and down with a horizontal bar separating them."
                },
                {
                    "name": "se-resize",
                    "description": "Indicates that movement starts from south-east corner."
                },
                {
                    "name": "s-resize",
                    "description": "Indicates that south edge is to be moved."
                },
                {
                    "name": "sw-resize",
                    "description": "Indicates that movement starts from south-west corner."
                },
                {
                    "name": "text",
                    "description": "Indicates text that may be selected. Often rendered as a vertical I-beam."
                },
                {
                    "name": "vertical-text",
                    "description": "Indicates vertical-text that may be selected. Often rendered as a horizontal I-beam."
                },
                {
                    "name": "wait",
                    "description": "Indicates that the program is busy and the user should wait. Often rendered as a watch or hourglass."
                },
                {
                    "name": "-webkit-grab",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA95",
                        "S1.2",
                        "SM13.4",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Indicates that something can be grabbed."
                },
                {
                    "name": "-webkit-grabbing",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA95",
                        "S1.2",
                        "SM13.4",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Indicates that something is being grabbed."
                },
                {
                    "name": "-webkit-zoom-in",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA95",
                        "S1.2",
                        "SM13.4",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Indicates that something can be zoomed (magnified) in."
                },
                {
                    "name": "-webkit-zoom-out",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA95",
                        "S1.2",
                        "SM13.4",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Indicates that something can be zoomed (magnified) out."
                },
                {
                    "name": "w-resize",
                    "description": "Indicates that west edge is to be moved."
                },
                {
                    "name": "zoom-in",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA95",
                        "S1.2",
                        "SM13.4",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Indicates that something can be zoomed (magnified) in."
                },
                {
                    "name": "zoom-out",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA95",
                        "S1.2",
                        "SM13.4",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Indicates that something can be zoomed (magnified) out."
                }
            ],
            "syntax": "[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]",
            "relevance": 92,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/cursor"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-12-07",
                "baseline_high_date": "2024-06-07"
            },
            "description": "Allows control over cursor appearance in an element",
            "restrictions": [
                "url",
                "number",
                "enum"
            ]
        },
        {
            "name": "direction",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C2",
                "CA18",
                "IE5.5",
                "O9.2"
            ],
            "values": [
                {
                    "name": "ltr",
                    "description": "Left-to-right direction."
                },
                {
                    "name": "rtl",
                    "description": "Right-to-left direction."
                }
            ],
            "syntax": "ltr | rtl",
            "relevance": 72,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/direction"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies the inline base direction or directionality of any bidi paragraph, embedding, isolate, or override established by the box. Note: for HTML content use the 'dir' attribute and 'bdo' element rather than this property.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "display",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "block",
                    "description": "The element generates a block-level box"
                },
                {
                    "name": "contents",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "The element itself does not generate any boxes, but its children and pseudo-elements still generate boxes as normal."
                },
                {
                    "name": "flex",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "The element generates a principal flex container box and establishes a flex formatting context."
                },
                {
                    "name": "flexbox",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
                },
                {
                    "name": "flow-root",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "The element generates a block container box, and lays out its contents using flow layout."
                },
                {
                    "name": "grid",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "The element generates a principal grid container box, and establishes a grid formatting context."
                },
                {
                    "name": "inline",
                    "description": "The element generates an inline-level box."
                },
                {
                    "name": "inline-block",
                    "description": "A block box, which itself is flowed as a single inline box, similar to a replaced element. The inside of an inline-block is formatted as a block box, and the box itself is formatted as an inline box."
                },
                {
                    "name": "inline-flex",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Inline-level flex container."
                },
                {
                    "name": "inline-flexbox",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Inline-level flex container. Standardized as 'inline-flex'"
                },
                {
                    "name": "inline-table",
                    "description": "Inline-level table wrapper box containing table box."
                },
                {
                    "name": "list-item",
                    "description": "One or more block boxes and one marker box."
                },
                {
                    "name": "-moz-box",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
                },
                {
                    "name": "-moz-deck",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ]
                },
                {
                    "name": "-moz-grid",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ]
                },
                {
                    "name": "-moz-grid-group",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ]
                },
                {
                    "name": "-moz-grid-line",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ]
                },
                {
                    "name": "-moz-groupbox",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ]
                },
                {
                    "name": "-moz-inline-box",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Inline-level flex container. Standardized as 'inline-flex'"
                },
                {
                    "name": "-moz-inline-grid",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ]
                },
                {
                    "name": "-moz-inline-stack",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ]
                },
                {
                    "name": "-moz-marker",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ]
                },
                {
                    "name": "-moz-popup",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ]
                },
                {
                    "name": "-moz-stack",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ]
                },
                {
                    "name": "-ms-flexbox",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
                },
                {
                    "name": "-ms-grid",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "The element generates a principal grid container box, and establishes a grid formatting context."
                },
                {
                    "name": "-ms-inline-flexbox",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Inline-level flex container. Standardized as 'inline-flex'"
                },
                {
                    "name": "-ms-inline-grid",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Inline-level grid container."
                },
                {
                    "name": "none",
                    "description": "The element and its descendants generates no boxes."
                },
                {
                    "name": "ruby",
                    "description": "The element generates a principal ruby container box, and establishes a ruby formatting context."
                },
                {
                    "name": "ruby-base"
                },
                {
                    "name": "ruby-base-container"
                },
                {
                    "name": "ruby-text"
                },
                {
                    "name": "ruby-text-container"
                },
                {
                    "name": "run-in",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "The element generates a run-in box. Run-in elements act like inlines or blocks, depending on the surrounding elements."
                },
                {
                    "name": "table",
                    "description": "The element generates a principal table wrapper box containing an additionally-generated table box, and establishes a table formatting context."
                },
                {
                    "name": "table-caption"
                },
                {
                    "name": "table-cell"
                },
                {
                    "name": "table-column"
                },
                {
                    "name": "table-column-group"
                },
                {
                    "name": "table-footer-group"
                },
                {
                    "name": "table-header-group"
                },
                {
                    "name": "table-row"
                },
                {
                    "name": "table-row-group"
                },
                {
                    "name": "-webkit-box",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
                },
                {
                    "name": "-webkit-flex",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "The element lays out its contents using flow layout (block-and-inline layout)."
                },
                {
                    "name": "-webkit-inline-box",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Inline-level flex container. Standardized as 'inline-flex'"
                },
                {
                    "name": "-webkit-inline-flex",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Inline-level flex container."
                }
            ],
            "syntax": "[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>",
            "relevance": 96,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/display"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "In combination with 'float' and 'position', determines the type of box or boxes that are generated for an element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "empty-cells",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1.2",
                "SM1",
                "C1",
                "CA18",
                "IE8",
                "O4"
            ],
            "values": [
                {
                    "name": "hide",
                    "description": "No borders or backgrounds are drawn around/behind empty cells."
                },
                {
                    "name": "-moz-show-background",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1.2",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE8",
                        "O4"
                    ]
                },
                {
                    "name": "show",
                    "description": "Borders and backgrounds are drawn around/behind empty cells (like normal cells)."
                }
            ],
            "syntax": "show | hide",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/empty-cells"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "In the separated borders model, this property controls the rendering of borders and backgrounds around cells that have no visible content.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "enable-background",
            "values": [
                {
                    "name": "accumulate",
                    "description": "If the ancestor container element has a property of new, then all graphics elements within the current container are rendered both on the parent's background image and onto the target."
                },
                {
                    "name": "new",
                    "description": "Create a new background image canvas. All children of the current container element can access the background, and they will be rendered onto both the parent's background image canvas in addition to the target device."
                }
            ],
            "relevance": 50,
            "description": "Deprecated. Use 'isolation' property instead when support allows. Specifies how the accumulation of the background image is managed.",
            "restrictions": [
                "integer",
                "length",
                "percentage",
                "enum"
            ]
        },
        {
            "name": "fallback",
            "browsers": [
                "FF33"
            ],
            "atRule": "@counter-style",
            "syntax": "<counter-style-name>",
            "relevance": 50,
            "description": "@counter-style descriptor. Specifies a fallback counter style to be used when the current counter style can't create a representation for a given counter value.",
            "restrictions": [
                "identifier"
            ]
        },
        {
            "name": "fill",
            "browsers": [
                "E15",
                "FF3",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "url()",
                    "description": "A URL reference to a paint server element, which is an element that defines a paint server: 'hatch', 'linearGradient', 'mesh', 'pattern', 'radialGradient' and 'solidcolor'."
                },
                {
                    "name": "none",
                    "description": "No paint is applied in this layer."
                }
            ],
            "syntax": "<paint>",
            "relevance": 80,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/fill"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Paints the interior of the given graphical element.",
            "restrictions": [
                "color",
                "enum",
                "url"
            ]
        },
        {
            "name": "fill-opacity",
            "browsers": [
                "E15",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "syntax": "<'opacity'>",
            "relevance": 55,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/fill-opacity"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Specifies the opacity of the painting operation used to paint the interior the current object.",
            "restrictions": [
                "number(0-1)"
            ]
        },
        {
            "name": "fill-rule",
            "browsers": [
                "E15",
                "FF3",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "evenodd",
                    "description": "Determines the 'insideness' of a point on the canvas by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses."
                },
                {
                    "name": "nonzero",
                    "description": "Determines the 'insideness' of a point on the canvas by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray."
                }
            ],
            "syntax": "nonzero | evenodd",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/fill-rule"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Indicates the algorithm (or winding rule) which is to be used to determine what parts of the canvas are included inside the shape.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "filter",
            "browsers": [
                "E12",
                "FF35",
                "FFA35",
                "S9.1",
                "SM9.3",
                "C53",
                "CA53",
                "O40"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No filter effects are applied."
                },
                {
                    "name": "blur()",
                    "description": "Applies a Gaussian blur to the input image."
                },
                {
                    "name": "brightness()",
                    "description": "Applies a linear multiplier to input image, making it appear more or less bright."
                },
                {
                    "name": "contrast()",
                    "description": "Adjusts the contrast of the input."
                },
                {
                    "name": "drop-shadow()",
                    "description": "Applies a drop shadow effect to the input image."
                },
                {
                    "name": "grayscale()",
                    "description": "Converts the input image to grayscale."
                },
                {
                    "name": "hue-rotate()",
                    "description": "Applies a hue rotation on the input image. "
                },
                {
                    "name": "invert()",
                    "description": "Inverts the samples in the input image."
                },
                {
                    "name": "opacity()",
                    "description": "Applies transparency to the samples in the input image."
                },
                {
                    "name": "saturate()",
                    "description": "Saturates the input image."
                },
                {
                    "name": "sepia()",
                    "description": "Converts the input image to sepia."
                },
                {
                    "name": "url()",
                    "browsers": [
                        "E12",
                        "FF35",
                        "FFA35",
                        "S9.1",
                        "SM9.3",
                        "C53",
                        "CA53",
                        "O40"
                    ],
                    "description": "A filter reference to a <filter> element."
                }
            ],
            "syntax": "none | <filter-value-list>",
            "relevance": 72,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/filter"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2016-09-07",
                "baseline_high_date": "2019-03-07"
            },
            "description": "Processes an element's rendering before it is displayed in the document, by applying one or more filter effects.",
            "restrictions": [
                "enum",
                "url"
            ]
        },
        {
            "name": "flex",
            "browsers": [
                "E12",
                "FF20",
                "FFA20",
                "S9",
                "SM9",
                "C29",
                "CA29",
                "IE11",
                "O12.1"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Retrieves the value of the main size property as the used 'flex-basis'."
                },
                {
                    "name": "content",
                    "browsers": [
                        "E12",
                        "FF20",
                        "FFA20",
                        "S9",
                        "SM9",
                        "C29",
                        "CA29",
                        "IE11",
                        "O12.1"
                    ],
                    "description": "Indicates automatic sizing, based on the flex item's content."
                },
                {
                    "name": "none",
                    "description": "Expands to '0 0 auto'."
                }
            ],
            "syntax": "none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]",
            "relevance": 82,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/flex"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Specifies the components of a flexible length: the flex grow factor and flex shrink factor, and the flex basis.",
            "restrictions": [
                "length",
                "number",
                "percentage"
            ]
        },
        {
            "name": "flex-basis",
            "browsers": [
                "E12",
                "FF22",
                "FFA22",
                "S9",
                "SM9",
                "C29",
                "CA29",
                "IE11",
                "O12.1"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Retrieves the value of the main size property as the used 'flex-basis'."
                },
                {
                    "name": "content",
                    "browsers": [
                        "E12",
                        "FF22",
                        "FFA22",
                        "S9",
                        "SM9",
                        "C29",
                        "CA29",
                        "IE11",
                        "O12.1"
                    ],
                    "description": "Indicates automatic sizing, based on the flex item's content."
                }
            ],
            "syntax": "content | <'width'>",
            "relevance": 70,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/flex-basis"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Sets the flex basis.",
            "restrictions": [
                "length",
                "number",
                "percentage"
            ]
        },
        {
            "name": "flex-direction",
            "browsers": [
                "E12",
                "FF20",
                "FFA20",
                "S9",
                "SM9",
                "C29",
                "CA29",
                "IE11",
                "O12.1"
            ],
            "values": [
                {
                    "name": "column",
                    "description": "The flex container's main axis has the same orientation as the block axis of the current writing mode."
                },
                {
                    "name": "column-reverse",
                    "description": "Same as 'column', except the main-start and main-end directions are swapped."
                },
                {
                    "name": "row",
                    "description": "The flex container's main axis has the same orientation as the inline axis of the current writing mode."
                },
                {
                    "name": "row-reverse",
                    "description": "Same as 'row', except the main-start and main-end directions are swapped."
                }
            ],
            "syntax": "row | row-reverse | column | column-reverse",
            "relevance": 86,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/flex-direction"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Specifies how flex items are placed in the flex container, by setting the direction of the flex container's main axis.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "flex-flow",
            "browsers": [
                "E12",
                "FF28",
                "FFA28",
                "S9",
                "SM9",
                "C29",
                "CA29",
                "IE11",
                "O12.1"
            ],
            "values": [
                {
                    "name": "column",
                    "description": "The flex container's main axis has the same orientation as the block axis of the current writing mode."
                },
                {
                    "name": "column-reverse",
                    "description": "Same as 'column', except the main-start and main-end directions are swapped."
                },
                {
                    "name": "nowrap",
                    "description": "The flex container is single-line."
                },
                {
                    "name": "row",
                    "description": "The flex container's main axis has the same orientation as the inline axis of the current writing mode."
                },
                {
                    "name": "row-reverse",
                    "description": "Same as 'row', except the main-start and main-end directions are swapped."
                },
                {
                    "name": "wrap",
                    "description": "The flexbox is multi-line."
                },
                {
                    "name": "wrap-reverse",
                    "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
                }
            ],
            "syntax": "<'flex-direction'> || <'flex-wrap'>",
            "relevance": 64,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/flex-flow"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Specifies how flexbox items are placed in the flexbox.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "flex-grow",
            "browsers": [
                "E12",
                "FF20",
                "FFA20",
                "S9",
                "SM9",
                "C29",
                "CA29",
                "IE11",
                "O12.1"
            ],
            "syntax": "<number>",
            "relevance": 79,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/flex-grow"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Sets the flex grow factor. Negative numbers are invalid.",
            "restrictions": [
                "number"
            ]
        },
        {
            "name": "flex-shrink",
            "browsers": [
                "E12",
                "FF20",
                "FFA20",
                "S9",
                "SM9",
                "C29",
                "CA29",
                "IE10",
                "O12.1"
            ],
            "syntax": "<number>",
            "relevance": 78,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/flex-shrink"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Sets the flex shrink factor. Negative numbers are invalid.",
            "restrictions": [
                "number"
            ]
        },
        {
            "name": "flex-wrap",
            "browsers": [
                "E12",
                "FF28",
                "FFA28",
                "S9",
                "SM9",
                "C29",
                "CA29",
                "IE11",
                "O16"
            ],
            "values": [
                {
                    "name": "nowrap",
                    "description": "The flex container is single-line."
                },
                {
                    "name": "wrap",
                    "description": "The flexbox is multi-line."
                },
                {
                    "name": "wrap-reverse",
                    "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
                }
            ],
            "syntax": "nowrap | wrap | wrap-reverse",
            "relevance": 83,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/flex-wrap"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Controls whether the flex container is single-line or multi-line, and the direction of the cross-axis, which determines the direction new lines are stacked in.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "float",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "inline-end",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "A keyword indicating that the element must float on the end side of its containing block. That is the right side with ltr scripts, and the left side with rtl scripts."
                },
                {
                    "name": "inline-start",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "A keyword indicating that the element must float on the start side of its containing block. That is the left side with ltr scripts, and the right side with rtl scripts."
                },
                {
                    "name": "left",
                    "description": "The element generates a block box that is floated to the left. Content flows on the right side of the box, starting at the top (subject to the 'clear' property)."
                },
                {
                    "name": "none",
                    "description": "The box is not floated."
                },
                {
                    "name": "right",
                    "description": "Similar to 'left', except the box is floated to the right, and content flows on the left side of the box, starting at the top."
                }
            ],
            "syntax": "left | right | none | inline-start | inline-end",
            "relevance": 88,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/float"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies how a box should be floated. It may be set for any element, but only applies to elements that generate boxes that are not absolutely positioned.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "flood-color",
            "browsers": [
                "E12",
                "FF3",
                "FFA4",
                "S6",
                "SM6",
                "C5",
                "CA18",
                "IE11",
                "O15"
            ],
            "syntax": "<color>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/flood-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Indicates what color to use to flood the current filter primitive subregion.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "flood-opacity",
            "browsers": [
                "E12",
                "FF3",
                "FFA4",
                "S6",
                "SM6",
                "C5",
                "CA18",
                "IE11",
                "O15"
            ],
            "syntax": "<'opacity'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/flood-opacity"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Indicates what opacity to use to flood the current filter primitive subregion.",
            "restrictions": [
                "number(0-1)",
                "percentage"
            ]
        },
        {
            "name": "font",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "values": [
                {
                    "name": "100",
                    "description": "Thin"
                },
                {
                    "name": "200",
                    "description": "Extra Light (Ultra Light)"
                },
                {
                    "name": "300",
                    "description": "Light"
                },
                {
                    "name": "400",
                    "description": "Normal"
                },
                {
                    "name": "500",
                    "description": "Medium"
                },
                {
                    "name": "600",
                    "description": "Semi Bold (Demi Bold)"
                },
                {
                    "name": "700",
                    "description": "Bold"
                },
                {
                    "name": "800",
                    "description": "Extra Bold (Ultra Bold)"
                },
                {
                    "name": "900",
                    "description": "Black (Heavy)"
                },
                {
                    "name": "bold",
                    "description": "Same as 700"
                },
                {
                    "name": "bolder",
                    "description": "Specifies the weight of the face bolder than the inherited value."
                },
                {
                    "name": "caption",
                    "description": "The font used for captioned controls (e.g., buttons, drop-downs, etc.)."
                },
                {
                    "name": "icon",
                    "description": "The font used to label icons."
                },
                {
                    "name": "italic",
                    "description": "Selects a font that is labeled 'italic', or, if that is not available, one labeled 'oblique'."
                },
                {
                    "name": "large"
                },
                {
                    "name": "larger"
                },
                {
                    "name": "lighter",
                    "description": "Specifies the weight of the face lighter than the inherited value."
                },
                {
                    "name": "medium"
                },
                {
                    "name": "menu",
                    "description": "The font used in menus (e.g., dropdown menus and menu lists)."
                },
                {
                    "name": "message-box",
                    "description": "The font used in dialog boxes."
                },
                {
                    "name": "normal",
                    "description": "Specifies a face that is not labeled as a small-caps font."
                },
                {
                    "name": "oblique",
                    "description": "Selects a font that is labeled 'oblique'."
                },
                {
                    "name": "small"
                },
                {
                    "name": "small-caps",
                    "description": "Specifies a font that is labeled as a small-caps font. If a genuine small-caps font is not available, user agents should simulate a small-caps font."
                },
                {
                    "name": "small-caption",
                    "description": "The font used for labeling small controls."
                },
                {
                    "name": "smaller"
                },
                {
                    "name": "status-bar",
                    "description": "The font used in window status bars."
                },
                {
                    "name": "x-large"
                },
                {
                    "name": "x-small"
                },
                {
                    "name": "xx-large"
                },
                {
                    "name": "xx-small"
                }
            ],
            "syntax": "[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar",
            "relevance": 82,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property for setting 'font-style', 'font-variant', 'font-weight', 'font-size', 'line-height', and 'font-family', at the same place in the style sheet. The syntax of this property is based on a traditional typographical shorthand notation to set multiple properties related to fonts.",
            "restrictions": [
                "font"
            ]
        },
        {
            "name": "font-family",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "values": [
                {
                    "name": "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif"
                },
                {
                    "name": "Arial, Helvetica, sans-serif"
                },
                {
                    "name": "Cambria, Cochin, Georgia, Times, 'Times New Roman', serif"
                },
                {
                    "name": "'Courier New', Courier, monospace"
                },
                {
                    "name": "cursive"
                },
                {
                    "name": "fantasy"
                },
                {
                    "name": "'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif"
                },
                {
                    "name": "Georgia, 'Times New Roman', Times, serif"
                },
                {
                    "name": "'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif"
                },
                {
                    "name": "Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif"
                },
                {
                    "name": "'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif"
                },
                {
                    "name": "monospace"
                },
                {
                    "name": "sans-serif"
                },
                {
                    "name": "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif"
                },
                {
                    "name": "serif"
                },
                {
                    "name": "'Times New Roman', Times, serif"
                },
                {
                    "name": "'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif"
                },
                {
                    "name": "Verdana, Geneva, Tahoma, sans-serif"
                }
            ],
            "atRule": "@font-palette-values",
            "syntax": "<family-name>#",
            "relevance": 94,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-family"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies a prioritized list of font family names or generic family names. A user agent iterates through the list of family names until it matches an available font that contains a glyph for the character to be rendered.",
            "restrictions": [
                "font"
            ]
        },
        {
            "name": "font-feature-settings",
            "browsers": [
                "E15",
                "FF34",
                "FFA34",
                "S9.1",
                "SM9.3",
                "C48",
                "CA48",
                "IE10",
                "O35"
            ],
            "values": [
                {
                    "name": "\"aalt\"",
                    "description": "Access All Alternates."
                },
                {
                    "name": "\"abvf\"",
                    "description": "Above-base Forms. Required in Khmer script."
                },
                {
                    "name": "\"abvm\"",
                    "description": "Above-base Mark Positioning. Required in Indic scripts."
                },
                {
                    "name": "\"abvs\"",
                    "description": "Above-base Substitutions. Required in Indic scripts."
                },
                {
                    "name": "\"afrc\"",
                    "description": "Alternative Fractions."
                },
                {
                    "name": "\"akhn\"",
                    "description": "Akhand. Required in most Indic scripts."
                },
                {
                    "name": "\"blwf\"",
                    "description": "Below-base Form. Required in a number of Indic scripts."
                },
                {
                    "name": "\"blwm\"",
                    "description": "Below-base Mark Positioning. Required in Indic scripts."
                },
                {
                    "name": "\"blws\"",
                    "description": "Below-base Substitutions. Required in Indic scripts."
                },
                {
                    "name": "\"calt\"",
                    "description": "Contextual Alternates."
                },
                {
                    "name": "\"case\"",
                    "description": "Case-Sensitive Forms. Applies only to European scripts; particularly prominent in Spanish-language setting."
                },
                {
                    "name": "\"ccmp\"",
                    "description": "Glyph Composition/Decomposition."
                },
                {
                    "name": "\"cfar\"",
                    "description": "Conjunct Form After Ro. Required in Khmer scripts."
                },
                {
                    "name": "\"cjct\"",
                    "description": "Conjunct Forms. Required in Indic scripts that show similarity to Devanagari."
                },
                {
                    "name": "\"clig\"",
                    "description": "Contextual Ligatures."
                },
                {
                    "name": "\"cpct\"",
                    "description": "Centered CJK Punctuation. Used primarily in Chinese fonts."
                },
                {
                    "name": "\"cpsp\"",
                    "description": "Capital Spacing. Should not be used in connecting scripts (e.g. most Arabic)."
                },
                {
                    "name": "\"cswh\"",
                    "description": "Contextual Swash."
                },
                {
                    "name": "\"curs\"",
                    "description": "Cursive Positioning. Can be used in any cursive script."
                },
                {
                    "name": "\"c2pc\"",
                    "description": "Petite Capitals From Capitals. Applies only to bicameral scripts."
                },
                {
                    "name": "\"c2sc\"",
                    "description": "Small Capitals From Capitals. Applies only to bicameral scripts."
                },
                {
                    "name": "\"dist\"",
                    "description": "Distances. Required in Indic scripts."
                },
                {
                    "name": "\"dlig\"",
                    "description": "Discretionary ligatures."
                },
                {
                    "name": "\"dnom\"",
                    "description": "Denominators."
                },
                {
                    "name": "\"dtls\"",
                    "description": "Dotless Forms. Applied to math formula layout."
                },
                {
                    "name": "\"expt\"",
                    "description": "Expert Forms. Applies only to Japanese."
                },
                {
                    "name": "\"falt\"",
                    "description": "Final Glyph on Line Alternates. Can be used in any cursive script."
                },
                {
                    "name": "\"fin2\"",
                    "description": "Terminal Form #2. Used only with the Syriac script."
                },
                {
                    "name": "\"fin3\"",
                    "description": "Terminal Form #3. Used only with the Syriac script."
                },
                {
                    "name": "\"fina\"",
                    "description": "Terminal Forms. Can be used in any alphabetic script."
                },
                {
                    "name": "\"flac\"",
                    "description": "Flattened ascent forms. Applied to math formula layout."
                },
                {
                    "name": "\"frac\"",
                    "description": "Fractions."
                },
                {
                    "name": "\"fwid\"",
                    "description": "Full Widths. Applies to any script which can use monospaced forms."
                },
                {
                    "name": "\"half\"",
                    "description": "Half Forms. Required in Indic scripts that show similarity to Devanagari."
                },
                {
                    "name": "\"haln\"",
                    "description": "Halant Forms. Required in Indic scripts."
                },
                {
                    "name": "\"halt\"",
                    "description": "Alternate Half Widths. Used only in CJKV fonts."
                },
                {
                    "name": "\"hist\"",
                    "description": "Historical Forms."
                },
                {
                    "name": "\"hkna\"",
                    "description": "Horizontal Kana Alternates. Applies only to fonts that support kana (hiragana and katakana)."
                },
                {
                    "name": "\"hlig\"",
                    "description": "Historical Ligatures."
                },
                {
                    "name": "\"hngl\"",
                    "description": "Hangul. Korean only."
                },
                {
                    "name": "\"hojo\"",
                    "description": "Hojo Kanji Forms (JIS X 0212-1990 Kanji Forms). Used only with Kanji script."
                },
                {
                    "name": "\"hwid\"",
                    "description": "Half Widths. Generally used only in CJKV fonts."
                },
                {
                    "name": "\"init\"",
                    "description": "Initial Forms. Can be used in any alphabetic script."
                },
                {
                    "name": "\"isol\"",
                    "description": "Isolated Forms. Can be used in any cursive script."
                },
                {
                    "name": "\"ital\"",
                    "description": "Italics. Applies mostly to Latin; note that many non-Latin fonts contain Latin as well."
                },
                {
                    "name": "\"jalt\"",
                    "description": "Justification Alternates. Can be used in any cursive script."
                },
                {
                    "name": "\"jp78\"",
                    "description": "JIS78 Forms. Applies only to Japanese."
                },
                {
                    "name": "\"jp83\"",
                    "description": "JIS83 Forms. Applies only to Japanese."
                },
                {
                    "name": "\"jp90\"",
                    "description": "JIS90 Forms. Applies only to Japanese."
                },
                {
                    "name": "\"jp04\"",
                    "description": "JIS2004 Forms. Applies only to Japanese."
                },
                {
                    "name": "\"kern\"",
                    "description": "Kerning."
                },
                {
                    "name": "\"lfbd\"",
                    "description": "Left Bounds."
                },
                {
                    "name": "\"liga\"",
                    "description": "Standard Ligatures."
                },
                {
                    "name": "\"ljmo\"",
                    "description": "Leading Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
                },
                {
                    "name": "\"lnum\"",
                    "description": "Lining Figures."
                },
                {
                    "name": "\"locl\"",
                    "description": "Localized Forms."
                },
                {
                    "name": "\"ltra\"",
                    "description": "Left-to-right glyph alternates."
                },
                {
                    "name": "\"ltrm\"",
                    "description": "Left-to-right mirrored forms."
                },
                {
                    "name": "\"mark\"",
                    "description": "Mark Positioning."
                },
                {
                    "name": "\"med2\"",
                    "description": "Medial Form #2. Used only with the Syriac script."
                },
                {
                    "name": "\"medi\"",
                    "description": "Medial Forms."
                },
                {
                    "name": "\"mgrk\"",
                    "description": "Mathematical Greek."
                },
                {
                    "name": "\"mkmk\"",
                    "description": "Mark to Mark Positioning."
                },
                {
                    "name": "\"nalt\"",
                    "description": "Alternate Annotation Forms."
                },
                {
                    "name": "\"nlck\"",
                    "description": "NLC Kanji Forms. Used only with Kanji script."
                },
                {
                    "name": "\"nukt\"",
                    "description": "Nukta Forms. Required in Indic scripts.."
                },
                {
                    "name": "\"numr\"",
                    "description": "Numerators."
                },
                {
                    "name": "\"onum\"",
                    "description": "Oldstyle Figures."
                },
                {
                    "name": "\"opbd\"",
                    "description": "Optical Bounds."
                },
                {
                    "name": "\"ordn\"",
                    "description": "Ordinals. Applies mostly to Latin script."
                },
                {
                    "name": "\"ornm\"",
                    "description": "Ornaments."
                },
                {
                    "name": "\"palt\"",
                    "description": "Proportional Alternate Widths. Used mostly in CJKV fonts."
                },
                {
                    "name": "\"pcap\"",
                    "description": "Petite Capitals."
                },
                {
                    "name": "\"pkna\"",
                    "description": "Proportional Kana. Generally used only in Japanese fonts."
                },
                {
                    "name": "\"pnum\"",
                    "description": "Proportional Figures."
                },
                {
                    "name": "\"pref\"",
                    "description": "Pre-base Forms. Required in Khmer and Myanmar (Burmese) scripts and southern Indic scripts that may display a pre-base form of Ra."
                },
                {
                    "name": "\"pres\"",
                    "description": "Pre-base Substitutions. Required in Indic scripts."
                },
                {
                    "name": "\"pstf\"",
                    "description": "Post-base Forms. Required in scripts of south and southeast Asia that have post-base forms for consonants eg: Gurmukhi, Malayalam, Khmer."
                },
                {
                    "name": "\"psts\"",
                    "description": "Post-base Substitutions."
                },
                {
                    "name": "\"pwid\"",
                    "description": "Proportional Widths."
                },
                {
                    "name": "\"qwid\"",
                    "description": "Quarter Widths. Generally used only in CJKV fonts."
                },
                {
                    "name": "\"rand\"",
                    "description": "Randomize."
                },
                {
                    "name": "\"rclt\"",
                    "description": "Required Contextual Alternates. May apply to any script, but is especially important for many styles of Arabic."
                },
                {
                    "name": "\"rlig\"",
                    "description": "Required Ligatures. Applies to Arabic and Syriac. May apply to some other scripts."
                },
                {
                    "name": "\"rkrf\"",
                    "description": "Rakar Forms. Required in Devanagari and Gujarati scripts."
                },
                {
                    "name": "\"rphf\"",
                    "description": "Reph Form. Required in Indic scripts. E.g. Devanagari, Kannada."
                },
                {
                    "name": "\"rtbd\"",
                    "description": "Right Bounds."
                },
                {
                    "name": "\"rtla\"",
                    "description": "Right-to-left alternates."
                },
                {
                    "name": "\"rtlm\"",
                    "description": "Right-to-left mirrored forms."
                },
                {
                    "name": "\"ruby\"",
                    "description": "Ruby Notation Forms. Applies only to Japanese."
                },
                {
                    "name": "\"salt\"",
                    "description": "Stylistic Alternates."
                },
                {
                    "name": "\"sinf\"",
                    "description": "Scientific Inferiors."
                },
                {
                    "name": "\"size\"",
                    "description": "Optical size."
                },
                {
                    "name": "\"smcp\"",
                    "description": "Small Capitals. Applies only to bicameral scripts."
                },
                {
                    "name": "\"smpl\"",
                    "description": "Simplified Forms. Applies only to Chinese and Japanese."
                },
                {
                    "name": "\"ssty\"",
                    "description": "Math script style alternates."
                },
                {
                    "name": "\"stch\"",
                    "description": "Stretching Glyph Decomposition."
                },
                {
                    "name": "\"subs\"",
                    "description": "Subscript."
                },
                {
                    "name": "\"sups\"",
                    "description": "Superscript."
                },
                {
                    "name": "\"swsh\"",
                    "description": "Swash. Does not apply to ideographic scripts."
                },
                {
                    "name": "\"titl\"",
                    "description": "Titling."
                },
                {
                    "name": "\"tjmo\"",
                    "description": "Trailing Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
                },
                {
                    "name": "\"tnam\"",
                    "description": "Traditional Name Forms. Applies only to Japanese."
                },
                {
                    "name": "\"tnum\"",
                    "description": "Tabular Figures."
                },
                {
                    "name": "\"trad\"",
                    "description": "Traditional Forms. Applies only to Chinese and Japanese."
                },
                {
                    "name": "\"twid\"",
                    "description": "Third Widths. Generally used only in CJKV fonts."
                },
                {
                    "name": "\"unic\"",
                    "description": "Unicase."
                },
                {
                    "name": "\"valt\"",
                    "description": "Alternate Vertical Metrics. Applies only to scripts with vertical writing modes."
                },
                {
                    "name": "\"vatu\"",
                    "description": "Vattu Variants. Used for Indic scripts. E.g. Devanagari."
                },
                {
                    "name": "\"vert\"",
                    "description": "Vertical Alternates. Applies only to scripts with vertical writing modes."
                },
                {
                    "name": "\"vhal\"",
                    "description": "Alternate Vertical Half Metrics. Used only in CJKV fonts."
                },
                {
                    "name": "\"vjmo\"",
                    "description": "Vowel Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
                },
                {
                    "name": "\"vkna\"",
                    "description": "Vertical Kana Alternates. Applies only to fonts that support kana (hiragana and katakana)."
                },
                {
                    "name": "\"vkrn\"",
                    "description": "Vertical Kerning."
                },
                {
                    "name": "\"vpal\"",
                    "description": "Proportional Alternate Vertical Metrics. Used mostly in CJKV fonts."
                },
                {
                    "name": "\"vrt2\"",
                    "description": "Vertical Alternates and Rotation. Applies only to scripts with vertical writing modes."
                },
                {
                    "name": "\"zero\"",
                    "description": "Slashed Zero."
                },
                {
                    "name": "normal",
                    "description": "No change in glyph substitution or positioning occurs."
                },
                {
                    "name": "off",
                    "description": "Disable feature."
                },
                {
                    "name": "on",
                    "description": "Enable feature."
                }
            ],
            "atRule": "@font-face",
            "syntax": "normal | <feature-tag-value>#",
            "relevance": 60,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-feature-settings"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Provides low-level control over OpenType font features. It is intended as a way of providing access to font features that are not widely used but are needed for a particular use case.",
            "restrictions": [
                "string",
                "integer"
            ]
        },
        {
            "name": "font-kerning",
            "browsers": [
                "E79",
                "FF32",
                "FFA32",
                "S9",
                "SM9",
                "C33",
                "CA33",
                "O20"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Specifies that kerning is applied at the discretion of the user agent."
                },
                {
                    "name": "none",
                    "description": "Specifies that kerning is not applied."
                },
                {
                    "name": "normal",
                    "description": "Specifies that kerning is applied."
                }
            ],
            "syntax": "auto | normal | none",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-kerning"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Kerning is the contextual adjustment of inter-glyph spacing. This property controls metric kerning, kerning that utilizes adjustment data contained in the font.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "font-language-override",
            "browsers": [
                "FF34",
                "FFA34"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "Implies that when rendering with OpenType fonts the language of the document is used to infer the OpenType language system, used to select language specific features when rendering."
                }
            ],
            "syntax": "normal | <string>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-language-override"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The value of 'normal' implies that when rendering with OpenType fonts the language of the document is used to infer the OpenType language system, used to select language specific features when rendering.",
            "restrictions": [
                "string"
            ]
        },
        {
            "name": "font-size",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE5.5",
                "O7"
            ],
            "values": [
                {
                    "name": "large"
                },
                {
                    "name": "larger"
                },
                {
                    "name": "medium"
                },
                {
                    "name": "small"
                },
                {
                    "name": "smaller"
                },
                {
                    "name": "x-large"
                },
                {
                    "name": "x-small"
                },
                {
                    "name": "xx-large"
                },
                {
                    "name": "xx-small"
                }
            ],
            "syntax": "<absolute-size> | <relative-size> | <length-percentage [0,∞]> | math",
            "relevance": 94,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-size"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Indicates the desired height of glyphs from the font. For scalable fonts, the font-size is a scale factor applied to the EM unit of the font. (Note that certain glyphs may bleed outside their EM box.) For non-scalable fonts, the font-size is converted into absolute units and matched against the declared font-size of the font, using the same absolute coordinate space for both of the matched values.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "font-size-adjust",
            "browsers": [
                "E127",
                "FF3",
                "FFA4",
                "S16.4",
                "SM16.4",
                "C127",
                "CA127",
                "O113"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Do not preserve the font's x-height."
                }
            ],
            "syntax": "none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number> ]",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-size-adjust"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-07-25"
            },
            "description": "Preserves the readability of text when font fallback occurs by adjusting the font-size so that the x-height is the same regardless of the font used.",
            "restrictions": [
                "number"
            ]
        },
        {
            "name": "font-stretch",
            "browsers": [
                "E12",
                "FF9",
                "FFA9",
                "S11",
                "SM11",
                "C60",
                "CA60",
                "IE9",
                "O47"
            ],
            "values": [
                {
                    "name": "condensed"
                },
                {
                    "name": "expanded"
                },
                {
                    "name": "extra-condensed"
                },
                {
                    "name": "extra-expanded"
                },
                {
                    "name": "narrower",
                    "browsers": [
                        "E12",
                        "FF9",
                        "FFA9",
                        "S11",
                        "SM11",
                        "C60",
                        "CA60",
                        "IE9",
                        "O47"
                    ],
                    "description": "Indicates a narrower value relative to the width of the parent element."
                },
                {
                    "name": "normal"
                },
                {
                    "name": "semi-condensed"
                },
                {
                    "name": "semi-expanded"
                },
                {
                    "name": "ultra-condensed"
                },
                {
                    "name": "ultra-expanded"
                },
                {
                    "name": "wider",
                    "browsers": [
                        "E12",
                        "FF9",
                        "FFA9",
                        "S11",
                        "SM11",
                        "C60",
                        "CA60",
                        "IE9",
                        "O47"
                    ],
                    "description": "Indicates a wider value relative to the width of the parent element."
                }
            ],
            "atRule": "@font-face",
            "status": "obsolete",
            "syntax": "<font-stretch-absolute>{1,2}",
            "relevance": 10,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-stretch"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Selects a normal, condensed, or expanded face from a font family.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "font-style",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "italic",
                    "description": "Selects a font that is labeled as an 'italic' face, or an 'oblique' face if one is not"
                },
                {
                    "name": "normal",
                    "description": "Selects a face that is classified as 'normal'."
                },
                {
                    "name": "oblique",
                    "description": "Selects a font that is labeled as an 'oblique' face, or an 'italic' face if one is not."
                }
            ],
            "atRule": "@font-face",
            "syntax": "normal | italic | oblique <angle>{0,2}",
            "relevance": 89,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Allows italic or oblique faces to be selected. Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "font-synthesis",
            "browsers": [
                "E97",
                "FF34",
                "FFA34",
                "S9",
                "SM9",
                "C97",
                "CA97",
                "O83"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Disallow all synthetic faces."
                },
                {
                    "name": "style",
                    "description": "Allow synthetic italic faces."
                },
                {
                    "name": "weight",
                    "description": "Allow synthetic bold faces."
                }
            ],
            "syntax": "none | [ weight || style || small-caps || position]",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-synthesis"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-01-06",
                "baseline_high_date": "2024-07-06"
            },
            "description": "Controls whether user agents are allowed to synthesize bold or oblique font faces when a font family lacks bold or italic faces.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "font-variant",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "Specifies a face that is not labeled as a small-caps font."
                },
                {
                    "name": "small-caps",
                    "description": "Specifies a font that is labeled as a small-caps font. If a genuine small-caps font is not available, user agents should simulate a small-caps font."
                }
            ],
            "syntax": "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
            "relevance": 64,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies variant representations of the font",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "font-variant-alternates",
            "browsers": [
                "E111",
                "FF34",
                "FFA34",
                "S9.1",
                "SM9.3",
                "C111",
                "CA111",
                "O97"
            ],
            "values": [
                {
                    "name": "annotation()",
                    "description": "Enables display of alternate annotation forms."
                },
                {
                    "name": "character-variant()",
                    "description": "Enables display of specific character variants."
                },
                {
                    "name": "historical-forms",
                    "description": "Enables display of historical forms."
                },
                {
                    "name": "normal",
                    "description": "None of the features are enabled."
                },
                {
                    "name": "ornaments()",
                    "description": "Enables replacement of default glyphs with ornaments, if provided in the font."
                },
                {
                    "name": "styleset()",
                    "description": "Enables display with stylistic sets."
                },
                {
                    "name": "stylistic()",
                    "description": "Enables display of stylistic alternates."
                },
                {
                    "name": "swash()",
                    "description": "Enables display of swash glyphs."
                }
            ],
            "syntax": "normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-03-13"
            },
            "description": "For any given character, fonts can provide a variety of alternate glyphs in addition to the default glyph for that character. This property provides control over the selection of these alternate glyphs.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "font-variant-caps",
            "browsers": [
                "E79",
                "FF34",
                "FFA34",
                "S9.1",
                "SM9.3",
                "C52",
                "CA52",
                "O39"
            ],
            "values": [
                {
                    "name": "all-petite-caps",
                    "description": "Enables display of petite capitals for both upper and lowercase letters."
                },
                {
                    "name": "all-small-caps",
                    "description": "Enables display of small capitals for both upper and lowercase letters."
                },
                {
                    "name": "normal",
                    "description": "None of the features are enabled."
                },
                {
                    "name": "petite-caps",
                    "description": "Enables display of petite capitals."
                },
                {
                    "name": "small-caps",
                    "description": "Enables display of small capitals. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters."
                },
                {
                    "name": "titling-caps",
                    "description": "Enables display of titling capitals."
                },
                {
                    "name": "unicase",
                    "description": "Enables display of mixture of small capitals for uppercase letters with normal lowercase letters."
                }
            ],
            "syntax": "normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-caps"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Specifies control over capitalized forms.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "font-variant-east-asian",
            "browsers": [
                "E79",
                "FF34",
                "FFA34",
                "S9.1",
                "SM9.3",
                "C63",
                "CA63",
                "O50"
            ],
            "values": [
                {
                    "name": "full-width",
                    "description": "Enables rendering of full-width variants."
                },
                {
                    "name": "jis04",
                    "description": "Enables rendering of JIS04 forms."
                },
                {
                    "name": "jis78",
                    "description": "Enables rendering of JIS78 forms."
                },
                {
                    "name": "jis83",
                    "description": "Enables rendering of JIS83 forms."
                },
                {
                    "name": "jis90",
                    "description": "Enables rendering of JIS90 forms."
                },
                {
                    "name": "normal",
                    "description": "None of the features are enabled."
                },
                {
                    "name": "proportional-width",
                    "description": "Enables rendering of proportionally-spaced variants."
                },
                {
                    "name": "ruby",
                    "description": "Enables display of ruby variant glyphs."
                },
                {
                    "name": "simplified",
                    "description": "Enables rendering of simplified forms."
                },
                {
                    "name": "traditional",
                    "description": "Enables rendering of traditional forms."
                }
            ],
            "syntax": "normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Allows control of glyph substitute and positioning in East Asian text.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "font-variant-ligatures",
            "browsers": [
                "E79",
                "FF34",
                "FFA34",
                "S9.1",
                "SM9.3",
                "C34",
                "CA34",
                "O21"
            ],
            "values": [
                {
                    "name": "additional-ligatures",
                    "description": "Enables display of additional ligatures."
                },
                {
                    "name": "common-ligatures",
                    "description": "Enables display of common ligatures."
                },
                {
                    "name": "contextual",
                    "browsers": [
                        "E79",
                        "FF34",
                        "FFA34",
                        "S9.1",
                        "SM9.3",
                        "C34",
                        "CA34",
                        "O21"
                    ],
                    "description": "Enables display of contextual alternates."
                },
                {
                    "name": "discretionary-ligatures",
                    "description": "Enables display of discretionary ligatures."
                },
                {
                    "name": "historical-ligatures",
                    "description": "Enables display of historical ligatures."
                },
                {
                    "name": "no-additional-ligatures",
                    "description": "Disables display of additional ligatures."
                },
                {
                    "name": "no-common-ligatures",
                    "description": "Disables display of common ligatures."
                },
                {
                    "name": "no-contextual",
                    "browsers": [
                        "E79",
                        "FF34",
                        "FFA34",
                        "S9.1",
                        "SM9.3",
                        "C34",
                        "CA34",
                        "O21"
                    ],
                    "description": "Disables display of contextual alternates."
                },
                {
                    "name": "no-discretionary-ligatures",
                    "description": "Disables display of discretionary ligatures."
                },
                {
                    "name": "no-historical-ligatures",
                    "description": "Disables display of historical ligatures."
                },
                {
                    "name": "none",
                    "browsers": [
                        "E79",
                        "FF34",
                        "FFA34",
                        "S9.1",
                        "SM9.3",
                        "C34",
                        "CA34",
                        "O21"
                    ],
                    "description": "Disables all ligatures."
                },
                {
                    "name": "normal",
                    "description": "Implies that the defaults set by the font are used."
                }
            ],
            "syntax": "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Specifies control over which ligatures are enabled or disabled. A value of 'normal' implies that the defaults set by the font are used.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "font-variant-numeric",
            "browsers": [
                "E79",
                "FF34",
                "FFA34",
                "S9.1",
                "SM9.3",
                "C52",
                "CA52",
                "O39"
            ],
            "values": [
                {
                    "name": "diagonal-fractions",
                    "description": "Enables display of lining diagonal fractions."
                },
                {
                    "name": "lining-nums",
                    "description": "Enables display of lining numerals."
                },
                {
                    "name": "normal",
                    "description": "None of the features are enabled."
                },
                {
                    "name": "oldstyle-nums",
                    "description": "Enables display of old-style numerals."
                },
                {
                    "name": "ordinal",
                    "description": "Enables display of letter forms used with ordinal numbers."
                },
                {
                    "name": "proportional-nums",
                    "description": "Enables display of proportional numerals."
                },
                {
                    "name": "slashed-zero",
                    "description": "Enables display of slashed zeros."
                },
                {
                    "name": "stacked-fractions",
                    "description": "Enables display of lining stacked fractions."
                },
                {
                    "name": "tabular-nums",
                    "description": "Enables display of tabular numerals."
                }
            ],
            "syntax": "normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]",
            "relevance": 52,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Specifies control over numerical forms.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "font-variant-position",
            "browsers": [
                "FF34",
                "FFA34",
                "S9.1",
                "SM9.3"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "None of the features are enabled."
                },
                {
                    "name": "sub",
                    "description": "Enables display of subscript variants (OpenType feature: subs)."
                },
                {
                    "name": "super",
                    "description": "Enables display of superscript variants (OpenType feature: sups)."
                }
            ],
            "syntax": "normal | sub | super",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-position"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Specifies the vertical position",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "font-weight",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C2",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "values": [
                {
                    "name": "100",
                    "description": "Thin"
                },
                {
                    "name": "200",
                    "description": "Extra Light (Ultra Light)"
                },
                {
                    "name": "300",
                    "description": "Light"
                },
                {
                    "name": "400",
                    "description": "Normal"
                },
                {
                    "name": "500",
                    "description": "Medium"
                },
                {
                    "name": "600",
                    "description": "Semi Bold (Demi Bold)"
                },
                {
                    "name": "700",
                    "description": "Bold"
                },
                {
                    "name": "800",
                    "description": "Extra Bold (Ultra Bold)"
                },
                {
                    "name": "900",
                    "description": "Black (Heavy)"
                },
                {
                    "name": "bold",
                    "description": "Same as 700"
                },
                {
                    "name": "bolder",
                    "description": "Specifies the weight of the face bolder than the inherited value."
                },
                {
                    "name": "lighter",
                    "description": "Specifies the weight of the face lighter than the inherited value."
                },
                {
                    "name": "normal",
                    "description": "Same as 400"
                }
            ],
            "atRule": "@font-face",
            "syntax": "<font-weight-absolute>{1,2}",
            "relevance": 93,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-weight"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies weight of glyphs in the font, their degree of blackness or stroke thickness.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "glyph-orientation-horizontal",
            "relevance": 50,
            "description": "Controls glyph orientation when the inline-progression-direction is horizontal.",
            "restrictions": [
                "angle",
                "number"
            ]
        },
        {
            "name": "glyph-orientation-vertical",
            "browsers": [
                "S4",
                "SM3.2"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Sets the orientation based on the fullwidth or non-fullwidth characters and the most common orientation."
                }
            ],
            "relevance": 50,
            "baseline": {
                "status": "false"
            },
            "description": "Controls glyph orientation when the inline-progression-direction is vertical.",
            "restrictions": [
                "angle",
                "number",
                "enum"
            ]
        },
        {
            "name": "grid-area",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The property contributes nothing to the grid item's placement, indicating auto-placement, an automatic span, or a default span of one."
                },
                {
                    "name": "span",
                    "description": "Contributes a grid span to the grid item's placement such that the corresponding edge of the grid item's grid area is N lines from its opposite edge."
                }
            ],
            "syntax": "<grid-line> [ / <grid-line> ]{0,3}",
            "relevance": 59,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-area"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "Determine a grid item's size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement. Shorthand for 'grid-row-start', 'grid-column-start', 'grid-row-end', and 'grid-column-end'.",
            "restrictions": [
                "identifier",
                "integer"
            ]
        },
        {
            "name": "grid",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "syntax": "<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "The grid CSS property is a shorthand property that sets all of the explicit grid properties ('grid-template-rows', 'grid-template-columns', and 'grid-template-areas'), and all the implicit grid properties ('grid-auto-rows', 'grid-auto-columns', and 'grid-auto-flow'), in a single declaration.",
            "restrictions": [
                "identifier",
                "length",
                "percentage",
                "string",
                "enum"
            ]
        },
        {
            "name": "grid-auto-columns",
            "browsers": [
                "E16",
                "FF70",
                "FFA79",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "IE10",
                "O44"
            ],
            "values": [
                {
                    "name": "min-content",
                    "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
                },
                {
                    "name": "max-content",
                    "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
                },
                {
                    "name": "auto",
                    "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
                },
                {
                    "name": "minmax()",
                    "description": "Defines a size range greater than or equal to min and less than or equal to max."
                }
            ],
            "syntax": "<track-size>+",
            "relevance": 52,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "Specifies the size of implicitly created columns.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "grid-auto-flow",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "row",
                    "description": "The auto-placement algorithm places items by filling each row in turn, adding new rows as necessary."
                },
                {
                    "name": "column",
                    "description": "The auto-placement algorithm places items by filling each column in turn, adding new columns as necessary."
                },
                {
                    "name": "dense",
                    "description": "If specified, the auto-placement algorithm uses a \"dense\" packing algorithm, which attempts to fill in holes earlier in the grid if smaller items come up later."
                }
            ],
            "syntax": "[ row | column ] || dense",
            "relevance": 55,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "Controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "grid-auto-rows",
            "browsers": [
                "E16",
                "FF70",
                "FFA79",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "IE10",
                "O44"
            ],
            "values": [
                {
                    "name": "min-content",
                    "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
                },
                {
                    "name": "max-content",
                    "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
                },
                {
                    "name": "auto",
                    "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
                },
                {
                    "name": "minmax()",
                    "description": "Defines a size range greater than or equal to min and less than or equal to max."
                }
            ],
            "syntax": "<track-size>+",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "Specifies the size of implicitly created rows.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "grid-column",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The property contributes nothing to the grid item's placement, indicating auto-placement, an automatic span, or a default span of one."
                },
                {
                    "name": "span",
                    "description": "Contributes a grid span to the grid item's placement such that the corresponding edge of the grid item's grid area is N lines from its opposite edge."
                }
            ],
            "syntax": "<grid-line> [ / <grid-line> ]?",
            "relevance": 62,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "Shorthand for 'grid-column-start' and 'grid-column-end'.",
            "restrictions": [
                "identifier",
                "integer",
                "enum"
            ]
        },
        {
            "name": "grid-column-end",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The property contributes nothing to the grid item's placement, indicating auto-placement, an automatic span, or a default span of one."
                },
                {
                    "name": "span",
                    "description": "Contributes a grid span to the grid item's placement such that the corresponding edge of the grid item's grid area is N lines from its opposite edge."
                }
            ],
            "syntax": "<grid-line>",
            "relevance": 52,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "Determine a grid item's size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement.",
            "restrictions": [
                "identifier",
                "integer",
                "enum"
            ]
        },
        {
            "name": "grid-column-gap",
            "browsers": [
                "FF52",
                "C57",
                "S10.1",
                "O44"
            ],
            "status": "obsolete",
            "syntax": "<length-percentage>",
            "relevance": 5,
            "description": "Specifies the gutters between grid columns. Replaced by 'column-gap' property.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "grid-column-start",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The property contributes nothing to the grid item's placement, indicating auto-placement, an automatic span, or a default span of one."
                },
                {
                    "name": "span",
                    "description": "Contributes a grid span to the grid item's placement such that the corresponding edge of the grid item's grid area is N lines from its opposite edge."
                }
            ],
            "syntax": "<grid-line>",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "Determine a grid item's size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement.",
            "restrictions": [
                "identifier",
                "integer",
                "enum"
            ]
        },
        {
            "name": "grid-gap",
            "browsers": [
                "FF52",
                "C57",
                "S10.1",
                "O44"
            ],
            "status": "obsolete",
            "syntax": "<'grid-row-gap'> <'grid-column-gap'>?",
            "relevance": 9,
            "description": "Shorthand that specifies the gutters between grid columns and grid rows in one declaration. Replaced by 'gap' property.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "grid-row",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The property contributes nothing to the grid item's placement, indicating auto-placement, an automatic span, or a default span of one."
                },
                {
                    "name": "span",
                    "description": "Contributes a grid span to the grid item's placement such that the corresponding edge of the grid item's grid area is N lines from its opposite edge."
                }
            ],
            "syntax": "<grid-line> [ / <grid-line> ]?",
            "relevance": 58,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "Shorthand for 'grid-row-start' and 'grid-row-end'.",
            "restrictions": [
                "identifier",
                "integer",
                "enum"
            ]
        },
        {
            "name": "grid-row-end",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The property contributes nothing to the grid item's placement, indicating auto-placement, an automatic span, or a default span of one."
                },
                {
                    "name": "span",
                    "description": "Contributes a grid span to the grid item's placement such that the corresponding edge of the grid item's grid area is N lines from its opposite edge."
                }
            ],
            "syntax": "<grid-line>",
            "relevance": 52,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "Determine a grid item's size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement.",
            "restrictions": [
                "identifier",
                "integer",
                "enum"
            ]
        },
        {
            "name": "grid-row-gap",
            "browsers": [
                "FF52",
                "C57",
                "S10.1",
                "O44"
            ],
            "status": "obsolete",
            "syntax": "<length-percentage>",
            "relevance": 2,
            "description": "Specifies the gutters between grid rows. Replaced by 'row-gap' property.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "grid-row-start",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The property contributes nothing to the grid item's placement, indicating auto-placement, an automatic span, or a default span of one."
                },
                {
                    "name": "span",
                    "description": "Contributes a grid span to the grid item's placement such that the corresponding edge of the grid item's grid area is N lines from its opposite edge."
                }
            ],
            "syntax": "<grid-line>",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "Determine a grid item's size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement.",
            "restrictions": [
                "identifier",
                "integer",
                "enum"
            ]
        },
        {
            "name": "grid-template",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Sets all three properties to their initial values."
                },
                {
                    "name": "min-content",
                    "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
                },
                {
                    "name": "max-content",
                    "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
                },
                {
                    "name": "auto",
                    "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
                },
                {
                    "name": "subgrid",
                    "description": "Sets 'grid-template-rows' and 'grid-template-columns' to 'subgrid', and 'grid-template-areas' to its initial value."
                },
                {
                    "name": "minmax()",
                    "description": "Defines a size range greater than or equal to min and less than or equal to max."
                },
                {
                    "name": "repeat()",
                    "description": "Represents a repeated fragment of the track list, allowing a large number of columns or rows that exhibit a recurring pattern to be written in a more compact form."
                }
            ],
            "syntax": "none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "Shorthand for setting grid-template-columns, grid-template-rows, and grid-template-areas in a single declaration.",
            "restrictions": [
                "identifier",
                "length",
                "percentage",
                "string",
                "enum"
            ]
        },
        {
            "name": "grid-template-areas",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "The grid container doesn't define any named grid areas."
                }
            ],
            "syntax": "none | <string>+",
            "relevance": 55,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-areas"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "Specifies named grid areas, which are not associated with any particular grid item, but can be referenced from the grid-placement properties.",
            "restrictions": [
                "string"
            ]
        },
        {
            "name": "grid-template-columns",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "IE10",
                "O44"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "There is no explicit grid; any rows/columns will be implicitly generated."
                },
                {
                    "name": "min-content",
                    "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
                },
                {
                    "name": "max-content",
                    "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
                },
                {
                    "name": "auto",
                    "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
                },
                {
                    "name": "subgrid",
                    "description": "Indicates that the grid will align to its parent grid in that axis."
                },
                {
                    "name": "minmax()",
                    "description": "Defines a size range greater than or equal to min and less than or equal to max."
                },
                {
                    "name": "repeat()",
                    "description": "Represents a repeated fragment of the track list, allowing a large number of columns or rows that exhibit a recurring pattern to be written in a more compact form."
                }
            ],
            "syntax": "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
            "relevance": 70,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-columns"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "specifies, as a space-separated track list, the line names and track sizing functions of the grid.",
            "restrictions": [
                "identifier",
                "length",
                "percentage",
                "enum"
            ]
        },
        {
            "name": "grid-template-rows",
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "IE10",
                "O44"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "There is no explicit grid; any rows/columns will be implicitly generated."
                },
                {
                    "name": "min-content",
                    "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
                },
                {
                    "name": "max-content",
                    "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
                },
                {
                    "name": "auto",
                    "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
                },
                {
                    "name": "subgrid",
                    "description": "Indicates that the grid will align to its parent grid in that axis."
                },
                {
                    "name": "minmax()",
                    "description": "Defines a size range greater than or equal to min and less than or equal to max."
                },
                {
                    "name": "repeat()",
                    "description": "Represents a repeated fragment of the track list, allowing a large number of columns or rows that exhibit a recurring pattern to be written in a more compact form."
                }
            ],
            "syntax": "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
            "relevance": 61,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-rows"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "specifies, as a space-separated track list, the line names and track sizing functions of the grid.",
            "restrictions": [
                "identifier",
                "length",
                "percentage",
                "string",
                "enum"
            ]
        },
        {
            "name": "height",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The height depends on the values of other properties."
                },
                {
                    "name": "fit-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
                },
                {
                    "name": "max-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
                },
                {
                    "name": "min-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
                }
            ],
            "syntax": "auto | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>",
            "relevance": 96,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/height"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies the height of the content area, padding area or border area (depending on 'box-sizing') of certain boxes.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "hyphens",
            "browsers": [
                "E79",
                "FF43",
                "FFA43",
                "S17",
                "SM17",
                "C55",
                "CA55",
                "IE10",
                "O42"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
                },
                {
                    "name": "manual",
                    "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
                },
                {
                    "name": "none",
                    "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
                }
            ],
            "syntax": "none | manual | auto",
            "relevance": 55,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/hyphens"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-09-18"
            },
            "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "image-orientation",
            "browsers": [
                "E81",
                "FF26",
                "FFA26",
                "S13.1",
                "SM13.4",
                "C81",
                "CA81",
                "O67"
            ],
            "values": [
                {
                    "name": "flip",
                    "description": "After rotating by the precededing angle, the image is flipped horizontally. Defaults to 0deg if the angle is ommitted."
                },
                {
                    "name": "from-image",
                    "description": "If the image has an orientation specified in its metadata, such as EXIF, this value computes to the angle that the metadata specifies is necessary to correctly orient the image."
                }
            ],
            "syntax": "from-image | <angle> | [ <angle>? flip ]",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/image-orientation"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-04-13",
                "baseline_high_date": "2022-10-13"
            },
            "description": "Specifies an orthogonal rotation to be applied to an image before it is laid out.",
            "restrictions": [
                "angle"
            ]
        },
        {
            "name": "image-rendering",
            "browsers": [
                "E79",
                "FF3.6",
                "FFA4",
                "S6",
                "SM6",
                "C13",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The image should be scaled with an algorithm that maximizes the appearance of the image."
                },
                {
                    "name": "crisp-edges",
                    "description": "The image must be scaled with an algorithm that preserves contrast and edges in the image, and which does not smooth colors or introduce blur to the image in the process."
                },
                {
                    "name": "-moz-crisp-edges",
                    "browsers": [
                        "E79",
                        "FF3.6",
                        "FFA4",
                        "S6",
                        "SM6",
                        "C13",
                        "CA18",
                        "O15"
                    ]
                },
                {
                    "name": "optimizeQuality",
                    "description": "Deprecated."
                },
                {
                    "name": "optimizeSpeed",
                    "description": "Deprecated."
                },
                {
                    "name": "pixelated",
                    "description": "When scaling the image up, the 'nearest neighbor' or similar algorithm must be used, so that the image appears to be simply composed of very large pixels."
                }
            ],
            "syntax": "auto | crisp-edges | pixelated | smooth",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/image-rendering"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Provides a hint to the user-agent about what aspects of an image are most important to preserve when the image is scaled, to aid the user-agent in the choice of an appropriate scaling algorithm.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "ime-mode",
            "browsers": [
                "FF3",
                "FFA4",
                "IE5"
            ],
            "values": [
                {
                    "name": "active",
                    "description": "The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it."
                },
                {
                    "name": "auto",
                    "description": "No change is made to the current input method editor state. This is the default."
                },
                {
                    "name": "disabled",
                    "description": "The input method editor is disabled and may not be activated by the user."
                },
                {
                    "name": "inactive",
                    "description": "The input method editor is initially inactive, but the user may activate it if they wish."
                },
                {
                    "name": "normal",
                    "description": "The IME state should be normal; this value can be used in a user style sheet to override the page setting."
                }
            ],
            "status": "obsolete",
            "syntax": "auto | normal | active | inactive | disabled",
            "relevance": 0,
            "baseline": {
                "status": "false"
            },
            "description": "Controls the state of the input method editor for text fields.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "inline-size",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Depends on the values of other properties."
                }
            ],
            "syntax": "<'width'>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/inline-size"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Size of an element in the direction specified by 'writing-mode'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "isolation",
            "browsers": [
                "E79",
                "FF36",
                "FFA36",
                "S8",
                "SM8",
                "C41",
                "CA41",
                "O30"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Elements are not isolated unless an operation is applied that causes the creation of a stacking context."
                },
                {
                    "name": "isolate",
                    "description": "In CSS will turn the element into a stacking context."
                }
            ],
            "syntax": "auto | isolate",
            "relevance": 56,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/isolation"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "In CSS setting to 'isolate' will turn the element into a stacking context. In SVG, it defines whether an element is isolated or not.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "justify-content",
            "browsers": [
                "E12",
                "FF20",
                "FFA20",
                "S9",
                "SM9",
                "C29",
                "CA29",
                "IE11",
                "O12.1"
            ],
            "values": [
                {
                    "name": "center",
                    "description": "Flex items are packed toward the center of the line."
                },
                {
                    "name": "start",
                    "description": "The items are packed flush to each other toward the start edge of the alignment container in the main axis."
                },
                {
                    "name": "end",
                    "description": "The items are packed flush to each other toward the end edge of the alignment container in the main axis."
                },
                {
                    "name": "left",
                    "description": "The items are packed flush to each other toward the left edge of the alignment container in the main axis."
                },
                {
                    "name": "right",
                    "description": "The items are packed flush to each other toward the right edge of the alignment container in the main axis."
                },
                {
                    "name": "safe",
                    "description": "If the size of the item overflows the alignment container, the item is instead aligned as if the alignment mode were start."
                },
                {
                    "name": "unsafe",
                    "description": "Regardless of the relative sizes of the item and alignment container, the given alignment value is honored."
                },
                {
                    "name": "stretch",
                    "description": "If the combined size of the alignment subjects is less than the size of the alignment container, any auto-sized alignment subjects have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container."
                },
                {
                    "name": "space-evenly",
                    "description": "The items are evenly distributed within the alignment container along the main axis."
                },
                {
                    "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": "space-around",
                    "description": "Flex items are evenly distributed in the line, with half-size spaces on either end."
                },
                {
                    "name": "space-between",
                    "description": "Flex items are evenly distributed in the line."
                },
                {
                    "name": "baseline",
                    "description": "Specifies participation in first-baseline alignment."
                },
                {
                    "name": "first baseline",
                    "description": "Specifies participation in first-baseline alignment."
                },
                {
                    "name": "last baseline",
                    "description": "Specifies participation in last-baseline alignment."
                }
            ],
            "syntax": "normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]",
            "relevance": 88,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/justify-content"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Aligns flex items along the main axis of the current line of the flex container.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "kerning",
            "values": [
                {
                    "name": "auto",
                    "description": "Indicates that the user agent should adjust inter-glyph spacing based on kerning tables that are included in the font that will be used."
                }
            ],
            "relevance": 50,
            "description": "Indicates whether the user agent should adjust inter-glyph spacing based on kerning tables that are included in the relevant font or instead disable auto-kerning and set inter-character spacing to a specific length.",
            "restrictions": [
                "length",
                "enum"
            ]
        },
        {
            "name": "left",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE5.5",
                "O5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
                }
            ],
            "syntax": "<length> | <percentage> | auto",
            "relevance": 94,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/left"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies how far an absolutely positioned box's left margin edge is offset to the right of the left edge of the box's 'containing block'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "letter-spacing",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "The spacing is the normal spacing for the current font. It is typically zero-length."
                }
            ],
            "syntax": "normal | <length>",
            "relevance": 82,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/letter-spacing"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies the minimum, maximum, and optimal spacing between grapheme clusters.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "lighting-color",
            "browsers": [
                "E12",
                "FF3",
                "FFA4",
                "S6",
                "SM6",
                "C5",
                "CA18",
                "IE11",
                "O15"
            ],
            "syntax": "<color>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/lighting-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Defines the color of the light source for filter primitives 'feDiffuseLighting' and 'feSpecularLighting'.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "line-break",
            "browsers": [
                "E14",
                "FF69",
                "FFA79",
                "S11",
                "SM11",
                "C58",
                "CA58",
                "IE5.5",
                "O45"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The UA determines the set of line-breaking restrictions to use for CJK scripts, and it may vary the restrictions based on the length of the line; e.g., use a less restrictive set of line-break rules for short lines."
                },
                {
                    "name": "loose",
                    "description": "Breaks text using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers."
                },
                {
                    "name": "normal",
                    "description": "Breaks text using the most common set of line-breaking rules."
                },
                {
                    "name": "strict",
                    "description": "Breaks CJK scripts using a more restrictive set of line-breaking rules than 'normal'."
                },
                {
                    "name": "anywhere",
                    "description": "There is a soft wrap opportunity around every typographic character unit, including around any punctuation character or preserved white spaces, or in the middle of words, disregarding any prohibition against line breaks, even those introduced by characters with the GL, WJ, or ZWJ line breaking classes or mandated by the word-break property."
                }
            ],
            "syntax": "auto | loose | normal | strict | anywhere",
            "relevance": 52,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/line-break"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "Specifies what set of line breaking restrictions are in effect within the element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "line-height",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "Tells user agents to set the computed value to a 'reasonable' value based on the font size of the element."
                }
            ],
            "syntax": "normal | <number> | <length> | <percentage>",
            "relevance": 93,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/line-height"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Determines the block-progression dimension of the text content area of an inline box.",
            "restrictions": [
                "number",
                "length",
                "percentage"
            ]
        },
        {
            "name": "list-style",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "armenian"
                },
                {
                    "name": "circle",
                    "description": "A hollow circle."
                },
                {
                    "name": "decimal"
                },
                {
                    "name": "decimal-leading-zero"
                },
                {
                    "name": "disc",
                    "description": "A filled circle."
                },
                {
                    "name": "georgian"
                },
                {
                    "name": "inside",
                    "description": "The marker box is outside the principal block box, as described in the section on the ::marker pseudo-element below."
                },
                {
                    "name": "lower-alpha"
                },
                {
                    "name": "lower-greek"
                },
                {
                    "name": "lower-latin"
                },
                {
                    "name": "lower-roman"
                },
                {
                    "name": "none"
                },
                {
                    "name": "outside",
                    "description": "The ::marker pseudo-element is an inline element placed immediately before all ::before pseudo-elements in the principal block box, after which the element's content flows."
                },
                {
                    "name": "square",
                    "description": "A filled square."
                },
                {
                    "name": "symbols()",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Allows a counter style to be defined inline."
                },
                {
                    "name": "upper-alpha"
                },
                {
                    "name": "upper-latin"
                },
                {
                    "name": "upper-roman"
                },
                {
                    "name": "url()"
                }
            ],
            "syntax": "<'list-style-type'> || <'list-style-position'> || <'list-style-image'>",
            "relevance": 83,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/list-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand for setting 'list-style-type', 'list-style-position' and 'list-style-image'",
            "restrictions": [
                "image",
                "enum",
                "url"
            ]
        },
        {
            "name": "list-style-image",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "The default contents of the of the list item's marker are given by 'list-style-type' instead."
                }
            ],
            "syntax": "<image> | none",
            "relevance": 52,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-image"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Sets the image that will be used as the list item marker. When the image is available, it will replace the marker set with the 'list-style-type' marker.",
            "restrictions": [
                "image"
            ]
        },
        {
            "name": "list-style-position",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [
                {
                    "name": "inside",
                    "description": "The marker box is outside the principal block box, as described in the section on the ::marker pseudo-element below."
                },
                {
                    "name": "outside",
                    "description": "The ::marker pseudo-element is an inline element placed immediately before all ::before pseudo-elements in the principal block box, after which the element's content flows."
                }
            ],
            "syntax": "inside | outside",
            "relevance": 55,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-position"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies the position of the '::marker' pseudo-element's box in the list item.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "list-style-type",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [
                {
                    "name": "armenian",
                    "description": "Traditional uppercase Armenian numbering."
                },
                {
                    "name": "circle",
                    "description": "A hollow circle."
                },
                {
                    "name": "decimal",
                    "description": "Western decimal numbers."
                },
                {
                    "name": "decimal-leading-zero",
                    "description": "Decimal numbers padded by initial zeros."
                },
                {
                    "name": "disc",
                    "description": "A filled circle."
                },
                {
                    "name": "georgian",
                    "description": "Traditional Georgian numbering."
                },
                {
                    "name": "lower-alpha",
                    "description": "Lowercase ASCII letters."
                },
                {
                    "name": "lower-greek",
                    "description": "Lowercase classical Greek."
                },
                {
                    "name": "lower-latin",
                    "description": "Lowercase ASCII letters."
                },
                {
                    "name": "lower-roman",
                    "description": "Lowercase ASCII Roman numerals."
                },
                {
                    "name": "none",
                    "description": "No marker"
                },
                {
                    "name": "square",
                    "description": "A filled square."
                },
                {
                    "name": "symbols()",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O3.5"
                    ],
                    "description": "Allows a counter style to be defined inline."
                },
                {
                    "name": "upper-alpha",
                    "description": "Uppercase ASCII letters."
                },
                {
                    "name": "upper-latin",
                    "description": "Uppercase ASCII letters."
                },
                {
                    "name": "upper-roman",
                    "description": "Uppercase ASCII Roman numerals."
                }
            ],
            "syntax": "<counter-style> | <string> | none",
            "relevance": 73,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-type"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Used to construct the default contents of a list item's marker",
            "restrictions": [
                "enum",
                "string"
            ]
        },
        {
            "name": "margin",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "syntax": "<'margin-top'>{1,4}",
            "relevance": 95,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/margin"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property to set values for the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "margin-block-end",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "syntax": "<'margin-top'>",
            "relevance": 56,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'margin-bottom'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "margin-block-start",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "syntax": "<'margin-top'>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'margin-top'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "margin-bottom",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "syntax": "<length-percentage> | auto",
            "relevance": 91,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/margin-bottom"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property to set values for the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits..",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "margin-inline-end",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "syntax": "<'margin-top'>",
            "relevance": 59,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'margin-right'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "margin-inline-start",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "syntax": "<'margin-top'>",
            "relevance": 60,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'margin-left'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "margin-left",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "syntax": "<length-percentage> | auto",
            "relevance": 91,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/margin-left"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property to set values for the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits..",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "margin-right",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "syntax": "<length-percentage> | auto",
            "relevance": 91,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/margin-right"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property to set values for the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits..",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "margin-top",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "syntax": "<length-percentage> | auto",
            "relevance": 94,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/margin-top"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property to set values for the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits..",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "marker",
            "browsers": [
                "E15",
                "FF3",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
                },
                {
                    "name": "url()",
                    "description": "Indicates that the <marker> element referenced will be used."
                }
            ],
            "syntax": "none | <url>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/marker"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Specifies the marker symbol that shall be used for all points on the sets the value for all vertices on the given 'path' element or basic shape.",
            "restrictions": [
                "url"
            ]
        },
        {
            "name": "marker-end",
            "browsers": [
                "E15",
                "FF3",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
                },
                {
                    "name": "url()",
                    "description": "Indicates that the <marker> element referenced will be used."
                }
            ],
            "syntax": "none | <url>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/marker-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Specifies the marker that will be drawn at the last vertices of the given markable element.",
            "restrictions": [
                "url"
            ]
        },
        {
            "name": "marker-mid",
            "browsers": [
                "E15",
                "FF3",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
                },
                {
                    "name": "url()",
                    "description": "Indicates that the <marker> element referenced will be used."
                }
            ],
            "syntax": "none | <url>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/marker-mid"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Specifies the marker that will be drawn at all vertices except the first and last.",
            "restrictions": [
                "url"
            ]
        },
        {
            "name": "marker-start",
            "browsers": [
                "E15",
                "FF3",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
                },
                {
                    "name": "url()",
                    "description": "Indicates that the <marker> element referenced will be used."
                }
            ],
            "syntax": "none | <url>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/marker-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Specifies the marker that will be drawn at the first vertices of the given markable element.",
            "restrictions": [
                "url"
            ]
        },
        {
            "name": "mask-image",
            "browsers": [
                "E120",
                "FF53",
                "FFA53",
                "S15.4",
                "SM15.4",
                "C120",
                "CA120",
                "O15"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Counts as a transparent black image layer."
                },
                {
                    "name": "url()",
                    "description": "Reference to a <mask element or to a CSS image."
                }
            ],
            "syntax": "<mask-reference>#",
            "relevance": 58,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-image"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-12-07"
            },
            "description": "Sets the mask layer image of an element.",
            "restrictions": [
                "url",
                "image",
                "enum"
            ]
        },
        {
            "name": "mask-mode",
            "browsers": [
                "E120",
                "FF53",
                "FFA53",
                "S15.4",
                "SM15.4",
                "C120",
                "CA120",
                "O106"
            ],
            "values": [
                {
                    "name": "alpha",
                    "description": "Alpha values of the mask layer image should be used as the mask values."
                },
                {
                    "name": "auto",
                    "description": "Use alpha values if 'mask-image' is an image, luminance if a <mask> element or a CSS image."
                },
                {
                    "name": "luminance",
                    "description": "Luminance values of the mask layer image should be used as the mask values."
                }
            ],
            "syntax": "<masking-mode>#",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-mode"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-12-07"
            },
            "description": "Indicates whether the mask layer image is treated as luminance mask or alpha mask.",
            "restrictions": [
                "url",
                "image",
                "enum"
            ]
        },
        {
            "name": "mask-origin",
            "browsers": [
                "E120",
                "FF53",
                "FFA53",
                "S15.4",
                "SM15.4",
                "C120",
                "CA120",
                "O106"
            ],
            "syntax": "<coord-box>#",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-12-07"
            },
            "description": "Specifies the mask positioning area.",
            "restrictions": [
                "geometry-box",
                "enum"
            ]
        },
        {
            "name": "mask-position",
            "browsers": [
                "E120",
                "FF53",
                "FFA53",
                "S15.4",
                "SM15.4",
                "C120",
                "CA120",
                "O106"
            ],
            "syntax": "<position>#",
            "relevance": 55,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-position"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-12-07"
            },
            "description": "Specifies how mask layer images are positioned.",
            "restrictions": [
                "position",
                "length",
                "percentage"
            ]
        },
        {
            "name": "mask-repeat",
            "browsers": [
                "E120",
                "FF53",
                "FFA53",
                "S15.4",
                "SM15.4",
                "C120",
                "CA120",
                "O106"
            ],
            "syntax": "<repeat-style>#",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-12-07"
            },
            "description": "Specifies how mask layer images are tiled after they have been sized and positioned.",
            "restrictions": [
                "repeat"
            ]
        },
        {
            "name": "mask-size",
            "browsers": [
                "E120",
                "FF53",
                "FFA53",
                "S15.4",
                "SM15.4",
                "C120",
                "CA120",
                "O106"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Resolved by using the image's intrinsic ratio and the size of the other dimension, or failing that, using the image's intrinsic size, or failing that, treating it as 100%."
                },
                {
                    "name": "contain",
                    "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."
                },
                {
                    "name": "cover",
                    "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."
                }
            ],
            "syntax": "<bg-size>#",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-size"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-12-07"
            },
            "description": "Specifies the size of the mask layer images.",
            "restrictions": [
                "length",
                "percentage",
                "enum"
            ]
        },
        {
            "name": "mask-type",
            "browsers": [
                "E79",
                "FF35",
                "FFA35",
                "S7",
                "SM7",
                "C24",
                "CA25",
                "O15"
            ],
            "values": [
                {
                    "name": "alpha",
                    "description": "Indicates that the alpha values of the mask should be used."
                },
                {
                    "name": "luminance",
                    "description": "Indicates that the luminance values of the mask should be used."
                }
            ],
            "syntax": "luminance | alpha",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-type"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Defines whether the content of the <mask> element is treated as as luminance mask or alpha mask.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "max-block-size",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No limit on the width of the box."
                }
            ],
            "syntax": "<'max-width'>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/max-block-size"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Maximum size of an element in the direction opposite that of the direction specified by 'writing-mode'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "max-height",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1.3",
                "SM1",
                "C1",
                "CA18",
                "IE7",
                "O7"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No limit on the height of the box."
                },
                {
                    "name": "fit-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1.3",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O7"
                    ],
                    "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
                },
                {
                    "name": "max-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1.3",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O7"
                    ],
                    "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
                },
                {
                    "name": "min-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1.3",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O7"
                    ],
                    "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
                }
            ],
            "syntax": "none | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>",
            "relevance": 86,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/max-height"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Allows authors to constrain content height to a certain range.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "max-inline-size",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No limit on the height of the box."
                }
            ],
            "syntax": "<'max-width'>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/max-inline-size"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Maximum size of an element in the direction specified by 'writing-mode'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "max-width",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE7",
                "O4"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No limit on the width of the box."
                },
                {
                    "name": "fit-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O4"
                    ],
                    "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
                },
                {
                    "name": "max-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O4"
                    ],
                    "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
                },
                {
                    "name": "min-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O4"
                    ],
                    "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
                }
            ],
            "syntax": "none | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>",
            "relevance": 91,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/max-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Allows authors to constrain content width to a certain range.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "min-block-size",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C57",
                "CA57",
                "O44"
            ],
            "syntax": "<'min-width'>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/min-block-size"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Minimal size of an element in the direction opposite that of the direction specified by 'writing-mode'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "min-height",
            "browsers": [
                "E12",
                "FF3",
                "FFA4",
                "S1.3",
                "SM1",
                "C1",
                "CA18",
                "IE7",
                "O4"
            ],
            "values": [
                {
                    "name": "auto",
                    "browsers": [
                        "E12",
                        "FF3",
                        "FFA4",
                        "S1.3",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O4"
                    ]
                },
                {
                    "name": "fit-content",
                    "browsers": [
                        "E12",
                        "FF3",
                        "FFA4",
                        "S1.3",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O4"
                    ],
                    "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
                },
                {
                    "name": "max-content",
                    "browsers": [
                        "E12",
                        "FF3",
                        "FFA4",
                        "S1.3",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O4"
                    ],
                    "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
                },
                {
                    "name": "min-content",
                    "browsers": [
                        "E12",
                        "FF3",
                        "FFA4",
                        "S1.3",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O4"
                    ],
                    "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
                }
            ],
            "syntax": "auto | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>",
            "relevance": 89,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/min-height"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Allows authors to constrain content height to a certain range.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "min-inline-size",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C57",
                "CA57",
                "O44"
            ],
            "syntax": "<'min-width'>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/min-inline-size"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Minimal size of an element in the direction specified by 'writing-mode'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "min-width",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE7",
                "O4"
            ],
            "values": [
                {
                    "name": "auto",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O4"
                    ]
                },
                {
                    "name": "fit-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O4"
                    ],
                    "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
                },
                {
                    "name": "max-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O4"
                    ],
                    "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
                },
                {
                    "name": "min-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE7",
                        "O4"
                    ],
                    "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
                }
            ],
            "syntax": "auto | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>",
            "relevance": 88,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/min-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Allows authors to constrain content width to a certain range.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "mix-blend-mode",
            "browsers": [
                "E79",
                "FF32",
                "FFA32",
                "S8",
                "SM8",
                "C41",
                "CA41",
                "O28"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "Default attribute which specifies no blending"
                },
                {
                    "name": "multiply",
                    "description": "The source color is multiplied by the destination color and replaces the destination."
                },
                {
                    "name": "screen",
                    "description": "Multiplies the complements of the backdrop and source color values, then complements the result."
                },
                {
                    "name": "overlay",
                    "description": "Multiplies or screens the colors, depending on the backdrop color value."
                },
                {
                    "name": "darken",
                    "description": "Selects the darker of the backdrop and source colors."
                },
                {
                    "name": "lighten",
                    "description": "Selects the lighter of the backdrop and source colors."
                },
                {
                    "name": "color-dodge",
                    "description": "Brightens the backdrop color to reflect the source color."
                },
                {
                    "name": "color-burn",
                    "description": "Darkens the backdrop color to reflect the source color."
                },
                {
                    "name": "hard-light",
                    "description": "Multiplies or screens the colors, depending on the source color value."
                },
                {
                    "name": "soft-light",
                    "description": "Darkens or lightens the colors, depending on the source color value."
                },
                {
                    "name": "difference",
                    "description": "Subtracts the darker of the two constituent colors from the lighter color.."
                },
                {
                    "name": "exclusion",
                    "description": "Produces an effect similar to that of the Difference mode but lower in contrast."
                },
                {
                    "name": "hue",
                    "browsers": [
                        "E79",
                        "FF32",
                        "FFA32",
                        "S8",
                        "SM8",
                        "C41",
                        "CA41",
                        "O28"
                    ],
                    "description": "Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color."
                },
                {
                    "name": "saturation",
                    "browsers": [
                        "E79",
                        "FF32",
                        "FFA32",
                        "S8",
                        "SM8",
                        "C41",
                        "CA41",
                        "O28"
                    ],
                    "description": "Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color."
                },
                {
                    "name": "color",
                    "browsers": [
                        "E79",
                        "FF32",
                        "FFA32",
                        "S8",
                        "SM8",
                        "C41",
                        "CA41",
                        "O28"
                    ],
                    "description": "Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color."
                },
                {
                    "name": "luminosity",
                    "browsers": [
                        "E79",
                        "FF32",
                        "FFA32",
                        "S8",
                        "SM8",
                        "C41",
                        "CA41",
                        "O28"
                    ],
                    "description": "Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color."
                }
            ],
            "syntax": "<blend-mode> | plus-lighter",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Defines the formula that must be used to mix the colors with the backdrop.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "motion",
            "browsers": [
                "C46",
                "O33"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No motion path gets created."
                },
                {
                    "name": "path()",
                    "description": "Defines an SVG path as a string, with optional 'fill-rule' as the first argument."
                },
                {
                    "name": "auto",
                    "description": "Indicates that the object is rotated by the angle of the direction of the motion path."
                },
                {
                    "name": "reverse",
                    "description": "Indicates that the object is rotated by the angle of the direction of the motion path plus 180 degrees."
                }
            ],
            "relevance": 50,
            "description": "Shorthand property for setting 'motion-path', 'motion-offset' and 'motion-rotation'.",
            "restrictions": [
                "url",
                "length",
                "percentage",
                "angle",
                "shape",
                "geometry-box",
                "enum"
            ]
        },
        {
            "name": "motion-offset",
            "browsers": [
                "C46",
                "O33"
            ],
            "relevance": 50,
            "description": "A distance that describes the position along the specified motion path.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "motion-path",
            "browsers": [
                "C46",
                "O33"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No motion path gets created."
                },
                {
                    "name": "path()",
                    "description": "Defines an SVG path as a string, with optional 'fill-rule' as the first argument."
                }
            ],
            "relevance": 50,
            "description": "Specifies the motion path the element gets positioned at.",
            "restrictions": [
                "url",
                "shape",
                "geometry-box",
                "enum"
            ]
        },
        {
            "name": "motion-rotation",
            "browsers": [
                "C46",
                "O33"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Indicates that the object is rotated by the angle of the direction of the motion path."
                },
                {
                    "name": "reverse",
                    "description": "Indicates that the object is rotated by the angle of the direction of the motion path plus 180 degrees."
                }
            ],
            "relevance": 50,
            "description": "Defines the direction of the element while positioning along the motion path.",
            "restrictions": [
                "angle"
            ]
        },
        {
            "name": "-moz-animation",
            "browsers": [
                "FF9"
            ],
            "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."
                }
            ],
            "relevance": 50,
            "description": "Shorthand property combines six of the animation properties into a single property.",
            "restrictions": [
                "time",
                "enum",
                "timing-function",
                "identifier",
                "number"
            ]
        },
        {
            "name": "-moz-animation-delay",
            "browsers": [
                "FF9"
            ],
            "relevance": 50,
            "description": "Defines when the animation will start.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "-moz-animation-direction",
            "browsers": [
                "FF9"
            ],
            "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": "normal",
                    "description": "Normal playback."
                },
                {
                    "name": "reverse",
                    "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
                }
            ],
            "relevance": 50,
            "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-animation-duration",
            "browsers": [
                "FF9"
            ],
            "relevance": 50,
            "description": "Defines the length of time that an animation takes to complete one cycle.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "-moz-animation-iteration-count",
            "browsers": [
                "FF9"
            ],
            "values": [
                {
                    "name": "infinite",
                    "description": "Causes the animation to repeat forever."
                }
            ],
            "relevance": 50,
            "description": "Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",
            "restrictions": [
                "number",
                "enum"
            ]
        },
        {
            "name": "-moz-animation-name",
            "browsers": [
                "FF9"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No animation is performed"
                }
            ],
            "relevance": 50,
            "description": "Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",
            "restrictions": [
                "identifier",
                "enum"
            ]
        },
        {
            "name": "-moz-animation-play-state",
            "browsers": [
                "FF9"
            ],
            "values": [
                {
                    "name": "paused",
                    "description": "A running animation will be paused."
                },
                {
                    "name": "running",
                    "description": "Resume playback of a paused animation."
                }
            ],
            "relevance": 50,
            "description": "Defines whether the animation is running or paused.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-animation-timing-function",
            "browsers": [
                "FF9"
            ],
            "relevance": 50,
            "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
            "restrictions": [
                "timing-function"
            ]
        },
        {
            "name": "-moz-appearance",
            "browsers": [
                "FF1"
            ],
            "values": [
                {
                    "name": "button"
                },
                {
                    "name": "button-arrow-down"
                },
                {
                    "name": "button-arrow-next"
                },
                {
                    "name": "button-arrow-previous"
                },
                {
                    "name": "button-arrow-up"
                },
                {
                    "name": "button-bevel"
                },
                {
                    "name": "checkbox"
                },
                {
                    "name": "checkbox-container"
                },
                {
                    "name": "checkbox-label"
                },
                {
                    "name": "dialog"
                },
                {
                    "name": "groupbox"
                },
                {
                    "name": "listbox"
                },
                {
                    "name": "menuarrow"
                },
                {
                    "name": "menuimage"
                },
                {
                    "name": "menuitem"
                },
                {
                    "name": "menuitemtext"
                },
                {
                    "name": "menulist"
                },
                {
                    "name": "menulist-button"
                },
                {
                    "name": "menulist-text"
                },
                {
                    "name": "menulist-textfield"
                },
                {
                    "name": "menupopup"
                },
                {
                    "name": "menuradio"
                },
                {
                    "name": "menuseparator"
                },
                {
                    "name": "-moz-mac-unified-toolbar"
                },
                {
                    "name": "-moz-win-borderless-glass"
                },
                {
                    "name": "-moz-win-browsertabbar-toolbox"
                },
                {
                    "name": "-moz-win-communications-toolbox"
                },
                {
                    "name": "-moz-win-glass"
                },
                {
                    "name": "-moz-win-media-toolbox"
                },
                {
                    "name": "none"
                },
                {
                    "name": "progressbar"
                },
                {
                    "name": "progresschunk"
                },
                {
                    "name": "radio"
                },
                {
                    "name": "radio-container"
                },
                {
                    "name": "radio-label"
                },
                {
                    "name": "radiomenuitem"
                },
                {
                    "name": "resizer"
                },
                {
                    "name": "resizerpanel"
                },
                {
                    "name": "scrollbarbutton-down"
                },
                {
                    "name": "scrollbarbutton-left"
                },
                {
                    "name": "scrollbarbutton-right"
                },
                {
                    "name": "scrollbarbutton-up"
                },
                {
                    "name": "scrollbar-small"
                },
                {
                    "name": "scrollbartrack-horizontal"
                },
                {
                    "name": "scrollbartrack-vertical"
                },
                {
                    "name": "separator"
                },
                {
                    "name": "spinner"
                },
                {
                    "name": "spinner-downbutton"
                },
                {
                    "name": "spinner-textfield"
                },
                {
                    "name": "spinner-upbutton"
                },
                {
                    "name": "statusbar"
                },
                {
                    "name": "statusbarpanel"
                },
                {
                    "name": "tab"
                },
                {
                    "name": "tabpanels"
                },
                {
                    "name": "tab-scroll-arrow-back"
                },
                {
                    "name": "tab-scroll-arrow-forward"
                },
                {
                    "name": "textfield"
                },
                {
                    "name": "textfield-multiline"
                },
                {
                    "name": "toolbar"
                },
                {
                    "name": "toolbox"
                },
                {
                    "name": "tooltip"
                },
                {
                    "name": "treeheadercell"
                },
                {
                    "name": "treeheadersortarrow"
                },
                {
                    "name": "treeitem"
                },
                {
                    "name": "treetwistyopen"
                },
                {
                    "name": "treeview"
                },
                {
                    "name": "treewisty"
                },
                {
                    "name": "window"
                }
            ],
            "status": "nonstandard",
            "syntax": "none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized",
            "relevance": 0,
            "description": "Used in Gecko (Firefox) to display an element using a platform-native styling based on the operating system's theme.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-backface-visibility",
            "browsers": [
                "FF10"
            ],
            "values": [
                {
                    "name": "hidden"
                },
                {
                    "name": "visible"
                }
            ],
            "relevance": 50,
            "description": "Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-background-clip",
            "browsers": [
                "FF1-3.6"
            ],
            "values": [
                {
                    "name": "padding"
                }
            ],
            "relevance": 50,
            "description": "Determines the background painting area.",
            "restrictions": [
                "box",
                "enum"
            ]
        },
        {
            "name": "-moz-background-inline-policy",
            "browsers": [
                "FF1"
            ],
            "values": [
                {
                    "name": "bounding-box"
                },
                {
                    "name": "continuous"
                },
                {
                    "name": "each-box"
                }
            ],
            "relevance": 50,
            "description": "In Gecko-based applications like Firefox, the -moz-background-inline-policy CSS property specifies how the background image of an inline element is determined when the content of the inline element wraps onto multiple lines. The choice of position has significant effects on repetition.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-background-origin",
            "browsers": [
                "FF1"
            ],
            "relevance": 50,
            "description": "For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",
            "restrictions": [
                "box"
            ]
        },
        {
            "name": "-moz-border-bottom-colors",
            "browsers": [
                "FF1"
            ],
            "status": "nonstandard",
            "syntax": "<color>+ | none",
            "relevance": 0,
            "description": "Sets a list of colors for the bottom border.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-moz-border-image",
            "browsers": [
                "FF3.6"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
                },
                {
                    "name": "fill",
                    "description": "Causes the middle part of the border-image to be preserved."
                },
                {
                    "name": "none"
                },
                {
                    "name": "repeat",
                    "description": "The image is tiled (repeated) to fill the area."
                },
                {
                    "name": "round",
                    "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
                },
                {
                    "name": "space",
                    "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
                },
                {
                    "name": "stretch",
                    "description": "The image is stretched to fill the area."
                },
                {
                    "name": "url()"
                }
            ],
            "relevance": 50,
            "description": "Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",
            "restrictions": [
                "length",
                "percentage",
                "number",
                "url",
                "enum"
            ]
        },
        {
            "name": "-moz-border-left-colors",
            "browsers": [
                "FF1"
            ],
            "status": "nonstandard",
            "syntax": "<color>+ | none",
            "relevance": 0,
            "description": "Sets a list of colors for the bottom border.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-moz-border-right-colors",
            "browsers": [
                "FF1"
            ],
            "status": "nonstandard",
            "syntax": "<color>+ | none",
            "relevance": 0,
            "description": "Sets a list of colors for the bottom border.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-moz-border-top-colors",
            "browsers": [
                "FF1"
            ],
            "status": "nonstandard",
            "syntax": "<color>+ | none",
            "relevance": 0,
            "description": "Ske Firefox, -moz-border-bottom-colors sets a list of colors for the bottom border.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-moz-box-align",
            "browsers": [
                "FF1"
            ],
            "values": [
                {
                    "name": "baseline",
                    "description": "If this box orientation is inline-axis or horizontal, all children are placed with their baselines aligned, and extra space placed before or after as necessary. For block flows, the baseline of the first non-empty line box located within the element is used. For tables, the baseline of the first cell is used."
                },
                {
                    "name": "center",
                    "description": "Any extra space is divided evenly, with half placed above the child and the other half placed after the child."
                },
                {
                    "name": "end",
                    "description": "For normal direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element. For reverse direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element."
                },
                {
                    "name": "start",
                    "description": "For normal direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element. For reverse direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element."
                },
                {
                    "name": "stretch",
                    "description": "The height of each child is adjusted to that of the containing block."
                }
            ],
            "relevance": 50,
            "description": "Specifies how a XUL box aligns its contents across (perpendicular to) the direction of its layout. The effect of this is only visible if there is extra space in the box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-box-direction",
            "browsers": [
                "FF1"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "A box with a computed value of horizontal for box-orient displays its children from left to right. A box with a computed value of vertical displays its children from top to bottom."
                },
                {
                    "name": "reverse",
                    "description": "A box with a computed value of horizontal for box-orient displays its children from right to left. A box with a computed value of vertical displays its children from bottom to top."
                }
            ],
            "relevance": 50,
            "description": "Specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge).",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-box-flex",
            "browsers": [
                "FF1"
            ],
            "relevance": 50,
            "description": "Specifies how a box grows to fill the box that contains it, in the direction of the containing box's layout.",
            "restrictions": [
                "number"
            ]
        },
        {
            "name": "-moz-box-flexgroup",
            "browsers": [
                "FF1"
            ],
            "relevance": 50,
            "description": "Flexible elements can be assigned to flex groups using the 'box-flex-group' property.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-moz-box-ordinal-group",
            "browsers": [
                "FF1"
            ],
            "relevance": 50,
            "description": "Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-moz-box-orient",
            "browsers": [
                "FF1"
            ],
            "values": [
                {
                    "name": "block-axis",
                    "description": "Elements are oriented along the box's axis."
                },
                {
                    "name": "horizontal",
                    "description": "The box displays its children from left to right in a horizontal line."
                },
                {
                    "name": "inline-axis",
                    "description": "Elements are oriented vertically."
                },
                {
                    "name": "vertical",
                    "description": "The box displays its children from stacked from top to bottom vertically."
                }
            ],
            "relevance": 50,
            "description": "In Mozilla applications, -moz-box-orient specifies whether a box lays out its contents horizontally or vertically.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-box-pack",
            "browsers": [
                "FF1"
            ],
            "values": [
                {
                    "name": "center",
                    "description": "The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."
                },
                {
                    "name": "end",
                    "description": "For normal direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child. For reverse direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child."
                },
                {
                    "name": "justify",
                    "description": "The space is divided evenly in-between each child, with none of the extra space placed before the first child or after the last child. If there is only one child, treat the pack value as if it were start."
                },
                {
                    "name": "start",
                    "description": "For normal direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child. For reverse direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child."
                }
            ],
            "relevance": 50,
            "description": "Specifies how a box packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-box-sizing",
            "browsers": [
                "FF1"
            ],
            "values": [
                {
                    "name": "border-box",
                    "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
                },
                {
                    "name": "content-box",
                    "description": "Behavior of width and height as specified by CSS2.1. The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element."
                },
                {
                    "name": "padding-box",
                    "description": "The specified width and height (and respective min/max properties) on this element determine the padding box of the element."
                }
            ],
            "relevance": 50,
            "description": "Box Model addition in CSS3.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-column-count",
            "browsers": [
                "FF3.5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Determines the number of columns by the 'column-width' property and the element width."
                }
            ],
            "relevance": 50,
            "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-moz-column-gap",
            "browsers": [
                "FF3.5"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "User agent specific and typically equivalent to 1em."
                }
            ],
            "relevance": 50,
            "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-moz-column-rule",
            "browsers": [
                "FF3.5"
            ],
            "relevance": 50,
            "description": "Shorthand for setting 'column-rule-width', 'column-rule-style', and 'column-rule-color' at the same place in the style sheet. Omitted values are set to their initial values.",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color"
            ]
        },
        {
            "name": "-moz-column-rule-color",
            "browsers": [
                "FF3.5"
            ],
            "relevance": 50,
            "description": "Sets the color of the column rule",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-moz-column-rule-style",
            "browsers": [
                "FF3.5"
            ],
            "relevance": 50,
            "description": "Sets the style of the rule between columns of an element.",
            "restrictions": [
                "line-style"
            ]
        },
        {
            "name": "-moz-column-rule-width",
            "browsers": [
                "FF3.5"
            ],
            "relevance": 50,
            "description": "Sets the width of the rule between columns. Negative values are not allowed.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "-moz-columns",
            "browsers": [
                "FF9"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The width depends on the values of other properties."
                }
            ],
            "relevance": 50,
            "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
            "restrictions": [
                "length",
                "integer"
            ]
        },
        {
            "name": "-moz-column-width",
            "browsers": [
                "FF3.5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The width depends on the values of other properties."
                }
            ],
            "relevance": 50,
            "description": "This property describes the width of columns in multicol elements.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-moz-font-feature-settings",
            "browsers": [
                "FF4"
            ],
            "values": [
                {
                    "name": "\"c2cs\""
                },
                {
                    "name": "\"dlig\""
                },
                {
                    "name": "\"kern\""
                },
                {
                    "name": "\"liga\""
                },
                {
                    "name": "\"lnum\""
                },
                {
                    "name": "\"onum\""
                },
                {
                    "name": "\"smcp\""
                },
                {
                    "name": "\"swsh\""
                },
                {
                    "name": "\"tnum\""
                },
                {
                    "name": "normal",
                    "description": "No change in glyph substitution or positioning occurs."
                },
                {
                    "name": "off",
                    "browsers": [
                        "FF4"
                    ]
                },
                {
                    "name": "on",
                    "browsers": [
                        "FF4"
                    ]
                }
            ],
            "relevance": 50,
            "description": "Provides low-level control over OpenType font features. It is intended as a way of providing access to font features that are not widely used but are needed for a particular use case.",
            "restrictions": [
                "string",
                "integer"
            ]
        },
        {
            "name": "-moz-hyphens",
            "browsers": [
                "FF9"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
                },
                {
                    "name": "manual",
                    "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
                },
                {
                    "name": "none",
                    "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
                }
            ],
            "relevance": 50,
            "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-perspective",
            "browsers": [
                "FF10"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No perspective transform is applied."
                }
            ],
            "relevance": 50,
            "description": "Applies the same transform as the perspective(<number>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-moz-perspective-origin",
            "browsers": [
                "FF10"
            ],
            "relevance": 50,
            "description": "Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",
            "restrictions": [
                "position",
                "percentage",
                "length"
            ]
        },
        {
            "name": "-moz-text-align-last",
            "browsers": [
                "FF12"
            ],
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "center",
                    "description": "The inline contents are centered within the line box."
                },
                {
                    "name": "justify",
                    "description": "The text is justified according to the method specified by the 'text-justify' property."
                },
                {
                    "name": "left",
                    "description": "The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."
                },
                {
                    "name": "right",
                    "description": "The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."
                }
            ],
            "relevance": 50,
            "description": "Describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-text-decoration-color",
            "browsers": [
                "FF6"
            ],
            "relevance": 50,
            "description": "Specifies the color of text decoration (underlines overlines, and line-throughs) set on the element with text-decoration-line.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-moz-text-decoration-line",
            "browsers": [
                "FF6"
            ],
            "values": [
                {
                    "name": "line-through",
                    "description": "Each line of text has a line through the middle."
                },
                {
                    "name": "none",
                    "description": "Neither produces nor inhibits text decoration."
                },
                {
                    "name": "overline",
                    "description": "Each line of text has a line above it."
                },
                {
                    "name": "underline",
                    "description": "Each line of text is underlined."
                }
            ],
            "relevance": 50,
            "description": "Specifies what line decorations, if any, are added to the element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-text-decoration-style",
            "browsers": [
                "FF6"
            ],
            "values": [
                {
                    "name": "dashed",
                    "description": "Produces a dashed line style."
                },
                {
                    "name": "dotted",
                    "description": "Produces a dotted line."
                },
                {
                    "name": "double",
                    "description": "Produces a double line."
                },
                {
                    "name": "none",
                    "description": "Produces no line."
                },
                {
                    "name": "solid",
                    "description": "Produces a solid line."
                },
                {
                    "name": "wavy",
                    "description": "Produces a wavy line."
                }
            ],
            "relevance": 50,
            "description": "Specifies the line style for underline, line-through and overline text decoration.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-text-size-adjust",
            "browsers": [
                "FF"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Renderers must use the default size adjustment when displaying on a small device."
                },
                {
                    "name": "none",
                    "description": "Renderers must not do size adjustment when displaying on a small device."
                }
            ],
            "relevance": 50,
            "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
            "restrictions": [
                "enum",
                "percentage"
            ]
        },
        {
            "name": "-moz-transform",
            "browsers": [
                "FF3.5"
            ],
            "values": [
                {
                    "name": "matrix()",
                    "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
                },
                {
                    "name": "matrix3d()",
                    "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
                },
                {
                    "name": "none"
                },
                {
                    "name": "perspective",
                    "description": "Specifies a perspective projection matrix."
                },
                {
                    "name": "rotate()",
                    "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
                },
                {
                    "name": "rotate3d()",
                    "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
                },
                {
                    "name": "rotateX('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the X axis."
                },
                {
                    "name": "rotateY('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the Y axis."
                },
                {
                    "name": "rotateZ('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the Z axis."
                },
                {
                    "name": "scale()",
                    "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
                },
                {
                    "name": "scale3d()",
                    "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
                },
                {
                    "name": "scaleX()",
                    "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
                },
                {
                    "name": "scaleY()",
                    "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
                },
                {
                    "name": "scaleZ()",
                    "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
                },
                {
                    "name": "skew()",
                    "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
                },
                {
                    "name": "skewX()",
                    "description": "Specifies a skew transformation along the X axis by the given angle."
                },
                {
                    "name": "skewY()",
                    "description": "Specifies a skew transformation along the Y axis by the given angle."
                },
                {
                    "name": "translate()",
                    "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
                },
                {
                    "name": "translate3d()",
                    "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
                },
                {
                    "name": "translateX()",
                    "description": "Specifies a translation by the given amount in the X direction."
                },
                {
                    "name": "translateY()",
                    "description": "Specifies a translation by the given amount in the Y direction."
                },
                {
                    "name": "translateZ()",
                    "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
                }
            ],
            "relevance": 50,
            "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-moz-transform-origin",
            "browsers": [
                "FF3.5"
            ],
            "relevance": 50,
            "description": "Establishes the origin of transformation for an element.",
            "restrictions": [
                "position",
                "length",
                "percentage"
            ]
        },
        {
            "name": "-moz-transition",
            "browsers": [
                "FF4"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "Every property that is able to undergo a transition will do so."
                },
                {
                    "name": "none",
                    "description": "No property will transition."
                }
            ],
            "relevance": 50,
            "description": "Shorthand property combines four of the transition properties into a single property.",
            "restrictions": [
                "time",
                "property",
                "timing-function",
                "enum"
            ]
        },
        {
            "name": "-moz-transition-delay",
            "browsers": [
                "FF4"
            ],
            "relevance": 50,
            "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "-moz-transition-duration",
            "browsers": [
                "FF4"
            ],
            "relevance": 50,
            "description": "Specifies how long the transition from the old value to the new value should take.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "-moz-transition-property",
            "browsers": [
                "FF4"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "Every property that is able to undergo a transition will do so."
                },
                {
                    "name": "none",
                    "description": "No property will transition."
                }
            ],
            "relevance": 50,
            "description": "Specifies the name of the CSS property to which the transition is applied.",
            "restrictions": [
                "property"
            ]
        },
        {
            "name": "-moz-transition-timing-function",
            "browsers": [
                "FF4"
            ],
            "relevance": 50,
            "description": "Describes how the intermediate values used during a transition will be calculated.",
            "restrictions": [
                "timing-function"
            ]
        },
        {
            "name": "-moz-user-focus",
            "values": [
                {
                    "name": "ignore"
                },
                {
                    "name": "normal"
                }
            ],
            "status": "obsolete",
            "syntax": "ignore | normal | select-after | select-before | select-menu | select-same | select-all | none",
            "relevance": 0,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-user-focus"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Used to indicate whether the element can have focus."
        },
        {
            "name": "-moz-user-select",
            "browsers": [
                "FF1.5"
            ],
            "values": [
                {
                    "name": "all"
                },
                {
                    "name": "element"
                },
                {
                    "name": "elements"
                },
                {
                    "name": "-moz-all"
                },
                {
                    "name": "-moz-none"
                },
                {
                    "name": "none"
                },
                {
                    "name": "text"
                },
                {
                    "name": "toggle"
                }
            ],
            "relevance": 50,
            "description": "Controls the appearance of selection.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-accelerator",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "false",
                    "description": "The element does not contain an accelerator key sequence."
                },
                {
                    "name": "true",
                    "description": "The element contains an accelerator key sequence."
                }
            ],
            "status": "nonstandard",
            "syntax": "false | true",
            "relevance": 0,
            "description": "IE only. Has the ability to turn off its system underlines for accelerator keys until the ALT key is pressed",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-behavior",
            "browsers": [
                "IE8"
            ],
            "relevance": 50,
            "description": "IE only. Used to extend behaviors of the browser",
            "restrictions": [
                "url"
            ]
        },
        {
            "name": "-ms-block-progression",
            "browsers": [
                "IE8"
            ],
            "values": [
                {
                    "name": "bt",
                    "description": "Bottom-to-top block flow. Layout is horizontal."
                },
                {
                    "name": "lr",
                    "description": "Left-to-right direction. The flow orientation is vertical."
                },
                {
                    "name": "rl",
                    "description": "Right-to-left direction. The flow orientation is vertical."
                },
                {
                    "name": "tb",
                    "description": "Top-to-bottom direction. The flow orientation is horizontal."
                }
            ],
            "status": "nonstandard",
            "syntax": "tb | rl | bt | lr",
            "relevance": 0,
            "description": "Sets the block-progression value and the flow orientation",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-content-zoom-chaining",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "chained",
                    "description": "The nearest zoomable parent element begins zooming when the user hits a zoom limit during a manipulation. No bounce effect is shown."
                },
                {
                    "name": "none",
                    "description": "A bounce effect is shown when the user hits a zoom limit during a manipulation."
                }
            ],
            "status": "nonstandard",
            "syntax": "none | chained",
            "relevance": 0,
            "description": "Specifies the zoom behavior that occurs when a user hits the zoom limit during a manipulation."
        },
        {
            "name": "-ms-content-zooming",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "The element is not zoomable."
                },
                {
                    "name": "zoom",
                    "description": "The element is zoomable."
                }
            ],
            "status": "nonstandard",
            "syntax": "none | zoom",
            "relevance": 0,
            "description": "Specifies whether zooming is enabled.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-content-zoom-limit",
            "browsers": [
                "E",
                "IE10"
            ],
            "status": "nonstandard",
            "syntax": "<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>",
            "relevance": 0,
            "description": "Shorthand property for the -ms-content-zoom-limit-min and -ms-content-zoom-limit-max properties.",
            "restrictions": [
                "percentage"
            ]
        },
        {
            "name": "-ms-content-zoom-limit-max",
            "browsers": [
                "E",
                "IE10"
            ],
            "status": "nonstandard",
            "syntax": "<percentage>",
            "relevance": 0,
            "description": "Specifies the maximum zoom factor.",
            "restrictions": [
                "percentage"
            ]
        },
        {
            "name": "-ms-content-zoom-limit-min",
            "browsers": [
                "E",
                "IE10"
            ],
            "status": "nonstandard",
            "syntax": "<percentage>",
            "relevance": 0,
            "description": "Specifies the minimum zoom factor.",
            "restrictions": [
                "percentage"
            ]
        },
        {
            "name": "-ms-content-zoom-snap",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "mandatory",
                    "description": "Indicates that the motion of the content after the contact is picked up is always adjusted so that it lands on a snap-point."
                },
                {
                    "name": "none",
                    "description": "Indicates that zooming is unaffected by any defined snap-points."
                },
                {
                    "name": "proximity",
                    "description": "Indicates that the motion of the content after the contact is picked up may be adjusted if the content would normally stop \"close enough\" to a snap-point."
                },
                {
                    "name": "snapInterval(100%, 100%)",
                    "description": "Specifies where the snap-points will be placed."
                },
                {
                    "name": "snapList()",
                    "description": "Specifies the position of individual snap-points as a comma-separated list of zoom factors."
                }
            ],
            "status": "nonstandard",
            "syntax": "<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>",
            "relevance": 0,
            "description": "Shorthand property for the -ms-content-zoom-snap-type and -ms-content-zoom-snap-points properties."
        },
        {
            "name": "-ms-content-zoom-snap-points",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "snapInterval(100%, 100%)",
                    "description": "Specifies where the snap-points will be placed."
                },
                {
                    "name": "snapList()",
                    "description": "Specifies the position of individual snap-points as a comma-separated list of zoom factors."
                }
            ],
            "status": "nonstandard",
            "syntax": "snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )",
            "relevance": 0,
            "description": "Defines where zoom snap-points are located."
        },
        {
            "name": "-ms-content-zoom-snap-type",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "mandatory",
                    "description": "Indicates that the motion of the content after the contact is picked up is always adjusted so that it lands on a snap-point."
                },
                {
                    "name": "none",
                    "description": "Indicates that zooming is unaffected by any defined snap-points."
                },
                {
                    "name": "proximity",
                    "description": "Indicates that the motion of the content after the contact is picked up may be adjusted if the content would normally stop \"close enough\" to a snap-point."
                }
            ],
            "status": "nonstandard",
            "syntax": "none | proximity | mandatory",
            "relevance": 0,
            "description": "Specifies how zooming is affected by defined snap-points.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-filter",
            "browsers": [
                "IE8-9"
            ],
            "status": "nonstandard",
            "syntax": "<string>",
            "relevance": 0,
            "description": "IE only. Used to produce visual effects.",
            "restrictions": [
                "string"
            ]
        },
        {
            "name": "-ms-flex",
            "browsers": [
                "IE10"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Retrieves the value of the main size property as the used 'flex-basis'."
                },
                {
                    "name": "none",
                    "description": "Expands to '0 0 auto'."
                }
            ],
            "relevance": 50,
            "description": "specifies the parameters of a flexible length: the positive and negative flexibility, and the preferred size.",
            "restrictions": [
                "length",
                "number",
                "percentage"
            ]
        },
        {
            "name": "-ms-flex-align",
            "browsers": [
                "IE10"
            ],
            "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": "end",
                    "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
                },
                {
                    "name": "start",
                    "description": "The cross-start margin edge of the flexbox item is placed flush with the cross-start edge of the line."
                },
                {
                    "name": "stretch",
                    "description": "If the cross size property of the flexbox item is anything other than 'auto', this value is identical to 'start'."
                }
            ],
            "relevance": 50,
            "description": "Aligns flex items along the cross axis of the current line of the flex container.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-flex-direction",
            "browsers": [
                "IE10"
            ],
            "values": [
                {
                    "name": "column",
                    "description": "The flex container's main axis has the same orientation as the block axis of the current writing mode."
                },
                {
                    "name": "column-reverse",
                    "description": "Same as 'column', except the main-start and main-end directions are swapped."
                },
                {
                    "name": "row",
                    "description": "The flex container's main axis has the same orientation as the inline axis of the current writing mode."
                },
                {
                    "name": "row-reverse",
                    "description": "Same as 'row', except the main-start and main-end directions are swapped."
                }
            ],
            "relevance": 50,
            "description": "Specifies how flex items are placed in the flex container, by setting the direction of the flex container's main axis.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-flex-flow",
            "browsers": [
                "IE10"
            ],
            "values": [
                {
                    "name": "column",
                    "description": "The flex container's main axis has the same orientation as the block axis of the current writing mode."
                },
                {
                    "name": "column-reverse",
                    "description": "Same as 'column', except the main-start and main-end directions are swapped."
                },
                {
                    "name": "nowrap",
                    "description": "The flex container is single-line."
                },
                {
                    "name": "row",
                    "description": "The flex container's main axis has the same orientation as the inline axis of the current writing mode."
                },
                {
                    "name": "wrap",
                    "description": "The flexbox is multi-line."
                },
                {
                    "name": "wrap-reverse",
                    "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
                }
            ],
            "relevance": 50,
            "description": "Specifies how flexbox items are placed in the flexbox.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-flex-item-align",
            "browsers": [
                "IE10"
            ],
            "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": "end",
                    "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
                },
                {
                    "name": "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."
                }
            ],
            "relevance": 50,
            "description": "Allows the default alignment along the cross axis to be overridden for individual flex items.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-flex-line-pack",
            "browsers": [
                "IE10"
            ],
            "values": [
                {
                    "name": "center",
                    "description": "Lines are packed toward the center of the flex container."
                },
                {
                    "name": "distribute",
                    "description": "Lines are evenly distributed in the flex container, with half-size spaces on either end."
                },
                {
                    "name": "end",
                    "description": "Lines are packed toward the end of the flex container."
                },
                {
                    "name": "justify",
                    "description": "Lines are evenly distributed in the flex container."
                },
                {
                    "name": "start",
                    "description": "Lines are packed toward the start of the flex container."
                },
                {
                    "name": "stretch",
                    "description": "Lines stretch to take up the remaining space."
                }
            ],
            "relevance": 50,
            "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": "-ms-flex-order",
            "browsers": [
                "IE10"
            ],
            "relevance": 50,
            "description": "Controls the order in which children of a flex container appear within the flex container, by assigning them to ordinal groups.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-ms-flex-pack",
            "browsers": [
                "IE10"
            ],
            "values": [
                {
                    "name": "center",
                    "description": "Flex items are packed toward the center of the line."
                },
                {
                    "name": "distribute",
                    "description": "Flex items are evenly distributed in the line, with half-size spaces on either end."
                },
                {
                    "name": "end",
                    "description": "Flex items are packed toward the end of the line."
                },
                {
                    "name": "justify",
                    "description": "Flex items are evenly distributed in the line."
                },
                {
                    "name": "start",
                    "description": "Flex items are packed toward the start of the line."
                }
            ],
            "relevance": 50,
            "description": "Aligns flex items along the main axis of the current line of the flex container.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-flex-wrap",
            "browsers": [
                "IE10"
            ],
            "values": [
                {
                    "name": "nowrap",
                    "description": "The flex container is single-line."
                },
                {
                    "name": "wrap",
                    "description": "The flexbox is multi-line."
                },
                {
                    "name": "wrap-reverse",
                    "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
                }
            ],
            "relevance": 50,
            "description": "Controls whether the flex container is single-line or multi-line, and the direction of the cross-axis, which determines the direction new lines are stacked in.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-flow-from",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "The block container is not a CSS Region."
                }
            ],
            "status": "nonstandard",
            "syntax": "[ none | <custom-ident> ]#",
            "relevance": 0,
            "description": "Makes a block container a region and associates it with a named flow.",
            "restrictions": [
                "identifier"
            ]
        },
        {
            "name": "-ms-flow-into",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "The element is not moved to a named flow and normal CSS processing takes place."
                }
            ],
            "status": "nonstandard",
            "syntax": "[ none | <custom-ident> ]#",
            "relevance": 0,
            "description": "Places an element or its contents into a named flow.",
            "restrictions": [
                "identifier"
            ]
        },
        {
            "name": "-ms-grid-column",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "end"
                },
                {
                    "name": "start"
                }
            ],
            "relevance": 50,
            "description": "Used to place grid items and explicitly defined grid cells in the Grid.",
            "restrictions": [
                "integer",
                "string",
                "enum"
            ]
        },
        {
            "name": "-ms-grid-column-align",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "center",
                    "description": "Places the center of the Grid Item's margin box at the center of the Grid Item's column."
                },
                {
                    "name": "end",
                    "description": "Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's column."
                },
                {
                    "name": "start",
                    "description": "Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's column."
                },
                {
                    "name": "stretch",
                    "description": "Ensures that the Grid Item's margin box is equal to the size of the Grid Item's column."
                }
            ],
            "relevance": 50,
            "description": "Aligns the columns in a grid.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-grid-columns",
            "browsers": [
                "E",
                "IE10"
            ],
            "status": "nonstandard",
            "syntax": "none | <track-list> | <auto-track-list>",
            "relevance": 0,
            "description": "Lays out the columns of the grid."
        },
        {
            "name": "-ms-grid-column-span",
            "browsers": [
                "E",
                "IE10"
            ],
            "relevance": 50,
            "description": "Specifies the number of columns to span.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-ms-grid-layer",
            "browsers": [
                "E",
                "IE10"
            ],
            "relevance": 50,
            "description": "Grid-layer is similar in concept to z-index, but avoids overloading the meaning of the z-index property, which is applicable only to positioned elements.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-ms-grid-row",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "end"
                },
                {
                    "name": "start"
                }
            ],
            "relevance": 50,
            "description": "grid-row is used to place grid items and explicitly defined grid cells in the Grid.",
            "restrictions": [
                "integer",
                "string",
                "enum"
            ]
        },
        {
            "name": "-ms-grid-row-align",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "center",
                    "description": "Places the center of the Grid Item's margin box at the center of the Grid Item's row."
                },
                {
                    "name": "end",
                    "description": "Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's row."
                },
                {
                    "name": "start",
                    "description": "Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's row."
                },
                {
                    "name": "stretch",
                    "description": "Ensures that the Grid Item's margin box is equal to the size of the Grid Item's row."
                }
            ],
            "relevance": 50,
            "description": "Aligns the rows in a grid.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-grid-rows",
            "browsers": [
                "E",
                "IE10"
            ],
            "status": "nonstandard",
            "syntax": "none | <track-list> | <auto-track-list>",
            "relevance": 0,
            "description": "Lays out the columns of the grid."
        },
        {
            "name": "-ms-grid-row-span",
            "browsers": [
                "E",
                "IE10"
            ],
            "relevance": 50,
            "description": "Specifies the number of rows to span.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-ms-high-contrast-adjust",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Properties will be adjusted as applicable."
                },
                {
                    "name": "none",
                    "description": "No adjustments will be applied."
                }
            ],
            "status": "nonstandard",
            "syntax": "auto | none",
            "relevance": 0,
            "description": "Specifies if properties should be adjusted in high contrast mode.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-hyphenate-limit-chars",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The user agent chooses a value that adapts to the current layout."
                }
            ],
            "status": "nonstandard",
            "syntax": "auto | <integer>{1,3}",
            "relevance": 0,
            "description": "Specifies the minimum number of characters in a hyphenated word.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-ms-hyphenate-limit-lines",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "no-limit",
                    "description": "There is no limit."
                }
            ],
            "status": "nonstandard",
            "syntax": "no-limit | <integer>",
            "relevance": 0,
            "description": "Indicates the maximum number of successive hyphenated lines in an element.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-ms-hyphenate-limit-zone",
            "browsers": [
                "E",
                "IE10"
            ],
            "status": "nonstandard",
            "syntax": "<percentage> | <length>",
            "relevance": 0,
            "description": "Specifies the maximum amount of unfilled space (before justification) that may be left in the line box before hyphenation is triggered to pull part of a word from the next line back up into the current line.",
            "restrictions": [
                "percentage",
                "length"
            ]
        },
        {
            "name": "-ms-hyphens",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
                },
                {
                    "name": "manual",
                    "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
                },
                {
                    "name": "none",
                    "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
                }
            ],
            "relevance": 50,
            "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-ime-mode",
            "browsers": [
                "IE10"
            ],
            "values": [
                {
                    "name": "active",
                    "description": "The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it."
                },
                {
                    "name": "auto",
                    "description": "No change is made to the current input method editor state. This is the default."
                },
                {
                    "name": "disabled",
                    "description": "The input method editor is disabled and may not be activated by the user."
                },
                {
                    "name": "inactive",
                    "description": "The input method editor is initially inactive, but the user may activate it if they wish."
                },
                {
                    "name": "normal",
                    "description": "The IME state should be normal; this value can be used in a user style sheet to override the page setting."
                }
            ],
            "relevance": 50,
            "description": "Controls the state of the input method editor for text fields.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-interpolation-mode",
            "browsers": [
                "IE7"
            ],
            "values": [
                {
                    "name": "bicubic"
                },
                {
                    "name": "nearest-neighbor"
                }
            ],
            "relevance": 50,
            "description": "Gets or sets the interpolation (resampling) method used to stretch images.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-layout-grid",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "char",
                    "description": "Any of the range of character values available to the -ms-layout-grid-char property."
                },
                {
                    "name": "line",
                    "description": "Any of the range of line values available to the -ms-layout-grid-line property."
                },
                {
                    "name": "mode",
                    "description": "Any of the range of mode values available to the -ms-layout-grid-mode property."
                },
                {
                    "name": "type",
                    "description": "Any of the range of type values available to the -ms-layout-grid-type property."
                }
            ],
            "relevance": 50,
            "description": "Sets or retrieves the composite document grid properties that specify the layout of text characters."
        },
        {
            "name": "-ms-layout-grid-char",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Largest character in the font of the element is used to set the character grid."
                },
                {
                    "name": "none",
                    "description": "Default. No character grid is set."
                }
            ],
            "relevance": 50,
            "description": "Sets or retrieves the size of the character grid used for rendering the text content of an element.",
            "restrictions": [
                "enum",
                "length",
                "percentage"
            ]
        },
        {
            "name": "-ms-layout-grid-line",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Largest character in the font of the element is used to set the character grid."
                },
                {
                    "name": "none",
                    "description": "Default. No grid line is set."
                }
            ],
            "relevance": 50,
            "description": "Sets or retrieves the gridline value used for rendering the text content of an element.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-ms-layout-grid-mode",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "both",
                    "description": "Default. Both the char and line grid modes are enabled. This setting is necessary to fully enable the layout grid on an element."
                },
                {
                    "name": "char",
                    "description": "Only a character grid is used. This is recommended for use with block-level elements, such as a blockquote, where the line grid is intended to be disabled."
                },
                {
                    "name": "line",
                    "description": "Only a line grid is used. This is recommended for use with inline elements, such as a span, to disable the horizontal grid on runs of text that act as a single entity in the grid layout."
                },
                {
                    "name": "none",
                    "description": "No grid is used."
                }
            ],
            "relevance": 50,
            "description": "Gets or sets whether the text layout grid uses two dimensions.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-layout-grid-type",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "fixed",
                    "description": "Grid used for monospaced layout. All noncursive characters are treated as equal; every character is centered within a single grid space by default."
                },
                {
                    "name": "loose",
                    "description": "Default. Grid used for Japanese and Korean characters."
                },
                {
                    "name": "strict",
                    "description": "Grid used for Chinese, as well as Japanese (Genko) and Korean characters. Only the ideographs, kanas, and wide characters are snapped to the grid."
                }
            ],
            "relevance": 50,
            "description": "Sets or retrieves the type of grid used for rendering the text content of an element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-line-break",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The UA determines the set of line-breaking restrictions to use for CJK scripts, and it may vary the restrictions based on the length of the line; e.g., use a less restrictive set of line-break rules for short lines."
                },
                {
                    "name": "keep-all",
                    "description": "Sequences of CJK characters can no longer break on implied break points. This option should only be used where the presence of word separator characters still creates line-breaking opportunities, as in Korean."
                },
                {
                    "name": "newspaper",
                    "description": "Breaks CJK scripts using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers."
                },
                {
                    "name": "normal",
                    "description": "Breaks CJK scripts using a normal set of line-breaking rules."
                },
                {
                    "name": "strict",
                    "description": "Breaks CJK scripts using a more restrictive set of line-breaking rules than 'normal'."
                }
            ],
            "relevance": 50,
            "description": "Specifies what set of line breaking restrictions are in effect within the element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-overflow-style",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "No preference, UA should use the first scrolling method in the list that it supports."
                },
                {
                    "name": "-ms-autohiding-scrollbar",
                    "description": "Indicates the element displays auto-hiding scrollbars during mouse interactions and panning indicators during touch and keyboard interactions."
                },
                {
                    "name": "none",
                    "description": "Indicates the element does not display scrollbars or panning indicators, even when its content overflows."
                },
                {
                    "name": "scrollbar",
                    "description": "Scrollbars are typically narrow strips inserted on one or two edges of an element and which often have arrows to click on and a \"thumb\" to drag up and down (or left and right) to move the contents of the element."
                }
            ],
            "status": "nonstandard",
            "syntax": "auto | none | scrollbar | -ms-autohiding-scrollbar",
            "relevance": 0,
            "description": "Specify whether content is clipped when it overflows the element's content area.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-perspective",
            "browsers": [
                "IE10"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No perspective transform is applied."
                }
            ],
            "relevance": 50,
            "description": "Applies the same transform as the perspective(<number>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-ms-perspective-origin",
            "browsers": [
                "IE10"
            ],
            "relevance": 50,
            "description": "Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",
            "restrictions": [
                "position",
                "percentage",
                "length"
            ]
        },
        {
            "name": "-ms-perspective-origin-x",
            "browsers": [
                "IE10"
            ],
            "relevance": 50,
            "description": "Establishes the origin for the perspective property. It effectively sets the X  position at which the viewer appears to be looking at the children of the element.",
            "restrictions": [
                "position",
                "percentage",
                "length"
            ]
        },
        {
            "name": "-ms-perspective-origin-y",
            "browsers": [
                "IE10"
            ],
            "relevance": 50,
            "description": "Establishes the origin for the perspective property. It effectively sets the Y position at which the viewer appears to be looking at the children of the element.",
            "restrictions": [
                "position",
                "percentage",
                "length"
            ]
        },
        {
            "name": "-ms-progress-appearance",
            "browsers": [
                "IE10"
            ],
            "values": [
                {
                    "name": "bar"
                },
                {
                    "name": "ring"
                }
            ],
            "relevance": 50,
            "description": "Gets or sets a value that specifies whether a progress control displays as a bar or a ring.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-scrollbar-3dlight-color",
            "browsers": [
                "IE8"
            ],
            "status": "nonstandard",
            "syntax": "<color>",
            "relevance": 0,
            "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-ms-scrollbar-arrow-color",
            "browsers": [
                "IE8"
            ],
            "status": "nonstandard",
            "syntax": "<color>",
            "relevance": 0,
            "description": "Determines the color of the arrow elements of a scroll arrow.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-ms-scrollbar-base-color",
            "browsers": [
                "IE8"
            ],
            "status": "nonstandard",
            "syntax": "<color>",
            "relevance": 0,
            "description": "Determines the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-ms-scrollbar-darkshadow-color",
            "browsers": [
                "IE8"
            ],
            "status": "nonstandard",
            "syntax": "<color>",
            "relevance": 0,
            "description": "Determines the color of the gutter of a scroll bar.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-ms-scrollbar-face-color",
            "browsers": [
                "IE8"
            ],
            "status": "nonstandard",
            "syntax": "<color>",
            "relevance": 0,
            "description": "Determines the color of the scroll box and scroll arrows of a scroll bar.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-ms-scrollbar-highlight-color",
            "browsers": [
                "IE8"
            ],
            "status": "nonstandard",
            "syntax": "<color>",
            "relevance": 0,
            "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-ms-scrollbar-shadow-color",
            "browsers": [
                "IE8"
            ],
            "status": "nonstandard",
            "syntax": "<color>",
            "relevance": 0,
            "description": "Determines the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-ms-scrollbar-track-color",
            "browsers": [
                "IE8"
            ],
            "status": "nonstandard",
            "syntax": "<color>",
            "relevance": 0,
            "description": "Determines the color of the track element of a scroll bar.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-ms-scroll-chaining",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "chained"
                },
                {
                    "name": "none"
                }
            ],
            "status": "nonstandard",
            "syntax": "chained | none",
            "relevance": 0,
            "description": "Gets or sets a value that indicates the scrolling behavior that occurs when a user hits the content boundary during a manipulation.",
            "restrictions": [
                "enum",
                "length"
            ]
        },
        {
            "name": "-ms-scroll-limit",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "status": "nonstandard",
            "syntax": "<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>",
            "relevance": 0,
            "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-limit-x-min, -ms-scroll-limit-y-min, -ms-scroll-limit-x-max, and -ms-scroll-limit-y-max properties.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-ms-scroll-limit-x-max",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "status": "nonstandard",
            "syntax": "auto | <length>",
            "relevance": 0,
            "description": "Gets or sets a value that specifies the maximum value for the scrollLeft property.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-ms-scroll-limit-x-min",
            "browsers": [
                "E",
                "IE10"
            ],
            "status": "nonstandard",
            "syntax": "<length>",
            "relevance": 0,
            "description": "Gets or sets a value that specifies the minimum value for the scrollLeft property.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-ms-scroll-limit-y-max",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "status": "nonstandard",
            "syntax": "auto | <length>",
            "relevance": 0,
            "description": "Gets or sets a value that specifies the maximum value for the scrollTop property.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-ms-scroll-limit-y-min",
            "browsers": [
                "E",
                "IE10"
            ],
            "status": "nonstandard",
            "syntax": "<length>",
            "relevance": 0,
            "description": "Gets or sets a value that specifies the minimum value for the scrollTop property.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-ms-scroll-rails",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "none"
                },
                {
                    "name": "railed"
                }
            ],
            "status": "nonstandard",
            "syntax": "none | railed",
            "relevance": 0,
            "description": "Gets or sets a value that indicates whether or not small motions perpendicular to the primary axis of motion will result in either changes to both the scrollTop and scrollLeft properties or a change to the primary axis (for instance, either the scrollTop or scrollLeft properties will change, but not both).",
            "restrictions": [
                "enum",
                "length"
            ]
        },
        {
            "name": "-ms-scroll-snap-points-x",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "snapInterval(100%, 100%)"
                },
                {
                    "name": "snapList()"
                }
            ],
            "status": "nonstandard",
            "syntax": "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
            "relevance": 0,
            "description": "Gets or sets a value that defines where snap-points will be located along the x-axis.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-scroll-snap-points-y",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "snapInterval(100%, 100%)"
                },
                {
                    "name": "snapList()"
                }
            ],
            "status": "nonstandard",
            "syntax": "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
            "relevance": 0,
            "description": "Gets or sets a value that defines where snap-points will be located along the y-axis.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-scroll-snap-type",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "The visual viewport of this scroll container must ignore snap points, if any, when scrolled."
                },
                {
                    "name": "mandatory",
                    "description": "The visual viewport of this scroll container is guaranteed to rest on a snap point when there are no active scrolling operations."
                },
                {
                    "name": "proximity",
                    "description": "The visual viewport of this scroll container may come to rest on a snap point at the termination of a scroll at the discretion of the UA given the parameters of the scroll."
                }
            ],
            "status": "nonstandard",
            "syntax": "none | proximity | mandatory",
            "relevance": 0,
            "description": "Gets or sets a value that defines what type of snap-point should be used for the current element. There are two type of snap-points, with the primary difference being whether or not the user is guaranteed to always stop on a snap-point.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-scroll-snap-x",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "mandatory"
                },
                {
                    "name": "none"
                },
                {
                    "name": "proximity"
                },
                {
                    "name": "snapInterval(100%, 100%)"
                },
                {
                    "name": "snapList()"
                }
            ],
            "status": "nonstandard",
            "syntax": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>",
            "relevance": 0,
            "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-snap-type and -ms-scroll-snap-points-x properties.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-scroll-snap-y",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "mandatory"
                },
                {
                    "name": "none"
                },
                {
                    "name": "proximity"
                },
                {
                    "name": "snapInterval(100%, 100%)"
                },
                {
                    "name": "snapList()"
                }
            ],
            "status": "nonstandard",
            "syntax": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>",
            "relevance": 0,
            "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-snap-type and -ms-scroll-snap-points-y properties.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-scroll-translation",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "none"
                },
                {
                    "name": "vertical-to-horizontal"
                }
            ],
            "status": "nonstandard",
            "syntax": "none | vertical-to-horizontal",
            "relevance": 0,
            "description": "Gets or sets a value that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-text-align-last",
            "browsers": [
                "E",
                "IE8"
            ],
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "center",
                    "description": "The inline contents are centered within the line box."
                },
                {
                    "name": "justify",
                    "description": "The text is justified according to the method specified by the 'text-justify' property."
                },
                {
                    "name": "left",
                    "description": "The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."
                },
                {
                    "name": "right",
                    "description": "The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."
                }
            ],
            "relevance": 50,
            "description": "Describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-text-autospace",
            "browsers": [
                "E",
                "IE8"
            ],
            "values": [
                {
                    "name": "ideograph-alpha",
                    "description": "Creates 1/4em extra spacing between runs of ideographic letters and non-ideographic letters, such as Latin-based, Cyrillic, Greek, Arabic or Hebrew."
                },
                {
                    "name": "ideograph-numeric",
                    "description": "Creates 1/4em extra spacing between runs of ideographic letters and numeric glyphs."
                },
                {
                    "name": "ideograph-parenthesis",
                    "description": "Creates extra spacing between normal (non wide) parenthesis and ideographs."
                },
                {
                    "name": "ideograph-space",
                    "description": "Extends the width of the space character while surrounded by ideographs."
                },
                {
                    "name": "none",
                    "description": "No extra space is created."
                },
                {
                    "name": "punctuation",
                    "description": "Creates extra non-breaking spacing around punctuation as required by language-specific typographic conventions."
                }
            ],
            "status": "nonstandard",
            "syntax": "none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space",
            "relevance": 0,
            "description": "Determines whether or not a full-width punctuation mark character should be trimmed if it appears at the beginning of a line, so that its 'ink' lines up with the first glyph in the line above and below.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-text-combine-horizontal",
            "browsers": [
                "E",
                "IE11"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "Attempt to typeset horizontally all consecutive characters within the box such that they take up the space of a single character within the vertical line box."
                },
                {
                    "name": "digits",
                    "description": "Attempt to typeset horizontally each maximal sequence of consecutive ASCII digits (U+0030-U+0039) that has as many or fewer characters than the specified integer such that it takes up the space of a single character within the vertical line box."
                },
                {
                    "name": "none",
                    "description": "No special processing."
                }
            ],
            "relevance": 50,
            "description": "This property specifies the combination of multiple characters into the space of a single character.",
            "restrictions": [
                "enum",
                "integer"
            ]
        },
        {
            "name": "-ms-text-justify",
            "browsers": [
                "E",
                "IE8"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality."
                },
                {
                    "name": "distribute",
                    "description": "Justification primarily changes spacing both at word separators and at grapheme cluster boundaries in all scripts except those in the connected and cursive groups. This value is sometimes used in e.g. Japanese, often with the 'text-align-last' property."
                },
                {
                    "name": "inter-cluster",
                    "description": "Justification primarily changes spacing at word separators and at grapheme cluster boundaries in clustered scripts. This value is typically used for Southeast Asian scripts such as Thai."
                },
                {
                    "name": "inter-ideograph",
                    "description": "Justification primarily changes spacing at word separators and at inter-graphemic boundaries in scripts that use no word spaces. This value is typically used for CJK languages."
                },
                {
                    "name": "inter-word",
                    "description": "Justification primarily changes spacing at word separators. This value is typically used for languages that separate words using spaces, like English or (sometimes) Korean."
                },
                {
                    "name": "kashida",
                    "description": "Justification primarily stretches Arabic and related scripts through the use of kashida or other calligraphic elongation."
                }
            ],
            "relevance": 50,
            "description": "Selects the justification algorithm used when 'text-align' is set to 'justify'. The property applies to block containers, but the UA may (but is not required to) also support it on inline elements.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-text-kashida-space",
            "browsers": [
                "E",
                "IE10"
            ],
            "relevance": 50,
            "description": "Sets or retrieves the ratio of kashida expansion to white space expansion when justifying lines of text in the object.",
            "restrictions": [
                "percentage"
            ]
        },
        {
            "name": "-ms-text-overflow",
            "browsers": [
                "IE10"
            ],
            "values": [
                {
                    "name": "clip",
                    "description": "Clip inline content that overflows. Characters may be only partially rendered."
                },
                {
                    "name": "ellipsis",
                    "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
                }
            ],
            "relevance": 50,
            "description": "Text can overflow for example when it is prevented from wrapping",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-text-size-adjust",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Renderers must use the default size adjustment when displaying on a small device."
                },
                {
                    "name": "none",
                    "description": "Renderers must not do size adjustment when displaying on a small device."
                }
            ],
            "relevance": 50,
            "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
            "restrictions": [
                "enum",
                "percentage"
            ]
        },
        {
            "name": "-ms-text-underline-position",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "alphabetic",
                    "description": "The underline is aligned with the alphabetic baseline. In this case the underline is likely to cross some descenders."
                },
                {
                    "name": "auto",
                    "description": "The user agent may use any algorithm to determine the underline's position. In horizontal line layout, the underline should be aligned as for alphabetic. In vertical line layout, if the language is set to Japanese or Korean, the underline should be aligned as for over."
                },
                {
                    "name": "over",
                    "description": "The underline is aligned with the 'top' (right in vertical writing) edge of the element's em-box. In this mode, an overline also switches sides."
                },
                {
                    "name": "under",
                    "description": "The underline is aligned with the 'bottom' (left in vertical writing) edge of the element's em-box. In this case the underline usually does not cross the descenders. This is sometimes called 'accounting' underline."
                }
            ],
            "relevance": 50,
            "description": "Sets the position of an underline specified on the same element: it does not affect underlines specified by ancestor elements.This property is typically used in vertical writing contexts such as in Japanese documents where it often desired to have the underline appear 'over' (to the right of) the affected run of text",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-touch-action",
            "browsers": [
                "IE10"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The element is a passive element, with several exceptions."
                },
                {
                    "name": "double-tap-zoom",
                    "description": "The element will zoom on double-tap."
                },
                {
                    "name": "manipulation",
                    "description": "The element is a manipulation-causing element."
                },
                {
                    "name": "none",
                    "description": "The element is a manipulation-blocking element."
                },
                {
                    "name": "pan-x",
                    "description": "The element permits touch-driven panning on the horizontal axis. The touch pan is performed on the nearest ancestor with horizontally scrollable content."
                },
                {
                    "name": "pan-y",
                    "description": "The element permits touch-driven panning on the vertical axis. The touch pan is performed on the nearest ancestor with vertically scrollable content."
                },
                {
                    "name": "pinch-zoom",
                    "description": "The element permits pinch-zooming. The pinch-zoom is performed on the nearest ancestor with zoomable content."
                }
            ],
            "relevance": 50,
            "description": "Gets or sets a value that indicates whether and how a given region can be manipulated by the user.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-touch-select",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "grippers",
                    "description": "Grippers are always on."
                },
                {
                    "name": "none",
                    "description": "Grippers are always off."
                }
            ],
            "status": "nonstandard",
            "syntax": "grippers | none",
            "relevance": 0,
            "description": "Gets or sets a value that toggles the 'gripper' visual elements that enable touch text selection.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-transform",
            "browsers": [
                "IE9-9"
            ],
            "values": [
                {
                    "name": "matrix()",
                    "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
                },
                {
                    "name": "matrix3d()",
                    "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
                },
                {
                    "name": "none"
                },
                {
                    "name": "rotate()",
                    "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
                },
                {
                    "name": "rotate3d()",
                    "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
                },
                {
                    "name": "rotateX('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the X axis."
                },
                {
                    "name": "rotateY('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the Y axis."
                },
                {
                    "name": "rotateZ('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the Z axis."
                },
                {
                    "name": "scale()",
                    "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
                },
                {
                    "name": "scale3d()",
                    "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
                },
                {
                    "name": "scaleX()",
                    "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
                },
                {
                    "name": "scaleY()",
                    "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
                },
                {
                    "name": "scaleZ()",
                    "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
                },
                {
                    "name": "skew()",
                    "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
                },
                {
                    "name": "skewX()",
                    "description": "Specifies a skew transformation along the X axis by the given angle."
                },
                {
                    "name": "skewY()",
                    "description": "Specifies a skew transformation along the Y axis by the given angle."
                },
                {
                    "name": "translate()",
                    "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
                },
                {
                    "name": "translate3d()",
                    "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
                },
                {
                    "name": "translateX()",
                    "description": "Specifies a translation by the given amount in the X direction."
                },
                {
                    "name": "translateY()",
                    "description": "Specifies a translation by the given amount in the Y direction."
                },
                {
                    "name": "translateZ()",
                    "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
                }
            ],
            "relevance": 50,
            "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-transform-origin",
            "browsers": [
                "IE9-9"
            ],
            "relevance": 50,
            "description": "Establishes the origin of transformation for an element.",
            "restrictions": [
                "position",
                "length",
                "percentage"
            ]
        },
        {
            "name": "-ms-transform-origin-x",
            "browsers": [
                "IE10"
            ],
            "relevance": 50,
            "description": "The x coordinate of the origin for transforms applied to an element with respect to its border box.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "-ms-transform-origin-y",
            "browsers": [
                "IE10"
            ],
            "relevance": 50,
            "description": "The y coordinate of the origin for transforms applied to an element with respect to its border box.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "-ms-transform-origin-z",
            "browsers": [
                "IE10"
            ],
            "relevance": 50,
            "description": "The z coordinate of the origin for transforms applied to an element with respect to its border box.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "-ms-user-select",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "element"
                },
                {
                    "name": "none"
                },
                {
                    "name": "text"
                }
            ],
            "status": "nonstandard",
            "syntax": "none | element | text",
            "relevance": 0,
            "description": "Controls the appearance of selection.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-word-break",
            "browsers": [
                "IE8"
            ],
            "values": [
                {
                    "name": "break-all",
                    "description": "Lines may break between any two grapheme clusters for non-CJK scripts."
                },
                {
                    "name": "keep-all",
                    "description": "Block characters can no longer create implied break points."
                },
                {
                    "name": "normal",
                    "description": "Breaks non-CJK scripts according to their own rules."
                }
            ],
            "relevance": 50,
            "description": "Specifies line break opportunities for non-CJK scripts.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-word-wrap",
            "browsers": [
                "IE8"
            ],
            "values": [
                {
                    "name": "break-word",
                    "description": "An unbreakable 'word' may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."
                },
                {
                    "name": "normal",
                    "description": "Lines may break only at allowed break points."
                }
            ],
            "relevance": 50,
            "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-wrap-flow",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "For floats an exclusion is created, for all other elements an exclusion is not created."
                },
                {
                    "name": "both",
                    "description": "Inline flow content can flow on all sides of the exclusion."
                },
                {
                    "name": "clear",
                    "description": "Inline flow content can only wrap on top and bottom of the exclusion and must leave the areas to the start and end edges of the exclusion box empty."
                },
                {
                    "name": "end",
                    "description": "Inline flow content can wrap on the end side of the exclusion area but must leave the area to the start edge of the exclusion area empty."
                },
                {
                    "name": "maximum",
                    "description": "Inline flow content can wrap on the side of the exclusion with the largest available space for the given line, and must leave the other side of the exclusion empty."
                },
                {
                    "name": "minimum",
                    "description": "Inline flow content can flow around the edge of the exclusion with the smallest available space within the flow content's containing block, and must leave the other edge of the exclusion empty."
                },
                {
                    "name": "start",
                    "description": "Inline flow content can wrap on the start edge of the exclusion area but must leave the area to end edge of the exclusion area empty."
                }
            ],
            "status": "nonstandard",
            "syntax": "auto | both | start | end | maximum | clear",
            "relevance": 0,
            "description": "An element becomes an exclusion when its 'wrap-flow' property has a computed value other than 'auto'.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-wrap-margin",
            "browsers": [
                "E",
                "IE10"
            ],
            "status": "nonstandard",
            "syntax": "<length>",
            "relevance": 0,
            "description": "Gets or sets a value that is used to offset the inner wrap shape from other shapes.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "-ms-wrap-through",
            "browsers": [
                "E",
                "IE10"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "The exclusion element does not inherit its parent node's wrapping context. Its descendants are only subject to exclusion shapes defined inside the element."
                },
                {
                    "name": "wrap",
                    "description": "The exclusion element inherits its parent node's wrapping context. Its descendant inline content wraps around exclusions defined outside the element."
                }
            ],
            "status": "nonstandard",
            "syntax": "wrap | none",
            "relevance": 0,
            "description": "Specifies if an element inherits its parent wrapping context. In other words if it is subject to the exclusions defined outside the element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-writing-mode",
            "browsers": [
                "IE8"
            ],
            "values": [
                {
                    "name": "bt-lr"
                },
                {
                    "name": "bt-rl"
                },
                {
                    "name": "lr-bt"
                },
                {
                    "name": "lr-tb"
                },
                {
                    "name": "rl-bt"
                },
                {
                    "name": "rl-tb"
                },
                {
                    "name": "tb-lr"
                },
                {
                    "name": "tb-rl"
                }
            ],
            "relevance": 50,
            "description": "Shorthand property for both 'direction' and 'block-progression'.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-ms-zoom",
            "browsers": [
                "IE8"
            ],
            "values": [
                {
                    "name": "normal"
                }
            ],
            "relevance": 50,
            "description": "Sets or retrieves the magnification scale of the object.",
            "restrictions": [
                "enum",
                "integer",
                "number",
                "percentage"
            ]
        },
        {
            "name": "-ms-zoom-animation",
            "browsers": [
                "IE10"
            ],
            "values": [
                {
                    "name": "default"
                },
                {
                    "name": "none"
                }
            ],
            "relevance": 50,
            "description": "Gets or sets a value that indicates whether an animation is used when zooming.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "nav-down",
            "browsers": [
                "O9.5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
                },
                {
                    "name": "current",
                    "description": "Indicates that the user agent should target the frame that the element is in."
                },
                {
                    "name": "root",
                    "description": "Indicates that the user agent should target the full window."
                }
            ],
            "relevance": 50,
            "description": "Provides an way to control directional focus navigation.",
            "restrictions": [
                "enum",
                "identifier",
                "string"
            ]
        },
        {
            "name": "nav-index",
            "browsers": [
                "O9.5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The element's sequential navigation order is assigned automatically by the user agent."
                }
            ],
            "relevance": 50,
            "description": "Provides an input-method-neutral way of specifying the sequential navigation order (also known as 'tabbing order').",
            "restrictions": [
                "number"
            ]
        },
        {
            "name": "nav-left",
            "browsers": [
                "O9.5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
                },
                {
                    "name": "current",
                    "description": "Indicates that the user agent should target the frame that the element is in."
                },
                {
                    "name": "root",
                    "description": "Indicates that the user agent should target the full window."
                }
            ],
            "relevance": 50,
            "description": "Provides an way to control directional focus navigation.",
            "restrictions": [
                "enum",
                "identifier",
                "string"
            ]
        },
        {
            "name": "nav-right",
            "browsers": [
                "O9.5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
                },
                {
                    "name": "current",
                    "description": "Indicates that the user agent should target the frame that the element is in."
                },
                {
                    "name": "root",
                    "description": "Indicates that the user agent should target the full window."
                }
            ],
            "relevance": 50,
            "description": "Provides an way to control directional focus navigation.",
            "restrictions": [
                "enum",
                "identifier",
                "string"
            ]
        },
        {
            "name": "nav-up",
            "browsers": [
                "O9.5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
                },
                {
                    "name": "current",
                    "description": "Indicates that the user agent should target the frame that the element is in."
                },
                {
                    "name": "root",
                    "description": "Indicates that the user agent should target the full window."
                }
            ],
            "relevance": 50,
            "description": "Provides an way to control directional focus navigation.",
            "restrictions": [
                "enum",
                "identifier",
                "string"
            ]
        },
        {
            "name": "negative",
            "browsers": [
                "FF33"
            ],
            "atRule": "@counter-style",
            "syntax": "<symbol> <symbol>?",
            "relevance": 50,
            "description": "@counter-style descriptor. Defines how to alter the representation when the counter value is negative.",
            "restrictions": [
                "image",
                "identifier",
                "string"
            ]
        },
        {
            "name": "-o-animation",
            "browsers": [
                "O12"
            ],
            "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."
                }
            ],
            "relevance": 50,
            "description": "Shorthand property combines six of the animation properties into a single property.",
            "restrictions": [
                "time",
                "enum",
                "timing-function",
                "identifier",
                "number"
            ]
        },
        {
            "name": "-o-animation-delay",
            "browsers": [
                "O12"
            ],
            "relevance": 50,
            "description": "Defines when the animation will start.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "-o-animation-direction",
            "browsers": [
                "O12"
            ],
            "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": "normal",
                    "description": "Normal playback."
                },
                {
                    "name": "reverse",
                    "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
                }
            ],
            "relevance": 50,
            "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-o-animation-duration",
            "browsers": [
                "O12"
            ],
            "relevance": 50,
            "description": "Defines the length of time that an animation takes to complete one cycle.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "-o-animation-fill-mode",
            "browsers": [
                "O12"
            ],
            "values": [
                {
                    "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": "none",
                    "description": "There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."
                }
            ],
            "relevance": 50,
            "description": "Defines what values are applied by the animation outside the time it is executing.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-o-animation-iteration-count",
            "browsers": [
                "O12"
            ],
            "values": [
                {
                    "name": "infinite",
                    "description": "Causes the animation to repeat forever."
                }
            ],
            "relevance": 50,
            "description": "Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",
            "restrictions": [
                "number",
                "enum"
            ]
        },
        {
            "name": "-o-animation-name",
            "browsers": [
                "O12"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No animation is performed"
                }
            ],
            "relevance": 50,
            "description": "Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",
            "restrictions": [
                "identifier",
                "enum"
            ]
        },
        {
            "name": "-o-animation-play-state",
            "browsers": [
                "O12"
            ],
            "values": [
                {
                    "name": "paused",
                    "description": "A running animation will be paused."
                },
                {
                    "name": "running",
                    "description": "Resume playback of a paused animation."
                }
            ],
            "relevance": 50,
            "description": "Defines whether the animation is running or paused.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-o-animation-timing-function",
            "browsers": [
                "O12"
            ],
            "relevance": 50,
            "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
            "restrictions": [
                "timing-function"
            ]
        },
        {
            "name": "object-fit",
            "browsers": [
                "E79",
                "FF36",
                "FFA36",
                "S10",
                "SM10",
                "C32",
                "CA32",
                "O19"
            ],
            "values": [
                {
                    "name": "contain",
                    "description": "The replaced content is sized to maintain its aspect ratio while fitting within the element's content box: its concrete object size is resolved as a contain constraint against the element's used width and height."
                },
                {
                    "name": "cover",
                    "description": "The replaced content is sized to maintain its aspect ratio while filling the element's entire content box: its concrete object size is resolved as a cover constraint against the element's used width and height."
                },
                {
                    "name": "fill",
                    "description": "The replaced content is sized to fill the element's content box: the object's concrete object size is the element's used width and height."
                },
                {
                    "name": "none",
                    "description": "The replaced content is not resized to fit inside the element's content box"
                },
                {
                    "name": "scale-down",
                    "description": "Size the content as if 'none' or 'contain' were specified, whichever would result in a smaller concrete object size."
                }
            ],
            "syntax": "fill | contain | cover | none | scale-down",
            "relevance": 74,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/object-fit"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Specifies how the contents of a replaced element should be scaled relative to the box established by its used height and width.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "object-position",
            "browsers": [
                "E79",
                "FF36",
                "FFA36",
                "S10",
                "SM10",
                "C32",
                "CA32",
                "O19"
            ],
            "syntax": "<position>",
            "relevance": 58,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/object-position"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Determines the alignment of the replaced element inside its box.",
            "restrictions": [
                "position",
                "length",
                "percentage"
            ]
        },
        {
            "name": "-o-border-image",
            "browsers": [
                "O11.6"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
                },
                {
                    "name": "fill",
                    "description": "Causes the middle part of the border-image to be preserved."
                },
                {
                    "name": "none"
                },
                {
                    "name": "repeat",
                    "description": "The image is tiled (repeated) to fill the area."
                },
                {
                    "name": "round",
                    "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
                },
                {
                    "name": "space",
                    "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
                },
                {
                    "name": "stretch",
                    "description": "The image is stretched to fill the area."
                }
            ],
            "relevance": 50,
            "description": "Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",
            "restrictions": [
                "length",
                "percentage",
                "number",
                "image",
                "enum"
            ]
        },
        {
            "name": "-o-object-fit",
            "browsers": [
                "O10.6"
            ],
            "values": [
                {
                    "name": "contain",
                    "description": "The replaced content is sized to maintain its aspect ratio while fitting within the element's content box: its concrete object size is resolved as a contain constraint against the element's used width and height."
                },
                {
                    "name": "cover",
                    "description": "The replaced content is sized to maintain its aspect ratio while filling the element's entire content box: its concrete object size is resolved as a cover constraint against the element's used width and height."
                },
                {
                    "name": "fill",
                    "description": "The replaced content is sized to fill the element's content box: the object's concrete object size is the element's used width and height."
                },
                {
                    "name": "none",
                    "description": "The replaced content is not resized to fit inside the element's content box"
                },
                {
                    "name": "scale-down",
                    "description": "Size the content as if 'none' or 'contain' were specified, whichever would result in a smaller concrete object size."
                }
            ],
            "relevance": 50,
            "description": "Specifies how the contents of a replaced element should be scaled relative to the box established by its used height and width.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-o-object-position",
            "browsers": [
                "O10.6"
            ],
            "relevance": 50,
            "description": "Determines the alignment of the replaced element inside its box.",
            "restrictions": [
                "position",
                "length",
                "percentage"
            ]
        },
        {
            "name": "opacity",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S2",
                "SM1",
                "C1",
                "CA18",
                "IE9",
                "O9"
            ],
            "syntax": "<opacity-value>",
            "relevance": 93,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/opacity"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Opacity of an element's text, where 1 is opaque and 0 is entirely transparent.",
            "restrictions": [
                "number(0-1)"
            ]
        },
        {
            "name": "order",
            "browsers": [
                "E12",
                "FF20",
                "FFA20",
                "S9",
                "SM9",
                "C29",
                "CA29",
                "IE11",
                "O12.1"
            ],
            "syntax": "<integer>",
            "relevance": 68,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/order"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Controls the order in which children of a flex container appear within the flex container, by assigning them to ordinal groups.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "orphans",
            "browsers": [
                "E12",
                "S1.3",
                "SM1",
                "C25",
                "CA25",
                "IE8",
                "O9.2"
            ],
            "syntax": "<integer>",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/orphans"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Specifies the minimum number of line boxes in a block container that must be left in a fragment before a fragmentation break.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-o-table-baseline",
            "browsers": [
                "O9.6"
            ],
            "relevance": 50,
            "description": "Determines which row of a inline-table should be used as baseline of inline-table.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-o-tab-size",
            "browsers": [
                "O10.6"
            ],
            "relevance": 50,
            "description": "This property determines the width of the tab character (U+0009), in space characters (U+0020), when rendered.",
            "restrictions": [
                "integer",
                "length"
            ]
        },
        {
            "name": "-o-text-overflow",
            "browsers": [
                "O10"
            ],
            "values": [
                {
                    "name": "clip",
                    "description": "Clip inline content that overflows. Characters may be only partially rendered."
                },
                {
                    "name": "ellipsis",
                    "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
                }
            ],
            "relevance": 50,
            "description": "Text can overflow for example when it is prevented from wrapping",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-o-transform",
            "browsers": [
                "O10.5"
            ],
            "values": [
                {
                    "name": "matrix()",
                    "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
                },
                {
                    "name": "matrix3d()",
                    "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
                },
                {
                    "name": "none"
                },
                {
                    "name": "rotate()",
                    "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
                },
                {
                    "name": "rotate3d()",
                    "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
                },
                {
                    "name": "rotateX('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the X axis."
                },
                {
                    "name": "rotateY('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the Y axis."
                },
                {
                    "name": "rotateZ('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the Z axis."
                },
                {
                    "name": "scale()",
                    "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
                },
                {
                    "name": "scale3d()",
                    "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
                },
                {
                    "name": "scaleX()",
                    "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
                },
                {
                    "name": "scaleY()",
                    "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
                },
                {
                    "name": "scaleZ()",
                    "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
                },
                {
                    "name": "skew()",
                    "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
                },
                {
                    "name": "skewX()",
                    "description": "Specifies a skew transformation along the X axis by the given angle."
                },
                {
                    "name": "skewY()",
                    "description": "Specifies a skew transformation along the Y axis by the given angle."
                },
                {
                    "name": "translate()",
                    "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
                },
                {
                    "name": "translate3d()",
                    "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
                },
                {
                    "name": "translateX()",
                    "description": "Specifies a translation by the given amount in the X direction."
                },
                {
                    "name": "translateY()",
                    "description": "Specifies a translation by the given amount in the Y direction."
                },
                {
                    "name": "translateZ()",
                    "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
                }
            ],
            "relevance": 50,
            "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-o-transform-origin",
            "browsers": [
                "O10.5"
            ],
            "relevance": 50,
            "description": "Establishes the origin of transformation for an element.",
            "restrictions": [
                "positon",
                "length",
                "percentage"
            ]
        },
        {
            "name": "-o-transition",
            "browsers": [
                "O11.5"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "Every property that is able to undergo a transition will do so."
                },
                {
                    "name": "none",
                    "description": "No property will transition."
                }
            ],
            "relevance": 50,
            "description": "Shorthand property combines four of the transition properties into a single property.",
            "restrictions": [
                "time",
                "property",
                "timing-function",
                "enum"
            ]
        },
        {
            "name": "-o-transition-delay",
            "browsers": [
                "O11.5"
            ],
            "relevance": 50,
            "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "-o-transition-duration",
            "browsers": [
                "O11.5"
            ],
            "relevance": 50,
            "description": "Specifies how long the transition from the old value to the new value should take.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "-o-transition-property",
            "browsers": [
                "O11.5"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "Every property that is able to undergo a transition will do so."
                },
                {
                    "name": "none",
                    "description": "No property will transition."
                }
            ],
            "relevance": 50,
            "description": "Specifies the name of the CSS property to which the transition is applied.",
            "restrictions": [
                "property"
            ]
        },
        {
            "name": "-o-transition-timing-function",
            "browsers": [
                "O11.5"
            ],
            "relevance": 50,
            "description": "Describes how the intermediate values used during a transition will be calculated.",
            "restrictions": [
                "timing-function"
            ]
        },
        {
            "name": "offset-block-end",
            "browsers": [
                "FF41"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
                }
            ],
            "relevance": 50,
            "description": "Logical 'bottom'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "offset-block-start",
            "browsers": [
                "FF41"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
                }
            ],
            "relevance": 50,
            "description": "Logical 'top'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "offset-inline-end",
            "browsers": [
                "FF41"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
                }
            ],
            "relevance": 50,
            "description": "Logical 'right'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "offset-inline-start",
            "browsers": [
                "FF41"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
                }
            ],
            "relevance": 50,
            "description": "Logical 'left'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "outline",
            "browsers": [
                "E94",
                "FF88",
                "FFA88",
                "S16.4",
                "SM16.4",
                "C94",
                "CA94",
                "IE8",
                "O80"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Permits the user agent to render a custom outline style, typically the default platform style."
                },
                {
                    "name": "invert",
                    "browsers": [
                        "E94",
                        "FF88",
                        "FFA88",
                        "S16.4",
                        "SM16.4",
                        "C94",
                        "CA94",
                        "IE8",
                        "O80"
                    ],
                    "description": "Performs a color inversion on the pixels on the screen."
                }
            ],
            "syntax": "<'outline-width'> || <'outline-style'> || <'outline-color'>",
            "relevance": 88,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/outline"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-03-27"
            },
            "description": "Shorthand property for 'outline-style', 'outline-width', and 'outline-color'.",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color",
                "enum"
            ]
        },
        {
            "name": "outline-color",
            "browsers": [
                "E12",
                "FF1.5",
                "FFA4",
                "S1.2",
                "SM1",
                "C1",
                "CA18",
                "IE8",
                "O7"
            ],
            "values": [
                {
                    "name": "invert",
                    "browsers": [
                        "E12",
                        "FF1.5",
                        "FFA4",
                        "S1.2",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE8",
                        "O7"
                    ],
                    "description": "Performs a color inversion on the pixels on the screen."
                }
            ],
            "syntax": "auto | <color>",
            "relevance": 63,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/outline-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "The color of the outline.",
            "restrictions": [
                "enum",
                "color"
            ]
        },
        {
            "name": "outline-offset",
            "browsers": [
                "E15",
                "FF1.5",
                "FFA4",
                "S1.2",
                "SM1",
                "C1",
                "CA18",
                "O9.5"
            ],
            "syntax": "<length>",
            "relevance": 71,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/outline-offset"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Offset the outline and draw it beyond the border edge.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "outline-style",
            "browsers": [
                "E12",
                "FF1.5",
                "FFA4",
                "S1.2",
                "SM1",
                "C1",
                "CA18",
                "IE8",
                "O7"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Permits the user agent to render a custom outline style, typically the default platform style."
                }
            ],
            "syntax": "auto | <outline-line-style>",
            "relevance": 61,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/outline-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Style of the outline.",
            "restrictions": [
                "line-style",
                "enum"
            ]
        },
        {
            "name": "outline-width",
            "browsers": [
                "E12",
                "FF1.5",
                "FFA4",
                "S1.2",
                "SM1",
                "C1",
                "CA18",
                "IE8",
                "O7"
            ],
            "syntax": "<line-width>",
            "relevance": 63,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/outline-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Width of the outline.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "overflow",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
                },
                {
                    "name": "hidden",
                    "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
                },
                {
                    "name": "-moz-hidden-unscrollable",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O7"
                    ],
                    "description": "Same as the standardized 'clip', except doesn't establish a block formatting context."
                },
                {
                    "name": "scroll",
                    "description": "Content is clipped and if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped."
                },
                {
                    "name": "visible",
                    "description": "Content is not clipped, i.e., it may be rendered outside the content box."
                }
            ],
            "syntax": "[ visible | hidden | clip | scroll | auto ]{1,2}",
            "relevance": 93,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overflow"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand for setting 'overflow-x' and 'overflow-y'.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "overflow-wrap",
            "browsers": [
                "E18",
                "FF49",
                "FFA49",
                "S7",
                "SM7",
                "C23",
                "CA25",
                "IE5.5",
                "O12.1"
            ],
            "values": [
                {
                    "name": "break-word",
                    "description": "An otherwise unbreakable sequence of characters may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."
                },
                {
                    "name": "normal",
                    "description": "Lines may break only at allowed break points."
                },
                {
                    "name": "anywhere",
                    "description": "There is a soft wrap opportunity around every typographic character unit, including around any punctuation character or preserved white spaces, or in the middle of words, disregarding any prohibition against line breaks, even those introduced by characters with the GL, WJ, or ZWJ line breaking classes or mandated by the word-break property."
                }
            ],
            "syntax": "normal | break-word | anywhere",
            "relevance": 67,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2018-10-02",
                "baseline_high_date": "2021-04-02"
            },
            "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit within the line box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "overflow-x",
            "browsers": [
                "E12",
                "FF3.5",
                "FFA4",
                "S3",
                "SM1",
                "C1",
                "CA18",
                "IE5",
                "O9.5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
                },
                {
                    "name": "hidden",
                    "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
                },
                {
                    "name": "scroll",
                    "description": "Content is clipped and if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped."
                },
                {
                    "name": "visible",
                    "description": "Content is not clipped, i.e., it may be rendered outside the content box."
                }
            ],
            "syntax": "visible | hidden | clip | scroll | auto",
            "relevance": 82,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-x"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies the handling of overflow in the horizontal direction.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "overflow-y",
            "browsers": [
                "E12",
                "FF3.5",
                "FFA4",
                "S3",
                "SM1",
                "C1",
                "CA18",
                "IE5",
                "O9.5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
                },
                {
                    "name": "hidden",
                    "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
                },
                {
                    "name": "scroll",
                    "description": "Content is clipped and if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped."
                },
                {
                    "name": "visible",
                    "description": "Content is not clipped, i.e., it may be rendered outside the content box."
                }
            ],
            "syntax": "visible | hidden | clip | scroll | auto",
            "relevance": 83,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-y"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies the handling of overflow in the vertical direction.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "pad",
            "browsers": [
                "FF33"
            ],
            "atRule": "@counter-style",
            "syntax": "<integer> && <symbol>",
            "relevance": 50,
            "description": "@counter-style descriptor. Specifies a \"fixed-width\" counter style, where representations shorter than the pad value are padded with a particular <symbol>",
            "restrictions": [
                "integer",
                "image",
                "string",
                "identifier"
            ]
        },
        {
            "name": "padding",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [],
            "syntax": "<'padding-top'>{1,4}",
            "relevance": 95,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/padding"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property to set values for the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "padding-bottom",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<length-percentage [0,∞]>",
            "relevance": 89,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/padding-bottom"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property to set values for the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "padding-block-end",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'padding-top'>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'padding-bottom'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "padding-block-start",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'padding-top'>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'padding-top'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "padding-inline-end",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'padding-top'>",
            "relevance": 57,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'padding-right'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "padding-inline-start",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S12.1",
                "SM12.2",
                "C69",
                "CA69",
                "O56"
            ],
            "syntax": "<'padding-top'>",
            "relevance": 59,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Logical 'padding-left'. Mapping depends on the parent element's 'writing-mode', 'direction', and 'text-orientation'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "padding-left",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<length-percentage [0,∞]>",
            "relevance": 90,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/padding-left"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property to set values for the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "padding-right",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<length-percentage [0,∞]>",
            "relevance": 89,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/padding-right"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property to set values for the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "padding-top",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "syntax": "<length-percentage [0,∞]>",
            "relevance": 90,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/padding-top"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Shorthand property to set values for the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "page-break-after",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1.2",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "always",
                    "description": "Always force a page break after the generated box."
                },
                {
                    "name": "auto",
                    "description": "Neither force nor forbid a page break after generated box."
                },
                {
                    "name": "avoid",
                    "description": "Avoid a page break after the generated box."
                },
                {
                    "name": "left",
                    "description": "Force one or two page breaks after the generated box so that the next page is formatted as a left page."
                },
                {
                    "name": "right",
                    "description": "Force one or two page breaks after the generated box so that the next page is formatted as a right page."
                }
            ],
            "status": "obsolete",
            "syntax": "auto | always | avoid | left | right | recto | verso",
            "relevance": 1,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-after"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Defines rules for page breaks after an element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "page-break-before",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1.2",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "always",
                    "description": "Always force a page break before the generated box."
                },
                {
                    "name": "auto",
                    "description": "Neither force nor forbid a page break before the generated box."
                },
                {
                    "name": "avoid",
                    "description": "Avoid a page break before the generated box."
                },
                {
                    "name": "left",
                    "description": "Force one or two page breaks before the generated box so that the next page is formatted as a left page."
                },
                {
                    "name": "right",
                    "description": "Force one or two page breaks before the generated box so that the next page is formatted as a right page."
                }
            ],
            "status": "obsolete",
            "syntax": "auto | always | avoid | left | right | recto | verso",
            "relevance": 0,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-before"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Defines rules for page breaks before an element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "page-break-inside",
            "browsers": [
                "E12",
                "FF19",
                "FFA19",
                "S1.3",
                "SM1",
                "C1",
                "CA18",
                "IE8",
                "O7"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Neither force nor forbid a page break inside the generated box."
                },
                {
                    "name": "avoid",
                    "description": "Avoid a page break inside the generated box."
                }
            ],
            "status": "obsolete",
            "syntax": "auto | avoid",
            "relevance": 2,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-inside"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Defines rules for page breaks inside an element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "paint-order",
            "browsers": [
                "E123",
                "FF60",
                "FFA60",
                "S11",
                "SM11",
                "C123",
                "CA123",
                "O109"
            ],
            "values": [
                {
                    "name": "fill"
                },
                {
                    "name": "markers"
                },
                {
                    "name": "normal",
                    "description": "The element is painted with the standard order of painting operations: the 'fill' is painted first, then its 'stroke' and finally its markers."
                },
                {
                    "name": "stroke"
                }
            ],
            "syntax": "normal | [ fill || stroke || markers ]",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/paint-order"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-03-22"
            },
            "description": "Controls the order that the three paint operations that shapes and text are rendered with: their fill, their stroke and any markers they might have.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "perspective",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C36",
                "CA36",
                "IE10",
                "O23"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No perspective transform is applied."
                }
            ],
            "syntax": "none | <length>",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/perspective"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Applies the same transform as the perspective(<number>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",
            "restrictions": [
                "length",
                "enum"
            ]
        },
        {
            "name": "perspective-origin",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C36",
                "CA36",
                "IE10",
                "O23"
            ],
            "syntax": "<position>",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/perspective-origin"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",
            "restrictions": [
                "position",
                "percentage",
                "length"
            ]
        },
        {
            "name": "pointer-events",
            "browsers": [
                "E12",
                "FF1.5",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "IE11",
                "O9"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "The given element can be the target element for pointer events whenever the pointer is over either the interior or the perimeter of the element."
                },
                {
                    "name": "fill",
                    "description": "The given element can be the target element for pointer events whenever the pointer is over the interior of the element."
                },
                {
                    "name": "none",
                    "description": "The given element does not receive pointer events."
                },
                {
                    "name": "painted",
                    "description": "The given element can be the target element for pointer events when the pointer is over a \"painted\" area. "
                },
                {
                    "name": "stroke",
                    "description": "The given element can be the target element for pointer events whenever the pointer is over the perimeter of the element."
                },
                {
                    "name": "visible",
                    "description": "The given element can be the target element for pointer events when the 'visibility' property is set to visible and the pointer is over either the interior or the perimeter of the element."
                },
                {
                    "name": "visibleFill",
                    "description": "The given element can be the target element for pointer events when the 'visibility' property is set to visible and when the pointer is over the interior of the element."
                },
                {
                    "name": "visiblePainted",
                    "description": "The given element can be the target element for pointer events when the 'visibility' property is set to visible and when the pointer is over a 'painted' area."
                },
                {
                    "name": "visibleStroke",
                    "description": "The given element can be the target element for pointer events when the 'visibility' property is set to visible and when the pointer is over the perimeter of the element."
                }
            ],
            "syntax": "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",
            "relevance": 83,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/pointer-events"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies under what circumstances a given element can be the target element for a pointer event.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "position",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O4"
            ],
            "values": [
                {
                    "name": "absolute",
                    "description": "The box's position (and possibly size) is specified with the 'top', 'right', 'bottom', and 'left' properties. These properties specify offsets with respect to the box's 'containing block'."
                },
                {
                    "name": "fixed",
                    "description": "The box's position is calculated according to the 'absolute' model, but in addition, the box is fixed with respect to some reference. As with the 'absolute' model, the box's margins do not collapse with any other margins."
                },
                {
                    "name": "-ms-page",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O4"
                    ],
                    "description": "The box's position is calculated according to the 'absolute' model."
                },
                {
                    "name": "relative",
                    "description": "The box's position is calculated according to the normal flow (this is called the position in normal flow). Then the box is offset relative to its normal position."
                },
                {
                    "name": "static",
                    "description": "The box is a normal box, laid out according to the normal flow. The 'top', 'right', 'bottom', and 'left' properties do not apply."
                },
                {
                    "name": "sticky",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O4"
                    ],
                    "description": "The box's position is calculated according to the normal flow. Then the box is offset relative to its flow root and containing block and in all cases, including table elements, does not affect the position of any following boxes."
                },
                {
                    "name": "-webkit-sticky",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O4"
                    ],
                    "description": "The box's position is calculated according to the normal flow. Then the box is offset relative to its flow root and containing block and in all cases, including table elements, does not affect the position of any following boxes."
                }
            ],
            "syntax": "static | relative | absolute | sticky | fixed",
            "relevance": 95,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/position"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "The position CSS property sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final location of positioned elements.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "prefix",
            "browsers": [
                "FF33"
            ],
            "atRule": "@counter-style",
            "syntax": "<symbol>",
            "relevance": 50,
            "description": "@counter-style descriptor. Specifies a <symbol> that is prepended to the marker representation.",
            "restrictions": [
                "image",
                "string",
                "identifier"
            ]
        },
        {
            "name": "quotes",
            "browsers": [
                "E12",
                "FF1.5",
                "FFA4",
                "S9",
                "SM9",
                "C11",
                "CA18",
                "IE8",
                "O4"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "The 'open-quote' and 'close-quote' values of the 'content' property produce no quotations marks, as if they were 'no-open-quote' and 'no-close-quote' respectively."
                }
            ],
            "syntax": "none | auto | [ <string> <string> ]+",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/quotes"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Specifies quotation marks for any number of embedded quotations.",
            "restrictions": [
                "string"
            ]
        },
        {
            "name": "range",
            "browsers": [
                "FF33"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The range depends on the counter system."
                },
                {
                    "name": "infinite",
                    "description": "If used as the first value in a range, it represents negative infinity; if used as the second value, it represents positive infinity."
                }
            ],
            "atRule": "@counter-style",
            "syntax": "[ [ <integer> | infinite ]{2} ]# | auto",
            "relevance": 50,
            "description": "@counter-style descriptor. Defines the ranges over which the counter style is defined.",
            "restrictions": [
                "integer",
                "enum"
            ]
        },
        {
            "name": "resize",
            "browsers": [
                "E79",
                "FF4",
                "FFA4",
                "S3",
                "C1",
                "CA18",
                "O12.1"
            ],
            "values": [
                {
                    "name": "both",
                    "description": "The UA presents a bidirectional resizing mechanism to allow the user to adjust both the height and the width of the element."
                },
                {
                    "name": "horizontal",
                    "description": "The UA presents a unidirectional horizontal resizing mechanism to allow the user to adjust only the width of the element."
                },
                {
                    "name": "none",
                    "description": "The UA does not present a resizing mechanism on the element, and the user is given no direct manipulation mechanism to resize the element."
                },
                {
                    "name": "vertical",
                    "description": "The UA presents a unidirectional vertical resizing mechanism to allow the user to adjust only the height of the element."
                }
            ],
            "syntax": "none | both | horizontal | vertical | block | inline",
            "relevance": 67,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/resize"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Specifies whether or not an element is resizable by the user, and if so, along which axis/axes.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "right",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE5.5",
                "O5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
                }
            ],
            "syntax": "<length> | <percentage> | auto",
            "relevance": 91,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/right"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies how far an absolutely positioned box's right margin edge is offset to the left of the right edge of the box's 'containing block'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "ruby-align",
            "browsers": [
                "E128",
                "FF38",
                "FFA38",
                "S18.2",
                "SM18.2",
                "C128",
                "CA128",
                "O114"
            ],
            "values": [
                {
                    "name": "auto",
                    "browsers": [
                        "E128",
                        "FF38",
                        "FFA38",
                        "S18.2",
                        "SM18.2",
                        "C128",
                        "CA128",
                        "O114"
                    ],
                    "description": "The user agent determines how the ruby contents are aligned. This is the initial value."
                },
                {
                    "name": "center",
                    "description": "The ruby content is centered within its box."
                },
                {
                    "name": "distribute-letter",
                    "browsers": [
                        "E128",
                        "FF38",
                        "FFA38",
                        "S18.2",
                        "SM18.2",
                        "C128",
                        "CA128",
                        "O114"
                    ],
                    "description": "If the width of the ruby text is smaller than that of the base, then the ruby text contents are evenly distributed across the width of the base, with the first and last ruby text glyphs lining up with the corresponding first and last base glyphs. If the width of the ruby text is at least the width of the base, then the letters of the base are evenly distributed across the width of the ruby text."
                },
                {
                    "name": "distribute-space",
                    "browsers": [
                        "E128",
                        "FF38",
                        "FFA38",
                        "S18.2",
                        "SM18.2",
                        "C128",
                        "CA128",
                        "O114"
                    ],
                    "description": "If the width of the ruby text is smaller than that of the base, then the ruby text contents are evenly distributed across the width of the base, with a certain amount of white space preceding the first and following the last character in the ruby text. That amount of white space is normally equal to half the amount of inter-character space of the ruby text."
                },
                {
                    "name": "left",
                    "description": "The ruby text content is aligned with the start edge of the base."
                },
                {
                    "name": "line-edge",
                    "browsers": [
                        "E128",
                        "FF38",
                        "FFA38",
                        "S18.2",
                        "SM18.2",
                        "C128",
                        "CA128",
                        "O114"
                    ],
                    "description": "If the ruby text is not adjacent to a line edge, it is aligned as in 'auto'. If it is adjacent to a line edge, then it is still aligned as in auto, but the side of the ruby text that touches the end of the line is lined up with the corresponding edge of the base."
                },
                {
                    "name": "right",
                    "browsers": [
                        "E128",
                        "FF38",
                        "FFA38",
                        "S18.2",
                        "SM18.2",
                        "C128",
                        "CA128",
                        "O114"
                    ],
                    "description": "The ruby text content is aligned with the end edge of the base."
                },
                {
                    "name": "start",
                    "browsers": [
                        "E128",
                        "FF38",
                        "FFA38",
                        "S18.2",
                        "SM18.2",
                        "C128",
                        "CA128",
                        "O114"
                    ],
                    "description": "The ruby text content is aligned with the start edge of the base."
                },
                {
                    "name": "space-between",
                    "browsers": [
                        "E128",
                        "FF38",
                        "FFA38",
                        "S18.2",
                        "SM18.2",
                        "C128",
                        "CA128",
                        "O114"
                    ],
                    "description": "The ruby content expands as defined for normal text justification (as defined by 'text-justify'),"
                },
                {
                    "name": "space-around",
                    "browsers": [
                        "E128",
                        "FF38",
                        "FFA38",
                        "S18.2",
                        "SM18.2",
                        "C128",
                        "CA128",
                        "O114"
                    ],
                    "description": "As for 'space-between' except that there exists an extra justification opportunities whose space is distributed half before and half after the ruby content."
                }
            ],
            "syntax": "start | center | space-between | space-around",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/ruby-align"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-12-11"
            },
            "description": "Specifies how text is distributed within the various ruby boxes when their contents do not exactly fill their respective boxes.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "ruby-overhang",
            "browsers": [
                "S18.2",
                "SM18.2"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The ruby text can overhang text adjacent to the base on either side. This is the initial value."
                },
                {
                    "name": "end",
                    "description": "The ruby text can overhang the text that follows it."
                },
                {
                    "name": "none",
                    "description": "The ruby text cannot overhang any text adjacent to its base, only its own base."
                },
                {
                    "name": "start",
                    "description": "The ruby text can overhang the text that precedes it."
                }
            ],
            "relevance": 50,
            "baseline": {
                "status": "false"
            },
            "description": "Determines whether, and on which side, ruby text is allowed to partially overhang any adjacent text in addition to its own base, when the ruby text is wider than the ruby base.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "ruby-position",
            "browsers": [
                "E84",
                "FF38",
                "FFA38",
                "S18.2",
                "SM18.2",
                "C84",
                "CA84",
                "O70"
            ],
            "values": [
                {
                    "name": "after",
                    "description": "The ruby text appears after the base. This is a relatively rare setting used in ideographic East Asian writing systems, most easily found in educational text."
                },
                {
                    "name": "before",
                    "description": "The ruby text appears before the base. This is the most common setting used in ideographic East Asian writing systems."
                },
                {
                    "name": "inline"
                },
                {
                    "name": "right",
                    "description": "The ruby text appears on the right of the base. Unlike 'before' and 'after', this value is not relative to the text flow direction."
                }
            ],
            "syntax": "[ alternate || [ over | under ] ] | inter-character",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/ruby-position"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-12-11"
            },
            "description": "Used by the parent of elements with display: ruby-text to control the position of the ruby text with respect to its base.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "ruby-span",
            "browsers": [
                "FF10"
            ],
            "values": [
                {
                    "name": "attr(x)",
                    "description": "The value of attribute 'x' is a string value. The string value is evaluated as a <number> to determine the number of ruby base elements to be spanned by the annotation element."
                },
                {
                    "name": "none",
                    "description": "No spanning. The computed value is '1'."
                }
            ],
            "relevance": 50,
            "description": "Determines whether, and on which side, ruby text is allowed to partially overhang any adjacent text in addition to its own base, when the ruby text is wider than the ruby base.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "scrollbar-3dlight-color",
            "browsers": [
                "IE6"
            ],
            "relevance": 50,
            "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "scrollbar-arrow-color",
            "browsers": [
                "IE6"
            ],
            "relevance": 50,
            "description": "Determines the color of the arrow elements of a scroll arrow.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "scrollbar-base-color",
            "browsers": [
                "IE6"
            ],
            "relevance": 50,
            "description": "Determines the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "scrollbar-darkshadow-color",
            "browsers": [
                "IE6"
            ],
            "relevance": 50,
            "description": "Determines the color of the gutter of a scroll bar.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "scrollbar-face-color",
            "browsers": [
                "IE6"
            ],
            "relevance": 50,
            "description": "Determines the color of the scroll box and scroll arrows of a scroll bar.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "scrollbar-highlight-color",
            "browsers": [
                "IE6"
            ],
            "relevance": 50,
            "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "scrollbar-shadow-color",
            "browsers": [
                "IE6"
            ],
            "relevance": 50,
            "description": "Determines the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "scrollbar-track-color",
            "browsers": [
                "IE6"
            ],
            "relevance": 50,
            "description": "Determines the color of the track element of a scroll bar.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "scroll-behavior",
            "browsers": [
                "E79",
                "FF36",
                "FFA36",
                "S15.4",
                "SM15.4",
                "C61",
                "CA61",
                "O48"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Scrolls in an instant fashion."
                },
                {
                    "name": "smooth",
                    "description": "Scrolls in a smooth fashion using a user-agent-defined timing function and time period."
                }
            ],
            "syntax": "auto | smooth",
            "relevance": 57,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-behavior"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            },
            "description": "Specifies the scrolling behavior for a scrolling box, when scrolling happens due to navigation or CSSOM scrolling APIs.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "scroll-snap-coordinate",
            "browsers": [
                "FF39"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Specifies that this element does not contribute a snap point."
                }
            ],
            "status": "obsolete",
            "syntax": "none | <position>#",
            "relevance": 0,
            "description": "Defines the x and y coordinate within the element which will align with the nearest ancestor scroll container's snap-destination for the respective axis.",
            "restrictions": [
                "position",
                "length",
                "percentage",
                "enum"
            ]
        },
        {
            "name": "scroll-snap-destination",
            "browsers": [
                "FF39"
            ],
            "status": "obsolete",
            "syntax": "<position>",
            "relevance": 0,
            "description": "Define the x and y coordinate within the scroll container's visual viewport which element snap points will align with.",
            "restrictions": [
                "position",
                "length",
                "percentage"
            ]
        },
        {
            "name": "scroll-snap-points-x",
            "browsers": [
                "FF39"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No snap points are defined by this scroll container."
                },
                {
                    "name": "repeat()",
                    "description": "Defines an interval at which snap points are defined, starting from the container's relevant start edge."
                }
            ],
            "status": "obsolete",
            "syntax": "none | repeat( <length-percentage> )",
            "relevance": 0,
            "description": "Defines the positioning of snap points along the x axis of the scroll container it is applied to.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "scroll-snap-points-y",
            "browsers": [
                "FF39"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No snap points are defined by this scroll container."
                },
                {
                    "name": "repeat()",
                    "description": "Defines an interval at which snap points are defined, starting from the container's relevant start edge."
                }
            ],
            "status": "obsolete",
            "syntax": "none | repeat( <length-percentage> )",
            "relevance": 0,
            "description": "Defines the positioning of snap points along the y axis of the scroll container it is applied to.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "scroll-snap-type",
            "browsers": [
                "E79",
                "FF99",
                "FFA68",
                "S11",
                "SM11",
                "C69",
                "CA69",
                "IE10",
                "O56"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "The visual viewport of this scroll container must ignore snap points, if any, when scrolled."
                },
                {
                    "name": "mandatory",
                    "description": "The visual viewport of this scroll container is guaranteed to rest on a snap point when there are no active scrolling operations."
                },
                {
                    "name": "proximity",
                    "description": "The visual viewport of this scroll container may come to rest on a snap point at the termination of a scroll at the discretion of the UA given the parameters of the scroll."
                }
            ],
            "syntax": "none | [ x | y | block | inline | both ] [ mandatory | proximity ]?",
            "relevance": 56,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-04-05",
                "baseline_high_date": "2024-10-05"
            },
            "description": "Defines how strictly snap points are enforced on the scroll container.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "shape-image-threshold",
            "browsers": [
                "E79",
                "FF62",
                "FFA62",
                "S10.1",
                "SM10.3",
                "C37",
                "CA37",
                "O24"
            ],
            "syntax": "<opacity-value>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Defines the alpha channel threshold used to extract the shape using an image. A value of 0.5 means that the shape will enclose all the pixels that are more than 50% opaque.",
            "restrictions": [
                "number"
            ]
        },
        {
            "name": "shape-margin",
            "browsers": [
                "E79",
                "FF62",
                "FFA62",
                "S10.1",
                "SM10.3",
                "C37",
                "CA37",
                "O24"
            ],
            "syntax": "<length-percentage>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/shape-margin"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Adds a margin to a 'shape-outside'. This defines a new shape that is the smallest contour that includes all the points that are the 'shape-margin' distance outward in the perpendicular direction from a point on the underlying shape.",
            "restrictions": [
                "url",
                "length",
                "percentage"
            ]
        },
        {
            "name": "shape-outside",
            "browsers": [
                "E79",
                "FF62",
                "FFA62",
                "S10.1",
                "SM10.3",
                "C37",
                "CA37",
                "O24"
            ],
            "values": [
                {
                    "name": "margin-box",
                    "description": "The background is painted within (clipped to) the margin box."
                },
                {
                    "name": "none",
                    "description": "The float area is unaffected."
                }
            ],
            "syntax": "none | [ <shape-box> || <basic-shape> ] | <image>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/shape-outside"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Specifies an orthogonal rotation to be applied to an image before it is laid out.",
            "restrictions": [
                "image",
                "box",
                "shape",
                "enum"
            ]
        },
        {
            "name": "shape-rendering",
            "browsers": [
                "E79",
                "FF3",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Suppresses aural rendering."
                },
                {
                    "name": "crispEdges",
                    "description": "Emphasize the contrast between clean edges of artwork over rendering speed and geometric precision."
                },
                {
                    "name": "geometricPrecision",
                    "description": "Emphasize geometric precision over speed and crisp edges."
                },
                {
                    "name": "optimizeSpeed",
                    "description": "Emphasize rendering speed over geometric precision and crisp edges."
                }
            ],
            "syntax": "auto | optimizeSpeed | crispEdges | geometricPrecision",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/shape-rendering"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Provides hints about what tradeoffs to make as it renders vector graphics elements such as <path> elements and basic shapes such as circles and rectangles.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "size",
            "browsers": [
                "C",
                "O8"
            ],
            "atRule": "@page",
            "syntax": "<length [0,∞]>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]",
            "relevance": 53,
            "description": "The size CSS at-rule descriptor, used with the @page at-rule, defines the size and orientation of the box which is used to represent a page. Most of the time, this size corresponds to the target size of the printed page if applicable.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "src",
            "values": [
                {
                    "name": "url()",
                    "description": "Reference font by URL"
                },
                {
                    "name": "format()",
                    "description": "Optional hint describing the format of the font resource."
                },
                {
                    "name": "local()",
                    "description": "Format-specific string that identifies a locally available copy of a given font."
                }
            ],
            "atRule": "@font-face",
            "syntax": "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#",
            "relevance": 86,
            "description": "@font-face descriptor. Specifies the resource containing font data. It is required, whether the font is downloadable or locally installed.",
            "restrictions": [
                "enum",
                "url",
                "identifier"
            ]
        },
        {
            "name": "stop-color",
            "browsers": [
                "E15",
                "FF3",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "syntax": "<'color'>",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/stop-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Indicates what color to use at that gradient stop.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "stop-opacity",
            "browsers": [
                "E15",
                "FF3",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "syntax": "<'opacity'>",
            "relevance": 52,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/stop-opacity"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Defines the opacity of a given gradient stop.",
            "restrictions": [
                "number(0-1)"
            ]
        },
        {
            "name": "stroke",
            "browsers": [
                "E15",
                "FF1.5",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "url()",
                    "description": "A URL reference to a paint server element, which is an element that defines a paint server: 'hatch', 'linearGradient', 'mesh', 'pattern', 'radialGradient' and 'solidcolor'."
                },
                {
                    "name": "none",
                    "description": "No paint is applied in this layer."
                }
            ],
            "syntax": "<paint>",
            "relevance": 70,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/stroke"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Paints along the outline of the given graphical element.",
            "restrictions": [
                "color",
                "enum",
                "url"
            ]
        },
        {
            "name": "stroke-dasharray",
            "browsers": [
                "E15",
                "FF1.5",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Indicates that no dashing is used."
                }
            ],
            "syntax": "none | <dasharray>",
            "relevance": 63,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/stroke-dasharray"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Controls the pattern of dashes and gaps used to stroke paths.",
            "restrictions": [
                "length",
                "percentage",
                "number",
                "enum"
            ]
        },
        {
            "name": "stroke-dashoffset",
            "browsers": [
                "E15",
                "FF1.5",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "syntax": "<length-percentage> | <number>",
            "relevance": 64,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/stroke-dashoffset"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Specifies the distance into the dash pattern to start the dash.",
            "restrictions": [
                "percentage",
                "length"
            ]
        },
        {
            "name": "stroke-linecap",
            "browsers": [
                "E15",
                "FF1.5",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "butt",
                    "description": "Indicates that the stroke for each subpath does not extend beyond its two endpoints."
                },
                {
                    "name": "round",
                    "description": "Indicates that at each end of each subpath, the shape representing the stroke will be extended by a half circle with a radius equal to the stroke width."
                },
                {
                    "name": "square",
                    "description": "Indicates that at the end of each subpath, the shape representing the stroke will be extended by a rectangle with the same width as the stroke width and whose length is half of the stroke width."
                }
            ],
            "syntax": "butt | round | square",
            "relevance": 54,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/stroke-linecap"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Specifies the shape to be used at the end of open subpaths when they are stroked.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "stroke-linejoin",
            "browsers": [
                "E15",
                "FF1.5",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "bevel",
                    "description": "Indicates that a bevelled corner is to be used to join path segments."
                },
                {
                    "name": "miter",
                    "description": "Indicates that a sharp corner is to be used to join path segments."
                },
                {
                    "name": "round",
                    "description": "Indicates that a round corner is to be used to join path segments."
                }
            ],
            "syntax": "miter | miter-clip | round | bevel | arcs",
            "relevance": 52,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/stroke-linejoin"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Specifies the shape to be used at the corners of paths or basic shapes when they are stroked.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "stroke-miterlimit",
            "browsers": [
                "E15",
                "FF1.5",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "syntax": "<number>",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/stroke-miterlimit"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "When two line segments meet at a sharp angle and miter joins have been specified for 'stroke-linejoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path.",
            "restrictions": [
                "number"
            ]
        },
        {
            "name": "stroke-opacity",
            "browsers": [
                "E15",
                "FF1.5",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "syntax": "<'opacity'>",
            "relevance": 53,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/stroke-opacity"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Specifies the opacity of the painting operation used to stroke the current object.",
            "restrictions": [
                "number(0-1)"
            ]
        },
        {
            "name": "stroke-width",
            "browsers": [
                "E15",
                "FF1.5",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "syntax": "<length-percentage> | <number>",
            "relevance": 70,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/stroke-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "description": "Specifies the width of the stroke on the current object.",
            "restrictions": [
                "percentage",
                "length"
            ]
        },
        {
            "name": "suffix",
            "browsers": [
                "FF33"
            ],
            "atRule": "@counter-style",
            "syntax": "<symbol>",
            "relevance": 50,
            "description": "@counter-style descriptor. Specifies a <symbol> that is appended to the marker representation.",
            "restrictions": [
                "image",
                "string",
                "identifier"
            ]
        },
        {
            "name": "system",
            "browsers": [
                "FF33"
            ],
            "values": [
                {
                    "name": "additive",
                    "description": "Represents \"sign-value\" numbering systems, which, rather than using reusing digits in different positions to change their value, define additional digits with much larger values, so that the value of the number can be obtained by adding all the digits together."
                },
                {
                    "name": "alphabetic",
                    "description": "Interprets the list of counter symbols as digits to an alphabetic numbering system, similar to the default lower-alpha counter style, which wraps from \"a\", \"b\", \"c\", to \"aa\", \"ab\", \"ac\"."
                },
                {
                    "name": "cyclic",
                    "description": "Cycles repeatedly through its provided symbols, looping back to the beginning when it reaches the end of the list."
                },
                {
                    "name": "extends",
                    "description": "Use the algorithm of another counter style, but alter other aspects."
                },
                {
                    "name": "fixed",
                    "description": "Runs through its list of counter symbols once, then falls back."
                },
                {
                    "name": "numeric",
                    "description": "interprets the list of counter symbols as digits to a \"place-value\" numbering system, similar to the default 'decimal' counter style."
                },
                {
                    "name": "symbolic",
                    "description": "Cycles repeatedly through its provided symbols, doubling, tripling, etc. the symbols on each successive pass through the list."
                }
            ],
            "atRule": "@counter-style",
            "syntax": "cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>? ] | [ extends <counter-style-name> ]",
            "relevance": 50,
            "description": "@counter-style descriptor. Specifies which algorithm will be used to construct the counter's representation based on the counter value.",
            "restrictions": [
                "enum",
                "integer"
            ]
        },
        {
            "name": "symbols",
            "browsers": [
                "FF33"
            ],
            "atRule": "@counter-style",
            "syntax": "<symbol>+",
            "relevance": 50,
            "description": "@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor.",
            "restrictions": [
                "image",
                "string",
                "identifier"
            ]
        },
        {
            "name": "table-layout",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM3",
                "C14",
                "CA18",
                "IE5",
                "O7"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Use any automatic table layout algorithm."
                },
                {
                    "name": "fixed",
                    "description": "Use the fixed table layout algorithm."
                }
            ],
            "syntax": "auto | fixed",
            "relevance": 59,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/table-layout"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Controls the algorithm used to lay out the table cells, rows, and columns.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "tab-size",
            "browsers": [
                "E79",
                "FF91",
                "FFA91",
                "S7",
                "SM7",
                "C21",
                "CA25",
                "O15"
            ],
            "syntax": "<integer> | <length>",
            "relevance": 55,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/tab-size"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-08-10",
                "baseline_high_date": "2024-02-10"
            },
            "description": "Determines the width of the tab character (U+0009), in space characters (U+0020), when rendered.",
            "restrictions": [
                "integer",
                "length"
            ]
        },
        {
            "name": "text-align",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "values": [
                {
                    "name": "center",
                    "description": "The inline contents are centered within the line box."
                },
                {
                    "name": "end",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE3",
                        "O3.5"
                    ],
                    "description": "The inline contents are aligned to the end edge of the line box."
                },
                {
                    "name": "justify",
                    "description": "The text is justified according to the method specified by the 'text-justify' property."
                },
                {
                    "name": "left",
                    "description": "The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."
                },
                {
                    "name": "right",
                    "description": "The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."
                },
                {
                    "name": "start",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE3",
                        "O3.5"
                    ],
                    "description": "The inline contents are aligned to the start edge of the line box."
                }
            ],
            "syntax": "start | end | left | right | center | justify | match-parent",
            "relevance": 93,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-align"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Describes how inline contents of a block are horizontally aligned if the contents do not completely fill the line box.",
            "restrictions": [
                "string"
            ]
        },
        {
            "name": "text-align-last",
            "browsers": [
                "E12",
                "FF49",
                "FFA49",
                "S16",
                "SM16",
                "C47",
                "CA47",
                "IE5.5",
                "O34"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Content on the affected line is aligned per 'text-align' unless 'text-align' is set to 'justify', in which case it is 'start-aligned'."
                },
                {
                    "name": "center",
                    "description": "The inline contents are centered within the line box."
                },
                {
                    "name": "justify",
                    "description": "The text is justified according to the method specified by the 'text-justify' property."
                },
                {
                    "name": "left",
                    "description": "The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."
                },
                {
                    "name": "right",
                    "description": "The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."
                }
            ],
            "syntax": "auto | start | end | left | right | center | justify",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-align-last"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-09-12",
                "baseline_high_date": "2025-03-12"
            },
            "description": "Describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "text-anchor",
            "browsers": [
                "E14",
                "FF3",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "end",
                    "description": "The rendered characters are aligned such that the end of the resulting rendered text is at the initial current text position."
                },
                {
                    "name": "middle",
                    "description": "The rendered characters are aligned such that the geometric middle of the resulting rendered text is at the initial current text position."
                },
                {
                    "name": "start",
                    "description": "The rendered characters are aligned such that the start of the resulting rendered text is at the initial current text position."
                }
            ],
            "syntax": "start | middle | end",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-anchor"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2016-08-02",
                "baseline_high_date": "2019-02-02"
            },
            "description": "Used to align (start-, middle- or end-alignment) a string of text relative to a given point.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "text-decoration",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "values": [
                {
                    "name": "dashed",
                    "description": "Produces a dashed line style."
                },
                {
                    "name": "dotted",
                    "description": "Produces a dotted line."
                },
                {
                    "name": "double",
                    "description": "Produces a double line."
                },
                {
                    "name": "line-through",
                    "description": "Each line of text has a line through the middle."
                },
                {
                    "name": "none",
                    "description": "Produces no line."
                },
                {
                    "name": "overline",
                    "description": "Each line of text has a line above it."
                },
                {
                    "name": "solid",
                    "description": "Produces a solid line."
                },
                {
                    "name": "underline",
                    "description": "Each line of text is underlined."
                },
                {
                    "name": "wavy",
                    "description": "Produces a wavy line."
                }
            ],
            "syntax": "<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>",
            "relevance": 91,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Decorations applied to font used for an element's text.",
            "restrictions": [
                "enum",
                "color"
            ]
        },
        {
            "name": "text-decoration-color",
            "browsers": [
                "E79",
                "FF36",
                "FFA36",
                "S12.1",
                "SM12.2",
                "C57",
                "CA57",
                "O44"
            ],
            "syntax": "<color>",
            "relevance": 57,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Specifies the color of text decoration (underlines overlines, and line-throughs) set on the element with text-decoration-line.",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "text-decoration-line",
            "browsers": [
                "E79",
                "FF36",
                "FFA36",
                "S12.1",
                "SM12.2",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "line-through",
                    "description": "Each line of text has a line through the middle."
                },
                {
                    "name": "none",
                    "description": "Neither produces nor inhibits text decoration."
                },
                {
                    "name": "overline",
                    "description": "Each line of text has a line above it."
                },
                {
                    "name": "underline",
                    "description": "Each line of text is underlined."
                }
            ],
            "syntax": "none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error",
            "relevance": 58,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-line"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Specifies what line decorations, if any, are added to the element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "text-decoration-style",
            "browsers": [
                "E79",
                "FF36",
                "FFA36",
                "S12.1",
                "SM12.2",
                "C57",
                "CA57",
                "O44"
            ],
            "values": [
                {
                    "name": "dashed",
                    "description": "Produces a dashed line style."
                },
                {
                    "name": "dotted",
                    "description": "Produces a dotted line."
                },
                {
                    "name": "double",
                    "description": "Produces a double line."
                },
                {
                    "name": "none",
                    "description": "Produces no line."
                },
                {
                    "name": "solid",
                    "description": "Produces a solid line."
                },
                {
                    "name": "wavy",
                    "description": "Produces a wavy line."
                }
            ],
            "syntax": "solid | double | dotted | dashed | wavy",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Specifies the line style for underline, line-through and overline text decoration.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "text-indent",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "values": [],
            "syntax": "<length-percentage> && hanging? && each-line?",
            "relevance": 69,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-indent"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies the indentation applied to lines of inline content in a block. The indentation only affects the first line of inline content in the block unless the 'hanging' keyword is specified, in which case it affects all lines except the first.",
            "restrictions": [
                "percentage",
                "length"
            ]
        },
        {
            "name": "text-justify",
            "browsers": [
                "FF55",
                "FFA55",
                "IE11",
                "O19"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality."
                },
                {
                    "name": "distribute",
                    "description": "Justification primarily changes spacing both at word separators and at grapheme cluster boundaries in all scripts except those in the connected and cursive groups. This value is sometimes used in e.g. Japanese, often with the 'text-align-last' property."
                },
                {
                    "name": "distribute-all-lines"
                },
                {
                    "name": "inter-cluster",
                    "description": "Justification primarily changes spacing at word separators and at grapheme cluster boundaries in clustered scripts. This value is typically used for Southeast Asian scripts such as Thai."
                },
                {
                    "name": "inter-ideograph",
                    "description": "Justification primarily changes spacing at word separators and at inter-graphemic boundaries in scripts that use no word spaces. This value is typically used for CJK languages."
                },
                {
                    "name": "inter-word",
                    "description": "Justification primarily changes spacing at word separators. This value is typically used for languages that separate words using spaces, like English or (sometimes) Korean."
                },
                {
                    "name": "kashida",
                    "description": "Justification primarily stretches Arabic and related scripts through the use of kashida or other calligraphic elongation."
                },
                {
                    "name": "newspaper"
                }
            ],
            "syntax": "auto | inter-character | inter-word | none",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-justify"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Selects the justification algorithm used when 'text-align' is set to 'justify'. The property applies to block containers, but the UA may (but is not required to) also support it on inline elements.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "text-orientation",
            "browsers": [
                "E79",
                "FF41",
                "FFA41",
                "S14",
                "SM14",
                "C48",
                "CA48",
                "O35"
            ],
            "values": [
                {
                    "name": "sideways",
                    "browsers": [
                        "E79",
                        "FF41",
                        "FFA41",
                        "S14",
                        "SM14",
                        "C48",
                        "CA48",
                        "O35"
                    ],
                    "description": "This value is equivalent to 'sideways-right' in 'vertical-rl' writing mode and equivalent to 'sideways-left' in 'vertical-lr' writing mode."
                },
                {
                    "name": "sideways-right",
                    "browsers": [
                        "E79",
                        "FF41",
                        "FFA41",
                        "S14",
                        "SM14",
                        "C48",
                        "CA48",
                        "O35"
                    ],
                    "description": "In vertical writing modes, this causes text to be set as if in a horizontal layout, but rotated 90° clockwise."
                },
                {
                    "name": "upright",
                    "description": "In vertical writing modes, characters from horizontal-only scripts are rendered upright, i.e. in their standard horizontal orientation."
                }
            ],
            "syntax": "mixed | upright | sideways",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-orientation"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-09-16",
                "baseline_high_date": "2023-03-16"
            },
            "description": "Specifies the orientation of text within a line.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "text-overflow",
            "browsers": [
                "E12",
                "FF7",
                "FFA7",
                "S1.3",
                "SM1",
                "C1",
                "CA18",
                "IE6",
                "O11"
            ],
            "values": [
                {
                    "name": "clip",
                    "description": "Clip inline content that overflows. Characters may be only partially rendered."
                },
                {
                    "name": "ellipsis",
                    "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
                }
            ],
            "syntax": "[ clip | ellipsis | <string> ]{1,2}",
            "relevance": 82,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-overflow"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Text can overflow for example when it is prevented from wrapping.",
            "restrictions": [
                "enum",
                "string"
            ]
        },
        {
            "name": "text-rendering",
            "browsers": [
                "E79",
                "FF1",
                "FFA46",
                "S5",
                "SM4.2",
                "C4",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "geometricPrecision",
                    "description": "Indicates that the user agent shall emphasize geometric precision over legibility and rendering speed."
                },
                {
                    "name": "optimizeLegibility",
                    "description": "Indicates that the user agent shall emphasize legibility over rendering speed and geometric precision."
                },
                {
                    "name": "optimizeSpeed",
                    "description": "Indicates that the user agent shall emphasize rendering speed over legibility and geometric precision."
                }
            ],
            "syntax": "auto | optimizeSpeed | optimizeLegibility | geometricPrecision",
            "relevance": 67,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-rendering"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The creator of SVG content might want to provide a hint to the implementation about what tradeoffs to make as it renders text. The 'text-rendering' property provides these hints.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "text-shadow",
            "browsers": [
                "E12",
                "FF3.5",
                "FFA4",
                "S1.1",
                "SM1",
                "C2",
                "CA18",
                "IE10",
                "O9.5"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No shadow."
                }
            ],
            "syntax": "none | <shadow-t>#",
            "relevance": 72,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-shadow"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Enables shadow effects to be applied to the text of the element.",
            "restrictions": [
                "length",
                "color"
            ]
        },
        {
            "name": "text-transform",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O7"
            ],
            "values": [
                {
                    "name": "capitalize",
                    "description": "Puts the first typographic letter unit of each word in titlecase."
                },
                {
                    "name": "lowercase",
                    "description": "Puts all letters in lowercase."
                },
                {
                    "name": "none",
                    "description": "No effects."
                },
                {
                    "name": "uppercase",
                    "description": "Puts all letters in uppercase."
                }
            ],
            "syntax": "none | [ capitalize | uppercase | lowercase ] || full-width || full-size-kana | math-auto",
            "relevance": 86,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-transform"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Controls capitalization effects of an element's text.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "text-underline-position",
            "browsers": [
                "E12",
                "FF74",
                "FFA79",
                "S12.1",
                "SM12.2",
                "C33",
                "CA33",
                "IE6",
                "O20"
            ],
            "values": [
                {
                    "name": "above"
                },
                {
                    "name": "auto",
                    "description": "The user agent may use any algorithm to determine the underline's position. In horizontal line layout, the underline should be aligned as for alphabetic. In vertical line layout, if the language is set to Japanese or Korean, the underline should be aligned as for over."
                },
                {
                    "name": "below",
                    "description": "The underline is aligned with the under edge of the element's content box."
                }
            ],
            "syntax": "auto | from-font | [ under || [ left | right ] ]",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-underline-position"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "Sets the position of an underline specified on the same element: it does not affect underlines specified by ancestor elements. This property is typically used in vertical writing contexts such as in Japanese documents where it often desired to have the underline appear 'over' (to the right of) the affected run of text",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "top",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE5",
                "O6"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
                }
            ],
            "syntax": "<length> | <percentage> | auto",
            "relevance": 95,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/top"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's 'containing block'.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "touch-action",
            "browsers": [
                "E12",
                "FF52",
                "FFA52",
                "S13",
                "SM9.3",
                "C36",
                "CA36",
                "IE11",
                "O23"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The user agent may determine any permitted touch behaviors for touches that begin on the element."
                },
                {
                    "name": "cross-slide-x",
                    "browsers": [
                        "E12",
                        "FF52",
                        "FFA52",
                        "S13",
                        "SM9.3",
                        "C36",
                        "CA36",
                        "IE11",
                        "O23"
                    ]
                },
                {
                    "name": "cross-slide-y",
                    "browsers": [
                        "E12",
                        "FF52",
                        "FFA52",
                        "S13",
                        "SM9.3",
                        "C36",
                        "CA36",
                        "IE11",
                        "O23"
                    ]
                },
                {
                    "name": "double-tap-zoom",
                    "browsers": [
                        "E12",
                        "FF52",
                        "FFA52",
                        "S13",
                        "SM9.3",
                        "C36",
                        "CA36",
                        "IE11",
                        "O23"
                    ]
                },
                {
                    "name": "manipulation",
                    "description": "The user agent may consider touches that begin on the element only for the purposes of scrolling and continuous zooming."
                },
                {
                    "name": "none",
                    "description": "Touches that begin on the element must not trigger default touch behaviors."
                },
                {
                    "name": "pan-x",
                    "description": "The user agent may consider touches that begin on the element only for the purposes of horizontally scrolling the element's nearest ancestor with horizontally scrollable content."
                },
                {
                    "name": "pan-y",
                    "description": "The user agent may consider touches that begin on the element only for the purposes of vertically scrolling the element's nearest ancestor with vertically scrollable content."
                },
                {
                    "name": "pinch-zoom",
                    "browsers": [
                        "E12",
                        "FF52",
                        "FFA52",
                        "S13",
                        "SM9.3",
                        "C36",
                        "CA36",
                        "IE11",
                        "O23"
                    ]
                }
            ],
            "syntax": "auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation",
            "relevance": 70,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/touch-action"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2019-09-19",
                "baseline_high_date": "2022-03-19"
            },
            "description": "Determines whether touch input may trigger default behavior supplied by user agent.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "transform",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C36",
                "CA36",
                "IE10",
                "O23"
            ],
            "values": [
                {
                    "name": "matrix()",
                    "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
                },
                {
                    "name": "matrix3d()",
                    "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
                },
                {
                    "name": "none"
                },
                {
                    "name": "perspective()",
                    "description": "Specifies a perspective projection matrix."
                },
                {
                    "name": "rotate()",
                    "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
                },
                {
                    "name": "rotate3d()",
                    "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
                },
                {
                    "name": "rotateX('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the X axis."
                },
                {
                    "name": "rotateY('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the Y axis."
                },
                {
                    "name": "rotateZ('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the Z axis."
                },
                {
                    "name": "scale()",
                    "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
                },
                {
                    "name": "scale3d()",
                    "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
                },
                {
                    "name": "scaleX()",
                    "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
                },
                {
                    "name": "scaleY()",
                    "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
                },
                {
                    "name": "scaleZ()",
                    "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
                },
                {
                    "name": "skew()",
                    "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
                },
                {
                    "name": "skewX()",
                    "description": "Specifies a skew transformation along the X axis by the given angle."
                },
                {
                    "name": "skewY()",
                    "description": "Specifies a skew transformation along the Y axis by the given angle."
                },
                {
                    "name": "translate()",
                    "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
                },
                {
                    "name": "translate3d()",
                    "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
                },
                {
                    "name": "translateX()",
                    "description": "Specifies a translation by the given amount in the X direction."
                },
                {
                    "name": "translateY()",
                    "description": "Specifies a translation by the given amount in the Y direction."
                },
                {
                    "name": "translateZ()",
                    "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
                }
            ],
            "syntax": "none | <transform-list>",
            "relevance": 91,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/transform"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "transform-origin",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C36",
                "CA36",
                "IE10",
                "O23"
            ],
            "syntax": "[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?",
            "relevance": 76,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/transform-origin"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Establishes the origin of transformation for an element.",
            "restrictions": [
                "position",
                "length",
                "percentage"
            ]
        },
        {
            "name": "transform-style",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C36",
                "CA36",
                "O23"
            ],
            "values": [
                {
                    "name": "flat",
                    "description": "All children of this element are rendered flattened into the 2D plane of the element."
                },
                {
                    "name": "preserve-3d",
                    "browsers": [
                        "E12",
                        "FF16",
                        "FFA16",
                        "S9",
                        "SM9",
                        "C36",
                        "CA36",
                        "O23"
                    ],
                    "description": "Flattening is not performed, so children maintain their position in 3D space."
                }
            ],
            "syntax": "flat | preserve-3d",
            "relevance": 55,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/transform-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Defines how nested elements are rendered in 3D space.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "transition",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C26",
                "CA26",
                "IE10",
                "O12.1"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "Every property that is able to undergo a transition will do so."
                },
                {
                    "name": "none",
                    "description": "No property will transition."
                }
            ],
            "syntax": "<single-transition>#",
            "relevance": 89,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/transition"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Shorthand property combines four of the transition properties into a single property.",
            "restrictions": [
                "time",
                "property",
                "timing-function",
                "enum"
            ]
        },
        {
            "name": "transition-delay",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C26",
                "CA26",
                "IE10",
                "O12.1"
            ],
            "syntax": "<time>#",
            "relevance": 65,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/transition-delay"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "transition-duration",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C26",
                "CA26",
                "IE10",
                "O12.1"
            ],
            "syntax": "<time>#",
            "relevance": 70,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/transition-duration"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Specifies how long the transition from the old value to the new value should take.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "transition-property",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C26",
                "CA26",
                "IE10",
                "O12.1"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "Every property that is able to undergo a transition will do so."
                },
                {
                    "name": "none",
                    "description": "No property will transition."
                }
            ],
            "syntax": "none | <single-transition-property>#",
            "relevance": 69,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/transition-property"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Specifies the name of the CSS property to which the transition is applied.",
            "restrictions": [
                "property"
            ]
        },
        {
            "name": "transition-timing-function",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C26",
                "CA26",
                "IE10",
                "O12.1"
            ],
            "syntax": "<easing-function>#",
            "relevance": 68,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/transition-timing-function"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Describes how the intermediate values used during a transition will be calculated.",
            "restrictions": [
                "timing-function"
            ]
        },
        {
            "name": "unicode-bidi",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1.3",
                "SM1",
                "C2",
                "CA18",
                "IE5.5",
                "O9.2"
            ],
            "values": [
                {
                    "name": "bidi-override",
                    "description": "Inside the element, reordering is strictly in sequence according to the 'direction' property; the implicit part of the bidirectional algorithm is ignored."
                },
                {
                    "name": "embed",
                    "description": "If the element is inline-level, this value opens an additional level of embedding with respect to the bidirectional algorithm. The direction of this embedding level is given by the 'direction' property."
                },
                {
                    "name": "isolate",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1.3",
                        "SM1",
                        "C2",
                        "CA18",
                        "IE5.5",
                        "O9.2"
                    ],
                    "description": "The contents of the element are considered to be inside a separate, independent paragraph."
                },
                {
                    "name": "isolate-override",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1.3",
                        "SM1",
                        "C2",
                        "CA18",
                        "IE5.5",
                        "O9.2"
                    ],
                    "description": "This combines the isolation behavior of 'isolate' with the directional override behavior of 'bidi-override'"
                },
                {
                    "name": "normal",
                    "description": "The element does not open an additional level of embedding with respect to the bidirectional algorithm. For inline-level elements, implicit reordering works across element boundaries."
                },
                {
                    "name": "plaintext",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1.3",
                        "SM1",
                        "C2",
                        "CA18",
                        "IE5.5",
                        "O9.2"
                    ],
                    "description": "For the purposes of the Unicode bidirectional algorithm, the base directionality of each bidi paragraph for which the element forms the containing block is determined not by the element's computed 'direction'."
                }
            ],
            "syntax": "normal | embed | isolate | bidi-override | isolate-override | plaintext",
            "relevance": 56,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/unicode-bidi"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "The level of embedding with respect to the bidirectional algorithm.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "unicode-range",
            "values": [
                {
                    "name": "U+26",
                    "description": "Ampersand."
                },
                {
                    "name": "U+20-24F, U+2B0-2FF, U+370-4FF, U+1E00-1EFF, U+2000-20CF, U+2100-23FF, U+2500-26FF, U+E000-F8FF, U+FB00-FB4F",
                    "description": "WGL4 character set (Pan-European)."
                },
                {
                    "name": "U+20-17F, U+2B0-2FF, U+2000-206F, U+20A0-20CF, U+2100-21FF, U+2600-26FF",
                    "description": "The Multilingual European Subset No. 1. Latin. Covers ~44 languages."
                },
                {
                    "name": "U+20-2FF, U+370-4FF, U+1E00-20CF, U+2100-23FF, U+2500-26FF, U+FB00-FB4F, U+FFF0-FFFD",
                    "description": "The Multilingual European Subset No. 2. Latin, Greek, and Cyrillic. Covers ~128 language."
                },
                {
                    "name": "U+20-4FF, U+530-58F, U+10D0-10FF, U+1E00-23FF, U+2440-245F, U+2500-26FF, U+FB00-FB4F, U+FE20-FE2F, U+FFF0-FFFD",
                    "description": "The Multilingual European Subset No. 3. Covers all characters belonging to European scripts."
                },
                {
                    "name": "U+00-7F",
                    "description": "Basic Latin (ASCII)."
                },
                {
                    "name": "U+80-FF",
                    "description": "Latin-1 Supplement. Accented characters for Western European languages, common punctuation characters, multiplication and division signs."
                },
                {
                    "name": "U+100-17F",
                    "description": "Latin Extended-A. Accented characters for for Czech, Dutch, Polish, and Turkish."
                },
                {
                    "name": "U+180-24F",
                    "description": "Latin Extended-B. Croatian, Slovenian, Romanian, Non-European and historic latin, Khoisan, Pinyin, Livonian, Sinology."
                },
                {
                    "name": "U+1E00-1EFF",
                    "description": "Latin Extended Additional. Vietnamese, German captial sharp s, Medievalist, Latin general use."
                },
                {
                    "name": "U+250-2AF",
                    "description": "International Phonetic Alphabet Extensions."
                },
                {
                    "name": "U+370-3FF",
                    "description": "Greek and Coptic."
                },
                {
                    "name": "U+1F00-1FFF",
                    "description": "Greek Extended. Accented characters for polytonic Greek."
                },
                {
                    "name": "U+400-4FF",
                    "description": "Cyrillic."
                },
                {
                    "name": "U+500-52F",
                    "description": "Cyrillic Supplement. Extra letters for Komi, Khanty, Chukchi, Mordvin, Kurdish, Aleut, Chuvash, Abkhaz, Azerbaijani, and Orok."
                },
                {
                    "name": "U+00-52F, U+1E00-1FFF, U+2200-22FF",
                    "description": "Latin, Greek, Cyrillic, some punctuation and symbols."
                },
                {
                    "name": "U+530-58F",
                    "description": "Armenian."
                },
                {
                    "name": "U+590-5FF",
                    "description": "Hebrew."
                },
                {
                    "name": "U+600-6FF",
                    "description": "Arabic."
                },
                {
                    "name": "U+750-77F",
                    "description": "Arabic Supplement. Additional letters for African languages, Khowar, Torwali, Burushaski, and early Persian."
                },
                {
                    "name": "U+8A0-8FF",
                    "description": "Arabic Extended-A. Additional letters for African languages, European and Central Asian languages, Rohingya, Tamazight, Arwi, and Koranic annotation signs."
                },
                {
                    "name": "U+700-74F",
                    "description": "Syriac."
                },
                {
                    "name": "U+900-97F",
                    "description": "Devanagari."
                },
                {
                    "name": "U+980-9FF",
                    "description": "Bengali."
                },
                {
                    "name": "U+A00-A7F",
                    "description": "Gurmukhi."
                },
                {
                    "name": "U+A80-AFF",
                    "description": "Gujarati."
                },
                {
                    "name": "U+B00-B7F",
                    "description": "Oriya."
                },
                {
                    "name": "U+B80-BFF",
                    "description": "Tamil."
                },
                {
                    "name": "U+C00-C7F",
                    "description": "Telugu."
                },
                {
                    "name": "U+C80-CFF",
                    "description": "Kannada."
                },
                {
                    "name": "U+D00-D7F",
                    "description": "Malayalam."
                },
                {
                    "name": "U+D80-DFF",
                    "description": "Sinhala."
                },
                {
                    "name": "U+118A0-118FF",
                    "description": "Warang Citi."
                },
                {
                    "name": "U+E00-E7F",
                    "description": "Thai."
                },
                {
                    "name": "U+1A20-1AAF",
                    "description": "Tai Tham."
                },
                {
                    "name": "U+AA80-AADF",
                    "description": "Tai Viet."
                },
                {
                    "name": "U+E80-EFF",
                    "description": "Lao."
                },
                {
                    "name": "U+F00-FFF",
                    "description": "Tibetan."
                },
                {
                    "name": "U+1000-109F",
                    "description": "Myanmar (Burmese)."
                },
                {
                    "name": "U+10A0-10FF",
                    "description": "Georgian."
                },
                {
                    "name": "U+1200-137F",
                    "description": "Ethiopic."
                },
                {
                    "name": "U+1380-139F",
                    "description": "Ethiopic Supplement. Extra Syllables for Sebatbeit, and Tonal marks"
                },
                {
                    "name": "U+2D80-2DDF",
                    "description": "Ethiopic Extended. Extra Syllables for Me'en, Blin, and Sebatbeit."
                },
                {
                    "name": "U+AB00-AB2F",
                    "description": "Ethiopic Extended-A. Extra characters for Gamo-Gofa-Dawro, Basketo, and Gumuz."
                },
                {
                    "name": "U+1780-17FF",
                    "description": "Khmer."
                },
                {
                    "name": "U+1800-18AF",
                    "description": "Mongolian."
                },
                {
                    "name": "U+1B80-1BBF",
                    "description": "Sundanese."
                },
                {
                    "name": "U+1CC0-1CCF",
                    "description": "Sundanese Supplement. Punctuation."
                },
                {
                    "name": "U+4E00-9FD5",
                    "description": "CJK (Chinese, Japanese, Korean) Unified Ideographs. Most common ideographs for modern Chinese and Japanese."
                },
                {
                    "name": "U+3400-4DB5",
                    "description": "CJK Unified Ideographs Extension A. Rare ideographs."
                },
                {
                    "name": "U+2F00-2FDF",
                    "description": "Kangxi Radicals."
                },
                {
                    "name": "U+2E80-2EFF",
                    "description": "CJK Radicals Supplement. Alternative forms of Kangxi Radicals."
                },
                {
                    "name": "U+1100-11FF",
                    "description": "Hangul Jamo."
                },
                {
                    "name": "U+AC00-D7AF",
                    "description": "Hangul Syllables."
                },
                {
                    "name": "U+3040-309F",
                    "description": "Hiragana."
                },
                {
                    "name": "U+30A0-30FF",
                    "description": "Katakana."
                },
                {
                    "name": "U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F",
                    "description": "Japanese Kanji, Hiragana and Katakana characters plus Yen/Yuan symbol."
                },
                {
                    "name": "U+A4D0-A4FF",
                    "description": "Lisu."
                },
                {
                    "name": "U+A000-A48F",
                    "description": "Yi Syllables."
                },
                {
                    "name": "U+A490-A4CF",
                    "description": "Yi Radicals."
                },
                {
                    "name": "U+2000-206F",
                    "description": "General Punctuation."
                },
                {
                    "name": "U+3000-303F",
                    "description": "CJK Symbols and Punctuation."
                },
                {
                    "name": "U+2070-209F",
                    "description": "Superscripts and Subscripts."
                },
                {
                    "name": "U+20A0-20CF",
                    "description": "Currency Symbols."
                },
                {
                    "name": "U+2100-214F",
                    "description": "Letterlike Symbols."
                },
                {
                    "name": "U+2150-218F",
                    "description": "Number Forms."
                },
                {
                    "name": "U+2190-21FF",
                    "description": "Arrows."
                },
                {
                    "name": "U+2200-22FF",
                    "description": "Mathematical Operators."
                },
                {
                    "name": "U+2300-23FF",
                    "description": "Miscellaneous Technical."
                },
                {
                    "name": "U+E000-F8FF",
                    "description": "Private Use Area."
                },
                {
                    "name": "U+FB00-FB4F",
                    "description": "Alphabetic Presentation Forms. Ligatures for latin, Armenian, and Hebrew."
                },
                {
                    "name": "U+FB50-FDFF",
                    "description": "Arabic Presentation Forms-A. Contextual forms / ligatures for Persian, Urdu, Sindhi, Central Asian languages, etc, Arabic pedagogical symbols, word ligatures."
                },
                {
                    "name": "U+1F600-1F64F",
                    "description": "Emoji: Emoticons."
                },
                {
                    "name": "U+2600-26FF",
                    "description": "Emoji: Miscellaneous Symbols."
                },
                {
                    "name": "U+1F300-1F5FF",
                    "description": "Emoji: Miscellaneous Symbols and Pictographs."
                },
                {
                    "name": "U+1F900-1F9FF",
                    "description": "Emoji: Supplemental Symbols and Pictographs."
                },
                {
                    "name": "U+1F680-1F6FF",
                    "description": "Emoji: Transport and Map Symbols."
                }
            ],
            "atRule": "@font-face",
            "syntax": "<unicode-range-token>#",
            "relevance": 72,
            "description": "@font-face descriptor. Defines the set of Unicode codepoints that may be supported by the font face for which it is declared.",
            "restrictions": [
                "unicode-range"
            ]
        },
        {
            "name": "user-select",
            "browsers": [
                "E79",
                "FF69",
                "FFA79",
                "C54",
                "CA54",
                "IE10",
                "O41"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "The content of the element must be selected atomically"
                },
                {
                    "name": "auto"
                },
                {
                    "name": "contain",
                    "description": "UAs must not allow a selection which is started in this element to be extended outside of this element."
                },
                {
                    "name": "none",
                    "description": "The UA must not allow selections to be started in this element."
                },
                {
                    "name": "text",
                    "description": "The element imposes no constraint on the selection."
                }
            ],
            "syntax": "auto | text | none | all",
            "relevance": 83,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/user-select"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Controls the appearance of selection.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "vertical-align",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O4"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Align the dominant baseline of the parent box with the equivalent, or heuristically reconstructed, baseline of the element inline box."
                },
                {
                    "name": "baseline",
                    "description": "Align the 'alphabetic' baseline of the element with the 'alphabetic' baseline of the parent element."
                },
                {
                    "name": "bottom",
                    "description": "Align the after edge of the extended inline box with the after-edge of the line box."
                },
                {
                    "name": "middle",
                    "description": "Align the 'middle' baseline of the inline element with the middle baseline of the parent."
                },
                {
                    "name": "sub",
                    "description": "Lower the baseline of the box to the proper position for subscripts of the parent's box. (This value has no effect on the font size of the element's text.)"
                },
                {
                    "name": "super",
                    "description": "Raise the baseline of the box to the proper position for superscripts of the parent's box. (This value has no effect on the font size of the element's text.)"
                },
                {
                    "name": "text-bottom",
                    "description": "Align the bottom of the box with the after-edge of the parent element's font."
                },
                {
                    "name": "text-top",
                    "description": "Align the top of the box with the before-edge of the parent element's font."
                },
                {
                    "name": "top",
                    "description": "Align the before edge of the extended inline box with the before-edge of the line box."
                },
                {
                    "name": "-webkit-baseline-middle",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O4"
                    ]
                }
            ],
            "syntax": "baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>",
            "relevance": 91,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/vertical-align"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Affects the vertical positioning of the inline boxes generated by an inline-level element inside a line box.",
            "restrictions": [
                "percentage",
                "length"
            ]
        },
        {
            "name": "visibility",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O4"
            ],
            "values": [
                {
                    "name": "collapse",
                    "description": "Table-specific. If used on elements other than rows, row groups, columns, or column groups, 'collapse' has the same meaning as 'hidden'."
                },
                {
                    "name": "hidden",
                    "description": "The generated box is invisible (fully transparent, nothing is drawn), but still affects layout."
                },
                {
                    "name": "visible",
                    "description": "The generated box is visible."
                }
            ],
            "syntax": "visible | hidden | collapse",
            "relevance": 88,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/visibility"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies whether the boxes generated by an element are rendered. Invisible boxes still affect layout (set the 'display' property to 'none' to suppress box generation altogether).",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-animation",
            "browsers": [
                "C",
                "S5"
            ],
            "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."
                }
            ],
            "relevance": 50,
            "description": "Shorthand property combines six of the animation properties into a single property.",
            "restrictions": [
                "time",
                "enum",
                "timing-function",
                "identifier",
                "number"
            ]
        },
        {
            "name": "-webkit-animation-delay",
            "browsers": [
                "C",
                "S5"
            ],
            "relevance": 50,
            "description": "Defines when the animation will start.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "-webkit-animation-direction",
            "browsers": [
                "C",
                "S5"
            ],
            "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": "normal",
                    "description": "Normal playback."
                },
                {
                    "name": "reverse",
                    "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
                }
            ],
            "relevance": 50,
            "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-animation-duration",
            "browsers": [
                "C",
                "S5"
            ],
            "relevance": 50,
            "description": "Defines the length of time that an animation takes to complete one cycle.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "-webkit-animation-fill-mode",
            "browsers": [
                "C",
                "S5"
            ],
            "values": [
                {
                    "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": "none",
                    "description": "There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."
                }
            ],
            "relevance": 50,
            "description": "Defines what values are applied by the animation outside the time it is executing.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-animation-iteration-count",
            "browsers": [
                "C",
                "S5"
            ],
            "values": [
                {
                    "name": "infinite",
                    "description": "Causes the animation to repeat forever."
                }
            ],
            "relevance": 50,
            "description": "Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",
            "restrictions": [
                "number",
                "enum"
            ]
        },
        {
            "name": "-webkit-animation-name",
            "browsers": [
                "C",
                "S5"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No animation is performed"
                }
            ],
            "relevance": 50,
            "description": "Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",
            "restrictions": [
                "identifier",
                "enum"
            ]
        },
        {
            "name": "-webkit-animation-play-state",
            "browsers": [
                "C",
                "S5"
            ],
            "values": [
                {
                    "name": "paused",
                    "description": "A running animation will be paused."
                },
                {
                    "name": "running",
                    "description": "Resume playback of a paused animation."
                }
            ],
            "relevance": 50,
            "description": "Defines whether the animation is running or paused.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-animation-timing-function",
            "browsers": [
                "C",
                "S5"
            ],
            "relevance": 50,
            "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
            "restrictions": [
                "timing-function"
            ]
        },
        {
            "name": "-webkit-appearance",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "button"
                },
                {
                    "name": "button-bevel"
                },
                {
                    "name": "caps-lock-indicator"
                },
                {
                    "name": "caret"
                },
                {
                    "name": "checkbox"
                },
                {
                    "name": "default-button"
                },
                {
                    "name": "listbox"
                },
                {
                    "name": "listitem"
                },
                {
                    "name": "media-fullscreen-button"
                },
                {
                    "name": "media-mute-button"
                },
                {
                    "name": "media-play-button"
                },
                {
                    "name": "media-seek-back-button"
                },
                {
                    "name": "media-seek-forward-button"
                },
                {
                    "name": "media-slider"
                },
                {
                    "name": "media-sliderthumb"
                },
                {
                    "name": "menulist"
                },
                {
                    "name": "menulist-button"
                },
                {
                    "name": "menulist-text"
                },
                {
                    "name": "menulist-textfield"
                },
                {
                    "name": "none"
                },
                {
                    "name": "push-button"
                },
                {
                    "name": "radio"
                },
                {
                    "name": "scrollbarbutton-down"
                },
                {
                    "name": "scrollbarbutton-left"
                },
                {
                    "name": "scrollbarbutton-right"
                },
                {
                    "name": "scrollbarbutton-up"
                },
                {
                    "name": "scrollbargripper-horizontal"
                },
                {
                    "name": "scrollbargripper-vertical"
                },
                {
                    "name": "scrollbarthumb-horizontal"
                },
                {
                    "name": "scrollbarthumb-vertical"
                },
                {
                    "name": "scrollbartrack-horizontal"
                },
                {
                    "name": "scrollbartrack-vertical"
                },
                {
                    "name": "searchfield"
                },
                {
                    "name": "searchfield-cancel-button"
                },
                {
                    "name": "searchfield-decoration"
                },
                {
                    "name": "searchfield-results-button"
                },
                {
                    "name": "searchfield-results-decoration"
                },
                {
                    "name": "slider-horizontal"
                },
                {
                    "name": "sliderthumb-horizontal"
                },
                {
                    "name": "sliderthumb-vertical"
                },
                {
                    "name": "slider-vertical"
                },
                {
                    "name": "square-button"
                },
                {
                    "name": "textarea"
                },
                {
                    "name": "textfield"
                }
            ],
            "status": "nonstandard",
            "syntax": "none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button",
            "relevance": 0,
            "description": "Changes the appearance of buttons and other controls to resemble native controls.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-backdrop-filter",
            "browsers": [
                "S9"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No filter effects are applied."
                },
                {
                    "name": "blur()",
                    "description": "Applies a Gaussian blur to the input image."
                },
                {
                    "name": "brightness()",
                    "description": "Applies a linear multiplier to input image, making it appear more or less bright."
                },
                {
                    "name": "contrast()",
                    "description": "Adjusts the contrast of the input."
                },
                {
                    "name": "drop-shadow()",
                    "description": "Applies a drop shadow effect to the input image."
                },
                {
                    "name": "grayscale()",
                    "description": "Converts the input image to grayscale."
                },
                {
                    "name": "hue-rotate()",
                    "description": "Applies a hue rotation on the input image. "
                },
                {
                    "name": "invert()",
                    "description": "Inverts the samples in the input image."
                },
                {
                    "name": "opacity()",
                    "description": "Applies transparency to the samples in the input image."
                },
                {
                    "name": "saturate()",
                    "description": "Saturates the input image."
                },
                {
                    "name": "sepia()",
                    "description": "Converts the input image to sepia."
                },
                {
                    "name": "url()",
                    "description": "A filter reference to a <filter> element."
                }
            ],
            "relevance": 50,
            "description": "Applies a filter effect where the first filter in the list takes the element's background image as the input image.",
            "restrictions": [
                "enum",
                "url"
            ]
        },
        {
            "name": "-webkit-backface-visibility",
            "browsers": [
                "C",
                "S5"
            ],
            "values": [
                {
                    "name": "hidden"
                },
                {
                    "name": "visible"
                }
            ],
            "relevance": 50,
            "description": "Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-background-clip",
            "browsers": [
                "C",
                "S3"
            ],
            "relevance": 50,
            "description": "Determines the background painting area.",
            "restrictions": [
                "box"
            ]
        },
        {
            "name": "-webkit-background-composite",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "border"
                },
                {
                    "name": "padding"
                }
            ],
            "relevance": 50,
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-background-origin",
            "browsers": [
                "C",
                "S3"
            ],
            "relevance": 50,
            "description": "For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",
            "restrictions": [
                "box"
            ]
        },
        {
            "name": "-webkit-border-image",
            "browsers": [
                "C",
                "S5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
                },
                {
                    "name": "fill",
                    "description": "Causes the middle part of the border-image to be preserved."
                },
                {
                    "name": "none"
                },
                {
                    "name": "repeat",
                    "description": "The image is tiled (repeated) to fill the area."
                },
                {
                    "name": "round",
                    "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
                },
                {
                    "name": "space",
                    "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
                },
                {
                    "name": "stretch",
                    "description": "The image is stretched to fill the area."
                },
                {
                    "name": "url()"
                }
            ],
            "relevance": 50,
            "description": "Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",
            "restrictions": [
                "length",
                "percentage",
                "number",
                "url",
                "enum"
            ]
        },
        {
            "name": "-webkit-box-align",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "baseline",
                    "description": "If this box orientation is inline-axis or horizontal, all children are placed with their baselines aligned, and extra space placed before or after as necessary. For block flows, the baseline of the first non-empty line box located within the element is used. For tables, the baseline of the first cell is used."
                },
                {
                    "name": "center",
                    "description": "Any extra space is divided evenly, with half placed above the child and the other half placed after the child."
                },
                {
                    "name": "end",
                    "description": "For normal direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element. For reverse direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element."
                },
                {
                    "name": "start",
                    "description": "For normal direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element. For reverse direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element."
                },
                {
                    "name": "stretch",
                    "description": "The height of each child is adjusted to that of the containing block."
                }
            ],
            "relevance": 50,
            "description": "Specifies the alignment of nested elements within an outer flexible box element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-box-direction",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "A box with a computed value of horizontal for box-orient displays its children from left to right. A box with a computed value of vertical displays its children from top to bottom."
                },
                {
                    "name": "reverse",
                    "description": "A box with a computed value of horizontal for box-orient displays its children from right to left. A box with a computed value of vertical displays its children from bottom to top."
                }
            ],
            "relevance": 50,
            "description": "In webkit applications, -webkit-box-direction specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge).",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-box-flex",
            "browsers": [
                "C",
                "S3"
            ],
            "relevance": 50,
            "description": "Specifies an element's flexibility.",
            "restrictions": [
                "number"
            ]
        },
        {
            "name": "-webkit-box-flex-group",
            "browsers": [
                "C",
                "S3"
            ],
            "relevance": 50,
            "description": "Flexible elements can be assigned to flex groups using the 'box-flex-group' property.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-webkit-box-ordinal-group",
            "browsers": [
                "C",
                "S3"
            ],
            "relevance": 50,
            "description": "Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-webkit-box-orient",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "block-axis",
                    "description": "Elements are oriented along the box's axis."
                },
                {
                    "name": "horizontal",
                    "description": "The box displays its children from left to right in a horizontal line."
                },
                {
                    "name": "inline-axis",
                    "description": "Elements are oriented vertically."
                },
                {
                    "name": "vertical",
                    "description": "The box displays its children from stacked from top to bottom vertically."
                }
            ],
            "relevance": 50,
            "description": "In webkit applications, -webkit-box-orient specifies whether a box lays out its contents horizontally or vertically.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-box-pack",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "center",
                    "description": "The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."
                },
                {
                    "name": "end",
                    "description": "For normal direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child. For reverse direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child."
                },
                {
                    "name": "justify",
                    "description": "The space is divided evenly in-between each child, with none of the extra space placed before the first child or after the last child. If there is only one child, treat the pack value as if it were start."
                },
                {
                    "name": "start",
                    "description": "For normal direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child. For reverse direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child."
                }
            ],
            "relevance": 50,
            "description": "Specifies alignment of child elements within the current element in the direction of orientation.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-box-reflect",
            "browsers": [
                "E79",
                "S4",
                "SM3.2",
                "C4",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "above",
                    "description": "The reflection appears above the border box."
                },
                {
                    "name": "below",
                    "description": "The reflection appears below the border box."
                },
                {
                    "name": "left",
                    "description": "The reflection appears to the left of the border box."
                },
                {
                    "name": "right",
                    "description": "The reflection appears to the right of the border box."
                }
            ],
            "status": "nonstandard",
            "syntax": "[ above | below | right | left ]? <length>? <image>?",
            "relevance": 0,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-box-reflect"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Defines a reflection of a border box."
        },
        {
            "name": "-webkit-box-sizing",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "border-box",
                    "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
                },
                {
                    "name": "content-box",
                    "description": "Behavior of width and height as specified by CSS2.1. The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element."
                }
            ],
            "relevance": 50,
            "description": "Box Model addition in CSS3.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-break-after",
            "browsers": [
                "S7"
            ],
            "values": [
                {
                    "name": "always",
                    "description": "Always force a page break before/after the generated box."
                },
                {
                    "name": "auto",
                    "description": "Neither force nor forbid a page/column break before/after the generated box."
                },
                {
                    "name": "avoid",
                    "description": "Avoid a page/column break before/after the generated box."
                },
                {
                    "name": "avoid-column",
                    "description": "Avoid a column break before/after the generated box."
                },
                {
                    "name": "avoid-page",
                    "description": "Avoid a page break before/after the generated box."
                },
                {
                    "name": "avoid-region"
                },
                {
                    "name": "column",
                    "description": "Always force a column break before/after the generated box."
                },
                {
                    "name": "left",
                    "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
                },
                {
                    "name": "page",
                    "description": "Always force a page break before/after the generated box."
                },
                {
                    "name": "region"
                },
                {
                    "name": "right",
                    "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
                }
            ],
            "relevance": 50,
            "description": "Describes the page/column break behavior before the generated box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-break-before",
            "browsers": [
                "S7"
            ],
            "values": [
                {
                    "name": "always",
                    "description": "Always force a page break before/after the generated box."
                },
                {
                    "name": "auto",
                    "description": "Neither force nor forbid a page/column break before/after the generated box."
                },
                {
                    "name": "avoid",
                    "description": "Avoid a page/column break before/after the generated box."
                },
                {
                    "name": "avoid-column",
                    "description": "Avoid a column break before/after the generated box."
                },
                {
                    "name": "avoid-page",
                    "description": "Avoid a page break before/after the generated box."
                },
                {
                    "name": "avoid-region"
                },
                {
                    "name": "column",
                    "description": "Always force a column break before/after the generated box."
                },
                {
                    "name": "left",
                    "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
                },
                {
                    "name": "page",
                    "description": "Always force a page break before/after the generated box."
                },
                {
                    "name": "region"
                },
                {
                    "name": "right",
                    "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
                }
            ],
            "relevance": 50,
            "description": "Describes the page/column break behavior before the generated box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-break-inside",
            "browsers": [
                "S7"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Neither force nor forbid a page/column break inside the generated box."
                },
                {
                    "name": "avoid",
                    "description": "Avoid a page/column break inside the generated box."
                },
                {
                    "name": "avoid-column",
                    "description": "Avoid a column break inside the generated box."
                },
                {
                    "name": "avoid-page",
                    "description": "Avoid a page break inside the generated box."
                },
                {
                    "name": "avoid-region"
                }
            ],
            "relevance": 50,
            "description": "Describes the page/column break behavior inside the generated box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-column-break-after",
            "browsers": [
                "E79",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "always",
                    "description": "Always force a page break before/after the generated box."
                },
                {
                    "name": "auto",
                    "description": "Neither force nor forbid a page/column break before/after the generated box."
                },
                {
                    "name": "avoid",
                    "description": "Avoid a page/column break before/after the generated box."
                },
                {
                    "name": "avoid-column",
                    "description": "Avoid a column break before/after the generated box."
                },
                {
                    "name": "avoid-page",
                    "description": "Avoid a page break before/after the generated box."
                },
                {
                    "name": "avoid-region"
                },
                {
                    "name": "column",
                    "description": "Always force a column break before/after the generated box."
                },
                {
                    "name": "left",
                    "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
                },
                {
                    "name": "page",
                    "description": "Always force a page break before/after the generated box."
                },
                {
                    "name": "region"
                },
                {
                    "name": "right",
                    "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
                }
            ],
            "relevance": 50,
            "baseline": {
                "status": "false"
            },
            "description": "Describes the page/column break behavior before the generated box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-column-break-before",
            "browsers": [
                "E79",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "always",
                    "description": "Always force a page break before/after the generated box."
                },
                {
                    "name": "auto",
                    "description": "Neither force nor forbid a page/column break before/after the generated box."
                },
                {
                    "name": "avoid",
                    "description": "Avoid a page/column break before/after the generated box."
                },
                {
                    "name": "avoid-column",
                    "description": "Avoid a column break before/after the generated box."
                },
                {
                    "name": "avoid-page",
                    "description": "Avoid a page break before/after the generated box."
                },
                {
                    "name": "avoid-region"
                },
                {
                    "name": "column",
                    "description": "Always force a column break before/after the generated box."
                },
                {
                    "name": "left",
                    "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
                },
                {
                    "name": "page",
                    "description": "Always force a page break before/after the generated box."
                },
                {
                    "name": "region"
                },
                {
                    "name": "right",
                    "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
                }
            ],
            "relevance": 50,
            "baseline": {
                "status": "false"
            },
            "description": "Describes the page/column break behavior before the generated box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-column-break-inside",
            "browsers": [
                "E79",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Neither force nor forbid a page/column break inside the generated box."
                },
                {
                    "name": "avoid",
                    "description": "Avoid a page/column break inside the generated box."
                },
                {
                    "name": "avoid-column",
                    "description": "Avoid a column break inside the generated box."
                },
                {
                    "name": "avoid-page",
                    "description": "Avoid a page break inside the generated box."
                },
                {
                    "name": "avoid-region"
                }
            ],
            "relevance": 50,
            "baseline": {
                "status": "false"
            },
            "description": "Describes the page/column break behavior inside the generated box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-column-count",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Determines the number of columns by the 'column-width' property and the element width."
                }
            ],
            "relevance": 50,
            "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "-webkit-column-gap",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "User agent specific and typically equivalent to 1em."
                }
            ],
            "relevance": 50,
            "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-webkit-column-rule",
            "browsers": [
                "C",
                "S3"
            ],
            "relevance": 50,
            "description": "This property is a shorthand for setting 'column-rule-width', 'column-rule-style', and 'column-rule-color' at the same place in the style sheet. Omitted values are set to their initial values.",
            "restrictions": [
                "length",
                "line-width",
                "line-style",
                "color"
            ]
        },
        {
            "name": "-webkit-column-rule-color",
            "browsers": [
                "C",
                "S3"
            ],
            "relevance": 50,
            "description": "Sets the color of the column rule",
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-webkit-column-rule-style",
            "browsers": [
                "C",
                "S3"
            ],
            "relevance": 50,
            "description": "Sets the style of the rule between columns of an element.",
            "restrictions": [
                "line-style"
            ]
        },
        {
            "name": "-webkit-column-rule-width",
            "browsers": [
                "C",
                "S3"
            ],
            "relevance": 50,
            "description": "Sets the width of the rule between columns. Negative values are not allowed.",
            "restrictions": [
                "length",
                "line-width"
            ]
        },
        {
            "name": "-webkit-columns",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The width depends on the values of other properties."
                }
            ],
            "relevance": 50,
            "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
            "restrictions": [
                "length",
                "integer"
            ]
        },
        {
            "name": "-webkit-column-span",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "The element spans across all columns. Content in the normal flow that appears before the element is automatically balanced across all columns before the element appear."
                },
                {
                    "name": "none",
                    "description": "The element does not span multiple columns."
                }
            ],
            "relevance": 50,
            "description": "Describes the page/column break behavior after the generated box.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-column-width",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The width depends on the values of other properties."
                }
            ],
            "relevance": 50,
            "description": "This property describes the width of columns in multicol elements.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-webkit-filter",
            "browsers": [
                "C18",
                "O15",
                "S6"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No filter effects are applied."
                },
                {
                    "name": "blur()",
                    "description": "Applies a Gaussian blur to the input image."
                },
                {
                    "name": "brightness()",
                    "description": "Applies a linear multiplier to input image, making it appear more or less bright."
                },
                {
                    "name": "contrast()",
                    "description": "Adjusts the contrast of the input."
                },
                {
                    "name": "drop-shadow()",
                    "description": "Applies a drop shadow effect to the input image."
                },
                {
                    "name": "grayscale()",
                    "description": "Converts the input image to grayscale."
                },
                {
                    "name": "hue-rotate()",
                    "description": "Applies a hue rotation on the input image. "
                },
                {
                    "name": "invert()",
                    "description": "Inverts the samples in the input image."
                },
                {
                    "name": "opacity()",
                    "description": "Applies transparency to the samples in the input image."
                },
                {
                    "name": "saturate()",
                    "description": "Saturates the input image."
                },
                {
                    "name": "sepia()",
                    "description": "Converts the input image to sepia."
                },
                {
                    "name": "url()",
                    "description": "A filter reference to a <filter> element."
                }
            ],
            "relevance": 50,
            "description": "Processes an element's rendering before it is displayed in the document, by applying one or more filter effects.",
            "restrictions": [
                "enum",
                "url"
            ]
        },
        {
            "name": "-webkit-flow-from",
            "browsers": [
                "S6.1"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "The block container is not a CSS Region."
                }
            ],
            "relevance": 50,
            "description": "Makes a block container a region and associates it with a named flow.",
            "restrictions": [
                "identifier"
            ]
        },
        {
            "name": "-webkit-flow-into",
            "browsers": [
                "S6.1"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "The element is not moved to a named flow and normal CSS processing takes place."
                }
            ],
            "relevance": 50,
            "description": "Places an element or its contents into a named flow.",
            "restrictions": [
                "identifier"
            ]
        },
        {
            "name": "-webkit-font-feature-settings",
            "browsers": [
                "C16"
            ],
            "values": [
                {
                    "name": "\"c2cs\""
                },
                {
                    "name": "\"dlig\""
                },
                {
                    "name": "\"kern\""
                },
                {
                    "name": "\"liga\""
                },
                {
                    "name": "\"lnum\""
                },
                {
                    "name": "\"onum\""
                },
                {
                    "name": "\"smcp\""
                },
                {
                    "name": "\"swsh\""
                },
                {
                    "name": "\"tnum\""
                },
                {
                    "name": "normal",
                    "description": "No change in glyph substitution or positioning occurs."
                },
                {
                    "name": "off"
                },
                {
                    "name": "on"
                }
            ],
            "relevance": 50,
            "description": "This property provides low-level control over OpenType font features. It is intended as a way of providing access to font features that are not widely used but are needed for a particular use case.",
            "restrictions": [
                "string",
                "integer"
            ]
        },
        {
            "name": "-webkit-hyphens",
            "browsers": [
                "S5.1"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
                },
                {
                    "name": "manual",
                    "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
                },
                {
                    "name": "none",
                    "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
                }
            ],
            "relevance": 50,
            "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-line-break",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "after-white-space"
                },
                {
                    "name": "normal"
                }
            ],
            "relevance": 50,
            "description": "Specifies line-breaking rules for CJK (Chinese, Japanese, and Korean) text."
        },
        {
            "name": "-webkit-margin-bottom-collapse",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "collapse"
                },
                {
                    "name": "discard"
                },
                {
                    "name": "separate"
                }
            ],
            "relevance": 50,
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-margin-collapse",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "collapse"
                },
                {
                    "name": "discard"
                },
                {
                    "name": "separate"
                }
            ],
            "relevance": 50,
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-margin-start",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "auto"
                }
            ],
            "relevance": 50,
            "restrictions": [
                "percentage",
                "length"
            ]
        },
        {
            "name": "-webkit-margin-top-collapse",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "collapse"
                },
                {
                    "name": "discard"
                },
                {
                    "name": "separate"
                }
            ],
            "relevance": 50,
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-mask-clip",
            "browsers": [
                "C",
                "O15",
                "S4"
            ],
            "status": "nonstandard",
            "syntax": "[ <coord-box> | no-clip | border | padding | content | text ]#",
            "relevance": 0,
            "description": "Determines the mask painting area, which determines the area that is affected by the mask.",
            "restrictions": [
                "box"
            ]
        },
        {
            "name": "-webkit-mask-image",
            "browsers": [
                "C",
                "O15",
                "S4"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "Counts as a transparent black image layer."
                },
                {
                    "name": "url()",
                    "description": "Reference to a <mask element or to a CSS image."
                }
            ],
            "status": "nonstandard",
            "syntax": "<mask-reference>#",
            "relevance": 0,
            "description": "Sets the mask layer image of an element.",
            "restrictions": [
                "url",
                "image",
                "enum"
            ]
        },
        {
            "name": "-webkit-mask-origin",
            "browsers": [
                "C",
                "O15",
                "S4"
            ],
            "status": "nonstandard",
            "syntax": "[ <coord-box> | border | padding | content ]#",
            "relevance": 0,
            "description": "Specifies the mask positioning area.",
            "restrictions": [
                "box"
            ]
        },
        {
            "name": "-webkit-mask-repeat",
            "browsers": [
                "C",
                "O15",
                "S4"
            ],
            "status": "nonstandard",
            "syntax": "<repeat-style>#",
            "relevance": 0,
            "description": "Specifies how mask layer images are tiled after they have been sized and positioned.",
            "restrictions": [
                "repeat"
            ]
        },
        {
            "name": "-webkit-mask-size",
            "browsers": [
                "C",
                "O15",
                "S4"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Resolved by using the image's intrinsic ratio and the size of the other dimension, or failing that, using the image's intrinsic size, or failing that, treating it as 100%."
                },
                {
                    "name": "contain",
                    "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."
                },
                {
                    "name": "cover",
                    "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."
                }
            ],
            "status": "nonstandard",
            "syntax": "<bg-size>#",
            "relevance": 0,
            "description": "Specifies the size of the mask layer images.",
            "restrictions": [
                "length",
                "percentage",
                "enum"
            ]
        },
        {
            "name": "-webkit-nbsp-mode",
            "browsers": [
                "S4",
                "SM3.2"
            ],
            "values": [
                {
                    "name": "normal"
                },
                {
                    "name": "space"
                }
            ],
            "relevance": 50,
            "baseline": {
                "status": "false"
            },
            "description": "Defines the behavior of nonbreaking spaces within text."
        },
        {
            "name": "-webkit-overflow-scrolling",
            "browsers": [
                "C",
                "S5"
            ],
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "touch"
                }
            ],
            "status": "nonstandard",
            "syntax": "auto | touch",
            "relevance": 0,
            "description": "Specifies whether to use native-style scrolling in an overflow:scroll element."
        },
        {
            "name": "-webkit-padding-start",
            "browsers": [
                "C",
                "S3"
            ],
            "relevance": 50,
            "restrictions": [
                "percentage",
                "length"
            ]
        },
        {
            "name": "-webkit-perspective",
            "browsers": [
                "C",
                "S4"
            ],
            "values": [
                {
                    "name": "none",
                    "description": "No perspective transform is applied."
                }
            ],
            "relevance": 50,
            "description": "Applies the same transform as the perspective(<number>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",
            "restrictions": [
                "length"
            ]
        },
        {
            "name": "-webkit-perspective-origin",
            "browsers": [
                "C",
                "S4"
            ],
            "relevance": 50,
            "description": "Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",
            "restrictions": [
                "position",
                "percentage",
                "length"
            ]
        },
        {
            "name": "-webkit-region-fragment",
            "browsers": [
                "S7"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Content flows as it would in a regular content box."
                },
                {
                    "name": "break",
                    "description": "If the content fits within the CSS Region, then this property has no effect."
                }
            ],
            "relevance": 50,
            "description": "The 'region-fragment' property controls the behavior of the last region associated with a named flow.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-tap-highlight-color",
            "browsers": [
                "E12",
                "SM4",
                "C16",
                "CA18",
                "O15"
            ],
            "status": "nonstandard",
            "syntax": "<color>",
            "relevance": 0,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-tap-highlight-color"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-webkit-text-fill-color",
            "browsers": [
                "E12",
                "FF49",
                "FFA49",
                "S3",
                "SM2",
                "C1",
                "CA18",
                "O15"
            ],
            "syntax": "<color>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2016-09-20",
                "baseline_high_date": "2019-03-20"
            },
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-webkit-text-size-adjust",
            "browsers": [
                "E",
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Renderers must use the default size adjustment when displaying on a small device."
                },
                {
                    "name": "none",
                    "description": "Renderers must not do size adjustment when displaying on a small device."
                }
            ],
            "relevance": 50,
            "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
            "restrictions": [
                "percentage"
            ]
        },
        {
            "name": "-webkit-text-stroke",
            "browsers": [
                "E15",
                "FF49",
                "FFA49",
                "S3",
                "SM2",
                "C4",
                "CA18",
                "O15"
            ],
            "syntax": "<length> || <color>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "restrictions": [
                "length",
                "line-width",
                "color",
                "percentage"
            ]
        },
        {
            "name": "-webkit-text-stroke-color",
            "browsers": [
                "E15",
                "FF49",
                "FFA49",
                "S3",
                "SM2",
                "C1",
                "CA18",
                "O15"
            ],
            "syntax": "<color>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "restrictions": [
                "color"
            ]
        },
        {
            "name": "-webkit-text-stroke-width",
            "browsers": [
                "E15",
                "FF49",
                "FFA49",
                "S3",
                "SM2",
                "C1",
                "CA18",
                "O15"
            ],
            "syntax": "<length>",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-04-05",
                "baseline_high_date": "2019-10-05"
            },
            "restrictions": [
                "length",
                "line-width",
                "percentage"
            ]
        },
        {
            "name": "-webkit-touch-callout",
            "browsers": [
                "SM2"
            ],
            "values": [
                {
                    "name": "none"
                }
            ],
            "status": "nonstandard",
            "syntax": "default | none",
            "relevance": 0,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-touch-callout"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-transform",
            "browsers": [
                "C",
                "O12",
                "S3.1"
            ],
            "values": [
                {
                    "name": "matrix()",
                    "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
                },
                {
                    "name": "matrix3d()",
                    "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
                },
                {
                    "name": "none"
                },
                {
                    "name": "perspective()",
                    "description": "Specifies a perspective projection matrix."
                },
                {
                    "name": "rotate()",
                    "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
                },
                {
                    "name": "rotate3d()",
                    "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
                },
                {
                    "name": "rotateX('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the X axis."
                },
                {
                    "name": "rotateY('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the Y axis."
                },
                {
                    "name": "rotateZ('angle')",
                    "description": "Specifies a clockwise rotation by the given angle about the Z axis."
                },
                {
                    "name": "scale()",
                    "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
                },
                {
                    "name": "scale3d()",
                    "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
                },
                {
                    "name": "scaleX()",
                    "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
                },
                {
                    "name": "scaleY()",
                    "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
                },
                {
                    "name": "scaleZ()",
                    "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
                },
                {
                    "name": "skew()",
                    "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
                },
                {
                    "name": "skewX()",
                    "description": "Specifies a skew transformation along the X axis by the given angle."
                },
                {
                    "name": "skewY()",
                    "description": "Specifies a skew transformation along the Y axis by the given angle."
                },
                {
                    "name": "translate()",
                    "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
                },
                {
                    "name": "translate3d()",
                    "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
                },
                {
                    "name": "translateX()",
                    "description": "Specifies a translation by the given amount in the X direction."
                },
                {
                    "name": "translateY()",
                    "description": "Specifies a translation by the given amount in the Y direction."
                },
                {
                    "name": "translateZ()",
                    "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
                }
            ],
            "relevance": 50,
            "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-transform-origin",
            "browsers": [
                "C",
                "O15",
                "S3.1"
            ],
            "relevance": 50,
            "description": "Establishes the origin of transformation for an element.",
            "restrictions": [
                "position",
                "length",
                "percentage"
            ]
        },
        {
            "name": "-webkit-transform-origin-x",
            "browsers": [
                "E79",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "relevance": 50,
            "baseline": {
                "status": "false"
            },
            "description": "The x coordinate of the origin for transforms applied to an element with respect to its border box.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "-webkit-transform-origin-y",
            "browsers": [
                "E79",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "relevance": 50,
            "baseline": {
                "status": "false"
            },
            "description": "The y coordinate of the origin for transforms applied to an element with respect to its border box.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "-webkit-transform-origin-z",
            "browsers": [
                "E79",
                "S4",
                "SM3.2",
                "C2",
                "CA18",
                "O15"
            ],
            "relevance": 50,
            "baseline": {
                "status": "false"
            },
            "description": "The z coordinate of the origin for transforms applied to an element with respect to its border box.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "-webkit-transform-style",
            "browsers": [
                "C",
                "S4"
            ],
            "values": [
                {
                    "name": "flat",
                    "description": "All children of this element are rendered flattened into the 2D plane of the element."
                }
            ],
            "relevance": 50,
            "description": "Defines how nested elements are rendered in 3D space.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-transition",
            "browsers": [
                "C",
                "O12",
                "S5"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "Every property that is able to undergo a transition will do so."
                },
                {
                    "name": "none",
                    "description": "No property will transition."
                }
            ],
            "relevance": 50,
            "description": "Shorthand property combines four of the transition properties into a single property.",
            "restrictions": [
                "time",
                "property",
                "timing-function",
                "enum"
            ]
        },
        {
            "name": "-webkit-transition-delay",
            "browsers": [
                "C",
                "O12",
                "S5"
            ],
            "relevance": 50,
            "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "-webkit-transition-duration",
            "browsers": [
                "C",
                "O12",
                "S5"
            ],
            "relevance": 50,
            "description": "Specifies how long the transition from the old value to the new value should take.",
            "restrictions": [
                "time"
            ]
        },
        {
            "name": "-webkit-transition-property",
            "browsers": [
                "C",
                "O12",
                "S5"
            ],
            "values": [
                {
                    "name": "all",
                    "description": "Every property that is able to undergo a transition will do so."
                },
                {
                    "name": "none",
                    "description": "No property will transition."
                }
            ],
            "relevance": 50,
            "description": "Specifies the name of the CSS property to which the transition is applied.",
            "restrictions": [
                "property"
            ]
        },
        {
            "name": "-webkit-transition-timing-function",
            "browsers": [
                "C",
                "O12",
                "S5"
            ],
            "relevance": 50,
            "description": "Describes how the intermediate values used during a transition will be calculated.",
            "restrictions": [
                "timing-function"
            ]
        },
        {
            "name": "-webkit-user-drag",
            "browsers": [
                "E79",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "element"
                },
                {
                    "name": "none"
                }
            ],
            "relevance": 50,
            "baseline": {
                "status": "false"
            },
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-user-modify",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "read-only"
                },
                {
                    "name": "read-write"
                },
                {
                    "name": "read-write-plaintext-only"
                }
            ],
            "status": "nonstandard",
            "syntax": "read-only | read-write | read-write-plaintext-only",
            "relevance": 0,
            "description": "Determines whether a user can edit the content of an element.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "-webkit-user-select",
            "browsers": [
                "C",
                "S3"
            ],
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "none"
                },
                {
                    "name": "text"
                }
            ],
            "status": "nonstandard",
            "syntax": "auto | text | none | all",
            "relevance": 0,
            "description": "Controls the appearance of selection.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "widows",
            "browsers": [
                "E12",
                "S1.3",
                "SM1",
                "C25",
                "CA25",
                "IE8",
                "O9.2"
            ],
            "syntax": "<integer>",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/widows"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Specifies the minimum number of line boxes of a block container that must be left in a fragment after a break.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "width",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The width depends on the values of other properties."
                },
                {
                    "name": "fit-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O3.5"
                    ],
                    "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
                },
                {
                    "name": "max-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O3.5"
                    ],
                    "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
                },
                {
                    "name": "min-content",
                    "browsers": [
                        "E12",
                        "FF1",
                        "FFA4",
                        "S1",
                        "SM1",
                        "C1",
                        "CA18",
                        "IE4",
                        "O3.5"
                    ],
                    "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
                }
            ],
            "syntax": "auto | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>",
            "relevance": 96,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies the width of the content area, padding area or border area (depending on 'box-sizing') of certain boxes.",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "will-change",
            "browsers": [
                "E79",
                "FF36",
                "FFA36",
                "S9.1",
                "SM9.3",
                "C36",
                "CA36",
                "O23"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "Expresses no particular intent."
                },
                {
                    "name": "contents",
                    "description": "Indicates that the author expects to animate or change something about the element's contents in the near future."
                },
                {
                    "name": "scroll-position",
                    "description": "Indicates that the author expects to animate or change the scroll position of the element in the near future."
                }
            ],
            "syntax": "auto | <animateable-feature>#",
            "relevance": 67,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/will-change"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Provides a rendering hint to the user agent, stating what kinds of changes the author expects to perform on the element.",
            "restrictions": [
                "enum",
                "identifier"
            ]
        },
        {
            "name": "word-break",
            "browsers": [
                "E12",
                "FF15",
                "FFA15",
                "S3",
                "SM2",
                "C1",
                "CA18",
                "IE5.5",
                "O15"
            ],
            "values": [
                {
                    "name": "break-all",
                    "description": "Lines may break between any two grapheme clusters for non-CJK scripts."
                },
                {
                    "name": "keep-all",
                    "description": "Block characters can no longer create implied break points."
                },
                {
                    "name": "normal",
                    "description": "Breaks non-CJK scripts according to their own rules."
                }
            ],
            "syntax": "normal | break-all | keep-all | break-word | auto-phrase",
            "relevance": 77,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/word-break"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies line break opportunities for non-CJK scripts.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "word-spacing",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE6",
                "O3.5"
            ],
            "values": [
                {
                    "name": "normal",
                    "description": "No additional spacing is applied. Computes to zero."
                }
            ],
            "syntax": "normal | <length>",
            "relevance": 56,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/word-spacing"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies additional spacing between \"words\".",
            "restrictions": [
                "length",
                "percentage"
            ]
        },
        {
            "name": "word-wrap",
            "values": [
                {
                    "name": "break-word",
                    "description": "An otherwise unbreakable sequence of characters may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."
                },
                {
                    "name": "normal",
                    "description": "Lines may break only at allowed break points."
                }
            ],
            "syntax": "normal | break-word",
            "relevance": 78,
            "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "writing-mode",
            "browsers": [
                "E12",
                "FF41",
                "FFA41",
                "S10.1",
                "SM10.3",
                "C48",
                "CA48",
                "IE9",
                "O35"
            ],
            "values": [
                {
                    "name": "horizontal-tb",
                    "description": "Top-to-bottom block flow direction. The writing mode is horizontal."
                },
                {
                    "name": "sideways-lr",
                    "browsers": [
                        "E12",
                        "FF41",
                        "FFA41",
                        "S10.1",
                        "SM10.3",
                        "C48",
                        "CA48",
                        "IE9",
                        "O35"
                    ],
                    "description": "Left-to-right block flow direction. The writing mode is vertical, while the typographic mode is horizontal."
                },
                {
                    "name": "sideways-rl",
                    "browsers": [
                        "E12",
                        "FF41",
                        "FFA41",
                        "S10.1",
                        "SM10.3",
                        "C48",
                        "CA48",
                        "IE9",
                        "O35"
                    ],
                    "description": "Right-to-left block flow direction. The writing mode is vertical, while the typographic mode is horizontal."
                },
                {
                    "name": "vertical-lr",
                    "description": "Left-to-right block flow direction. The writing mode is vertical."
                },
                {
                    "name": "vertical-rl",
                    "description": "Right-to-left block flow direction. The writing mode is vertical."
                }
            ],
            "syntax": "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr",
            "relevance": 51,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/writing-mode"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-03-27",
                "baseline_high_date": "2019-09-27"
            },
            "description": "This is a shorthand property for both 'direction' and 'block-progression'.",
            "restrictions": [
                "enum"
            ]
        },
        {
            "name": "z-index",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O4"
            ],
            "values": [
                {
                    "name": "auto",
                    "description": "The stack level of the generated box in the current stacking context is 0. The box does not establish a new stacking context unless it is the root element."
                }
            ],
            "syntax": "auto | <integer>",
            "relevance": 92,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/z-index"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "For a positioned box, the 'z-index' property specifies the stack level of the box in the current stacking context and whether the box establishes a local stacking context.",
            "restrictions": [
                "integer"
            ]
        },
        {
            "name": "zoom",
            "browsers": [
                "E12",
                "FF126",
                "FFA126",
                "S3.1",
                "SM3",
                "C1",
                "CA18",
                "IE5.5",
                "O15"
            ],
            "values": [
                {
                    "name": "normal"
                }
            ],
            "syntax": "normal | reset | <number [0,∞]> || <percentage [0,∞]>",
            "relevance": 66,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/zoom"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-05-14"
            },
            "description": "Non-standard. Specifies the magnification scale of the object. See 'transform: scale()' for a standards-based alternative.",
            "restrictions": [
                "enum",
                "integer",
                "number",
                "percentage"
            ]
        },
        {
            "name": "-ms-ime-align",
            "status": "nonstandard",
            "syntax": "auto | after",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "after"
                }
            ],
            "relevance": 0,
            "description": "Aligns the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active."
        },
        {
            "name": "-moz-binding",
            "status": "nonstandard",
            "syntax": "<url> | none",
            "relevance": 0,
            "description": "The -moz-binding CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element."
        },
        {
            "name": "-moz-context-properties",
            "status": "nonstandard",
            "syntax": "none | [ fill | fill-opacity | stroke | stroke-opacity ]#",
            "relevance": 0,
            "description": "If you reference an SVG image in a webpage (such as with the <img> element or as a background image), the SVG image can coordinate with the embedding element (its context) to have the image adopt property values set on the embedding element. To do this the embedding element needs to list the properties that are to be made available to the image by listing them as values of the -moz-context-properties property, and the image needs to opt in to using those properties by using values such as the context-fill value.\n\nThis feature is available since Firefox 55, but is only currently supported with SVG images loaded via chrome:// or resource:// URLs. To experiment with the feature in SVG on the Web it is necessary to set the svg.context-properties.content.enabled pref to true."
        },
        {
            "name": "-moz-float-edge",
            "status": "obsolete",
            "syntax": "border-box | content-box | margin-box | padding-box",
            "values": [
                {
                    "name": "border-box"
                },
                {
                    "name": "content-box"
                },
                {
                    "name": "margin-box"
                },
                {
                    "name": "padding-box"
                }
            ],
            "relevance": 0,
            "browsers": [
                "FF1",
                "FFA4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The non-standard -moz-float-edge CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness."
        },
        {
            "name": "-moz-force-broken-image-icon",
            "status": "obsolete",
            "syntax": "0 | 1",
            "values": [
                {
                    "name": "0"
                },
                {
                    "name": "1"
                }
            ],
            "relevance": 0,
            "browsers": [
                "FF1",
                "FFA4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-force-broken-image-icon"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The -moz-force-broken-image-icon extended CSS property can be used to force the broken image icon to be shown even when a broken image has an alt attribute."
        },
        {
            "name": "-moz-image-region",
            "status": "nonstandard",
            "syntax": "<shape> | auto",
            "relevance": 0,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "For certain XUL elements and pseudo-elements that use an image from the list-style-image property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance."
        },
        {
            "name": "-moz-orient",
            "status": "nonstandard",
            "syntax": "inline | block | horizontal | vertical",
            "values": [
                {
                    "name": "inline"
                },
                {
                    "name": "block"
                },
                {
                    "name": "horizontal"
                },
                {
                    "name": "vertical"
                }
            ],
            "relevance": 0,
            "browsers": [
                "FF6",
                "FFA6"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-orient"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The -moz-orient CSS property specifies the orientation of the element to which it's applied."
        },
        {
            "name": "-moz-outline-radius",
            "status": "nonstandard",
            "syntax": "<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?",
            "relevance": 0,
            "description": "In Mozilla applications like Firefox, the -moz-outline-radius CSS property can be used to give an element's outline rounded corners."
        },
        {
            "name": "-moz-outline-radius-bottomleft",
            "status": "nonstandard",
            "syntax": "<outline-radius>",
            "relevance": 0,
            "description": "In Mozilla applications, the -moz-outline-radius-bottomleft CSS property can be used to round the bottom-left corner of an element's outline."
        },
        {
            "name": "-moz-outline-radius-bottomright",
            "status": "nonstandard",
            "syntax": "<outline-radius>",
            "relevance": 0,
            "description": "In Mozilla applications, the -moz-outline-radius-bottomright CSS property can be used to round the bottom-right corner of an element's outline."
        },
        {
            "name": "-moz-outline-radius-topleft",
            "status": "nonstandard",
            "syntax": "<outline-radius>",
            "relevance": 0,
            "description": "In Mozilla applications, the -moz-outline-radius-topleft CSS property can be used to round the top-left corner of an element's outline."
        },
        {
            "name": "-moz-outline-radius-topright",
            "status": "nonstandard",
            "syntax": "<outline-radius>",
            "relevance": 0,
            "description": "In Mozilla applications, the -moz-outline-radius-topright CSS property can be used to round the top-right corner of an element's outline."
        },
        {
            "name": "-moz-stack-sizing",
            "status": "nonstandard",
            "syntax": "ignore | stretch-to-fit",
            "values": [
                {
                    "name": "ignore"
                },
                {
                    "name": "stretch-to-fit"
                }
            ],
            "relevance": 0,
            "description": "-moz-stack-sizing is an extended CSS property. Normally, a stack will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible."
        },
        {
            "name": "-moz-text-blink",
            "status": "nonstandard",
            "syntax": "none | blink",
            "values": [
                {
                    "name": "none"
                },
                {
                    "name": "blink"
                }
            ],
            "relevance": 0,
            "description": "The -moz-text-blink non-standard Mozilla CSS extension specifies the blink mode."
        },
        {
            "name": "-moz-user-input",
            "status": "obsolete",
            "syntax": "auto | none | enabled | disabled",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "none"
                },
                {
                    "name": "enabled"
                },
                {
                    "name": "disabled"
                }
            ],
            "relevance": 0,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "In Mozilla applications, -moz-user-input determines if an element will accept user input."
        },
        {
            "name": "-moz-user-modify",
            "status": "nonstandard",
            "syntax": "read-only | read-write | write-only",
            "values": [
                {
                    "name": "read-only"
                },
                {
                    "name": "read-write"
                },
                {
                    "name": "write-only"
                }
            ],
            "relevance": 0,
            "description": "The -moz-user-modify property has no effect. It was originally planned to determine whether or not the content of an element can be edited by a user."
        },
        {
            "name": "-moz-window-dragging",
            "status": "nonstandard",
            "syntax": "drag | no-drag",
            "values": [
                {
                    "name": "drag"
                },
                {
                    "name": "no-drag"
                }
            ],
            "relevance": 0,
            "description": "The -moz-window-dragging CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X."
        },
        {
            "name": "-moz-window-shadow",
            "status": "nonstandard",
            "syntax": "default | menu | tooltip | sheet | none",
            "values": [
                {
                    "name": "default"
                },
                {
                    "name": "menu"
                },
                {
                    "name": "tooltip"
                },
                {
                    "name": "sheet"
                },
                {
                    "name": "none"
                }
            ],
            "relevance": 0,
            "description": "The -moz-window-shadow CSS property specifies whether a window will have a shadow. It only works on Mac OS X."
        },
        {
            "name": "-webkit-border-before",
            "status": "nonstandard",
            "syntax": "<'border-width'> || <'border-style'> || <color>",
            "relevance": 0,
            "browsers": [
                "E79",
                "S5.1",
                "SM5",
                "C8",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-border-before"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The -webkit-border-before CSS property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet."
        },
        {
            "name": "-webkit-border-before-color",
            "status": "nonstandard",
            "syntax": "<color>",
            "relevance": 0,
            "description": "The -webkit-border-before-color CSS property sets the color of the individual logical block start border in a single place in the style sheet."
        },
        {
            "name": "-webkit-border-before-style",
            "status": "nonstandard",
            "syntax": "<'border-style'>",
            "relevance": 0,
            "description": "The -webkit-border-before-style CSS property sets the style of the individual logical block start border in a single place in the style sheet."
        },
        {
            "name": "-webkit-border-before-width",
            "status": "nonstandard",
            "syntax": "<'border-width'>",
            "relevance": 0,
            "description": "The -webkit-border-before-width CSS property sets the width of the individual logical block start border in a single place in the style sheet."
        },
        {
            "name": "-webkit-line-clamp",
            "syntax": "none | <integer>",
            "relevance": 50,
            "description": "The -webkit-line-clamp CSS property allows limiting of the contents of a block container to the specified number of lines."
        },
        {
            "name": "-webkit-mask",
            "status": "nonstandard",
            "syntax": "[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <visual-box> | border | padding | content | text ] || [ <visual-box> | border | padding | content ] ]#",
            "relevance": 0,
            "description": "The mask CSS property alters the visibility of an element by either partially or fully hiding it. This is accomplished by either masking or clipping the image at specific points."
        },
        {
            "name": "-webkit-mask-attachment",
            "status": "nonstandard",
            "syntax": "<attachment>#",
            "relevance": 0,
            "description": "If a -webkit-mask-image is specified, -webkit-mask-attachment determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block."
        },
        {
            "name": "-webkit-mask-composite",
            "status": "nonstandard",
            "syntax": "<composite-style>#",
            "relevance": 0,
            "browsers": [
                "E18",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-composite"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The -webkit-mask-composite property specifies the manner in which multiple mask images applied to the same element are composited with one another. Mask images are composited in the opposite order that they are declared with the -webkit-mask-image property."
        },
        {
            "name": "-webkit-mask-position",
            "status": "nonstandard",
            "syntax": "<position>#",
            "relevance": 0,
            "description": "The mask-position CSS property sets the initial position, relative to the mask position layer defined by mask-origin, for each defined mask image."
        },
        {
            "name": "-webkit-mask-position-x",
            "status": "nonstandard",
            "syntax": "[ <length-percentage> | left | center | right ]#",
            "relevance": 0,
            "browsers": [
                "E18",
                "FF49",
                "FFA49",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-x"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2018-10-02",
                "baseline_high_date": "2021-04-02"
            },
            "description": "The -webkit-mask-position-x CSS property sets the initial horizontal position of a mask image."
        },
        {
            "name": "-webkit-mask-position-y",
            "status": "nonstandard",
            "syntax": "[ <length-percentage> | top | center | bottom ]#",
            "relevance": 0,
            "browsers": [
                "E18",
                "FF49",
                "FFA49",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-y"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2018-10-02",
                "baseline_high_date": "2021-04-02"
            },
            "description": "The -webkit-mask-position-y CSS property sets the initial vertical position of a mask image."
        },
        {
            "name": "-webkit-mask-repeat-x",
            "status": "nonstandard",
            "syntax": "repeat | no-repeat | space | round",
            "values": [
                {
                    "name": "repeat"
                },
                {
                    "name": "no-repeat"
                },
                {
                    "name": "space"
                },
                {
                    "name": "round"
                }
            ],
            "relevance": 0,
            "browsers": [
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-x"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The -webkit-mask-repeat-x property specifies whether and how a mask image is repeated (tiled) horizontally."
        },
        {
            "name": "-webkit-mask-repeat-y",
            "status": "nonstandard",
            "syntax": "repeat | no-repeat | space | round",
            "values": [
                {
                    "name": "repeat"
                },
                {
                    "name": "no-repeat"
                },
                {
                    "name": "space"
                },
                {
                    "name": "round"
                }
            ],
            "relevance": 0,
            "browsers": [
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-y"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The -webkit-mask-repeat-y property specifies whether and how a mask image is repeated (tiled) vertically."
        },
        {
            "name": "accent-color",
            "syntax": "auto | <color>",
            "relevance": 50,
            "browsers": [
                "E93",
                "FF92",
                "FFA92",
                "S15.4",
                "SM15.4",
                "C93",
                "CA93",
                "O79"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/accent-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            },
            "description": "Sets the color of the elements accent"
        },
        {
            "name": "align-tracks",
            "status": "nonstandard",
            "syntax": "[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#",
            "relevance": 0,
            "description": "The align-tracks CSS property sets the alignment in the masonry axis for grid containers that have masonry in their block axis."
        },
        {
            "name": "alignment-baseline",
            "syntax": "baseline | alphabetic | ideographic | middle | central | mathematical | text-before-edge | text-after-edge",
            "values": [
                {
                    "name": "baseline"
                },
                {
                    "name": "alphabetic"
                },
                {
                    "name": "ideographic"
                },
                {
                    "name": "middle"
                },
                {
                    "name": "central"
                },
                {
                    "name": "mathematical"
                },
                {
                    "name": "text-before-edge"
                },
                {
                    "name": "text-after-edge"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E79",
                "S5.1",
                "SM5",
                "C1",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/alignment-baseline"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The alignment-baseline CSS property specifies the specific baseline used to align the box's text and inline-level contents. Baseline alignment is the relationship among the baselines of multiple alignment subjects within an alignment context. When performing baseline alignment, the alignment-baseline property value specifies which baseline of the box is aligned to the corresponding baseline of its alignment context."
        },
        {
            "name": "anchor-name",
            "status": "experimental",
            "syntax": "none | <dashed-ident>#",
            "relevance": 50,
            "browsers": [
                "E125",
                "C125",
                "CA125",
                "O111"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/anchor-name"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The anchor-name property declares that an element is an anchor element, and gives it a list of anchor names to be targeted by."
        },
        {
            "name": "anchor-scope",
            "status": "experimental",
            "syntax": "none | all | <dashed-ident>#",
            "relevance": 50,
            "browsers": [
                "E131",
                "C131",
                "CA131",
                "O116"
            ],
            "baseline": {
                "status": "false"
            },
            "description": "This property scopes the specified anchor names, and lookups for these anchor names, to this element’s subtree"
        },
        {
            "name": "animation-composition",
            "syntax": "<single-animation-composition>#",
            "relevance": 50,
            "browsers": [
                "E112",
                "FF115",
                "FFA115",
                "S16",
                "SM16",
                "C112",
                "CA112",
                "O98"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-composition"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-07-04"
            },
            "description": "The composite operation to use when multiple animations affect the same property."
        },
        {
            "name": "animation-range",
            "status": "experimental",
            "syntax": "[ <'animation-range-start'> <'animation-range-end'>? ]#",
            "relevance": 50,
            "browsers": [
                "E115",
                "C115",
                "CA115",
                "O101"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-range"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The animation-range CSS shorthand property is used to set the start and end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start and end."
        },
        {
            "name": "animation-range-end",
            "status": "experimental",
            "syntax": "[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#",
            "relevance": 50,
            "browsers": [
                "E115",
                "C115",
                "CA115",
                "O101"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-range-end"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The animation-range-end CSS property is used to set the end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will end."
        },
        {
            "name": "animation-range-start",
            "status": "experimental",
            "syntax": "[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#",
            "relevance": 50,
            "browsers": [
                "E115",
                "C115",
                "CA115",
                "O101"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-range-start"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The animation-range-start CSS property is used to set the start of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start."
        },
        {
            "name": "animation-timeline",
            "status": "experimental",
            "syntax": "<single-animation-timeline>#",
            "relevance": 50,
            "browsers": [
                "E115",
                "C115",
                "CA115",
                "O101"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/animation-timeline"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Specifies the names of one or more @scroll-timeline at-rules to describe the element's scroll animations."
        },
        {
            "name": "appearance",
            "syntax": "none | auto | textfield | menulist-button | <compat-auto>",
            "relevance": 73,
            "browsers": [
                "E84",
                "FF80",
                "FFA80",
                "S15.4",
                "SM15.4",
                "C84",
                "CA84",
                "O70"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/appearance"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            },
            "description": "Changes the appearance of buttons and other controls to resemble native controls."
        },
        {
            "name": "aspect-ratio",
            "syntax": "auto || <ratio>",
            "relevance": 63,
            "browsers": [
                "E88",
                "FF89",
                "FFA89",
                "S15",
                "SM15",
                "C88",
                "CA88",
                "O74"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/aspect-ratio"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The aspect-ratio   CSS property sets a preferred aspect ratio for the box, which will be used in the calculation of auto sizes and some other layout functions."
        },
        {
            "name": "backdrop-filter",
            "syntax": "none | <filter-value-list>",
            "relevance": 62,
            "browsers": [
                "E79",
                "FF103",
                "FFA103",
                "S18",
                "SM18",
                "C76",
                "CA76",
                "O63"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/backdrop-filter"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-09-16"
            },
            "description": "The backdrop-filter CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything behind the element, to see the effect you must make the element or its background at least partially transparent."
        },
        {
            "name": "baseline-shift",
            "syntax": "<length-percentage> | sub | super | baseline",
            "relevance": 50,
            "browsers": [
                "E79",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "baseline": {
                "status": "false"
            },
            "description": ""
        },
        {
            "name": "border-block",
            "syntax": "<'border-block-start'>",
            "relevance": 50,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-block"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The border-block CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet."
        },
        {
            "name": "border-block-color",
            "syntax": "<'border-top-color'>{1,2}",
            "relevance": 50,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The border-block-color CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-color and border-bottom-color, or border-right-color and border-left-color property depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "border-block-style",
            "syntax": "<'border-top-style'>{1,2}",
            "relevance": 50,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The border-block-style CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-style and border-bottom-style, or border-left-style and border-right-style properties depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "border-block-width",
            "syntax": "<'border-top-width'>{1,2}",
            "relevance": 50,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The border-block-width CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-width and border-bottom-width, or border-left-width, and border-right-width property depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "border-end-end-radius",
            "syntax": "<'border-top-left-radius'>",
            "relevance": 55,
            "browsers": [
                "E89",
                "FF66",
                "FFA66",
                "S15",
                "SM15",
                "C89",
                "CA89",
                "O75"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The border-end-end-radius CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on on the element's writing-mode, direction, and text-orientation."
        },
        {
            "name": "border-end-start-radius",
            "syntax": "<'border-top-left-radius'>",
            "relevance": 55,
            "browsers": [
                "E89",
                "FF66",
                "FFA66",
                "S15",
                "SM15",
                "C89",
                "CA89",
                "O75"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The border-end-start-radius CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's writing-mode, direction, and text-orientation."
        },
        {
            "name": "border-inline",
            "syntax": "<'border-block-start'>",
            "relevance": 50,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The border-inline CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet."
        },
        {
            "name": "border-inline-color",
            "syntax": "<'border-top-color'>{1,2}",
            "relevance": 50,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The border-inline-color CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-color and border-bottom-color, or border-right-color and border-left-color property depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "border-inline-style",
            "syntax": "<'border-top-style'>{1,2}",
            "relevance": 50,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The border-inline-style CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-style and border-bottom-style, or border-left-style and border-right-style properties depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "border-inline-width",
            "syntax": "<'border-top-width'>{1,2}",
            "relevance": 50,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-width"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The border-inline-width CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-width and border-bottom-width, or border-left-width, and border-right-width property depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "border-start-end-radius",
            "syntax": "<'border-top-left-radius'>",
            "relevance": 55,
            "browsers": [
                "E89",
                "FF66",
                "FFA66",
                "S15",
                "SM15",
                "C89",
                "CA89",
                "O75"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The border-start-end-radius CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's writing-mode, direction, and text-orientation."
        },
        {
            "name": "border-start-start-radius",
            "syntax": "<'border-top-left-radius'>",
            "relevance": 55,
            "browsers": [
                "E89",
                "FF66",
                "FFA66",
                "S15",
                "SM15",
                "C89",
                "CA89",
                "O75"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The border-start-start-radius CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's writing-mode, direction, and text-orientation."
        },
        {
            "name": "box-align",
            "status": "obsolete",
            "syntax": "start | center | end | baseline | stretch",
            "values": [
                {
                    "name": "start"
                },
                {
                    "name": "center"
                },
                {
                    "name": "end"
                },
                {
                    "name": "baseline"
                },
                {
                    "name": "stretch"
                }
            ],
            "relevance": 0,
            "browsers": [
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/box-align"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The box-align CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box."
        },
        {
            "name": "box-direction",
            "status": "obsolete",
            "syntax": "normal | reverse | inherit",
            "values": [
                {
                    "name": "normal"
                },
                {
                    "name": "reverse"
                },
                {
                    "name": "inherit"
                }
            ],
            "relevance": 0,
            "browsers": [
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/box-direction"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The box-direction CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge)."
        },
        {
            "name": "box-flex",
            "status": "obsolete",
            "syntax": "<number>",
            "relevance": 0,
            "browsers": [
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/box-flex"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The -moz-box-flex and -webkit-box-flex CSS properties specify how a -moz-box or -webkit-box grows to fill the box that contains it, in the direction of the containing box's layout."
        },
        {
            "name": "box-flex-group",
            "status": "obsolete",
            "syntax": "<integer>",
            "relevance": 0,
            "browsers": [
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/box-flex-group"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The box-flex-group CSS property assigns the flexbox's child elements to a flex group."
        },
        {
            "name": "box-lines",
            "status": "obsolete",
            "syntax": "single | multiple",
            "values": [
                {
                    "name": "single"
                },
                {
                    "name": "multiple"
                }
            ],
            "relevance": 0,
            "browsers": [
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/box-lines"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The box-lines CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes)."
        },
        {
            "name": "box-ordinal-group",
            "status": "obsolete",
            "syntax": "<integer>",
            "relevance": 0,
            "browsers": [
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/box-ordinal-group"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The box-ordinal-group CSS property assigns the flexbox's child elements to an ordinal group."
        },
        {
            "name": "box-orient",
            "status": "obsolete",
            "syntax": "horizontal | vertical | inline-axis | block-axis | inherit",
            "values": [
                {
                    "name": "horizontal"
                },
                {
                    "name": "vertical"
                },
                {
                    "name": "inline-axis"
                },
                {
                    "name": "block-axis"
                },
                {
                    "name": "inherit"
                }
            ],
            "relevance": 0,
            "browsers": [
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/box-orient"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The box-orient CSS property specifies whether an element lays out its contents horizontally or vertically."
        },
        {
            "name": "box-pack",
            "status": "obsolete",
            "syntax": "start | center | end | justify",
            "values": [
                {
                    "name": "start"
                },
                {
                    "name": "center"
                },
                {
                    "name": "end"
                },
                {
                    "name": "justify"
                }
            ],
            "relevance": 0,
            "browsers": [
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/box-pack"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The -moz-box-pack and -webkit-box-pack CSS properties specify how a -moz-box or -webkit-box packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box."
        },
        {
            "name": "caret",
            "syntax": "<'caret-color'> || <'caret-shape'>",
            "relevance": 50,
            "description": "Shorthand for setting caret-color and caret-shape."
        },
        {
            "name": "caret-shape",
            "syntax": "auto | bar | block | underscore",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "bar"
                },
                {
                    "name": "block"
                },
                {
                    "name": "underscore"
                }
            ],
            "relevance": 50,
            "description": "Specifies the desired shape of the text insertion caret."
        },
        {
            "name": "color-scheme",
            "syntax": "normal | [ light | dark | <custom-ident> ]+ && only?",
            "relevance": 58,
            "browsers": [
                "E81",
                "FF96",
                "FFA96",
                "S13",
                "SM13",
                "C81",
                "CA81",
                "O68"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/color-scheme"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-01-11",
                "baseline_high_date": "2024-07-11"
            },
            "description": "The color-scheme CSS property allows an element to indicate which color schemes it can comfortably be rendered in."
        },
        {
            "name": "contain-intrinsic-block-size",
            "syntax": "auto? [ none | <length> ]",
            "relevance": 50,
            "browsers": [
                "E95",
                "FF107",
                "FFA107",
                "S17",
                "SM17",
                "C95",
                "CA95",
                "O81"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-block-size"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-09-18"
            },
            "description": "Block size of an element when the element is subject to size containment."
        },
        {
            "name": "contain-intrinsic-height",
            "syntax": "auto? [ none | <length> ]",
            "relevance": 50,
            "browsers": [
                "E95",
                "FF107",
                "FFA107",
                "S17",
                "SM17",
                "C95",
                "CA95",
                "O81"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-09-18"
            },
            "description": "Height of an element when the element is subject to size containment."
        },
        {
            "name": "contain-intrinsic-inline-size",
            "syntax": "auto? [ none | <length> ]",
            "relevance": 50,
            "browsers": [
                "E95",
                "FF107",
                "FFA107",
                "S17",
                "SM17",
                "C95",
                "CA95",
                "O81"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-inline-size"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-09-18"
            },
            "description": "Inline size of an element when the element is subject to size containment."
        },
        {
            "name": "contain-intrinsic-size",
            "syntax": "[ auto? [ none | <length> ] ]{1,2}",
            "relevance": 50,
            "browsers": [
                "E83",
                "FF107",
                "FFA107",
                "S17",
                "SM17",
                "C83",
                "CA83",
                "O69"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-09-18"
            },
            "description": "Size of an element when the element is subject to size containment."
        },
        {
            "name": "contain-intrinsic-width",
            "syntax": "auto? [ none | <length> ]",
            "relevance": 50,
            "browsers": [
                "E95",
                "FF107",
                "FFA107",
                "S17",
                "SM17",
                "C95",
                "CA95",
                "O81"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-09-18"
            },
            "description": "Width of an element when the element is subject to size containment."
        },
        {
            "name": "container",
            "syntax": "<'container-name'> [ / <'container-type'> ]?",
            "relevance": 53,
            "browsers": [
                "E105",
                "FF110",
                "FFA110",
                "S16",
                "SM16",
                "C105",
                "CA105",
                "O91"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/container"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-02-14"
            },
            "description": "The container shorthand CSS property establishes the element as a query container and specifies the name or name for the containment context used in a container query."
        },
        {
            "name": "container-name",
            "syntax": "none | <custom-ident>+",
            "relevance": 50,
            "browsers": [
                "E105",
                "FF110",
                "FFA110",
                "S16",
                "SM16",
                "C105",
                "CA105",
                "O91"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/container-name"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-02-14"
            },
            "description": "The container-name CSS property specifies a list of query container names used by the @container at-rule in a container query."
        },
        {
            "name": "container-type",
            "syntax": "normal | [ [ size | inline-size ] || scroll-state ]",
            "relevance": 52,
            "browsers": [
                "E105",
                "FF110",
                "FFA110",
                "S16",
                "SM16",
                "C105",
                "CA105",
                "O91"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/container-type"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-02-14"
            },
            "description": "The container-type CSS property is used to define the type of containment used in a container query."
        },
        {
            "name": "content-visibility",
            "syntax": "visible | auto | hidden",
            "values": [
                {
                    "name": "visible"
                },
                {
                    "name": "auto"
                },
                {
                    "name": "hidden"
                }
            ],
            "relevance": 52,
            "browsers": [
                "E85",
                "FF125",
                "FFA125",
                "S18",
                "SM18",
                "C85",
                "CA85",
                "O71"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/content-visibility"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-09-16"
            },
            "description": "Controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed."
        },
        {
            "name": "counter-set",
            "syntax": "[ <counter-name> <integer>? ]+ | none",
            "relevance": 50,
            "browsers": [
                "E85",
                "FF68",
                "FFA68",
                "S17.2",
                "SM17.2",
                "C85",
                "CA85",
                "O71"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/counter-set"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-12-11"
            },
            "description": "The counter-set CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element."
        },
        {
            "name": "cx",
            "syntax": "<length> | <percentage>",
            "relevance": 51,
            "browsers": [
                "E79",
                "FF69",
                "FFA79",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "O30"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/cx"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "The cx CSS property defines the x-axis center point of an SVG circle or ellipse element. If present, it overrides the element's cx attribute."
        },
        {
            "name": "cy",
            "syntax": "<length> | <percentage>",
            "relevance": 51,
            "browsers": [
                "E79",
                "FF69",
                "FFA79",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "O30"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/cy"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "The cy CSS property defines the y-axis center point of an SVG circle or ellipse elements. If present, it overrides the element's cy attribute."
        },
        {
            "name": "d",
            "syntax": "none | path(<string>)",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF97",
                "FFA97",
                "C52",
                "CA52",
                "O39"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/d"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The d CSS property defines a path to be drawn by the SVG path element. If present, it overrides the element's d attribute."
        },
        {
            "name": "dominant-baseline",
            "syntax": "auto | text-bottom | alphabetic | ideographic | middle | central | mathematical | hanging | text-top",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "text-bottom"
                },
                {
                    "name": "alphabetic"
                },
                {
                    "name": "ideographic"
                },
                {
                    "name": "middle"
                },
                {
                    "name": "central"
                },
                {
                    "name": "mathematical"
                },
                {
                    "name": "hanging"
                },
                {
                    "name": "text-top"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E79",
                "FF1",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/dominant-baseline"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The dominant-baseline CSS property specifies the specific baseline used to align the box's text and inline-level contents. It also indicates the default alignment baseline of any boxes participating in baseline alignment in the box's alignment context. If present, it overrides the shape's dominant-baseline attribute."
        },
        {
            "name": "field-sizing",
            "status": "experimental",
            "syntax": "content | fixed",
            "values": [
                {
                    "name": "content"
                },
                {
                    "name": "fixed"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E123",
                "C123",
                "CA123",
                "O109"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/field-sizing"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The field-sizing CSS property enables you to control the sizing behavior of elements that are given a default preferred size, such as form control elements. This property enables you to override the default sizing behavior, allowing form controls to adjust in size to fit their contents."
        },
        {
            "name": "font-optical-sizing",
            "syntax": "auto | none",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "none"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E17",
                "FF62",
                "FFA62",
                "S13.1",
                "SM13.4",
                "C79",
                "CA79",
                "O66"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-03-24",
                "baseline_high_date": "2022-09-24"
            },
            "description": "The font-optical-sizing CSS property allows developers to control whether browsers render text with slightly differing visual representations to optimize viewing at different sizes, or not. This only works for fonts that have an optical size variation axis."
        },
        {
            "name": "font-palette",
            "syntax": "normal | light | dark | <palette-identifier> | <palette-mix()>",
            "relevance": 50,
            "browsers": [
                "E101",
                "FF107",
                "FFA107",
                "S15.4",
                "SM15.4",
                "C101",
                "CA101",
                "O87"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-palette"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2022-11-15"
            },
            "description": "The font-palette CSS property allows specifying one of the many palettes contained in a font that a user agent should use for the font. Users can also override the values in a palette or create a new palette by using the @font-palette-values at-rule."
        },
        {
            "name": "font-smooth",
            "status": "nonstandard",
            "syntax": "auto | never | always | <absolute-size> | <length>",
            "relevance": 0,
            "browsers": [
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-smooth"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The font-smooth CSS property controls the application of anti-aliasing when fonts are rendered."
        },
        {
            "name": "font-synthesis-position",
            "status": "experimental",
            "syntax": "auto | none",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "none"
                }
            ],
            "relevance": 50,
            "browsers": [
                "FF118",
                "FFA118"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-synthesis-position"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The font-synthesis-position CSS property lets you specify whether or not a browser may synthesize the subscript and superscript \"position\" typefaces when they are missing in a font family, while using font-variant-position to set the positions."
        },
        {
            "name": "font-synthesis-small-caps",
            "syntax": "auto | none",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "none"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E97",
                "FF111",
                "FFA111",
                "S16.4",
                "SM16.4",
                "C97",
                "CA97",
                "O83"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-03-27"
            },
            "description": "The font-synthesis-small-caps CSS property lets you specify whether or not the browser may synthesize small-caps typeface when it is missing in a font family. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters."
        },
        {
            "name": "font-synthesis-style",
            "syntax": "auto | none",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "none"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E97",
                "FF111",
                "FFA111",
                "S16.4",
                "SM16.4",
                "C97",
                "CA97",
                "O83"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-03-27"
            },
            "description": "The font-synthesis-style CSS property lets you specify whether or not the browser may synthesize the oblique typeface when it is missing in a font family."
        },
        {
            "name": "font-synthesis-weight",
            "syntax": "auto | none",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "none"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E97",
                "FF111",
                "FFA111",
                "S16.4",
                "SM16.4",
                "C97",
                "CA97",
                "O83"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-03-27"
            },
            "description": "The font-synthesis-weight CSS property lets you specify whether or not the browser may synthesize the bold typeface when it is missing in a font family."
        },
        {
            "name": "font-variant-emoji",
            "syntax": "normal | text | emoji | unicode",
            "values": [
                {
                    "name": "normal"
                },
                {
                    "name": "text"
                },
                {
                    "name": "emoji"
                },
                {
                    "name": "unicode"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E131",
                "C131",
                "CA131",
                "O116"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-emoji"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The font-variant-emoji CSS property specifies the default presentation style for displaying emojis."
        },
        {
            "name": "font-variation-settings",
            "atRule": "@font-face",
            "syntax": "normal | [ <string> <number> ]#",
            "relevance": 57,
            "browsers": [
                "E17",
                "FF62",
                "FFA62",
                "S11",
                "SM11",
                "C62",
                "CA62",
                "O49"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/font-variation-settings"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2018-09-05",
                "baseline_high_date": "2021-03-05"
            },
            "description": "The font-variation-settings CSS property provides low-level control over OpenType or TrueType font variations, by specifying the four letter axis names of the features you want to vary, along with their variation values."
        },
        {
            "name": "forced-color-adjust",
            "syntax": "auto | none | preserve-parent-color",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "none"
                },
                {
                    "name": "preserve-parent-color"
                }
            ],
            "relevance": 59,
            "browsers": [
                "E79",
                "FF113",
                "FFA113",
                "C89",
                "CA89",
                "IE10",
                "O75"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Allows authors to opt certain elements out of forced colors mode. This then restores the control of those values to CSS"
        },
        {
            "name": "gap",
            "syntax": "<'row-gap'> <'column-gap'>?",
            "relevance": 76,
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/gap"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "The gap CSS property is a shorthand property for row-gap and column-gap specifying the gutters between grid rows and columns."
        },
        {
            "name": "hanging-punctuation",
            "syntax": "none | [ first || [ force-end | allow-end ] || last ]",
            "relevance": 50,
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The hanging-punctuation CSS property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box."
        },
        {
            "name": "hyphenate-character",
            "syntax": "auto | <string>",
            "relevance": 50,
            "browsers": [
                "E106",
                "FF98",
                "FFA98",
                "S17",
                "SM17",
                "C106",
                "CA106",
                "O92"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/hyphenate-character"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-09-18"
            },
            "description": "A hyphenate character used at the end of a line."
        },
        {
            "name": "hyphenate-limit-chars",
            "syntax": "[ auto | <integer> ]{1,3}",
            "relevance": 50,
            "browsers": [
                "E109",
                "FF137",
                "FFA137",
                "C109",
                "CA109",
                "O95"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/hyphenate-limit-chars"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The hyphenate-limit-chars CSS property specifies the minimum word length to allow hyphenation of words as well as the minimum number of characters before and after the hyphen."
        },
        {
            "name": "image-resolution",
            "status": "experimental",
            "syntax": "[ from-image || <resolution> ] && snap?",
            "relevance": 50,
            "description": "The image-resolution property specifies the intrinsic resolution of all raster images used in or on the element. It affects both content images (e.g. replaced elements and generated content) and decorative images (such as background-image). The intrinsic resolution of an image is used to determine the image’s intrinsic dimensions."
        },
        {
            "name": "initial-letter",
            "syntax": "normal | [ <number> <integer>? ]",
            "relevance": 50,
            "browsers": [
                "E110",
                "C110",
                "CA110",
                "O96"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/initial-letter"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The initial-letter CSS property specifies styling for dropped, raised, and sunken initial letters."
        },
        {
            "name": "initial-letter-align",
            "status": "experimental",
            "syntax": "[ auto | alphabetic | hanging | ideographic ]",
            "relevance": 50,
            "description": "The initial-letter-align CSS property specifies the alignment of initial letters within a paragraph."
        },
        {
            "name": "inset",
            "syntax": "<'top'>{1,4}",
            "relevance": 64,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/inset"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The inset CSS property defines the logical block and inline start and end offsets of an element, which map to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "inset-block",
            "syntax": "<'top'>{1,2}",
            "relevance": 53,
            "browsers": [
                "E87",
                "FF63",
                "FFA63",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The inset-block CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "inset-block-end",
            "syntax": "<'top'>",
            "relevance": 53,
            "browsers": [
                "E87",
                "FF63",
                "FFA63",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The inset-block-end CSS property defines the logical block end offset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "inset-block-start",
            "syntax": "<'top'>",
            "relevance": 54,
            "browsers": [
                "E87",
                "FF63",
                "FFA63",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The inset-block-start CSS property defines the logical block start offset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "inset-inline",
            "syntax": "<'top'>{1,2}",
            "relevance": 54,
            "browsers": [
                "E87",
                "FF63",
                "FFA63",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The inset-inline CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "inset-inline-end",
            "syntax": "<'top'>",
            "relevance": 55,
            "browsers": [
                "E87",
                "FF63",
                "FFA63",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The inset-inline-end CSS property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "inset-inline-start",
            "syntax": "<'top'>",
            "relevance": 56,
            "browsers": [
                "E87",
                "FF63",
                "FFA63",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The inset-inline-start CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation."
        },
        {
            "name": "interpolate-size",
            "status": "experimental",
            "syntax": "numeric-only | allow-keywords",
            "values": [
                {
                    "name": "numeric-only"
                },
                {
                    "name": "allow-keywords"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E129",
                "C129",
                "CA129",
                "O115"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/interpolate-size"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The interpolate-size CSS property allows you to enable animations and transitions between a <length-percentage> value and an intrinsic size value such as auto, fit-content, or max-content."
        },
        {
            "name": "justify-tracks",
            "status": "nonstandard",
            "syntax": "[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#",
            "relevance": 0,
            "description": "The justify-tracks CSS property sets the alignment in the masonry axis for grid containers that have masonry in their inline axis"
        },
        {
            "name": "line-clamp",
            "syntax": "none | <integer>",
            "relevance": 50,
            "browsers": [
                "S18.2",
                "SM18.2",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/line-clamp"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The line-clamp property allows limiting the contents of a block container to the specified number of lines; remaining content is fragmented away and neither rendered nor measured. Optionally, it also allows inserting content into the last line box to indicate the continuity of truncated/interrupted content."
        },
        {
            "name": "line-height-step",
            "status": "experimental",
            "syntax": "<length>",
            "relevance": 50,
            "browsers": [
                "O47"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/line-height-step"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The line-height-step CSS property defines the step units for line box heights. When the step unit is positive, line box heights are rounded up to the closest multiple of the unit. Negative values are invalid."
        },
        {
            "name": "margin-block",
            "syntax": "<'margin-top'>{1,2}",
            "relevance": 55,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The margin-block CSS property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation."
        },
        {
            "name": "margin-inline",
            "syntax": "<'margin-top'>{1,2}",
            "relevance": 56,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The margin-inline CSS property defines the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation."
        },
        {
            "name": "margin-trim",
            "status": "experimental",
            "syntax": "none | in-flow | all",
            "values": [
                {
                    "name": "none"
                },
                {
                    "name": "in-flow"
                },
                {
                    "name": "all"
                }
            ],
            "relevance": 50,
            "browsers": [
                "S16.4",
                "SM16.4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/margin-trim"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The margin-trim property allows the container to trim the margins of its children where they adjoin the container’s edges."
        },
        {
            "name": "mask",
            "syntax": "<mask-layer>#",
            "relevance": 58,
            "browsers": [
                "E120",
                "FF53",
                "FFA53",
                "S15.4",
                "SM15.4",
                "C120",
                "CA120",
                "O106"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-12-07"
            },
            "description": "The mask CSS property alters the visibility of an element by either partially or fully hiding it. This is accomplished by either masking or clipping the image at specific points."
        },
        {
            "name": "mask-border",
            "syntax": "<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>",
            "relevance": 50,
            "browsers": [
                "S17.2",
                "SM17.2",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-border"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The mask-border CSS property lets you create a mask along the edge of an element's border.\n\nThis property is a shorthand for mask-border-source, mask-border-slice, mask-border-width, mask-border-outset, mask-border-repeat, and mask-border-mode. As with all shorthand properties, any omitted sub-values will be set to their initial value."
        },
        {
            "name": "mask-border-mode",
            "syntax": "luminance | alpha",
            "values": [
                {
                    "name": "luminance"
                },
                {
                    "name": "alpha"
                }
            ],
            "relevance": 50,
            "description": "The mask-border-mode CSS property specifies the blending mode used in a mask border."
        },
        {
            "name": "mask-border-outset",
            "syntax": "[ <length> | <number> ]{1,4}",
            "relevance": 50,
            "browsers": [
                "S17.2",
                "SM17.2",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-border-outset"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The mask-border-outset CSS property specifies the distance by which an element's mask border is set out from its border box."
        },
        {
            "name": "mask-border-repeat",
            "syntax": "[ stretch | repeat | round | space ]{1,2}",
            "relevance": 50,
            "browsers": [
                "S17.2",
                "SM17.2",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The mask-border-repeat CSS property defines how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border."
        },
        {
            "name": "mask-border-slice",
            "syntax": "<number-percentage>{1,4} fill?",
            "relevance": 50,
            "browsers": [
                "S17.2",
                "SM17.2",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-border-slice"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The mask-border-slice CSS property divides the image specified by mask-border-source into regions. These regions are used to form the components of an element's mask border."
        },
        {
            "name": "mask-border-source",
            "syntax": "none | <image>",
            "relevance": 50,
            "browsers": [
                "S17.2",
                "SM17.2",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-border-source"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The mask-border-source CSS property specifies the source image used to create an element's mask border.\n\nThe mask-border-slice property is used to divide the source image into regions, which are then dynamically applied to the final mask border."
        },
        {
            "name": "mask-border-width",
            "syntax": "[ <length-percentage> | <number> | auto ]{1,4}",
            "relevance": 50,
            "browsers": [
                "S17.2",
                "SM17.2",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-border-width"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The mask-border-width CSS property specifies the width of an element's mask border."
        },
        {
            "name": "mask-clip",
            "syntax": "[ <coord-box> | no-clip ]#",
            "relevance": 50,
            "browsers": [
                "E120",
                "FF53",
                "FFA53",
                "S15.4",
                "SM15.4",
                "C120",
                "CA120",
                "O106"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-12-07"
            },
            "description": "The mask-clip CSS property determines the area, which is affected by a mask. The painted content of an element must be restricted to this area."
        },
        {
            "name": "mask-composite",
            "syntax": "<compositing-operator>#",
            "relevance": 53,
            "browsers": [
                "E120",
                "FF53",
                "FFA53",
                "S15.4",
                "SM15.4",
                "C120",
                "CA120",
                "O106"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/mask-composite"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-12-07"
            },
            "description": "The mask-composite CSS property represents a compositing operation used on the current mask layer with the mask layers below it."
        },
        {
            "name": "masonry-auto-flow",
            "status": "nonstandard",
            "syntax": "[ pack | next ] || [ definite-first | ordered ]",
            "relevance": 0,
            "description": "The masonry-auto-flow CSS property modifies how items are placed when using masonry in CSS Grid Layout."
        },
        {
            "name": "math-depth",
            "syntax": "auto-add | add(<integer>) | <integer>",
            "relevance": 50,
            "browsers": [
                "E109",
                "FF117",
                "FFA117",
                "C109",
                "CA109",
                "O95"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/math-depth"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Describe a notion of \"depth\" for each element of a mathematical formula, with respect to the top-level container of that formula."
        },
        {
            "name": "math-shift",
            "status": "experimental",
            "syntax": "normal | compact",
            "values": [
                {
                    "name": "normal"
                },
                {
                    "name": "compact"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E109",
                "C109",
                "CA109",
                "O95"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/math-shift"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Used for positioning superscript during the layout of MathML scripted elements."
        },
        {
            "name": "math-style",
            "syntax": "normal | compact",
            "values": [
                {
                    "name": "normal"
                },
                {
                    "name": "compact"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E109",
                "FF117",
                "FFA117",
                "S14.1",
                "SM14.5",
                "C109",
                "CA109",
                "O95"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/math-style"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-08-29"
            },
            "description": "The math-style property indicates whether MathML equations should render with normal or compact height."
        },
        {
            "name": "max-lines",
            "status": "experimental",
            "syntax": "none | <integer>",
            "relevance": 50,
            "description": "The max-lines property forces a break after a set number of lines"
        },
        {
            "name": "object-view-box",
            "status": "experimental",
            "syntax": "none | <basic-shape-rect>",
            "relevance": 50,
            "browsers": [
                "E104",
                "C104",
                "CA104",
                "O90"
            ],
            "baseline": {
                "status": "false"
            },
            "description": ""
        },
        {
            "name": "offset",
            "syntax": "[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF72",
                "FFA79",
                "S16",
                "SM16",
                "C55",
                "CA55",
                "O42"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/offset"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-09-12",
                "baseline_high_date": "2025-03-12"
            },
            "description": "The offset CSS property is a shorthand property for animating an element along a defined path."
        },
        {
            "name": "offset-anchor",
            "syntax": "auto | <position>",
            "relevance": 50,
            "browsers": [
                "E116",
                "FF72",
                "FFA79",
                "S16",
                "SM16",
                "C116",
                "CA116",
                "O102"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/offset-anchor"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-08-21"
            },
            "description": "Defines an anchor point of the box positioned along the path. The anchor point specifies the point of the box which is to be considered as the point that is moved along the path."
        },
        {
            "name": "offset-distance",
            "syntax": "<length-percentage>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF72",
                "FFA79",
                "S16",
                "SM16",
                "C55",
                "CA55",
                "O42"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/offset-distance"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-09-12",
                "baseline_high_date": "2025-03-12"
            },
            "description": "The offset-distance CSS property specifies a position along an offset-path."
        },
        {
            "name": "offset-path",
            "syntax": "none | <offset-path> || <coord-box>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF72",
                "FFA79",
                "S15.4",
                "SM15.4",
                "C55",
                "CA55",
                "O45"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/offset-path"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            },
            "description": "The offset-path CSS property specifies the offset path where the element gets positioned. The exact element’s position on the offset path is determined by the offset-distance property. An offset path is either a specified path with one or multiple sub-paths or the geometry of a not-styled basic shape. Each shape or path must define an initial position for the computed value of \"0\" for offset-distance and an initial direction which specifies the rotation of the object to the initial position.\n\nIn this specification, a direction (or rotation) of 0 degrees is equivalent to the direction of the positive x-axis in the object’s local coordinate system. In other words, a rotation of 0 degree points to the right side of the UA if the object and its ancestors have no transformation applied."
        },
        {
            "name": "offset-position",
            "syntax": "normal | auto | <position>",
            "relevance": 50,
            "browsers": [
                "E116",
                "FF122",
                "FFA122",
                "S16",
                "SM16",
                "C116",
                "CA116",
                "O102"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/offset-position"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-01-23"
            },
            "description": "Specifies the initial position of the offset path. If position is specified with static, offset-position would be ignored."
        },
        {
            "name": "offset-rotate",
            "syntax": "[ auto | reverse ] || <angle>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF72",
                "FFA79",
                "S16",
                "SM16",
                "C56",
                "CA56",
                "O43"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/offset-rotate"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-09-12",
                "baseline_high_date": "2025-03-12"
            },
            "description": "The offset-rotate CSS property defines the direction of the element while positioning along the offset path."
        },
        {
            "name": "overflow-anchor",
            "syntax": "auto | none",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "none"
                }
            ],
            "relevance": 53,
            "browsers": [
                "E79",
                "FF66",
                "FFA66",
                "Spreview",
                "C56",
                "CA56",
                "O43"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-anchor"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The overflow-anchor CSS property provides a way to opt out browser scroll anchoring behavior which adjusts scroll position to minimize content shifts."
        },
        {
            "name": "overflow-block",
            "syntax": "visible | hidden | clip | scroll | auto",
            "values": [
                {
                    "name": "visible"
                },
                {
                    "name": "hidden"
                },
                {
                    "name": "clip"
                },
                {
                    "name": "scroll"
                },
                {
                    "name": "auto"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E135",
                "FF69",
                "FFA79",
                "C135",
                "CA135"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-block"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The overflow-block CSS media feature can be used to test how the output device handles content that overflows the initial containing block along the block axis."
        },
        {
            "name": "overflow-clip-box",
            "status": "nonstandard",
            "syntax": "padding-box | content-box",
            "values": [
                {
                    "name": "padding-box"
                },
                {
                    "name": "content-box"
                }
            ],
            "relevance": 0,
            "description": "The overflow-clip-box CSS property specifies relative to which box the clipping happens when there is an overflow. It is short hand for the overflow-clip-box-inline and overflow-clip-box-block properties."
        },
        {
            "name": "overflow-clip-margin",
            "syntax": "<visual-box> || <length [0,∞]>",
            "relevance": 50,
            "browsers": [
                "O76"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The overflow-clip-margin CSS property determines how far outside its bounds an element with overflow: clip may be painted before being clipped."
        },
        {
            "name": "overflow-inline",
            "syntax": "visible | hidden | clip | scroll | auto",
            "values": [
                {
                    "name": "visible"
                },
                {
                    "name": "hidden"
                },
                {
                    "name": "clip"
                },
                {
                    "name": "scroll"
                },
                {
                    "name": "auto"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E135",
                "FF69",
                "FFA79",
                "C135",
                "CA135"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-inline"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The overflow-inline CSS media feature can be used to test how the output device handles content that overflows the initial containing block along the inline axis."
        },
        {
            "name": "overlay",
            "status": "experimental",
            "syntax": "none | auto",
            "values": [
                {
                    "name": "none"
                },
                {
                    "name": "auto"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E117",
                "C117",
                "CA117",
                "O103"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overlay"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The overlay CSS property specifies whether an element appearing in the top layer (for example, a shown popover or modal {{htmlelement(\"dialog\")}} element) is actually rendered in the top layer. This property is only relevant within a list of transition-property values, and only if allow-discrete is set as the transition-behavior."
        },
        {
            "name": "overscroll-behavior",
            "syntax": "[ contain | none | auto ]{1,2}",
            "relevance": 50,
            "browsers": [
                "E18",
                "FF59",
                "FFA59",
                "S16",
                "SM16",
                "C63",
                "CA63",
                "O50"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-09-12",
                "baseline_high_date": "2025-03-12"
            },
            "description": "The overscroll-behavior CSS property is shorthand for the overscroll-behavior-x and overscroll-behavior-y properties, which allow you to control the browser's scroll overflow behavior — what happens when the boundary of a scrolling area is reached."
        },
        {
            "name": "overscroll-behavior-block",
            "syntax": "contain | none | auto",
            "values": [
                {
                    "name": "contain"
                },
                {
                    "name": "none"
                },
                {
                    "name": "auto"
                }
            ],
            "relevance": 51,
            "browsers": [
                "E79",
                "FF73",
                "FFA79",
                "S16",
                "SM16",
                "C77",
                "CA77",
                "O64"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-09-12",
                "baseline_high_date": "2025-03-12"
            },
            "description": "The overscroll-behavior-block CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached."
        },
        {
            "name": "overscroll-behavior-inline",
            "syntax": "contain | none | auto",
            "values": [
                {
                    "name": "contain"
                },
                {
                    "name": "none"
                },
                {
                    "name": "auto"
                }
            ],
            "relevance": 51,
            "browsers": [
                "E79",
                "FF73",
                "FFA79",
                "S16",
                "SM16",
                "C77",
                "CA77",
                "O64"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-09-12",
                "baseline_high_date": "2025-03-12"
            },
            "description": "The overscroll-behavior-inline CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached."
        },
        {
            "name": "overscroll-behavior-x",
            "syntax": "contain | none | auto",
            "values": [
                {
                    "name": "contain"
                },
                {
                    "name": "none"
                },
                {
                    "name": "auto"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E18",
                "FF59",
                "FFA59",
                "S16",
                "SM16",
                "C63",
                "CA63",
                "O50"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-09-12",
                "baseline_high_date": "2025-03-12"
            },
            "description": "The overscroll-behavior-x CSS property is allows you to control the browser's scroll overflow behavior — what happens when the boundary of a scrolling area is reached — in the x axis direction."
        },
        {
            "name": "overscroll-behavior-y",
            "syntax": "contain | none | auto",
            "values": [
                {
                    "name": "contain"
                },
                {
                    "name": "none"
                },
                {
                    "name": "auto"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E18",
                "FF59",
                "FFA59",
                "S16",
                "SM16",
                "C63",
                "CA63",
                "O50"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-09-12",
                "baseline_high_date": "2025-03-12"
            },
            "description": "The overscroll-behavior-y CSS property is allows you to control the browser's scroll overflow behavior — what happens when the boundary of a scrolling area is reached — in the y axis direction."
        },
        {
            "name": "padding-block",
            "syntax": "<'padding-top'>{1,2}",
            "relevance": 57,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The padding-block CSS property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation."
        },
        {
            "name": "padding-inline",
            "syntax": "<'padding-top'>{1,2}",
            "relevance": 58,
            "browsers": [
                "E87",
                "FF66",
                "FFA66",
                "S14.1",
                "SM14.5",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The padding-inline CSS property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation."
        },
        {
            "name": "page",
            "syntax": "auto | <custom-ident>",
            "relevance": 50,
            "browsers": [
                "E85",
                "FF110",
                "FFA110",
                "S1",
                "SM1",
                "C85",
                "CA85",
                "O71"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/page"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-02-14"
            },
            "description": "The page CSS property is used to specify the named page, a specific type of page defined by the @page at-rule."
        },
        {
            "name": "place-content",
            "syntax": "<'align-content'> <'justify-content'>?",
            "relevance": 56,
            "browsers": [
                "E79",
                "FF45",
                "FFA45",
                "S9",
                "SM9",
                "C59",
                "CA59",
                "O46"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/place-content"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The place-content CSS shorthand property sets both the align-content and justify-content properties."
        },
        {
            "name": "place-items",
            "syntax": "<'align-items'> <'justify-items'>?",
            "relevance": 56,
            "browsers": [
                "E79",
                "FF45",
                "FFA45",
                "S11",
                "SM11",
                "C59",
                "CA59",
                "O46"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/place-items"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The CSS place-items shorthand property sets both the align-items and justify-items properties. The first value is the align-items property value, the second the justify-items one. If the second value is not present, the first value is also used for it."
        },
        {
            "name": "place-self",
            "syntax": "<'align-self'> <'justify-self'>?",
            "relevance": 51,
            "browsers": [
                "E79",
                "FF45",
                "FFA45",
                "S11",
                "SM11",
                "C59",
                "CA59",
                "O46"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/place-self"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The place-self CSS property is a shorthand property sets both the align-self and justify-self properties. The first value is the align-self property value, the second the justify-self one. If the second value is not present, the first value is also used for it."
        },
        {
            "name": "position-anchor",
            "status": "experimental",
            "syntax": "auto | <anchor-name>",
            "relevance": 50,
            "browsers": [
                "E125",
                "C125",
                "CA125",
                "O111"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/position-anchor"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The position-anchor property defines the default anchor specifier for all anchor functions on the element, allowing multiple elements to use the same set of anchor functions (and position options lists!) while changing which anchor element each is referring to."
        },
        {
            "name": "position-area",
            "status": "experimental",
            "syntax": "none | <position-area>",
            "relevance": 50,
            "browsers": [
                "E129",
                "C129",
                "CA129",
                "O115"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/position-area"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The position-area CSS property enables an anchor-positioned element to be positioned relative to the edges of its associated anchor element by placing the positioned element on one or more tiles of an implicit 3x3 grid, where the anchoring element is the center cell."
        },
        {
            "name": "position-try",
            "status": "experimental",
            "syntax": "<'position-try-order'>? <'position-try-fallbacks'>",
            "relevance": 50,
            "browsers": [
                "E125",
                "C125",
                "CA125",
                "O111"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/position-try"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "This shorthand sets both position-try-options and position-try-order. If <'position-try-order'> is omitted, it’s set to the property’s initial value."
        },
        {
            "name": "position-try-fallbacks",
            "status": "experimental",
            "syntax": "none | [ [<dashed-ident> || <try-tactic>] | <'position-area'> ]#",
            "relevance": 50,
            "browsers": [
                "E128",
                "C128",
                "CA128",
                "O114"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/position-try-fallbacks"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The position-try-fallbacks CSS property enables you to specify a list of one or more alternative position try fallback options for anchor-positioned elements to be placed relative to their associated anchor elements. When the element would otherwise overflow its inset-modified containing block, the browser will try placing the positioned element in these different fallback positions, in the order provided, until it finds a value that stops it from overflowing its container or the viewport."
        },
        {
            "name": "position-try-order",
            "status": "experimental",
            "syntax": "normal | <try-size>",
            "relevance": 50,
            "browsers": [
                "E125",
                "C125",
                "CA125",
                "O111"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/position-try-order"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "This property specifies the order in which the position options list will be tried."
        },
        {
            "name": "position-visibility",
            "status": "experimental",
            "syntax": "always | [ anchors-valid || anchors-visible || no-overflow ]",
            "relevance": 50,
            "browsers": [
                "E125",
                "C125",
                "CA125",
                "O111"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/position-visibility"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "There are times when an element’s anchors are not appropriate for positioning the element with, and it would be better to simply not display the element at all. position-visibility provides several conditions where this could be the case."
        },
        {
            "name": "print-color-adjust",
            "syntax": "economy | exact",
            "values": [
                {
                    "name": "economy"
                },
                {
                    "name": "exact"
                }
            ],
            "relevance": 50,
            "browsers": [
                "FF97",
                "FFA97",
                "S15.4",
                "SM15.4",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/print-color-adjust"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Defines what optimization the user agent is allowed to do when adjusting the appearance for an output device."
        },
        {
            "name": "r",
            "syntax": "<length> | <percentage>",
            "relevance": 52,
            "browsers": [
                "E79",
                "FF69",
                "FFA79",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "O30"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/r"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "The r CSS property defines the radius of a circle. It can only be used with the SVG circle element. If present, it overrides the circle's r attribute."
        },
        {
            "name": "rotate",
            "syntax": "none | <angle> | [ x | y | z | <number>{3} ] && <angle>",
            "relevance": 52,
            "browsers": [
                "E104",
                "FF72",
                "FFA79",
                "S14.1",
                "SM14.5",
                "C104",
                "CA104",
                "O90"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/rotate"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-08-05",
                "baseline_high_date": "2025-02-05"
            },
            "description": "The rotate CSS property allows you to specify rotation transforms individually and independently of the transform property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform value."
        },
        {
            "name": "row-gap",
            "syntax": "normal | <length-percentage>",
            "relevance": 61,
            "browsers": [
                "E16",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C47",
                "CA47",
                "O34"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/row-gap"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2017-10-17",
                "baseline_high_date": "2020-04-17"
            },
            "description": "The row-gap CSS property specifies the gutter between grid rows."
        },
        {
            "name": "ruby-merge",
            "status": "experimental",
            "syntax": "separate | collapse | auto",
            "values": [
                {
                    "name": "separate"
                },
                {
                    "name": "collapse"
                },
                {
                    "name": "auto"
                }
            ],
            "relevance": 50,
            "description": "This property controls how ruby annotation boxes should be rendered when there are more than one in a ruby container box: whether each pair should be kept separate, the annotations should be collapsed and rendered as a group, or the separation should be determined based on the space available."
        },
        {
            "name": "rx",
            "syntax": "<length> | <percentage>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF69",
                "FFA79",
                "C43",
                "CA43",
                "O30"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/rx"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The rx CSS property defines the x-axis, or horizontal, radius of an SVG ellipse and the horizontal curve of the corners of an SVG rect rectangle. If present, it overrides the shape's rx attribute."
        },
        {
            "name": "ry",
            "syntax": "<length> | <percentage>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF69",
                "FFA79",
                "C43",
                "CA43",
                "O30"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/ry"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ry CSS property defines the y-axis, or vertical, radius of an SVG ellipse and the vertical curve of the corners of an SVG rect rectangle. If present, it overrides the shape's ry attribute."
        },
        {
            "name": "scale",
            "syntax": "none | [ <number> | <percentage> ]{1,3}",
            "relevance": 52,
            "browsers": [
                "E104",
                "FF72",
                "FFA79",
                "S14.1",
                "SM14.5",
                "C104",
                "CA104",
                "O90"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scale"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-08-05",
                "baseline_high_date": "2025-02-05"
            },
            "description": "The scale CSS property allows you to specify scale transforms individually and independently of the transform property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform value."
        },
        {
            "name": "scroll-initial-target",
            "status": "experimental",
            "syntax": "none | nearest",
            "values": [
                {
                    "name": "none"
                },
                {
                    "name": "nearest"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E133",
                "C133",
                "CA133",
                "O118"
            ],
            "baseline": {
                "status": "false"
            },
            "description": ""
        },
        {
            "name": "scroll-margin",
            "syntax": "<length>{1,4}",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF90",
                "FFA90",
                "S14.1",
                "SM14.5",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-07-13",
                "baseline_high_date": "2024-01-13"
            },
            "description": "The scroll-margin property is a shorthand property which sets all of the scroll-margin longhands, assigning values much like the margin property does for the margin-* longhands."
        },
        {
            "name": "scroll-margin-block",
            "syntax": "<length>{1,2}",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S15",
                "SM15",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The scroll-margin-block property is a shorthand property which sets the scroll-margin longhands in the block dimension."
        },
        {
            "name": "scroll-margin-block-end",
            "syntax": "<length>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S15",
                "SM15",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The scroll-margin-block-end property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
        },
        {
            "name": "scroll-margin-block-start",
            "syntax": "<length>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S15",
                "SM15",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The scroll-margin-block-start property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
        },
        {
            "name": "scroll-margin-bottom",
            "syntax": "<length>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S14.1",
                "SM14.5",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The scroll-margin-bottom property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
        },
        {
            "name": "scroll-margin-inline",
            "syntax": "<length>{1,2}",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S15",
                "SM15",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The scroll-margin-inline property is a shorthand property which sets the scroll-margin longhands in the inline dimension."
        },
        {
            "name": "scroll-margin-inline-end",
            "syntax": "<length>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S15",
                "SM15",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The scroll-margin-inline-end property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
        },
        {
            "name": "scroll-margin-inline-start",
            "syntax": "<length>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S15",
                "SM15",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The scroll-margin-inline-start property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
        },
        {
            "name": "scroll-margin-left",
            "syntax": "<length>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S14.1",
                "SM14.5",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The scroll-margin-left property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
        },
        {
            "name": "scroll-margin-right",
            "syntax": "<length>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S14.1",
                "SM14.5",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The scroll-margin-right property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
        },
        {
            "name": "scroll-margin-top",
            "syntax": "<length>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S14.1",
                "SM14.5",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The scroll-margin-top property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
        },
        {
            "name": "scroll-padding",
            "syntax": "[ auto | <length-percentage> ]{1,4}",
            "relevance": 53,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S14.1",
                "SM14.5",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The scroll-padding property is a shorthand property which sets all of the scroll-padding longhands, assigning values much like the padding property does for the padding-* longhands."
        },
        {
            "name": "scroll-padding-block",
            "syntax": "[ auto | <length-percentage> ]{1,2}",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S15",
                "SM15",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The scroll-padding-block property is a shorthand property which sets the scroll-padding longhands for the block dimension."
        },
        {
            "name": "scroll-padding-block-end",
            "syntax": "auto | <length-percentage>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S15",
                "SM15",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The scroll-padding-block-end property defines offsets for the end edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
        },
        {
            "name": "scroll-padding-block-start",
            "syntax": "auto | <length-percentage>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S15",
                "SM15",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The scroll-padding-block-start property defines offsets for the start edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
        },
        {
            "name": "scroll-padding-bottom",
            "syntax": "auto | <length-percentage>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S14.1",
                "SM14.5",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The scroll-padding-bottom property defines offsets for the bottom of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
        },
        {
            "name": "scroll-padding-inline",
            "syntax": "[ auto | <length-percentage> ]{1,2}",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S15",
                "SM15",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The scroll-padding-inline property is a shorthand property which sets the scroll-padding longhands for the inline dimension."
        },
        {
            "name": "scroll-padding-inline-end",
            "syntax": "auto | <length-percentage>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S15",
                "SM15",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The scroll-padding-inline-end property defines offsets for the end edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
        },
        {
            "name": "scroll-padding-inline-start",
            "syntax": "auto | <length-percentage>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S15",
                "SM15",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-09-20",
                "baseline_high_date": "2024-03-20"
            },
            "description": "The scroll-padding-inline-start property defines offsets for the start edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
        },
        {
            "name": "scroll-padding-left",
            "syntax": "auto | <length-percentage>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S14.1",
                "SM14.5",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The scroll-padding-left property defines offsets for the left of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
        },
        {
            "name": "scroll-padding-right",
            "syntax": "auto | <length-percentage>",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S14.1",
                "SM14.5",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The scroll-padding-right property defines offsets for the right of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
        },
        {
            "name": "scroll-padding-top",
            "syntax": "auto | <length-percentage>",
            "relevance": 51,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S14.1",
                "SM14.5",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The scroll-padding-top property defines offsets for the top of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
        },
        {
            "name": "scroll-snap-align",
            "syntax": "[ none | start | end | center ]{1,2}",
            "relevance": 54,
            "browsers": [
                "E79",
                "FF68",
                "FFA68",
                "S11",
                "SM11",
                "C69",
                "CA69",
                "O56"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The scroll-snap-align property specifies the box’s snap position as an alignment of its snap area (as the alignment subject) within its snap container’s snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value."
        },
        {
            "name": "scroll-snap-stop",
            "syntax": "normal | always",
            "values": [
                {
                    "name": "normal"
                },
                {
                    "name": "always"
                }
            ],
            "relevance": 51,
            "browsers": [
                "E79",
                "FF103",
                "FFA103",
                "S15",
                "SM15",
                "C75",
                "CA75",
                "O62"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-07-26",
                "baseline_high_date": "2025-01-26"
            },
            "description": "The scroll-snap-stop CSS property defines whether the scroll container is allowed to \"pass over\" possible snap positions."
        },
        {
            "name": "scroll-snap-type-x",
            "status": "obsolete",
            "syntax": "none | mandatory | proximity",
            "values": [
                {
                    "name": "none"
                },
                {
                    "name": "mandatory"
                },
                {
                    "name": "proximity"
                }
            ],
            "relevance": 0,
            "description": "The scroll-snap-type-x CSS property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one.\n\nSpecifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent."
        },
        {
            "name": "scroll-snap-type-y",
            "status": "obsolete",
            "syntax": "none | mandatory | proximity",
            "values": [
                {
                    "name": "none"
                },
                {
                    "name": "mandatory"
                },
                {
                    "name": "proximity"
                }
            ],
            "relevance": 0,
            "description": "The scroll-snap-type-y CSS property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one.\n\nSpecifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent."
        },
        {
            "name": "scroll-timeline",
            "status": "experimental",
            "syntax": "[ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#",
            "relevance": 50,
            "browsers": [
                "E115",
                "C115",
                "CA115",
                "O101"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-timeline"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Defines a name that can be used to identify the source element of a scroll timeline, along with the scrollbar axis that should provide the timeline."
        },
        {
            "name": "scroll-timeline-axis",
            "status": "experimental",
            "syntax": "[ block | inline | x | y ]#",
            "relevance": 50,
            "browsers": [
                "E115",
                "C115",
                "CA115",
                "O101"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-axis"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Specifies the scrollbar that will be used to provide the timeline for a scroll-timeline animation"
        },
        {
            "name": "scroll-timeline-name",
            "status": "experimental",
            "syntax": "[ none | <dashed-ident> ]#",
            "relevance": 50,
            "browsers": [
                "E115",
                "C115",
                "CA115",
                "O101"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-name"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Defines a name that can be used to identify an element as the source of a scroll-timeline."
        },
        {
            "name": "scrollbar-color",
            "syntax": "auto | <color>{2}",
            "relevance": 55,
            "browsers": [
                "E121",
                "FF64",
                "FFA64",
                "C121",
                "CA121",
                "O107"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-color"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The scrollbar-color CSS property sets the color of the scrollbar track and thumb."
        },
        {
            "name": "scrollbar-gutter",
            "syntax": "auto | stable && both-edges?",
            "relevance": 52,
            "browsers": [
                "E94",
                "FF97",
                "FFA97",
                "S18.2",
                "SM18.2",
                "C94",
                "CA94",
                "O80"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-12-11"
            },
            "description": "The scrollbar-gutter CSS property allows authors to reserve space for the scrollbar, preventing unwanted layout changes as the content grows while also avoiding unnecessary visuals when scrolling isn't needed."
        },
        {
            "name": "scrollbar-width",
            "syntax": "auto | thin | none",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "thin"
                },
                {
                    "name": "none"
                }
            ],
            "relevance": 67,
            "browsers": [
                "E121",
                "FF64",
                "FFA64",
                "S18.2",
                "SM18.2",
                "C121",
                "CA121",
                "O107"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-width"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-12-11"
            },
            "description": "The scrollbar-width property allows the author to set the maximum thickness of an element’s scrollbars when they are shown. "
        },
        {
            "name": "speak-as",
            "atRule": "@counter-style",
            "syntax": "auto | bullets | numbers | words | spell-out | <counter-style-name>",
            "relevance": 50,
            "browsers": [
                "S11.1",
                "SM11.3"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/speak-as"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The speak-as descriptor specifies how a counter symbol constructed with a given @counter-style will be represented in the spoken form. For example, an author can specify a counter symbol to be either spoken as its numerical value or just represented with an audio cue."
        },
        {
            "name": "text-box",
            "syntax": "normal | <'text-box-trim'> || <'text-box-edge'>",
            "relevance": 50,
            "browsers": [
                "E133",
                "S18.2",
                "SM18.2",
                "C133",
                "CA133",
                "O118"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-box"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The text-box CSS property is a shorthand that corresponds to the text-box-trim and text-box-edge properties, which together specify the amount of space to trim from the block-start edge and block-end edge of a text element's block container."
        },
        {
            "name": "text-box-edge",
            "syntax": "auto | <text-edge>",
            "relevance": 50,
            "browsers": [
                "E133",
                "S18.2",
                "SM18.2",
                "C133",
                "CA133",
                "O118"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-box-edge"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The text-box-edge CSS property specifies an amount of space to trim from a text element's block container."
        },
        {
            "name": "text-box-trim",
            "syntax": "none | trim-start | trim-end | trim-both",
            "values": [
                {
                    "name": "none"
                },
                {
                    "name": "trim-start"
                },
                {
                    "name": "trim-end"
                },
                {
                    "name": "trim-both"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E133",
                "S18.2",
                "SM18.2",
                "C133",
                "CA133",
                "O118"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-box-trim"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The text-box-trim CSS property specifies which of the over and under edges of text content to trim from a text element's block container."
        },
        {
            "name": "text-combine-upright",
            "syntax": "none | all | [ digits <integer>? ]",
            "relevance": 50,
            "browsers": [
                "E79",
                "FF48",
                "FFA48",
                "S15.4",
                "SM15.4",
                "C48",
                "CA48",
                "IE11",
                "O35"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-combine-upright"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            },
            "description": "The text-combine-upright CSS property specifies the combination of multiple characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes.\n\nThis is used to produce an effect that is known as tate-chū-yoko (縦中横) in Japanese, or as 直書橫向 in Chinese."
        },
        {
            "name": "text-decoration-skip",
            "status": "experimental",
            "syntax": "none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",
            "relevance": 50,
            "browsers": [
                "S12.1",
                "SM12.2",
                "O44"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The text-decoration-skip CSS property specifies what parts of the element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors."
        },
        {
            "name": "text-decoration-skip-ink",
            "syntax": "auto | all | none",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "all"
                },
                {
                    "name": "none"
                }
            ],
            "relevance": 51,
            "browsers": [
                "E79",
                "FF70",
                "FFA79",
                "S15.4",
                "SM15.4",
                "C64",
                "CA64",
                "O50"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            },
            "description": "The text-decoration-skip-ink CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders."
        },
        {
            "name": "text-decoration-thickness",
            "syntax": "auto | from-font | <length> | <percentage> ",
            "relevance": 53,
            "browsers": [
                "E89",
                "FF70",
                "FFA79",
                "S12.1",
                "SM12.2",
                "C89",
                "CA89",
                "O75"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-03-04",
                "baseline_high_date": "2023-09-04"
            },
            "description": "The text-decoration-thickness CSS property sets the thickness, or width, of the decoration line that is used on text in an element, such as a line-through, underline, or overline."
        },
        {
            "name": "text-emphasis",
            "syntax": "<'text-emphasis-style'> || <'text-emphasis-color'>",
            "relevance": 50,
            "browsers": [
                "E99",
                "FF46",
                "FFA46",
                "S7",
                "SM7",
                "C99",
                "CA99",
                "O85"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-03",
                "baseline_high_date": "2024-09-03"
            },
            "description": "The text-emphasis CSS property is a shorthand property for setting text-emphasis-style and text-emphasis-color in one declaration. This property will apply the specified emphasis mark to each character of the element's text, except separator characters, like spaces,  and control characters."
        },
        {
            "name": "text-emphasis-color",
            "syntax": "<color>",
            "relevance": 50,
            "browsers": [
                "E99",
                "FF46",
                "FFA46",
                "S7",
                "SM7",
                "C99",
                "CA99",
                "O85"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-03",
                "baseline_high_date": "2024-09-03"
            },
            "description": "The text-emphasis-color CSS property defines the color used to draw emphasis marks on text being rendered in the HTML document. This value can also be set and reset using the text-emphasis shorthand."
        },
        {
            "name": "text-emphasis-position",
            "syntax": "auto | [ over | under ] && [ right | left ]?",
            "relevance": 50,
            "browsers": [
                "E99",
                "FF46",
                "FFA46",
                "S7",
                "SM7",
                "C99",
                "CA99",
                "O85"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-03",
                "baseline_high_date": "2024-09-03"
            },
            "description": "The text-emphasis-position CSS property describes where emphasis marks are drawn at. The effect of emphasis marks on the line height is the same as for ruby text: if there isn't enough place, the line height is increased."
        },
        {
            "name": "text-emphasis-style",
            "syntax": "none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>",
            "relevance": 50,
            "browsers": [
                "E99",
                "FF46",
                "FFA46",
                "S7",
                "SM7",
                "C99",
                "CA99",
                "O85"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-03",
                "baseline_high_date": "2024-09-03"
            },
            "description": "The text-emphasis-style CSS property defines the type of emphasis used. It can also be set, and reset, using the text-emphasis shorthand."
        },
        {
            "name": "text-size-adjust",
            "status": "experimental",
            "syntax": "none | auto | <percentage>",
            "relevance": 60,
            "browsers": [
                "E79",
                "C54",
                "CA54",
                "O41"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-size-adjust"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The text-size-adjust CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property."
        },
        {
            "name": "text-spacing-trim",
            "status": "experimental",
            "syntax": "space-all | normal | space-first | trim-start",
            "values": [
                {
                    "name": "space-all"
                },
                {
                    "name": "normal"
                },
                {
                    "name": "space-first"
                },
                {
                    "name": "trim-start"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E123",
                "C123",
                "CA123",
                "O109"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-spacing-trim"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The text-spacing-trim CSS property controls the internal spacing set on Chinese/Japanese/Korean (CJK) punctuation characters between adjacent characters (kerning) and at the start or end of text lines."
        },
        {
            "name": "text-underline-offset",
            "syntax": "auto | <length> | <percentage> ",
            "relevance": 53,
            "browsers": [
                "E87",
                "FF70",
                "FFA79",
                "S12.1",
                "SM12.2",
                "C87",
                "CA87",
                "O73"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-11-19",
                "baseline_high_date": "2023-05-19"
            },
            "description": "The text-underline-offset CSS property sets the offset distance of an underline text decoration line (applied using text-decoration) from its original position."
        },
        {
            "name": "text-wrap",
            "syntax": "<'text-wrap-mode'> || <'text-wrap-style'>",
            "relevance": 58,
            "browsers": [
                "E114",
                "FF121",
                "FFA121",
                "S17.4",
                "SM17.4",
                "C114",
                "CA114",
                "O100"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-wrap"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-03-05"
            },
            "description": "The text-wrap CSS property controls how text inside an element is wrapped."
        },
        {
            "name": "text-wrap-mode",
            "syntax": "wrap | nowrap",
            "values": [
                {
                    "name": "wrap"
                },
                {
                    "name": "nowrap"
                }
            ],
            "relevance": 51,
            "browsers": [
                "E130",
                "FF124",
                "FFA124",
                "S17.4",
                "SM17.4",
                "C130",
                "CA130",
                "O115"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-wrap-mode"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-10-17"
            },
            "description": "The text-wrap-mode CSS property controls whether the text inside an element is wrapped. The different values provide alternate ways of wrapping the content of a block element. It can also be set, and reset, using the {{CSSXRef(\"text-wrap\")}} shorthand."
        },
        {
            "name": "text-wrap-style",
            "syntax": "auto | balance | stable | pretty",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "balance"
                },
                {
                    "name": "stable"
                },
                {
                    "name": "pretty"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E130",
                "FF124",
                "FFA124",
                "S17.5",
                "SM17.5",
                "C130",
                "CA130",
                "O115"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/text-wrap-style"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-10-17"
            },
            "description": "The text-wrap-style CSS property controls how text inside an element is wrapped. The different values provide alternate ways of wrapping the content of a block element. It can also be set, and reset, using the {{CSSXRef(\"text-wrap\")}} shorthand."
        },
        {
            "name": "timeline-scope",
            "status": "experimental",
            "syntax": "none | <dashed-ident>#",
            "relevance": 50,
            "browsers": [
                "E116",
                "C116",
                "CA116",
                "O102"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/timeline-scope"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The timeline-scope CSS property modifies the scope of a named animation timeline."
        },
        {
            "name": "transform-box",
            "syntax": "content-box | border-box | fill-box | stroke-box | view-box",
            "values": [
                {
                    "name": "content-box"
                },
                {
                    "name": "border-box"
                },
                {
                    "name": "fill-box"
                },
                {
                    "name": "stroke-box"
                },
                {
                    "name": "view-box"
                }
            ],
            "relevance": 51,
            "browsers": [
                "E79",
                "FF55",
                "FFA55",
                "S11",
                "SM11",
                "C64",
                "CA64",
                "O51"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/transform-box"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The transform-box CSS property defines the layout box to which the transform and transform-origin properties relate."
        },
        {
            "name": "transition-behavior",
            "syntax": "<transition-behavior-value>#",
            "relevance": 50,
            "browsers": [
                "E117",
                "FF129",
                "FFA129",
                "S17.4",
                "SM17.4",
                "C117",
                "CA117",
                "O103"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/transition-behavior"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-08-06"
            },
            "description": "The transition-behavior CSS property specifies whether transitions will be started for properties whose animation behavior is discrete."
        },
        {
            "name": "translate",
            "syntax": "none | <length-percentage> [ <length-percentage> <length>? ]?",
            "relevance": 52,
            "browsers": [
                "E104",
                "FF72",
                "FFA79",
                "S14.1",
                "SM14.5",
                "C104",
                "CA104",
                "O90"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/translate"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-08-05",
                "baseline_high_date": "2025-02-05"
            },
            "description": "The translate CSS property allows you to specify translation transforms individually and independently of the transform property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform value."
        },
        {
            "name": "vector-effect",
            "syntax": "none | non-scaling-stroke | non-scaling-size | non-rotation | fixed-position",
            "values": [
                {
                    "name": "none"
                },
                {
                    "name": "non-scaling-stroke"
                },
                {
                    "name": "non-scaling-size"
                },
                {
                    "name": "non-rotation"
                },
                {
                    "name": "fixed-position"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E79",
                "FF15",
                "FFA15",
                "S5.1",
                "SM5",
                "C6",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/vector-effect"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The vector-effect CSS property suppresses specific transformation effects in SVG, thus permitting effects like a road on a map staying the same width no matter how the map is zoomed, or allowing a diagram key to retain its position and size regardless of other transforms. It can only be used with SVG elements that accept the vector-effect attribute. When used, the CSS value overrides any values of the element's vector-effect attribute."
        },
        {
            "name": "view-timeline",
            "status": "experimental",
            "syntax": "[ <'view-timeline-name'> [ <'view-timeline-axis'> || <'view-timeline-inset'> ]? ]#",
            "relevance": 50,
            "browsers": [
                "E115",
                "C115",
                "CA115",
                "O101"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/view-timeline"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The view-timeline CSS shorthand property is used to define a named view progress timeline, which is progressed through based on the change in visibility of an element (known as the subject) inside a scrollable element (scroller). view-timeline is set on the subject."
        },
        {
            "name": "view-timeline-axis",
            "status": "experimental",
            "syntax": "[ block | inline | x | y ]#",
            "relevance": 50,
            "browsers": [
                "E115",
                "C115",
                "CA115",
                "O101"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/view-timeline-axis"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The view-timeline-axis CSS property is used to specify the scrollbar direction that will be used to provide the timeline for a named view progress timeline animation, which is progressed through based on the change in visibility of an element (known as the subject) inside a scrollable element (scroller). view-timeline-axis is set on the subject. See CSS scroll-driven animations for more details."
        },
        {
            "name": "view-timeline-inset",
            "status": "experimental",
            "syntax": "[ [ auto | <length-percentage> ]{1,2} ]#",
            "relevance": 50,
            "browsers": [
                "E115",
                "C115",
                "CA115",
                "O101"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/view-timeline-inset"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The view-timeline-inset CSS property is used to specify one or two values representing an adjustment to the position of the scrollport (see Scroll container for more details) in which the subject element of a named view progress timeline animation is deemed to be visible. Put another way, this allows you to specify start and/or end inset (or outset) values that offset the position of the timeline."
        },
        {
            "name": "view-timeline-name",
            "status": "experimental",
            "syntax": "[ none | <dashed-ident> ]#",
            "relevance": 50,
            "browsers": [
                "E115",
                "C115",
                "CA115",
                "O101"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/view-timeline-name"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The view-timeline-name CSS property is used to define the name of a named view progress timeline, which is progressed through based on the change in visibility of an element (known as the subject) inside a scrollable element (scroller). view-timeline is set on the subject."
        },
        {
            "name": "view-transition-class",
            "syntax": "none | <custom-ident>+",
            "relevance": 50,
            "browsers": [
                "E125",
                "S18.2",
                "SM18.2",
                "C125",
                "CA125",
                "O111"
            ],
            "baseline": {
                "status": "false"
            },
            "description": ""
        },
        {
            "name": "view-transition-name",
            "syntax": "none | <custom-ident>",
            "relevance": 50,
            "browsers": [
                "E111",
                "S18",
                "SM18",
                "C111",
                "CA111",
                "O97"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/view-transition-name"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The view-transition-name CSS property provides the selected element with a distinct identifying name (a custom-ident) and causes it to participate in a separate view transition from the root view transition — or no view transition if the none value is specified."
        },
        {
            "name": "white-space",
            "syntax": "normal | pre | pre-wrap | pre-line | <'white-space-collapse'> || <'text-wrap-mode'>",
            "relevance": 90,
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE5.5",
                "O4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/white-space"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Specifies how whitespace is handled in an element."
        },
        {
            "name": "white-space-collapse",
            "syntax": "collapse | preserve | preserve-breaks | preserve-spaces | break-spaces",
            "values": [
                {
                    "name": "collapse"
                },
                {
                    "name": "preserve"
                },
                {
                    "name": "preserve-breaks"
                },
                {
                    "name": "preserve-spaces"
                },
                {
                    "name": "break-spaces"
                }
            ],
            "relevance": 50,
            "browsers": [
                "E114",
                "FF124",
                "FFA124",
                "S17.4",
                "SM17.4",
                "C114",
                "CA114",
                "O100"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/white-space-collapse"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-03-19"
            },
            "description": "The white-space-collapse CSS property controls how white space inside an element is collapsed."
        },
        {
            "name": "x",
            "syntax": "<length> | <percentage>",
            "relevance": 51,
            "browsers": [
                "E79",
                "FF69",
                "FFA79",
                "S9",
                "SM9",
                "C42",
                "CA42",
                "O29"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/x"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "The x CSS property defines the x-axis coordinate of the top left corner of the SVG rect shape, image image, foreignObject viewport or nested svg viewport relative to the nearest <svg> ancestor's user coordinate system. If present, it overrides the element's x attribute."
        },
        {
            "name": "y",
            "syntax": "<length> | <percentage>",
            "relevance": 51,
            "browsers": [
                "E79",
                "FF69",
                "FFA79",
                "S9",
                "SM9",
                "C42",
                "CA42",
                "O29"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/y"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "The y CSS property defines the y-axis coordinate of the top left corner of the SVG rect shape, image image, foreignObject viewport and nested svg viewport relative to the nearest <svg> ancestor's user coordinate system. If present, it overrides the element's y attribute."
        },
        {
            "name": "ascent-override",
            "atRule": "@font-face",
            "syntax": "normal | <percentage>",
            "relevance": 50,
            "description": "Describes the ascent metric of a font."
        },
        {
            "name": "descent-override",
            "atRule": "@font-face",
            "syntax": "normal | <percentage>",
            "relevance": 50,
            "description": "Describes the descent metric of a font."
        },
        {
            "name": "font-display",
            "atRule": "@font-face",
            "syntax": "auto | block | swap | fallback | optional",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "block"
                },
                {
                    "name": "swap"
                },
                {
                    "name": "fallback"
                },
                {
                    "name": "optional"
                }
            ],
            "relevance": 74,
            "description": "The font-display descriptor determines how a font face is displayed based on whether and when it is downloaded and ready to use."
        },
        {
            "name": "line-gap-override",
            "atRule": "@font-face",
            "syntax": "normal | <percentage>",
            "relevance": 50,
            "description": "Describes the line-gap metric of a font."
        },
        {
            "name": "size-adjust",
            "atRule": "@font-face",
            "syntax": "<percentage>",
            "relevance": 50,
            "description": "A multiplier for glyph outlines and metrics of a font."
        },
        {
            "name": "base-palette",
            "atRule": "@font-palette-values",
            "syntax": "light | dark | <integer [0,∞]>",
            "relevance": 50,
            "description": "The base-palette CSS descriptor is used to specify the name or index of a pre-defined palette to be used for creating a new palette. If the specified base-palette does not exist, then the palette defined at index 0 will be used."
        },
        {
            "name": "override-colors",
            "atRule": "@font-palette-values",
            "syntax": "[ <integer [0,∞]> <color> ]#",
            "relevance": 50,
            "description": "The override-colors CSS descriptor is used to override colors in the chosen base-palette for a color font."
        },
        {
            "name": "bleed",
            "atRule": "@page",
            "syntax": "auto | <length>",
            "relevance": 50,
            "description": "The bleed CSS at-rule descriptor, used with the @page at-rule, specifies the extent of the page bleed area outside the page box. This property only has effect if crop marks are enabled using the marks property."
        },
        {
            "name": "marks",
            "atRule": "@page",
            "syntax": "none | [ crop || cross ]",
            "relevance": 50,
            "description": "The marks CSS at-rule descriptor, used with the @page at-rule, adds crop and/or cross marks to the presentation of the document. Crop marks indicate where the page should be cut. Cross marks are used to align sheets."
        },
        {
            "name": "page-orientation",
            "atRule": "@page",
            "syntax": "upright | rotate-left | rotate-right ",
            "relevance": 50,
            "description": "The page-orientation CSS descriptor for the @page at-rule controls the rotation of a printed page. It handles the flow of content across pages when the orientation of a page is changed. This behavior differs from the size descriptor in that a user can define the direction in which to rotate the page."
        },
        {
            "name": "inherits",
            "atRule": "@property",
            "syntax": "true | false",
            "values": [
                {
                    "name": "true"
                },
                {
                    "name": "false"
                }
            ],
            "relevance": 50,
            "description": "Specifies the inherit flag of the custom property registration represented by the @property rule, controlling whether or not the property inherits by default."
        },
        {
            "name": "initial-value",
            "atRule": "@property",
            "syntax": "<declaration-value>?",
            "relevance": 50,
            "description": "Specifies the initial value of the custom property registration represented by the @property rule, controlling the property’s initial value."
        },
        {
            "name": "syntax",
            "atRule": "@property",
            "syntax": "<string>",
            "relevance": 51,
            "description": "Specifies the syntax of the custom property registration represented by the @property rule, controlling how the property’s value is parsed at computed value time."
        },
        {
            "name": "navigation",
            "atRule": "@view-transition",
            "syntax": "auto | none",
            "values": [
                {
                    "name": "auto"
                },
                {
                    "name": "none"
                }
            ],
            "relevance": 50,
            "description": ""
        },
        {
            "name": "types",
            "atRule": "@view-transition",
            "syntax": "none | <custom-ident>+",
            "relevance": 50,
            "description": ""
        }
    ],
    "atDirectives": [
        {
            "name": "@charset",
            "browsers": [
                "E12",
                "FF1.5",
                "FFA4",
                "S4",
                "SM4",
                "C2",
                "CA18",
                "IE5.5",
                "O9"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@charset"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Defines character set of the document."
        },
        {
            "name": "@counter-style",
            "browsers": [
                "E91",
                "FF33",
                "FFA33",
                "S17",
                "SM17",
                "C91",
                "CA91",
                "O77"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@counter-style"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-09-18"
            },
            "description": "Defines a custom counter style."
        },
        {
            "name": "@font-face",
            "browsers": [
                "E12",
                "FF3.5",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE4",
                "O10"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@font-face"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Allows for linking to fonts that are automatically activated when needed. This permits authors to work around the limitation of 'web-safe' fonts, allowing for consistent rendering independent of the fonts available in a given user's environment."
        },
        {
            "name": "@font-feature-values",
            "browsers": [
                "E111",
                "FF34",
                "FFA34",
                "S9.1",
                "SM9.3",
                "C111",
                "CA111",
                "O97"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@font-feature-values"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-03-13"
            },
            "description": "Defines named values for the indices used to select alternate glyphs for a given font family."
        },
        {
            "name": "@import",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE5.5",
                "O3.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@import"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Includes content of another file."
        },
        {
            "name": "@keyframes",
            "browsers": [
                "E12",
                "FF16",
                "FFA16",
                "S9",
                "SM9",
                "C43",
                "CA43",
                "IE10",
                "O30"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@keyframes"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "Defines set of animation key frames."
        },
        {
            "name": "@layer",
            "browsers": [
                "E99",
                "FF97",
                "FFA97",
                "S15.4",
                "SM15.4",
                "C99",
                "CA99",
                "O85"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@layer"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            },
            "description": "Declare a cascade layer and the order of precedence in case of multiple cascade layers."
        },
        {
            "name": "@media",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S3",
                "SM1",
                "C1",
                "CA18",
                "IE6",
                "O9.2"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@media"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Defines a stylesheet for a particular media type."
        },
        {
            "name": "@-moz-document",
            "browsers": [
                "FF1.8"
            ],
            "description": "Gecko-specific at-rule that restricts the style rules contained within it based on the URL of the document."
        },
        {
            "name": "@-moz-keyframes",
            "browsers": [
                "FF5"
            ],
            "description": "Defines set of animation key frames."
        },
        {
            "name": "@-ms-viewport",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Specifies the size, zoom factor, and orientation of the viewport."
        },
        {
            "name": "@namespace",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE9",
                "O8"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@namespace"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Declares a prefix and associates it with a namespace name."
        },
        {
            "name": "@-o-keyframes",
            "browsers": [
                "O12"
            ],
            "description": "Defines set of animation key frames."
        },
        {
            "name": "@-o-viewport",
            "browsers": [
                "O11"
            ],
            "description": "Specifies the size, zoom factor, and orientation of the viewport."
        },
        {
            "name": "@page",
            "browsers": [
                "E12",
                "FF19",
                "FFA19",
                "S18.2",
                "SM18.2",
                "C2",
                "CA18",
                "IE8",
                "O6"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@page"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-12-11"
            },
            "description": "Directive defines various page parameters."
        },
        {
            "name": "@property",
            "browsers": [
                "E85",
                "FF128",
                "FFA128",
                "S16.4",
                "SM16.4",
                "C85",
                "CA85",
                "O71"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@property"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-07-09"
            },
            "description": "Describes the aspect of custom properties and variables."
        },
        {
            "name": "@supports",
            "browsers": [
                "E12",
                "FF22",
                "FFA22",
                "S9",
                "SM9",
                "C28",
                "CA28",
                "O12.1"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@supports"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-09-30",
                "baseline_high_date": "2018-03-30"
            },
            "description": "A conditional group rule whose condition tests whether the user agent supports CSS property:value pairs."
        },
        {
            "name": "@-webkit-keyframes",
            "browsers": [
                "C",
                "S4"
            ],
            "description": "Defines set of animation key frames."
        },
        {
            "name": "@container",
            "browsers": [
                "E105",
                "FF110",
                "FFA110",
                "S16",
                "SM16",
                "C105",
                "CA105",
                "O91"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@container"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-02-14"
            },
            "description": "The @container CSS at-rule is a conditional group rule that applies styles to a containment context."
        },
        {
            "name": "@document",
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@document"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The @document CSS at-rule restricts the style rules contained within it based on the URL of the document. It is designed primarily for user-defined style sheets (see userchrome.org for more information), though it can be used on author-defined style sheets, too."
        },
        {
            "name": "@font-palette-values",
            "browsers": [
                "E101",
                "FF107",
                "FFA107",
                "S15.4",
                "SM15.4",
                "C101",
                "CA101",
                "O87"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@font-palette-values"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2022-11-15"
            },
            "description": "The @font-palette-values CSS at-rule allows you to customize the default values of font-palette created by the font-maker."
        },
        {
            "name": "@position-try",
            "browsers": [
                "E125",
                "C125",
                "CA125",
                "O111"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@position-try"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The @position-try CSS at-rule is used to define a custom position try fallback option, which can be used to define positioning and alignment for anchor-positioned elements. One or more sets of position try fallback options can be applied to the anchored element via the position-try-fallbacks property or position-try shorthand. When the positioned element is moved to a position where it starts to overflow its containing block or the viewport, the browser will select the first position try fallback option it finds that places the positioned element fully back on-screen."
        },
        {
            "name": "@scope",
            "browsers": [
                "E118",
                "S17.4",
                "SM17.4",
                "C118",
                "CA118",
                "O104"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@scope"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The @scope CSS at-rule enables you to select elements in specific DOM subtrees, targeting elements precisely without writing overly-specific selectors that are hard to override, and without coupling your selectors too tightly to the DOM structure."
        },
        {
            "name": "@starting-style",
            "browsers": [
                "E117",
                "FF129",
                "FFA129",
                "S17.5",
                "SM17.5",
                "C117",
                "CA117",
                "O103"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@starting-style"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-08-06"
            },
            "description": "The @starting-style CSS at-rule is used to define starting values for properties set on an element that you want to transition from when the element receives its first style update, i.e., when an element is first displayed on a previously loaded page."
        },
        {
            "name": "@view-transition",
            "browsers": [
                "E126",
                "S18.2",
                "SM18.2",
                "C126",
                "CA126",
                "O112"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/@view-transition"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The @view-transition CSS at-rule is used to opt in the current and destination documents to undergo a view transition, in the case of a cross-document navigation."
        }
    ],
    "pseudoClasses": [
        {
            "name": ":active",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:active"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Applies while an element is being activated by the user. For example, between the times the user presses the mouse button and releases it."
        },
        {
            "name": ":any-link",
            "browsers": [
                "E79",
                "FF50",
                "FFA50",
                "S9",
                "SM9",
                "C65",
                "CA65",
                "O52"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:any-link"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links."
        },
        {
            "name": ":checked",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE9",
                "O9"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:checked"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Radio and checkbox elements can be toggled by the user. Some menu items are 'checked' when the user selects them. When such elements are toggled 'on' the :checked pseudo-class applies."
        },
        {
            "name": ":corner-present",
            "browsers": [
                "C",
                "S5"
            ],
            "description": "Non-standard. Indicates whether or not a scrollbar corner is present."
        },
        {
            "name": ":decrement",
            "browsers": [
                "C",
                "S5"
            ],
            "description": "Non-standard. Applies to buttons and track pieces. Indicates whether or not the button or track piece will decrement the view's position when used."
        },
        {
            "name": ":default",
            "browsers": [
                "E79",
                "FF4",
                "FFA4",
                "S5",
                "SM5",
                "C10",
                "CA18",
                "O10"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:default"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Applies to the one or more UI elements that are the default among a set of similar elements. Typically applies to context menu items, buttons, and select lists/menus."
        },
        {
            "name": ":disabled",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE9",
                "O9"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:disabled"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents user interface elements that are in a disabled state; such elements have a corresponding enabled state."
        },
        {
            "name": ":double-button",
            "browsers": [
                "C",
                "S5"
            ],
            "description": "Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed together at the same end of the scrollbar."
        },
        {
            "name": ":empty",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:empty"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents an element that has no children at all."
        },
        {
            "name": ":enabled",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE9",
                "O9"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:enabled"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents user interface elements that are in an enabled state; such elements have a corresponding disabled state."
        },
        {
            "name": ":end",
            "browsers": [
                "C",
                "S5"
            ],
            "description": "Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed after the thumb."
        },
        {
            "name": ":first",
            "browsers": [
                "E12",
                "FF116",
                "FFA116",
                "S6",
                "SM6",
                "C18",
                "CA18",
                "IE8",
                "O9.2"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:first"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-08-01"
            },
            "description": "When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the  page context."
        },
        {
            "name": ":first-child",
            "browsers": [
                "E12",
                "FF3",
                "FFA4",
                "S3.1",
                "SM4",
                "C4",
                "CA18",
                "IE7",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:first-child"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Same as :nth-child(1). Represents an element that is the first child of some other element."
        },
        {
            "name": ":first-of-type",
            "browsers": [
                "E12",
                "FF3.5",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:first-of-type"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Same as :nth-of-type(1). Represents an element that is the first sibling of its type in the list of children of its parent element."
        },
        {
            "name": ":focus",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE8",
                "O7"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:focus"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Applies while an element has the focus (accepts keyboard or mouse events, or other forms of input)."
        },
        {
            "name": ":fullscreen",
            "browsers": [
                "E12",
                "FF64",
                "FFA64",
                "S16.4",
                "C71",
                "CA71",
                "IE11",
                "O58"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:fullscreen"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Matches any element that has its fullscreen flag set."
        },
        {
            "name": ":future",
            "browsers": [
                "E79",
                "S7",
                "SM7",
                "C23",
                "CA25",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:future"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Represents any element that is defined to occur entirely after a :current element."
        },
        {
            "name": ":horizontal",
            "browsers": [
                "C",
                "S5"
            ],
            "description": "Non-standard. Applies to any scrollbar pieces that have a horizontal orientation."
        },
        {
            "name": ":host",
            "browsers": [
                "E79",
                "FF63",
                "FFA63",
                "S10",
                "SM10",
                "C54",
                "CA54",
                "O41"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:host"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "When evaluated in the context of a shadow tree, matches the shadow tree's host element."
        },
        {
            "name": ":host",
            "browsers": [
                "E79",
                "FF63",
                "FFA63",
                "S10",
                "SM10",
                "C54",
                "CA54",
                "O41"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:host"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "When evaluated in the context of a shadow tree, it matches the shadow tree's host element if the host element, in its normal context, matches the selector argument."
        },
        {
            "name": ":host-context",
            "browsers": [
                "E79",
                "C54",
                "CA54",
                "O41"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:host-context"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Tests whether there is an ancestor, outside the shadow tree, which matches a particular selector."
        },
        {
            "name": ":hover",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S2",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:hover"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Applies while the user designates an element with a pointing device, but does not necessarily activate it. For example, a visual user agent could apply this pseudo-class when the cursor (mouse pointer) hovers over a box generated by the element."
        },
        {
            "name": ":increment",
            "browsers": [
                "C",
                "S5"
            ],
            "description": "Non-standard. Applies to buttons and track pieces. Indicates whether or not the button or track piece will increment the view's position when used."
        },
        {
            "name": ":indeterminate",
            "browsers": [
                "E12",
                "FF2",
                "FFA4",
                "S3",
                "SM1",
                "C1",
                "CA18",
                "IE10",
                "O9"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:indeterminate"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Applies to UI elements whose value is in an indeterminate state."
        },
        {
            "name": ":in-range",
            "browsers": [
                "E13",
                "FF29",
                "FFA16",
                "S5.1",
                "SM5",
                "C10",
                "CA18",
                "O11"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:in-range"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-11-12",
                "baseline_high_date": "2018-05-12"
            },
            "description": "Used in conjunction with the min and max attributes, whether on a range input, a number field, or any other types that accept those attributes."
        },
        {
            "name": ":invalid",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM5",
                "C10",
                "CA18",
                "IE10",
                "O10"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:invalid"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "An element is :valid or :invalid when it is, respectively, valid or invalid with respect to data validity semantics defined by a different specification."
        },
        {
            "name": ":lang",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE8",
                "O8"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:lang"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents an element that is in language specified."
        },
        {
            "name": ":last-child",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:last-child"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Same as :nth-last-child(1). Represents an element that is the last child of some other element."
        },
        {
            "name": ":last-of-type",
            "browsers": [
                "E12",
                "FF3.5",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:last-of-type"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Same as :nth-last-of-type(1). Represents an element that is the last sibling of its type in the list of children of its parent element."
        },
        {
            "name": ":left",
            "browsers": [
                "E12",
                "S5",
                "SM4.2",
                "C6",
                "CA18",
                "IE8",
                "O9.2"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:left"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the  page context."
        },
        {
            "name": ":link",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM3.2",
                "C1",
                "CA18",
                "IE3",
                "O3.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:link"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Applies to links that have not yet been visited."
        },
        {
            "name": ":matches",
            "browsers": [
                "S9"
            ],
            "description": "Takes a selector list as its argument. It represents an element that is represented by its argument."
        },
        {
            "name": ":-moz-any",
            "browsers": [
                "FF4"
            ],
            "description": "Represents an element that is represented by the selector list passed as its argument. Standardized as :matches()."
        },
        {
            "name": ":-moz-any-link",
            "browsers": [
                "FF1"
            ],
            "description": "Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links."
        },
        {
            "name": ":-moz-broken",
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-broken"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Non-standard. Matches elements representing broken images."
        },
        {
            "name": ":-moz-drag-over",
            "browsers": [
                "FF1"
            ],
            "description": "Non-standard. Matches elements when a drag-over event applies to it."
        },
        {
            "name": ":-moz-first-node",
            "browsers": [
                "FF72",
                "FFA79"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-first-node"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Non-standard. Represents an element that is the first child node of some other element."
        },
        {
            "name": ":-moz-focusring",
            "browsers": [
                "FF4"
            ],
            "description": "Non-standard. Matches an element that has focus and focus ring drawing is enabled in the browser."
        },
        {
            "name": ":-moz-full-screen",
            "browsers": [
                "FF9"
            ],
            "description": "Matches any element that has its fullscreen flag set. Standardized as :fullscreen."
        },
        {
            "name": ":-moz-last-node",
            "browsers": [
                "FF72",
                "FFA79"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-last-node"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Non-standard. Represents an element that is the last child node of some other element."
        },
        {
            "name": ":-moz-loading",
            "browsers": [
                "FF3"
            ],
            "description": "Non-standard. Matches elements, such as images, that haven't started loading yet."
        },
        {
            "name": ":-moz-only-whitespace",
            "browsers": [
                "FF1",
                "FFA4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-only-whitespace"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The same as :empty, except that it additionally matches elements that only contain code points affected by whitespace processing. Standardized as :blank."
        },
        {
            "name": ":-moz-placeholder",
            "browsers": [
                "FF4"
            ],
            "description": "Deprecated. Represents placeholder text in an input field. Use ::-moz-placeholder for Firefox 19+."
        },
        {
            "name": ":-moz-submit-invalid",
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-submit-invalid"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Non-standard. Represents any submit button when the contents of the associated form are not valid."
        },
        {
            "name": ":-moz-suppressed",
            "browsers": [
                "FF3"
            ],
            "description": "Non-standard. Matches elements representing images that have been blocked from loading."
        },
        {
            "name": ":-moz-ui-invalid",
            "browsers": [
                "FF4"
            ],
            "description": "Non-standard. Represents any validated form element whose value isn't valid "
        },
        {
            "name": ":-moz-ui-valid",
            "browsers": [
                "FF4"
            ],
            "description": "Non-standard. Represents any validated form element whose value is valid "
        },
        {
            "name": ":-moz-user-disabled",
            "browsers": [
                "FF3"
            ],
            "description": "Non-standard. Matches elements representing images that have been disabled due to the user's preferences."
        },
        {
            "name": ":-moz-window-inactive",
            "browsers": [
                "FF4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-window-inactive"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Non-standard. Matches elements in an inactive window."
        },
        {
            "name": ":-ms-fullscreen",
            "browsers": [
                "IE11"
            ],
            "description": "Matches any element that has its fullscreen flag set."
        },
        {
            "name": ":-ms-input-placeholder",
            "browsers": [
                "IE10"
            ],
            "description": "Represents placeholder text in an input field. Note: for Edge use the pseudo-element ::-ms-input-placeholder. Standardized as ::placeholder."
        },
        {
            "name": ":-ms-keyboard-active",
            "browsers": [
                "IE10"
            ],
            "description": "Windows Store apps only. Applies one or more styles to an element when it has focus and the user presses the space bar."
        },
        {
            "name": ":-ms-lang",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents an element that is in the language specified. Accepts a comma separated list of language tokens."
        },
        {
            "name": ":no-button",
            "browsers": [
                "C",
                "S5"
            ],
            "description": "Non-standard. Applies to track pieces. Applies when there is no button at that end of the track."
        },
        {
            "name": ":not",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:not"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "The negation pseudo-class, :not(X), is a functional notation taking a simple selector (excluding the negation pseudo-class itself) as an argument. It represents an element that is not represented by its argument."
        },
        {
            "name": ":nth-child",
            "browsers": [
                "E12",
                "FF3.5",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:nth-child"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents an element that has an+b-1 siblings before it in the document tree, for any positive integer or zero value of n, and has a parent element."
        },
        {
            "name": ":nth-last-child",
            "browsers": [
                "E12",
                "FF3.5",
                "FFA4",
                "S3.1",
                "SM2",
                "C4",
                "CA18",
                "IE9",
                "O9"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:nth-last-child"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents an element that has an+b-1 siblings after it in the document tree, for any positive integer or zero value of n, and has a parent element."
        },
        {
            "name": ":nth-last-of-type",
            "browsers": [
                "E12",
                "FF3.5",
                "FFA4",
                "S3.1",
                "SM2",
                "C4",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:nth-last-of-type"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents an element that has an+b-1 siblings with the same expanded element name after it in the document tree, for any zero or positive integer value of n, and has a parent element."
        },
        {
            "name": ":nth-of-type",
            "browsers": [
                "E12",
                "FF3.5",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:nth-of-type"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents an element that has an+b-1 siblings with the same expanded element name before it in the document tree, for any zero or positive integer value of n, and has a parent element."
        },
        {
            "name": ":only-child",
            "browsers": [
                "E12",
                "FF1.5",
                "FFA4",
                "S3.1",
                "SM2",
                "C2",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:only-child"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents an element that has a parent element and whose parent element has no other element children. Same as :first-child:last-child or :nth-child(1):nth-last-child(1), but with a lower specificity."
        },
        {
            "name": ":only-of-type",
            "browsers": [
                "E12",
                "FF3.5",
                "FFA4",
                "S3.1",
                "SM2",
                "C1",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:only-of-type"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Matches every element that is the only child of its type, of its parent. Same as :first-of-type:last-of-type or :nth-of-type(1):nth-last-of-type(1), but with a lower specificity."
        },
        {
            "name": ":optional",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM5",
                "C10",
                "CA18",
                "IE10",
                "O10"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:optional"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "A form element is :required or :optional if a value for it is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional."
        },
        {
            "name": ":out-of-range",
            "browsers": [
                "E13",
                "FF29",
                "FFA16",
                "S5.1",
                "SM5",
                "C10",
                "CA18",
                "O11"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:out-of-range"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-11-12",
                "baseline_high_date": "2018-05-12"
            },
            "description": "Used in conjunction with the min and max attributes, whether on a range input, a number field, or any other types that accept those attributes."
        },
        {
            "name": ":past",
            "browsers": [
                "E79",
                "S7",
                "SM7",
                "C23",
                "CA25",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:past"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Represents any element that is defined to occur entirely prior to a :current element."
        },
        {
            "name": ":read-only",
            "browsers": [
                "E13",
                "FF78",
                "FFA79",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O9"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:read-only"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "An element whose contents are not user-alterable is :read-only. However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents, most elements are :read-only."
        },
        {
            "name": ":read-write",
            "browsers": [
                "E13",
                "FF78",
                "FFA79",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "O9"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:read-write"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "An element whose contents are not user-alterable is :read-only. However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents, most elements are :read-only."
        },
        {
            "name": ":required",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM5",
                "C10",
                "CA18",
                "IE10",
                "O10"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:required"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "A form element is :required or :optional if a value for it is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional."
        },
        {
            "name": ":right",
            "browsers": [
                "E12",
                "S5",
                "SM4.2",
                "C6",
                "CA18",
                "IE8",
                "O9.2"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:right"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the  page context."
        },
        {
            "name": ":root",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:root"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents an element that is the root of the document. In HTML 4, this is always the HTML element."
        },
        {
            "name": ":scope",
            "browsers": [
                "E79",
                "FF32",
                "FFA32",
                "S7",
                "SM7",
                "C27",
                "CA27",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:scope"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "Represents any element that is in the contextual reference element set."
        },
        {
            "name": ":single-button",
            "browsers": [
                "C",
                "S5"
            ],
            "description": "Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed separately at either end of the scrollbar."
        },
        {
            "name": ":start",
            "browsers": [
                "C",
                "S5"
            ],
            "description": "Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed before the thumb."
        },
        {
            "name": ":target",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1.3",
                "SM2",
                "C1",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:target"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Some URIs refer to a location within a resource. This kind of URI ends with a 'number sign' (#) followed by an anchor identifier (called the fragment identifier)."
        },
        {
            "name": ":valid",
            "browsers": [
                "E12",
                "FF4",
                "FFA4",
                "S5",
                "SM5",
                "C10",
                "CA18",
                "IE10",
                "O10"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:valid"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "An element is :valid or :invalid when it is, respectively, valid or invalid with respect to data validity semantics defined by a different specification."
        },
        {
            "name": ":vertical",
            "browsers": [
                "C",
                "S5"
            ],
            "description": "Non-standard. Applies to any scrollbar pieces that have a vertical orientation."
        },
        {
            "name": ":visited",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE4",
                "O3.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:visited"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Applies once the link has been visited by the user."
        },
        {
            "name": ":-webkit-any",
            "browsers": [
                "C",
                "S5"
            ],
            "description": "Represents an element that is represented by the selector list passed as its argument. Standardized as :matches()."
        },
        {
            "name": ":-webkit-full-screen",
            "browsers": [
                "C",
                "S6"
            ],
            "description": "Matches any element that has its fullscreen flag set. Standardized as :fullscreen."
        },
        {
            "name": ":window-inactive",
            "browsers": [
                "C",
                "S3"
            ],
            "description": "Non-standard. Applies to all scrollbar pieces. Indicates whether or not the window containing the scrollbar is currently active."
        },
        {
            "name": ":active-view-transition",
            "browsers": [
                "E125",
                "S18",
                "SM18",
                "C125",
                "CA125",
                "O111"
            ],
            "baseline": {
                "status": "false"
            },
            "description": ""
        },
        {
            "name": ":active-view-transition-type",
            "browsers": [
                "E125",
                "S18.2",
                "SM18.2",
                "C125",
                "CA125",
                "O111"
            ],
            "baseline": {
                "status": "false"
            },
            "description": ""
        },
        {
            "name": ":autofill",
            "browsers": [
                "E110",
                "FF86",
                "FFA86",
                "S15",
                "SM15",
                "C110",
                "CA110",
                "O96"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:autofill"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-02-09"
            },
            "description": "The :autofill CSS pseudo-class matches when an input element has its value autofilled by the browser. The class stops matching if the user edits the field."
        },
        {
            "name": ":blank",
            "status": "experimental",
            "description": "The :blank CSS pseudo-class selects empty user input elements (eg. <input> or <textarea>)."
        },
        {
            "name": ":buffering",
            "browsers": [
                "S15.4",
                "SM15.4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:buffering"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The :buffering CSS pseudo-class selector represents an element that is playable, such as audio or video, when the playable element is buffering a media resource."
        },
        {
            "name": ":current",
            "status": "experimental",
            "description": "The :current CSS pseudo-class selector is a time-dimensional pseudo-class that represents the element, or an ancestor of the element, that is currently being displayed"
        },
        {
            "name": ":defined",
            "browsers": [
                "E79",
                "FF63",
                "FFA63",
                "S10",
                "SM10",
                "C54",
                "CA54",
                "O41"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:defined"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The :defined CSS pseudo-class represents any element that has been defined. This includes any standard element built in to the browser, and custom elements that have been successfully defined (i.e. with the CustomElementRegistry.define() method)."
        },
        {
            "name": ":dir",
            "browsers": [
                "E120",
                "FF49",
                "FFA49",
                "S16.4",
                "SM16.4",
                "C120",
                "CA120",
                "O106"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:dir"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-12-07"
            },
            "description": "The :dir() CSS pseudo-class matches elements based on the directionality of the text contained in them."
        },
        {
            "name": ":focus-visible",
            "browsers": [
                "E86",
                "FF85",
                "FFA85",
                "S15.4",
                "SM15.4",
                "C86",
                "CA86",
                "O72"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:focus-visible"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            },
            "description": "The :focus-visible pseudo-class applies while an element matches the :focus pseudo-class and the UA determines via heuristics that the focus should be made evident on the element."
        },
        {
            "name": ":focus-within",
            "browsers": [
                "E79",
                "FF52",
                "FFA52",
                "S10.1",
                "SM10.3",
                "C60",
                "CA60",
                "O47"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:focus-within"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The :focus-within pseudo-class applies to any element for which the :focus pseudo class applies as well as to an element whose descendant in the flat tree (including non-element nodes, such as text nodes) matches the conditions for matching :focus."
        },
        {
            "name": ":has",
            "browsers": [
                "E105",
                "FF121",
                "FFA121",
                "S15.4",
                "SM15.4",
                "C105",
                "CA105",
                "O91"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:has"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-12-19"
            },
            "description": "The functional :has() CSS pseudo-class represents an element if any of the relative selectors that are passed as an argument match at least one element when anchored against this element. "
        },
        {
            "name": ":has-slotted",
            "browsers": [
                "E134",
                "FF136",
                "FFA136",
                "C134",
                "CA134"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:has-slotted"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The :has-slotted CSS pseudo-class matches when the content of a slot element is not empty or not using the default value (see Using templates and slots for more information)."
        },
        {
            "name": ":is",
            "browsers": [
                "E88",
                "FF78",
                "FFA79",
                "S14",
                "SM14",
                "C88",
                "CA88",
                "O74"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:is"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-01-21",
                "baseline_high_date": "2023-07-21"
            },
            "description": "The :is() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list. This is useful for writing large selectors in a more compact form."
        },
        {
            "name": ":local-link",
            "status": "experimental",
            "description": "The :local-link CSS pseudo-class represents an link to the same document"
        },
        {
            "name": ":modal",
            "browsers": [
                "E105",
                "FF103",
                "FFA103",
                "S15.6",
                "SM15.6",
                "C105",
                "CA105",
                "O91"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:modal"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-09-02",
                "baseline_high_date": "2025-03-02"
            },
            "description": "The :modal CSS pseudo-class matches an element that is in a state in which it excludes all interaction with elements outside it until the interaction has been dismissed. Multiple elements can be selected by the :modal pseudo-class at the same time, but only one of them will be active and able to receive input."
        },
        {
            "name": ":muted",
            "browsers": [
                "S15.4",
                "SM15.4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:muted"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The :muted CSS pseudo-class selector represents an element that is capable of making sound, such as audio or video, but is muted (forced silent)."
        },
        {
            "name": ":open",
            "browsers": [
                "E133",
                "FF136",
                "FFA136",
                "C133",
                "CA133",
                "O118"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:open"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The :open CSS pseudo-class represents an element that has open and closed states, only when it is currently in the open state."
        },
        {
            "name": ":paused",
            "browsers": [
                "S15.4",
                "SM15.4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:paused"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The :paused CSS pseudo-class selector is a resource state pseudo-class that will match an audio, video, or similar resource that is capable of being “played” or “paused”, when that element is “paused”."
        },
        {
            "name": ":picture-in-picture",
            "browsers": [
                "E110",
                "S13.1",
                "SM13.4",
                "C110",
                "CA110",
                "O96"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:picture-in-picture"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The :picture-in-picture CSS pseudo-class matches the element which is currently in picture-in-picture mode."
        },
        {
            "name": ":placeholder-shown",
            "browsers": [
                "E79",
                "FF51",
                "FFA51",
                "S9",
                "SM9",
                "C47",
                "CA47",
                "IE10",
                "O34"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:placeholder-shown"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The :placeholder-shown CSS pseudo-class represents any <input> or <textarea> element that is currently displaying placeholder text."
        },
        {
            "name": ":playing",
            "browsers": [
                "S15.4",
                "SM15.4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:playing"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The :playing CSS pseudo-class selector is a resource state pseudo-class that will match an audio, video, or similar resource that is capable of being “played” or “paused”, when that element is “playing”. "
        },
        {
            "name": ":popover-open",
            "browsers": [
                "E114",
                "FF125",
                "FFA125",
                "S17",
                "SM17",
                "C114",
                "CA114",
                "O100"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:popover-open"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-04-16"
            },
            "description": "The :popover-open CSS pseudo-class represents a {{domxref(\"Popover API\", \"popover\", \"\", \"nocode\")}} element (i.e. one with a popover attribute) that is in the showing state. You can use this to apply style to popover elements only when they are shown."
        },
        {
            "name": ":seeking",
            "browsers": [
                "S15.4",
                "SM15.4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:seeking"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The :seeking CSS pseudo-class selector represents an element that is playable, such as audio or video, when the playable element is seeking a playback position in the media resource."
        },
        {
            "name": ":stalled",
            "browsers": [
                "S15.4",
                "SM15.4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:stalled"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The :stalled CSS pseudo-class selector represents an element that is playable, such as audio or video, when playback is stalled."
        },
        {
            "name": ":state",
            "browsers": [
                "E125",
                "FF126",
                "FFA126",
                "S17.4",
                "SM17.4",
                "C125",
                "CA125",
                "O111"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:state"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-05-17"
            },
            "description": "The :state() CSS pseudo-class matches custom elements that have the specified custom state."
        },
        {
            "name": ":target-current",
            "status": "experimental",
            "browsers": [
                "E135",
                "C135"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:target-current"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The :target-current CSS pseudo-class selects the active scroll marker — the ::scroll-marker pseudo-element of a scroll-marker-group that is currently scrolled to. This selector can be used to style the active navigation position within a scroll marker group."
        },
        {
            "name": ":target-within",
            "status": "experimental",
            "description": "The :target-within CSS pseudo-class represents an element that is a target element or contains an element that is a target. A target element is a unique element with an id matching the URL's fragment."
        },
        {
            "name": ":user-invalid",
            "browsers": [
                "E119",
                "FF88",
                "FFA88",
                "S16.5",
                "SM16.5",
                "C119",
                "CA119",
                "O105"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:user-invalid"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-11-02"
            },
            "description": "The :user-invalid CSS pseudo-class represents any validated form element whose value isn't valid based on their validation constraints, after the user has interacted with it."
        },
        {
            "name": ":user-valid",
            "browsers": [
                "E119",
                "FF88",
                "FFA88",
                "S16.5",
                "SM16.5",
                "C119",
                "CA119",
                "O105"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:user-valid"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2023-11-02"
            },
            "description": "The :user-valid CSS pseudo-class represents any validated form element whose value validates correctly based on its validation constraints. However, unlike :valid it only matches once the user has interacted with it."
        },
        {
            "name": ":volume-locked",
            "browsers": [
                "S15.4",
                "SM15.4"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:volume-locked"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The :volume-locked CSS pseudo-class selector represents an element that is capable of making sound, such as audio or video, but the audio volume of the media element is currently \"locked\" by the user."
        },
        {
            "name": ":where",
            "browsers": [
                "E88",
                "FF78",
                "FFA79",
                "S14",
                "SM14",
                "C88",
                "CA88",
                "O74"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/:where"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-01-21",
                "baseline_high_date": "2023-07-21"
            },
            "description": "The :where() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list."
        },
        {
            "name": ":xr-overlay",
            "status": "experimental",
            "browsers": [
                "E83",
                "C83",
                "CA83",
                "O69"
            ],
            "baseline": {
                "status": "false"
            },
            "description": ""
        }
    ],
    "pseudoElements": [
        {
            "name": "::after",
            "browsers": [
                "E12",
                "FF1.5",
                "FFA4",
                "S4",
                "SM3.2",
                "C1",
                "CA18",
                "IE9",
                "O7"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::after"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents a styleable child pseudo-element immediately after the originating element's actual content."
        },
        {
            "name": "::backdrop",
            "browsers": [
                "E79",
                "FF47",
                "FFA47",
                "S15.4",
                "SM15.4",
                "C37",
                "CA37",
                "IE11",
                "O24"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::backdrop"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2022-03-14",
                "baseline_high_date": "2024-09-14"
            },
            "description": "Used to create a backdrop that hides the underlying document for an element in a top layer (such as an element that is displayed fullscreen)."
        },
        {
            "name": "::before",
            "browsers": [
                "E12",
                "FF1.5",
                "FFA4",
                "S4",
                "SM3",
                "C1",
                "CA18",
                "IE9",
                "O7"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::before"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents a styleable child pseudo-element immediately before the originating element's actual content."
        },
        {
            "name": "::content",
            "browsers": [
                "C35",
                "O22"
            ],
            "description": "Deprecated. Matches the distribution list itself, on elements that have one. Use ::slotted for forward compatibility."
        },
        {
            "name": "::cue",
            "browsers": [
                "E79",
                "FF55",
                "FFA55",
                "S7",
                "SM7",
                "C26",
                "CA26",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::cue"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            }
        },
        {
            "name": "::cue",
            "browsers": [
                "E79",
                "FF55",
                "FFA55",
                "S7",
                "SM7",
                "C26",
                "CA26",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::cue"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            }
        },
        {
            "name": "::cue-region",
            "browsers": [
                "C",
                "O16",
                "S6"
            ]
        },
        {
            "name": "::cue-region",
            "browsers": [
                "C",
                "O16",
                "S6"
            ]
        },
        {
            "name": "::first-letter",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE9",
                "O7"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::first-letter"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Represents the first letter of an element, if it is not preceded by any other content (such as images or inline tables) on its line."
        },
        {
            "name": "::first-line",
            "browsers": [
                "E12",
                "FF1",
                "FFA4",
                "S1",
                "SM1",
                "C1",
                "CA18",
                "IE9",
                "O7"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::first-line"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2015-07-29",
                "baseline_high_date": "2018-01-29"
            },
            "description": "Describes the contents of the first formatted line of its originating element."
        },
        {
            "name": "::-moz-focus-inner",
            "browsers": [
                "FF72",
                "FFA79"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-focus-inner"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-moz-focus-outer",
            "browsers": [
                "FF4"
            ]
        },
        {
            "name": "::-moz-list-bullet",
            "browsers": [
                "FF72",
                "FFA79"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-list-bullet"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Used to style the bullet of a list element. Similar to the standardized ::marker."
        },
        {
            "name": "::-moz-list-number",
            "browsers": [
                "FF72",
                "FFA79"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-list-number"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Used to style the numbers of a list element. Similar to the standardized ::marker."
        },
        {
            "name": "::-moz-placeholder",
            "browsers": [
                "FF19"
            ],
            "description": "Represents placeholder text in an input field"
        },
        {
            "name": "::-moz-progress-bar",
            "browsers": [
                "FF72",
                "FFA79"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-progress-bar"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Represents the bar portion of a progress bar."
        },
        {
            "name": "::-moz-selection",
            "browsers": [
                "FF1"
            ],
            "description": "Represents the portion of a document that has been highlighted by the user."
        },
        {
            "name": "::-ms-backdrop",
            "browsers": [
                "IE11"
            ],
            "description": "Used to create a backdrop that hides the underlying document for an element in a top layer (such as an element that is displayed fullscreen)."
        },
        {
            "name": "::-ms-browse",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the browse button of an input type=file control."
        },
        {
            "name": "::-ms-check",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the check of a checkbox or radio button input control."
        },
        {
            "name": "::-ms-clear",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the clear button of a text input control"
        },
        {
            "name": "::-ms-expand",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the drop-down button of a select control."
        },
        {
            "name": "::-ms-fill",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the bar portion of a progress bar."
        },
        {
            "name": "::-ms-fill-lower",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the portion of the slider track from its smallest value up to the value currently selected by the thumb. In a left-to-right layout, this is the portion of the slider track to the left of the thumb."
        },
        {
            "name": "::-ms-fill-upper",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the portion of the slider track from the value currently selected by the thumb up to the slider's largest value. In a left-to-right layout, this is the portion of the slider track to the right of the thumb."
        },
        {
            "name": "::-ms-reveal",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the password reveal button of an input type=password control."
        },
        {
            "name": "::-ms-thumb",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the portion of range input control (also known as a slider control) that the user drags."
        },
        {
            "name": "::-ms-ticks-after",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the tick marks of a slider that begin just after the thumb and continue up to the slider's largest value. In a left-to-right layout, these are the ticks to the right of the thumb."
        },
        {
            "name": "::-ms-ticks-before",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the tick marks of a slider that represent its smallest values up to the value currently selected by the thumb. In a left-to-right layout, these are the ticks to the left of the thumb."
        },
        {
            "name": "::-ms-tooltip",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the tooltip of a slider (input type=range)."
        },
        {
            "name": "::-ms-track",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the track of a slider."
        },
        {
            "name": "::-ms-value",
            "browsers": [
                "E",
                "IE10"
            ],
            "description": "Represents the content of a text or password input control, or a select control."
        },
        {
            "name": "::selection",
            "browsers": [
                "E12",
                "FF62",
                "FFA62",
                "S1.1",
                "C1",
                "CA18",
                "IE9",
                "O9.5"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::selection"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "Represents the portion of a document that has been highlighted by the user."
        },
        {
            "name": "::shadow",
            "browsers": [
                "C35",
                "O22"
            ],
            "description": "Matches the shadow root if an element has a shadow tree."
        },
        {
            "name": "::-webkit-file-upload-button",
            "browsers": [
                "C",
                "O",
                "S6"
            ]
        },
        {
            "name": "::-webkit-inner-spin-button",
            "browsers": [
                "E79",
                "S5",
                "SM4.2",
                "C6",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-inner-spin-button"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-input-placeholder",
            "browsers": [
                "C",
                "S4"
            ]
        },
        {
            "name": "::-webkit-keygen-select",
            "browsers": [
                "C",
                "O",
                "S6"
            ]
        },
        {
            "name": "::-webkit-meter-bar",
            "browsers": [
                "E79",
                "S5.1",
                "SM5",
                "C12",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-bar"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-meter-even-less-good-value",
            "browsers": [
                "E79",
                "S5.1",
                "SM5",
                "C12",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-even-less-good-value"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-meter-optimum-value",
            "browsers": [
                "E79",
                "S5.1",
                "SM5",
                "C12",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-optimum-value"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-meter-suboptimum-value",
            "browsers": [
                "E79",
                "S5.1",
                "SM5",
                "C12",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-suboptimum-value"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-outer-spin-button",
            "browsers": [
                "C",
                "O",
                "S6"
            ]
        },
        {
            "name": "::-webkit-progress-bar",
            "browsers": [
                "E79",
                "S7",
                "SM7",
                "C25",
                "CA25",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-bar"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-progress-inner-element",
            "browsers": [
                "E79",
                "S7",
                "SM7",
                "C23",
                "CA25",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-inner-element"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-progress-value",
            "browsers": [
                "E79",
                "S7",
                "SM7",
                "C25",
                "CA25",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-value"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-resizer",
            "browsers": [
                "E79",
                "S4",
                "SM3.2",
                "C2",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-scrollbar",
            "browsers": [
                "E79",
                "S4",
                "SM3",
                "C2",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-scrollbar-button",
            "browsers": [
                "E79",
                "S4",
                "C2",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-scrollbar-corner",
            "browsers": [
                "E79",
                "S4",
                "C2",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-scrollbar-thumb",
            "browsers": [
                "E79",
                "S4",
                "C2",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-scrollbar-track",
            "browsers": [
                "E79",
                "S4",
                "C2",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-scrollbar-track-piece",
            "browsers": [
                "E79",
                "S4",
                "C2",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-search-cancel-button",
            "browsers": [
                "E79",
                "S3",
                "SM1",
                "C1",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-search-cancel-button"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-search-decoration",
            "browsers": [
                "C",
                "S4"
            ]
        },
        {
            "name": "::-webkit-search-results-button",
            "browsers": [
                "E79",
                "S3",
                "SM1",
                "C1",
                "CA18",
                "O15"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-search-results-button"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-search-results-decoration",
            "browsers": [
                "C",
                "S4"
            ]
        },
        {
            "name": "::-webkit-slider-runnable-track",
            "browsers": [
                "E83",
                "S18",
                "SM18",
                "C83",
                "CA83",
                "O69"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-slider-runnable-track"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-slider-thumb",
            "browsers": [
                "E83",
                "S18",
                "SM18",
                "C83",
                "CA83",
                "O69"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-slider-thumb"
                }
            ],
            "baseline": {
                "status": "false"
            }
        },
        {
            "name": "::-webkit-textfield-decoration-container",
            "browsers": [
                "C",
                "O",
                "S6"
            ]
        },
        {
            "name": "::-webkit-validation-bubble",
            "browsers": [
                "C",
                "O",
                "S6"
            ]
        },
        {
            "name": "::-webkit-validation-bubble-arrow",
            "browsers": [
                "C",
                "O",
                "S6"
            ]
        },
        {
            "name": "::-webkit-validation-bubble-arrow-clipper",
            "browsers": [
                "C",
                "O",
                "S6"
            ]
        },
        {
            "name": "::-webkit-validation-bubble-heading",
            "browsers": [
                "C",
                "O",
                "S6"
            ]
        },
        {
            "name": "::-webkit-validation-bubble-message",
            "browsers": [
                "C",
                "O",
                "S6"
            ]
        },
        {
            "name": "::-webkit-validation-bubble-text-block",
            "browsers": [
                "C",
                "O",
                "S6"
            ]
        },
        {
            "name": "::-moz-range-progress",
            "status": "nonstandard",
            "browsers": [
                "FF22",
                "FFA22"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-progress"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::-moz-range-progress CSS pseudo-element is a Mozilla extension that represents the lower portion of the track (i.e., groove) in which the indicator slides in an <input> of type=\"range\". This portion corresponds to values lower than the value currently selected by the thumb (i.e., virtual knob)."
        },
        {
            "name": "::-moz-range-thumb",
            "status": "nonstandard",
            "browsers": [
                "FF21",
                "FFA21"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-thumb"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::-moz-range-thumb CSS pseudo-element is a Mozilla extension that represents the thumb (i.e., virtual knob) of an <input> of type=\"range\". The user can move the thumb along the input's track to alter its numerical value."
        },
        {
            "name": "::-moz-range-track",
            "status": "nonstandard",
            "browsers": [
                "FF21",
                "FFA21"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-track"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::-moz-range-track CSS pseudo-element is a Mozilla extension that represents the track (i.e., groove) in which the indicator slides in an <input> of type=\"range\"."
        },
        {
            "name": "::-webkit-progress-inner-value",
            "status": "nonstandard",
            "description": "The ::-webkit-progress-value CSS pseudo-element represents the filled-in portion of the bar of a <progress> element. It is a child of the ::-webkit-progress-bar pseudo-element.\n\nIn order to let ::-webkit-progress-value take effect, -webkit-appearance needs to be set to none on the <progress> element."
        },
        {
            "name": "::checkmark",
            "browsers": [
                "E134",
                "C134",
                "CA134"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::checkmark"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::checkmark CSS pseudo-element targets the checkmark placed inside the currently-selected option element of a customizable select element. It can be used to provide a visual indication of which option is selected."
        },
        {
            "name": "::details-content",
            "browsers": [
                "E131",
                "S18.4",
                "SM18.4",
                "C131",
                "CA131",
                "O116"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::details-content"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::details-content CSS pseudo-element represents the expandable/collapsible contents of a details element."
        },
        {
            "name": "::file-selector-button",
            "browsers": [
                "E89",
                "FF82",
                "FFA82",
                "S14.1",
                "SM14.5",
                "C89",
                "CA89",
                "IE10",
                "O75"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::file-selector-button"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2021-04-26",
                "baseline_high_date": "2023-10-26"
            },
            "description": "The ::file-selector-button CSS pseudo-element represents the button of an input of type=\"file\"."
        },
        {
            "name": "::grammar-error",
            "browsers": [
                "E121",
                "S17.4",
                "SM17.4",
                "C121",
                "CA121",
                "O107"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::grammar-error"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::grammar-error CSS pseudo-element represents a text segment which the user agent has flagged as grammatically incorrect."
        },
        {
            "name": "::highlight",
            "browsers": [
                "E105",
                "FFpreview",
                "S17.2",
                "SM17.2",
                "C105",
                "CA105",
                "O91"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::highlight"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::highlight() CSS pseudo-element applies styles to a custom highlight."
        },
        {
            "name": "::marker",
            "browsers": [
                "E86",
                "FF68",
                "FFA68",
                "C86",
                "CA86",
                "O72"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::marker"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::marker CSS pseudo-element selects the marker box of a list item, which typically contains a bullet or number. It works on any element or pseudo-element set to display: list-item, such as the <li> and <summary> elements."
        },
        {
            "name": "::part",
            "browsers": [
                "E79",
                "FF72",
                "FFA79",
                "S13.1",
                "SM13.4",
                "C73",
                "CA73",
                "O60"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::part"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-07-28",
                "baseline_high_date": "2023-01-28"
            },
            "description": "The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute."
        },
        {
            "name": "::picker-icon",
            "browsers": [
                "E134",
                "C134",
                "CA134"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::picker-icon"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::picker-icon CSS pseudo-element targets the picker icon inside form controls that have an icon associated with them. In the case of a customizable select element, it selects the arrow icon shown on the <select> element that points down when it is closed."
        },
        {
            "name": "::picker",
            "browsers": [
                "E134",
                "C134",
                "CA134"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::picker"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": ""
        },
        {
            "name": "::placeholder",
            "browsers": [
                "E79",
                "FF51",
                "FFA51",
                "S10.1",
                "SM10.3",
                "C57",
                "CA57",
                "O44"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::placeholder"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The ::placeholder CSS pseudo-element represents the placeholder text of a form element."
        },
        {
            "name": "::scroll-marker",
            "status": "experimental",
            "browsers": [
                "E135",
                "C135"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::scroll-marker"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::scroll-marker CSS pseudo-element can be generated inside any element and represents its scroll marker. All elements can have a ::scroll-marker pseudo-element, which is placed into the ::scroll-marker-group of the nearest scroll container ancestor. A scroll marker behaves like an anchor (a element) whose scroll target is the marker's originating element — and scrolls the scroll container to that element when activated."
        },
        {
            "name": "::scroll-marker-group",
            "status": "experimental",
            "browsers": [
                "E135",
                "C135"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::scroll-marker-group"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::scroll-marker-group CSS pseudo-element is generated inside a scroll container and contains any ::scroll-marker pseudo-elements generated on descendants of the scroll container."
        },
        {
            "name": "::slotted",
            "browsers": [
                "E79",
                "FF63",
                "FFA63",
                "S10",
                "SM10",
                "C50",
                "CA50",
                "O37"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::slotted"
                }
            ],
            "baseline": {
                "status": "high",
                "baseline_low_date": "2020-01-15",
                "baseline_high_date": "2022-07-15"
            },
            "description": "The ::slotted() CSS pseudo-element represents any element that has been placed into a slot inside an HTML template (see Using templates and slots for more information)."
        },
        {
            "name": "::spelling-error",
            "browsers": [
                "E121",
                "S17.4",
                "SM17.4",
                "C121",
                "CA121",
                "O107"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::spelling-error"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::spelling-error CSS pseudo-element represents a text segment which the user agent has flagged as incorrectly spelled."
        },
        {
            "name": "::target-text",
            "browsers": [
                "E89",
                "FF131",
                "FFA131",
                "S18.2",
                "SM18.2",
                "C89",
                "CA89",
                "O75"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::target-text"
                }
            ],
            "baseline": {
                "status": "low",
                "baseline_low_date": "2024-12-11"
            },
            "description": "The ::target-text CSS pseudo-element represents the text that has been scrolled to if the browser supports scroll-to-text fragments. It allows authors to choose how to highlight that section of text."
        },
        {
            "name": "::view-transition",
            "browsers": [
                "E109",
                "S18",
                "SM18",
                "C109",
                "CA109",
                "O95"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::view-transition"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::view-transition CSS pseudo-element represents the root of the view transitions overlay, which contains all view transitions and sits over the top of all other page content."
        },
        {
            "name": "::view-transition-group",
            "browsers": [
                "E109",
                "S18",
                "SM18",
                "C109",
                "CA109",
                "O95"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::view-transition-group"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::view-transition-group CSS pseudo-element represents a single view transition snapshot group."
        },
        {
            "name": "::view-transition-image-pair",
            "browsers": [
                "E109",
                "S18",
                "SM18",
                "C109",
                "CA109",
                "O95"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::view-transition-image-pair"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::view-transition-image-pair CSS pseudo-element represents a container for a view transition's \"old\" and \"new\" view states — before and after the transition."
        },
        {
            "name": "::view-transition-new",
            "browsers": [
                "E109",
                "S18",
                "SM18",
                "C109",
                "CA109",
                "O95"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::view-transition-new"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::view-transition-new CSS pseudo-element represents the \"new\" view state of a view transition — a snapshot live representation of the state after the transition."
        },
        {
            "name": "::view-transition-old",
            "browsers": [
                "E109",
                "S18",
                "SM18",
                "C109",
                "CA109",
                "O95"
            ],
            "references": [
                {
                    "name": "MDN Reference",
                    "url": "https://developer.mozilla.org/docs/Web/CSS/::view-transition-old"
                }
            ],
            "baseline": {
                "status": "false"
            },
            "description": "The ::view-transition-old CSS pseudo-element represents the \"old\" view state of a view transition — a static snapshot of the old view, before the transition."
        }
    ]
};

class CSSDataProvider {
    constructor(data) {
        this._properties = [];
        this._atDirectives = [];
        this._pseudoClasses = [];
        this._pseudoElements = [];
        this.addData(data);
    }
    provideProperties() {
        return this._properties;
    }
    provideAtDirectives() {
        return this._atDirectives;
    }
    providePseudoClasses() {
        return this._pseudoClasses;
    }
    providePseudoElements() {
        return this._pseudoElements;
    }
    addData(data) {
        if (Array.isArray(data.properties)) {
            for (const prop of data.properties) {
                if (isPropertyData(prop)) {
                    this._properties.push(prop);
                }
            }
        }
        if (Array.isArray(data.atDirectives)) {
            for (const prop of data.atDirectives) {
                if (isAtDirective(prop)) {
                    this._atDirectives.push(prop);
                }
            }
        }
        if (Array.isArray(data.pseudoClasses)) {
            for (const prop of data.pseudoClasses) {
                if (isPseudoClassData(prop)) {
                    this._pseudoClasses.push(prop);
                }
            }
        }
        if (Array.isArray(data.pseudoElements)) {
            for (const prop of data.pseudoElements) {
                if (isPseudoElementData(prop)) {
                    this._pseudoElements.push(prop);
                }
            }
        }
    }
}
function isPropertyData(d) {
    return typeof d.name === 'string';
}
function isAtDirective(d) {
    return typeof d.name === 'string';
}
function isPseudoClassData(d) {
    return typeof d.name === 'string';
}
function isPseudoElementData(d) {
    return typeof d.name === 'string';
}

class CSSDataManager {
    constructor(options) {
        this.dataProviders = [];
        this._propertySet = {};
        this._atDirectiveSet = {};
        this._pseudoClassSet = {};
        this._pseudoElementSet = {};
        this._properties = [];
        this._atDirectives = [];
        this._pseudoClasses = [];
        this._pseudoElements = [];
        this.setDataProviders(options?.useDefaultDataProvider !== false, options?.customDataProviders || []);
    }
    setDataProviders(builtIn, providers) {
        this.dataProviders = [];
        if (builtIn) {
            this.dataProviders.push(new CSSDataProvider(cssData));
        }
        this.dataProviders.push(...providers);
        this.collectData();
    }
    collectData() {
        this._propertySet = {};
        this._atDirectiveSet = {};
        this._pseudoClassSet = {};
        this._pseudoElementSet = {};
        this.dataProviders.forEach(provider => {
            provider.provideProperties().forEach(p => {
                if (!this._propertySet[p.name]) {
                    this._propertySet[p.name] = p;
                }
            });
            provider.provideAtDirectives().forEach(p => {
                if (!this._atDirectiveSet[p.name]) {
                    this._atDirectiveSet[p.name] = p;
                }
            });
            provider.providePseudoClasses().forEach(p => {
                if (!this._pseudoClassSet[p.name]) {
                    this._pseudoClassSet[p.name] = p;
                }
            });
            provider.providePseudoElements().forEach(p => {
                if (!this._pseudoElementSet[p.name]) {
                    this._pseudoElementSet[p.name] = p;
                }
            });
        });
        this._properties = values(this._propertySet);
        this._atDirectives = values(this._atDirectiveSet);
        this._pseudoClasses = values(this._pseudoClassSet);
        this._pseudoElements = values(this._pseudoElementSet);
    }
    getProperty(name) { return this._propertySet[name]; }
    getAtDirective(name) { return this._atDirectiveSet[name]; }
    getPseudoClass(name) { return this._pseudoClassSet[name]; }
    getPseudoElement(name) { return this._pseudoElementSet[name]; }
    getProperties() {
        return this._properties;
    }
    getAtDirectives() {
        return this._atDirectives;
    }
    getPseudoClasses() {
        return this._pseudoClasses;
    }
    getPseudoElements() {
        return this._pseudoElements;
    }
    isKnownProperty(name) {
        return name.toLowerCase() in this._propertySet;
    }
    isStandardProperty(name) {
        return this.isKnownProperty(name) &&
            (!this._propertySet[name.toLowerCase()].status || this._propertySet[name.toLowerCase()].status === 'standard');
    }
}

function getSelectionRanges$1(document, positions, stylesheet) {
    function getSelectionRange(position) {
        const applicableRanges = getApplicableRanges(position);
        let current = undefined;
        for (let index = applicableRanges.length - 1; index >= 0; index--) {
            current = SelectionRange$1.create(Range$1.create(document.positionAt(applicableRanges[index][0]), document.positionAt(applicableRanges[index][1])), current);
        }
        if (!current) {
            current = SelectionRange$1.create(Range$1.create(position, position));
        }
        return current;
    }
    return positions.map(getSelectionRange);
    function getApplicableRanges(position) {
        const offset = document.offsetAt(position);
        let currNode = stylesheet.findChildAtOffset(offset, true);
        if (!currNode) {
            return [];
        }
        const result = [];
        while (currNode) {
            if (currNode.parent &&
                currNode.offset === currNode.parent.offset &&
                currNode.end === currNode.parent.end) {
                currNode = currNode.parent;
                continue;
            }
            if (currNode.type === NodeType$1.Declarations) {
                if (offset > currNode.offset && offset < currNode.end) {
                    result.push([currNode.offset + 1, currNode.end - 1]);
                }
            }
            result.push([currNode.offset, currNode.end]);
            currNode = currNode.parent;
        }
        return result;
    }
}

class SCSSNavigation extends CSSNavigation {
    constructor(fileSystemProvider) {
        super(fileSystemProvider, true);
    }
    isRawStringDocumentLinkNode(node) {
        return (super.isRawStringDocumentLinkNode(node) ||
            node.type === NodeType$1.Use ||
            node.type === NodeType$1.Forward);
    }
    async mapReference(target, isRawLink) {
        if (this.fileSystemProvider && target && isRawLink) {
            const pathVariations = toPathVariations(target);
            for (const variation of pathVariations) {
                if (await this.fileExists(variation)) {
                    return variation;
                }
            }
        }
        return target;
    }
    async resolveReference(target, documentUri, documentContext, isRawLink = false) {
        if (startsWith(target, 'sass:')) {
            return undefined;
        }
        if (target.startsWith('pkg:')) {
            return this.resolvePkgModulePath(target, documentUri, documentContext);
        }
        return super.resolveReference(target, documentUri, documentContext, isRawLink);
    }
    async resolvePkgModulePath(target, documentUri, documentContext) {
        const bareTarget = target.replace('pkg:', '');
        const moduleName = bareTarget.includes('/') ? getModuleNameFromPath(bareTarget) : bareTarget;
        const rootFolderUri = documentContext.resolveReference('/', documentUri);
        const documentFolderUri = dirname(documentUri);
        const modulePath = await this.resolvePathToModule(moduleName, documentFolderUri, rootFolderUri);
        if (!modulePath) {
            return undefined;
        }
        let packageJsonContent = await this.getContent(joinPath(modulePath, 'package.json'));
        if (!packageJsonContent) {
            return undefined;
        }
        let packageJson;
        try {
            packageJson = JSON.parse(packageJsonContent);
        }
        catch (e) {
            return undefined;
        }
        const subpath = bareTarget.substring(moduleName.length + 1);
        if (packageJson.exports) {
            if (!subpath) {
                const rootExport = packageJson.exports["."] || packageJson.exports;
                const entry = rootExport && (rootExport['sass'] || rootExport['style'] || rootExport['default']);
                if (entry && entry.endsWith('.scss')) {
                    const entryPath = joinPath(modulePath, entry);
                    return entryPath;
                }
            }
            else {
                const lookupSubpath = subpath.endsWith('.scss') ? `./${subpath.replace('.scss', '')}` : `./${subpath}`;
                const lookupSubpathScss = subpath.endsWith('.scss') ? `./${subpath}` : `./${subpath}.scss`;
                const subpathObject = packageJson.exports[lookupSubpathScss] || packageJson.exports[lookupSubpath];
                if (subpathObject) {
                    const entry = subpathObject['sass'] || subpathObject['styles'] || subpathObject['default'];
                    if (entry && entry.endsWith('.scss')) {
                        const entryPath = joinPath(modulePath, entry);
                        return entryPath;
                    }
                }
                else {
                    for (const [maybePattern, subpathObject] of Object.entries(packageJson.exports)) {
                        if (!maybePattern.includes("*")) {
                            continue;
                        }
                        const re = new RegExp(convertSimple2RegExpPattern(maybePattern.replace('.scss', '')).replace(/\.\*/g, '(.*)'));
                        const match = re.exec(lookupSubpath);
                        if (match) {
                            const entry = subpathObject['sass'] || subpathObject['styles'] || subpathObject['default'];
                            if (entry && entry.endsWith('.scss')) {
                                const expandedPattern = entry.replace('*', match[1]);
                                const entryPath = joinPath(modulePath, expandedPattern);
                                return entryPath;
                            }
                        }
                    }
                }
            }
        }
        else if (!subpath && (packageJson.sass || packageJson.style)) {
            const entry = packageJson.sass || packageJson.style;
            if (entry) {
                const entryPath = joinPath(modulePath, entry);
                return entryPath;
            }
        }
        return undefined;
    }
}
function toPathVariations(target) {
    if (target.endsWith('.css')) {
        return [target];
    }
    if (target.endsWith('/')) {
        return [target + 'index.scss', target + '_index.scss'];
    }
    const targetUri = URI$2.parse(target.replace(/\.scss$/, ''));
    const basename = Utils.basename(targetUri);
    const dirname = Utils.dirname(targetUri);
    if (basename.startsWith('_')) {
        return [Utils.joinPath(dirname, basename + '.scss').toString(true)];
    }
    return [
        Utils.joinPath(dirname, basename + '.scss').toString(true),
        Utils.joinPath(dirname, '_' + basename + '.scss').toString(true),
        target + '/index.scss',
        target + '/_index.scss',
        Utils.joinPath(dirname, basename + '.css').toString(true)
    ];
}

function getDefaultCSSDataProvider() {
    return newCSSDataProvider(cssData);
}
function newCSSDataProvider(data) {
    return new CSSDataProvider(data);
}
function createFacade(parser, completion, hover, navigation, codeActions, validation, cssDataManager) {
    return {
        configure: (settings) => {
            validation.configure(settings);
            completion.configure(settings?.completion);
            hover.configure(settings?.hover);
            navigation.configure(settings?.importAliases);
        },
        setDataProviders: cssDataManager.setDataProviders.bind(cssDataManager),
        doValidation: validation.doValidation.bind(validation),
        parseStylesheet: parser.parseStylesheet.bind(parser),
        doComplete: completion.doComplete.bind(completion),
        doComplete2: completion.doComplete2.bind(completion),
        setCompletionParticipants: completion.setCompletionParticipants.bind(completion),
        doHover: hover.doHover.bind(hover),
        format,
        findDefinition: navigation.findDefinition.bind(navigation),
        findReferences: navigation.findReferences.bind(navigation),
        findDocumentHighlights: navigation.findDocumentHighlights.bind(navigation),
        findDocumentLinks: navigation.findDocumentLinks.bind(navigation),
        findDocumentLinks2: navigation.findDocumentLinks2.bind(navigation),
        findDocumentSymbols: navigation.findSymbolInformations.bind(navigation),
        findDocumentSymbols2: navigation.findDocumentSymbols.bind(navigation),
        doCodeActions: codeActions.doCodeActions.bind(codeActions),
        doCodeActions2: codeActions.doCodeActions2.bind(codeActions),
        findDocumentColors: navigation.findDocumentColors.bind(navigation),
        getColorPresentations: navigation.getColorPresentations.bind(navigation),
        prepareRename: navigation.prepareRename.bind(navigation),
        doRename: navigation.doRename.bind(navigation),
        getFoldingRanges,
        getSelectionRanges: getSelectionRanges$1
    };
}
const defaultLanguageServiceOptions = {};
function getCSSLanguageService(options = defaultLanguageServiceOptions) {
    const cssDataManager = new CSSDataManager(options);
    return createFacade(new Parser(), new CSSCompletion(null, options, cssDataManager), new CSSHover(options && options.clientCapabilities, cssDataManager), new CSSNavigation(options && options.fileSystemProvider, false), new CSSCodeActions(cssDataManager), new CSSValidation(cssDataManager), cssDataManager);
}
function getSCSSLanguageService(options = defaultLanguageServiceOptions) {
    const cssDataManager = new CSSDataManager(options);
    return createFacade(new SCSSParser(), new SCSSCompletion(options, cssDataManager), new CSSHover(options && options.clientCapabilities, cssDataManager), new SCSSNavigation(options && options.fileSystemProvider), new CSSCodeActions(cssDataManager), new CSSValidation(cssDataManager), cssDataManager);
}
function getLESSLanguageService(options = defaultLanguageServiceOptions) {
    const cssDataManager = new CSSDataManager(options);
    return createFacade(new LESSParser(), new LESSCompletion(options, cssDataManager), new CSSHover(options && options.clientCapabilities, cssDataManager), new CSSNavigation(options && options.fileSystemProvider, true), new CSSCodeActions(cssDataManager), new CSSValidation(cssDataManager), cssDataManager);
}

var cssLanguageService = /*#__PURE__*/Object.freeze({
	__proto__: null,
	getDefaultCSSDataProvider: getDefaultCSSDataProvider,
	newCSSDataProvider: newCSSDataProvider,
	getCSSLanguageService: getCSSLanguageService,
	getSCSSLanguageService: getSCSSLanguageService,
	getLESSLanguageService: getLESSLanguageService,
	get TextDocument () { return TextDocument$1; },
	get Range () { return Range$1; },
	get Position () { return Position$1; },
	get DocumentUri () { return DocumentUri$1; },
	get MarkupContent () { return MarkupContent$1; },
	get MarkupKind () { return MarkupKind$1; },
	get Color () { return Color$1; },
	get ColorInformation () { return ColorInformation$1; },
	get ColorPresentation () { return ColorPresentation$1; },
	get FoldingRange () { return FoldingRange$1; },
	get FoldingRangeKind () { return FoldingRangeKind$1; },
	get SelectionRange () { return SelectionRange$1; },
	get Diagnostic () { return Diagnostic$1; },
	get DiagnosticSeverity () { return DiagnosticSeverity$1; },
	get CompletionItem () { return CompletionItem$1; },
	get CompletionItemKind () { return CompletionItemKind$1; },
	get CompletionList () { return CompletionList$1; },
	get CompletionItemTag () { return CompletionItemTag$1; },
	get InsertTextFormat () { return InsertTextFormat$1; },
	get SymbolInformation () { return SymbolInformation$1; },
	get SymbolKind () { return SymbolKind$1; },
	get DocumentSymbol () { return DocumentSymbol$1; },
	get Location () { return Location$1; },
	get Hover () { return Hover$1; },
	get MarkedString () { return MarkedString$1; },
	get CodeActionContext () { return CodeActionContext$1; },
	get Command () { return Command$1; },
	get CodeAction () { return CodeAction$1; },
	get DocumentHighlight () { return DocumentHighlight$1; },
	get DocumentLink () { return DocumentLink$1; },
	get WorkspaceEdit () { return WorkspaceEdit$1; },
	get TextEdit () { return TextEdit$1; },
	get CodeActionKind () { return CodeActionKind$1; },
	get TextDocumentEdit () { return TextDocumentEdit$1; },
	get VersionedTextDocumentIdentifier () { return VersionedTextDocumentIdentifier$1; },
	get DocumentHighlightKind () { return DocumentHighlightKind$1; },
	get ClientCapabilities () { return ClientCapabilities; },
	get FileType () { return FileType; }
});

var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(cssLanguageService);

var svelteSelectors = {};

Object.defineProperty(svelteSelectors, "__esModule", { value: true });
svelteSelectors.pseudoClass = void 0;
svelteSelectors.pseudoClass = [
    {
        name: ':global()',
        description: `[svelte] :global modifier

Applying styles to a selector globally`,
        references: [
            {
                name: 'Svelte.dev Reference',
                url: 'https://svelte.dev/docs/svelte/global-styles'
            }
        ]
    }
];

Object.defineProperty(service$1, "__esModule", { value: true });
service$1.getLanguage = getLanguage;
service$1.getLanguageService = getLanguageService;
service$1.createLanguageServices = createLanguageServices;
const vscode_css_languageservice_1$1 = require$$1$1;
const svelte_selectors_1 = svelteSelectors;
const customDataProvider = {
    providePseudoClasses() {
        return svelte_selectors_1.pseudoClass;
    },
    provideProperties() {
        return [
            {
                name: 'vector-effect',
                values: [{ name: 'non-scaling-stroke' }, { name: 'none' }],
                status: 'experimental'
            },
            {
                name: 'print-color-adjust',
                values: [{ name: 'economy' }, { name: 'exact' }],
                status: 'experimental'
            }
        ];
    },
    provideAtDirectives() {
        return [];
    },
    providePseudoElements() {
        return [];
    }
};
function getLanguage(kind) {
    switch (kind) {
        case 'scss':
        case 'text/scss':
            return 'scss';
        case 'less':
        case 'text/less':
            return 'less';
        case 'css':
        case 'text/css':
        default:
            return 'css';
    }
}
function getLanguageService(langs, kind) {
    const lang = getLanguage(kind);
    return langs[lang];
}
function createLanguageServices(options) {
    const [css, less, scss] = [
        vscode_css_languageservice_1$1.getCSSLanguageService,
        vscode_css_languageservice_1$1.getLESSLanguageService,
        vscode_css_languageservice_1$1.getSCSSLanguageService
    ].map((getService) => getService({
        customDataProviders: [customDataProvider],
        ...(options ?? {})
    }));
    return {
        css,
        less,
        scss
    };
}

Object.defineProperty(CSSDocument$1, "__esModule", { value: true });
CSSDocument$1.CSSDocument = void 0;
const documents_1$u = documents;
const service_1$7 = service$1;
class CSSDocument extends documents_1$u.ReadableDocument {
    constructor(parent, languageServices) {
        super();
        this.parent = parent;
        this.version = this.parent.version;
        if (this.parent.styleInfo) {
            this.styleInfo = this.parent.styleInfo;
        }
        else {
            this.styleInfo = {
                attributes: {},
                start: -1,
                end: -1
            };
        }
        this.languageId = this.language;
        this.stylesheet = (0, service_1$7.getLanguageService)(languageServices, this.languageId).parseStylesheet(this);
    }
    getOriginalPosition(pos) {
        const parentOffset = this.styleInfo.start + this.offsetAt(pos);
        return this.parent.positionAt(parentOffset);
    }
    getGeneratedPosition(pos) {
        const fragmentOffset = this.parent.offsetAt(pos) - this.styleInfo.start;
        return this.positionAt(fragmentOffset);
    }
    isInGenerated(pos) {
        const offset = this.parent.offsetAt(pos);
        return offset >= this.styleInfo.start && offset <= this.styleInfo.end;
    }
    getText() {
        return this.parent.getText().slice(this.styleInfo.start, this.styleInfo.end);
    }
    getTextLength() {
        return this.styleInfo.end - this.styleInfo.start;
    }
    getFilePath() {
        return this.parent.getFilePath();
    }
    getURL() {
        return this.parent.getURL();
    }
    getAttributes() {
        return this.styleInfo.attributes;
    }
    get language() {
        const attrs = this.getAttributes();
        return attrs.lang || attrs.type || 'css';
    }
}
CSSDocument$1.CSSDocument = CSSDocument;

var globalVars = {};

const isWin = process.platform === 'win32';
const SEP = isWin ? `\\\\+` : `\\/`;
const SEP_ESC = isWin ? `\\\\` : `/`;
const GLOBSTAR = `((?:[^/]*(?:/|$))*)`;
const WILDCARD = `([^/]*)`;
const GLOBSTAR_SEGMENT = `((?:[^${SEP_ESC}]*(?:${SEP_ESC}|$))*)`;
const WILDCARD_SEGMENT = `([^${SEP_ESC}]*)`;
function globrex(glob, {extended = false, globstar = false, strict = false, filepath = false, flags = ''} = {}) {
    let regex = '';
    let segment = '';
    let path = { regex: '', segments: [] };
    let inGroup = false;
    let inRange = false;
    const ext = [];
    function add(str, {split, last, only}={}) {
        if (only !== 'path') regex += str;
        if (filepath && only !== 'regex') {
            path.regex += (str === '\\/' ? SEP : str);
            if (split) {
                if (last) segment += str;
                if (segment !== '') {
                    if (!flags.includes('g')) segment = `^${segment}$`;
                    path.segments.push(new RegExp(segment, flags));
                }
                segment = '';
            } else {
                segment += str;
            }
        }
    }
    let c, n;
    for (let i = 0; i < glob.length; i++) {
        c = glob[i];
        n = glob[i + 1];
        if (['\\', '$', '^', '.', '='].includes(c)) {
            add(`\\${c}`);
            continue;
        }
        if (c === '/') {
            add(`\\${c}`, {split: true});
            if (n === '/' && !strict) regex += '?';
            continue;
        }
        if (c === '(') {
            if (ext.length) {
                add(c);
                continue;
            }
            add(`\\${c}`);
            continue;
        }
        if (c === ')') {
            if (ext.length) {
                add(c);
                let type = ext.pop();
                if (type === '@') {
                    add('{1}');
                } else if (type === '!') {
                    add('([^\/]*)');
                } else {
                    add(type);
                }
                continue;
            }
            add(`\\${c}`);
            continue;
        }
        if (c === '|') {
            if (ext.length) {
                add(c);
                continue;
            }
            add(`\\${c}`);
            continue;
        }
        if (c === '+') {
            if (n === '(' && extended) {
                ext.push(c);
                continue;
            }
            add(`\\${c}`);
            continue;
        }
        if (c === '@' && extended) {
            if (n === '(') {
                ext.push(c);
                continue;
            }
        }
        if (c === '!') {
            if (extended) {
                if (inRange) {
                    add('^');
                    continue
                }
                if (n === '(') {
                    ext.push(c);
                    add('(?!');
                    i++;
                    continue;
                }
                add(`\\${c}`);
                continue;
            }
            add(`\\${c}`);
            continue;
        }
        if (c === '?') {
            if (extended) {
                if (n === '(') {
                    ext.push(c);
                } else {
                    add('.');
                }
                continue;
            }
            add(`\\${c}`);
            continue;
        }
        if (c === '[') {
            if (inRange && n === ':') {
                i++;
                let value = '';
                while(glob[++i] !== ':') value += glob[i];
                if (value === 'alnum') add('(\\w|\\d)');
                else if (value === 'space') add('\\s');
                else if (value === 'digit') add('\\d');
                i++;
                continue;
            }
            if (extended) {
                inRange = true;
                add(c);
                continue;
            }
            add(`\\${c}`);
            continue;
        }
        if (c === ']') {
            if (extended) {
                inRange = false;
                add(c);
                continue;
            }
            add(`\\${c}`);
            continue;
        }
        if (c === '{') {
            if (extended) {
                inGroup = true;
                add('(');
                continue;
            }
            add(`\\${c}`);
            continue;
        }
        if (c === '}') {
            if (extended) {
                inGroup = false;
                add(')');
                continue;
            }
            add(`\\${c}`);
            continue;
        }
        if (c === ',') {
            if (inGroup) {
                add('|');
                continue;
            }
            add(`\\${c}`);
            continue;
        }
        if (c === '*') {
            if (n === '(' && extended) {
                ext.push(c);
                continue;
            }
            let prevChar = glob[i - 1];
            let starCount = 1;
            while (glob[i + 1] === '*') {
                starCount++;
                i++;
            }
            let nextChar = glob[i + 1];
            if (!globstar) {
                add('.*');
            } else {
                let isGlobstar =
                    starCount > 1 &&
                    (prevChar === '/' || prevChar === undefined) &&
                    (nextChar === '/' || nextChar === undefined);
                if (isGlobstar) {
                    add(GLOBSTAR, {only:'regex'});
                    add(GLOBSTAR_SEGMENT, {only:'path', last:true, split:true});
                    i++;
                } else {
                    add(WILDCARD, {only:'regex'});
                    add(WILDCARD_SEGMENT, {only:'path'});
                }
            }
            continue;
        }
        add(c);
    }
    if (!flags.includes('g')) {
        regex = `^${regex}$`;
        segment = `^${segment}$`;
        if (filepath) path.regex = `^${path.regex}$`;
    }
    const result = {regex: new RegExp(regex, flags)};
    if (filepath) {
        path.segments.push(new RegExp(segment, flags));
        path.regex = new RegExp(path.regex, flags);
        path.globstar = new RegExp(!flags.includes('g') ? `^${GLOBSTAR_SEGMENT}$` : GLOBSTAR_SEGMENT, flags);
        result.path = path;
    }
    return result;
}
var globrex_1$1 = globrex;
getDefaultExportFromCjs(globrex_1$1);

var __importDefault$p = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(globalVars, "__esModule", { value: true });
globalVars.GlobalVars = void 0;
const chokidar_1$1 = require$$0$6;
const fs_1 = fs$1;
const globrex_1 = __importDefault$p(globrex_1$1);
const path_1$a = path$1;
const utils_1$F = utils$6;
const varRegex = /^\s*(--\w+.*?):\s*?([^;]*)/;
class GlobalVars {
    constructor(workspaceRoot) {
        this.globalVars = new Map();
        this.workspaceRoot = workspaceRoot;
    }
    watchFiles(filesToWatch) {
        if (!filesToWatch || this.watchedFiles === filesToWatch) {
            return;
        }
        this.watchedFiles = filesToWatch;
        if (this.fsWatcher) {
            this.fsWatcher.close();
            this.globalVars.clear();
        }
        const paths = new Set();
        const includePatterns = new Set();
        for (const root of this.workspaceRoot) {
            for (const filePath of filesToWatch.split(',')) {
                if (!filePath.includes('*')) {
                    paths.add(filePath);
                    continue;
                }
                const normalizedPath = (0, utils_1$F.normalizePath)((0, path_1$a.join)(root, filePath));
                includePatterns.add(normalizedPath);
                const pathSegments = normalizedPath.split('**');
                let directory = pathSegments[0] || '.';
                paths.add(directory);
            }
        }
        this.fsWatcher = (0, chokidar_1$1.watch)(Array.from(paths), {
            ignored: this.createIgnoreMatcher(includePatterns)
        })
            .addListener('add', (file) => this.updateForFile(file))
            .addListener('change', (file) => {
            this.updateForFile(file);
        })
            .addListener('unlink', (file) => this.globalVars.delete(file));
    }
    createIgnoreMatcher(includePatterns) {
        if (includePatterns.size === 0) {
            return undefined;
        }
        const regexList = Array.from(includePatterns).map((pattern) => (0, globrex_1.default)(pattern, { globstar: true }).regex);
        return (path) => {
            return !regexList.some((regex) => regex.test(path));
        };
    }
    updateForFile(filename) {
        setTimeout(() => {
            (0, fs_1.readFile)(filename, 'utf-8', (error, contents) => {
                if (error) {
                    return;
                }
                const globalVarsForFile = contents
                    .split('\n')
                    .map((line) => line.match(varRegex))
                    .filter(utils_1$F.isNotNullOrUndefined)
                    .map((line) => ({ filename, name: line[1], value: line[2] }));
                this.globalVars.set(filename, globalVarsForFile);
            });
        }, 1000);
    }
    getGlobalVars() {
        return [...this.globalVars.values()].flat();
    }
}
globalVars.GlobalVars = GlobalVars;

var getIdClassCompletion$1 = {};

Object.defineProperty(getIdClassCompletion$1, "__esModule", { value: true });
getIdClassCompletion$1.NodeType = void 0;
getIdClassCompletion$1.getIdClassCompletion = getIdClassCompletion;
getIdClassCompletion$1.collectSelectors = collectSelectors;
const vscode_languageserver_1$t = main$8;
function getIdClassCompletion(cssDoc, attributeContext) {
    const collectingType = getCollectingType(attributeContext);
    if (!collectingType) {
        return null;
    }
    const items = collectSelectors(cssDoc.stylesheet, collectingType);
    return vscode_languageserver_1$t.CompletionList.create(items);
}
function getCollectingType(attributeContext) {
    if (attributeContext.inValue) {
        if (attributeContext.name === 'class') {
            return NodeType.ClassSelector;
        }
        if (attributeContext.name === 'id') {
            return NodeType.IdentifierSelector;
        }
    }
    else if (attributeContext.name.startsWith('class:')) {
        return NodeType.ClassSelector;
    }
}
var NodeType;
(function (NodeType) {
    NodeType[NodeType["ClassSelector"] = 14] = "ClassSelector";
    NodeType[NodeType["IdentifierSelector"] = 15] = "IdentifierSelector";
})(NodeType || (getIdClassCompletion$1.NodeType = NodeType = {}));
function collectSelectors(stylesheet, type) {
    const result = [];
    walk$1(stylesheet, (node) => {
        if (node.type === type) {
            result.push(node);
        }
    });
    return result.map((node) => ({
        label: node.getText().substring(1),
        kind: vscode_languageserver_1$t.CompletionItemKind.Keyword
    }));
}
function walk$1(node, callback) {
    callback(node);
    if (node.children) {
        node.children.forEach((node) => walk$1(node, callback));
    }
}

var StyleAttributeDocument$1 = {};

Object.defineProperty(StyleAttributeDocument$1, "__esModule", { value: true });
StyleAttributeDocument$1.StyleAttributeDocument = void 0;
const service_1$6 = service$1;
const documents_1$t = documents;
const PREFIX = '__ {';
const SUFFIX = '}';
class StyleAttributeDocument extends documents_1$t.ReadableDocument {
    constructor(parent, attrStart, attrEnd, languageServices) {
        super();
        this.parent = parent;
        this.attrStart = attrStart;
        this.attrEnd = attrEnd;
        this.version = this.parent.version;
        this.languageId = 'css';
        this.stylesheet = (0, service_1$6.getLanguageService)(languageServices).parseStylesheet(this);
    }
    getOriginalPosition(pos) {
        const parentOffset = this.attrStart + this.offsetAt(pos) - PREFIX.length;
        return this.parent.positionAt(parentOffset);
    }
    getGeneratedPosition(pos) {
        const fragmentOffset = this.parent.offsetAt(pos) - this.attrStart + PREFIX.length;
        return this.positionAt(fragmentOffset);
    }
    isInGenerated(pos) {
        const offset = this.parent.offsetAt(pos);
        return offset >= this.attrStart && offset <= this.attrEnd;
    }
    getText() {
        return PREFIX + this.parent.getText().slice(this.attrStart, this.attrEnd) + SUFFIX;
    }
    getTextLength() {
        return PREFIX.length + this.attrEnd - this.attrStart + SUFFIX.length;
    }
    getFilePath() {
        return this.parent.getFilePath();
    }
    getURL() {
        return this.parent.getURL();
    }
}
StyleAttributeDocument$1.StyleAttributeDocument = StyleAttributeDocument;

var documentContext = {};

Object.defineProperty(documentContext, "__esModule", { value: true });
documentContext.getDocumentContext = getDocumentContext;
const vscode_uri_1$2 = umdExports;
function getDocumentContext(documentUri, workspaceFolders) {
    function getRootFolder() {
        for (const folder of workspaceFolders) {
            let folderURI = folder.uri;
            if (!folderURI.endsWith('/')) {
                folderURI = folderURI + '/';
            }
            if (documentUri.startsWith(folderURI)) {
                return folderURI;
            }
        }
        return undefined;
    }
    return {
        resolveReference: (ref, base = documentUri) => {
            if (ref[0] === '/') {
                const folderUri = getRootFolder();
                if (folderUri) {
                    return folderUri + ref.substr(1);
                }
            }
            base = base.substr(0, base.lastIndexOf('/') + 1);
            return vscode_uri_1$2.Utils.resolvePath(vscode_uri_1$2.URI.parse(base), ref).toString();
        }
    };
}

var indentFolding = {};

Object.defineProperty(indentFolding, "__esModule", { value: true });
indentFolding.indentBasedFoldingRangeForTag = indentBasedFoldingRangeForTag;
indentFolding.indentBasedFoldingRange = indentBasedFoldingRange;
indentFolding.guessTabSize = guessTabSize;
const lodash_1$2 = lodashExports;
function indentBasedFoldingRangeForTag(document, tag) {
    if (tag.startPos.line === tag.endPos.line) {
        return [];
    }
    const startLine = tag.startPos.line + 1;
    const endLine = tag.endPos.line - 1;
    if (startLine > endLine || startLine === endLine) {
        return [];
    }
    return indentBasedFoldingRange({ document, ranges: [{ startLine, endLine }] });
}
function indentBasedFoldingRange({ document, ranges, skipFold }) {
    const text = document.getText();
    const lines = text.split(/\r?\n/);
    const indents = lines
        .map((line, index) => ({
        ...collectIndents(line),
        index
    }))
        .filter((line) => !line.empty);
    const tabs = (0, lodash_1$2.sum)(indents.map((l) => l.tabCount));
    const spaces = (0, lodash_1$2.sum)(indents.map((l) => l.spaceCount));
    const tabSize = tabs && spaces ? guessTabSize(indents) : 4;
    let currentIndent;
    const result = [];
    const unfinishedFolds = new Map();
    ranges ??= [{ startLine: 0, endLine: lines.length - 1 }];
    let rangeIndex = 0;
    let range = ranges[rangeIndex++];
    if (!range) {
        return [];
    }
    for (const indentInfo of indents) {
        if (indentInfo.index < range.startLine || indentInfo.empty) {
            continue;
        }
        if (indentInfo.index > range.endLine) {
            for (const fold of unfinishedFolds.values()) {
                fold.endLine = range.endLine;
            }
            range = ranges[rangeIndex++];
            if (!range) {
                break;
            }
        }
        const lineIndent = indentInfo.tabCount * tabSize + indentInfo.spaceCount;
        currentIndent ??= lineIndent;
        if (lineIndent > currentIndent) {
            const startLine = indentInfo.index - 1;
            if (!skipFold?.(startLine, lines[startLine])) {
                const fold = { startLine, endLine: indentInfo.index };
                unfinishedFolds.set(currentIndent, fold);
                result.push(fold);
            }
            currentIndent = lineIndent;
        }
        if (lineIndent < currentIndent) {
            const last = unfinishedFolds.get(lineIndent);
            unfinishedFolds.delete(lineIndent);
            if (last) {
                last.endLine = Math.max(last.endLine, indentInfo.index - 1);
            }
            currentIndent = lineIndent;
        }
    }
    return result;
}
function collectIndents(line) {
    let tabCount = 0;
    let spaceCount = 0;
    let empty = true;
    for (let index = 0; index < line.length; index++) {
        const char = line[index];
        if (char === '\t') {
            tabCount++;
        }
        else if (char === ' ') {
            spaceCount++;
        }
        else {
            empty = false;
            break;
        }
    }
    return { tabCount, spaceCount, empty };
}
function guessTabSize(nonEmptyLines) {
    if (nonEmptyLines.length === 1) {
        return 4;
    }
    const guessingTabSize = [2, 4, 6, 8, 3, 5, 7];
    const MAX_GUESS = 8;
    const matchCounts = new Map();
    for (let index = 0; index < nonEmptyLines.length; index++) {
        const line = nonEmptyLines[index];
        const previousLine = nonEmptyLines[index - 1] ?? { spaceCount: 0, tabCount: 0 };
        const spaceDiff = Math.abs(line.spaceCount - previousLine.spaceCount);
        const tabDiff = Math.abs(line.tabCount - previousLine.tabCount);
        const diff = tabDiff === 0 ? spaceDiff : spaceDiff % tabDiff === 0 ? spaceDiff / tabDiff : 0;
        if (diff === 0 || diff > MAX_GUESS) {
            continue;
        }
        for (const guess of guessingTabSize) {
            if (diff === guess) {
                matchCounts.set(guess, (matchCounts.get(guess) ?? 0) + 1);
            }
        }
    }
    let max = 0;
    let tabSize;
    for (const [size, count] of matchCounts) {
        max = Math.max(max, count);
        if (max === count) {
            tabSize = size;
        }
    }
    const match4 = matchCounts.get(4);
    const match2 = matchCounts.get(2);
    if (tabSize === 4 && match4 && match4 > 0 && match2 && match2 > 0 && match2 >= match4 / 2) {
        tabSize = 2;
    }
    return tabSize ?? 4;
}

var wordHighlight = {};

Object.defineProperty(wordHighlight, "__esModule", { value: true });
wordHighlight.wordHighlightForTag = wordHighlightForTag;
const vscode_languageserver_types_1$5 = mainExports;
function wordHighlightForTag(document, position, tag, wordPattern) {
    if (!tag || tag.start === tag.end) {
        return null;
    }
    const offset = document.offsetAt(position);
    const text = document.getText();
    if (offset < tag.start ||
        offset > tag.end ||
        !text.slice(offset - 1, offset + 1).trim()) {
        return null;
    }
    const word = wordAt(document, position, wordPattern);
    if (!word) {
        return null;
    }
    const searching = document.getText().slice(tag.start, tag.end);
    const highlights = [];
    let index = 0;
    while (index < searching.length) {
        index = searching.indexOf(word, index);
        if (index === -1) {
            break;
        }
        const start = tag.start + index;
        highlights.push({
            range: {
                start: document.positionAt(start),
                end: document.positionAt(start + word.length)
            },
            kind: vscode_languageserver_types_1$5.DocumentHighlightKind.Text
        });
        index += word.length;
    }
    return highlights;
}
function wordAt(document, position, wordPattern) {
    const line = document
        .getText(vscode_languageserver_types_1$5.Range.create(vscode_languageserver_types_1$5.Position.create(position.line, 0), vscode_languageserver_types_1$5.Position.create(position.line + 1, 0)))
        .trimEnd();
    wordPattern.lastIndex = 0;
    let start;
    let end;
    const matchEnd = Math.min(position.character, line.length);
    while (wordPattern.lastIndex < matchEnd) {
        const match = wordPattern.exec(line);
        if (!match) {
            break;
        }
        start = match.index;
        end = match.index + match[0].length;
    }
    if (start === undefined || end === undefined || end < position.character) {
        return null;
    }
    return line.slice(start, end);
}

Object.defineProperty(CSSPlugin$1, "__esModule", { value: true });
CSSPlugin$1.CSSPlugin = void 0;
const emmet_helper_1$1 = require$$0$1;
const vscode_languageserver_1$s = main$8;
const documents_1$s = documents;
const CSSDocument_1 = CSSDocument$1;
const service_1$5 = service$1;
const global_vars_1 = globalVars;
const getIdClassCompletion_1 = getIdClassCompletion$1;
const parseHtml_1$4 = requireParseHtml();
const StyleAttributeDocument_1 = StyleAttributeDocument$1;
const documentContext_1 = documentContext;
const vscode_languageserver_types_1$4 = mainExports;
const indentFolding_1$2 = indentFolding;
const wordHighlight_1$1 = wordHighlight;
const utils_1$E = utils$6;
const wordPattern$1 = /(#?-?\d*\.\d\w*%?)|(::?[\w-]*(?=[^,{;]*[,{]))|(([@#.!])?[\w-?]+%?|[@#!.])/g;
class CSSPlugin {
    constructor(docManager, configManager, workspaceFolders, cssLanguageServices) {
        this.__name = 'css';
        this.cssDocuments = new WeakMap();
        this.triggerCharacters = ['.', ':', '-', '/'];
        this.cssLanguageServices = cssLanguageServices;
        this.workspaceFolders = workspaceFolders;
        this.configManager = configManager;
        this.updateConfigs();
        const workspacePaths = workspaceFolders
            .map((folder) => (0, utils_1$E.urlToPath)(folder.uri))
            .filter(utils_1$E.isNotNullOrUndefined);
        this.globalVars = new global_vars_1.GlobalVars(workspacePaths);
        this.globalVars.watchFiles(this.configManager.get('css.globals'));
        this.configManager.onChange((config) => {
            this.globalVars.watchFiles(config.get('css.globals'));
            this.updateConfigs();
        });
        const sync = (document) => {
            this.cssDocuments.set(document, new CSSDocument_1.CSSDocument(document, this.cssLanguageServices));
        };
        docManager.on('documentChange', sync);
        docManager.on('documentOpen', sync);
        docManager.on('documentClose', (document) => this.cssDocuments.delete(document));
    }
    getSelectionRange(document, position) {
        if (!this.featureEnabled('selectionRange') || !(0, documents_1$s.isInTag)(position, document.styleInfo)) {
            return null;
        }
        const cssDocument = this.getCSSDoc(document);
        const [range] = this.getLanguageService(extractLanguage(cssDocument)).getSelectionRanges(cssDocument, [cssDocument.getGeneratedPosition(position)], cssDocument.stylesheet);
        if (!range) {
            return null;
        }
        return (0, documents_1$s.mapSelectionRangeToParent)(cssDocument, range);
    }
    getDiagnostics(document) {
        if (!this.featureEnabled('diagnostics')) {
            return [];
        }
        const cssDocument = this.getCSSDoc(document);
        const kind = extractLanguage(cssDocument);
        if (shouldExcludeValidation(kind)) {
            return [];
        }
        return this.getLanguageService(kind)
            .doValidation(cssDocument, cssDocument.stylesheet)
            .map((diagnostic) => ({ ...diagnostic, source: (0, service_1$5.getLanguage)(kind) }))
            .map((diagnostic) => (0, documents_1$s.mapObjWithRangeToOriginal)(cssDocument, diagnostic));
    }
    getDiagnosticsForPullMode(document, previousResultId) {
        if (!this.featureEnabled('diagnostics')) {
            return {
                kind: 'full',
                items: []
            };
        }
        const resultId = document.version.toString();
        if (previousResultId === resultId) {
            return {
                kind: 'unchanged',
                resultId
            };
        }
        const diagnostics = this.getDiagnostics(document);
        return {
            kind: 'full',
            items: diagnostics,
            resultId
        };
    }
    doHover(document, position) {
        if (!this.featureEnabled('hover')) {
            return null;
        }
        const cssDocument = this.getCSSDoc(document);
        if (shouldExcludeHover(cssDocument)) {
            return null;
        }
        if (cssDocument.isInGenerated(position)) {
            return this.doHoverInternal(cssDocument, position);
        }
        const attributeContext = (0, parseHtml_1$4.getAttributeContextAtPosition)(document, position);
        if (attributeContext &&
            this.inStyleAttributeWithoutInterpolation(attributeContext, document.getText())) {
            const [start, end] = attributeContext.valueRange;
            return this.doHoverInternal(new StyleAttributeDocument_1.StyleAttributeDocument(document, start, end, this.cssLanguageServices), position);
        }
        return null;
    }
    doHoverInternal(cssDocument, position) {
        const hoverInfo = this.getLanguageService(extractLanguage(cssDocument)).doHover(cssDocument, cssDocument.getGeneratedPosition(position), cssDocument.stylesheet);
        return hoverInfo ? (0, documents_1$s.mapHoverToParent)(cssDocument, hoverInfo) : hoverInfo;
    }
    async getCompletions(document, position, completionContext) {
        const triggerCharacter = completionContext?.triggerCharacter;
        const triggerKind = completionContext?.triggerKind;
        const isCustomTriggerCharacter = triggerKind === vscode_languageserver_1$s.CompletionTriggerKind.TriggerCharacter;
        if (isCustomTriggerCharacter &&
            triggerCharacter &&
            !this.triggerCharacters.includes(triggerCharacter)) {
            return null;
        }
        if (!this.featureEnabled('completions')) {
            return null;
        }
        const cssDocument = this.getCSSDoc(document);
        if (cssDocument.isInGenerated(position)) {
            return this.getCompletionsInternal(document, position, cssDocument);
        }
        const attributeContext = (0, parseHtml_1$4.getAttributeContextAtPosition)(document, position);
        if (!attributeContext) {
            return null;
        }
        if (this.inStyleAttributeWithoutInterpolation(attributeContext, document.getText())) {
            const [start, end] = attributeContext.valueRange;
            return this.getCompletionsInternal(document, position, new StyleAttributeDocument_1.StyleAttributeDocument(document, start, end, this.cssLanguageServices));
        }
        else {
            return (0, getIdClassCompletion_1.getIdClassCompletion)(cssDocument, attributeContext);
        }
    }
    inStyleAttributeWithoutInterpolation(attrContext, text) {
        return (attrContext.name === 'style' &&
            !!attrContext.valueRange &&
            !text.substring(attrContext.valueRange[0], attrContext.valueRange[1]).includes('{'));
    }
    async getCompletionsInternal(document, position, cssDocument) {
        if (isSASS(cssDocument)) {
            return ((0, emmet_helper_1$1.doComplete)(document, position, 'sass', this.configManager.getEmmetConfig()) ||
                null);
        }
        const type = extractLanguage(cssDocument);
        if (shouldExcludeCompletion(type)) {
            return null;
        }
        const lang = this.getLanguageService(type);
        let emmetResults = {
            isIncomplete: false,
            items: []
        };
        if (this.configManager.getConfig().css.completions.emmet &&
            this.configManager.getEmmetConfig().showExpandedAbbreviation !== 'never') {
            lang.setCompletionParticipants([
                {
                    onCssProperty: (context) => {
                        if (context?.propertyName) {
                            emmetResults =
                                (0, emmet_helper_1$1.doComplete)(cssDocument, cssDocument.getGeneratedPosition(position), (0, service_1$5.getLanguage)(type), this.configManager.getEmmetConfig()) || emmetResults;
                        }
                    },
                    onCssPropertyValue: (context) => {
                        if (context?.propertyValue) {
                            emmetResults =
                                (0, emmet_helper_1$1.doComplete)(cssDocument, cssDocument.getGeneratedPosition(position), (0, service_1$5.getLanguage)(type), this.configManager.getEmmetConfig()) || emmetResults;
                        }
                    }
                }
            ]);
        }
        const results = await lang.doComplete2(cssDocument, cssDocument.getGeneratedPosition(position), cssDocument.stylesheet, (0, documentContext_1.getDocumentContext)(cssDocument.uri, this.workspaceFolders));
        return vscode_languageserver_1$s.CompletionList.create(this.appendGlobalVars([...(results ? results.items : []), ...emmetResults.items].map((completionItem) => (0, documents_1$s.mapCompletionItemToOriginal)(cssDocument, completionItem))),
        emmetResults.items.length > 0);
    }
    appendGlobalVars(items) {
        const value = items.find((item) => item.kind === vscode_languageserver_1$s.CompletionItemKind.Value);
        if (!value) {
            return items;
        }
        const additionalItems = this.globalVars
            .getGlobalVars()
            .map((globalVar) => ({
            label: `var(${globalVar.name})`,
            sortText: '-',
            detail: `${globalVar.filename}\n\n${globalVar.name}: ${globalVar.value}`,
            kind: vscode_languageserver_1$s.CompletionItemKind.Value
        }));
        return [...items, ...additionalItems];
    }
    getDocumentColors(document) {
        if (!this.featureEnabled('documentColors')) {
            return [];
        }
        const cssDocument = this.getCSSDoc(document);
        if (shouldExcludeColor(cssDocument)) {
            return [];
        }
        return this.getLanguageService(extractLanguage(cssDocument))
            .findDocumentColors(cssDocument, cssDocument.stylesheet)
            .map((colorInfo) => (0, documents_1$s.mapObjWithRangeToOriginal)(cssDocument, colorInfo));
    }
    getColorPresentations(document, range, color) {
        if (!this.featureEnabled('colorPresentations')) {
            return [];
        }
        const cssDocument = this.getCSSDoc(document);
        if ((!cssDocument.isInGenerated(range.start) && !cssDocument.isInGenerated(range.end)) ||
            shouldExcludeColor(cssDocument)) {
            return [];
        }
        return this.getLanguageService(extractLanguage(cssDocument))
            .getColorPresentations(cssDocument, cssDocument.stylesheet, color, (0, documents_1$s.mapRangeToGenerated)(cssDocument, range))
            .map((colorPres) => (0, documents_1$s.mapColorPresentationToOriginal)(cssDocument, colorPres));
    }
    getDocumentSymbols(document) {
        if (!this.featureEnabled('documentColors')) {
            return [];
        }
        const cssDocument = this.getCSSDoc(document);
        if (shouldExcludeDocumentSymbols(cssDocument)) {
            return [];
        }
        return this.getLanguageService(extractLanguage(cssDocument))
            .findDocumentSymbols(cssDocument, cssDocument.stylesheet)
            .map((symbol) => {
            if (!symbol.containerName) {
                return {
                    ...symbol,
                    containerName: 'style'
                };
            }
            return symbol;
        })
            .map((symbol) => (0, documents_1$s.mapSymbolInformationToOriginal)(cssDocument, symbol));
    }
    getFoldingRanges(document) {
        if (!document.styleInfo) {
            return [];
        }
        const cssDocument = this.getCSSDoc(document);
        if (shouldUseIndentBasedFolding(cssDocument.languageId)) {
            return this.nonSyntacticFolding(document, document.styleInfo);
        }
        return this.getLanguageService(extractLanguage(cssDocument))
            .getFoldingRanges(cssDocument)
            .map((range) => {
            const originalRange = (0, documents_1$s.mapRangeToOriginal)(cssDocument, {
                start: { line: range.startLine, character: range.startCharacter ?? 0 },
                end: { line: range.endLine, character: range.endCharacter ?? 0 }
            });
            return {
                startLine: originalRange.start.line,
                endLine: originalRange.end.line,
                kind: range.kind
            };
        });
    }
    nonSyntacticFolding(document, styleInfo) {
        const ranges = (0, indentFolding_1$2.indentBasedFoldingRangeForTag)(document, styleInfo);
        const startRegion = /^\s*(\/\/|\/\*\*?)\s*#?region\b/;
        const endRegion = /^\s*(\/\/|\/\*\*?)\s*#?endregion\b/;
        const lines = document
            .getText()
            .split(/\r?\n/)
            .slice(styleInfo.startPos.line, styleInfo.endPos.line);
        let start = -1;
        for (let index = 0; index < lines.length; index++) {
            const line = lines[index];
            if (startRegion.test(line)) {
                start = index;
            }
            else if (endRegion.test(line)) {
                if (start >= 0) {
                    ranges.push({
                        startLine: start + styleInfo.startPos.line,
                        endLine: index + styleInfo.startPos.line,
                        kind: vscode_languageserver_types_1$4.FoldingRangeKind.Region
                    });
                }
                start = -1;
            }
        }
        return ranges.sort((a, b) => a.startLine - b.startLine);
    }
    findDocumentHighlight(document, position) {
        const cssDocument = this.getCSSDoc(document);
        if (cssDocument.isInGenerated(position)) {
            if (shouldExcludeDocumentHighlights(cssDocument)) {
                return (0, wordHighlight_1$1.wordHighlightForTag)(document, position, document.styleInfo, wordPattern$1);
            }
            return this.findDocumentHighlightInternal(cssDocument, position);
        }
        const attributeContext = (0, parseHtml_1$4.getAttributeContextAtPosition)(document, position);
        if (attributeContext &&
            this.inStyleAttributeWithoutInterpolation(attributeContext, document.getText())) {
            const [start, end] = attributeContext.valueRange;
            return this.findDocumentHighlightInternal(new StyleAttributeDocument_1.StyleAttributeDocument(document, start, end, this.cssLanguageServices), position);
        }
        return null;
    }
    findDocumentHighlightInternal(cssDocument, position) {
        const kind = extractLanguage(cssDocument);
        const result = (0, service_1$5.getLanguageService)(this.cssLanguageServices, kind)
            .findDocumentHighlights(cssDocument, cssDocument.getGeneratedPosition(position), cssDocument.stylesheet)
            .map((highlight) => (0, documents_1$s.mapObjWithRangeToOriginal)(cssDocument, highlight));
        return result;
    }
    getCSSDoc(document) {
        let cssDoc = this.cssDocuments.get(document);
        if (!cssDoc || cssDoc.version < document.version) {
            cssDoc = new CSSDocument_1.CSSDocument(document, this.cssLanguageServices);
            this.cssDocuments.set(document, cssDoc);
        }
        return cssDoc;
    }
    updateConfigs() {
        this.getLanguageService('css')?.configure(this.configManager.getCssConfig());
        this.getLanguageService('scss')?.configure(this.configManager.getScssConfig());
        this.getLanguageService('less')?.configure(this.configManager.getLessConfig());
    }
    featureEnabled(feature) {
        return (this.configManager.enabled('css.enable') &&
            this.configManager.enabled(`css.${feature}.enable`));
    }
    getLanguageService(kind) {
        return (0, service_1$5.getLanguageService)(this.cssLanguageServices, kind);
    }
}
CSSPlugin$1.CSSPlugin = CSSPlugin;
function shouldExcludeValidation(kind) {
    switch (kind) {
        case 'postcss':
        case 'sass':
        case 'stylus':
        case 'styl':
            return true;
        default:
            return false;
    }
}
function shouldExcludeCompletion(kind) {
    switch (kind) {
        case 'stylus':
        case 'styl':
            return true;
        default:
            return false;
    }
}
function shouldExcludeDocumentSymbols(document) {
    switch (extractLanguage(document)) {
        case 'sass':
        case 'stylus':
        case 'styl':
            return true;
        default:
            return false;
    }
}
function shouldExcludeHover(document) {
    switch (extractLanguage(document)) {
        case 'sass':
        case 'stylus':
        case 'styl':
            return true;
        default:
            return false;
    }
}
function shouldExcludeColor(document) {
    switch (extractLanguage(document)) {
        case 'sass':
        case 'stylus':
        case 'styl':
            return true;
        default:
            return false;
    }
}
function shouldUseIndentBasedFolding(kind) {
    switch (kind) {
        case 'postcss':
        case 'sass':
        case 'stylus':
        case 'styl':
            return true;
        default:
            return false;
    }
}
function shouldExcludeDocumentHighlights(document) {
    switch (extractLanguage(document)) {
        case 'postcss':
        case 'sass':
        case 'stylus':
        case 'styl':
            return true;
        default:
            return false;
    }
}
function isSASS(document) {
    switch (extractLanguage(document)) {
        case 'sass':
            return true;
        default:
            return false;
    }
}
function extractLanguage(document) {
    const lang = document.languageId;
    return lang.replace(/^text\//, '');
}

var TypeScriptPlugin$1 = {};

var SnapshotManager$1 = {};

var DocumentSnapshot = {};

var lib = function dedent(templateStrings) {
    var values = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        values[_i - 1] = arguments[_i];
    }
    var matches = [];
    var strings = typeof templateStrings === 'string' ? [templateStrings] : templateStrings.slice();
    strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, '');
    for (var i = 0; i < strings.length; i++) {
        var match = void 0;
        if (match = strings[i].match(/\n[\t ]+/g)) {
            matches.push.apply(matches, match);
        }
    }
    if (matches.length) {
        var size = Math.min.apply(Math, matches.map(function (value) { return value.length - 1; }));
        var pattern = new RegExp("\n[\t ]{" + size + "}", 'g');
        for (var i = 0; i < strings.length; i++) {
            strings[i] = strings[i].replace(pattern, '\n');
        }
    }
    strings[0] = strings[0].replace(/^\r?\n/, '');
    var string = strings[0];
    for (var i = 0; i < values.length; i++) {
        string += values[i] + strings[i + 1];
    }
    return string;
};
var dedent = getDefaultExportFromCjs(lib);

const NUMBER_CHAR_RE = /\d/;
const STR_SPLITTERS = ["-", "_", "/", "."];
function isUppercase(char = "") {
  if (NUMBER_CHAR_RE.test(char)) {
    return void 0;
  }
  return char !== char.toLowerCase();
}
function splitByCase(str, separators) {
  const splitters = separators ?? STR_SPLITTERS;
  const parts = [];
  if (!str || typeof str !== "string") {
    return parts;
  }
  let buff = "";
  let previousUpper;
  let previousSplitter;
  for (const char of str) {
    const isSplitter = splitters.includes(char);
    if (isSplitter === true) {
      parts.push(buff);
      buff = "";
      previousUpper = void 0;
      continue;
    }
    const isUpper = isUppercase(char);
    if (previousSplitter === false) {
      if (previousUpper === false && isUpper === true) {
        parts.push(buff);
        buff = char;
        previousUpper = isUpper;
        continue;
      }
      if (previousUpper === true && isUpper === false && buff.length > 1) {
        const lastChar = buff.at(-1);
        parts.push(buff.slice(0, Math.max(0, buff.length - 1)));
        buff = lastChar + char;
        previousUpper = isUpper;
        continue;
      }
    }
    buff += char;
    previousUpper = isUpper;
    previousSplitter = isSplitter;
  }
  parts.push(buff);
  return parts;
}
function upperFirst(str) {
  return str ? str[0].toUpperCase() + str.slice(1) : "";
}
function pascalCase(str, opts) {
  return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => upperFirst(opts?.normalize ? p.toLowerCase() : p)).join("") : "";
}

const comma = ','.charCodeAt(0);
const semicolon = ';'.charCodeAt(0);
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
const intToChar = new Uint8Array(64);
const charToInt = new Uint8Array(128);
for (let i = 0; i < chars.length; i++) {
    const c = chars.charCodeAt(i);
    intToChar[i] = c;
    charToInt[c] = i;
}
function encodeInteger(builder, num, relative) {
    let delta = num - relative;
    delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;
    do {
        let clamped = delta & 0b011111;
        delta >>>= 5;
        if (delta > 0)
            clamped |= 0b100000;
        builder.write(intToChar[clamped]);
    } while (delta > 0);
    return num;
}
const bufLength = 1024 * 16;
const td = typeof TextDecoder !== 'undefined'
    ?  new TextDecoder()
    : typeof Buffer !== 'undefined'
        ? {
            decode(buf) {
                const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
                return out.toString();
            },
        }
        : {
            decode(buf) {
                let out = '';
                for (let i = 0; i < buf.length; i++) {
                    out += String.fromCharCode(buf[i]);
                }
                return out;
            },
        };
class StringWriter {
    constructor() {
        this.pos = 0;
        this.out = '';
        this.buffer = new Uint8Array(bufLength);
    }
    write(v) {
        const { buffer } = this;
        buffer[this.pos++] = v;
        if (this.pos === bufLength) {
            this.out += td.decode(buffer);
            this.pos = 0;
        }
    }
    flush() {
        const { buffer, out, pos } = this;
        return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
    }
}
function encode(decoded) {
    const writer = new StringWriter();
    let sourcesIndex = 0;
    let sourceLine = 0;
    let sourceColumn = 0;
    let namesIndex = 0;
    for (let i = 0; i < decoded.length; i++) {
        const line = decoded[i];
        if (i > 0)
            writer.write(semicolon);
        if (line.length === 0)
            continue;
        let genColumn = 0;
        for (let j = 0; j < line.length; j++) {
            const segment = line[j];
            if (j > 0)
                writer.write(comma);
            genColumn = encodeInteger(writer, segment[0], genColumn);
            if (segment.length === 1)
                continue;
            sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
            sourceLine = encodeInteger(writer, segment[2], sourceLine);
            sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
            if (segment.length === 4)
                continue;
            namesIndex = encodeInteger(writer, segment[4], namesIndex);
        }
    }
    return writer.flush();
}
class BitSet {
	constructor(arg) {
		this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
	}
	add(n) {
		this.bits[n >> 5] |= 1 << (n & 31);
	}
	has(n) {
		return !!(this.bits[n >> 5] & (1 << (n & 31)));
	}
}
class Chunk {
	constructor(start, end, content) {
		this.start = start;
		this.end = end;
		this.original = content;
		this.intro = '';
		this.outro = '';
		this.content = content;
		this.storeName = false;
		this.edited = false;
		{
			this.previous = null;
			this.next = null;
		}
	}
	appendLeft(content) {
		this.outro += content;
	}
	appendRight(content) {
		this.intro = this.intro + content;
	}
	clone() {
		const chunk = new Chunk(this.start, this.end, this.original);
		chunk.intro = this.intro;
		chunk.outro = this.outro;
		chunk.content = this.content;
		chunk.storeName = this.storeName;
		chunk.edited = this.edited;
		return chunk;
	}
	contains(index) {
		return this.start < index && index < this.end;
	}
	eachNext(fn) {
		let chunk = this;
		while (chunk) {
			fn(chunk);
			chunk = chunk.next;
		}
	}
	eachPrevious(fn) {
		let chunk = this;
		while (chunk) {
			fn(chunk);
			chunk = chunk.previous;
		}
	}
	edit(content, storeName, contentOnly) {
		this.content = content;
		if (!contentOnly) {
			this.intro = '';
			this.outro = '';
		}
		this.storeName = storeName;
		this.edited = true;
		return this;
	}
	prependLeft(content) {
		this.outro = content + this.outro;
	}
	prependRight(content) {
		this.intro = content + this.intro;
	}
	reset() {
		this.intro = '';
		this.outro = '';
		if (this.edited) {
			this.content = this.original;
			this.storeName = false;
			this.edited = false;
		}
	}
	split(index) {
		const sliceIndex = index - this.start;
		const originalBefore = this.original.slice(0, sliceIndex);
		const originalAfter = this.original.slice(sliceIndex);
		this.original = originalBefore;
		const newChunk = new Chunk(index, this.end, originalAfter);
		newChunk.outro = this.outro;
		this.outro = '';
		this.end = index;
		if (this.edited) {
			newChunk.edit('', false);
			this.content = '';
		} else {
			this.content = originalBefore;
		}
		newChunk.next = this.next;
		if (newChunk.next) newChunk.next.previous = newChunk;
		newChunk.previous = this;
		this.next = newChunk;
		return newChunk;
	}
	toString() {
		return this.intro + this.content + this.outro;
	}
	trimEnd(rx) {
		this.outro = this.outro.replace(rx, '');
		if (this.outro.length) return true;
		const trimmed = this.content.replace(rx, '');
		if (trimmed.length) {
			if (trimmed !== this.content) {
				this.split(this.start + trimmed.length).edit('', undefined, true);
				if (this.edited) {
					this.edit(trimmed, this.storeName, true);
				}
			}
			return true;
		} else {
			this.edit('', undefined, true);
			this.intro = this.intro.replace(rx, '');
			if (this.intro.length) return true;
		}
	}
	trimStart(rx) {
		this.intro = this.intro.replace(rx, '');
		if (this.intro.length) return true;
		const trimmed = this.content.replace(rx, '');
		if (trimmed.length) {
			if (trimmed !== this.content) {
				const newChunk = this.split(this.end - trimmed.length);
				if (this.edited) {
					newChunk.edit(trimmed, this.storeName, true);
				}
				this.edit('', undefined, true);
			}
			return true;
		} else {
			this.edit('', undefined, true);
			this.outro = this.outro.replace(rx, '');
			if (this.outro.length) return true;
		}
	}
}
function getBtoa() {
	if (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {
		return (str) => globalThis.btoa(unescape(encodeURIComponent(str)));
	} else if (typeof Buffer === 'function') {
		return (str) => Buffer.from(str, 'utf-8').toString('base64');
	} else {
		return () => {
			throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');
		};
	}
}
const btoa =  getBtoa();
class SourceMap {
	constructor(properties) {
		this.version = 3;
		this.file = properties.file;
		this.sources = properties.sources;
		this.sourcesContent = properties.sourcesContent;
		this.names = properties.names;
		this.mappings = encode(properties.mappings);
		if (typeof properties.x_google_ignoreList !== 'undefined') {
			this.x_google_ignoreList = properties.x_google_ignoreList;
		}
	}
	toString() {
		return JSON.stringify(this);
	}
	toUrl() {
		return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());
	}
}
function guessIndent(code) {
	const lines = code.split('\n');
	const tabbed = lines.filter((line) => /^\t+/.test(line));
	const spaced = lines.filter((line) => /^ {2,}/.test(line));
	if (tabbed.length === 0 && spaced.length === 0) {
		return null;
	}
	if (tabbed.length >= spaced.length) {
		return '\t';
	}
	const min = spaced.reduce((previous, current) => {
		const numSpaces = /^ +/.exec(current)[0].length;
		return Math.min(numSpaces, previous);
	}, Infinity);
	return new Array(min + 1).join(' ');
}
function getRelativePath(from, to) {
	const fromParts = from.split(/[/\\]/);
	const toParts = to.split(/[/\\]/);
	fromParts.pop();
	while (fromParts[0] === toParts[0]) {
		fromParts.shift();
		toParts.shift();
	}
	if (fromParts.length) {
		let i = fromParts.length;
		while (i--) fromParts[i] = '..';
	}
	return fromParts.concat(toParts).join('/');
}
const toString = Object.prototype.toString;
function isObject(thing) {
	return toString.call(thing) === '[object Object]';
}
function getLocator(source) {
	const originalLines = source.split('\n');
	const lineOffsets = [];
	for (let i = 0, pos = 0; i < originalLines.length; i++) {
		lineOffsets.push(pos);
		pos += originalLines[i].length + 1;
	}
	return function locate(index) {
		let i = 0;
		let j = lineOffsets.length;
		while (i < j) {
			const m = (i + j) >> 1;
			if (index < lineOffsets[m]) {
				j = m;
			} else {
				i = m + 1;
			}
		}
		const line = i - 1;
		const column = index - lineOffsets[line];
		return { line, column };
	};
}
const wordRegex = /\w/;
class Mappings {
	constructor(hires) {
		this.hires = hires;
		this.generatedCodeLine = 0;
		this.generatedCodeColumn = 0;
		this.raw = [];
		this.rawSegments = this.raw[this.generatedCodeLine] = [];
		this.pending = null;
	}
	addEdit(sourceIndex, content, loc, nameIndex) {
		if (content.length) {
			const contentLengthMinusOne = content.length - 1;
			let contentLineEnd = content.indexOf('\n', 0);
			let previousContentLineEnd = -1;
			while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {
				const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
				if (nameIndex >= 0) {
					segment.push(nameIndex);
				}
				this.rawSegments.push(segment);
				this.generatedCodeLine += 1;
				this.raw[this.generatedCodeLine] = this.rawSegments = [];
				this.generatedCodeColumn = 0;
				previousContentLineEnd = contentLineEnd;
				contentLineEnd = content.indexOf('\n', contentLineEnd + 1);
			}
			const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
			if (nameIndex >= 0) {
				segment.push(nameIndex);
			}
			this.rawSegments.push(segment);
			this.advance(content.slice(previousContentLineEnd + 1));
		} else if (this.pending) {
			this.rawSegments.push(this.pending);
			this.advance(content);
		}
		this.pending = null;
	}
	addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {
		let originalCharIndex = chunk.start;
		let first = true;
		let charInHiresBoundary = false;
		while (originalCharIndex < chunk.end) {
			if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
				const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
				if (this.hires === 'boundary') {
					if (wordRegex.test(original[originalCharIndex])) {
						if (!charInHiresBoundary) {
							this.rawSegments.push(segment);
							charInHiresBoundary = true;
						}
					} else {
						this.rawSegments.push(segment);
						charInHiresBoundary = false;
					}
				} else {
					this.rawSegments.push(segment);
				}
			}
			if (original[originalCharIndex] === '\n') {
				loc.line += 1;
				loc.column = 0;
				this.generatedCodeLine += 1;
				this.raw[this.generatedCodeLine] = this.rawSegments = [];
				this.generatedCodeColumn = 0;
				first = true;
			} else {
				loc.column += 1;
				this.generatedCodeColumn += 1;
				first = false;
			}
			originalCharIndex += 1;
		}
		this.pending = null;
	}
	advance(str) {
		if (!str) return;
		const lines = str.split('\n');
		if (lines.length > 1) {
			for (let i = 0; i < lines.length - 1; i++) {
				this.generatedCodeLine++;
				this.raw[this.generatedCodeLine] = this.rawSegments = [];
			}
			this.generatedCodeColumn = 0;
		}
		this.generatedCodeColumn += lines[lines.length - 1].length;
	}
}
const n = '\n';
const warned = {
	insertLeft: false,
	insertRight: false,
	storeName: false,
};
class MagicString {
	constructor(string, options = {}) {
		const chunk = new Chunk(0, string.length, string);
		Object.defineProperties(this, {
			original: { writable: true, value: string },
			outro: { writable: true, value: '' },
			intro: { writable: true, value: '' },
			firstChunk: { writable: true, value: chunk },
			lastChunk: { writable: true, value: chunk },
			lastSearchedChunk: { writable: true, value: chunk },
			byStart: { writable: true, value: {} },
			byEnd: { writable: true, value: {} },
			filename: { writable: true, value: options.filename },
			indentExclusionRanges: { writable: true, value: options.indentExclusionRanges },
			sourcemapLocations: { writable: true, value: new BitSet() },
			storedNames: { writable: true, value: {} },
			indentStr: { writable: true, value: undefined },
			ignoreList: { writable: true, value: options.ignoreList },
		});
		this.byStart[0] = chunk;
		this.byEnd[string.length] = chunk;
	}
	addSourcemapLocation(char) {
		this.sourcemapLocations.add(char);
	}
	append(content) {
		if (typeof content !== 'string') throw new TypeError('outro content must be a string');
		this.outro += content;
		return this;
	}
	appendLeft(index, content) {
		if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
		this._split(index);
		const chunk = this.byEnd[index];
		if (chunk) {
			chunk.appendLeft(content);
		} else {
			this.intro += content;
		}
		return this;
	}
	appendRight(index, content) {
		if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
		this._split(index);
		const chunk = this.byStart[index];
		if (chunk) {
			chunk.appendRight(content);
		} else {
			this.outro += content;
		}
		return this;
	}
	clone() {
		const cloned = new MagicString(this.original, { filename: this.filename });
		let originalChunk = this.firstChunk;
		let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());
		while (originalChunk) {
			cloned.byStart[clonedChunk.start] = clonedChunk;
			cloned.byEnd[clonedChunk.end] = clonedChunk;
			const nextOriginalChunk = originalChunk.next;
			const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();
			if (nextClonedChunk) {
				clonedChunk.next = nextClonedChunk;
				nextClonedChunk.previous = clonedChunk;
				clonedChunk = nextClonedChunk;
			}
			originalChunk = nextOriginalChunk;
		}
		cloned.lastChunk = clonedChunk;
		if (this.indentExclusionRanges) {
			cloned.indentExclusionRanges = this.indentExclusionRanges.slice();
		}
		cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
		cloned.intro = this.intro;
		cloned.outro = this.outro;
		return cloned;
	}
	generateDecodedMap(options) {
		options = options || {};
		const sourceIndex = 0;
		const names = Object.keys(this.storedNames);
		const mappings = new Mappings(options.hires);
		const locate = getLocator(this.original);
		if (this.intro) {
			mappings.advance(this.intro);
		}
		this.firstChunk.eachNext((chunk) => {
			const loc = locate(chunk.start);
			if (chunk.intro.length) mappings.advance(chunk.intro);
			if (chunk.edited) {
				mappings.addEdit(
					sourceIndex,
					chunk.content,
					loc,
					chunk.storeName ? names.indexOf(chunk.original) : -1,
				);
			} else {
				mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);
			}
			if (chunk.outro.length) mappings.advance(chunk.outro);
		});
		return {
			file: options.file ? options.file.split(/[/\\]/).pop() : undefined,
			sources: [
				options.source ? getRelativePath(options.file || '', options.source) : options.file || '',
			],
			sourcesContent: options.includeContent ? [this.original] : undefined,
			names,
			mappings: mappings.raw,
			x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,
		};
	}
	generateMap(options) {
		return new SourceMap(this.generateDecodedMap(options));
	}
	_ensureindentStr() {
		if (this.indentStr === undefined) {
			this.indentStr = guessIndent(this.original);
		}
	}
	_getRawIndentString() {
		this._ensureindentStr();
		return this.indentStr;
	}
	getIndentString() {
		this._ensureindentStr();
		return this.indentStr === null ? '\t' : this.indentStr;
	}
	indent(indentStr, options) {
		const pattern = /^[^\r\n]/gm;
		if (isObject(indentStr)) {
			options = indentStr;
			indentStr = undefined;
		}
		if (indentStr === undefined) {
			this._ensureindentStr();
			indentStr = this.indentStr || '\t';
		}
		if (indentStr === '') return this;
		options = options || {};
		const isExcluded = {};
		if (options.exclude) {
			const exclusions =
				typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;
			exclusions.forEach((exclusion) => {
				for (let i = exclusion[0]; i < exclusion[1]; i += 1) {
					isExcluded[i] = true;
				}
			});
		}
		let shouldIndentNextCharacter = options.indentStart !== false;
		const replacer = (match) => {
			if (shouldIndentNextCharacter) return `${indentStr}${match}`;
			shouldIndentNextCharacter = true;
			return match;
		};
		this.intro = this.intro.replace(pattern, replacer);
		let charIndex = 0;
		let chunk = this.firstChunk;
		while (chunk) {
			const end = chunk.end;
			if (chunk.edited) {
				if (!isExcluded[charIndex]) {
					chunk.content = chunk.content.replace(pattern, replacer);
					if (chunk.content.length) {
						shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n';
					}
				}
			} else {
				charIndex = chunk.start;
				while (charIndex < end) {
					if (!isExcluded[charIndex]) {
						const char = this.original[charIndex];
						if (char === '\n') {
							shouldIndentNextCharacter = true;
						} else if (char !== '\r' && shouldIndentNextCharacter) {
							shouldIndentNextCharacter = false;
							if (charIndex === chunk.start) {
								chunk.prependRight(indentStr);
							} else {
								this._splitChunk(chunk, charIndex);
								chunk = chunk.next;
								chunk.prependRight(indentStr);
							}
						}
					}
					charIndex += 1;
				}
			}
			charIndex = chunk.end;
			chunk = chunk.next;
		}
		this.outro = this.outro.replace(pattern, replacer);
		return this;
	}
	insert() {
		throw new Error(
			'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',
		);
	}
	insertLeft(index, content) {
		if (!warned.insertLeft) {
			console.warn(
				'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',
			);
			warned.insertLeft = true;
		}
		return this.appendLeft(index, content);
	}
	insertRight(index, content) {
		if (!warned.insertRight) {
			console.warn(
				'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',
			);
			warned.insertRight = true;
		}
		return this.prependRight(index, content);
	}
	move(start, end, index) {
		if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');
		this._split(start);
		this._split(end);
		this._split(index);
		const first = this.byStart[start];
		const last = this.byEnd[end];
		const oldLeft = first.previous;
		const oldRight = last.next;
		const newRight = this.byStart[index];
		if (!newRight && last === this.lastChunk) return this;
		const newLeft = newRight ? newRight.previous : this.lastChunk;
		if (oldLeft) oldLeft.next = oldRight;
		if (oldRight) oldRight.previous = oldLeft;
		if (newLeft) newLeft.next = first;
		if (newRight) newRight.previous = last;
		if (!first.previous) this.firstChunk = last.next;
		if (!last.next) {
			this.lastChunk = first.previous;
			this.lastChunk.next = null;
		}
		first.previous = newLeft;
		last.next = newRight || null;
		if (!newLeft) this.firstChunk = first;
		if (!newRight) this.lastChunk = last;
		return this;
	}
	overwrite(start, end, content, options) {
		options = options || {};
		return this.update(start, end, content, { ...options, overwrite: !options.contentOnly });
	}
	update(start, end, content, options) {
		if (typeof content !== 'string') throw new TypeError('replacement content must be a string');
		if (this.original.length !== 0) {
			while (start < 0) start += this.original.length;
			while (end < 0) end += this.original.length;
		}
		if (end > this.original.length) throw new Error('end is out of bounds');
		if (start === end)
			throw new Error(
				'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',
			);
		this._split(start);
		this._split(end);
		if (options === true) {
			if (!warned.storeName) {
				console.warn(
					'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',
				);
				warned.storeName = true;
			}
			options = { storeName: true };
		}
		const storeName = options !== undefined ? options.storeName : false;
		const overwrite = options !== undefined ? options.overwrite : false;
		if (storeName) {
			const original = this.original.slice(start, end);
			Object.defineProperty(this.storedNames, original, {
				writable: true,
				value: true,
				enumerable: true,
			});
		}
		const first = this.byStart[start];
		const last = this.byEnd[end];
		if (first) {
			let chunk = first;
			while (chunk !== last) {
				if (chunk.next !== this.byStart[chunk.end]) {
					throw new Error('Cannot overwrite across a split point');
				}
				chunk = chunk.next;
				chunk.edit('', false);
			}
			first.edit(content, storeName, !overwrite);
		} else {
			const newChunk = new Chunk(start, end, '').edit(content, storeName);
			last.next = newChunk;
			newChunk.previous = last;
		}
		return this;
	}
	prepend(content) {
		if (typeof content !== 'string') throw new TypeError('outro content must be a string');
		this.intro = content + this.intro;
		return this;
	}
	prependLeft(index, content) {
		if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
		this._split(index);
		const chunk = this.byEnd[index];
		if (chunk) {
			chunk.prependLeft(content);
		} else {
			this.intro = content + this.intro;
		}
		return this;
	}
	prependRight(index, content) {
		if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
		this._split(index);
		const chunk = this.byStart[index];
		if (chunk) {
			chunk.prependRight(content);
		} else {
			this.outro = content + this.outro;
		}
		return this;
	}
	remove(start, end) {
		if (this.original.length !== 0) {
			while (start < 0) start += this.original.length;
			while (end < 0) end += this.original.length;
		}
		if (start === end) return this;
		if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');
		if (start > end) throw new Error('end must be greater than start');
		this._split(start);
		this._split(end);
		let chunk = this.byStart[start];
		while (chunk) {
			chunk.intro = '';
			chunk.outro = '';
			chunk.edit('');
			chunk = end > chunk.end ? this.byStart[chunk.end] : null;
		}
		return this;
	}
	reset(start, end) {
		if (this.original.length !== 0) {
			while (start < 0) start += this.original.length;
			while (end < 0) end += this.original.length;
		}
		if (start === end) return this;
		if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');
		if (start > end) throw new Error('end must be greater than start');
		this._split(start);
		this._split(end);
		let chunk = this.byStart[start];
		while (chunk) {
			chunk.reset();
			chunk = end > chunk.end ? this.byStart[chunk.end] : null;
		}
		return this;
	}
	lastChar() {
		if (this.outro.length) return this.outro[this.outro.length - 1];
		let chunk = this.lastChunk;
		do {
			if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];
			if (chunk.content.length) return chunk.content[chunk.content.length - 1];
			if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];
		} while ((chunk = chunk.previous));
		if (this.intro.length) return this.intro[this.intro.length - 1];
		return '';
	}
	lastLine() {
		let lineIndex = this.outro.lastIndexOf(n);
		if (lineIndex !== -1) return this.outro.substr(lineIndex + 1);
		let lineStr = this.outro;
		let chunk = this.lastChunk;
		do {
			if (chunk.outro.length > 0) {
				lineIndex = chunk.outro.lastIndexOf(n);
				if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;
				lineStr = chunk.outro + lineStr;
			}
			if (chunk.content.length > 0) {
				lineIndex = chunk.content.lastIndexOf(n);
				if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;
				lineStr = chunk.content + lineStr;
			}
			if (chunk.intro.length > 0) {
				lineIndex = chunk.intro.lastIndexOf(n);
				if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;
				lineStr = chunk.intro + lineStr;
			}
		} while ((chunk = chunk.previous));
		lineIndex = this.intro.lastIndexOf(n);
		if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;
		return this.intro + lineStr;
	}
	slice(start = 0, end = this.original.length) {
		if (this.original.length !== 0) {
			while (start < 0) start += this.original.length;
			while (end < 0) end += this.original.length;
		}
		let result = '';
		let chunk = this.firstChunk;
		while (chunk && (chunk.start > start || chunk.end <= start)) {
			if (chunk.start < end && chunk.end >= end) {
				return result;
			}
			chunk = chunk.next;
		}
		if (chunk && chunk.edited && chunk.start !== start)
			throw new Error(`Cannot use replaced character ${start} as slice start anchor.`);
		const startChunk = chunk;
		while (chunk) {
			if (chunk.intro && (startChunk !== chunk || chunk.start === start)) {
				result += chunk.intro;
			}
			const containsEnd = chunk.start < end && chunk.end >= end;
			if (containsEnd && chunk.edited && chunk.end !== end)
				throw new Error(`Cannot use replaced character ${end} as slice end anchor.`);
			const sliceStart = startChunk === chunk ? start - chunk.start : 0;
			const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;
			result += chunk.content.slice(sliceStart, sliceEnd);
			if (chunk.outro && (!containsEnd || chunk.end === end)) {
				result += chunk.outro;
			}
			if (containsEnd) {
				break;
			}
			chunk = chunk.next;
		}
		return result;
	}
	snip(start, end) {
		const clone = this.clone();
		clone.remove(0, start);
		clone.remove(end, clone.original.length);
		return clone;
	}
	_split(index) {
		if (this.byStart[index] || this.byEnd[index]) return;
		let chunk = this.lastSearchedChunk;
		const searchForward = index > chunk.end;
		while (chunk) {
			if (chunk.contains(index)) return this._splitChunk(chunk, index);
			chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];
		}
	}
	_splitChunk(chunk, index) {
		if (chunk.edited && chunk.content.length) {
			const loc = getLocator(this.original)(index);
			throw new Error(
				`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`,
			);
		}
		const newChunk = chunk.split(index);
		this.byEnd[index] = chunk;
		this.byStart[index] = newChunk;
		this.byEnd[newChunk.end] = newChunk;
		if (chunk === this.lastChunk) this.lastChunk = newChunk;
		this.lastSearchedChunk = chunk;
		return true;
	}
	toString() {
		let str = this.intro;
		let chunk = this.firstChunk;
		while (chunk) {
			str += chunk.toString();
			chunk = chunk.next;
		}
		return str + this.outro;
	}
	isEmpty() {
		let chunk = this.firstChunk;
		do {
			if (
				(chunk.intro.length && chunk.intro.trim()) ||
				(chunk.content.length && chunk.content.trim()) ||
				(chunk.outro.length && chunk.outro.trim())
			)
				return false;
		} while ((chunk = chunk.next));
		return true;
	}
	length() {
		let chunk = this.firstChunk;
		let length = 0;
		do {
			length += chunk.intro.length + chunk.content.length + chunk.outro.length;
		} while ((chunk = chunk.next));
		return length;
	}
	trimLines() {
		return this.trim('[\\r\\n]');
	}
	trim(charType) {
		return this.trimStart(charType).trimEnd(charType);
	}
	trimEndAborted(charType) {
		const rx = new RegExp((charType || '\\s') + '+$');
		this.outro = this.outro.replace(rx, '');
		if (this.outro.length) return true;
		let chunk = this.lastChunk;
		do {
			const end = chunk.end;
			const aborted = chunk.trimEnd(rx);
			if (chunk.end !== end) {
				if (this.lastChunk === chunk) {
					this.lastChunk = chunk.next;
				}
				this.byEnd[chunk.end] = chunk;
				this.byStart[chunk.next.start] = chunk.next;
				this.byEnd[chunk.next.end] = chunk.next;
			}
			if (aborted) return true;
			chunk = chunk.previous;
		} while (chunk);
		return false;
	}
	trimEnd(charType) {
		this.trimEndAborted(charType);
		return this;
	}
	trimStartAborted(charType) {
		const rx = new RegExp('^' + (charType || '\\s') + '+');
		this.intro = this.intro.replace(rx, '');
		if (this.intro.length) return true;
		let chunk = this.firstChunk;
		do {
			const end = chunk.end;
			const aborted = chunk.trimStart(rx);
			if (chunk.end !== end) {
				if (chunk === this.lastChunk) this.lastChunk = chunk.next;
				this.byEnd[chunk.end] = chunk;
				this.byStart[chunk.next.start] = chunk.next;
				this.byEnd[chunk.next.end] = chunk.next;
			}
			if (aborted) return true;
			chunk = chunk.next;
		} while (chunk);
		return false;
	}
	trimStart(charType) {
		this.trimStartAborted(charType);
		return this;
	}
	hasChanged() {
		return this.original !== this.toString();
	}
	_replaceRegexp(searchValue, replacement) {
		function getReplacement(match, str) {
			if (typeof replacement === 'string') {
				return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => {
					if (i === '$') return '$';
					if (i === '&') return match[0];
					const num = +i;
					if (num < match.length) return match[+i];
					return `$${i}`;
				});
			} else {
				return replacement(...match, match.index, str, match.groups);
			}
		}
		function matchAll(re, str) {
			let match;
			const matches = [];
			while ((match = re.exec(str))) {
				matches.push(match);
			}
			return matches;
		}
		if (searchValue.global) {
			const matches = matchAll(searchValue, this.original);
			matches.forEach((match) => {
				if (match.index != null) {
					const replacement = getReplacement(match, this.original);
					if (replacement !== match[0]) {
						this.overwrite(
							match.index,
							match.index + match[0].length,
							replacement
						);
					}
				}
			});
		} else {
			const match = this.original.match(searchValue);
			if (match && match.index != null) {
				const replacement = getReplacement(match, this.original);
				if (replacement !== match[0]) {
					this.overwrite(
						match.index,
						match.index + match[0].length,
						replacement
					);
				}
			}
		}
		return this;
	}
	_replaceString(string, replacement) {
		const { original } = this;
		const index = original.indexOf(string);
		if (index !== -1) {
			this.overwrite(index, index + string.length, replacement);
		}
		return this;
	}
	replace(searchValue, replacement) {
		if (typeof searchValue === 'string') {
			return this._replaceString(searchValue, replacement);
		}
		return this._replaceRegexp(searchValue, replacement);
	}
	_replaceAllString(string, replacement) {
		const { original } = this;
		const stringLength = string.length;
		for (
			let index = original.indexOf(string);
			index !== -1;
			index = original.indexOf(string, index + stringLength)
		) {
			const previous = original.slice(index, index + stringLength);
			if (previous !== replacement)
				this.overwrite(index, index + stringLength, replacement);
		}
		return this;
	}
	replaceAll(searchValue, replacement) {
		if (typeof searchValue === 'string') {
			return this._replaceAllString(searchValue, replacement);
		}
		if (!searchValue.global) {
			throw new TypeError(
				'MagicString.prototype.replaceAll called with a non-global RegExp argument',
			);
		}
		return this._replaceRegexp(searchValue, replacement);
	}
}
// @ts-check
class WalkerBase {
	constructor() {
		this.should_skip = false;
		this.should_remove = false;
		this.replacement = null;
		this.context = {
			skip: () => (this.should_skip = true),
			remove: () => (this.should_remove = true),
			replace: (node) => (this.replacement = node)
		};
	}
	replace(parent, prop, index, node) {
		if (parent) {
			if (index !== null) {
				parent[prop][index] = node;
			} else {
				parent[prop] = node;
			}
		}
	}
	remove(parent, prop, index) {
		if (parent) {
			if (index !== null) {
				parent[prop].splice(index, 1);
			} else {
				delete parent[prop];
			}
		}
	}
}
// @ts-check
class SyncWalker extends WalkerBase {
	constructor(enter, leave) {
		super();
		this.enter = enter;
		this.leave = leave;
	}
	visit(node, parent, prop, index) {
		if (node) {
			if (this.enter) {
				const _should_skip = this.should_skip;
				const _should_remove = this.should_remove;
				const _replacement = this.replacement;
				this.should_skip = false;
				this.should_remove = false;
				this.replacement = null;
				this.enter.call(this.context, node, parent, prop, index);
				if (this.replacement) {
					node = this.replacement;
					this.replace(parent, prop, index, node);
				}
				if (this.should_remove) {
					this.remove(parent, prop, index);
				}
				const skipped = this.should_skip;
				const removed = this.should_remove;
				this.should_skip = _should_skip;
				this.should_remove = _should_remove;
				this.replacement = _replacement;
				if (skipped) return node;
				if (removed) return null;
			}
			for (const key in node) {
				const value = node[key];
				if (typeof value !== "object") {
					continue;
				} else if (Array.isArray(value)) {
					for (let i = 0; i < value.length; i += 1) {
						if (value[i] !== null && typeof value[i].type === 'string') {
							if (!this.visit(value[i], node, key, i)) {
								i--;
							}
						}
					}
				} else if (value !== null && typeof value.type === "string") {
					this.visit(value, node, key, null);
				}
			}
			if (this.leave) {
				const _replacement = this.replacement;
				const _should_remove = this.should_remove;
				this.replacement = null;
				this.should_remove = false;
				this.leave.call(this.context, node, parent, prop, index);
				if (this.replacement) {
					node = this.replacement;
					this.replace(parent, prop, index, node);
				}
				if (this.should_remove) {
					this.remove(parent, prop, index);
				}
				const removed = this.should_remove;
				this.replacement = _replacement;
				this.should_remove = _should_remove;
				if (removed) return null;
			}
		}
		return node;
	}
}
// @ts-check
function walk(ast, { enter, leave }) {
	const instance = new SyncWalker(enter, leave);
	return instance.visit(ast, null);
}
function parseAttributes(str, start) {
    const attrs = [];
    const pattern = /([\w-$]+\b)(?:=(?:"([^"]*)"|'([^']*)'|(\S+)))?/g;
    let match;
    while ((match = pattern.exec(str)) !== null) {
        const attr = match[0];
        const name = match[1];
        const value = match[2] || match[3] || match[4];
        const attrStart = start + str.indexOf(attr);
        attrs[name] = value !== null && value !== void 0 ? value : name;
        attrs.push({
            type: 'Attribute',
            name,
            value: !value || [
                {
                    type: 'Text',
                    start: attrStart + attr.indexOf('=') + 1,
                    end: attrStart + attr.length,
                    raw: value
                }
            ],
            start: attrStart,
            end: attrStart + attr.length
        });
    }
    return attrs;
}
const scriptRegex = /(<!--[^]*?-->)|(<script((?:\s+[^=>'"\/\s]+=(?:"[^"]*"|'[^']*'|[^>\s]+)|\s+[^=>'"\/\s]+)*\s*)>)([\S\s]*?)<\/script>/g;
const styleRegex = /(<!--[^]*?-->)|(<style((?:\s+[^=>'"\/\s]+=(?:"[^"]*"|'[^']*'|[^>\s]+)|\s+[^=>'"\/\s]+)*\s*)>)([\S\s]*?)<\/style>/g;
function extractTag(htmlx, tag) {
    const exp = tag === 'script' ? scriptRegex : styleRegex;
    const matches = [];
    let match = null;
    while ((match = exp.exec(htmlx)) != null) {
        if (match[0].startsWith('<!--')) {
            continue;
        }
        let content = match[4];
        if (!content) {
            content = '';
        }
        const start = match.index + match[2].length;
        const end = start + content.length;
        const containerStart = match.index;
        const containerEnd = match.index + match[0].length;
        matches.push({
            start: containerStart,
            end: containerEnd,
            name: tag,
            type: tag === 'style' ? 'Style' : 'Script',
            attributes: parseAttributes(match[3], containerStart + `<${tag}`.length),
            content: {
                type: 'Text',
                start,
                end,
                value: content,
                raw: content
            }
        });
    }
    return matches;
}
function findVerbatimElements(htmlx) {
    const styleTags = extractTag(htmlx, 'style');
    const tags = extractTag(htmlx, 'script');
    for (const styleTag of styleTags) {
        const insideScript = tags.some((tag) => tag.start < styleTag.start && tag.end > styleTag.end);
        if (!insideScript) {
            tags.push(styleTag);
        }
    }
    return tags;
}
function blankVerbatimContent(htmlx, verbatimElements) {
    let output = htmlx;
    for (const node of verbatimElements) {
        const content = node.content;
        if (content) {
            output =
                output.substring(0, content.start) +
                    output
                        .substring(content.start, content.end)
                        .replace(/[^\n]/g, ' ')
                        .replace(/[^\n][^\n][^\n][^\n]\n/g, '/**/\n') +
                    output.substring(content.end);
        }
    }
    return output;
}
function parseHtmlx(htmlx, parse, options) {
    var _a, _b;
    const verbatimElements = findVerbatimElements(htmlx);
    const deconstructed = blankVerbatimContent(htmlx, verbatimElements);
    const parsingCode = options.emitOnTemplateError && !options.svelte5Plus
        ? blankPossiblyErrorOperatorOrPropertyAccess(deconstructed)
        : deconstructed;
    const parsed = parse(parsingCode, options.svelte5Plus ? { loose: options.emitOnTemplateError } : undefined);
    const htmlxAst = parsed.html;
    htmlxAst._comments = (_b = (_a = parsed._comments) !== null && _a !== void 0 ? _a : parsed.comments) !== null && _b !== void 0 ? _b : [];
    for (const s of verbatimElements) {
        htmlxAst.children.push(s);
        htmlxAst.start = Math.min(htmlxAst.start, s.start);
        htmlxAst.end = Math.max(htmlxAst.end, s.end);
    }
    return { htmlxAst, tags: verbatimElements };
}
const possibleOperatorOrPropertyAccess = new Set([
    '.',
    '?',
    '*',
    '~',
    '=',
    '<',
    '!',
    '&',
    '^',
    '|',
    ',',
    '+',
    '-'
]);
const id_char = /[\w$]/;
function blankPossiblyErrorOperatorOrPropertyAccess(htmlx) {
    let index = htmlx.indexOf('}');
    let lastIndex = 0;
    const { length } = htmlx;
    while (index < length && index >= 0) {
        let backwardIndex = index - 1;
        while (backwardIndex > lastIndex) {
            const char = htmlx.charAt(backwardIndex);
            if (possibleOperatorOrPropertyAccess.has(char)) {
                if (char === '!') {
                    let prev = backwardIndex - 1;
                    while (prev > lastIndex && htmlx.charAt(prev) === ' ') {
                        prev--;
                    }
                    if (id_char.test(htmlx.charAt(prev))) {
                        break;
                    }
                }
                const isPlusOrMinus = char === '+' || char === '-';
                const isIncrementOrDecrement = isPlusOrMinus && htmlx.charAt(backwardIndex - 1) === char;
                if (isIncrementOrDecrement) {
                    backwardIndex -= 2;
                    continue;
                }
                htmlx =
                    htmlx.substring(0, backwardIndex) + ' ' + htmlx.substring(backwardIndex + 1);
            }
            else if (!/\s/.test(char) && char !== ')' && char !== ']') {
                break;
            }
            backwardIndex--;
        }
        lastIndex = index;
        index = htmlx.indexOf('}', index + 1);
    }
    return htmlx;
}
function handleComment(str, node) {
    str.overwrite(node.start, node.end, '', { contentOnly: true });
}
function handleLeadingStartComment(str, node, ast) {
    var _a, _b;
    const comments = (_a = ast._comments) !== null && _a !== void 0 ? _a : [];
    if (!comments.length || ((_b = node.leadingComments) === null || _b === void 0 ? void 0 : _b.length)) {
        return;
    }
    const leadingComments = [];
    let searchEnd = node.start;
    for (let i = comments.length - 1; i >= 0; i--) {
        const comment = comments[i];
        if (comment.end > searchEnd) {
            continue;
        }
        if (!/^\s*$/.test(str.original.slice(comment.end, searchEnd))) {
            break;
        }
        leadingComments.unshift(comment);
        searchEnd = comment.start;
    }
    if (leadingComments.length) {
        for (const leading of leadingComments) {
            if (/\n[ \t]*$/.test(str.original.slice(Math.max(leading.start - 100, 0), leading.start))) {
                leading.newline = true;
            }
        }
        node.leadingComments = leadingComments;
    }
}
function handleTrailingEndComment(str, node, parent, ast) {
    var _a, _b;
    const comments = (_a = ast._comments) !== null && _a !== void 0 ? _a : [];
    const attributes = parent.attributes;
    if (!comments.length || ((_b = node.trailingComments) === null || _b === void 0 ? void 0 : _b.length) || !(attributes === null || attributes === void 0 ? void 0 : attributes.length)) {
        return;
    }
    if (attributes[attributes.length - 1] !== node) {
        return;
    }
    const tag_end = str.original.indexOf('>', node.end);
    if (tag_end < 0) {
        return;
    }
    const trailingComments = [];
    let searchStart = node.end;
    for (const comment of comments) {
        if (comment.start < searchStart) {
            continue;
        }
        if (comment.end > tag_end) {
            break;
        }
        if (!/^\s*$/.test(str.original.slice(searchStart, comment.start))) {
            break;
        }
        trailingComments.push(comment);
        searchStart = comment.end;
    }
    if (!trailingComments.length) {
        return;
    }
    if (!/^\s*\/?\s*$/.test(str.original.slice(searchStart, tag_end))) {
        return;
    }
    for (const trailing of trailingComments) {
        if (/\n[ \t]*$/.test(str.original.slice(Math.max(trailing.start - 100, 0), trailing.start))) {
            trailing.newline = true;
        }
    }
    node.trailingComments = trailingComments;
}
function getLeadingCommentTransformation(node) {
    var _a;
    if (!((_a = node.leadingComments) === null || _a === void 0 ? void 0 : _a.length)) {
        return [];
    }
    const transformations = [];
    for (const comment of node.leadingComments) {
        if (comment.newline)
            transformations.push('\n');
        transformations.push([comment.start, comment.end]);
    }
    transformations.push('\n');
    return transformations;
}
function getTrailingCommentTransformation(node) {
    var _a;
    if (!((_a = node.trailingComments) === null || _a === void 0 ? void 0 : _a.length)) {
        return [];
    }
    const transformations = [];
    for (const comment of node.trailingComments) {
        transformations.push(comment.newline ? '\n' : ' ');
        transformations.push([comment.start, comment.end]);
    }
    transformations.push('\n');
    return transformations;
}
function handleActionDirective(attr, element) {
    element.addAction(attr, getLeadingCommentTransformation(attr), getTrailingCommentTransformation(attr));
}
function transform(str, start, end, transformations) {
    var _a, _b;
    const moves = [];
    let appendPosition = end;
    let ignoreNextString = false;
    let deletePos;
    let deleteDest;
    for (let i = 0; i < transformations.length; i++) {
        const transformation = transformations[i];
        if (typeof transformation === 'number') {
            deletePos = moves.length;
            deleteDest = transformation;
        }
        else if (typeof transformation === 'string') {
            if (!ignoreNextString) {
                str.appendLeft(appendPosition, transformation);
            }
            ignoreNextString = false;
        }
        else {
            const tStart = transformation[0];
            let tEnd = transformation[1];
            if (tStart === tEnd) {
                continue;
            }
            if (tEnd < end - 1 &&
                !transformations.some((t) => typeof t !== 'string' && t[0] === tEnd)) {
                tEnd += 1;
                const next = transformations[i + 1];
                ignoreNextString = typeof next === 'string';
                const overwrite = typeof next === 'string' ? next : '';
                str.overwrite(tEnd - 1, tEnd, overwrite, { contentOnly: true });
            }
            appendPosition = tEnd;
            moves.push([tStart, tEnd]);
        }
    }
    deletePos = deletePos !== null && deletePos !== void 0 ? deletePos : moves.length;
    for (let i = 0; i < deletePos; i++) {
        str.move(moves[i][0], moves[i][1], end);
    }
    let removeStart = start;
    const sortedMoves = [...moves].sort((t1, t2) => t1[0] - t2[0]);
    for (const transformation of sortedMoves) {
        if (removeStart < transformation[0]) {
            if (deletePos !== moves.length &&
                removeStart > deleteDest &&
                removeStart < end &&
                transformation[0] < end) {
                str.move(removeStart, transformation[0], end);
            }
            if (transformation[0] < end) {
                str.overwrite(removeStart, transformation[0], ' ', { contentOnly: true });
            }
        }
        removeStart = transformation[1];
    }
    if (removeStart > end) {
        let idx = sortedMoves.findIndex((m) => m[0] > end) - 1;
        removeStart = (_b = (_a = sortedMoves[idx]) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : end;
    }
    if (removeStart < end) {
        str.overwrite(removeStart, removeStart + 1, '', { contentOnly: true });
        removeStart++;
    }
    if (removeStart < end) {
        if (deletePos !== moves.length && removeStart > deleteDest && removeStart + 1 < end) {
            str.move(removeStart, end - 1, end);
            str.overwrite(removeStart, end - 1, ' ', { contentOnly: true });
            str.overwrite(end - 1, end, '', { contentOnly: true });
        }
        else {
            str.overwrite(removeStart, end, ' ', { contentOnly: true });
        }
    }
    for (let i = deletePos; i < moves.length; i++) {
        if (moves[i][1] >= end && moves[i][0] <= end)
            break;
        str.move(moves[i][0], moves[i][1], end);
    }
}
function surroundWith(str, [start, end], prefix, suffix) {
    if (start + 1 === end) {
        str.overwrite(start, end, `${prefix}${str.original.charAt(start)}${suffix}`, {
            contentOnly: true
        });
    }
    else {
        str.overwrite(start, start + 1, `${prefix}${str.original.charAt(start)}`, {
            contentOnly: true
        });
        str.overwrite(end - 1, end, `${str.original.charAt(end - 1)}${suffix}`, {
            contentOnly: true
        });
    }
    return [start, end];
}
function getDirectiveNameStartEndIdx(str, node) {
    const colonIdx = str.original.indexOf(':', node.start);
    return [colonIdx + 1, colonIdx + 1 + `${node.name}`.length];
}
function sanitizePropName(name) {
    return name
        .split('')
        .map((char) => (/[0-9A-Za-z$_]/.test(char) ? char : '_'))
        .join('');
}
function withTrailingPropertyAccess(originalText, position) {
    let index = position;
    while (index < originalText.length) {
        const char = originalText[index];
        if (!char.trim()) {
            index++;
            continue;
        }
        if (char === '.') {
            return index + 1;
        }
        if (char === '?' && originalText[index + 1] === '.') {
            return index + 2;
        }
        break;
    }
    return position;
}
function rangeWithTrailingPropertyAccess(originalText, node) {
    return [node.start, withTrailingPropertyAccess(originalText, node.end)];
}
function getEnd(node) {
    var _a, _b;
    return isTypescriptNode(node) ? node.expression.end : ((_b = (_a = node.typeAnnotation) === null || _a === void 0 ? void 0 : _a.start) !== null && _b !== void 0 ? _b : node.end);
}
function isTypescriptNode(node) {
    return (node.type === 'TSAsExpression' ||
        node.type === 'TSSatisfiesExpression' ||
        node.type === 'TSNonNullExpression');
}
function isImplicitlyClosedBlock(end, block) {
    var _a, _b;
    return end < ((_b = (_a = block.children[block.children.length - 1]) === null || _a === void 0 ? void 0 : _a.end) !== null && _b !== void 0 ? _b : block.expression.end);
}
function handleAnimateDirective(str, attr, element) {
    const trailingComments = getTrailingCommentTransformation(attr);
    const transformations = [
        ...getLeadingCommentTransformation(attr),
        '__sveltets_2_ensureAnimation(',
        getDirectiveNameStartEndIdx(str, attr),
        `(${element.typingsNamespace}.mapElementTag('${element.tagName}'),__sveltets_2_AnimationMove`
    ];
    if (attr.expression) {
        transformations.push(',(', rangeWithTrailingPropertyAccess(str.original, attr.expression), ')');
    }
    transformations.push('));', ...trailingComments);
    element.appendToStartEnd(transformations);
}
var svgAttributes = 'accent-height accumulate additive alignment-baseline allowReorder alphabetic amplitude arabic-form ascent attributeName attributeType autoReverse azimuth baseFrequency baseline-shift baseProfile bbox begin bias by calcMode cap-height class clip clipPathUnits clip-path clip-rule color color-interpolation color-interpolation-filters color-profile color-rendering contentScriptType contentStyleType cursor cx cy d decelerate descent diffuseConstant direction display divisor dominant-baseline dur dx dy edgeMode elevation enable-background end exponent externalResourcesRequired fill fill-opacity fill-rule filter filterRes filterUnits flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight format from fr fx fy g1 g2 glyph-name glyph-orientation-horizontal glyph-orientation-vertical glyphRef gradientTransform gradientUnits hanging height href horiz-adv-x horiz-origin-x id ideographic image-rendering in in2 intercept k k1 k2 k3 k4 kernelMatrix kernelUnitLength kerning keyPoints keySplines keyTimes lang lengthAdjust letter-spacing lighting-color limitingConeAngle local marker-end marker-mid marker-start markerHeight markerUnits markerWidth mask maskContentUnits maskUnits mathematical max media method min mode name numOctaves offset onabort onactivate onbegin onclick onend onerror onfocusin onfocusout onload onmousedown onmousemove onmouseout onmouseover onmouseup onrepeat onresize onscroll onunload opacity operator order orient orientation origin overflow overline-position overline-thickness panose-1 paint-order pathLength patternContentUnits patternTransform patternUnits pointer-events points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits r radius refX refY rendering-intent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry scale seed shape-rendering slope spacing specularConstant specularExponent speed spreadMethod startOffset stdDeviation stemh stemv stitchTiles stop-color stop-opacity strikethrough-position strikethrough-thickness string stroke stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width style surfaceScale systemLanguage tabindex tableValues target targetX targetY text-anchor text-decoration text-rendering textLength to transform type u1 u2 underline-position underline-thickness unicode unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical values version vert-adv-y vert-origin-x vert-origin-y viewBox viewTarget visibility width widths word-spacing writing-mode x x-height x1 x2 xChannelSelector xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xml:lang xml:space y y1 y2 yChannelSelector z zoomAndPan'.split(' ');
const IGNORE_START_COMMENT = '/*Ωignore_startΩ*/';
const IGNORE_END_COMMENT = '/*Ωignore_endΩ*/';
const IGNORE_POSITION_COMMENT = '/*Ωignore_positionΩ*/';
function surroundWithIgnoreComments(str) {
    return IGNORE_START_COMMENT + str + IGNORE_END_COMMENT;
}
const voidTags = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr'.split(',');
class Element {
    get name() {
        this.referencedName = true;
        return this._name;
    }
    constructor(str, node, typingsNamespace, parent) {
        this.str = str;
        this.node = node;
        this.typingsNamespace = typingsNamespace;
        this.parent = parent;
        this.startEndTransformation = ['});'];
        this.attrsTransformation = [];
        this.actionsTransformation = [];
        this.actionIdentifiers = [];
        this.endTransformation = [];
        this.referencedName = false;
        if (parent) {
            parent.child = this;
        }
        this.tagName = this.node.name === 'svelte:body' ? 'body' : this.node.name;
        this.isSelfclosing = this.computeIsSelfclosing();
        this.startTagStart = this.node.start;
        this.startTagEnd = this.computeStartTagEnd();
        const tagEnd = (this.tagNameEnd = this.startTagStart + this.node.name.length + 1);
        if (/\s/.test(str.original.charAt(tagEnd))) {
            this.attrsTransformation.push(tagEnd);
            this.attrsTransformation.push([tagEnd, tagEnd + 1]);
            this.str.overwrite(tagEnd, tagEnd + 1, '', { contentOnly: true });
        }
        switch (this.node.name) {
            case 'svelte:options':
            case 'svelte:head':
            case 'svelte:window':
            case 'svelte:body':
            case 'svelte:fragment': {
                const nodeName = `svelte${this.node.name.substring(7)}`;
                this._name = '$$_' + nodeName + this.computeDepth();
                break;
            }
            case 'svelte:element': {
                this._name = '$$_svelteelement' + this.computeDepth();
                break;
            }
            case 'slot': {
                this._name = '$$_slot' + this.computeDepth();
                break;
            }
            default: {
                this._name = '$$_' + sanitizePropName(this.node.name) + this.computeDepth();
                break;
            }
        }
    }
    addAttribute(name, value) {
        if (value) {
            this.attrsTransformation.push(...name, ':', ...value, ',');
        }
        else {
            this.attrsTransformation.push(...name, ',');
        }
    }
    addSlotName(transformation) {
        this.slotLetsTransformation = this.slotLetsTransformation || [[], []];
        this.slotLetsTransformation[0] = transformation;
    }
    addSlotLet(transformation) {
        this.slotLetsTransformation = this.slotLetsTransformation || [['default'], []];
        this.slotLetsTransformation[1].push(...transformation, ',');
    }
    addAction(attr, leadingComments = [], trailingComments = []) {
        const id = `$$action_${this.actionIdentifiers.length}`;
        this.actionIdentifiers.push(id);
        if (!this.actionsTransformation.length) {
            this.actionsTransformation.push('{');
        }
        this.actionsTransformation.push(...leadingComments, `const ${id} = __sveltets_2_ensureAction(`, getDirectiveNameStartEndIdx(this.str, attr), `(${this.typingsNamespace}.mapElementTag('${this.tagName}')`);
        if (attr.expression) {
            this.actionsTransformation.push(',(', rangeWithTrailingPropertyAccess(this.str.original, attr.expression), ')');
        }
        this.actionsTransformation.push('));', ...trailingComments);
    }
    appendToStartEnd(value) {
        this.startEndTransformation.push(...value);
    }
    performTransformation() {
        this.endTransformation.push('}');
        const slotLetTransformation = [];
        if (this.slotLetsTransformation) {
            if (this.slotLetsTransformation[0][0] === 'default') {
                slotLetTransformation.push(
                `{const {${surroundWithIgnoreComments('$$_$$')},`, ...this.slotLetsTransformation[1], `} = ${this.parent.name}.$$slot_def.default;$$_$$;`);
            }
            else {
                slotLetTransformation.push(
                `{const {${surroundWithIgnoreComments('$$_$$')},`, ...this.slotLetsTransformation[1], `} = ${this.parent.name}.$$slot_def["`, ...this.slotLetsTransformation[0], '"];$$_$$;');
            }
            this.endTransformation.push('}');
        }
        if (this.actionIdentifiers.length) {
            this.endTransformation.push('}');
        }
        if (this.isSelfclosing) {
            let transformEnd = this.startTagEnd;
            if (this.str.original[transformEnd - 1] !== '>' &&
                (transformEnd === this.tagNameEnd || transformEnd === this.tagNameEnd + 1)) {
                transformEnd = this.startTagStart;
                this.str.remove(this.startTagStart, this.startTagStart + 1);
            }
            transform(this.str, this.startTagStart, transformEnd, [
                ...slotLetTransformation,
                ...this.actionsTransformation,
                ...this.getStartTransformation(),
                ...this.attrsTransformation,
                ...this.startEndTransformation,
                ...this.endTransformation
            ]);
        }
        else {
            transform(this.str, this.startTagStart, this.startTagEnd, [
                ...slotLetTransformation,
                ...this.actionsTransformation,
                ...this.getStartTransformation(),
                ...this.attrsTransformation,
                ...this.startEndTransformation
            ]);
            const closingTag = this.str.original.substring(this.str.original.lastIndexOf('</', this.node.end - 1) + 2, this.node.end - 1);
            const tagEndIdx = this.str.original
                .substring(this.node.start, this.node.end)
                .lastIndexOf(`</${this.node.name}`);
            const endStart = tagEndIdx === -1 || closingTag.trim() !== this.node.name
                ? this.node.end
                : tagEndIdx + this.node.start;
            transform(this.str, endStart, this.node.end, this.endTransformation);
        }
    }
    isCustomElement() {
        var _a, _b, _c;
        if (this.tagName.includes('-')) {
            return true;
        }
        if ((_c = (_b = (_a = this.node.attributes) === null || _a === void 0 ? void 0 : _a.find((a) => a.name === 'is')) === null || _b === void 0 ? void 0 : _b.value[0]) === null || _c === void 0 ? void 0 : _c.data.includes('-')) {
            return true;
        }
        return false;
    }
    getStartTransformation() {
        var _a, _b;
        const createElement = `${this.typingsNamespace}.createElement`;
        const addActions = () => {
            if (this.actionIdentifiers.length) {
                return `, __sveltets_2_union(${this.actionIdentifiers.join(',')})`;
            }
            else {
                return '';
            }
        };
        let createElementStatement;
        switch (this.node.name) {
            case 'svelte:options':
            case 'svelte:head':
            case 'svelte:window':
            case 'svelte:body':
            case 'svelte:fragment': {
                createElementStatement = [`${createElement}("${this.node.name}"${addActions()}, {`];
                break;
            }
            case 'svelte:element': {
                const nodeName = this.node.tag
                    ? typeof this.node.tag !== 'string'
                        ? [this.node.tag.start, this.node.tag.end]
                        : `"${this.node.tag}"`
                    : '""';
                createElementStatement = [`${createElement}(`, nodeName, `${addActions()}, {`];
                break;
            }
            case 'slot': {
                const slotName = ((_b = (_a = this.node.attributes) === null || _a === void 0 ? void 0 : _a.find((a) => a.name === 'name')) === null || _b === void 0 ? void 0 : _b.value[0]) ||
                    'default';
                createElementStatement = [
                    '__sveltets_createSlot(',
                    typeof slotName === 'string'
                        ? `"${slotName}"`
                        : surroundWith(this.str, [slotName.start, slotName.end], '"', '"'),
                    ', {'
                ];
                break;
            }
            default: {
                createElementStatement = [
                    `${createElement}("`,
                    [this.node.start + 1, this.tagNameEnd],
                    `"${addActions()}, {`
                ];
                break;
            }
        }
        if (this.referencedName) {
            createElementStatement[0] = `const ${this._name} = ` + createElementStatement[0];
        }
        createElementStatement[0] = `{ ${createElementStatement[0]}`;
        return createElementStatement;
    }
    computeStartTagEnd() {
        var _a;
        if ((_a = this.node.children) === null || _a === void 0 ? void 0 : _a.length) {
            return this.node.children[0].start;
        }
        return this.isSelfclosing
            ? this.node.end
            : this.str.original.lastIndexOf('>', this.node.end - 2) + 1;
    }
    computeIsSelfclosing() {
        var _a;
        if (this.str.original[this.node.end - 2] === '/' || voidTags.includes(this.node.name)) {
            return true;
        }
        return (!((_a = this.node.children) === null || _a === void 0 ? void 0 : _a.length) &&
            !this.str.original
                .substring(this.node.start, this.node.end)
                .match(new RegExp(`</${this.node.name}\\s*>$`)));
    }
    computeDepth() {
        let idx = 0;
        let parent = this.parent;
        while (parent) {
            parent = parent.parent;
            idx++;
        }
        return idx;
    }
}
class InlineComponent {
    get name() {
        if (this.addNameConstDeclaration) {
            this.addNameConstDeclaration();
            this.addNameConstDeclaration = undefined;
        }
        return this._name;
    }
    constructor(str, node, parent) {
        this.str = str;
        this.node = node;
        this.parent = parent;
        this.startTransformation = [];
        this.startEndTransformation = [];
        this.propsTransformation = [];
        this.eventsTransformation = [];
        this.snippetPropsTransformation = [];
        this.endTransformation = [];
        if (parent) {
            parent.child = this;
        }
        this.isSelfclosing = this.computeIsSelfclosing();
        this.startTagStart = this.node.start;
        this.startTagEnd = this.computeStartTagEnd();
        const tagEnd = (this.tagNameEnd = this.startTagStart + this.node.name.length + 1);
        if (/\s/.test(str.original.charAt(tagEnd))) {
            this.propsTransformation.push(tagEnd);
            this.propsTransformation.push([tagEnd, tagEnd + 1]);
            this.str.overwrite(tagEnd, tagEnd + 1, '', { contentOnly: true });
        }
        if (this.node.name === 'svelte:self') {
            this._name = '$$_svelteself' + this.computeDepth();
            this.startTransformation.push('{ __sveltets_2_createComponentAny({');
            this.addNameConstDeclaration = () => (this.startTransformation[0] = `{ const ${this._name} = __sveltets_2_createComponentAny({`);
            this.startEndTransformation.push('});');
        }
        else {
            const isSvelteComponentTag = this.node.name === 'svelte:component';
            this._name =
                '$$_' +
                    Array.from(sanitizePropName(this.node.name)).reverse().join('') +
                    this.computeDepth();
            const constructorName = this._name + 'C';
            const nodeNameStart = isSvelteComponentTag
                ? this.node.expression.start
                : this.str.original.indexOf(this.node.name, this.node.start);
            const nodeNameEnd = isSvelteComponentTag
                ? this.node.expression.end
                : nodeNameStart + this.node.name.length;
            this.startTransformation.push(`{ const ${constructorName} = __sveltets_2_ensureComponent(`, [nodeNameStart, nodeNameEnd], `); new ${constructorName}({ target: __sveltets_2_any(), props: {`);
            this.addNameConstDeclaration = () => (this.startTransformation[2] = `); const ${this._name} = new ${constructorName}({ target: __sveltets_2_any(), props: {`);
            this.startEndTransformation.push('}});');
        }
    }
    addProp(name, value) {
        if (value) {
            this.propsTransformation.push(...name, ':', ...value, ',');
        }
        else {
            this.propsTransformation.push(...name, ',');
        }
    }
    addEvent([nameStart, nameEnd], expression, leadingComments = [], trailingComments = []) {
        this.eventsTransformation.push(...leadingComments, `${this.name}.$on(`, surroundWith(this.str, [nameStart, nameEnd], '"', '"'), ', ', expression ? expression : '() => {}', ');', ...trailingComments);
    }
    addSlotName(transformation) {
        this.slotLetsTransformation = this.slotLetsTransformation || [[], []];
        this.slotLetsTransformation[0] = transformation;
    }
    addSlotLet(transformation) {
        this.slotLetsTransformation = this.slotLetsTransformation || [['default'], []];
        this.slotLetsTransformation[1].push(...transformation, ',');
    }
    addImplicitSnippetProp(name, transforms) {
        this.addProp([name], transforms);
        this.snippetPropsTransformation.push(this.str.original.slice(name[0], name[1]));
    }
    appendToStartEnd(value) {
        this.startEndTransformation.push(...value);
    }
    performTransformation() {
        var _a;
        const namedSlotLetTransformation = [];
        const defaultSlotLetTransformation = [];
        if (this.slotLetsTransformation) {
            if (this.slotLetsTransformation[0][0] === 'default') {
                defaultSlotLetTransformation.push(
                `{const {${surroundWithIgnoreComments('$$_$$')},`, ...this.slotLetsTransformation[1], `} = ${this.name}.$$slot_def.default;$$_$$;`);
            }
            else {
                namedSlotLetTransformation.push(
                `{const {${surroundWithIgnoreComments('$$_$$')},`, ...this.slotLetsTransformation[1], `} = ${this.parent.name}.$$slot_def["`, ...this.slotLetsTransformation[0], '"];$$_$$;');
            }
            this.endTransformation.push('}');
        }
        const snippetPropVariables = (_a = this.snippetPropsTransformation) === null || _a === void 0 ? void 0 : _a.join(', ');
        const snippetPropVariablesDeclaration = snippetPropVariables
            ? surroundWithIgnoreComments(`const {${snippetPropVariables}} = ${this.name}.$$prop_def;`)
            : '';
        if (this.isSelfclosing) {
            this.endTransformation.push('}');
            transform(this.str, this.startTagStart, this.startTagEnd, [
                ...namedSlotLetTransformation,
                ...this.startTransformation,
                ...this.propsTransformation,
                ...this.startEndTransformation,
                ...this.eventsTransformation,
                ...defaultSlotLetTransformation,
                snippetPropVariablesDeclaration,
                ...this.endTransformation
            ]);
        }
        else {
            let endStart = this.str.original
                .substring(this.node.start, this.node.end)
                .lastIndexOf(`</${this.node.name}`);
            if (endStart === -1) {
                endStart = this.node.end;
                this.startTagEnd = Math.max(this.node.end - 1, this.tagNameEnd);
            }
            else {
                endStart += this.node.start;
            }
            if (!this.node.name.startsWith('svelte:') && endStart !== this.node.end) {
                this.endTransformation.push([endStart + 2, endStart + this.node.name.length + 2]);
            }
            this.endTransformation.push('}');
            let transformationEnd = this.startTagEnd;
            if (transformationEnd === this.tagNameEnd) {
                transformationEnd = this.startTagStart;
                this.str.remove(this.startTagStart, this.startTagStart + 1);
            }
            transform(this.str, this.startTagStart, transformationEnd, [
                ...namedSlotLetTransformation,
                ...this.startTransformation,
                ...this.propsTransformation,
                ...this.startEndTransformation,
                ...this.eventsTransformation,
                snippetPropVariablesDeclaration,
                ...defaultSlotLetTransformation
            ]);
            transform(this.str, endStart, this.node.end, this.endTransformation);
        }
    }
    computeStartTagEnd() {
        var _a;
        if ((_a = this.node.children) === null || _a === void 0 ? void 0 : _a.length) {
            return this.node.children[0].start;
        }
        return this.isSelfclosing
            ? this.node.end
            : this.str.original.lastIndexOf('>', this.node.end - 2) + 1;
    }
    computeIsSelfclosing() {
        return this.str.original[this.node.end - 2] === '/';
    }
    computeDepth() {
        let idx = 0;
        let parent = this.parent;
        while (parent) {
            parent = parent.parent;
            idx++;
        }
        return idx;
    }
}
const numberOnlyAttributes = new Set([
    'aria-colcount',
    'aria-colindex',
    'aria-colspan',
    'aria-level',
    'aria-posinset',
    'aria-rowcount',
    'aria-rowindex',
    'aria-rowspan',
    'aria-setsize',
    'aria-valuemax',
    'aria-valuemin',
    'aria-valuenow',
    'results',
    'span',
    'marginheight',
    'marginwidth',
    'maxlength',
    'minlength',
    'currenttime',
    'defaultplaybackrate',
    'volume',
    'high',
    'low',
    'optimum',
    'start',
    'size',
    'border',
    'cols',
    'rows',
    'colspan',
    'rowspan',
    'tabindex'
]);
function handleAttribute(str, attr, parent, preserveCase, svelte5Plus, element) {
    if (parent.name === '!DOCTYPE' ||
        ['Style', 'Script'].includes(parent.type) ||
        (attr.name === 'name' && parent.type === 'Slot')) {
        return;
    }
    if (attr.name === 'slot' &&
        attributeValueIsOfType(attr.value, 'Text') &&
        element.parent instanceof InlineComponent) {
        element.addSlotName([[attr.value[0].start, attr.value[0].end]]);
        return;
    }
    const addAttribute = element instanceof Element
        ? (name, value) => {
            if (attr.name.startsWith('data-') && !attr.name.startsWith('data-sveltekit-')) {
                name.unshift('...__sveltets_2_empty({');
                if (!value) {
                    value = ['__sveltets_2_any()'];
                }
                value.push('})');
            }
            element.addAttribute(name, value);
        }
        : (name, value) => {
            if (attr.name.startsWith('--')) {
                name.unshift('...__sveltets_2_cssProp({');
                if (!value) {
                    value = ['""'];
                }
                value.push('})');
            }
            element.addProp(name, value);
        };
    const transformAttributeCase = (name) => {
        if (!preserveCase &&
            !svgAttributes.find((x) => x == name) &&
            !(element instanceof Element && element.isCustomElement()) &&
            !(svelte5Plus && name.startsWith('on'))) {
            return name.toLowerCase();
        }
        else {
            return name;
        }
    };
    const attributeName = getLeadingCommentTransformation(attr);
    const trailingComments = getTrailingCommentTransformation(attr);
    if (attributeValueIsOfType(attr.value, 'AttributeShorthand')) {
        let [start, end] = [attr.value[0].start, attr.value[0].end];
        if (start === end) {
            start--;
            str.overwrite(start, end, ' ', { contentOnly: true });
        }
        addAttribute([[start, end], ...trailingComments]);
        return;
    }
    else {
        let name = element instanceof Element && parent.type === 'Element'
            ? transformAttributeCase(attr.name)
            : attr.name;
        if (name !== attr.name) {
            name = '"' + name;
            str.overwrite(attr.start, attr.start + attr.name.length, name);
        }
        else {
            str.overwrite(attr.start, attr.start + 1, '"' + str.original.charAt(attr.start), {
                contentOnly: true
            });
        }
        attributeName.push([attr.start, attr.start + attr.name.length], '"');
    }
    const attributeValue = [];
    if (attr.value === true) {
        attributeValue.push(attr.name === 'popover' ? '""' : 'true', ...trailingComments);
        addAttribute(attributeName, attributeValue);
        return;
    }
    if (attr.value.length == 0) {
        addAttribute(attributeName, ['""', ...trailingComments]);
        return;
    }
    if (attr.value.length == 1) {
        const attrVal = attr.value[0];
        if (attrVal.type == 'Text') {
            if (attrVal.start === attrVal.end) {
                addAttribute(attributeName, [[attrVal.start - 1, attrVal.end + 1]]);
                return;
            }
            const lastCharIndex = attrVal.end - 1;
            const hasBrackets = str.original[lastCharIndex] === '}' ||
                ((str.original[lastCharIndex] === '"' || str.original[lastCharIndex] === "'") &&
                    str.original[lastCharIndex - 1] === '}');
            const needsNumberConversion = !hasBrackets &&
                parent.type === 'Element' &&
                numberOnlyAttributes.has(attr.name.toLowerCase()) &&
                !isNaN(attrVal.data);
            const includesTemplateLiteralQuote = attrVal.data.includes('`');
            const quote = !includesTemplateLiteralQuote
                ? '`'
                : ['"', "'"].includes(str.original[attrVal.start - 1])
                    ? str.original[attrVal.start - 1]
                    : '"';
            if (!needsNumberConversion) {
                attributeValue.push(quote);
            }
            const escapedValue = tryEscapeAttributeValue(attrVal.data, !includesTemplateLiteralQuote);
            if (escapedValue !== null) {
                str.overwrite(attrVal.start, attrVal.end, escapedValue, { contentOnly: true });
            }
            attributeValue.push([attrVal.start, attrVal.end]);
            if (!needsNumberConversion) {
                attributeValue.push(quote);
            }
            attributeValue.push(...trailingComments);
            addAttribute(attributeName, attributeValue);
        }
        else if (attrVal.type == 'MustacheTag') {
            let [start, end] = rangeWithTrailingPropertyAccess(str.original, attrVal.expression);
            if (start === end) {
                start--;
                str.overwrite(start, end, ' ', { contentOnly: true });
            }
            attributeValue.push([start, end], ...trailingComments);
            addAttribute(attributeName, attributeValue);
        }
        return;
    }
    for (const n of attr.value) {
        if (n.type === 'MustacheTag') {
            str.appendRight(n.start, '$');
        }
    }
    attributeValue.push('`', [attr.value[0].start, attr.value[attr.value.length - 1].end], '`', ...trailingComments);
    addAttribute(attributeName, attributeValue);
}
function attributeValueIsOfType(value, type) {
    return value !== true && value.length == 1 && value[0].type == type;
}
function tryEscapeAttributeValue(str, useTemplateLiteral) {
    if (!str.includes('\\') && (useTemplateLiteral || !str.includes('\n'))) {
        return null;
    }
    return JSON.stringify(str).slice(1, -1);
}
function handleAwait(str, awaitBlock) {
    var _a, _b, _c, _d, _e, _f, _g, _h;
    const transforms = ['{ '];
    if (!awaitBlock.pending.skip) {
        transforms.push([awaitBlock.pending.start, awaitBlock.pending.end]);
    }
    if (awaitBlock.error || !awaitBlock.catch.skip) {
        transforms.push('try { ');
    }
    if (awaitBlock.value) {
        transforms.push('const $$_value = ');
    }
    const expressionEnd = withTrailingPropertyAccess(str.original, awaitBlock.expression.end);
    transforms.push('await (', [awaitBlock.expression.start, expressionEnd], ');');
    if (awaitBlock.value) {
        const end = (_b = (_a = awaitBlock.value.typeAnnotation) === null || _a === void 0 ? void 0 : _a.end) !== null && _b !== void 0 ? _b : awaitBlock.value.end;
        transforms.push('{ const ', [awaitBlock.value.start, end], ' = $$_value; ');
    }
    if (!awaitBlock.then.skip) {
        if (awaitBlock.pending.skip) {
            transforms.push([awaitBlock.then.start, awaitBlock.then.end]);
        }
        else if ((_c = awaitBlock.then.children) === null || _c === void 0 ? void 0 : _c.length) {
            transforms.push([
                awaitBlock.then.children[0].start,
                awaitBlock.then.children[awaitBlock.then.children.length - 1].end
            ]);
        }
    }
    if (awaitBlock.value) {
        transforms.push('}');
    }
    if (awaitBlock.error || !awaitBlock.catch.skip) {
        transforms.push('} catch($$_e) { ');
        const end = (_f = (_e = (_d = awaitBlock.error) === null || _d === void 0 ? void 0 : _d.typeAnnotation) === null || _e === void 0 ? void 0 : _e.end) !== null && _f !== void 0 ? _f : (_g = awaitBlock.error) === null || _g === void 0 ? void 0 : _g.end;
        if (awaitBlock.error) {
            transforms.push('const ', [awaitBlock.error.start, end], ' = __sveltets_2_any();');
        }
        if (!awaitBlock.catch.skip && ((_h = awaitBlock.catch.children) === null || _h === void 0 ? void 0 : _h.length)) {
            transforms.push([
                awaitBlock.catch.children[0].start,
                awaitBlock.catch.children[awaitBlock.catch.children.length - 1].end
            ]);
        }
        transforms.push('}');
    }
    transforms.push('}');
    transform(str, awaitBlock.start, awaitBlock.end, transforms);
}
const oneWayBindingAttributes = new Set([
    'clientWidth',
    'clientHeight',
    'offsetWidth',
    'offsetHeight',
    'duration',
    'seeking',
    'ended',
    'readyState',
    'naturalWidth',
    'naturalHeight'
]);
const oneWayBindingAttributesNotOnElement = new Map([
    ['contentRect', 'DOMRectReadOnly'],
    ['contentBoxSize', 'ResizeObserverSize[]'],
    ['borderBoxSize', 'ResizeObserverSize[]'],
    ['devicePixelContentBoxSize', 'ResizeObserverSize[]'],
    ['buffered', "import('svelte/elements').SvelteMediaTimeRange[]"],
    ['played', "import('svelte/elements').SvelteMediaTimeRange[]"],
    ['seekable', "import('svelte/elements').SvelteMediaTimeRange[]"]
]);
const supportsBindThis = [
    'InlineComponent',
    'Element',
    'Body',
    'Slot'
];
function handleBinding(str, attr, parent, element, preserveBind, isSvelte5Plus, emitJsDoc, isTsFile) {
    const isGetSetBinding = attr.expression.type === 'SequenceExpression';
    const [get, set] = isGetSetBinding ? attr.expression.expressions : [];
    const leadingComments = getLeadingCommentTransformation(attr);
    const trailingComments = getTrailingCommentTransformation(attr);
    if (attr.name === 'this' && supportsBindThis.includes(parent.type)) {
        if (isGetSetBinding) {
            element.appendToStartEnd([
                ...leadingComments,
                '(',
                [set.start, getEnd(set)],
                `)(${element.name});`,
                ...trailingComments
            ]);
        }
        else {
            appendOneWayBinding(attr, ` = ${element.name}`, element, leadingComments, trailingComments);
        }
        return;
    }
    if (!isGetSetBinding) {
        if (element instanceof Element && attr.name == 'group' && parent.name == 'input') {
            appendOneWayBinding(attr, ' = __sveltets_2_any(null)', element, leadingComments, trailingComments);
            return;
        }
        if (oneWayBindingAttributes.has(attr.name) && element instanceof Element) {
            appendOneWayBinding(attr, `= ${element.name}.${attr.name}`, element, leadingComments, trailingComments);
            return;
        }
        if (oneWayBindingAttributesNotOnElement.has(attr.name) && element instanceof Element) {
            const useTypescriptSyntax = isTsFile || !emitJsDoc;
            const bindingType = oneWayBindingAttributesNotOnElement.get(attr.name);
            const bindingValue = useTypescriptSyntax
                ? `null as ${bindingType}`
                : `/** @type {${bindingType}} */ (null)`;
            element.appendToStartEnd([
                ...leadingComments,
                [attr.expression.start, getEnd(attr.expression)],
                `= ${surroundWithIgnoreComments(bindingValue)};`,
                ...trailingComments
            ]);
            return;
        }
        const expressionStr = str.original.substring(attr.expression.start, getEnd(attr.expression));
        element.appendToStartEnd([
            surroundWithIgnoreComments(`() => ${expressionStr} = __sveltets_2_any(null);`)
        ]);
    }
    const isShorthand = attr.expression.start === attr.start + 'bind:'.length;
    const name = preserveBind && element instanceof Element
        ?
            isShorthand
                ? [...leadingComments, `"${str.original.substring(attr.start, attr.end)}"`]
                : [
                    ...leadingComments,
                    '"',
                    [attr.start, str.original.lastIndexOf('=', attr.expression.start)],
                    '"'
                ]
        :
            isShorthand
                ? [...leadingComments, [attr.expression.start, attr.expression.end]]
                : [
                    ...leadingComments,
                    [
                        attr.start + 'bind:'.length,
                        str.original.lastIndexOf('=', attr.expression.start)
                    ]
                ];
    const value = isShorthand
        ? preserveBind && element instanceof Element
            ? [rangeWithTrailingPropertyAccess(str.original, attr.expression), ...trailingComments]
            : undefined
        : isGetSetBinding
            ? [
                '__sveltets_2_get_set_binding(',
                [get.start, get.end],
                ',',
                rangeWithTrailingPropertyAccess(str.original, set),
                ')',
                ...trailingComments
            ]
            : [rangeWithTrailingPropertyAccess(str.original, attr.expression), ...trailingComments];
    if (!value) {
        name.push(...trailingComments);
    }
    if (isSvelte5Plus && element instanceof InlineComponent) {
        element.appendToStartEnd([`${element.name}.$$bindings = '${attr.name}';`]);
    }
    if (element instanceof Element) {
        element.addAttribute(name, value);
    }
    else {
        element.addProp(name, value);
    }
}
function appendOneWayBinding(attr, assignment, element, leadingComments, trailingComments) {
    const expression = attr.expression;
    const end = getEnd(expression);
    const hasTypeAnnotation = expression.typeAnnotation || isTypescriptNode(expression);
    const array = [
        ...leadingComments,
        [expression.start, end],
        assignment + (hasTypeAnnotation ? '' : ';'),
        ...trailingComments
    ];
    if (hasTypeAnnotation) {
        array.push([end, expression.end], ';');
    }
    element.appendToStartEnd(array);
}
function handleClassDirective(str, attr, element) {
    element.appendToStartEnd([rangeWithTrailingPropertyAccess(str.original, attr.expression), ';']);
}
function handleConstTag(str, constTag) {
    str.overwrite(constTag.start, constTag.expression.start, 'const ');
    str.overwrite(withTrailingPropertyAccess(str.original, constTag.expression.end), constTag.end, ';');
}
function handleDebug(str, debugBlock) {
    let cursor = debugBlock.start;
    for (const identifier of debugBlock.identifiers) {
        str.overwrite(cursor, identifier.start, ';', { contentOnly: true });
        cursor = identifier.end;
    }
    str.overwrite(cursor, debugBlock.end, ';', { contentOnly: true });
}
function handleEach(str, eachBlock) {
    var _a, _b, _c;
    const startEnd = str.original.indexOf('}', ((_a = eachBlock.key) === null || _a === void 0 ? void 0 : _a.end) || ((_b = eachBlock.context) === null || _b === void 0 ? void 0 : _b.end) || eachBlock.expression.end) + 1;
    let transforms;
    const containsComma = str.original
        .substring(eachBlock.expression.start, eachBlock.expression.end)
        .includes(',');
    const expressionEnd = getEnd(eachBlock.expression);
    const contextEnd = eachBlock.context && getEnd(eachBlock.context);
    const arrayAndItemVarTheSame = !!eachBlock.context &&
        str.original.substring(eachBlock.expression.start, expressionEnd) ===
            str.original.substring(eachBlock.context.start, contextEnd);
    if (arrayAndItemVarTheSame) {
        transforms = [
            `{ const $$_each = __sveltets_2_ensureArray(${containsComma ? '(' : ''}`,
            [eachBlock.expression.start, eachBlock.expression.end],
            `${containsComma ? ')' : ''}); for(let `,
            [eachBlock.context.start, contextEnd],
            ' of $$_each){'
        ];
    }
    else {
        transforms = [
            'for(let ',
            eachBlock.context ? [eachBlock.context.start, contextEnd] : '$$each_item',
            ` of __sveltets_2_ensureArray(${containsComma ? '(' : ''}`,
            [eachBlock.expression.start, eachBlock.expression.end],
            `${containsComma ? ')' : ''})){${eachBlock.context ? '' : '$$each_item;'}`
        ];
    }
    if (eachBlock.index) {
        const indexStart = str.original.indexOf(eachBlock.index, ((_c = eachBlock.context) === null || _c === void 0 ? void 0 : _c.end) || eachBlock.expression.end);
        const indexEnd = indexStart + eachBlock.index.length;
        transforms.push('let ', [indexStart, indexEnd], ' = 1;');
    }
    if (eachBlock.key) {
        transforms.push([eachBlock.key.start, eachBlock.key.end], ';');
    }
    transform(str, eachBlock.start, startEnd, transforms);
    const endEach = str.original.lastIndexOf('{', eachBlock.end - 1);
    if (eachBlock.else) {
        const elseEnd = str.original.lastIndexOf('}', eachBlock.else.start);
        const elseStart = str.original.lastIndexOf('{', elseEnd);
        str.overwrite(elseStart, elseEnd + 1, '}' + (arrayAndItemVarTheSame ? '}' : ''), {
            contentOnly: true
        });
        if (!isImplicitlyClosedBlock(endEach, eachBlock)) {
            str.remove(endEach, eachBlock.end);
        }
    }
    else {
        const closing = '}' + (arrayAndItemVarTheSame ? '}' : '');
        if (isImplicitlyClosedBlock(endEach, eachBlock)) {
            str.prependLeft(eachBlock.end, closing);
        }
        else {
            str.overwrite(endEach, eachBlock.end, closing, {
                contentOnly: true
            });
        }
    }
}
function handleEventHandler(str, attr, element) {
    const nameStart = str.original.indexOf(':', attr.start) + 1;
    const nameEnd = nameStart + attr.name.length;
    const leadingComments = getLeadingCommentTransformation(attr);
    const trailingComments = getTrailingCommentTransformation(attr);
    if (element instanceof Element) {
        surroundWith(str, [nameStart, nameEnd], '"on:', '"');
        element.addAttribute([...leadingComments, [nameStart, nameEnd]], attr.expression
            ? [
                rangeWithTrailingPropertyAccess(str.original, attr.expression),
                ...trailingComments
            ]
            : ['undefined', ...trailingComments]);
    }
    else {
        element.addEvent([nameStart, nameEnd], attr.expression
            ? rangeWithTrailingPropertyAccess(str.original, attr.expression)
            : undefined, leadingComments, trailingComments);
    }
}
function handleIf(str, ifBlock) {
    if (ifBlock.elseif) {
        const start = str.original.lastIndexOf('{', ifBlock.expression.start);
        str.overwrite(start, ifBlock.expression.start, '} else if (');
    }
    else {
        str.overwrite(ifBlock.start, ifBlock.expression.start, 'if(');
    }
    const expressionEnd = withTrailingPropertyAccess(str.original, ifBlock.expression.end);
    const end = str.original.indexOf('}', expressionEnd);
    str.overwrite(expressionEnd, end + 1, '){');
    const endif = str.original.lastIndexOf('{', ifBlock.end - 1);
    if (isImplicitlyClosedBlock(endif, ifBlock)) {
        str.prependLeft(ifBlock.end, '}');
    }
    else {
        str.overwrite(endif, ifBlock.end, '}');
    }
}
function handleElse(str, elseBlock, parent) {
    if (parent.type !== 'IfBlock') {
        return;
    }
    const elseEnd = str.original.lastIndexOf('}', elseBlock.start);
    const elseword = str.original.lastIndexOf(':else', elseEnd);
    const elseStart = str.original.lastIndexOf('{', elseword);
    str.overwrite(elseStart, elseStart + 1, '}');
    str.overwrite(elseEnd, elseEnd + 1, '{');
    const colon = str.original.indexOf(':', elseword);
    str.remove(colon, colon + 1);
}
function handleKey(str, keyBlock) {
    str.overwrite(keyBlock.start, keyBlock.expression.start, '', { contentOnly: true });
    const expressionEnd = withTrailingPropertyAccess(str.original, keyBlock.expression.end);
    const end = str.original.indexOf('}', expressionEnd);
    str.overwrite(expressionEnd, end + 1, '; {');
    const endKey = str.original.lastIndexOf('{', keyBlock.end - 1);
    if (!isImplicitlyClosedBlock(endKey, keyBlock)) {
        str.overwrite(endKey, keyBlock.end, '}', { contentOnly: true });
    }
}
function handleLet(str, node, parent, preserveCase, svelte5Plus, element) {
    if (element instanceof InlineComponent) {
        addSlotLet(node, element);
    }
    else {
        if (element.parent instanceof InlineComponent) {
            addSlotLet(node, element);
        }
        else {
            handleAttribute(str, {
                start: node.start,
                end: node.end,
                type: 'Attribute',
                name: 'let:' + node.name,
                value: node.expression
                    ? [
                        {
                            type: 'MustacheTag',
                            start: node.expression.start,
                            end: node.expression.end,
                            expression: node.expression
                        }
                    ]
                    : true,
                leadingComments: node.leadingComments,
                trailingComments: node.trailingComments
            }, parent, preserveCase, svelte5Plus, element);
        }
    }
}
function addSlotLet(node, element) {
    const letTransformation = [
        ...getLeadingCommentTransformation(node),
        [node.start + 'let:'.length, node.start + 'let:'.length + node.name.length]
    ];
    if (node.expression) {
        letTransformation.push(':', [node.expression.start, node.expression.end]);
    }
    letTransformation.push(...getTrailingCommentTransformation(node));
    element.addSlotLet(letTransformation);
}
function handleMustacheTag(str, node, parent) {
    if (parent.type === 'Attribute' || parent.type === 'StyleDirective') {
        return;
    }
    const text = str.original.slice(node.start + 1, node.end - 1);
    if (text.trimStart().startsWith('{')) {
        str.overwrite(node.start, node.start + 1, ';(', { contentOnly: true });
        str.overwrite(node.end - 1, node.end, ');', { contentOnly: true });
        return;
    }
    str.overwrite(node.start, node.start + 1, '', { contentOnly: true });
    str.overwrite(node.end - 1, node.end, ';', { contentOnly: true });
}
function handleRawHtml(str, node) {
    str.overwrite(node.start, node.expression.start, ' ');
    str.overwrite(withTrailingPropertyAccess(str.original, node.expression.end), node.end, ';');
}
function handleSpread(node, element) {
    const transformation = [
        ...getLeadingCommentTransformation(node),
        [node.start + 1, node.end - 1],
        ...getTrailingCommentTransformation(node)
    ];
    if (element instanceof Element) {
        element.addAttribute(transformation);
    }
    else {
        element.addProp(transformation);
    }
}
function handleStyleDirective(str, style, element) {
    const htmlx = str.original;
    const ensureType = '__sveltets_2_ensureType(String, Number, ';
    if (style.value === true || style.value.length === 0) {
        element.appendToStartEnd([
            ensureType,
            [htmlx.indexOf(':', style.start) + 1, style.end],
            ');'
        ]);
        return;
    }
    if (style.value.length > 1) {
        for (const n of style.value) {
            if (n.type === 'MustacheTag') {
                str.appendRight(n.start, '$');
            }
        }
        element.appendToStartEnd([
            ensureType + '`',
            [style.value[0].start, style.value[style.value.length - 1].end],
            '`);'
        ]);
        return;
    }
    const styleVal = style.value[0];
    if (styleVal.type === 'Text') {
        const quote = ['"', "'"].includes(str.original[styleVal.start - 1])
            ? str.original[styleVal.start - 1]
            : '"';
        element.appendToStartEnd([
            `${ensureType}${quote}`,
            [styleVal.start, styleVal.end],
            `${quote});`
        ]);
    }
    else {
        element.appendToStartEnd([ensureType, [styleVal.start + 1, styleVal.end - 1], ');']);
    }
}
function handleText(str, node, parent) {
    if (!node.data || parent.type === 'Attribute') {
        return;
    }
    let replacement = node.data.replace(/\S/g, '');
    if (!replacement && node.data.length) {
        replacement = ' ';
    }
    str.overwrite(node.start, node.end, replacement, {
        contentOnly: true
    });
}
function handleTransitionDirective(str, attr, element) {
    const trailingComments = getTrailingCommentTransformation(attr);
    const transformations = [
        ...getLeadingCommentTransformation(attr),
        '__sveltets_2_ensureTransition(',
        getDirectiveNameStartEndIdx(str, attr),
        `(${element.typingsNamespace}.mapElementTag('${element.tagName}')`
    ];
    if (attr.expression) {
        transformations.push(',(', rangeWithTrailingPropertyAccess(str.original, attr.expression), ')');
    }
    transformations.push('));', ...trailingComments);
    element.appendToStartEnd(transformations);
}
function handleSnippet(str, snippetBlock, component, emitJsDoc = false, isTsFile = false) {
    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
    const isImplicitProp = component !== undefined;
    const endSnippet = str.original.lastIndexOf('{', snippetBlock.end - 1);
    const usTSSyntax = isTsFile || !emitJsDoc;
    const afterSnippet = isImplicitProp
        ? `};return __sveltets_2_any(0)}`
        : `};return __sveltets_2_any(0)};`;
    if (isImplicitlyClosedBlock(endSnippet, snippetBlock)) {
        str.prependLeft(snippetBlock.end, afterSnippet);
    }
    else {
        str.overwrite(endSnippet, snippetBlock.end, afterSnippet, {
            contentOnly: true
        });
    }
    const lastParameter = (_a = snippetBlock.parameters) === null || _a === void 0 ? void 0 : _a.at(-1);
    const startEnd = str.original.indexOf('}', (_d = (_c = (_b = lastParameter === null || lastParameter === void 0 ? void 0 : lastParameter.typeAnnotation) === null || _b === void 0 ? void 0 : _b.end) !== null && _c !== void 0 ? _c : lastParameter === null || lastParameter === void 0 ? void 0 : lastParameter.end) !== null && _d !== void 0 ? _d : snippetBlock.expression.end) + 1;
    let parameters;
    if ((_e = snippetBlock.parameters) === null || _e === void 0 ? void 0 : _e.length) {
        const firstParameter = snippetBlock.parameters[0];
        const start = (_h = (_g = (_f = firstParameter === null || firstParameter === void 0 ? void 0 : firstParameter.leadingComments) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.start) !== null && _h !== void 0 ? _h : firstParameter.start;
        const end = (_k = (_j = lastParameter.typeAnnotation) === null || _j === void 0 ? void 0 : _j.end) !== null && _k !== void 0 ? _k : lastParameter.end;
        parameters = [start, end];
    }
    const afterParameters = ` => { async ()${IGNORE_POSITION_COMMENT} => {`;
    if (isImplicitProp) {
        const emptyId = snippetBlock.expression.start === snippetBlock.expression.end;
        if (emptyId) {
            str.overwrite(snippetBlock.start, snippetBlock.expression.start - 1, '', {
                contentOnly: true
            });
            str.overwrite(snippetBlock.expression.start - 1, snippetBlock.expression.start, ' ', {
                contentOnly: true
            });
        }
        else {
            str.overwrite(snippetBlock.start, snippetBlock.expression.start, '', {
                contentOnly: true
            });
        }
        const transforms = ['('];
        if (parameters) {
            transforms.push(parameters);
            const [start, end] = parameters;
            str.overwrite(snippetBlock.expression.end, start, '', {
                contentOnly: true
            });
            str.overwrite(end, startEnd, '', { contentOnly: true });
        }
        else {
            str.overwrite(snippetBlock.expression.end, startEnd, '', { contentOnly: true });
        }
        transforms.push(')' + afterParameters);
        transforms.push([startEnd, snippetBlock.end]);
        if (component instanceof InlineComponent) {
            component.addImplicitSnippetProp([snippetBlock.expression.start - (emptyId ? 1 : 0), snippetBlock.expression.end], transforms);
        }
        else {
            component.addAttribute([[snippetBlock.expression.start - (emptyId ? 1 : 0), snippetBlock.expression.end]], transforms);
        }
    }
    else {
        const transforms = [
            'const ',
            [snippetBlock.expression.start, snippetBlock.expression.end],
            IGNORE_POSITION_COMMENT,
            ` = ${usTSSyntax ? '' : "/** @returns {ReturnType<import('svelte').Snippet>} */ "}${usTSSyntax && snippetBlock.typeParams ? `<${snippetBlock.typeParams}>` : ''}(`
        ];
        if (parameters) {
            transforms.push(parameters);
        }
        transforms.push(')', usTSSyntax
            ? surroundWithIgnoreComments(`: ReturnType<import('svelte').Snippet>`)
            : '', afterParameters);
        transform(str, snippetBlock.start, startEnd, transforms);
    }
}
function handleImplicitChildren(componentNode, component) {
    var _a;
    if (((_a = componentNode.children) === null || _a === void 0 ? void 0 : _a.length) === 0) {
        return;
    }
    let hasSlot = false;
    for (const child of componentNode.children) {
        if (child.type === 'SvelteSelf' ||
            child.type === 'InlineComponent' ||
            child.type === 'Element' ||
            child.type === 'SlotTemplate') {
            if (child.attributes.some((a) => {
                var _a;
                return a.type === 'Attribute' &&
                    a.name === 'slot' &&
                    ((_a = a.value[0]) === null || _a === void 0 ? void 0 : _a.data) !== 'default';
            })) {
                continue;
            }
        }
        if (child.type === 'Comment' ||
            child.type === 'Slot' ||
            (child.type === 'Text' && child.data.trim() === '')) {
            continue;
        }
        if (child.type !== 'SnippetBlock') {
            hasSlot = true;
            break;
        }
    }
    if (!hasSlot) {
        return;
    }
    component.addProp(['children'], ['() => { return __sveltets_2_any(0); }']);
}
function hoistSnippetBlock(str, blockOrEl) {
    var _a;
    if (blockOrEl.type === 'InlineComponent' || blockOrEl.type === 'SvelteBoundary') {
        return;
    }
    let targetPosition;
    for (const node of (_a = blockOrEl.children) !== null && _a !== void 0 ? _a : []) {
        if (node.type !== 'SnippetBlock') {
            if (targetPosition === undefined && (node.type !== 'Text' || node.data.trim() !== '')) {
                targetPosition = node.type === 'Text' ? node.end : node.start;
            }
            continue;
        }
        if (targetPosition === undefined) {
            continue;
        }
        if (node.start === targetPosition) {
            continue;
        }
        str.move(node.start, node.end, targetPosition);
    }
}
function handleRenderTag(str, renderTag) {
    str.overwrite(renderTag.start, renderTag.expression.start, ';__sveltets_2_ensureSnippet(', {
        contentOnly: true
    });
    str.overwrite(withTrailingPropertyAccess(str.original, renderTag.expression.end), renderTag.end, ');');
}
const COMPONENT_DOCUMENTATION_HTML_COMMENT_TAG = '@component';
class ComponentDocumentation {
    constructor() {
        this.componentDocumentation = '';
        this.handleComment = (node) => {
            if ('data' in node &&
                typeof node.data === 'string' &&
                node.data.includes(COMPONENT_DOCUMENTATION_HTML_COMMENT_TAG)) {
                this.componentDocumentation = node.data
                    .replace(COMPONENT_DOCUMENTATION_HTML_COMMENT_TAG, '')
                    .trim();
            }
        };
    }
    getFormatted() {
        if (!this.componentDocumentation) {
            return '';
        }
        if (!this.componentDocumentation.includes('\n')) {
            return `/** ${this.componentDocumentation} */\n`;
        }
        const lines = dedent(this.componentDocumentation)
            .split('\n')
            .map((line) => ` *${line ? ` ${line}` : ''}`)
            .join('\n');
        return `/**\n${lines}\n */\n`;
    }
}
let Scope$1 = class Scope {
    constructor(parent) {
        this.declared = new Set();
        this.parent = parent;
    }
    hasDefined(name) {
        return this.declared.has(name) || (!!this.parent && this.parent.hasDefined(name));
    }
};
class ScopeStack {
    constructor() {
        this.current = new Scope$1();
    }
    push() {
        this.current = new Scope$1(this.current);
    }
    pop() {
        this.current = this.current.parent;
    }
}
function isMember$1(parent, prop) {
    return parent.type == 'MemberExpression' && prop == 'property';
}
function isObjectKey(parent, prop) {
    return parent.type == 'Property' && prop == 'key';
}
function isObjectValue(parent, prop) {
    return parent.type == 'Property' && prop == 'value';
}
function isObjectValueShortHand(property) {
    const { value, key } = property;
    return value && isIdentifier(value) && key.start === value.start && key.end == value.end;
}
function attributeValueIsString(attr) {
    var _a;
    return attr.value.length !== 1 || ((_a = attr.value[0]) === null || _a === void 0 ? void 0 : _a.type) === 'Text';
}
function isDestructuringPatterns(node) {
    return node.type === 'ArrayPattern' || node.type === 'ObjectPattern';
}
function isIdentifier(node) {
    return node.type === 'Identifier';
}
function getSlotName(child) {
    var _a, _b;
    const slot = (_a = child.attributes) === null || _a === void 0 ? void 0 : _a.find((a) => a.name == 'slot');
    return (_b = slot === null || slot === void 0 ? void 0 : slot.value) === null || _b === void 0 ? void 0 : _b[0].raw;
}
const reservedNames = new Set(['$$props', '$$restProps', '$$slots']);
class Stores {
    constructor(scope, isDeclaration) {
        this.scope = scope;
        this.isDeclaration = isDeclaration;
        this.possibleStores = [];
    }
    handleDirective(node, str) {
        if (this.notAStore(node.name) || this.isDeclaration.value) {
            return;
        }
        const start = str.original.indexOf('$', node.start);
        const end = start + node.name.length;
        this.possibleStores.push({
            node: { type: 'Identifier', start, end, name: node.name },
            parent: { start: 0, end: 0, type: '' },
            scope: this.scope.current
        });
    }
    handleIdentifier(node, parent, prop) {
        if (this.notAStore(node.name)) {
            return;
        }
        if (this.isDeclaration.value) {
            if (isObjectKey(parent, prop)) {
                return;
            }
            this.scope.current.declared.add(node.name);
        }
        else {
            if (isMember$1(parent, prop) && !parent.computed) {
                return;
            }
            if (isObjectKey(parent, prop)) {
                return;
            }
            this.possibleStores.push({ node, parent, scope: this.scope.current });
        }
    }
    getStoreNames() {
        const stores = this.possibleStores.filter(({ node, scope }) => {
            const name = node.name;
            return !scope.hasDefined(name);
        });
        return stores.map(({ node }) => node.name.slice(1));
    }
    notAStore(name) {
        return name[0] !== '$' || reservedNames.has(name);
    }
}
class Scripts {
    constructor(htmlxAst) {
        this.htmlxAst = htmlxAst;
        this.scriptTags = this.htmlxAst.children.filter((child) => child.type === 'Script');
        this.topLevelScripts = this.scriptTags;
    }
    checkIfElementIsScriptTag(node, parent) {
        if (parent !== this.htmlxAst && node.name === 'script') {
            this.topLevelScripts = this.topLevelScripts.filter((tag) => tag.start !== node.start || tag.end !== node.end);
        }
    }
    checkIfContainsScriptTag(node) {
        this.topLevelScripts = this.topLevelScripts.filter((tag) => !(node.start <= tag.start && node.end >= tag.end));
    }
    getTopLevelScriptTags() {
        let scriptTag = null;
        let moduleScriptTag = null;
        this.topLevelScripts.forEach((tag) => {
            if (tag.attributes &&
                tag.attributes.find((a) => (a.name == 'context' &&
                    a.value.length == 1 &&
                    a.value[0].raw == 'module') ||
                    a.name === 'module')) {
                moduleScriptTag = tag;
            }
            else {
                scriptTag = tag;
            }
        });
        return { scriptTag, moduleScriptTag };
    }
    blankOtherScriptTags(str) {
        this.scriptTags
            .filter((tag) => !this.topLevelScripts.includes(tag))
            .forEach((tag) => {
            str.remove(tag.start, tag.end);
        });
    }
}
function isInterfaceOrTypeDeclaration(node) {
    return ts.isTypeAliasDeclaration(node) || ts.isInterfaceDeclaration(node);
}
function findExportKeyword(node) {
    var _a;
    return ts.canHaveModifiers(node)
        ? (_a = ts.getModifiers(node)) === null || _a === void 0 ? void 0 : _a.find((x) => x.kind == ts.SyntaxKind.ExportKeyword)
        : undefined;
}
function isAssignmentBinaryExpr(node) {
    return (ts.isBinaryExpression(node) &&
        node.operatorToken.kind == ts.SyntaxKind.EqualsToken &&
        (ts.isIdentifier(node.left) ||
            ts.isObjectLiteralExpression(node.left) ||
            ts.isArrayLiteralExpression(node.left)));
}
function getBinaryAssignmentExpr(node) {
    if (ts.isExpressionStatement(node.statement)) {
        if (isAssignmentBinaryExpr(node.statement.expression)) {
            return node.statement.expression;
        }
        if (ts.isParenthesizedExpression(node.statement.expression) &&
            isAssignmentBinaryExpr(node.statement.expression.expression)) {
            return node.statement.expression.expression;
        }
    }
}
function isParenthesizedObjectOrArrayLiteralExpression(node) {
    return (ts.isParenthesizedExpression(node) &&
        ts.isBinaryExpression(node.expression) &&
        (ts.isObjectLiteralExpression(node.expression.left) ||
            ts.isArrayLiteralExpression(node.expression.left)));
}
function extractIdentifiers(node, identifiers = []) {
    if (ts.isIdentifier(node)) {
        identifiers.push(node);
    }
    else if (ts.isBindingElement(node)) {
        extractIdentifiers(node.name, identifiers);
    }
    else if (isMember(node)) {
        let object = node;
        while (isMember(object)) {
            object = object.expression;
        }
        if (ts.isIdentifier(object)) {
            identifiers.push(object);
        }
    }
    else if (ts.isArrayBindingPattern(node) || ts.isObjectBindingPattern(node)) {
        node.elements.forEach((element) => {
            extractIdentifiers(element, identifiers);
        });
    }
    else if (ts.isObjectLiteralExpression(node)) {
        node.properties.forEach((child) => {
            if (ts.isSpreadAssignment(child)) {
                extractIdentifiers(child.expression, identifiers);
            }
            else if (ts.isShorthandPropertyAssignment(child)) {
                extractIdentifiers(child.name, identifiers);
            }
            else if (ts.isPropertyAssignment(child)) {
                extractIdentifiers(child.initializer, identifiers);
            }
        });
    }
    else if (ts.isArrayLiteralExpression(node)) {
        node.elements.forEach((element) => {
            if (ts.isSpreadElement(element)) {
                extractIdentifiers(element, identifiers);
            }
            else {
                extractIdentifiers(element, identifiers);
            }
        });
    }
    else if (ts.isBinaryExpression(node)) {
        extractIdentifiers(node.left, identifiers);
    }
    return identifiers;
}
function isMember(node) {
    return ts.isElementAccessExpression(node) || ts.isPropertyAccessExpression(node);
}
function getVariableAtTopLevel(node, identifierName) {
    for (const child of node.statements) {
        if (ts.isVariableStatement(child)) {
            const variable = child.declarationList.declarations.find((declaration) => ts.isIdentifier(declaration.name) && declaration.name.text === identifierName);
            if (variable) {
                return variable;
            }
        }
    }
}
function getLastLeadingDoc(node) {
    var _a;
    const nodeText = node.getFullText();
    const comments = (_a = ts
        .getLeadingCommentRanges(nodeText, 0)) === null || _a === void 0 ? void 0 : _a.filter((c) => c.kind === ts.SyntaxKind.MultiLineCommentTrivia);
    const comment = comments === null || comments === void 0 ? void 0 : comments[(comments === null || comments === void 0 ? void 0 : comments.length) - 1];
    if (comment) {
        let commentText = nodeText.substring(comment.pos, comment.end);
        const typedefTags = ts.getAllJSDocTagsOfKind(node, ts.SyntaxKind.JSDocTypedefTag);
        typedefTags
            .filter((tag) => tag.pos >= comment.pos)
            .map((tag) => nodeText.substring(tag.pos, tag.end))
            .forEach((comment) => {
            commentText = commentText.replace(comment, '');
        });
        return commentText;
    }
}
function isNotPropertyNameOfImport(identifier) {
    return (!ts.isImportSpecifier(identifier.parent) || identifier.parent.propertyName !== identifier);
}
function getNamesFromLabeledStatement(node) {
    var _a;
    const leftHandSide = (_a = getBinaryAssignmentExpr(node)) === null || _a === void 0 ? void 0 : _a.left;
    if (!leftHandSide) {
        return [];
    }
    return (extractIdentifiers(leftHandSide)
        .map((id) => id.text)
        .filter((name) => !name.startsWith('$')));
}
function moveNode(node, str, astOffset, scriptStart, sourceFile) {
    var _a;
    const scanner = ts.createScanner(sourceFile.languageVersion,
     false, sourceFile.languageVariant);
    const comments = (_a = ts.getLeadingCommentRanges(node.getFullText(), 0)) !== null && _a !== void 0 ? _a : [];
    if (!comments.some((comment) => comment.hasTrailingNewLine) &&
        isNewGroup(sourceFile, node, scanner)) {
        str.appendRight(node.getStart() + astOffset, '\n');
    }
    for (const comment of comments) {
        const commentEnd = node.pos + comment.end + astOffset;
        str.move(node.pos + comment.pos + astOffset, commentEnd, scriptStart + 1);
        if (comment.hasTrailingNewLine) {
            str.overwrite(commentEnd - 1, commentEnd, str.original[commentEnd - 1] + '\n');
        }
    }
    str.move(node.getStart() + astOffset, node.end + astOffset, scriptStart + 1);
    const originalEndChar = str.original[node.end + astOffset - 1];
    str.overwrite(node.end + astOffset - 1, node.end + astOffset, originalEndChar + '\n');
}
function isNewGroup(sourceFile, topLevelImportDecl, scanner) {
    const startPos = topLevelImportDecl.getFullStart();
    const endPos = topLevelImportDecl.getStart();
    scanner.setText(sourceFile.text, startPos, endPos - startPos);
    let numberOfNewLines = 0;
    while (scanner.getTokenPos() < endPos) {
        const tokenKind = scanner.scan();
        if (tokenKind === ts.SyntaxKind.NewLineTrivia) {
            numberOfNewLines++;
            if (numberOfNewLines >= 2) {
                return true;
            }
        }
    }
    return false;
}
function getTopLevelImports(sourceFile) {
    return sourceFile.statements.filter(ts.isImportDeclaration).sort((a, b) => a.end - b.end);
}
function getTypeForComponent(node) {
    if (node.name === 'svelte:component' || node.name === 'svelte:self') {
        return '__sveltets_1_componentType()';
    }
    else {
        return node.name;
    }
}
function attributeStrValueAsJsExpression(attr) {
    if (attr.value.length == 0) {
        return "''";
    }
    if (attr.value.length == 1) {
        const attrVal = attr.value[0];
        if (attrVal.type == 'Text') {
            return '"' + attrVal.raw + '"';
        }
    }
    return '"__svelte_ts_string"';
}
function is$$SlotsDeclaration(node) {
    return isInterfaceOrTypeDeclaration(node) && node.name.text === '$$Slots';
}
class SlotHandler {
    constructor(htmlx) {
        this.htmlx = htmlx;
        this.slots = new Map();
        this.resolved = new Map();
        this.resolvedExpression = new Map();
    }
    resolve(identifierDef, initExpression, scope) {
        let resolved = this.resolved.get(identifierDef);
        if (resolved) {
            return resolved;
        }
        resolved = this.getResolveExpressionStr(identifierDef, scope, initExpression);
        if (resolved) {
            this.resolved.set(identifierDef, resolved);
        }
        return resolved;
    }
    getResolveExpressionStr(identifierDef, scope, initExpression) {
        const { name } = identifierDef;
        const owner = scope.getOwner(name);
        if ((owner === null || owner === void 0 ? void 0 : owner.type) === 'CatchBlock') {
            return '__sveltets_2_any({})';
        }
        else if ((owner === null || owner === void 0 ? void 0 : owner.type) === 'ThenBlock') {
            const resolvedExpression = this.resolveExpression(initExpression, scope.parent);
            return `__sveltets_2_unwrapPromiseLike(${resolvedExpression})`;
        }
        else if ((owner === null || owner === void 0 ? void 0 : owner.type) === 'EachBlock') {
            const resolvedExpression = this.resolveExpression(initExpression, scope.parent);
            return `__sveltets_2_unwrapArr(${resolvedExpression})`;
        }
        return null;
    }
    resolveDestructuringAssignment(destructuringNode, identifiers, initExpression, scope) {
        const destructuring = this.htmlx.slice(destructuringNode.start, destructuringNode.end);
        identifiers.forEach((identifier) => {
            const resolved = this.getResolveExpressionStr(identifier, scope, initExpression);
            if (resolved) {
                this.resolved.set(identifier, `((${destructuring}) => ${identifier.name})(${resolved})`);
            }
        });
    }
    resolveDestructuringAssignmentForLet(destructuringNode, identifiers, letNode, component, slotName) {
        const destructuring = this.htmlx.slice(destructuringNode.start, destructuringNode.end);
        identifiers.forEach((identifier) => {
            const resolved = this.getResolveExpressionStrForLet(letNode, component, slotName);
            this.resolved.set(identifier, `((${destructuring}) => ${identifier.name})(${resolved})`);
        });
    }
    getResolveExpressionStrForLet(letNode, component, slotName) {
        return `${getSingleSlotDef(component, slotName)}.${letNode.name}`;
    }
    resolveLet(letNode, identifierDef, component, slotName) {
        let resolved = this.resolved.get(identifierDef);
        if (resolved) {
            return resolved;
        }
        resolved = this.getResolveExpressionStrForLet(letNode, component, slotName);
        this.resolved.set(identifierDef, resolved);
        return resolved;
    }
    getSlotConsumerOfComponent(component) {
        var _a;
        let result = (_a = this.getLetNodes(component, 'default')) !== null && _a !== void 0 ? _a : [];
        for (const child of component.children) {
            const slotName = getSlotName(child);
            if (slotName) {
                const letNodes = this.getLetNodes(child, slotName);
                if (letNodes === null || letNodes === void 0 ? void 0 : letNodes.length) {
                    result = result.concat(letNodes);
                }
            }
        }
        return result;
    }
    getLetNodes(child, slotName) {
        var _a;
        const letNodes = ((_a = child === null || child === void 0 ? void 0 : child.attributes) !== null && _a !== void 0 ? _a : []).filter((attr) => attr.type === 'Let');
        return letNodes === null || letNodes === void 0 ? void 0 : letNodes.map((letNode) => ({
            letNode,
            slotName
        }));
    }
    resolveExpression(expression, scope) {
        let resolved = this.resolvedExpression.get(expression);
        if (resolved) {
            return resolved;
        }
        const strForExpression = new MagicString(this.htmlx);
        const identifiers = [];
        const objectShortHands = [];
        walk(expression, {
            enter(node, parent, prop) {
                if (node.type === 'Identifier') {
                    if (parent) {
                        if (isMember$1(parent, prop)) {
                            return;
                        }
                        if (isObjectKey(parent, prop)) {
                            return;
                        }
                        if (isObjectValue(parent, prop)) {
                            if (isObjectValueShortHand(parent)) {
                                this.skip();
                                objectShortHands.push(node);
                                return;
                            }
                        }
                    }
                    this.skip();
                    identifiers.push(node);
                }
            }
        });
        const getOverwrite = (name) => {
            const init = scope.getInit(name);
            return init ? this.resolved.get(init) : name;
        };
        for (const identifier of objectShortHands) {
            const { end, name } = identifier;
            const value = getOverwrite(name);
            strForExpression.appendLeft(end, `:${value}`);
        }
        for (const identifier of identifiers) {
            const { start, end, name } = identifier;
            const value = getOverwrite(name);
            strForExpression.overwrite(start, end, value);
        }
        resolved = strForExpression.slice(expression.start, expression.end);
        this.resolvedExpression.set(expression, resolved);
        return resolved;
    }
    handleSlot(node, scope) {
        var _a;
        const nameAttr = node.attributes.find((a) => a.name == 'name');
        const slotName = nameAttr ? nameAttr.value[0].raw : 'default';
        const attributes = new Map();
        for (const attr of node.attributes) {
            if (attr.name == 'name') {
                continue;
            }
            if (attr.type === 'Spread') {
                const rawName = attr.expression.name;
                const init = scope.getInit(rawName);
                const name = init ? this.resolved.get(init) : rawName;
                attributes.set(`__spread__${name}`, name);
            }
            if (!((_a = attr.value) === null || _a === void 0 ? void 0 : _a.length)) {
                continue;
            }
            if (attributeValueIsString(attr)) {
                attributes.set(attr.name, attributeStrValueAsJsExpression(attr));
                continue;
            }
            attributes.set(attr.name, this.resolveAttr(attr, scope));
        }
        this.slots.set(slotName, attributes);
    }
    getSlotDef() {
        return this.slots;
    }
    resolveAttr(attr, scope) {
        const attrVal = attr.value[0];
        if (!attrVal) {
            return null;
        }
        if (attrVal.type == 'AttributeShorthand') {
            const { name } = attrVal.expression;
            const init = scope.getInit(name);
            const resolved = this.resolved.get(init);
            return resolved !== null && resolved !== void 0 ? resolved : name;
        }
        if (attrVal.type == 'MustacheTag') {
            return this.resolveExpression(attrVal.expression, scope);
        }
        throw Error('Unknown attribute value type:' + attrVal.type);
    }
}
function getSingleSlotDef(componentNode, slotName) {
    const componentType = getTypeForComponent(componentNode);
    return `__sveltets_2_instanceOf(${componentType}).$$slot_def['${slotName}']`;
}
class TemplateScope {
    constructor(parent) {
        this.owners = new Map();
        this.inits = new Map();
        this.parent = parent;
        this.names = new Set(parent ? parent.names : []);
    }
    addMany(inits, owner) {
        inits.forEach((item) => this.add(item, owner));
        return this;
    }
    add(init, owner) {
        const { name } = init;
        this.names.add(name);
        this.inits.set(name, init);
        this.owners.set(name, owner);
        return this;
    }
    child() {
        const child = new TemplateScope(this);
        return child;
    }
    getOwner(name) {
        var _a;
        return this.owners.get(name) || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.getOwner(name));
    }
    getInit(name) {
        var _a;
        return this.inits.get(name) || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.getInit(name));
    }
    isLet(name) {
        const owner = this.getOwner(name);
        return owner && (owner.type === 'Element' || owner.type === 'InlineComponent');
    }
}
function isReference(node, parent) {
    if (node.type === 'MemberExpression') {
        return !node.computed && isReference(node.object, node);
    }
    if (node.type === 'Identifier') {
        if (!parent)
            return true;
        switch (parent.type) {
            case 'MemberExpression': return parent.computed || node === parent.object;
            case 'MethodDefinition': return parent.computed;
            case 'FieldDefinition': return parent.computed || node === parent.value;
            case 'Property': return parent.computed || node === parent.value;
            case 'ExportSpecifier':
            case 'ImportSpecifier': return node === parent.local;
            case 'LabeledStatement':
            case 'BreakStatement':
            case 'ContinueStatement': return false;
            default: return true;
        }
    }
    return false;
}
// @ts-check
function analyze(expression) {
	const map = new WeakMap();
	const globals = new Map();
	const scope = new Scope(null, false);
	const references = [];
	let current_scope = scope;
	walk(expression, {
		enter(node, parent) {
			switch (node.type) {
				case 'Identifier':
					if (isReference(node, parent)) {
						references.push([current_scope, node]);
					}
					break;
				case 'ImportDeclaration':
					node.specifiers.forEach((specifier) => {
						current_scope.declarations.set(specifier.local.name, specifier);
					});
					break;
				case 'FunctionExpression':
				case 'FunctionDeclaration':
				case 'ArrowFunctionExpression':
					if (node.type === 'FunctionDeclaration') {
						if (node.id) {
							current_scope.declarations.set(node.id.name, node);
						}
						map.set(node, current_scope = new Scope(current_scope, false));
					} else {
						map.set(node, current_scope = new Scope(current_scope, false));
						if (node.type === 'FunctionExpression' && node.id) {
							current_scope.declarations.set(node.id.name, node);
						}
					}
					node.params.forEach(param => {
						extract_names(param).forEach(name => {
							current_scope.declarations.set(name, node);
						});
					});
					break;
				case 'ForStatement':
				case 'ForInStatement':
				case 'ForOfStatement':
					map.set(node, current_scope = new Scope(current_scope, true));
					break;
				case 'BlockStatement':
					map.set(node, current_scope = new Scope(current_scope, true));
					break;
				case 'ClassDeclaration':
				case 'VariableDeclaration':
					current_scope.add_declaration(node);
					break;
				case 'CatchClause':
					map.set(node, current_scope = new Scope(current_scope, true));
					if (node.param) {
						extract_names(node.param).forEach(name => {
							current_scope.declarations.set(name, node.param);
						});
					}
					break;
			}
		},
		leave(node) {
			if (map.has(node)) {
				current_scope = current_scope.parent;
			}
		}
	});
	for (let i = references.length - 1; i >= 0; --i) {
		const [scope, reference] = references[i];
		if (!scope.references.has(reference.name)) {
			add_reference(scope, reference.name);
			if (!scope.find_owner(reference.name)) {
				globals.set(reference.name, reference);
			}
		}
	}
	return { map, scope, globals };
}
function add_reference(scope, name) {
	scope.references.add(name);
	if (scope.parent) add_reference(scope.parent, name);
}
class Scope {
	constructor(parent, block) {
		this.parent = parent;
		this.block = block;
		this.declarations = new Map();
		this.initialised_declarations = new Set();
		this.references = new Set();
	}
	add_declaration(node) {
		if (node.type === 'VariableDeclaration') {
			if (node.kind === 'var' && this.block && this.parent) {
				this.parent.add_declaration(node);
			} else {
				const handle_declarator = (declarator) => {
					extract_names(declarator.id).forEach(name => {
						this.declarations.set(name, node);
						if (declarator.init) this.initialised_declarations.add(name);
					});				};
				node.declarations.forEach(handle_declarator);
			}
		} else if (node.id) {
			this.declarations.set(node.id.name, node);
		}
	}
	find_owner(name) {
		if (this.declarations.has(name)) return this;
		return this.parent && this.parent.find_owner(name);
	}
	has(name) {
		return (
			this.declarations.has(name) || (!!this.parent && this.parent.has(name))
		);
	}
}
function extract_names(param) {
	return extract_identifiers(param).map(node => node.name);
}
function extract_identifiers(param, nodes = []) {
	switch (param.type) {
		case 'Identifier':
			nodes.push(param);
			break;
		case 'MemberExpression':
			let object = param;
			while (object.type === 'MemberExpression') {
				object =  (object.object);
			}
			nodes.push( (object));
			break;
		case 'ObjectPattern':
			const handle_prop = (prop) => {
				if (prop.type === 'RestElement') {
					extract_identifiers(prop.argument, nodes);
				} else {
					extract_identifiers(prop.value, nodes);
				}
			};
			param.properties.forEach(handle_prop);
			break;
		case 'ArrayPattern':
			const handle_element = (element) => {
				if (element) extract_identifiers(element, nodes);
			};
			param.elements.forEach(handle_element);
			break;
		case 'RestElement':
			extract_identifiers(param.argument, nodes);
			break;
		case 'AssignmentPattern':
			extract_identifiers(param.left, nodes);
			break;
	}
	return nodes;
}
function handleScopeAndResolveForSlot({ identifierDef, initExpression, owner, slotHandler, templateScope }) {
    if (isIdentifier(identifierDef)) {
        templateScope.add(identifierDef, owner);
        slotHandler.resolve(identifierDef, initExpression, templateScope);
    }
    if (isDestructuringPatterns(identifierDef)) {
        const identifiers = extract_identifiers(identifierDef);
        templateScope.addMany(identifiers, owner);
        slotHandler.resolveDestructuringAssignment(identifierDef, identifiers, initExpression, templateScope);
    }
}
function handleScopeAndResolveLetVarForSlot({ letNode, component, slotName, templateScope, slotHandler }) {
    const { expression } = letNode;
    if (!expression) {
        templateScope.add(letNode, component);
        slotHandler.resolveLet(letNode, letNode, component, slotName);
    }
    else {
        if (isIdentifier(expression)) {
            templateScope.add(expression, component);
            slotHandler.resolveLet(letNode, expression, component, slotName);
        }
        const expForExtract = { ...expression };
        if (expression.type === 'ArrayExpression') {
            expForExtract.type = 'ArrayPattern';
        }
        else if (expression.type === 'ObjectExpression') {
            expForExtract.type = 'ObjectPattern';
        }
        if (isDestructuringPatterns(expForExtract)) {
            const identifiers = extract_identifiers(expForExtract);
            templateScope.addMany(identifiers, component);
            slotHandler.resolveDestructuringAssignmentForLet(expForExtract, identifiers, letNode, component, slotName);
        }
    }
}
class EventHandler {
    constructor() {
        this.bubbledEvents = new Map();
        this.callees = [];
    }
    handleEventHandler(node, parent) {
        const eventName = node.name;
        if (!node.expression) {
            if (parent.type === 'InlineComponent') {
                if (parent.name !== 'svelte:self') {
                    this.handleEventHandlerBubble(parent, eventName);
                }
                return;
            }
            this.bubbledEvents.set(eventName, getEventDefExpressionForNonComponent(eventName, parent));
        }
    }
    handleIdentifier(node, parent, prop) {
        if (prop === 'callee') {
            this.callees.push({ name: node.name, parent });
        }
    }
    getBubbledEvents() {
        return this.bubbledEvents;
    }
    getDispatchedEventsForIdentifier(name) {
        const eventNames = new Set();
        this.callees.forEach((callee) => {
            if (callee.name === name) {
                const [name] = callee.parent.arguments;
                if (name.value !== undefined) {
                    eventNames.add(name.value);
                }
            }
        });
        return eventNames;
    }
    bubbledEventsAsStrings() {
        return Array.from(this.bubbledEvents.entries()).map(eventMapEntryToString);
    }
    handleEventHandlerBubble(parent, eventName) {
        const componentEventDef = `__sveltets_2_instanceOf(${parent.name})`;
        const exp = `__sveltets_2_bubbleEventDef(${componentEventDef}.$$events_def, '${eventName}')`;
        const exist = this.bubbledEvents.get(eventName);
        this.bubbledEvents.set(eventName, exist ? [].concat(exist, exp) : exp);
    }
}
function getEventDefExpressionForNonComponent(eventName, ele) {
    switch (ele.type) {
        case 'Element':
            return `__sveltets_2_mapElementEvent('${eventName}')`;
        case 'Body':
            return `__sveltets_2_mapBodyEvent('${eventName}')`;
        case 'Window':
            return `__sveltets_2_mapWindowEvent('${eventName}')`;
    }
}
function eventMapEntryToString([eventName, expression]) {
    return `'${eventName}':${Array.isArray(expression) ? `__sveltets_2_unionType(${expression.join(',')})` : expression}`;
}
function is$$EventsDeclaration(node) {
    return isInterfaceOrTypeDeclaration(node) && node.name.text === '$$Events';
}
class ComponentEvents {
    get eventsClass() {
        return this.componentEventsInterface.isPresent()
            ? this.componentEventsInterface
            : this.componentEventsFromEventsMap;
    }
    constructor(eventHandler, strictEvents, str) {
        this.strictEvents = strictEvents;
        this.str = str;
        this.componentEventsInterface = new ComponentEventsFromInterface();
        this.componentEventsFromEventsMap = new ComponentEventsFromEventsMap(eventHandler);
    }
    createAPI() {
        const entries = [];
        const iterableEntries = this.eventsClass.events.entries();
        for (const entry of iterableEntries) {
            entries.push({ name: entry[0], ...entry[1] });
        }
        return {
            getAll() {
                return entries;
            }
        };
    }
    toDefString() {
        return this.eventsClass.toDefString();
    }
    setComponentEventsInterface(node, astOffset) {
        this.componentEventsInterface.setComponentEventsInterface(node, this.str, astOffset);
    }
    hasEvents() {
        return this.eventsClass.events.size > 0;
    }
    hasStrictEvents() {
        return this.componentEventsInterface.isPresent() || this.strictEvents;
    }
    checkIfImportIsEventDispatcher(node) {
        this.componentEventsFromEventsMap.checkIfImportIsEventDispatcher(node);
        this.componentEventsInterface.checkIfImportIsEventDispatcher(node);
    }
    checkIfIsStringLiteralDeclaration(node) {
        this.componentEventsFromEventsMap.checkIfIsStringLiteralDeclaration(node);
    }
    checkIfDeclarationInstantiatedEventDispatcher(node) {
        this.componentEventsFromEventsMap.checkIfDeclarationInstantiatedEventDispatcher(node);
        this.componentEventsInterface.checkIfDeclarationInstantiatedEventDispatcher(node);
    }
    checkIfCallExpressionIsDispatch(node) {
        this.componentEventsFromEventsMap.checkIfCallExpressionIsDispatch(node);
    }
}
class ComponentEventsFromInterface {
    constructor() {
        this.events = new Map();
        this.eventDispatcherImport = '';
    }
    setComponentEventsInterface(node, str, astOffset) {
        this.str = str;
        this.astOffset = astOffset;
        this.events = this.extractEvents(node);
    }
    checkIfImportIsEventDispatcher(node) {
        if (this.eventDispatcherImport) {
            return;
        }
        this.eventDispatcherImport = checkIfImportIsEventDispatcher(node);
    }
    checkIfDeclarationInstantiatedEventDispatcher(node) {
        if (!this.isPresent()) {
            return;
        }
        const result = checkIfDeclarationInstantiatedEventDispatcher(node, this.eventDispatcherImport);
        if (!result) {
            return;
        }
        const { dispatcherTyping, dispatcherCreationExpr } = result;
        if (!dispatcherTyping) {
            this.str.prependLeft(dispatcherCreationExpr.expression.getEnd() + this.astOffset, '<__sveltets_2_CustomEvents<$$Events>>');
        }
    }
    toDefString() {
        return this.isPresent() ? '{} as unknown as $$Events' : undefined;
    }
    isPresent() {
        return !!this.str;
    }
    extractEvents(node) {
        const map = new Map();
        if (ts.isInterfaceDeclaration(node)) {
            this.extractProperties(node.members, map);
        }
        else {
            if (ts.isTypeLiteralNode(node.type)) {
                this.extractProperties(node.type.members, map);
            }
            else if (ts.isIntersectionTypeNode(node.type)) {
                node.type.types.forEach((type) => {
                    if (ts.isTypeLiteralNode(type)) {
                        this.extractProperties(type.members, map);
                    }
                });
            }
        }
        return map;
    }
    extractProperties(members, map) {
        members.filter(ts.isPropertySignature).forEach((member) => {
            var _a;
            map.set(getName(member.name), {
                type: ((_a = member.type) === null || _a === void 0 ? void 0 : _a.getText()) || 'Event',
                doc: getDoc(member)
            });
        });
    }
}
class ComponentEventsFromEventsMap {
    constructor(eventHandler) {
        this.eventHandler = eventHandler;
        this.events = new Map();
        this.dispatchedEvents = new Set();
        this.stringVars = new Map();
        this.eventDispatcherImport = '';
        this.eventDispatchers = [];
        this.events = this.extractEvents(eventHandler);
    }
    checkIfImportIsEventDispatcher(node) {
        if (this.eventDispatcherImport) {
            return;
        }
        this.eventDispatcherImport = checkIfImportIsEventDispatcher(node);
    }
    checkIfIsStringLiteralDeclaration(node) {
        if (ts.isIdentifier(node.name) &&
            node.initializer &&
            ts.isStringLiteral(node.initializer)) {
            this.stringVars.set(node.name.text, node.initializer.text);
        }
    }
    checkIfDeclarationInstantiatedEventDispatcher(node) {
        const result = checkIfDeclarationInstantiatedEventDispatcher(node, this.eventDispatcherImport);
        if (!result) {
            return;
        }
        const { dispatcherTyping, dispatcherName } = result;
        if (dispatcherTyping) {
            this.eventDispatchers.push({
                name: dispatcherName,
                typing: dispatcherTyping.getText()
            });
            if (ts.isTypeLiteralNode(dispatcherTyping)) {
                dispatcherTyping.members.filter(ts.isPropertySignature).forEach((member) => {
                    var _a;
                    this.addToEvents(getName(member.name), {
                        type: `CustomEvent<${((_a = member.type) === null || _a === void 0 ? void 0 : _a.getText()) || 'any'}>`,
                        doc: getDoc(member)
                    });
                });
            }
        }
        else {
            this.eventDispatchers.push({ name: dispatcherName });
            this.eventHandler
                .getDispatchedEventsForIdentifier(dispatcherName)
                .forEach((evtName) => {
                this.addToEvents(evtName);
                this.dispatchedEvents.add(evtName);
            });
        }
    }
    checkIfCallExpressionIsDispatch(node) {
        if (this.eventDispatchers.some((dispatcher) => !dispatcher.typing &&
            ts.isIdentifier(node.expression) &&
            node.expression.text === dispatcher.name)) {
            const firstArg = node.arguments[0];
            if (ts.isStringLiteral(firstArg)) {
                this.addToEvents(firstArg.text);
                this.dispatchedEvents.add(firstArg.text);
            }
            else if (ts.isIdentifier(firstArg)) {
                const str = this.stringVars.get(firstArg.text);
                if (str) {
                    this.addToEvents(str);
                    this.dispatchedEvents.add(str);
                }
            }
        }
    }
    addToEvents(eventName, info = { type: 'CustomEvent<any>' }) {
        if (this.events.has(eventName)) {
            this.events.set(eventName, { type: 'CustomEvent<any>' });
            this.dispatchedEvents.add(eventName);
        }
        else {
            this.events.set(eventName, info);
        }
    }
    toDefString() {
        return ('{' +
            [
                ...this.eventDispatchers
                    .map((dispatcher) => dispatcher.typing &&
                    `...__sveltets_2_toEventTypings<${dispatcher.typing}>()`)
                    .filter((str) => !!str),
                ...this.eventHandler.bubbledEventsAsStrings(),
                ...[...this.dispatchedEvents.keys()].map((e) => `'${e}': __sveltets_2_customEvent`)
            ].join(', ') +
            '}');
    }
    extractEvents(eventHandler) {
        const map = new Map();
        for (const name of eventHandler.getBubbledEvents().keys()) {
            map.set(name, { type: 'Event' });
        }
        return map;
    }
}
function getName(prop) {
    if (ts.isIdentifier(prop) || ts.isStringLiteral(prop)) {
        return prop.text;
    }
    if (ts.isComputedPropertyName(prop)) {
        if (ts.isIdentifier(prop.expression)) {
            const identifierName = prop.expression.text;
            const identifierValue = getIdentifierValue(prop, identifierName);
            if (!identifierValue) {
                throwError$1(prop);
            }
            return identifierValue;
        }
    }
    throwError$1(prop);
}
function getIdentifierValue(prop, identifierName) {
    const variable = getVariableAtTopLevel(prop.getSourceFile(), identifierName);
    if (variable && ts.isStringLiteral(variable.initializer)) {
        return variable.initializer.text;
    }
}
function throwError$1(prop) {
    const error = new Error('The ComponentEvents interface can only have properties of type ' +
        'Identifier, StringLiteral or ComputedPropertyName. ' +
        'In case of ComputedPropertyName, ' +
        'it must be a const declared within the component and initialized with a string.');
    error.start = toLineColumn(prop.getStart());
    error.end = toLineColumn(prop.getEnd());
    throw error;
    function toLineColumn(pos) {
        const lineChar = prop.getSourceFile().getLineAndCharacterOfPosition(pos);
        return {
            line: lineChar.line + 1,
            column: lineChar.character
        };
    }
}
function getDoc(member) {
    let doc = undefined;
    const comment = getLastLeadingDoc(member);
    if (comment) {
        doc = comment
            .split('\n')
            .map((line) =>
        line
            .replace(/\s*\/\*\*/, '')
            .replace(/\s*\*\//, '')
            .replace(/\s*\*/, '')
            .trim())
            .join('\n');
    }
    return doc;
}
function checkIfImportIsEventDispatcher(node) {
    var _a;
    if (ts.isStringLiteral(node.moduleSpecifier) && node.moduleSpecifier.text !== 'svelte') {
        return;
    }
    const namedImports = (_a = node.importClause) === null || _a === void 0 ? void 0 : _a.namedBindings;
    if (namedImports && ts.isNamedImports(namedImports)) {
        const eventDispatcherImport = namedImports.elements.find(
        (el) => (el.propertyName || el.name).text === 'createEventDispatcher');
        if (eventDispatcherImport) {
            return eventDispatcherImport.name.text;
        }
    }
}
function checkIfDeclarationInstantiatedEventDispatcher(node, eventDispatcherImport) {
    var _a;
    if (!ts.isIdentifier(node.name) || !node.initializer) {
        return;
    }
    if (ts.isCallExpression(node.initializer) &&
        ts.isIdentifier(node.initializer.expression) &&
        node.initializer.expression.text === eventDispatcherImport) {
        const dispatcherName = node.name.text;
        const dispatcherTyping = (_a = node.initializer.typeArguments) === null || _a === void 0 ? void 0 : _a[0];
        return {
            dispatcherName,
            dispatcherTyping,
            dispatcherCreationExpr: node.initializer
        };
    }
}
function handleAttachTag(tag, element) {
    const transformation = [...getLeadingCommentTransformation(tag), '[Symbol("@attach")]'];
    const value = [
        [tag.expression.start, tag.expression.end],
        ...getTrailingCommentTransformation(tag)
    ];
    if (element instanceof InlineComponent) {
        element.addProp(transformation, value);
    }
    else {
        element.addAttribute(transformation, value);
    }
}
function toPosixPath$1(value) {
    return value.replace(/\\/g, '/');
}
function isWithinDirectory(filePath, directoryPath) {
    const relative = path$1.relative(path$1.resolve(directoryPath), path$1.resolve(filePath));
    return relative === '' || (!relative.startsWith('..') && !path$1.isAbsolute(relative));
}
function splitImportSpecifier(specifier) {
    const queryIndex = specifier.indexOf('?');
    const hashIndex = specifier.indexOf('#');
    const cutIndex = queryIndex === -1
        ? hashIndex
        : hashIndex === -1
            ? queryIndex
            : Math.min(queryIndex, hashIndex);
    if (cutIndex === -1) {
        return { pathPart: specifier, suffix: '' };
    }
    return {
        pathPart: specifier.slice(0, cutIndex),
        suffix: specifier.slice(cutIndex)
    };
}
function getExternalImportRewrite(specifier, options) {
    const sourceDir = path$1.dirname(options.sourcePath);
    const generatedDir = path$1.dirname(options.generatedPath);
    const { pathPart, suffix } = splitImportSpecifier(specifier);
    if (!pathPart.startsWith('../')) {
        return null;
    }
    const targetPath = path$1.resolve(sourceDir, pathPart);
    if (isWithinDirectory(targetPath, options.workspacePath)) {
        return null;
    }
    const rewrittenRelative = toPosixPath$1(path$1.relative(generatedDir, targetPath));
    const rewritten = `${rewrittenRelative}${suffix}`;
    if (rewritten === specifier) {
        return null;
    }
    return {
        rewritten,
        insertedPrefix: rewrittenRelative.slice(0, rewrittenRelative.length - pathPart.length)
    };
}
function getImportTypeSpecifierLiteral(ts_impl, node) {
    const argument = node.argument;
    if (ts_impl.isLiteralTypeNode(argument) && ts_impl.isStringLiteralLike(argument.literal)) {
        return argument.literal;
    }
    return undefined;
}
function rewriteImportTypesInNode(ts_impl, node, applyImportRewrite) {
    if (ts_impl.isImportTypeNode(node)) {
        const specifier = getImportTypeSpecifierLiteral(ts_impl, node);
        if (specifier) {
            applyImportRewrite(specifier);
        }
    }
    ts_impl.forEachChild(node, (child) => rewriteImportTypesInNode(ts_impl, child, applyImportRewrite));
}
function rewriteExternalImportsInNode(ts_impl, node, options, on_rewrite) {
    const applyImportRewrite = (module_specifier) => {
        const rewrite = getExternalImportRewrite(module_specifier.text, options);
        if (rewrite) {
            on_rewrite(module_specifier, rewrite);
        }
    };
    if (ts_impl.isImportDeclaration(node) || ts_impl.isExportDeclaration(node)) {
        if (node.moduleSpecifier && ts_impl.isStringLiteralLike(node.moduleSpecifier)) {
            applyImportRewrite(node.moduleSpecifier);
        }
    }
    else if (ts_impl.isCallExpression(node)) {
        const firstArg = node.arguments[0];
        if (firstArg && ts_impl.isStringLiteralLike(firstArg)) {
            const isDynamicImport = node.expression.kind === ts_impl.SyntaxKind.ImportKeyword;
            const isRequireCall = ts_impl.isIdentifier(node.expression) && node.expression.text === 'require';
            if (isDynamicImport || isRequireCall) {
                applyImportRewrite(firstArg);
            }
        }
    }
    else if (ts_impl.isImportTypeNode(node)) {
        const specifier = getImportTypeSpecifierLiteral(ts_impl, node);
        if (specifier) {
            applyImportRewrite(specifier);
        }
    }
    const jsDoc = node.jsDoc;
    if (jsDoc) {
        for (const doc of jsDoc) {
            rewriteImportTypesInNode(ts_impl, doc, applyImportRewrite);
        }
    }
}
function forEachExternalImportRewrite(ts_impl, source, options, on_rewrite) {
    const visit = (node) => {
        rewriteExternalImportsInNode(ts_impl, node, options, on_rewrite);
        ts_impl.forEachChild(node, visit);
    };
    ts_impl.forEachChild(source, visit);
}
function convertHtmlxToJsx(str, ast, tags, options = { svelte5Plus: false }) {
    var _a, _b;
    options.typingsNamespace = options.typingsNamespace || 'svelteHTML';
    const preserveAttributeCase = options.namespace === 'foreign';
    const emitJsDoc = (_a = options.emitJsDoc) !== null && _a !== void 0 ? _a : false;
    const isTsFile = (_b = options.isTsFile) !== null && _b !== void 0 ? _b : false;
    const rootSnippets = [];
    let element;
    const pendingSnippetHoistCheck = new Set();
    let uses$$props = false;
    let uses$$restProps = false;
    let uses$$slots = false;
    let usesAccessors = !!options.accessors;
    let isRunes = false;
    const componentDocumentation = new ComponentDocumentation();
    const isDeclaration = { value: false };
    const scopeStack = new ScopeStack();
    const stores = new Stores(scopeStack, isDeclaration);
    const scripts = new Scripts(ast);
    const handleSvelteOptions = (node) => {
        for (let i = 0; i < node.attributes.length; i++) {
            const optionName = node.attributes[i].name;
            const optionValue = node.attributes[i].value;
            switch (optionName) {
                case 'accessors':
                    if (Array.isArray(optionValue)) {
                        if (optionValue[0].type === 'MustacheTag') {
                            usesAccessors = optionValue[0].expression.value;
                        }
                    }
                    else {
                        usesAccessors = true;
                    }
                    break;
                case 'runes':
                    if (Array.isArray(optionValue)) {
                        if (optionValue[0].type === 'MustacheTag') {
                            isRunes = optionValue[0].expression.value;
                        }
                    }
                    else {
                        isRunes = true;
                    }
                    break;
            }
        }
    };
    const handleIdentifier = (node) => {
        if (node.name === '$$props') {
            uses$$props = true;
            return;
        }
        if (node.name === '$$restProps') {
            uses$$restProps = true;
            return;
        }
        if (node.name === '$$slots') {
            uses$$slots = true;
            return;
        }
    };
    const handleStyleTag = (node) => {
        str.remove(node.start, node.end);
    };
    const rewriteImportSpecifier = (importSpecifier) => {
        var _a;
        if (!options.rewriteExternalImports) {
            return importSpecifier;
        }
        const rewrite = getExternalImportRewrite(importSpecifier, options.rewriteExternalImports);
        return (_a = rewrite === null || rewrite === void 0 ? void 0 : rewrite.rewritten) !== null && _a !== void 0 ? _a : importSpecifier;
    };
    const rewriteImportsInComment = (comment) => {
        if (!options.rewriteExternalImports) {
            return;
        }
        const original = str.original.slice(comment.start, comment.end);
        const rewritten = original.replace(/import\(\s*(['"])([^'"]+)\1\s*\)/g, (fullMatch, quote, importSpecifier) => {
            const specifier = rewriteImportSpecifier(importSpecifier);
            return specifier === importSpecifier
                ? fullMatch
                : `import(${quote}${specifier}${quote})`;
        });
        if (rewritten !== original) {
            str.overwrite(comment.start, comment.end, rewritten);
        }
    };
    const rewriteNodeCommentImports = (node) => {
        var _a, _b, _c;
        if (!options.rewriteExternalImports) {
            return;
        }
        const nodeWithcomments = node;
        for (const comment of (_a = nodeWithcomments.leadingComments) !== null && _a !== void 0 ? _a : []) {
            rewriteImportsInComment(comment);
        }
        for (const comment of (_b = nodeWithcomments.trailingComments) !== null && _b !== void 0 ? _b : []) {
            rewriteImportsInComment(comment);
        }
        for (const comment of (_c = nodeWithcomments.innerComments) !== null && _c !== void 0 ? _c : []) {
            rewriteImportsInComment(comment);
        }
    };
    const slotHandler = new SlotHandler(str.original);
    let templateScope = new TemplateScope();
    const handleComponentLet = (component) => {
        templateScope = templateScope.child();
        const lets = slotHandler.getSlotConsumerOfComponent(component);
        for (const { letNode, slotName } of lets) {
            handleScopeAndResolveLetVarForSlot({
                letNode,
                slotName,
                slotHandler,
                templateScope,
                component
            });
        }
    };
    const handleScopeAndResolveForSlotInner = (identifierDef, initExpression, owner) => {
        handleScopeAndResolveForSlot({
            identifierDef,
            initExpression,
            slotHandler,
            templateScope,
            owner
        });
    };
    const eventHandler = new EventHandler();
    const path = [];
    walk(ast, {
        enter: (estreeTypedNode, estreeTypedParent, prop) => {
            var _a;
            const node = estreeTypedNode;
            const parent = estreeTypedParent;
            path.push(node);
            if (prop == 'params' &&
                (parent.type == 'FunctionDeclaration' || parent.type == 'ArrowFunctionExpression')) {
                isDeclaration.value = true;
            }
            if (prop == 'id' && parent.type == 'VariableDeclarator') {
                isDeclaration.value = true;
            }
            try {
                rewriteNodeCommentImports(node);
                switch (node.type) {
                    case 'Identifier':
                        handleIdentifier(node);
                        stores.handleIdentifier(node, parent, prop);
                        eventHandler.handleIdentifier(node, parent, prop);
                        break;
                    case 'ImportExpression': {
                        const source = node.source;
                        if (options.rewriteExternalImports &&
                            (source === null || source === void 0 ? void 0 : source.type) === 'Literal' &&
                            typeof source.value === 'string') {
                            const rewrite = getExternalImportRewrite(source.value, options.rewriteExternalImports);
                            if (rewrite) {
                                str.overwrite(source.start + 1, source.end - 1, rewrite.rewritten);
                            }
                        }
                        break;
                    }
                    case 'IfBlock':
                        handleIf(str, node);
                        break;
                    case 'EachBlock':
                        templateScope = templateScope.child();
                        if (node.context) {
                            handleScopeAndResolveForSlotInner(node.context, node.expression, node);
                        }
                        handleEach(str, node);
                        break;
                    case 'ElseBlock':
                        handleElse(str, node, parent);
                        break;
                    case 'KeyBlock':
                        handleKey(str, node);
                        break;
                    case 'BlockStatement':
                    case 'FunctionDeclaration':
                    case 'ArrowFunctionExpression':
                        scopeStack.push();
                        break;
                    case 'SnippetBlock':
                        scopeStack.push();
                        handleSnippet(str, node, (element instanceof InlineComponent &&
                            estreeTypedParent.type === 'InlineComponent') ||
                            (element instanceof Element &&
                                element.tagName === 'svelte:boundary')
                            ? element
                            : undefined, emitJsDoc, isTsFile);
                        if (parent === ast) {
                            const result = analyze({
                                type: 'FunctionDeclaration',
                                start: -1,
                                end: -1,
                                id: node.expression,
                                params: (_a = node.parameters) !== null && _a !== void 0 ? _a : [],
                                body: {
                                    type: 'BlockStatement',
                                    start: -1,
                                    end: -1,
                                    body: node.children
                                }
                            });
                            rootSnippets.push([
                                node.start,
                                node.end,
                                result.globals,
                                node.expression.name
                            ]);
                        }
                        else {
                            pendingSnippetHoistCheck.add(parent);
                        }
                        break;
                    case 'MustacheTag':
                        handleMustacheTag(str, node, parent);
                        break;
                    case 'RawMustacheTag':
                        scripts.checkIfContainsScriptTag(node);
                        handleRawHtml(str, node);
                        break;
                    case 'DebugTag':
                        handleDebug(str, node);
                        break;
                    case 'ConstTag':
                        handleConstTag(str, node);
                        break;
                    case 'RenderTag':
                        handleRenderTag(str, node);
                        break;
                    case 'AttachTag':
                        handleLeadingStartComment(str, node, ast);
                        handleTrailingEndComment(str, node, parent, ast);
                        handleAttachTag(node, element);
                        break;
                    case 'InlineComponent':
                        if (element) {
                            element.child = new InlineComponent(str, node, element);
                            element = element.child;
                        }
                        else {
                            element = new InlineComponent(str, node);
                        }
                        if (options.svelte5Plus) {
                            handleImplicitChildren(node, element);
                        }
                        handleComponentLet(node);
                        break;
                    case 'Element':
                    case 'Options':
                    case 'Window':
                    case 'Head':
                    case 'Title':
                    case 'Document':
                    case 'Body':
                    case 'SvelteBoundary':
                    case 'Slot':
                    case 'SlotTemplate':
                        if (node.type === 'Element') {
                            scripts.checkIfElementIsScriptTag(node, parent);
                        }
                        else if (node.type === 'Options') {
                            handleSvelteOptions(node);
                        }
                        else if (node.type === 'Slot') {
                            slotHandler.handleSlot(node, templateScope);
                        }
                        if (node.name === '!DOCTYPE') {
                            str.remove(node.start, node.end);
                        }
                        else {
                            if (element) {
                                element.child = new Element(str, node, options.typingsNamespace, element);
                                element = element.child;
                            }
                            else {
                                element = new Element(str, node, options.typingsNamespace);
                            }
                        }
                        break;
                    case 'Comment':
                        componentDocumentation.handleComment(node);
                        handleComment(str, node);
                        break;
                    case 'Binding':
                        handleLeadingStartComment(str, node, ast);
                        handleTrailingEndComment(str, node, parent, ast);
                        handleBinding(str, node, parent, element, options.typingsNamespace === 'svelteHTML', options.svelte5Plus, emitJsDoc, isTsFile);
                        break;
                    case 'Class':
                        handleClassDirective(str, node, element);
                        break;
                    case 'StyleDirective':
                        handleStyleDirective(str, node, element);
                        break;
                    case 'Action':
                        handleLeadingStartComment(str, node, ast);
                        handleTrailingEndComment(str, node, parent, ast);
                        stores.handleDirective(node, str);
                        handleActionDirective(node, element);
                        break;
                    case 'Transition':
                        handleLeadingStartComment(str, node, ast);
                        handleTrailingEndComment(str, node, parent, ast);
                        stores.handleDirective(node, str);
                        handleTransitionDirective(str, node, element);
                        break;
                    case 'Animation':
                        handleLeadingStartComment(str, node, ast);
                        handleTrailingEndComment(str, node, parent, ast);
                        stores.handleDirective(node, str);
                        handleAnimateDirective(str, node, element);
                        break;
                    case 'Attribute':
                        handleLeadingStartComment(str, node, ast);
                        handleTrailingEndComment(str, node, parent, ast);
                        handleAttribute(str, node, parent, preserveAttributeCase, options.svelte5Plus, element);
                        break;
                    case 'Spread':
                        handleLeadingStartComment(str, node, ast);
                        handleTrailingEndComment(str, node, parent, ast);
                        handleSpread(node, element);
                        break;
                    case 'EventHandler':
                        handleLeadingStartComment(str, node, ast);
                        handleTrailingEndComment(str, node, parent, ast);
                        eventHandler.handleEventHandler(node, parent);
                        handleEventHandler(str, node, element);
                        break;
                    case 'Let':
                        handleLeadingStartComment(str, node, ast);
                        handleTrailingEndComment(str, node, parent, ast);
                        handleLet(str, node, parent, preserveAttributeCase, options.svelte5Plus, element);
                        break;
                    case 'Text':
                        handleText(str, node, parent);
                        break;
                    case 'Style':
                        handleStyleTag(node);
                        break;
                    case 'VariableDeclarator':
                        isDeclaration.value = true;
                        break;
                    case 'AwaitBlock':
                        templateScope = templateScope.child();
                        if (node.value) {
                            handleScopeAndResolveForSlotInner(node.value, node.expression, node.then);
                        }
                        if (node.error) {
                            handleScopeAndResolveForSlotInner(node.error, node.expression, node.catch);
                        }
                        break;
                    case 'AwaitExpression':
                        isRunes || (isRunes = path.every(({ type }) => type !== 'ArrowFunctionExpression' &&
                            type !== 'FunctionExpression' &&
                            type !== 'FunctionDeclaration'));
                }
            }
            catch (e) {
                console.error('Error walking node ', node, e);
                throw e;
            }
        },
        leave: (estreeTypedNode, estreeTypedParent, prop) => {
            const node = estreeTypedNode;
            const parent = estreeTypedParent;
            path.pop();
            if (prop == 'params' &&
                (parent.type == 'FunctionDeclaration' || parent.type == 'ArrowFunctionExpression')) {
                isDeclaration.value = false;
            }
            if (prop == 'id' && parent.type == 'VariableDeclarator') {
                isDeclaration.value = false;
            }
            const onTemplateScopeLeave = () => {
                templateScope = templateScope.parent;
            };
            try {
                switch (node.type) {
                    case 'BlockStatement':
                    case 'FunctionDeclaration':
                    case 'ArrowFunctionExpression':
                    case 'SnippetBlock':
                        scopeStack.pop();
                        break;
                    case 'EachBlock':
                        onTemplateScopeLeave();
                        break;
                    case 'AwaitBlock':
                        onTemplateScopeLeave();
                        handleAwait(str, node);
                        break;
                    case 'InlineComponent':
                    case 'Element':
                    case 'Options':
                    case 'Window':
                    case 'Head':
                    case 'Title':
                    case 'Body':
                    case 'SvelteBoundary':
                    case 'Document':
                    case 'Slot':
                    case 'SlotTemplate':
                        if (node.type === 'InlineComponent') {
                            onTemplateScopeLeave();
                        }
                        if (node.name !== '!DOCTYPE') {
                            element.performTransformation();
                            element = element.parent;
                        }
                        break;
                }
            }
            catch (e) {
                console.error('Error leaving node ', node);
                throw e;
            }
        }
    });
    for (const node of pendingSnippetHoistCheck) {
        hoistSnippetBlock(str, node);
    }
    const { scriptTag, moduleScriptTag } = scripts.getTopLevelScriptTags();
    if (options.mode !== 'ts') {
        scripts.blankOtherScriptTags(str);
    }
    const resolvedStores = stores.getStoreNames();
    return {
        htmlAst: ast,
        moduleScriptTag,
        scriptTag,
        rootSnippets,
        slots: slotHandler.getSlotDef(),
        events: new ComponentEvents(eventHandler, tags.some((tag) => { var _a; return (_a = tag.attributes) === null || _a === void 0 ? void 0 : _a.some((a) => a.name === 'strictEvents'); }), str),
        uses$$props,
        uses$$restProps,
        uses$$slots,
        componentDocumentation,
        resolvedStores,
        usesAccessors,
        isRunes
    };
}
function get_global_types(tsSystem, isSvelte3, sveltePath, typesPath, hiddenFolderPath) {
    let svelteHtmlPath = isSvelte3 ? undefined : path$1.join(sveltePath, 'svelte-html.d.ts');
    svelteHtmlPath =
        svelteHtmlPath && tsSystem.fileExists(svelteHtmlPath) ? svelteHtmlPath : undefined;
    let svelteTsxFiles;
    if (isSvelte3) {
        svelteTsxFiles = ['./svelte-shims.d.ts', './svelte-jsx.d.ts', './svelte-native-jsx.d.ts'];
    }
    else {
        svelteTsxFiles = ['./svelte-shims-v4.d.ts', './svelte-native-jsx.d.ts'];
        if (!svelteHtmlPath) {
            svelteTsxFiles.push('./svelte-jsx-v4.d.ts');
        }
    }
    svelteTsxFiles = svelteTsxFiles.map((f) => tsSystem.resolvePath(path$1.resolve(typesPath, f)));
    if (hiddenFolderPath) {
        try {
            let path = path$1.dirname(sveltePath);
            if (!tsSystem.directoryExists(path$1.resolve(path, 'node_modules'))) {
                path = hiddenFolderPath;
                while (path && !tsSystem.directoryExists(path$1.resolve(path, 'node_modules'))) {
                    const parent = path$1.dirname(path);
                    if (path === parent) {
                        path = '';
                        break;
                    }
                    path = parent;
                }
            }
            if (path) {
                const hiddenPath = path$1.resolve(path, 'node_modules/.svelte2tsx-language-server-files');
                const newFiles = [];
                for (const f of svelteTsxFiles) {
                    const hiddenFile = path$1.resolve(hiddenPath, path$1.basename(f));
                    const existing = tsSystem.readFile(hiddenFile);
                    const toWrite = tsSystem.readFile(f);
                    if (!toWrite) {
                        throw new Error(`Could not read file: ${f}`);
                    }
                    if (existing !== toWrite) {
                        tsSystem.writeFile(hiddenFile, toWrite);
                        if (!tsSystem.fileExists(hiddenFile)) {
                            throw new Error(`Could not write file: ${hiddenFile}`);
                        }
                    }
                    newFiles.push(hiddenFile);
                }
                svelteTsxFiles = newFiles;
            }
        }
        catch (e) { }
    }
    if (svelteHtmlPath) {
        svelteTsxFiles.push(tsSystem.resolvePath(path$1.resolve(typesPath, svelteHtmlPath)));
    }
    return svelteTsxFiles;
}
function findExports(ts, source, isTsFile) {
    var _a, _b, _c, _d;
    const exports = new Map();
    for (const statement of source.statements) {
        if (ts.isFunctionDeclaration(statement) &&
            statement.name &&
            ((_b = (_a = ts.getModifiers(statement)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.kind) === ts.SyntaxKind.ExportKeyword) {
            exports.set(statement.name.text, {
                type: 'function',
                node: statement,
                hasTypeDefinition: hasTypedParameter(ts, statement, isTsFile)
            });
        }
        if (ts.isVariableStatement(statement) &&
            statement.declarationList.declarations.length === 1 &&
            ((_d = (_c = ts.getModifiers(statement)) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.kind) === ts.SyntaxKind.ExportKeyword) {
            const declaration = statement.declarationList.declarations[0];
            const hasTypeDefinition = !!declaration.type ||
                (!isTsFile && !!ts.getJSDocType(declaration)) ||
                (!isTsFile &&
                    ts.getJSDocTags(declaration).some((t) => t.tagName.text === 'satisfies')) ||
                (!!declaration.initializer && ts.isSatisfiesExpression(declaration.initializer));
            if (declaration.initializer &&
                (ts.isFunctionExpression(declaration.initializer) ||
                    ts.isArrowFunction(declaration.initializer) ||
                    (ts.isSatisfiesExpression(declaration.initializer) &&
                        ts.isParenthesizedExpression(declaration.initializer.expression) &&
                        (ts.isFunctionExpression(declaration.initializer.expression.expression) ||
                            ts.isArrowFunction(declaration.initializer.expression.expression))) ||
                    (ts.isParenthesizedExpression(declaration.initializer) &&
                        (ts.isFunctionExpression(declaration.initializer.expression) ||
                            ts.isArrowFunction(declaration.initializer.expression))))) {
                const node = ts.isSatisfiesExpression(declaration.initializer)
                    ? declaration.initializer.expression
                        .expression
                    : ts.isParenthesizedExpression(declaration.initializer)
                        ? declaration.initializer.expression
                        : declaration.initializer;
                exports.set(declaration.name.getText(), {
                    type: 'function',
                    node,
                    hasTypeDefinition: hasTypeDefinition || hasTypedParameter(ts, node, isTsFile)
                });
            }
            else if (ts.isIdentifier(declaration.name)) {
                exports.set(declaration.name.getText(), {
                    type: 'var',
                    node: declaration,
                    hasTypeDefinition
                });
            }
        }
    }
    return exports;
}
function hasTypedParameter(ts, node, isTsFile) {
    var _a;
    return (!!((_a = node.parameters[0]) === null || _a === void 0 ? void 0 : _a.type) ||
        (!isTsFile &&
            (!!ts.getJSDocType(node) ||
                (node.parameters[0] && !!ts.getJSDocParameterTags(node.parameters[0]).length))));
}
const kitPageFiles = new Set(['+page', '+layout', '+page.server', '+layout.server', '+server']);
function isKitFile(fileName, options) {
    const basename = path$1.basename(fileName);
    return (isKitRouteFile(basename) ||
        isHooksFile(fileName, basename, options.serverHooksPath) ||
        isHooksFile(fileName, basename, options.clientHooksPath) ||
        isHooksFile(fileName, basename, options.universalHooksPath) ||
        isParamsFile(fileName, basename, options.paramsPath));
}
function isKitRouteFile(basename) {
    if (basename.includes('@')) {
        basename = basename.split('@')[0];
    }
    else {
        basename = basename.slice(0, -path$1.extname(basename).length);
    }
    return kitPageFiles.has(basename);
}
function isHooksFile(fileName, basename, hooksPath) {
    return (((basename === 'index.ts' || basename === 'index.js') &&
        fileName.slice(0, -basename.length - 1).endsWith(hooksPath)) ||
        fileName.slice(0, -path$1.extname(basename).length).endsWith(hooksPath));
}
function isParamsFile(fileName, basename, paramsPath) {
    return (fileName.slice(0, -basename.length - 1).endsWith(paramsPath) &&
        !basename.includes('.test') &&
        !basename.includes('.spec'));
}
function upsertKitFile(ts, fileName, kitFilesSettings, getSource, surround = (text) => text, rewriteExternalImports) {
    var _a, _b, _c, _d;
    let basename = path$1.basename(fileName);
    const result = (_d = (_c = (_b = (_a = upsertKitRouteFile(ts, basename, getSource, surround)) !== null && _a !== void 0 ? _a : upsertKitServerHooksFile(ts, fileName, basename, kitFilesSettings.serverHooksPath, getSource, surround)) !== null && _b !== void 0 ? _b : upsertKitClientHooksFile(ts, fileName, basename, kitFilesSettings.clientHooksPath, getSource, surround)) !== null && _c !== void 0 ? _c : upsertKitUniversalHooksFile(ts, fileName, basename, kitFilesSettings.universalHooksPath, getSource, surround)) !== null && _d !== void 0 ? _d : upsertKitParamsFile(ts, fileName, basename, kitFilesSettings.paramsPath, getSource, surround);
    if (!result) {
        return;
    }
    const { originalText, addedCode } = result;
    let pos = 0;
    let text = '';
    for (const added of addedCode) {
        text += originalText.slice(pos, added.originalPos) + added.inserted;
        pos = added.originalPos;
    }
    text += originalText.slice(pos);
    if (rewriteExternalImports) {
        const source = getSource();
        if (source) {
            const rewriteOptions = {
                sourcePath: fileName,
                generatedPath: rewriteExternalImports.generatedPath,
                workspacePath: rewriteExternalImports.workspacePath
            };
            applyExternalImportRewritesToAddedCode(ts, source, addedCode, rewriteOptions);
            let rewritePos = 0;
            text = '';
            for (const added of addedCode) {
                text += originalText.slice(rewritePos, added.originalPos) + added.inserted;
                rewritePos = added.originalPos;
            }
            text += originalText.slice(rewritePos);
        }
    }
    return { text, addedCode };
}
function applyExternalImportRewritesToAddedCode(ts_impl, source, addedCode, rewriteOptions) {
    forEachExternalImportRewrite(ts_impl, source, rewriteOptions, (module_specifier, rewrite) => {
        if (!rewrite.insertedPrefix) {
            return;
        }
        insertCode(addedCode, module_specifier.getStart(source) + 1, rewrite.insertedPrefix);
    });
}
function upsertKitRouteFile(ts, basename, getSource, surround) {
    if (!isKitRouteFile(basename))
        return;
    const source = getSource();
    if (!source)
        return;
    const addedCode = [];
    const insert = (pos, inserted) => {
        insertCode(addedCode, pos, inserted);
    };
    const isTsFile = basename.endsWith('.ts');
    const exports = findExports(ts, source, isTsFile);
    const load = exports.get('load');
    if ((load === null || load === void 0 ? void 0 : load.type) === 'function' && load.node.parameters.length === 1 && !load.hasTypeDefinition) {
        const load_type = `import('./$types.js').${basename.includes('layout') ? 'Layout' : 'Page'}${basename.includes('server') ? 'Server' : ''}Load`;
        if (isTsFile) {
            const pos = load.node.parameters[0].getEnd();
            const inserted = surround(`: ${load_type}Event`);
            insert(pos, inserted);
        }
        else {
            addJsDocParamToFunction(surround, insert, ts, load.node, `${load_type}Event`);
        }
    }
    else if ((load === null || load === void 0 ? void 0 : load.type) === 'var' && !load.hasTypeDefinition) {
        const load_type = `import('./$types.js').${basename.includes('layout') ? 'Layout' : 'Page'}${basename.includes('server') ? 'Server' : ''}Load`;
        if (isTsFile) {
            insert(load.node.initializer.getStart(), surround('('));
            insert(load.node.initializer.getEnd(), surround(`) satisfies ${load_type}`));
        }
        else {
            addJsDocSatisfiesToVariable(surround, insert, load.node, load_type);
        }
    }
    const entries = exports.get('entries');
    if ((entries === null || entries === void 0 ? void 0 : entries.type) === 'function' &&
        entries.node.parameters.length === 0 &&
        !entries.hasTypeDefinition &&
        !basename.includes('layout')) {
        if (isTsFile && !entries.node.type && entries.node.body) {
            const returnPos = ts.isArrowFunction(entries.node)
                ? entries.node.equalsGreaterThanToken.getStart()
                : entries.node.body.getStart();
            const returnInsertion = surround(`: ReturnType<import('./$types.js').EntryGenerator> `);
            insert(returnPos, returnInsertion);
        }
        else if (!isTsFile) {
            addJsDocTypeToFunction(surround, insert, entries.node, `import('./$types.js').EntryGenerator`);
        }
    }
    const actions = exports.get('actions');
    if ((actions === null || actions === void 0 ? void 0 : actions.type) === 'var' && !actions.hasTypeDefinition && actions.node.initializer) {
        if (isTsFile) {
            const pos = actions.node.initializer.getEnd();
            const inserted = surround(` satisfies import('./$types.js').Actions`);
            insert(pos, inserted);
        }
        else {
            addJsDocSatisfiesToVariable(surround, insert, actions.node, `import('./$types.js').Actions`);
        }
    }
    addTypeToVariable(exports, surround, insert, isTsFile, 'prerender', `boolean | 'auto'`);
    addTypeToVariable(exports, surround, insert, isTsFile, 'trailingSlash', `'never' | 'always' | 'ignore'`);
    addTypeToVariable(exports, surround, insert, isTsFile, 'ssr', `boolean`);
    addTypeToVariable(exports, surround, insert, isTsFile, 'csr', `boolean`);
    const insertApiMethod = (name) => {
        addTypeToFunction(ts, exports, surround, insert, isTsFile, name, `import('./$types.js').RequestEvent`, `Response | Promise<Response>`, `Promise<Response>`);
    };
    insertApiMethod('GET');
    insertApiMethod('PUT');
    insertApiMethod('POST');
    insertApiMethod('PATCH');
    insertApiMethod('DELETE');
    insertApiMethod('OPTIONS');
    insertApiMethod('HEAD');
    insertApiMethod('fallback');
    return { addedCode, originalText: source.getFullText() };
}
function upsertKitParamsFile(ts, fileName, basename, paramsPath, getSource, surround) {
    if (!isParamsFile(fileName, basename, paramsPath)) {
        return;
    }
    const source = getSource();
    if (!source)
        return;
    const addedCode = [];
    const insert = (pos, inserted) => {
        insertCode(addedCode, pos, inserted);
    };
    const isTsFile = basename.endsWith('.ts');
    const exports = findExports(ts, source, isTsFile);
    addTypeToFunction(ts, exports, surround, insert, isTsFile, 'match', 'string', 'boolean');
    return { addedCode, originalText: source.getFullText() };
}
function upsertKitClientHooksFile(ts, fileName, basename, clientHooksPath, getSource, surround) {
    if (!isHooksFile(fileName, basename, clientHooksPath)) {
        return;
    }
    const source = getSource();
    if (!source)
        return;
    const addedCode = [];
    const insert = (pos, inserted) => {
        insertCode(addedCode, pos, inserted);
    };
    const isTsFile = basename.endsWith('.ts');
    const exports = findExports(ts, source, isTsFile);
    addTypeToFunction(ts, exports, surround, insert, isTsFile, 'handleError', `import('@sveltejs/kit').HandleClientError`);
    return { addedCode, originalText: source.getFullText() };
}
function upsertKitServerHooksFile(ts, fileName, basename, serverHooksPath, getSource, surround) {
    if (!isHooksFile(fileName, basename, serverHooksPath)) {
        return;
    }
    const source = getSource();
    if (!source)
        return;
    const addedCode = [];
    const insert = (pos, inserted) => {
        insertCode(addedCode, pos, inserted);
    };
    const isTsFile = basename.endsWith('.ts');
    const exports = findExports(ts, source, isTsFile);
    const addType = (name, type) => {
        addTypeToFunction(ts, exports, surround, insert, isTsFile, name, type);
    };
    addType('handleError', `import('@sveltejs/kit').HandleServerError`);
    addType('handle', `import('@sveltejs/kit').Handle`);
    addType('handleFetch', `import('@sveltejs/kit').HandleFetch`);
    return { addedCode, originalText: source.getFullText() };
}
function upsertKitUniversalHooksFile(ts, fileName, basename, universalHooksPath, getSource, surround) {
    if (!isHooksFile(fileName, basename, universalHooksPath)) {
        return;
    }
    const source = getSource();
    if (!source)
        return;
    const addedCode = [];
    const insert = (pos, inserted) => {
        insertCode(addedCode, pos, inserted);
    };
    const isTsFile = basename.endsWith('.ts');
    const exports = findExports(ts, source, isTsFile);
    addTypeToFunction(ts, exports, surround, insert, isTsFile, 'reroute', `import('@sveltejs/kit').Reroute`);
    return { addedCode, originalText: source.getFullText() };
}
function addTypeToVariable(exports, surround, insert, isTsFile, name, type) {
    const variable = exports.get(name);
    if ((variable === null || variable === void 0 ? void 0 : variable.type) === 'var' && !variable.hasTypeDefinition && variable.node.initializer) {
        if (isTsFile) {
            const pos = variable.node.name.getEnd();
            const inserted = surround(` : ${type}`);
            insert(pos, inserted);
        }
        else {
            addJsDocTypeToVariable(surround, insert, variable.node, type);
        }
    }
}
function addTypeToFunction(ts, exports, surround, insert, isTsFile, name, type, returnType, asyncReturnType) {
    var _a, _b;
    const fn = exports.get(name);
    if ((fn === null || fn === void 0 ? void 0 : fn.type) === 'function' && fn.node.parameters.length === 1 && !fn.hasTypeDefinition) {
        if (isTsFile) {
            const paramPos = fn.node.parameters[0].getEnd();
            const paramInsertion = surround(!returnType ? `: Parameters<${type}>[0]` : `: ${type}`);
            insert(paramPos, paramInsertion);
            if (!fn.node.type && fn.node.body) {
                const isAsync = (_b = (_a = fn.node.modifiers) === null || _a === void 0 ? void 0 : _a.some((m) => m.kind === ts.SyntaxKind.AsyncKeyword)) !== null && _b !== void 0 ? _b : false;
                const effectiveReturnType = isAsync && asyncReturnType ? asyncReturnType : returnType;
                const returnPos = ts.isArrowFunction(fn.node)
                    ? fn.node.equalsGreaterThanToken.getStart()
                    : fn.node.body.getStart();
                const returnInsertion = surround(!effectiveReturnType ? `: ReturnType<${type}> ` : `: ${effectiveReturnType} `);
                insert(returnPos, returnInsertion);
            }
        }
        else {
            const jsdoc_type = returnType === undefined ? type : `(arg0: ${type}) => ${returnType}`;
            addJsDocTypeToFunction(surround, insert, fn.node, jsdoc_type);
        }
    }
}
function addJsDocTypeToVariable(surround, insert, node, type) {
    if (!node.initializer) {
        return;
    }
    insert(node.initializer.getStart(), surround(`/** @type {${type}} */ (`));
    insert(node.initializer.getEnd(), surround(`)`));
}
function addJsDocSatisfiesToVariable(surround, insert, node, type) {
    if (!node.initializer) {
        return;
    }
    insert(node.initializer.getStart(), surround(`/** @satisfies {${type}} */ (`));
    insert(node.initializer.getEnd(), surround(`)`));
}
function addJsDocTypeToFunction(surround, insert, node, type) {
    insert(node.getStart(), surround(`/** @type {${type}} */ `));
}
function addJsDocParamToFunction(surround, insert, ts, node, type) {
    const parameter = node.parameters[0];
    if (!parameter) {
        return;
    }
    const parameter_name = ts.isIdentifier(parameter.name) ? parameter.name.text : 'arg0';
    insert(node.getStart(), surround(`/** @param {${type}} ${parameter_name} */ `));
}
function insertCode(addedCode, pos, inserted) {
    var _a, _b, _c, _d;
    const insertionIdx = addedCode.findIndex((c) => c.originalPos > pos);
    if (insertionIdx >= 0) {
        for (let i = insertionIdx; i < addedCode.length; i++) {
            addedCode[i].generatedPos += inserted.length;
            addedCode[i].total += inserted.length;
        }
        const prevTotal = (_b = (_a = addedCode[insertionIdx - 1]) === null || _a === void 0 ? void 0 : _a.total) !== null && _b !== void 0 ? _b : 0;
        addedCode.splice(insertionIdx, 0, {
            generatedPos: pos + prevTotal,
            originalPos: pos,
            length: inserted.length,
            inserted,
            total: prevTotal + inserted.length
        });
    }
    else {
        const prevTotal = (_d = (_c = addedCode[addedCode.length - 1]) === null || _c === void 0 ? void 0 : _c.total) !== null && _d !== void 0 ? _d : 0;
        addedCode.push({
            generatedPos: pos + prevTotal,
            originalPos: pos,
            length: inserted.length,
            inserted,
            total: prevTotal + inserted.length
        });
    }
}
function toVirtualPos(pos, addedCode) {
    let total = 0;
    for (const added of addedCode) {
        if (pos < added.originalPos)
            break;
        total += added.length;
    }
    return pos + total;
}
function toOriginalPos(pos, addedCode) {
    let total = 0;
    let idx = 0;
    for (; idx < addedCode.length; idx++) {
        const added = addedCode[idx];
        if (pos < added.generatedPos)
            break;
        total += added.length;
    }
    if (idx > 0) {
        const prev = addedCode[idx - 1];
        if (pos > prev.generatedPos && pos < prev.generatedPos + prev.length) {
            return { pos: prev.originalPos, inGenerated: true };
        }
    }
    return { pos: pos - total, inGenerated: false };
}
const internalHelpers = {
    isKitFile,
    isKitRouteFile,
    isHooksFile,
    isParamsFile,
    upsertKitFile,
    toVirtualPos,
    toOriginalPos,
    findExports,
    get_global_types,
    renderName: '$$render'
};
const COMPONENT_SUFFIX$1 = '__SvelteComponent_';
function addComponentExport(params) {
    if (params.generics.has()) {
        addGenericsComponentExport(params);
    }
    else {
        addSimpleComponentExport(params);
    }
}
function addGenericsComponentExport({ events, canHaveAnyProp, exportedNames, componentDocumentation, fileName, mode, usesAccessors, str, isTsFile, generics, usesSlots, isSvelte5, noSvelteComponentTyped, hasTopLevelAwait, emitJsDoc }) {
    const genericsDef = generics.toDefinitionString();
    const genericsRef = generics.toReferencesString();
    const useTSSyntax = isTsFile || !emitJsDoc;
    const templateNames = !useTSSyntax && genericsDef
        ? genericsDef
            .slice(1, -1)
            .split(',')
            .map((part) => part.trim())
            .map((part) => part.split(/\s|=/)[0])
            .filter(Boolean)
        : [];
    const templateComment = templateNames.length
        ? `/** @template ${templateNames.join(', ')} */\n`
        : '';
    const doc = componentDocumentation.getFormatted();
    const className = fileName && classNameFromFilename(fileName, mode !== 'dts');
    function returnType(forPart) {
        return `ReturnType<__sveltets_Render${genericsRef}['${forPart}']>`;
    }
    const renderCall = hasTopLevelAwait
        ? `(await ${internalHelpers.renderName}${useTSSyntax ? genericsRef : ''}())`
        : `${internalHelpers.renderName}${useTSSyntax ? genericsRef : ''}()`;
    let statement = `
${templateComment}class __sveltets_Render${useTSSyntax ? genericsDef : ''} {
    props() {
        return ${props(true, canHaveAnyProp, exportedNames, renderCall)}.props;
    }
    events() {
        return ${_events(events.hasStrictEvents() || exportedNames.isRunesMode(), renderCall)}.events;
    }
    slots() {
        return ${renderCall}.slots;
    }
`;
    if (isSvelte5 && exportedNames.isRunesMode()) {
        const renderType = hasTopLevelAwait
            ? `Awaited<ReturnType<typeof ${internalHelpers.renderName}${genericsRef}>>`
            : `ReturnType<typeof ${internalHelpers.renderName}${genericsRef}>`;
        if (useTSSyntax) {
            statement = `
class __sveltets_Render${genericsDef} {
    props(): ${renderType}['props'] { return null as any; }
    events(): ${renderType}['events'] { return null as any; }
    slots(): ${renderType}['slots'] { return null as any; }
`;
        }
        else {
            statement = `
${templateComment}class __sveltets_Render {
    /** @returns {${renderType}['props']} */
    props() { return /** @type {any} */ (null); }
    /** @returns {${renderType}['events']} */
    events() { return /** @type {any} */ (null); }
    /** @returns {${renderType}['slots']} */
    slots() { return /** @type {any} */ (null); }
`;
        }
    }
    statement += isSvelte5
        ? `    bindings() { return ${exportedNames.createBindingsStr()}; }
    ${hasTopLevelAwait ? 'async ' : ''}exports() { return ${exportedNames.hasExports() ? `${renderCall}.exports` : '{}'}; }
}\n`
        : '}\n';
    const svelteComponentClass = noSvelteComponentTyped
        ? 'SvelteComponent'
        : 'SvelteComponentTyped';
    const [PropsName] = addTypeExport(str, className, 'Props');
    const [EventsName] = addTypeExport(str, className, 'Events');
    const [SlotsName] = addTypeExport(str, className, 'Slots');
    if (isSvelte5) {
        let eventsSlotsType = [];
        if (events.hasEvents() || !exportedNames.isRunesMode()) {
            eventsSlotsType.push(`$$events?: ${returnType('events')}`);
        }
        if (usesSlots) {
            eventsSlotsType.push(`$$slots?: ${returnType('slots')}`);
            eventsSlotsType.push(`children?: any`);
        }
        const propsType = !canHaveAnyProp && exportedNames.hasNoProps()
            ? `{${eventsSlotsType.join(', ')}}`
            : `${returnType('props')} & {${eventsSlotsType.join(', ')}}`;
        const bindingsType = `ReturnType<__sveltets_Render${generics.toReferencesAnyString()}['bindings']>`;
        if (useTSSyntax) {
            statement +=
                `\ninterface $$IsomorphicComponent {\n` +
                    `    new ${genericsDef}(options: import('svelte').ComponentConstructorOptions<${returnType('props') + (usesSlots ? '& {children?: any}' : '')}>): import('svelte').SvelteComponent<${returnType('props')}, ${returnType('events')}, ${returnType('slots')}> & { $$bindings?: ${returnType('bindings')} } & ${returnType('exports')};\n` +
                    `    ${genericsDef}(internal: unknown, props: ${propsType}): ${returnType('exports')};\n` +
                    `    z_$$bindings?: ${bindingsType};\n` +
                    `}\n` +
                    `${doc}const ${className || '$$Component'}: $$IsomorphicComponent = null as any;\n` +
                    surroundWithIgnoreComments(`type ${className || '$$Component'}${genericsDef} = InstanceType<typeof ${className || '$$Component'}${genericsRef}>;\n`) +
                    `export default ${className || '$$Component'};`;
        }
        else {
            const componentName = className || '$$Component';
            const componentType = `(new ${genericsDef}(options: import('svelte').ComponentConstructorOptions<${returnType('props') + (usesSlots ? '& {children?: any}' : '')}>) => import('svelte').SvelteComponent<${returnType('props')}, ${returnType('events')}, ${returnType('slots')}> & { $$bindings?: ${returnType('bindings')} } & ${returnType('exports')}) & ` +
                `(${genericsDef}(internal: unknown, props: ${propsType}) => ${returnType('exports')}) & ` +
                `{z_$$bindings?: ${bindingsType}}`;
            statement +=
                `\n${templateComment}` +
                    `/** @typedef {${componentType}} $$IsomorphicComponent */\n` +
                    `${doc}/** @type {$$IsomorphicComponent} */ export const ${componentName} = /** @type {any} */(null);\n` +
                    `/** @typedef {InstanceType<typeof ${componentName}>} ${componentName} */\n` +
                    `export default ${componentName};`;
        }
    }
    else if (mode === 'dts') {
        statement +=
            `export type ${PropsName}${genericsDef} = ${returnType('props')};\n` +
                `export type ${EventsName}${genericsDef} = ${returnType('events')};\n` +
                `export type ${SlotsName}${genericsDef} = ${returnType('slots')};\n` +
                `\n${doc}export default class${className ? ` ${className}` : ''}${genericsDef} extends ${svelteComponentClass}<${PropsName}${genericsRef}, ${EventsName}${genericsRef}, ${SlotsName}${genericsRef}> {` +
                exportedNames.createClassGetters(genericsRef) +
                (usesAccessors ? exportedNames.createClassAccessors() : '') +
                '\n}';
    }
    else {
        if (useTSSyntax) {
            statement +=
                `\n\nimport { ${svelteComponentClass} as __SvelteComponentTyped__ } from "svelte" \n` +
                    `${doc}export default class${className ? ` ${className}` : ''}${genericsDef} extends __SvelteComponentTyped__<${returnType('props')}, ${returnType('events')}, ${returnType('slots')}> {` +
                    exportedNames.createClassGetters(genericsRef) +
                    (usesAccessors ? exportedNames.createClassAccessors() : '') +
                    '\n}';
        }
        else {
            statement +=
                `\n\nimport { ${svelteComponentClass} as __SvelteComponentTyped__ } from "svelte" \n` +
                    `/**` +
                    templateNames.map((t) => ` * @template ${t}\n`).join('') +
                    ` * @extends {__SvelteComponentTyped__<${returnType('props')}, ${returnType('events')}, ${returnType('slots')}>}\n` +
                    ` */\n` +
                    `export default class${className ? ` ${className}` : ''} extends __SvelteComponentTyped__ {` +
                    exportedNames.createClassGetters(genericsRef) +
                    (usesAccessors ? exportedNames.createClassAccessors() : '') +
                    '\n}';
        }
    }
    str.append(statement);
}
function addSimpleComponentExport({ events, isTsFile, canHaveAnyProp, exportedNames, componentDocumentation, fileName, mode, usesAccessors, str, usesSlots, noSvelteComponentTyped, isSvelte5, hasTopLevelAwait, emitJsDoc }) {
    const renderCall = hasTopLevelAwait
        ? `$${internalHelpers.renderName}`
        : `${internalHelpers.renderName}()`;
    const awaitDeclaration = hasTopLevelAwait
        ?
            surroundWithIgnoreComments(`const $${internalHelpers.renderName} = await ${internalHelpers.renderName}();`) + '\n'
        : '';
    const propDef = props(isTsFile, canHaveAnyProp, exportedNames, _events(events.hasStrictEvents(), renderCall));
    const doc = componentDocumentation.getFormatted();
    const className = fileName && classNameFromFilename(fileName, mode !== 'dts');
    const componentName = className || '$$Component';
    let statement;
    if (mode === 'dts') {
        if (isSvelte5 && exportedNames.isRunesMode() && !usesSlots && !events.hasEvents()) {
            statement =
                `\n${awaitDeclaration}${doc}const ${componentName} = __sveltets_2_fn_component(${renderCall});\n` +
                    `type ${componentName} = ReturnType<typeof ${componentName}>;\n` +
                    `export default ${componentName};`;
        }
        else if (isSvelte5) {
            statement =
                `\ninterface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
    new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & { $$bindings?: Bindings } & Exports;
    (internal: unknown, props: ${!canHaveAnyProp && exportedNames.hasNoProps() ? '{$$events?: Events, $$slots?: Slots}' : 'Props & {$$events?: Events, $$slots?: Slots}'}): Exports & { $set?: any, $on?: any };
    z_$$bindings?: Bindings;
}\n` +
                    (usesSlots
                        ? `type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props &
    (Slots extends { default: any }
        ? Props extends Record<string, never>
        ? any
        : { children?: any }
        : {});
        declare function $$__sveltets_2_isomorphic_component_slots<
            Props extends Record<string, any>, Events extends Record<string, any>, Slots extends Record<string, any>, Exports extends Record<string, any>, Bindings extends string
        >(klass: {props: Props, events: Events, slots: Slots, exports?: Exports, bindings?: Bindings }): $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<Props, Slots>, Events, Slots, Exports, Bindings>;\n`
                        : `
declare function $$__sveltets_2_isomorphic_component<
    Props extends Record<string, any>, Events extends Record<string, any>, Slots extends Record<string, any>, Exports extends Record<string, any>, Bindings extends string
>(klass: {props: Props, events: Events, slots: Slots, exports?: Exports, bindings?: Bindings }): $$__sveltets_2_IsomorphicComponent<Props, Events, Slots, Exports, Bindings>;\n`) +
                    `${awaitDeclaration}${doc}const ${componentName} = $$__sveltets_2_isomorphic_component${usesSlots ? '_slots' : ''}(${propDef});\n` +
                    surroundWithIgnoreComments(`type ${componentName} = InstanceType<typeof ${componentName}>;\n`) +
                    `export default ${componentName};`;
        }
        else if (isTsFile) {
            const svelteComponentClass = noSvelteComponentTyped
                ? 'SvelteComponent'
                : 'SvelteComponentTyped';
            const [PropsName, PropsExport] = addTypeExport(str, className, 'Props');
            const [EventsName, EventsExport] = addTypeExport(str, className, 'Events');
            const [SlotsName, SlotsExport] = addTypeExport(str, className, 'Slots');
            statement =
                `\nconst __propDef = ${propDef};\n` +
                    PropsExport +
                    EventsExport +
                    SlotsExport +
                    `\n${doc}export default class${className ? ` ${className}` : ''} extends ${svelteComponentClass}<${PropsName}, ${EventsName}, ${SlotsName}> {` +
                    exportedNames.createClassGetters() +
                    (usesAccessors ? exportedNames.createClassAccessors() : '') +
                    '\n}';
        }
        else {
            statement =
                `\nconst __propDef = ${propDef};\n` +
                    `/** @typedef {typeof __propDef.props}  ${className}Props */\n` +
                    `/** @typedef {typeof __propDef.events}  ${className}Events */\n` +
                    `/** @typedef {typeof __propDef.slots}  ${className}Slots */\n` +
                    `\n${doc}export default class${className ? ` ${className}` : ''} extends __sveltets_2_createSvelte2TsxComponent(${propDef}) {` +
                    exportedNames.createClassGetters() +
                    (usesAccessors ? exportedNames.createClassAccessors() : '') +
                    '\n}';
        }
    }
    else {
        if (isSvelte5) {
            const useTypeScriptSyntax = isTsFile || !emitJsDoc;
            if (exportedNames.isRunesMode() && !usesSlots && !events.hasEvents()) {
                statement =
                    `\n${awaitDeclaration}${doc}${useTypeScriptSyntax ? '' : 'export '}const ${componentName} = __sveltets_2_fn_component(${renderCall});\n` +
                        surroundWithIgnoreComments(useTypeScriptSyntax
                            ? `type ${componentName} = ReturnType<typeof ${componentName}>;\n`
                            : `/** @typedef {ReturnType<typeof ${componentName}>} ${componentName} */\n`) +
                        `export default ${componentName};`;
            }
            else {
                statement =
                    `\n${awaitDeclaration}${doc}${useTypeScriptSyntax ? '' : 'export '}const ${componentName} = __sveltets_2_isomorphic_component${usesSlots ? '_slots' : ''}(${propDef});\n` +
                        surroundWithIgnoreComments(useTypeScriptSyntax
                            ? `type ${componentName} = InstanceType<typeof ${componentName}>;\n`
                            : `/** @typedef {InstanceType<typeof ${componentName}>} ${componentName} */\n`) +
                        `export default ${componentName};`;
            }
        }
        else {
            statement =
                `\n\n${doc}export default class${className ? ` ${className}` : ''} extends __sveltets_2_createSvelte2TsxComponent(${propDef}) {` +
                    exportedNames.createClassGetters() +
                    (usesAccessors ? exportedNames.createClassAccessors() : '') +
                    '\n}';
        }
    }
    str.append(statement);
}
function addTypeExport(str, className, type) {
    const exportName = className + type;
    if (!new RegExp(`\\W${exportName}\\W`).test(str.original)) {
        return [
            exportName,
            `export type ${exportName} = typeof __propDef.${type.toLowerCase()};\n`
        ];
    }
    let replacement = exportName + '_';
    while (str.original.includes(replacement)) {
        replacement += '_';
    }
    if (
    !new RegExp(`export ((const|let|var|class|interface|type) ${exportName}\\W|{[^}]*?${exportName}(}|\\W.*?}))`).test(str.original)) {
        return [
            replacement,
            `type ${replacement} = typeof __propDef.${type.toLowerCase()};\nexport { ${replacement} as ${exportName} };\n`
        ];
    }
    else {
        return [
            replacement,
            `type ${replacement} = typeof __propDef.${type.toLowerCase()};\n`
        ];
    }
}
function _events(strictEvents, renderStr) {
    return strictEvents ? renderStr : `__sveltets_2_with_any_event(${renderStr})`;
}
function props(isTsFile, canHaveAnyProp, exportedNames, renderStr) {
    if (exportedNames.isRunesMode()) {
        return renderStr;
    }
    else if (isTsFile) {
        return canHaveAnyProp ? `__sveltets_2_with_any(${renderStr})` : renderStr;
    }
    else {
        const optionalProps = exportedNames.createOptionalPropsArray();
        const partial = `__sveltets_2_partial${canHaveAnyProp ? '_with_any' : ''}`;
        return optionalProps.length > 0
            ? `${partial}([${optionalProps.join(',')}], ${renderStr})`
            : `${partial}(${renderStr})`;
    }
}
function classNameFromFilename(filename, appendSuffix) {
    var _a;
    try {
        const withoutExtensions = (_a = path$1.parse(filename).name) === null || _a === void 0 ? void 0 : _a.split('.')[0];
        const withoutInvalidCharacters = withoutExtensions
            .split('')
            .filter((char) => /[A-Za-z_\d-]/.test(char))
            .join('');
        const firstValidCharIdx = withoutInvalidCharacters
            .split('')
            .findIndex((char) => /[A-Za-z]/.test(char));
        const withoutLeadingInvalidCharacters = withoutInvalidCharacters.substr(firstValidCharIdx);
        const inPascalCase = pascalCase(withoutLeadingInvalidCharacters);
        const finalName = firstValidCharIdx === -1 ? `A${inPascalCase}` : inPascalCase;
        return `${finalName}${appendSuffix ? COMPONENT_SUFFIX$1 : ''}`;
    }
    catch (error) {
        console.warn(`Failed to create a name for the component class from filename ${filename}`);
        return undefined;
    }
}
function createRenderFunction({ str, scriptTag, scriptDestination, slots, events, exportedNames, uses$$props, uses$$restProps, uses$$slots, uses$$SlotsInterface, generics, hasTopLevelAwait, isTsFile, mode, emitJsDoc = false }) {
    const htmlx = str.original;
    let propsDecl = '';
    const useTypescriptSyntax = isTsFile || !emitJsDoc;
    const templateNames = useTypescriptSyntax ? [] : generics.getReferences();
    const templateComment = !useTypescriptSyntax && templateNames.length
        ? `\n/** @template ${templateNames.join(', ')} */\n`
        : '';
    if (uses$$props) {
        propsDecl += ' let $$props = __sveltets_2_allPropsType();';
    }
    if (uses$$restProps) {
        propsDecl += ' let $$restProps = __sveltets_2_restPropsType();';
    }
    if (uses$$slots) {
        propsDecl +=
            ' let $$slots = __sveltets_2_slotsType({' +
                Array.from(slots.keys())
                    .map((name) => `'${name}': ''`)
                    .join(', ') +
                '});';
    }
    const slotTypeReference = uses$$SlotsInterface ? '<$$Slots>' : '';
    const slotDeclaration = useTypescriptSyntax || !slotTypeReference
        ? `;const __sveltets_createSlot = __sveltets_2_createCreateSlot${slotTypeReference}();`
        : `/** @type {ReturnType<typeof __sveltets_2_createCreateSlot${slotTypeReference}>} */ const __sveltets_createSlot = __sveltets_2_createCreateSlot();`;
    const slotsDeclaration = slots.size > 0 && mode !== 'dts' ? '\n' + surroundWithIgnoreComments(slotDeclaration) : '';
    if (scriptTag) {
        const scriptTagEnd = htmlx.lastIndexOf('>', scriptTag.content.start) + 1;
        str.overwrite(scriptTag.start, scriptTag.start + 1, ';');
        if (generics.genericsAttr) {
            let start = generics.genericsAttr.value[0].start;
            let end = generics.genericsAttr.value[0].end;
            if (htmlx.charAt(start) === '"' || htmlx.charAt(start) === "'") {
                start++;
                end--;
            }
            str.overwrite(scriptTag.start + 1, start - 1, `${templateComment}${hasTopLevelAwait ? 'async ' : ''}function ${internalHelpers.renderName}`);
            if (useTypescriptSyntax) {
                str.overwrite(start - 1, start, isTsFile ? '<' : `<${IGNORE_START_COMMENT}`);
                str.overwrite(end, scriptTagEnd, `>${isTsFile ? '' : IGNORE_END_COMMENT}() {${propsDecl}\n`);
            }
            else {
                str.overwrite(start - 1, start, '');
                str.overwrite(start, end, '');
                str.overwrite(end, scriptTagEnd, `() {${propsDecl}\n`);
            }
        }
        else {
            str.overwrite(scriptTag.start + 1, scriptTagEnd, `${templateComment}${hasTopLevelAwait ? 'async ' : ''}function ${internalHelpers.renderName}${useTypescriptSyntax ? generics.toDefinitionString(true) : ''}() {${propsDecl}\n`);
        }
        const scriptEndTagStart = htmlx.lastIndexOf('<', scriptTag.end - 1);
        str.overwrite(scriptEndTagStart, scriptTag.end, `${slotsDeclaration};\nasync () => {`, {
            contentOnly: true
        });
    }
    else {
        str.prependRight(scriptDestination, `;${templateComment}${hasTopLevelAwait ? 'async ' : ''}function ${internalHelpers.renderName}${useTypescriptSyntax ? generics.toDefinitionString(true) : ''}() {` +
            `${propsDecl}${slotsDeclaration}\nasync () => {`);
    }
    const slotsAsDef = uses$$SlotsInterface
        ? '{} as unknown as $$Slots'
        : '{' +
            Array.from(slots.entries())
                .map(([name, attrs]) => {
                return `'${name}': {${slotAttributesToString(attrs)}}`;
            })
                .join(', ') +
            '}';
    const returnString = `\nreturn { props: ${exportedNames.createPropsStr(uses$$props || uses$$restProps)}` +
        exportedNames.createExportsStr() +
        `, slots: ${slotsAsDef}` +
        `, events: ${events.toDefString()} }}`;
    str.append('};');
    str.append(returnString);
}
function slotAttributesToString(attrs) {
    return Array.from(attrs.entries())
        .map(([exportName, expr]) => exportName.startsWith('__spread__') ? `...${expr}` : `${exportName}:${expr}`)
        .join(', ');
}
function preprendStr(str, index, toAppend, removeExisting) {
    const prepends = updatePrepends(str, index, toAppend, removeExisting);
    toAppend = prepends.join('');
    str.overwrite(index, index + 1, toAppend + str.original.charAt(index), { contentOnly: true });
    return str;
}
function overwriteStr(str, start, end, toOverwrite, removeExisting) {
    const prepends = updatePrepends(str, start, toOverwrite, removeExisting);
    toOverwrite = prepends.join('');
    str.overwrite(start, end, toOverwrite, { contentOnly: true });
    return str;
}
function updatePrepends(str, index, toAppend, removeExisting) {
    str.__prepends__ = str.__prepends__ || new Map();
    const prepends = removeExisting ? [] : str.__prepends__.get(index) || [];
    prepends.push(toAppend);
    str.__prepends__.set(index, prepends);
    return prepends;
}
function getCurrentPrepends(str, index) {
    var _a;
    return ((_a = str.__prepends__) === null || _a === void 0 ? void 0 : _a.get(index)) || [];
}
class HoistableInterfaces {
    constructor() {
        this.module_types = new Set();
        this.disallowed_types = new Set();
        this.disallowed_values = new Set();
        this.interface_map = new Map();
        this.props_interface = {
            name: '',
            node: null,
            type_deps: new Set(),
            value_deps: new Set()
        };
    }
    analyzeSnippets(rootSnippets) {
        let prev_disallowed_values_size;
        while (prev_disallowed_values_size == null ||
            this.disallowed_values.size !== prev_disallowed_values_size) {
            prev_disallowed_values_size = this.disallowed_values.size;
            for (const [, , globals, name] of rootSnippets) {
                const hoist_to_module = globals.size === 0 ||
                    [...globals.keys()].every((id) => this.isAllowedReference(id));
                if (!hoist_to_module) {
                    this.disallowed_values.add(name);
                }
            }
        }
    }
    analyzeModuleScriptNode(node) {
        if (ts.isImportDeclaration(node) && node.importClause) {
            const is_type_only = node.importClause.isTypeOnly;
            if (node.importClause.namedBindings &&
                ts.isNamedImports(node.importClause.namedBindings)) {
                node.importClause.namedBindings.elements.forEach((element) => {
                    const import_name = element.name.text;
                    if (is_type_only || element.isTypeOnly) {
                        this.module_types.add(import_name);
                    }
                });
            }
            if (node.importClause.name) {
                const default_import = node.importClause.name.text;
                if (is_type_only) {
                    this.module_types.add(default_import);
                }
            }
            if (node.importClause.namedBindings &&
                ts.isNamespaceImport(node.importClause.namedBindings)) {
                const namespace_import = node.importClause.namedBindings.name.text;
                if (is_type_only) {
                    this.module_types.add(namespace_import);
                }
            }
        }
        if (ts.isTypeAliasDeclaration(node)) {
            this.module_types.add(node.name.text);
        }
        if (ts.isInterfaceDeclaration(node)) {
            this.module_types.add(node.name.text);
        }
        if (ts.isEnumDeclaration(node)) {
            this.module_types.add(node.name.text);
        }
        if (ts.isModuleDeclaration(node) && ts.isIdentifier(node.name)) {
            this.module_types.add(node.name.text);
        }
    }
    analyzeInstanceScriptNode(node) {
        var _a, _b, _c, _d, _e;
        if (ts.isImportDeclaration(node) && node.importClause) {
            const is_type_only = node.importClause.isTypeOnly;
            if (node.importClause.namedBindings &&
                ts.isNamedImports(node.importClause.namedBindings)) {
                node.importClause.namedBindings.elements.forEach((element) => {
                    const import_name = element.name.text;
                    if (is_type_only) {
                        this.module_types.add(import_name);
                    }
                });
            }
            if (node.importClause.name) {
                const default_import = node.importClause.name.text;
                if (is_type_only) {
                    this.module_types.add(default_import);
                }
            }
            if (node.importClause.namedBindings &&
                ts.isNamespaceImport(node.importClause.namedBindings)) {
                const namespace_import = node.importClause.namedBindings.name.text;
                if (is_type_only) {
                    this.module_types.add(namespace_import);
                }
            }
        }
        if (ts.isInterfaceDeclaration(node)) {
            const interface_name = node.name.text;
            const type_dependencies = new Set();
            const value_dependencies = new Set();
            const generics = (_b = (_a = node.typeParameters) === null || _a === void 0 ? void 0 : _a.map((param) => param.name.text)) !== null && _b !== void 0 ? _b : [];
            node.members.forEach((member) => {
                if (ts.isPropertySignature(member) && member.type) {
                    this.collectTypeDependencies(member.type, type_dependencies, value_dependencies, generics, interface_name);
                }
                else if (ts.isIndexSignatureDeclaration(member)) {
                    this.collectTypeDependencies(member.type, type_dependencies, value_dependencies, generics, interface_name);
                    member.parameters.forEach((param) => {
                        this.collectTypeDependencies(param.type, type_dependencies, value_dependencies, generics, interface_name);
                    });
                }
            });
            (_c = node.heritageClauses) === null || _c === void 0 ? void 0 : _c.forEach((clause) => {
                clause.types.forEach((type) => {
                    if (ts.isIdentifier(type.expression)) {
                        const type_name = type.expression.text;
                        if (!generics.includes(type_name)) {
                            type_dependencies.add(type_name);
                        }
                    }
                    this.collectTypeDependencies(type, type_dependencies, value_dependencies, generics, interface_name);
                });
            });
            if (this.module_types.has(interface_name)) {
                this.disallowed_types.add(interface_name);
            }
            else {
                this.interface_map.set(interface_name, {
                    type_deps: type_dependencies,
                    value_deps: value_dependencies,
                    node
                });
            }
        }
        if (ts.isTypeAliasDeclaration(node)) {
            const alias_name = node.name.text;
            const type_dependencies = new Set();
            const value_dependencies = new Set();
            const generics = (_e = (_d = node.typeParameters) === null || _d === void 0 ? void 0 : _d.map((param) => param.name.text)) !== null && _e !== void 0 ? _e : [];
            this.collectTypeDependencies(node.type, type_dependencies, value_dependencies, generics, alias_name);
            if (this.module_types.has(alias_name)) {
                this.disallowed_types.add(alias_name);
            }
            else {
                this.interface_map.set(alias_name, {
                    type_deps: type_dependencies,
                    value_deps: value_dependencies,
                    node
                });
            }
        }
        if (ts.isVariableStatement(node)) {
            node.declarationList.declarations.forEach((declaration) => {
                if (ts.isIdentifier(declaration.name)) {
                    this.disallowed_values.add(declaration.name.text);
                }
                else {
                    const walk = (node) => {
                        if (ts.isIdentifier(node) &&
                            ts.isBindingElement(node.parent) &&
                            node.parent.name === node) {
                            this.disallowed_values.add(node.text);
                        }
                        ts.forEachChild(node, walk);
                    };
                    walk(declaration.name);
                }
            });
        }
        if (ts.isFunctionDeclaration(node) && node.name) {
            this.disallowed_values.add(node.name.text);
        }
        if (ts.isClassDeclaration(node) && node.name) {
            this.disallowed_values.add(node.name.text);
        }
        if (ts.isEnumDeclaration(node)) {
            this.disallowed_values.add(node.name.text);
        }
        if (ts.isModuleDeclaration(node) && ts.isIdentifier(node.name)) {
            this.disallowed_types.add(node.name.text);
            this.disallowed_values.add(node.name.text);
        }
    }
    analyze$propsRune(node) {
        var _a, _b;
        if (((_a = node.initializer.typeArguments) === null || _a === void 0 ? void 0 : _a.length) > 0 || node.type) {
            const generic_arg = ((_b = node.initializer.typeArguments) === null || _b === void 0 ? void 0 : _b[0]) || node.type;
            if (ts.isTypeReferenceNode(generic_arg)) {
                const name = this.getEntityNameRoot(generic_arg.typeName);
                const interface_node = this.interface_map.get(name);
                if (interface_node) {
                    this.props_interface.name = name;
                    this.props_interface.type_deps = interface_node.type_deps;
                    this.props_interface.value_deps = interface_node.value_deps;
                }
            }
            else {
                this.props_interface.name = '$$ComponentProps';
                this.props_interface.node = generic_arg;
                this.collectTypeDependencies(generic_arg, this.props_interface.type_deps, this.props_interface.value_deps, [], undefined);
            }
        }
    }
    addDisallowed(names) {
        for (const name of names) {
            this.disallowed_values.add(name);
        }
    }
    determineHoistableInterfaces() {
        const hoistable_interfaces = new Map();
        let progress = true;
        while (progress) {
            progress = false;
            for (const [interface_name, deps] of this.interface_map.entries()) {
                if (hoistable_interfaces.has(interface_name)) {
                    continue;
                }
                let can_hoist = true;
                for (const dep of deps.type_deps) {
                    if (this.disallowed_types.has(dep)) {
                        this.disallowed_types.add(interface_name);
                        can_hoist = false;
                        break;
                    }
                    if (this.interface_map.has(dep) && !hoistable_interfaces.has(dep)) {
                        can_hoist = false;
                    }
                }
                for (const dep of deps.value_deps) {
                    if (!this.isAllowedReference(dep)) {
                        this.disallowed_types.add(interface_name);
                        can_hoist = false;
                        break;
                    }
                }
                if (can_hoist) {
                    hoistable_interfaces.set(interface_name, deps.node);
                    progress = true;
                }
            }
        }
        if (this.props_interface.name === '$$ComponentProps') {
            const can_hoist = [
                ...this.props_interface.type_deps,
                ...this.props_interface.value_deps
            ].every((dep) => {
                return !this.disallowed_types.has(dep) && this.isAllowedReference(dep);
            });
            if (can_hoist) {
                hoistable_interfaces.set(this.props_interface.name, this.props_interface.node);
            }
        }
        return hoistable_interfaces;
    }
    moveHoistableInterfaces(str, astOffset, scriptStart, generics) {
        if (!this.props_interface.name)
            return;
        for (const generic of generics) {
            this.disallowed_types.add(generic);
        }
        const hoistable = this.determineHoistableInterfaces();
        if (hoistable.has(this.props_interface.name)) {
            for (const [name, node] of hoistable) {
                let pos = node.pos + astOffset;
                if (name === '$$ComponentProps') {
                    str.prependRight(pos, '\n');
                }
                else {
                    if (str.original[pos] === '\r') {
                        pos++;
                    }
                    if (/\s/.test(str.original[pos])) {
                        pos++;
                    }
                    str.prependRight(pos, ';\n');
                    str.appendLeft(node.end + astOffset, ';');
                }
                str.move(pos, node.end + astOffset, scriptStart);
            }
            return hoistable;
        }
    }
    isAllowedReference(reference) {
        return !(this.disallowed_values.has(reference) ||
            reference === '$$props' ||
            reference === '$$restProps' ||
            reference === '$$slots' ||
            (reference[0] === '$' &&
                reference[1] !== '$' &&
                this.disallowed_values.has(reference.slice(1))));
    }
    collectTypeDependencies(type_node, type_dependencies, value_dependencies, generics, root_type_name) {
        const walk = (node) => {
            if (ts.isTypeReferenceNode(node)) {
                const type_name = this.getEntityNameRoot(node.typeName);
                const self_reference = type_name === root_type_name;
                if (!self_reference && !generics.includes(type_name)) {
                    type_dependencies.add(type_name);
                }
            }
            else if (ts.isTypeQueryNode(node)) {
                value_dependencies.add(this.getEntityNameRoot(node.exprName));
            }
            ts.forEachChild(node, walk);
        };
        walk(type_node);
    }
    getEntityNameRoot(entity_name) {
        if (ts.isIdentifier(entity_name)) {
            return entity_name.text;
        }
        else {
            return this.getEntityNameRoot(entity_name.left);
        }
    }
}
function is$$PropsDeclaration(node) {
    return isInterfaceOrTypeDeclaration(node) && node.name.text === '$$Props';
}
class ExportedNames {
    constructor(str, astOffset, basename, isTsFile, isSvelte5Plus, isRunes, emitJsDoc) {
        this.str = str;
        this.astOffset = astOffset;
        this.basename = basename;
        this.isTsFile = isTsFile;
        this.isSvelte5Plus = isSvelte5Plus;
        this.isRunes = isRunes;
        this.emitJsDoc = emitJsDoc;
        this.hoistableInterfaces = new HoistableInterfaces();
        this.usesAccessors = false;
        this.uses$$Props = false;
        this.hasRunesGlobals = false;
        this.$props = {
            comment: '',
            type: '',
            bindings: []
        };
        this.exports = new Map();
        this.possibleExports = new Map();
        this.doneDeclarationTransformation = new Set();
        this.getters = new Set();
    }
    emitKitType(kitType, nameStart, nameEnd) {
        if (!kitType)
            return;
        if (this.emitJsDoc && !this.isTsFile) {
            const kitTypeRef = kitType.slice(2);
            preprendStr(this.str, nameStart, `/** @type {${kitTypeRef}} */ `);
        }
        else {
            preprendStr(this.str, nameEnd, surroundWithIgnoreComments(kitType));
        }
    }
    handleVariableStatement(node, parent) {
        const exportModifier = findExportKeyword(node);
        if (exportModifier) {
            const isLet = node.declarationList.flags === ts.NodeFlags.Let;
            const isConst = node.declarationList.flags === ts.NodeFlags.Const;
            this.handleExportedVariableDeclarationList(node.declarationList, (_, ...args) => this.addExportForBindingPattern(...args));
            if (isLet) {
                this.propTypeAssertToUserDefined(node.declarationList);
            }
            else if (isConst) {
                node.declarationList.forEachChild((n) => {
                    if (ts.isVariableDeclaration(n) && ts.isIdentifier(n.name)) {
                        this.addGetter(n.name);
                        const type = n.type || ts.getJSDocType(n);
                        const isKitExport = internalHelpers.isKitRouteFile(this.basename) &&
                            n.name.getText() === 'snapshot';
                        const kitType = isKitExport && !type ? `: import('./$types.js').Snapshot` : '';
                        this.emitKitType(kitType, n.name.getStart() + this.astOffset, n.name.end + this.astOffset);
                    }
                });
            }
            this.removeExport(exportModifier.getStart(), exportModifier.end);
        }
        else if (ts.isSourceFile(parent)) {
            this.handleExportedVariableDeclarationList(node.declarationList, this.addPossibleExport.bind(this));
            for (const declaration of node.declarationList.declarations) {
                if (declaration.initializer !== undefined &&
                    ts.isCallExpression(declaration.initializer) &&
                    declaration.initializer.expression.getText() === '$props') {
                    this.handle$propsRune(declaration);
                    break;
                }
            }
        }
    }
    handleExportFunctionOrClass(node) {
        const exportModifier = findExportKeyword(node);
        if (!exportModifier) {
            return;
        }
        this.removeExport(exportModifier.getStart(), exportModifier.end);
        this.addGetter(node.name);
        if (node.name) {
            this.addExport(node.name, false);
        }
    }
    handleExportDeclaration(node) {
        const { exportClause } = node;
        if (ts.isNamedExports(exportClause)) {
            for (const ne of exportClause.elements) {
                if (ne.propertyName) {
                    this.addExport(ne.propertyName, false, ne.name, undefined, undefined, true);
                }
                else {
                    this.addExport(ne.name, false, undefined, undefined, undefined, true);
                }
            }
            this.removeExport(node.getStart(), node.end);
        }
    }
    handle$propsRune(node) {
        var _a, _b;
        if (ts.isObjectBindingPattern(node.name)) {
            for (const element of node.name.elements) {
                if (ts.isIdentifier(element.name) &&
                    (!element.propertyName || ts.isIdentifier(element.propertyName)) &&
                    !element.dotDotDotToken) {
                    const name = element.propertyName
                        ? element.propertyName.text
                        : element.name.text;
                    if (element.initializer) {
                        let call = element.initializer;
                        if (ts.isAsExpression(call)) {
                            call = call.expression;
                        }
                        if (ts.isCallExpression(call) && ts.isIdentifier(call.expression)) {
                            if (call.expression.text === '$bindable') {
                                this.$props.bindings.push(name);
                            }
                        }
                    }
                }
            }
        }
        if (this.$props.bindings.length > 0) {
            this.str.appendLeft(node.end + this.astOffset, surroundWithIgnoreComments(';' + this.$props.bindings.map((prop) => prop + ';').join('')));
        }
        if (((_a = node.initializer.typeArguments) === null || _a === void 0 ? void 0 : _a.length) > 0 || node.type) {
            this.hoistableInterfaces.analyze$propsRune(node);
            const generic_arg = ((_b = node.initializer.typeArguments) === null || _b === void 0 ? void 0 : _b[0]) || node.type;
            const generic = generic_arg.getText();
            if (ts.isTypeReferenceNode(generic_arg)) {
                this.$props.type = generic;
            }
            else {
                this.$props.type = '$$ComponentProps';
                preprendStr(this.str, generic_arg.pos + this.astOffset, `;type ${this.$props.type} = `);
                this.str.appendLeft(generic_arg.end + this.astOffset, ';');
                this.str.move(generic_arg.pos + this.astOffset, generic_arg.end + this.astOffset, node.parent.pos + this.astOffset);
                this.str.appendRight(generic_arg.end + this.astOffset,
                surroundWithIgnoreComments(this.$props.type));
            }
            return;
        }
        if (!this.isTsFile) {
            const text = node.getSourceFile().getFullText();
            let start = -1;
            let comment;
            for (const c of [...(ts.getLeadingCommentRanges(text, node.pos) || [])].reverse()) {
                const potential_match = text.substring(c.pos, c.end);
                if (/@type\b/.test(potential_match)) {
                    comment = potential_match;
                    start = c.pos + this.astOffset;
                    break;
                }
            }
            if (!comment) {
                for (const c of [
                    ...(ts.getLeadingCommentRanges(text, node.parent.pos) || []).reverse()
                ]) {
                    const potential_match = text.substring(c.pos, c.end);
                    if (/@type\b/.test(potential_match)) {
                        comment = potential_match;
                        start = c.pos + this.astOffset;
                        break;
                    }
                }
            }
            if (comment && /\/\*\*[^@]*?@type\s*{\s*{.*}\s*}\s*\*\//.test(comment)) {
                this.$props.comment = '/** @type {$$ComponentProps} */';
                const type_start = this.str.original.indexOf('@type', start);
                this.str.overwrite(type_start, type_start + 5, '@typedef');
                const end = this.str.original.indexOf('*/', start);
                this.str.overwrite(end, end + 2, ' $$ComponentProps */' + this.$props.comment);
            }
            else {
                this.$props.comment = comment || '';
            }
        }
        if (this.$props.comment) {
            return;
        }
        let propsStr = '';
        let withUnknown = false;
        let props = [];
        const isKitRouteFile = internalHelpers.isKitRouteFile(this.basename);
        const isKitLayoutFile = isKitRouteFile && this.basename.includes('layout');
        if (ts.isObjectBindingPattern(node.name)) {
            for (const element of node.name.elements) {
                if (!ts.isIdentifier(element.name) ||
                    (element.propertyName && !ts.isIdentifier(element.propertyName)) ||
                    !!element.dotDotDotToken) {
                    withUnknown = true;
                }
                else {
                    const name = element.propertyName
                        ? element.propertyName.text
                        : element.name.text;
                    if (isKitRouteFile) {
                        if (name === 'data') {
                            props.push(`data: import('./$types.js').${isKitLayoutFile ? 'LayoutData' : 'PageData'}`);
                        }
                        if (name === 'form' && !isKitLayoutFile) {
                            props.push(`form: import('./$types.js').ActionData`);
                        }
                        if (name === 'params') {
                            props.push(`params: import('./$types.js').${isKitLayoutFile ? 'LayoutProps' : 'PageProps'}['params']`);
                        }
                    }
                    else if (element.initializer) {
                        const initializer = ts.isCallExpression(element.initializer) &&
                            ts.isIdentifier(element.initializer.expression) &&
                            element.initializer.expression.text === '$bindable'
                            ? element.initializer.arguments[0]
                            : element.initializer;
                        const type = !initializer
                            ? 'any'
                            : ts.isAsExpression(initializer)
                                ? initializer.type.getText()
                                : ts.isStringLiteral(initializer)
                                    ? 'string'
                                    : ts.isNumericLiteral(initializer)
                                        ? 'number'
                                        : initializer.kind === ts.SyntaxKind.TrueKeyword ||
                                            initializer.kind === ts.SyntaxKind.FalseKeyword
                                            ? 'boolean'
                                            : ts.isIdentifier(initializer) &&
                                                initializer.text !== 'undefined'
                                                ? `typeof ${initializer.text}`
                                                : ts.isArrowFunction(initializer)
                                                    ? 'Function'
                                                    : ts.isObjectLiteralExpression(initializer)
                                                        ? 'Record<string, any>'
                                                        : ts.isArrayLiteralExpression(initializer)
                                                            ? 'any[]'
                                                            : 'any';
                        props.push(`${name}?: ${type}`);
                    }
                    else {
                        props.push(`${name}: any`);
                    }
                }
            }
            if (isKitLayoutFile) {
                props.push(`children: import('svelte').Snippet`);
            }
            if (props.length > 0) {
                propsStr =
                    `{ ${props.join(', ')} }` + (withUnknown ? ' & Record<string, any>' : '');
            }
            else if (withUnknown) {
                propsStr = 'Record<string, any>';
            }
            else {
                propsStr = 'Record<string, never>';
            }
        }
        else {
            propsStr = 'Record<string, any>';
        }
        if (this.isTsFile) {
            this.$props.type = '$$ComponentProps';
            if (props.length > 0 || withUnknown) {
                preprendStr(this.str, node.parent.pos + this.astOffset, surroundWithIgnoreComments(`;type $$ComponentProps = ${propsStr};`));
                preprendStr(this.str, node.name.end + this.astOffset, `: ${this.$props.type}`);
            }
        }
        else {
            this.$props.comment = '/** @type {$$ComponentProps} */';
            if (props.length > 0 || withUnknown) {
                preprendStr(this.str, node.pos + this.astOffset, `/** @typedef {${propsStr}} $$ComponentProps */${this.$props.comment}`);
            }
        }
    }
    removeExport(start, end) {
        const exportStart = this.str.original.indexOf('export', start + this.astOffset);
        const exportEnd = exportStart + (end - start);
        this.str.remove(exportStart, exportEnd);
    }
    propTypeAssertToUserDefined(node) {
        if (this.doneDeclarationTransformation.has(node)) {
            return;
        }
        const handleTypeAssertion = (declaration) => {
            const identifier = declaration.name;
            const tsType = declaration.type;
            const jsDocType = ts.getJSDocType(declaration);
            const type = tsType || jsDocType;
            const name = identifier.getText();
            const isKitExport = internalHelpers.isKitRouteFile(this.basename) &&
                (name === 'data' || name === 'form' || name === 'snapshot');
            const kitType = isKitExport && !type
                ? `: import('./$types.js').${name === 'data'
                    ? this.basename.includes('layout')
                        ? 'LayoutData'
                        : 'PageData'
                    : name === 'form'
                        ? 'ActionData'
                        : 'Snapshot'}`
                : '';
            const nameEnd = identifier.end + this.astOffset;
            const end = declaration.end + this.astOffset;
            if (ts.isIdentifier(identifier) &&
                (!declaration.initializer ||
                    type ||
                    (!type &&
                        [ts.SyntaxKind.FalseKeyword, ts.SyntaxKind.TrueKeyword].includes(declaration.initializer.kind)))) {
                const name = identifier.getText();
                if (nameEnd === end) {
                    if (kitType && this.emitJsDoc && !this.isTsFile) {
                        const kitTypeRef = kitType.slice(2);
                        const nameStart = identifier.getStart() + this.astOffset;
                        preprendStr(this.str, nameStart, `/** @type {${kitTypeRef}} */ `);
                    }
                    preprendStr(this.str, end, surroundWithIgnoreComments(`${(this.isTsFile || !this.emitJsDoc) && kitType ? kitType : ''};${name} = __sveltets_2_any(${name});`));
                }
                else {
                    this.emitKitType(kitType, identifier.getStart() + this.astOffset, nameEnd);
                    preprendStr(this.str, end, surroundWithIgnoreComments(`;${name} = __sveltets_2_any(${name});`));
                }
            }
            else {
                this.emitKitType(kitType, identifier.getStart() + this.astOffset, nameEnd);
            }
        };
        const findComma = (target) => target.getChildren().filter((child) => child.kind === ts.SyntaxKind.CommaToken);
        const splitDeclaration = () => {
            const commas = node
                .getChildren()
                .filter((child) => child.kind === ts.SyntaxKind.SyntaxList)
                .map(findComma)
                .reduce((current, previous) => [...current, ...previous], []);
            commas.forEach((comma) => {
                const start = comma.getStart() + this.astOffset;
                const end = comma.getEnd() + this.astOffset;
                overwriteStr(this.str, start, end, ';let ');
            });
        };
        for (const declaration of node.declarations) {
            handleTypeAssertion(declaration);
        }
        splitDeclaration();
        this.doneDeclarationTransformation.add(node);
    }
    handleExportedVariableDeclarationList(list, add) {
        const isLet = list.flags === ts.NodeFlags.Let;
        ts.forEachChild(list, (node) => {
            if (ts.isVariableDeclaration(node)) {
                if (ts.isIdentifier(node.name)) {
                    add(list, node.name, isLet, node.name, node.type, !node.initializer);
                }
                else if (ts.isObjectBindingPattern(node.name) ||
                    ts.isArrayBindingPattern(node.name)) {
                    ts.forEachChild(node.name, (element) => {
                        if (ts.isBindingElement(element)) {
                            add(list, element.name, isLet);
                        }
                    });
                }
            }
        });
    }
    addGetter(node) {
        if (!node) {
            return;
        }
        this.getters.add(node.text);
    }
    createClassGetters(generics = '') {
        if (this.isRunesMode()) {
            return Array.from(this.getters)
                .map((name) => `\n    get ${name}() { return ${internalHelpers.renderName}${generics}().exports.${name} }`)
                .join('');
        }
        else {
            return Array.from(this.getters)
                .map((name) =>
            `\n    get ${name}() { return __sveltets_2_nonNullable(this.$$prop_def.${name}) }`)
                .join('');
        }
    }
    createClassAccessors() {
        const accessors = [];
        for (const value of this.exports.values()) {
            if (this.getters.has(value.identifierText)) {
                continue;
            }
            accessors.push(value.identifierText);
        }
        return accessors
            .map((name) => `\n    get ${name}() { return this.$$prop_def.${name} }` +
            `\n    /**accessor*/\n    set ${name}(_) {}`)
            .join('');
    }
    addPossibleExport(declaration, name, isLet, target = null, type = null, required = false) {
        if (!ts.isIdentifier(name)) {
            return;
        }
        if (target && ts.isIdentifier(target)) {
            this.possibleExports.set(name.text, {
                declaration,
                isLet,
                type: type === null || type === void 0 ? void 0 : type.getText(),
                identifierText: target.text,
                required,
                doc: this.getDoc(target)
            });
        }
        else {
            this.possibleExports.set(name.text, {
                declaration,
                isLet
            });
        }
    }
    addExport(name, isLet, target = null, type = null, required = false, isNamedExport = false) {
        const existingDeclaration = this.possibleExports.get(name.text);
        if (target) {
            this.exports.set(name.text, {
                isLet: isLet || (existingDeclaration === null || existingDeclaration === void 0 ? void 0 : existingDeclaration.isLet),
                type: (type === null || type === void 0 ? void 0 : type.getText()) || (existingDeclaration === null || existingDeclaration === void 0 ? void 0 : existingDeclaration.type),
                identifierText: target.text,
                required: required || (existingDeclaration === null || existingDeclaration === void 0 ? void 0 : existingDeclaration.required),
                doc: this.getDoc(target) || (existingDeclaration === null || existingDeclaration === void 0 ? void 0 : existingDeclaration.doc),
                isNamedExport
            });
        }
        else {
            this.exports.set(name.text, {
                isLet: isLet || (existingDeclaration === null || existingDeclaration === void 0 ? void 0 : existingDeclaration.isLet),
                type: existingDeclaration === null || existingDeclaration === void 0 ? void 0 : existingDeclaration.type,
                required: existingDeclaration === null || existingDeclaration === void 0 ? void 0 : existingDeclaration.required,
                doc: existingDeclaration === null || existingDeclaration === void 0 ? void 0 : existingDeclaration.doc,
                isNamedExport
            });
        }
        if (existingDeclaration === null || existingDeclaration === void 0 ? void 0 : existingDeclaration.isLet) {
            this.propTypeAssertToUserDefined(existingDeclaration.declaration);
        }
    }
    addExportForBindingPattern(name, isLet, target = null, type = null, required = false) {
        if (ts.isIdentifier(name)) {
            if (!target || ts.isIdentifier(target)) {
                this.addExport(name, isLet, target, type, required);
            }
            return;
        }
        name.elements.forEach((child) => {
            this.addExportForBindingPattern(child.name, isLet, undefined, type, required);
        });
    }
    getDoc(target) {
        var _a, _b;
        let doc = undefined;
        const variableDeclaration = target === null || target === void 0 ? void 0 : target.parent;
        const exportExpr = (_b = (_a = target === null || target === void 0 ? void 0 : target.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent;
        if (variableDeclaration) {
            doc = getLastLeadingDoc(variableDeclaration);
        }
        if (exportExpr && !doc) {
            doc = getLastLeadingDoc(exportExpr);
        }
        return doc;
    }
    createPropsStr(uses$$propsOr$$restProps) {
        const names = Array.from(this.exports.entries());
        if (this.isRunesMode()) {
            if (this.$props.type) {
                return '{} as any as ' + this.$props.type;
            }
            if (this.$props.comment) {
                return this.$props.comment + '({})';
            }
            return this.isTsFile
                ? '{} as Record<string, never>'
                : '/** @type {Record<string, never>} */ ({})';
        }
        if (this.uses$$Props) {
            const lets = names.filter(([, { isLet }]) => isLet);
            const others = names.filter(([, { isLet }]) => !isLet);
            return ('{ ...__sveltets_2_ensureRightProps<{' +
                this.createReturnElementsType(lets).join(',') +
                '}>(__sveltets_2_any("") as $$Props)} as ' +
                (others.length
                    ? '{' + this.createReturnElementsType(others).join(',') + '} & '
                    : '') +
                '$$Props');
        }
        if (names.length === 0 && !uses$$propsOr$$restProps) {
            return this.isTsFile
                ? '{} as Record<string, never>'
                : '/** @type {Record<string, never>} */ ({})';
        }
        const dontAddTypeDef = !this.isTsFile || names.every(([_, value]) => !value.type && value.required);
        const returnElements = this.createReturnElements(names, dontAddTypeDef);
        if (dontAddTypeDef) {
            return `{${returnElements.join(' , ')}}`;
        }
        const returnElementsType = this.createReturnElementsType(names);
        return `{${returnElements.join(' , ')}} as {${returnElementsType.join(', ')}}`;
    }
    hasNoProps() {
        if (this.isRunesMode()) {
            return !this.$props.type && !this.$props.comment;
        }
        const names = Array.from(this.exports.entries());
        return names.length === 0;
    }
    createBindingsStr() {
        if (this.isRunesMode()) {
            return `__sveltets_$$bindings('${this.$props.bindings.join("', '")}')`;
        }
        else {
            return '""';
        }
    }
    createExportsStr() {
        const names = Array.from(this.exports.entries());
        const others = names.filter(([, { isLet, isNamedExport }]) => !isLet || (this.isRunesMode() && isNamedExport));
        const needsAccessors = this.usesAccessors && names.length > 0 && !this.isRunesMode();
        if (this.isSvelte5Plus) {
            let str = '';
            if (others.length > 0 || this.isRunesMode() || needsAccessors) {
                const exports = needsAccessors ? names : others;
                if (others.length > 0 || needsAccessors) {
                    if (this.isTsFile) {
                        str +=
                            `, exports: {${this.createReturnElements(this.isRunesMode() ? others : [], false, true)}} as any as { ` +
                                this.createReturnElementsType(exports, undefined, true).join(',') +
                                ' }';
                    }
                    else {
                        str += `, exports: /** @type {{${this.createReturnElementsType(exports, false, true)}}} */ ({})`;
                    }
                }
                else {
                    str += ', exports: {}';
                }
                str += `, bindings: ${this.createBindingsStr()}`;
            }
            else {
                str += `, exports: {}, bindings: ${this.createBindingsStr()}`;
            }
            return str;
        }
        return '';
    }
    createReturnElements(names, dontAddTypeDef, onlyTyped = false) {
        return names
            .map(([key, value]) => {
            if (onlyTyped && !value.type)
                return;
            return `${dontAddTypeDef && value.doc ? `\n${value.doc}` : ''}${value.identifierText || key}: ${key}`;
        })
            .filter(Boolean);
    }
    createReturnElementsType(names, addDoc = true, forceRequired = false) {
        return names.map(([key, value]) => {
            const identifier = `${value.doc && addDoc ? `\n${value.doc}` : ''}${value.identifierText || key}${value.required || forceRequired ? '' : '?'}`;
            if (!value.type) {
                return `${identifier}: typeof ${key}`;
            }
            return `${identifier}: ${value.type}`;
        });
    }
    createOptionalPropsArray() {
        if (this.isRunesMode()) {
            return [];
        }
        else {
            return Array.from(this.exports.entries())
                .filter(([_, entry]) => !entry.required)
                .map(([name, entry]) => `'${entry.identifierText || name}'`);
        }
    }
    getExportsMap() {
        return this.exports;
    }
    hasExports() {
        const names = Array.from(this.exports.entries());
        return this.usesAccessors ? names.length > 0 : names.some(([, { isLet }]) => !isLet);
    }
    hasPropsRune() {
        return this.isSvelte5Plus && !!(this.$props.type || this.$props.comment);
    }
    checkGlobalsForRunes(globals) {
        const runes = ['$state', '$derived', '$effect'];
        this.hasRunesGlobals =
            this.isSvelte5Plus && globals.some((global) => runes.includes(global));
    }
    enterRunesMode() {
        this.isRunes = true;
    }
    isRunesMode() {
        return this.hasRunesGlobals || this.hasPropsRune() || this.isRunes;
    }
}
function throwError$2(start, end, message, code) {
    const error = new Error(message);
    error.start = positionAt(start, code);
    error.end = positionAt(end, code);
    throw error;
}
function positionAt(offset, text) {
    offset = clamp(offset, 0, text.length);
    const lineOffsets = getLineOffsets(text);
    let low = 0;
    let high = lineOffsets.length;
    if (high === 0) {
        return { line: 1, column: offset };
    }
    while (low < high) {
        const mid = Math.floor((low + high) / 2);
        if (lineOffsets[mid] > offset) {
            high = mid;
        }
        else {
            low = mid + 1;
        }
    }
    return { line: low, column: offset - lineOffsets[low - 1] };
}
function clamp(num, min, max) {
    return Math.max(min, Math.min(max, num));
}
function getLineOffsets(text) {
    const lineOffsets = [];
    let isLineStart = true;
    for (let i = 0; i < text.length; i++) {
        if (isLineStart) {
            lineOffsets.push(i);
            isLineStart = false;
        }
        const ch = text.charAt(i);
        isLineStart = ch === '\r' || ch === '\n';
        if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
            i++;
        }
    }
    if (isLineStart && text.length > 0) {
        lineOffsets.push(text.length);
    }
    return lineOffsets;
}
class Generics {
    constructor(str, astOffset, script) {
        var _a, _b, _c, _d;
        this.str = str;
        this.astOffset = astOffset;
        this.definitions = [];
        this.typeReferences = [];
        this.references = [];
        this.genericsAttr = script.attributes.find((attr) => attr.name === 'generics');
        const generics = (_b = (_a = this.genericsAttr) === null || _a === void 0 ? void 0 : _a.value[0]) === null || _b === void 0 ? void 0 : _b.raw;
        if (generics) {
            const typeParameters = this.getGenericTypeParameters(generics);
            this.definitions = (_c = typeParameters === null || typeParameters === void 0 ? void 0 : typeParameters.map((param) => param.getText())) !== null && _c !== void 0 ? _c : [];
            this.references = (_d = typeParameters === null || typeParameters === void 0 ? void 0 : typeParameters.map((param) => param.name.getText())) !== null && _d !== void 0 ? _d : [];
        }
        else {
            this.genericsAttr = undefined;
        }
    }
    getGenericTypeParameters(rawGenericsAttr) {
        const sourceFile = ts.createSourceFile('index.ts', `<${rawGenericsAttr}>() => {}`, ts.ScriptTarget.Latest, true);
        const firstStatement = sourceFile.statements[0];
        if (!firstStatement || !ts.isExpressionStatement(firstStatement)) {
            return;
        }
        const arrowFunction = firstStatement.expression;
        if (!ts.isArrowFunction(arrowFunction)) {
            return;
        }
        return arrowFunction.typeParameters;
    }
    addIfIsGeneric(node) {
        var _a, _b;
        if (ts.isTypeAliasDeclaration(node) && this.is$$GenericType(node.type)) {
            if (this.genericsAttr) {
                throw new Error('Invalid $$Generic declaration: $$Generic definitions are not allowed when the generics attribute is present on the script tag');
            }
            if (((_a = node.type.typeArguments) === null || _a === void 0 ? void 0 : _a.length) > 1) {
                throw new Error('Invalid $$Generic declaration: Only one type argument allowed');
            }
            if (((_b = node.type.typeArguments) === null || _b === void 0 ? void 0 : _b.length) === 1) {
                const typeReference = node.type.typeArguments[0].getText();
                this.typeReferences.push(typeReference);
                this.definitions.push(`${node.name.text} extends ${typeReference}`);
            }
            else {
                this.definitions.push(node.name.text);
            }
            this.references.push(node.name.text);
            this.str.remove(this.astOffset + node.getStart(), this.astOffset + node.getEnd());
        }
    }
    throwIfIsGeneric(node) {
        if (ts.isTypeAliasDeclaration(node) && this.is$$GenericType(node.type)) {
            throwError$2(this.astOffset + node.getStart(), this.astOffset + node.getEnd(), '$$Generic declarations are only allowed in the instance script', this.str.original);
        }
    }
    is$$GenericType(node) {
        return (ts.isTypeReferenceNode(node) &&
            ts.isIdentifier(node.typeName) &&
            node.typeName.text === '$$Generic');
    }
    getTypeReferences() {
        return this.typeReferences;
    }
    getReferences() {
        return this.references;
    }
    toDefinitionString(addIgnore = false) {
        const surround = addIgnore ? surroundWithIgnoreComments : (str) => str;
        return this.definitions.length ? surround(`<${this.definitions.join(',')}>`) : '';
    }
    toReferencesString() {
        return this.references.length ? `<${this.references.join(',')}>` : '';
    }
    toReferencesAnyString() {
        return this.references.length ? `<${this.references.map(() => 'any').join(',')}>` : '';
    }
    has() {
        return this.definitions.length > 0;
    }
}
class ImplicitStoreValues {
    constructor(storesResolvedInTemplate = [], renderFunctionStart, isSvelte5Plus, storeFromImportsWrapper = (input) => input) {
        this.renderFunctionStart = renderFunctionStart;
        this.isSvelte5Plus = isSvelte5Plus;
        this.storeFromImportsWrapper = storeFromImportsWrapper;
        this.accessedStores = new Set();
        this.variableDeclarations = [];
        this.reactiveDeclarations = [];
        this.importStatements = [];
        this.addStoreAcess = this.accessedStores.add.bind(this.accessedStores);
        this.addVariableDeclaration = this.variableDeclarations.push.bind(this.variableDeclarations);
        this.addReactiveDeclaration = this.reactiveDeclarations.push.bind(this.reactiveDeclarations);
        this.addImportStatement = this.importStatements.push.bind(this.importStatements);
        storesResolvedInTemplate.forEach(this.addStoreAcess);
    }
    modifyCode(astOffset, str) {
        this.variableDeclarations.forEach((node) => this.attachStoreValueDeclarationToDecl(node, astOffset, str));
        this.reactiveDeclarations.forEach((node) => this.attachStoreValueDeclarationToReactiveAssignment(node, astOffset, str));
        this.attachStoreValueDeclarationOfImportsToRenderFn(str);
    }
    getAccessedStores() {
        return [...this.accessedStores.keys()];
    }
    getGlobals() {
        const globals = new Set(this.accessedStores);
        this.variableDeclarations.forEach((node) => extractIdentifiers(node.name).forEach((id) => globals.delete(id.text)));
        this.reactiveDeclarations.forEach((node) => getNamesFromLabeledStatement(node).forEach((name) => globals.delete(name)));
        this.importStatements.forEach(({ name }) => name && globals.delete(name.getText()));
        return [...globals].map((name) => `$${name}`);
    }
    attachStoreValueDeclarationToDecl(node, astOffset, str) {
        const storeNames = extractIdentifiers(node.name)
            .map((id) => id.text)
            .filter((name) => this.accessedStores.has(name));
        if (!storeNames.length) {
            return;
        }
        const storeDeclarations = surroundWithIgnoreComments(this.createStoreDeclarations(storeNames));
        const nodeEnd = ts.isVariableDeclarationList(node.parent) && node.parent.declarations.length > 1
            ? node.parent.declarations[node.parent.declarations.length - 1].getEnd()
            : node.getEnd();
        if (getCurrentPrepends(str, nodeEnd + astOffset).length) {
            preprendStr(str, nodeEnd + astOffset, storeDeclarations);
        }
        else {
            str.appendRight(nodeEnd + astOffset, storeDeclarations);
        }
    }
    attachStoreValueDeclarationToReactiveAssignment(node, astOffset, str) {
        const storeNames = getNamesFromLabeledStatement(node).filter((name) => this.accessedStores.has(name));
        if (!storeNames.length) {
            return;
        }
        const storeDeclarations = surroundWithIgnoreComments(this.createStoreDeclarations(storeNames));
        const endPos = node.getEnd() + astOffset;
        if (str.original.charAt(endPos - 1) !== ';') {
            preprendStr(str, endPos, storeDeclarations);
        }
        else {
            str.appendRight(endPos, storeDeclarations);
        }
    }
    attachStoreValueDeclarationOfImportsToRenderFn(str) {
        const storeNames = this.importStatements
            .filter((declaration) => declaration.name &&
            (!this.isSvelte5Plus || !this.isSvelteStoreDerivedImport(declaration)) &&
            this.accessedStores.has(declaration.name.getText()))
            .map(({ name }) => name.getText());
        if (!storeNames.length) {
            return;
        }
        const storeDeclarations = this.storeFromImportsWrapper(surroundWithIgnoreComments(this.createStoreDeclarations(storeNames)));
        str.appendRight(this.renderFunctionStart, storeDeclarations);
    }
    isSvelteStoreDerivedImport(declaration) {
        if (!ts.isImportSpecifier(declaration) || declaration.name.text !== 'derived') {
            return false;
        }
        const importDeclaration = declaration.parent.parent.parent;
        return (ts.isImportDeclaration(importDeclaration) &&
            importDeclaration.moduleSpecifier &&
            ts.isStringLiteral(importDeclaration.moduleSpecifier) &&
            importDeclaration.moduleSpecifier.text === 'svelte/store');
    }
    createStoreDeclarations(storeNames) {
        let declarations = '';
        for (let i = 0; i < storeNames.length; i++) {
            declarations += this.createStoreDeclaration(storeNames[i]);
        }
        return declarations;
    }
    createStoreDeclaration(storeName) {
        return `;let $${storeName} = __sveltets_2_store_get(${storeName});`;
    }
}
class ImplicitTopLevelNames {
    constructor(str, astOffset) {
        this.str = str;
        this.astOffset = astOffset;
        this.map = new Set();
    }
    add(node) {
        this.map.add(node);
    }
    handleReactiveStatement(node, binaryExpression) {
        if (binaryExpression) {
            this.wrapExpressionWithInvalidate(binaryExpression.right);
        }
        else {
            const start = node.getStart() + this.astOffset;
            const end = node.getEnd() + this.astOffset;
            this.str.prependLeft(start, ';() => {');
            preprendStr(this.str, end, '}');
        }
    }
    wrapExpressionWithInvalidate(expression) {
        if (!expression) {
            return;
        }
        const start = expression.getStart() + this.astOffset;
        const end = expression.getEnd() + this.astOffset;
        if (ts.isObjectLiteralExpression(expression) ||
            (expression.getText().startsWith('{') &&
                this.isNodeStartsWithObjectLiteral(expression)) ||
            ts.isAsExpression(expression)) {
            this.str.appendLeft(start, '(');
            this.str.appendRight(end, ')');
        }
        this.str.prependLeft(start, '__sveltets_2_invalidate(() => ');
        preprendStr(this.str, end, ')');
    }
    isNodeStartsWithObjectLiteral(node) {
        if (ts.isObjectLiteralExpression(node)) {
            return true;
        }
        if (ts.isElementAccessExpression(node)) {
            return this.isNodeStartsWithObjectLiteral(node.expression);
        }
        if (ts.isBinaryExpression(node)) {
            return this.isNodeStartsWithObjectLiteral(node.left);
        }
        if (ts.isConditionalExpression(node)) {
            return this.isNodeStartsWithObjectLiteral(node.condition);
        }
        return node
            .getChildren()
            .filter((e) => e.pos === node.pos)
            .some((child) => this.isNodeStartsWithObjectLiteral(child));
    }
    modifyCode(rootVariables) {
        for (const node of this.map.values()) {
            const names = getNamesFromLabeledStatement(node);
            if (names.length === 0) {
                continue;
            }
            const implicitTopLevelNames = names.filter((name) => !rootVariables.has(name));
            const pos = node.label.getStart();
            if (this.hasOnlyImplicitTopLevelNames(names, implicitTopLevelNames)) {
                this.str.remove(pos + this.astOffset, pos + this.astOffset + 2);
                this.str.prependRight(pos + this.astOffset, 'let ');
                this.removeBracesFromParenthizedExpression(node);
            }
            else {
                implicitTopLevelNames.forEach((name) => {
                    this.str.prependRight(pos + this.astOffset, `let ${name};\n`);
                });
            }
        }
    }
    hasOnlyImplicitTopLevelNames(names, implicitTopLevelNames) {
        return names.length === implicitTopLevelNames.length;
    }
    removeBracesFromParenthizedExpression(node) {
        if (ts.isExpressionStatement(node.statement) &&
            isParenthesizedObjectOrArrayLiteralExpression(node.statement.expression)) {
            const parenthesizedExpression = node.statement.expression;
            const parenthesisStart = parenthesizedExpression.getStart() + this.astOffset;
            const expressionStart = parenthesizedExpression.expression.getStart() + this.astOffset;
            this.str.overwrite(parenthesisStart, expressionStart, '', { contentOnly: true });
            const parenthesisEnd = parenthesizedExpression.getEnd() + this.astOffset;
            const expressionEnd = parenthesizedExpression.expression.getEnd() + this.astOffset;
            overwriteStr(this.str, expressionEnd, parenthesisEnd, ')', true);
        }
    }
}
function handleTypeAssertion(str, assertion, astOffset) {
    const { expression, type } = assertion;
    const assertionStart = assertion.getStart() + astOffset;
    const typeStart = type.getStart() + astOffset;
    const typeEnd = type.getEnd() + astOffset;
    const expressionStart = expression.getStart() + astOffset;
    const expressionEnd = expression.getEnd() + astOffset;
    str.appendLeft(expressionEnd, ' as ');
    str.move(assertionStart, typeEnd, expressionEnd);
    str.remove(assertionStart, typeStart);
    str.remove(typeEnd, expressionStart);
}
function handleImportDeclaration(node, str, astOffset, scriptStart, sourceFile) {
    return moveNode(node, str, astOffset, scriptStart, sourceFile);
}
function handleFirstInstanceImport(tsAst, astOffset, hasModuleScript, str) {
    var _a;
    const imports = getTopLevelImports(tsAst);
    const firstImport = imports[0];
    if (!firstImport) {
        return;
    }
    const firstComment = Array.from((_a = ts.getLeadingCommentRanges(firstImport.getFullText(), 0)) !== null && _a !== void 0 ? _a : []).sort((a, b) => a.pos - b.pos)[0];
    const start = firstComment && firstComment.kind === ts.SyntaxKind.MultiLineCommentTrivia
        ? firstComment.pos + firstImport.getFullStart()
        : firstImport.getStart();
    str.appendRight(start + astOffset, '\n' + (hasModuleScript ? '\n' : ''));
    const lastImport = imports[imports.length - 1];
    const end = lastImport.end + astOffset - 1;
    if (str.original[end] !== ';') {
        str.overwrite(end, lastImport.end + astOffset, str.original[end] + ';\n');
    }
}
function flatten(arr) {
    return arr.reduce((acc, val) => acc.concat(val), []);
}
class InterfacesAndTypes {
    constructor() {
        this.node = null;
        this.all = [];
        this.references = new Map();
    }
    add(node) {
        this.all.push(node);
    }
    getNodesWithNames(names) {
        return this.all.filter((node) => names.includes(node.name.text));
    }
    addReference(reference) {
        if (!this.node) {
            return;
        }
        const references = this.references.get(this.node) || [];
        references.push(reference);
        this.references.set(this.node, references);
    }
    getNodesThatReferenceType(name) {
        const nodes = [];
        for (const [node, references] of this.references) {
            if (references.some((r) => r.typeName.getText() === name)) {
                nodes.push(node);
            }
        }
        return nodes;
    }
    getNodesThatRecursivelyReferenceType(name) {
        let types = [name];
        const nodes = new Set();
        while (types.length !== 0) {
            const newTypes = flatten(types.map((type) => this.getNodesThatReferenceType(type))).filter((t) => !nodes.has(t));
            newTypes.forEach((t) => nodes.add(t));
            types = newTypes.map((t) => t.name.text);
        }
        return [...nodes.values()];
    }
    getNodesThatRecursivelyReferenceTypes(names) {
        return flatten(names.map((name) => this.getNodesThatRecursivelyReferenceType(name)));
    }
}
function processInstanceScriptContent(str, script, events, implicitStoreValues, mode, moduleAst, isTSFile, basename, isSvelte5Plus, isRunes, emitJsDoc, rewriteExternalImports) {
    const htmlx = str.original;
    const scriptContent = htmlx.substring(script.content.start, script.content.end);
    const tsAst = ts.createSourceFile('component.ts.svelte', scriptContent, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
    const astOffset = script.content.start;
    const exportedNames = new ExportedNames(str, astOffset, basename, isTSFile, isSvelte5Plus, isRunes, emitJsDoc);
    const generics = new Generics(str, astOffset, script);
    const interfacesAndTypes = new InterfacesAndTypes();
    if (moduleAst) {
        moduleAst.tsAst.forEachChild((n) => exportedNames.hoistableInterfaces.analyzeModuleScriptNode(n));
    }
    const implicitTopLevelNames = new ImplicitTopLevelNames(str, astOffset);
    let uses$$props = false;
    let uses$$restProps = false;
    let uses$$slots = false;
    let uses$$SlotsInterface = false;
    let hasTopLevelAwait = false;
    let isDeclaration = false;
    let variableDeclarationNode = null;
    let pendingStoreResolutions = [];
    let scope = new Scope$1();
    const rootScope = scope;
    let isPropsDeclarationRune = false;
    const pushScope = () => (scope = new Scope$1(scope));
    const popScope = () => (scope = scope.parent);
    const resolveStore = (pending) => {
        let { node, scope } = pending;
        const name = node.text;
        while (scope) {
            if (scope.declared.has(name)) {
                return;
            }
            scope = scope.parent;
        }
        const storename = node.getText().slice(1);
        implicitStoreValues.addStoreAcess(storename);
    };
    const handleIdentifier = (ident, parent) => {
        if (ident.text === '$$props') {
            uses$$props = true;
            return;
        }
        if (ident.text === '$$restProps') {
            uses$$restProps = true;
            return;
        }
        if (ident.text === '$$slots') {
            uses$$slots = true;
            return;
        }
        if (ts.isLabeledStatement(parent) && parent.label == ident) {
            return;
        }
        if (ident.text === 'props' &&
            variableDeclarationNode &&
            variableDeclarationNode.initializer &&
            ts.isCallExpression(variableDeclarationNode.initializer) &&
            variableDeclarationNode.initializer.getText() === '$props()') {
            isPropsDeclarationRune = true;
        }
        if (isDeclaration || ts.isParameter(parent)) {
            if (isNotPropertyNameOfImport(ident) &&
                (!ts.isBindingElement(ident.parent) || ident.parent.name == ident)) {
                if (ident.text.startsWith('$') || scope == rootScope) {
                    scope.declared.add(ident.text);
                }
            }
        }
        else {
            const text = ident.text;
            if (text.startsWith('$')) {
                if ((!ts.isPropertyAccessExpression(parent) || parent.expression == ident) &&
                    (!ts.isPropertyAssignment(parent) || parent.initializer == ident) &&
                    !ts.isPropertySignature(parent) &&
                    !ts.isPropertyDeclaration(parent) &&
                    !ts.isTypeReferenceNode(parent) &&
                    !ts.isTypeAliasDeclaration(parent) &&
                    !ts.isInterfaceDeclaration(parent)) {
                    let isPropsId = false;
                    if (text === '$props' &&
                        ts.isPropertyAccessExpression(parent) &&
                        parent.parent &&
                        ts.isCallExpression(parent.parent) &&
                        parent.parent.arguments.length === 0) {
                        const text = parent.getText();
                        isPropsId = text === '$props.id';
                    }
                    const is_rune = (text === '$props' || text === '$derived' || text === '$state') &&
                        ts.isCallExpression(parent) &&
                        ts.isVariableDeclaration(parent.parent) &&
                        parent.parent.name.getText().includes(text.slice(1));
                    if (!is_rune) {
                        pendingStoreResolutions.push({ node: ident, parent, scope, isPropsId });
                    }
                }
            }
        }
    };
    const walk = (node, parent) => {
        var _a, _b, _c;
        const onLeaveCallbacks = [];
        if (rewriteExternalImports) {
            rewriteExternalImportsInNode(ts, node, rewriteExternalImports, (specifier, rewrite) => {
                str.overwrite(specifier.getStart(tsAst) + astOffset + 1, specifier.getEnd() + astOffset - 1, rewrite.rewritten);
            });
        }
        if (parent === tsAst) {
            exportedNames.hoistableInterfaces.analyzeInstanceScriptNode(node);
        }
        generics.addIfIsGeneric(node);
        if (is$$EventsDeclaration(node)) {
            events.setComponentEventsInterface(node, astOffset);
        }
        if (is$$SlotsDeclaration(node)) {
            uses$$SlotsInterface = true;
        }
        if (is$$PropsDeclaration(node)) {
            exportedNames.uses$$Props = true;
        }
        if (ts.isVariableStatement(node)) {
            exportedNames.handleVariableStatement(node, parent);
        }
        if (ts.isFunctionDeclaration(node)) {
            exportedNames.handleExportFunctionOrClass(node);
        }
        if (ts.isClassDeclaration(node)) {
            exportedNames.handleExportFunctionOrClass(node);
        }
        if (ts.isBlock(node) || ts.isFunctionLike(node)) {
            pushScope();
            onLeaveCallbacks.push(() => popScope());
        }
        if (ts.isExportDeclaration(node)) {
            exportedNames.handleExportDeclaration(node);
        }
        if (ts.isImportDeclaration(node)) {
            handleImportDeclaration(node, str, astOffset, script.start, tsAst);
            events.checkIfImportIsEventDispatcher(node);
        }
        if (ts.isImportEqualsDeclaration(node)) {
            const end = node.getEnd() + astOffset;
            if (str.original[end - 1] !== ';') {
                preprendStr(str, end, ';');
            }
        }
        if (ts.isVariableDeclaration(node)) {
            events.checkIfIsStringLiteralDeclaration(node);
            events.checkIfDeclarationInstantiatedEventDispatcher(node);
            if (((_b = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent) === tsAst) {
                implicitStoreValues.addVariableDeclaration(node);
            }
        }
        if (ts.isCallExpression(node)) {
            events.checkIfCallExpressionIsDispatch(node);
        }
        if (ts.isVariableDeclaration(parent) && parent.name == node) {
            isDeclaration = true;
            variableDeclarationNode = parent;
            onLeaveCallbacks.push(() => {
                isDeclaration = false;
                variableDeclarationNode = null;
            });
        }
        if (ts.isBindingElement(parent) && parent.name == node) {
            isDeclaration = true;
            onLeaveCallbacks.push(() => (isDeclaration = false));
        }
        if (ts.isImportClause(node)) {
            isDeclaration = true;
            onLeaveCallbacks.push(() => (isDeclaration = false));
            implicitStoreValues.addImportStatement(node);
        }
        if (ts.isImportSpecifier(node)) {
            implicitStoreValues.addImportStatement(node);
        }
        if (ts.isTypeAliasDeclaration(node) || ts.isInterfaceDeclaration(node)) {
            interfacesAndTypes.node = node;
            interfacesAndTypes.add(node);
            onLeaveCallbacks.push(() => (interfacesAndTypes.node = null));
        }
        if (ts.isIdentifier(node)) {
            handleIdentifier(node, parent);
        }
        if (ts.isLabeledStatement(node) &&
            parent == tsAst &&
            node.label.text == '$' &&
            node.statement) {
            const binaryExpression = getBinaryAssignmentExpr(node);
            if (binaryExpression) {
                implicitTopLevelNames.add(node);
                implicitStoreValues.addReactiveDeclaration(node);
            }
            implicitTopLevelNames.handleReactiveStatement(node, binaryExpression);
        }
        if (isSvelte5Plus && ts.isAwaitExpression(node) && scope === rootScope) {
            hasTopLevelAwait = true;
        }
        if (mode !== 'ts' && ((_c = ts.isTypeAssertionExpression) === null || _c === void 0 ? void 0 : _c.call(ts, node))) {
            handleTypeAssertion(str, node, astOffset);
        }
        ts.forEachChild(node, (n) => walk(n, node));
        onLeaveCallbacks.map((c) => c());
    };
    tsAst.forEachChild((n) => walk(n, tsAst));
    if (isPropsDeclarationRune) {
        pendingStoreResolutions = pendingStoreResolutions.filter(({ isPropsId }) => !isPropsId);
    }
    pendingStoreResolutions.map(resolveStore);
    implicitTopLevelNames.modifyCode(rootScope.declared);
    implicitStoreValues.modifyCode(astOffset, str);
    handleFirstInstanceImport(tsAst, astOffset, !!moduleAst, str);
    const nodesToMove = interfacesAndTypes.getNodesWithNames(generics.getTypeReferences());
    for (const node of nodesToMove) {
        moveNode(node, str, astOffset, script.start, tsAst);
    }
    exportedNames.hoistableInterfaces.addDisallowed(implicitStoreValues.getAccessedStores());
    const hoisted = exportedNames.hoistableInterfaces.moveHoistableInterfaces(str, astOffset, script.start + 1,
    generics.getReferences());
    if (mode === 'dts') {
        if (hoisted) {
            transformInterfacesToTypes(tsAst, str, astOffset, [...hoisted.values()].concat(nodesToMove));
        }
        else {
            transformInterfacesToTypes(tsAst, str, astOffset, nodesToMove);
        }
    }
    return {
        exportedNames,
        events,
        uses$$props,
        uses$$restProps,
        uses$$slots,
        uses$$SlotsInterface,
        generics,
        hasTopLevelAwait
    };
}
function transformInterfacesToTypes(tsAst, str, astOffset, movedNodes) {
    tsAst.statements
        .filter(ts.isInterfaceDeclaration)
        .filter((i) => !movedNodes.includes(i))
        .forEach((node) => {
        var _a;
        str.overwrite(node.getStart() + astOffset, node.getStart() + astOffset + 'interface'.length, 'type');
        if ((_a = node.heritageClauses) === null || _a === void 0 ? void 0 : _a.length) {
            const extendsStart = node.heritageClauses[0].getStart() + astOffset;
            str.overwrite(extendsStart, extendsStart + 'extends'.length, '=');
            const extendsList = node.heritageClauses[0].types;
            let prev = extendsList[0];
            extendsList.slice(1).forEach((heritageClause) => {
                str.overwrite(prev.getEnd() + astOffset, heritageClause.getStart() + astOffset, ' & ');
                prev = heritageClause;
            });
            str.appendLeft(node.heritageClauses[0].getEnd() + astOffset, ' & ');
        }
        else {
            str.prependLeft(str.original.indexOf('{', node.getStart() + astOffset), '=');
        }
    });
}
function createModuleAst(str, script) {
    const htmlx = str.original;
    const scriptContent = htmlx.substring(script.content.start, script.content.end);
    const tsAst = ts.createSourceFile('component.module.ts.svelte', scriptContent, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
    const astOffset = script.content.start;
    return { htmlx, tsAst, astOffset };
}
function processModuleScriptTag(str, script, implicitStoreValues, moduleAst, rewriteExternalImports) {
    const { htmlx, tsAst, astOffset } = moduleAst;
    const generics = new Generics(str, astOffset, script);
    if (generics.genericsAttr) {
        const start = htmlx.indexOf('generics', script.start);
        throwError$2(start, start + 8, 'The generics attribute is only allowed on the instance script', str.original);
    }
    const walk = (node) => {
        if (rewriteExternalImports) {
            rewriteExternalImportsInNode(ts, node, rewriteExternalImports, (specifier, rewrite) => {
                str.overwrite(specifier.getStart(tsAst) + astOffset + 1, specifier.getEnd() + astOffset - 1, rewrite.rewritten);
            });
        }
        resolveImplicitStoreValue(node, implicitStoreValues, str, astOffset);
        generics.throwIfIsGeneric(node);
        throwIfIs$$EventsDeclaration(node, str, astOffset);
        throwIfIs$$SlotsDeclaration(node, str, astOffset);
        throwIfIs$$PropsDeclaration(node, str, astOffset);
        ts.forEachChild(node, (n) => walk(n));
    };
    tsAst.forEachChild((n) => walk(n));
    implicitStoreValues.modifyCode(astOffset, str);
    const scriptStartTagEnd = htmlx.indexOf('>', script.start) + 1;
    const scriptEndTagStart = htmlx.lastIndexOf('<', script.end - 1);
    str.overwrite(script.start, scriptStartTagEnd, ';', {
        contentOnly: true
    });
    str.overwrite(scriptEndTagStart, script.end, ';', {
        contentOnly: true
    });
}
function resolveImplicitStoreValue(node, implicitStoreValues, str, astOffset) {
    var _a;
    if (ts.isVariableDeclaration(node)) {
        implicitStoreValues.addVariableDeclaration(node);
    }
    if (ts.isImportClause(node)) {
        implicitStoreValues.addImportStatement(node);
    }
    if (ts.isImportSpecifier(node)) {
        implicitStoreValues.addImportStatement(node);
    }
    if ((_a = ts.isTypeAssertionExpression) === null || _a === void 0 ? void 0 : _a.call(ts, node)) {
        handleTypeAssertion(str, node, astOffset);
    }
}
function throwIfIs$$EventsDeclaration(node, str, astOffset) {
    if (is$$EventsDeclaration(node)) {
        throw$$Error(node, str, astOffset, '$$Events');
    }
}
function throwIfIs$$SlotsDeclaration(node, str, astOffset) {
    if (is$$SlotsDeclaration(node)) {
        throw$$Error(node, str, astOffset, '$$Slots');
    }
}
function throwIfIs$$PropsDeclaration(node, str, astOffset) {
    if (is$$PropsDeclaration(node)) {
        throw$$Error(node, str, astOffset, '$$Props');
    }
}
function throw$$Error(node, str, astOffset, type) {
    throwError$2(node.getStart() + astOffset, node.getEnd() + astOffset, `${type} can only be declared in the instance script`, str.original);
}
function processSvelteTemplate(str, parse, options) {
    const { htmlxAst, tags } = parseHtmlx(str.original, parse, options);
    return convertHtmlxToJsx(str, htmlxAst, tags, options);
}
function svelte2tsx(svelte, options = { parse: compiler.parse }) {
    var _a;
    options.mode = options.mode || 'ts';
    options.version = options.version || compiler.VERSION;
    const str = new MagicString(svelte);
    const rewriteExternalImportsOptions = options.rewriteExternalImports && options.filename
        ? {
            sourcePath: options.filename,
            generatedPath: options.rewriteExternalImports.generatedPath,
            workspacePath: options.rewriteExternalImports.workspacePath
        }
        : undefined;
    const basename = path$1.basename(options.filename || '');
    const svelte5Plus = Number(options.version[0]) > 4;
    const isTsFile = options === null || options === void 0 ? void 0 : options.isTsFile;
    const emitJsDoc = (_a = options === null || options === void 0 ? void 0 : options.emitJsDoc) !== null && _a !== void 0 ? _a : false;
    let { htmlAst, moduleScriptTag, scriptTag, rootSnippets, slots, uses$$props, uses$$slots, uses$$restProps, events, componentDocumentation, resolvedStores, usesAccessors, isRunes } = processSvelteTemplate(str, options.parse || compiler.parse, {
        ...options,
        svelte5Plus,
        rewriteExternalImports: rewriteExternalImportsOptions
    });
    let instanceScriptTarget = 0;
    let moduleAst;
    if (moduleScriptTag) {
        moduleAst = createModuleAst(str, moduleScriptTag);
        if (moduleScriptTag.start != 0) {
            str.move(moduleScriptTag.start, moduleScriptTag.end, 0);
        }
        else {
            instanceScriptTarget = moduleScriptTag.end;
        }
    }
    const renderFunctionStart = scriptTag
        ? str.original.lastIndexOf('>', scriptTag.content.start) + 1
        : instanceScriptTarget;
    const implicitStoreValues = new ImplicitStoreValues(resolvedStores, renderFunctionStart, svelte5Plus);
    let exportedNames = new ExportedNames(str, 0, basename, isTsFile, svelte5Plus, isRunes, emitJsDoc);
    let generics = new Generics(str, 0, { attributes: [] });
    let uses$$SlotsInterface = false;
    let hasTopLevelAwait = false;
    if (scriptTag) {
        if (scriptTag.start != instanceScriptTarget) {
            str.move(scriptTag.start, scriptTag.end, instanceScriptTarget);
        }
        const res = processInstanceScriptContent(str, scriptTag, events, implicitStoreValues, options.mode, moduleAst, isTsFile, basename, svelte5Plus, isRunes, emitJsDoc, rewriteExternalImportsOptions);
        uses$$props = uses$$props || res.uses$$props;
        uses$$restProps = uses$$restProps || res.uses$$restProps;
        uses$$slots = uses$$slots || res.uses$$slots;
        ({ exportedNames, events, generics, uses$$SlotsInterface, hasTopLevelAwait } = res);
    }
    exportedNames.usesAccessors = usesAccessors;
    if (svelte5Plus) {
        exportedNames.checkGlobalsForRunes(implicitStoreValues.getGlobals());
        if (hasTopLevelAwait) {
            exportedNames.enterRunesMode();
        }
    }
    createRenderFunction({
        str,
        scriptTag,
        scriptDestination: instanceScriptTarget,
        slots,
        events,
        exportedNames,
        uses$$props,
        uses$$restProps,
        uses$$slots,
        uses$$SlotsInterface,
        generics,
        hasTopLevelAwait,
        svelte5Plus,
        isTsFile,
        mode: options.mode,
        emitJsDoc
    });
    if (moduleScriptTag) {
        processModuleScriptTag(str, moduleScriptTag, new ImplicitStoreValues(implicitStoreValues.getAccessedStores(), renderFunctionStart, svelte5Plus, scriptTag || options.mode === 'ts' ? undefined : (input) => `</>;${input}<>`), moduleAst, rewriteExternalImportsOptions);
        if (!scriptTag) {
            moduleAst.tsAst.forEachChild((node) => exportedNames.hoistableInterfaces.analyzeModuleScriptNode(node));
        }
    }
    if (moduleScriptTag && rootSnippets.length > 0) {
        exportedNames.hoistableInterfaces.analyzeSnippets(rootSnippets);
    }
    if (moduleScriptTag || scriptTag) {
        let snippetHoistTargetForModule = 0;
        if (rootSnippets.length) {
            if (scriptTag) {
                snippetHoistTargetForModule = scriptTag.start + 1;
            }
            else {
                const imports = getTopLevelImports(moduleAst.tsAst);
                const lastImport = imports[imports.length - 1];
                snippetHoistTargetForModule = lastImport
                    ? lastImport.end + moduleAst.astOffset
                    : moduleAst.astOffset;
                str.appendLeft(snippetHoistTargetForModule, '\n');
            }
        }
        for (const [start, end, globals] of rootSnippets) {
            const hoist_to_module = moduleScriptTag &&
                (globals.size === 0 ||
                    [...globals.keys()].every((id) => exportedNames.hoistableInterfaces.isAllowedReference(id)));
            if (hoist_to_module) {
                str.move(start, end, snippetHoistTargetForModule);
            }
            else if (scriptTag) {
                str.move(start, end, renderFunctionStart);
            }
        }
    }
    addComponentExport({
        str,
        canHaveAnyProp: !exportedNames.uses$$Props && (uses$$props || uses$$restProps),
        events,
        isTsFile,
        exportedNames,
        usesAccessors,
        usesSlots: slots.size > 0,
        fileName: options === null || options === void 0 ? void 0 : options.filename,
        componentDocumentation,
        mode: options.mode,
        generics,
        isSvelte5: svelte5Plus,
        hasTopLevelAwait,
        noSvelteComponentTyped: options.noSvelteComponentTyped,
        emitJsDoc
    });
    if (options.mode === 'dts') {
        if (options.noSvelteComponentTyped) {
            str.prepend('import { SvelteComponent } from "svelte"\n' + '\n');
        }
        else {
            str.prepend('import { SvelteComponentTyped } from "svelte"\n' + '\n');
        }
        let code = str.toString();
        code = code
            .replace('<></>;', '')
            .replace('<></>;', '')
            .replace(/<>.*<\/>/s, '')
            .replace('\n() => ();', '');
        return {
            code
        };
    }
    else {
        str.prepend('///<reference types="svelte" />\n');
        return {
            code: str.toString(),
            map: str.generateMap({ hires: true, source: options === null || options === void 0 ? void 0 : options.filename }),
            exportedNames: exportedNames.getExportsMap(),
            events: events.createAPI(),
            htmlAst
        };
    }
}
async function emitDts(config) {
    const svelteMap = await createSvelteMap(config);
    const { options, filenames } = loadTsconfig(config, svelteMap);
    const host = await createTsCompilerHost(options, svelteMap);
    const program = ts.createProgram(filenames, options, host);
    const result = program.emit();
    const likely_failed_files = result.diagnostics.filter((diagnostic) => {
        return (diagnostic.code === 2527 ||
            diagnostic.code === 5088 ||
            diagnostic.code === 2742 ||
            (diagnostic.code >= 9005 && diagnostic.code <= 9039) ||
            (diagnostic.code >= 4000 && diagnostic.code <= 4108));
    });
    if (likely_failed_files.length > 0) {
        const failed_by_file = new Map();
        likely_failed_files.forEach((diagnostic) => {
            var _a;
            const file = (_a = diagnostic.file) === null || _a === void 0 ? void 0 : _a.fileName;
            if (file) {
                const errors = failed_by_file.get(file) || [];
                errors.push(ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'));
                failed_by_file.set(file, errors);
            }
        });
        console.warn('d.ts type declaration files for the following files were likely not generated due to the following errors:');
        console.warn([...failed_by_file.entries()]
            .map(([file, errors]) => {
            return `${file}\n${errors.map((error) => `  - ${error}`).join('\n')}`;
        })
            .join('\n'));
    }
}
function loadTsconfig(config, svelteMap) {
    var _a;
    const libRoot = config.libRoot || process.cwd();
    const jsconfigFile = ts.findConfigFile(libRoot, ts.sys.fileExists, 'jsconfig.json');
    let tsconfigFile = ts.findConfigFile(libRoot, ts.sys.fileExists, config.tsconfig);
    if (!tsconfigFile && !jsconfigFile) {
        throw new Error('Failed to locate tsconfig or jsconfig');
    }
    tsconfigFile = tsconfigFile || jsconfigFile;
    if (jsconfigFile && isSubpath(path__namespace.dirname(tsconfigFile), path__namespace.dirname(jsconfigFile))) {
        tsconfigFile = jsconfigFile;
    }
    tsconfigFile = path__namespace.isAbsolute(tsconfigFile) ? tsconfigFile : path__namespace.join(libRoot, tsconfigFile);
    const basepath = path__namespace.dirname(tsconfigFile);
    const { error, config: tsConfig } = ts.readConfigFile(tsconfigFile, ts.sys.readFile);
    if (error) {
        throw new Error('Malformed tsconfig\n' + JSON.stringify(error, null, 2));
    }
    const libPathRelative = path__namespace.relative(basepath, libRoot).split(path__namespace.sep).join('/');
    if (libPathRelative) {
        tsConfig.include = [`${libPathRelative}/**/*`];
        tsConfig.files = [];
    }
    const { options, fileNames } = ts.parseJsonConfigFileContent(tsConfig, ts.sys, basepath, { sourceMap: false, rootDir: config.libRoot }, tsconfigFile, undefined, [{ extension: 'svelte', isMixedContent: true, scriptKind: ts.ScriptKind.Deferred }]);
    const filenames = fileNames.map((name) => {
        if (!isSvelteFilepath(name)) {
            return name;
        }
        const isTsFile = svelteMap.add(name);
        return name + (isTsFile ? '.ts' : '.js');
    });
    filenames.push(config.svelteShimsPath);
    return {
        options: {
            ...options,
            noEmit: false,
            moduleResolution: options.moduleResolution &&
                options.moduleResolution !== ts.ModuleResolutionKind.Classic
                ? options.moduleResolution
                :
                    ((_a = ts.ModuleResolutionKind.NodeJs) !== null && _a !== void 0 ? _a : ts.ModuleResolutionKind.Node10),
            declaration: true,
            emitDeclarationOnly: true,
            declarationDir: config.declarationDir,
            allowNonTsExtensions: true
        },
        filenames
    };
}
async function createTsCompilerHost(options, svelteMap) {
    const host = ts.createCompilerHost(options);
    const pathPrefix = path__namespace
        .relative(process.cwd(), path__namespace.dirname(options.configFilePath))
        .split(path__namespace.sep)
        .join('/');
    const svelteSys = {
        ...ts.sys,
        fileExists(originalPath) {
            let exists = ts.sys.fileExists(originalPath);
            if (exists) {
                return true;
            }
            const path = ensureRealSvelteFilepath(originalPath);
            if (path === originalPath) {
                return false;
            }
            exists = ts.sys.fileExists(path);
            if (exists && isSvelteFilepath(path)) {
                const isTsFile = svelteMap.add(path);
                if ((isTsFile && !isTsFilepath(originalPath)) ||
                    (!isTsFile && isTsFilepath(originalPath))) {
                    return false;
                }
            }
            return exists;
        },
        readFile(path, encoding = 'utf-8') {
            const sveltePath = ensureRealSvelteFilepath(path);
            if (path !== sveltePath || isSvelteFilepath(path)) {
                const result = svelteMap.get(sveltePath);
                if (result === undefined) {
                    return ts.sys.readFile(path, encoding);
                }
                else {
                    return result;
                }
            }
            else {
                return ts.sys.readFile(path, encoding);
            }
        },
        readDirectory(path, extensions, exclude, include, depth) {
            const extensionsWithSvelte = (extensions || []).concat('.svelte');
            return ts.sys.readDirectory(path, extensionsWithSvelte, exclude, include, depth);
        },
        writeFile(fileName, data, writeByteOrderMark) {
            fileName = pathPrefix ? path__namespace.join(pathPrefix, fileName) : fileName;
            if (fileName.endsWith('d.ts.map')) {
                data = data.replace(/"sources":\["(.+?)"\]/, (_, sourcePath) => {
                    sourcePath =
                        pathPrefix && sourcePath.includes(pathPrefix)
                            ? sourcePath.slice(0, sourcePath.indexOf(pathPrefix)) +
                                sourcePath.slice(sourcePath.indexOf(pathPrefix) + pathPrefix.length + 1)
                            : sourcePath;
                    if (svelteMap.get(path__namespace.join(options.rootDir, toRealSvelteFilepath(sourcePath)))) {
                        sourcePath = toRealSvelteFilepath(sourcePath);
                    }
                    return `"sources":["${sourcePath}"]`;
                });
            }
            else if (fileName.endsWith('js.map')) {
                data = data.replace(/"sources":\["(.+?)"\]/, (_, sourcePath) => {
                    sourcePath =
                        pathPrefix && sourcePath.includes(pathPrefix)
                            ? sourcePath.slice(0, sourcePath.indexOf(pathPrefix)) +
                                sourcePath.slice(sourcePath.indexOf(pathPrefix) + pathPrefix.length + 1)
                            : sourcePath;
                    return `"sources":["${sourcePath}"]`;
                });
            }
            return ts.sys.writeFile(fileName, data, writeByteOrderMark);
        }
    };
    host.fileExists = svelteSys.fileExists;
    host.readFile = svelteSys.readFile;
    host.readDirectory = svelteSys.readDirectory;
    host.writeFile = svelteSys.writeFile;
    host.resolveModuleNames = (moduleNames, containingFile, _reusedNames, _redirectedReference, compilerOptions) => {
        return moduleNames.map((moduleName) => {
            return resolveModuleName(moduleName, containingFile, compilerOptions);
        });
    };
    host.resolveModuleNameLiterals = (moduleLiterals, containingFile, _redirectedReference, compilerOptions) => {
        return moduleLiterals.map((moduleLiteral) => {
            return {
                resolvedModule: resolveModuleName(moduleLiteral.text, containingFile, compilerOptions)
            };
        });
    };
    function resolveModuleName(name, containingFile, compilerOptions) {
        const tsResolvedModule = ts.resolveModuleName(name, containingFile, compilerOptions, ts.sys).resolvedModule;
        if (tsResolvedModule && !isVirtualSvelteFilepath(tsResolvedModule.resolvedFileName)) {
            return tsResolvedModule;
        }
        return ts.resolveModuleName(name, containingFile, compilerOptions, svelteSys)
            .resolvedModule;
    }
    return host;
}
async function createSvelteMap(config) {
    const svelteFiles = new Map();
    const noSvelteComponentTyped = config.svelteShimsPath
        .replace(/\\/g, '/')
        .endsWith('svelte2tsx/svelte-shims-v4.d.ts');
    const version = noSvelteComponentTyped ? undefined : '3.42.0';
    function add(path) {
        const normalizedPath = path.replace(/\\/g, '/');
        if (svelteFiles.has(normalizedPath)) {
            return svelteFiles.get(normalizedPath).isTsFile;
        }
        const code = ts.sys.readFile(path, 'utf-8');
        const isTsFile = /<script\s+[^>]*?lang=('|")(ts|typescript)('|")/.test(code);
        const transformed = svelte2tsx(code, {
            filename: path,
            isTsFile,
            mode: 'dts',
            version,
            noSvelteComponentTyped: noSvelteComponentTyped
        }).code;
        svelteFiles.set(normalizedPath, { transformed, isTsFile });
        return isTsFile;
    }
    return {
        add,
        get: (key) => { var _a; return (_a = svelteFiles.get(key.replace(/\\/g, '/'))) === null || _a === void 0 ? void 0 : _a.transformed; }
    };
}
function isSvelteFilepath(filePath) {
    return filePath.endsWith('.svelte');
}
function isTsFilepath(filePath) {
    return filePath.endsWith('.ts');
}
function isVirtualSvelteFilepath(filePath) {
    return filePath.endsWith('.svelte.ts') || filePath.endsWith('svelte.js');
}
function toRealSvelteFilepath(filePath) {
    return filePath.slice(0, -3);
}
function ensureRealSvelteFilepath(filePath) {
    return isVirtualSvelteFilepath(filePath) ? toRealSvelteFilepath(filePath) : filePath;
}
function isSubpath(maybeParent, maybeChild) {
    const relative = path__namespace.relative(maybeParent, maybeChild);
    return relative && !relative.startsWith('..') && !path__namespace.isAbsolute(relative);
}

var svelte2tsx$1 = /*#__PURE__*/Object.freeze({
	__proto__: null,
	emitDts: emitDts,
	internalHelpers: internalHelpers,
	svelte2tsx: svelte2tsx
});

var require$$0 = /*@__PURE__*/getAugmentedNamespace(svelte2tsx$1);

var DocumentMapper = {};

Object.defineProperty(DocumentMapper, "__esModule", { value: true });
DocumentMapper.ConsumerDocumentMapper = void 0;
const vscode_languageserver_1$r = main$8;
const documents_1$r = documents;
class ConsumerDocumentMapper extends documents_1$r.SourceMapDocumentMapper {
    constructor(traceMap, sourceUri, nrPrependesLines) {
        super(traceMap, sourceUri);
        this.nrPrependesLines = nrPrependesLines;
    }
    getOriginalPosition(generatedPosition) {
        return super.getOriginalPosition(vscode_languageserver_1$r.Position.create(generatedPosition.line - this.nrPrependesLines, generatedPosition.character));
    }
    getGeneratedPosition(originalPosition) {
        const result = super.getGeneratedPosition(originalPosition);
        result.line += this.nrPrependesLines;
        return result;
    }
    isInGenerated() {
        return true;
    }
}
DocumentMapper.ConsumerDocumentMapper = ConsumerDocumentMapper;

var svelteAstUtils = {};

var estreeWalker = {exports: {}};

estreeWalker.exports;
(function (module, exports) {
	(function (global, factory) {
		factory(exports) ;
	}(commonjsGlobal, (function (exports) {		// @ts-check
		class WalkerBase {
			constructor() {
				this.should_skip = false;
				this.should_remove = false;
				this.replacement = null;
				this.context = {
					skip: () => (this.should_skip = true),
					remove: () => (this.should_remove = true),
					replace: (node) => (this.replacement = node)
				};
			}
			replace(parent, prop, index, node) {
				if (parent) {
					if (index !== null) {
						parent[prop][index] = node;
					} else {
						parent[prop] = node;
					}
				}
			}
			remove(parent, prop, index) {
				if (parent) {
					if (index !== null) {
						parent[prop].splice(index, 1);
					} else {
						delete parent[prop];
					}
				}
			}
		}
		// @ts-check
		class SyncWalker extends WalkerBase {
			constructor(enter, leave) {
				super();
				this.enter = enter;
				this.leave = leave;
			}
			visit(node, parent, prop, index) {
				if (node) {
					if (this.enter) {
						const _should_skip = this.should_skip;
						const _should_remove = this.should_remove;
						const _replacement = this.replacement;
						this.should_skip = false;
						this.should_remove = false;
						this.replacement = null;
						this.enter.call(this.context, node, parent, prop, index);
						if (this.replacement) {
							node = this.replacement;
							this.replace(parent, prop, index, node);
						}
						if (this.should_remove) {
							this.remove(parent, prop, index);
						}
						const skipped = this.should_skip;
						const removed = this.should_remove;
						this.should_skip = _should_skip;
						this.should_remove = _should_remove;
						this.replacement = _replacement;
						if (skipped) return node;
						if (removed) return null;
					}
					for (const key in node) {
						const value = node[key];
						if (typeof value !== "object") {
							continue;
						} else if (Array.isArray(value)) {
							for (let i = 0; i < value.length; i += 1) {
								if (value[i] !== null && typeof value[i].type === 'string') {
									if (!this.visit(value[i], node, key, i)) {
										i--;
									}
								}
							}
						} else if (value !== null && typeof value.type === "string") {
							this.visit(value, node, key, null);
						}
					}
					if (this.leave) {
						const _replacement = this.replacement;
						const _should_remove = this.should_remove;
						this.replacement = null;
						this.should_remove = false;
						this.leave.call(this.context, node, parent, prop, index);
						if (this.replacement) {
							node = this.replacement;
							this.replace(parent, prop, index, node);
						}
						if (this.should_remove) {
							this.remove(parent, prop, index);
						}
						const removed = this.should_remove;
						this.replacement = _replacement;
						this.should_remove = _should_remove;
						if (removed) return null;
					}
				}
				return node;
			}
		}
		// @ts-check
		class AsyncWalker extends WalkerBase {
			constructor(enter, leave) {
				super();
				this.enter = enter;
				this.leave = leave;
			}
			async visit(node, parent, prop, index) {
				if (node) {
					if (this.enter) {
						const _should_skip = this.should_skip;
						const _should_remove = this.should_remove;
						const _replacement = this.replacement;
						this.should_skip = false;
						this.should_remove = false;
						this.replacement = null;
						await this.enter.call(this.context, node, parent, prop, index);
						if (this.replacement) {
							node = this.replacement;
							this.replace(parent, prop, index, node);
						}
						if (this.should_remove) {
							this.remove(parent, prop, index);
						}
						const skipped = this.should_skip;
						const removed = this.should_remove;
						this.should_skip = _should_skip;
						this.should_remove = _should_remove;
						this.replacement = _replacement;
						if (skipped) return node;
						if (removed) return null;
					}
					for (const key in node) {
						const value = node[key];
						if (typeof value !== "object") {
							continue;
						} else if (Array.isArray(value)) {
							for (let i = 0; i < value.length; i += 1) {
								if (value[i] !== null && typeof value[i].type === 'string') {
									if (!(await this.visit(value[i], node, key, i))) {
										i--;
									}
								}
							}
						} else if (value !== null && typeof value.type === "string") {
							await this.visit(value, node, key, null);
						}
					}
					if (this.leave) {
						const _replacement = this.replacement;
						const _should_remove = this.should_remove;
						this.replacement = null;
						this.should_remove = false;
						await this.leave.call(this.context, node, parent, prop, index);
						if (this.replacement) {
							node = this.replacement;
							this.replace(parent, prop, index, node);
						}
						if (this.should_remove) {
							this.remove(parent, prop, index);
						}
						const removed = this.should_remove;
						this.replacement = _replacement;
						this.should_remove = _should_remove;
						if (removed) return null;
					}
				}
				return node;
			}
		}
		// @ts-check
		function walk(ast, { enter, leave }) {
			const instance = new SyncWalker(enter, leave);
			return instance.visit(ast, null);
		}
		async function asyncWalk(ast, { enter, leave }) {
			const instance = new AsyncWalker(enter, leave);
			return await instance.visit(ast, null);
		}
		exports.asyncWalk = asyncWalk;
		exports.walk = walk;
		Object.defineProperty(exports, '__esModule', { value: true });
	})));
} (estreeWalker, estreeWalker.exports));
var estreeWalkerExports = estreeWalker.exports;
getDefaultExportFromCjs(estreeWalkerExports);

Object.defineProperty(svelteAstUtils, "__esModule", { value: true });
svelteAstUtils.isInTag = isInTag;
svelteAstUtils.isAttributeName = isAttributeName;
svelteAstUtils.isAttributeShorthand = isAttributeShorthand;
svelteAstUtils.isEventHandler = isEventHandler;
svelteAstUtils.isElseBlockWithElseIf = isElseBlockWithElseIf;
svelteAstUtils.hasElseBlock = hasElseBlock;
svelteAstUtils.findElseBlockTagStart = findElseBlockTagStart;
svelteAstUtils.findIfBlockEndTagStart = findIfBlockEndTagStart;
svelteAstUtils.walkSvelteAst = walkSvelteAst;
svelteAstUtils.isAwaitBlock = isAwaitBlock;
svelteAstUtils.isEachBlock = isEachBlock;
const estree_walker_1$2 = estreeWalkerExports;
function matchesOnly(type, only) {
    return (!only ||
        (only === 'Element' && ['Element', 'Body', 'Window'].includes(type)) ||
        (only === 'InlineComponent' && type === 'InlineComponent'));
}
function isInTag(node, offset) {
    return (node?.type === 'InlineComponent' ||
        node?.type === 'Element' ||
        (node?.end === offset &&
            (node?.parent?.type === 'InlineComponent' || node?.parent?.type === 'Element')));
}
function isAttributeName(node, only) {
    return !!node && node.type === 'Attribute' && matchesOnly(node.parent?.type, only);
}
function isAttributeShorthand(node, only) {
    if (!node) {
        return false;
    }
    do {
        if (isAttributeName(node, only)) {
            return true;
        }
        node = node.parent;
    } while (node);
    return false;
}
function isEventHandler(node, only) {
    return !!node && node.type === 'EventHandler' && matchesOnly(node.parent?.type, only);
}
function isElseBlockWithElseIf(node) {
    return (!!node &&
        node.type === 'ElseBlock' &&
        'children' in node &&
        Array.isArray(node.children) &&
        node.children.length === 1 &&
        node.children[0].type === 'IfBlock');
}
function hasElseBlock(node) {
    return 'else' in node && !!node.else;
}
function findElseBlockTagStart(documentText, elseBlock) {
    return documentText.lastIndexOf('{', documentText.lastIndexOf(':else', elseBlock.start));
}
function findIfBlockEndTagStart(documentText, ifBlock) {
    return documentText.lastIndexOf('{', documentText.lastIndexOf('/if', ifBlock.end));
}
function walkSvelteAst(htmlAst, walker) {
    (0, estree_walker_1$2.walk)(htmlAst, {
        enter(node, parent, key, index) {
            walker.enter?.call(this, node, parent, key, index);
        },
        leave(node, parent, key, index) {
            walker.leave?.call(this, node, parent, key, index);
        }
    });
}
function isAwaitBlock(node) {
    return node.type === 'AwaitBlock';
}
function isEachBlock(node) {
    return node.type === 'EachBlock';
}

var utils$2 = {};

var __importDefault$o = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(utils$2, "__esModule", { value: true });
utils$2.getScriptKindFromFileName = getScriptKindFromFileName;
utils$2.getExtensionFromScriptKind = getExtensionFromScriptKind;
utils$2.getScriptKindFromAttributes = getScriptKindFromAttributes;
utils$2.isSvelteFilePath = isSvelteFilePath;
utils$2.isVirtualSvelteFilePath = isVirtualSvelteFilePath;
utils$2.toRealSvelteFilePath = toRealSvelteFilePath;
utils$2.toVirtualSvelteFilePath = toVirtualSvelteFilePath;
utils$2.ensureRealSvelteFilePath = ensureRealSvelteFilePath;
utils$2.convertRange = convertRange;
utils$2.convertToLocationRange = convertToLocationRange;
utils$2.convertToLocationForReferenceOrDefinition = convertToLocationForReferenceOrDefinition;
utils$2.hasNonZeroRange = hasNonZeroRange;
utils$2.rangeToTextSpan = rangeToTextSpan;
utils$2.findTsConfigPath = findTsConfigPath;
utils$2.isSubPath = isSubPath;
utils$2.getNearestWorkspaceUri = getNearestWorkspaceUri;
utils$2.symbolKindFromString = symbolKindFromString;
utils$2.scriptElementKindToCompletionItemKind = scriptElementKindToCompletionItemKind;
utils$2.mapSeverity = mapSeverity;
utils$2.getTsCheckComment = getTsCheckComment;
utils$2.convertToTextSpan = convertToTextSpan;
utils$2.isInScript = isInScript;
utils$2.getDiagnosticTag = getDiagnosticTag;
utils$2.changeSvelteComponentName = changeSvelteComponentName;
utils$2.isGeneratedSvelteComponentName = isGeneratedSvelteComponentName;
utils$2.offsetOfGeneratedComponentExport = offsetOfGeneratedComponentExport;
utils$2.toGeneratedSvelteComponentName = toGeneratedSvelteComponentName;
utils$2.hasTsExtensions = hasTsExtensions;
utils$2.isSvelte2tsxShimFile = isSvelte2tsxShimFile;
utils$2.cloneRange = cloneRange;
const path_1$9 = path$1;
const typescript_1$m = __importDefault$o(ts);
const vscode_languageserver_1$q = main$8;
const documents_1$q = documents;
const utils_1$D = utils$6;
function getScriptKindFromFileName(fileName) {
    const ext = fileName.substr(fileName.lastIndexOf('.'));
    switch (ext.toLowerCase()) {
        case typescript_1$m.default.Extension.Js:
            return typescript_1$m.default.ScriptKind.JS;
        case typescript_1$m.default.Extension.Jsx:
            return typescript_1$m.default.ScriptKind.JSX;
        case typescript_1$m.default.Extension.Ts:
            return typescript_1$m.default.ScriptKind.TS;
        case typescript_1$m.default.Extension.Tsx:
            return typescript_1$m.default.ScriptKind.TSX;
        case typescript_1$m.default.Extension.Json:
            return typescript_1$m.default.ScriptKind.JSON;
        default:
            return typescript_1$m.default.ScriptKind.Unknown;
    }
}
function getExtensionFromScriptKind(kind) {
    switch (kind) {
        case typescript_1$m.default.ScriptKind.JSX:
            return typescript_1$m.default.Extension.Jsx;
        case typescript_1$m.default.ScriptKind.TS:
            return typescript_1$m.default.Extension.Ts;
        case typescript_1$m.default.ScriptKind.TSX:
            return typescript_1$m.default.Extension.Tsx;
        case typescript_1$m.default.ScriptKind.JSON:
            return typescript_1$m.default.Extension.Json;
        case typescript_1$m.default.ScriptKind.JS:
        default:
            return typescript_1$m.default.Extension.Js;
    }
}
function getScriptKindFromAttributes(attrs) {
    const type = attrs.lang || attrs.type;
    switch (type) {
        case 'ts':
        case 'typescript':
        case 'text/ts':
        case 'text/typescript':
            return typescript_1$m.default.ScriptKind.TSX;
        case 'javascript':
        case 'text/javascript':
        default:
            return typescript_1$m.default.ScriptKind.JSX;
    }
}
function isSvelteFilePath(filePath) {
    return filePath.endsWith('.svelte');
}
function isVirtualSvelteFilePath(filePath) {
    return filePath.endsWith('.d.svelte.ts');
}
function toRealSvelteFilePath(filePath) {
    return filePath.slice(0, -11 ) + 'svelte';
}
function toVirtualSvelteFilePath(svelteFilePath) {
    return isVirtualSvelteFilePath(svelteFilePath)
        ? svelteFilePath
        : svelteFilePath.slice(0, -6 ) + 'd.svelte.ts';
}
function ensureRealSvelteFilePath(filePath) {
    return isVirtualSvelteFilePath(filePath) ? toRealSvelteFilePath(filePath) : filePath;
}
function convertRange(document, range) {
    return vscode_languageserver_1$q.Range.create(document.positionAt(range.start || 0), document.positionAt((range.start || 0) + (range.length || 0)));
}
function convertToLocationRange(snapshot, textSpan) {
    const range = (0, documents_1$q.mapRangeToOriginal)(snapshot, convertRange(snapshot, textSpan));
    mapUnmappedToTheStartOfFile(range);
    return range;
}
function convertToLocationForReferenceOrDefinition(snapshot, textSpan) {
    const location = (0, documents_1$q.mapLocationToOriginal)(snapshot, convertRange(snapshot, textSpan));
    mapUnmappedToTheStartOfFile(location.range);
    return location;
}
function mapUnmappedToTheStartOfFile(range) {
    if (range.start.line < 0) {
        range.start.line = 0;
        range.start.character = 1;
    }
    if (range.end.line < 0) {
        range.end = range.start;
    }
}
function hasNonZeroRange({ range }) {
    return (!!range &&
        (range.start.line !== range.end.line || range.start.character !== range.end.character));
}
function rangeToTextSpan(range, document) {
    const start = document.offsetAt(range.start);
    const end = document.offsetAt(range.end);
    return { start, length: end - start };
}
function findTsConfigPath(fileName, rootUris, fileExists, getCanonicalFileName) {
    const searchDir = (0, path_1$9.dirname)(fileName);
    const tsconfig = typescript_1$m.default.findConfigFile(searchDir, fileExists, 'tsconfig.json') || '';
    const jsconfig = typescript_1$m.default.findConfigFile(searchDir, fileExists, 'jsconfig.json') || '';
    const config = tsconfig.length >= jsconfig.length ? tsconfig : jsconfig;
    return !!config &&
        rootUris.some((rootUri) => isSubPath(rootUri, config, getCanonicalFileName)) &&
        !fileName
            .substring(config.length - 13)
            .split('/')
            .includes('node_modules')
        ? config
        : '';
}
function isSubPath(uri, possibleSubPath, getCanonicalFileName) {
    return getCanonicalFileName((0, utils_1$D.pathToUrl)(possibleSubPath)).startsWith(getCanonicalFileName(uri));
}
function getNearestWorkspaceUri(workspaceUris, path, getCanonicalFileName) {
    return Array.from(workspaceUris)
        .sort((a, b) => b.length - a.length)
        .find((workspaceUri) => isSubPath(workspaceUri, path, getCanonicalFileName));
}
function symbolKindFromString(kind) {
    switch (kind) {
        case 'module':
            return vscode_languageserver_1$q.SymbolKind.Module;
        case 'class':
            return vscode_languageserver_1$q.SymbolKind.Class;
        case 'local class':
            return vscode_languageserver_1$q.SymbolKind.Class;
        case 'interface':
            return vscode_languageserver_1$q.SymbolKind.Interface;
        case 'enum':
            return vscode_languageserver_1$q.SymbolKind.Enum;
        case 'enum member':
            return vscode_languageserver_1$q.SymbolKind.Constant;
        case 'var':
            return vscode_languageserver_1$q.SymbolKind.Variable;
        case 'local var':
            return vscode_languageserver_1$q.SymbolKind.Variable;
        case 'function':
            return vscode_languageserver_1$q.SymbolKind.Function;
        case 'local function':
            return vscode_languageserver_1$q.SymbolKind.Function;
        case 'method':
            return vscode_languageserver_1$q.SymbolKind.Method;
        case 'getter':
            return vscode_languageserver_1$q.SymbolKind.Method;
        case 'setter':
            return vscode_languageserver_1$q.SymbolKind.Method;
        case 'property':
            return vscode_languageserver_1$q.SymbolKind.Property;
        case 'constructor':
            return vscode_languageserver_1$q.SymbolKind.Constructor;
        case 'parameter':
            return vscode_languageserver_1$q.SymbolKind.Variable;
        case 'type parameter':
            return vscode_languageserver_1$q.SymbolKind.Variable;
        case 'alias':
            return vscode_languageserver_1$q.SymbolKind.Variable;
        case 'let':
            return vscode_languageserver_1$q.SymbolKind.Variable;
        case 'const':
            return vscode_languageserver_1$q.SymbolKind.Constant;
        case 'JSX attribute':
            return vscode_languageserver_1$q.SymbolKind.Property;
        default:
            return vscode_languageserver_1$q.SymbolKind.Variable;
    }
}
function scriptElementKindToCompletionItemKind(kind) {
    switch (kind) {
        case typescript_1$m.default.ScriptElementKind.primitiveType:
        case typescript_1$m.default.ScriptElementKind.keyword:
            return vscode_languageserver_1$q.CompletionItemKind.Keyword;
        case typescript_1$m.default.ScriptElementKind.constElement:
            return vscode_languageserver_1$q.CompletionItemKind.Constant;
        case typescript_1$m.default.ScriptElementKind.letElement:
        case typescript_1$m.default.ScriptElementKind.variableElement:
        case typescript_1$m.default.ScriptElementKind.localVariableElement:
        case typescript_1$m.default.ScriptElementKind.alias:
            return vscode_languageserver_1$q.CompletionItemKind.Variable;
        case typescript_1$m.default.ScriptElementKind.memberVariableElement:
        case typescript_1$m.default.ScriptElementKind.memberGetAccessorElement:
        case typescript_1$m.default.ScriptElementKind.memberSetAccessorElement:
            return vscode_languageserver_1$q.CompletionItemKind.Field;
        case typescript_1$m.default.ScriptElementKind.functionElement:
            return vscode_languageserver_1$q.CompletionItemKind.Function;
        case typescript_1$m.default.ScriptElementKind.memberFunctionElement:
        case typescript_1$m.default.ScriptElementKind.constructSignatureElement:
        case typescript_1$m.default.ScriptElementKind.callSignatureElement:
        case typescript_1$m.default.ScriptElementKind.indexSignatureElement:
            return vscode_languageserver_1$q.CompletionItemKind.Method;
        case typescript_1$m.default.ScriptElementKind.enumElement:
            return vscode_languageserver_1$q.CompletionItemKind.Enum;
        case typescript_1$m.default.ScriptElementKind.moduleElement:
        case typescript_1$m.default.ScriptElementKind.externalModuleName:
            return vscode_languageserver_1$q.CompletionItemKind.Module;
        case typescript_1$m.default.ScriptElementKind.classElement:
        case typescript_1$m.default.ScriptElementKind.typeElement:
            return vscode_languageserver_1$q.CompletionItemKind.Class;
        case typescript_1$m.default.ScriptElementKind.interfaceElement:
            return vscode_languageserver_1$q.CompletionItemKind.Interface;
        case typescript_1$m.default.ScriptElementKind.warning:
        case typescript_1$m.default.ScriptElementKind.scriptElement:
            return vscode_languageserver_1$q.CompletionItemKind.File;
        case typescript_1$m.default.ScriptElementKind.directory:
            return vscode_languageserver_1$q.CompletionItemKind.Folder;
        case typescript_1$m.default.ScriptElementKind.string:
            return vscode_languageserver_1$q.CompletionItemKind.Constant;
    }
    return vscode_languageserver_1$q.CompletionItemKind.Property;
}
function mapSeverity(category) {
    switch (category) {
        case typescript_1$m.default.DiagnosticCategory.Error:
            return vscode_languageserver_1$q.DiagnosticSeverity.Error;
        case typescript_1$m.default.DiagnosticCategory.Warning:
            return vscode_languageserver_1$q.DiagnosticSeverity.Warning;
        case typescript_1$m.default.DiagnosticCategory.Suggestion:
            return vscode_languageserver_1$q.DiagnosticSeverity.Hint;
        case typescript_1$m.default.DiagnosticCategory.Message:
            return vscode_languageserver_1$q.DiagnosticSeverity.Information;
    }
    return vscode_languageserver_1$q.DiagnosticSeverity.Error;
}
const commentsRegex = /^(\s*\/\/.*\s*)*/;
const tsCheckRegex = /\/\/[ \t\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*(@ts-(no)?check)($|\s)/;
function getTsCheckComment(str = '') {
    const comments = str.match(commentsRegex)?.[0];
    if (comments) {
        const tsCheck = comments.match(tsCheckRegex);
        if (tsCheck) {
            return `// ${tsCheck[tsCheck.length - 3]}${typescript_1$m.default.sys.newLine}`;
        }
    }
}
function convertToTextSpan(range, snapshot) {
    const start = snapshot.offsetAt(snapshot.getGeneratedPosition(range.start));
    const end = snapshot.offsetAt(snapshot.getGeneratedPosition(range.end));
    return {
        start,
        length: end - start
    };
}
function isInScript(position, snapshot) {
    return (0, documents_1$q.isInTag)(position, snapshot.scriptInfo) || (0, documents_1$q.isInTag)(position, snapshot.moduleScriptInfo);
}
function getDiagnosticTag(diagnostic) {
    const tags = [];
    if (diagnostic.reportsUnnecessary) {
        tags.push(vscode_languageserver_1$q.DiagnosticTag.Unnecessary);
    }
    if (diagnostic.reportsDeprecated) {
        tags.push(vscode_languageserver_1$q.DiagnosticTag.Deprecated);
    }
    return tags;
}
function changeSvelteComponentName(name) {
    return name.replace(/(\w+)__SvelteComponent_/, '$1');
}
const COMPONENT_SUFFIX = '__SvelteComponent_';
function isGeneratedSvelteComponentName(className) {
    return className.endsWith(COMPONENT_SUFFIX);
}
function offsetOfGeneratedComponentExport(snapshot) {
    return snapshot.getFullText().lastIndexOf(COMPONENT_SUFFIX);
}
function toGeneratedSvelteComponentName(className) {
    return className + COMPONENT_SUFFIX;
}
function hasTsExtensions(fileName) {
    return (fileName.endsWith(typescript_1$m.default.Extension.Dts) ||
        fileName.endsWith(typescript_1$m.default.Extension.Tsx) ||
        fileName.endsWith(typescript_1$m.default.Extension.Ts));
}
function isSvelte2tsxShimFile(fileName) {
    return fileName?.endsWith('svelte-shims.d.ts') || fileName?.endsWith('svelte-shims-v4.d.ts');
}
function cloneRange(range) {
    return vscode_languageserver_1$q.Range.create(vscode_languageserver_1$q.Position.create(range.start.line, range.start.character), vscode_languageserver_1$q.Position.create(range.end.line, range.end.character));
}

var utils$1 = {};

var ComponentInfoProvider = {};

var hasRequiredComponentInfoProvider;
function requireComponentInfoProvider () {
	if (hasRequiredComponentInfoProvider) return ComponentInfoProvider;
	hasRequiredComponentInfoProvider = 1;
	var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
	    return (mod && mod.__esModule) ? mod : { "default": mod };
	};
	Object.defineProperty(ComponentInfoProvider, "__esModule", { value: true });
	ComponentInfoProvider.JsOrTsComponentInfoProvider = void 0;
	const typescript_1 = __importDefault(ts);
	const utils_1 = utils$6;
	const utils_2 = requireUtils();
	class JsOrTsComponentInfoProvider {
	    constructor(typeChecker, classType, useSvelte5PlusPropsParameter = false) {
	        this.typeChecker = typeChecker;
	        this.classType = classType;
	        this.useSvelte5PlusPropsParameter = useSvelte5PlusPropsParameter;
	    }
	    getEvents() {
	        const eventType = this.getType(this.useSvelte5PlusPropsParameter ? '$$events' : '$$events_def');
	        if (!eventType) {
	            return [];
	        }
	        return this.mapPropertiesOfType(eventType);
	    }
	    getSlotLets(slot = 'default') {
	        const slotType = this.getType(this.useSvelte5PlusPropsParameter ? '$$slots' : '$$slot_def');
	        if (!slotType) {
	            return [];
	        }
	        const slotLets = slotType.getProperties().find((prop) => prop.name === slot);
	        if (!slotLets?.valueDeclaration) {
	            return [];
	        }
	        const slotLetsType = this.typeChecker.getTypeOfSymbolAtLocation(slotLets, slotLets.valueDeclaration);
	        return this.mapPropertiesOfType(slotLetsType);
	    }
	    getProps() {
	        if (!this.useSvelte5PlusPropsParameter) {
	            const props = this.getType('$$prop_def');
	            if (!props) {
	                return [];
	            }
	            return this.mapPropertiesOfType(props);
	        }
	        return this.mapPropertiesOfType(this.classType).filter((prop) => !prop.name.startsWith('$$'));
	    }
	    getType(classProperty) {
	        const symbol = this.classType.getProperty(classProperty);
	        if (!symbol?.valueDeclaration) {
	            return null;
	        }
	        return this.typeChecker.getTypeOfSymbolAtLocation(symbol, symbol.valueDeclaration);
	    }
	    mapPropertiesOfType(type) {
	        return type
	            .getProperties()
	            .map((prop) => {
	            const declaration = prop.valueDeclaration ??
	                prop.declarations?.[0] ??
	                prop?.links?.mappedType?.declaration;
	            if (!declaration) {
	                return;
	            }
	            return {
	                name: prop.name,
	                type: this.typeChecker.typeToString(this.typeChecker.getTypeOfSymbolAtLocation(prop, declaration)),
	                doc: typescript_1.default.displayPartsToString(prop.getDocumentationComment(this.typeChecker))
	            };
	        })
	            .filter(utils_1.isNotNullOrUndefined);
	    }
	    static create(lang, def, isSvelte5Plus) {
	        const program = lang.getProgram();
	        const sourceFile = program?.getSourceFile(def.fileName);
	        if (!program || !sourceFile) {
	            return null;
	        }
	        const defIdentifier = (0, utils_2.findContainingNode)(sourceFile, def.textSpan, typescript_1.default.isIdentifier);
	        if (!defIdentifier) {
	            return null;
	        }
	        const typeChecker = program.getTypeChecker();
	        const componentSymbol = typeChecker.getSymbolAtLocation(defIdentifier);
	        if (!componentSymbol) {
	            return null;
	        }
	        const type = typeChecker.getTypeOfSymbolAtLocation(componentSymbol, defIdentifier);
	        if (type.isClass()) {
	            return new JsOrTsComponentInfoProvider(typeChecker, type);
	        }
	        const constructorSignatures = type.getConstructSignatures();
	        if (constructorSignatures.length === 1) {
	            return new JsOrTsComponentInfoProvider(typeChecker, constructorSignatures[0].getReturnType());
	        }
	        if (!isSvelte5Plus) {
	            return null;
	        }
	        const signatures = type.getCallSignatures();
	        if (signatures.length !== 1) {
	            return null;
	        }
	        const propsParameter = signatures[0].parameters[1];
	        if (!propsParameter) {
	            return null;
	        }
	        const propsParameterType = typeChecker.getTypeOfSymbol(propsParameter);
	        return new JsOrTsComponentInfoProvider(typeChecker, propsParameterType,
	         true);
	    }
	}
	ComponentInfoProvider.JsOrTsComponentInfoProvider = JsOrTsComponentInfoProvider;
	return ComponentInfoProvider;
}

var hasRequiredUtils;
function requireUtils () {
	if (hasRequiredUtils) return utils$1;
	hasRequiredUtils = 1;
	(function (exports) {
		var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
		    return (mod && mod.__esModule) ? mod : { "default": mod };
		};
		Object.defineProperty(exports, "__esModule", { value: true });
		exports.gatherIdentifiers = exports.isInReactiveStatement = exports.isReactiveStatement = exports.SnapshotMap = exports.IGNORE_POSITION_COMMENT = exports.IGNORE_END_COMMENT = exports.IGNORE_START_COMMENT = void 0;
		exports.getComponentAtPosition = getComponentAtPosition;
		exports.isComponentAtPosition = isComponentAtPosition;
		exports.surroundWithIgnoreComments = surroundWithIgnoreComments;
		exports.isInGeneratedCode = isInGeneratedCode;
		exports.startsWithIgnoredPosition = startsWithIgnoredPosition;
		exports.isTextSpanInGeneratedCode = isTextSpanInGeneratedCode;
		exports.isPartOfImportStatement = isPartOfImportStatement;
		exports.isStoreVariableIn$storeDeclaration = isStoreVariableIn$storeDeclaration;
		exports.get$storeOffsetOf$storeDeclaration = get$storeOffsetOf$storeDeclaration;
		exports.is$storeVariableIn$storeDeclaration = is$storeVariableIn$storeDeclaration;
		exports.getStoreOffsetOf$storeDeclaration = getStoreOffsetOf$storeDeclaration;
		exports.isAfterSvelte2TsxPropsReturn = isAfterSvelte2TsxPropsReturn;
		exports.findContainingNode = findContainingNode;
		exports.findClosestContainingNode = findClosestContainingNode;
		exports.findNodeAtSpan = findNodeAtSpan;
		exports.findRenderFunction = findRenderFunction;
		exports.gatherDescendants = gatherDescendants;
		exports.isKitTypePath = isKitTypePath;
		exports.getFormatCodeBasis = getFormatCodeBasis;
		exports.getQuotePreference = getQuotePreference;
		exports.findChildOfKind = findChildOfKind;
		exports.getNewScriptStartTag = getNewScriptStartTag;
		exports.checkRangeMappingWithGeneratedSemi = checkRangeMappingWithGeneratedSemi;
		exports.getCustomElementsTags = getCustomElementsTags;
		exports.getCustomElementsDocument = getCustomElementsDocument;
		const typescript_1 = __importDefault(ts);
		const documents_1 = documents;
		const ComponentInfoProvider_1 = requireComponentInfoProvider();
		const utils_1 = utils$6;
		const fileCollection_1 = fileCollection;
		const svelte2tsx_1 = require$$0;
		function getComponentAtPosition(lang, doc, tsDoc, originalPosition) {
		    if (tsDoc.parserError) {
		        return null;
		    }
		    if ((0, documents_1.isInTag)(originalPosition, doc.scriptInfo) ||
		        (0, documents_1.isInTag)(originalPosition, doc.moduleScriptInfo)) {
		        return null;
		    }
		    const node = (0, documents_1.getNodeIfIsInComponentStartTag)(doc.html, doc, doc.offsetAt(originalPosition));
		    if (!node) {
		        return null;
		    }
		    const symbolPosWithinNode = node.tag?.includes('.') ? node.tag.lastIndexOf('.') + 1 : 0;
		    const generatedPosition = tsDoc.getGeneratedPosition(doc.positionAt(node.start + symbolPosWithinNode + 1));
		    const def = lang.getDefinitionAtPosition(tsDoc.filePath, tsDoc.offsetAt(generatedPosition))?.[0];
		    if (!def) {
		        return null;
		    }
		    return ComponentInfoProvider_1.JsOrTsComponentInfoProvider.create(lang, def, tsDoc.isSvelte5Plus);
		}
		function isComponentAtPosition(doc, tsDoc, originalPosition) {
		    if (tsDoc.parserError) {
		        return false;
		    }
		    if ((0, documents_1.isInTag)(originalPosition, doc.scriptInfo) ||
		        (0, documents_1.isInTag)(originalPosition, doc.moduleScriptInfo)) {
		        return false;
		    }
		    return !!(0, documents_1.getNodeIfIsInComponentStartTag)(doc.html, doc, doc.offsetAt(originalPosition));
		}
		exports.IGNORE_START_COMMENT = '/*Ωignore_startΩ*/';
		exports.IGNORE_END_COMMENT = '/*Ωignore_endΩ*/';
		exports.IGNORE_POSITION_COMMENT = '/*Ωignore_positionΩ*/';
		function surroundWithIgnoreComments(str) {
		    return exports.IGNORE_START_COMMENT + str + exports.IGNORE_END_COMMENT;
		}
		function isInGeneratedCode(text, start, end = start) {
		    const lastStart = text.lastIndexOf(exports.IGNORE_START_COMMENT, start);
		    const lastEnd = text.lastIndexOf(exports.IGNORE_END_COMMENT, start);
		    const nextEnd = text.indexOf(exports.IGNORE_END_COMMENT, end);
		    return (lastStart > lastEnd || lastEnd === nextEnd) && lastStart < nextEnd;
		}
		function startsWithIgnoredPosition(text, offset) {
		    return text.slice(offset).startsWith(exports.IGNORE_POSITION_COMMENT);
		}
		function isTextSpanInGeneratedCode(text, span) {
		    return isInGeneratedCode(text, span.start, span.start + span.length);
		}
		function isPartOfImportStatement(text, position) {
		    const line = (0, documents_1.getLineAtPosition)(position, text);
		    return /\s*from\s+["'][^"']*/.test(line.slice(0, position.character));
		}
		function isStoreVariableIn$storeDeclaration(text, varStart) {
		    return (text.lastIndexOf('__sveltets_2_store_get(', varStart) ===
		        varStart - '__sveltets_2_store_get('.length);
		}
		function get$storeOffsetOf$storeDeclaration(text, storePosition) {
		    return text.lastIndexOf(' =', storePosition) - 1;
		}
		function is$storeVariableIn$storeDeclaration(text, varStart) {
		    return /^\$\w+ = __sveltets_2_store_get/.test(text.substring(varStart));
		}
		function getStoreOffsetOf$storeDeclaration(text, $storeVarStart) {
		    return text.indexOf(');', $storeVarStart) - 1;
		}
		class SnapshotMap {
		    constructor(resolver, sourceLs) {
		        this.resolver = resolver;
		        this.sourceLs = sourceLs;
		        this.map = new fileCollection_1.FileMap();
		    }
		    set(fileName, snapshot) {
		        this.map.set(fileName, snapshot);
		    }
		    get(fileName) {
		        return this.map.get(fileName);
		    }
		    async retrieve(fileName) {
		        let snapshot = this.get(fileName);
		        if (snapshot) {
		            return snapshot;
		        }
		        const snap = this.sourceLs.snapshotManager.get(fileName) ??
		            (await this.resolver.getOrCreateSnapshot(fileName));
		        this.set(fileName, snap);
		        return snap;
		    }
		}
		exports.SnapshotMap = SnapshotMap;
		function isAfterSvelte2TsxPropsReturn(text, end) {
		    const textBeforeProp = text.substring(0, end);
		    if (textBeforeProp.includes('\nreturn { props: {')) {
		        return true;
		    }
		}
		function findContainingNode(node, textSpan, predicate) {
		    const end = textSpan.start + textSpan.length;
		    return node.forEachChild((child) => {
		        if (child.getStart() <= textSpan.start && child.getEnd() >= end) {
		            if (predicate(child)) {
		                return child;
		            }
		            const foundInChildren = findContainingNode(child, textSpan, predicate);
		            if (foundInChildren) {
		                return foundInChildren;
		            }
		        }
		    });
		}
		function findClosestContainingNode(node, textSpan, predicate) {
		    let current = findContainingNode(node, textSpan, predicate);
		    if (!current) {
		        return;
		    }
		    let closest = current;
		    while (current) {
		        const foundInChildren = findContainingNode(current, textSpan, predicate);
		        closest = current;
		        current = foundInChildren;
		    }
		    return closest;
		}
		function findNodeAtSpan(node, span, predicate) {
		    const { start, length } = span;
		    const end = start + length;
		    return node.forEachChild((child) => {
		        const childStart = child.getStart();
		        if (end <= childStart) {
		            return;
		        }
		        const childEnd = child.getEnd();
		        if (start >= childEnd) {
		            return;
		        }
		        if (start === childStart && end === childEnd) {
		            if (!predicate) {
		                return child;
		            }
		            if (predicate(child)) {
		                return child;
		            }
		        }
		        const foundInChildren = findNodeAtSpan(child, span, predicate);
		        if (foundInChildren) {
		            return foundInChildren;
		        }
		    });
		}
		function isSomeAncestor(node, predicate) {
		    for (let parent = node.parent; parent; parent = parent.parent) {
		        if (predicate(parent)) {
		            return true;
		        }
		    }
		    return false;
		}
		function nodeAndParentsSatisfyRespectivePredicates(selfPredicate, ...predicates) {
		    return (node) => {
		        let next = node;
		        return [selfPredicate, ...predicates].every((predicate) => {
		            if (!next) {
		                return false;
		            }
		            const current = next;
		            next = next.parent;
		            return predicate(current);
		        });
		    };
		}
		const isRenderFunction = nodeAndParentsSatisfyRespectivePredicates((node) => typescript_1.default.isFunctionDeclaration(node) && node?.name?.getText() === svelte2tsx_1.internalHelpers.renderName, typescript_1.default.isSourceFile);
		const isRenderFunctionBody = nodeAndParentsSatisfyRespectivePredicates(typescript_1.default.isBlock, isRenderFunction);
		exports.isReactiveStatement = nodeAndParentsSatisfyRespectivePredicates((node) => typescript_1.default.isLabeledStatement(node) && node.label.getText() === '$', (0, utils_1.or)(
		isRenderFunctionBody,
		nodeAndParentsSatisfyRespectivePredicates(typescript_1.default.isBlock, typescript_1.default.isArrowFunction, typescript_1.default.isExpressionStatement, isRenderFunctionBody)));
		function findRenderFunction(sourceFile) {
		    for (const child of sourceFile.statements) {
		        if (isRenderFunction(child)) {
		            return child;
		        }
		    }
		}
		const isInReactiveStatement = (node) => isSomeAncestor(node, exports.isReactiveStatement);
		exports.isInReactiveStatement = isInReactiveStatement;
		function gatherDescendants(node, predicate, dest = []) {
		    if (predicate(node)) {
		        dest.push(node);
		    }
		    else {
		        node.forEachChild((child) => {
		            gatherDescendants(child, predicate, dest);
		        });
		    }
		    return dest;
		}
		const gatherIdentifiers = (node) => gatherDescendants(node, typescript_1.default.isIdentifier);
		exports.gatherIdentifiers = gatherIdentifiers;
		function isKitTypePath(path) {
		    if (!path)
		        return false;
		    return path.endsWith('/$types.js') || path.endsWith('/$types') || path.endsWith('/$types.d.ts');
		}
		function getFormatCodeBasis(formatCodeSetting) {
		    const { baseIndentSize, indentSize, convertTabsToSpaces } = formatCodeSetting;
		    const baseIndent = convertTabsToSpaces
		        ? ' '.repeat(baseIndentSize ?? 4)
		        : baseIndentSize
		            ? '\t'
		            : '';
		    const indent = convertTabsToSpaces ? ' '.repeat(indentSize ?? 4) : baseIndentSize ? '\t' : '';
		    const semi = formatCodeSetting.semicolons === 'remove' ? '' : ';';
		    const newLine = formatCodeSetting.newLineCharacter ?? typescript_1.default.sys.newLine;
		    return {
		        baseIndent,
		        indent,
		        semi,
		        newLine
		    };
		}
		function getQuotePreference(sourceFile, preferences) {
		    const single = "'";
		    const double = '"';
		    if (preferences.quotePreference && preferences.quotePreference !== 'auto') {
		        return preferences.quotePreference === 'single' ? single : double;
		    }
		    const firstModuleSpecifier = Array.from(sourceFile.statements).find((statement) => typescript_1.default.isImportDeclaration(statement) && typescript_1.default.isStringLiteral(statement.moduleSpecifier))?.moduleSpecifier;
		    return firstModuleSpecifier
		        ? sourceFile.getText()[firstModuleSpecifier.pos] === '"'
		            ? double
		            : single
		        : double;
		}
		function findChildOfKind(node, kind) {
		    for (const child of node.getChildren()) {
		        if (child.kind === kind) {
		            return child;
		        }
		        const foundInChildren = findChildOfKind(child, kind);
		        if (foundInChildren) {
		            return foundInChildren;
		        }
		    }
		}
		function getNewScriptStartTag(lsConfig, newLine) {
		    const lang = lsConfig.svelte.defaultScriptLanguage;
		    const scriptLang = lang === 'none' ? '' : ` lang="${lang}"`;
		    return `<script${scriptLang}>${newLine}`;
		}
		function checkRangeMappingWithGeneratedSemi(originalRange, generatedRange, tsDoc) {
		    const originalLength = originalRange.end.character - originalRange.start.character;
		    const generatedLength = generatedRange.end.character - generatedRange.start.character;
		    if (originalLength === generatedLength - 2 &&
		        tsDoc.getFullText()[tsDoc.offsetAt(generatedRange.end) - 1] === ';') {
		        originalRange.end.character += 1;
		    }
		}
		function getCustomElementsTags(lang, lsContainer, tsDoc) {
		    const info = getCustomElementDocumentationSymbols(lang, lsContainer, tsDoc);
		    if (!info) {
		        return [];
		    }
		    const symbols = info.type.getProperties().filter((s) => typescript_1.default.symbolName(s).includes('-'));
		    return symbols.map((s) => s.name);
		}
		function getCustomElementsDocument(lang, lsContainer, tsDoc, tagName) {
		    const info = getCustomElementDocumentationSymbols(lang, lsContainer, tsDoc);
		    if (!info) {
		        return null;
		    }
		    const tag = info.type.getProperty(tagName);
		    return tag && tag.name.includes('-')
		        ? typescript_1.default.displayPartsToString(tag.getDocumentationComment(info.typeChecker))
		        : null;
		}
		function getCustomElementDocumentationSymbols(lang, lsContainer, tsDoc) {
		    const program = lang.getProgram();
		    const sourceFile = program?.getSourceFile(tsDoc.filePath);
		    const typeChecker = program?.getTypeChecker();
		    if (!typeChecker || !sourceFile) {
		        return null;
		    }
		    const typingsNamespace = lsContainer.getTsConfigSvelteOptions().namespace;
		    const typingsNamespaceSymbol = findTypingsNamespaceSymbol(typingsNamespace, typeChecker, sourceFile);
		    if (!typingsNamespaceSymbol) {
		        return null;
		    }
		    const elements = typeChecker
		        .getExportsOfModule(typingsNamespaceSymbol)
		        .find((symbol) => symbol.name === 'IntrinsicElements');
		    if (!elements || !(elements.flags & typescript_1.default.SymbolFlags.Interface)) {
		        return null;
		    }
		    const type = typeChecker.getDeclaredTypeOfSymbol(elements);
		    return { type, typeChecker };
		}
		function findTypingsNamespaceSymbol(namespaceExpression, typeChecker, sourceFile) {
		    if (!namespaceExpression || typeof namespaceExpression !== 'string') {
		        return;
		    }
		    const [first, ...rest] = namespaceExpression.split('.');
		    let symbol = typeChecker
		        .getSymbolsInScope(sourceFile, typescript_1.default.SymbolFlags.Namespace)
		        .find((symbol) => symbol.name === first);
		    for (const part of rest) {
		        if (!symbol) {
		            return;
		        }
		        symbol = typeChecker.getExportsOfModule(symbol).find((symbol) => symbol.name === part);
		    }
		    return symbol;
		}
	} (utils$1));
	return utils$1;
}

(function (exports) {
	var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
	    return (mod && mod.__esModule) ? mod : { "default": mod };
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.DtsDocumentSnapshot = exports.JSOrTSDocumentSnapshot = exports.SvelteDocumentSnapshot = exports.DocumentSnapshot = exports.INITIAL_VERSION = void 0;
	exports.computeChangeRange = computeChangeRange;
	const trace_mapping_1 = require$$0$5;
	const svelte2tsx_1 = require$$0;
	const typescript_1 = __importDefault(ts);
	const documents_1 = documents;
	const utils_1 = utils$6;
	const DocumentMapper_1 = DocumentMapper;
	const svelte_ast_utils_1 = svelteAstUtils;
	const utils_2 = utils$2;
	const logger_1 = logger;
	const path_1 = path$1;
	const vscode_uri_1 = umdExports;
	const utils_3 = requireUtils();
	const configLoader_1 = configLoader;
	function computeChangeRange(oldText, newText) {
	    const minLen = Math.min(oldText.length, newText.length);
	    let prefixLen = 0;
	    while (prefixLen < minLen && oldText.charCodeAt(prefixLen) === newText.charCodeAt(prefixLen)) {
	        prefixLen++;
	    }
	    let oldSuffixStart = oldText.length;
	    let newSuffixStart = newText.length;
	    while (oldSuffixStart > prefixLen &&
	        newSuffixStart > prefixLen &&
	        oldText.charCodeAt(oldSuffixStart - 1) === newText.charCodeAt(newSuffixStart - 1)) {
	        oldSuffixStart--;
	        newSuffixStart--;
	    }
	    return {
	        span: { start: prefixLen, length: oldSuffixStart - prefixLen },
	        newLength: newSuffixStart - prefixLen
	    };
	}
	exports.INITIAL_VERSION = 0;
	const ambientPathPattern = /node_modules[\/\\]svelte[\/\\]types[\/\\]ambient\.d\.ts$/;
	const svelteTypesPattern = /node_modules[\/\\]svelte[\/\\]types[\/\\]index\.d\.ts$/;
	const shimsPattern = /svelte2tsx[\/\\]svelte-shims\.d\.ts$|svelte-check[\/\\]dist[\/\\]src[\/\\]svelte-shims\.d\.ts$/;
	var DocumentSnapshot;
	(function (DocumentSnapshot) {
	    function fromDocument(document, options) {
	        const { tsxMap, htmlAst, text, exportedNames, parserError, nrPrependedLines, scriptKind } = preprocessSvelteFile(document, options);
	        return new SvelteDocumentSnapshot(document, parserError, scriptKind, options.version, text, nrPrependedLines, exportedNames, tsxMap, htmlAst);
	    }
	    DocumentSnapshot.fromDocument = fromDocument;
	    function fromFilePath(filePath, createDocument, options, tsSystem) {
	        if ((0, utils_2.isSvelteFilePath)(filePath)) {
	            return DocumentSnapshot.fromSvelteFilePath(filePath, createDocument, options, tsSystem);
	        }
	        else {
	            return DocumentSnapshot.fromNonSvelteFilePath(filePath, tsSystem);
	        }
	    }
	    DocumentSnapshot.fromFilePath = fromFilePath;
	    function fromNonSvelteFilePath(filePath, tsSystem) {
	        let originalText = '';
	        if (!ambientPathPattern.test(filePath)) {
	            originalText = tsSystem.readFile(filePath) || '';
	        }
	        if (svelteTypesPattern.test(filePath)) {
	            const startIdx = originalText.indexOf(`declare module '*.svelte' {`);
	            const endIdx = originalText.indexOf(`\n}`, startIdx + 1) + 2;
	            originalText =
	                originalText.substring(0, startIdx) +
	                    ' '.repeat(endIdx - startIdx) +
	                    originalText.substring(endIdx);
	        }
	        else if (shimsPattern.test(filePath)) {
	            if (originalText.includes('// -- start svelte-ls-remove --')) {
	                originalText =
	                    originalText.substring(0, originalText.indexOf('// -- start svelte-ls-remove --')) +
	                        originalText.substring(originalText.indexOf('// -- end svelte-ls-remove --'));
	            }
	        }
	        const declarationExtensions = [typescript_1.default.Extension.Dcts, typescript_1.default.Extension.Dts, typescript_1.default.Extension.Dmts];
	        if (declarationExtensions.some((ext) => filePath.endsWith(ext))) {
	            return new DtsDocumentSnapshot(exports.INITIAL_VERSION, filePath, originalText, tsSystem);
	        }
	        return new JSOrTSDocumentSnapshot(exports.INITIAL_VERSION, filePath, originalText);
	    }
	    DocumentSnapshot.fromNonSvelteFilePath = fromNonSvelteFilePath;
	    function fromSvelteFilePath(filePath, createDocument, options, tsSystem) {
	        const originalText = tsSystem.readFile(filePath) ?? '';
	        return fromDocument(createDocument(filePath, originalText), options);
	    }
	    DocumentSnapshot.fromSvelteFilePath = fromSvelteFilePath;
	})(DocumentSnapshot || (exports.DocumentSnapshot = DocumentSnapshot = {}));
	function preprocessSvelteFile(document, options) {
	    let tsxMap;
	    let parserError = null;
	    let nrPrependedLines = 0;
	    let text = document.getText();
	    let exportedNames = { has: () => false };
	    let htmlAst;
	    const scriptKind = [
	        (0, utils_2.getScriptKindFromAttributes)(document.scriptInfo?.attributes ?? {}),
	        (0, utils_2.getScriptKindFromAttributes)(document.moduleScriptInfo?.attributes ?? {})
	    ].includes(typescript_1.default.ScriptKind.TSX)
	        ? typescript_1.default.ScriptKind.TS
	        : typescript_1.default.ScriptKind.JS;
	    try {
	        const tsx = (0, svelte2tsx_1.svelte2tsx)(text, {
	            parse: options.parse,
	            version: options.version,
	            filename: document.getFilePath() ?? undefined,
	            isTsFile: scriptKind === typescript_1.default.ScriptKind.TS,
	            mode: 'ts',
	            typingsNamespace: options.typingsNamespace,
	            emitOnTemplateError: options.transformOnTemplateError,
	            namespace: document.config?.compilerOptions?.namespace,
	            accessors: document.config?.compilerOptions?.accessors ??
	                (typeof document.config?.compilerOptions?.customElement === 'function'
	                    ? // @ts-ignore with Svelte 4 this is never callable
	                        document.config.compilerOptions.customElement({
	                            filename: document.getFilePath() ?? ''
	                        })
	                    : document.config?.compilerOptions?.customElement),
	            emitJsDoc: options.emitJsDoc,
	            rewriteExternalImports: options.rewriteExternalImports
	        });
	        text = tsx.code;
	        tsxMap = tsx.map;
	        exportedNames = tsx.exportedNames;
	        htmlAst = tsx.htmlAst;
	        if (tsxMap) {
	            tsxMap.sources = [document.uri];
	            const scriptInfo = document.scriptInfo || document.moduleScriptInfo;
	            const tsCheck = (0, utils_2.getTsCheckComment)(scriptInfo?.content);
	            if (tsCheck) {
	                text = tsCheck + text;
	                nrPrependedLines = 1;
	            }
	        }
	    }
	    catch (e) {
	        const start = {
	            line: (e.start?.line ?? 1) - 1,
	            character: e.start?.column ?? 0
	        };
	        const end = e.end ? { line: e.end.line - 1, character: e.end.column } : start;
	        parserError = {
	            range: { start, end },
	            message: e.message,
	            code: -1
	        };
	        const scriptInfo = document.scriptInfo || document.moduleScriptInfo;
	        text = scriptInfo ? scriptInfo.content : '';
	    }
	    return {
	        tsxMap,
	        text,
	        exportedNames,
	        htmlAst,
	        parserError,
	        nrPrependedLines,
	        scriptKind
	    };
	}
	class SvelteDocumentSnapshot {
	    constructor(parent, parserError, scriptKind, svelteVersion, text, nrPrependedLines, exportedNames, tsxMap, htmlAst) {
	        this.parent = parent;
	        this.parserError = parserError;
	        this.scriptKind = scriptKind;
	        this.svelteVersion = svelteVersion;
	        this.text = text;
	        this.nrPrependedLines = nrPrependedLines;
	        this.exportedNames = exportedNames;
	        this.tsxMap = tsxMap;
	        this.htmlAst = htmlAst;
	        this.url = (0, utils_1.pathToUrl)(this.filePath);
	        this.version = this.parent.version;
	        this.isSvelte5Plus = Number(this.svelteVersion?.split('.')[0]) >= 5;
	    }
	    get filePath() {
	        return this.parent.getFilePath() || '';
	    }
	    get scriptInfo() {
	        return this.parent.scriptInfo;
	    }
	    get moduleScriptInfo() {
	        return this.parent.moduleScriptInfo;
	    }
	    getOriginalText(range) {
	        return this.parent.getText(range);
	    }
	    getText(start, end) {
	        return this.text.substring(start, end);
	    }
	    getLength() {
	        return this.text.length;
	    }
	    getFullText() {
	        return this.text;
	    }
	    getChangeRange(oldSnapshot) {
	        if (oldSnapshot instanceof SvelteDocumentSnapshot) {
	            if (oldSnapshot.scriptKind !== this.scriptKind ||
	                !!oldSnapshot.parserError !== !!this.parserError) {
	                return undefined;
	            }
	        }
	        return computeChangeRange(oldSnapshot.getText(0, oldSnapshot.getLength()), this.text);
	    }
	    positionAt(offset) {
	        return (0, documents_1.positionAt)(offset, this.text, this.getLineOffsets());
	    }
	    offsetAt(position) {
	        return (0, documents_1.offsetAt)(position, this.text, this.getLineOffsets());
	    }
	    getLineContainingOffset(offset) {
	        const chunks = this.getText(0, offset).split('\n');
	        return chunks[chunks.length - 1];
	    }
	    hasProp(name) {
	        return this.exportedNames.has(name);
	    }
	    svelteNodeAt(positionOrOffset) {
	        if (!this.htmlAst) {
	            return null;
	        }
	        const offset = typeof positionOrOffset === 'number'
	            ? positionOrOffset
	            : this.parent.offsetAt(positionOrOffset);
	        let foundNode = null;
	        this.walkSvelteAst({
	            enter(node) {
	                if (node.start > offset || node.end < offset) {
	                    this.skip();
	                    return;
	                }
	                const parent = foundNode;
	                foundNode = Object.create(node);
	                if (parent) {
	                    foundNode.parent = parent;
	                }
	            }
	        });
	        return foundNode;
	    }
	    walkSvelteAst(walker) {
	        if (!this.htmlAst) {
	            return;
	        }
	        (0, svelte_ast_utils_1.walkSvelteAst)(this.htmlAst, walker);
	    }
	    getOriginalPosition(pos) {
	        return this.getMapper().getOriginalPosition(pos);
	    }
	    getGeneratedPosition(pos) {
	        return this.getMapper().getGeneratedPosition(pos);
	    }
	    isInGenerated(pos) {
	        return !(0, documents_1.isInTag)(pos, this.parent.styleInfo);
	    }
	    getURL() {
	        return this.url;
	    }
	    isOpenedInClient() {
	        return this.parent.openedByClient;
	    }
	    getLineOffsets() {
	        if (!this.lineOffsets) {
	            this.lineOffsets = (0, documents_1.getLineOffsets)(this.text);
	        }
	        return this.lineOffsets;
	    }
	    getMapper() {
	        if (!this.mapper) {
	            this.mapper = this.initMapper();
	        }
	        return this.mapper;
	    }
	    initMapper() {
	        const scriptInfo = this.parent.scriptInfo || this.parent.moduleScriptInfo;
	        if (!this.tsxMap) {
	            if (!scriptInfo) {
	                return new documents_1.IdentityMapper(this.url);
	            }
	            return new documents_1.FragmentMapper(this.parent.getText(), scriptInfo, this.url);
	        }
	        return new DocumentMapper_1.ConsumerDocumentMapper(new trace_mapping_1.TraceMap(this.tsxMap), this.url, this.nrPrependedLines);
	    }
	}
	exports.SvelteDocumentSnapshot = SvelteDocumentSnapshot;
	class JSOrTSDocumentSnapshot extends documents_1.IdentityMapper {
	    isOpenedInClient() {
	        return this.openedByClient;
	    }
	    constructor(version, filePath, text, openedByClient = false) {
	        super((0, utils_1.pathToUrl)(filePath));
	        this.version = version;
	        this.filePath = filePath;
	        this.text = text;
	        this.openedByClient = openedByClient;
	        this.scriptKind = (0, utils_2.getScriptKindFromFileName)(this.filePath);
	        this.scriptInfo = null;
	        this.originalText = this.text;
	        this.kitFile = false;
	        this.addedCode = [];
	        this.paramsPath = 'src/params';
	        this.serverHooksPath = 'src/hooks.server';
	        this.clientHooksPath = 'src/hooks.client';
	        this.universalHooksPath = 'src/hooks';
	        this.adjustText();
	    }
	    getText(start, end) {
	        return this.text.substring(start, end);
	    }
	    getLength() {
	        return this.text.length;
	    }
	    getFullText() {
	        return this.text;
	    }
	    getChangeRange(oldSnapshot) {
	        return computeChangeRange(oldSnapshot.getText(0, oldSnapshot.getLength()), this.text);
	    }
	    positionAt(offset) {
	        return (0, documents_1.positionAt)(offset, this.text, this.getLineOffsets());
	    }
	    offsetAt(position) {
	        return (0, documents_1.offsetAt)(position, this.text, this.getLineOffsets());
	    }
	    getGeneratedPosition(originalPosition) {
	        if (!this.kitFile || this.addedCode.length === 0) {
	            return super.getGeneratedPosition(originalPosition);
	        }
	        const pos = this.originalOffsetAt(originalPosition);
	        let total = 0;
	        for (const added of this.addedCode) {
	            if (pos < added.generatedPos)
	                break;
	            total += added.length;
	        }
	        return this.positionAt(pos + total);
	    }
	    getOriginalPosition(generatedPosition) {
	        if (!this.kitFile || this.addedCode.length === 0) {
	            return super.getOriginalPosition(generatedPosition);
	        }
	        const pos = this.offsetAt(generatedPosition);
	        let total = 0;
	        let idx = 0;
	        for (; idx < this.addedCode.length; idx++) {
	            const added = this.addedCode[idx];
	            if (pos < added.generatedPos)
	                break;
	            total += added.length;
	        }
	        if (idx > 0) {
	            const prev = this.addedCode[idx - 1];
	            if (pos > prev.generatedPos && pos < prev.generatedPos + prev.length) {
	                return this.originalPositionAt(prev.originalPos);
	            }
	        }
	        return this.originalPositionAt(pos - total);
	    }
	    update(changes) {
	        let updatedOriginalText = this.originalText;
	        for (const change of changes) {
	            let start = 0;
	            let end = 0;
	            if ('range' in change) {
	                start = this.originalOffsetAt(change.range.start);
	                end = this.originalOffsetAt(change.range.end);
	            }
	            else {
	                end = updatedOriginalText.length;
	            }
	            updatedOriginalText =
	                updatedOriginalText.slice(0, start) + change.text + updatedOriginalText.slice(end);
	        }
	        return new JSOrTSDocumentSnapshot(this.version + 1, this.filePath, updatedOriginalText, true
	        );
	    }
	    getLineOffsets() {
	        if (!this.lineOffsets) {
	            this.lineOffsets = (0, documents_1.getLineOffsets)(this.text);
	        }
	        return this.lineOffsets;
	    }
	    originalOffsetAt(position) {
	        return (0, documents_1.offsetAt)(position, this.originalText, this.getOriginalLineOffsets());
	    }
	    originalPositionAt(offset) {
	        return (0, documents_1.positionAt)(offset, this.originalText, this.getOriginalLineOffsets());
	    }
	    getOriginalLineOffsets() {
	        if (!this.kitFile) {
	            return this.getLineOffsets();
	        }
	        if (!this.internalLineOffsets) {
	            this.internalLineOffsets = (0, documents_1.getLineOffsets)(this.originalText);
	        }
	        return this.internalLineOffsets;
	    }
	    adjustText() {
	        const result = svelte2tsx_1.internalHelpers.upsertKitFile(typescript_1.default, this.filePath, {
	            clientHooksPath: this.clientHooksPath,
	            paramsPath: this.paramsPath,
	            serverHooksPath: this.serverHooksPath,
	            universalHooksPath: this.universalHooksPath
	        }, () => this.createSource(), utils_3.surroundWithIgnoreComments);
	        if (!result) {
	            this.kitFile = false;
	            this.addedCode = [];
	            this.text = this.originalText;
	            return;
	        }
	        if (!this.kitFile) {
	            const files = configLoader_1.configLoader.getConfig(this.filePath)?.kit?.files;
	            if (files) {
	                this.paramsPath ||= files.params;
	                this.serverHooksPath ||= files.hooks?.server;
	                this.clientHooksPath ||= files.hooks?.client;
	                this.universalHooksPath ||= files.hooks?.universal;
	            }
	        }
	        const { text, addedCode } = result;
	        this.kitFile = true;
	        this.addedCode = addedCode;
	        this.text = text;
	    }
	    createSource() {
	        return typescript_1.default.createSourceFile(this.filePath, this.originalText, typescript_1.default.ScriptTarget.Latest, true, this.scriptKind);
	    }
	}
	exports.JSOrTSDocumentSnapshot = JSOrTSDocumentSnapshot;
	const sourceMapCommentRegExp = /^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/;
	const whitespaceOrMapCommentRegExp = /^\s*(\/\/[@#] .*)?$/;
	const base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+\/=]+)$)?/;
	class DtsDocumentSnapshot extends JSOrTSDocumentSnapshot {
	    constructor(version, filePath, text, tsSys) {
	        super(version, filePath, text);
	        this.tsSys = tsSys;
	        this.mapperInitialized = false;
	    }
	    getOriginalFilePosition(generatedPosition) {
	        if (!this.mapperInitialized) {
	            this.traceMap = this.initMapper();
	            this.mapperInitialized = true;
	        }
	        const mapped = this.traceMap
	            ? (0, trace_mapping_1.originalPositionFor)(this.traceMap, {
	                line: generatedPosition.line + 1,
	                column: generatedPosition.character
	            })
	            : undefined;
	        if (!mapped || mapped.line == null || !mapped.source) {
	            return generatedPosition;
	        }
	        const originalFilePath = vscode_uri_1.URI.isUri(mapped.source)
	            ? (0, utils_1.urlToPath)(mapped.source)
	            : this.filePath
	                ? (0, path_1.resolve)((0, path_1.dirname)(this.filePath), mapped.source).toString()
	                : undefined;
	        if (!originalFilePath || !this.tsSys.fileExists(originalFilePath)) {
	            return generatedPosition;
	        }
	        return {
	            line: mapped.line - 1,
	            character: mapped.column,
	            uri: (0, utils_1.pathToUrl)(originalFilePath)
	        };
	    }
	    initMapper() {
	        const sourceMapUrl = tryGetSourceMappingURL(this.getLineOffsets(), this.getFullText());
	        if (!sourceMapUrl) {
	            return;
	        }
	        const match = sourceMapUrl.match(base64UrlRegExp);
	        if (match) {
	            const base64Json = match[1];
	            if (!base64Json || !this.tsSys.base64decode) {
	                return;
	            }
	            return this.initMapperByRawSourceMap(this.tsSys.base64decode(base64Json));
	        }
	        const tryingLocations = new Set([
	            (0, path_1.resolve)((0, path_1.dirname)(this.filePath), sourceMapUrl),
	            this.filePath + '.map'
	        ]);
	        for (const mapFilePath of tryingLocations) {
	            if (!this.tsSys.fileExists(mapFilePath)) {
	                continue;
	            }
	            const mapFileContent = this.tsSys.readFile(mapFilePath);
	            if (mapFileContent) {
	                return this.initMapperByRawSourceMap(mapFileContent);
	            }
	        }
	        this.logFailedToResolveSourceMap("can't find valid sourcemap file");
	    }
	    initMapperByRawSourceMap(input) {
	        const map = tryParseRawSourceMap(input);
	        if (!map ||
	            !map.mappings ||
	            map.sourcesContent?.some((content) => typeof content === 'string')) {
	            this.logFailedToResolveSourceMap('invalid or unsupported sourcemap');
	            return;
	        }
	        return new trace_mapping_1.TraceMap(map);
	    }
	    logFailedToResolveSourceMap(...errors) {
	        logger_1.Logger.debug(`Resolving declaration map for ${this.filePath} failed. `, ...errors);
	    }
	}
	exports.DtsDocumentSnapshot = DtsDocumentSnapshot;
	function tryGetSourceMappingURL(lineOffsets, text) {
	    for (let index = lineOffsets.length - 1; index >= 0; index--) {
	        const line = text.slice(lineOffsets[index], lineOffsets[index + 1]);
	        const comment = sourceMapCommentRegExp.exec(line);
	        if (comment) {
	            return comment[1].trimEnd();
	        }
	        else if (!line.match(whitespaceOrMapCommentRegExp)) {
	            break;
	        }
	    }
	}
	function isRawSourceMap(x) {
	    return (x !== null &&
	        typeof x === 'object' &&
	        x.version === 3 &&
	        typeof x.file === 'string' &&
	        typeof x.mappings === 'string' &&
	        Array.isArray(x.sources) &&
	        x.sources.every((source) => typeof source === 'string') &&
	        (x.sourceRoot === undefined || x.sourceRoot === null || typeof x.sourceRoot === 'string') &&
	        (x.sourcesContent === undefined ||
	            x.sourcesContent === null ||
	            (Array.isArray(x.sourcesContent) &&
	                x.sourcesContent.every((content) => typeof content === 'string' || content === null))) &&
	        (x.names === undefined ||
	            x.names === null ||
	            (Array.isArray(x.names) && x.names.every((name) => typeof name === 'string'))));
	}
	function tryParseRawSourceMap(text) {
	    try {
	        const parsed = JSON.parse(text);
	        if (isRawSourceMap(parsed)) {
	            return parsed;
	        }
	    }
	    catch {
	    }
	    return undefined;
	}
} (DocumentSnapshot));
getDefaultExportFromCjs(DocumentSnapshot);

var __importDefault$n = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(SnapshotManager$1, "__esModule", { value: true });
SnapshotManager$1.ignoredBuildDirectories = SnapshotManager$1.SnapshotManager = SnapshotManager$1.GlobalSnapshotsManager = void 0;
const typescript_1$l = __importDefault$n(ts);
const DocumentSnapshot_1$6 = DocumentSnapshot;
const logger_1$7 = logger;
const utils_1$C = utils$6;
const events_1 = require$$0$4;
const fileCollection_1$4 = fileCollection;
class GlobalSnapshotsManager {
    constructor(tsSystem) {
        this.tsSystem = tsSystem;
        this.emitter = new events_1.EventEmitter();
        this.documents = new fileCollection_1$4.FileMap(tsSystem.useCaseSensitiveFileNames);
        this.getCanonicalFileName = (0, utils_1$C.createGetCanonicalFileName)(tsSystem.useCaseSensitiveFileNames);
    }
    get(fileName) {
        fileName = (0, utils_1$C.normalizePath)(fileName);
        return this.documents.get(fileName);
    }
    getByPrefix(path) {
        path = this.getCanonicalFileName((0, utils_1$C.normalizePath)(path));
        const results = [];
        for (const [key, value] of this.documents.entries()) {
            if (key.startsWith(path)) {
                results.push(value);
            }
        }
        return results;
    }
    set(fileName, document) {
        fileName = (0, utils_1$C.normalizePath)(fileName);
        this.documents.set(fileName, document);
        this.emitter.emit('change', fileName, document);
    }
    delete(fileName) {
        fileName = (0, utils_1$C.normalizePath)(fileName);
        this.documents.delete(fileName);
        this.emitter.emit('change', fileName, undefined);
    }
    updateTsOrJsFile(fileName, changes) {
        fileName = (0, utils_1$C.normalizePath)(fileName);
        const previousSnapshot = this.get(fileName);
        if (changes) {
            if (!(previousSnapshot instanceof DocumentSnapshot_1$6.JSOrTSDocumentSnapshot)) {
                return;
            }
            const newSnapshot = previousSnapshot.update(changes);
            this.set(fileName, newSnapshot);
            return newSnapshot;
        }
        else {
            const newSnapshot = DocumentSnapshot_1$6.DocumentSnapshot.fromNonSvelteFilePath(fileName, this.tsSystem);
            if (previousSnapshot) {
                newSnapshot.version = previousSnapshot.version + 1;
            }
            else {
                newSnapshot.version += 1;
            }
            this.set(fileName, newSnapshot);
            return newSnapshot;
        }
    }
    onChange(listener) {
        this.emitter.on('change', listener);
    }
    removeChangeListener(listener) {
        this.emitter.off('change', listener);
    }
}
SnapshotManager$1.GlobalSnapshotsManager = GlobalSnapshotsManager;
class SnapshotManager {
    constructor(globalSnapshotsManager, fileSpec, workspaceRoot, tsSystem, projectFiles, wildcardDirectories) {
        this.globalSnapshotsManager = globalSnapshotsManager;
        this.fileSpec = fileSpec;
        this.workspaceRoot = workspaceRoot;
        this.tsSystem = tsSystem;
        this.lastLogged = new Date(new Date().getTime() - 60_001);
        this.watchExtensions = [
            typescript_1$l.default.Extension.Dts,
            typescript_1$l.default.Extension.Dcts,
            typescript_1$l.default.Extension.Dmts,
            typescript_1$l.default.Extension.Js,
            typescript_1$l.default.Extension.Cjs,
            typescript_1$l.default.Extension.Mjs,
            typescript_1$l.default.Extension.Jsx,
            typescript_1$l.default.Extension.Ts,
            typescript_1$l.default.Extension.Mts,
            typescript_1$l.default.Extension.Cts,
            typescript_1$l.default.Extension.Tsx,
            typescript_1$l.default.Extension.Json,
            '.svelte'
        ];
        this.onSnapshotChange = this.onSnapshotChange.bind(this);
        this.globalSnapshotsManager.onChange(this.onSnapshotChange);
        this.documents = new fileCollection_1$4.FileMap(tsSystem.useCaseSensitiveFileNames);
        this.projectFileToOriginalCasing = new Map();
        this.getCanonicalFileName = (0, utils_1$C.createGetCanonicalFileName)(tsSystem.useCaseSensitiveFileNames);
        projectFiles.forEach((originalCasing) => this.projectFileToOriginalCasing.set(this.getCanonicalFileName(originalCasing), originalCasing));
        this.watchingCanonicalDirectories = new Map(Object.entries(wildcardDirectories ?? {}).map(([dir, flags]) => [
            this.getCanonicalFileName(dir),
            flags
        ]));
    }
    onSnapshotChange(fileName, document) {
        if (!document) {
            this.documents.delete(fileName);
            this.projectFileToOriginalCasing.delete(this.getCanonicalFileName(fileName));
        }
        else if (this.documents.has(fileName)) {
            this.documents.set(fileName, document);
        }
    }
    areIgnoredFromNewFileWatch(watcherNewFiles) {
        const { include } = this.fileSpec;
        if (include?.length === 0 || !this.watchingCanonicalDirectories) {
            return true;
        }
        for (const newFile of watcherNewFiles) {
            const path = this.getCanonicalFileName((0, utils_1$C.normalizePath)(newFile));
            if (this.projectFileToOriginalCasing.has(path)) {
                continue;
            }
            for (const [dir, flags] of this.watchingCanonicalDirectories) {
                if (path.startsWith(dir)) {
                    if (!(flags & typescript_1$l.default.WatchDirectoryFlags.Recursive)) {
                        const relative = path.slice(dir.length);
                        if (relative.includes('/')) {
                            continue;
                        }
                    }
                    return false;
                }
            }
        }
        return true;
    }
    updateProjectFiles() {
        const { include, exclude } = this.fileSpec;
        if (include?.length === 0) {
            return;
        }
        const projectFiles = this.tsSystem
            .readDirectory(this.workspaceRoot, this.watchExtensions, exclude, include)
            .map(utils_1$C.normalizePath);
        projectFiles.forEach((projectFile) => this.projectFileToOriginalCasing.set(this.getCanonicalFileName(projectFile), projectFile));
    }
    updateTsOrJsFile(fileName, changes) {
        const snapshot = this.globalSnapshotsManager.updateTsOrJsFile(fileName, changes);
        if (snapshot) {
            this.documents.set((0, utils_1$C.normalizePath)(fileName), snapshot);
        }
    }
    has(fileName) {
        fileName = (0, utils_1$C.normalizePath)(fileName);
        return (this.projectFileToOriginalCasing.has(this.getCanonicalFileName(fileName)) ||
            this.documents.has(fileName));
    }
    set(fileName, snapshot) {
        this.globalSnapshotsManager.set(fileName, snapshot);
        this.documents.set((0, utils_1$C.normalizePath)(fileName), snapshot);
        this.logStatistics();
    }
    get(fileName) {
        fileName = (0, utils_1$C.normalizePath)(fileName);
        let snapshot = this.documents.get(fileName);
        if (!snapshot) {
            snapshot = this.globalSnapshotsManager.get(fileName);
            if (snapshot) {
                this.documents.set(fileName, snapshot);
            }
        }
        return snapshot;
    }
    delete(fileName) {
        fileName = (0, utils_1$C.normalizePath)(fileName);
        this.globalSnapshotsManager.delete(fileName);
    }
    getClientFileNames() {
        return Array.from(this.documents.values())
            .filter((doc) => doc.isOpenedInClient())
            .map((doc) => doc.filePath);
    }
    getProjectFileNames() {
        return Array.from(this.projectFileToOriginalCasing.values());
    }
    isProjectFile(fileName) {
        fileName = (0, utils_1$C.normalizePath)(fileName);
        return this.projectFileToOriginalCasing.has(this.getCanonicalFileName(fileName));
    }
    logStatistics() {
        const date = new Date();
        if (date.getTime() - this.lastLogged.getTime() > 60_000) {
            this.lastLogged = date;
            const allFiles = new Set();
            for (const key of this.projectFileToOriginalCasing.keys()) {
                allFiles.add(key);
            }
            for (const key of this.documents.keys()) {
                allFiles.add(key);
            }
            let svelteCount = 0;
            let nodeModulesCount = 0;
            for (const name of allFiles) {
                if (name.endsWith('.svelte')) {
                    svelteCount++;
                }
                if (name.includes('node_modules')) {
                    nodeModulesCount++;
                }
            }
            logger_1$7.Logger.log('SnapshotManager File Statistics:\n' +
                `Project files: ${this.projectFileToOriginalCasing.size}\n` +
                `Svelte files: ${svelteCount}\n` +
                `From node_modules: ${nodeModulesCount}\n` +
                `Total: ${allFiles.size}`);
        }
    }
    allFilesAreJsOrDts() {
        for (const doc of this.documents.values()) {
            if (doc.scriptKind === typescript_1$l.default.ScriptKind.TS || doc.scriptKind === typescript_1$l.default.ScriptKind.TSX) {
                return false;
            }
        }
        return true;
    }
    dispose() {
        this.globalSnapshotsManager.removeChangeListener(this.onSnapshotChange);
    }
}
SnapshotManager$1.SnapshotManager = SnapshotManager;
SnapshotManager$1.ignoredBuildDirectories = ['__sapper__', '.svelte-kit'];

var CodeActionsProvider = {};

var DiagnosticsProvider = {};

var __createBinding$1 = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault$1 = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar$1 = (commonjsGlobal && commonjsGlobal.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$1(result, mod, k[i]);
        __setModuleDefault$1(result, mod);
        return result;
    };
})();
Object.defineProperty(DiagnosticsProvider, "__esModule", { value: true });
DiagnosticsProvider.DiagnosticsProviderImpl = DiagnosticsProvider.DiagnosticCode = void 0;
DiagnosticsProvider.mapAndFilterDiagnostics = mapAndFilterDiagnostics;
const typescript_1$k = __importStar$1(ts);
const vscode_languageserver_1$p = main$8;
const documents_1$p = documents;
const utils_1$B = utils$2;
const utils_2$n = requireUtils();
const utils_3$f = utils$6;
const svelte_ast_utils_1$5 = svelteAstUtils;
const svelte2tsx_1$6 = require$$0;
var DiagnosticCode;
(function (DiagnosticCode) {
    DiagnosticCode[DiagnosticCode["MODIFIERS_CANNOT_APPEAR_HERE"] = 1184] = "MODIFIERS_CANNOT_APPEAR_HERE";
    DiagnosticCode[DiagnosticCode["USED_BEFORE_ASSIGNED"] = 2454] = "USED_BEFORE_ASSIGNED";
    DiagnosticCode[DiagnosticCode["JSX_ELEMENT_DOES_NOT_SUPPORT_ATTRIBUTES"] = 2607] = "JSX_ELEMENT_DOES_NOT_SUPPORT_ATTRIBUTES";
    DiagnosticCode[DiagnosticCode["CANNOT_BE_USED_AS_JSX_COMPONENT"] = 2786] = "CANNOT_BE_USED_AS_JSX_COMPONENT";
    DiagnosticCode[DiagnosticCode["NOOP_IN_COMMAS"] = 2695] = "NOOP_IN_COMMAS";
    DiagnosticCode[DiagnosticCode["NEVER_READ"] = 6133] = "NEVER_READ";
    DiagnosticCode[DiagnosticCode["ALL_IMPORTS_UNUSED"] = 6192] = "ALL_IMPORTS_UNUSED";
    DiagnosticCode[DiagnosticCode["UNUSED_LABEL"] = 7028] = "UNUSED_LABEL";
    DiagnosticCode[DiagnosticCode["DUPLICATED_JSX_ATTRIBUTES"] = 17001] = "DUPLICATED_JSX_ATTRIBUTES";
    DiagnosticCode[DiagnosticCode["DUPLICATE_IDENTIFIER"] = 2300] = "DUPLICATE_IDENTIFIER";
    DiagnosticCode[DiagnosticCode["MULTIPLE_PROPS_SAME_NAME"] = 1117] = "MULTIPLE_PROPS_SAME_NAME";
    DiagnosticCode[DiagnosticCode["ARG_TYPE_X_NOT_ASSIGNABLE_TO_TYPE_Y"] = 2345] = "ARG_TYPE_X_NOT_ASSIGNABLE_TO_TYPE_Y";
    DiagnosticCode[DiagnosticCode["TYPE_X_NOT_ASSIGNABLE_TO_TYPE_Y"] = 2322] = "TYPE_X_NOT_ASSIGNABLE_TO_TYPE_Y";
    DiagnosticCode[DiagnosticCode["TYPE_X_NOT_ASSIGNABLE_TO_TYPE_Y_DID_YOU_MEAN"] = 2820] = "TYPE_X_NOT_ASSIGNABLE_TO_TYPE_Y_DID_YOU_MEAN";
    DiagnosticCode[DiagnosticCode["UNKNOWN_PROP"] = 2353] = "UNKNOWN_PROP";
    DiagnosticCode[DiagnosticCode["MISSING_PROPS"] = 2739] = "MISSING_PROPS";
    DiagnosticCode[DiagnosticCode["MISSING_PROP"] = 2741] = "MISSING_PROP";
    DiagnosticCode[DiagnosticCode["NO_OVERLOAD_MATCHES_CALL"] = 2769] = "NO_OVERLOAD_MATCHES_CALL";
    DiagnosticCode[DiagnosticCode["CANNOT_FIND_NAME"] = 2304] = "CANNOT_FIND_NAME";
    DiagnosticCode[DiagnosticCode["CANNOT_FIND_NAME_X_DID_YOU_MEAN_Y"] = 2552] = "CANNOT_FIND_NAME_X_DID_YOU_MEAN_Y";
    DiagnosticCode[DiagnosticCode["EXPECTED_N_ARGUMENTS"] = 2554] = "EXPECTED_N_ARGUMENTS";
    DiagnosticCode[DiagnosticCode["DEPRECATED_SIGNATURE"] = 6387] = "DEPRECATED_SIGNATURE";
})(DiagnosticCode || (DiagnosticsProvider.DiagnosticCode = DiagnosticCode = {}));
class DiagnosticsProviderImpl {
    constructor(lsAndTsDocResolver, configManager) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
        this.configManager = configManager;
    }
    async getDiagnostics(document, cancellationToken) {
        const { lang, tsDoc } = await this.getLSAndTSDoc(document);
        if (['coffee', 'coffeescript'].includes(document.getLanguageAttribute('script')) ||
            cancellationToken?.isCancellationRequested) {
            return [];
        }
        if (tsDoc.parserError) {
            return [
                {
                    range: tsDoc.parserError.range,
                    severity: vscode_languageserver_1$p.DiagnosticSeverity.Error,
                    source: tsDoc.scriptKind === typescript_1$k.default.ScriptKind.TSX ||
                        tsDoc.scriptKind === typescript_1$k.default.ScriptKind.TS
                        ? 'ts'
                        : 'js',
                    message: tsDoc.parserError.message,
                    code: tsDoc.parserError.code
                }
            ];
        }
        let diagnostics = lang.getSyntacticDiagnostics(tsDoc.filePath);
        const checkers = [lang.getSuggestionDiagnostics, lang.getSemanticDiagnostics];
        for (const checker of checkers) {
            if (cancellationToken) {
                await new Promise((resolve) => setTimeout(resolve, 10));
                if (cancellationToken.isCancellationRequested) {
                    return [];
                }
            }
            diagnostics.push(...checker.call(lang, tsDoc.filePath));
        }
        return mapAndFilterDiagnostics(diagnostics, document, tsDoc, lang);
    }
    async getDiagnosticsForPullMode(document, previousResultId, cancellationToken) {
        const { tsDoc, lsContainer } = await this.getLSAndTSDoc(document);
        if (cancellationToken?.isCancellationRequested) {
            return {
                kind: 'full',
                items: []
            };
        }
        const resultId = tsDoc.version.toString() + '-' + lsContainer.getProjectVersion();
        if (previousResultId === resultId) {
            return {
                kind: 'unchanged',
                resultId
            };
        }
        const diagnostics = await this.getDiagnostics(document);
        return {
            kind: 'full',
            resultId,
            items: diagnostics
        };
    }
    async getLSAndTSDoc(document) {
        return this.lsAndTsDocResolver.getLSAndTSDoc(document);
    }
}
DiagnosticsProvider.DiagnosticsProviderImpl = DiagnosticsProviderImpl;
function mapAndFilterDiagnostics(diagnostics, document, tsDoc, lang) {
    const notGenerated = isNotGenerated(tsDoc.getFullText());
    if (lang) {
        const additionalStoreDiagnostics = [];
        for (const diagnostic of diagnostics) {
            if ((diagnostic.code === DiagnosticCode.NO_OVERLOAD_MATCHES_CALL ||
                diagnostic.code === DiagnosticCode.ARG_TYPE_X_NOT_ASSIGNABLE_TO_TYPE_Y) &&
                !notGenerated(diagnostic)) {
                if ((0, utils_2$n.isStoreVariableIn$storeDeclaration)(tsDoc.getFullText(), diagnostic.start)) {
                    const storeName = tsDoc
                        .getFullText()
                        .substring(diagnostic.start, diagnostic.start + diagnostic.length);
                    const storeUsages = lang.findReferences(tsDoc.filePath, (0, utils_2$n.get$storeOffsetOf$storeDeclaration)(tsDoc.getFullText(), diagnostic.start))[0].references;
                    for (const storeUsage of storeUsages) {
                        additionalStoreDiagnostics.push({
                            ...diagnostic,
                            messageText: `Cannot use '${storeName}' as a store. '${storeName}' needs to be an object with a subscribe method on it.\n\n${typescript_1$k.default.flattenDiagnosticMessageText(diagnostic.messageText, '\n')}`,
                            start: storeUsage.textSpan.start,
                            length: storeUsage.textSpan.length
                        });
                    }
                }
            }
        }
        diagnostics.push(...additionalStoreDiagnostics);
    }
    diagnostics = diagnostics
        .filter(notGenerated)
        .filter((0, utils_3$f.not)(isUnusedReactiveStatementLabel))
        .filter((diagnostic) => !expectedTransitionThirdArgument(diagnostic, tsDoc, lang));
    if (lang) {
        diagnostics = resolveNoopsInReactiveStatements(lang, diagnostics);
    }
    const source = tsDoc.scriptKind === typescript_1$k.default.ScriptKind.TSX || tsDoc.scriptKind === typescript_1$k.default.ScriptKind.TS
        ? 'ts'
        : 'js';
    const mapRange = rangeMapper(tsDoc, document, lang);
    const noFalsePositive = isNoFalsePositive$1(document, tsDoc);
    const converted = [];
    for (const tsDiag of diagnostics) {
        let diagnostic = {
            range: (0, utils_1$B.convertRange)(tsDoc, tsDiag),
            severity: (0, utils_1$B.mapSeverity)(tsDiag.category),
            source,
            message: typescript_1$k.default.flattenDiagnosticMessageText(tsDiag.messageText, '\n'),
            code: tsDiag.code,
            tags: (0, utils_1$B.getDiagnosticTag)(tsDiag)
        };
        diagnostic = mapRange(diagnostic);
        moveBindingErrorMessage(tsDiag, tsDoc, diagnostic, document);
        if (!hasNoNegativeLines(diagnostic) || !noFalsePositive(diagnostic)) {
            continue;
        }
        diagnostic = adjustIfNecessary(diagnostic, tsDoc.isSvelte5Plus);
        diagnostic = swapDiagRangeStartEndIfNecessary(diagnostic);
        converted.push(diagnostic);
    }
    return converted;
}
function moveBindingErrorMessage(tsDiag, tsDoc, diagnostic, document) {
    if (tsDiag.code === DiagnosticCode.TYPE_X_NOT_ASSIGNABLE_TO_TYPE_Y &&
        tsDiag.start &&
        tsDoc.getText(tsDiag.start, tsDiag.start + tsDiag.length).endsWith('.$$bindings')) {
        let node = tsDoc.svelteNodeAt(diagnostic.range.start);
        while (node && node.type !== 'InlineComponent') {
            node = node.parent;
        }
        if (node) {
            let name = tsDoc.getText(tsDiag.start + tsDiag.length, tsDiag.start + tsDiag.length + 100);
            const quoteIdx = name.indexOf("'");
            name = name.substring(quoteIdx + 1, name.indexOf("'", quoteIdx + 1));
            const binding = node.attributes.find((attr) => attr.type === 'Binding' && attr.name === name);
            if (binding) {
                if (diagnostic.message.startsWith("Type '") &&
                    diagnostic.message.includes("is not assignable to type '")) {
                    const idx = diagnostic.message.indexOf(`Type '"`) + `Type '"`.length;
                    const propName = diagnostic.message.substring(idx, diagnostic.message.indexOf('"', idx));
                    diagnostic.message =
                        "Cannot use 'bind:' with this property. It is declared as non-bindable inside the component.\n" +
                            `To mark a property as bindable: 'let { ${propName} = $bindable() } = $props()'`;
                }
                else {
                    diagnostic.message =
                        "Cannot use 'bind:' with this property. It is declared as non-bindable inside the component.\n" +
                            `To mark a property as bindable: 'let { prop = $bindable() } = $props()'\n\n` +
                            diagnostic.message;
                }
                diagnostic.range = {
                    start: document.positionAt(binding.start),
                    end: document.positionAt(binding.end)
                };
            }
        }
    }
}
function rangeMapper(snapshot, document, lang) {
    const get$$PropsDefWithCache = (0, utils_3$f.memoize)(() => lang ? get$$PropsDef(lang, snapshot) : undefined);
    const get$$PropsAliasInfoWithCache = (0, utils_3$f.memoize)(() => lang ? get$$PropsAliasForInfo(get$$PropsDefWithCache, lang, document) : undefined);
    return (diagnostic) => {
        let range = (0, documents_1$p.mapRangeToOriginal)(snapshot, diagnostic.range);
        if (range.start.line < 0 && lang) {
            range =
                movePropsErrorRangeBackIfNecessary(diagnostic, snapshot, get$$PropsDefWithCache, get$$PropsAliasInfoWithCache) ?? range;
        }
        if (([DiagnosticCode.MISSING_PROP, DiagnosticCode.MISSING_PROPS].includes(diagnostic.code) ||
            (DiagnosticCode.TYPE_X_NOT_ASSIGNABLE_TO_TYPE_Y &&
                diagnostic.message.includes("'Properties<"))) &&
            !(0, utils_1$B.hasNonZeroRange)({ range })) {
            const node = (0, documents_1$p.getNodeIfIsInStartTag)(document.html, document.offsetAt(range.start));
            if (node) {
                range.start = document.positionAt(node.start + 1);
                range.end = document.positionAt(node.start + 1 + (node.tag?.length || 1));
            }
        }
        return { ...diagnostic, range };
    };
}
function findDiagnosticNode(diagnostic) {
    const { file, start, length } = diagnostic;
    if (!file || !start || !length) {
        return;
    }
    const span = { start, length };
    return (0, utils_2$n.findNodeAtSpan)(file, span);
}
function copyDiagnosticAndChangeNode(diagnostic) {
    return (node) => ({
        ...diagnostic,
        start: node.getStart(),
        length: node.getWidth()
    });
}
function hasNoNegativeLines(diagnostic) {
    return diagnostic.range.start.line >= 0 && diagnostic.range.end.line >= 0;
}
const generatedVarRegex = /'\$\$_\w+(\.\$on)?'/;
function isNoFalsePositive$1(document, tsDoc) {
    const text = document.getText();
    const usesPug = document.getLanguageAttribute('template') === 'pug';
    return (diagnostic) => {
        if ([DiagnosticCode.MULTIPLE_PROPS_SAME_NAME, DiagnosticCode.DUPLICATE_IDENTIFIER].includes(diagnostic.code)) {
            const node = tsDoc.svelteNodeAt(diagnostic.range.start);
            if ((0, svelte_ast_utils_1$5.isAttributeName)(node, 'Element') || (0, svelte_ast_utils_1$5.isEventHandler)(node, 'Element')) {
                return false;
            }
        }
        if (diagnostic.code === DiagnosticCode.DEPRECATED_SIGNATURE &&
            generatedVarRegex.test(diagnostic.message)) {
            return false;
        }
        return (isNoUsedBeforeAssigned(diagnostic, text, tsDoc) &&
            (!usesPug || isNoPugFalsePositive(diagnostic, document)));
    };
}
function isNoPugFalsePositive(diagnostic, document) {
    return (!(0, documents_1$p.isRangeInTag)(diagnostic.range, document.templateInfo) &&
        diagnostic.code !== DiagnosticCode.NEVER_READ &&
        diagnostic.code !== DiagnosticCode.ALL_IMPORTS_UNUSED);
}
function isNoUsedBeforeAssigned(diagnostic, text, tsDoc) {
    if (diagnostic.code !== DiagnosticCode.USED_BEFORE_ASSIGNED) {
        return true;
    }
    return !tsDoc.hasProp((0, documents_1$p.getTextInRange)(diagnostic.range, text));
}
function adjustIfNecessary(diagnostic, isSvelte5Plus) {
    if (diagnostic.code === DiagnosticCode.ARG_TYPE_X_NOT_ASSIGNABLE_TO_TYPE_Y &&
        diagnostic.message.includes('ConstructorOfATypedSvelteComponent')) {
        return {
            ...diagnostic,
            message: diagnostic.message +
                '\n\nPossible causes:\n' +
                '- You use the instance type of a component where you should use the constructor type\n' +
                '- Type definitions are missing for this Svelte Component. ' +
                (isSvelte5Plus
                    ? ''
                    : 'If you are using Svelte 3.31+, use SvelteComponentTyped to add a definition:\n' +
                        '  import type { SvelteComponentTyped } from "svelte";\n' +
                        '  class ComponentName extends SvelteComponentTyped<{propertyName: string;}> {}')
        };
    }
    if (diagnostic.code === DiagnosticCode.MODIFIERS_CANNOT_APPEAR_HERE) {
        return {
            ...diagnostic,
            message: diagnostic.message +
                '\nIf this is a declare statement, move it into <script context="module">..</script>'
        };
    }
    return diagnostic;
}
function swapDiagRangeStartEndIfNecessary(diag) {
    diag.range = (0, utils_3$f.swapRangeStartEndIfNecessary)(diag.range);
    return diag;
}
function isNotGenerated(text) {
    return (diagnostic) => {
        if (diagnostic.start === undefined || diagnostic.length === undefined) {
            return true;
        }
        return !(0, utils_2$n.isInGeneratedCode)(text, diagnostic.start, diagnostic.start + diagnostic.length);
    };
}
function isUnusedReactiveStatementLabel(diagnostic) {
    if (diagnostic.code !== DiagnosticCode.UNUSED_LABEL) {
        return false;
    }
    const diagNode = findDiagnosticNode(diagnostic);
    if (!diagNode) {
        return false;
    }
    if (!typescript_1$k.default.isIdentifier(diagNode)) {
        return false;
    }
    if (!diagNode.parent) {
        return false;
    }
    return (0, utils_2$n.isReactiveStatement)(diagNode.parent);
}
function resolveNoopsInReactiveStatements(lang, diagnostics) {
    const isLet = (file) => (node) => {
        const defs = lang.getDefinitionAtPosition(file.fileName, node.getStart());
        return !!defs && defs.some((def) => def.fileName === file.fileName && def.kind === 'let');
    };
    const expandRemainingNoopWarnings = (diagnostic) => {
        const { code, file } = diagnostic;
        if (!file) {
            return;
        }
        const isNoopDiag = code === DiagnosticCode.NOOP_IN_COMMAS;
        if (!isNoopDiag) {
            return;
        }
        const diagNode = findDiagnosticNode(diagnostic);
        if (!diagNode) {
            return;
        }
        if (!(0, utils_2$n.isInReactiveStatement)(diagNode)) {
            return;
        }
        return (
        (0, utils_2$n.gatherIdentifiers)(diagNode)
            .filter((0, utils_3$f.not)(isLet(file)))
            .map(copyDiagnosticAndChangeNode(diagnostic)));
    };
    const expandedDiagnostics = (0, utils_3$f.passMap)(diagnostics, expandRemainingNoopWarnings).flat();
    return expandedDiagnostics.length === diagnostics.length
        ? expandedDiagnostics
        :
            expandedDiagnostics.filter(dedupDiagnostics());
}
function dedupDiagnostics() {
    const hashDiagnostic = (diag) => [diag.start, diag.length, diag.category, diag.source, diag.code]
        .map((x) => JSON.stringify(x))
        .join(':');
    const known = new Set();
    return (diag) => {
        const key = hashDiagnostic(diag);
        if (known.has(key)) {
            return false;
        }
        else {
            known.add(key);
            return true;
        }
    };
}
function get$$PropsAliasForInfo(get$$PropsDefWithCache, lang, document) {
    if (!/type\s+\$\$Props[\s\n]+=/.test(document.getText())) {
        return;
    }
    const propsDef = get$$PropsDefWithCache();
    if (!propsDef || !typescript_1$k.default.isTypeAliasDeclaration(propsDef)) {
        return;
    }
    const type = lang.getProgram()?.getTypeChecker()?.getTypeAtLocation(propsDef.name);
    if (!type) {
        return;
    }
    const rootSymbolName = (type.aliasSymbol ?? type.symbol)?.name;
    if (!rootSymbolName) {
        return;
    }
    return [rootSymbolName, propsDef];
}
function get$$PropsDef(lang, snapshot) {
    const program = lang.getProgram();
    const sourceFile = program?.getSourceFile(snapshot.filePath);
    if (!program || !sourceFile) {
        return undefined;
    }
    const renderFunction = sourceFile.statements.find((statement) => typescript_1$k.default.isFunctionDeclaration(statement) &&
        statement.name?.getText() === svelte2tsx_1$6.internalHelpers.renderName);
    return renderFunction?.body?.statements.find((node) => (typescript_1$k.default.isTypeAliasDeclaration(node) || typescript_1$k.default.isInterfaceDeclaration(node)) &&
        node.name.getText() === '$$Props');
}
function movePropsErrorRangeBackIfNecessary(diagnostic, snapshot, get$$PropsDefWithCache, get$$PropsAliasForWithCache) {
    const possibly$$PropsError = (0, utils_2$n.isAfterSvelte2TsxPropsReturn)(snapshot.getFullText(), snapshot.offsetAt(diagnostic.range.start));
    if (!possibly$$PropsError) {
        return;
    }
    if (diagnostic.message.includes('$$Props')) {
        const propsDef = get$$PropsDefWithCache();
        const generatedPropsStart = propsDef?.name.getStart();
        const propsStart = generatedPropsStart != null &&
            snapshot.getOriginalPosition(snapshot.positionAt(generatedPropsStart));
        if (propsStart) {
            return {
                start: propsStart,
                end: { ...propsStart, character: propsStart.character + '$$Props'.length }
            };
        }
        return;
    }
    const aliasForInfo = get$$PropsAliasForWithCache();
    if (!aliasForInfo) {
        return;
    }
    const [aliasFor, propsDef] = aliasForInfo;
    if (diagnostic.message.includes(aliasFor)) {
        return (0, documents_1$p.mapRangeToOriginal)(snapshot, {
            start: snapshot.positionAt(propsDef.name.getStart()),
            end: snapshot.positionAt(propsDef.name.getEnd())
        });
    }
}
function expectedTransitionThirdArgument(diagnostic, tsDoc, lang) {
    if (diagnostic.code !== DiagnosticCode.EXPECTED_N_ARGUMENTS ||
        !diagnostic.start ||
        !tsDoc.getText(0, diagnostic.start).endsWith('__sveltets_2_ensureTransition(')) {
        return false;
    }
    const node = findDiagnosticNode(diagnostic);
    if (!node) {
        return false;
    }
    const callExpression = typescript_1$k.default.isIdentifier(node) && typescript_1$k.default.isCallExpression(node.parent)
        ? node.parent
        : (0, utils_2$n.findNodeAtSpan)(node, { start: node.getStart(), length: node.getWidth() }, typescript_1$k.default.isCallExpression);
    if (!lang) {
        return (0, typescript_1$k.flattenDiagnosticMessageText)(diagnostic.messageText, '\n').includes(' 3');
    }
    const signature = callExpression && lang.getProgram()?.getTypeChecker().getResolvedSignature(callExpression);
    return (signature?.parameters.filter((parameter) => !(parameter.flags & typescript_1$k.default.SymbolFlags.Optional))
        .length === 3);
}

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
	    Object.defineProperty(o, "default", { enumerable: true, value: v });
	}) : function(o, v) {
	    o["default"] = v;
	});
	var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || (function () {
	    var ownKeys = function(o) {
	        ownKeys = Object.getOwnPropertyNames || function (o) {
	            var ar = [];
	            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
	            return ar;
	        };
	        return ownKeys(o);
	    };
	    return function (mod) {
	        if (mod && mod.__esModule) return mod;
	        var result = {};
	        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
	        __setModuleDefault(result, mod);
	        return result;
	    };
	})();
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.CodeActionsProviderImpl = exports.REMOVE_UNUSED_IMPORTS_CODE_ACTION_KIND = exports.ADD_MISSING_IMPORTS_CODE_ACTION_KIND = exports.SORT_IMPORT_CODE_ACTION_KIND = void 0;
	const svelte2tsx_1 = require$$0;
	const typescript_1 = __importStar(ts);
	const vscode_languageserver_1 = main$8;
	const documents_1 = documents;
	const utils_1 = utils$6;
	const DocumentSnapshot_1 = DocumentSnapshot;
	const utils_2 = utils$2;
	const DiagnosticsProvider_1 = DiagnosticsProvider;
	const utils_3 = requireUtils();
	exports.SORT_IMPORT_CODE_ACTION_KIND = 'source.sortImports';
	exports.ADD_MISSING_IMPORTS_CODE_ACTION_KIND = 'source.addMissingImports';
	exports.REMOVE_UNUSED_IMPORTS_CODE_ACTION_KIND = 'source.removeUnusedImports';
	const FIX_IMPORT_FIX_NAME = 'import';
	const FIX_IMPORT_FIX_ID = 'fixMissingImport';
	const FIX_IMPORT_FIX_DESCRIPTION = 'Add all missing imports';
	const nonIdentifierRegex = /[\`\~\!\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>/\?\s]/;
	class CodeActionsProviderImpl {
	    constructor(lsAndTsDocResolver, completionProvider, configManager) {
	        this.lsAndTsDocResolver = lsAndTsDocResolver;
	        this.completionProvider = completionProvider;
	        this.configManager = configManager;
	    }
	    async getCodeActions(document, range, context, cancellationToken) {
	        if (context.only?.[0] === vscode_languageserver_1.CodeActionKind.SourceOrganizeImports) {
	            return await this.organizeImports(document, cancellationToken);
	        }
	        if (context.only?.[0] === exports.SORT_IMPORT_CODE_ACTION_KIND) {
	            return await this.organizeImports(document, cancellationToken, typescript_1.OrganizeImportsMode.SortAndCombine);
	        }
	        if (context.only?.[0] === exports.REMOVE_UNUSED_IMPORTS_CODE_ACTION_KIND) {
	            return await this.organizeImports(document, cancellationToken, typescript_1.OrganizeImportsMode.RemoveUnused);
	        }
	        if (context.only?.[0] === exports.ADD_MISSING_IMPORTS_CODE_ACTION_KIND) {
	            return await this.addMissingImports(document, cancellationToken);
	        }
	        if (context.only?.[0] === vscode_languageserver_1.CodeActionKind.Source) {
	            return [
	                ...(await this.organizeImports(document, cancellationToken)),
	                ...(await this.organizeImports(document, cancellationToken, typescript_1.OrganizeImportsMode.SortAndCombine)),
	                ...(await this.organizeImports(document, cancellationToken, typescript_1.OrganizeImportsMode.RemoveUnused)),
	                ...(await this.addMissingImports(document, cancellationToken))
	            ];
	        }
	        if (context.diagnostics.length &&
	            (!context.only || context.only.includes(vscode_languageserver_1.CodeActionKind.QuickFix))) {
	            return await this.applyQuickfix(document, range, context, cancellationToken);
	        }
	        if (!context.only || context.only.includes(vscode_languageserver_1.CodeActionKind.Refactor)) {
	            return await this.getApplicableRefactors(document, range, cancellationToken);
	        }
	        return [];
	    }
	    async resolveCodeAction(document, codeAction, cancellationToken) {
	        if (!this.isQuickFixAllResolveInfo(codeAction.data)) {
	            return codeAction;
	        }
	        const { lang, tsDoc, userPreferences, lsContainer } = await this.lsAndTsDocResolver.getLSAndTSDoc(document);
	        if (cancellationToken?.isCancellationRequested) {
	            return codeAction;
	        }
	        const formatCodeSettings = await this.configManager.getFormatCodeSettingsForFile(document, tsDoc.scriptKind);
	        const formatCodeBasis = (0, utils_3.getFormatCodeBasis)(formatCodeSettings);
	        const getDiagnostics = (0, utils_1.memoize)(() => lang.getSemanticDiagnostics(tsDoc.filePath).map((dia) => ({
	            range: (0, documents_1.mapRangeToOriginal)(tsDoc, (0, utils_2.convertRange)(tsDoc, dia)),
	            message: '',
	            code: dia.code
	        })));
	        const isImportFix = codeAction.data.fixName === FIX_IMPORT_FIX_NAME;
	        const virtualDocInfo = isImportFix
	            ? this.createVirtualDocumentForCombinedImportCodeFix(document, getDiagnostics(), tsDoc, lsContainer, lang)
	            : undefined;
	        const fix = lang.getCombinedCodeFix({
	            type: 'file',
	            fileName: (virtualDocInfo?.virtualDoc ?? document).getFilePath()
	        }, codeAction.data.fixId, formatCodeSettings, userPreferences);
	        if (virtualDocInfo) {
	            const getCanonicalFileName = (0, utils_1.createGetCanonicalFileName)(typescript_1.default.sys.useCaseSensitiveFileNames);
	            const virtualDocPath = getCanonicalFileName((0, utils_1.normalizePath)(virtualDocInfo.virtualDoc.getFilePath()));
	            for (const change of fix.changes) {
	                if (getCanonicalFileName((0, utils_1.normalizePath)(change.fileName)) === virtualDocPath) {
	                    change.fileName = tsDoc.filePath;
	                    this.removeDuplicatedComponentImport(virtualDocInfo.insertedNames, change);
	                }
	            }
	            await this.lsAndTsDocResolver.deleteSnapshot(virtualDocPath);
	        }
	        const snapshots = new utils_3.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
	        const fixActions = [
	            {
	                fixName: codeAction.data.fixName,
	                changes: Array.from(fix.changes),
	                description: ''
	            }
	        ];
	        const documentChangesPromises = fixActions.map((fix) => this.convertAndFixCodeFixAction({
	            document,
	            fix,
	            formatCodeBasis,
	            formatCodeSettings,
	            getDiagnostics,
	            snapshots,
	            skipAddScriptTag: true
	        }));
	        const documentChanges = (await Promise.all(documentChangesPromises)).flat();
	        if (cancellationToken?.isCancellationRequested) {
	            return codeAction;
	        }
	        if (isImportFix) {
	            this.fixCombinedImportQuickFix(documentChanges, document, formatCodeBasis);
	        }
	        codeAction.edit = {
	            documentChanges
	        };
	        return codeAction;
	    }
	    createVirtualDocumentForCombinedImportCodeFix(document, diagnostics, tsDoc, lsContainer, lang) {
	        const virtualUri = document.uri + '.__virtual__.svelte';
	        const names = new Set();
	        const sourceFile = lang.getProgram()?.getSourceFile(tsDoc.filePath);
	        if (!sourceFile) {
	            return undefined;
	        }
	        for (const diagnostic of diagnostics) {
	            if (diagnostic.range.start.line < 0 ||
	                diagnostic.range.end.line < 0 ||
	                (diagnostic.code !== DiagnosticsProvider_1.DiagnosticCode.CANNOT_FIND_NAME &&
	                    diagnostic.code !== DiagnosticsProvider_1.DiagnosticCode.CANNOT_FIND_NAME_X_DID_YOU_MEAN_Y)) {
	                continue;
	            }
	            const identifier = this.findIdentifierForDiagnostic(tsDoc, diagnostic, sourceFile);
	            const name = identifier?.text;
	            if (!name || names.has(name)) {
	                continue;
	            }
	            if (name.startsWith('$')) {
	                names.add(name.slice(1));
	            }
	            else if (!(0, utils_2.isInScript)(diagnostic.range.start, document)) {
	                if (this.isComponentStartTag(identifier)) {
	                    names.add((0, utils_2.toGeneratedSvelteComponentName)(name));
	                }
	            }
	        }
	        if (!names.size) {
	            return undefined;
	        }
	        const inserts = Array.from(names.values())
	            .map((name) => name + ';')
	            .join('');
	        const text = document.getText();
	        const newText = document.scriptInfo
	            ? text.slice(0, document.scriptInfo.end) + inserts + text.slice(document.scriptInfo.end)
	            : `${document.getText()}<script>${inserts}</script>`;
	        const virtualDoc = new documents_1.Document(virtualUri, newText,  true);
	        virtualDoc.openedByClient = true;
	        lsContainer.openVirtualDocument(virtualDoc);
	        lsContainer.getService();
	        return {
	            virtualDoc,
	            insertedNames: names
	        };
	    }
	    removeDuplicatedComponentImport(insertedNames, change) {
	        for (const name of insertedNames) {
	            const unSuffixedNames = (0, utils_2.changeSvelteComponentName)(name);
	            const matchRegex = unSuffixedNames != name && this.toImportMemberRegex(unSuffixedNames);
	            if (!matchRegex ||
	                !change.textChanges.some((textChange) => textChange.newText.match(matchRegex))) {
	                continue;
	            }
	            const importRegex = new RegExp(`\\s+import ${name} from ('|")(.*)('|");?\r?\n?`);
	            change.textChanges = change.textChanges
	                .map((textChange) => ({
	                ...textChange,
	                newText: textChange.newText.replace(importRegex, (match) => {
	                    if (match.split('\n').length > 2) {
	                        return '\n';
	                    }
	                    else {
	                        return '';
	                    }
	                })
	            }))
	                .filter((change) => change.span.length || change.newText);
	        }
	    }
	    fixCombinedImportQuickFix(documentChanges, document, formatCodeBasis) {
	        if (!documentChanges.length || document.scriptInfo || document.moduleScriptInfo) {
	            return;
	        }
	        const editForThisFile = documentChanges.find((change) => change.textDocument.uri === document.uri);
	        if (editForThisFile?.edits.length) {
	            const [first] = editForThisFile.edits;
	            first.newText =
	                (0, utils_3.getNewScriptStartTag)(this.configManager.getConfig(), formatCodeBasis.newLine) +
	                    formatCodeBasis.baseIndent +
	                    first.newText.trimStart();
	            const last = editForThisFile.edits[editForThisFile.edits.length - 1];
	            last.newText = last.newText + '</script>' + formatCodeBasis.newLine;
	        }
	    }
	    toImportMemberRegex(name) {
	        return new RegExp(`${name}($| |,)`);
	    }
	    isQuickFixAllResolveInfo(data) {
	        const asserted = data;
	        return asserted?.fixId != undefined && typeof asserted.fixName === 'string';
	    }
	    async organizeImports(document, cancellationToken, mode = typescript_1.OrganizeImportsMode.All) {
	        if (!document.scriptInfo && !document.moduleScriptInfo) {
	            return [];
	        }
	        const { lang, tsDoc, userPreferences } = await this.getLSAndTSDoc(document);
	        if (cancellationToken?.isCancellationRequested || tsDoc.parserError) {
	            return [];
	        }
	        const changes = lang.organizeImports({
	            fileName: tsDoc.filePath,
	            type: 'file',
	            mode
	        }, {
	            ...(await this.configManager.getFormatCodeSettingsForFile(document, tsDoc.scriptKind)),
	            baseIndentSize: undefined
	        }, userPreferences);
	        const documentChanges = await Promise.all(changes.map(async (change) => {
	            return vscode_languageserver_1.TextDocumentEdit.create(vscode_languageserver_1.OptionalVersionedTextDocumentIdentifier.create(document.url, null), change.textChanges
	                .map((edit) => {
	                const range = this.checkRemoveImportCodeActionRange(edit, tsDoc, (0, documents_1.mapRangeToOriginal)(tsDoc, (0, utils_2.convertRange)(tsDoc, edit.span)));
	                edit.newText = (0, utils_1.removeLineWithString)(edit.newText, 'SvelteComponentTyped as __SvelteComponentTyped__');
	                return this.fixIndentationOfImports(vscode_languageserver_1.TextEdit.replace(range, edit.newText), document);
	            })
	                .filter((edit) =>
	            edit.range.start.line !== -1));
	        }));
	        for (const change of documentChanges) {
	            this.checkIndentLeftover(change, document);
	        }
	        let kind;
	        let title;
	        switch (mode) {
	            case typescript_1.OrganizeImportsMode.SortAndCombine:
	                kind = exports.SORT_IMPORT_CODE_ACTION_KIND;
	                title = 'Sort Imports';
	                break;
	            case typescript_1.OrganizeImportsMode.RemoveUnused:
	                kind = exports.REMOVE_UNUSED_IMPORTS_CODE_ACTION_KIND;
	                title = 'Remove Unused Imports';
	                break;
	            default:
	                kind = vscode_languageserver_1.CodeActionKind.SourceOrganizeImports;
	                title = 'Organize Imports';
	        }
	        return [vscode_languageserver_1.CodeAction.create(title, { documentChanges }, kind)];
	    }
	    fixIndentationOfImports(edit, document) {
	        const { newText, range } = edit;
	        if (!newText || range.start.character === 0) {
	            return edit;
	        }
	        const line = (0, documents_1.getLineAtPosition)(range.start, document.getText());
	        const leadingChars = line.substring(0, range.start.character);
	        if (leadingChars.trim() !== '') {
	            return edit;
	        }
	        const fixedNewText = (0, utils_1.modifyLines)(edit.newText, (line, idx) => idx === 0 || !line ? line : leadingChars + line);
	        if (range.end.character > 0) {
	            const endLine = (0, documents_1.getLineAtPosition)(range.end, document.getText());
	            const isIndent = !endLine.substring(0, range.end.character).trim();
	            if (isIndent) {
	                const trimmedEndLine = endLine.trim();
	                if (trimmedEndLine && !trimmedEndLine.startsWith('import')) {
	                    range.end.character = 0;
	                }
	            }
	        }
	        return vscode_languageserver_1.TextEdit.replace(range, fixedNewText);
	    }
	    checkRemoveImportCodeActionRange(edit, snapshot, range) {
	        if (!(snapshot instanceof DocumentSnapshot_1.SvelteDocumentSnapshot)) {
	            return range;
	        }
	        if ((range.end.line === 0 && range.end.character === 1) ||
	            range.end.line < range.start.line ||
	            ((0, utils_2.isInScript)(range.start, snapshot) && !(0, utils_2.isInScript)(range.end, snapshot))) {
	            edit.span.length -= 1;
	            range = (0, documents_1.mapRangeToOriginal)(snapshot, (0, utils_2.convertRange)(snapshot, edit.span));
	            const line = (0, documents_1.getLineAtPosition)(range.end, snapshot.getOriginalText());
	            if ([';', '"', "'"].includes(line[range.end.character])) {
	                range.end.character += 1;
	            }
	            if ((0, documents_1.isAtEndOfLine)(line, range.end.character)) {
	                range.end.line += 1;
	                range.end.character = 0;
	            }
	        }
	        return range;
	    }
	    checkIndentLeftover(change, document) {
	        if (!change.edits.length) {
	            return;
	        }
	        const orderedByStart = change.edits.sort((a, b) => {
	            if (a.range.start.line !== b.range.start.line) {
	                return a.range.start.line - b.range.start.line;
	            }
	            return a.range.start.character - b.range.start.character;
	        });
	        let current;
	        let groups = [];
	        for (let i = 0; i < orderedByStart.length; i++) {
	            const edit = orderedByStart[i];
	            if (!current) {
	                current = { range: (0, utils_2.cloneRange)(edit.range), newText: edit.newText };
	                continue;
	            }
	            if ((0, utils_1.isPositionEqual)(current.range.end, edit.range.start)) {
	                current.range.end = edit.range.end;
	                current.newText += edit.newText;
	            }
	            else {
	                groups.push(current);
	                current = { range: (0, utils_2.cloneRange)(edit.range), newText: edit.newText };
	            }
	        }
	        if (current) {
	            groups.push(current);
	        }
	        for (const edit of groups) {
	            if (edit.newText) {
	                continue;
	            }
	            const range = edit.range;
	            const lineContentBeforeRemove = document.getText({
	                start: { line: range.start.line, character: 0 },
	                end: range.start
	            });
	            const onlyIndentLeft = !lineContentBeforeRemove.trim();
	            if (!onlyIndentLeft) {
	                continue;
	            }
	            const lineContentAfterRemove = document.getText({
	                start: range.end,
	                end: { line: range.end.line, character: Number.MAX_VALUE }
	            });
	            const emptyAfterRemove = !lineContentAfterRemove.trim() || lineContentAfterRemove.startsWith('</script>');
	            if (emptyAfterRemove) {
	                change.edits.push({
	                    range: { start: { line: range.start.line, character: 0 }, end: range.start },
	                    newText: ''
	                });
	            }
	        }
	    }
	    async applyQuickfix(document, range, context, cancellationToken) {
	        const { lang, tsDoc, userPreferences, lsContainer } = await this.getLSAndTSDoc(document);
	        if (cancellationToken?.isCancellationRequested) {
	            return [];
	        }
	        const start = tsDoc.offsetAt(tsDoc.getGeneratedPosition(range.start));
	        const end = tsDoc.offsetAt(tsDoc.getGeneratedPosition(range.end));
	        const errorCodes = context.diagnostics.map((diag) => Number(diag.code));
	        const cannotFindNameDiagnostic = context.diagnostics.filter((diagnostic) => diagnostic.code === DiagnosticsProvider_1.DiagnosticCode.CANNOT_FIND_NAME ||
	            diagnostic.code === DiagnosticsProvider_1.DiagnosticCode.CANNOT_FIND_NAME_X_DID_YOU_MEAN_Y);
	        const formatCodeSettings = await this.configManager.getFormatCodeSettingsForFile(document, tsDoc.scriptKind);
	        const formatCodeBasis = (0, utils_3.getFormatCodeBasis)(formatCodeSettings);
	        let codeFixes = cannotFindNameDiagnostic.length
	            ? this.getComponentImportQuickFix(document, lang, tsDoc, userPreferences, cannotFindNameDiagnostic, formatCodeSettings)
	            : undefined;
	        if (codeFixes === undefined ||
	            errorCodes.includes(DiagnosticsProvider_1.DiagnosticCode.CANNOT_FIND_NAME_X_DID_YOU_MEAN_Y)) {
	            codeFixes ??= [];
	            codeFixes = codeFixes.concat(...lang.getCodeFixesAtPosition(tsDoc.filePath, start, end, errorCodes, formatCodeSettings, userPreferences), ...this.getSvelteQuickFixes(lang, cannotFindNameDiagnostic, tsDoc, userPreferences, formatCodeSettings));
	        }
	        const snapshots = new utils_3.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
	        snapshots.set(tsDoc.filePath, tsDoc);
	        const codeActionsPromises = codeFixes.map(async (fix) => {
	            const documentChanges = await this.convertAndFixCodeFixAction({
	                fix,
	                snapshots,
	                document,
	                formatCodeSettings,
	                formatCodeBasis,
	                getDiagnostics: () => context.diagnostics
	            });
	            const codeAction = vscode_languageserver_1.CodeAction.create(fix.description, {
	                documentChanges
	            }, vscode_languageserver_1.CodeActionKind.QuickFix);
	            return {
	                fix,
	                codeAction
	            };
	        });
	        const identifier = {
	            uri: document.uri
	        };
	        const codeActions = await Promise.all(codeActionsPromises);
	        if (cancellationToken?.isCancellationRequested) {
	            return [];
	        }
	        const codeActionsNotFilteredOut = codeActions.filter(({ codeAction }) => codeAction.edit?.documentChanges?.every((change) => change.edits.length > 0));
	        const fixAllActions = this.getFixAllActions(codeActionsNotFilteredOut.map(({ fix }) => fix), identifier, tsDoc.filePath, lang);
	        const addLangCodeAction = this.getAddLangTSCodeAction(document, context, tsDoc, formatCodeBasis);
	        const result = codeActionsNotFilteredOut
	            .map(({ codeAction }) => codeAction)
	            .concat(fixAllActions);
	        return addLangCodeAction ? [addLangCodeAction].concat(result) : result;
	    }
	    async convertAndFixCodeFixAction({ fix, snapshots, document, formatCodeSettings, formatCodeBasis, getDiagnostics, skipAddScriptTag }) {
	        const documentChangesPromises = fix.changes.map(async (change) => {
	            const snapshot = await snapshots.retrieve(change.fileName);
	            return vscode_languageserver_1.TextDocumentEdit.create(vscode_languageserver_1.OptionalVersionedTextDocumentIdentifier.create((0, utils_1.pathToUrl)(change.fileName), null), change.textChanges
	                .map((edit) => {
	                if (fix.fixName === FIX_IMPORT_FIX_NAME &&
	                    snapshot instanceof DocumentSnapshot_1.SvelteDocumentSnapshot) {
	                    const namePosition = 'position' in fix ? fix.position : undefined;
	                    const startPos = namePosition ??
	                        this.findDiagnosticForImportFix(document, edit, getDiagnostics())
	                            ?.range?.start ??
	                        vscode_languageserver_1.Position.create(0, 0);
	                    return this.completionProvider.codeActionChangeToTextEdit(document, snapshot, edit, true, startPos, formatCodeBasis.newLine, undefined, skipAddScriptTag);
	                }
	                if ((0, utils_3.isTextSpanInGeneratedCode)(snapshot.getFullText(), edit.span)) {
	                    return undefined;
	                }
	                let originalRange = (0, documents_1.mapRangeToOriginal)(snapshot, (0, utils_2.convertRange)(snapshot, edit.span));
	                if (fix.fixName === 'unusedIdentifier') {
	                    originalRange = this.checkRemoveImportCodeActionRange(edit, snapshot, originalRange);
	                }
	                if (fix.fixName === 'fixAwaitInSyncFunction' && document.scriptInfo) {
	                    const scriptStartTagStart = document.scriptInfo.container.start;
	                    const scriptStartTagEnd = document.scriptInfo.start;
	                    const withinStartTag = document.offsetAt(originalRange.start) < scriptStartTagEnd &&
	                        document.offsetAt(originalRange.end) > scriptStartTagStart;
	                    if (withinStartTag) {
	                        return undefined;
	                    }
	                }
	                if (fix.fixName === 'fixMissingFunctionDeclaration') {
	                    const position = 'position' in fix ? fix.position : undefined;
	                    const checkRange = position
	                        ? vscode_languageserver_1.Range.create(position, position)
	                        : this.findDiagnosticForQuickFix(document, DiagnosticsProvider_1.DiagnosticCode.CANNOT_FIND_NAME, getDiagnostics(), (possiblyIdentifier) => {
	                            return edit.newText.includes('function ' + possiblyIdentifier + '(');
	                        })?.range;
	                    originalRange = this.checkEndOfFileCodeInsert(originalRange, checkRange, document);
	                    if (formatCodeSettings.baseIndentSize) {
	                        const emptyLine = formatCodeBasis.newLine.repeat(2);
	                        edit.newText =
	                            emptyLine +
	                                formatCodeBasis.baseIndent +
	                                edit.newText.trimLeft();
	                    }
	                }
	                if (fix.fixName === 'disableJsDiagnostics') {
	                    if (edit.newText.includes('ts-nocheck')) {
	                        return this.checkTsNoCheckCodeInsert(document, edit);
	                    }
	                    return this.checkDisableJsDiagnosticsCodeInsert(originalRange, document, edit);
	                }
	                if (fix.fixName === 'inferFromUsage') {
	                    originalRange = this.checkAddJsDocCodeActionRange(snapshot, originalRange, document);
	                }
	                if (fix.fixName === 'fixConvertConstToLet') {
	                    const offset = document.offsetAt(originalRange.start);
	                    const constOffset = document.getText().indexOf('const', offset);
	                    if (constOffset < 0) {
	                        return undefined;
	                    }
	                    const beforeConst = document.getText().slice(0, constOffset);
	                    if (beforeConst[beforeConst.length - 1] === '@' &&
	                        beforeConst
	                            .slice(0, beforeConst.length - 1)
	                            .trimEnd()
	                            .endsWith('{')) {
	                        return undefined;
	                    }
	                }
	                if (originalRange.start.line < 0 || originalRange.end.line < 0) {
	                    return undefined;
	                }
	                return vscode_languageserver_1.TextEdit.replace(originalRange, edit.newText);
	            })
	                .filter(utils_1.isNotNullOrUndefined));
	        });
	        const documentChanges = await Promise.all(documentChangesPromises);
	        return documentChanges;
	    }
	    findDiagnosticForImportFix(document, edit, diagnostics) {
	        return this.findDiagnosticForQuickFix(document, DiagnosticsProvider_1.DiagnosticCode.CANNOT_FIND_NAME, diagnostics, (possibleIdentifier) => !nonIdentifierRegex.test(possibleIdentifier) &&
	            this.toImportMemberRegex(possibleIdentifier).test(edit.newText));
	    }
	    findDiagnosticForQuickFix(document, targetCode, diagnostics, match) {
	        const diagnostic = diagnostics.find((diagnostic) => {
	            if (diagnostic.code !== targetCode) {
	                return false;
	            }
	            const possibleIdentifier = document.getText(diagnostic.range);
	            if (possibleIdentifier) {
	                return match(possibleIdentifier);
	            }
	            return false;
	        });
	        return diagnostic;
	    }
	    getFixAllActions(codeFixes, identifier, fileName, lang) {
	        const checkedFixIds = new Set();
	        const fixAll = [];
	        for (const codeFix of codeFixes) {
	            if (!codeFix.fixId || !codeFix.fixAllDescription || checkedFixIds.has(codeFix.fixId)) {
	                continue;
	            }
	            if (codeFix.fixName === FIX_IMPORT_FIX_NAME) {
	                const allCannotFindNameDiagnostics = lang
	                    .getSemanticDiagnostics(fileName)
	                    .filter((diagnostic) => diagnostic.code === DiagnosticsProvider_1.DiagnosticCode.CANNOT_FIND_NAME ||
	                    diagnostic.code === DiagnosticsProvider_1.DiagnosticCode.CANNOT_FIND_NAME_X_DID_YOU_MEAN_Y);
	                if (allCannotFindNameDiagnostics.length < 2) {
	                    checkedFixIds.add(codeFix.fixId);
	                    continue;
	                }
	            }
	            const codeAction = vscode_languageserver_1.CodeAction.create(codeFix.fixAllDescription, vscode_languageserver_1.CodeActionKind.QuickFix);
	            const data = {
	                ...identifier,
	                fixName: codeFix.fixName,
	                fixId: codeFix.fixId
	            };
	            codeAction.data = data;
	            checkedFixIds.add(codeFix.fixId);
	            fixAll.push(codeAction);
	        }
	        return fixAll;
	    }
	    getComponentImportQuickFix(document, lang, tsDoc, userPreferences, diagnostics, formatCodeSetting) {
	        const sourceFile = lang.getProgram()?.getSourceFile(tsDoc.filePath);
	        if (!sourceFile) {
	            return;
	        }
	        const nameToPosition = new Map();
	        for (const diagnostic of diagnostics) {
	            if ((0, utils_2.isInScript)(diagnostic.range.start, document)) {
	                continue;
	            }
	            const possibleIdentifier = document.getText(diagnostic.range);
	            if (!possibleIdentifier ||
	                !(0, utils_1.possiblyComponent)(possibleIdentifier) ||
	                nameToPosition.has(possibleIdentifier)) {
	                continue;
	            }
	            const node = this.findIdentifierForDiagnostic(tsDoc, diagnostic, sourceFile);
	            if (!node || !this.isComponentStartTag(node)) {
	                return;
	            }
	            const tagNameEnd = node.getEnd();
	            const name = node.getText();
	            if ((0, utils_1.possiblyComponent)(name)) {
	                nameToPosition.set(name, tagNameEnd);
	            }
	        }
	        if (!nameToPosition.size) {
	            return;
	        }
	        const result = [];
	        for (const [name, position] of nameToPosition) {
	            const errorPreventingUserPreferences = this.completionProvider.fixUserPreferencesForSvelteComponentImport(userPreferences);
	            const resolvedCompletion = (c) => lang.getCompletionEntryDetails(tsDoc.filePath, position, c.name, formatCodeSetting, c.source, errorPreventingUserPreferences, c.data);
	            const toFix = (c) => c.codeActions?.map((a) => ({
	                ...a,
	                description: (0, utils_2.changeSvelteComponentName)(a.description),
	                fixName: FIX_IMPORT_FIX_NAME,
	                fixId: FIX_IMPORT_FIX_ID,
	                fixAllDescription: FIX_IMPORT_FIX_DESCRIPTION,
	                position: originalPosition
	            })) ?? [];
	            const completion = lang.getCompletionsAtPosition(tsDoc.filePath, position, userPreferences, formatCodeSetting);
	            const entries = completion?.entries
	                .filter((c) => c.name === name || c.name === (0, utils_2.toGeneratedSvelteComponentName)(name))
	                .map(resolvedCompletion)
	                .sort((a, b) => this.numberOfDirectorySeparators(typescript_1.default.displayPartsToString(a?.sourceDisplay ?? [])) -
	                this.numberOfDirectorySeparators(typescript_1.default.displayPartsToString(b?.sourceDisplay ?? [])))
	                .filter(utils_1.isNotNullOrUndefined);
	            if (!entries?.length) {
	                continue;
	            }
	            const originalPosition = tsDoc.getOriginalPosition(tsDoc.positionAt(position));
	            const resultForName = entries.flatMap(toFix);
	            result.push(...resultForName);
	        }
	        return result;
	    }
	    isComponentStartTag(node) {
	        return (typescript_1.default.isCallExpression(node.parent) &&
	            typescript_1.default.isIdentifier(node.parent.expression) &&
	            node.parent.expression.text === '__sveltets_2_ensureComponent' &&
	            typescript_1.default.isIdentifier(node));
	    }
	    numberOfDirectorySeparators(path) {
	        return path.split('/').length - 1;
	    }
	    getSvelteQuickFixes(lang, cannotFindNameDiagnostics, tsDoc, userPreferences, formatCodeSettings) {
	        const program = lang.getProgram();
	        const sourceFile = program?.getSourceFile(tsDoc.filePath);
	        if (!program || !sourceFile) {
	            return [];
	        }
	        const results = [];
	        const getGlobalCompletion = (0, utils_1.memoize)(() => lang.getCompletionsAtPosition(tsDoc.filePath, 0, userPreferences, formatCodeSettings));
	        for (const diagnostic of cannotFindNameDiagnostics) {
	            const identifier = this.findIdentifierForDiagnostic(tsDoc, diagnostic, sourceFile);
	            if (!identifier) {
	                continue;
	            }
	            const isQuickFixTargetTargetStore = identifier?.escapedText.toString().startsWith('$');
	            const fixes = [];
	            if (isQuickFixTargetTargetStore) {
	                fixes.push(...this.getSvelteStoreQuickFixes(identifier, lang, tsDoc, userPreferences, formatCodeSettings, getGlobalCompletion));
	            }
	            if (!fixes.length) {
	                continue;
	            }
	            const originalPosition = tsDoc.getOriginalPosition(tsDoc.positionAt(identifier.pos));
	            results.push(...fixes.map((fix) => ({
	                name: identifier.getText(),
	                position: originalPosition,
	                ...fix
	            })));
	        }
	        return results;
	    }
	    findIdentifierForDiagnostic(tsDoc, diagnostic, sourceFile) {
	        const start = tsDoc.offsetAt(tsDoc.getGeneratedPosition(diagnostic.range.start));
	        const end = tsDoc.offsetAt(tsDoc.getGeneratedPosition(diagnostic.range.end));
	        const identifier = (0, utils_3.findClosestContainingNode)(sourceFile, { start, length: end - start }, typescript_1.default.isIdentifier);
	        return identifier;
	    }
	    getSvelteStoreQuickFixes(identifier, lang, tsDoc, userPreferences, formatCodeSettings, getCompletions) {
	        const storeIdentifier = identifier.escapedText.toString().substring(1);
	        const completion = getCompletions();
	        if (!completion) {
	            return [];
	        }
	        const toFix = (c) => lang
	            .getCompletionEntryDetails(tsDoc.filePath, 0, c.name, formatCodeSettings, c.source, userPreferences, c.data)
	            ?.codeActions?.map((a) => ({
	            ...a,
	            changes: a.changes.map((change) => {
	                return {
	                    ...change,
	                    textChanges: change.textChanges.map((textChange) => {
	                        return {
	                            ...textChange,
	                            newText: textChange.newText.replace(' type ', ' ')
	                        };
	                    })
	                };
	            }),
	            fixName: FIX_IMPORT_FIX_NAME,
	            fixId: FIX_IMPORT_FIX_ID,
	            fixAllDescription: FIX_IMPORT_FIX_DESCRIPTION
	        })) ?? [];
	        return completion.entries.filter((c) => c.name === storeIdentifier).flatMap(toFix);
	    }
	    getAddLangTSCodeAction(document, context, tsDoc, formatCodeBasis) {
	        if (tsDoc.scriptKind !== typescript_1.default.ScriptKind.JS) {
	            return;
	        }
	        let hasTSOnlyDiagnostic = false;
	        for (const diagnostic of context.diagnostics) {
	            const num = Number(diagnostic.code);
	            const canOnlyBeUsedInTS = num >= 8004 && num <= 8017;
	            if (canOnlyBeUsedInTS) {
	                hasTSOnlyDiagnostic = true;
	                break;
	            }
	        }
	        if (!hasTSOnlyDiagnostic) {
	            return;
	        }
	        if (!document.scriptInfo && !document.moduleScriptInfo) {
	            const hasNonTopLevelLang = document.html.roots.some((node) => this.hasLangTsScriptTag(node));
	            if (hasNonTopLevelLang) {
	                return;
	            }
	            return vscode_languageserver_1.CodeAction.create('Add <script lang="ts"> tag', {
	                documentChanges: [
	                    {
	                        textDocument: vscode_languageserver_1.OptionalVersionedTextDocumentIdentifier.create(document.uri, null),
	                        edits: [
	                            {
	                                range: vscode_languageserver_1.Range.create(vscode_languageserver_1.Position.create(0, 0), vscode_languageserver_1.Position.create(0, 0)),
	                                newText: '<script lang="ts"></script>' + formatCodeBasis.newLine
	                            }
	                        ]
	                    }
	                ]
	            }, vscode_languageserver_1.CodeActionKind.QuickFix);
	        }
	        const edits = [document.scriptInfo, document.moduleScriptInfo]
	            .map((info) => {
	            if (!info) {
	                return;
	            }
	            const startTagNameEnd = document.positionAt(info.container.start + 7);
	            const existingLangOffset = document
	                .getText({
	                start: startTagNameEnd,
	                end: document.positionAt(info.start)
	            })
	                .indexOf('lang=');
	            if (existingLangOffset !== -1) {
	                return;
	            }
	            return {
	                range: vscode_languageserver_1.Range.create(startTagNameEnd, startTagNameEnd),
	                newText: ' lang="ts"'
	            };
	        })
	            .filter(utils_1.isNotNullOrUndefined);
	        if (edits.length) {
	            return vscode_languageserver_1.CodeAction.create('Add lang="ts" to <script> tag', {
	                documentChanges: [
	                    {
	                        textDocument: vscode_languageserver_1.OptionalVersionedTextDocumentIdentifier.create(document.uri, null),
	                        edits
	                    }
	                ]
	            }, vscode_languageserver_1.CodeActionKind.QuickFix);
	        }
	    }
	    hasLangTsScriptTag(node) {
	        if (node.tag === 'script' &&
	            (node.attributes?.lang === '"ts"' || node.attributes?.lang === "'ts'") &&
	            node.parent) {
	            return true;
	        }
	        for (const element of node.children) {
	            if (this.hasLangTsScriptTag(element)) {
	                return true;
	            }
	        }
	        return false;
	    }
	    async getApplicableRefactors(document, range, cancellationToken) {
	        if (!(0, documents_1.isRangeInTag)(range, document.scriptInfo) &&
	            !(0, documents_1.isRangeInTag)(range, document.moduleScriptInfo)) {
	            return [];
	        }
	        const textInRange = document
	            .getText()
	            .substring(document.offsetAt(range.start), document.offsetAt(range.end));
	        if (textInRange.includes('$')) {
	            return [];
	        }
	        const { lang, tsDoc, userPreferences } = await this.getLSAndTSDoc(document);
	        if (cancellationToken?.isCancellationRequested) {
	            return [];
	        }
	        const textRange = {
	            pos: tsDoc.offsetAt(tsDoc.getGeneratedPosition(range.start)),
	            end: tsDoc.offsetAt(tsDoc.getGeneratedPosition(range.end))
	        };
	        const applicableRefactors = lang.getApplicableRefactors(document.getFilePath() || '', textRange, userPreferences);
	        return (this.applicableRefactorsToCodeActions(applicableRefactors, document, range, textRange)
	            .filter((refactor) => refactor.command?.command.includes('function_scope') ||
	            refactor.command?.command.includes('constant_scope') ||
	            refactor.command?.command === 'Infer function return type')
	            .filter((refactor) => !refactor.title.includes('module scope'))
	            .map((refactor) => ({
	            ...refactor,
	            title: refactor.title
	                .replace(`Extract to inner function in function '${svelte2tsx_1.internalHelpers.renderName}'`, 'Extract to function')
	                .replace(`Extract to constant in function '${svelte2tsx_1.internalHelpers.renderName}'`, 'Extract to constant')
	        })));
	    }
	    applicableRefactorsToCodeActions(applicableRefactors, document, originalRange, textRange) {
	        return applicableRefactors.flatMap((applicableRefactor) => {
	            if (applicableRefactor.inlineable === false) {
	                return [
	                    vscode_languageserver_1.CodeAction.create(applicableRefactor.description, {
	                        title: applicableRefactor.description,
	                        command: applicableRefactor.name,
	                        arguments: [
	                            document.uri,
	                            {
	                                type: 'refactor',
	                                textRange,
	                                originalRange,
	                                refactorName: 'Extract Symbol'
	                            }
	                        ]
	                    })
	                ];
	            }
	            return applicableRefactor.actions.map((action) => {
	                return vscode_languageserver_1.CodeAction.create(action.description, {
	                    title: action.description,
	                    command: action.name,
	                    arguments: [
	                        document.uri,
	                        {
	                            type: 'refactor',
	                            textRange,
	                            originalRange,
	                            refactorName: applicableRefactor.name
	                        }
	                    ]
	                });
	            });
	        });
	    }
	    async executeCommand(document, command, args) {
	        if (!(args?.[1]?.type === 'refactor')) {
	            return null;
	        }
	        const { lang, tsDoc, userPreferences } = await this.getLSAndTSDoc(document);
	        const path = document.getFilePath() || '';
	        const { refactorName, originalRange, textRange } = args[1];
	        const edits = lang.getEditsForRefactor(path, {}, textRange, refactorName, command, userPreferences);
	        if (!edits || edits.edits.length === 0) {
	            return null;
	        }
	        const documentChanges = edits?.edits.map((edit) => vscode_languageserver_1.TextDocumentEdit.create(vscode_languageserver_1.OptionalVersionedTextDocumentIdentifier.create(document.uri, null), edit.textChanges.map((edit) => {
	            const range = (0, documents_1.mapRangeToOriginal)(tsDoc, (0, utils_2.convertRange)(tsDoc, edit.span));
	            return vscode_languageserver_1.TextEdit.replace(this.checkEndOfFileCodeInsert(range, originalRange, document), edit.newText);
	        })));
	        return { documentChanges };
	    }
	    checkEndOfFileCodeInsert(resultRange, targetRange, document) {
	        if (resultRange.start.line < 0 || resultRange.end.line < 0) {
	            if (document.moduleScriptInfo &&
	                (!targetRange || (0, documents_1.isRangeInTag)(targetRange, document.moduleScriptInfo))) {
	                return vscode_languageserver_1.Range.create(document.moduleScriptInfo.endPos, document.moduleScriptInfo.endPos);
	            }
	            if (document.scriptInfo) {
	                return vscode_languageserver_1.Range.create(document.scriptInfo.endPos, document.scriptInfo.endPos);
	            }
	        }
	        return resultRange;
	    }
	    checkTsNoCheckCodeInsert(document, edit) {
	        const scriptInfo = document.moduleScriptInfo ?? document.scriptInfo;
	        if (!scriptInfo) {
	            return undefined;
	        }
	        const newText = typescript_1.default.sys.newLine + edit.newText;
	        return vscode_languageserver_1.TextEdit.insert(scriptInfo.startPos, newText);
	    }
	    checkDisableJsDiagnosticsCodeInsert(originalRange, document, edit) {
	        const inModuleScript = (0, documents_1.isInTag)(originalRange.start, document.moduleScriptInfo);
	        if (!(0, documents_1.isInTag)(originalRange.start, document.scriptInfo) && !inModuleScript) {
	            return null;
	        }
	        const position = inModuleScript
	            ? originalRange.start
	            : (this.fixPropsCodeActionRange(originalRange.start, document) ?? originalRange.start);
	        const linesOfNewText = edit.newText.split('\n');
	        if (/^[ \t]*$/.test(linesOfNewText[linesOfNewText.length - 1])) {
	            const line = (0, documents_1.getLineAtPosition)(originalRange.start, document.getText());
	            const indent = (0, utils_1.getIndent)(line);
	            linesOfNewText[linesOfNewText.length - 1] = indent;
	        }
	        return vscode_languageserver_1.TextEdit.insert(position, linesOfNewText.join('\n'));
	    }
	    fixPropsCodeActionRange(start, document) {
	        const documentText = document.getText();
	        const offset = document.offsetAt(start);
	        const exportKeywordOffset = documentText.lastIndexOf('export', offset);
	        if (exportKeywordOffset < 0 ||
	            documentText.slice(exportKeywordOffset + 'export'.length, offset).trim()) {
	            return;
	        }
	        const charBeforeExport = documentText[exportKeywordOffset - 1];
	        if ((charBeforeExport !== undefined && !charBeforeExport.trim()) ||
	            charBeforeExport === ';') {
	            return document.positionAt(exportKeywordOffset);
	        }
	    }
	    checkAddJsDocCodeActionRange(snapshot, originalRange, document) {
	        if (snapshot.scriptKind !== typescript_1.default.ScriptKind.JS &&
	            snapshot.scriptKind !== typescript_1.default.ScriptKind.JSX &&
	            !(0, documents_1.isInTag)(originalRange.start, document.scriptInfo)) {
	            return originalRange;
	        }
	        const position = this.fixPropsCodeActionRange(originalRange.start, document);
	        if (position) {
	            return {
	                start: position,
	                end: position
	            };
	        }
	        return originalRange;
	    }
	    async getLSAndTSDoc(document) {
	        return this.lsAndTsDocResolver.getLSAndTSDoc(document);
	    }
	    async addMissingImports(document, cancellationToken) {
	        const { lang, tsDoc } = await this.getLSAndTSDoc(document);
	        if (cancellationToken?.isCancellationRequested) {
	            return [];
	        }
	        const diagnostics = lang.getSemanticDiagnostics(tsDoc.filePath);
	        const hasMissingImports = diagnostics.some((diag) => (diag.code === DiagnosticsProvider_1.DiagnosticCode.CANNOT_FIND_NAME ||
	            diag.code === DiagnosticsProvider_1.DiagnosticCode.CANNOT_FIND_NAME_X_DID_YOU_MEAN_Y) &&
	            !(0, utils_3.isTextSpanInGeneratedCode)(tsDoc.getFullText(), {
	                start: diag.start ?? 0,
	                length: diag.length ?? 0
	            }));
	        if (!hasMissingImports) {
	            return [];
	        }
	        const codeAction = vscode_languageserver_1.CodeAction.create(FIX_IMPORT_FIX_DESCRIPTION, exports.ADD_MISSING_IMPORTS_CODE_ACTION_KIND);
	        const data = {
	            uri: document.uri,
	            fixName: FIX_IMPORT_FIX_NAME,
	            fixId: FIX_IMPORT_FIX_ID
	        };
	        codeAction.data = data;
	        return [codeAction];
	    }
	}
	exports.CodeActionsProviderImpl = CodeActionsProviderImpl;
} (CodeActionsProvider));
getDefaultExportFromCjs(CodeActionsProvider);

var CompletionProvider = {};

var previewer = {};

var __importDefault$m = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(previewer, "__esModule", { value: true });
previewer.getTagDocumentation = getTagDocumentation;
previewer.plain = plain;
previewer.getMarkdownDocumentation = getMarkdownDocumentation;
const typescript_1$j = __importDefault$m(ts);
const utils_1$A = utils$6;
function replaceLinks(text) {
    return (text
        .replace(/\{@(link|linkplain|linkcode) (https?:\/\/[^ |}]+?)(?:[| ]([^{}\n]+?))?\}/gi, (_, tag, link, text) => {
        switch (tag) {
            case 'linkcode':
                return `[\`${text ? text.trim() : link}\`](${link})`;
            default:
                return `[${text ? text.trim() : link}](${link})`;
        }
    }));
}
function processInlineTags(text) {
    return replaceLinks(text);
}
function getTagBodyText(tag) {
    if (!tag.text) {
        return undefined;
    }
    function makeCodeblock(text) {
        if (text.match(/^\s*[~`]{3}/g)) {
            return text;
        }
        return '```\n' + text + '\n```';
    }
    function makeExampleTag(text) {
        const captionTagMatches = text.match(/<caption>(.*?)<\/caption>\s*(\r\n|\n)/);
        if (captionTagMatches && captionTagMatches.index === 0) {
            return (captionTagMatches[1] +
                '\n\n' +
                makeCodeblock(text.substr(captionTagMatches[0].length)));
        }
        else {
            return makeCodeblock(text);
        }
    }
    function makeEmailTag(text) {
        const emailMatch = text.match(/(.+)\s<([-.\w]+@[-.\w]+)>/);
        if (emailMatch === null) {
            return text;
        }
        else {
            return `${emailMatch[1]} ${emailMatch[2]}`;
        }
    }
    switch (tag.name) {
        case 'example':
            return makeExampleTag(typescript_1$j.default.displayPartsToString(tag.text));
        case 'author':
            return makeEmailTag(typescript_1$j.default.displayPartsToString(tag.text));
        case 'default':
            return makeCodeblock(typescript_1$j.default.displayPartsToString(tag.text));
    }
    return processInlineTags(typescript_1$j.default.displayPartsToString(tag.text));
}
function getTagDocumentation(tag) {
    function getWithType() {
        const body = (typescript_1$j.default.displayPartsToString(tag.text) || '').split(/^(\S+)\s*-?\s*/);
        if (body?.length === 3) {
            const param = body[1];
            const doc = body[2];
            const label = `*@${tag.name}* \`${param}\``;
            if (!doc) {
                return label;
            }
            return (label +
                (doc.match(/\r\n|\n/g)
                    ? '  \n' + processInlineTags(doc)
                    : ` — ${processInlineTags(doc)}`));
        }
    }
    switch (tag.name) {
        case 'augments':
        case 'extends':
        case 'param':
        case 'template':
            return getWithType();
    }
    const label = `*@${tag.name}*`;
    const text = getTagBodyText(tag);
    if (!text) {
        return label;
    }
    return label + (text.match(/\r\n|\n/g) ? '  \n' + text : ` — ${text}`);
}
function plain(parts) {
    return processInlineTags(typeof parts === 'string' ? parts : typescript_1$j.default.displayPartsToString(parts));
}
function getMarkdownDocumentation(documentation, tags) {
    let result = [];
    if (documentation) {
        result.push(plain(documentation));
    }
    if (tags) {
        result = result.concat(tags.map(getTagDocumentation));
    }
    return result.filter(utils_1$A.isNotNullOrUndefined).join('\n\n');
}

var getJsDocTemplateCompletion$1 = {};

var __importDefault$l = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(getJsDocTemplateCompletion$1, "__esModule", { value: true });
getJsDocTemplateCompletion$1.getJsDocTemplateCompletion = getJsDocTemplateCompletion;
const typescript_1$i = __importDefault$l(ts);
const vscode_languageserver_1$o = main$8;
const documents_1$o = documents;
const DEFAULT_SNIPPET = `/**${typescript_1$i.default.sys.newLine} * $0${typescript_1$i.default.sys.newLine} */`;
function getJsDocTemplateCompletion(snapshot, lang, filePath, offset) {
    const template = lang.getDocCommentTemplateAtPosition(filePath, offset);
    if (!template) {
        return null;
    }
    const text = snapshot.getFullText();
    const lineStart = text.lastIndexOf('\n', offset);
    const lineEnd = text.indexOf('\n', offset);
    const isLastLine = lineEnd === -1;
    const line = text.substring(lineStart, isLastLine ? undefined : lineEnd);
    const character = offset - lineStart;
    const start = line.lastIndexOf('/**', character) + lineStart;
    const suffix = line.slice(character).match(/^\s*\**\//);
    const textEditRange = (0, documents_1$o.mapRangeToOriginal)(snapshot, vscode_languageserver_1$o.Range.create(snapshot.positionAt(start), snapshot.positionAt(offset + (suffix?.[0]?.length ?? 0))));
    const { newText } = template;
    const snippet =
    newText === '/** */' ? DEFAULT_SNIPPET : templateToSnippet(newText);
    const item = {
        label: '/** */',
        detail: 'JSDoc comment',
        sortText: '\0',
        kind: vscode_languageserver_1$o.CompletionItemKind.Snippet,
        textEdit: vscode_languageserver_1$o.TextEdit.replace(textEditRange, snippet),
        insertTextFormat: vscode_languageserver_1$o.InsertTextFormat.Snippet
    };
    return vscode_languageserver_1$o.CompletionList.create([item]);
}
function templateToSnippet(text) {
    return (text
        .replace(/\$/g, '\\$')
        .split('\n')
        .map((part) => part.replace(/^\s*(?=(\/|[ ]\*))/g, ''))
        .join('\n')
        .replace(/^(\/\*\*\s*\*[ ]*)$/m, (x) => x + '$0'));
}

var __importDefault$k = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(CompletionProvider, "__esModule", { value: true });
CompletionProvider.CompletionsProviderImpl = void 0;
const path_1$8 = path$1;
const typescript_1$h = __importDefault$k(ts);
const vscode_languageserver_1$n = main$8;
const documents_1$n = documents;
const parseHtml_1$3 = requireParseHtml();
const utils_1$z = utils$6;
const previewer_1$2 = previewer;
const utils_2$m = utils$2;
const getJsDocTemplateCompletion_1 = getJsDocTemplateCompletion$1;
const utils_3$e = requireUtils();
const svelte_ast_utils_1$4 = svelteAstUtils;
const svelte2tsx_1$5 = require$$0;
const ENSURE_COMPONENT_HELPER$1 = '__sveltets_2_ensureComponent';
class CompletionsProviderImpl {
    constructor(lsAndTsDocResolver, configManager) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
        this.configManager = configManager;
        this.validTriggerCharacters = ['.', '"', "'", '`', '/', '@', '<', '#'];
        this.commitCharacters = ['.', ',', ';', '('];
    }
    isValidTriggerCharacter(character) {
        return this.validTriggerCharacters.includes(character);
    }
    async getCompletions(document, position, completionContext, cancellationToken) {
        if ((0, documents_1$n.isInTag)(position, document.styleInfo)) {
            return null;
        }
        const { lang: langForSyntheticOperations, tsDoc, userPreferences } = await this.lsAndTsDocResolver.getLsForSyntheticOperations(document);
        const filePath = tsDoc.filePath;
        if (!filePath) {
            return null;
        }
        const triggerCharacter = completionContext?.triggerCharacter;
        const triggerKind = completionContext?.triggerKind;
        const validTriggerCharacter = this.isValidTriggerCharacter(triggerCharacter)
            ? triggerCharacter
            : undefined;
        const isCustomTriggerCharacter = triggerKind === vscode_languageserver_1$n.CompletionTriggerKind.TriggerCharacter;
        const isJsDocTriggerCharacter = triggerCharacter === '*';
        const isEventOrSlotLetTriggerCharacter = triggerCharacter === ':';
        if (isCustomTriggerCharacter &&
            !validTriggerCharacter &&
            !isJsDocTriggerCharacter &&
            !isEventOrSlotLetTriggerCharacter) {
            return null;
        }
        if (this.canReuseLastCompletion(this.lastCompletion, triggerKind, triggerCharacter, document, position)) {
            this.lastCompletion.position = position;
            return this.lastCompletion.completionList;
        }
        else {
            this.lastCompletion = undefined;
        }
        if (!tsDoc.isInGenerated(position)) {
            return null;
        }
        const originalOffset = document.offsetAt(position);
        let offset = tsDoc.offsetAt(tsDoc.getGeneratedPosition(position));
        if (isJsDocTriggerCharacter) {
            return (0, getJsDocTemplateCompletion_1.getJsDocTemplateCompletion)(tsDoc, langForSyntheticOperations, filePath, offset);
        }
        const svelteNode = tsDoc.svelteNodeAt(originalOffset);
        if (
        (svelteNode?.type === 'Text' &&
            [
                'Element',
                'InlineComponent',
                'Fragment',
                'SlotTemplate',
                'SnippetBlock',
                'IfBlock',
                'EachBlock',
                'AwaitBlock'
            ].includes(svelteNode.parent?.type)) ||
            document.getText().substring(originalOffset - 1, originalOffset + 2) === '></') {
            return null;
        }
        const { lang, lsContainer } = await this.lsAndTsDocResolver.getLSAndTSDoc(document);
        if (cancellationToken?.isCancellationRequested) {
            return null;
        }
        const inScript = (0, utils_2$m.isInScript)(position, tsDoc);
        const wordInfo = this.getWordAtPosition(document, originalOffset);
        if (!inScript &&
            wordInfo.word[0] === '{' &&
            (wordInfo.word[1] === '#' ||
                wordInfo.word[1] === '@' ||
                wordInfo.word[1] === ':' ||
                wordInfo.word[1] === '/')) {
            return null;
        }
        if (!inScript &&
            wordInfo.word === '' &&
            document.getText()[originalOffset - 1] === '.' &&
            tsDoc.getFullText()[offset] === '.') {
            offset++;
        }
        const componentInfo = (0, utils_3$e.getComponentAtPosition)(lang, document, tsDoc, position);
        const attributeContext = componentInfo && (0, parseHtml_1$3.getAttributeContextAtPosition)(document, position);
        const eventAndSlotLetCompletions = this.getEventAndSlotLetCompletions(componentInfo, attributeContext, wordInfo.defaultTextEditRange);
        if (isEventOrSlotLetTriggerCharacter) {
            return vscode_languageserver_1$n.CompletionList.create(eventAndSlotLetCompletions, !!tsDoc.parserError);
        }
        const tagCompletions = componentInfo || eventAndSlotLetCompletions.length > 0
            ? []
            : this.getCustomElementCompletions(lang, lsContainer, document, tsDoc, position);
        const formatSettings = await this.configManager.getFormatCodeSettingsForFile(document, tsDoc.scriptKind);
        if (cancellationToken?.isCancellationRequested) {
            return null;
        }
        if (svelteNode?.type === 'InlineComponent' &&
            'name' in svelteNode &&
            typeof svelteNode.name === 'string') {
            const name = svelteNode.name;
            const nameEnd = svelteNode.start + 1 + name.length;
            const mightBeAtStartTagWhitespace = this.mightBeAtStartTagWhitespace(document, originalOffset);
            const generatedText = tsDoc.getFullText();
            if (mightBeAtStartTagWhitespace && originalOffset > nameEnd) {
                if (!generatedText.slice(0, offset).endsWith('props: {')) {
                    return this.getCompletionListForDirectiveOrProps(attributeContext, componentInfo, wordInfo.defaultTextEditRange, eventAndSlotLetCompletions, tsDoc);
                }
            }
            else {
                const componentNameOffByOne = generatedText
                    .slice(0, offset + 1)
                    .endsWith(ENSURE_COMPONENT_HELPER$1 + '(' + name);
                if (componentNameOffByOne) {
                    offset++;
                }
            }
        }
        const response = lang.getCompletionsAtPosition(filePath, offset, {
            ...userPreferences,
            triggerCharacter: validTriggerCharacter
        }, formatSettings);
        const commitCharactersOptions = this.getCommitCharactersOptions(response, tsDoc, position);
        let completions = response?.entries || [];
        const customCompletions = eventAndSlotLetCompletions.concat(tagCompletions ?? []);
        if (completions.length === 0 && customCompletions.length === 0) {
            return tsDoc.parserError ? vscode_languageserver_1$n.CompletionList.create([], true) : null;
        }
        if (completions.length > 500 &&
            svelteNode?.type === 'Element' &&
            completions[0].kind !== typescript_1$h.default.ScriptElementKind.memberVariableElement) {
            return null;
        }
        if (completions.length > 500 &&
            svelteNode?.type === 'InlineComponent' &&
            this.mightBeAtStartTagWhitespace(document, originalOffset)) {
            return this.getCompletionListForDirectiveOrProps(attributeContext, componentInfo, wordInfo.defaultTextEditRange, eventAndSlotLetCompletions, tsDoc);
        }
        const existingImports = this.getExistingImports(document);
        const fileUrl = (0, utils_1$z.pathToUrl)(tsDoc.filePath);
        const isCompletionInTag = (0, svelte_ast_utils_1$4.isInTag)(svelteNode, originalOffset);
        const isHandlerCompletion = svelteNode?.type === 'EventHandler' && svelteNode.parent?.type === 'Element';
        const preferComponents = wordInfo.word[0] === '<' || inScript;
        const completionItems = customCompletions;
        const isValidCompletion = createIsValidCompletion(document, position, !!tsDoc.parserError);
        const addCompletion = (entry, asStore) => {
            if (isValidCompletion(entry)) {
                let completion = this.toCompletionItem(tsDoc, entry, fileUrl, position, isCompletionInTag, commitCharactersOptions, asStore, existingImports, preferComponents);
                if (completion) {
                    completionItems.push(this.fixTextEditRange(wordInfo.range, (0, documents_1$n.mapCompletionItemToOriginal)(tsDoc, completion), isHandlerCompletion, completion.textEdit, tsDoc));
                }
            }
        };
        if (wordInfo.word.charAt(0) === '$') {
            const storeName = wordInfo.word.substring(1);
            const typeChecker = lang.getProgram()?.getTypeChecker();
            const text = '__sveltets_2_store_get(' + storeName;
            if (!tsDoc.getFullText().includes(text) && typeChecker) {
                const pos = (tsDoc.scriptInfo || tsDoc.moduleScriptInfo)?.endPos ?? {
                    line: 0,
                    character: 0
                };
                const virtualOffset = tsDoc.offsetAt(tsDoc.getGeneratedPosition(pos));
                const storeCompletions = lang.getCompletionsAtPosition(filePath, virtualOffset, {
                    ...userPreferences,
                    includeSymbol: true,
                    triggerCharacter: validTriggerCharacter
                }, formatSettings);
                for (const entry of storeCompletions?.entries || []) {
                    if (entry.symbol &&
                        entry.source &&
                        entry.name.startsWith(storeName) &&
                        !entry.name.startsWith('$') &&
                        !(0, utils_2$m.isGeneratedSvelteComponentName)(entry.name)) {
                        const aliasedSymbol = entry.symbol.flags & typescript_1$h.default.SymbolFlags.Alias
                            ? typeChecker.getAliasedSymbol(entry.symbol)
                            : entry.symbol;
                        if (aliasedSymbol.flags & typescript_1$h.default.SymbolFlags.Variable) {
                            addCompletion(entry, true);
                        }
                    }
                }
            }
        }
        for (const entry of completions) {
            addCompletion(entry, false);
        }
        if ((0, path_1$8.basename)(filePath).startsWith('+')) {
            const $typeImports = new Map();
            for (const c of completionItems) {
                if ((0, utils_3$e.isKitTypePath)(c.data?.source)) {
                    $typeImports.set(c.label, c);
                }
            }
            for (const $typeImport of $typeImports.values()) {
                const routesFolder = document.config?.kit?.files?.routes || 'src/routes';
                const relativeFileName = filePath.split(routesFolder)[1]?.slice(1);
                if (relativeFileName) {
                    const relativePath = (0, path_1$8.dirname)(relativeFileName) === '.' ? '' : `${(0, path_1$8.dirname)(relativeFileName)}/`;
                    const modifiedSource = $typeImport.data.source.split('.svelte-kit/types')[0] +
                        `.svelte-kit/types/${routesFolder}/${relativePath}$types`;
                    completionItems.push({
                        ...$typeImport,
                        sortText: !isNaN(Number($typeImport.sortText))
                            ? String(Number($typeImport.sortText) - 1)
                            : $typeImport.sortText,
                        data: {
                            ...$typeImport.data,
                            __is_sveltekit$typeImport: true,
                            source: modifiedSource,
                            data: undefined
                        }
                    });
                }
            }
        }
        const completionList = vscode_languageserver_1$n.CompletionList.create(completionItems, !!tsDoc.parserError);
        if (commitCharactersOptions.checkCommitCharacters &&
            commitCharactersOptions.defaultCommitCharacters?.length) {
            const clientSupportsItemsDefault = this.configManager
                .getClientCapabilities()
                ?.textDocument?.completion?.completionList?.itemDefaults?.includes('commitCharacters');
            if (clientSupportsItemsDefault) {
                completionList.itemDefaults = {
                    commitCharacters: commitCharactersOptions.defaultCommitCharacters
                };
            }
            else {
                completionList.items.forEach((item) => {
                    item.commitCharacters ??= commitCharactersOptions.defaultCommitCharacters;
                });
            }
        }
        this.lastCompletion = { key: document.getFilePath() || '', position, completionList };
        return completionList;
    }
    getWordAtPosition(document, offset) {
        const wordRange = (0, documents_1$n.getWordRangeAt)(document.getText(), offset, {
            left: /[^\s.]+$/,
            right: /[^\w$:]/
        });
        const range = vscode_languageserver_1$n.Range.create(document.positionAt(wordRange.start), document.positionAt(wordRange.end));
        return {
            wordRange,
            word: document.getText().slice(wordRange.start, wordRange.end),
            range,
            defaultTextEditRange: wordRange.start === wordRange.end ? undefined : range
        };
    }
    mightBeAtStartTagWhitespace(document, originalOffset) {
        return /\s[\s>/]/.test(document.getText().substring(originalOffset - 1, originalOffset + 1));
    }
    canReuseLastCompletion(lastCompletion, triggerKind, triggerCharacter, document, position) {
        return (!!lastCompletion &&
            lastCompletion.key === document.getFilePath() &&
            lastCompletion.position.line === position.line &&
            ((Math.abs(lastCompletion.position.character - position.character) < 2 &&
                (triggerKind === vscode_languageserver_1$n.CompletionTriggerKind.TriggerForIncompleteCompletions ||
                    (triggerCharacter === '.' &&
                        (0, utils_3$e.isPartOfImportStatement)(document.getText(), position)))) ||
                (Math.abs(lastCompletion.position.character - position.character) < 4 &&
                    triggerCharacter === ':' &&
                    !!(0, documents_1$n.getNodeIfIsInStartTag)(document.html, document.offsetAt(position)))));
    }
    getExistingImports(document) {
        const rawImports = (0, utils_1$z.getRegExpMatches)(scriptImportRegex, document.getText()).map((match) => (match[1] ?? match[2]).split(','));
        const tidiedImports = rawImports.flat().map((match) => match.trim());
        return new Set(tidiedImports);
    }
    getEventAndSlotLetCompletions(componentInfo, attributeContext, defaultTextEditRange) {
        if (componentInfo === null) {
            return [];
        }
        if (attributeContext?.inValue) {
            return [];
        }
        return [
            ...componentInfo
                .getEvents()
                .map((event) => this.componentInfoToCompletionEntry(event, 'on:', undefined, defaultTextEditRange)),
            ...componentInfo
                .getSlotLets()
                .map((slot) => this.componentInfoToCompletionEntry(slot, 'let:', undefined, defaultTextEditRange))
        ];
    }
    getCustomElementCompletions(lang, lsContainer, document, tsDoc, position) {
        const offset = document.offsetAt(position);
        const tag = (0, documents_1$n.getNodeIfIsInTagName)(document.html, offset);
        if (!tag || !tag.tag) {
            return;
        }
        let tags = (0, utils_3$e.getCustomElementsTags)(lang, lsContainer, tsDoc).filter((t) => t.startsWith(tag.tag));
        const tagNameEnd = tag.start + 1 + (tag.tag?.length ?? 0);
        const replacementRange = (0, documents_1$n.toRange)(document, tag.start + 1, tagNameEnd);
        return tags.map((tag) => ({
            label: tag,
            data: {
                uri: document.uri,
                position,
                name: tag,
                __is_custom_element: true
            },
            kind: vscode_languageserver_1$n.CompletionItemKind.Property,
            textEdit: vscode_languageserver_1$n.TextEdit.replace((0, utils_2$m.cloneRange)(replacementRange), tag),
            commitCharacters: []
        }));
    }
    componentInfoToCompletionEntry(info, prefix, kind, defaultTextEditRange) {
        const name = prefix + info.name;
        return {
            label: name,
            kind,
            sortText: '-1',
            detail: info.name + ': ' + info.type,
            documentation: info.doc && { kind: vscode_languageserver_1$n.MarkupKind.Markdown, value: info.doc },
            commitCharacters: [],
            textEdit: defaultTextEditRange
                ? vscode_languageserver_1$n.TextEdit.replace((0, utils_2$m.cloneRange)(defaultTextEditRange), name)
                : undefined
        };
    }
    getCompletionListForDirectiveOrProps(attributeContext, componentInfo, defaultTextEditRange, eventAndSlotLetCompletions, tsDoc) {
        const props = (!attributeContext?.inValue &&
            componentInfo
                ?.getProps()
                .map((entry) => this.componentInfoToCompletionEntry(entry, '', vscode_languageserver_1$n.CompletionItemKind.Field, defaultTextEditRange))) ||
            [];
        return vscode_languageserver_1$n.CompletionList.create([...eventAndSlotLetCompletions, ...props], !!tsDoc.parserError);
    }
    toCompletionItem(snapshot, comp, uri, position, isCompletionInTag, commitCharactersOptions, asStore, existingImports, preferComponents) {
        const completionLabelAndInsert = this.getCompletionLabelAndInsert(snapshot, comp);
        if (!completionLabelAndInsert) {
            return null;
        }
        let { label, insertText, isSvelteComp, isRunesCompletion, replacementSpan } = completionLabelAndInsert;
        if (isSvelteComp && existingImports.has(label)) {
            return null;
        }
        if (isCompletionInTag &&
            !insertText &&
            label[0] === '"' &&
            label[label.length - 1] === '"') {
            label = label.slice(1, -1);
        }
        else if (asStore) {
            label = `$${label}`;
        }
        const textEdit = replacementSpan
            ? vscode_languageserver_1$n.TextEdit.replace((0, utils_2$m.convertRange)(snapshot, replacementSpan), insertText ?? label)
            : undefined;
        const labelDetails = comp.labelDetails ??
            (comp.sourceDisplay
                ? {
                    description: typescript_1$h.default.displayPartsToString(comp.sourceDisplay)
                }
                : undefined);
        return {
            label,
            insertText,
            kind: (0, utils_2$m.scriptElementKindToCompletionItemKind)(comp.kind),
            commitCharacters: this.getCommitCharacters(comp, commitCharactersOptions, isSvelteComp),
            sortText: preferComponents && (isRunesCompletion || isSvelteComp) ? '-1' : comp.sortText,
            preselect: preferComponents && (isRunesCompletion || isSvelteComp) ? true : comp.isRecommended,
            insertTextFormat: comp.isSnippet ? vscode_languageserver_1$n.InsertTextFormat.Snippet : undefined,
            labelDetails,
            textEdit,
            data: {
                name: comp.name,
                source: comp.source,
                data: comp.data,
                uri,
                position
            }
        };
    }
    getCompletionLabelAndInsert(snapshot, comp) {
        let { name, insertText, kindModifiers } = comp;
        const isScriptElement = comp.kind === typescript_1$h.default.ScriptElementKind.scriptElement;
        const hasModifier = Boolean(comp.kindModifiers);
        const isRunesCompletion = name === '$props' || name === '$state' || name === '$derived' || name === '$effect';
        const isSvelteComp = !isRunesCompletion && (0, utils_2$m.isGeneratedSvelteComponentName)(name);
        if (isSvelteComp) {
            name = (0, utils_2$m.changeSvelteComponentName)(name);
            if (this.isExistingSvelteComponentImport(snapshot, name, comp.source)) {
                return null;
            }
        }
        if (isScriptElement && hasModifier) {
            const label = kindModifiers && !name.endsWith(kindModifiers) ? name + kindModifiers : name;
            return {
                insertText: name,
                label,
                isSvelteComp,
                isRunesCompletion
            };
        }
        if (comp.replacementSpan) {
            return {
                label: name,
                isSvelteComp,
                isRunesCompletion,
                insertText: insertText ? (0, utils_2$m.changeSvelteComponentName)(insertText) : undefined,
                replacementSpan: comp.replacementSpan
            };
        }
        return {
            label: name,
            insertText,
            isSvelteComp,
            isRunesCompletion
        };
    }
    getCommitCharactersOptions(response, tsDoc, position) {
        if ((!(0, utils_2$m.isInScript)(position, tsDoc) && tsDoc.parserError) || !response) {
            return {
                checkCommitCharacters: false
            };
        }
        const isNewIdentifierLocation = response.isNewIdentifierLocation;
        let defaultCommitCharacters = response.defaultCommitCharacters
            ? Array.from(response.defaultCommitCharacters)
            : undefined;
        if (!isNewIdentifierLocation) {
            if (defaultCommitCharacters) {
                defaultCommitCharacters?.push('(');
            }
            else {
                defaultCommitCharacters = this.commitCharacters;
            }
        }
        return {
            checkCommitCharacters: true,
            defaultCommitCharacters,
            isNewIdentifierLocation
        };
    }
    getCommitCharacters(entry, options, isSvelteComp) {
        if (isSvelteComp) {
            return ['>'];
        }
        if (!options.checkCommitCharacters) {
            return undefined;
        }
        const commitCharacters = entry.commitCharacters;
        const skipCommitCharacters = entry.kind === typescript_1$h.default.ScriptElementKind.warning ||
            entry.kind === typescript_1$h.default.ScriptElementKind.string;
        if (commitCharacters) {
            if (!options.isNewIdentifierLocation && !skipCommitCharacters) {
                return commitCharacters.concat('(');
            }
            return commitCharacters;
        }
        return skipCommitCharacters ? [] : undefined;
    }
    isExistingSvelteComponentImport(snapshot, name, source) {
        if (!source)
            return false;
        const importStatement = new RegExp(`import ${name} from ["'\`][\\s\\S]+\\.svelte["'\`]`);
        return importStatement.test(snapshot.getFullText());
    }
    fixTextEditRange(wordRange, completionItem, isHandlerCompletion, generatedTextEdit, tsDoc) {
        if (isHandlerCompletion && completionItem.label.startsWith('on:')) {
            completionItem.textEdit = vscode_languageserver_1$n.TextEdit.replace((0, utils_2$m.cloneRange)(wordRange), completionItem.label);
            return completionItem;
        }
        const { textEdit } = completionItem;
        if (!textEdit || !vscode_languageserver_1$n.TextEdit.is(textEdit)) {
            return completionItem;
        }
        if (vscode_languageserver_1$n.TextEdit.is(generatedTextEdit)) {
            (0, utils_3$e.checkRangeMappingWithGeneratedSemi)(textEdit.range, generatedTextEdit.range, tsDoc);
        }
        const { newText, range: { start } } = textEdit;
        if (start.line !== wordRange.start.line || start.character > wordRange.start.character) {
            return completionItem;
        }
        textEdit.newText = newText.substring(wordRange.start.character - start.character);
        textEdit.range.start = {
            line: start.line,
            character: wordRange.start.character
        };
        completionItem.additionalTextEdits = [
            vscode_languageserver_1$n.TextEdit.replace({
                start,
                end: {
                    line: start.line,
                    character: wordRange.start.character
                }
            }, newText.substring(0, wordRange.start.character - start.character))
        ];
        return completionItem;
    }
    fixUserPreferencesForSvelteComponentImport(userPreferences) {
        if (userPreferences.importModuleSpecifierEnding === 'js') {
            return {
                ...userPreferences,
                importModuleSpecifierEnding: 'index'
            };
        }
        return userPreferences;
    }
    async resolveCompletion(document, completionItem, cancellationToken) {
        const { data: comp } = completionItem;
        const { tsDoc, lang, userPreferences, lsContainer } = await this.lsAndTsDocResolver.getLSAndTSDoc(document);
        const filePath = tsDoc.filePath;
        const formatCodeOptions = await this.configManager.getFormatCodeSettingsForFile(document, tsDoc.scriptKind);
        if (!comp || !filePath || cancellationToken?.isCancellationRequested) {
            return completionItem;
        }
        if (comp.__is_custom_element) {
            const doc = (0, utils_3$e.getCustomElementsDocument)(lang, lsContainer, tsDoc, comp.name);
            if (doc) {
                completionItem.documentation = { value: doc, kind: vscode_languageserver_1$n.MarkupKind.Markdown };
            }
            return completionItem;
        }
        const is$typeImport = !!comp.__is_sveltekit$typeImport;
        const errorPreventingUserPreferences = comp.source?.endsWith('.svelte')
            ? this.fixUserPreferencesForSvelteComponentImport(userPreferences)
            : userPreferences;
        const detail = lang.getCompletionEntryDetails(filePath, tsDoc.offsetAt(tsDoc.getGeneratedPosition(comp.position)), comp.name, formatCodeOptions, comp.source, errorPreventingUserPreferences, comp.data);
        if (detail) {
            const { detail: itemDetail, documentation: itemDocumentation } = this.getCompletionDocument(tsDoc, detail, is$typeImport);
            if (detail.sourceDisplay && !completionItem.labelDetails) {
                completionItem.labelDetails = {
                    description: typescript_1$h.default.displayPartsToString(detail.sourceDisplay)
                };
            }
            completionItem.detail = itemDetail;
            completionItem.documentation = itemDocumentation;
        }
        const actions = detail?.codeActions;
        const isImport = !!detail?.source;
        if (actions) {
            const edit = [];
            const formatCodeBasis = (0, utils_3$e.getFormatCodeBasis)(formatCodeOptions);
            for (const action of actions) {
                for (const change of action.changes) {
                    edit.push(...this.codeActionChangesToTextEdit(document, tsDoc, change, isImport, comp.position, formatCodeBasis.newLine, is$typeImport));
                }
            }
            completionItem.additionalTextEdits = (completionItem.additionalTextEdits ?? []).concat(edit);
        }
        return completionItem;
    }
    getCompletionDocument(tsDoc, compDetail, is$typeImport) {
        const { sourceDisplay, documentation: tsDocumentation, displayParts, tags } = compDetail;
        let parts = compDetail.codeActions?.map((codeAction) => codeAction.description) ?? [];
        if (sourceDisplay && is$typeImport) {
            const importPath = typescript_1$h.default.displayPartsToString(sourceDisplay);
            parts = parts.map((detail) => detail.replace(importPath, `'./$types${importPath.endsWith('.js') ? '.js' : ''}'`));
        }
        let text = (0, utils_2$m.changeSvelteComponentName)(typescript_1$h.default.displayPartsToString(displayParts));
        if (tsDoc.isSvelte5Plus && text.includes('(alias)')) {
            if (text.includes('__SvelteComponent_')) {
                text = '';
            }
            else if (text.includes('__sveltets_2_IsomorphicComponent')) {
                text = text.substring(text.lastIndexOf('import'));
            }
        }
        parts.push(text);
        const markdownDoc = (0, previewer_1$2.getMarkdownDocumentation)(tsDocumentation, tags);
        const documentation = markdownDoc
            ? { value: markdownDoc, kind: vscode_languageserver_1$n.MarkupKind.Markdown }
            : undefined;
        return {
            documentation,
            detail: parts.filter(Boolean).join('\n\n')
        };
    }
    codeActionChangesToTextEdit(doc, snapshot, changes, isImport, originalTriggerPosition, newLine, is$typeImport) {
        return changes.textChanges.map((change) => this.codeActionChangeToTextEdit(doc, snapshot, change, isImport, originalTriggerPosition, newLine, is$typeImport));
    }
    codeActionChangeToTextEdit(doc, snapshot, change, isImport, originalTriggerPosition, newLine, is$typeImport, isCombinedCodeAction) {
        change.newText = isCombinedCodeAction
            ? (0, utils_1$z.modifyLines)(change.newText, (line) => this.fixImportNewText(line, (0, utils_2$m.isInScript)(originalTriggerPosition, doc), is$typeImport))
            : this.fixImportNewText(change.newText, (0, utils_2$m.isInScript)(originalTriggerPosition, doc), is$typeImport);
        const scriptTagInfo = snapshot.scriptInfo || snapshot.moduleScriptInfo;
        if (!scriptTagInfo) {
            if (isCombinedCodeAction) {
                return vscode_languageserver_1$n.TextEdit.insert(vscode_languageserver_1$n.Position.create(0, 0), change.newText);
            }
            const config = this.configManager.getConfig();
            let newText = change.newText;
            if (newText[0] === '\r') {
                newText = newText.substring(1);
            }
            if (newText[0] === '\n') {
                newText = newText.substring(1);
            }
            return vscode_languageserver_1$n.TextEdit.replace(beginOfDocumentRange, `${(0, utils_3$e.getNewScriptStartTag)(config, newLine)}${newText}</script>${newLine}`);
        }
        const { span } = change;
        const virtualRange = (0, utils_2$m.convertRange)(snapshot, span);
        let range;
        const isNewImport = isImport && virtualRange.start.character === 0;
        if (isNewImport && virtualRange.start.line > 1) {
            range = this.mapRangeForNewImport(snapshot, virtualRange);
        }
        else {
            range = (0, documents_1$n.mapRangeToOriginal)(snapshot, virtualRange);
        }
        if (range.start.line === -1 ||
            (range.start.line === 0 && range.start.character <= 1 && span.length === 0) ||
            !(0, utils_2$m.isInScript)(range.start, snapshot)) {
            range = (0, utils_2$m.convertRange)(doc, {
                start: (0, documents_1$n.isInTag)(originalTriggerPosition, doc.scriptInfo)
                    ? snapshot.scriptInfo?.start || scriptTagInfo.start
                    : (0, documents_1$n.isInTag)(originalTriggerPosition, doc.moduleScriptInfo)
                        ? snapshot.moduleScriptInfo?.start || scriptTagInfo.start
                        : scriptTagInfo.start,
                length: span.length
            });
        }
        const editOffset = doc.offsetAt(range.start);
        if ((editOffset === snapshot.scriptInfo?.start ||
            editOffset === snapshot.moduleScriptInfo?.start) &&
            !change.newText.startsWith('\r\n') &&
            !change.newText.startsWith('\n')) {
            change.newText = newLine + change.newText;
        }
        const after = doc.getText().slice(doc.offsetAt(range.end));
        if (after.startsWith('\r\n') || after.startsWith('\n')) {
            change.newText = change.newText.trimEnd() + newLine;
        }
        return vscode_languageserver_1$n.TextEdit.replace(range, change.newText);
    }
    mapRangeForNewImport(snapshot, virtualRange) {
        const sourceMappableRange = this.offsetLinesAndMovetoStartOfLine(virtualRange, -1);
        const mappableRange = (0, documents_1$n.mapRangeToOriginal)(snapshot, sourceMappableRange);
        return this.offsetLinesAndMovetoStartOfLine(mappableRange, 1);
    }
    offsetLinesAndMovetoStartOfLine({ start, end }, offsetLines) {
        return vscode_languageserver_1$n.Range.create(vscode_languageserver_1$n.Position.create(start.line + offsetLines, 0), vscode_languageserver_1$n.Position.create(end.line + offsetLines, 0));
    }
    fixImportNewText(importText, actionTriggeredInScript, is$typeImport) {
        if (is$typeImport && importText.trim().startsWith('import ')) {
            return importText.replace(/(['"])(.+?)['"]/, (_match, quote, path) => `${quote}./$types${path.endsWith('.js') ? '.js' : ''}${quote}`);
        }
        const changedName = (0, utils_2$m.changeSvelteComponentName)(importText);
        if (importText !== changedName || !actionTriggeredInScript) {
            return changedName.replace(' type ', ' ');
        }
        return importText;
    }
}
CompletionProvider.CompletionsProviderImpl = CompletionsProviderImpl;
const beginOfDocumentRange = vscode_languageserver_1$n.Range.create(vscode_languageserver_1$n.Position.create(0, 0), vscode_languageserver_1$n.Position.create(0, 0));
const scriptImportRegex = /\bimport\s+{([^}]*?)}\s+?from\s+['"`].+?['"`]|\bimport\s+(\w+?)\s+from\s+['"`].+?['"`]/g;
const svelte2tsxTypes = new Set([
    'Svelte2TsxComponent',
    'Svelte2TsxComponentConstructorParameters',
    'SvelteComponentConstructor',
    'SvelteActionReturnType',
    'SvelteTransitionConfig',
    'SvelteTransitionReturnType',
    'SvelteAnimationReturnType',
    'SvelteWithOptionalProps',
    'SvelteAllProps',
    'SveltePropsAnyFallback',
    'SvelteSlotsAnyFallback',
    'SvelteRestProps',
    'SvelteSlots',
    'SvelteStore'
]);
const startsWithUppercase = /^[A-Z]/;
function createIsValidCompletion(document, position, hasParserError) {
    const isAtStartTag = !(0, documents_1$n.isInTag)(position, document.scriptInfo) &&
        /<\w*$/.test(document.getText(vscode_languageserver_1$n.Range.create(position.line, 0, position.line, position.character)));
    const noWrongCompletionAtStartTag = isAtStartTag && hasParserError
        ? (value) => startsWithUppercase.test(value.name)
        : () => true;
    const isNoSvelte2tsxCompletion = (value) => {
        if (value.kindModifiers === 'declare') {
            return !value.name.startsWith('__sveltets_') && !svelte2tsxTypes.has(value.name);
        }
        return value.name !== svelte2tsx_1$5.internalHelpers.renderName && !value.name.startsWith('$$_');
    };
    const isCompletionInHTMLStartTag = !!(0, documents_1$n.getNodeIfIsInHTMLStartTag)(document.html, document.offsetAt(position));
    if (!isCompletionInHTMLStartTag) {
        return isNoSvelte2tsxCompletion;
    }
    return (value) => isNoSvelte2tsxCompletion(value) && noWrongCompletionAtStartTag(value);
}

var FindComponentReferencesProvider = {};

Object.defineProperty(FindComponentReferencesProvider, "__esModule", { value: true });
FindComponentReferencesProvider.FindComponentReferencesProviderImpl = void 0;
const vscode_languageserver_1$m = main$8;
const utils_1$y = utils$6;
const DocumentSnapshot_1$5 = DocumentSnapshot;
const utils_2$l = utils$2;
const utils_3$d = requireUtils();
class FindComponentReferencesProviderImpl {
    constructor(lsAndTsDocResolver) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
    }
    async findComponentReferences(uri) {
        const fileName = (0, utils_1$y.urlToPath)(uri);
        if (!fileName) {
            return null;
        }
        const lsContainer = await this.lsAndTsDocResolver.getTSService(fileName);
        const lang = lsContainer.getService();
        const tsDoc = await this.lsAndTsDocResolver.getOrCreateSnapshot(fileName);
        if (!(tsDoc instanceof DocumentSnapshot_1$5.SvelteDocumentSnapshot)) {
            return null;
        }
        const references = lang.findReferences(tsDoc.filePath, (0, utils_2$l.offsetOfGeneratedComponentExport)(tsDoc));
        if (!references) {
            return null;
        }
        const snapshots = new utils_3$d.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
        snapshots.set(tsDoc.filePath, tsDoc);
        const locations = await Promise.all(references
            .flatMap((ref) => ref.references)
            .map(async (ref) => {
            if (ref.isDefinition) {
                return null;
            }
            const snapshot = await snapshots.retrieve(ref.fileName);
            if ((0, utils_3$d.isTextSpanInGeneratedCode)(snapshot.getFullText(), ref.textSpan)) {
                return null;
            }
            const refLocation = vscode_languageserver_1$m.Location.create((0, utils_1$y.pathToUrl)(ref.fileName), (0, utils_2$l.convertToLocationRange)(snapshot, ref.textSpan));
            if (this.isEndTag(refLocation, snapshot)) {
                return null;
            }
            if (!(0, utils_2$l.hasNonZeroRange)(refLocation)) {
                return null;
            }
            return refLocation;
        }));
        return locations.filter(utils_1$y.isNotNullOrUndefined);
    }
    isEndTag(element, snapshot) {
        if (!(snapshot instanceof DocumentSnapshot_1$5.SvelteDocumentSnapshot)) {
            return false;
        }
        const testEndTagRange = vscode_languageserver_1$m.Range.create(vscode_languageserver_1$m.Position.create(element.range.start.line, element.range.start.character - 1), element.range.end);
        const text = snapshot.getOriginalText(testEndTagRange);
        if (text.substring(0, 1) == '/') {
            return true;
        }
        return false;
    }
}
FindComponentReferencesProvider.FindComponentReferencesProviderImpl = FindComponentReferencesProviderImpl;

var FindFileReferencesProvider = {};

Object.defineProperty(FindFileReferencesProvider, "__esModule", { value: true });
FindFileReferencesProvider.FindFileReferencesProviderImpl = void 0;
const vscode_languageserver_1$l = main$8;
const vscode_uri_1$1 = umdExports;
const utils_1$x = utils$2;
const utils_2$k = requireUtils();
const utils_3$c = utils$6;
class FindFileReferencesProviderImpl {
    constructor(lsAndTsDocResolver) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
    }
    async fileReferences(uri) {
        const u = vscode_uri_1$1.URI.parse(uri);
        const fileName = u.fsPath;
        const lsContainer = await this.lsAndTsDocResolver.getTSService(fileName);
        const lang = lsContainer.getService();
        const tsDoc = await this.getSnapshotForPath(fileName);
        const references = lang.getFileReferences(fileName);
        if (!references) {
            return null;
        }
        const snapshots = new utils_2$k.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
        snapshots.set(tsDoc.filePath, tsDoc);
        const locations = await Promise.all(references.map(async (ref) => {
            const snapshot = await snapshots.retrieve(ref.fileName);
            return vscode_languageserver_1$l.Location.create((0, utils_3$c.pathToUrl)(ref.fileName), (0, utils_1$x.convertToLocationRange)(snapshot, ref.textSpan));
        }));
        return locations.filter(utils_1$x.hasNonZeroRange);
    }
    async getSnapshotForPath(path) {
        return this.lsAndTsDocResolver.getOrCreateSnapshot(path);
    }
}
FindFileReferencesProvider.FindFileReferencesProviderImpl = FindFileReferencesProviderImpl;

var FindReferencesProvider = {};

var __importDefault$j = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(FindReferencesProvider, "__esModule", { value: true });
FindReferencesProvider.FindReferencesProviderImpl = void 0;
const typescript_1$g = __importDefault$j(ts);
const utils_1$w = utils$6;
const utils_2$j = utils$2;
const utils_3$b = requireUtils();
class FindReferencesProviderImpl {
    constructor(lsAndTsDocResolver, componentReferencesProvider) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
        this.componentReferencesProvider = componentReferencesProvider;
    }
    async findReferences(document, position, context, cancellationToken) {
        if (this.isPositionForComponentCodeLens(position) ||
            this.isScriptStartOrEndTag(position, document)) {
            return this.componentReferencesProvider.findComponentReferences(document.uri);
        }
        const { lang, tsDoc, lsContainer } = await this.getLSAndTSDoc(document);
        if (cancellationToken?.isCancellationRequested) {
            return null;
        }
        const offset = tsDoc.offsetAt(tsDoc.getGeneratedPosition(position));
        const rawReferences = lang.findReferences(tsDoc.filePath, tsDoc.offsetAt(tsDoc.getGeneratedPosition(position)));
        if (!rawReferences) {
            return null;
        }
        const snapshots = new utils_3$b.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
        snapshots.set(tsDoc.filePath, tsDoc);
        if (rawReferences.some((ref) => ref.definition.kind === typescript_1$g.default.ScriptElementKind.alias)) {
            const componentReferences = await this.checkIfHasAliasedComponentReference(offset, tsDoc, lang);
            if (componentReferences?.length) {
                return componentReferences;
            }
        }
        const references = rawReferences.flatMap((ref) => ref.references);
        references.push(...(await this.getStoreReferences(references, tsDoc, snapshots, lang, cancellationToken)));
        const locations = await Promise.all(references.map(async (ref) => this.mapReference(ref, context, snapshots, cancellationToken)));
        return (locations
            .filter(utils_1$w.isNotNullOrUndefined)
            .sort(sortLocationByFileAndRange));
    }
    isScriptStartOrEndTag(position, document) {
        if (!document.scriptInfo) {
            return false;
        }
        const { start, end } = document.scriptInfo.container;
        const offset = document.offsetAt(position);
        return ((offset >= start && offset <= start + '<script'.length) ||
            (offset >= end - '</script>'.length && offset <= end));
    }
    isPositionForComponentCodeLens(position) {
        return position.line === 0 && position.character === 0;
    }
    async getStoreReferences(references, tsDoc, snapshots, lang, cancellationToken) {
        let storeReferences = [];
        const storeReference = references.find((ref) => (0, utils_1$w.normalizePath)(ref.fileName) === tsDoc.filePath &&
            (0, utils_3$b.isTextSpanInGeneratedCode)(tsDoc.getFullText(), ref.textSpan) &&
            (0, utils_3$b.is$storeVariableIn$storeDeclaration)(tsDoc.getFullText(), ref.textSpan.start));
        if (storeReference) {
            const additionalReferences = lang.findReferences(tsDoc.filePath, (0, utils_3$b.getStoreOffsetOf$storeDeclaration)(tsDoc.getFullText(), storeReference.textSpan.start)) || [];
            storeReferences = additionalReferences.flatMap((ref) => ref.references);
        }
        const $storeReferences = [];
        for (const ref of [...references, ...storeReferences]) {
            const snapshot = await snapshots.retrieve(ref.fileName);
            if (cancellationToken?.isCancellationRequested) {
                return [];
            }
            if (!((0, utils_3$b.isTextSpanInGeneratedCode)(snapshot.getFullText(), ref.textSpan) &&
                (0, utils_3$b.isStoreVariableIn$storeDeclaration)(snapshot.getFullText(), ref.textSpan.start))) {
                continue;
            }
            if (storeReference?.fileName === ref.fileName) {
                continue;
            }
            const additionalReferences = lang.findReferences(snapshot.filePath, (0, utils_3$b.get$storeOffsetOf$storeDeclaration)(snapshot.getFullText(), ref.textSpan.start)) || [];
            $storeReferences.push(...additionalReferences.flatMap((ref) => ref.references));
        }
        return [...storeReferences, ...$storeReferences];
    }
    async checkIfHasAliasedComponentReference(offset, tsDoc, lang) {
        const definitions = lang.getDefinitionAtPosition(tsDoc.filePath, offset);
        if (!definitions?.length) {
            return null;
        }
        const nonAliasDefinitions = definitions.filter((definition) => (0, utils_2$j.isGeneratedSvelteComponentName)(definition.name));
        const references = await Promise.all(nonAliasDefinitions.map((definition) => this.componentReferencesProvider.findComponentReferences((0, utils_1$w.pathToUrl)(definition.fileName))));
        const flattened = [];
        for (const ref of references) {
            if (ref) {
                const tmp = [];
                for (const r of ref) {
                    const exists = flattened.some((f) => f.uri === r.uri &&
                        f.range.start.line === r.range.start.line &&
                        f.range.start.character === r.range.start.character);
                    if (!exists) {
                        tmp.push(r);
                    }
                }
                flattened.push(...tmp);
            }
        }
        return flattened;
    }
    async mapReference(ref, context, snapshots, cancellationToken) {
        if (!context.includeDeclaration && ref.isDefinition) {
            return null;
        }
        const snapshot = await snapshots.retrieve(ref.fileName);
        if (cancellationToken?.isCancellationRequested) {
            return null;
        }
        if ((0, utils_3$b.isTextSpanInGeneratedCode)(snapshot.getFullText(), ref.textSpan)) {
            return null;
        }
        const location = (0, utils_2$j.convertToLocationForReferenceOrDefinition)(snapshot, ref.textSpan);
        if (!(0, utils_2$j.hasNonZeroRange)(location)) {
            return null;
        }
        return location;
    }
    async getLSAndTSDoc(document) {
        return this.lsAndTsDocResolver.getLSAndTSDoc(document);
    }
}
FindReferencesProvider.FindReferencesProviderImpl = FindReferencesProviderImpl;
function sortLocationByFileAndRange(l1, l2) {
    const localeCompare = l1.uri.localeCompare(l2.uri);
    return localeCompare === 0
        ? (l1.range.start.line - l2.range.start.line) * 10000 +
            (l1.range.start.character - l2.range.start.character)
        : localeCompare;
}

var FoldingRangeProvider = {};

var __importDefault$i = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(FoldingRangeProvider, "__esModule", { value: true });
FoldingRangeProvider.FoldingRangeProviderImpl = void 0;
const typescript_1$f = __importDefault$i(ts);
const vscode_languageserver_1$k = main$8;
const documents_1$m = documents;
const utils_1$v = utils$6;
const utils_2$i = utils$2;
const utils_3$a = requireUtils();
const indentFolding_1$1 = indentFolding;
const svelte_ast_utils_1$3 = svelteAstUtils;
class FoldingRangeProviderImpl {
    constructor(lsAndTsDocResolver, configManager) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
        this.configManager = configManager;
        this.foldEndPairCharacters = ['}', ']', ')', '`', '>'];
    }
    async getFoldingRanges(document) {
        const { lang, tsDoc } = await this.lsAndTsDocResolver.getLsForSyntheticOperations(document);
        const foldingRanges = tsDoc.parserError && !document.moduleScriptInfo && !document.scriptInfo
            ? []
            : lang.getOutliningSpans(tsDoc.filePath);
        const lineFoldingOnly = !!this.configManager.getClientCapabilities()?.textDocument?.foldingRange
            ?.lineFoldingOnly;
        const result = foldingRanges
            .filter((span) => !(0, utils_3$a.isTextSpanInGeneratedCode)(tsDoc.getFullText(), span.textSpan))
            .map((span) => ({
            originalRange: this.mapToOriginalRange(tsDoc, span.textSpan, document),
            span
        }))
            .map(({ originalRange, span }) => this.convertOutliningSpan(span, document, originalRange, lineFoldingOnly))
            .filter(utils_1$v.isNotNullOrUndefined)
            .concat(this.collectSvelteBlockFolding(document, tsDoc, lineFoldingOnly))
            .concat(this.getSvelteTagFoldingIfParserError(document, tsDoc))
            .filter((r) => (lineFoldingOnly ? r.startLine < r.endLine : r.startLine <= r.endLine));
        return result;
    }
    mapToOriginalRange(tsDoc, textSpan, document) {
        const range = (0, documents_1$m.mapRangeToOriginal)(tsDoc, (0, utils_2$i.convertRange)(tsDoc, textSpan));
        const startOffset = document.offsetAt(range.start);
        if (range.start.line < 0 || range.end.line < 0 || range.start.line > range.end.line) {
            return;
        }
        if ((0, documents_1$m.isInTag)(range.start, document.scriptInfo) ||
            (0, documents_1$m.isInTag)(range.start, document.moduleScriptInfo)) {
            return range;
        }
        const endOffset = document.offsetAt(range.end);
        const originalText = document.getText().slice(startOffset, endOffset);
        if (originalText.length === 0) {
            return;
        }
        const generatedText = tsDoc.getText(textSpan.start, textSpan.start + textSpan.length);
        const oneToOne = originalText.trim() === generatedText.trim();
        if (oneToOne) {
            return range;
        }
    }
    collectSvelteBlockFolding(document, tsDoc, lineFoldingOnly) {
        if (tsDoc.parserError) {
            return [];
        }
        const ranges = [];
        const provider = this;
        const enter = function (node, parent, key) {
            if (key === 'attributes') {
                this.skip();
            }
            if (!node.type.endsWith('Block') || node.type === 'AwaitBlock') {
                return;
            }
            if (node.type === 'IfBlock') {
                provider.getIfBlockFolding(node, document, ranges);
                return;
            }
            if ((0, svelte_ast_utils_1$3.isElseBlockWithElseIf)(node)) {
                return;
            }
            if ((node.type === 'CatchBlock' || node.type === 'ThenBlock') && (0, svelte_ast_utils_1$3.isAwaitBlock)(parent)) {
                const expressionEnd = (node.type === 'CatchBlock' ? parent.error?.end : parent.value?.end) ??
                    document.getText().indexOf('}', node.start);
                const beforeBlockStartTagEnd = document.getText().indexOf('}', expressionEnd);
                if (beforeBlockStartTagEnd == -1) {
                    return;
                }
                ranges.push(provider.createFoldingRange(document, beforeBlockStartTagEnd + 1, node.end));
                return;
            }
            if ((0, svelte_ast_utils_1$3.isEachBlock)(node)) {
                const start = document.getText().indexOf('}', (node.key ?? node.expression).end);
                const elseStart = node.else
                    ? (0, svelte_ast_utils_1$3.findElseBlockTagStart)(document.getText(), node.else)
                    : -1;
                ranges.push(provider.createFoldingRange(document, start, elseStart === -1 ? node.end : elseStart));
                return;
            }
            if ('expression' in node && node.expression && typeof node.expression === 'object') {
                const start = provider.getStartForNodeWithExpression(node, document);
                const end = node.end;
                ranges.push(provider.createFoldingRange(document, start, end));
                return;
            }
            if (node.start != null && node.end != null) {
                const start = node.start;
                const end = node.end;
                ranges.push(provider.createFoldingRange(document, start, end));
            }
        };
        tsDoc.walkSvelteAst({
            enter
        });
        if (lineFoldingOnly) {
            return ranges.map((r) => ({
                startLine: r.startLine,
                endLine: this.previousLineOfEndLine(r.startLine, r.endLine)
            }));
        }
        return ranges;
    }
    getIfBlockFolding(node, document, ranges) {
        const typed = node;
        const documentText = document.getText();
        const start = this.getStartForNodeWithExpression(typed, document);
        const end = (0, svelte_ast_utils_1$3.hasElseBlock)(typed)
            ? (0, svelte_ast_utils_1$3.findElseBlockTagStart)(documentText, typed.else)
            : (0, svelte_ast_utils_1$3.findIfBlockEndTagStart)(documentText, typed);
        ranges.push(this.createFoldingRange(document, start, end));
    }
    getStartForNodeWithExpression(node, document) {
        return document.getText().indexOf('}', node.expression.end) + 1;
    }
    createFoldingRange(document, start, end) {
        const range = (0, documents_1$m.toRange)(document, start, end);
        return {
            startLine: range.start.line,
            startCharacter: range.start.character,
            endLine: range.end.line,
            endCharacter: range.end.character
        };
    }
    convertOutliningSpan(span, document, originalRange, lineFoldingOnly) {
        if (!originalRange) {
            return null;
        }
        const end = lineFoldingOnly
            ? this.adjustFoldingEndToNotHideEnd(originalRange, document)
            : originalRange.end;
        const result = {
            startLine: originalRange.start.line,
            endLine: end.line,
            kind: this.getFoldingRangeKind(span),
            startCharacter: lineFoldingOnly ? undefined : originalRange.start.character,
            endCharacter: lineFoldingOnly ? undefined : end.character
        };
        return result;
    }
    getFoldingRangeKind(span) {
        switch (span.kind) {
            case typescript_1$f.default.OutliningSpanKind.Comment:
                return vscode_languageserver_1$k.FoldingRangeKind.Comment;
            case typescript_1$f.default.OutliningSpanKind.Region:
                return vscode_languageserver_1$k.FoldingRangeKind.Region;
            case typescript_1$f.default.OutliningSpanKind.Imports:
                return vscode_languageserver_1$k.FoldingRangeKind.Imports;
            case typescript_1$f.default.OutliningSpanKind.Code:
            default:
                return undefined;
        }
    }
    adjustFoldingEndToNotHideEnd(range, document) {
        if (range.end.character > 0) {
            const text = document.getText();
            const offsetBeforeEnd = document.offsetAt({
                line: range.end.line,
                character: range.end.character - 1
            });
            const foldEndCharacter = text[offsetBeforeEnd];
            if (this.foldEndPairCharacters.includes(foldEndCharacter)) {
                return { line: this.previousLineOfEndLine(range.start.line, range.end.line) };
            }
        }
        return range.end;
    }
    getSvelteTagFoldingIfParserError(document, tsDoc) {
        if (!tsDoc.parserError) {
            return [];
        }
        const htmlTemplateRanges = this.getHtmlTemplateRangesForChecking(document);
        return (0, indentFolding_1$1.indentBasedFoldingRange)({
            document,
            skipFold: (_, lineContent) => {
                return !/{\s*(#|\/|:)/.test(lineContent);
            },
            ranges: htmlTemplateRanges
        });
    }
    getHtmlTemplateRangesForChecking(document) {
        const ranges = [];
        const excludeTags = [
            document.templateInfo,
            document.moduleScriptInfo,
            document.scriptInfo,
            document.styleInfo
        ]
            .filter(utils_1$v.isNotNullOrUndefined)
            .map((info) => ({
            startLine: document.positionAt(info.container.start).line,
            endLine: document.positionAt(info.container.end).line
        }))
            .sort((a, b) => a.startLine - b.startLine);
        if (excludeTags.length === 0) {
            return [{ startLine: 0, endLine: document.lineCount - 1 }];
        }
        if (excludeTags[0].startLine > 0) {
            ranges.push({
                startLine: 0,
                endLine: excludeTags[0].startLine - 1
            });
        }
        for (let index = 0; index < excludeTags.length; index++) {
            const element = excludeTags[index];
            const next = excludeTags[index + 1];
            ranges.push({
                startLine: element.endLine + 1,
                endLine: next ? next.startLine - 1 : document.lineCount - 1
            });
        }
        return ranges;
    }
    previousLineOfEndLine(startLine, endLine) {
        return Math.max(endLine - 1, startLine);
    }
}
FoldingRangeProvider.FoldingRangeProviderImpl = FoldingRangeProviderImpl;

var HoverProvider = {};

var __importDefault$h = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(HoverProvider, "__esModule", { value: true });
HoverProvider.HoverProviderImpl = void 0;
const typescript_1$e = __importDefault$h(ts);
const documents_1$l = documents;
const previewer_1$1 = previewer;
const utils_1$u = utils$2;
const utils_2$h = requireUtils();
class HoverProviderImpl {
    constructor(lsAndTsDocResolver) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
    }
    async doHover(document, position) {
        const { lang, lsContainer, tsDoc, userPreferences } = await this.getLSAndTSDoc(document);
        const eventHoverInfo = this.getEventHoverInfo(lang, document, tsDoc, position);
        if (eventHoverInfo) {
            return eventHoverInfo;
        }
        const offset = tsDoc.offsetAt(tsDoc.getGeneratedPosition(position));
        const customElementDescription = this.getCustomElementDescription(lang, position, lsContainer, document, tsDoc);
        if (customElementDescription) {
            return {
                contents: {
                    value: customElementDescription,
                    kind: 'markdown'
                }
            };
        }
        const info = lang.getQuickInfoAtPosition(tsDoc.filePath, offset, userPreferences.maximumHoverLength);
        if (!info) {
            return null;
        }
        let declaration = typescript_1$e.default.displayPartsToString(info.displayParts);
        if (tsDoc.isSvelte5Plus &&
            declaration.includes('(alias)') &&
            declaration.includes('__sveltets_2_IsomorphicComponent')) {
            declaration = declaration.substring(declaration.lastIndexOf('import'));
        }
        const documentation = (0, previewer_1$1.getMarkdownDocumentation)(info.documentation, info.tags);
        const contents = ['```typescript', declaration, '```']
            .concat(documentation ? ['---', documentation] : [])
            .join('\n');
        return (0, documents_1$l.mapObjWithRangeToOriginal)(tsDoc, {
            range: (0, utils_1$u.convertRange)(tsDoc, info.textSpan),
            contents
        });
    }
    getCustomElementDescription(lang, position, lsContainer, document, tsDoc) {
        const offset = document.offsetAt(position);
        const tag = (0, documents_1$l.getNodeIfIsInTagName)(document.html, offset);
        if (!tag || !tag.tag) {
            return;
        }
        return (0, utils_2$h.getCustomElementsDocument)(lang, lsContainer, tsDoc, tag.tag) ?? undefined;
    }
    getEventHoverInfo(lang, doc, tsDoc, originalPosition) {
        const possibleEventName = (0, documents_1$l.getWordAt)(doc.getText(), doc.offsetAt(originalPosition), {
            left: /\S+$/,
            right: /[\s=]/
        });
        if (!possibleEventName.startsWith('on:')) {
            return null;
        }
        const component = (0, utils_2$h.getComponentAtPosition)(lang, doc, tsDoc, originalPosition);
        if (!component) {
            return null;
        }
        const eventName = possibleEventName.substr('on:'.length);
        const event = component.getEvents().find((event) => event.name === eventName);
        if (!event) {
            return null;
        }
        return {
            contents: [
                '```typescript',
                `${event.name}: ${event.type}`,
                '```',
                event.doc || ''
            ].join('\n')
        };
    }
    async getLSAndTSDoc(document) {
        return this.lsAndTsDocResolver.getLSAndTSDoc(document);
    }
}
HoverProvider.HoverProviderImpl = HoverProviderImpl;

var ImplementationProvider = {};

Object.defineProperty(ImplementationProvider, "__esModule", { value: true });
ImplementationProvider.ImplementationProviderImpl = void 0;
const documents_1$k = documents;
const utils_1$t = utils$6;
const utils_2$g = utils$2;
const utils_3$9 = requireUtils();
class ImplementationProviderImpl {
    constructor(lsAndTsDocResolver) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
    }
    async getImplementation(document, position, cancellationToken) {
        const { tsDoc, lang, lsContainer } = await this.lsAndTsDocResolver.getLSAndTSDoc(document);
        if (cancellationToken?.isCancellationRequested) {
            return null;
        }
        const offset = tsDoc.offsetAt(tsDoc.getGeneratedPosition(position));
        const implementations = lang.getImplementationAtPosition(tsDoc.filePath, offset);
        const snapshots = new utils_3$9.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
        snapshots.set(tsDoc.filePath, tsDoc);
        if (!implementations) {
            return null;
        }
        const result = await Promise.all(implementations.map(async (implementation) => {
            let snapshot = await snapshots.retrieve(implementation.fileName);
            if ((0, utils_3$9.isTextSpanInGeneratedCode)(snapshot.getFullText(), implementation.textSpan)) {
                if (!(0, utils_3$9.is$storeVariableIn$storeDeclaration)(snapshot.getFullText(), implementation.textSpan.start)) {
                    return;
                }
                implementation = lang.getImplementationAtPosition(tsDoc.filePath, tsDoc.getFullText().indexOf(');', implementation.textSpan.start) - 1)[0];
                snapshot = await snapshots.retrieve(implementation.fileName);
            }
            if (cancellationToken?.isCancellationRequested) {
                return null;
            }
            const location = (0, documents_1$k.mapLocationToOriginal)(snapshot, (0, utils_2$g.convertRange)(snapshot, implementation.textSpan));
            if (location.range.start.line >= 0 && location.range.end.line >= 0) {
                return location;
            }
        }));
        return result.filter(utils_1$t.isNotNullOrUndefined);
    }
}
ImplementationProvider.ImplementationProviderImpl = ImplementationProviderImpl;

var InlayHintProvider = {};

var __importDefault$g = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(InlayHintProvider, "__esModule", { value: true });
InlayHintProvider.InlayHintProviderImpl = void 0;
const typescript_1$d = __importDefault$g(ts);
const vscode_languageserver_types_1$3 = mainExports;
const documents_1$j = documents;
const parseHtml_1$2 = requireParseHtml();
const utils_1$s = requireUtils();
const utils_2$f = utils$2;
class InlayHintProviderImpl {
    constructor(lsAndTsDocResolver) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
    }
    async getInlayHints(document, range, cancellationToken) {
        const { userPreferences } = await this.lsAndTsDocResolver.getLsForSyntheticOperations(document);
        if (cancellationToken?.isCancellationRequested ||
            !this.areInlayHintsEnabled(userPreferences)) {
            return null;
        }
        const { tsDoc, lang, lsContainer } = await this.lsAndTsDocResolver.getLSAndTSDoc(document);
        const inlayHints = lang.provideInlayHints(tsDoc.filePath, this.convertToTargetTextSpan(range, tsDoc), userPreferences);
        const sourceFile = lang.getProgram()?.getSourceFile(tsDoc.filePath);
        if (!sourceFile) {
            return [];
        }
        const renderFunction = (0, utils_1$s.findRenderFunction)(sourceFile);
        const renderFunctionReturnTypeLocation = renderFunction && this.getTypeAnnotationPosition(renderFunction);
        const snapshotMap = new utils_1$s.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
        snapshotMap.set(tsDoc.filePath, tsDoc);
        const convertPromises = inlayHints
            .filter((inlayHint) => !(0, utils_1$s.isInGeneratedCode)(tsDoc.getFullText(), inlayHint.position) &&
            inlayHint.position !== renderFunctionReturnTypeLocation &&
            !this.isSvelte2tsxFunctionHints(sourceFile, inlayHint) &&
            !this.isGeneratedVariableTypeHint(sourceFile, inlayHint) &&
            !this.isGeneratedAsyncFunctionReturnType(sourceFile, inlayHint) &&
            !this.isGeneratedFunctionReturnType(sourceFile, inlayHint))
            .map(async (inlayHint) => ({
            label: await this.convertInlayHintLabelParts(inlayHint, snapshotMap),
            position: this.getOriginalPosition(document, tsDoc, inlayHint),
            kind: this.convertInlayHintKind(inlayHint.kind),
            paddingLeft: inlayHint.whitespaceBefore,
            paddingRight: inlayHint.whitespaceAfter
        }));
        return (await Promise.all(convertPromises)).filter((inlayHint) => inlayHint.position.line >= 0 &&
            inlayHint.position.character >= 0 &&
            !this.checkGeneratedFunctionHintWithSource(inlayHint, document));
    }
    areInlayHintsEnabled(preferences) {
        return (preferences.includeInlayParameterNameHints === 'literals' ||
            preferences.includeInlayParameterNameHints === 'all' ||
            preferences.includeInlayEnumMemberValueHints ||
            preferences.includeInlayFunctionLikeReturnTypeHints ||
            preferences.includeInlayFunctionParameterTypeHints ||
            preferences.includeInlayPropertyDeclarationTypeHints ||
            preferences.includeInlayVariableTypeHints);
    }
    convertToTargetTextSpan(range, snapshot) {
        const generatedStartOffset = snapshot.getGeneratedPosition(range.start);
        const generatedEndOffset = snapshot.getGeneratedPosition(range.end);
        const start = generatedStartOffset.line < 0 ? 0 : snapshot.offsetAt(generatedStartOffset);
        const end = generatedEndOffset.line < 0
            ? snapshot.getLength()
            : snapshot.offsetAt(generatedEndOffset);
        return {
            start,
            length: end - start
        };
    }
    async convertInlayHintLabelParts(inlayHint, snapshotMap) {
        if (!inlayHint.displayParts) {
            return inlayHint.text;
        }
        const convertPromises = inlayHint.displayParts.map(async (part) => {
            if (!part.file || !part.span) {
                return {
                    value: part.text
                };
            }
            const snapshot = await snapshotMap.retrieve(part.file);
            if (!snapshot) {
                return {
                    value: part.text
                };
            }
            const originalLocation = (0, documents_1$j.mapLocationToOriginal)(snapshot, (0, utils_2$f.convertRange)(snapshot, part.span));
            return {
                value: part.text,
                location: originalLocation.range.start.line < 0 ? undefined : originalLocation
            };
        });
        const parts = await Promise.all(convertPromises);
        return parts;
    }
    getOriginalPosition(document, tsDoc, inlayHint) {
        let originalPosition = tsDoc.getOriginalPosition(tsDoc.positionAt(inlayHint.position));
        if (inlayHint.kind === typescript_1$d.default.InlayHintKind.Type) {
            const originalOffset = document.offsetAt(originalPosition);
            const source = document.getText();
            if (originalOffset < source.length &&
                !/[\x00-\x23\x25-\x2F\x3A-\x40\x5B\x5D-\x5E\x60\x7B-\x7F]/.test(source[originalOffset])) {
                originalPosition.character += 1;
            }
        }
        return originalPosition;
    }
    convertInlayHintKind(kind) {
        switch (kind) {
            case 'Parameter':
                return vscode_languageserver_types_1$3.InlayHintKind.Parameter;
            case 'Type':
                return vscode_languageserver_types_1$3.InlayHintKind.Type;
            case 'Enum':
                return undefined;
            default:
                return undefined;
        }
    }
    isSvelte2tsxFunctionHints(sourceFile, inlayHint) {
        if (inlayHint.kind !== typescript_1$d.default.InlayHintKind.Parameter) {
            return false;
        }
        if (inlayHint.displayParts?.some((v) => (0, utils_2$f.isSvelte2tsxShimFile)(v.file))) {
            return true;
        }
        const hasParameterWithSamePosition = (node) => node.arguments !== undefined &&
            node.arguments.some((arg) => arg.getStart() === inlayHint.position);
        const node = (0, utils_1$s.findContainingNode)(sourceFile, { start: inlayHint.position, length: 0 }, (node) => typescript_1$d.default.isCallOrNewExpression(node) && hasParameterWithSamePosition(node));
        if (!node) {
            return false;
        }
        const expressionText = node.expression.getText();
        const isComponentEventHandler = expressionText.includes('.$on');
        return (isComponentEventHandler ||
            expressionText.includes('.createElement') ||
            expressionText.includes('__sveltets_') ||
            expressionText.startsWith('$$_'));
    }
    isGeneratedVariableTypeHint(sourceFile, inlayHint) {
        if (inlayHint.kind !== typescript_1$d.default.InlayHintKind.Type) {
            return false;
        }
        if ((0, utils_1$s.startsWithIgnoredPosition)(sourceFile.text, inlayHint.position)) {
            return true;
        }
        const declaration = (0, utils_1$s.findContainingNode)(sourceFile, { start: inlayHint.position, length: 0 }, typescript_1$d.default.isVariableDeclaration);
        if (!declaration) {
            return false;
        }
        return ((0, utils_1$s.isInGeneratedCode)(sourceFile.text, declaration.pos) ||
            declaration.name.getText().startsWith('$$'));
    }
    isGeneratedAsyncFunctionReturnType(sourceFile, inlayHint) {
        if (inlayHint.kind !== typescript_1$d.default.InlayHintKind.Type) {
            return false;
        }
        const expression = (0, utils_1$s.findContainingNode)(sourceFile, { start: inlayHint.position, length: 0 }, (node) => typescript_1$d.default.isArrowFunction(node));
        if (!expression?.modifiers?.some((m) => m.kind === typescript_1$d.default.SyntaxKind.AsyncKeyword) ||
            !expression.parent?.parent ||
            !typescript_1$d.default.isBlock(expression.parent.parent)) {
            return false;
        }
        return this.getTypeAnnotationPosition(expression) === inlayHint.position;
    }
    isGeneratedFunctionReturnType(sourceFile, inlayHint) {
        if (inlayHint.kind !== typescript_1$d.default.InlayHintKind.Type) {
            return false;
        }
        const expression = (0, utils_1$s.findContainingNode)(sourceFile, { start: inlayHint.position, length: 0 }, (node) => typescript_1$d.default.isCallExpression(node) && typescript_1$d.default.isIdentifier(node.expression));
        if (!expression) {
            return false;
        }
        return (expression.expression.text === '__sveltets_2_invalidate' &&
            typescript_1$d.default.isArrowFunction(expression.arguments[0]) &&
            this.getTypeAnnotationPosition(expression.arguments[0]) === inlayHint.position);
    }
    getTypeAnnotationPosition(decl) {
        const closeParenToken = (0, utils_1$s.findChildOfKind)(decl, typescript_1$d.default.SyntaxKind.CloseParenToken);
        if (closeParenToken) {
            return closeParenToken.end;
        }
        return decl.parameters.end;
    }
    checkGeneratedFunctionHintWithSource(inlayHint, document) {
        if ((0, documents_1$j.isInTag)(inlayHint.position, document.moduleScriptInfo)) {
            return false;
        }
        if ((0, documents_1$j.isInTag)(inlayHint.position, document.scriptInfo)) {
            return document
                .getText()
                .slice(document.offsetAt(inlayHint.position))
                .trimStart()
                .startsWith('$:');
        }
        const attributeContext = (0, parseHtml_1$2.getAttributeContextAtPosition)(document, inlayHint.position);
        if (!attributeContext || attributeContext.inValue || !attributeContext.name.includes(':')) {
            return false;
        }
        const { name, elementTag } = attributeContext;
        if (name.startsWith('on:') && !elementTag.attributes?.[attributeContext.name]) {
            return true;
        }
        const directives = ['in', 'out', 'animate', 'transition', 'use'];
        return directives.some((directive) => name.startsWith(directive + ':'));
    }
}
InlayHintProvider.InlayHintProviderImpl = InlayHintProviderImpl;

var RenameProvider = {};

var __importDefault$f = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(RenameProvider, "__esModule", { value: true });
RenameProvider.RenameProviderImpl = void 0;
const vscode_languageserver_1$j = main$8;
const documents_1$i = documents;
const utils_1$r = utils$6;
const DocumentSnapshot_1$4 = DocumentSnapshot;
const utils_2$e = utils$2;
const typescript_1$c = __importDefault$f(ts);
const utils_3$8 = requireUtils();
const svelte_ast_utils_1$2 = svelteAstUtils;
const bind = 'bind:';
class RenameProviderImpl {
    constructor(lsAndTsDocResolver, configManager) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
        this.configManager = configManager;
    }
    async prepareRename(document, position) {
        const { lang, tsDoc } = await this.getLSAndTSDoc(document);
        const offset = tsDoc.offsetAt(tsDoc.getGeneratedPosition(position));
        const renameInfo = this.getRenameInfo(lang, tsDoc, document, position, offset);
        if (!renameInfo) {
            return null;
        }
        return this.mapRangeToOriginal(tsDoc, renameInfo.triggerSpan);
    }
    async rename(document, position, newName) {
        const { lang, tsDoc, lsContainer } = await this.getLSAndTSDoc(document);
        const offset = tsDoc.offsetAt(tsDoc.getGeneratedPosition(position));
        const renameInfo = this.getRenameInfo(lang, tsDoc, document, position, offset);
        if (!renameInfo) {
            return null;
        }
        const renameLocations = lang.findRenameLocations(tsDoc.filePath, offset, false, false, true);
        if (!renameLocations) {
            return null;
        }
        const docs = new utils_3$8.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
        docs.set(tsDoc.filePath, tsDoc);
        let convertedRenameLocations = await this.mapAndFilterRenameLocations(renameLocations, docs, renameInfo.isStore ? `$${newName}` : undefined);
        convertedRenameLocations.push(...(await this.enhanceRenamesInCaseOf$Store(renameLocations, newName, docs, lang)));
        convertedRenameLocations = this.checkShortHandBindingOrSlotLetLocation(lang, convertedRenameLocations, docs, newName);
        const additionalRenameForPropRenameInsideComponentWithProp = await this.getAdditionLocationsForRenameOfPropInsideComponentWithProp(document, tsDoc, position, convertedRenameLocations, docs, lang, newName);
        const additionalRenamesForPropRenameOutsideComponentWithProp =
        additionalRenameForPropRenameInsideComponentWithProp.length > 0
            ? []
            : await this.getAdditionalLocationsForRenameOfPropInsideOtherComponent(convertedRenameLocations, docs, lang, tsDoc.filePath);
        convertedRenameLocations = [
            ...convertedRenameLocations,
            ...additionalRenameForPropRenameInsideComponentWithProp,
            ...additionalRenamesForPropRenameOutsideComponentWithProp
        ];
        return (0, utils_1$r.unique)(convertedRenameLocations.filter((loc) => loc.range.start.line >= 0 && loc.range.end.line >= 0)).reduce((acc, loc) => {
            const uri = (0, utils_1$r.pathToUrl)(loc.fileName);
            if (!acc.changes[uri]) {
                acc.changes[uri] = [];
            }
            acc.changes[uri].push({
                newText: (loc.prefixText || '') + (loc.newName || newName) + (loc.suffixText || ''),
                range: loc.range
            });
            return acc;
        }, { changes: {} });
    }
    getRenameInfo(lang, tsDoc, doc, originalPosition, generatedOffset) {
        if (tsDoc.parserError) {
            return null;
        }
        const svelteNode = tsDoc.svelteNodeAt(originalPosition);
        const renameInfo = lang.getRenameInfo(tsDoc.filePath, generatedOffset, {
            allowRenameOfImportPath: false
        });
        if (!renameInfo.canRename ||
            renameInfo.fullDisplayName?.includes('JSX.IntrinsicElements') ||
            (renameInfo.kind === typescript_1$c.default.ScriptElementKind.jsxAttribute &&
                !(0, utils_3$8.isComponentAtPosition)(doc, tsDoc, originalPosition))) {
            return null;
        }
        if ((0, documents_1$i.isInHTMLTagRange)(doc.html, doc.offsetAt(originalPosition)) ||
            (0, svelte_ast_utils_1$2.isAttributeName)(svelteNode, 'Element') ||
            (0, svelte_ast_utils_1$2.isEventHandler)(svelteNode, 'Element')) {
            return null;
        }
        const text = tsDoc.getFullText();
        if (text.charAt(renameInfo.triggerSpan.start) === '$') {
            const definition = lang.getDefinitionAndBoundSpan(tsDoc.filePath, generatedOffset)
                ?.definitions?.[0];
            if (definition && (0, utils_3$8.isTextSpanInGeneratedCode)(text, definition.textSpan)) {
                renameInfo.triggerSpan.start++;
                renameInfo.triggerSpan.length--;
                renameInfo.isStore = true;
            }
        }
        return renameInfo;
    }
    async enhanceRenamesInCaseOf$Store(renameLocations, newName, docs, lang) {
        for (const loc of renameLocations) {
            const snapshot = await docs.retrieve(loc.fileName);
            if ((0, utils_3$8.isTextSpanInGeneratedCode)(snapshot.getFullText(), loc.textSpan)) {
                if ((0, utils_3$8.isStoreVariableIn$storeDeclaration)(snapshot.getFullText(), loc.textSpan.start)) {
                    const storeRenameLocations = lang.findRenameLocations(snapshot.filePath, (0, utils_3$8.get$storeOffsetOf$storeDeclaration)(snapshot.getFullText(), loc.textSpan.start), false, false, true);
                    return await this.mapAndFilterRenameLocations(storeRenameLocations, docs, `$${newName}`);
                }
                else if ((0, utils_3$8.is$storeVariableIn$storeDeclaration)(snapshot.getFullText(), loc.textSpan.start)) {
                    const storeRenameLocations = lang.findRenameLocations(snapshot.filePath, (0, utils_3$8.getStoreOffsetOf$storeDeclaration)(snapshot.getFullText(), loc.textSpan.start), false, false, true);
                    return await this.mapAndFilterRenameLocations(storeRenameLocations, docs);
                }
            }
        }
        return [];
    }
    async getAdditionLocationsForRenameOfPropInsideComponentWithProp(document, tsDoc, position, convertedRenameLocations, snapshots, lang, newName) {
        const regex = new RegExp(`export\\s+let\\s+${this.getVariableAtPosition(tsDoc, lang, position)}($|\\s|;|:|\/\*|\/\/)`);
        const isRenameInsideComponentWithProp = regex.test((0, documents_1$i.getLineAtPosition)(position, document.getText()));
        if (!isRenameInsideComponentWithProp) {
            return [];
        }
        const updatePropLocation = this.findLocationWhichWantsToUpdatePropName(convertedRenameLocations, snapshots);
        if (!updatePropLocation) {
            return [];
        }
        const idxOfOldPropName = tsDoc
            .getFullText()
            .lastIndexOf(':', updatePropLocation.textSpan.start);
        const replacementsForProp = (lang.findRenameLocations(updatePropLocation.fileName, idxOfOldPropName, false, false, true) || []).filter((rename) =>
        rename.fileName !== updatePropLocation.fileName ||
            this.isInSvelte2TsxPropLine(tsDoc, rename));
        const renameLocations = await this.mapAndFilterRenameLocations(replacementsForProp, snapshots);
        return renameLocations.map((location) => {
            if (updatePropLocation.fileName === location.fileName) {
                return location;
            }
            const sourceFile = lang.getProgram()?.getSourceFile(location.fileName);
            if (!sourceFile ||
                location.fileName !== sourceFile.fileName ||
                location.range.start.line < 0 ||
                location.range.end.line < 0) {
                return location;
            }
            const snapshot = snapshots.get(location.fileName);
            if (!(snapshot instanceof DocumentSnapshot_1$4.SvelteDocumentSnapshot)) {
                return location;
            }
            const shorthandLocation = this.transformShorthand(snapshot, location, newName);
            return shorthandLocation || location;
        });
    }
    async getAdditionalLocationsForRenameOfPropInsideOtherComponent(convertedRenameLocations, snapshots, lang, requestedFileName) {
        const updatePropLocation = this.findLocationWhichWantsToUpdatePropName(convertedRenameLocations, snapshots);
        if (!updatePropLocation) {
            return [];
        }
        const getCanonicalFileName = (0, utils_1$r.createGetCanonicalFileName)(typescript_1$c.default.sys.useCaseSensitiveFileNames);
        if (getCanonicalFileName(updatePropLocation.fileName) ===
            getCanonicalFileName(requestedFileName)) {
            return [];
        }
        const doc = snapshots.get(updatePropLocation.fileName);
        const match = this.matchGeneratedExportLet(doc, updatePropLocation);
        if (!match) {
            return [];
        }
        const idx = (match.index || 0) + match[0].lastIndexOf(match[1]);
        const replacementsForProp = lang.findRenameLocations(updatePropLocation.fileName, idx, false, false) || [];
        return this.checkShortHandBindingOrSlotLetLocation(lang, await this.mapAndFilterRenameLocations(replacementsForProp, snapshots), snapshots);
    }
    matchGeneratedExportLet(snapshot, updatePropLocation) {
        const regex = new RegExp(
        `\\s+let\\s+(${snapshot
            .getFullText()
            .substring(updatePropLocation.textSpan.start, updatePropLocation.textSpan.start + updatePropLocation.textSpan.length)})($|\\s|;|:|\/\*|\/\/)`);
        const match = snapshot.getFullText().match(regex);
        return match;
    }
    findLocationWhichWantsToUpdatePropName(convertedRenameLocations, snapshots) {
        return convertedRenameLocations.find((loc) => {
            if (loc.range.start.line >= 0 && loc.range.end.line >= 0) {
                return;
            }
            const snapshot = snapshots.get(loc.fileName);
            if (!(snapshot instanceof DocumentSnapshot_1$4.SvelteDocumentSnapshot)) {
                return false;
            }
            return this.isInSvelte2TsxPropLine(snapshot, loc);
        });
    }
    isInSvelte2TsxPropLine(snapshot, loc) {
        return (0, utils_3$8.isAfterSvelte2TsxPropsReturn)(snapshot.getFullText(), loc.textSpan.start);
    }
    async mapAndFilterRenameLocations(renameLocations, snapshots, newName) {
        const mappedLocations = await Promise.all(renameLocations.map(async (loc) => {
            const snapshot = await snapshots.retrieve(loc.fileName);
            if (!(0, utils_3$8.isTextSpanInGeneratedCode)(snapshot.getFullText(), loc.textSpan)) {
                return {
                    ...loc,
                    range: this.mapRangeToOriginal(snapshot, loc.textSpan),
                    newName
                };
            }
        }));
        return this.filterWrongRenameLocations(mappedLocations.filter(utils_1$r.isNotNullOrUndefined));
    }
    filterWrongRenameLocations(mappedLocations) {
        return (0, utils_1$r.filterAsync)(mappedLocations, async (loc) => {
            const snapshot = await this.getSnapshot(loc.fileName);
            if (!(snapshot instanceof DocumentSnapshot_1$4.SvelteDocumentSnapshot)) {
                return true;
            }
            const content = snapshot.getText(0, snapshot.getLength());
            return (notPrecededBy('__sveltets_2_instanceOf(') &&
                notPrecededBy('__sveltets_1_ensureType(') &&
                notPrecededBy('= __sveltets_2_store_get('));
            function notPrecededBy(str) {
                return (content.lastIndexOf(str, loc.textSpan.start) !== loc.textSpan.start - str.length);
            }
        });
    }
    mapRangeToOriginal(snapshot, textSpan) {
        const range = (0, documents_1$i.mapRangeToOriginal)(snapshot, (0, utils_2$e.convertRange)(snapshot, textSpan));
        if (range.end.character - range.start.character < textSpan.length) {
            range.end.character++;
        }
        return range;
    }
    getVariableAtPosition(tsDoc, lang, position) {
        const offset = tsDoc.offsetAt(tsDoc.getGeneratedPosition(position));
        const { start, length } = lang.getSmartSelectionRange(tsDoc.filePath, offset).textSpan;
        return tsDoc.getText(start, start + length);
    }
    async getLSAndTSDoc(document) {
        return this.lsAndTsDocResolver.getLSAndTSDoc(document);
    }
    getSnapshot(filePath) {
        return this.lsAndTsDocResolver.getOrCreateSnapshot(filePath);
    }
    checkShortHandBindingOrSlotLetLocation(lang, renameLocations, snapshots, newName) {
        return renameLocations.map((location) => {
            const sourceFile = lang.getProgram()?.getSourceFile(location.fileName);
            if (!sourceFile ||
                location.fileName !== sourceFile.fileName ||
                location.range.start.line < 0 ||
                location.range.end.line < 0) {
                return location;
            }
            const snapshot = snapshots.get(location.fileName);
            if (!(snapshot instanceof DocumentSnapshot_1$4.SvelteDocumentSnapshot)) {
                return location;
            }
            const { parent } = snapshot;
            if (snapshot.isSvelte5Plus && newName && location.suffixText) {
                const shorthandLocation = this.transformShorthand(snapshot, location, newName);
                if (shorthandLocation) {
                    return shorthandLocation;
                }
            }
            let rangeStart = parent.offsetAt(location.range.start);
            let prefixText = location.prefixText?.trimRight();
            if (!prefixText) {
                const original = parent.getText({
                    start: vscode_languageserver_1$j.Position.create(location.range.start.line, location.range.start.character - bind.length),
                    end: location.range.end
                });
                if (original.startsWith(bind) &&
                    (0, documents_1$i.getNodeIfIsInHTMLStartTag)(parent.html, rangeStart)) {
                    return {
                        ...location,
                        prefixText: original.slice(bind.length) + '={',
                        suffixText: '}'
                    };
                }
            }
            if (!prefixText || prefixText.slice(-1) !== ':') {
                return location;
            }
            if (!(0, documents_1$i.getNodeIfIsInStartTag)(parent.html, rangeStart) ||
                (parent.getText().charAt(rangeStart - 1) !== ':' &&
                    !/[^{]\s+{$/.test(parent.getText({
                        start: vscode_languageserver_1$j.Position.create(0, 0),
                        end: location.range.start
                    })))) {
                return location;
            }
            prefixText = prefixText.slice(0, -1) + '={';
            location = {
                ...location,
                prefixText,
                suffixText: '}'
            };
            if (snapshot.getOriginalText().charAt(rangeStart - 1) === '{') {
                rangeStart--;
                const rangeEnd = parent.offsetAt(location.range.end) + 1;
                location.range = {
                    start: parent.positionAt(rangeStart),
                    end: parent.positionAt(rangeEnd)
                };
            }
            return location;
        });
    }
    transformShorthand(snapshot, location, newName) {
        const shorthand = this.getBindingOrAttrShorthand(snapshot, location.range.start);
        if (shorthand) {
            if (shorthand.isBinding) {
                return {
                    ...location,
                    prefixText: '',
                    suffixText: `={${shorthand.id.name}}`
                };
            }
            else {
                return {
                    ...location,
                    range: {
                        start: {
                            line: location.range.start.line,
                            character: location.range.start.character - 1
                        },
                        end: location.range.end
                    },
                    newName: shorthand.id.name,
                    prefixText: `${newName}={`,
                    suffixText: ''
                };
            }
        }
    }
    getBindingOrAttrShorthand(snapshot, position, svelteNode = snapshot.svelteNodeAt(position)) {
        if ((svelteNode?.parent?.type === 'Binding' ||
            svelteNode?.parent?.type === 'AttributeShorthand') &&
            svelteNode.parent.expression.end === svelteNode.parent.end) {
            return {
                id: svelteNode,
                isBinding: svelteNode.parent.type === 'Binding'
            };
        }
    }
}
RenameProvider.RenameProviderImpl = RenameProviderImpl;

var SelectionRangeProvider = {};

Object.defineProperty(SelectionRangeProvider, "__esModule", { value: true });
SelectionRangeProvider.SelectionRangeProviderImpl = void 0;
const vscode_languageserver_1$i = main$8;
const documents_1$h = documents;
const utils_1$q = utils$2;
const utils_2$d = requireUtils();
class SelectionRangeProviderImpl {
    constructor(lsAndTsDocResolver) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
    }
    async getSelectionRange(document, position) {
        const { tsDoc, lang } = await this.lsAndTsDocResolver.getLsForSyntheticOperations(document);
        const tsSelectionRange = lang.getSmartSelectionRange(tsDoc.filePath, tsDoc.offsetAt(tsDoc.getGeneratedPosition(position)));
        const selectionRange = this.toSelectionRange(tsDoc, tsSelectionRange);
        const mappedRange = this.mapSelectionRangeToParent(tsDoc, document, selectionRange);
        return this.filterOutUnmappedRange(mappedRange);
    }
    toSelectionRange(snapshot, { textSpan, parent }) {
        return {
            range: (0, utils_1$q.convertRange)(snapshot, textSpan),
            parent: parent && this.toSelectionRange(snapshot, parent)
        };
    }
    mapSelectionRangeToParent(tsDoc, document, selectionRange) {
        const { range, parent } = selectionRange;
        const originalRange = (0, documents_1$h.mapRangeToOriginal)(tsDoc, range);
        (0, utils_2$d.checkRangeMappingWithGeneratedSemi)(originalRange, range, tsDoc);
        if (!parent) {
            return vscode_languageserver_1$i.SelectionRange.create(originalRange);
        }
        return vscode_languageserver_1$i.SelectionRange.create(originalRange, this.mapSelectionRangeToParent(tsDoc, document, parent));
    }
    filterOutUnmappedRange(selectionRange) {
        const flattened = this.flattenAndReverseSelectionRange(selectionRange);
        const filtered = flattened.filter((range) => range.start.line > 0 && range.end.line > 0);
        if (!filtered.length) {
            return null;
        }
        let result;
        for (const selectionRange of filtered) {
            result = vscode_languageserver_1$i.SelectionRange.create(selectionRange, result);
        }
        return result ?? null;
    }
    flattenAndReverseSelectionRange(selectionRange) {
        const result = [];
        let current = selectionRange;
        while (current.parent) {
            result.unshift(current.range);
            current = current.parent;
        }
        return result;
    }
}
SelectionRangeProvider.SelectionRangeProviderImpl = SelectionRangeProviderImpl;

var SemanticTokensProvider = {};

var __importDefault$e = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(SemanticTokensProvider, "__esModule", { value: true });
SemanticTokensProvider.SemanticTokensProviderImpl = void 0;
const typescript_1$b = __importDefault$e(ts);
const vscode_languageserver_1$h = main$8;
const documents_1$g = documents;
const utils_1$p = utils$2;
const utils_2$c = requireUtils();
const svelte2tsx_1$4 = require$$0;
const CONTENT_LENGTH_LIMIT = 50000;
class SemanticTokensProviderImpl {
    constructor(lsAndTsDocResolver) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
    }
    async getSemanticTokens(textDocument, range, cancellationToken) {
        const { lang, tsDoc } = await this.lsAndTsDocResolver.getLSAndTSDoc(textDocument);
        if ((!range && tsDoc.getLength() > CONTENT_LENGTH_LIMIT) ||
            cancellationToken?.isCancellationRequested) {
            return null;
        }
        if (!textDocument.scriptInfo && !textDocument.moduleScriptInfo) {
            return null;
        }
        const textSpan = range
            ? (0, utils_1$p.convertToTextSpan)(range, tsDoc)
            : {
                start: 0,
                length: tsDoc.parserError
                    ? tsDoc.getLength()
                    :
                        tsDoc.getFullText().lastIndexOf('return { props:') || tsDoc.getLength()
            };
        const { spans } = lang.getEncodedSemanticClassifications(tsDoc.filePath, textSpan, typescript_1$b.default.SemanticClassificationFormat.TwentyTwenty);
        const data = [];
        let index = 0;
        while (index < spans.length) {
            const generatedOffset = spans[index++];
            const generatedLength = spans[index++];
            const encodedClassification = spans[index++];
            const classificationType = this.getTokenTypeFromClassification(encodedClassification);
            if (classificationType < 0) {
                continue;
            }
            const original = this.map(textDocument, tsDoc, generatedOffset, generatedLength, encodedClassification, classificationType);
            if (!original || original[2] <= 0) {
                continue;
            }
            data.push(original);
        }
        const sorted = data.sort((a, b) => {
            const [lineA, charA] = a;
            const [lineB, charB] = b;
            return lineA - lineB || charA - charB;
        });
        const builder = new vscode_languageserver_1$h.SemanticTokensBuilder();
        sorted.forEach((tokenData) => builder.push(...tokenData));
        return builder.build();
    }
    map(document, snapshot, generatedOffset, generatedLength, encodedClassification, classificationType) {
        const text = snapshot.getFullText();
        if ((0, utils_2$c.isInGeneratedCode)(text, generatedOffset, generatedOffset + generatedLength) ||
            (encodedClassification === 2817  &&
                text.substring(generatedOffset, generatedOffset + generatedLength) ===
                    svelte2tsx_1$4.internalHelpers.renderName)) {
            return;
        }
        const range = {
            start: snapshot.positionAt(generatedOffset),
            end: snapshot.positionAt(generatedOffset + generatedLength)
        };
        const { start: startPosition, end: endPosition } = (0, documents_1$g.mapRangeToOriginal)(snapshot, range);
        if (startPosition.line < 0 || endPosition.line < 0) {
            return;
        }
        const startOffset = document.offsetAt(startPosition);
        const endOffset = document.offsetAt(endPosition);
        const originalText = document.getText();
        if ((classificationType === 0  ||
            classificationType === 5  ||
            classificationType === 6  ||
            classificationType === 7  ||
            classificationType === 10 ) &&
            (originalText.charCodeAt(startOffset - 1) ===  60 ||
                originalText.charCodeAt(startOffset - 1) ===  47) &&
            snapshot.svelteNodeAt(startOffset)?.type === 'InlineComponent') {
            return;
        }
        return [
            startPosition.line,
            startPosition.character,
            endOffset - startOffset,
            classificationType,
            this.getTokenModifierFromClassification(encodedClassification)
        ];
    }
    getTokenTypeFromClassification(tsClassification) {
        return (tsClassification >> 8 ) - 1;
    }
    getTokenModifierFromClassification(tsClassification) {
        return tsClassification & 255 ;
    }
}
SemanticTokensProvider.SemanticTokensProviderImpl = SemanticTokensProviderImpl;

var SignatureHelpProvider = {};

var __importDefault$d = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(SignatureHelpProvider, "__esModule", { value: true });
SignatureHelpProvider.SignatureHelpProviderImpl = void 0;
const typescript_1$a = __importDefault$d(ts);
const vscode_languageserver_1$g = main$8;
const previewer_1 = previewer;
class SignatureHelpProviderImpl {
    constructor(lsAndTsDocResolver) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
    }
    async getSignatureHelp(document, position, context, cancellationToken) {
        const { lang, tsDoc } = await this.lsAndTsDocResolver.getLSAndTSDoc(document);
        if (cancellationToken?.isCancellationRequested) {
            return null;
        }
        const offset = tsDoc.offsetAt(tsDoc.getGeneratedPosition(position));
        const triggerReason = this.toTsTriggerReason(context);
        const info = lang.getSignatureHelpItems(tsDoc.filePath, offset, triggerReason ? { triggerReason } : undefined);
        if (!info ||
            info.items.some((signature) => this.isInSvelte2tsxGeneratedFunction(signature))) {
            return null;
        }
        const signatures = info.items.map(this.toSignatureHelpInformation);
        return {
            signatures,
            activeSignature: info.selectedItemIndex,
            activeParameter: info.argumentIndex
        };
    }
    isReTrigger(isRetrigger, triggerCharacter) {
        return (isRetrigger &&
            (this.isTriggerCharacter(triggerCharacter) ||
                SignatureHelpProviderImpl.retriggerCharacters.includes(triggerCharacter)));
    }
    isTriggerCharacter(triggerCharacter) {
        return SignatureHelpProviderImpl.triggerCharacters.includes(triggerCharacter);
    }
    toTsTriggerReason(context) {
        switch (context?.triggerKind) {
            case vscode_languageserver_1$g.SignatureHelpTriggerKind.TriggerCharacter:
                if (context.triggerCharacter) {
                    if (this.isReTrigger(context.isRetrigger, context.triggerCharacter)) {
                        return { kind: 'retrigger', triggerCharacter: context.triggerCharacter };
                    }
                    if (this.isTriggerCharacter(context.triggerCharacter)) {
                        return {
                            kind: 'characterTyped',
                            triggerCharacter: context.triggerCharacter
                        };
                    }
                }
                return { kind: 'invoked' };
            case vscode_languageserver_1$g.SignatureHelpTriggerKind.ContentChange:
                return context.isRetrigger ? { kind: 'retrigger' } : { kind: 'invoked' };
            case vscode_languageserver_1$g.SignatureHelpTriggerKind.Invoked:
            default:
                return { kind: 'invoked' };
        }
    }
    toSignatureHelpInformation(item) {
        const [prefixLabel, separatorLabel, suffixLabel] = [
            item.prefixDisplayParts,
            item.separatorDisplayParts,
            item.suffixDisplayParts
        ].map(typescript_1$a.default.displayPartsToString);
        let textIndex = prefixLabel.length;
        let signatureLabel = '';
        const parameters = [];
        const lastIndex = item.parameters.length - 1;
        item.parameters.forEach((parameter, index) => {
            const label = typescript_1$a.default.displayPartsToString(parameter.displayParts);
            const startIndex = textIndex;
            const endIndex = textIndex + label.length;
            const doc = typescript_1$a.default.displayPartsToString(parameter.documentation);
            signatureLabel += label;
            parameters.push(vscode_languageserver_1$g.ParameterInformation.create([startIndex, endIndex], doc));
            if (index < lastIndex) {
                textIndex = endIndex + separatorLabel.length;
                signatureLabel += separatorLabel;
            }
        });
        const signatureDocumentation = (0, previewer_1.getMarkdownDocumentation)(item.documentation, item.tags.filter((tag) => tag.name !== 'param'));
        return {
            label: prefixLabel + signatureLabel + suffixLabel,
            documentation: signatureDocumentation
                ? {
                    value: signatureDocumentation,
                    kind: vscode_languageserver_1$g.MarkupKind.Markdown
                }
                : undefined,
            parameters
        };
    }
    isInSvelte2tsxGeneratedFunction(signatureHelpItem) {
        return signatureHelpItem.prefixDisplayParts.some((part) => part.text.includes('__sveltets'));
    }
}
SignatureHelpProvider.SignatureHelpProviderImpl = SignatureHelpProviderImpl;
SignatureHelpProviderImpl.triggerCharacters = ['(', ',', '<'];
SignatureHelpProviderImpl.retriggerCharacters = [')'];

var TypeDefinitionProvider = {};

Object.defineProperty(TypeDefinitionProvider, "__esModule", { value: true });
TypeDefinitionProvider.TypeDefinitionProviderImpl = void 0;
const documents_1$f = documents;
const utils_1$o = utils$6;
const utils_2$b = utils$2;
const utils_3$7 = requireUtils();
class TypeDefinitionProviderImpl {
    constructor(lsAndTsDocResolver) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
    }
    async getTypeDefinition(document, position) {
        const { tsDoc, lang, lsContainer } = await this.lsAndTsDocResolver.getLSAndTSDoc(document);
        const offset = tsDoc.offsetAt(tsDoc.getGeneratedPosition(position));
        const typeDefs = lang.getTypeDefinitionAtPosition(tsDoc.filePath, offset);
        const snapshots = new utils_3$7.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
        snapshots.set(tsDoc.filePath, tsDoc);
        if (!typeDefs) {
            return null;
        }
        const result = await Promise.all(typeDefs.map(async (typeDef) => {
            const snapshot = await snapshots.retrieve(typeDef.fileName);
            if ((0, utils_3$7.isTextSpanInGeneratedCode)(snapshot.getFullText(), typeDef.textSpan)) {
                return;
            }
            const location = (0, documents_1$f.mapLocationToOriginal)(snapshot, (0, utils_2$b.convertRange)(snapshot, typeDef.textSpan));
            if (location.range.start.line >= 0 && location.range.end.line >= 0) {
                return location;
            }
        }));
        return result.filter(utils_1$o.isNotNullOrUndefined);
    }
}
TypeDefinitionProvider.TypeDefinitionProviderImpl = TypeDefinitionProviderImpl;

var UpdateImportsProvider = {};

var service = {};

var moduleLoader = {};

var svelteSys = {};

Object.defineProperty(svelteSys, "__esModule", { value: true });
svelteSys.createSvelteSys = createSvelteSys;
const utils_1$n = utils$2;
const fileCollection_1$3 = fileCollection;
function createSvelteSys(tsSystem) {
    const fileExistsCache = new fileCollection_1$3.FileMap();
    function svelteFileExists(path) {
        if ((0, utils_1$n.isVirtualSvelteFilePath)(path)) {
            const sveltePath = (0, utils_1$n.toRealSvelteFilePath)(path);
            const dtsPath = sveltePath.slice(0, -7) + '.svelte.d.ts';
            const dtsPathExists = getOrCreateFileExistCache(dtsPath);
            if (dtsPathExists)
                return false;
            const svelteDtsPathExists = getOrCreateFileExistCache(path);
            if (svelteDtsPathExists)
                return false;
            const sveltePathExists = getOrCreateFileExistCache(sveltePath);
            return sveltePathExists;
        }
        else {
            return false;
        }
    }
    function getOrCreateFileExistCache(path) {
        const cached = fileExistsCache.get(path);
        if (cached !== undefined) {
            return cached;
        }
        const exists = tsSystem.fileExists(path);
        fileExistsCache.set(path, exists);
        return exists;
    }
    function getRealSveltePathIfExists(path) {
        return svelteFileExists(path) ? (0, utils_1$n.toRealSvelteFilePath)(path) : path;
    }
    const svelteSys = {
        ...tsSystem,
        svelteFileExists,
        getRealSveltePathIfExists,
        fileExists(path) {
            const sveltePathExists = svelteFileExists(path);
            if (sveltePathExists)
                return true;
            return getOrCreateFileExistCache(path);
        },
        readFile(path) {
            return tsSystem.readFile(getRealSveltePathIfExists(path));
        },
        readDirectory(path, extensions, exclude, include, depth) {
            const extensionsWithSvelte = extensions ? [...extensions, '.svelte'] : undefined;
            return tsSystem.readDirectory(path, extensionsWithSvelte, exclude, include, depth);
        },
        deleteFile(path) {
            fileExistsCache.delete((0, utils_1$n.ensureRealSvelteFilePath)(path));
            fileExistsCache.delete(path);
            return tsSystem.deleteFile?.(path);
        },
        deleteFromCache(path) {
            fileExistsCache.delete((0, utils_1$n.ensureRealSvelteFilePath)(path));
            fileExistsCache.delete(path);
        }
    };
    if (tsSystem.realpath) {
        const realpath = tsSystem.realpath;
        svelteSys.realpath = function (path) {
            if (svelteFileExists(path)) {
                return realpath((0, utils_1$n.toRealSvelteFilePath)(path));
            }
            return realpath(path);
        };
    }
    return svelteSys;
}

var __importDefault$c = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(moduleLoader, "__esModule", { value: true });
moduleLoader.createSvelteModuleLoader = createSvelteModuleLoader;
const typescript_1$9 = __importDefault$c(ts);
const fileCollection_1$2 = fileCollection;
const utils_1$m = utils$6;
const svelte_sys_1 = svelteSys;
const utils_2$a = utils$2;
const CACHE_KEY_SEPARATOR = ':::';
class ModuleResolutionCache {
    constructor() {
        this.cache = new fileCollection_1$2.FileMap();
        this.pendingInvalidations = new fileCollection_1$2.FileSet();
        this.getCanonicalFileName = (0, utils_1$m.createGetCanonicalFileName)(typescript_1$9.default.sys.useCaseSensitiveFileNames);
    }
    get(moduleName, containingFile) {
        return this.cache.get(this.getKey(moduleName, containingFile));
    }
    has(moduleName, containingFile) {
        return this.cache.has(this.getKey(moduleName, containingFile));
    }
    set(moduleName, containingFile, resolvedModule) {
        this.cache.set(this.getKey(moduleName, containingFile), resolvedModule);
    }
    delete(resolvedModuleName) {
        resolvedModuleName = this.getCanonicalFileName(resolvedModuleName);
        this.cache.forEach((val, key) => {
            if (val.resolvedModule &&
                this.getCanonicalFileName(val.resolvedModule.resolvedFileName) ===
                    resolvedModuleName) {
                this.cache.delete(key);
                this.pendingInvalidations.add(key.split(CACHE_KEY_SEPARATOR).shift() || '');
            }
        });
    }
    deleteByValues(list) {
        this.cache.forEach((val, key) => {
            if (list.includes(val)) {
                this.cache.delete(key);
            }
        });
    }
    getKey(moduleName, containingFile) {
        return containingFile + CACHE_KEY_SEPARATOR + (0, utils_2$a.ensureRealSvelteFilePath)(moduleName);
    }
    clearPendingInvalidations() {
        this.pendingInvalidations.clear();
    }
    oneOfResolvedModuleChanged(path) {
        return this.pendingInvalidations.size > 0 && this.pendingInvalidations.has(path);
    }
}
class ImpliedNodeFormatResolver {
    constructor(tsSystem) {
        this.tsSystem = tsSystem;
    }
    resolve(importPath, importIdxInFile, sourceFile, compilerOptions) {
        if ((0, utils_2$a.isSvelteFilePath)(importPath)) {
            return undefined;
        }
        let mode = undefined;
        if (sourceFile) {
            mode = typescript_1$9.default.getModeForResolutionAtIndex(sourceFile, importIdxInFile, compilerOptions);
        }
        return mode;
    }
    resolveForTypeReference(entry, sourceFile) {
        let mode = undefined;
        if (sourceFile) {
            mode = typescript_1$9.default.getModeForFileReference(entry, sourceFile?.impliedNodeFormat);
        }
        return mode;
    }
}
function getTypeReferenceResolutionName(entry) {
    return typeof entry !== 'string' ? (0, utils_1$m.toFileNameLowerCase)(entry.fileName) : entry;
}
function createSvelteModuleLoader(getSnapshot, compilerOptions, tsSystem, tsModule, getModuleResolutionHost) {
    const getCanonicalFileName = (0, utils_1$m.createGetCanonicalFileName)(tsSystem.useCaseSensitiveFileNames);
    const svelteSys = (0, svelte_sys_1.createSvelteSys)(tsSystem);
    const tsModuleCache = tsModule.createModuleResolutionCache(tsSystem.getCurrentDirectory(), (0, utils_1$m.createGetCanonicalFileName)(tsSystem.useCaseSensitiveFileNames));
    const tsTypeReferenceDirectiveCache = tsModule.createTypeReferenceDirectiveResolutionCache(tsSystem.getCurrentDirectory(), getCanonicalFileName, undefined, tsModuleCache.getPackageJsonInfoCache());
    const moduleCache = new ModuleResolutionCache();
    const typeReferenceCache = new Map();
    const impliedNodeFormatResolver = new ImpliedNodeFormatResolver(tsSystem);
    const resolutionWithFailedLookup = new Set();
    const failedLocationInvalidated = new fileCollection_1$2.FileSet(tsSystem.useCaseSensitiveFileNames);
    const pendingFailedLocationCheck = new fileCollection_1$2.FileSet(tsSystem.useCaseSensitiveFileNames);
    return {
        svelteFileExists: svelteSys.svelteFileExists,
        fileExists: svelteSys.fileExists,
        readFile: svelteSys.readFile,
        readDirectory: svelteSys.readDirectory,
        deleteFromModuleCache: (path) => {
            svelteSys.deleteFromCache(path);
            moduleCache.delete(path);
        },
        scheduleResolutionFailedLocationCheck: (path) => {
            svelteSys.deleteFromCache(path);
            if ((0, utils_2$a.isSvelteFilePath)(path)) {
                pendingFailedLocationCheck.add((0, utils_2$a.toVirtualSvelteFilePath)(path));
            }
            else {
                pendingFailedLocationCheck.add(path);
            }
        },
        resolveModuleNames,
        resolveTypeReferenceDirectiveReferences,
        mightHaveInvalidatedResolutions,
        clearPendingInvalidations,
        getModuleResolutionCache: () => tsModuleCache,
        invalidateFailedLocationResolution
    };
    function resolveModuleNames(moduleNames, containingFile, _reusedNames, redirectedReference, options, containingSourceFile) {
        return moduleNames.map((moduleName, index) => {
            const cached = moduleCache.get(moduleName, containingFile);
            if (cached) {
                return cached.resolvedModule;
            }
            const resolvedModule = resolveModuleName(moduleName, containingFile, containingSourceFile, index, redirectedReference, options);
            cacheResolutionWithFailedLookup(resolvedModule, containingFile);
            moduleCache.set(moduleName, containingFile, resolvedModule);
            return resolvedModule?.resolvedModule;
        });
    }
    function resolveModuleName(name, containingFile, containingSourceFile, index, redirectedReference, option) {
        const mode = impliedNodeFormatResolver.resolve(name, index, containingSourceFile,
        redirectedReference?.commandLine.options ?? option);
        const resolvedModuleWithFailedLookup = tsModule.resolveModuleName(name, containingFile, compilerOptions, getModuleResolutionHost() ?? svelteSys, tsModuleCache, redirectedReference, mode);
        const resolvedModule = resolvedModuleWithFailedLookup.resolvedModule;
        if (!resolvedModule || !(0, utils_2$a.isVirtualSvelteFilePath)(resolvedModule.resolvedFileName)) {
            return resolvedModuleWithFailedLookup;
        }
        const resolvedFileName = svelteSys.getRealSveltePathIfExists(resolvedModule.resolvedFileName);
        if (!(0, utils_2$a.isSvelteFilePath)(resolvedFileName)) {
            return resolvedModuleWithFailedLookup;
        }
        const snapshot = getSnapshot(resolvedFileName);
        const resolvedSvelteModule = {
            extension: (0, utils_2$a.getExtensionFromScriptKind)(snapshot && snapshot.scriptKind),
            resolvedFileName,
            isExternalLibraryImport: resolvedModule.isExternalLibraryImport
        };
        return {
            ...resolvedModuleWithFailedLookup,
            resolvedModule: resolvedSvelteModule
        };
    }
    function resolveTypeReferenceDirectiveReferences(typeDirectiveNames, containingFile, redirectedReference, options, containingSourceFile) {
        return typeDirectiveNames.map((typeDirectiveName) => {
            const entry = getTypeReferenceResolutionName(typeDirectiveName);
            const mode = impliedNodeFormatResolver.resolveForTypeReference(entry, containingSourceFile);
            const key = `${entry}|${mode}`;
            let result = typeReferenceCache.get(key);
            if (!result) {
                result = typescript_1$9.default.resolveTypeReferenceDirective(entry, containingFile, options, {
                    ...tsSystem
                }, redirectedReference, tsTypeReferenceDirectiveCache, mode);
                typeReferenceCache.set(key, result);
            }
            return result;
        });
    }
    function mightHaveInvalidatedResolutions(path) {
        return (moduleCache.oneOfResolvedModuleChanged(path) ||
            (failedLocationInvalidated.size > 0 && failedLocationInvalidated.has(path)));
    }
    function clearPendingInvalidations() {
        moduleCache.clearPendingInvalidations();
        failedLocationInvalidated.clear();
        pendingFailedLocationCheck.clear();
    }
    function cacheResolutionWithFailedLookup(resolvedModule, containingFile) {
        if (!resolvedModule.failedLookupLocations?.length) {
            return;
        }
        resolvedModule.files ??= new Set();
        resolvedModule.files.add(containingFile);
        resolutionWithFailedLookup.add(resolvedModule);
    }
    function invalidateFailedLocationResolution() {
        if (pendingFailedLocationCheck.size === 0) {
            return;
        }
        const toRemoves = [];
        resolutionWithFailedLookup.forEach((resolvedModule) => {
            if (!resolvedModule.failedLookupLocations) {
                return;
            }
            for (const location of resolvedModule.failedLookupLocations) {
                if (pendingFailedLocationCheck.has(location)) {
                    resolutionWithFailedLookup.delete(resolvedModule);
                    toRemoves.push(resolvedModule);
                    resolvedModule.files?.forEach((file) => {
                        failedLocationInvalidated.add(file);
                    });
                    break;
                }
            }
        });
        if (toRemoves.length) {
            moduleCache.deleteByValues(toRemoves);
            tsModuleCache.clear();
            tsTypeReferenceDirectiveCache.clear();
        }
        pendingFailedLocationCheck.clear();
    }
}

var serviceCache = {};

var projectService = {};

var packageJsonCache = {};

Object.defineProperty(packageJsonCache, "__esModule", { value: true });
packageJsonCache.createPackageJsonCache = void 0;
function createPackageJsonCache(ts, host) {
    const { createPackageJsonInfo, getDirectoryPath, combinePaths, tryFileExists, forEachAncestorDirectory } = ts;
    const packageJsons = new Map();
    const directoriesWithoutPackageJson = new Map();
    return {
        addOrUpdate,
        forEach: packageJsons.forEach.bind(packageJsons),
        get: packageJsons.get.bind(packageJsons),
        delete: (fileName) => {
            packageJsons.delete(fileName);
            directoriesWithoutPackageJson.set(getDirectoryPath(fileName), true);
        },
        getInDirectory: (directory) => {
            return packageJsons.get(combinePaths(directory, 'package.json')) || undefined;
        },
        directoryHasPackageJson,
        searchDirectoryAndAncestors: (directory) => {
            forEachAncestorDirectory(directory, (ancestor) => {
                if (directoryHasPackageJson(ancestor) !== 3 ) {
                    return true;
                }
                const packageJsonFileName = host.toPath(combinePaths(ancestor, 'package.json'));
                if (tryFileExists(host, packageJsonFileName)) {
                    addOrUpdate(packageJsonFileName);
                }
                else {
                    directoriesWithoutPackageJson.set(ancestor, true);
                }
            });
        },
    };
    function addOrUpdate(fileName) {
        const packageJsonInfo =  createPackageJsonInfo(fileName, host.host);
        packageJsons.set(fileName, packageJsonInfo);
        directoriesWithoutPackageJson.delete(getDirectoryPath(fileName));
    }
    function directoryHasPackageJson(directory) {
        return packageJsons.has(combinePaths(directory, 'package.json'))
            ? -1
            : directoriesWithoutPackageJson.has(directory)
                ? 0
                : 3 ;
    }
}
packageJsonCache.createPackageJsonCache = createPackageJsonCache;

Object.defineProperty(projectService, "__esModule", { value: true });
projectService.createProjectService = void 0;
const packageJsonCache_1 = packageJsonCache;
function createProjectService$1(ts, sys, currentDirectory, hostConfiguration, serverMode) {
    const { toPath, getNormalizedAbsolutePath, normalizePath: toNormalizedPath, createGetCanonicalFileName, forEachAncestorDirectory, getDirectoryPath, } = ts;
    const projectService = {
        serverMode,
        host: sys,
        currentDirectory: toNormalizedPath(currentDirectory),
        toCanonicalFileName: createGetCanonicalFileName(sys.useCaseSensitiveFileNames),
        toPath(fileName) {
            return toPath(fileName, this.currentDirectory, this.toCanonicalFileName);
        },
        getExecutingFilePath() {
            return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath());
        },
        getNormalizedAbsolutePath(fileName) {
            return getNormalizedAbsolutePath(fileName, this.host.getCurrentDirectory());
        },
        packageJsonCache: undefined,
        getPackageJsonsVisibleToFile(fileName, rootDir) {
            const packageJsonCache = this.packageJsonCache;
            const rootPath = rootDir && this.toPath(rootDir);
            const filePath = this.toPath(fileName);
            const result = [];
            const processDirectory = (directory) => {
                switch (packageJsonCache.directoryHasPackageJson(directory)) {
                    case 3 :
                        packageJsonCache.searchDirectoryAndAncestors(directory);
                        return processDirectory(directory);
                    case -1 :
                        const info = packageJsonCache.getInDirectory(directory);
                        if (info)
                            result.push(info);
                }
                if (rootPath && rootPath === directory) {
                    return true;
                }
            };
            forEachAncestorDirectory(getDirectoryPath(filePath), processDirectory);
            return result;
        },
        includePackageJsonAutoImports() {
            switch (hostConfiguration.preferences.includePackageJsonAutoImports) {
                case 'on': return 1 ;
                case 'off': return 0 ;
                default: return 2 ;
            }
        },
        fileExists(fileName) {
            return this.host.fileExists(fileName);
        },
    };
    projectService.packageJsonCache = (0, packageJsonCache_1.createPackageJsonCache)(ts, projectService);
    return projectService;
}
projectService.createProjectService = createProjectService$1;

var project$2 = {};

var moduleSpecifierCache$1 = {};

Object.defineProperty(moduleSpecifierCache$1, "__esModule", { value: true });
moduleSpecifierCache$1.createModuleSpecifierCache = moduleSpecifierCache$1.nodeModulesPathPart = void 0;
moduleSpecifierCache$1.nodeModulesPathPart = "/node_modules/";
function createModuleSpecifierCache$1(
) {
    let cache;
    let currentKey;
    const result = {
        get(fromFileName, toFileName, preferences, options) {
            if (!cache || currentKey !== key(fromFileName, preferences, options))
                return undefined;
            return cache.get(toFileName);
        },
        set(fromFileName, toFileName, preferences, options, modulePaths, moduleSpecifiers) {
            ensureCache(fromFileName, preferences, options).set(toFileName, createInfo(modulePaths, moduleSpecifiers,  false));
            if (moduleSpecifiers) {
                for (const p of modulePaths) {
                    if (p.isInNodeModules) ;
                }
            }
        },
        setModulePaths(fromFileName, toFileName, preferences, options, modulePaths) {
            const cache = ensureCache(fromFileName, preferences, options);
            const info = cache.get(toFileName);
            if (info) {
                info.modulePaths = modulePaths;
            }
            else {
                cache.set(toFileName, createInfo(modulePaths,  undefined,  undefined));
            }
        },
        setBlockedByPackageJsonDependencies(fromFileName, toFileName, preferences, options, isBlockedByPackageJsonDependencies) {
            const cache = ensureCache(fromFileName, preferences, options);
            const info = cache.get(toFileName);
            if (info) {
                info.isBlockedByPackageJsonDependencies = isBlockedByPackageJsonDependencies;
            }
            else {
                cache.set(toFileName, createInfo( undefined,  undefined, isBlockedByPackageJsonDependencies));
            }
        },
        clear() {
            cache === null || cache === void 0 ? void 0 : cache.clear();
            currentKey = undefined;
        },
        count() {
            return cache ? cache.size : 0;
        }
    };
    return result;
    function ensureCache(fromFileName, preferences, options) {
        const newKey = key(fromFileName, preferences, options);
        if (cache && (currentKey !== newKey)) {
            result.clear();
        }
        currentKey = newKey;
        return cache || (cache = new Map());
    }
    function key(fromFileName, preferences, options) {
        return `${fromFileName},${preferences.importModuleSpecifierEnding},${preferences.importModuleSpecifierPreference},${options.overrideImportMode}`;
    }
    function createInfo(modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies) {
        return { modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies };
    }
}
moduleSpecifierCache$1.createModuleSpecifierCache = createModuleSpecifierCache$1;

var autoImportProviderProject = {};

var hasRequiredAutoImportProviderProject;
function requireAutoImportProviderProject () {
	if (hasRequiredAutoImportProviderProject) return autoImportProviderProject;
	hasRequiredAutoImportProviderProject = 1;
	Object.defineProperty(autoImportProviderProject, "__esModule", { value: true });
	autoImportProviderProject.createAutoImportProviderProjectStatic = void 0;
	const project_1 = requireProject();
	function createAutoImportProviderProjectStatic(tsBase, host, createLanguageService) {
	    const ts = tsBase;
	    const { combinePaths, inferredTypesContainingFile, arrayFrom, resolvePackageNameToPackageJson, concatenate, forEach, startsWith, getEntrypointsFromPackageJsonInfo, mapDefined, timestamp, } = ts;
	    return {
	        maxDependencies: 10,
	        compilerOptionsOverrides: {
	            diagnostics: false,
	            skipLibCheck: true,
	            sourceMap: false,
	            types: ts.emptyArray,
	            lib: ts.emptyArray,
	            noLib: true,
	        },
	        getRootFileNames(dependencySelection, hostProject, moduleResolutionHost, compilerOptions) {
	            var _a, _b;
	            if (!dependencySelection) {
	                return ts.emptyArray;
	            }
	            const program = hostProject.getCurrentProgram();
	            if (!program) {
	                return ts.emptyArray;
	            }
	            const start = timestamp();
	            let dependencyNames;
	            let rootNames;
	            const rootFileName = combinePaths(hostProject.currentDirectory, inferredTypesContainingFile);
	            const packageJsons = hostProject.getPackageJsonsForAutoImport(combinePaths(hostProject.currentDirectory, rootFileName));
	            for (const packageJson of packageJsons) {
	                (_a = packageJson.dependencies) === null || _a === void 0 ? void 0 : _a.forEach((_, dependenyName) => addDependency(dependenyName));
	                (_b = packageJson.peerDependencies) === null || _b === void 0 ? void 0 : _b.forEach((_, dependencyName) => addDependency(dependencyName));
	            }
	            let dependenciesAdded = 0;
	            if (dependencyNames) {
	                const symlinkCache = hostProject.getSymlinkCache();
	                for (const name of arrayFrom(dependencyNames.keys())) {
	                    if (dependencySelection === 2  && dependenciesAdded > this.maxDependencies) {
	                        hostProject.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`);
	                        return ts.emptyArray;
	                    }
	                    const packageJson = resolvePackageNameToPackageJson(name, hostProject.currentDirectory, compilerOptions, moduleResolutionHost,
	                    program.getModuleResolutionCache());
	                    if (packageJson) {
	                        const entrypoints = getRootNamesFromPackageJson(packageJson, program, symlinkCache);
	                        if (entrypoints) {
	                            rootNames = concatenate(rootNames, entrypoints);
	                            dependenciesAdded += entrypoints.length ? 1 : 0;
	                            continue;
	                        }
	                    }
	                    const done = forEach([hostProject.currentDirectory, hostProject.getGlobalTypingsCacheLocation()], (directory) => {
	                        if (directory) {
	                            const typesPackageJson = resolvePackageNameToPackageJson(`@types/${name}`, directory, compilerOptions, moduleResolutionHost,
	                            program.getModuleResolutionCache());
	                            if (typesPackageJson) {
	                                const entrypoints = getRootNamesFromPackageJson(typesPackageJson, program, symlinkCache);
	                                rootNames = concatenate(rootNames, entrypoints);
	                                dependenciesAdded += (entrypoints === null || entrypoints === void 0 ? void 0 : entrypoints.length) ? 1 : 0;
	                                return true;
	                            }
	                        }
	                    });
	                    if (done)
	                        continue;
	                    if (packageJson && compilerOptions.allowJs && compilerOptions.maxNodeModuleJsDepth) {
	                        const entrypoints = getRootNamesFromPackageJson(packageJson, program, symlinkCache,  true);
	                        rootNames = concatenate(rootNames, entrypoints);
	                        dependenciesAdded += (entrypoints === null || entrypoints === void 0 ? void 0 : entrypoints.length) ? 1 : 0;
	                    }
	                }
	            }
	            if (rootNames === null || rootNames === void 0 ? void 0 : rootNames.length) {
	                hostProject.log(`AutoImportProviderProject: found ${rootNames.length} root files in ${dependenciesAdded} dependencies in ${timestamp() - start} ms`);
	            }
	            return rootNames || ts.emptyArray;
	            function addDependency(dependency) {
	                if (!startsWith(dependency, '@types/')) {
	                    (dependencyNames || (dependencyNames = new Set())).add(dependency);
	                }
	            }
	            function getRootNamesFromPackageJson(packageJson, program, symlinkCache, resolveJs) {
	                var _a;
	                const entrypoints = getEntrypointsFromPackageJsonInfo(packageJson, compilerOptions, moduleResolutionHost,
	                program.getModuleResolutionCache(), resolveJs);
	                if (entrypoints) {
	                    if (entrypoints.length > 100)
	                        return;
	                    const real = (_a = moduleResolutionHost.realpath) === null || _a === void 0 ? void 0 : _a.call(moduleResolutionHost, packageJson.packageDirectory);
	                    const isSymlink = real && real !== packageJson.packageDirectory;
	                    if (isSymlink) {
	                        symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, {
	                            real,
	                            realPath: hostProject.toPath(real),
	                        });
	                    }
	                    return mapDefined(entrypoints, (entrypoint) => {
	                        const resolvedFileName = isSymlink ? entrypoint.replace(packageJson.packageDirectory, real) : entrypoint;
	                        if (!program.getSourceFile(resolvedFileName) && !(isSymlink && program.getSourceFile(entrypoint))) {
	                            return resolvedFileName;
	                        }
	                    });
	                }
	            }
	        },
	        create(dependencySelection, hostProject, moduleResolutionHost) {
	            if (dependencySelection === 0 ) {
	                return undefined;
	            }
	            const compilerOptions = Object.assign(Object.assign({}, hostProject.getCompilerOptions()), this.compilerOptionsOverrides);
	            let rootNames = this.getRootFileNames(dependencySelection, hostProject, moduleResolutionHost, compilerOptions);
	            if (!rootNames.length) {
	                return undefined;
	            }
	            return createAutoImportProviderProject(tsBase, host, createLanguageService, { self: this, hostProject, rootNames, compilerOptions });
	        }
	    };
	}
	autoImportProviderProject.createAutoImportProviderProjectStatic = createAutoImportProviderProjectStatic;
	function createAutoImportProviderProject(tsBase, host, createLanguageService, options) {
	    const { self, rootNames, compilerOptions, hostProject } = options;
	    const ts = tsBase;
	    const { some } = ts;
	    const project = Object.assign(Object.assign({}, (0, project_1.createProject)(tsBase, host, createLanguageService, {
	        projectService: hostProject.projectService,
	        currentDirectory: hostProject.currentDirectory,
	        compilerOptions,
	    })), { projectVersion: 0, getProjectVersion() {
	            return this.projectVersion.toString();
	        }, rootFileNames: rootNames, hostProject,
	        isEmpty() {
	            return !some(this.rootFileNames);
	        },
	        isOrphan() {
	            return true;
	        },
	        updateGraph() {
	            var _a;
	            let rootFileNames = this.rootFileNames;
	            if (!rootFileNames) {
	                rootFileNames = self.getRootFileNames(this.hostProject.includePackageJsonAutoImports(), this.hostProject, this.hostProject.getModuleResolutionHostForAutoImportProvider(), this.getCompilationSettings());
	            }
	            this.rootFileNames = rootFileNames;
	            const oldProgram = this.getCurrentProgram();
	            this.program = (_a = this.languageService) === null || _a === void 0 ? void 0 : _a.getProgram();
	            this.dirty = false;
	            if (oldProgram && oldProgram !== this.getCurrentProgram()) {
	                this.hostProject.clearCachedExportInfoMap();
	            }
	        },
	        scheduleInvalidateResolutionsOfFailedLookupLocations() {
	            return;
	        },
	        hasRoots() {
	            var _a;
	            return !!((_a = this.rootFileNames) === null || _a === void 0 ? void 0 : _a.length);
	        },
	        markAsDirty() {
	            if (!this.dirty) {
	                this.rootFileNames = undefined;
	                this.projectVersion++;
	                this.dirty = true;
	            }
	        },
	        getScriptFileNames() {
	            return this.rootFileNames || ts.emptyArray;
	        },
	        getLanguageService() {
	            throw new Error("AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`.");
	        },
	        onAutoImportProviderSettingsChanged() {
	            throw new Error("AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead.");
	        },
	        onPackageJsonChange() {
	            throw new Error("package.json changes should be notified on an AutoImportProvider's host project");
	        },
	        getModuleResolutionHostForAutoImportProvider() {
	            throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead.");
	        },
	        includePackageJsonAutoImports() {
	            return 0 ;
	        },
	        getTypeAcquisition() {
	            return { enable: false };
	        },
	        getSymlinkCache() {
	            return this.hostProject.getSymlinkCache();
	        },
	        getModuleResolutionCache() {
	            var _a, _b;
	            return (_b = (_a = this.hostProject.languageService) === null || _a === void 0 ? void 0 : _a.getProgram()) === null || _b === void 0 ? void 0 : _b.getModuleResolutionCache();
	        } });
	    return (0, project_1.initProject)(project, new Proxy(host, {
	        get(target, key) {
	            return key in project ? project[key] : target[key];
	        },
	        set(_target, key, value) {
	            project[key] = value;
	            return true;
	        }
	    }), createLanguageService);
	}
	return autoImportProviderProject;
}

var hasRequiredProject;
function requireProject () {
	if (hasRequiredProject) return project$2;
	hasRequiredProject = 1;
	Object.defineProperty(project$2, "__esModule", { value: true });
	project$2.initProject = project$2.createProject = void 0;
	const moduleSpecifierCache_1 = moduleSpecifierCache$1;
	const autoImportProviderProject_1 = requireAutoImportProviderProject();
	function createProject(ts, host, createLanguageService, options) {
	    var _a, _b;
	    const { combinePaths, inferredTypesContainingFile, createSymlinkCache, toPath, createCacheableExportInfoMap, timestamp, isInsideNodeModules, LanguageServiceMode, } = ts;
	    const tsCreateModuleSpecifierCache = (_a = ts.server) === null || _a === void 0 ? void 0 : _a.createModuleSpecifierCache;
	    const noopHost = {
	        watchNodeModulesForPackageJsonChanges: () => ({ close: () => { } }),
	        toPath(fileName) {
	            return toPath(fileName, host.getCurrentDirectory(), projectService.toCanonicalFileName);
	        }
	    };
	    const AutoImportProviderProject = (0, autoImportProviderProject_1.createAutoImportProviderProjectStatic)(ts, host, createLanguageService);
	    const { projectService, compilerOptions, currentDirectory } = options;
	    function updateProjectIfDirty(project) {
	        return project.dirty && project.updateGraph();
	    }
	    return {
	        dirty: false,
	        hostProject: undefined,
	        languageServiceEnabled: true,
	        languageService: undefined,
	        projectService,
	        getCanonicalFileName: projectService.toCanonicalFileName,
	        exportMapCache: undefined,
	        getCachedExportInfoMap() {
	            return (this.exportMapCache || (this.exportMapCache = createCacheableExportInfoMap(this)));
	        },
	        clearCachedExportInfoMap() {
	            var _a;
	            (_a = this.exportMapCache) === null || _a === void 0 ? void 0 : _a.clear();
	        },
	        moduleSpecifierCache: tsCreateModuleSpecifierCache
	            ? tsCreateModuleSpecifierCache(noopHost)
	            : ((_b = options.createModuleSpecifierCache) !== null && _b !== void 0 ? _b : moduleSpecifierCache_1.createModuleSpecifierCache)(),
	        getModuleSpecifierCache() {
	            return this.moduleSpecifierCache;
	        },
	        compilerOptions,
	        getCompilationSettings() {
	            return this.compilerOptions;
	        },
	        getCompilerOptions() {
	            return this.compilerOptions;
	        },
	        program: undefined,
	        getCurrentProgram() {
	            return this.program;
	        },
	        currentDirectory: projectService.getNormalizedAbsolutePath(currentDirectory || ''),
	        getCurrentDirectory() {
	            return this.currentDirectory;
	        },
	        symlinks: undefined,
	        getSymlinkCache() {
	            if (!this.symlinks) {
	                this.symlinks = createSymlinkCache(this.getCurrentDirectory(), this.getCanonicalFileName);
	            }
	            if (this.program && !this.symlinks.hasProcessedResolutions()) {
	                this.symlinks.setSymlinksFromResolutions(this.program.getSourceFiles(),
	                this.program.getAutomaticTypeDirectiveResolutions());
	            }
	            return this.symlinks;
	        },
	        packageJsonsForAutoImport: undefined,
	        getPackageJsonsForAutoImport(rootDir) {
	            const packageJsons = this.getPackageJsonsVisibleToFile(combinePaths(this.currentDirectory, inferredTypesContainingFile), rootDir);
	            this.packageJsonsForAutoImport = new Set(packageJsons.map((p) => p.fileName));
	            return packageJsons;
	        },
	        getPackageJsonsVisibleToFile(fileName, rootDir) {
	            return this.projectService.getPackageJsonsVisibleToFile(fileName, rootDir);
	        },
	        getModuleResolutionHostForAutoImportProvider() {
	            var _a;
	            if (this.program) {
	                return {
	                    fileExists: this.program.fileExists,
	                    directoryExists: this.program.directoryExists,
	                    realpath: this.program.realpath || ((_a = this.projectService.host.realpath) === null || _a === void 0 ? void 0 : _a.bind(this.projectService.host)),
	                    getCurrentDirectory: this.getCurrentDirectory.bind(this),
	                    readFile: this.projectService.host.readFile.bind(this.projectService.host),
	                    getDirectories: this.projectService.host.getDirectories.bind(this.projectService.host),
	                    trace: () => { },
	                    useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames(),
	                };
	            }
	            return this.projectService.host;
	        },
	        autoImportProviderHost: undefined,
	        getPackageJsonAutoImportProvider() {
	            if (this.autoImportProviderHost === false) {
	                return undefined;
	            }
	            if (this.projectService.serverMode !== LanguageServiceMode.Semantic) {
	                this.autoImportProviderHost = false;
	                return undefined;
	            }
	            if (this.autoImportProviderHost) {
	                updateProjectIfDirty(this.autoImportProviderHost);
	                if (this.autoImportProviderHost.isEmpty()) {
	                    this.autoImportProviderHost.close();
	                    this.autoImportProviderHost = undefined;
	                    return undefined;
	                }
	                return this.autoImportProviderHost.getCurrentProgram();
	            }
	            const dependencySelection = projectService.includePackageJsonAutoImports();
	            if (dependencySelection) {
	                const start = timestamp();
	                this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getModuleResolutionHostForAutoImportProvider());
	                if (this.autoImportProviderHost) {
	                    updateProjectIfDirty(this.autoImportProviderHost);
	                    this.sendPerformanceEvent('CreatePackageJsonAutoImportProvider', timestamp() - start);
	                    return this.autoImportProviderHost.getCurrentProgram();
	                }
	            }
	        },
	        includePackageJsonAutoImports() {
	            if (this.projectService.includePackageJsonAutoImports() === 0  ||
	                !this.languageServiceEnabled ||
	                isInsideNodeModules(this.currentDirectory)
) {
	                return 0 ;
	            }
	            return this.projectService.includePackageJsonAutoImports();
	        },
	        close() { },
	        log(_message) { },
	        sendPerformanceEvent(_kind, _durationMs) { },
	        toPath(fileName) {
	            return toPath(fileName, this.currentDirectory, this.projectService.toCanonicalFileName);
	        },
	        getGlobalTypingsCacheLocation() {
	            return undefined;
	        },
	        useSourceOfProjectReferenceRedirect() {
	            return !this.getCompilerOptions().disableSourceOfProjectReferenceRedirect;
	        },
	        onAutoImportProviderSettingsChanged() {
	            var _a;
	            if (this.autoImportProviderHost === false) {
	                this.autoImportProviderHost = undefined;
	            }
	            else {
	                (_a = this.autoImportProviderHost) === null || _a === void 0 ? void 0 : _a.markAsDirty();
	            }
	        },
	    };
	}
	project$2.createProject = createProject;
	function initProject(project, host, createLanguageService) {
	    const languageService = createLanguageService(host);
	    project.languageService = languageService;
	    project.program = languageService.getProgram();
	    return project;
	}
	project$2.initProject = initProject;
	return project$2;
}

var project$1 = {};

Object.defineProperty(project$1, "__esModule", { value: true });
project$1.createProject = void 0;
const project_1$2 = requireProject();
function createProject$2(ts, host, createLanguageService, options) {
    const { createSymlinkCache, ensureTrailingDirectorySeparator } = ts;
    const project = (0, project_1$2.createProject)(ts, host, createLanguageService, options);
    project.getSymlinkCache = () => {
        if (!project.symlinks) {
            project.symlinks = createSymlinkCache(project.getCurrentDirectory(), project.getCanonicalFileName);
            const setSymlinkedDirectory = project.symlinks.setSymlinkedDirectory;
            project.symlinks.setSymlinkedDirectory = (symlink, real) => {
                if (typeof real === 'object') {
                    real.real = ensureTrailingDirectorySeparator(real.real);
                    real.realPath = ensureTrailingDirectorySeparator(real.realPath);
                }
                setSymlinkedDirectory(symlink, real);
            };
        }
        if (project.program && !project.symlinks.hasProcessedResolutions()) {
            project.symlinks.setSymlinksFromResolutions(
            project.program.forEachResolvedModule,
            project.program.forEachResolvedTypeReferenceDirective,
            project.program.getAutomaticTypeDirectiveResolutions());
        }
        return project.symlinks;
    };
    return project;
}
project$1.createProject = createProject$2;

var project = {};

var moduleSpecifierCache = {};

Object.defineProperty(moduleSpecifierCache, "__esModule", { value: true });
moduleSpecifierCache.createModuleSpecifierCache = void 0;
function createModuleSpecifierCache(
) {
    let cache;
    let currentKey;
    const result = {
        get(fromFileName, toFileName, preferences, options) {
            if (!cache || currentKey !== key(fromFileName, preferences, options))
                return undefined;
            return cache.get(toFileName);
        },
        set(fromFileName, toFileName, preferences, options, kind, modulePaths, moduleSpecifiers) {
            ensureCache(fromFileName, preferences, options).set(toFileName, createInfo(kind, modulePaths, moduleSpecifiers,  false));
            if (moduleSpecifiers) {
                for (const p of modulePaths) {
                    if (p.isInNodeModules) ;
                }
            }
        },
        setModulePaths(fromFileName, toFileName, preferences, options, modulePaths) {
            const cache = ensureCache(fromFileName, preferences, options);
            const info = cache.get(toFileName);
            if (info) {
                info.modulePaths = modulePaths;
            }
            else {
                cache.set(toFileName, createInfo( undefined, modulePaths,  undefined,  undefined));
            }
        },
        setBlockedByPackageJsonDependencies(fromFileName, toFileName, preferences, options, isBlockedByPackageJsonDependencies) {
            const cache = ensureCache(fromFileName, preferences, options);
            const info = cache.get(toFileName);
            if (info) {
                info.isBlockedByPackageJsonDependencies = isBlockedByPackageJsonDependencies;
            }
            else {
                cache.set(toFileName, createInfo( undefined,  undefined,  undefined, isBlockedByPackageJsonDependencies));
            }
        },
        clear() {
            cache === null || cache === void 0 ? void 0 : cache.clear();
            currentKey = undefined;
        },
        count() {
            return cache ? cache.size : 0;
        }
    };
    return result;
    function ensureCache(fromFileName, preferences, options) {
        const newKey = key(fromFileName, preferences, options);
        if (cache && (currentKey !== newKey)) {
            result.clear();
        }
        currentKey = newKey;
        return cache || (cache = new Map());
    }
    function key(fromFileName, preferences, options) {
        return `${fromFileName},${preferences.importModuleSpecifierEnding},${preferences.importModuleSpecifierPreference},${options.overrideImportMode}`;
    }
    function createInfo(kind, modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies) {
        return { kind, modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies };
    }
}
moduleSpecifierCache.createModuleSpecifierCache = createModuleSpecifierCache;

Object.defineProperty(project, "__esModule", { value: true });
project.createProject = void 0;
const project_1$1 = project$1;
const moduleSpecifierCache_1 = moduleSpecifierCache;
function createProject$1(ts, host, createLanguageService, options) {
    options.createModuleSpecifierCache = moduleSpecifierCache_1.createModuleSpecifierCache;
    return (0, project_1$1.createProject)(ts, host, createLanguageService, options);
}
project.createProject = createProject$1;

var __importDefault$b = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(serviceCache, "__esModule", { value: true });
serviceCache.createProjectService = createProjectService;
serviceCache.createProject = createProject;
const projectService_1 = projectService;
const project_1 = requireProject();
const project_2 = project$1;
const project_3 = project;
const typescript_1$8 = __importDefault$b(ts);
function createProjectService(system, hostConfiguration) {
    const version = typescript_1$8.default.version.split('.');
    const major = parseInt(version[0]);
    if (major < 5) {
        return undefined;
    }
    const projectService = (0, projectService_1.createProjectService)(typescript_1$8.default, system, system.getCurrentDirectory(), hostConfiguration, typescript_1$8.default.LanguageServiceMode.Semantic);
    return projectService;
}
function createProject(host, createLanguageService, options) {
    const factory = getProjectFactory();
    if (!factory) {
        return undefined;
    }
    const project = factory(typescript_1$8.default, host, createLanguageService, options);
    const proxyMethods = [
        'getCachedExportInfoMap',
        'getModuleSpecifierCache',
        'getGlobalTypingsCacheLocation',
        'getSymlinkCache',
        'getPackageJsonsVisibleToFile',
        'getPackageJsonAutoImportProvider',
        'includePackageJsonAutoImports'
    ];
    proxyMethods.forEach((key) => (host[key] = project[key].bind(project)));
    if (host.log) {
        project.log = host.log.bind(host);
    }
    return project;
}
function getProjectFactory() {
    const version = typescript_1$8.default.version.split('.');
    const major = parseInt(version[0]);
    const minor = parseInt(version[1]);
    if (major < 5) {
        return undefined;
    }
    if (major === 5) {
        if (minor < 3) {
            return project_1.createProject;
        }
        if (minor < 5) {
            return project_2.createProject;
        }
    }
    return project_3.createProject;
}

var __importDefault$a = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(service, "__esModule", { value: true });
service.__resetCache = __resetCache;
service.getService = getService;
service.forAllServices = forAllServices;
service.getServiceForTsconfig = getServiceForTsconfig;
const path_1$7 = path$1;
const typescript_1$7 = __importDefault$a(ts);
const vscode_languageserver_protocol_1$1 = main$7;
const importPackage_1$3 = importPackage;
const configLoader_1$1 = configLoader;
const fileCollection_1$1 = fileCollection;
const logger_1$6 = logger;
const utils_1$l = utils$6;
const DocumentSnapshot_1$3 = DocumentSnapshot;
const module_loader_1 = moduleLoader;
const SnapshotManager_1$2 = SnapshotManager$1;
const utils_2$9 = utils$2;
const serviceCache_1$1 = serviceCache;
const svelte2tsx_1$3 = require$$0;
var TsconfigSvelteDiagnostics;
(function (TsconfigSvelteDiagnostics) {
    TsconfigSvelteDiagnostics[TsconfigSvelteDiagnostics["NO_SVELTE_INPUT"] = 100001] = "NO_SVELTE_INPUT";
})(TsconfigSvelteDiagnostics || (TsconfigSvelteDiagnostics = {}));
const maxProgramSizeForNonTsFiles = 20 * 1024 * 1024;
const services = new fileCollection_1$1.FileMap();
const serviceSizeMap = new fileCollection_1$1.FileMap();
const configWatchers = new fileCollection_1$1.FileMap();
const dependedConfigWatchers = new fileCollection_1$1.FileMap();
const configPathToDependedProject = new fileCollection_1$1.FileMap();
const configFileModifiedTime = new fileCollection_1$1.FileMap();
const configFileForOpenFiles = new fileCollection_1$1.FileMap();
const pendingReloads = new fileCollection_1$1.FileSet();
const documentRegistries = new Map();
const pendingForAllServices = new Set();
const parsedTsConfigInfo = new fileCollection_1$1.FileMap();
function __resetCache() {
    services.clear();
    parsedTsConfigInfo.clear();
    serviceSizeMap.clear();
    configFileForOpenFiles.clear();
}
async function getService(path, workspaceUris, docContext) {
    const getCanonicalFileName = (0, utils_1$l.createGetCanonicalFileName)(docContext.tsSystem.useCaseSensitiveFileNames);
    const fileExistsWithCache = (fileName) => {
        return ((parsedTsConfigInfo.has(fileName) && !pendingReloads.has(fileName)) ||
            docContext.tsSystem.fileExists(fileName));
    };
    let tsconfigPath = configFileForOpenFiles.get(path) ??
        (0, utils_2$9.findTsConfigPath)(path, workspaceUris, fileExistsWithCache, getCanonicalFileName);
    if (tsconfigPath) {
        const triedTsConfig = new Set();
        const needAssign = !configFileForOpenFiles.has(path);
        let service = await getConfiguredService(tsconfigPath);
        if (!needAssign) {
            return service;
        }
        const defaultService = await findDefaultServiceForFile(service, triedTsConfig);
        if (defaultService) {
            configFileForOpenFiles.set(path, defaultService.tsconfigPath);
            return defaultService;
        }
        for (const configPath of triedTsConfig) {
            const service = await getConfiguredService(configPath);
            const ls = service.getService();
            if (ls.getProgram()?.getSourceFile(path)) {
                return service;
            }
        }
        tsconfigPath = '';
    }
    const nearestWorkspaceUri = (0, utils_2$9.getNearestWorkspaceUri)(workspaceUris, path, getCanonicalFileName);
    const lastNodeModulesIdx = path.split('/').lastIndexOf('node_modules') + 2;
    const nearestNodeModulesBoundary = lastNodeModulesIdx === 1
        ? undefined
        : path.split('/').slice(0, lastNodeModulesIdx).join('/');
    const nearestBoundary = (nearestNodeModulesBoundary?.length ?? 0) > (nearestWorkspaceUri?.length ?? 0)
        ? nearestNodeModulesBoundary
        : nearestWorkspaceUri;
    return getServiceForTsconfig(tsconfigPath, (nearestBoundary && (0, utils_1$l.urlToPath)(nearestBoundary)) ??
        docContext.tsSystem.getCurrentDirectory(), docContext);
    function getConfiguredService(tsconfigPath) {
        return getServiceForTsconfig(tsconfigPath, (0, path_1$7.dirname)(tsconfigPath), docContext);
    }
    async function findDefaultServiceForFile(service, triedTsConfig) {
        service.ensureProjectFileUpdates(path);
        if (service.snapshotManager.isProjectFile(path)) {
            return service;
        }
        if (triedTsConfig.has(service.tsconfigPath)) {
            return;
        }
        triedTsConfig.add(service.tsconfigPath);
        return findDefaultFromProjectReferences(service, triedTsConfig);
    }
    async function findDefaultFromProjectReferences(service, triedTsConfig) {
        const projectReferences = service.getResolvedProjectReferences();
        if (projectReferences.length === 0) {
            return undefined;
        }
        let possibleSubPaths = [];
        for (const ref of projectReferences) {
            if (ref.snapshotManager.isProjectFile(path)) {
                return getConfiguredService(ref.configFilePath);
            }
            if (ref.parsedCommandLine.projectReferences?.length) {
                possibleSubPaths.push(ref.configFilePath);
            }
        }
        for (const ref of possibleSubPaths) {
            const subService = await getConfiguredService(ref);
            const defaultService = await findDefaultServiceForFile(subService, triedTsConfig);
            if (defaultService) {
                return defaultService;
            }
        }
    }
}
async function forAllServices(cb) {
    const promise = forAllServicesWorker(cb);
    pendingForAllServices.add(promise);
    await promise;
    pendingForAllServices.delete(promise);
}
async function forAllServicesWorker(cb) {
    for (const service of services.values()) {
        cb(await service);
    }
}
async function getServiceForTsconfig(tsconfigPath, workspacePath, docContext) {
    if (tsconfigPath) {
        tsconfigPath = (0, utils_1$l.normalizePath)(tsconfigPath);
    }
    const tsconfigPathOrWorkspacePath = tsconfigPath || workspacePath;
    const reloading = pendingReloads.has(tsconfigPath);
    let service;
    if (reloading || !services.has(tsconfigPathOrWorkspacePath)) {
        if (reloading) {
            logger_1$6.Logger.log('Reloading ts service at ', tsconfigPath, ' due to config updated');
            parsedTsConfigInfo.delete(tsconfigPath);
        }
        else {
            logger_1$6.Logger.log('Initialize new ts service at ', tsconfigPath);
        }
        pendingReloads.delete(tsconfigPath);
        const newService = createLanguageService(tsconfigPath, workspacePath, docContext);
        services.set(tsconfigPathOrWorkspacePath, newService);
        service = await newService;
    }
    else {
        service = await services.get(tsconfigPathOrWorkspacePath);
    }
    if (pendingForAllServices.size > 0) {
        await Promise.all(pendingForAllServices);
    }
    return service;
}
async function createLanguageService(tsconfigPath, workspacePath, docContext) {
    const { tsSystem } = docContext;
    const projectConfig = getParsedConfig();
    const { options: compilerOptions, raw, errors: configErrors } = projectConfig;
    const allowJs = compilerOptions.allowJs ?? !!compilerOptions.checkJs;
    const virtualDocuments = new fileCollection_1$1.FileMap(tsSystem.useCaseSensitiveFileNames);
    const getCanonicalFileName = (0, utils_1$l.createGetCanonicalFileName)(tsSystem.useCaseSensitiveFileNames);
    watchWildCardDirectories(projectConfig);
    const snapshotManager = createSnapshotManager(projectConfig, tsconfigPath);
    await configLoader_1$1.configLoader.loadConfigs(workspacePath);
    const svelteModuleLoader = (0, module_loader_1.createSvelteModuleLoader)(getSnapshot, compilerOptions, tsSystem, typescript_1$7.default, () => host?.getCompilerHost?.());
    let svelteTsPath;
    let compilerHost;
    try {
        svelteTsPath = (0, path_1$7.dirname)(require.resolve(docContext.ambientTypesSource));
    }
    catch (e) {
        svelteTsPath = __dirname;
    }
    const sveltePackageInfo = (0, importPackage_1$3.getPackageInfo)('svelte', tsconfigPath || workspacePath);
    const svelteCompiler = sveltePackageInfo.version.major >= 4
        ? (0, importPackage_1$3.importSvelte)(tsconfigPath || workspacePath)
        : undefined;
    const changedFilesForExportCache = new Set();
    const svelteTsxFilesToOriginalCasing = getSvelteShimFiles();
    let languageServiceReducedMode = false;
    let projectVersion = 0;
    let dirty = projectConfig.fileNames.length > 0;
    let skipSvelteInputCheck = !tsconfigPath;
    const host = {
        log: (message) => logger_1$6.Logger.debug(`[ts] ${message}`),
        getCompilationSettings: () => compilerOptions,
        getScriptFileNames,
        getScriptVersion: (fileName) => getSnapshotIfExists(fileName)?.version.toString() || '',
        getScriptSnapshot: getSnapshotIfExists,
        getCurrentDirectory: () => workspacePath,
        getDefaultLibFileName: typescript_1$7.default.getDefaultLibFilePath,
        fileExists: svelteModuleLoader.fileExists,
        readFile: svelteModuleLoader.readFile,
        resolveModuleNames: svelteModuleLoader.resolveModuleNames,
        readDirectory: svelteModuleLoader.readDirectory,
        realpath: tsSystem.realpath,
        getDirectories: tsSystem.getDirectories,
        getProjectReferences: () => projectConfig.projectReferences,
        getParsedCommandLine,
        useCaseSensitiveFileNames: () => tsSystem.useCaseSensitiveFileNames,
        getScriptKind: (fileName) => getSnapshot(fileName).scriptKind,
        getProjectVersion,
        getNewLine: () => tsSystem.newLine,
        resolveTypeReferenceDirectiveReferences: svelteModuleLoader.resolveTypeReferenceDirectiveReferences,
        hasInvalidatedResolutions: svelteModuleLoader.mightHaveInvalidatedResolutions,
        getModuleResolutionCache: svelteModuleLoader.getModuleResolutionCache,
        useSourceOfProjectReferenceRedirect() {
            return !languageServiceReducedMode;
        },
        setCompilerHost: (host) => (compilerHost = host),
        getCompilerHost: () => compilerHost
    };
    const documentRegistry = getOrCreateDocumentRegistry(
    tsSystem.getCurrentDirectory(), tsSystem.useCaseSensitiveFileNames);
    const transformationConfig = {
        parse: svelteCompiler?.parse,
        version: svelteCompiler?.VERSION,
        transformOnTemplateError: docContext.transformOnTemplateError,
        typingsNamespace: raw?.svelteOptions?.namespace || 'svelteHTML'
    };
    const project = initLsCacheProject();
    const languageService = typescript_1$7.default.createLanguageService(host, documentRegistry);
    docContext.globalSnapshotsManager.onChange(scheduleUpdate);
    reduceLanguageServiceCapabilityIfFileSizeTooBig();
    watchConfigFiles(projectConfig.extendedConfigPaths, projectConfig);
    return {
        tsconfigPath,
        compilerOptions,
        configErrors,
        getService,
        updateSnapshot,
        deleteSnapshot,
        scheduleProjectFileUpdate,
        updateTsOrJsFile,
        ensureProjectFileUpdates,
        hasFile,
        fileBelongsToProject,
        snapshotManager,
        invalidateModuleCache,
        onAutoImportProviderSettingsChanged,
        onPackageJsonChange,
        getTsConfigSvelteOptions,
        getResolvedProjectReferences,
        openVirtualDocument,
        isShimFiles,
        getProjectConfig,
        getProjectVersion,
        dispose
    };
    function getProjectVersion() {
        return projectVersion.toString();
    }
    function createSnapshotManager(parsedCommandLine, configFileName) {
        const cached = configFileName ? parsedTsConfigInfo.get(configFileName) : undefined;
        if (cached?.snapshotManager) {
            return cached.snapshotManager;
        }
        return new SnapshotManager_1$2.SnapshotManager(docContext.globalSnapshotsManager, parsedCommandLine.raw, configFileName ? (0, path_1$7.dirname)(configFileName) : workspacePath, tsSystem, parsedCommandLine.fileNames.map(utils_1$l.normalizePath), parsedCommandLine.wildcardDirectories);
    }
    function watchWildCardDirectories(parseCommandLine) {
        const { wildcardDirectories } = parseCommandLine;
        if (!wildcardDirectories || !docContext.watchDirectory) {
            return;
        }
        const canonicalWorkspacePath = getCanonicalFileName(workspacePath);
        const patterns = [];
        Object.entries(wildcardDirectories).forEach(([dir, flags]) => {
            if (
            getCanonicalFileName(dir).startsWith(canonicalWorkspacePath) ||
                !tsSystem.directoryExists(dir)) {
                return;
            }
            patterns.push({
                baseUri: (0, utils_1$l.pathToUrl)(dir),
                pattern: (flags & typescript_1$7.default.WatchDirectoryFlags.Recursive ? `**/` : '') +
                    docContext.nonRecursiveWatchPattern
            });
        });
        docContext.watchDirectory?.(patterns);
    }
    function getService(skipSynchronize) {
        ensureProjectFileUpdates();
        if (!skipSynchronize) {
            updateIfDirty();
        }
        return languageService;
    }
    function deleteSnapshot(filePath) {
        svelteModuleLoader.deleteFromModuleCache(filePath);
        snapshotManager.delete(filePath);
        configFileForOpenFiles.delete(filePath);
    }
    function invalidateModuleCache(filePaths) {
        for (const filePath of filePaths) {
            const normalizedPath = (0, utils_1$l.normalizePath)(filePath);
            svelteModuleLoader.deleteFromModuleCache(normalizedPath);
            svelteModuleLoader.scheduleResolutionFailedLocationCheck(normalizedPath);
            scheduleUpdate(normalizedPath);
        }
    }
    function updateSnapshot(documentOrFilePath) {
        return typeof documentOrFilePath === 'string'
            ? updateSnapshotFromFilePath(documentOrFilePath)
            : updateSnapshotFromDocument(documentOrFilePath);
    }
    function updateSnapshotFromDocument(document) {
        const filePath = document.getFilePath() || '';
        const prevSnapshot = snapshotManager.get(filePath);
        if (prevSnapshot?.version === document.version &&
            prevSnapshot.isOpenedInClient() === document.openedByClient) {
            return prevSnapshot;
        }
        const newSnapshot = DocumentSnapshot_1$3.DocumentSnapshot.fromDocument(document, transformationConfig);
        if (!prevSnapshot) {
            svelteModuleLoader.scheduleResolutionFailedLocationCheck(filePath);
            if (configFileForOpenFiles.get(filePath) === '' && services.size > 1) {
                configFileForOpenFiles.delete(filePath);
            }
        }
        else if (prevSnapshot.scriptKind !== newSnapshot.scriptKind && !allowJs) {
            svelteModuleLoader.deleteFromModuleCache(filePath);
            configFileForOpenFiles.delete(filePath);
        }
        snapshotManager.set(filePath, newSnapshot);
        return newSnapshot;
    }
    function updateSnapshotFromFilePath(filePath) {
        const prevSnapshot = snapshotManager.get(filePath);
        if (prevSnapshot) {
            return prevSnapshot;
        }
        svelteModuleLoader.scheduleResolutionFailedLocationCheck(filePath);
        return createSnapshot(filePath);
    }
    function getSnapshotIfExists(fileName) {
        const svelteFileName = (0, utils_2$9.ensureRealSvelteFilePath)(fileName);
        let doc = snapshotManager.get(fileName) ?? snapshotManager.get(svelteFileName);
        if (doc) {
            return doc;
        }
        if (!svelteModuleLoader.fileExists(fileName)) {
            return undefined;
        }
        return createSnapshot(svelteModuleLoader.svelteFileExists(fileName) ? svelteFileName : fileName);
    }
    function getSnapshot(fileName) {
        const svelteFileName = (0, utils_2$9.ensureRealSvelteFilePath)(fileName);
        let doc = snapshotManager.get(fileName) ?? snapshotManager.get(svelteFileName);
        if (doc) {
            return doc;
        }
        return createSnapshot(fileName);
    }
    function createSnapshot(fileName) {
        const doc = DocumentSnapshot_1$3.DocumentSnapshot.fromFilePath(fileName, docContext.createDocument, transformationConfig, tsSystem);
        snapshotManager.set(fileName, doc);
        return doc;
    }
    function scheduleProjectFileUpdate(watcherNewFiles) {
        if (!snapshotManager.areIgnoredFromNewFileWatch(watcherNewFiles)) {
            scheduleUpdate();
            const info = parsedTsConfigInfo.get(tsconfigPath);
            if (info) {
                info.pendingProjectFileUpdate = true;
            }
        }
        if (!projectConfig.projectReferences) {
            return;
        }
        for (const ref of projectConfig.projectReferences) {
            const config = parsedTsConfigInfo.get(ref.path);
            if (config &&
                !services.has(config.configFilePath) &&
                !config.snapshotManager.areIgnoredFromNewFileWatch(watcherNewFiles)) {
                config.pendingProjectFileUpdate = true;
                scheduleUpdate();
            }
        }
    }
    function ensureProjectFileUpdates(newFile) {
        const info = parsedTsConfigInfo.get(tsconfigPath);
        if (!info) {
            return;
        }
        if (newFile &&
            !info.pendingProjectFileUpdate &&
            !snapshotManager.isProjectFile(newFile) &&
            !docContext.globalSnapshotsManager.get(newFile)) {
            scheduleProjectFileUpdate([newFile]);
        }
        if (!info.pendingProjectFileUpdate) {
            return;
        }
        const projectFileCountBefore = snapshotManager.getProjectFileNames().length;
        ensureFilesForConfigUpdates(info);
        const projectFileCountAfter = snapshotManager.getProjectFileNames().length;
        if (projectFileCountAfter > projectFileCountBefore) {
            reduceLanguageServiceCapabilityIfFileSizeTooBig();
        }
    }
    function getScriptFileNames() {
        const projectFiles = languageServiceReducedMode
            ? []
            : snapshotManager.getProjectFileNames();
        const canonicalProjectFileNames = new Set(projectFiles.map(getCanonicalFileName));
        const clientFiles = tsconfigPath
            ? Array.from(virtualDocuments.values())
                .map((v) => v.getFilePath())
                .filter(utils_1$l.isNotNullOrUndefined)
            : snapshotManager.getClientFileNames();
        return Array.from(new Set([
            ...projectFiles,
            ...clientFiles.filter((file) => !canonicalProjectFileNames.has(getCanonicalFileName(file))),
            ...svelteTsxFilesToOriginalCasing.values()
        ]));
    }
    function hasFile(filePath) {
        return snapshotManager.has(filePath);
    }
    function fileBelongsToProject(filePath, isNew) {
        filePath = (0, utils_1$l.normalizePath)(filePath);
        if (hasFile(filePath)) {
            return true;
        }
        if (!isNew) {
            return false;
        }
        ensureProjectFileUpdates(filePath);
        return snapshotManager.isProjectFile(filePath);
    }
    function updateTsOrJsFile(fileName, changes) {
        if (!snapshotManager.has(fileName)) {
            svelteModuleLoader.scheduleResolutionFailedLocationCheck(fileName);
        }
        snapshotManager.updateTsOrJsFile(fileName, changes);
    }
    function getParsedConfig() {
        let compilerOptions;
        let parsedConfig;
        let extendedConfigPaths;
        if (tsconfigPath) {
            const info = ensureTsConfigInfoUpToDate(tsconfigPath);
            if (!info) {
                throw new Error('Failed to get tsconfig: ' + tsconfigPath);
            }
            compilerOptions = info.parsedCommandLine.options;
            parsedConfig = info.parsedCommandLine;
            extendedConfigPaths = info.extendedConfigPaths;
        }
        else {
            const config = parseDefaultCompilerOptions();
            compilerOptions = config.compilerOptions;
            parsedConfig = config.parsedConfig;
        }
        if (!compilerOptions.moduleResolution ||
            compilerOptions.moduleResolution === typescript_1$7.default.ModuleResolutionKind.Classic) {
            compilerOptions.moduleResolution =
                typescript_1$7.default.ModuleResolutionKind.NodeJs ?? typescript_1$7.default.ModuleResolutionKind.Node10;
        }
        if (!compilerOptions.module ||
            [
                typescript_1$7.default.ModuleKind.AMD,
                typescript_1$7.default.ModuleKind.CommonJS,
                typescript_1$7.default.ModuleKind.ES2015,
                typescript_1$7.default.ModuleKind.None,
                typescript_1$7.default.ModuleKind.System,
                typescript_1$7.default.ModuleKind.UMD
            ].includes(compilerOptions.module)) {
            compilerOptions.module = typescript_1$7.default.ModuleKind.ESNext;
        }
        if (!compilerOptions.target) {
            compilerOptions.target = typescript_1$7.default.ScriptTarget.Latest;
        }
        else if (typescript_1$7.default.ScriptTarget.ES2015 > compilerOptions.target) {
            compilerOptions.target = typescript_1$7.default.ScriptTarget.ES2015;
        }
        if (!compilerOptions.jsxFactory || !compilerOptions.jsxFactory.startsWith('svelte')) {
            if (workspacePath) {
                try {
                    const svelteNativePkgInfo = (0, importPackage_1$3.getPackageInfo)('@nativescript-community/svelte-native', workspacePath) ||
                        (0, importPackage_1$3.getPackageInfo)('svelte-native', workspacePath);
                    if (svelteNativePkgInfo.path) {
                        parsedConfig.raw.svelteOptions = parsedConfig.raw.svelteOptions || {};
                        parsedConfig.raw.svelteOptions.namespace = 'svelteNative.JSX';
                    }
                }
                catch (e) {
                }
            }
        }
        return {
            ...parsedConfig,
            fileNames: parsedConfig.fileNames.map(utils_1$l.normalizePath),
            options: compilerOptions,
            extendedConfigPaths
        };
    }
    function checkSvelteInput(program, config) {
        if (!tsconfigPath || config.raw.references || config.raw.files) {
            return [];
        }
        const configFileName = (0, path_1$7.basename)(tsconfigPath);
        if (configFileName !== 'tsconfig.json' && configFileName !== 'jsconfig.json') {
            return [];
        }
        const hasSvelteFiles = config.fileNames.some(utils_2$9.isSvelteFilePath) ||
            program?.getSourceFiles().some((file) => (0, utils_2$9.isSvelteFilePath)(file.fileName));
        if (hasSvelteFiles) {
            return [];
        }
        const { include, exclude } = config.raw;
        const inputText = JSON.stringify(include);
        const excludeText = JSON.stringify(exclude);
        const svelteConfigDiagnostics = [
            {
                category: typescript_1$7.default.DiagnosticCategory.Warning,
                code: TsconfigSvelteDiagnostics.NO_SVELTE_INPUT,
                file: undefined,
                start: undefined,
                length: undefined,
                messageText: `No svelte input files were found in config file '${tsconfigPath}'. ` +
                    `Did you forget to add svelte files to the 'include' in your ${(0, path_1$7.basename)(tsconfigPath)}? ` +
                    `Specified 'include' paths were '${inputText}' and 'exclude' paths were '${excludeText}'`,
                source: 'svelte'
            }
        ];
        return svelteConfigDiagnostics;
    }
    function parseDefaultCompilerOptions() {
        let configJson = {
            compilerOptions: {
                allowJs: true,
                noEmit: true,
                declaration: false,
                skipLibCheck: true,
                maxNodeModuleJsDepth: 2,
                allowSyntheticDefaultImports: true
            },
            include: []
        };
        const parsedConfig = typescript_1$7.default.parseJsonConfigFileContent(configJson, tsSystem, workspacePath);
        const compilerOptions = {
            ...parsedConfig.options,
            target: typescript_1$7.default.ScriptTarget.Latest,
            allowNonTsExtensions: true,
            moduleResolution: typescript_1$7.default.ModuleResolutionKind.Node10
        };
        return { compilerOptions, parsedConfig };
    }
    function reduceLanguageServiceCapabilityIfFileSizeTooBig() {
        if (exceedsTotalSizeLimitForNonTsFiles(compilerOptions, tsconfigPath, snapshotManager, tsSystem)) {
            languageService.cleanupSemanticCache();
            languageServiceReducedMode = true;
            if (project) {
                project.languageServiceEnabled = false;
            }
            docContext.notifyExceedSizeLimit?.();
        }
    }
    function dispose() {
        compilerHost = undefined;
        languageService.dispose();
        snapshotManager.dispose();
        configWatchers.get(tsconfigPath)?.close();
        configWatchers.delete(tsconfigPath);
        configFileForOpenFiles.clear();
        docContext.globalSnapshotsManager.removeChangeListener(scheduleUpdate);
    }
    function watchConfigFiles(extendedConfigPaths, parsedCommandLine) {
        const tsconfigDependencies = Array.from(extendedConfigPaths ?? []).concat(parsedCommandLine.projectReferences?.map((r) => r.path) ?? []);
        tsconfigDependencies.forEach((configPath) => {
            let dependedTsConfig = configPathToDependedProject.get(configPath);
            if (!dependedTsConfig) {
                dependedTsConfig = new fileCollection_1$1.FileSet(tsSystem.useCaseSensitiveFileNames);
                configPathToDependedProject.set(configPath, dependedTsConfig);
            }
            dependedTsConfig.add(tsconfigPath);
        });
        if (!tsSystem.watchFile || !docContext.watchTsConfig) {
            return;
        }
        if (!configWatchers.has(tsconfigPath) && tsconfigPath) {
            configFileModifiedTime.set(tsconfigPath, tsSystem.getModifiedTime?.(tsconfigPath));
            configWatchers.set(tsconfigPath,
            tsSystem.watchFile(tsconfigPath, watchConfigCallback, 1000));
        }
        for (const config of tsconfigDependencies) {
            if (dependedConfigWatchers.has(config)) {
                continue;
            }
            configFileModifiedTime.set(config, tsSystem.getModifiedTime?.(config));
            dependedConfigWatchers.set(config,
            tsSystem.watchFile(config, createWatchDependedConfigCallback(docContext), 1000));
        }
    }
    async function watchConfigCallback(fileName, kind, modifiedTime) {
        if (kind === typescript_1$7.default.FileWatcherEventKind.Changed &&
            !configFileModified(fileName, modifiedTime ?? tsSystem.getModifiedTime?.(fileName), docContext)) {
            return;
        }
        dispose();
        if (kind === typescript_1$7.default.FileWatcherEventKind.Changed) {
            scheduleReload(fileName);
        }
        else if (kind === typescript_1$7.default.FileWatcherEventKind.Deleted) {
            services.delete(fileName);
            configFileForOpenFiles.clear();
        }
        docContext.onProjectReloaded?.([fileName]);
        docContext.reportConfigError?.({ uri: (0, utils_1$l.pathToUrl)(fileName), diagnostics: [] });
    }
    function updateIfDirty() {
        if (!dirty) {
            return;
        }
        svelteModuleLoader.invalidateFailedLocationResolution();
        const oldProgram = project?.program;
        let program;
        try {
            program = languageService.getProgram();
        }
        finally {
            dirty = false;
            compilerHost = undefined;
            svelteModuleLoader.clearPendingInvalidations();
        }
        if (project) {
            project.program = program;
        }
        if (!skipSvelteInputCheck) {
            const svelteConfigDiagnostics = checkSvelteInput(program, projectConfig);
            const codes = svelteConfigDiagnostics.map((d) => d.code);
            if (!svelteConfigDiagnostics.length) {
                skipSvelteInputCheck = true;
            }
            docContext.reportConfigError?.({
                uri: (0, utils_1$l.pathToUrl)(tsconfigPath),
                diagnostics: svelteConfigDiagnostics.map((d) => ({
                    message: d.messageText,
                    range: { start: { line: 0, character: 0 }, end: { line: 0, character: 0 } },
                    severity: vscode_languageserver_protocol_1$1.DiagnosticSeverity.Warning,
                    source: 'svelte'
                }))
            });
            const new_errors = projectConfig.errors
                .filter((e) => !codes.includes(e.code))
                .concat(svelteConfigDiagnostics);
            projectConfig.errors.splice(0, projectConfig.errors.length, ...new_errors);
        }
        const exportMapCache = project?.exportMapCache;
        if (!oldProgram || !exportMapCache || exportMapCache.isEmpty()) {
            changedFilesForExportCache.clear();
            return;
        }
        exportMapCache.releaseSymbols();
        for (const fileName of changedFilesForExportCache) {
            const oldFile = oldProgram.getSourceFile(fileName);
            const newFile = program?.getSourceFile(fileName);
            if (!oldFile && !newFile) {
                continue;
            }
            if (!oldFile || !newFile) {
                exportMapCache.clear();
                break;
            }
            const cleared = exportMapCache.onFileChanged?.(oldFile, newFile, false);
            if (cleared) {
                break;
            }
        }
        changedFilesForExportCache.clear();
    }
    function scheduleUpdate(triggeredFile) {
        if (triggeredFile) {
            changedFilesForExportCache.add(triggeredFile);
        }
        if (dirty) {
            return;
        }
        projectVersion++;
        dirty = true;
    }
    function initLsCacheProject() {
        const projectService = docContext.projectService;
        if (!projectService) {
            return;
        }
        const createLanguageServiceForAutoImportProvider = (host) => typescript_1$7.default.createLanguageService(host, documentRegistry);
        return (0, serviceCache_1$1.createProject)(host, createLanguageServiceForAutoImportProvider, {
            compilerOptions: compilerOptions,
            projectService: projectService,
            currentDirectory: workspacePath
        });
    }
    function onAutoImportProviderSettingsChanged() {
        project?.onAutoImportProviderSettingsChanged();
    }
    function onPackageJsonChange(packageJsonPath) {
        if (!project) {
            return;
        }
        if (project.packageJsonsForAutoImport?.has(packageJsonPath)) {
            project.moduleSpecifierCache.clear();
            if (project.autoImportProviderHost) {
                project.autoImportProviderHost.markAsDirty();
            }
        }
        if (packageJsonPath.includes('node_modules')) {
            const dir = (0, path_1$7.dirname)(packageJsonPath);
            const inProgram = project
                .getCurrentProgram()
                ?.getSourceFiles()
                .some((file) => file.fileName.includes(dir));
            if (inProgram) {
                host.getModuleSpecifierCache?.().clear();
            }
        }
    }
    function getTsConfigSvelteOptions() {
        return {
            namespace: transformationConfig.typingsNamespace
        };
    }
    function ensureTsConfigInfoUpToDate(configFilePath) {
        const cached = parsedTsConfigInfo.get(configFilePath);
        if (cached !== undefined) {
            ensureFilesForConfigUpdates(cached);
            return cached;
        }
        const content = tsSystem.fileExists(configFilePath) && tsSystem.readFile(configFilePath);
        if (!content) {
            parsedTsConfigInfo.set(configFilePath, null);
            return null;
        }
        const json = typescript_1$7.default.parseJsonText(configFilePath, content);
        const extendedConfigPaths = new Set();
        const { extendedConfigCache } = docContext;
        const cacheMonitorProxy = {
            ...docContext.extendedConfigCache,
            get(key) {
                extendedConfigPaths.add(key);
                return extendedConfigCache.get(key);
            },
            has(key) {
                extendedConfigPaths.add(key);
                return extendedConfigCache.has(key);
            },
            set(key, value) {
                extendedConfigPaths.add(key);
                return extendedConfigCache.set(key, value);
            }
        };
        const parsedCommandLine = typescript_1$7.default.parseJsonSourceFileConfigFileContent(json, tsSystem, (0, path_1$7.dirname)(configFilePath),
         undefined, configFilePath,
         undefined, [
            {
                extension: 'svelte',
                isMixedContent: true,
                scriptKind: typescript_1$7.default.ScriptKind.Deferred ?? typescript_1$7.default.ScriptKind.TS
            }
        ], cacheMonitorProxy);
        parsedCommandLine.options.allowNonTsExtensions = true;
        const snapshotManager = createSnapshotManager(parsedCommandLine, configFilePath);
        const tsconfigInfo = {
            parsedCommandLine,
            snapshotManager,
            pendingProjectFileUpdate: false,
            configFilePath,
            extendedConfigPaths
        };
        parsedTsConfigInfo.set(configFilePath, tsconfigInfo);
        watchConfigFiles(extendedConfigPaths, parsedCommandLine);
        return tsconfigInfo;
    }
    function getParsedCommandLine(configFilePath) {
        return ensureTsConfigInfoUpToDate(configFilePath)?.parsedCommandLine;
    }
    function ensureFilesForConfigUpdates(info) {
        if (info?.pendingProjectFileUpdate) {
            info.pendingProjectFileUpdate = false;
            info.snapshotManager.updateProjectFiles();
            info.parsedCommandLine.fileNames = info.snapshotManager.getProjectFileNames();
        }
    }
    function getResolvedProjectReferences() {
        if (!tsconfigPath || !projectConfig.projectReferences) {
            return [];
        }
        return projectConfig.projectReferences
            .map((ref) => ensureTsConfigInfoUpToDate((0, utils_1$l.normalizePath)(ref.path)))
            .filter(utils_1$l.isNotNullOrUndefined);
    }
    function openVirtualDocument(document) {
        const filePath = document.getFilePath();
        if (!filePath) {
            return;
        }
        virtualDocuments.set(filePath, document);
        configFileForOpenFiles.set(filePath, tsconfigPath || workspacePath);
        updateSnapshot(document);
        scheduleUpdate(filePath);
    }
    function getSvelteShimFiles() {
        const svelteTsxFiles = svelte2tsx_1$3.internalHelpers.get_global_types(tsSystem, sveltePackageInfo.version.major === 3, sveltePackageInfo.path, svelteTsPath, docContext.isSvelteCheck ? undefined : tsconfigPath || workspacePath);
        const pathToOriginalCasing = new Map();
        for (const file of svelteTsxFiles) {
            const normalizedPath = (0, utils_1$l.normalizePath)(file);
            pathToOriginalCasing.set(getCanonicalFileName(normalizedPath), normalizedPath);
        }
        return pathToOriginalCasing;
    }
    function isShimFiles(filePath) {
        return svelteTsxFilesToOriginalCasing.has(getCanonicalFileName((0, utils_1$l.normalizePath)(filePath)));
    }
    function getProjectConfig() {
        return projectConfig;
    }
}
function exceedsTotalSizeLimitForNonTsFiles(compilerOptions, tsconfigPath, snapshotManager, tsSystem) {
    if (compilerOptions.disableSizeLimit) {
        return false;
    }
    let availableSpace = maxProgramSizeForNonTsFiles;
    serviceSizeMap.set(tsconfigPath, 0);
    serviceSizeMap.forEach((size) => {
        availableSpace -= size;
    });
    let totalNonTsFileSize = 0;
    const fileNames = snapshotManager.getProjectFileNames();
    for (const fileName of fileNames) {
        if ((0, utils_2$9.hasTsExtensions)(fileName)) {
            continue;
        }
        totalNonTsFileSize += tsSystem.getFileSize?.(fileName) ?? 0;
        if (totalNonTsFileSize > availableSpace) {
            const top5LargestFiles = fileNames
                .filter((name) => !(0, utils_2$9.hasTsExtensions)(name))
                .map((name) => ({ name, size: tsSystem.getFileSize?.(name) ?? 0 }))
                .sort((a, b) => b.size - a.size)
                .slice(0, 5);
            logger_1$6.Logger.log(`Non TS file size exceeded limit (${totalNonTsFileSize}). ` +
                `Largest files: ${top5LargestFiles
                    .map((file) => `${file.name}:${file.size}`)
                    .join(', ')}`);
            return true;
        }
    }
    serviceSizeMap.set(tsconfigPath, totalNonTsFileSize);
    return false;
}
function createWatchDependedConfigCallback(docContext) {
    return async (fileName, kind, modifiedTime) => {
        if (kind === typescript_1$7.default.FileWatcherEventKind.Changed &&
            !configFileModified(fileName, modifiedTime ?? docContext.tsSystem.getModifiedTime?.(fileName), docContext)) {
            return;
        }
        const getCanonicalFileName = (0, utils_1$l.createGetCanonicalFileName)(docContext.tsSystem.useCaseSensitiveFileNames);
        docContext.extendedConfigCache.delete(getCanonicalFileName(fileName));
        docContext.extendedConfigCache.delete(fileName);
        const reloadingConfigs = [];
        const promises = Array.from(configPathToDependedProject.get(fileName) ?? []).map(async (config) => {
            reloadingConfigs.push(config);
            const oldService = services.get(config);
            scheduleReload(config);
            (await oldService)?.dispose();
        });
        await Promise.all(promises);
        docContext.onProjectReloaded?.(reloadingConfigs);
    };
}
function configFileModified(fileName, modifiedTime, docContext) {
    const previousModifiedTime = configFileModifiedTime.get(fileName);
    if (!modifiedTime || !previousModifiedTime) {
        return true;
    }
    if (previousModifiedTime >= modifiedTime) {
        return false;
    }
    configFileModifiedTime.set(fileName, modifiedTime);
    const oldSourceFile = parsedTsConfigInfo.get(fileName)?.parsedCommandLine?.options.configFile ??
        docContext.extendedConfigCache.get(fileName)?.extendedResult;
    if (oldSourceFile &&
        typeof oldSourceFile === 'object' &&
        'kind' in oldSourceFile &&
        typeof oldSourceFile.text === 'string' &&
        oldSourceFile.text === docContext.tsSystem.readFile(fileName)) {
        return false;
    }
    return true;
}
function scheduleReload(fileName) {
    pendingReloads.add(fileName);
}
function getOrCreateDocumentRegistry(currentDirectory, useCaseSensitiveFileNames) {
    const key = [currentDirectory, useCaseSensitiveFileNames].join('|');
    let registry = documentRegistries.get(key);
    if (registry) {
        return registry;
    }
    registry = typescript_1$7.default.createDocumentRegistry(useCaseSensitiveFileNames, currentDirectory);
    const acquireDocumentWithKey = registry.acquireDocumentWithKey;
    registry.acquireDocumentWithKey = (fileName, path, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions) => {
        ensureImpliedNodeFormat(compilationSettingsOrHost, fileName, sourceFileOptions);
        return acquireDocumentWithKey(fileName, path, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions);
    };
    const updateDocumentWithKey = registry.updateDocumentWithKey;
    registry.updateDocumentWithKey = (fileName, path, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions) => {
        ensureImpliedNodeFormat(compilationSettingsOrHost, fileName, sourceFileOptions);
        return updateDocumentWithKey(fileName, path, compilationSettingsOrHost, key, scriptSnapshot, version, scriptKind, sourceFileOptions);
    };
    documentRegistries.set(key, registry);
    return registry;
    function ensureImpliedNodeFormat(compilationSettingsOrHost, fileName, sourceFileOptions) {
        const compilationSettings = getCompilationSettings(compilationSettingsOrHost);
        const host = compilationSettingsOrHost === compilationSettings
            ? undefined
            : compilationSettingsOrHost;
        if (host &&
            (0, utils_2$9.isSvelteFilePath)(fileName) &&
            typeof sourceFileOptions === 'object' &&
            !sourceFileOptions.impliedNodeFormat) {
            const format = typescript_1$7.default.getImpliedNodeFormatForFile((0, utils_2$9.toVirtualSvelteFilePath)(fileName), host?.getCompilerHost?.()?.getModuleResolutionCache?.()?.getPackageJsonInfoCache(), host, compilationSettings);
            sourceFileOptions.impliedNodeFormat = format;
        }
    }
    function getCompilationSettings(settingsOrHost) {
        if (typeof settingsOrHost.getCompilationSettings === 'function') {
            return settingsOrHost.getCompilationSettings();
        }
        return settingsOrHost;
    }
}

var __importDefault$9 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(UpdateImportsProvider, "__esModule", { value: true });
UpdateImportsProvider.UpdateImportsProviderImpl = void 0;
const path_1$6 = __importDefault$9(path$1);
const vscode_languageserver_1$f = main$8;
const documents_1$e = documents;
const utils_1$k = utils$6;
const service_1$4 = service;
const utils_2$8 = utils$2;
const utils_3$6 = requireUtils();
class UpdateImportsProviderImpl {
    constructor(lsAndTsDocResolver, useCaseSensitiveFileNames) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
        this.getCanonicalFileName = (0, utils_1$k.createGetCanonicalFileName)(useCaseSensitiveFileNames);
    }
    async updateImports(fileRename) {
        const oldPath = (0, utils_1$k.urlToPath)(fileRename.oldUri);
        const newPath = (0, utils_1$k.urlToPath)(fileRename.newUri);
        if (!oldPath || !newPath) {
            return null;
        }
        const services = [];
        await (0, service_1$4.forAllServices)((ls) => {
            services.push(ls);
        });
        const documentChanges = new Map();
        for (const service of services) {
            await this.updateImportForSingleService(oldPath, newPath, service, documentChanges);
        }
        return {
            documentChanges: Array.from(documentChanges.values())
        };
    }
    async updateImportForSingleService(oldPath, newPath, lsContainer, documentChanges) {
        const ls = lsContainer.getService();
        const program = ls.getProgram();
        if (!program) {
            return;
        }
        const canonicalOldPath = this.getCanonicalFileName((0, utils_1$k.normalizePath)(oldPath));
        const canonicalNewPath = this.getCanonicalFileName((0, utils_1$k.normalizePath)(newPath));
        const hasFile = program.getSourceFiles().some((sf) => {
            const normalizedFileName = this.getCanonicalFileName((0, utils_1$k.normalizePath)(sf.fileName));
            return (normalizedFileName.startsWith(canonicalOldPath) ||
                normalizedFileName.startsWith(canonicalNewPath));
        });
        if (!hasFile) {
            return;
        }
        const oldPathTsProgramCasing = ls.getProgram()?.getSourceFile(oldPath)?.fileName ?? oldPath;
        const fileChanges = ls
            .getEditsForFileRename(oldPathTsProgramCasing, newPath, {}, {})
            .filter((change) => !change.isNewFile || change.fileName === oldPathTsProgramCasing);
        await this.lsAndTsDocResolver.updateSnapshotPath(oldPathTsProgramCasing, newPath);
        const editInOldPath = fileChanges.find((change) => change.fileName.startsWith(oldPathTsProgramCasing) &&
            (oldPathTsProgramCasing.includes(newPath) || !change.fileName.startsWith(newPath)));
        const editInNewPath = fileChanges.find((change) => change.fileName.startsWith(newPath) &&
            (newPath.includes(oldPathTsProgramCasing) ||
                !change.fileName.startsWith(oldPathTsProgramCasing)));
        const updateImportsChanges = fileChanges
            .filter((change) => {
            if ((0, utils_3$6.isKitTypePath)(change.fileName)) {
                return false;
            }
            if (!editInOldPath || !editInNewPath) {
                return true;
            }
            return editInOldPath.textChanges.length > editInNewPath.textChanges.length
                ? change !== editInNewPath
                : change !== editInOldPath;
        })
            .map((change) => {
            if (change === editInOldPath) {
                change.fileName = change.fileName.replace(oldPathTsProgramCasing, newPath);
            }
            if (path_1$6.default.basename(change.fileName).startsWith('+')) {
                change.textChanges = change.textChanges.filter((textChange) => !(0, utils_3$6.isKitTypePath)(textChange.newText));
            }
            return change;
        });
        const docs = new utils_3$6.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
        await Promise.all(updateImportsChanges.map(async (change) => {
            if (documentChanges.has(change.fileName)) {
                return;
            }
            const snapshot = await docs.retrieve(change.fileName);
            const edit = vscode_languageserver_1$f.TextDocumentEdit.create(vscode_languageserver_1$f.OptionalVersionedTextDocumentIdentifier.create(snapshot.getURL(), null), change.textChanges.map((edit) => {
                const range = (0, documents_1$e.mapRangeToOriginal)(snapshot, (0, utils_2$8.convertRange)(snapshot, edit.span));
                return vscode_languageserver_1$f.TextEdit.replace(range, edit.newText);
            }));
            documentChanges.set(change.fileName, edit);
        }));
    }
}
UpdateImportsProvider.UpdateImportsProviderImpl = UpdateImportsProviderImpl;

var getDirectiveCommentCompletions = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.tsDirectives = void 0;
	exports.getDirectiveCommentCompletions = getDirectiveCommentCompletions;
	const documents_1 = documents;
	const vscode_languageserver_1 = main$8;
	exports.tsDirectives = [
	    {
	        value: '@ts-check',
	        description: 'Enables semantic checking in a JavaScript file. Must be at the top of a file.'
	    },
	    {
	        value: '@ts-nocheck',
	        description: 'Disables semantic checking in a JavaScript file. Must be at the top of a file.'
	    },
	    {
	        value: '@ts-ignore',
	        description: 'Suppresses @ts-check errors on the next line of a file.'
	    },
	    {
	        value: '@ts-expect-error',
	        description: 'Suppresses @ts-check errors on the next line of a file, expecting at least one to exist.'
	    }
	];
	function getDirectiveCommentCompletions(position, document, completionContext) {
	    if (completionContext?.triggerCharacter === '/') {
	        return null;
	    }
	    const inScript = (0, documents_1.isInTag)(position, document.scriptInfo);
	    const inModule = (0, documents_1.isInTag)(position, document.moduleScriptInfo);
	    if (!inModule && !inScript) {
	        return null;
	    }
	    const lineStart = document.offsetAt(vscode_languageserver_1.Position.create(position.line, 0));
	    const offset = document.offsetAt(position);
	    const prefix = document.getText().slice(lineStart, offset);
	    const match = prefix.match(/^\s*\/\/+\s?(@[a-zA-Z-]*)?$/);
	    if (!match) {
	        return null;
	    }
	    const startCharacter = Math.max(0, position.character - (match[1]?.length ?? 0));
	    const start = vscode_languageserver_1.Position.create(position.line, startCharacter);
	    const items = exports.tsDirectives.map(({ value, description }) => ({
	        detail: description,
	        label: value,
	        kind: vscode_languageserver_1.CompletionItemKind.Snippet,
	        textEdit: vscode_languageserver_1.TextEdit.replace(vscode_languageserver_1.Range.create(start, vscode_languageserver_1.Position.create(start.line, start.character + value.length)), value)
	    }));
	    return vscode_languageserver_1.CompletionList.create(items, false);
	}
} (getDirectiveCommentCompletions));
getDefaultExportFromCjs(getDirectiveCommentCompletions);

var DocumentHighlightProvider = {};

var __importDefault$8 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(DocumentHighlightProvider, "__esModule", { value: true });
DocumentHighlightProvider.DocumentHighlightProviderImpl = void 0;
const typescript_1$6 = __importDefault$8(ts);
const vscode_languageserver_protocol_1 = main$7;
const vscode_languageserver_types_1$2 = mainExports;
const documents_1$d = documents;
const utils_1$j = utils$6;
const utils_2$7 = utils$2;
const utils_3$5 = requireUtils();
const svelte_ast_utils_1$1 = svelteAstUtils;
class DocumentHighlightProviderImpl {
    constructor(lsAndTsDocResolver) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
    }
    async findDocumentHighlight(document, position) {
        const { tsDoc } = await this.lsAndTsDocResolver.getLsForSyntheticOperations(document);
        const svelteResult = await this.getSvelteDocumentHighlight(document, tsDoc, position);
        if (svelteResult) {
            return svelteResult;
        }
        const { lang } = await this.lsAndTsDocResolver.getLSAndTSDoc(document);
        const offset = tsDoc.offsetAt(tsDoc.getGeneratedPosition(position));
        const highlights = lang
            .getDocumentHighlights(tsDoc.filePath, offset, [tsDoc.filePath])
            ?.filter((highlight) => highlight.fileName === tsDoc.filePath);
        if (!highlights?.length) {
            return null;
        }
        const result = highlights
            .flatMap((highlight) => highlight.highlightSpans)
            .filter(this.notInGeneratedCode(tsDoc.getFullText()))
            .map((highlight) => vscode_languageserver_protocol_1.DocumentHighlight.create((0, utils_2$7.convertToLocationRange)(tsDoc, highlight.textSpan), this.convertHighlightKind(highlight)))
            .filter((highlight) => !(0, utils_1$j.isSamePosition)(highlight.range.start, highlight.range.end));
        if (!result.length) {
            return null;
        }
        return result;
    }
    convertHighlightKind(highlight) {
        return highlight.kind === typescript_1$6.default.HighlightSpanKind.writtenReference
            ? vscode_languageserver_types_1$2.DocumentHighlightKind.Write
            : vscode_languageserver_types_1$2.DocumentHighlightKind.Read;
    }
    async getSvelteDocumentHighlight(document, tsDoc, position) {
        if ((0, documents_1$d.inStyleOrScript)(document, position)) {
            return null;
        }
        const offset = document.offsetAt(position);
        const offsetStart = Math.max(offset - 10, 0);
        const charactersAroundOffset = document
            .getText()
            .substr(offsetStart, 20);
        if (!['#', '/', ':', '@', 'then', 'catch'].some((keyword) => charactersAroundOffset.includes(keyword))) {
            return null;
        }
        const candidate = this.findCandidateSvelteTag(tsDoc, offset);
        if (!candidate) {
            return null;
        }
        if (candidate.type.endsWith('Tag')) {
            return this.getTagHighlight(offset, document, candidate);
        }
        if (candidate.type.endsWith('Block')) {
            return this.getBlockHighlight(offset, document, candidate);
        }
        return null;
    }
    findCandidateSvelteTag(tsDoc, offset) {
        let candidate;
        const subBlocks = ['ThenBlock', 'CatchBlock', 'PendingBlock', 'ElseBlock'];
        tsDoc.walkSvelteAst({
            enter(node, parent, key) {
                if (node.type === 'Fragment') {
                    return;
                }
                const templateNode = node;
                const isWithin = templateNode.start <= offset && templateNode.end >= offset;
                const canSkip = !isWithin ||
                    key === 'expression' ||
                    key === 'context' ||
                    ((parent.type === 'InlineComponent' || parent.type === 'Element') &&
                        key !== 'children');
                if (canSkip) {
                    this.skip();
                    return;
                }
                if (node.type.endsWith('Tag')) {
                    candidate = templateNode;
                    return;
                }
                if (node.type.endsWith('Block') && !subBlocks.includes(node.type)) {
                    if (
                    node.type === 'IfBlock' &&
                        parent.type === 'ElseBlock' &&
                        parent.start === node.start) {
                        return;
                    }
                    candidate = templateNode;
                    return;
                }
            }
        });
        return candidate;
    }
    getTagHighlight(offset, document, candidate) {
        const name = candidate.type === 'RawMustacheTag'
            ? 'html'
            : candidate.type.replace('Tag', '').toLocaleLowerCase();
        const startTag = '@' + name;
        const indexOfName = document.getText().indexOf(startTag, candidate.start);
        if (indexOfName < 0 || indexOfName > offset || candidate.start + startTag.length < offset) {
            return null;
        }
        return [
            {
                kind: vscode_languageserver_types_1$2.DocumentHighlightKind.Read,
                range: vscode_languageserver_types_1$2.Range.create(document.positionAt(indexOfName), document.positionAt(indexOfName + startTag.length))
            }
        ];
    }
    getBlockHighlight(offset, document, candidate) {
        const name = candidate.type.replace('Block', '').toLowerCase();
        const startTag = '#' + name;
        const startTagStart = document.getText().indexOf(startTag, candidate.start);
        if (startTagStart < 0) {
            return null;
        }
        const ranges = [];
        ranges.push([startTagStart, startTagStart + startTag.length]);
        const content = document.getText();
        const endTag = '/' + name;
        const endTagStart = content.lastIndexOf(endTag, candidate.end);
        if (endTagStart < startTagStart) {
            return null;
        }
        ranges.push([endTagStart, endTagStart + endTag.length]);
        if (candidate.type === 'EachBlock' && candidate.else) {
            const elseStart = content.lastIndexOf(':else', candidate.else.start);
            ranges.push([elseStart, elseStart + ':else'.length]);
        }
        ranges.push(...this.getElseHighlightsForIfBlock(candidate, content), ...this.getAwaitBlockHighlight(candidate, content));
        if (!ranges.some(([start, end]) => offset >= start && offset <= end)) {
            return null;
        }
        return ranges.map(([start, end]) => ({
            range: vscode_languageserver_types_1$2.Range.create(document.positionAt(start), document.positionAt(end)),
            kind: vscode_languageserver_types_1$2.DocumentHighlightKind.Read
        }));
    }
    getElseHighlightsForIfBlock(candidate, content) {
        if (candidate.type !== 'IfBlock' || !candidate.else) {
            return [];
        }
        const ranges = new Map();
        (0, svelte_ast_utils_1$1.walkSvelteAst)(candidate.else, {
            enter(node) {
                const templateNode = node;
                if (templateNode.type === 'IfBlock' && templateNode.elseif) {
                    const elseIfStart = content.lastIndexOf(':else if', templateNode.expression.start);
                    if (elseIfStart > 0) {
                        ranges.set(elseIfStart, [elseIfStart, elseIfStart + ':else if'.length]);
                    }
                }
                if (templateNode.type === 'ElseBlock') {
                    const elseStart = content.lastIndexOf(':else', templateNode.start);
                    if (elseStart > 0 &&
                        content.slice(elseStart, elseStart + ':else if'.length) !== ':else if') {
                        ranges.set(elseStart, [elseStart, elseStart + ':else'.length]);
                    }
                }
            }
        });
        return Array.from(ranges.values());
    }
    getAwaitBlockHighlight(candidate, content) {
        if (candidate.type !== 'AwaitBlock' || (candidate.then.skip && candidate.catch.skip)) {
            return [];
        }
        const ranges = [];
        if (candidate.value) {
            const thenKeyword = candidate.pending.skip ? 'then' : ':then';
            const thenStart = content.lastIndexOf(thenKeyword, candidate.value.start);
            ranges.push([thenStart, thenStart + thenKeyword.length]);
        }
        if (candidate.error) {
            const catchKeyword = candidate.pending.skip && candidate.then.skip ? 'catch' : ':catch';
            const catchStart = content.lastIndexOf(catchKeyword, candidate.error.start);
            ranges.push([catchStart, catchStart + catchKeyword.length]);
        }
        else if (!candidate.catch.skip) {
            const catchStart = content.indexOf(':catch', candidate.catch.start);
            ranges.push([catchStart, catchStart + ':catch'.length]);
        }
        return ranges;
    }
    notInGeneratedCode(text) {
        return (ref) => {
            return !(0, utils_3$5.isInGeneratedCode)(text, ref.textSpan.start, ref.textSpan.start + ref.textSpan.length);
        };
    }
}
DocumentHighlightProvider.DocumentHighlightProviderImpl = DocumentHighlightProviderImpl;

var CallHierarchyProvider = {};

var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
var __importDefault$7 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(CallHierarchyProvider, "__esModule", { value: true });
CallHierarchyProvider.CallHierarchyProviderImpl = void 0;
const path_1$5 = __importStar(path$1);
const typescript_1$5 = __importDefault$7(ts);
const vscode_languageserver_1$e = main$8;
const vscode_languageserver_types_1$1 = mainExports;
const documents_1$c = documents;
const utils_1$i = utils$6;
const DocumentSnapshot_1$2 = DocumentSnapshot;
const utils_2$6 = utils$2;
const utils_3$4 = requireUtils();
const svelte2tsx_1$2 = require$$0;
const ENSURE_COMPONENT_HELPER = '__sveltets_2_ensureComponent';
class CallHierarchyProviderImpl {
    constructor(lsAndTsDocResolver, workspaceUris) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
        this.workspaceUris = workspaceUris;
    }
    async prepareCallHierarchy(document, position, cancellationToken) {
        const { lang, tsDoc, lsContainer } = await this.lsAndTsDocResolver.getLSAndTSDoc(document);
        if (cancellationToken?.isCancellationRequested) {
            return null;
        }
        const offset = tsDoc.offsetAt(tsDoc.getGeneratedPosition(position));
        const items = lang.prepareCallHierarchy(tsDoc.filePath, offset);
        const itemsArray = Array.isArray(items) ? items : items ? [items] : [];
        const snapshots = new utils_3$4.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
        snapshots.set(tsDoc.filePath, tsDoc);
        const program = lang.getProgram();
        const result = await Promise.all(itemsArray.map((item) => this.convertCallHierarchyItem(snapshots, item, program)));
        return result.filter(utils_1$i.isNotNullOrUndefined);
    }
    isSourceFileItem(item) {
        return (item.kind === typescript_1$5.default.ScriptElementKind.scriptElement ||
            (item.kind === typescript_1$5.default.ScriptElementKind.moduleElement && item.selectionSpan.start === 0));
    }
    async convertCallHierarchyItem(snapshots, item, program) {
        const snapshot = await snapshots.retrieve(item.file);
        const redirectedCallHierarchyItem = this.redirectCallHierarchyItem(snapshot, program, item);
        if (redirectedCallHierarchyItem) {
            return redirectedCallHierarchyItem;
        }
        const { name, detail } = this.getNameAndDetailForItem(this.isSourceFileItem(item), item);
        const selectionRange = (0, documents_1$c.mapRangeToOriginal)(snapshot, (0, utils_2$6.convertRange)(snapshot, item.selectionSpan));
        if (selectionRange.start.line < 0 || selectionRange.end.line < 0) {
            return null;
        }
        const range = (0, documents_1$c.mapRangeToOriginal)(snapshot, (0, utils_2$6.convertRange)(snapshot, item.span));
        if (range.start.line < 0 || range.end.line < 0) {
            return null;
        }
        return {
            kind: (0, utils_2$6.symbolKindFromString)(item.kind),
            name,
            range,
            selectionRange,
            uri: (0, utils_1$i.pathToUrl)(item.file),
            detail,
            tags: item.kindModifiers?.includes('deprecated') ? [vscode_languageserver_1$e.SymbolTag.Deprecated] : undefined
        };
    }
    getNameAndDetailForItem(useFileName, item) {
        const nearestRootUri = (0, utils_2$6.getNearestWorkspaceUri)(this.workspaceUris, item.file, (0, utils_1$i.createGetCanonicalFileName)(typescript_1$5.default.sys.useCaseSensitiveFileNames));
        const nearestRoot = nearestRootUri && ((0, utils_1$i.urlToPath)(nearestRootUri) ?? undefined);
        const name = useFileName ? (0, path_1$5.basename)(item.file) : item.name;
        const detail = useFileName
            ? nearestRoot && path_1$5.default.relative(nearestRoot, (0, path_1$5.dirname)(item.file))
            : item.containerName;
        return { name, detail };
    }
    async getIncomingCalls(previousItem, cancellationToken) {
        const prepareResult = await this.prepareFurtherCalls(previousItem, cancellationToken);
        if (!prepareResult) {
            return null;
        }
        const { lang, filePath, program, snapshots, isComponentModulePosition, tsDoc, getNonComponentOffset } = prepareResult;
        const componentExportOffset = isComponentModulePosition && tsDoc instanceof DocumentSnapshot_1$2.SvelteDocumentSnapshot
            ? (0, utils_2$6.offsetOfGeneratedComponentExport)(tsDoc)
            : -1;
        const offset = componentExportOffset >= 0 ? componentExportOffset : getNonComponentOffset();
        const incomingCalls = lang
            .provideCallHierarchyIncomingCalls(filePath, offset)
            .concat(this.getInComingCallsForComponent(lang, program, filePath, offset) ?? []);
        const result = await Promise.all(incomingCalls.map(async (item) => {
            const snapshot = await snapshots.retrieve(item.from.file);
            const from = await this.convertCallHierarchyItem(snapshots, item.from, program);
            if (!from) {
                return null;
            }
            return {
                from,
                fromRanges: this.convertFromRanges(snapshot, item.fromSpans)
            };
        }));
        return result.filter(utils_1$i.isNotNullOrUndefined);
    }
    async getOutgoingCalls(previousItem, cancellationToken) {
        const prepareResult = await this.prepareFurtherCalls(previousItem, cancellationToken);
        if (!prepareResult) {
            return null;
        }
        const { lang, filePath, program, snapshots, isComponentModulePosition, tsDoc, getNonComponentOffset } = prepareResult;
        const sourceFile = program?.getSourceFile(filePath);
        const renderFunctionOffset = isComponentModulePosition && tsDoc instanceof DocumentSnapshot_1$2.SvelteDocumentSnapshot && sourceFile
            ? sourceFile.statements
                .find((statement) => typescript_1$5.default.isFunctionDeclaration(statement) &&
                statement.name?.getText() === svelte2tsx_1$2.internalHelpers.renderName)
                ?.name?.getStart()
            : -1;
        const offset = renderFunctionOffset != null && renderFunctionOffset >= 0
            ? renderFunctionOffset
            : getNonComponentOffset();
        const outgoingCalls = lang
            .provideCallHierarchyOutgoingCalls(filePath, offset)
            .concat(isComponentModulePosition
            ? (this.getOutgoingCallsForComponent(program, filePath) ?? [])
            : []);
        const result = await Promise.all(outgoingCalls.map(async (item) => {
            if (item.to.name.startsWith('__sveltets') ||
                item.to.containerName === 'svelteHTML') {
                return null;
            }
            const to = await this.convertCallHierarchyItem(snapshots, item.to, program);
            if (!to) {
                return null;
            }
            return {
                to,
                fromRanges: this.convertFromRanges(tsDoc, item.fromSpans)
            };
        }));
        return result.filter(utils_1$i.isNotNullOrUndefined).filter((item) => item.fromRanges.length);
    }
    async prepareFurtherCalls(item, cancellationToken) {
        const filePath = (0, utils_1$i.urlToPath)(item.uri);
        if (!filePath) {
            return null;
        }
        const lsContainer = await this.lsAndTsDocResolver.getTSService(filePath);
        const lang = lsContainer.getService();
        const tsDoc = await this.lsAndTsDocResolver.getOrCreateSnapshot(filePath);
        if (cancellationToken?.isCancellationRequested) {
            return null;
        }
        const program = lang.getProgram();
        const snapshots = new utils_3$4.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
        snapshots.set(tsDoc.filePath, tsDoc);
        const isComponentModulePosition = (0, utils_2$6.isSvelteFilePath)(item.name) &&
            item.selectionRange.start.line === 0 &&
            item.range.start.line === 0;
        return {
            snapshots,
            filePath,
            program,
            tsDoc,
            lang,
            isComponentModulePosition,
            getNonComponentOffset: () => tsDoc.offsetAt(tsDoc.getGeneratedPosition(item.selectionRange.start))
        };
    }
    redirectCallHierarchyItem(snapshot, program, item) {
        if (!(0, utils_2$6.isSvelteFilePath)(item.file) ||
            !program ||
            !(snapshot instanceof DocumentSnapshot_1$2.SvelteDocumentSnapshot)) {
            return null;
        }
        const sourceFile = program.getSourceFile(item.file);
        if (!sourceFile) {
            return null;
        }
        if ((0, utils_2$6.isGeneratedSvelteComponentName)(item.name)) {
            return this.toComponentCallHierarchyItem(snapshot, item);
        }
        if (item.name === svelte2tsx_1$2.internalHelpers.renderName) {
            const end = item.selectionSpan.start + item.selectionSpan.length;
            const renderFunction = sourceFile.statements.find((statement) => statement.getStart() <= item.selectionSpan.start && statement.getEnd() >= end);
            if (!renderFunction || !sourceFile.statements.includes(renderFunction)) {
                return null;
            }
            return this.toComponentCallHierarchyItem(snapshot, item);
        }
        return null;
    }
    toComponentCallHierarchyItem(snapshot, item) {
        const fileStartPosition = vscode_languageserver_types_1$1.Position.create(0, 0);
        const fileRange = vscode_languageserver_1$e.Range.create(fileStartPosition, snapshot.parent.positionAt(snapshot.parent.getTextLength()));
        return {
            ...this.getNameAndDetailForItem(true, item),
            kind: vscode_languageserver_1$e.SymbolKind.Module,
            range: fileRange,
            selectionRange: vscode_languageserver_1$e.Range.create(fileStartPosition, fileStartPosition),
            uri: (0, utils_1$i.pathToUrl)(item.file)
        };
    }
    convertFromRanges(snapshot, spans) {
        return spans
            .map((item) => (0, documents_1$c.mapRangeToOriginal)(snapshot, (0, utils_2$6.convertRange)(snapshot, item)))
            .filter((range) => range.start.line >= 0 && range.end.line >= 0);
    }
    getInComingCallsForComponent(lang, program, filePath, offset) {
        if (!program || !(0, utils_2$6.isSvelteFilePath)(filePath)) {
            return null;
        }
        const groups = lang
            .findReferences(filePath, offset)
            ?.map((entry) => [
            entry.definition.fileName,
            entry.references
                .map((ref) => this.getComponentStartTagFromReference(program, ref))
                .filter(utils_1$i.isNotNullOrUndefined)
        ])
            .filter(([_, group]) => group.length);
        return (groups?.map(([file, group]) => ({
            from: {
                file,
                kind: typescript_1$5.default.ScriptElementKind.scriptElement,
                name: (0, utils_2$6.toGeneratedSvelteComponentName)(''),
                selectionSpan: { start: 0, length: 0 },
                span: { start: 0, length: 0 }
            },
            fromSpans: group.map((g) => g.textSpan)
        })) ?? null);
    }
    getComponentStartTagFromReference(program, ref) {
        const sourceFile = program.getSourceFile(ref.fileName);
        if (!sourceFile) {
            return null;
        }
        const node = (0, utils_3$4.findNodeAtSpan)(sourceFile, ref.textSpan, this.isComponentStartTag);
        if (node) {
            return ref;
        }
        return null;
    }
    isComponentStartTag(node) {
        return (!!node &&
            node.parent &&
            typescript_1$5.default.isCallExpression(node.parent) &&
            typescript_1$5.default.isIdentifier(node.parent.expression) &&
            node.parent.expression.text === ENSURE_COMPONENT_HELPER &&
            typescript_1$5.default.isIdentifier(node) &&
            node === node.parent.arguments[0]);
    }
    getOutgoingCallsForComponent(program, filePath) {
        const sourceFile = program?.getSourceFile(filePath);
        if (!program || !sourceFile) {
            return null;
        }
        const groups = new Map();
        const startTags = (0, utils_3$4.gatherDescendants)(sourceFile, this.isComponentStartTag);
        const typeChecker = program.getTypeChecker();
        for (const startTag of startTags) {
            const type = typeChecker.getTypeAtLocation(startTag);
            const symbol = type.aliasSymbol ?? type.symbol;
            const declaration = symbol?.valueDeclaration ?? symbol?.declarations?.[0];
            if (!declaration || !typescript_1$5.default.isClassDeclaration(declaration)) {
                continue;
            }
            let group = groups.get(declaration);
            if (!group) {
                group = [];
                groups.set(declaration, group);
            }
            group.push({ start: startTag.getStart(), length: startTag.getWidth() });
        }
        return (Array.from(groups).map(([declaration, group]) => {
            const file = declaration.getSourceFile().fileName;
            const name = declaration.name?.getText() ?? (0, path_1$5.basename)(file);
            const span = { start: declaration.getStart(), length: declaration.getWidth() };
            const selectionSpan = declaration.name
                ? { start: declaration.name.getStart(), length: declaration.name.getWidth() }
                : span;
            return {
                to: {
                    file,
                    kind: typescript_1$5.default.ScriptElementKind.classElement,
                    name,
                    selectionSpan,
                    span
                },
                fromSpans: group
            };
        }) ?? null);
    }
}
CallHierarchyProvider.CallHierarchyProviderImpl = CallHierarchyProviderImpl;

var CodeLensProvider = {};

var __importDefault$6 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(CodeLensProvider, "__esModule", { value: true });
CodeLensProvider.CodeLensProviderImpl = void 0;
const typescript_1$4 = __importDefault$6(ts);
const vscode_languageserver_1$d = main$8;
const documents_1$b = documents;
const utils_1$h = utils$6;
const utils_2$5 = utils$2;
const utils_3$3 = requireUtils();
const svelte2tsx_1$1 = require$$0;
class CodeLensProviderImpl {
    constructor(lsAndTsDocResolver, referenceProvider, implementationProvider, configManager) {
        this.lsAndTsDocResolver = lsAndTsDocResolver;
        this.referenceProvider = referenceProvider;
        this.implementationProvider = implementationProvider;
        this.configManager = configManager;
    }
    async getCodeLens(document) {
        if (!this.anyCodeLensEnabled('typescript') && !this.anyCodeLensEnabled('javascript')) {
            return null;
        }
        const { lang, tsDoc } = await this.lsAndTsDocResolver.getLsForSyntheticOperations(document);
        const results = [];
        const collectors = [];
        const clientTsConfig = this.configManager.getClientTsUserConfig(tsDoc.scriptKind === typescript_1$4.default.ScriptKind.TS ? 'typescript' : 'javascript');
        if (clientTsConfig.referencesCodeLens?.enabled) {
            collectors.push({
                type: 'reference',
                collect: (tsDoc, item, parent) => this.extractReferenceLocation(tsDoc, item, parent, clientTsConfig)
            });
            if (!tsDoc.parserError) {
                results.push([
                    'reference',
                    {
                        start: { line: 0, character: 0 },
                        end: { line: 0, character: 1 }
                    }
                ]);
            }
        }
        if (tsDoc.scriptKind === typescript_1$4.default.ScriptKind.TS &&
            clientTsConfig.implementationsCodeLens?.enabled) {
            collectors.push({
                type: 'implementation',
                collect: (tsDoc, item, parent) => this.extractImplementationLocation(tsDoc, item, clientTsConfig, parent)
            });
        }
        if (!collectors.length) {
            return null;
        }
        const navigationTree = lang.getNavigationTree(tsDoc.filePath);
        const renderFunction = navigationTree?.childItems?.find((item) => item.text === svelte2tsx_1$1.internalHelpers.renderName);
        if (renderFunction) {
            const notTemplate = renderFunction.childItems?.filter((item) => item.text !== '<function>');
            renderFunction.childItems = notTemplate;
        }
        this.walkTree(tsDoc, navigationTree, undefined, results, collectors);
        const uri = document.uri;
        return results.map(([type, range]) => vscode_languageserver_1$d.CodeLens.create(range, { type, uri }));
    }
    anyCodeLensEnabled(lang) {
        const vscodeTsConfig = this.configManager.getClientTsUserConfig(lang);
        return (vscodeTsConfig.referencesCodeLens?.enabled ||
            vscodeTsConfig.implementationsCodeLens?.enabled);
    }
    extractReferenceLocation(tsDoc, item, parent, config) {
        if (parent && parent.kind === typescript_1$4.default.ScriptElementKind.enumElement) {
            return this.getSymbolRange(tsDoc, item);
        }
        switch (item.kind) {
            case typescript_1$4.default.ScriptElementKind.functionElement: {
                const showOnAllFunctions = config.referencesCodeLens?.showOnAllFunctions;
                if (showOnAllFunctions) {
                    return this.getSymbolRange(tsDoc, item);
                }
                if (this.isExported(item, tsDoc)) {
                    return this.getSymbolRange(tsDoc, item);
                }
                break;
            }
            case typescript_1$4.default.ScriptElementKind.constElement:
            case typescript_1$4.default.ScriptElementKind.letElement:
            case typescript_1$4.default.ScriptElementKind.variableElement:
                if (this.isExported(item, tsDoc)) {
                    return this.getSymbolRange(tsDoc, item);
                }
                break;
            case typescript_1$4.default.ScriptElementKind.classElement:
                if (item.text === '<class>') {
                    break;
                }
                return this.getSymbolRange(tsDoc, item);
            case typescript_1$4.default.ScriptElementKind.interfaceElement:
            case typescript_1$4.default.ScriptElementKind.typeElement:
            case typescript_1$4.default.ScriptElementKind.enumElement:
                return this.getSymbolRange(tsDoc, item);
            case typescript_1$4.default.ScriptElementKind.memberFunctionElement:
            case typescript_1$4.default.ScriptElementKind.memberGetAccessorElement:
            case typescript_1$4.default.ScriptElementKind.memberSetAccessorElement:
            case typescript_1$4.default.ScriptElementKind.constructorImplementationElement:
            case typescript_1$4.default.ScriptElementKind.memberVariableElement:
                if (parent?.spans[0].start === item.spans[0].start) {
                    return undefined;
                }
                switch (parent?.kind) {
                    case typescript_1$4.default.ScriptElementKind.classElement:
                    case typescript_1$4.default.ScriptElementKind.interfaceElement:
                    case typescript_1$4.default.ScriptElementKind.typeElement:
                        return this.getSymbolRange(tsDoc, item);
                }
                break;
        }
        return undefined;
    }
    isExported(item, tsDoc) {
        return !tsDoc.parserError && item.kindModifiers.match(/\bexport\b/g) !== null;
    }
    extractImplementationLocation(tsDoc, item, config, parent) {
        if (item.kind === typescript_1$4.default.ScriptElementKind.memberFunctionElement &&
            parent &&
            parent.kind === typescript_1$4.default.ScriptElementKind.interfaceElement &&
            config.implementationsCodeLens?.showOnInterfaceMethods === true) {
            return this.getSymbolRange(tsDoc, item);
        }
        switch (item.kind) {
            case typescript_1$4.default.ScriptElementKind.interfaceElement:
                return this.getSymbolRange(tsDoc, item);
            case typescript_1$4.default.ScriptElementKind.classElement:
            case typescript_1$4.default.ScriptElementKind.memberFunctionElement:
            case typescript_1$4.default.ScriptElementKind.memberVariableElement:
            case typescript_1$4.default.ScriptElementKind.memberGetAccessorElement:
            case typescript_1$4.default.ScriptElementKind.memberSetAccessorElement:
                if (item.kindModifiers.match(/\babstract\b/g)) {
                    return this.getSymbolRange(tsDoc, item);
                }
                break;
        }
        return undefined;
    }
    getSymbolRange(tsDoc, item) {
        if (!item.nameSpan || (0, utils_3$3.isTextSpanInGeneratedCode)(tsDoc.getFullText(), item.nameSpan)) {
            return;
        }
        const range = (0, documents_1$b.mapRangeToOriginal)(tsDoc, (0, utils_2$5.convertRange)(tsDoc, item.nameSpan));
        if (range.start.line >= 0 && range.end.line >= 0) {
            return (0, utils_1$h.isZeroLengthRange)(range) ? undefined : range;
        }
    }
    walkTree(tsDoc, item, parent, results, collectors) {
        for (const collector of collectors) {
            const range = collector.collect(tsDoc, item, parent);
            if (range) {
                results.push([collector.type, range]);
            }
        }
        item.childItems?.forEach((child) => this.walkTree(tsDoc, child, item, results, collectors));
    }
    async resolveCodeLens(textDocument, codeLensToResolve, cancellationToken) {
        if (codeLensToResolve.data.type === 'reference') {
            return await this.resolveReferenceCodeLens(textDocument, codeLensToResolve, cancellationToken);
        }
        if (codeLensToResolve.data.type === 'implementation') {
            return await this.resolveImplementationCodeLens(textDocument, codeLensToResolve, cancellationToken);
        }
        return codeLensToResolve;
    }
    async resolveReferenceCodeLens(textDocument, codeLensToResolve, cancellationToken) {
        const references = (await this.referenceProvider.findReferences(textDocument, codeLensToResolve.range.start, { includeDeclaration: false }, cancellationToken)) ?? [];
        codeLensToResolve.command = {
            title: references.length === 1 ? `1 reference` : `${references.length} references`,
            command: '',
            arguments: [textDocument.uri, codeLensToResolve.range.start, references]
        };
        return codeLensToResolve;
    }
    async resolveImplementationCodeLens(textDocument, codeLensToResolve, cancellationToken) {
        const implementations = (await this.implementationProvider.getImplementation(textDocument, codeLensToResolve.range.start, cancellationToken)) ?? [];
        codeLensToResolve.command = {
            title: implementations.length === 1
                ? `1 implementation`
                : `${implementations.length} implementations`,
            command: '',
            arguments: [textDocument.uri, codeLensToResolve.range.start, implementations]
        };
        return codeLensToResolve;
    }
}
CodeLensProvider.CodeLensProviderImpl = CodeLensProviderImpl;

var WorkspaceSymbolProvider = {};

var __importDefault$5 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(WorkspaceSymbolProvider, "__esModule", { value: true });
WorkspaceSymbolProvider.WorkspaceSymbolsProviderImpl = void 0;
const svelte2tsx_1 = require$$0;
const typescript_1$3 = __importDefault$5(ts);
const vscode_languageserver_types_1 = mainExports;
const documents_1$a = documents;
const utils_1$g = utils$6;
const DocumentSnapshot_1$1 = DocumentSnapshot;
const service_1$3 = service;
const utils_2$4 = utils$2;
const utils_3$2 = requireUtils();
class WorkspaceSymbolsProviderImpl {
    constructor(lsAndTsDocResolver, configManager) {
        this.configManager = configManager;
        this.lsAndTsDocResolver = lsAndTsDocResolver;
    }
    async getWorkspaceSymbols(query, cancellationToken) {
        const allServices = [];
        await (0, service_1$3.forAllServices)((service) => {
            allServices.push(service);
        });
        const symbols = new Map();
        const preference = this.configManager.getTsUserPreferences('typescript', null);
        for (const ls of allServices) {
            if (cancellationToken?.isCancellationRequested) {
                return null;
            }
            const service = ls.getService();
            const projectItems = service.getNavigateToItems(query,
             256,
             undefined,
             ls.snapshotManager.allFilesAreJsOrDts(), preference.excludeLibrarySymbolsInNavTo);
            const snapshots = new utils_3$2.SnapshotMap(this.lsAndTsDocResolver, ls);
            for (const item of projectItems) {
                if (this.isGeneratedName(item) ||
                    (item.kind === typescript_1$3.default.ScriptElementKind.alias && !item.containerName)) {
                    continue;
                }
                const seen = symbols.get(item.name);
                if (!seen) {
                    symbols.set(item.name, [
                        [
                            item,
                            this.mapWorkspaceSymbol(item, await snapshots.retrieve(item.fileName))
                        ]
                    ]);
                    continue;
                }
                let skip = false;
                for (const [seenItem] of seen) {
                    if (this.navigateToItemIsEqualTo(seenItem, item)) {
                        skip = true;
                        break;
                    }
                }
                if (skip) {
                    continue;
                }
                const snapshot = await snapshots.retrieve(item.fileName);
                if (snapshot instanceof DocumentSnapshot_1$1.SvelteDocumentSnapshot &&
                    (0, utils_3$2.isInGeneratedCode)(snapshot.getFullText(), item.textSpan.start)) {
                    continue;
                }
                seen.push([
                    item,
                    this.mapWorkspaceSymbol(item, await snapshots.retrieve(item.fileName))
                ]);
            }
        }
        return Array.from(symbols.values())
            .flatMap((items) => items.map(([_, symbol]) => symbol))
            .filter(utils_1$g.isNotNullOrUndefined);
    }
    isGeneratedName(item) {
        if (!(0, utils_2$4.isSvelteFilePath)(item.fileName)) {
            return false;
        }
        return (item.name === svelte2tsx_1.internalHelpers.renderName ||
            item.name.startsWith('__sveltets_') ||
            item.name.startsWith('$$'));
    }
    mapWorkspaceSymbol(item, snapshot) {
        let location = (0, documents_1$a.mapLocationToOriginal)(snapshot, (0, utils_2$4.convertRange)(snapshot, item.textSpan));
        if (location.range.start.line < 0) {
            if ((0, utils_2$4.isGeneratedSvelteComponentName)(item.name)) {
                location = {
                    uri: snapshot.getURL(),
                    range: {
                        start: { line: 0, character: 0 },
                        end: { line: 0, character: 1 }
                    }
                };
            }
            else {
                return undefined;
            }
        }
        return {
            kind: this.convertSymbolKindForWorkspaceSymbol(item.kind),
            name: this.getLabel(item),
            containerName: snapshot instanceof DocumentSnapshot_1$1.SvelteDocumentSnapshot &&
                (item.containerName === svelte2tsx_1.internalHelpers.renderName || !item.containerName)
                ? (0, utils_2$4.isInScript)(location.range.start, snapshot)
                    ? 'script'
                    : undefined
                : item.containerName,
            location,
            tags: item.kindModifiers?.includes('deprecated') ? [vscode_languageserver_types_1.SymbolTag.Deprecated] : undefined
        };
    }
    navigateToItemIsEqualTo(a, b) {
        if (a === b) {
            return true;
        }
        if (!a || !b) {
            return false;
        }
        return (a.containerKind === b.containerKind &&
            a.containerName === b.containerName &&
            a.fileName === b.fileName &&
            a.isCaseSensitive === b.isCaseSensitive &&
            a.kind === b.kind &&
            a.kindModifiers === b.kindModifiers &&
            a.matchKind === b.matchKind &&
            a.name === b.name &&
            a.textSpan.start === b.textSpan.start &&
            a.textSpan.length === b.textSpan.length);
    }
    convertSymbolKindForWorkspaceSymbol(kind) {
        switch (kind) {
            case typescript_1$3.default.ScriptElementKind.memberFunctionElement:
                return vscode_languageserver_types_1.SymbolKind.Method;
            case typescript_1$3.default.ScriptElementKind.enumElement:
                return vscode_languageserver_types_1.SymbolKind.Enum;
            case typescript_1$3.default.ScriptElementKind.enumMemberElement:
                return vscode_languageserver_types_1.SymbolKind.EnumMember;
            case typescript_1$3.default.ScriptElementKind.functionElement:
                return vscode_languageserver_types_1.SymbolKind.Function;
            case typescript_1$3.default.ScriptElementKind.classElement:
                return vscode_languageserver_types_1.SymbolKind.Class;
            case typescript_1$3.default.ScriptElementKind.interfaceElement:
                return vscode_languageserver_types_1.SymbolKind.Interface;
            case typescript_1$3.default.ScriptElementKind.typeElement:
                return vscode_languageserver_types_1.SymbolKind.Class;
            case typescript_1$3.default.ScriptElementKind.memberVariableElement:
            case typescript_1$3.default.ScriptElementKind.memberGetAccessorElement:
            case typescript_1$3.default.ScriptElementKind.memberSetAccessorElement:
                return vscode_languageserver_types_1.SymbolKind.Field;
            default:
                return vscode_languageserver_types_1.SymbolKind.Variable;
        }
    }
    getLabel(item) {
        const label = item.name;
        if (item.kind === 'method' || item.kind === 'function') {
            return label + '()';
        }
        return label;
    }
}
WorkspaceSymbolProvider.WorkspaceSymbolsProviderImpl = WorkspaceSymbolsProviderImpl;

var __importDefault$4 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(TypeScriptPlugin$1, "__esModule", { value: true });
TypeScriptPlugin$1.TypeScriptPlugin = void 0;
const typescript_1$2 = __importDefault$4(ts);
const vscode_languageserver_1$c = main$8;
const documents_1$9 = documents;
const utils_1$f = utils$6;
const SnapshotManager_1$1 = SnapshotManager$1;
const CodeActionsProvider_1$1 = CodeActionsProvider;
const CompletionProvider_1 = CompletionProvider;
const DiagnosticsProvider_1$1 = DiagnosticsProvider;
const FindComponentReferencesProvider_1 = FindComponentReferencesProvider;
const FindFileReferencesProvider_1 = FindFileReferencesProvider;
const FindReferencesProvider_1 = FindReferencesProvider;
const FoldingRangeProvider_1 = FoldingRangeProvider;
const HoverProvider_1 = HoverProvider;
const ImplementationProvider_1 = ImplementationProvider;
const InlayHintProvider_1 = InlayHintProvider;
const RenameProvider_1 = RenameProvider;
const SelectionRangeProvider_1 = SelectionRangeProvider;
const SemanticTokensProvider_1 = SemanticTokensProvider;
const SignatureHelpProvider_1 = SignatureHelpProvider;
const TypeDefinitionProvider_1 = TypeDefinitionProvider;
const UpdateImportsProvider_1 = UpdateImportsProvider;
const getDirectiveCommentCompletions_1 = getDirectiveCommentCompletions;
const utils_2$3 = requireUtils();
const DocumentHighlightProvider_1 = DocumentHighlightProvider;
const svelte_ast_utils_1 = svelteAstUtils;
const utils_3$1 = utils$2;
const CallHierarchyProvider_1 = CallHierarchyProvider;
const CodeLensProvider_1 = CodeLensProvider;
const WorkspaceSymbolProvider_1 = WorkspaceSymbolProvider;
class TypeScriptPlugin {
    constructor(configManager, lsAndTsDocResolver, workspaceUris, documentManager) {
        this.__name = 'ts';
        this.configManager = configManager;
        this.documentManager = documentManager;
        this.lsAndTsDocResolver = lsAndTsDocResolver;
        this.completionProvider = new CompletionProvider_1.CompletionsProviderImpl(this.lsAndTsDocResolver, this.configManager);
        this.codeActionsProvider = new CodeActionsProvider_1$1.CodeActionsProviderImpl(this.lsAndTsDocResolver, this.completionProvider, configManager);
        this.updateImportsProvider = new UpdateImportsProvider_1.UpdateImportsProviderImpl(this.lsAndTsDocResolver, typescript_1$2.default.sys.useCaseSensitiveFileNames);
        this.diagnosticsProvider = new DiagnosticsProvider_1$1.DiagnosticsProviderImpl(this.lsAndTsDocResolver, configManager);
        this.renameProvider = new RenameProvider_1.RenameProviderImpl(this.lsAndTsDocResolver, configManager);
        this.hoverProvider = new HoverProvider_1.HoverProviderImpl(this.lsAndTsDocResolver);
        this.findFileReferencesProvider = new FindFileReferencesProvider_1.FindFileReferencesProviderImpl(this.lsAndTsDocResolver);
        this.findComponentReferencesProvider = new FindComponentReferencesProvider_1.FindComponentReferencesProviderImpl(this.lsAndTsDocResolver);
        this.findReferencesProvider = new FindReferencesProvider_1.FindReferencesProviderImpl(this.lsAndTsDocResolver, this.findComponentReferencesProvider);
        this.selectionRangeProvider = new SelectionRangeProvider_1.SelectionRangeProviderImpl(this.lsAndTsDocResolver);
        this.signatureHelpProvider = new SignatureHelpProvider_1.SignatureHelpProviderImpl(this.lsAndTsDocResolver);
        this.semanticTokensProvider = new SemanticTokensProvider_1.SemanticTokensProviderImpl(this.lsAndTsDocResolver);
        this.implementationProvider = new ImplementationProvider_1.ImplementationProviderImpl(this.lsAndTsDocResolver);
        this.typeDefinitionProvider = new TypeDefinitionProvider_1.TypeDefinitionProviderImpl(this.lsAndTsDocResolver);
        this.inlayHintProvider = new InlayHintProvider_1.InlayHintProviderImpl(this.lsAndTsDocResolver);
        this.callHierarchyProvider = new CallHierarchyProvider_1.CallHierarchyProviderImpl(this.lsAndTsDocResolver, workspaceUris);
        this.foldingRangeProvider = new FoldingRangeProvider_1.FoldingRangeProviderImpl(this.lsAndTsDocResolver, configManager);
        this.codLensProvider = new CodeLensProvider_1.CodeLensProviderImpl(this.lsAndTsDocResolver, this.findReferencesProvider, this.implementationProvider, this.configManager);
        this.documentHeightProvider = new DocumentHighlightProvider_1.DocumentHighlightProviderImpl(this.lsAndTsDocResolver);
        this.workspaceSymbolsProvider = new WorkspaceSymbolProvider_1.WorkspaceSymbolsProviderImpl(this.lsAndTsDocResolver, configManager);
    }
    async getDiagnostics(document, cancellationToken) {
        if (!this.featureEnabled('diagnostics')) {
            return [];
        }
        return this.diagnosticsProvider.getDiagnostics(document, cancellationToken);
    }
    async getDiagnosticsForPullMode(document, previousResultId, cancellationToken) {
        if (!this.featureEnabled('diagnostics')) {
            return {
                kind: 'full',
                items: []
            };
        }
        return this.diagnosticsProvider.getDiagnosticsForPullMode(document, previousResultId, cancellationToken);
    }
    async doHover(document, position) {
        if (!this.featureEnabled('hover')) {
            return null;
        }
        return this.hoverProvider.doHover(document, position);
    }
    async getDocumentSymbols(document, cancellationToken) {
        if (!this.featureEnabled('documentSymbols')) {
            return [];
        }
        const { lang, tsDoc } = await this.lsAndTsDocResolver.getLsForSyntheticOperations(document);
        if (cancellationToken?.isCancellationRequested) {
            return [];
        }
        const navTree = lang.getNavigationTree(tsDoc.filePath);
        const symbols = [];
        collectSymbols(navTree, undefined, (symbol) => symbols.push(symbol));
        const topContainerName = symbols[0].name;
        const result = [];
        for (let symbol of symbols.slice(1)) {
            if (symbol.containerName === topContainerName) {
                symbol.containerName = 'script';
            }
            symbol = (0, documents_1$9.mapSymbolInformationToOriginal)(tsDoc, symbol);
            if (symbol.location.range.start.line < 0 ||
                symbol.location.range.end.line < 0 ||
                (0, utils_1$f.isZeroLengthRange)(symbol.location.range) ||
                symbol.name.startsWith('__sveltets_')) {
                continue;
            }
            if ((symbol.kind === vscode_languageserver_1$c.SymbolKind.Property || symbol.kind === vscode_languageserver_1$c.SymbolKind.Method) &&
                !(0, utils_3$1.isInScript)(symbol.location.range.start, document)) {
                if (symbol.name === 'props' &&
                    document.getText().charAt(document.offsetAt(symbol.location.range.start)) !==
                        'p') {
                    continue;
                }
                const node = tsDoc.svelteNodeAt(symbol.location.range.start);
                if ((node && ((0, svelte_ast_utils_1.isAttributeName)(node) || (0, svelte_ast_utils_1.isAttributeShorthand)(node))) ||
                    (0, svelte_ast_utils_1.isEventHandler)(node)) {
                    continue;
                }
            }
            if (symbol.name === '<function>') {
                let name = (0, documents_1$9.getTextInRange)(symbol.location.range, document.getText()).trimLeft();
                if (name.length > 50) {
                    name = name.substring(0, 50) + '...';
                }
                symbol.name = name;
            }
            if (symbol.name.startsWith('$$_')) {
                if (!symbol.name.includes('$on')) {
                    continue;
                }
                symbol.name = symbol.name.substring(symbol.name.indexOf('$on'));
            }
            result.push(symbol);
        }
        return result;
        function collectSymbols(tree, container, cb) {
            const start = tree.spans[0];
            const end = tree.spans[tree.spans.length - 1];
            if (start && end) {
                cb(vscode_languageserver_1$c.SymbolInformation.create(tree.text, (0, utils_3$1.symbolKindFromString)(tree.kind), vscode_languageserver_1$c.Range.create(tsDoc.positionAt(start.start), tsDoc.positionAt(end.start + end.length)), tsDoc.getURL(), container));
            }
            if (tree.childItems) {
                for (const child of tree.childItems) {
                    collectSymbols(child, tree.text, cb);
                }
            }
        }
    }
    async getCompletions(document, position, completionContext, cancellationToken) {
        if (!this.featureEnabled('completions')) {
            return null;
        }
        const tsDirectiveCommentCompletions = (0, getDirectiveCommentCompletions_1.getDirectiveCommentCompletions)(position, document, completionContext);
        const completions = await this.completionProvider.getCompletions(document, position, completionContext, cancellationToken);
        if (completions && tsDirectiveCommentCompletions) {
            return vscode_languageserver_1$c.CompletionList.create(completions.items.concat(tsDirectiveCommentCompletions.items), completions.isIncomplete);
        }
        return completions ?? tsDirectiveCommentCompletions;
    }
    async resolveCompletion(document, completionItem, cancellationToken) {
        return this.completionProvider.resolveCompletion(document, completionItem, cancellationToken);
    }
    async getDefinitions(document, position) {
        const { lang, tsDoc, lsContainer } = await this.lsAndTsDocResolver.getLSAndTSDoc(document);
        const defs = lang.getDefinitionAndBoundSpan(tsDoc.filePath, tsDoc.offsetAt(tsDoc.getGeneratedPosition(position)));
        if (!defs || !defs.definitions) {
            return [];
        }
        const snapshots = new utils_2$3.SnapshotMap(this.lsAndTsDocResolver, lsContainer);
        snapshots.set(tsDoc.filePath, tsDoc);
        const result = await Promise.all(defs.definitions.map(async (def) => {
            if ((0, utils_3$1.isSvelte2tsxShimFile)(def.fileName)) {
                return;
            }
            let snapshot = await snapshots.retrieve(def.fileName);
            if ((0, utils_2$3.isTextSpanInGeneratedCode)(snapshot.getFullText(), def.textSpan)) {
                if (!(0, utils_2$3.is$storeVariableIn$storeDeclaration)(snapshot.getFullText(), def.textSpan.start)) {
                    return;
                }
                def = lang.getDefinitionAndBoundSpan(tsDoc.filePath, tsDoc.getFullText().indexOf(');', def.textSpan.start) - 1).definitions[0];
                snapshot = await snapshots.retrieve(def.fileName);
            }
            const defLocation = (0, utils_3$1.convertToLocationForReferenceOrDefinition)(snapshot, def.textSpan);
            return vscode_languageserver_1$c.LocationLink.create(defLocation.uri, defLocation.range, defLocation.range, (0, utils_3$1.convertToLocationRange)(tsDoc, defs.textSpan));
        }));
        return result.filter(utils_1$f.isNotNullOrUndefined);
    }
    async prepareRename(document, position) {
        return this.renameProvider.prepareRename(document, position);
    }
    async rename(document, position, newName) {
        return this.renameProvider.rename(document, position, newName);
    }
    async getCodeActions(document, range, context, cancellationToken) {
        if (!this.featureEnabled('codeActions')) {
            return [];
        }
        return this.codeActionsProvider.getCodeActions(document, range, context, cancellationToken);
    }
    async resolveCodeAction(document, codeAction, cancellationToken) {
        return this.codeActionsProvider.resolveCodeAction(document, codeAction, cancellationToken);
    }
    async executeCommand(document, command, args) {
        if (!this.featureEnabled('codeActions')) {
            return null;
        }
        return this.codeActionsProvider.executeCommand(document, command, args);
    }
    async updateImports(fileRename) {
        if (!(this.configManager.enabled('svelte.enable') &&
            this.configManager.enabled('svelte.rename.enable'))) {
            return null;
        }
        return this.updateImportsProvider.updateImports(fileRename);
    }
    async findReferences(document, position, context) {
        return this.findReferencesProvider.findReferences(document, position, context);
    }
    async fileReferences(uri) {
        return this.findFileReferencesProvider.fileReferences(uri);
    }
    async findComponentReferences(uri) {
        return this.findComponentReferencesProvider.findComponentReferences(uri);
    }
    async onWatchFileChanges(onWatchFileChangesParas) {
        const newFiles = [];
        for (const { fileName, changeType } of onWatchFileChangesParas) {
            const pathParts = fileName.split(/\/|\\/);
            const dirPathParts = pathParts.slice(0, pathParts.length - 1);
            const declarationExtensions = [typescript_1$2.default.Extension.Dcts, typescript_1$2.default.Extension.Dts, typescript_1$2.default.Extension.Dmts];
            const canSafelyIgnore = declarationExtensions.every((ext) => !fileName.endsWith(ext)) &&
                SnapshotManager_1$1.ignoredBuildDirectories.some((dir) => {
                    const index = dirPathParts.indexOf(dir);
                    return (
                    index > 0 && (dir !== '.svelte-kit' || dirPathParts[index + 1] !== 'types'));
                });
            if (canSafelyIgnore) {
                continue;
            }
            const isSvelteFile = (0, utils_3$1.isSvelteFilePath)(fileName);
            const isClientSvelteFile = isSvelteFile && this.documentManager.get((0, utils_1$f.pathToUrl)(fileName))?.openedByClient;
            if (changeType === vscode_languageserver_1$c.FileChangeType.Deleted) {
                if (!isClientSvelteFile) {
                    await this.lsAndTsDocResolver.deleteSnapshot(fileName);
                }
                continue;
            }
            if (changeType === vscode_languageserver_1$c.FileChangeType.Created) {
                newFiles.push(fileName);
                continue;
            }
            if (isSvelteFile) {
                if (!isClientSvelteFile) {
                    await this.lsAndTsDocResolver.updateExistingSvelteFile(fileName);
                }
                continue;
            }
            await this.lsAndTsDocResolver.updateExistingTsOrJsFile(fileName);
        }
        if (newFiles.length) {
            await this.lsAndTsDocResolver.updateProjectFiles(newFiles);
            await this.lsAndTsDocResolver.invalidateModuleCache(newFiles);
        }
    }
    async updateTsOrJsFile(fileName, changes) {
        await this.lsAndTsDocResolver.updateExistingTsOrJsFile(fileName, changes);
    }
    async getSelectionRange(document, position) {
        if (!this.featureEnabled('selectionRange')) {
            return null;
        }
        return this.selectionRangeProvider.getSelectionRange(document, position);
    }
    async getSignatureHelp(document, position, context, cancellationToken) {
        if (!this.featureEnabled('signatureHelp')) {
            return null;
        }
        return this.signatureHelpProvider.getSignatureHelp(document, position, context, cancellationToken);
    }
    async getSemanticTokens(textDocument, range, cancellationToken) {
        if (!this.featureEnabled('semanticTokens')) {
            return {
                data: []
            };
        }
        return this.semanticTokensProvider.getSemanticTokens(textDocument, range, cancellationToken);
    }
    async getImplementation(document, position, cancellationToken) {
        return this.implementationProvider.getImplementation(document, position, cancellationToken);
    }
    async getTypeDefinition(document, position) {
        return this.typeDefinitionProvider.getTypeDefinition(document, position);
    }
    async getInlayHints(document, range, cancellationToken) {
        if (!this.configManager.enabled('typescript.enable')) {
            return null;
        }
        return this.inlayHintProvider.getInlayHints(document, range, cancellationToken);
    }
    prepareCallHierarchy(document, position, cancellationToken) {
        return this.callHierarchyProvider.prepareCallHierarchy(document, position, cancellationToken);
    }
    getIncomingCalls(item, cancellationToken) {
        return this.callHierarchyProvider.getIncomingCalls(item, cancellationToken);
    }
    async getOutgoingCalls(item, cancellationToken) {
        return this.callHierarchyProvider.getOutgoingCalls(item, cancellationToken);
    }
    async getFoldingRanges(document) {
        return this.foldingRangeProvider.getFoldingRanges(document);
    }
    getCodeLens(document) {
        return this.codLensProvider.getCodeLens(document);
    }
    resolveCodeLens(document, codeLensToResolve, cancellationToken) {
        return this.codLensProvider.resolveCodeLens(document, codeLensToResolve, cancellationToken);
    }
    async findDocumentHighlight(document, position) {
        return this.documentHeightProvider.findDocumentHighlight(document, position);
    }
    async getWorkspaceSymbols(query, cancellationToken) {
        if (!this.featureEnabled('workspaceSymbols')) {
            return null;
        }
        return this.workspaceSymbolsProvider.getWorkspaceSymbols(query, cancellationToken);
    }
    featureEnabled(feature) {
        return (this.configManager.enabled('typescript.enable') &&
            this.configManager.enabled(`typescript.${feature}.enable`));
    }
}
TypeScriptPlugin$1.TypeScriptPlugin = TypeScriptPlugin;

var LSAndTSDocResolver$1 = {};

var __importDefault$3 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(LSAndTSDocResolver$1, "__esModule", { value: true });
LSAndTSDocResolver$1.LSAndTSDocResolver = void 0;
const path_1$4 = path$1;
const typescript_1$1 = __importDefault$3(ts);
const utils_1$e = utils$6;
const service_1$2 = service;
const serviceCache_1 = serviceCache;
const SnapshotManager_1 = SnapshotManager$1;
const utils_2$2 = utils$2;
const fileCollection_1 = fileCollection;
class LSAndTSDocResolver {
    constructor(docManager, workspaceUris, configManager, options) {
        this.docManager = docManager;
        this.workspaceUris = workspaceUris;
        this.configManager = configManager;
        this.options = options;
        this.createDocument = (fileName, content) => {
            const uri = (0, utils_1$e.pathToUrl)(fileName);
            const document = this.docManager.openDocument({
                text: content,
                uri
            },
             false);
            this.docManager.lockDocument(uri);
            return document;
        };
        this.extendedConfigCache = new Map();
        docManager.on('documentChange', (0, utils_1$e.debounceSameArg)(this.updateSnapshot.bind(this), (newDoc, prevDoc) => newDoc.uri === prevDoc?.uri, 1000));
        docManager.on('documentOpen', (document) => {
            if (document.openedByClient) {
                this.getOrCreateSnapshot(document);
            }
            else {
                this.updateSnapshot(document);
            }
            docManager.lockDocument(document.uri);
        });
        this.getCanonicalFileName = (0, utils_1$e.createGetCanonicalFileName)((options?.tsSystem ?? typescript_1$1.default.sys).useCaseSensitiveFileNames);
        this.tsSystem = this.wrapWithPackageJsonMonitoring(this.options?.tsSystem ?? typescript_1$1.default.sys);
        this.globalSnapshotsManager = new SnapshotManager_1.GlobalSnapshotsManager(this.tsSystem);
        if (this.options?.onFileSnapshotCreated) {
            this.globalSnapshotsManager.onChange((fileName, newDocument) => {
                if (newDocument) {
                    try {
                        this.options?.onFileSnapshotCreated?.(fileName);
                    }
                    catch {
                    }
                }
            });
        }
        this.userPreferencesAccessor = { preferences: this.getTsUserPreferences() };
        const projectService = (0, serviceCache_1.createProjectService)(this.tsSystem, this.userPreferencesAccessor);
        configManager.onChange(() => {
            const newPreferences = this.getTsUserPreferences();
            const autoImportConfigChanged = newPreferences.includePackageJsonAutoImports !==
                this.userPreferencesAccessor.preferences.includePackageJsonAutoImports;
            this.userPreferencesAccessor.preferences = newPreferences;
            if (autoImportConfigChanged) {
                (0, service_1$2.forAllServices)((service) => {
                    service.onAutoImportProviderSettingsChanged();
                });
            }
        });
        this.packageJsonWatchers = new fileCollection_1.FileMap(this.tsSystem.useCaseSensitiveFileNames);
        this.watchedDirectories = new fileCollection_1.FileSet(this.tsSystem.useCaseSensitiveFileNames);
        for (const root of this.workspaceUris) {
            const rootPath = (0, utils_1$e.urlToPath)(root);
            if (rootPath) {
                this.watchedDirectories.add(rootPath);
            }
        }
        this.lsDocumentContext = {
            isSvelteCheck: !!this.options?.isSvelteCheck,
            ambientTypesSource: this.options?.isSvelteCheck ? 'svelte-check' : 'svelte2tsx',
            createDocument: this.createDocument,
            transformOnTemplateError: !this.options?.isSvelteCheck,
            globalSnapshotsManager: this.globalSnapshotsManager,
            notifyExceedSizeLimit: this.options?.notifyExceedSizeLimit,
            extendedConfigCache: this.extendedConfigCache,
            onProjectReloaded: this.options?.onProjectReloaded,
            watchTsConfig: !!this.options?.watch,
            tsSystem: this.tsSystem,
            projectService,
            watchDirectory: this.options?.watchDirectory
                ? this.watchDirectory.bind(this)
                : undefined,
            nonRecursiveWatchPattern: this.options?.nonRecursiveWatchPattern,
            reportConfigError: this.options?.reportConfigError
        };
    }
    async getLSAndTSDoc(document) {
        const { tsDoc, lsContainer, userPreferences } = await this.getLSAndTSDocWorker(document);
        return {
            tsDoc,
            lang: lsContainer.getService(),
            userPreferences,
            lsContainer
        };
    }
    async getLsForSyntheticOperations(document) {
        const { tsDoc, lsContainer, userPreferences } = await this.getLSAndTSDocWorker(document);
        return { tsDoc, userPreferences, lang: lsContainer.getService( true) };
    }
    async getLSAndTSDocWorker(document) {
        const lsContainer = await this.getTSService(document.getFilePath() || '');
        const tsDoc = await this.getOrCreateSnapshot(document);
        const userPreferences = this.getUserPreferences(tsDoc);
        return { tsDoc, lsContainer, userPreferences };
    }
    async getOrCreateSnapshot(pathOrDoc) {
        const filePath = typeof pathOrDoc === 'string' ? pathOrDoc : pathOrDoc.getFilePath() || '';
        const tsService = await this.getTSService(filePath);
        return tsService.updateSnapshot(pathOrDoc);
    }
    async updateSnapshot(document) {
        const filePath = document.getFilePath();
        if (!filePath) {
            return;
        }
        await this.updateExistingFile(filePath, (service) => service.updateSnapshot(document));
    }
    async updateSnapshotPath(oldPath, newPath) {
        const document = this.docManager.get((0, utils_1$e.pathToUrl)(oldPath));
        const isOpenedInClient = document?.openedByClient;
        for (const snapshot of this.globalSnapshotsManager.getByPrefix(oldPath)) {
            await this.deleteSnapshot(snapshot.filePath);
        }
        if (isOpenedInClient) {
            this.docManager.openClientDocument({
                uri: (0, utils_1$e.pathToUrl)(newPath),
                text: document.getText()
            });
        }
        else {
            await this.getOrCreateSnapshot(newPath);
        }
    }
    async deleteSnapshot(filePath) {
        await (0, service_1$2.forAllServices)((service) => service.deleteSnapshot(filePath));
        const uri = (0, utils_1$e.pathToUrl)(filePath);
        if (this.docManager.get(uri)) {
            this.docManager.closeDocument(uri);
        }
        this.docManager.releaseDocument(uri);
    }
    async invalidateModuleCache(filePaths) {
        await (0, service_1$2.forAllServices)((service) => service.invalidateModuleCache(filePaths));
    }
    async updateProjectFiles(watcherNewFiles) {
        await (0, service_1$2.forAllServices)((service) => service.scheduleProjectFileUpdate(watcherNewFiles));
    }
    async updateExistingTsOrJsFile(path, changes) {
        await this.updateExistingFile(path, (service) => service.updateTsOrJsFile(path, changes));
    }
    async updateExistingSvelteFile(path) {
        const newDocument = this.createDocument(path, this.tsSystem.readFile(path) ?? '');
        await this.updateExistingFile(path, (service) => {
            service.updateSnapshot(newDocument);
        });
    }
    async updateExistingFile(path, cb) {
        path = (0, utils_1$e.normalizePath)(path);
        let didUpdate = false;
        await (0, service_1$2.forAllServices)((service) => {
            if (service.hasFile(path) && !didUpdate) {
                didUpdate = true;
                cb(service);
            }
        });
    }
    async getTSService(filePath) {
        if (this.options?.tsconfigPath) {
            return this.getTSServiceByConfigPath(this.options.tsconfigPath, (0, path_1$4.dirname)(this.options.tsconfigPath));
        }
        if (!filePath) {
            throw new Error('Cannot call getTSService without filePath and without tsconfigPath');
        }
        return (0, service_1$2.getService)(filePath, this.workspaceUris, this.lsDocumentContext);
    }
    async getTSServiceByConfigPath(tsconfigPath, workspacePath) {
        return (0, service_1$2.getServiceForTsconfig)(tsconfigPath, workspacePath, this.lsDocumentContext);
    }
    getUserPreferences(tsDoc) {
        const configLang = tsDoc.scriptKind === typescript_1$1.default.ScriptKind.TS || tsDoc.scriptKind === typescript_1$1.default.ScriptKind.TSX
            ? 'typescript'
            : 'javascript';
        const nearestWorkspaceUri = this.workspaceUris.find((workspaceUri) => (0, utils_2$2.isSubPath)(workspaceUri, tsDoc.filePath, this.getCanonicalFileName));
        return this.configManager.getTsUserPreferences(configLang, nearestWorkspaceUri ? (0, utils_1$e.urlToPath)(nearestWorkspaceUri) : null);
    }
    getTsUserPreferences() {
        return this.configManager.getTsUserPreferences('typescript', null);
    }
    wrapWithPackageJsonMonitoring(sys) {
        if (!sys.watchFile || !this.options?.watch) {
            return sys;
        }
        const watchFile = sys.watchFile;
        return {
            ...sys,
            readFile: (path, encoding) => {
                if (path.endsWith('package.json') && !this.packageJsonWatchers.has(path)) {
                    this.packageJsonWatchers.set(path, watchFile(path, this.onPackageJsonWatchChange.bind(this), 3_000));
                }
                return sys.readFile(path, encoding);
            }
        };
    }
    onPackageJsonWatchChange(path, onWatchChange) {
        const dir = (0, path_1$4.dirname)(path);
        const projectService = this.lsDocumentContext.projectService;
        const packageJsonCache = projectService?.packageJsonCache;
        const normalizedPath = projectService?.toPath(path);
        if (onWatchChange === typescript_1$1.default.FileWatcherEventKind.Deleted) {
            this.packageJsonWatchers.get(path)?.close();
            this.packageJsonWatchers.delete(path);
            packageJsonCache?.delete(normalizedPath);
        }
        else {
            packageJsonCache?.addOrUpdate(normalizedPath);
        }
        (0, service_1$2.forAllServices)((service) => {
            service.onPackageJsonChange(path);
        });
        if (!path.includes('node_modules')) {
            return;
        }
        setTimeout(() => {
            this.updateSnapshotsInDirectory(dir);
            const realPath = this.tsSystem.realpath &&
                this.getCanonicalFileName((0, utils_1$e.normalizePath)(this.tsSystem.realpath?.(dir)));
            if (realPath && realPath !== dir) {
                this.updateSnapshotsInDirectory(realPath);
                const realPkgPath = (0, path_1$4.join)(realPath, 'package.json');
                (0, service_1$2.forAllServices)((service) => {
                    service.onPackageJsonChange(realPkgPath);
                });
            }
        }, 500);
    }
    updateSnapshotsInDirectory(dir) {
        this.globalSnapshotsManager.getByPrefix(dir).forEach((snapshot) => {
            this.globalSnapshotsManager.updateTsOrJsFile(snapshot.filePath);
        });
    }
    watchDirectory(patterns) {
        if (!this.options?.watchDirectory || patterns.length === 0) {
            return;
        }
        for (const pattern of patterns) {
            const uri = typeof pattern.baseUri === 'string' ? pattern.baseUri : pattern.baseUri.uri;
            for (const watched of this.watchedDirectories) {
                if ((0, utils_2$2.isSubPath)(watched, uri, this.getCanonicalFileName)) {
                    return;
                }
            }
        }
        this.options.watchDirectory(patterns);
    }
}
LSAndTSDocResolver$1.LSAndTSDocResolver = LSAndTSDocResolver;

var SveltePlugin$1 = {};

var getCodeActions$1 = {};

var getQuickfixes = {};

Object.defineProperty(getQuickfixes, "__esModule", { value: true });
getQuickfixes.getQuickfixActions = getQuickfixActions;
getQuickfixes.isIgnorableSvelteDiagnostic = isIgnorableSvelteDiagnostic;
const estree_walker_1$1 = estreeWalkerExports;
const os_1$1 = require$$2;
const vscode_languageserver_1$b = main$8;
const documents_1$8 = documents;
const utils_1$d = utils$6;
async function getQuickfixActions(svelteDoc, svelteDiagnostics) {
    const textDocument = vscode_languageserver_1$b.OptionalVersionedTextDocumentIdentifier.create((0, utils_1$d.pathToUrl)(svelteDoc.getFilePath()), null);
    const { ast } = await svelteDoc.getCompiled();
    const transpiled = await svelteDoc.getTranspiled();
    const content = transpiled.getText();
    const lineOffsets = (0, documents_1$8.getLineOffsets)(content);
    const codeActions = [];
    for (const diagnostic of svelteDiagnostics) {
        codeActions.push(...(await createQuickfixActions(textDocument, transpiled, content, lineOffsets, ast, diagnostic)));
    }
    return codeActions;
}
async function createQuickfixActions(textDocument, transpiled, content, lineOffsets, ast, diagnostic) {
    const { range: { start, end } } = diagnostic;
    const generatedStart = transpiled.getGeneratedPosition(start);
    const generatedEnd = transpiled.getGeneratedPosition(end);
    const diagnosticStartOffset = (0, documents_1$8.offsetAt)(generatedStart, content, lineOffsets);
    const diagnosticEndOffset = (0, documents_1$8.offsetAt)(generatedEnd, content, lineOffsets);
    const offsetRange = {
        pos: diagnosticStartOffset,
        end: diagnosticEndOffset
    };
    const { html, instance, module } = ast;
    const tree = [instance, module, html].find((part) => {
        return (part &&
            part.start !== null &&
            part.end !== null &&
            offsetRange.pos >= part.start &&
            offsetRange.pos <= part.end &&
            offsetRange.end <= part.end &&
            offsetRange.end >= part.start);
    });
    const node = findTagForRange(tree, offsetRange, tree === html);
    const codeActions = [];
    if (diagnostic.code == 'security-anchor-rel-noreferrer') {
        codeActions.push(createSvelteAnchorMissingAttributeQuickfixAction(textDocument, transpiled, content, lineOffsets, node));
    }
    codeActions.push(createSvelteIgnoreQuickfixAction(textDocument, transpiled, content, lineOffsets, node, diagnostic, tree === html));
    return codeActions;
}
function createSvelteAnchorMissingAttributeQuickfixAction(textDocument, transpiled, content, lineOffsets, node) {
    const targetAttribute = node.attributes.find((i) => i.name == 'target');
    const relAttribute = node.attributes.find((i) => i.name == 'rel');
    const codeActionTextEdit = relAttribute
        ? vscode_languageserver_1$b.TextEdit.insert((0, documents_1$8.positionAt)(relAttribute.end - 1, content, lineOffsets), ' noreferrer')
        : vscode_languageserver_1$b.TextEdit.insert((0, documents_1$8.positionAt)(targetAttribute.end, content, lineOffsets), ' rel="noreferrer"');
    return vscode_languageserver_1$b.CodeAction.create('(svelte) Add missing attribute rel="noreferrer"', {
        documentChanges: [
            vscode_languageserver_1$b.TextDocumentEdit.create(textDocument, [
                (0, documents_1$8.mapObjWithRangeToOriginal)(transpiled, codeActionTextEdit)
            ])
        ]
    }, vscode_languageserver_1$b.CodeActionKind.QuickFix);
}
function createSvelteIgnoreQuickfixAction(textDocument, transpiled, content, lineOffsets, node, diagnostic, isHtml) {
    return vscode_languageserver_1$b.CodeAction.create(getCodeActionTitle(diagnostic), {
        documentChanges: [
            vscode_languageserver_1$b.TextDocumentEdit.create(textDocument, [
                getSvelteIgnoreEdit(transpiled, content, lineOffsets, node, diagnostic, isHtml)
            ])
        ]
    }, vscode_languageserver_1$b.CodeActionKind.QuickFix);
}
function getCodeActionTitle(diagnostic) {
    return `(svelte) Disable ${diagnostic.code} for this line`;
}
function isIgnorableSvelteDiagnostic(diagnostic) {
    const { source, severity, code } = diagnostic;
    return (code &&
        !nonIgnorableWarnings.includes(code) &&
        source === 'svelte' &&
        severity !== vscode_languageserver_1$b.DiagnosticSeverity.Error);
}
const nonIgnorableWarnings = [
    'missing-custom-element-compile-options',
    'unused-export-let',
    'css-unused-selector'
];
function getSvelteIgnoreEdit(transpiled, content, lineOffsets, node, diagnostic, isHtml) {
    const { code } = diagnostic;
    const nodeStartPosition = (0, documents_1$8.positionAt)(node.start, content, lineOffsets);
    const nodeLineStart = (0, documents_1$8.offsetAt)({
        line: nodeStartPosition.line,
        character: 0
    }, content, lineOffsets);
    const afterStartLineStart = content.slice(nodeLineStart);
    const indent = (0, utils_1$d.getIndent)(afterStartLineStart);
    let ignore = `${indent}// svelte-ignore ${code}${os_1$1.EOL}`;
    if (isHtml) {
        ignore = `${indent}<!-- svelte-ignore ${code} -->${os_1$1.EOL}`;
    }
    const position = vscode_languageserver_1$b.Position.create(nodeStartPosition.line, 0);
    return (0, documents_1$8.mapObjWithRangeToOriginal)(transpiled, vscode_languageserver_1$b.TextEdit.insert(position, ignore));
}
const elementOrComponent = ['Component', 'Element', 'InlineComponent'];
function findTagForRange(ast, range, isHtml) {
    let nearest = ast;
    (0, estree_walker_1$1.walk)(ast, {
        enter(node, parent) {
            if (isHtml) {
                const { type } = node;
                const isBlock = 'block' in node || node.type.toLowerCase().includes('block');
                const isFragment = type === 'Fragment';
                const keepLooking = isFragment || elementOrComponent.includes(type) || isBlock;
                if (!keepLooking) {
                    this.skip();
                    return;
                }
            }
            if (within(node, range) && parent === nearest) {
                nearest = node;
            }
        }
    });
    return nearest;
}
function within(node, range) {
    return node.end >= range.end && node.start <= range.pos;
}

var getRefactorings = {};

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
	    Object.defineProperty(o, "default", { enumerable: true, value: v });
	}) : function(o, v) {
	    o["default"] = v;
	});
	var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || (function () {
	    var ownKeys = function(o) {
	        ownKeys = Object.getOwnPropertyNames || function (o) {
	            var ar = [];
	            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
	            return ar;
	        };
	        return ownKeys(o);
	    };
	    return function (mod) {
	        if (mod && mod.__esModule) return mod;
	        var result = {};
	        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
	        __setModuleDefault(result, mod);
	        return result;
	    };
	})();
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.extractComponentCommand = void 0;
	exports.executeRefactoringCommand = executeRefactoringCommand;
	const path = __importStar(path$1);
	const vscode_languageserver_1 = main$8;
	const documents_1 = documents;
	const utils_1 = utils$6;
	exports.extractComponentCommand = 'extract_to_svelte_component';
	async function executeRefactoringCommand(svelteDoc, command, args) {
	    if (command === exports.extractComponentCommand && args) {
	        return executeExtractComponentCommand(svelteDoc, args[1]);
	    }
	    return null;
	}
	async function executeExtractComponentCommand(svelteDoc, refactorArgs) {
	    const { range } = refactorArgs;
	    if (isInvalidSelectionRange()) {
	        return 'Invalid selection range';
	    }
	    let filePath = refactorArgs.filePath || './NewComponent.svelte';
	    if (!filePath.endsWith('.svelte')) {
	        filePath += '.svelte';
	    }
	    if (!filePath.startsWith('.')) {
	        filePath = './' + filePath;
	    }
	    const componentName = filePath.split('/').pop()?.split('.svelte')[0] || '';
	    const newFileUri = (0, utils_1.pathToUrl)(path.join(path.dirname(svelteDoc.getFilePath()), filePath));
	    return {
	        documentChanges: [
	            vscode_languageserver_1.TextDocumentEdit.create(vscode_languageserver_1.OptionalVersionedTextDocumentIdentifier.create(svelteDoc.uri, null), [
	                vscode_languageserver_1.TextEdit.replace(range, `<${componentName}></${componentName}>`),
	                createComponentImportTextEdit()
	            ]),
	            vscode_languageserver_1.CreateFile.create(newFileUri, { overwrite: true }),
	            createNewFileEdit()
	        ]
	    };
	    function isInvalidSelectionRange() {
	        const text = svelteDoc.getText();
	        const offsetStart = svelteDoc.offsetAt(range.start);
	        const offsetEnd = svelteDoc.offsetAt(range.end);
	        const validStart = offsetStart === 0 || /[\s\W]/.test(text[offsetStart - 1]);
	        const validEnd = offsetEnd === text.length - 1 || /[\s\W]/.test(text[offsetEnd]);
	        return (!validStart ||
	            !validEnd ||
	            (0, documents_1.isRangeInTag)(range, svelteDoc.style) ||
	            (0, documents_1.isRangeInTag)(range, svelteDoc.script) ||
	            (0, documents_1.isRangeInTag)(range, svelteDoc.moduleScript));
	    }
	    function createNewFileEdit() {
	        const text = svelteDoc.getText();
	        const newText = [
	            getTemplate(),
	            getTag(svelteDoc.script, false),
	            getTag(svelteDoc.moduleScript, false),
	            getTag(svelteDoc.style, true)
	        ]
	            .filter((tag) => tag.start >= 0)
	            .sort((a, b) => a.start - b.start)
	            .map((tag) => tag.text)
	            .join('');
	        return vscode_languageserver_1.TextDocumentEdit.create(vscode_languageserver_1.OptionalVersionedTextDocumentIdentifier.create(newFileUri, null), [vscode_languageserver_1.TextEdit.insert(vscode_languageserver_1.Position.create(0, 0), newText)]);
	        function getTemplate() {
	            const startOffset = svelteDoc.offsetAt(range.start);
	            return {
	                text: text.substring(startOffset, svelteDoc.offsetAt(range.end)) + '\n\n',
	                start: startOffset
	            };
	        }
	        function getTag(tag, isStyleTag) {
	            if (!tag) {
	                return { text: '', start: -1 };
	            }
	            const tagText = updateRelativeImports(svelteDoc, text.substring(tag.container.start, tag.container.end), filePath, isStyleTag);
	            return {
	                text: `${tagText}\n\n`,
	                start: tag.container.start
	            };
	        }
	    }
	    function createComponentImportTextEdit() {
	        const startPos = (svelteDoc.script || svelteDoc.moduleScript)?.startPos;
	        const importText = `\n  import ${componentName} from '${filePath}';\n`;
	        return vscode_languageserver_1.TextEdit.insert(startPos || vscode_languageserver_1.Position.create(0, 0), startPos ? importText : `<script>\n${importText}</script>`);
	    }
	}
	const scriptRelativeImportRegex = /import\s+{[^}]*}.*['"`](((\.\/)|(\.\.\/)).*?)['"`]|import\s+\w+\s+from\s+['"`](((\.\/)|(\.\.\/)).*?)['"`]/g;
	const styleRelativeImportRege = /@import\s+['"`](((\.\/)|(\.\.\/)).*?)['"`]/g;
	function updateRelativeImports(svelteDoc, tagText, newComponentRelativePath, isStyleTag) {
	    const oldPath = path.dirname(svelteDoc.getFilePath());
	    const newPath = path.dirname(path.join(oldPath, newComponentRelativePath));
	    const regex = isStyleTag ? styleRelativeImportRege : scriptRelativeImportRegex;
	    let match = regex.exec(tagText);
	    while (match) {
	        const importPath = match[1] || match[5];
	        const newImportPath = (0, documents_1.updateRelativeImport)(oldPath, newPath, importPath);
	        tagText = tagText.replace(importPath, newImportPath);
	        match = regex.exec(tagText);
	    }
	    return tagText;
	}
} (getRefactorings));
getDefaultExportFromCjs(getRefactorings);

Object.defineProperty(getCodeActions$1, "__esModule", { value: true });
getCodeActions$1.getCodeActions = getCodeActions;
getCodeActions$1.executeCommand = executeCommand;
const vscode_languageserver_1$a = main$8;
const getQuickfixes_1 = getQuickfixes;
const getRefactorings_1 = getRefactorings;
async function getCodeActions(svelteDoc, range, context) {
    const svelteDiagnostics = context.diagnostics.filter(getQuickfixes_1.isIgnorableSvelteDiagnostic);
    if (svelteDiagnostics.length &&
        (!context.only || context.only.includes(vscode_languageserver_1$a.CodeActionKind.QuickFix))) {
        return await (0, getQuickfixes_1.getQuickfixActions)(svelteDoc, svelteDiagnostics);
    }
    return [];
}
async function executeCommand(svelteDoc, command, args) {
    return await (0, getRefactorings_1.executeRefactoringCommand)(svelteDoc, command, args);
}

var getCompletions$1 = {};

var SvelteTags = {};

Object.defineProperty(SvelteTags, "__esModule", { value: true });
SvelteTags.documentation = void 0;
SvelteTags.getLatestOpeningTag = getLatestOpeningTag;
SvelteTags.documentation = {
    await: `\`{#await ...}\`\\
Await blocks allow you to branch on the three possible states of a Promise — pending, ` +
        `fulfilled or rejected.
#### Usage:
\`{#await expression}...{:then name}...{:catch name}...{/await}\`\\
\`{#await expression}...{:then name}...{/await}\`\\
\`{#await expression then name}...{/await}\`\\
\\
https://svelte.dev/docs/svelte/await
`,
    each: `\`{#each ...}\`\\
Iterating over lists of values can be done with an each block.
#### Usage:
\`{#each expression as name}...{/each}\`\\
\`{#each expression as name, index}...{/each}\`\\
\`{#each expression as name, index (key)}...{/each}\`\\
\`{#each expression as name}...{:else}...{/each}\`\\
\\
https://svelte.dev/docs/svelte/each
`,
    if: `\`{#if ...}\`\\
Content that is conditionally rendered can be wrapped in an if block.
#### Usage:
\`{#if expression}...{/if}\`\\
\`{#if expression}...{:else if expression}...{/if}\`\\
\`{#if expression}...{:else}...{/if}\`\\
\\
https://svelte.dev/docs/svelte/if
`,
    key: `\`{#key expression}...{/key}\`\\
Key blocks destroy and recreate their contents when the value of an expression changes.\\
This is useful if you want an element to play its transition whenever a value changes.\\
When used around components, this will cause them to be reinstantiated and reinitialised.
#### Usage:
\`{#key expression}...{/key}\`\\
\\
https://svelte.dev/docs/svelte/key
`,
    snippet: `\`{#snippet identifier(parameter)}...{/snippet}\`\\
Snippets allow you to create reusable UI blocks you can render with the {@render ...} tag.
They also function as slot props for components.
#### Usage:
\`{#snippet identifier(parameter)}...{/snippet}\`\\
\\
https://svelte.dev/docs/svelte/snippet
`,
    render: `\`{@render ...}\`\\
Renders a snippet with the given parameters.
#### Usage:
\`{@render identifier(parameter)}\`\\
\\
https://svelte.dev/docs/svelte/@render
`,
    html: `\`{@html ...}\`\\
In a text expression, characters like < and > are escaped; however, ` +
        `with HTML expressions, they're not.
The expression should be valid standalone HTML.
#### Caution
Svelte does not sanitize expressions before injecting HTML.
If the data comes from an untrusted source, you must sanitize it, ` +
        `or you are exposing your users to an XSS vulnerability.
#### Usage:
\`{@html expression}\`\\
\\
https://svelte.dev/docs/svelte/@html
`,
    debug: `\`{@debug ...}\`\\
Offers an alternative to \`console.log(...)\`.
It logs the values of specific variables whenever they change, ` +
        `and pauses code execution if you have devtools open.
It accepts a comma-separated list of variable names (not arbitrary expressions).
#### Usage:
\`{@debug}\`
\`{@debug var1, var2, ..., varN}\`\\
\\
https://svelte.dev/docs/svelte/@debug
`,
    const: `\`{@const ...}\`\\
Defines a local constant\\
#### Usage:
\`{@const a = b + c}\`\\
\\
https://svelte.dev/docs/svelte/@const
`,
    attach: `\`{@attach ...}\`\\
Defines an attachment that is attached to an element or component\\
#### Usage:
\`<div {@attach (node) => {...}}></div>\`\\
\`<Component {@attach namedAttachment} />\`\\
\\
https://svelte.dev/docs/svelte/@attach
`
};
function getLatestOpeningTag(svelteDoc, offset) {
    const content = svelteDoc
        .getText()
        .substring(0, offset)
        .replace(/<!--(.*?)-->/g, '');
    const lastIdxs = [
        idxOfLastOpeningTag(content, 'each'),
        idxOfLastOpeningTag(content, 'if'),
        idxOfLastOpeningTag(content, 'await'),
        idxOfLastOpeningTag(content, 'key'),
        idxOfLastOpeningTag(content, 'snippet')
    ];
    const lastIdx = lastIdxs.sort((i1, i2) => i2.lastIdx - i1.lastIdx);
    return lastIdx[0].lastIdx === -1 ? null : lastIdx[0].tag;
}
function idxOfLastOpeningTag(content, tag) {
    const nrOfEndingTags = content.match(new RegExp(`{\\s*/${tag}`, 'g'))?.length ?? 0;
    let lastIdx = -1;
    let nrOfOpeningTags = 0;
    let match;
    const regexp = new RegExp(`{\\s*#${tag}`, 'g');
    while ((match = regexp.exec(content)) != null) {
        nrOfOpeningTags += 1;
        lastIdx = match.index;
    }
    return { lastIdx: nrOfOpeningTags <= nrOfEndingTags ? -1 : lastIdx, tag };
}

var getModifierData$1 = {};

Object.defineProperty(getModifierData$1, "__esModule", { value: true });
getModifierData$1.getModifierData = getModifierData;
const vscode_languageserver_1$9 = main$8;
function getModifierData() {
    return [
        {
            modifier: 'preventDefault',
            documentation: 'calls `event.preventDefault()` before running the handler',
            modifiersInvalidWith: ['passive']
        },
        {
            modifier: 'stopPropagation',
            documentation: 'calls `event.stopPropagation()`, preventing the event reaching the next element'
        },
        {
            modifier: 'passive',
            documentation: 'improves scrolling performance on touch/wheel events ' +
                "(Svelte will add it automatically where it's safe to do so)",
            modifiersInvalidWith: ['nopassive', 'preventDefault']
        },
        {
            modifier: 'nonpassive',
            documentation: 'explicitly set `passive: false`',
            modifiersInvalidWith: ['passive']
        },
        {
            modifier: 'capture',
            documentation: 'fires the handler during the capture phase instead of the bubbling phase'
        },
        {
            modifier: 'once',
            documentation: 'remove the handler after the first time it runs'
        },
        {
            modifier: 'self',
            documentation: 'only trigger handler if `event.target` is the element itself'
        },
        {
            modifier: 'trusted',
            documentation: 'only trigger handler if event.isTrusted is true. ' +
                'I.e. if the event is triggered by a user action'
        }
    ].map((item) => ({
        ...item,
        documentation: {
            kind: vscode_languageserver_1$9.MarkupKind.Markdown,
            value: `\`${item.modifier}\` event modifier

${item.documentation}

https://v4.svelte.dev/docs/element-directives#on-eventname`
        }
    }));
}

var utils = {};

Object.defineProperty(utils, "__esModule", { value: true });
utils.attributeCanHaveEventModifier = attributeCanHaveEventModifier;
utils.inStyleOrScript = inStyleOrScript;
const documents_1$7 = documents;
const utils_1$c = utils$6;
function attributeCanHaveEventModifier(attributeContext) {
    return (!attributeContext.inValue &&
        !(0, utils_1$c.possiblyComponent)(attributeContext.elementTag) &&
        attributeContext.name.startsWith('on:') &&
        attributeContext.name.includes('|'));
}
function inStyleOrScript(svelteDoc, position) {
    return ((0, documents_1$7.isInTag)(position, svelteDoc.style) ||
        (0, documents_1$7.isInTag)(position, svelteDoc.script) ||
        (0, documents_1$7.isInTag)(position, svelteDoc.moduleScript));
}

Object.defineProperty(getCompletions$1, "__esModule", { value: true });
getCompletions$1.getCompletions = getCompletions;
const os_1 = require$$2;
const vscode_languageserver_1$8 = main$8;
const SvelteTags_1$1 = SvelteTags;
const parseHtml_1$1 = requireParseHtml();
const getModifierData_1$1 = getModifierData$1;
const utils_1$b = utils;
const HTML_COMMENT_START = '<!--';
const componentDocumentationCompletion = {
    label: '@component',
    insertText: `component${os_1.EOL}$1${os_1.EOL}`,
    documentation: 'Documentation for this component. ' +
        'It will show up on hover. You can use markdown and code blocks here',
    insertTextFormat: vscode_languageserver_1$8.InsertTextFormat.Snippet,
    kind: vscode_languageserver_1$8.CompletionItemKind.Snippet,
    sortText: '-1',
    filterText: 'component',
    preselect: true
};
function getCompletions(document, svelteDoc, position) {
    if ((0, utils_1$b.inStyleOrScript)(svelteDoc, position)) {
        return null;
    }
    const offset = svelteDoc.offsetAt(position);
    const lastCharactersBeforePosition = svelteDoc
        .getText()
        .substr(Math.max(offset - 10, 0), Math.min(offset, 10));
    const precededByOpeningBracket = /[\s\S]*{\s*[#:/@]\w*$/.test(lastCharactersBeforePosition);
    if (precededByOpeningBracket) {
        return getTagCompletionsWithinMoustache();
    }
    const attributeContext = (0, parseHtml_1$1.getAttributeContextAtPosition)(document, position);
    if (attributeContext) {
        return getEventModifierCompletion(attributeContext);
    }
    return getComponentDocumentationCompletions();
    function getTagCompletionsWithinMoustache() {
        const triggerCharacter = getTriggerCharacter(lastCharactersBeforePosition);
        return getCompletionsWithRegardToTriggerCharacter(triggerCharacter, svelteDoc, offset);
    }
    function getComponentDocumentationCompletions() {
        if (!lastCharactersBeforePosition.includes(HTML_COMMENT_START)) {
            return null;
        }
        const commentStartIndex = lastCharactersBeforePosition.lastIndexOf(HTML_COMMENT_START);
        const text = lastCharactersBeforePosition
            .substring(commentStartIndex + HTML_COMMENT_START.length)
            .trimLeft();
        if (componentDocumentationCompletion.label.includes(text)) {
            return vscode_languageserver_1$8.CompletionList.create([componentDocumentationCompletion], false);
        }
        return null;
    }
}
function getEventModifierCompletion(attributeContext) {
    const modifiers = (0, getModifierData_1$1.getModifierData)();
    if (!attributeContext || !(0, utils_1$b.attributeCanHaveEventModifier)(attributeContext)) {
        return null;
    }
    const items = modifiers
        .filter((modifier) => !attributeContext.name.includes('|' + modifier.modifier) &&
        !modifier.modifiersInvalidWith?.some((invalidWith) => attributeContext.name.includes(invalidWith)))
        .map((m) => ({
        label: m.modifier,
        documentation: m.documentation,
        kind: vscode_languageserver_1$8.CompletionItemKind.Event
    }));
    return vscode_languageserver_1$8.CompletionList.create(items);
}
const atCompletionItems = createCompletionItems([
    { tag: 'html', label: 'html' },
    { tag: 'debug', label: 'debug' },
    { tag: 'const', label: 'const' },
    { tag: 'render', label: 'render' },
    { tag: 'attach', label: 'attach' }
]);
const hashtagCompletionItems = createCompletionItems([
    { tag: 'if', label: 'if', insertText: 'if $1}\n\t$2\n{/if' },
    { tag: 'each', label: 'each', insertText: 'each $1 as $2}\n\t$3\n{/each' },
    {
        tag: 'await',
        label: 'await :then',
        insertText: 'await $1}\n\t$2\n{:then $3} \n\t$4\n{/await'
    },
    {
        tag: 'await',
        label: 'await then',
        insertText: 'await $1 then $2}\n\t$3\n{/await'
    },
    { tag: 'key', label: 'key', insertText: 'key $1}\n\t$2\n{/key' },
    { tag: 'snippet', label: 'snippet', insertText: 'snippet $1($2)}\n\t$3\n{/snippet' }
]);
const beginningAwaitOpenCompletionItems = createCompletionItems([
    { tag: 'await', label: 'then' },
    { tag: 'await', label: 'catch' }
]);
const beginningEachOpenCompletionItems = createCompletionItems([{ tag: 'each', label: 'else' }]);
const beginningIfOpenCompletionItems = createCompletionItems([
    { tag: 'if', label: 'else' },
    { tag: 'if', label: 'else if' }
]);
const endAwaitOpenCompletionItems = createCompletionItems([{ tag: 'await', label: 'await' }]);
const endEachOpenCompletionItems = createCompletionItems([{ tag: 'each', label: 'each' }]);
const endIfOpenCompletionItems = createCompletionItems([{ tag: 'if', label: 'if' }]);
const endKeyOpenCompletionItems = createCompletionItems([{ tag: 'key', label: 'key' }]);
function getCompletionsWithRegardToTriggerCharacter(triggerCharacter, svelteDoc, offset) {
    if (triggerCharacter === '@') {
        return atCompletionItems;
    }
    if (triggerCharacter === '#') {
        return hashtagCompletionItems;
    }
    if (triggerCharacter === ':') {
        return showCompletionWithRegardsToOpenedTags({
            awaitOpen: beginningAwaitOpenCompletionItems,
            eachOpen: beginningEachOpenCompletionItems,
            ifOpen: beginningIfOpenCompletionItems
        }, svelteDoc, offset);
    }
    if (triggerCharacter === '/') {
        return showCompletionWithRegardsToOpenedTags({
            awaitOpen: endAwaitOpenCompletionItems,
            eachOpen: endEachOpenCompletionItems,
            ifOpen: endIfOpenCompletionItems,
            keyOpen: endKeyOpenCompletionItems
        }, svelteDoc, offset);
    }
    return null;
}
function getTriggerCharacter(content) {
    const chars = [
        getLastIndexOf('#'),
        getLastIndexOf('/'),
        getLastIndexOf(':'),
        getLastIndexOf('@')
    ];
    return chars.sort((c1, c2) => c2.idx - c1.idx)[0].char;
    function getLastIndexOf(char) {
        return { char, idx: content.lastIndexOf(char) };
    }
}
function showCompletionWithRegardsToOpenedTags(on, svelteDoc, offset) {
    switch ((0, SvelteTags_1$1.getLatestOpeningTag)(svelteDoc, offset)) {
        case 'each':
            return on.eachOpen;
        case 'if':
            return on.ifOpen;
        case 'await':
            return on.awaitOpen;
        case 'key':
            return on?.keyOpen ?? null;
        case 'snippet':
            return on.snippetOpen ?? null;
        default:
            return null;
    }
}
function createCompletionItems(items) {
    return vscode_languageserver_1$8.CompletionList.create(
    items.map((item) => ({
        insertTextFormat: vscode_languageserver_1$8.InsertTextFormat.Snippet,
        insertText: item.insertText,
        label: item.label,
        sortText: '-1',
        kind: vscode_languageserver_1$8.CompletionItemKind.Keyword,
        preselect: true,
        documentation: {
            kind: vscode_languageserver_1$8.MarkupKind.Markdown,
            value: SvelteTags_1$1.documentation[item.tag]
        }
    })));
}

var getDiagnostics$2 = {};

var SvelteDocument$1 = {};

Object.defineProperty(SvelteDocument$1, "__esModule", { value: true });
SvelteDocument$1.SvelteFragmentMapper = SvelteDocument$1.FallbackTranspiledSvelteDocument = SvelteDocument$1.TranspiledSvelteDocument = SvelteDocument$1.SvelteDocument = SvelteDocument$1.TranspileErrorSource = void 0;
const trace_mapping_1 = require$$0$5;
const documents_1$6 = documents;
const utils_1$a = utils$6;
var TranspileErrorSource;
(function (TranspileErrorSource) {
    TranspileErrorSource["Script"] = "Script";
    TranspileErrorSource["Style"] = "Style";
})(TranspileErrorSource || (SvelteDocument$1.TranspileErrorSource = TranspileErrorSource = {}));
class SvelteDocument {
    get config() {
        return this.parent.configPromise;
    }
    constructor(parent) {
        this.parent = parent;
        this.languageId = 'svelte';
        this.version = 0;
        this.uri = this.parent.uri;
        this.script = this.parent.scriptInfo;
        this.moduleScript = this.parent.moduleScriptInfo;
        this.style = this.parent.styleInfo;
        this.version = this.parent.version;
    }
    getText() {
        return this.parent.getText();
    }
    getFilePath() {
        return this.parent.getFilePath() || '';
    }
    offsetAt(position) {
        return this.parent.offsetAt(position);
    }
    async getTranspiled() {
        if (!this.transpiledDoc) {
            const [major, minor] = this.parent.getSvelteVersion();
            if (major > 3 || (major === 3 && minor >= 32)) {
                this.transpiledDoc = TranspiledSvelteDocument.create(this.parent, await this.config);
            }
            else {
                this.transpiledDoc = FallbackTranspiledSvelteDocument.create(this.parent, (await this.config)?.preprocess);
            }
        }
        return this.transpiledDoc;
    }
    async getCompiled() {
        if (!this.compileResult) {
            this.compileResult = this.getCompiledWith((await this.config)?.compilerOptions);
        }
        return this.compileResult;
    }
    async getCompiledWith(options = {}) {
        return this.parent.compiler.compile((await this.getTranspiled()).getText(), {
            ...options,
            filename: this.getFilePath()
        });
    }
}
SvelteDocument$1.SvelteDocument = SvelteDocument;
class TranspiledSvelteDocument {
    static async create(document, config) {
        if (!config?.preprocess) {
            return new TranspiledSvelteDocument(document.getText());
        }
        const filename = document.getFilePath() || '';
        const preprocessed = await document.compiler.preprocess(document.getText(), wrapPreprocessors(config?.preprocess), {
            filename
        });
        if (preprocessed.code === document.getText()) {
            return new TranspiledSvelteDocument(document.getText());
        }
        return new TranspiledSvelteDocument(preprocessed.code, preprocessed.map
            ? new documents_1$6.SourceMapDocumentMapper(createTraceMap(preprocessed.map),
            (0, utils_1$a.getLastPartOfPath)(filename))
            : undefined);
    }
    constructor(code, mapper) {
        this.code = code;
        this.mapper = mapper;
    }
    getOriginalPosition(generatedPosition) {
        return this.mapper?.getOriginalPosition(generatedPosition) || generatedPosition;
    }
    getText() {
        return this.code;
    }
    getGeneratedPosition(originalPosition) {
        return this.mapper?.getGeneratedPosition(originalPosition) || originalPosition;
    }
}
SvelteDocument$1.TranspiledSvelteDocument = TranspiledSvelteDocument;
class FallbackTranspiledSvelteDocument {
    static async create(document, preprocessors = []) {
        const { transpiled, processedScripts, processedStyles } = await transpile(document, preprocessors);
        const scriptMapper = SvelteFragmentMapper.createScript(document, transpiled, processedScripts);
        const styleMapper = SvelteFragmentMapper.createStyle(document, transpiled, processedStyles);
        return new FallbackTranspiledSvelteDocument(document, transpiled, scriptMapper, styleMapper);
    }
    constructor(parent, transpiled, scriptMapper, styleMapper) {
        this.parent = parent;
        this.transpiled = transpiled;
        this.scriptMapper = scriptMapper;
        this.styleMapper = styleMapper;
        this.fragmentInfos = [this.scriptMapper?.fragmentInfo, this.styleMapper?.fragmentInfo]
            .filter(utils_1$a.isNotNullOrUndefined)
            .sort((i1, i2) => i1.end - i2.end);
    }
    getOriginalPosition(generatedPosition) {
        if (this.scriptMapper?.isInTranspiledFragment(generatedPosition)) {
            return this.scriptMapper.getOriginalPosition(generatedPosition);
        }
        if (this.styleMapper?.isInTranspiledFragment(generatedPosition)) {
            return this.styleMapper.getOriginalPosition(generatedPosition);
        }
        let offset = (0, documents_1$6.offsetAt)(generatedPosition, this.transpiled);
        for (const fragmentInfo of this.fragmentInfos) {
            if (offset > fragmentInfo.end) {
                offset += fragmentInfo.diff;
            }
        }
        return this.parent.positionAt(offset);
    }
    getURL() {
        return this.parent.getURL();
    }
    getText() {
        return this.transpiled;
    }
    getGeneratedPosition(originalPosition) {
        const { styleInfo, scriptInfo } = this.parent;
        if ((0, documents_1$6.isInTag)(originalPosition, scriptInfo) && this.scriptMapper) {
            return this.scriptMapper.getGeneratedPosition(originalPosition);
        }
        if ((0, documents_1$6.isInTag)(originalPosition, styleInfo) && this.styleMapper) {
            return this.styleMapper.getGeneratedPosition(originalPosition);
        }
        let offset = (0, documents_1$6.offsetAt)(originalPosition, this.parent.getText());
        for (const fragmentInfo of this.fragmentInfos) {
            if (offset > fragmentInfo.end) {
                offset -= fragmentInfo.diff;
            }
        }
        return (0, documents_1$6.positionAt)(offset, this.getText());
    }
}
SvelteDocument$1.FallbackTranspiledSvelteDocument = FallbackTranspiledSvelteDocument;
class SvelteFragmentMapper {
    static createStyle(originalDoc, transpiled, processed) {
        return SvelteFragmentMapper.create(originalDoc, transpiled, originalDoc.styleInfo, (0, documents_1$6.extractStyleTag)(transpiled), processed);
    }
    static createScript(originalDoc, transpiled, processed) {
        const scriptInfo = originalDoc.scriptInfo || originalDoc.moduleScriptInfo;
        const maybeScriptTag = (0, documents_1$6.extractScriptTags)(transpiled);
        const maybeScriptTagInfo = maybeScriptTag && (maybeScriptTag.script || maybeScriptTag.moduleScript);
        return SvelteFragmentMapper.create(originalDoc, transpiled, scriptInfo, maybeScriptTagInfo || null, processed);
    }
    static create(originalDoc, transpiled, originalTagInfo, transpiledTagInfo, processed) {
        const sourceMapper = processed.length > 0
            ? SvelteFragmentMapper.createSourceMapper(processed, originalDoc)
            : new documents_1$6.IdentityMapper(originalDoc.uri);
        if (originalTagInfo && transpiledTagInfo) {
            const sourceLength = originalTagInfo.container.end - originalTagInfo.container.start;
            const transpiledLength = transpiledTagInfo.container.end - transpiledTagInfo.container.start;
            const diff = sourceLength - transpiledLength;
            return new SvelteFragmentMapper({ end: transpiledTagInfo.container.end, diff }, new documents_1$6.FragmentMapper(originalDoc.getText(), originalTagInfo, originalDoc.uri), new documents_1$6.FragmentMapper(transpiled, transpiledTagInfo, originalDoc.uri), sourceMapper);
        }
        return null;
    }
    static createSourceMapper(processed, originalDoc) {
        return processed.reduce((parent, processedSingle) => processedSingle?.map
            ? new documents_1$6.SourceMapDocumentMapper(createTraceMap(processedSingle.map), originalDoc.uri, parent)
            : new documents_1$6.IdentityMapper(originalDoc.uri, parent), undefined);
    }
    constructor(
    fragmentInfo,
    originalFragmentMapper,
    transpiledFragmentMapper,
    sourceMapper) {
        this.fragmentInfo = fragmentInfo;
        this.originalFragmentMapper = originalFragmentMapper;
        this.transpiledFragmentMapper = transpiledFragmentMapper;
        this.sourceMapper = sourceMapper;
    }
    isInTranspiledFragment(generatedPosition) {
        return this.transpiledFragmentMapper.isInGenerated(generatedPosition);
    }
    getOriginalPosition(generatedPosition) {
        const positionInTranspiledFragment = this.transpiledFragmentMapper.getGeneratedPosition(generatedPosition);
        const positionInOriginalFragment = this.sourceMapper.getOriginalPosition(positionInTranspiledFragment);
        return this.originalFragmentMapper.getOriginalPosition(positionInOriginalFragment);
    }
    getGeneratedPosition(originalPosition) {
        const positionInOriginalFragment = this.originalFragmentMapper.getGeneratedPosition(originalPosition);
        const positionInTranspiledFragment = this.sourceMapper.getGeneratedPosition(positionInOriginalFragment);
        return this.transpiledFragmentMapper.getOriginalPosition(positionInTranspiledFragment);
    }
}
SvelteDocument$1.SvelteFragmentMapper = SvelteFragmentMapper;
function wrapPreprocessors(preprocessors = []) {
    preprocessors = Array.isArray(preprocessors) ? preprocessors : [preprocessors];
    return preprocessors.map((preprocessor) => {
        const wrappedPreprocessor = { markup: preprocessor.markup };
        if (preprocessor.script) {
            wrappedPreprocessor.script = async (args) => {
                try {
                    return await preprocessor.script(args);
                }
                catch (e) {
                    e.__source = TranspileErrorSource.Script;
                    throw e;
                }
            };
        }
        if (preprocessor.style) {
            wrappedPreprocessor.style = async (args) => {
                try {
                    return await preprocessor.style(args);
                }
                catch (e) {
                    e.__source = TranspileErrorSource.Style;
                    throw e;
                }
            };
        }
        return wrappedPreprocessor;
    });
}
async function transpile(document, preprocessors = []) {
    preprocessors = Array.isArray(preprocessors) ? preprocessors : [preprocessors];
    const processedScripts = [];
    const processedStyles = [];
    const wrappedPreprocessors = preprocessors.map((preprocessor) => {
        const wrappedPreprocessor = { markup: preprocessor.markup };
        if (preprocessor.script) {
            wrappedPreprocessor.script = async (args) => {
                try {
                    const res = await preprocessor.script(args);
                    if (res && res.map) {
                        processedScripts.push(res);
                    }
                    return res;
                }
                catch (e) {
                    e.__source = TranspileErrorSource.Script;
                    throw e;
                }
            };
        }
        if (preprocessor.style) {
            wrappedPreprocessor.style = async (args) => {
                try {
                    const res = await preprocessor.style(args);
                    if (res && res.map) {
                        processedStyles.push(res);
                    }
                    return res;
                }
                catch (e) {
                    e.__source = TranspileErrorSource.Style;
                    throw e;
                }
            };
        }
        return wrappedPreprocessor;
    });
    const result = await document.compiler.preprocess(document.getText(), wrappedPreprocessors, {
        filename: document.getFilePath() || ''
    });
    const transpiled = result.code || result.toString?.() || '';
    return { transpiled, processedScripts, processedStyles };
}
function createTraceMap(map) {
    return new trace_mapping_1.TraceMap(normalizeMap(map));
    function normalizeMap(map) {
        if (typeof map === 'string' || map.version) {
            return map;
        }
        return map.toString();
    }
}

Object.defineProperty(getDiagnostics$2, "__esModule", { value: true });
getDiagnostics$2.getDiagnostics = getDiagnostics$1;
const vscode_languageserver_1$7 = main$8;
const documents_1$5 = documents;
const logger_1$5 = logger;
const utils_1$9 = utils$6;
const SvelteDocument_1$1 = SvelteDocument$1;
async function getDiagnostics$1(document, svelteDoc, settings, cancellationToken) {
    const config = await svelteDoc.config;
    if (config?.loadConfigError) {
        return getConfigLoadErrorDiagnostics(config.loadConfigError);
    }
    if (cancellationToken?.isCancellationRequested) {
        return [];
    }
    try {
        return await tryGetDiagnostics(document, svelteDoc, settings, cancellationToken);
    }
    catch (error) {
        return getPreprocessErrorDiagnostics(document, error);
    }
}
async function tryGetDiagnostics(document, svelteDoc, settings, cancellationToken) {
    const transpiled = await svelteDoc.getTranspiled();
    if (cancellationToken?.isCancellationRequested) {
        return [];
    }
    try {
        const res = await svelteDoc.getCompiled();
        if (cancellationToken?.isCancellationRequested) {
            return [];
        }
        let ignoreScriptWarnings = false;
        let ignoreStyleWarnings = false;
        let ignoreTemplateWarnings = false;
        if (!document.config?.preprocess || !!document.config.isFallbackConfig) {
            ignoreTemplateWarnings = !!document.getLanguageAttribute('template');
            ignoreStyleWarnings = !!document.getLanguageAttribute('style');
            const scriptAttr = document.getLanguageAttribute('script');
            ignoreScriptWarnings = !!scriptAttr && scriptAttr !== 'ts';
        }
        return (res.warnings || [])
            .filter((warning) => settings[warning.code] !== 'ignore')
            .map((warning) => {
            const start = warning.start || { line: 1, column: 0 };
            const end = warning.end || start;
            const result = {
                range: vscode_languageserver_1$7.Range.create(start.line - 1, start.column, end.line - 1, end.column),
                message: warning.message,
                severity: settings[warning.code] === 'error'
                    ? vscode_languageserver_1$7.DiagnosticSeverity.Error
                    : vscode_languageserver_1$7.DiagnosticSeverity.Warning,
                source: 'svelte',
                code: warning.code
            };
            const codeDescription = getCodeDescription(warning.code, 'https://svelte.dev/docs/svelte/compiler-warnings#');
            if (codeDescription) {
                result.codeDescription = codeDescription;
            }
            return result;
        })
            .map((diag) => (0, documents_1$5.mapObjWithRangeToOriginal)(transpiled, diag))
            .map((diag) => adjustMappings(diag, document))
            .filter((diag) => isNoFalsePositive(diag, document, ignoreScriptWarnings, ignoreStyleWarnings, ignoreTemplateWarnings));
    }
    catch (err) {
        return createParserErrorDiagnostic(err, document)
            .map((diag) => (0, documents_1$5.mapObjWithRangeToOriginal)(transpiled, diag))
            .map((diag) => adjustMappings(diag, document));
    }
}
function createParserErrorDiagnostic(error, document) {
    const start = error.start || { line: 1, column: 0 };
    const end = error.end || start;
    const diagnostic = {
        range: vscode_languageserver_1$7.Range.create(start.line - 1, start.column, end.line - 1, end.column),
        message: error.message,
        severity: vscode_languageserver_1$7.DiagnosticSeverity.Error,
        source: 'svelte',
        code: error.code
    };
    if (diagnostic.message.includes('expected')) {
        const isInStyle = (0, documents_1$5.isInTag)(diagnostic.range.start, document.styleInfo);
        const isInScript = (0, documents_1$5.isInTag)(diagnostic.range.start, document.scriptInfo || document.moduleScriptInfo);
        if ((!document.config?.preprocess || document.config.isFallbackConfig) &&
            document.hasLanguageAttribute()) {
            logger_1$5.Logger.error(`Parsing ${document.getFilePath()} failed. No preprocess config found but lang tag exists. Skip showing error because they likely use other preprocessors.`);
            return [];
        }
        if (isInStyle || isInScript) {
            diagnostic.message +=
                '\n\nIf you expect this syntax to work, here are some suggestions: ';
            if (isInScript) {
                diagnostic.message +=
                    '\nIf you use typescript with `svelte-preprocess`, did you add `lang="ts"` to your `script` tag? ';
            }
            else {
                diagnostic.message +=
                    '\nIf you use less/SCSS with `svelte-preprocess`, did you add `lang="scss"`/`lang="less"` to your `style` tag? ' +
                        scssNodeRuntimeHint;
            }
            diagnostic.message +=
                '\nDid you setup a `svelte.config.js`? ' +
                    '\nSee https://github.com/sveltejs/language-tools/tree/master/docs#using-with-preprocessors for more info.';
        }
    }
    const codeDescription = getCodeDescription(error.code, 'https://svelte.dev/docs/svelte/compiler-errors#');
    if (codeDescription) {
        diagnostic.codeDescription = codeDescription;
    }
    return [diagnostic];
}
function getCodeDescription(code, url) {
    if (typeof code !== 'string') {
        return undefined;
    }
    const firstChar = code.charCodeAt(0);
    if (isLowerLetter(firstChar) && (code.includes('-') || code.includes('_'))) {
        return {
            href: url + code.replace(/-/g, '_')
        };
    }
}
function isLowerLetter(charCode) {
    return charCode >= 97 && charCode <= 122;
}
function getPreprocessErrorDiagnostics(document, error) {
    logger_1$5.Logger.error('Preprocessing failed');
    logger_1$5.Logger.error(error);
    if (document.styleInfo && error.__source === SvelteDocument_1$1.TranspileErrorSource.Style) {
        return getStyleErrorDiagnostics(error, document);
    }
    if ((document.scriptInfo || document.moduleScriptInfo) &&
        error.__source === SvelteDocument_1$1.TranspileErrorSource.Script) {
        return getScriptErrorDiagnostics(error, document);
    }
    return getOtherErrorDiagnostics(error);
}
function getConfigLoadErrorDiagnostics(error) {
    return [
        {
            message: 'Error in svelte.config.js\n\n' + error,
            range: vscode_languageserver_1$7.Range.create(vscode_languageserver_1$7.Position.create(0, 0), vscode_languageserver_1$7.Position.create(0, 5)),
            severity: vscode_languageserver_1$7.DiagnosticSeverity.Error,
            source: 'svelte'
        }
    ];
}
function getStyleErrorDiagnostics(error, document) {
    const isErrorFromOtherFile = typeof error?.file === 'string' &&
        (0, utils_1$9.getLastPartOfPath)(error.file) !== (0, utils_1$9.getLastPartOfPath)(document.getFilePath() || '');
    return [
        {
            message: getStyleErrorMessage(),
            range: getStyleErrorRange(),
            severity: vscode_languageserver_1$7.DiagnosticSeverity.Error,
            source: 'svelte(style)'
        }
    ];
    function getStyleErrorMessage() {
        if (isSveltePreprocessCannotFindModulesError(error)) {
            const hint = error.message.includes('node-sass') ? scssNodeRuntimeHint : '';
            return getErrorMessage(error.message, 'style', hint);
        }
        const msg = error.formatted  ||
            error.message ||
            'Style error. Transpilation failed.';
        return isErrorFromOtherFile ? 'Error in referenced file\n\n' + msg : msg;
    }
    function getStyleErrorRange() {
        const lineOffset = document.styleInfo?.startPos.line || 0;
        const position = !isErrorFromOtherFile &&
            typeof error?.column === 'number' &&
            typeof error?.line === 'number'
            ? vscode_languageserver_1$7.Position.create(lineOffset + error.line - 1, error.column)
            : document.styleInfo?.startPos || vscode_languageserver_1$7.Position.create(0, 0);
        return vscode_languageserver_1$7.Range.create(position, position);
    }
}
function getScriptErrorDiagnostics(error, document) {
    return [
        {
            message: getScriptErrorMessage(),
            range: getScriptErrorRange(),
            severity: vscode_languageserver_1$7.DiagnosticSeverity.Error,
            source: 'svelte(script)'
        }
    ];
    function getScriptErrorMessage() {
        if (isSveltePreprocessCannotFindModulesError(error)) {
            return getErrorMessage(error.message, 'script');
        }
        return error.message || 'Script error. Transpilation failed.';
    }
    function getScriptErrorRange() {
        const position = document.scriptInfo?.startPos ||
            document.moduleScriptInfo?.startPos ||
            vscode_languageserver_1$7.Position.create(0, 0);
        return vscode_languageserver_1$7.Range.create(position, position);
    }
}
function getOtherErrorDiagnostics(error) {
    return [
        {
            message: getOtherErrorMessage(),
            range: vscode_languageserver_1$7.Range.create(vscode_languageserver_1$7.Position.create(0, 0), vscode_languageserver_1$7.Position.create(0, 5)),
            severity: vscode_languageserver_1$7.DiagnosticSeverity.Warning,
            source: 'svelte'
        }
    ];
    function getOtherErrorMessage() {
        if (isSveltePreprocessCannotFindModulesError(error)) {
            return getErrorMessage(error.message, 'it');
        }
        return error.message || 'Error. Transpilation failed.';
    }
}
function isSveltePreprocessCannotFindModulesError(error) {
    return error instanceof Error && error.message.startsWith('Cannot find any of modules');
}
function getErrorMessage(error, source, hint = '') {
    return (error +
        '\n\nThe file cannot be parsed because ' +
        source +
        " requires a preprocessor that doesn't seem to be setup or failed during setup. " +
        'Did you setup a `svelte.config.js`? ' +
        hint +
        '\n\nSee https://github.com/sveltejs/language-tools/tree/master/docs#using-with-preprocessors for more info.');
}
function isNoFalsePositive(diag, doc, ignoreScriptWarnings, ignoreStyleWarnings, ignoreTemplateWarnings) {
    if ((ignoreTemplateWarnings || ignoreScriptWarnings) &&
        (typeof diag.code !== 'string' || !diag.code.startsWith('a11y'))) {
        return false;
    }
    if (ignoreStyleWarnings &&
        (diag.code === 'css-unused-selector' || diag.code === 'css_unused_selector')) {
        return false;
    }
    if (diag.code !== 'unused-export-let' && diag.code !== 'export_let_unused') {
        return true;
    }
    const unusedExportName = diag.message.substring(diag.message.indexOf("'") + 1, diag.message.lastIndexOf("'"));
    const hasExportedEnumWithThatName = new RegExp(`\\bexport\\s+?(enum|namespace)\\s+?${unusedExportName}\\b`).test(doc.getText());
    return !hasExportedEnumWithThatName;
}
function adjustMappings(diag, doc) {
    if (diag.range.start.character < 0) {
        diag.range.start.character = 0;
    }
    if (diag.range.end.character < 0) {
        diag.range.end.character = 0;
    }
    if (diag.range.start.line < 0) {
        diag.range.start = { line: 0, character: 0 };
    }
    if (diag.range.end.line < 0) {
        diag.range.end = { line: 0, character: 0 };
    }
    diag.range = (0, utils_1$9.moveRangeStartToEndIfNecessary)(diag.range);
    if ((diag.code === 'css-unused-selector' || diag.code === 'css_unused_selector') &&
        doc.styleInfo &&
        !(0, documents_1$5.isInTag)(diag.range.start, doc.styleInfo)) {
        diag.range.start = doc.styleInfo.startPos;
        diag.range.end = diag.range.start;
    }
    return diag;
}
const scssNodeRuntimeHint = 'If you use SCSS, it may be necessary to add the path to your NODE runtime to the setting `svelte.language-server.runtime`, or use `sass` instead of `node-sass`. ';

var getHoverInfo$1 = {};

Object.defineProperty(getHoverInfo$1, "__esModule", { value: true });
getHoverInfo$1.getHoverInfo = getHoverInfo;
const SvelteTags_1 = SvelteTags;
const parseHtml_1 = requireParseHtml();
const utils_1$8 = utils;
const getModifierData_1 = getModifierData$1;
function getHoverInfo(document, svelteDoc, position) {
    const offset = svelteDoc.offsetAt(position);
    const offsetStart = Math.max(offset - 10, 0);
    const charactersAroundOffset = svelteDoc
        .getText()
        .substr(offsetStart, 20);
    const isSvelteTag = tagRegexp.test(charactersAroundOffset);
    if ((0, utils_1$8.inStyleOrScript)(svelteDoc, position)) {
        return null;
    }
    if (isSvelteTag) {
        return getTagHoverInfoAtOffset(svelteDoc, offsetStart, charactersAroundOffset, offset);
    }
    const attributeContext = (0, parseHtml_1.getAttributeContextAtPosition)(document, position);
    if (!attributeContext || !(0, utils_1$8.attributeCanHaveEventModifier)(attributeContext)) {
        return null;
    }
    const attributeOffset = svelteDoc.getText().lastIndexOf(attributeContext.name, offset);
    return getEventModifierHoverInfo(attributeContext, attributeOffset, offset);
}
function getTagHoverInfoAtOffset(svelteDoc, charactersOffset, charactersAroundOffset, offset) {
    const tag = getTagAtOffset(svelteDoc, charactersOffset, charactersAroundOffset, offset);
    if (!tag) {
        return null;
    }
    return { contents: SvelteTags_1.documentation[tag] };
}
function getTagAtOffset(svelteDoc, charactersOffset, charactersAroundOffset, offset) {
    const foundTag = tagPossibilities.find((tagAndValues) => tagAndValues.values.find((value) => isAroundOffset(charactersOffset, charactersAroundOffset, value, offset)));
    if (!foundTag) {
        return null;
    }
    if (foundTag.tag !== ':else') {
        return foundTag.tag;
    }
    return (0, SvelteTags_1.getLatestOpeningTag)(svelteDoc, offset);
}
function isAroundOffset(charactersOffset, charactersAroundOffset, toFind, offset) {
    const match = charactersAroundOffset.match(toFind);
    if (!match || match.index === undefined) {
        return false;
    }
    const idx = match.index + charactersOffset;
    return idx <= offset && idx + toFind.length >= offset;
}
const tagPossibilities = [
    { tag: 'if', values: ['#if', '/if', ':else if'] },
    { tag: 'each', values: ['#each', '/each'] },
    { tag: 'await', values: ['#await', '/await', ':then', ':catch'] },
    { tag: 'key', values: ['#key', '/key'] },
    { tag: 'snippet', values: ['#snippet', '/snippet'] },
    { tag: 'html', values: ['@html'] },
    { tag: 'debug', values: ['@debug'] },
    { tag: 'const', values: ['@const'] },
    { tag: 'render', values: ['@render'] },
    { tag: 'attach', values: ['@attach'] },
    { tag: ':else', values: [':else'] }
];
const tagRegexp = new RegExp(`[\\s\\S]*{\\s*(${tagPossibilities.flatMap((p) => p.values).join('|')})(\\s|})`);
function getEventModifierHoverInfo(attributeContext, attributeOffset, offset) {
    const { name } = attributeContext;
    const modifierData = (0, getModifierData_1.getModifierData)();
    const found = modifierData.find((modifier) => isAroundOffset(attributeOffset, name, modifier.modifier, offset));
    if (!found) {
        return null;
    }
    return {
        contents: found.documentation
    };
}

var getSelectionRanges = {};

Object.defineProperty(getSelectionRanges, "__esModule", { value: true });
getSelectionRanges.getSelectionRange = getSelectionRange;
const estree_walker_1 = estreeWalkerExports;
const vscode_languageserver_1$6 = main$8;
const documents_1$4 = documents;
const utils_1$7 = utils;
async function getSelectionRange(svelteDoc, position) {
    if ((0, utils_1$7.inStyleOrScript)(svelteDoc, position)) {
        return null;
    }
    const { ast: { html } } = await svelteDoc.getCompiled();
    const transpiled = await svelteDoc.getTranspiled();
    const content = transpiled.getText();
    const offset = (0, documents_1$4.offsetAt)(transpiled.getGeneratedPosition(position), content);
    let nearest = html;
    let result;
    (0, estree_walker_1.walk)(html, {
        enter(node, parent) {
            if (!parent) {
                return;
            }
            if (!('start' in node && 'end' in node)) {
                this.skip();
                return;
            }
            const { start, end } = node;
            const isWithin = start <= offset && end >= offset;
            if (!isWithin) {
                this.skip();
                return;
            }
            if (nearest === parent) {
                nearest = node;
                result = createSelectionRange(node, result);
            }
        }
    });
    return result ? (0, documents_1$4.mapSelectionRangeToParent)(transpiled, result) : null;
    function createSelectionRange(node, parent) {
        const range = (0, documents_1$4.toRange)(content, node.start, node.end);
        return vscode_languageserver_1$6.SelectionRange.create(range, parent);
    }
}

Object.defineProperty(SveltePlugin$1, "__esModule", { value: true });
SveltePlugin$1.SveltePlugin = void 0;
const path_1$3 = path$1;
const vscode_languageserver_1$5 = main$8;
const importPackage_1$2 = importPackage;
const logger_1$4 = logger;
const utils_1$6 = utils$6;
const getCodeActions_1 = getCodeActions$1;
const getCompletions_1 = getCompletions$1;
const getDiagnostics_1 = getDiagnostics$2;
const getHoverInfo_1 = getHoverInfo$1;
const getSelectionRanges_1 = getSelectionRanges;
const SvelteDocument_1 = SvelteDocument$1;
class SveltePlugin {
    constructor(configManager) {
        this.configManager = configManager;
        this.__name = 'svelte';
        this.docManager = new Map();
    }
    async getCodeLens(document) {
        if (!this.featureEnabled('runesLegacyModeCodeLens'))
            return null;
        if (!document.isSvelte5)
            return null;
        const doc = await this.getSvelteDoc(document);
        try {
            const result = await doc.getCompiled();
            // @ts-ignore
            const runes = result.metadata.runes;
            return [
                {
                    range: {
                        start: { line: 0, character: 0 },
                        end: { line: 0, character: 0 }
                    },
                    command: {
                        title: runes ? 'Runes mode' : 'Legacy mode',
                        command: 'svelte.openLink',
                        arguments: ['https://svelte.dev/docs/svelte/legacy-overview']
                    }
                }
            ];
        }
        catch (e) {
            return [
                {
                    range: {
                        start: { line: 0, character: 0 },
                        end: { line: 0, character: 0 }
                    },
                    command: {
                        title: '',
                        command: ''
                    }
                }
            ];
        }
    }
    async getDiagnostics(document, cancellationToken) {
        if (!this.featureEnabled('diagnostics') || !this.configManager.getIsTrusted()) {
            return [];
        }
        return (0, getDiagnostics_1.getDiagnostics)(document, await this.getSvelteDoc(document), this.configManager.getConfig().svelte.compilerWarnings, cancellationToken);
    }
    async getDiagnosticsForPullMode(document, previousResultId, cancellationToken) {
        if (!this.featureEnabled('diagnostics')) {
            return {
                kind: 'full',
                items: []
            };
        }
        const resultId = document.version.toString();
        if (previousResultId === resultId) {
            return {
                kind: 'unchanged',
                resultId
            };
        }
        const diagnostics = await this.getDiagnostics(document, cancellationToken);
        return {
            kind: 'full',
            items: diagnostics,
            resultId
        };
    }
    async getCompiledResult(document) {
        try {
            const svelteDoc = await this.getSvelteDoc(document);
            const options = { generate: 'dom' };
            // @ts-ignore Svelte 5 only; we gotta write it like this else Svelte 4 fails on unknown key
            if (document.config?.compilerOptions?.experimental) {
                // @ts-ignore Svelte 5 only
                options.experimental = document.config.compilerOptions.experimental;
            }
            return await svelteDoc.getCompiledWith(options);
        }
        catch (error) {
            return null;
        }
    }
    async formatDocument(document, options) {
        if (!this.featureEnabled('format')) {
            return [];
        }
        const filePath = document.getFilePath();
        const importFittingPrettier = async () => {
            const getConfig = async (p) => {
                return this.configManager.getMergedPrettierConfig(await p.resolveConfig(filePath, { editorconfig: true }),
                options && {
                    tabWidth: options.tabSize,
                    useTabs: !options.insertSpaces
                });
            };
            const prettier1 = (0, importPackage_1$2.importPrettier)(filePath);
            const config1 = await getConfig(prettier1);
            const resolvedPlugins1 = resolvePlugins(config1.plugins);
            const pluginLoaded = await hasSveltePluginLoaded(prettier1, resolvedPlugins1);
            if (Number(prettier1.version[0]) >= 3 || pluginLoaded) {
                return {
                    prettier: prettier1,
                    config: config1,
                    isFallback: false,
                    resolvedPlugins: resolvedPlugins1
                };
            }
            const prettier2 = (0, importPackage_1$2.importPrettier)(__dirname);
            const config2 = await getConfig(prettier2);
            const resolvedPlugins2 = resolvePlugins(config2.plugins);
            return {
                prettier: prettier2,
                config: config2,
                isFallback: true,
                resolvedPlugins: resolvedPlugins2
            };
        };
        const { prettier, config, isFallback, resolvedPlugins } = await importFittingPrettier();
        if (config?.svelteSortOrder &&
            (0, importPackage_1$2.getPackageInfo)('prettier-plugin-svelte', filePath)?.version.major < 2) {
            config.svelteSortOrder = config.svelteSortOrder
                .replace('-options', '')
                .replace('options-', '');
        }
        if (config?.svelteSortOrder &&
            !config.svelteSortOrder.includes('options') &&
            config.svelteSortOrder !== 'none' &&
            (0, importPackage_1$2.getPackageInfo)('prettier-plugin-svelte', filePath)?.version.major >= 3) {
            config.svelteSortOrder = 'options-' + config.svelteSortOrder;
        }
        const fileInfo = await prettier.getFileInfo(filePath, {
            ignorePath: this.configManager.getPrettierConfig()?.ignorePath ?? '.prettierignore',
            withNodeModules: true
        });
        if (fileInfo.ignored) {
            logger_1$4.Logger.debug('File is ignored, formatting skipped');
            return [];
        }
        if (isFallback || !(await hasSveltePluginLoaded(prettier, resolvedPlugins))) {
            const svelteCompilerInfo = (0, importPackage_1$2.getPackageInfo)('svelte', filePath);
            if (svelteCompilerInfo.version.major >= 5) {
                config.svelte5CompilerPath = svelteCompilerInfo.path + '/compiler';
            }
        }
        const formattedCode = await prettier.format(document.getText(), {
            ...config,
            filepath: filePath,
            plugins: Array.from(new Set([...resolvedPlugins, ...(await getSveltePlugin(resolvedPlugins))])),
            parser: 'svelte'
        });
        return document.getText() === formattedCode
            ? []
            : [
                vscode_languageserver_1$5.TextEdit.replace(vscode_languageserver_1$5.Range.create(document.positionAt(0), document.positionAt(document.getTextLength())), formattedCode)
            ];
        async function getSveltePlugin(plugins = []) {
            return !isFallback && (await hasSveltePluginLoaded(prettier, plugins))
                ? []
                : [require.resolve('prettier-plugin-svelte')];
        }
        async function hasSveltePluginLoaded(p, plugins = []) {
            if (plugins.some(SveltePlugin.isPrettierPluginSvelte))
                return true;
            if (Number(p.version[0]) >= 3)
                return false;
            const info = await p.getSupportInfo();
            return info.languages.some((l) => l.name === 'svelte');
        }
        function resolvePlugins(plugins) {
            return (plugins ?? []).map(resolvePlugin).filter(utils_1$6.isNotNullOrUndefined);
        }
        function resolvePlugin(plugin) {
            if (typeof plugin != 'string' || (0, path_1$3.isAbsolute)(plugin) || plugin.startsWith('.')) {
                return plugin;
            }
            try {
                return require.resolve(plugin, {
                    paths: [filePath]
                });
            }
            catch (error) {
                logger_1$4.Logger.error(`failed to resolve plugin ${plugin} with error:\n`, error);
            }
        }
    }
    static isPrettierPluginSvelte(plugin) {
        if (typeof plugin === 'string') {
            return plugin.includes('prettier-plugin-svelte');
        }
        return !!plugin?.languages?.find((l) => l.name === 'svelte');
    }
    async getCompletions(document, position, _, cancellationToken) {
        if (!this.featureEnabled('completions')) {
            return null;
        }
        const svelteDoc = await this.getSvelteDoc(document);
        if (cancellationToken?.isCancellationRequested) {
            return null;
        }
        return (0, getCompletions_1.getCompletions)(document, svelteDoc, position);
    }
    async doHover(document, position) {
        if (!this.featureEnabled('hover')) {
            return null;
        }
        return (0, getHoverInfo_1.getHoverInfo)(document, await this.getSvelteDoc(document), position);
    }
    async getCodeActions(document, range, context, cancellationToken) {
        if (!this.featureEnabled('codeActions')) {
            return [];
        }
        const svelteDoc = await this.getSvelteDoc(document);
        if (cancellationToken?.isCancellationRequested) {
            return [];
        }
        try {
            return (0, getCodeActions_1.getCodeActions)(svelteDoc, range, context);
        }
        catch (error) {
            return [];
        }
    }
    async executeCommand(document, command, args) {
        if (command === 'migrate_to_svelte_5') {
            return this.migrate(document);
        }
        if (!this.featureEnabled('codeActions')) {
            return null;
        }
        const svelteDoc = await this.getSvelteDoc(document);
        try {
            return (0, getCodeActions_1.executeCommand)(svelteDoc, command, args);
        }
        catch (error) {
            return null;
        }
    }
    migrate(document) {
        try {
            const compiler = document.compiler;
            if (!compiler.migrate) {
                return 'Your installed Svelte version does not support migration';
            }
            const migrated = compiler.migrate(document.getText(), {
                filename: document.getFilePath() ?? undefined
            });
            return {
                changes: {
                    [document.uri]: [
                        vscode_languageserver_1$5.TextEdit.replace(vscode_languageserver_1$5.Range.create(document.positionAt(0), document.positionAt(document.getTextLength())), migrated.code)
                    ]
                }
            };
        }
        catch (error) {
            logger_1$4.Logger.error('Failed to migrate Svelte file', error);
            return error?.message ?? 'Failed to migrate Svelte file';
        }
    }
    async getSelectionRange(document, position) {
        if (!this.featureEnabled('selectionRange')) {
            return null;
        }
        const svelteDoc = await this.getSvelteDoc(document);
        return (0, getSelectionRanges_1.getSelectionRange)(svelteDoc, position);
    }
    featureEnabled(feature) {
        return (this.configManager.enabled('svelte.enable') &&
            this.configManager.enabled(`svelte.${feature}.enable`));
    }
    async getSvelteDoc(document) {
        let svelteDoc = this.docManager.get(document);
        if (!svelteDoc || svelteDoc.version !== document.version) {
            svelteDoc = new SvelteDocument_1.SvelteDocument(document);
            this.docManager.set(document, svelteDoc);
        }
        return svelteDoc;
    }
}
SveltePlugin$1.SveltePlugin = SveltePlugin;

var HTMLPlugin$1 = {};

var dataProvider = {};

var webCustomData = {exports: {}};

webCustomData.exports;
(function (module, exports) {
	(function (factory) {
	    {
	        var v = factory(commonjsRequire, exports);
	        if (v !== undefined) module.exports = v;
	    }
	})(function (require, exports) {
	    Object.defineProperty(exports, "__esModule", { value: true });
	    exports.htmlData = void 0;
	    exports.htmlData = {
	        "version": 1.1,
	        "tags": [
	            {
	                "name": "html",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The html element represents the root of an HTML document."
	                },
	                "attributes": [
	                    {
	                        "name": "manifest",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Specifies the URI of a resource manifest indicating resources that should be cached locally. See [Using the application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache) for details."
	                        }
	                    },
	                    {
	                        "name": "version",
	                        "description": "Specifies the version of the HTML [Document Type Definition](https://developer.mozilla.org/en-US/docs/Glossary/DTD \"Document Type Definition: In HTML, the doctype is the required \"<!DOCTYPE html>\" preamble found at the top of all documents. Its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the \"<!DOCTYPE html>\" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.\") that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "xmlns",
	                        "description": "Specifies the XML Namespace of the document. Default value is `\"http://www.w3.org/1999/xhtml\"`. This is required in documents parsed with XML parsers, and optional in text/html documents.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/html"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "head",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The head element represents a collection of metadata for the Document."
	                },
	                "attributes": [
	                    {
	                        "name": "profile",
	                        "description": "The URIs of one or more metadata profiles, separated by white space."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/head"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "title",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/title"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "base",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The base element allows authors to specify the document base URL for the purposes of resolving relative URLs, and the name of the default browsing context for the purposes of following hyperlinks. The element does not represent any content beyond this information."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "href",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs. Absolute and relative URLs are allowed."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "target",
	                        "valueSet": "target",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A name or keyword indicating the default location to display the result when hyperlinks or forms cause navigation, for elements that do not have an explicit target reference. It is a name of, or keyword for, a _browsing context_ (for example: tab, window, or inline frame). The following keywords have special meanings:\n\n*   `_self`: Load the result into the same browsing context as the current one. This value is the default if the attribute is not specified.\n*   `_blank`: Load the result into a new unnamed browsing context.\n*   `_parent`: Load the result into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n*   `_top`: Load the result into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n\nIf this attribute is specified, this element must come before any other elements with attributes whose values are URLs."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/base"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S3",
	                    "SM2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "link",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The link element allows authors to link their document to other resources."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "href",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute specifies the [URL](https://developer.mozilla.org/en-US/docs/Glossary/URL \"URL: Uniform Resource Locator (URL) is a text string specifying where a resource can be found on the Internet.\") of the linked resource. A URL can be absolute or relative."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "crossorigin",
	                        "valueSet": "xo",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This enumerated attribute indicates whether [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS \"CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.\") must be used when fetching the resource. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") element without being _tainted_. The allowed values are:\n\n`anonymous`\n\nA cross-origin request (i.e. with an [`Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin \"The Origin request header indicates where a fetch originates from. It doesn't include any path information, but only the server name. It is sent with CORS requests, as well as with POST requests. It is similar to the Referer header, but, unlike this header, it doesn't disclose the whole path.\") HTTP header) is performed, but no credential is sent (i.e. no cookie, X.509 certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (by not setting the [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin \"The Access-Control-Allow-Origin response header indicates whether the response can be shared with requesting code from the given origin.\") HTTP header) the image will be tainted and its usage restricted.\n\n`use-credentials`\n\nA cross-origin request (i.e. with an `Origin` HTTP header) is performed along with a credential sent (i.e. a cookie, certificate, and/or HTTP Basic authentication is performed). If the server does not give credentials to the origin site (through [`Access-Control-Allow-Credentials`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials \"The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request's credentials mode (Request.credentials) is \"include\".\") HTTP header), the resource will be _tainted_ and its usage restricted.\n\nIf the attribute is not present, the resource is fetched without a [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS \"CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.\") request (i.e. without sending the `Origin` HTTP header), preventing its non-tainted usage. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for additional information."
	                        },
	                        "browsers": [
	                            "C34",
	                            "CA34",
	                            "E17",
	                            "FF18",
	                            "FFA18",
	                            "S10",
	                            "SM10"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2018-04-30",
	                            "baseline_high_date": "2020-10-30"
	                        }
	                    },
	                    {
	                        "name": "rel",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute names a relationship of the linked document to the current document. The attribute must be a space-separated list of the [link types values](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "media",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute specifies the media that the linked resource applies to. Its value must be a media type / [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries). This attribute is mainly useful when linking to external stylesheets — it allows the user agent to pick the best adapted one for the device it runs on.\n\n**Notes:**\n\n*   In HTML 4, this can only be a simple white-space-separated list of media description literals, i.e., [media types and groups](https://developer.mozilla.org/en-US/docs/Web/CSS/@media), where defined and allowed as values for this attribute, such as `print`, `screen`, `aural`, `braille`. HTML5 extended this to any kind of [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries), which are a superset of the allowed values of HTML 4.\n*   Browsers not supporting [CSS3 Media Queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries) won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "hreflang",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt). Use this attribute only if the [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute is present."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "type",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as **text/html**, **text/css**, and so on. The common use of this attribute is to define the type of stylesheet being referenced (such as **text/css**), but given that CSS is the only stylesheet language used on the web, not only is it possible to omit the `type` attribute, but is actually now recommended practice. It is also used on `rel=\"preload\"` link types, to make sure the browser only downloads file types that it supports."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "sizes",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute defines the sizes of the icons for visual media contained in the resource. It must be present only if the [`rel`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-rel) contains a value of `icon` or a non-standard type such as Apple's `apple-touch-icon`. It may have the following values:\n\n*   `any`, meaning that the icon can be scaled to any size as it is in a vector format, like `image/svg+xml`.\n*   a white-space separated list of sizes, each in the format `_<width in pixels>_x_<height in pixels>_` or `_<width in pixels>_X_<height in pixels>_`. Each of these sizes must be contained in the resource.\n\n**Note:** Most icon formats are only able to store one single icon; therefore most of the time the [`sizes`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-sizes) contains only one entry. MS's ICO format does, as well as Apple's ICNS. ICO is more ubiquitous; you should definitely use it."
	                        },
	                        "browsers": [
	                            "C80",
	                            "CA80",
	                            "E80",
	                            "FF72",
	                            "FFA79",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "≤2020-07-28",
	                            "baseline_high_date": "≤2023-01-28"
	                        }
	                    },
	                    {
	                        "name": "as",
	                        "description": "This attribute is only used when `rel=\"preload\"` or `rel=\"prefetch\"` has been set on the `<link>` element. It specifies the type of content being loaded by the `<link>`, which is necessary for content prioritization, request matching, application of correct [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP), and setting of correct [`Accept`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept \"The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the Content-Type response header. Browsers set adequate values for this header depending on the context where the request is done: when fetching a CSS stylesheet a different value is set for the request than when fetching an image, video or a script.\") request header.",
	                        "browsers": [
	                            "C50",
	                            "CA50",
	                            "E17",
	                            "FF56",
	                            "FFA56",
	                            "S10",
	                            "SM10"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2018-04-30",
	                            "baseline_high_date": "2020-10-30"
	                        }
	                    },
	                    {
	                        "name": "importance",
	                        "description": "Indicates the relative importance of the resource. Priority hints are delegated using the values:"
	                    },
	                    {
	                        "name": "importance",
	                        "description": "**`auto`**: Indicates **no preference**. The browser may use its own heuristics to decide the priority of the resource.\n\n**`high`**: Indicates to the browser that the resource is of **high** priority.\n\n**`low`**: Indicates to the browser that the resource is of **low** priority.\n\n**Note:** The `importance` attribute may only be used for the `<link>` element if `rel=\"preload\"` or `rel=\"prefetch\"` is present."
	                    },
	                    {
	                        "name": "integrity",
	                        "description": "Contains inline metadata — a base64-encoded cryptographic hash of the resource (file) you’re telling the browser to fetch. The browser can use this to verify that the fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).",
	                        "browsers": [
	                            "C45",
	                            "CA45",
	                            "E17",
	                            "FF43",
	                            "FFA43",
	                            "S11.1",
	                            "SM11.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2018-04-30",
	                            "baseline_high_date": "2020-10-30"
	                        }
	                    },
	                    {
	                        "name": "referrerpolicy",
	                        "description": "A string indicating which referrer to use when fetching the resource:\n\n*   `no-referrer` means that the [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n*   `no-referrer-when-downgrade` means that no [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior, if no policy is otherwise specified.\n*   `origin` means that the referrer will be the origin of the page, which is roughly the scheme, the host, and the port.\n*   `origin-when-cross-origin` means that navigating to other origins will be limited to the scheme, the host, and the port, while navigating on the same origin will include the referrer's path.\n*   `unsafe-url` means that the referrer will include the origin and the path (but not the fragment, password, or username). This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins.",
	                        "browsers": [
	                            "C51",
	                            "CA51",
	                            "E79",
	                            "FF50",
	                            "FFA50",
	                            "S14",
	                            "SM14"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-09-16",
	                            "baseline_high_date": "2023-03-16"
	                        }
	                    },
	                    {
	                        "name": "title",
	                        "description": "The `title` attribute has special semantics on the `<link>` element. When used on a `<link rel=\"stylesheet\">` it defines a [preferred or an alternate stylesheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets). Incorrectly using it may [cause the stylesheet to be ignored](https://developer.mozilla.org/en-US/docs/Correctly_Using_Titles_With_External_Stylesheets)."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/link"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "meta",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The meta element represents various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "name",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute defines the name of a piece of document-level metadata. It should not be set if one of the attributes [`itemprop`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-itemprop), [`http-equiv`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) is also set.\n\nThis metadata name is associated with the value contained by the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute. The possible values for the name attribute are:\n\n*   `application-name` which defines the name of the application running in the web page.\n    \n    **Note:**\n    \n    *   Browsers may use this to identify the application. It is different from the [`<title>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title \"The HTML Title element (<title>) defines the document's title that is shown in a browser's title bar or a page's tab.\") element, which usually contain the application name, but may also contain information like the document name or a status.\n    *   Simple web pages shouldn't define an application-name.\n    \n*   `author` which defines the name of the document's author.\n*   `description` which contains a short and accurate summary of the content of the page. Several browsers, like Firefox and Opera, use this as the default description of bookmarked pages.\n*   `generator` which contains the identifier of the software that generated the page.\n*   `keywords` which contains words relevant to the page's content separated by commas.\n*   `referrer` which controls the [`Referer` HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) attached to requests sent from the document:\n    \n    Values for the `content` attribute of `<meta name=\"referrer\">`\n    \n    `no-referrer`\n    \n    Do not send a HTTP `Referrer` header.\n    \n    `origin`\n    \n    Send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the document.\n    \n    `no-referrer-when-downgrade`\n    \n    Send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) as a referrer to URLs as secure as the current page, (https→https), but does not send a referrer to less secure URLs (https→http). This is the default behaviour.\n    \n    `origin-when-cross-origin`\n    \n    Send the full URL (stripped of parameters) for same-origin requests, but only send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) for other cases.\n    \n    `same-origin`\n    \n    A referrer will be sent for [same-site origins](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy), but cross-origin requests will contain no referrer information.\n    \n    `strict-origin`\n    \n    Only send the origin of the document as the referrer to a-priori as-much-secure destination (HTTPS->HTTPS), but don't send it to a less secure destination (HTTPS->HTTP).\n    \n    `strict-origin-when-cross-origin`\n    \n    Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP).\n    \n    `unsafe-URL`\n    \n    Send the full URL (stripped of parameters) for same-origin or cross-origin requests.\n    \n    **Notes:**\n    \n    *   Some browsers support the deprecated values of `always`, `default`, and `never` for referrer.\n    *   Dynamically inserting `<meta name=\"referrer\">` (with [`document.write`](https://developer.mozilla.org/en-US/docs/Web/API/Document/write) or [`appendChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)) makes the referrer behaviour unpredictable.\n    *   When several conflicting policies are defined, the no-referrer policy is applied.\n    \n\nThis attribute may also have a value taken from the extended list defined on [WHATWG Wiki MetaExtensions page](https://wiki.whatwg.org/wiki/MetaExtensions). Although none have been formally accepted yet, a few commonly used names are:\n\n*   `creator` which defines the name of the creator of the document, such as an organization or institution. If there are more than one, several [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") elements should be used.\n*   `googlebot`, a synonym of `robots`, is only followed by Googlebot (the indexing crawler for Google).\n*   `publisher` which defines the name of the document's publisher.\n*   `robots` which defines the behaviour that cooperative crawlers, or \"robots\", should use with the page. It is a comma-separated list of the values below:\n    \n    Values for the content of `<meta name=\"robots\">`\n    \n    Value\n    \n    Description\n    \n    Used by\n    \n    `index`\n    \n    Allows the robot to index the page (default).\n    \n    All\n    \n    `noindex`\n    \n    Requests the robot to not index the page.\n    \n    All\n    \n    `follow`\n    \n    Allows the robot to follow the links on the page (default).\n    \n    All\n    \n    `nofollow`\n    \n    Requests the robot to not follow the links on the page.\n    \n    All\n    \n    `none`\n    \n    Equivalent to `noindex, nofollow`\n    \n    [Google](https://support.google.com/webmasters/answer/79812)\n    \n    `noodp`\n    \n    Prevents using the [Open Directory Project](https://www.dmoz.org/) description, if any, as the page description in search engine results.\n    \n    [Google](https://support.google.com/webmasters/answer/35624#nodmoz), [Yahoo](https://help.yahoo.com/kb/search-for-desktop/meta-tags-robotstxt-yahoo-search-sln2213.html#cont5), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n    \n    `noarchive`\n    \n    Requests the search engine not to cache the page content.\n    \n    [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives), [Yahoo](https://help.yahoo.com/kb/search-for-desktop/SLN2213.html), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n    \n    `nosnippet`\n    \n    Prevents displaying any description of the page in search engine results.\n    \n    [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n    \n    `noimageindex`\n    \n    Requests this page not to appear as the referring page of an indexed image.\n    \n    [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives)\n    \n    `nocache`\n    \n    Synonym of `noarchive`.\n    \n    [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n    \n    **Notes:**\n    \n    *   Only cooperative robots follow these rules. Do not expect to prevent e-mail harvesters with them.\n    *   The robot still needs to access the page in order to read these rules. To prevent bandwidth consumption, use a _[robots.txt](https://developer.mozilla.org/en-US/docs/Glossary/robots.txt \"robots.txt: Robots.txt is a file which is usually placed in the root of any website. It decides whether crawlers are permitted or forbidden access to the web site.\")_ file.\n    *   If you want to remove a page, `noindex` will work, but only after the robot visits the page again. Ensure that the `robots.txt` file is not preventing revisits.\n    *   Some values are mutually exclusive, like `index` and `noindex`, or `follow` and `nofollow`. In these cases the robot's behaviour is undefined and may vary between them.\n    *   Some crawler robots, like Google, Yahoo and Bing, support the same values for the HTTP header `X-Robots-Tag`; this allows non-HTML documents like images to use these rules.\n    \n*   `slurp`, is a synonym of `robots`, but only for Slurp - the crawler for Yahoo Search.\n*   `viewport`, which gives hints about the size of the initial size of the [viewport](https://developer.mozilla.org/en-US/docs/Glossary/viewport \"viewport: A viewport represents a polygonal (normally rectangular) area in computer graphics that is currently being viewed. In web browser terms, it refers to the part of the document you're viewing which is currently visible in its window (or the screen, if the document is being viewed in full screen mode). Content outside the viewport is not visible onscreen until scrolled into view.\"). Used by mobile devices only.\n    \n    Values for the content of `<meta name=\"viewport\">`\n    \n    Value\n    \n    Possible subvalues\n    \n    Description\n    \n    `width`\n    \n    A positive integer number, or the text `device-width`\n    \n    Defines the pixel width of the viewport that you want the web site to be rendered at.\n    \n    `height`\n    \n    A positive integer, or the text `device-height`\n    \n    Defines the height of the viewport. Not used by any browser.\n    \n    `initial-scale`\n    \n    A positive number between `0.0` and `10.0`\n    \n    Defines the ratio between the device width (`device-width` in portrait mode or `device-height` in landscape mode) and the viewport size.\n    \n    `maximum-scale`\n    \n    A positive number between `0.0` and `10.0`\n    \n    Defines the maximum amount to zoom in. It must be greater or equal to the `minimum-scale` or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default.\n    \n    `minimum-scale`\n    \n    A positive number between `0.0` and `10.0`\n    \n    Defines the minimum zoom level. It must be smaller or equal to the `maximum-scale` or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default.\n    \n    `user-scalable`\n    \n    `yes` or `no`\n    \n    If set to `no`, the user is not able to zoom in the webpage. The default is `yes`. Browser settings can ignore this rule, and iOS10+ ignores it by default.\n    \n    Specification\n    \n    Status\n    \n    Comment\n    \n    [CSS Device Adaptation  \n    The definition of '<meta name=\"viewport\">' in that specification.](https://drafts.csswg.org/css-device-adapt/#viewport-meta)\n    \n    Working Draft\n    \n    Non-normatively describes the Viewport META element\n    \n    See also: [`@viewport`](https://developer.mozilla.org/en-US/docs/Web/CSS/@viewport \"The @viewport CSS at-rule lets you configure the viewport through which the document is viewed. It's primarily used for mobile devices, but is also used by desktop browsers that support features like \"snap to edge\" (such as Microsoft Edge).\")\n    \n    **Notes:**\n    \n    *   Though unstandardized, this declaration is respected by most mobile browsers due to de-facto dominance.\n    *   The default values may vary between devices and browsers.\n    *   To learn about this declaration in Firefox for Mobile, see [this article](https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag \"Mobile/Viewport meta tag\")."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "http-equiv",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Defines a pragma directive. The attribute is named `**http-equiv**(alent)` because all the allowed values are names of particular HTTP headers:\n\n*   `\"content-language\"`  \n    Defines the default language of the page. It can be overridden by the [lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) attribute on any element.\n    \n    **Warning:** Do not use this value, as it is obsolete. Prefer the `lang` attribute on the [`<html>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html \"The HTML <html> element represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.\") element.\n    \n*   `\"content-security-policy\"`  \n    Allows page authors to define a [content policy](https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives) for the current page. Content policies mostly specify allowed server origins and script endpoints which help guard against cross-site scripting attacks.\n*   `\"content-type\"`  \n    Defines the [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type) of the document, followed by its character encoding. It follows the same syntax as the HTTP `content-type` entity-header field, but as it is inside a HTML page, most values other than `text/html` are impossible. Therefore the valid syntax for its `content` is the string '`text/html`' followed by a character set with the following syntax: '`; charset=_IANAcharset_`', where `IANAcharset` is the _preferred MIME name_ for a character set as [defined by the IANA.](https://www.iana.org/assignments/character-sets)\n    \n    **Warning:** Do not use this value, as it is obsolete. Use the [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) attribute on the [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element.\n    \n    **Note:** As [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") can't change documents' types in XHTML or HTML5's XHTML serialization, never set the MIME type to an XHTML MIME type with `<meta>`.\n    \n*   `\"refresh\"`  \n    This instruction specifies:\n    *   The number of seconds until the page should be reloaded - only if the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute contains a positive integer.\n    *   The number of seconds until the page should redirect to another - only if the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute contains a positive integer followed by the string '`;url=`', and a valid URL.\n*   `\"set-cookie\"`  \n    Defines a [cookie](https://developer.mozilla.org/en-US/docs/cookie) for the page. Its content must follow the syntax defined in the [IETF HTTP Cookie Specification](https://tools.ietf.org/html/draft-ietf-httpstate-cookie-14).\n    \n    **Warning:** Do not use this instruction, as it is obsolete. Use the HTTP header [`Set-Cookie`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) instead."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "content",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute contains the value for the [`http-equiv`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-name) attribute, depending on which is used."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "charset",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute declares the page's character encoding. It must contain a [standard IANA MIME name for character encodings](https://www.iana.org/assignments/character-sets). Although the standard doesn't request a specific encoding, it suggests:\n\n*   Authors are encouraged to use [`UTF-8`](https://developer.mozilla.org/en-US/docs/Glossary/UTF-8).\n*   Authors should not use ASCII-incompatible encodings to avoid security risk: browsers not supporting them may interpret harmful content as HTML. This happens with the `JIS_C6226-1983`, `JIS_X0212-1990`, `HZ-GB-2312`, `JOHAB`, the ISO-2022 family and the EBCDIC family.\n\n**Note:** ASCII-incompatible encodings are those that don't map the 8-bit code points `0x20` to `0x7E` to the `0x0020` to `0x007E` Unicode code points)\n\n*   Authors **must not** use `CESU-8`, `UTF-7`, `BOCU-1` and/or `SCSU` as [cross-site scripting](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting) attacks with these encodings have been demonstrated.\n*   Authors should not use `UTF-32` because not all HTML5 encoding algorithms can distinguish it from `UTF-16`.\n\n**Notes:**\n\n*   The declared character encoding must match the one the page was saved with to avoid garbled characters and security holes.\n*   The [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element declaring the encoding must be inside the [`<head>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head \"The HTML <head> element provides general information (metadata) about the document, including its title and links to its scripts and style sheets.\") element and **within the first 1024 bytes** of the HTML as some browsers only look at those bytes before choosing an encoding.\n*   This [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element is only one part of the [algorithm to determine a page's character set](https://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#encoding-sniffing-algorithm \"Algorithm charset page\"). The [`Content-Type` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) and any [Byte-Order Marks](https://developer.mozilla.org/en-US/docs/Glossary/Byte-Order_Mark \"The definition of that term (Byte-Order Marks) has not been written yet; please consider contributing it!\") override this element.\n*   It is strongly recommended to define the character encoding. If a page's encoding is undefined, cross-scripting techniques are possible, such as the [`UTF-7` fallback cross-scripting technique](https://code.google.com/p/doctype-mirror/wiki/ArticleUtf7).\n*   The [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element with a `charset` attribute is a synonym for the pre-HTML5 `<meta http-equiv=\"Content-Type\" content=\"text/html; charset=_IANAcharset_\">`, where _`IANAcharset`_ contains the value of the equivalent [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) attribute. This syntax is still allowed, although no longer recommended."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "scheme",
	                        "description": "This attribute defines the scheme in which metadata is described. A scheme is a context leading to the correct interpretations of the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) value, like a format.\n\n**Warning:** Do not use this value, as it is obsolete. There is no replacement as there was no real usage for it.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/meta"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "style",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The style element allows authors to embed style information in their documents. The style element is one of several inputs to the styling processing model. The element does not represent content for the user."
	                },
	                "attributes": [
	                    {
	                        "name": "media",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute defines which media the style should be applied to. Its value is a [media query](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries), which defaults to `all` if the attribute is missing."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "nonce",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A cryptographic nonce (number used once) used to allow inline styles in a [style-src Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src). The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource’s policy is otherwise trivial."
	                        }
	                    },
	                    {
	                        "name": "type",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute defines the styling language as a MIME type (charset should not be specified). This attribute is optional and defaults to `text/css` if it is not specified — there is very little reason to include this in modern web documents."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "scoped",
	                        "valueSet": "v"
	                    },
	                    {
	                        "name": "title",
	                        "description": "This attribute specifies [alternative style sheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets) sets."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/style"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "body",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The body element represents the content of the document."
	                },
	                "attributes": [
	                    {
	                        "name": "onafterprint",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Function to call after the user has printed the document."
	                        }
	                    },
	                    {
	                        "name": "onbeforeprint",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Function to call when the user requests printing of the document."
	                        }
	                    },
	                    {
	                        "name": "onbeforeunload",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Function to call when the document is about to be unloaded."
	                        }
	                    },
	                    {
	                        "name": "onhashchange",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Function to call when the fragment identifier part (starting with the hash (`'#'`) character) of the document's current address has changed."
	                        }
	                    },
	                    {
	                        "name": "onlanguagechange",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Function to call when the preferred languages changed."
	                        }
	                    },
	                    {
	                        "name": "onmessage",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Function to call when the document has received a message."
	                        }
	                    },
	                    {
	                        "name": "onoffline",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Function to call when network communication has failed."
	                        }
	                    },
	                    {
	                        "name": "ononline",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Function to call when network communication has been restored."
	                        }
	                    },
	                    {
	                        "name": "onpagehide"
	                    },
	                    {
	                        "name": "onpageshow"
	                    },
	                    {
	                        "name": "onpopstate",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Function to call when the user has navigated session history."
	                        }
	                    },
	                    {
	                        "name": "onstorage",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Function to call when the storage area has changed."
	                        }
	                    },
	                    {
	                        "name": "onunload",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Function to call when the document is going away."
	                        }
	                    },
	                    {
	                        "name": "alink",
	                        "description": "Color of text for hyperlinks when selected. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property in conjunction with the [`:active`](https://developer.mozilla.org/en-US/docs/Web/CSS/:active \"The :active CSS pseudo-class represents an element (such as a button) that is being activated by the user.\") pseudo-class instead._",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "background",
	                        "description": "URI of a image to use as a background. _This method is non-conforming, use CSS [`background`](https://developer.mozilla.org/en-US/docs/Web/CSS/background \"The background shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method.\") property on the element instead._",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "bgcolor",
	                        "description": "Background color for the document. _This method is non-conforming, use CSS [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color \"The background-color CSS property sets the background color of an element.\") property on the element instead._",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "bottommargin",
	                        "description": "The margin of the bottom of the body. _This method is non-conforming, use CSS [`margin-bottom`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom \"The margin-bottom CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E79",
	                            "FF35",
	                            "FFA35",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "leftmargin",
	                        "description": "The margin of the left of the body. _This method is non-conforming, use CSS [`margin-left`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left \"The margin-left CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E79",
	                            "FF35",
	                            "FFA35",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "link",
	                        "description": "Color of text for unvisited hypertext links. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property in conjunction with the [`:link`](https://developer.mozilla.org/en-US/docs/Web/CSS/:link \"The :link CSS pseudo-class represents an element that has not yet been visited. It matches every unvisited <a>, <area>, or <link> element that has an href attribute.\") pseudo-class instead._",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "onblur",
	                        "description": "Function to call when the document loses focus."
	                    },
	                    {
	                        "name": "onerror",
	                        "description": "Function to call when the document fails to load properly."
	                    },
	                    {
	                        "name": "onfocus",
	                        "description": "Function to call when the document receives focus."
	                    },
	                    {
	                        "name": "onload",
	                        "description": "Function to call when the document has finished loading."
	                    },
	                    {
	                        "name": "onredo",
	                        "description": "Function to call when the user has moved forward in undo transaction history."
	                    },
	                    {
	                        "name": "onresize",
	                        "description": "Function to call when the document has been resized."
	                    },
	                    {
	                        "name": "onundo",
	                        "description": "Function to call when the user has moved backward in undo transaction history."
	                    },
	                    {
	                        "name": "rightmargin",
	                        "description": "The margin of the right of the body. _This method is non-conforming, use CSS [`margin-right`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right \"The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E79",
	                            "FF35",
	                            "FFA35",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "text",
	                        "description": "Foreground color of text. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property on the element instead._",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "topmargin",
	                        "description": "The margin of the top of the body. _This method is non-conforming, use CSS [`margin-top`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top \"The margin-top CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E79",
	                            "FF35",
	                            "FFA35",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "vlink",
	                        "description": "Color of text for visited hypertext links. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property in conjunction with the [`:visited`](https://developer.mozilla.org/en-US/docs/Web/CSS/:visited \"The :visited CSS pseudo-class represents links that the user has already visited. For privacy reasons, the styles that can be modified using this selector are very limited.\") pseudo-class instead._",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/body"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "article",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The article element represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content. Each article should be identified, typically by including a heading (h1–h6 element) as a child of the article element."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/article"
	                    }
	                ],
	                "browsers": [
	                    "C5",
	                    "CA18",
	                    "E12",
	                    "FF4",
	                    "FFA4",
	                    "S5",
	                    "SM4.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "section",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content. Each section should be identified, typically by including a heading ( h1- h6 element) as a child of the section element."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/section"
	                    }
	                ],
	                "browsers": [
	                    "C5",
	                    "CA18",
	                    "E12",
	                    "FF4",
	                    "FFA4",
	                    "S5",
	                    "SM4.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "nav",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/nav"
	                    }
	                ],
	                "browsers": [
	                    "C5",
	                    "CA18",
	                    "E12",
	                    "FF4",
	                    "FFA4",
	                    "S5",
	                    "SM4.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "aside",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The aside element represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/aside"
	                    }
	                ],
	                "browsers": [
	                    "C5",
	                    "CA18",
	                    "E12",
	                    "FF4",
	                    "FFA4",
	                    "S5",
	                    "SM4.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "h1",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The h1 element represents a section heading."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "h2",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The h2 element represents a section heading."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "h3",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The h3 element represents a section heading."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "h4",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The h4 element represents a section heading."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "h5",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The h5 element represents a section heading."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "h6",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The h6 element represents a section heading."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/Heading_Elements"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "header",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The header element represents introductory content for its nearest ancestor sectioning content or sectioning root element. A header typically contains a group of introductory or navigational aids. When the nearest ancestor sectioning content or sectioning root element is the body element, then it applies to the whole page."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/header"
	                    }
	                ],
	                "browsers": [
	                    "C5",
	                    "CA18",
	                    "E12",
	                    "FF4",
	                    "FFA4",
	                    "S5",
	                    "SM4.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "footer",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The footer element represents a footer for its nearest ancestor sectioning content or sectioning root element. A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/footer"
	                    }
	                ],
	                "browsers": [
	                    "C5",
	                    "CA18",
	                    "E12",
	                    "FF4",
	                    "FFA4",
	                    "S5",
	                    "SM4.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "address",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The address element represents the contact information for its nearest article or body element ancestor. If that is the body element, then the contact information applies to the document as a whole."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/address"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "p",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The p element represents a paragraph."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/p"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "hr",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The hr element represents a paragraph-level thematic break, e.g. a scene change in a story, or a transition to another topic within a section of a reference book."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "align",
	                        "description": "Sets the alignment of the rule on the page. If no value is specified, the default value is `left`.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "color",
	                        "description": "Sets the color of the rule through color name or hexadecimal value.",
	                        "browsers": [
	                            "C33",
	                            "CA33",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S10.1",
	                            "SM10.3"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "noshade",
	                        "description": "Sets the rule to have no shading.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "size",
	                        "description": "Sets the height, in pixels, of the rule.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "width",
	                        "description": "Sets the length of the rule on the page through a pixel or percentage value.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/hr"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S3",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "pre",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The pre element represents a block of preformatted text, in which structure is represented by typographic conventions rather than by elements."
	                },
	                "attributes": [
	                    {
	                        "name": "cols",
	                        "description": "Contains the _preferred_ count of characters that a line should have. It was a non-standard synonym of [`width`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre#attr-width). To achieve such an effect, use CSS [`width`](https://developer.mozilla.org/en-US/docs/Web/CSS/width \"The width CSS property sets an element's width. By default it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area.\") instead."
	                    },
	                    {
	                        "name": "width",
	                        "description": "Contains the _preferred_ count of characters that a line should have. Though technically still implemented, this attribute has no visual effect; to achieve such an effect, use CSS [`width`](https://developer.mozilla.org/en-US/docs/Web/CSS/width \"The width CSS property sets an element's width. By default it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area.\") instead.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "wrap",
	                        "description": "Is a _hint_ indicating how the overflow must happen. In modern browser this hint is ignored and no visual effect results in its present; to achieve such an effect, use CSS [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space \"The white-space CSS property sets how white space inside an element is handled.\") instead."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/pre"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "blockquote",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a footer or cite element, and optionally with in-line changes such as annotations and abbreviations."
	                },
	                "attributes": [
	                    {
	                        "name": "cite",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/blockquote"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "ol",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The ol element represents a list of items, where the items have been intentionally ordered, such that changing the order would change the meaning of the document."
	                },
	                "attributes": [
	                    {
	                        "name": "reversed",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute specifies that the items of the list are specified in reversed order."
	                        },
	                        "browsers": [
	                            "C18",
	                            "CA18",
	                            "E79",
	                            "FF18",
	                            "FFA18",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "≤2020-01-15",
	                            "baseline_high_date": "≤2022-07-15"
	                        }
	                    },
	                    {
	                        "name": "start",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This integer attribute specifies the start value for numbering the individual list items. Although the ordering type of list elements might be Roman numerals, such as XXXI, or letters, the value of start is always represented as a number. To start numbering elements from the letter \"C\", use `<ol start=\"3\">`.\n\n**Note**: This attribute was deprecated in HTML4, but reintroduced in HTML5."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "type",
	                        "valueSet": "lt",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Indicates the numbering type:\n\n*   `'a'` indicates lowercase letters,\n*   `'A'` indicates uppercase letters,\n*   `'i'` indicates lowercase Roman numerals,\n*   `'I'` indicates uppercase Roman numerals,\n*   and `'1'` indicates numbers (default).\n\nThe type set is used for the entire list unless a different [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li#attr-type) attribute is used within an enclosed [`<li>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li \"The HTML <li> element is used to represent an item in a list. It must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.\") element.\n\n**Note:** This attribute was deprecated in HTML4, but reintroduced in HTML5.\n\nUnless the value of the list number matters (e.g. in legal or technical documents where items are to be referenced by their number/letter), the CSS [`list-style-type`](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type \"The list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element.\") property should be used instead."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "compact",
	                        "description": "This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn't work in all browsers.\n\n**Warning:** Do not use this attribute, as it has been deprecated: the [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol \"The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To give an effect similar to the `compact` attribute, the [CSS](https://developer.mozilla.org/en-US/docs/CSS) property [`line-height`](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height \"The line-height CSS property sets the amount of space used for lines, such as in text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height.\") can be used with a value of `80%`.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/ol"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "ul",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The ul element represents a list of items, where the order of the items is not important — that is, where changing the order would not materially change the meaning of the document."
	                },
	                "attributes": [
	                    {
	                        "name": "compact",
	                        "description": "This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn't work in all browsers.\n\n**Usage note: **Do not use this attribute, as it has been deprecated: the [`<ul>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul \"The HTML <ul> element represents an unordered list of items, typically rendered as a bulleted list.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To give a similar effect as the `compact` attribute, the [CSS](https://developer.mozilla.org/en-US/docs/CSS) property [line-height](https://developer.mozilla.org/en-US/docs/CSS/line-height) can be used with a value of `80%`.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/ul"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "li",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The li element represents a list item. If its parent element is an ol, ul, or menu element, then the element is an item of the parent element's list, as defined for those elements. Otherwise, the list item has no defined list-related relationship to any other li element."
	                },
	                "attributes": [
	                    {
	                        "name": "value",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This integer attribute indicates the current ordinal value of the list item as defined by the [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol \"The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.\") element. The only allowed value for this attribute is a number, even if the list is displayed with Roman numerals or letters. List items that follow this one continue numbering from the value set. The **value** attribute has no meaning for unordered lists ([`<ul>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul \"The HTML <ul> element represents an unordered list of items, typically rendered as a bulleted list.\")) or for menus ([`<menu>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu \"The HTML <menu> element represents a group of commands that a user can perform or activate. This includes both list menus, which might appear across the top of a screen, as well as context menus, such as those that might appear underneath a button after it has been clicked.\")).\n\n**Note**: This attribute was deprecated in HTML4, but reintroduced in HTML5.\n\n**Note:** Prior to Gecko 9.0, negative values were incorrectly converted to 0. Starting in Gecko 9.0 all integer values are correctly parsed."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "type",
	                        "description": "This character attribute indicates the numbering type:\n\n*   `a`: lowercase letters\n*   `A`: uppercase letters\n*   `i`: lowercase Roman numerals\n*   `I`: uppercase Roman numerals\n*   `1`: numbers\n\nThis type overrides the one used by its parent [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol \"The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.\") element, if any.\n\n**Usage note:** This attribute has been deprecated: use the CSS [`list-style-type`](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type \"The list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element.\") property instead.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/li"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S3",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "dl",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The dl element represents an association list consisting of zero or more name-value groups (a description list). A name-value group consists of one or more names (dt elements) followed by one or more values (dd elements), ignoring any nodes other than dt and dd elements. Within a single dl element, there should not be more than one dt element for each name."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/dl"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "dt",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The dt element represents the term, or name, part of a term-description group in a description list (dl element)."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/dt"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "dd",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The dd element represents the description, definition, or value, part of a term-description group in a description list (dl element)."
	                },
	                "attributes": [
	                    {
	                        "name": "nowrap",
	                        "description": "If the value of this attribute is set to `yes`, the definition text will not wrap. The default value is `no`."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/dd"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "figure",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The figure element represents some flow content, optionally with a caption, that is self-contained (like a complete sentence) and is typically referenced as a single unit from the main flow of the document."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/figure"
	                    }
	                ],
	                "browsers": [
	                    "C8",
	                    "CA18",
	                    "E12",
	                    "FF4",
	                    "FFA4",
	                    "S5.1",
	                    "SM5"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "figcaption",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The figcaption element represents a caption or legend for the rest of the contents of the figcaption element's parent figure element, if any."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/figcaption"
	                    }
	                ],
	                "browsers": [
	                    "C8",
	                    "CA18",
	                    "E12",
	                    "FF4",
	                    "FFA4",
	                    "S5.1",
	                    "SM5"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "main",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The main element represents the main content of the body of a document or application. The main content area consists of content that is directly related to or expands upon the central topic of a document or central functionality of an application."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/main"
	                    }
	                ],
	                "browsers": [
	                    "C26",
	                    "CA26",
	                    "E12",
	                    "FF21",
	                    "FFA21",
	                    "S7",
	                    "SM7"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "div",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The div element has no special meaning at all. It represents its children. It can be used with the class, lang, and title attributes to mark up semantics common to a group of consecutive elements."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/div"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "a",
	                "description": {
	                    "kind": "markdown",
	                    "value": "If the a element has an href attribute, then it represents a hyperlink (a hypertext anchor) labeled by its contents."
	                },
	                "attributes": [
	                    {
	                        "name": "href",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Contains a URL or a URL fragment that the hyperlink points to.\nA URL fragment is a name preceded by a hash mark (`#`), which specifies an internal target location (an [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-id) of an HTML element) within the current document. URLs are not restricted to Web (HTTP)-based documents, but can use any protocol supported by the browser. For example, [`file:`](https://en.wikipedia.org/wiki/File_URI_scheme), `ftp:`, and `mailto:` work in most browsers.\n\n**Note:** You can use `href=\"#top\"` or the empty fragment `href=\"#\"` to link to the top of the current page. [This behavior is specified by HTML5](https://www.w3.org/TR/html5/single-page.html#scroll-to-fragid)."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "target",
	                        "valueSet": "target",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Specifies where to display the linked URL. It is a name of, or keyword for, a _browsing context_: a tab, window, or `<iframe>`. The following keywords have special meanings:\n\n*   `_self`: Load the URL into the same browsing context as the current one. This is the default behavior.\n*   `_blank`: Load the URL into a new browsing context. This is usually a tab, but users can configure browsers to use new windows instead.\n*   `_parent`: Load the URL into the parent browsing context of the current one. If there is no parent, this behaves the same way as `_self`.\n*   `_top`: Load the URL into the top-level browsing context (that is, the \"highest\" browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this behaves the same way as `_self`.\n\n**Note:** When using `target`, consider adding `rel=\"noreferrer\"` to avoid exploitation of the `window.opener` API.\n\n**Note:** Linking to another page using `target=\"_blank\"` will run the new page on the same process as your page. If the new page is executing expensive JS, your page's performance may suffer. To avoid this use `rel=\"noopener\"`."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "download",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. If the attribute has a value, it is used as the pre-filled file name in the Save prompt (the user can still change the file name if they want). There are no restrictions on allowed values, though `/` and `\\` are converted to underscores. Most file systems limit some punctuation in file names, and browsers will adjust the suggested name accordingly.\n\n**Notes:**\n\n*   This attribute only works for [same-origin URLs](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy).\n*   Although HTTP(s) URLs need to be in the same-origin, [`blob:` URLs](https://developer.mozilla.org/en-US/docs/Web/API/URL.createObjectURL) and [`data:` URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) are allowed so that content generated by JavaScript, such as pictures created in an image-editor Web app, can be downloaded.\n*   If the HTTP header [`Content-Disposition:`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) gives a different filename than this attribute, the HTTP header takes priority over this attribute.\n*   If `Content-Disposition:` is set to `inline`, Firefox prioritizes `Content-Disposition`, like the filename case, while Chrome prioritizes the `download` attribute."
	                        },
	                        "browsers": [
	                            "C14",
	                            "CA18",
	                            "E18",
	                            "FF20",
	                            "FFA20",
	                            "S10.1",
	                            "SM13"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2019-09-19",
	                            "baseline_high_date": "2022-03-19"
	                        }
	                    },
	                    {
	                        "name": "ping",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Contains a space-separated list of URLs to which, when the hyperlink is followed, [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST \"The HTTP POST method sends data to the server. The type of the body of the request is indicated by the Content-Type header.\") requests with the body `PING` will be sent by the browser (in the background). Typically used for tracking."
	                        },
	                        "browsers": [
	                            "C12",
	                            "CA18",
	                            "E17",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "rel",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Specifies the relationship of the target object to the link object. The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "hreflang",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute indicates the human language of the linked resource. It is purely advisory, with no built-in functionality. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt \"Tags for Identifying Languages\")."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "type",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Specifies the media type in the form of a [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type \"MIME type: A MIME type (now properly called \"media type\", but also sometimes \"content type\") is a string sent along with a file indicating the type of the file (describing the content format, for example, a sound file might be labeled audio/ogg, or an image file image/png).\") for the linked URL. It is purely advisory, with no built-in functionality."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "referrerpolicy",
	                        "description": "Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) to send when fetching the URL:\n\n*   `'no-referrer'` means the `Referer:` header will not be sent.\n*   `'no-referrer-when-downgrade'` means no `Referer:` header will be sent when navigating to an origin without HTTPS. This is the default behavior.\n*   `'origin'` means the referrer will be the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the page, not including information after the domain.\n*   `'origin-when-cross-origin'` meaning that navigations to other origins will be limited to the scheme, the host and the port, while navigations on the same origin will include the referrer's path.\n*   `'strict-origin-when-cross-origin'`\n*   `'unsafe-url'` means the referrer will include the origin and path, but not the fragment, password, or username. This is unsafe because it can leak data from secure URLs to insecure ones.",
	                        "browsers": [
	                            "C51",
	                            "CA51",
	                            "E79",
	                            "FF50",
	                            "FFA50",
	                            "S14",
	                            "SM14"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-09-16",
	                            "baseline_high_date": "2023-03-16"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/a"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "em",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The em element represents stress emphasis of its contents."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/em"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "strong",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The strong element represents strong importance, seriousness, or urgency for its contents."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/strong"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "small",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The small element represents side comments such as small print."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/small"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "s",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The s element represents contents that are no longer accurate or no longer relevant."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/s"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "cite",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The cite element represents a reference to a creative work. It must include the title of the work or the name of the author(person, people or organization) or an URL reference, or a reference in abbreviated form as per the conventions used for the addition of citation metadata."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/cite"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "q",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The q element represents some phrasing content quoted from another source."
	                },
	                "attributes": [
	                    {
	                        "name": "cite",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The value of this attribute is a URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/q"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S3",
	                    "SM2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "dfn",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The dfn element represents the defining instance of a term. The paragraph, description list group, or section that is the nearest ancestor of the dfn element must also contain the definition(s) for the term given by the dfn element."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/dfn"
	                    }
	                ],
	                "browsers": [
	                    "C15",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S6",
	                    "SM6"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "abbr",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The abbr element represents an abbreviation or acronym, optionally with its expansion. The title attribute may be used to provide an expansion of the abbreviation. The attribute, if specified, must contain an expansion of the abbreviation, and nothing else."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/abbr"
	                    }
	                ],
	                "browsers": [
	                    "C2",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "ruby",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The ruby element allows one or more spans of phrasing content to be marked with ruby annotations. Ruby annotations are short runs of text presented alongside base text, primarily used in East Asian typography as a guide for pronunciation or to include other annotations. In Japanese, this form of typography is also known as furigana. Ruby text can appear on either side, and sometimes both sides, of the base text, and it is possible to control its position using CSS. A more complete introduction to ruby can be found in the Use Cases & Exploratory Approaches for Ruby Markup document as well as in CSS Ruby Module Level 1. [RUBY-UC] [CSSRUBY]"
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/ruby"
	                    }
	                ],
	                "browsers": [
	                    "C5",
	                    "CA18",
	                    "E12",
	                    "FF38",
	                    "FFA38",
	                    "S5",
	                    "SM4.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "rb",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The rb element marks the base text component of a ruby annotation. When it is the child of a ruby element, it doesn't represent anything itself, but its parent ruby element uses it as part of determining what it represents."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/rb"
	                    }
	                ]
	            },
	            {
	                "name": "rt",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The rt element marks the ruby text component of a ruby annotation. When it is the child of a ruby element or of an rtc element that is itself the child of a ruby element, it doesn't represent anything itself, but its ancestor ruby element uses it as part of determining what it represents."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/rt"
	                    }
	                ],
	                "browsers": [
	                    "C5",
	                    "CA18",
	                    "E12",
	                    "FF38",
	                    "FFA38",
	                    "S5",
	                    "SM4.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "rp",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The rp element is used to provide fallback text to be shown by user agents that don't support ruby annotations. One widespread convention is to provide parentheses around the ruby text component of a ruby annotation."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/rp"
	                    }
	                ],
	                "browsers": [
	                    "C5",
	                    "CA18",
	                    "E12",
	                    "FF38",
	                    "FFA38",
	                    "S5",
	                    "SM4.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "time",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The time element represents its contents, along with a machine-readable form of those contents in the datetime attribute. The kind of content is limited to various kinds of dates, times, time-zone offsets, and durations, as described below."
	                },
	                "attributes": [
	                    {
	                        "name": "datetime",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute indicates the time and/or date of the element and must be in one of the formats described below."
	                        },
	                        "browsers": [
	                            "C62",
	                            "CA62",
	                            "E14",
	                            "FF22",
	                            "FFA22",
	                            "S7",
	                            "SM4"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2017-10-24",
	                            "baseline_high_date": "2020-04-24"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/time"
	                    }
	                ],
	                "browsers": [
	                    "C62",
	                    "CA62",
	                    "E14",
	                    "FF22",
	                    "FFA22",
	                    "S7",
	                    "SM4"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2017-10-24",
	                    "baseline_high_date": "2020-04-24"
	                }
	            },
	            {
	                "name": "code",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The code element represents a fragment of computer code. This could be an XML element name, a file name, a computer program, or any other string that a computer would recognize."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/code"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "var",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The var element represents a variable. This could be an actual variable in a mathematical expression or programming context, an identifier representing a constant, a symbol identifying a physical quantity, a function parameter, or just be a term used as a placeholder in prose."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/var"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "samp",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The samp element represents sample or quoted output from another program or computing system."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/samp"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "kbd",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The kbd element represents user input (typically keyboard input, although it may also be used to represent other input, such as voice commands)."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/kbd"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "sub",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The sub element represents a subscript."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/sub"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "sup",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The sup element represents a superscript."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/sup"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "i",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/i"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "b",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The b element represents a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood, such as key words in a document abstract, product names in a review, actionable words in interactive text-driven software, or an article lede."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/b"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "u",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The u element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelt."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/u"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "mark",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. When used in a quotation or other block of text referred to from the prose, it indicates a highlight that was not originally present but which has been added to bring the reader's attention to a part of the text that might not have been considered important by the original author when the block was originally written, but which is now under previously unexpected scrutiny. When used in the main prose of a document, it indicates a part of the document that has been highlighted due to its likely relevance to the user's current activity."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/mark"
	                    }
	                ],
	                "browsers": [
	                    "C7",
	                    "CA18",
	                    "E12",
	                    "FF4",
	                    "FFA4",
	                    "S5.1",
	                    "SM5"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "bdi",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The bdi element represents a span of text that is to be isolated from its surroundings for the purposes of bidirectional text formatting. [BIDI]"
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/bdi"
	                    }
	                ],
	                "browsers": [
	                    "C16",
	                    "CA18",
	                    "E79",
	                    "FF10",
	                    "FFA10",
	                    "S6",
	                    "SM6"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2020-01-15",
	                    "baseline_high_date": "2022-07-15"
	                }
	            },
	            {
	                "name": "bdo",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The bdo element represents explicit text directionality formatting control for its children. It allows authors to override the Unicode bidirectional algorithm by explicitly specifying a direction override. [BIDI]"
	                },
	                "attributes": [
	                    {
	                        "name": "dir",
	                        "description": "The direction in which text should be rendered in this element's contents. Possible values are:\n\n*   `ltr`: Indicates that the text should go in a left-to-right direction.\n*   `rtl`: Indicates that the text should go in a right-to-left direction."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/bdo"
	                    }
	                ],
	                "browsers": [
	                    "C15",
	                    "CA18",
	                    "E12",
	                    "FF10",
	                    "FFA10",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "span",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The span element doesn't mean anything on its own, but can be useful when used together with the global attributes, e.g. class, lang, or dir. It represents its children."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/span"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "br",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The br element represents a line break."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "clear",
	                        "description": "Indicates where to begin the next line after the break.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/br"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "wbr",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The wbr element represents a line break opportunity."
	                },
	                "void": true,
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/wbr"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "ins",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The ins element represents an addition to the document."
	                },
	                "attributes": [
	                    {
	                        "name": "cite",
	                        "description": "This attribute defines the URI of a resource that explains the change, such as a link to meeting minutes or a ticket in a troubleshooting system.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "datetime",
	                        "description": "This attribute indicates the time and date of the change and must be a valid date with an optional time string. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. For the format of the string without a time, see [Format of a valid date string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_date_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\"). The format of the string if it includes both date and time is covered in [Format of a valid local date and time string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_local_date_and_time_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\").",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/ins"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "del",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The del element represents a removal from the document."
	                },
	                "attributes": [
	                    {
	                        "name": "cite",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A URI for a resource that explains the change (for example, meeting minutes)."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "datetime",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute indicates the time and date of the change and must be a valid date string with an optional time. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. For the format of the string without a time, see [Format of a valid date string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_date_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\"). The format of the string if it includes both date and time is covered in [Format of a valid local date and time string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_local_date_and_time_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\")."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/del"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "picture",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The picture element is a container which provides multiple sources to its contained img element to allow authors to declaratively control or give hints to the user agent about which image resource to use, based on the screen pixel density, viewport size, image format, and other factors. It represents its children."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/picture"
	                    }
	                ],
	                "browsers": [
	                    "C38",
	                    "CA38",
	                    "E13",
	                    "FF38",
	                    "FFA38",
	                    "S9.1",
	                    "SM9.3"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2016-03-21",
	                    "baseline_high_date": "2018-09-21"
	                }
	            },
	            {
	                "name": "img",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An img element represents an image."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "alt",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute defines an alternative text description of the image.\n\n**Note:** Browsers do not always display the image referenced by the element. This is the case for non-graphical browsers (including those used by people with visual impairments), if the user chooses not to display images, or if the browser cannot display the image because it is invalid or an [unsupported type](#Supported_image_formats). In these cases, the browser may replace the image with the text defined in this element's `alt` attribute. You should, for these reasons and others, provide a useful value for `alt` whenever possible.\n\n**Note:** Omitting this attribute altogether indicates that the image is a key part of the content, and no textual equivalent is available. Setting this attribute to an empty string (`alt=\"\"`) indicates that this image is _not_ a key part of the content (decorative), and that non-visual browsers may omit it from rendering."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "src",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The image URL. This attribute is mandatory for the `<img>` element. On browsers supporting `srcset`, `src` is treated like a candidate image with a pixel density descriptor `1x` unless an image with this pixel density descriptor is already defined in `srcset,` or unless `srcset` contains '`w`' descriptors."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "srcset",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A list of one or more strings separated by commas indicating a set of possible image sources for the user agent to use. Each string is composed of:\n\n1.  a URL to an image,\n2.  optionally, whitespace followed by one of:\n    *   A width descriptor, or a positive integer directly followed by '`w`'. The width descriptor is divided by the source size given in the `sizes` attribute to calculate the effective pixel density.\n    *   A pixel density descriptor, which is a positive floating point number directly followed by '`x`'.\n\nIf no descriptor is specified, the source is assigned the default descriptor: `1x`.\n\nIt is incorrect to mix width descriptors and pixel density descriptors in the same `srcset` attribute. Duplicate descriptors (for instance, two sources in the same `srcset` which are both described with '`2x`') are also invalid.\n\nThe user agent selects any one of the available sources at its discretion. This provides them with significant leeway to tailor their selection based on things like user preferences or bandwidth conditions. See our [Responsive images](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images) tutorial for an example."
	                        },
	                        "browsers": [
	                            "C34",
	                            "CA34",
	                            "E12",
	                            "FF38",
	                            "FFA38",
	                            "S8",
	                            "SM8"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "crossorigin",
	                        "valueSet": "xo",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This enumerated attribute indicates if the fetching of the related image must be done using CORS or not. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") element without being \"[tainted](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image#What_is_a_tainted_canvas).\" The allowed values are:\n`anonymous`\n\nA cross-origin request (i.e., with `Origin:` HTTP header) is performed, but no credential is sent (i.e., no cookie, X.509 certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (by not setting the [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin \"The Access-Control-Allow-Origin response header indicates whether the response can be shared with requesting code from the given origin.\") HTTP header), the image will be tainted and its usage restricted.\n\n`use-credentials`\n\nA cross-origin request (i.e., with the [`Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin \"The Origin request header indicates where a fetch originates from. It doesn't include any path information, but only the server name. It is sent with CORS requests, as well as with POST requests. It is similar to the Referer header, but, unlike this header, it doesn't disclose the whole path.\") HTTP header) performed along with credentials sent (i.e., a cookie, certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (through the `Access-Control-Allow-Credentials` HTTP header), the image will be tainted and its usage restricted.\n\nIf the attribute is not present, the resource is fetched without a CORS request (i.e., without sending the `Origin` HTTP header), preventing its non-tainted usage in [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") elements. If invalid, it is handled as if the `anonymous` value was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/HTML/CORS_settings_attributes) for additional information."
	                        },
	                        "browsers": [
	                            "C13",
	                            "CA18",
	                            "E12",
	                            "FF8",
	                            "FFA8",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "usemap",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The partial URL (starting with '#') of an [image map](https://developer.mozilla.org/en-US/docs/HTML/Element/map) associated with the element.\n\n**Note:** You cannot use this attribute if the `<img>` element is a descendant of an [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a \"The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.\") or [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") element."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "ismap",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute indicates that the image is part of a server-side map. If so, the precise coordinates of a click are sent to the server.\n\n**Note:** This attribute is allowed only if the `<img>` element is a descendant of an [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a \"The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.\") element with a valid [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "width",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The intrinsic width of the image in pixels."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "height",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The intrinsic height of the image in pixels."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "decoding",
	                        "valueSet": "decoding",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Provides an image decoding hint to the browser. The allowed values are:\n`sync`\n\nDecode the image synchronously for atomic presentation with other content.\n\n`async`\n\nDecode the image asynchronously to reduce delay in presenting other content.\n\n`auto`\n\nDefault mode, which indicates no preference for the decoding mode. The browser decides what is best for the user."
	                        },
	                        "browsers": [
	                            "C65",
	                            "CA65",
	                            "E79",
	                            "FF63",
	                            "FFA63",
	                            "S11.1",
	                            "SM11.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "≤2020-01-15",
	                            "baseline_high_date": "≤2022-07-15"
	                        }
	                    },
	                    {
	                        "name": "loading",
	                        "valueSet": "loading",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Indicates how the browser should load the image."
	                        },
	                        "browsers": [
	                            "C77",
	                            "CA77",
	                            "E79",
	                            "FF75",
	                            "FFA79",
	                            "S15.4",
	                            "SM15.4"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2022-03-14",
	                            "baseline_high_date": "2024-09-14"
	                        }
	                    },
	                    {
	                        "name": "fetchpriority",
	                        "valueSet": "fetchpriority",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Provides a hint of the relative priority to use when fetching the image."
	                        },
	                        "browsers": [
	                            "C101",
	                            "CA101",
	                            "E101",
	                            "FF132",
	                            "FFA132",
	                            "S17.2",
	                            "SM17.2"
	                        ],
	                        "status": {
	                            "baseline": "low",
	                            "baseline_low_date": "2024-10-29"
	                        }
	                    },
	                    {
	                        "name": "referrerpolicy",
	                        "valueSet": "referrerpolicy",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A string indicating which referrer to use when fetching the resource:\n\n*   `no-referrer:` The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n*   `no-referrer-when-downgrade:` No `Referer` header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior if no policy is otherwise specified.\n*   `origin:` The `Referer` header will include the page of origin's scheme, the host, and the port.\n*   `origin-when-cross-origin:` Navigating to other origins will limit the included referral data to the scheme, the host and the port, while navigating from the same origin will include the referrer's full path.\n*   `unsafe-url:` The `Referer` header will include the origin and the path, but not the fragment, password, or username. This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins."
	                        },
	                        "browsers": [
	                            "C51",
	                            "CA51",
	                            "E79",
	                            "FF50",
	                            "FFA50",
	                            "S14",
	                            "SM14"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-09-16",
	                            "baseline_high_date": "2023-03-16"
	                        }
	                    },
	                    {
	                        "name": "sizes",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A list of one or more strings separated by commas indicating a set of source sizes. Each source size consists of:\n\n1.  a media condition. This must be omitted for the last item.\n2.  a source size value.\n\nSource size values specify the intended display size of the image. User agents use the current source size to select one of the sources supplied by the `srcset` attribute, when those sources are described using width ('`w`') descriptors. The selected source size affects the intrinsic size of the image (the image’s display size if no CSS styling is applied). If the `srcset` attribute is absent, or contains no values with a width (`w`) descriptor, then the `sizes` attribute has no effect."
	                        },
	                        "browsers": [
	                            "C38",
	                            "CA38",
	                            "E12",
	                            "FF38",
	                            "FFA38",
	                            "S9.1",
	                            "SM9.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2016-03-21",
	                            "baseline_high_date": "2018-09-21"
	                        }
	                    },
	                    {
	                        "name": "importance",
	                        "description": "Indicates the relative importance of the resource. Priority hints are delegated using the values:"
	                    },
	                    {
	                        "name": "importance",
	                        "description": "`auto`: Indicates **no preference**. The browser may use its own heuristics to decide the priority of the image.\n\n`high`: Indicates to the browser that the image is of **high** priority.\n\n`low`: Indicates to the browser that the image is of **low** priority."
	                    },
	                    {
	                        "name": "intrinsicsize",
	                        "description": "This attribute tells the browser to ignore the actual intrinsic size of the image and pretend it’s the size specified in the attribute. Specifically, the image would raster at these dimensions and `naturalWidth`/`naturalHeight` on images would return the values specified in this attribute. [Explainer](https://github.com/ojanvafai/intrinsicsize-attribute), [examples](https://googlechrome.github.io/samples/intrinsic-size/index.html)"
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/img"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "iframe",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The iframe element represents a nested browsing context."
	                },
	                "attributes": [
	                    {
	                        "name": "src",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The URL of the page to embed. Use a value of `about:blank` to embed an empty page that conforms to the [same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Inherited_origins). Also note that programatically removing an `<iframe>`'s src attribute (e.g. via [`Element.removeAttribute()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute \"The Element method removeAttribute() removes the attribute with the specified name from the element.\")) causes `about:blank` to be loaded in the frame in Firefox (from version 65), Chromium-based browsers, and Safari/iOS."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "srcdoc",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Inline HTML to embed, overriding the `src` attribute. If a browser does not support the `srcdoc` attribute, it will fall back to the URL in the `src` attribute."
	                        },
	                        "browsers": [
	                            "C20",
	                            "CA25",
	                            "E79",
	                            "FF25",
	                            "FFA25",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-01-15",
	                            "baseline_high_date": "2022-07-15"
	                        }
	                    },
	                    {
	                        "name": "name",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A targetable name for the embedded browsing context. This can be used in the `target` attribute of the [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a \"The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.\"), [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\"), or [`<base>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base \"The HTML <base> element specifies the base URL to use for all relative URLs contained within a document. There can be only one <base> element in a document.\") elements; the `formtarget` attribute of the [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") or [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") elements; or the `windowName` parameter in the [`window.open()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open \"The Window interface's open() method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name. If the name doesn't exist, then a new window is opened and the specified resource is loaded into its browsing context.\") method."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "sandbox",
	                        "valueSet": "sb",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Applies extra restrictions to the content in the frame. The value of the attribute can either be empty to apply all restrictions, or space-separated tokens to lift particular restrictions:\n\n*   `allow-forms`: Allows the resource to submit forms. If this keyword is not used, form submission is blocked.\n*   `allow-modals`: Lets the resource [open modal windows](https://html.spec.whatwg.org/multipage/origin.html#sandboxed-modals-flag).\n*   `allow-orientation-lock`: Lets the resource [lock the screen orientation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation).\n*   `allow-pointer-lock`: Lets the resource use the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/WebAPI/Pointer_Lock).\n*   `allow-popups`: Allows popups (such as `window.open()`, `target=\"_blank\"`, or `showModalDialog()`). If this keyword is not used, the popup will silently fail to open.\n*   `allow-popups-to-escape-sandbox`: Lets the sandboxed document open new windows without those windows inheriting the sandboxing. For example, this can safely sandbox an advertisement without forcing the same restrictions upon the page the ad links to.\n*   `allow-presentation`: Lets the resource start a [presentation session](https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest).\n*   `allow-same-origin`: If this token is not used, the resource is treated as being from a special origin that always fails the [same-origin policy](https://developer.mozilla.org/en-US/docs/Glossary/same-origin_policy \"same-origin policy: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.\").\n*   `allow-scripts`: Lets the resource run scripts (but not create popup windows).\n*   `allow-storage-access-by-user-activation` : Lets the resource request access to the parent's storage capabilities with the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).\n*   `allow-top-navigation`: Lets the resource navigate the top-level browsing context (the one named `_top`).\n*   `allow-top-navigation-by-user-activation`: Lets the resource navigate the top-level browsing context, but only if initiated by a user gesture.\n\n**Notes about sandboxing:**\n\n*   When the embedded document has the same origin as the embedding page, it is **strongly discouraged** to use both `allow-scripts` and `allow-same-origin`, as that lets the embedded document remove the `sandbox` attribute — making it no more secure than not using the `sandbox` attribute at all.\n*   Sandboxing is useless if the attacker can display content outside a sandboxed `iframe` — such as if the viewer opens the frame in a new tab. Such content should be also served from a _separate origin_ to limit potential damage.\n*   The `sandbox` attribute is unsupported in Internet Explorer 9 and earlier."
	                        },
	                        "browsers": [
	                            "C5",
	                            "CA18",
	                            "E12",
	                            "FF17",
	                            "FFA17",
	                            "S5",
	                            "SM4"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "seamless",
	                        "valueSet": "v"
	                    },
	                    {
	                        "name": "allowfullscreen",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Set to `true` if the `<iframe>` can activate fullscreen mode by calling the [`requestFullscreen()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullscreen \"The Element.requestFullscreen() method issues an asynchronous request to make the element be displayed in full-screen mode.\") method.\nThis attribute is considered a legacy attribute and redefined as `allow=\"fullscreen\"`."
	                        },
	                        "browsers": [
	                            "C38",
	                            "CA38",
	                            "E12",
	                            "FF18",
	                            "FFA18",
	                            "S10.1"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "width",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The width of the frame in CSS pixels. Default is `300`."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "height",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The height of the frame in CSS pixels. Default is `150`."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "allow",
	                        "description": "Specifies a [feature policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy) for the `<iframe>`.",
	                        "browsers": [
	                            "C60",
	                            "CA60",
	                            "E79",
	                            "FF74",
	                            "FFA79",
	                            "S11.1",
	                            "SM11.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-07-28",
	                            "baseline_high_date": "2023-01-28"
	                        }
	                    },
	                    {
	                        "name": "allowpaymentrequest",
	                        "description": "Set to `true` if a cross-origin `<iframe>` should be allowed to invoke the [Payment Request API](https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API).",
	                        "browsers": [
	                            "C60",
	                            "CA60",
	                            "E79"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "allowpaymentrequest",
	                        "description": "This attribute is considered a legacy attribute and redefined as `allow=\"payment\"`.",
	                        "browsers": [
	                            "C60",
	                            "CA60",
	                            "E79"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "csp",
	                        "description": "A [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) enforced for the embedded resource. See [`HTMLIFrameElement.csp`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/csp \"The csp property of the HTMLIFrameElement interface specifies the Content Security Policy that an embedded document must agree to enforce upon itself.\") for details.",
	                        "browsers": [
	                            "C61",
	                            "CA61",
	                            "E79"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "importance",
	                        "description": "The download priority of the resource in the `<iframe>`'s `src` attribute. Allowed values:\n\n`auto` (default)\n\nNo preference. The browser uses its own heuristics to decide the priority of the resource.\n\n`high`\n\nThe resource should be downloaded before other lower-priority page resources.\n\n`low`\n\nThe resource should be downloaded after other higher-priority page resources."
	                    },
	                    {
	                        "name": "referrerpolicy",
	                        "description": "Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer) to send when fetching the frame's resource:\n\n*   `no-referrer`: The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n*   `no-referrer-when-downgrade` (default): The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent to [origin](https://developer.mozilla.org/en-US/docs/Glossary/origin \"origin: Web content's origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Two objects have the same origin only when the scheme, host, and port all match.\")s without [TLS](https://developer.mozilla.org/en-US/docs/Glossary/TLS \"TLS: Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.\") ([HTTPS](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS \"HTTPS: HTTPS (HTTP Secure) is an encrypted version of the HTTP protocol. It usually uses SSL or TLS to encrypt all communication between a client and a server. This secure connection allows clients to safely exchange sensitive data with a server, for example for banking activities or online shopping.\")).\n*   `origin`: The sent referrer will be limited to the origin of the referring page: its [scheme](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/URIScheme), [host](https://developer.mozilla.org/en-US/docs/Glossary/host \"host: A host is a device connected to the Internet (or a local network). Some hosts called servers offer additional services like serving webpages or storing files and emails.\"), and [port](https://developer.mozilla.org/en-US/docs/Glossary/port \"port: For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol.\").\n*   `origin-when-cross-origin`: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.\n*   `same-origin`: A referrer will be sent for [same origin](https://developer.mozilla.org/en-US/docs/Glossary/Same-origin_policy \"same origin: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.\"), but cross-origin requests will contain no referrer information.\n*   `strict-origin`: Only send the origin of the document as the referrer when the protocol security level stays the same (HTTPS→HTTPS), but don't send it to a less secure destination (HTTPS→HTTP).\n*   `strict-origin-when-cross-origin`: Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS→HTTPS), and send no header to a less secure destination (HTTPS→HTTP).\n*   `unsafe-url`: The referrer will include the origin _and_ the path (but not the [fragment](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/hash), [password](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/password), or [username](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/username)). **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins.",
	                        "browsers": [
	                            "C51",
	                            "CA51",
	                            "E79",
	                            "FF50",
	                            "FFA50",
	                            "S14",
	                            "SM14"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-09-16",
	                            "baseline_high_date": "2023-03-16"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/iframe"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "embed",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The embed element provides an integration point for an external (typically non-HTML) application or interactive content."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "src",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The URL of the resource being embedded."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "type",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The MIME type to use to select the plug-in to instantiate."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E79",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-01-15",
	                            "baseline_high_date": "2022-07-15"
	                        }
	                    },
	                    {
	                        "name": "width",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The displayed width of the resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). This must be an absolute value; percentages are _not_ allowed."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "height",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The displayed height of the resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). This must be an absolute value; percentages are _not_ allowed."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/embed"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "object",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The object element can represent an external resource, which, depending on the type of the resource, will either be treated as an image, as a nested browsing context, or as an external resource to be processed by a plugin."
	                },
	                "attributes": [
	                    {
	                        "name": "data",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The address of the resource as a valid URL. At least one of **data** and **type** must be defined."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "type",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The [content type](https://developer.mozilla.org/en-US/docs/Glossary/Content_type) of the resource specified by **data**. At least one of **data** and **type** must be defined."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "typemustmatch",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute indicates if the **type** attribute and the actual [content type](https://developer.mozilla.org/en-US/docs/Glossary/Content_type) of the resource must match to be used."
	                        }
	                    },
	                    {
	                        "name": "name",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The name of valid browsing context (HTML5), or the name of the control (HTML 4)."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "usemap",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A hash-name reference to a [`<map>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map \"The HTML <map> element is used with <area> elements to define an image map (a clickable link area).\") element; that is a '#' followed by the value of a [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map#attr-name) of a map element."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "form",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The form element, if any, that the object element is associated with (its _form owner_). The value of the attribute must be an ID of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element in the same document."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "width",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The width of the display resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). -- (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes))"
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "height",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The height of the displayed resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). -- (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes))"
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "archive",
	                        "description": "A space-separated list of URIs for archives of resources for the object.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "border",
	                        "description": "The width of a border around the control, in pixels.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "classid",
	                        "description": "The URI of the object's implementation. It can be used together with, or in place of, the **data** attribute.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "codebase",
	                        "description": "The base path used to resolve relative URIs specified by **classid**, **data**, or **archive**. If not specified, the default is the base URI of the current document.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "codetype",
	                        "description": "The content type of the data specified by **classid**.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "declare",
	                        "description": "The presence of this Boolean attribute makes this element a declaration only. The object must be instantiated by a subsequent `<object>` element. In HTML5, repeat the <object> element completely each that that the resource is reused.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "standby",
	                        "description": "A message that the browser can show while loading the object's implementation and data.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "tabindex",
	                        "description": "The position of the element in the tabbing navigation order for the current document."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/object"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S3",
	                    "SM2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "param",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The param element defines parameters for plugins invoked by object elements. It does not represent anything on its own."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "name",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Name of the parameter."
	                        }
	                    },
	                    {
	                        "name": "value",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Specifies the value of the parameter."
	                        }
	                    },
	                    {
	                        "name": "type",
	                        "description": "Only used if the `valuetype` is set to \"ref\". Specifies the MIME type of values found at the URI specified by value."
	                    },
	                    {
	                        "name": "valuetype",
	                        "description": "Specifies the type of the `value` attribute. Possible values are:\n\n*   data: Default value. The value is passed to the object's implementation as a string.\n*   ref: The value is a URI to a resource where run-time values are stored.\n*   object: An ID of another [`<object>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object \"The HTML <object> element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.\") in the same document."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/param"
	                    }
	                ]
	            },
	            {
	                "name": "video",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A video element is used for playing videos or movies, and audio files with captions."
	                },
	                "attributes": [
	                    {
	                        "name": "src",
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF3.5",
	                            "FFA4",
	                            "S3.1",
	                            "SM3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "crossorigin",
	                        "valueSet": "xo",
	                        "browsers": [
	                            "C33",
	                            "CA33",
	                            "E18",
	                            "FF74",
	                            "FFA79",
	                            "S10",
	                            "SM10"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-07-28",
	                            "baseline_high_date": "2023-01-28"
	                        }
	                    },
	                    {
	                        "name": "poster",
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF3.6",
	                            "FFA4",
	                            "S3.1",
	                            "SM3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "preload",
	                        "valueSet": "pl",
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S3.1",
	                            "SM3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "autoplay",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A Boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data.\n**Note**: Sites that automatically play audio (or video with an audio track) can be an unpleasant experience for users, so it should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). However, this can be useful when creating media elements whose source will be set at a later time, under user control.\n\nTo disable video autoplay, `autoplay=\"false\"` will not work; the video will autoplay if the attribute is there in the `<video>` tag at all. To remove autoplay the attribute needs to be removed altogether.\n\nIn some browsers (e.g. Chrome 70.0) autoplay is not working if no `muted` attribute is present."
	                        },
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF3.5",
	                            "FFA4",
	                            "S3.1",
	                            "SM10"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2016-09-13",
	                            "baseline_high_date": "2019-03-13"
	                        }
	                    },
	                    {
	                        "name": "mediagroup"
	                    },
	                    {
	                        "name": "loop",
	                        "valueSet": "v",
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF11",
	                            "FFA14",
	                            "S3.1",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "muted",
	                        "valueSet": "v",
	                        "browsers": [
	                            "C30",
	                            "CA30",
	                            "E12",
	                            "FF11",
	                            "FFA14",
	                            "S5",
	                            "SM4.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "controls",
	                        "valueSet": "v",
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF3.5",
	                            "FFA4",
	                            "S3.1",
	                            "SM3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "width",
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF3.5",
	                            "FFA4",
	                            "S3.1",
	                            "SM3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "height",
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF3.5",
	                            "FFA4",
	                            "S3.1",
	                            "SM3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/video"
	                    }
	                ],
	                "browsers": [
	                    "C3",
	                    "CA18",
	                    "E12",
	                    "FF3.5",
	                    "FFA4",
	                    "S3.1",
	                    "SM3"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "audio",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An audio element represents a sound or audio stream."
	                },
	                "attributes": [
	                    {
	                        "name": "src",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The URL of the audio to embed. This is subject to [HTTP access controls](https://developer.mozilla.org/en-US/docs/HTTP_access_control). This is optional; you may instead use the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element within the audio block to specify the audio to embed."
	                        },
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF3.5",
	                            "FFA4",
	                            "S3.1",
	                            "SM3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "crossorigin",
	                        "valueSet": "xo",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This enumerated attribute indicates whether to use CORS to fetch the related image. [CORS-enabled resources](https://developer.mozilla.org/en-US/docs/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") element without being _tainted_. The allowed values are:\n\nanonymous\n\nSends a cross-origin request without a credential. In other words, it sends the `Origin:` HTTP header without a cookie, X.509 certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (by not setting the `Access-Control-Allow-Origin:` HTTP header), the image will be _tainted_, and its usage restricted.\n\nuse-credentials\n\nSends a cross-origin request with a credential. In other words, it sends the `Origin:` HTTP header with a cookie, a certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (through `Access-Control-Allow-Credentials:` HTTP header), the image will be _tainted_ and its usage restricted.\n\nWhen not present, the resource is fetched without a CORS request (i.e. without sending the `Origin:` HTTP header), preventing its non-tainted used in [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") elements. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/HTML/CORS_settings_attributes) for additional information."
	                        },
	                        "browsers": [
	                            "C33",
	                            "CA33",
	                            "E18",
	                            "FF74",
	                            "FFA79",
	                            "S10",
	                            "SM10"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-07-28",
	                            "baseline_high_date": "2023-01-28"
	                        }
	                    },
	                    {
	                        "name": "preload",
	                        "valueSet": "pl",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:\n\n*   `none`: Indicates that the audio should not be preloaded.\n*   `metadata`: Indicates that only audio metadata (e.g. length) is fetched.\n*   `auto`: Indicates that the whole audio file can be downloaded, even if the user is not expected to use it.\n*   _empty string_: A synonym of the `auto` value.\n\nIf not set, `preload`'s default value is browser-defined (i.e. each browser may have its own default value). The spec advises it to be set to `metadata`.\n\n**Usage notes:**\n\n*   The `autoplay` attribute has precedence over `preload`. If `autoplay` is specified, the browser would obviously need to start downloading the audio for playback.\n*   The browser is not forced by the specification to follow the value of this attribute; it is a mere hint."
	                        },
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S3.1",
	                            "SM3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "autoplay",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A Boolean attribute: if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading.\n\n**Note**: Sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). However, this can be useful when creating media elements whose source will be set at a later time, under user control."
	                        },
	                        "browsers": [],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "mediagroup"
	                    },
	                    {
	                        "name": "loop",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A Boolean attribute: if specified, the audio player will automatically seek back to the start upon reaching the end of the audio."
	                        },
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF11",
	                            "FFA14",
	                            "S3.1",
	                            "SM3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "muted",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A Boolean attribute that indicates whether the audio will be initially silenced. Its default value is `false`."
	                        },
	                        "browsers": [
	                            "C15",
	                            "CA18",
	                            "E18",
	                            "FF11",
	                            "FFA14",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "≤2018-10-02",
	                            "baseline_high_date": "≤2021-04-02"
	                        }
	                    },
	                    {
	                        "name": "controls",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "If this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback."
	                        },
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF3.5",
	                            "FFA4",
	                            "S3.1",
	                            "SM3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/audio"
	                    }
	                ],
	                "browsers": [
	                    "C3",
	                    "CA18",
	                    "E12",
	                    "FF3.5",
	                    "FFA4",
	                    "S3.1",
	                    "SM3"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "source",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The source element allows authors to specify multiple alternative media resources for media elements. It does not represent anything on its own."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "src",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Required for [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio \"The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.\") and [`<video>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video \"The HTML Video element (<video>) embeds a media player which supports video playback into the document.\"), address of the media resource. The value of this attribute is ignored when the `<source>` element is placed inside a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element."
	                        },
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF3.5",
	                            "FFA4",
	                            "S3.1",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "type",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The MIME-type of the resource, optionally with a `codecs` parameter. See [RFC 4281](https://tools.ietf.org/html/rfc4281) for information about how to specify codecs."
	                        },
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF3.5",
	                            "FFA4",
	                            "S3.1",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "sizes",
	                        "description": "Is a list of source sizes that describes the final rendered width of the image represented by the source. Each source size consists of a comma-separated list of media condition-length pairs. This information is used by the browser to determine, before laying the page out, which image defined in [`srcset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-srcset) to use.  \nThe `sizes` attribute has an effect only when the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element is the direct child of a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element.",
	                        "browsers": [
	                            "C34",
	                            "CA34",
	                            "E13",
	                            "FF38",
	                            "FFA38",
	                            "S9.1",
	                            "SM9.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2016-03-21",
	                            "baseline_high_date": "2018-09-21"
	                        }
	                    },
	                    {
	                        "name": "srcset",
	                        "description": "A list of one or more strings separated by commas indicating a set of possible images represented by the source for the browser to use. Each string is composed of:\n\n1.  one URL to an image,\n2.  a width descriptor, that is a positive integer directly followed by `'w'`. The default value, if missing, is the infinity.\n3.  a pixel density descriptor, that is a positive floating number directly followed by `'x'`. The default value, if missing, is `1x`.\n\nEach string in the list must have at least a width descriptor or a pixel density descriptor to be valid. Among the list, there must be only one string containing the same tuple of width descriptor and pixel density descriptor.  \nThe browser chooses the most adequate image to display at a given point of time.  \nThe `srcset` attribute has an effect only when the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element is the direct child of a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element.",
	                        "browsers": [
	                            "C34",
	                            "CA34",
	                            "E13",
	                            "FF38",
	                            "FFA38",
	                            "S9.1",
	                            "SM9.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2016-03-21",
	                            "baseline_high_date": "2018-09-21"
	                        }
	                    },
	                    {
	                        "name": "media",
	                        "description": "[Media query](https://developer.mozilla.org/en-US/docs/CSS/Media_queries) of the resource's intended media; this should be used only in a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element.",
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF15",
	                            "FFA15",
	                            "S3.1",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/source"
	                    }
	                ],
	                "browsers": [
	                    "C3",
	                    "CA18",
	                    "E12",
	                    "FF3.5",
	                    "FFA4",
	                    "S3.1",
	                    "SM2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "track",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The track element allows authors to specify explicit external timed text tracks for media elements. It does not represent anything on its own."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "default",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate. This may only be used on one `track` element per media element."
	                        },
	                        "browsers": [
	                            "C23",
	                            "CA25",
	                            "E12",
	                            "FF31",
	                            "FFA31",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "kind",
	                        "valueSet": "tk",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "How the text track is meant to be used. If omitted the default kind is `subtitles`. If the attribute is not present, it will use the `subtitles`. If the attribute contains an invalid value, it will use `metadata`. (Versions of Chrome earlier than 52 treated an invalid value as `subtitles`.) The following keywords are allowed:\n\n*   `subtitles`\n    *   Subtitles provide translation of content that cannot be understood by the viewer. For example dialogue or text that is not English in an English language film.\n    *   Subtitles may contain additional content, usually extra background information. For example the text at the beginning of the Star Wars films, or the date, time, and location of a scene.\n*   `captions`\n    *   Closed captions provide a transcription and possibly a translation of audio.\n    *   It may include important non-verbal information such as music cues or sound effects. It may indicate the cue's source (e.g. music, text, character).\n    *   Suitable for users who are deaf or when the sound is muted.\n*   `descriptions`\n    *   Textual description of the video content.\n    *   Suitable for users who are blind or where the video cannot be seen.\n*   `chapters`\n    *   Chapter titles are intended to be used when the user is navigating the media resource.\n*   `metadata`\n    *   Tracks used by scripts. Not visible to the user."
	                        },
	                        "browsers": [
	                            "C23",
	                            "CA25",
	                            "E12",
	                            "FF31",
	                            "FFA31",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "label",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A user-readable title of the text track which is used by the browser when listing available text tracks."
	                        },
	                        "browsers": [
	                            "C23",
	                            "CA25",
	                            "E12",
	                            "FF31",
	                            "FFA31",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "src",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Address of the track (`.vtt` file). Must be a valid URL. This attribute must be specified and its URL value must have the same origin as the document — unless the [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio \"The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.\") or [`<video>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video \"The HTML Video element (<video>) embeds a media player which supports video playback into the document.\") parent element of the `track` element has a [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) attribute."
	                        },
	                        "browsers": [
	                            "C23",
	                            "CA25",
	                            "E12",
	                            "FF50",
	                            "FFA50",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2016-11-15",
	                            "baseline_high_date": "2019-05-15"
	                        }
	                    },
	                    {
	                        "name": "srclang",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Language of the track text data. It must be a valid [BCP 47](https://r12a.github.io/app-subtags/) language tag. If the `kind` attribute is set to `subtitles,` then `srclang` must be defined."
	                        },
	                        "browsers": [
	                            "C23",
	                            "CA25",
	                            "E12",
	                            "FF31",
	                            "FFA31",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/track"
	                    }
	                ],
	                "browsers": [
	                    "C23",
	                    "CA25",
	                    "E12",
	                    "FF31",
	                    "FFA31",
	                    "S6",
	                    "SM6"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "map",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The map element, in conjunction with an img element and any area element descendants, defines an image map. The element represents its children."
	                },
	                "attributes": [
	                    {
	                        "name": "name",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The name attribute gives the map a name so that it can be referenced. The attribute must be present and must have a non-empty value with no space characters. The value of the name attribute must not be a compatibility-caseless match for the value of the name attribute of another map element in the same document. If the id attribute is also specified, both attributes must have the same value."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/map"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "area",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The area element represents either a hyperlink with some text and a corresponding area on an image map, or a dead area on an image map."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "alt",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "coords",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "shape",
	                        "valueSet": "sh",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "href",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "target",
	                        "valueSet": "target",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "download",
	                        "browsers": [
	                            "C54",
	                            "CA54",
	                            "E12",
	                            "FF20",
	                            "FFA20",
	                            "S10.1",
	                            "SM10.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2017-03-27",
	                            "baseline_high_date": "2019-09-27"
	                        }
	                    },
	                    {
	                        "name": "ping",
	                        "browsers": [
	                            "C12",
	                            "CA18",
	                            "E17",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "rel",
	                        "browsers": [
	                            "C16",
	                            "CA18",
	                            "E12",
	                            "FF30",
	                            "FFA30",
	                            "S5",
	                            "SM4.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "hreflang"
	                    },
	                    {
	                        "name": "type"
	                    },
	                    {
	                        "name": "accesskey",
	                        "description": "Specifies a keyboard navigation accelerator for the element. Pressing ALT or a similar key in association with the specified character selects the form control correlated with that key sequence. Page designers are forewarned to avoid key sequences already bound to browsers. This attribute is global since HTML5."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/area"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "table",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The table element represents data with more than one dimension, in the form of a table."
	                },
	                "attributes": [
	                    {
	                        "name": "border",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "align",
	                        "description": "This enumerated attribute indicates how the table must be aligned inside the containing document. It may have the following values:\n\n*   left: the table is displayed on the left side of the document;\n*   center: the table is displayed in the center of the document;\n*   right: the table is displayed on the right side of the document.\n\n**Usage Note**\n\n*   **Do not use this attribute**, as it has been deprecated. The [`<table>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table \"The HTML <table> element represents tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). Set [`margin-left`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left \"The margin-left CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") and [`margin-right`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right \"The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") to `auto` or [`margin`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin \"The margin CSS property sets the margin area on all four sides of an element. It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left.\") to `0 auto` to achieve an effect that is similar to the align attribute.\n*   Prior to Firefox 4, Firefox also supported the `middle`, `absmiddle`, and `abscenter` values as synonyms of `center`, in quirks mode only.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/table"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "caption",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The caption element represents the title of the table that is its parent, if it has a parent and that is a table element."
	                },
	                "attributes": [
	                    {
	                        "name": "align",
	                        "description": "This enumerated attribute indicates how the caption must be aligned with respect to the table. It may have one of the following values:\n\n`left`\n\nThe caption is displayed to the left of the table.\n\n`top`\n\nThe caption is displayed above the table.\n\n`right`\n\nThe caption is displayed to the right of the table.\n\n`bottom`\n\nThe caption is displayed below the table.\n\n**Usage note:** Do not use this attribute, as it has been deprecated. The [`<caption>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption \"The HTML Table Caption element (<caption>) specifies the caption (or title) of a table, and if used is always the first child of a <table>.\") element should be styled using the [CSS](https://developer.mozilla.org/en-US/docs/CSS) properties [`caption-side`](https://developer.mozilla.org/en-US/docs/Web/CSS/caption-side \"The caption-side CSS property puts the content of a table's <caption> on the specified side. The values are relative to the writing-mode of the table.\") and [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\").",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/caption"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "colgroup",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The colgroup element represents a group of one or more columns in the table that is its parent, if it has a parent and that is a table element."
	                },
	                "attributes": [
	                    {
	                        "name": "span",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "align",
	                        "description": "This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:\n\n*   `left`, aligning the content to the left of the cell\n*   `center`, centering the content in the cell\n*   `right`, aligning the content to the right of the cell\n*   `justify`, inserting spaces into the textual content so that the content is justified in the cell\n*   `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, the `left` value is assumed. The descendant [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col \"The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.\") elements may override this value using their own [`align`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-align) attribute.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values:\n    *   Do not try to set the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on a selector giving a [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup \"The HTML <colgroup> element defines a group of columns within a table.\") element. Because [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td \"The HTML <td> element defines a cell of a table that contains data. It participates in the table model.\") elements are not descendant of the [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup \"The HTML <colgroup> element defines a group of columns within a table.\") element, they won't inherit it.\n    *   If the table doesn't use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, use one `td:nth-child(an+b)` CSS selector per column, where a is the total number of the columns in the table and b is the ordinal position of this column in the table. Only after this selector the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property can be used.\n    *   If the table does use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.\n*   To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/colgroup"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "col",
	                "description": {
	                    "kind": "markdown",
	                    "value": "If a col element has a parent and that is a colgroup element that itself has a parent that is a table element, then the col element represents one or more columns in the column group represented by that colgroup."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "span",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "align",
	                        "description": "This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:\n\n*   `left`, aligning the content to the left of the cell\n*   `center`, centering the content in the cell\n*   `right`, aligning the content to the right of the cell\n*   `justify`, inserting spaces into the textual content so that the content is justified in the cell\n*   `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, its value is inherited from the [`align`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#attr-align) of the [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup \"The HTML <colgroup> element defines a group of columns within a table.\") element this `<col>` element belongs too. If there are none, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values:\n    *   Do not try to set the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on a selector giving a [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col \"The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.\") element. Because [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td \"The HTML <td> element defines a cell of a table that contains data. It participates in the table model.\") elements are not descendant of the [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col \"The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.\") element, they won't inherit it.\n    *   If the table doesn't use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, use the `td:nth-child(an+b)` CSS selector. Set `a` to zero and `b` to the position of the column in the table, e.g. `td:nth-child(2) { text-align: right; }` to right-align the second column.\n    *   If the table does use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.\n*   To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/col"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "tbody",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The tbody element represents a block of rows that consist of a body of data for the parent table element, if the tbody element has a parent and it is a table."
	                },
	                "attributes": [
	                    {
	                        "name": "align",
	                        "description": "This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n*   `left`, aligning the content to the left of the cell\n*   `center`, centering the content in the cell\n*   `right`, aligning the content to the right of the cell\n*   `justify`, inserting spaces into the textual content so that the content is justified in the cell\n*   `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-charoff) attributes.\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on it.\n*   To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/tbody"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "thead",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The thead element represents the block of rows that consist of the column labels (headers) for the parent table element, if the thead element has a parent and it is a table."
	                },
	                "attributes": [
	                    {
	                        "name": "align",
	                        "description": "This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n*   `left`, aligning the content to the left of the cell\n*   `center`, centering the content in the cell\n*   `right`, aligning the content to the right of the cell\n*   `justify`, inserting spaces into the textual content so that the content is justified in the cell\n*   `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on it.\n*   To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/thead"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "tfoot",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The tfoot element represents the block of rows that consist of the column summaries (footers) for the parent table element, if the tfoot element has a parent and it is a table."
	                },
	                "attributes": [
	                    {
	                        "name": "align",
	                        "description": "This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n*   `left`, aligning the content to the left of the cell\n*   `center`, centering the content in the cell\n*   `right`, aligning the content to the right of the cell\n*   `justify`, inserting spaces into the textual content so that the content is justified in the cell\n*   `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on it.\n*   To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/tfoot"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "tr",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The tr element represents a row of cells in a table."
	                },
	                "attributes": [
	                    {
	                        "name": "align",
	                        "description": "A [`DOMString`](https://developer.mozilla.org/en-US/docs/Web/API/DOMString \"DOMString is a UTF-16 String. As JavaScript already uses such strings, DOMString is mapped directly to a String.\") which specifies how the cell's context should be aligned horizontally within the cells in the row; this is shorthand for using `align` on every cell in the row individually. Possible values are:\n\n`left`\n\nAlign the content of each cell at its left edge.\n\n`center`\n\nCenter the contents of each cell between their left and right edges.\n\n`right`\n\nAlign the content of each cell at its right edge.\n\n`justify`\n\nWiden whitespaces within the text of each cell so that the text fills the full width of each cell (full justification).\n\n`char`\n\nAlign each cell in the row on a specific character (such that each row in the column that is configured this way will horizontally align its cells on that character). This uses the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr#attr-charoff) to establish the alignment character (typically \".\" or \",\" when aligning numerical data) and the number of characters that should follow the alignment character. This alignment type was never widely supported.\n\nIf no value is expressly set for `align`, the parent node's value is inherited.\n\nInstead of using the obsolete `align` attribute, you should instead use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to establish `left`, `center`, `right`, or `justify` alignment for the row's cells. To apply character-based alignment, set the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to the alignment character (such as `\".\"` or `\",\"`).",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/tr"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "td",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The td element represents a data cell in a table."
	                },
	                "attributes": [
	                    {
	                        "name": "colspan",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "rowspan",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "headers",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "abbr",
	                        "description": "This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard. Alternatively, you can put the abbreviated description inside the cell and place the long content in the **title** attribute.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "align",
	                        "description": "This enumerated attribute specifies how the cell content's horizontal alignment will be handled. Possible values are:\n\n*   `left`: The content is aligned to the left of the cell.\n*   `center`: The content is centered in the cell.\n*   `right`: The content is aligned to the right of the cell.\n*   `justify` (with text only): The content is stretched out inside the cell so that it covers its entire width.\n*   `char` (with text only): The content is aligned to a character inside the `<th>` element with minimal offset. This character is defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nThe default value when this attribute is not specified is `left`.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values, apply the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to the element.\n*   To achieve the same effect as the `char` value, give the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property the same value you would use for the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-char). Unimplemented in CSS3.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "axis",
	                        "description": "This attribute contains a list of space-separated strings. Each string is the `id` of a group of cells that this header applies to.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "bgcolor",
	                        "description": "This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in [sRGB](https://www.w3.org/Graphics/Color/sRGB) and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings:\n\n \n\n`black` = \"#000000\"\n\n \n\n`green` = \"#008000\"\n\n \n\n`silver` = \"#C0C0C0\"\n\n \n\n`lime` = \"#00FF00\"\n\n \n\n`gray` = \"#808080\"\n\n \n\n`olive` = \"#808000\"\n\n \n\n`white` = \"#FFFFFF\"\n\n \n\n`yellow` = \"#FFFF00\"\n\n \n\n`maroon` = \"#800000\"\n\n \n\n`navy` = \"#000080\"\n\n \n\n`red` = \"#FF0000\"\n\n \n\n`blue` = \"#0000FF\"\n\n \n\n`purple` = \"#800080\"\n\n \n\n`teal` = \"#008080\"\n\n \n\n`fuchsia` = \"#FF00FF\"\n\n \n\n`aqua` = \"#00FFFF\"\n\n**Note:** Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td \"The HTML <td> element defines a cell of a table that contains data. It participates in the table model.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To create a similar effect use the [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color \"The background-color CSS property sets the background color of an element.\") property in [CSS](https://developer.mozilla.org/en-US/docs/CSS) instead.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/td"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "th",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The th element represents a header cell in a table."
	                },
	                "attributes": [
	                    {
	                        "name": "colspan",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "rowspan",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "headers",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "scope",
	                        "valueSet": "s",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "sorted"
	                    },
	                    {
	                        "name": "abbr",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "align",
	                        "description": "This enumerated attribute specifies how the cell content's horizontal alignment will be handled. Possible values are:\n\n*   `left`: The content is aligned to the left of the cell.\n*   `center`: The content is centered in the cell.\n*   `right`: The content is aligned to the right of the cell.\n*   `justify` (with text only): The content is stretched out inside the cell so that it covers its entire width.\n*   `char` (with text only): The content is aligned to a character inside the `<th>` element with minimal offset. This character is defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-charoff) attributes.\n\nThe default value when this attribute is not specified is `left`.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.\n\n*   To achieve the same effect as the `left`, `center`, `right` or `justify` values, apply the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to the element.\n*   To achieve the same effect as the `char` value, give the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property the same value you would use for the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-char). Unimplemented in CSS3.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "axis",
	                        "description": "This attribute contains a list of space-separated strings. Each string is the `id` of a group of cells that this header applies to.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard: use the [`scope`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-scope) attribute instead.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "bgcolor",
	                        "description": "This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in [sRGB](https://www.w3.org/Graphics/Color/sRGB) and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings:\n\n \n\n`black` = \"#000000\"\n\n \n\n`green` = \"#008000\"\n\n \n\n`silver` = \"#C0C0C0\"\n\n \n\n`lime` = \"#00FF00\"\n\n \n\n`gray` = \"#808080\"\n\n \n\n`olive` = \"#808000\"\n\n \n\n`white` = \"#FFFFFF\"\n\n \n\n`yellow` = \"#FFFF00\"\n\n \n\n`maroon` = \"#800000\"\n\n \n\n`navy` = \"#000080\"\n\n \n\n`red` = \"#FF0000\"\n\n \n\n`blue` = \"#0000FF\"\n\n \n\n`purple` = \"#800080\"\n\n \n\n`teal` = \"#008080\"\n\n \n\n`fuchsia` = \"#FF00FF\"\n\n \n\n`aqua` = \"#00FFFF\"\n\n**Note:** Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The [`<th>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th \"The HTML <th> element defines a cell as header of a group of table cells. The exact nature of this group is defined by the scope and headers attributes.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS). To create a similar effect use the [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color \"The background-color CSS property sets the background color of an element.\") property in [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) instead.",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/th"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "form",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The form element represents a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing."
	                },
	                "attributes": [
	                    {
	                        "name": "accept-charset",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A space- or comma-delimited list of character encodings that the server accepts. The browser uses them in the order in which they are listed. The default value, the reserved string `\"UNKNOWN\"`, indicates the same encoding as that of the document containing the form element.  \nIn previous versions of HTML, the different character encodings could be delimited by spaces or commas. In HTML5, only spaces are allowed as delimiters."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "action",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The URI of a program that processes the form information. This value can be overridden by a [`formaction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formaction) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "autocomplete",
	                        "valueSet": "o",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Indicates whether input elements can by default have their values automatically completed by the browser. This setting can be overridden by an `autocomplete` attribute on an element belonging to the form. Possible values are:\n\n*   `off`: The user must explicitly enter a value into each field for every use, or the document provides its own auto-completion method; the browser does not automatically complete entries.\n*   `on`: The browser can automatically complete values based on values that the user has previously entered in the form.\n\nFor most modern browsers (including Firefox 38+, Google Chrome 34+, IE 11+) setting the autocomplete attribute will not prevent a browser's password manager from asking the user if they want to store login fields (username and password), if the user permits the storage the browser will autofill the login the next time the user visits the page. See [The autocomplete attribute and login fields](https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#The_autocomplete_attribute_and_login_fields).\n**Note:** If you set `autocomplete` to `off` in a form because the document provides its own auto-completion, then you should also set `autocomplete` to `off` for each of the form's `input` elements that the document can auto-complete. For details, see the note regarding Google Chrome in the [Browser Compatibility chart](#compatChart)."
	                        },
	                        "browsers": [
	                            "C14",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "enctype",
	                        "valueSet": "et",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "When the value of the `method` attribute is `post`, enctype is the [MIME type](https://en.wikipedia.org/wiki/Mime_type) of content that is used to submit the form to the server. Possible values are:\n\n*   `application/x-www-form-urlencoded`: The default value if the attribute is not specified.\n*   `multipart/form-data`: The value used for an [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element with the `type` attribute set to \"file\".\n*   `text/plain`: (HTML5)\n\nThis value can be overridden by a [`formenctype`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formenctype) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "method",
	                        "valueSet": "m",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The [HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP) method that the browser uses to submit the form. Possible values are:\n\n*   `post`: Corresponds to the HTTP [POST method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5) ; form data are included in the body of the form and sent to the server.\n*   `get`: Corresponds to the HTTP [GET method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3); form data are appended to the `action` attribute URI with a '?' as separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.\n*   `dialog`: Use when the form is inside a [`<dialog>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog \"The HTML <dialog> element represents a dialog box or other interactive component, such as an inspector or window.\") element to close the dialog when submitted.\n\nThis value can be overridden by a [`formmethod`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formmethod) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "name",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The name of the form. In HTML 4, its use is deprecated (`id` should be used instead). It must be unique among the forms in a document and not just an empty string in HTML 5."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "novalidate",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute indicates that the form is not to be validated when submitted. If this attribute is not specified (and therefore the form is validated), this default setting can be overridden by a [`formnovalidate`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formnovalidate) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element belonging to the form."
	                        },
	                        "browsers": [
	                            "C10",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S10.1",
	                            "SM10.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2017-03-27",
	                            "baseline_high_date": "2019-09-27"
	                        }
	                    },
	                    {
	                        "name": "target",
	                        "valueSet": "target",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A name or keyword indicating where to display the response that is received after submitting the form. In HTML 4, this is the name/keyword for a frame. In HTML5, it is a name/keyword for a _browsing context_ (for example, tab, window, or inline frame). The following keywords have special meanings:\n\n*   `_self`: Load the response into the same HTML 4 frame (or HTML5 browsing context) as the current one. This value is the default if the attribute is not specified.\n*   `_blank`: Load the response into a new unnamed HTML 4 window or HTML5 browsing context.\n*   `_parent`: Load the response into the HTML 4 frameset parent of the current frame, or HTML5 parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n*   `_top`: HTML 4: Load the response into the full original window, and cancel all other frames. HTML5: Load the response into the top-level browsing context (i.e., the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n*   _iframename_: The response is displayed in a named [`<iframe>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe \"The HTML Inline Frame element (<iframe>) represents a nested browsing context, embedding another HTML page into the current one.\").\n\nHTML5: This value can be overridden by a [`formtarget`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formtarget) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "accept",
	                        "description": "A comma-separated list of content types that the server accepts.\n\n**Usage note:** This attribute has been removed in HTML5 and should no longer be used. Instead, use the [`accept`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept) attribute of the specific [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
	                    },
	                    {
	                        "name": "autocapitalize",
	                        "description": "This is a nonstandard attribute used by iOS Safari Mobile which controls whether and how the text value for textual form control descendants should be automatically capitalized as it is entered/edited by the user. If the `autocapitalize` attribute is specified on an individual form control descendant, it trumps the form-wide `autocapitalize` setting. The non-deprecated values are available in iOS 5 and later. The default value is `sentences`. Possible values are:\n\n*   `none`: Completely disables automatic capitalization\n*   `sentences`: Automatically capitalize the first letter of sentences.\n*   `words`: Automatically capitalize the first letter of words.\n*   `characters`: Automatically capitalize all characters.\n*   `on`: Deprecated since iOS 5.\n*   `off`: Deprecated since iOS 5."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/form"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S3",
	                    "SM2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "label",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The label element represents a caption in a user interface. The caption can be associated with a specific form control, known as the label element's labeled control, either using the for attribute, or by putting the form control inside the label element itself."
	                },
	                "attributes": [
	                    {
	                        "name": "form",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element with which the label is associated (its _form owner_). If specified, the value of the attribute is the `id` of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element in the same document. This lets you place label elements anywhere within a document, not just as descendants of their form elements."
	                        }
	                    },
	                    {
	                        "name": "for",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-id) of a [labelable](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Form_labelable) form-related element in the same document as the `<label>` element. The first element in the document with an `id` matching the value of the `for` attribute is the _labeled control_ for this label element, if it is a labelable element. If it is not labelable then the `for` attribute has no effect. If there are other elements which also match the `id` value, later in the document, they are not considered.\n\n**Note**: A `<label>` element can have both a `for` attribute and a contained control element, as long as the `for` attribute points to the contained control element."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/label"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "input",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The input element represents a typed data field, usually with a form control to allow the user to edit the data."
	                },
	                "void": true,
	                "attributes": [
	                    {
	                        "name": "accept",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "alt",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "autocomplete",
	                        "valueSet": "inputautocomplete",
	                        "browsers": [
	                            "C14",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "autofocus",
	                        "valueSet": "v"
	                    },
	                    {
	                        "name": "checked",
	                        "valueSet": "v",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "dirname",
	                        "browsers": [
	                            "C17",
	                            "CA18",
	                            "E79",
	                            "FF116",
	                            "FFA116",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "low",
	                            "baseline_low_date": "2023-08-01"
	                        }
	                    },
	                    {
	                        "name": "disabled",
	                        "valueSet": "v",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "form",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "formaction",
	                        "browsers": [
	                            "C9",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5",
	                            "SM4.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "formenctype",
	                        "valueSet": "et",
	                        "browsers": [
	                            "C9",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5",
	                            "SM4.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "formmethod",
	                        "valueSet": "fm",
	                        "browsers": [
	                            "C9",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5",
	                            "SM4.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "formnovalidate",
	                        "valueSet": "v",
	                        "browsers": [
	                            "C4",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5",
	                            "SM4"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "formtarget",
	                        "browsers": [
	                            "C9",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5",
	                            "SM4.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "height"
	                    },
	                    {
	                        "name": "inputmode",
	                        "valueSet": "im"
	                    },
	                    {
	                        "name": "list",
	                        "browsers": [
	                            "C20",
	                            "CA25",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S12.1",
	                            "SM12.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2019-03-25",
	                            "baseline_high_date": "2021-09-25"
	                        }
	                    },
	                    {
	                        "name": "max",
	                        "browsers": [
	                            "C4",
	                            "CA18",
	                            "E12",
	                            "FF16",
	                            "FFA16",
	                            "S5",
	                            "SM4"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "maxlength",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "min",
	                        "browsers": [
	                            "C4",
	                            "CA18",
	                            "E12",
	                            "FF16",
	                            "FFA16",
	                            "S5",
	                            "SM4"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "minlength",
	                        "browsers": [
	                            "C40",
	                            "CA40",
	                            "E17",
	                            "FF51",
	                            "FFA51",
	                            "S10.1",
	                            "SM10.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2018-04-30",
	                            "baseline_high_date": "2020-10-30"
	                        }
	                    },
	                    {
	                        "name": "multiple",
	                        "valueSet": "v",
	                        "browsers": [
	                            "C2",
	                            "CA18",
	                            "E12",
	                            "FF3.6",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "name",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "pattern",
	                        "browsers": [
	                            "C4",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5",
	                            "SM4"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "placeholder",
	                        "browsers": [
	                            "C3",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "popovertarget",
	                        "browsers": [
	                            "C114",
	                            "CA114",
	                            "E114",
	                            "FF125",
	                            "FFA125",
	                            "S17",
	                            "SM17"
	                        ],
	                        "status": {
	                            "baseline": "low",
	                            "baseline_low_date": "2024-04-16"
	                        }
	                    },
	                    {
	                        "name": "popovertargetaction",
	                        "browsers": [
	                            "C114",
	                            "CA114",
	                            "E114",
	                            "FF125",
	                            "FFA125",
	                            "S17",
	                            "SM17"
	                        ],
	                        "status": {
	                            "baseline": "low",
	                            "baseline_low_date": "2024-04-16"
	                        }
	                    },
	                    {
	                        "name": "readonly",
	                        "valueSet": "v",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "required",
	                        "valueSet": "v",
	                        "browsers": [
	                            "C4",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5",
	                            "SM4"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "size",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "src",
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S1",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "step",
	                        "browsers": [
	                            "C5",
	                            "CA18",
	                            "E12",
	                            "FF16",
	                            "FFA16",
	                            "S5",
	                            "SM4"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "type",
	                        "valueSet": "t"
	                    },
	                    {
	                        "name": "value"
	                    },
	                    {
	                        "name": "width"
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/input"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "button",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The button element represents a button labeled by its contents."
	                },
	                "attributes": [
	                    {
	                        "name": "autofocus",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute lets you specify that the button should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form-associated element in a document can have this attribute specified."
	                        }
	                    },
	                    {
	                        "name": "disabled",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute indicates that the user cannot interact with the button. If this attribute is not specified, the button inherits its setting from the containing element, for example [`<fieldset>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset \"The HTML <fieldset> element is used to group several controls as well as labels (<label>) within a web form.\"); if there is no containing element with the **disabled** attribute set, then the button is enabled.\n\nFirefox will, unlike other browsers, by default, [persist the dynamic disabled state](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) of a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") across page loads. Use the [`autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-autocomplete) attribute to control this feature."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "form",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The form element that the button is associated with (its _form owner_). The value of the attribute must be the **id** attribute of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element in the same document. If this attribute is not specified, the `<button>` element will be associated to an ancestor [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element, if one exists. This attribute enables you to associate `<button>` elements to [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") elements anywhere within a document, not just as descendants of [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") elements."
	                        },
	                        "browsers": [
	                            "C9",
	                            "CA18",
	                            "E16",
	                            "FF4",
	                            "FFA4",
	                            "S5.1",
	                            "SM5"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2017-10-17",
	                            "baseline_high_date": "2020-04-17"
	                        }
	                    },
	                    {
	                        "name": "formaction",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The URI of a program that processes the information submitted by the button. If specified, it overrides the [`action`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-action) attribute of the button's form owner."
	                        },
	                        "browsers": [
	                            "C9",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5.1",
	                            "SM5"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "formenctype",
	                        "valueSet": "et",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "If the button is a submit button, this attribute specifies the type of content that is used to submit the form to the server. Possible values are:\n\n*   `application/x-www-form-urlencoded`: The default value if the attribute is not specified.\n*   `multipart/form-data`: Use this value if you are using an [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element with the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-type) attribute set to `file`.\n*   `text/plain`\n\nIf this attribute is specified, it overrides the [`enctype`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-enctype) attribute of the button's form owner."
	                        },
	                        "browsers": [
	                            "C9",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5.1",
	                            "SM5"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "formmethod",
	                        "valueSet": "fm",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "If the button is a submit button, this attribute specifies the HTTP method that the browser uses to submit the form. Possible values are:\n\n*   `post`: The data from the form are included in the body of the form and sent to the server.\n*   `get`: The data from the form are appended to the **form** attribute URI, with a '?' as a separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.\n\nIf specified, this attribute overrides the [`method`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-method) attribute of the button's form owner."
	                        },
	                        "browsers": [
	                            "C9",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5.1",
	                            "SM5"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "formnovalidate",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the [`novalidate`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-novalidate) attribute of the button's form owner."
	                        },
	                        "browsers": [
	                            "C9",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5.1",
	                            "SM5"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "formtarget",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "If the button is a submit button, this attribute is a name or keyword indicating where to display the response that is received after submitting the form. This is a name of, or keyword for, a _browsing context_ (for example, tab, window, or inline frame). If this attribute is specified, it overrides the [`target`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-target) attribute of the button's form owner. The following keywords have special meanings:\n\n*   `_self`: Load the response into the same browsing context as the current one. This value is the default if the attribute is not specified.\n*   `_blank`: Load the response into a new unnamed browsing context.\n*   `_parent`: Load the response into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n*   `_top`: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`."
	                        },
	                        "browsers": [
	                            "C9",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5.1",
	                            "SM5"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "name",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The name of the button, which is submitted with the form data."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "popovertarget",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Turns the button into a popover control button; takes the ID of the popover element to control as its value."
	                        },
	                        "browsers": [
	                            "C114",
	                            "CA114",
	                            "E114",
	                            "FF125",
	                            "FFA125",
	                            "S17",
	                            "SM17"
	                        ],
	                        "status": {
	                            "baseline": "low",
	                            "baseline_low_date": "2024-04-16"
	                        }
	                    },
	                    {
	                        "name": "popovertargetaction",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Specifies the action to be performed on a popover element being controlled by the button."
	                        },
	                        "browsers": [
	                            "C114",
	                            "CA114",
	                            "E114",
	                            "FF125",
	                            "FFA125",
	                            "S17",
	                            "SM17"
	                        ],
	                        "status": {
	                            "baseline": "low",
	                            "baseline_low_date": "2024-04-16"
	                        }
	                    },
	                    {
	                        "name": "type",
	                        "valueSet": "bt",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The type of the button. Possible values are:\n\n*   `submit`: The button submits the form data to the server. This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value.\n*   `reset`: The button resets all the controls to their initial values.\n*   `button`: The button has no default behavior. It can have client-side scripts associated with the element's events, which are triggered when the events occur."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "value",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The initial value of the button. It defines the value associated with the button which is submitted with the form data. This value is passed to the server in params when the form is submitted."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "autocomplete",
	                        "description": "The use of this attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") is nonstandard and Firefox-specific. By default, unlike other browsers, [Firefox persists the dynamic disabled state](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) of a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") across page loads. Setting the value of this attribute to `off` (i.e. `autocomplete=\"off\"`) disables this feature. See [bug 654072](https://bugzilla.mozilla.org/show_bug.cgi?id=654072 \"if disabled state is changed with javascript, the normal state doesn't return after refreshing the page\")."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/button"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "select",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The select element represents a control for selecting amongst a set of options."
	                },
	                "attributes": [
	                    {
	                        "name": "autocomplete",
	                        "valueSet": "inputautocomplete",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A [`DOMString`](https://developer.mozilla.org/en-US/docs/Web/API/DOMString \"DOMString is a UTF-16 String. As JavaScript already uses such strings, DOMString is mapped directly to a String.\") providing a hint for a [user agent's](https://developer.mozilla.org/en-US/docs/Glossary/user_agent \"user agent's: A user agent is a computer program representing a person, for example, a browser in a Web context.\") autocomplete feature. See [The HTML autocomplete attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for a complete list of values and details on how to use autocomplete."
	                        },
	                        "browsers": [
	                            "C66",
	                            "CA66",
	                            "E79",
	                            "FF59",
	                            "FFA59",
	                            "S9.1",
	                            "SM9.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-01-15",
	                            "baseline_high_date": "2022-07-15"
	                        }
	                    },
	                    {
	                        "name": "autofocus",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form element in a document can have the `autofocus` attribute."
	                        }
	                    },
	                    {
	                        "name": "disabled",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example `fieldset`; if there is no containing element with the `disabled` attribute set, then the control is enabled."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "form",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute lets you specify the form element to which the select element is associated (that is, its \"form owner\"). If this attribute is specified, its value must be the same as the `id` of a form element in the same document. This enables you to place select elements anywhere within a document, not just as descendants of their form elements."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "multiple",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute indicates that multiple options can be selected in the list. If it is not specified, then only one option can be selected at a time. When `multiple` is specified, most browsers will show a scrolling list box instead of a single line dropdown."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "name",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute is used to specify the name of the control."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "required",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A Boolean attribute indicating that an option with a non-empty string value must be selected."
	                        },
	                        "browsers": [
	                            "C10",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5.1",
	                            "SM5"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "size",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "If the control is presented as a scrolling list box (e.g. when `multiple` is specified), this attribute represents the number of rows in the list that should be visible at one time. Browsers are not required to present a select element as a scrolled list box. The default value is 0.\n\n**Note:** According to the HTML5 specification, the default value for size should be 1; however, in practice, this has been found to break some web sites, and no other browser currently does that, so Mozilla has opted to continue to return 0 for the time being with Firefox."
	                        },
	                        "browsers": [
	                            "C1",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S3"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/select"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "datalist",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The datalist element represents a set of option elements that represent predefined options for other controls. In the rendering, the datalist element represents nothing and it, along with its children, should be hidden."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/datalist"
	                    }
	                ],
	                "browsers": [
	                    "C20",
	                    "CA33",
	                    "E12",
	                    "S12.1",
	                    "SM12.2"
	                ],
	                "status": {
	                    "baseline": false
	                }
	            },
	            {
	                "name": "optgroup",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The optgroup element represents a group of option elements with a common label."
	                },
	                "attributes": [
	                    {
	                        "name": "disabled",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "If this Boolean attribute is set, none of the items in this option group is selectable. Often browsers grey out such control and it won't receive any browsing events, like mouse clicks or focus-related ones."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "label",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The name of the group of options, which the browser can use when labeling the options in the user interface. This attribute is mandatory if this element is used."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/optgroup"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "option",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The option element represents an option in a select element or as part of a list of suggestions in a datalist element."
	                },
	                "attributes": [
	                    {
	                        "name": "disabled",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "If this Boolean attribute is set, this option is not checkable. Often browsers grey out such control and it won't receive any browsing event, like mouse clicks or focus-related ones. If this attribute is not set, the element can still be disabled if one of its ancestors is a disabled [`<optgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup \"The HTML <optgroup> element creates a grouping of options within a <select> element.\") element."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "label",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute is text for the label indicating the meaning of the option. If the `label` attribute isn't defined, its value is that of the element text content."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "selected",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "If present, this Boolean attribute indicates that the option is initially selected. If the `<option>` element is the descendant of a [`<select>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select \"The HTML <select> element represents a control that provides a menu of options\") element whose [`multiple`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple) attribute is not set, only one single `<option>` of this [`<select>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select \"The HTML <select> element represents a control that provides a menu of options\") element may have the `selected` attribute."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "value",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The content of this attribute represents the value to be submitted with the form, should this option be selected. If this attribute is omitted, the value is taken from the text content of the option element."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/option"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "textarea",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The textarea element represents a multiline plain text edit control for the element's raw value. The contents of the control represent the control's default value."
	                },
	                "attributes": [
	                    {
	                        "name": "autocomplete",
	                        "valueSet": "inputautocomplete",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute indicates whether the value of the control can be automatically completed by the browser. Possible values are:\n\n*   `off`: The user must explicitly enter a value into this field for every use, or the document provides its own auto-completion method; the browser does not automatically complete the entry.\n*   `on`: The browser can automatically complete the value based on values that the user has entered during previous uses.\n\nIf the `autocomplete` attribute is not specified on a `<textarea>` element, then the browser uses the `autocomplete` attribute value of the `<textarea>` element's form owner. The form owner is either the [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element that this `<textarea>` element is a descendant of or the form element whose `id` is specified by the `form` attribute of the input element. For more information, see the [`autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-autocomplete) attribute in [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\")."
	                        },
	                        "browsers": [
	                            "C66",
	                            "CA66",
	                            "E79",
	                            "FF59",
	                            "FFA59",
	                            "S9.1",
	                            "SM9.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-01-15",
	                            "baseline_high_date": "2022-07-15"
	                        }
	                    },
	                    {
	                        "name": "autofocus",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form-associated element in a document can have this attribute specified."
	                        }
	                    },
	                    {
	                        "name": "cols",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is `20`."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "dirname",
	                        "browsers": [
	                            "C17",
	                            "CA18",
	                            "E79",
	                            "FF116",
	                            "FFA116",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "low",
	                            "baseline_low_date": "2023-08-01"
	                        }
	                    },
	                    {
	                        "name": "disabled",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example [`<fieldset>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset \"The HTML <fieldset> element is used to group several controls as well as labels (<label>) within a web form.\"); if there is no containing element when the `disabled` attribute is set, the control is enabled."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "form",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The form element that the `<textarea>` element is associated with (its \"form owner\"). The value of the attribute must be the `id` of a form element in the same document. If this attribute is not specified, the `<textarea>` element must be a descendant of a form element. This attribute enables you to place `<textarea>` elements anywhere within a document, not just as descendants of form elements."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "inputmode",
	                        "valueSet": "im"
	                    },
	                    {
	                        "name": "maxlength",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The maximum number of characters (unicode code points) that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters."
	                        },
	                        "browsers": [
	                            "C4",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5",
	                            "SM4.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "minlength",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The minimum number of characters (unicode code points) required that the user should enter."
	                        },
	                        "browsers": [
	                            "C40",
	                            "CA40",
	                            "E17",
	                            "FF51",
	                            "FFA51",
	                            "S10.1",
	                            "SM10.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2018-04-30",
	                            "baseline_high_date": "2020-10-30"
	                        }
	                    },
	                    {
	                        "name": "name",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The name of the control."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "placeholder",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A hint to the user of what can be entered in the control. Carriage returns or line-feeds within the placeholder text must be treated as line breaks when rendering the hint.\n\n**Note:** Placeholders should only be used to show an example of the type of data that should be entered into a form; they are _not_ a substitute for a proper [`<label>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label \"The HTML <label> element represents a caption for an item in a user interface.\") element tied to the input. See [Labels and placeholders](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Labels_and_placeholders \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") in [<input>: The Input (Form Input) element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") for a full explanation."
	                        },
	                        "browsers": [
	                            "C4",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5",
	                            "SM5"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "readonly",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute indicates that the user cannot modify the value of the control. Unlike the `disabled` attribute, the `readonly` attribute does not prevent the user from clicking or selecting in the control. The value of a read-only control is still submitted with the form."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "required",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute specifies that the user must fill in a value before submitting a form."
	                        },
	                        "browsers": [
	                            "C4",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S5",
	                            "SM5"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "rows",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The number of visible text lines for the control."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "wrap",
	                        "valueSet": "w",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Indicates how the control wraps text. Possible values are:\n\n*   `hard`: The browser automatically inserts line breaks (CR+LF) so that each line has no more than the width of the control; the `cols` attribute must also be specified for this to take effect.\n*   `soft`: The browser ensures that all line breaks in the value consist of a CR+LF pair, but does not insert any additional line breaks.\n*   `off` : Like `soft` but changes appearance to `white-space: pre` so line segments exceeding `cols` are not wrapped and the `<textarea>` becomes horizontally scrollable.\n\nIf this attribute is not specified, `soft` is its default value."
	                        },
	                        "browsers": [
	                            "C16",
	                            "CA18",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "autocapitalize",
	                        "description": "This is a non-standard attribute supported by WebKit on iOS (therefore nearly all browsers running on iOS, including Safari, Firefox, and Chrome), which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user. The non-deprecated values are available in iOS 5 and later. Possible values are:\n\n*   `none`: Completely disables automatic capitalization.\n*   `sentences`: Automatically capitalize the first letter of sentences.\n*   `words`: Automatically capitalize the first letter of words.\n*   `characters`: Automatically capitalize all characters.\n*   `on`: Deprecated since iOS 5.\n*   `off`: Deprecated since iOS 5."
	                    },
	                    {
	                        "name": "spellcheck",
	                        "description": "Specifies whether the `<textarea>` is subject to spell checking by the underlying browser/OS. the value can be:\n\n*   `true`: Indicates that the element needs to have its spelling and grammar checked.\n*   `default` : Indicates that the element is to act according to a default behavior, possibly based on the parent element's own `spellcheck` value.\n*   `false` : Indicates that the element should not be spell checked.",
	                        "browsers": [
	                            "C9",
	                            "CA18",
	                            "E12",
	                            "FF2",
	                            "FFA4",
	                            "S5.1",
	                            "SM5"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/textarea"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "output",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The output element represents the result of a calculation performed by the application, or the result of a user action."
	                },
	                "attributes": [
	                    {
	                        "name": "for",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A space-separated list of other elements’ [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id)s, indicating that those elements contributed input values to (or otherwise affected) the calculation."
	                        },
	                        "browsers": [
	                            "C10",
	                            "CA18",
	                            "E18",
	                            "FF4",
	                            "FFA4",
	                            "S7",
	                            "SM7"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "≤2018-10-02",
	                            "baseline_high_date": "≤2021-04-02"
	                        }
	                    },
	                    {
	                        "name": "form",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The [form element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) that this element is associated with (its \"form owner\"). The value of the attribute must be an `id` of a form element in the same document. If this attribute is not specified, the output element must be a descendant of a form element. This attribute enables you to place output elements anywhere within a document, not just as descendants of their form elements."
	                        },
	                        "browsers": [
	                            "C10",
	                            "CA18",
	                            "E18",
	                            "FF4",
	                            "FFA4",
	                            "S7",
	                            "SM7"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "≤2018-10-02",
	                            "baseline_high_date": "≤2021-04-02"
	                        }
	                    },
	                    {
	                        "name": "name",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The name of the element, exposed in the [`HTMLFormElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement \"The HTMLFormElement interface represents a <form> element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements.\") API."
	                        },
	                        "browsers": [
	                            "C10",
	                            "CA18",
	                            "E18",
	                            "FF4",
	                            "FFA4",
	                            "S7",
	                            "SM7"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "≤2018-10-02",
	                            "baseline_high_date": "≤2021-04-02"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/output"
	                    }
	                ],
	                "browsers": [
	                    "C10",
	                    "CA18",
	                    "E18",
	                    "FF4",
	                    "FFA4",
	                    "S7",
	                    "SM7"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "≤2018-10-02",
	                    "baseline_high_date": "≤2021-04-02"
	                }
	            },
	            {
	                "name": "progress",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The progress element represents the completion progress of a task. The progress is either indeterminate, indicating that progress is being made but that it is not clear how much more work remains to be done before the task is complete (e.g. because the task is waiting for a remote host to respond), or the progress is a number in the range zero to a maximum, giving the fraction of work that has so far been completed."
	                },
	                "attributes": [
	                    {
	                        "name": "value",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute specifies how much of the task that has been completed. It must be a valid floating point number between 0 and `max`, or between 0 and 1 if `max` is omitted. If there is no `value` attribute, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take."
	                        },
	                        "browsers": [
	                            "C6",
	                            "CA18",
	                            "E12",
	                            "FF6",
	                            "FFA6",
	                            "S6",
	                            "SM7"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "max",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute describes how much work the task indicated by the `progress` element requires. The `max` attribute, if present, must have a value greater than zero and be a valid floating point number. The default value is 1."
	                        },
	                        "browsers": [
	                            "C6",
	                            "CA18",
	                            "E12",
	                            "FF6",
	                            "FFA6",
	                            "S6",
	                            "SM7"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/progress"
	                    }
	                ],
	                "browsers": [
	                    "C6",
	                    "CA18",
	                    "E12",
	                    "FF6",
	                    "FFA6",
	                    "S6",
	                    "SM7"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "meter",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The meter element represents a scalar measurement within a known range, or a fractional value; for example disk usage, the relevance of a query result, or the fraction of a voting population to have selected a particular candidate."
	                },
	                "attributes": [
	                    {
	                        "name": "value",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The current numeric value. This must be between the minimum and maximum values (`min` attribute and `max` attribute) if they are specified. If unspecified or malformed, the value is 0. If specified, but not within the range given by the `min` attribute and `max` attribute, the value is equal to the nearest end of the range.\n\n**Usage note:** Unless the `value` attribute is between `0` and `1` (inclusive), the `min` and `max` attributes should define the range so that the `value` attribute's value is within it."
	                        },
	                        "browsers": [
	                            "C6",
	                            "CA18",
	                            "E13",
	                            "FF16",
	                            "FFA16",
	                            "S6",
	                            "SM10.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2017-03-27",
	                            "baseline_high_date": "2019-09-27"
	                        }
	                    },
	                    {
	                        "name": "min",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The lower numeric bound of the measured range. This must be less than the maximum value (`max` attribute), if specified. If unspecified, the minimum value is 0."
	                        },
	                        "browsers": [
	                            "C6",
	                            "CA18",
	                            "E13",
	                            "FF16",
	                            "FFA16",
	                            "S6",
	                            "SM10.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2017-03-27",
	                            "baseline_high_date": "2019-09-27"
	                        }
	                    },
	                    {
	                        "name": "max",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The upper numeric bound of the measured range. This must be greater than the minimum value (`min` attribute), if specified. If unspecified, the maximum value is 1."
	                        },
	                        "browsers": [
	                            "C6",
	                            "CA18",
	                            "E13",
	                            "FF16",
	                            "FFA16",
	                            "S6",
	                            "SM10.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2017-03-27",
	                            "baseline_high_date": "2019-09-27"
	                        }
	                    },
	                    {
	                        "name": "low",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The upper numeric bound of the low end of the measured range. This must be greater than the minimum value (`min` attribute), and it also must be less than the high value and maximum value (`high` attribute and `max` attribute, respectively), if any are specified. If unspecified, or if less than the minimum value, the `low` value is equal to the minimum value."
	                        },
	                        "browsers": [
	                            "C6",
	                            "CA18",
	                            "E13",
	                            "FF16",
	                            "FFA16",
	                            "S6",
	                            "SM10.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2017-03-27",
	                            "baseline_high_date": "2019-09-27"
	                        }
	                    },
	                    {
	                        "name": "high",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The lower numeric bound of the high end of the measured range. This must be less than the maximum value (`max` attribute), and it also must be greater than the low value and minimum value (`low` attribute and **min** attribute, respectively), if any are specified. If unspecified, or if greater than the maximum value, the `high` value is equal to the maximum value."
	                        },
	                        "browsers": [
	                            "C6",
	                            "CA18",
	                            "E13",
	                            "FF16",
	                            "FFA16",
	                            "S6",
	                            "SM10.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2017-03-27",
	                            "baseline_high_date": "2019-09-27"
	                        }
	                    },
	                    {
	                        "name": "optimum",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute indicates the optimal numeric value. It must be within the range (as defined by the `min` attribute and `max` attribute). When used with the `low` attribute and `high` attribute, it gives an indication where along the range is considered preferable. For example, if it is between the `min` attribute and the `low` attribute, then the lower range is considered preferred."
	                        },
	                        "browsers": [
	                            "C6",
	                            "CA18",
	                            "E13",
	                            "FF16",
	                            "FFA16",
	                            "S6",
	                            "SM10.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2017-03-27",
	                            "baseline_high_date": "2019-09-27"
	                        }
	                    },
	                    {
	                        "name": "form",
	                        "description": "This attribute associates the element with a `form` element that has ownership of the `meter` element. For example, a `meter` might be displaying a range corresponding to an `input` element of `type` _number_. This attribute is only used if the `meter` element is being used as a form-associated element; even then, it may be omitted if the element appears as a descendant of a `form` element."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/meter"
	                    }
	                ],
	                "browsers": [
	                    "C6",
	                    "CA18",
	                    "E13",
	                    "FF16",
	                    "FFA16",
	                    "S6",
	                    "SM10.3"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2017-03-27",
	                    "baseline_high_date": "2019-09-27"
	                }
	            },
	            {
	                "name": "fieldset",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The fieldset element represents a set of form controls optionally grouped under a common name."
	                },
	                "attributes": [
	                    {
	                        "name": "disabled",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "If this Boolean attribute is set, all form controls that are descendants of the `<fieldset>`, are disabled, meaning they are not editable and won't be submitted along with the `<form>`. They won't receive any browsing events, like mouse clicks or focus-related events. By default browsers display such controls grayed out. Note that form elements inside the [`<legend>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend \"The HTML <legend> element represents a caption for the content of its parent <fieldset>.\") element won't be disabled."
	                        },
	                        "browsers": [
	                            "C20",
	                            "CA25",
	                            "E79",
	                            "FF4",
	                            "FFA4",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-01-15",
	                            "baseline_high_date": "2022-07-15"
	                        }
	                    },
	                    {
	                        "name": "form",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute takes the value of the `id` attribute of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element you want the `<fieldset>` to be part of, even if it is not inside the form."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "name",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The name associated with the group.\n\n**Note**: The caption for the fieldset is given by the first [`<legend>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend \"The HTML <legend> element represents a caption for the content of its parent <fieldset>.\") element nested inside it."
	                        },
	                        "browsers": [
	                            "C19",
	                            "CA25",
	                            "E12",
	                            "FF4",
	                            "FFA4",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/fieldset"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "legend",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The legend element represents a caption for the rest of the contents of the legend element's parent fieldset element, if any."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/legend"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S3",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "details",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The details element represents a disclosure widget from which the user can obtain additional information or controls."
	                },
	                "attributes": [
	                    {
	                        "name": "open",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute indicates whether or not the details — that is, the contents of the `<details>` element — are currently visible. The default, `false`, means the details are not visible."
	                        },
	                        "browsers": [
	                            "C12",
	                            "CA18",
	                            "E79",
	                            "FF49",
	                            "FFA49",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-01-15",
	                            "baseline_high_date": "2022-07-15"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/details"
	                    }
	                ],
	                "browsers": [
	                    "C12",
	                    "CA18",
	                    "E79",
	                    "FF49",
	                    "FFA49",
	                    "S6",
	                    "SM6"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2020-01-15",
	                    "baseline_high_date": "2022-07-15"
	                }
	            },
	            {
	                "name": "summary",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The summary element represents a summary, caption, or legend for the rest of the contents of the summary element's parent details element, if any."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/summary"
	                    }
	                ],
	                "browsers": [
	                    "C12",
	                    "CA18",
	                    "E79",
	                    "FF49",
	                    "FFA49",
	                    "S6",
	                    "SM6"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2020-01-15",
	                    "baseline_high_date": "2022-07-15"
	                }
	            },
	            {
	                "name": "dialog",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The dialog element represents a part of an application that a user interacts with to perform a task, for example a dialog box, inspector, or window."
	                },
	                "attributes": [
	                    {
	                        "name": "open",
	                        "description": "Indicates that the dialog is active and available for interaction. When the `open` attribute is not set, the dialog shouldn't be shown to the user.",
	                        "browsers": [
	                            "C37",
	                            "CA37",
	                            "E79",
	                            "FF98",
	                            "FFA98",
	                            "S15.4",
	                            "SM15.4"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2022-03-14",
	                            "baseline_high_date": "2024-09-14"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/dialog"
	                    }
	                ],
	                "browsers": [
	                    "C37",
	                    "CA37",
	                    "E79",
	                    "FF98",
	                    "FFA98",
	                    "S15.4",
	                    "SM15.4"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2022-03-14",
	                    "baseline_high_date": "2024-09-14"
	                }
	            },
	            {
	                "name": "script",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The script element allows authors to include dynamic script and data blocks in their documents. The element does not represent content for the user."
	                },
	                "attributes": [
	                    {
	                        "name": "src",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute specifies the URI of an external script; this can be used as an alternative to embedding a script directly within a document.\n\nIf a `script` element has a `src` attribute specified, it should not have a script embedded inside its tags."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "type",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute indicates the type of script represented. The value of this attribute will be in one of the following categories:\n\n*   **Omitted or a JavaScript MIME type:** For HTML5-compliant browsers this indicates the script is JavaScript. HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type. In earlier browsers, this identified the scripting language of the embedded or imported (via the `src` attribute) code. JavaScript MIME types are [listed in the specification](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#JavaScript_types).\n*   **`module`:** For HTML5-compliant browsers the code is treated as a JavaScript module. The processing of the script contents is not affected by the `charset` and `defer` attributes. For information on using `module`, see [ES6 in Depth: Modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/). Code may behave differently when the `module` keyword is used.\n*   **Any other value:** The embedded content is treated as a data block which won't be processed by the browser. Developers must use a valid MIME type that is not a JavaScript MIME type to denote data blocks. The `src` attribute will be ignored.\n\n**Note:** in Firefox you could specify the version of JavaScript contained in a `<script>` element by including a non-standard `version` parameter inside the `type` attribute — for example `type=\"text/javascript;version=1.8\"`. This has been removed in Firefox 59 (see [bug 1428745](https://bugzilla.mozilla.org/show_bug.cgi?id=1428745 \"FIXED: Remove support for version parameter from script loader\"))."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "charset"
	                    },
	                    {
	                        "name": "async",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This is a Boolean attribute indicating that the browser should, if possible, load the script asynchronously.\n\nThis attribute must not be used if the `src` attribute is absent (i.e. for inline scripts). If it is included in this case it will have no effect.\n\nBrowsers usually assume the worst case scenario and load scripts synchronously, (i.e. `async=\"false\"`) during HTML parsing.\n\nDynamically inserted scripts (using [`document.createElement()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement \"In an HTML document, the document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized.\")) load asynchronously by default, so to turn on synchronous loading (i.e. scripts load in the order they were inserted) set `async=\"false\"`.\n\nSee [Browser compatibility](#Browser_compatibility) for notes on browser support. See also [Async scripts for asm.js](https://developer.mozilla.org/en-US/docs/Games/Techniques/Async_scripts)."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF3.6",
	                            "FFA4",
	                            "S4",
	                            "SM3.2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "defer",
	                        "valueSet": "v",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded \"/en-US/docs/Web/Events/DOMContentLoaded\").\n\nScripts with the `defer` attribute will prevent the `DOMContentLoaded` event from firing until the script has loaded and finished evaluating.\n\nThis attribute must not be used if the `src` attribute is absent (i.e. for inline scripts), in this case it would have no effect.\n\nTo achieve a similar effect for dynamically inserted scripts use `async=\"false\"` instead. Scripts with the `defer` attribute will execute in the order in which they appear in the document."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF3.5",
	                            "FFA4",
	                            "S3",
	                            "SM2"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "crossorigin",
	                        "valueSet": "xo",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Normal `script` elements pass minimal information to the [`window.onerror`](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror \"The onerror property of the GlobalEventHandlers mixin is an EventHandler that processes error events.\") for scripts which do not pass the standard [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS \"CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.\") checks. To allow error logging for sites which use a separate domain for static media, use this attribute. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for a more descriptive explanation of its valid arguments."
	                        },
	                        "browsers": [
	                            "C19",
	                            "CA25",
	                            "E14",
	                            "FF14",
	                            "FFA14",
	                            "S6",
	                            "SM6"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2016-08-02",
	                            "baseline_high_date": "2019-02-02"
	                        }
	                    },
	                    {
	                        "name": "nonce",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "A cryptographic nonce (number used once) to list the allowed inline scripts in a [script-src Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src). The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial."
	                        }
	                    },
	                    {
	                        "name": "integrity",
	                        "description": "This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).",
	                        "browsers": [
	                            "C45",
	                            "CA45",
	                            "E17",
	                            "FF43",
	                            "FFA43",
	                            "S11.1",
	                            "SM11.3"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2018-04-30",
	                            "baseline_high_date": "2020-10-30"
	                        }
	                    },
	                    {
	                        "name": "nomodule",
	                        "description": "This Boolean attribute is set to indicate that the script should not be executed in browsers that support [ES2015 modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/) — in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code.",
	                        "browsers": [
	                            "C61",
	                            "CA61",
	                            "E16",
	                            "FF60",
	                            "FFA60",
	                            "S11",
	                            "SM11"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2018-05-09",
	                            "baseline_high_date": "2020-11-09"
	                        }
	                    },
	                    {
	                        "name": "referrerpolicy",
	                        "description": "Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer) to send when fetching the script, or resources fetched by the script:\n\n*   `no-referrer`: The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n*   `no-referrer-when-downgrade` (default): The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent to [origin](https://developer.mozilla.org/en-US/docs/Glossary/origin \"origin: Web content's origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Two objects have the same origin only when the scheme, host, and port all match.\")s without [TLS](https://developer.mozilla.org/en-US/docs/Glossary/TLS \"TLS: Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.\") ([HTTPS](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS \"HTTPS: HTTPS (HTTP Secure) is an encrypted version of the HTTP protocol. It usually uses SSL or TLS to encrypt all communication between a client and a server. This secure connection allows clients to safely exchange sensitive data with a server, for example for banking activities or online shopping.\")).\n*   `origin`: The sent referrer will be limited to the origin of the referring page: its [scheme](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/URIScheme), [host](https://developer.mozilla.org/en-US/docs/Glossary/host \"host: A host is a device connected to the Internet (or a local network). Some hosts called servers offer additional services like serving webpages or storing files and emails.\"), and [port](https://developer.mozilla.org/en-US/docs/Glossary/port \"port: For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol.\").\n*   `origin-when-cross-origin`: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.\n*   `same-origin`: A referrer will be sent for [same origin](https://developer.mozilla.org/en-US/docs/Glossary/Same-origin_policy \"same origin: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.\"), but cross-origin requests will contain no referrer information.\n*   `strict-origin`: Only send the origin of the document as the referrer when the protocol security level stays the same (e.g. HTTPS→HTTPS), but don't send it to a less secure destination (e.g. HTTPS→HTTP).\n*   `strict-origin-when-cross-origin`: Send a full URL when performing a same-origin request, but only send the origin when the protocol security level stays the same (e.g.HTTPS→HTTPS), and send no header to a less secure destination (e.g. HTTPS→HTTP).\n*   `unsafe-url`: The referrer will include the origin _and_ the path (but not the [fragment](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/hash), [password](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/password), or [username](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/username)). **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins.\n\n**Note**: An empty string value (`\"\"`) is both the default value, and a fallback value if `referrerpolicy` is not supported. If `referrerpolicy` is not explicitly specified on the `<script>` element, it will adopt a higher-level referrer policy, i.e. one set on the whole document or domain. If a higher-level policy is not available, the empty string is treated as being equivalent to `no-referrer-when-downgrade`.",
	                        "browsers": [
	                            "C70",
	                            "CA70",
	                            "E79",
	                            "FF65",
	                            "FFA65",
	                            "S14",
	                            "SM14"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-09-16",
	                            "baseline_high_date": "2023-03-16"
	                        }
	                    },
	                    {
	                        "name": "text",
	                        "description": "Like the `textContent` attribute, this attribute sets the text content of the element. Unlike the `textContent` attribute, however, this attribute is evaluated as executable code after the node is inserted into the DOM."
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/script"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S3",
	                    "SM2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "noscript",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The noscript element represents nothing if scripting is enabled, and represents its children if scripting is disabled. It is used to present different markup to user agents that support scripting and those that don't support scripting, by affecting how the document is parsed."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/noscript"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S3",
	                    "SM2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "template",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The template element is used to declare fragments of HTML that can be cloned and inserted in the document by script."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/template"
	                    }
	                ],
	                "browsers": [
	                    "C26",
	                    "CA26",
	                    "E13",
	                    "FF22",
	                    "FFA22",
	                    "S8",
	                    "SM8"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-11-12",
	                    "baseline_high_date": "2018-05-12"
	                }
	            },
	            {
	                "name": "canvas",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The canvas element provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, art, or other visual images on the fly."
	                },
	                "attributes": [
	                    {
	                        "name": "width",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The width of the coordinate space in CSS pixels. Defaults to 300."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1.5",
	                            "FFA4",
	                            "S2",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "height",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The height of the coordinate space in CSS pixels. Defaults to 150."
	                        },
	                        "browsers": [
	                            "C1",
	                            "CA18",
	                            "E12",
	                            "FF1.5",
	                            "FFA4",
	                            "S2",
	                            "SM1"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2015-07-29",
	                            "baseline_high_date": "2018-01-29"
	                        }
	                    },
	                    {
	                        "name": "moz-opaque",
	                        "description": "Lets the canvas know whether or not translucency will be a factor. If the canvas knows there's no translucency, painting performance can be optimized. This is only supported by Mozilla-based browsers; use the standardized [`canvas.getContext('2d', { alpha: false })`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext \"The HTMLCanvasElement.getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\") instead.",
	                        "browsers": [
	                            "FF3.5",
	                            "FFA4"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/canvas"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1.5",
	                    "FFA4",
	                    "S2",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "slot",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The slot element is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together."
	                },
	                "attributes": [
	                    {
	                        "name": "name",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "The slot's name.\nA **named slot** is a `<slot>` element with a `name` attribute."
	                        },
	                        "browsers": [
	                            "C53",
	                            "CA53",
	                            "E79",
	                            "FF63",
	                            "FFA63",
	                            "S10",
	                            "SM10"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2020-01-15",
	                            "baseline_high_date": "2022-07-15"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/slot"
	                    }
	                ],
	                "browsers": [
	                    "C53",
	                    "CA53",
	                    "E79",
	                    "FF63",
	                    "FFA63",
	                    "S10",
	                    "SM10"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2020-01-15",
	                    "baseline_high_date": "2022-07-15"
	                }
	            },
	            {
	                "name": "data",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The data element links a given piece of content with a machine-readable translation."
	                },
	                "attributes": [
	                    {
	                        "name": "value",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "This attribute specifies the machine-readable translation of the content of the element."
	                        },
	                        "browsers": [
	                            "C62",
	                            "CA62",
	                            "E14",
	                            "FF22",
	                            "FFA22",
	                            "S10",
	                            "SM10"
	                        ],
	                        "status": {
	                            "baseline": "high",
	                            "baseline_low_date": "2017-10-24",
	                            "baseline_high_date": "2020-04-24"
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/data"
	                    }
	                ],
	                "browsers": [
	                    "C62",
	                    "CA62",
	                    "E14",
	                    "FF22",
	                    "FFA22",
	                    "S10",
	                    "SM10"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2017-10-24",
	                    "baseline_high_date": "2020-04-24"
	                }
	            },
	            {
	                "name": "hgroup",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The hgroup element represents a heading and related content. It groups a single h1–h6 element with one or more p."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/hgroup"
	                    }
	                ],
	                "browsers": [
	                    "C5",
	                    "CA18",
	                    "E12",
	                    "FF4",
	                    "FFA4",
	                    "S5",
	                    "SM4.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "menu",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The menu element represents an unordered list of interactive items."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/menu"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S3",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "search",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The search element represents the parts of the document or application with form controls or other content related to performing a search or filtering operation."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/search"
	                    }
	                ],
	                "browsers": [
	                    "C118",
	                    "CA118",
	                    "E118",
	                    "FF118",
	                    "FFA118",
	                    "S17",
	                    "SM17"
	                ],
	                "status": {
	                    "baseline": "low",
	                    "baseline_low_date": "2023-10-13"
	                }
	            },
	            {
	                "name": "fencedframe",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The fencedframe element represents a nested browsing context, embedding another HTML page into the current one."
	                },
	                "attributes": [
	                    {
	                        "name": "allow",
	                        "browsers": [
	                            "C115",
	                            "CA115",
	                            "E115"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "height",
	                        "browsers": [
	                            "C115",
	                            "CA115",
	                            "E115"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    },
	                    {
	                        "name": "width",
	                        "browsers": [
	                            "C115",
	                            "CA115",
	                            "E115"
	                        ],
	                        "status": {
	                            "baseline": false
	                        }
	                    }
	                ],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/fencedframe"
	                    }
	                ],
	                "browsers": [
	                    "C115",
	                    "CA115",
	                    "E115"
	                ],
	                "status": {
	                    "baseline": false
	                }
	            },
	            {
	                "name": "selectedcontent",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The selectedcontent element can be used to display the content of the currently selected option element inside of a closed select element."
	                },
	                "attributes": [],
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/selectedcontent"
	                    }
	                ],
	                "browsers": [
	                    "C134",
	                    "CA134",
	                    "E134"
	                ],
	                "status": {
	                    "baseline": false
	                }
	            }
	        ],
	        "globalAttributes": [
	            {
	                "name": "accesskey",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a space-separated list of characters. The browser should use the first one that exists on the computer keyboard layout."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/accesskey"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "autocapitalize",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Controls whether and how text input is automatically capitalized as it is entered/edited by the user. It can have the following values:\n\n*   `off` or `none`, no autocapitalization is applied (all letters default to lowercase)\n*   `on` or `sentences`, the first letter of each sentence defaults to a capital letter; all other letters default to lowercase\n*   `words`, the first letter of each word defaults to a capital letter; all other letters default to lowercase\n*   `characters`, all letters should default to uppercase"
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/autocapitalize"
	                    }
	                ],
	                "browsers": [
	                    "C43",
	                    "CA43",
	                    "E79",
	                    "FF111",
	                    "FFA111",
	                    "SM5"
	                ],
	                "status": {
	                    "baseline": false
	                }
	            },
	            {
	                "name": "autocorrect",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Controls whether autocorrection of editable text is enabled for spelling and/or punctuation errors."
	                },
	                "valueSet": "o",
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/autocorrect"
	                    }
	                ],
	                "browsers": [
	                    "FF136",
	                    "FFA136"
	                ],
	                "status": {
	                    "baseline": false
	                }
	            },
	            {
	                "name": "autofocus",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates that an element should be focused on page load, or when the [`<dialog>`](https://developer.mozilla.org/docs/Web/HTML/Element/dialog) that it is part of is displayed."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/autofocus"
	                    }
	                ],
	                "browsers": [
	                    "C79",
	                    "CA79",
	                    "E79",
	                    "FF110",
	                    "FFA110",
	                    "S15.4",
	                    "SM16.4"
	                ],
	                "status": {
	                    "baseline": "low",
	                    "baseline_low_date": "2023-03-27"
	                }
	            },
	            {
	                "name": "class",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the [class selectors](https://developer.mozilla.org/docs/Web/CSS/Class_selectors) or functions like the method [`Document.getElementsByClassName()`](https://developer.mozilla.org/docs/Web/API/Document/getElementsByClassName \"returns an array-like object of all child elements which have all of the given class names.\")."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/class"
	                    }
	                ]
	            },
	            {
	                "name": "contenteditable",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An enumerated attribute indicating if the element should be editable by the user. If so, the browser modifies its widget to allow editing. The attribute must take one of the following values:\n\n*   `true` or the _empty string_, which indicates that the element must be editable;\n*   `false`, which indicates that the element must not be editable."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/contenteditable"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF3",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "contextmenu",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The `[**id**](#attr-id)` of a [`<menu>`](https://developer.mozilla.org/docs/Web/HTML/Element/menu \"The HTML <menu> element represents a group of commands that a user can perform or activate. This includes both list menus, which might appear across the top of a screen, as well as context menus, such as those that might appear underneath a button after it has been clicked.\") to use as the contextual menu for this element."
	                }
	            },
	            {
	                "name": "dir",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An enumerated attribute indicating the directionality of the element's text. It can have the following values:\n\n*   `ltr`, which means _left to right_ and is to be used for languages that are written from the left to the right (like English);\n*   `rtl`, which means _right to left_ and is to be used for languages that are written from the right to the left (like Arabic);\n*   `auto`, which lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then it applies that directionality to the whole element."
	                },
	                "valueSet": "d",
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/dir"
	                    }
	                ]
	            },
	            {
	                "name": "draggable",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An enumerated attribute indicating whether the element can be dragged, using the [Drag and Drop API](https://developer.mozilla.org/docs/DragDrop/Drag_and_Drop). It can have the following values:\n\n*   `true`, which indicates that the element may be dragged\n*   `false`, which indicates that the element may not be dragged."
	                },
	                "valueSet": "b",
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/draggable"
	                    }
	                ]
	            },
	            {
	                "name": "dropzone",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An enumerated attribute indicating what types of content can be dropped on an element, using the [Drag and Drop API](https://developer.mozilla.org/docs/DragDrop/Drag_and_Drop). It can have the following values:\n\n*   `copy`, which indicates that dropping will create a copy of the element that was dragged\n*   `move`, which indicates that the element that was dragged will be moved to this new location.\n*   `link`, will create a link to the dragged data."
	                }
	            },
	            {
	                "name": "enterkeyhint",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An enumerated attribute defining what action label (or icon) to present for the enter key on virtual keyboards."
	                },
	                "valueSet": "enterkeyhint",
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/enterkeyhint"
	                    }
	                ],
	                "browsers": [
	                    "C77",
	                    "CA77",
	                    "E79",
	                    "FF94",
	                    "FFA94",
	                    "S13.1",
	                    "SM13.4"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2021-11-02",
	                    "baseline_high_date": "2024-05-02"
	                }
	            },
	            {
	                "name": "exportparts",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Used to transitively export shadow parts from a nested shadow tree into a containing light tree."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/exportparts"
	                    }
	                ],
	                "browsers": [
	                    "C73",
	                    "CA73",
	                    "E79",
	                    "FF72",
	                    "FFA79",
	                    "S13.1",
	                    "SM13.4"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2020-07-28",
	                    "baseline_high_date": "2023-01-28"
	                }
	            },
	            {
	                "name": "hidden",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A Boolean attribute indicates that the element is not yet, or is no longer, _relevant_. For example, it can be used to hide elements of the page that can't be used until the login process has been completed. The browser won't render such elements. This attribute must not be used to hide content that could legitimately be shown."
	                },
	                "valueSet": "v",
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/hidden"
	                    }
	                ]
	            },
	            {
	                "name": "id",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines a unique identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS)."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/id"
	                    }
	                ]
	            },
	            {
	                "name": "inert",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates that the element and all of its flat tree descendants become _inert_. Modal `<dialog>`s generated with [`showModal()`](https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/showModal) escape inertness, meaning that they don't inherit inertness from their ancestors, but can only be made inert by having the `inert` attribute explicitly set on themselves."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/inert"
	                    }
	                ],
	                "browsers": [
	                    "C102",
	                    "CA102",
	                    "E102",
	                    "FF112",
	                    "FFA112",
	                    "S15.5",
	                    "SM15.5"
	                ],
	                "status": {
	                    "baseline": "low",
	                    "baseline_low_date": "2023-04-11"
	                }
	            },
	            {
	                "name": "inputmode",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Provides a hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents. Used primarily on [`<input>`](https://developer.mozilla.org/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") elements, but is usable on any element while in `[contenteditable](https://developer.mozilla.org/docs/Web/HTML/Global_attributes#attr-contenteditable)` mode."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/inputmode"
	                    }
	                ],
	                "browsers": [
	                    "C66",
	                    "CA66",
	                    "E79",
	                    "FF95",
	                    "FFA79",
	                    "S12.1",
	                    "SM12.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2021-12-07",
	                    "baseline_high_date": "2024-06-07"
	                }
	            },
	            {
	                "name": "is",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Allows you to specify that a standard HTML element should behave like a registered custom built-in element (see [Using custom elements](https://developer.mozilla.org/docs/Web/Web_Components/Using_custom_elements) for more details)."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/is"
	                    }
	                ],
	                "browsers": [
	                    "C67",
	                    "CA67",
	                    "E79",
	                    "FF63",
	                    "FFA63"
	                ],
	                "status": {
	                    "baseline": false
	                }
	            },
	            {
	                "name": "itemid",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The unique, global identifier of an item."
	                }
	            },
	            {
	                "name": "itemprop",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Used to add properties to an item. Every HTML element may have an `itemprop` attribute specified, where an `itemprop` consists of a name and value pair."
	                }
	            },
	            {
	                "name": "itemref",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Properties that are not descendants of an element with the `itemscope` attribute can be associated with the item using an `itemref`. It provides a list of element ids (not `itemid`s) with additional properties elsewhere in the document."
	                }
	            },
	            {
	                "name": "itemscope",
	                "description": {
	                    "kind": "markdown",
	                    "value": "`itemscope` (usually) works along with `[itemtype](https://developer.mozilla.org/docs/Web/HTML/Global_attributes#attr-itemtype)` to specify that the HTML contained in a block is about a particular item. `itemscope` creates the Item and defines the scope of the `itemtype` associated with it. `itemtype` is a valid URL of a vocabulary (such as [schema.org](https://schema.org/)) that describes the item and its properties context."
	                },
	                "valueSet": "v"
	            },
	            {
	                "name": "itemtype",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Specifies the URL of the vocabulary that will be used to define `itemprop`s (item properties) in the data structure. `[itemscope](https://developer.mozilla.org/docs/Web/HTML/Global_attributes#attr-itemscope)` is used to set the scope of where in the data structure the vocabulary set by `itemtype` will be active."
	                }
	            },
	            {
	                "name": "lang",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Helps define the language of an element: the language that non-editable elements are in, or the language that editable elements should be written in by the user. The attribute contains one “language tag” (made of hyphen-separated “language subtags”) in the format defined in [_Tags for Identifying Languages (BCP47)_](https://www.ietf.org/rfc/bcp/bcp47.txt). [**xml:lang**](#attr-xml:lang) has priority over it."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/lang"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "nonce",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines a cryptographic nonce (\"number used once\") which can be used by [Content Security Policy](https://developer.mozilla.org/docs/Web/HTTP/Guides/CSP) to determine whether or not a given fetch will be allowed to proceed for a given element."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/nonce"
	                    }
	                ],
	                "browsers": [
	                    "C61",
	                    "CA61",
	                    "E79",
	                    "FF31",
	                    "FFA31",
	                    "S15.4",
	                    "SM15.4"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2022-03-14",
	                    "baseline_high_date": "2024-09-14"
	                }
	            },
	            {
	                "name": "part",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the [`::part`](https://developer.mozilla.org/docs/Web/CSS/::part \"The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute.\") pseudo-element."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/part"
	                    }
	                ],
	                "browsers": [
	                    "C73",
	                    "CA73",
	                    "E79",
	                    "FF72",
	                    "FFA79",
	                    "S13.1",
	                    "SM13.4"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2020-07-28",
	                    "baseline_high_date": "2023-01-28"
	                }
	            },
	            {
	                "name": "popover",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Designates an element as a popover element."
	                },
	                "valueSet": "popover",
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/popover"
	                    }
	                ],
	                "browsers": [
	                    "C114",
	                    "CA114",
	                    "E114",
	                    "FF125",
	                    "FFA125",
	                    "S17",
	                    "SM17"
	                ],
	                "status": {
	                    "baseline": "low",
	                    "baseline_low_date": "2024-04-16"
	                }
	            },
	            {
	                "name": "role",
	                "valueSet": "roles"
	            },
	            {
	                "name": "slot",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Assigns a slot in a [shadow DOM](https://developer.mozilla.org/docs/Web/Web_Components/Shadow_DOM) shadow tree to an element: An element with a `slot` attribute is assigned to the slot created by the [`<slot>`](https://developer.mozilla.org/docs/Web/HTML/Element/slot \"The HTML <slot> element—part of the Web Components technology suite—is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together.\") element whose `[name](https://developer.mozilla.org/docs/Web/HTML/Element/slot#attr-name)` attribute's value matches that `slot` attribute's value."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/slot"
	                    }
	                ],
	                "browsers": [
	                    "C53",
	                    "CA53",
	                    "E79",
	                    "FF63",
	                    "FFA63",
	                    "S10",
	                    "SM10"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "≤2020-01-15",
	                    "baseline_high_date": "≤2022-07-15"
	                }
	            },
	            {
	                "name": "spellcheck",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An enumerated attribute defines whether the element may be checked for spelling errors. It may have the following values:\n\n*   `true`, which indicates that the element should be, if possible, checked for spelling errors;\n*   `false`, which indicates that the element should not be checked for spelling errors."
	                },
	                "valueSet": "b",
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/spellcheck"
	                    }
	                ],
	                "browsers": [
	                    "C9",
	                    "CA47",
	                    "E12",
	                    "FF2",
	                    "FFA57",
	                    "S5.1",
	                    "SM9.3"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2017-11-28",
	                    "baseline_high_date": "2020-05-28"
	                }
	            },
	            {
	                "name": "style",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Contains [CSS](https://developer.mozilla.org/docs/Web/CSS) styling declarations to be applied to the element. Note that it is recommended for styles to be defined in a separate file or files. This attribute and the [`<style>`](https://developer.mozilla.org/docs/Web/HTML/Element/style \"The HTML <style> element contains style information for a document, or part of a document.\") element have mainly the purpose of allowing for quick styling, for example for testing purposes."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/style"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S1",
	                    "SM1"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "tabindex",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An integer attribute indicating if the element can take input focus (is _focusable_), if it should participate to sequential keyboard navigation, and if so, at what position. It can take several values:\n\n*   a _negative value_ means that the element should be focusable, but should not be reachable via sequential keyboard navigation;\n*   `0` means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention;\n*   a _positive value_ means that the element should be focusable and reachable via sequential keyboard navigation; the order in which the elements are focused is the increasing value of the [**tabindex**](#attr-tabindex). If several elements share the same tabindex, their relative order follows their relative positions in the document."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/tabindex"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1.5",
	                    "FFA4",
	                    "S3.1",
	                    "SM2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "title",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip."
	                },
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/title"
	                    }
	                ],
	                "browsers": [
	                    "C1",
	                    "CA18",
	                    "E12",
	                    "FF1",
	                    "FFA4",
	                    "S4",
	                    "SM3.2"
	                ],
	                "status": {
	                    "baseline": "high",
	                    "baseline_low_date": "2015-07-29",
	                    "baseline_high_date": "2018-01-29"
	                }
	            },
	            {
	                "name": "translate",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An enumerated attribute that is used to specify whether an element's attribute values and the values of its [`Text`](https://developer.mozilla.org/docs/Web/API/Text \"The Text interface represents the textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.\") node children are to be translated when the page is localized, or whether to leave them unchanged. It can have the following values:\n\n*   empty string and `yes`, which indicates that the element will be translated.\n*   `no`, which indicates that the element will not be translated."
	                },
	                "valueSet": "y",
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/translate"
	                    }
	                ],
	                "browsers": [
	                    "C19",
	                    "CA25",
	                    "E79",
	                    "FF111",
	                    "FFA111",
	                    "S6",
	                    "SM6"
	                ],
	                "status": {
	                    "baseline": "low",
	                    "baseline_low_date": "2023-03-14"
	                }
	            },
	            {
	                "name": "virtualkeyboardpolicy",
	                "description": {
	                    "kind": "markdown",
	                    "value": "When specified on an element that the element's content is editable (for example, it is an `<input>` or `<textarea>` element, or an element with the `contenteditable` attribute set), it controls the on-screen virtual keyboard behavior on devices such as tablets, mobile phones, or other devices where a hardware keyboard may not be available."
	                },
	                "valueSet": "b",
	                "references": [
	                    {
	                        "name": "MDN Reference",
	                        "url": "https://developer.mozilla.org/docs/Web/HTML/Reference/Global_attributes/virtualkeyboardpolicy"
	                    }
	                ],
	                "browsers": [
	                    "C94",
	                    "CA94",
	                    "E94"
	                ],
	                "status": {
	                    "baseline": false
	                }
	            },
	            {
	                "name": "onabort",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The loading of a resource has been aborted."
	                }
	            },
	            {
	                "name": "onblur",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An element has lost focus (does not bubble)."
	                }
	            },
	            {
	                "name": "oncanplay",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content."
	                }
	            },
	            {
	                "name": "oncanplaythrough",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The user agent can play the media up to its end without having to stop for further buffering of content."
	                }
	            },
	            {
	                "name": "onchange",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user."
	                }
	            },
	            {
	                "name": "onclick",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A pointing device button has been pressed and released on an element."
	                }
	            },
	            {
	                "name": "oncontextmenu",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The right button of the mouse is clicked (before the context menu is displayed)."
	                }
	            },
	            {
	                "name": "ondblclick",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A pointing device button is clicked twice on an element."
	                }
	            },
	            {
	                "name": "ondrag",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An element or text selection is being dragged (every 350ms)."
	                }
	            },
	            {
	                "name": "ondragend",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A drag operation is being ended (by releasing a mouse button or hitting the escape key)."
	                }
	            },
	            {
	                "name": "ondragenter",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A dragged element or text selection enters a valid drop target."
	                }
	            },
	            {
	                "name": "ondragleave",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A dragged element or text selection leaves a valid drop target."
	                }
	            },
	            {
	                "name": "ondragover",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An element or text selection is being dragged over a valid drop target (every 350ms)."
	                }
	            },
	            {
	                "name": "ondragstart",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The user starts dragging an element or text selection."
	                }
	            },
	            {
	                "name": "ondrop",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An element is dropped on a valid drop target."
	                }
	            },
	            {
	                "name": "ondurationchange",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The duration attribute has been updated."
	                }
	            },
	            {
	                "name": "onemptied",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it."
	                }
	            },
	            {
	                "name": "onended",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Playback has stopped because the end of the media was reached."
	                }
	            },
	            {
	                "name": "onerror",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A resource failed to load."
	                }
	            },
	            {
	                "name": "onfocus",
	                "description": {
	                    "kind": "markdown",
	                    "value": "An element has received focus (does not bubble)."
	                }
	            },
	            {
	                "name": "onformchange"
	            },
	            {
	                "name": "onforminput"
	            },
	            {
	                "name": "oninput",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The value of an element changes or the content of an element with the attribute contenteditable is modified."
	                }
	            },
	            {
	                "name": "oninvalid",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A submittable element has been checked and doesn't satisfy its constraints."
	                }
	            },
	            {
	                "name": "onkeydown",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A key is pressed down."
	                }
	            },
	            {
	                "name": "onkeypress",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A key is pressed down and that key normally produces a character value (use input instead)."
	                }
	            },
	            {
	                "name": "onkeyup",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A key is released."
	                }
	            },
	            {
	                "name": "onload",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A resource and its dependent resources have finished loading."
	                }
	            },
	            {
	                "name": "onloadeddata",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The first frame of the media has finished loading."
	                }
	            },
	            {
	                "name": "onloadedmetadata",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The metadata has been loaded."
	                }
	            },
	            {
	                "name": "onloadstart",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Progress has begun."
	                }
	            },
	            {
	                "name": "onmousedown",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A pointing device button (usually a mouse) is pressed on an element."
	                }
	            },
	            {
	                "name": "onmousemove",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A pointing device is moved over an element."
	                }
	            },
	            {
	                "name": "onmouseout",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A pointing device is moved off the element that has the listener attached or off one of its children."
	                }
	            },
	            {
	                "name": "onmouseover",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A pointing device is moved onto the element that has the listener attached or onto one of its children."
	                }
	            },
	            {
	                "name": "onmouseup",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A pointing device button is released over an element."
	                }
	            },
	            {
	                "name": "onmousewheel"
	            },
	            {
	                "name": "onmouseenter",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A pointing device is moved onto the element that has the listener attached."
	                }
	            },
	            {
	                "name": "onmouseleave",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A pointing device is moved off the element that has the listener attached."
	                }
	            },
	            {
	                "name": "onpause",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Playback has been paused."
	                }
	            },
	            {
	                "name": "onplay",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Playback has begun."
	                }
	            },
	            {
	                "name": "onplaying",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Playback is ready to start after having been paused or delayed due to lack of data."
	                }
	            },
	            {
	                "name": "onprogress",
	                "description": {
	                    "kind": "markdown",
	                    "value": "In progress."
	                }
	            },
	            {
	                "name": "onratechange",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The playback rate has changed."
	                }
	            },
	            {
	                "name": "onreset",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A form is reset."
	                }
	            },
	            {
	                "name": "onresize",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The document view has been resized."
	                }
	            },
	            {
	                "name": "onreadystatechange",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The readyState attribute of a document has changed."
	                }
	            },
	            {
	                "name": "onscroll",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The document view or an element has been scrolled."
	                }
	            },
	            {
	                "name": "onseeked",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A seek operation completed."
	                }
	            },
	            {
	                "name": "onseeking",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A seek operation began."
	                }
	            },
	            {
	                "name": "onselect",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Some text is being selected."
	                }
	            },
	            {
	                "name": "onshow",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A contextmenu event was fired on/bubbled to an element that has a contextmenu attribute"
	                }
	            },
	            {
	                "name": "onstalled",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The user agent is trying to fetch media data, but data is unexpectedly not forthcoming."
	                }
	            },
	            {
	                "name": "onsubmit",
	                "description": {
	                    "kind": "markdown",
	                    "value": "A form is submitted."
	                }
	            },
	            {
	                "name": "onsuspend",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Media data loading has been suspended."
	                }
	            },
	            {
	                "name": "ontimeupdate",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The time indicated by the currentTime attribute has been updated."
	                }
	            },
	            {
	                "name": "onvolumechange",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The volume has changed."
	                }
	            },
	            {
	                "name": "onwaiting",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Playback has stopped because of a temporary lack of data."
	                }
	            },
	            {
	                "name": "onpointercancel",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The pointer is unlikely to produce any more events."
	                }
	            },
	            {
	                "name": "onpointerdown",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The pointer enters the active buttons state."
	                }
	            },
	            {
	                "name": "onpointerenter",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Pointing device is moved inside the hit-testing boundary."
	                }
	            },
	            {
	                "name": "onpointerleave",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Pointing device is moved out of the hit-testing boundary."
	                }
	            },
	            {
	                "name": "onpointerlockchange",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The pointer was locked or released."
	                }
	            },
	            {
	                "name": "onpointerlockerror",
	                "description": {
	                    "kind": "markdown",
	                    "value": "It was impossible to lock the pointer for technical reasons or because the permission was denied."
	                }
	            },
	            {
	                "name": "onpointermove",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The pointer changed coordinates."
	                }
	            },
	            {
	                "name": "onpointerout",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The pointing device moved out of hit-testing boundary or leaves detectable hover range."
	                }
	            },
	            {
	                "name": "onpointerover",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The pointing device is moved into the hit-testing boundary."
	                }
	            },
	            {
	                "name": "onpointerup",
	                "description": {
	                    "kind": "markdown",
	                    "value": "The pointer leaves the active buttons state."
	                }
	            },
	            {
	                "name": "aria-activedescendant",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-activedescendant"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Identifies the currently active element when DOM focus is on a [`composite`](https://www.w3.org/TR/wai-aria-1.1/#composite) widget, [`textbox`](https://www.w3.org/TR/wai-aria-1.1/#textbox), [`group`](https://www.w3.org/TR/wai-aria-1.1/#group), or [`application`](https://www.w3.org/TR/wai-aria-1.1/#application)."
	                }
	            },
	            {
	                "name": "aria-atomic",
	                "valueSet": "b",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-atomic"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates whether [assistive technologies](https://www.w3.org/TR/wai-aria-1.1/#dfn-assistive-technology) will present all, or only parts of, the changed region based on the change notifications defined by the [`aria-relevant`](https://www.w3.org/TR/wai-aria-1.1/#aria-relevant) attribute."
	                }
	            },
	            {
	                "name": "aria-autocomplete",
	                "valueSet": "autocomplete",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-autocomplete"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made."
	                }
	            },
	            {
	                "name": "aria-busy",
	                "valueSet": "b",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-busy"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates an element is being modified and that assistive technologies _MAY_ want to wait until the modifications are complete before exposing them to the user."
	                }
	            },
	            {
	                "name": "aria-checked",
	                "valueSet": "tristate",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-checked"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates the current \"checked\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of checkboxes, radio buttons, and other [widgets](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.1/#aria-pressed) and [`aria-selected`](https://www.w3.org/TR/wai-aria-1.1/#aria-selected)."
	                }
	            },
	            {
	                "name": "aria-colcount",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-colcount"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines the total number of columns in a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-colindex)."
	                }
	            },
	            {
	                "name": "aria-colindex",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-colindex"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines an [element's](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) column index or position with respect to the total number of columns within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colcount`](https://www.w3.org/TR/wai-aria-1.1/#aria-colcount) and [`aria-colspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-colspan)."
	                }
	            },
	            {
	                "name": "aria-colspan",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-colspan"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines the number of columns spanned by a cell or gridcell within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-colindex) and [`aria-rowspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan)."
	                }
	            },
	            {
	                "name": "aria-controls",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-controls"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) whose contents or presence are controlled by the current element. See related [`aria-owns`](https://www.w3.org/TR/wai-aria-1.1/#aria-owns)."
	                }
	            },
	            {
	                "name": "aria-current",
	                "valueSet": "current",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-current"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that represents the current item within a container or set of related elements."
	                }
	            },
	            {
	                "name": "aria-describedby",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-describedby"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) that describes the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-labelledby`](https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby)."
	                }
	            },
	            {
	                "name": "aria-disabled",
	                "valueSet": "b",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-disabled"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates that the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is [perceivable](https://www.w3.org/TR/wai-aria-1.1/#dfn-perceivable) but disabled, so it is not editable or otherwise [operable](https://www.w3.org/TR/wai-aria-1.1/#dfn-operable). See related [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.1/#aria-hidden) and [`aria-readonly`](https://www.w3.org/TR/wai-aria-1.1/#aria-readonly)."
	                }
	            },
	            {
	                "name": "aria-dropeffect",
	                "valueSet": "dropeffect",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-dropeffect"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "\\[Deprecated in ARIA 1.1\\] Indicates what functions can be performed when a dragged object is released on the drop target."
	                }
	            },
	            {
	                "name": "aria-errormessage",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that provides an error message for the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-invalid`](https://www.w3.org/TR/wai-aria-1.1/#aria-invalid) and [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."
	                }
	            },
	            {
	                "name": "aria-expanded",
	                "valueSet": "u",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-expanded"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed."
	                }
	            },
	            {
	                "name": "aria-flowto",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-flowto"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Identifies the next [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order."
	                }
	            },
	            {
	                "name": "aria-grabbed",
	                "valueSet": "u",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-grabbed"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "\\[Deprecated in ARIA 1.1\\] Indicates an element's \"grabbed\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) in a drag-and-drop operation."
	                }
	            },
	            {
	                "name": "aria-haspopup",
	                "valueSet": "haspopup",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)."
	                }
	            },
	            {
	                "name": "aria-hidden",
	                "valueSet": "b",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-hidden"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates whether the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is exposed to an accessibility API. See related [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.1/#aria-disabled)."
	                }
	            },
	            {
	                "name": "aria-invalid",
	                "valueSet": "invalid",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-invalid"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates the entered value does not conform to the format expected by the application. See related [`aria-errormessage`](https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage)."
	                }
	            },
	            {
	                "name": "aria-label",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-label"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines a string value that labels the current element. See related [`aria-labelledby`](https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby)."
	                }
	            },
	            {
	                "name": "aria-labelledby",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) that labels the current element. See related [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."
	                }
	            },
	            {
	                "name": "aria-level",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-level"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines the hierarchical level of an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) within a structure."
	                }
	            },
	            {
	                "name": "aria-live",
	                "valueSet": "live",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-live"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates that an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) will be updated, and describes the types of updates the [user agents](https://www.w3.org/TR/wai-aria-1.1/#dfn-user-agent), [assistive technologies](https://www.w3.org/TR/wai-aria-1.1/#dfn-assistive-technology), and user can expect from the [live region](https://www.w3.org/TR/wai-aria-1.1/#dfn-live-region)."
	                }
	            },
	            {
	                "name": "aria-modal",
	                "valueSet": "b",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-modal"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates whether an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is modal when displayed."
	                }
	            },
	            {
	                "name": "aria-multiline",
	                "valueSet": "b",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-multiline"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates whether a text box accepts multiple lines of input or only a single line."
	                }
	            },
	            {
	                "name": "aria-multiselectable",
	                "valueSet": "b",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-multiselectable"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates that the user may select more than one item from the current selectable descendants."
	                }
	            },
	            {
	                "name": "aria-orientation",
	                "valueSet": "orientation",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-orientation"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous."
	                }
	            },
	            {
	                "name": "aria-owns",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-owns"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Identifies an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) in order to define a visual, functional, or contextual parent/child [relationship](https://www.w3.org/TR/wai-aria-1.1/#dfn-relationship) between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See related [`aria-controls`](https://www.w3.org/TR/wai-aria-1.1/#aria-controls)."
	                }
	            },
	            {
	                "name": "aria-placeholder",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-placeholder"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format."
	                }
	            },
	            {
	                "name": "aria-posinset",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-posinset"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)'s number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related [`aria-setsize`](https://www.w3.org/TR/wai-aria-1.1/#aria-setsize)."
	                }
	            },
	            {
	                "name": "aria-pressed",
	                "valueSet": "tristate",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-pressed"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates the current \"pressed\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of toggle buttons. See related [`aria-checked`](https://www.w3.org/TR/wai-aria-1.1/#aria-checked) and [`aria-selected`](https://www.w3.org/TR/wai-aria-1.1/#aria-selected)."
	                }
	            },
	            {
	                "name": "aria-readonly",
	                "valueSet": "b",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-readonly"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates that the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is not editable, but is otherwise [operable](https://www.w3.org/TR/wai-aria-1.1/#dfn-operable). See related [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.1/#aria-disabled)."
	                }
	            },
	            {
	                "name": "aria-relevant",
	                "valueSet": "relevant",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-relevant"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See related [`aria-atomic`](https://www.w3.org/TR/wai-aria-1.1/#aria-atomic)."
	                }
	            },
	            {
	                "name": "aria-required",
	                "valueSet": "b",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-required"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates that user input is required on the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) before a form may be submitted."
	                }
	            },
	            {
	                "name": "aria-roledescription",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-roledescription"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines a human-readable, author-localized description for the [role](https://www.w3.org/TR/wai-aria-1.1/#dfn-role) of an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)."
	                }
	            },
	            {
	                "name": "aria-rowcount",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-rowcount"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines the total number of rows in a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex)."
	                }
	            },
	            {
	                "name": "aria-rowindex",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines an [element's](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) row index or position with respect to the total number of rows within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowcount`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowcount) and [`aria-rowspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan)."
	                }
	            },
	            {
	                "name": "aria-rowspan",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines the number of rows spanned by a cell or gridcell within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex) and [`aria-colspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-colspan)."
	                }
	            },
	            {
	                "name": "aria-selected",
	                "valueSet": "u",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-selected"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates the current \"selected\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of various [widgets](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-checked`](https://www.w3.org/TR/wai-aria-1.1/#aria-checked) and [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.1/#aria-pressed)."
	                }
	            },
	            {
	                "name": "aria-setsize",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-setsize"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related [`aria-posinset`](https://www.w3.org/TR/wai-aria-1.1/#aria-posinset)."
	                }
	            },
	            {
	                "name": "aria-sort",
	                "valueSet": "sort",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-sort"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates if items in a table or grid are sorted in ascending or descending order."
	                }
	            },
	            {
	                "name": "aria-valuemax",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuemax"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines the maximum allowed value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."
	                }
	            },
	            {
	                "name": "aria-valuemin",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuemin"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines the minimum allowed value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."
	                }
	            },
	            {
	                "name": "aria-valuenow",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuenow"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines the current value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-valuetext`](https://www.w3.org/TR/wai-aria-1.1/#aria-valuetext)."
	                }
	            },
	            {
	                "name": "aria-valuetext",
	                "references": [
	                    {
	                        "name": "WAI-ARIA Reference",
	                        "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuetext"
	                    }
	                ],
	                "description": {
	                    "kind": "markdown",
	                    "value": "Defines the human readable text alternative of [`aria-valuenow`](https://www.w3.org/TR/wai-aria-1.1/#aria-valuenow) for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."
	                }
	            },
	            {
	                "name": "aria-details",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that provides a detailed, extended description for the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."
	                }
	            },
	            {
	                "name": "aria-keyshortcuts",
	                "description": {
	                    "kind": "markdown",
	                    "value": "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element."
	                }
	            }
	        ],
	        "valueSets": [
	            {
	                "name": "b",
	                "values": [
	                    {
	                        "name": "true"
	                    },
	                    {
	                        "name": "false"
	                    }
	                ]
	            },
	            {
	                "name": "u",
	                "values": [
	                    {
	                        "name": "true"
	                    },
	                    {
	                        "name": "false"
	                    },
	                    {
	                        "name": "undefined"
	                    }
	                ]
	            },
	            {
	                "name": "o",
	                "values": [
	                    {
	                        "name": "on"
	                    },
	                    {
	                        "name": "off"
	                    }
	                ]
	            },
	            {
	                "name": "y",
	                "values": [
	                    {
	                        "name": "yes"
	                    },
	                    {
	                        "name": "no"
	                    }
	                ]
	            },
	            {
	                "name": "w",
	                "values": [
	                    {
	                        "name": "soft"
	                    },
	                    {
	                        "name": "hard"
	                    }
	                ]
	            },
	            {
	                "name": "d",
	                "values": [
	                    {
	                        "name": "ltr"
	                    },
	                    {
	                        "name": "rtl"
	                    },
	                    {
	                        "name": "auto"
	                    }
	                ]
	            },
	            {
	                "name": "m",
	                "values": [
	                    {
	                        "name": "get",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Corresponds to the HTTP [GET method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3); form data are appended to the `action` attribute URI with a '?' as separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters."
	                        }
	                    },
	                    {
	                        "name": "post",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Corresponds to the HTTP [POST method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5); form data are included in the body of the form and sent to the server."
	                        }
	                    },
	                    {
	                        "name": "dialog",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Use when the form is inside a [`<dialog>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog) element to close the dialog when submitted."
	                        }
	                    }
	                ]
	            },
	            {
	                "name": "fm",
	                "values": [
	                    {
	                        "name": "get"
	                    },
	                    {
	                        "name": "post"
	                    }
	                ]
	            },
	            {
	                "name": "s",
	                "values": [
	                    {
	                        "name": "row"
	                    },
	                    {
	                        "name": "col"
	                    },
	                    {
	                        "name": "rowgroup"
	                    },
	                    {
	                        "name": "colgroup"
	                    }
	                ]
	            },
	            {
	                "name": "t",
	                "values": [
	                    {
	                        "name": "hidden"
	                    },
	                    {
	                        "name": "text"
	                    },
	                    {
	                        "name": "search"
	                    },
	                    {
	                        "name": "tel"
	                    },
	                    {
	                        "name": "url"
	                    },
	                    {
	                        "name": "email"
	                    },
	                    {
	                        "name": "password"
	                    },
	                    {
	                        "name": "datetime"
	                    },
	                    {
	                        "name": "date"
	                    },
	                    {
	                        "name": "month"
	                    },
	                    {
	                        "name": "week"
	                    },
	                    {
	                        "name": "time"
	                    },
	                    {
	                        "name": "datetime-local"
	                    },
	                    {
	                        "name": "number"
	                    },
	                    {
	                        "name": "range"
	                    },
	                    {
	                        "name": "color"
	                    },
	                    {
	                        "name": "checkbox"
	                    },
	                    {
	                        "name": "radio"
	                    },
	                    {
	                        "name": "file"
	                    },
	                    {
	                        "name": "submit"
	                    },
	                    {
	                        "name": "image"
	                    },
	                    {
	                        "name": "reset"
	                    },
	                    {
	                        "name": "button"
	                    }
	                ]
	            },
	            {
	                "name": "im",
	                "values": [
	                    {
	                        "name": "verbatim"
	                    },
	                    {
	                        "name": "latin"
	                    },
	                    {
	                        "name": "latin-name"
	                    },
	                    {
	                        "name": "latin-prose"
	                    },
	                    {
	                        "name": "full-width-latin"
	                    },
	                    {
	                        "name": "kana"
	                    },
	                    {
	                        "name": "kana-name"
	                    },
	                    {
	                        "name": "katakana"
	                    },
	                    {
	                        "name": "numeric"
	                    },
	                    {
	                        "name": "tel"
	                    },
	                    {
	                        "name": "email"
	                    },
	                    {
	                        "name": "url"
	                    }
	                ]
	            },
	            {
	                "name": "bt",
	                "values": [
	                    {
	                        "name": "button"
	                    },
	                    {
	                        "name": "submit"
	                    },
	                    {
	                        "name": "reset"
	                    },
	                    {
	                        "name": "menu"
	                    }
	                ]
	            },
	            {
	                "name": "lt",
	                "values": [
	                    {
	                        "name": "1"
	                    },
	                    {
	                        "name": "a"
	                    },
	                    {
	                        "name": "A"
	                    },
	                    {
	                        "name": "i"
	                    },
	                    {
	                        "name": "I"
	                    }
	                ]
	            },
	            {
	                "name": "mt",
	                "values": [
	                    {
	                        "name": "context"
	                    },
	                    {
	                        "name": "toolbar"
	                    }
	                ]
	            },
	            {
	                "name": "mit",
	                "values": [
	                    {
	                        "name": "command"
	                    },
	                    {
	                        "name": "checkbox"
	                    },
	                    {
	                        "name": "radio"
	                    }
	                ]
	            },
	            {
	                "name": "et",
	                "values": [
	                    {
	                        "name": "application/x-www-form-urlencoded"
	                    },
	                    {
	                        "name": "multipart/form-data"
	                    },
	                    {
	                        "name": "text/plain"
	                    }
	                ]
	            },
	            {
	                "name": "tk",
	                "values": [
	                    {
	                        "name": "subtitles"
	                    },
	                    {
	                        "name": "captions"
	                    },
	                    {
	                        "name": "descriptions"
	                    },
	                    {
	                        "name": "chapters"
	                    },
	                    {
	                        "name": "metadata"
	                    }
	                ]
	            },
	            {
	                "name": "pl",
	                "values": [
	                    {
	                        "name": "none"
	                    },
	                    {
	                        "name": "metadata"
	                    },
	                    {
	                        "name": "auto"
	                    }
	                ]
	            },
	            {
	                "name": "sh",
	                "values": [
	                    {
	                        "name": "circle"
	                    },
	                    {
	                        "name": "default"
	                    },
	                    {
	                        "name": "poly"
	                    },
	                    {
	                        "name": "rect"
	                    }
	                ]
	            },
	            {
	                "name": "xo",
	                "values": [
	                    {
	                        "name": "anonymous"
	                    },
	                    {
	                        "name": "use-credentials"
	                    }
	                ]
	            },
	            {
	                "name": "target",
	                "values": [
	                    {
	                        "name": "_self"
	                    },
	                    {
	                        "name": "_blank"
	                    },
	                    {
	                        "name": "_parent"
	                    },
	                    {
	                        "name": "_top"
	                    }
	                ]
	            },
	            {
	                "name": "sb",
	                "values": [
	                    {
	                        "name": "allow-forms"
	                    },
	                    {
	                        "name": "allow-modals"
	                    },
	                    {
	                        "name": "allow-pointer-lock"
	                    },
	                    {
	                        "name": "allow-popups"
	                    },
	                    {
	                        "name": "allow-popups-to-escape-sandbox"
	                    },
	                    {
	                        "name": "allow-same-origin"
	                    },
	                    {
	                        "name": "allow-scripts"
	                    },
	                    {
	                        "name": "allow-top-navigation"
	                    }
	                ]
	            },
	            {
	                "name": "tristate",
	                "values": [
	                    {
	                        "name": "true"
	                    },
	                    {
	                        "name": "false"
	                    },
	                    {
	                        "name": "mixed"
	                    },
	                    {
	                        "name": "undefined"
	                    }
	                ]
	            },
	            {
	                "name": "inputautocomplete",
	                "values": [
	                    {
	                        "name": "additional-name"
	                    },
	                    {
	                        "name": "address-level1"
	                    },
	                    {
	                        "name": "address-level2"
	                    },
	                    {
	                        "name": "address-level3"
	                    },
	                    {
	                        "name": "address-level4"
	                    },
	                    {
	                        "name": "address-line1"
	                    },
	                    {
	                        "name": "address-line2"
	                    },
	                    {
	                        "name": "address-line3"
	                    },
	                    {
	                        "name": "bday"
	                    },
	                    {
	                        "name": "bday-year"
	                    },
	                    {
	                        "name": "bday-day"
	                    },
	                    {
	                        "name": "bday-month"
	                    },
	                    {
	                        "name": "billing"
	                    },
	                    {
	                        "name": "cc-additional-name"
	                    },
	                    {
	                        "name": "cc-csc"
	                    },
	                    {
	                        "name": "cc-exp"
	                    },
	                    {
	                        "name": "cc-exp-month"
	                    },
	                    {
	                        "name": "cc-exp-year"
	                    },
	                    {
	                        "name": "cc-family-name"
	                    },
	                    {
	                        "name": "cc-given-name"
	                    },
	                    {
	                        "name": "cc-name"
	                    },
	                    {
	                        "name": "cc-number"
	                    },
	                    {
	                        "name": "cc-type"
	                    },
	                    {
	                        "name": "country"
	                    },
	                    {
	                        "name": "country-name"
	                    },
	                    {
	                        "name": "current-password"
	                    },
	                    {
	                        "name": "email"
	                    },
	                    {
	                        "name": "family-name"
	                    },
	                    {
	                        "name": "fax"
	                    },
	                    {
	                        "name": "given-name"
	                    },
	                    {
	                        "name": "home"
	                    },
	                    {
	                        "name": "honorific-prefix"
	                    },
	                    {
	                        "name": "honorific-suffix"
	                    },
	                    {
	                        "name": "impp"
	                    },
	                    {
	                        "name": "language"
	                    },
	                    {
	                        "name": "mobile"
	                    },
	                    {
	                        "name": "name"
	                    },
	                    {
	                        "name": "new-password"
	                    },
	                    {
	                        "name": "nickname"
	                    },
	                    {
	                        "name": "off"
	                    },
	                    {
	                        "name": "on"
	                    },
	                    {
	                        "name": "organization"
	                    },
	                    {
	                        "name": "organization-title"
	                    },
	                    {
	                        "name": "pager"
	                    },
	                    {
	                        "name": "photo"
	                    },
	                    {
	                        "name": "postal-code"
	                    },
	                    {
	                        "name": "sex"
	                    },
	                    {
	                        "name": "shipping"
	                    },
	                    {
	                        "name": "street-address"
	                    },
	                    {
	                        "name": "tel-area-code"
	                    },
	                    {
	                        "name": "tel"
	                    },
	                    {
	                        "name": "tel-country-code"
	                    },
	                    {
	                        "name": "tel-extension"
	                    },
	                    {
	                        "name": "tel-local"
	                    },
	                    {
	                        "name": "tel-local-prefix"
	                    },
	                    {
	                        "name": "tel-local-suffix"
	                    },
	                    {
	                        "name": "tel-national"
	                    },
	                    {
	                        "name": "transaction-amount"
	                    },
	                    {
	                        "name": "transaction-currency"
	                    },
	                    {
	                        "name": "url"
	                    },
	                    {
	                        "name": "username"
	                    },
	                    {
	                        "name": "work"
	                    }
	                ]
	            },
	            {
	                "name": "autocomplete",
	                "values": [
	                    {
	                        "name": "inline"
	                    },
	                    {
	                        "name": "list"
	                    },
	                    {
	                        "name": "both"
	                    },
	                    {
	                        "name": "none"
	                    }
	                ]
	            },
	            {
	                "name": "current",
	                "values": [
	                    {
	                        "name": "page"
	                    },
	                    {
	                        "name": "step"
	                    },
	                    {
	                        "name": "location"
	                    },
	                    {
	                        "name": "date"
	                    },
	                    {
	                        "name": "time"
	                    },
	                    {
	                        "name": "true"
	                    },
	                    {
	                        "name": "false"
	                    }
	                ]
	            },
	            {
	                "name": "dropeffect",
	                "values": [
	                    {
	                        "name": "copy"
	                    },
	                    {
	                        "name": "move"
	                    },
	                    {
	                        "name": "link"
	                    },
	                    {
	                        "name": "execute"
	                    },
	                    {
	                        "name": "popup"
	                    },
	                    {
	                        "name": "none"
	                    }
	                ]
	            },
	            {
	                "name": "invalid",
	                "values": [
	                    {
	                        "name": "grammar"
	                    },
	                    {
	                        "name": "false"
	                    },
	                    {
	                        "name": "spelling"
	                    },
	                    {
	                        "name": "true"
	                    }
	                ]
	            },
	            {
	                "name": "live",
	                "values": [
	                    {
	                        "name": "off"
	                    },
	                    {
	                        "name": "polite"
	                    },
	                    {
	                        "name": "assertive"
	                    }
	                ]
	            },
	            {
	                "name": "orientation",
	                "values": [
	                    {
	                        "name": "vertical"
	                    },
	                    {
	                        "name": "horizontal"
	                    },
	                    {
	                        "name": "undefined"
	                    }
	                ]
	            },
	            {
	                "name": "relevant",
	                "values": [
	                    {
	                        "name": "additions"
	                    },
	                    {
	                        "name": "removals"
	                    },
	                    {
	                        "name": "text"
	                    },
	                    {
	                        "name": "all"
	                    },
	                    {
	                        "name": "additions text"
	                    }
	                ]
	            },
	            {
	                "name": "sort",
	                "values": [
	                    {
	                        "name": "ascending"
	                    },
	                    {
	                        "name": "descending"
	                    },
	                    {
	                        "name": "none"
	                    },
	                    {
	                        "name": "other"
	                    }
	                ]
	            },
	            {
	                "name": "roles",
	                "values": [
	                    {
	                        "name": "alert"
	                    },
	                    {
	                        "name": "alertdialog"
	                    },
	                    {
	                        "name": "button"
	                    },
	                    {
	                        "name": "checkbox"
	                    },
	                    {
	                        "name": "dialog"
	                    },
	                    {
	                        "name": "gridcell"
	                    },
	                    {
	                        "name": "link"
	                    },
	                    {
	                        "name": "log"
	                    },
	                    {
	                        "name": "marquee"
	                    },
	                    {
	                        "name": "menuitem"
	                    },
	                    {
	                        "name": "menuitemcheckbox"
	                    },
	                    {
	                        "name": "menuitemradio"
	                    },
	                    {
	                        "name": "option"
	                    },
	                    {
	                        "name": "progressbar"
	                    },
	                    {
	                        "name": "radio"
	                    },
	                    {
	                        "name": "scrollbar"
	                    },
	                    {
	                        "name": "searchbox"
	                    },
	                    {
	                        "name": "slider"
	                    },
	                    {
	                        "name": "spinbutton"
	                    },
	                    {
	                        "name": "status"
	                    },
	                    {
	                        "name": "switch"
	                    },
	                    {
	                        "name": "tab"
	                    },
	                    {
	                        "name": "tabpanel"
	                    },
	                    {
	                        "name": "textbox"
	                    },
	                    {
	                        "name": "timer"
	                    },
	                    {
	                        "name": "tooltip"
	                    },
	                    {
	                        "name": "treeitem"
	                    },
	                    {
	                        "name": "combobox"
	                    },
	                    {
	                        "name": "grid"
	                    },
	                    {
	                        "name": "listbox"
	                    },
	                    {
	                        "name": "menu"
	                    },
	                    {
	                        "name": "menubar"
	                    },
	                    {
	                        "name": "radiogroup"
	                    },
	                    {
	                        "name": "tablist"
	                    },
	                    {
	                        "name": "tree"
	                    },
	                    {
	                        "name": "treegrid"
	                    },
	                    {
	                        "name": "application"
	                    },
	                    {
	                        "name": "article"
	                    },
	                    {
	                        "name": "cell"
	                    },
	                    {
	                        "name": "columnheader"
	                    },
	                    {
	                        "name": "definition"
	                    },
	                    {
	                        "name": "directory"
	                    },
	                    {
	                        "name": "document"
	                    },
	                    {
	                        "name": "feed"
	                    },
	                    {
	                        "name": "figure"
	                    },
	                    {
	                        "name": "group"
	                    },
	                    {
	                        "name": "heading"
	                    },
	                    {
	                        "name": "img"
	                    },
	                    {
	                        "name": "list"
	                    },
	                    {
	                        "name": "listitem"
	                    },
	                    {
	                        "name": "math"
	                    },
	                    {
	                        "name": "none"
	                    },
	                    {
	                        "name": "note"
	                    },
	                    {
	                        "name": "presentation"
	                    },
	                    {
	                        "name": "region"
	                    },
	                    {
	                        "name": "row"
	                    },
	                    {
	                        "name": "rowgroup"
	                    },
	                    {
	                        "name": "rowheader"
	                    },
	                    {
	                        "name": "separator"
	                    },
	                    {
	                        "name": "table"
	                    },
	                    {
	                        "name": "term"
	                    },
	                    {
	                        "name": "text"
	                    },
	                    {
	                        "name": "toolbar"
	                    },
	                    {
	                        "name": "banner"
	                    },
	                    {
	                        "name": "complementary"
	                    },
	                    {
	                        "name": "contentinfo"
	                    },
	                    {
	                        "name": "form"
	                    },
	                    {
	                        "name": "main"
	                    },
	                    {
	                        "name": "navigation"
	                    },
	                    {
	                        "name": "region"
	                    },
	                    {
	                        "name": "search"
	                    },
	                    {
	                        "name": "doc-abstract"
	                    },
	                    {
	                        "name": "doc-acknowledgments"
	                    },
	                    {
	                        "name": "doc-afterword"
	                    },
	                    {
	                        "name": "doc-appendix"
	                    },
	                    {
	                        "name": "doc-backlink"
	                    },
	                    {
	                        "name": "doc-biblioentry"
	                    },
	                    {
	                        "name": "doc-bibliography"
	                    },
	                    {
	                        "name": "doc-biblioref"
	                    },
	                    {
	                        "name": "doc-chapter"
	                    },
	                    {
	                        "name": "doc-colophon"
	                    },
	                    {
	                        "name": "doc-conclusion"
	                    },
	                    {
	                        "name": "doc-cover"
	                    },
	                    {
	                        "name": "doc-credit"
	                    },
	                    {
	                        "name": "doc-credits"
	                    },
	                    {
	                        "name": "doc-dedication"
	                    },
	                    {
	                        "name": "doc-endnote"
	                    },
	                    {
	                        "name": "doc-endnotes"
	                    },
	                    {
	                        "name": "doc-epigraph"
	                    },
	                    {
	                        "name": "doc-epilogue"
	                    },
	                    {
	                        "name": "doc-errata"
	                    },
	                    {
	                        "name": "doc-example"
	                    },
	                    {
	                        "name": "doc-footnote"
	                    },
	                    {
	                        "name": "doc-foreword"
	                    },
	                    {
	                        "name": "doc-glossary"
	                    },
	                    {
	                        "name": "doc-glossref"
	                    },
	                    {
	                        "name": "doc-index"
	                    },
	                    {
	                        "name": "doc-introduction"
	                    },
	                    {
	                        "name": "doc-noteref"
	                    },
	                    {
	                        "name": "doc-notice"
	                    },
	                    {
	                        "name": "doc-pagebreak"
	                    },
	                    {
	                        "name": "doc-pagelist"
	                    },
	                    {
	                        "name": "doc-part"
	                    },
	                    {
	                        "name": "doc-preface"
	                    },
	                    {
	                        "name": "doc-prologue"
	                    },
	                    {
	                        "name": "doc-pullquote"
	                    },
	                    {
	                        "name": "doc-qna"
	                    },
	                    {
	                        "name": "doc-subtitle"
	                    },
	                    {
	                        "name": "doc-tip"
	                    },
	                    {
	                        "name": "doc-toc"
	                    }
	                ]
	            },
	            {
	                "name": "metanames",
	                "values": [
	                    {
	                        "name": "application-name"
	                    },
	                    {
	                        "name": "author"
	                    },
	                    {
	                        "name": "description"
	                    },
	                    {
	                        "name": "format-detection"
	                    },
	                    {
	                        "name": "generator"
	                    },
	                    {
	                        "name": "keywords"
	                    },
	                    {
	                        "name": "publisher"
	                    },
	                    {
	                        "name": "referrer"
	                    },
	                    {
	                        "name": "robots"
	                    },
	                    {
	                        "name": "theme-color"
	                    },
	                    {
	                        "name": "viewport"
	                    }
	                ]
	            },
	            {
	                "name": "haspopup",
	                "values": [
	                    {
	                        "name": "false",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "(default) Indicates the element does not have a popup."
	                        }
	                    },
	                    {
	                        "name": "true",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Indicates the popup is a menu."
	                        }
	                    },
	                    {
	                        "name": "menu",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Indicates the popup is a menu."
	                        }
	                    },
	                    {
	                        "name": "listbox",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Indicates the popup is a listbox."
	                        }
	                    },
	                    {
	                        "name": "tree",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Indicates the popup is a tree."
	                        }
	                    },
	                    {
	                        "name": "grid",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Indicates the popup is a grid."
	                        }
	                    },
	                    {
	                        "name": "dialog",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Indicates the popup is a dialog."
	                        }
	                    }
	                ]
	            },
	            {
	                "name": "decoding",
	                "values": [
	                    {
	                        "name": "sync"
	                    },
	                    {
	                        "name": "async"
	                    },
	                    {
	                        "name": "auto"
	                    }
	                ]
	            },
	            {
	                "name": "loading",
	                "values": [
	                    {
	                        "name": "eager",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Loads the image immediately, regardless of whether or not the image is currently within the visible viewport (this is the default value)."
	                        }
	                    },
	                    {
	                        "name": "lazy",
	                        "description": {
	                            "kind": "markdown",
	                            "value": "Defers loading the image until it reaches a calculated distance from the viewport, as defined by the browser. The intent is to avoid the network and storage bandwidth needed to handle the image until it's reasonably certain that it will be needed. This generally improves the performance of the content in most typical use cases."
	                        }
	                    }
	                ]
	            },
	            {
	                "name": "referrerpolicy",
	                "values": [
	                    {
	                        "name": "no-referrer"
	                    },
	                    {
	                        "name": "no-referrer-when-downgrade"
	                    },
	                    {
	                        "name": "origin"
	                    },
	                    {
	                        "name": "origin-when-cross-origin"
	                    },
	                    {
	                        "name": "same-origin"
	                    },
	                    {
	                        "name": "strict-origin"
	                    },
	                    {
	                        "name": "strict-origin-when-cross-origin"
	                    },
	                    {
	                        "name": "unsafe-url"
	                    }
	                ]
	            },
	            {
	                "name": "enterkeyhint",
	                "values": [
	                    {
	                        "name": "enter"
	                    },
	                    {
	                        "name": "done"
	                    },
	                    {
	                        "name": "go"
	                    },
	                    {
	                        "name": "next"
	                    },
	                    {
	                        "name": "previous"
	                    },
	                    {
	                        "name": "search"
	                    },
	                    {
	                        "name": "send"
	                    }
	                ]
	            },
	            {
	                "name": "popover",
	                "values": [
	                    {
	                        "name": "auto"
	                    },
	                    {
	                        "name": "hint"
	                    },
	                    {
	                        "name": "manual"
	                    }
	                ]
	            },
	            {
	                "name": "fetchpriority",
	                "values": [
	                    {
	                        "name": "high"
	                    },
	                    {
	                        "name": "low"
	                    },
	                    {
	                        "name": "auto"
	                    }
	                ]
	            }
	        ]
	    };
	});
} (webCustomData, webCustomData.exports));
var webCustomDataExports = webCustomData.exports;
getDefaultExportFromCjs(webCustomDataExports);

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.svelteHtmlDataProvider = void 0;
	const vscode_html_languageservice_1 = require$$1$2;
	const webCustomData_1 = webCustomDataExports;
	const utils_1 = utils$6;
	const svelteEvents = [
	    ...(webCustomData_1.htmlData.globalAttributes?.filter(isEvent).map(mapToSvelteEvent) ?? []),
	    {
	        name: 'on:introstart',
	        description: 'Available when element has transition'
	    },
	    {
	        name: 'on:introend',
	        description: 'Available when element has transition'
	    },
	    {
	        name: 'on:outrostart',
	        description: 'Available when element has transition'
	    },
	    {
	        name: 'on:outroend',
	        description: 'Available when element has transition'
	    },
	    { name: 'on:pointercancel' },
	    { name: 'on:pointerdown' },
	    { name: 'on:pointerenter' },
	    { name: 'on:pointerleave' },
	    { name: 'on:pointermove' },
	    { name: 'on:pointerout' },
	    { name: 'on:pointerover' },
	    { name: 'on:pointerup' },
	    { name: 'on:mouseenter' },
	    { name: 'on:mouseleave' },
	    { name: 'on:hashchange' },
	    { name: 'on:visibilitychange' }
	];
	const svelteAttributes = [
	    {
	        name: 'bind:innerHTML',
	        description: 'Available when contenteditable=true'
	    },
	    {
	        name: 'bind:textContent',
	        description: 'Available when contenteditable=true'
	    },
	    {
	        name: 'bind:innerText',
	        description: 'Available when contenteditable=true'
	    },
	    {
	        name: 'bind:clientWidth',
	        description: 'Available for block level elements. (read-only)'
	    },
	    {
	        name: 'bind:clientHeight',
	        description: 'Available for block level elements. (read-only)'
	    },
	    {
	        name: 'bind:offsetWidth',
	        description: 'Available for block level elements. (read-only)'
	    },
	    {
	        name: 'bind:offsetHeight',
	        description: 'Available for block level elements. (read-only)'
	    },
	    {
	        name: 'bind:contentRect',
	        description: 'Available for all elements. (read-only)'
	    },
	    {
	        name: 'bind:contentBoxSize',
	        description: 'Available for all elements. (read-only)'
	    },
	    {
	        name: 'bind:borderBoxSize',
	        description: 'Available for all elements. (read-only)'
	    },
	    {
	        name: 'bind:devicePixelContentBoxSize',
	        description: 'Available for all elements. (read-only)'
	    },
	    {
	        name: 'bind:this',
	        description: 'To get a reference to a DOM node, use bind:this. If used on a component, gets a reference to that component instance.'
	    }
	];
	const svelteDirectiveKeywords = [
	    {
	        name: 'use:',
	        description: 'Actions are functions that are called when an element is mounted.',
	        references: [
	            {
	                name: 'Svelte.dev Reference',
	                url: 'https://svelte.dev/docs/svelte/use'
	            }
	        ]
	    },
	    {
	        name: 'transition:',
	        description: 'A transition is triggered by an element entering or leaving the DOM as a result of a state change.',
	        references: [
	            {
	                name: 'Svelte.dev Reference',
	                url: 'https://svelte.dev/docs/svelte/transition'
	            }
	        ]
	    },
	    {
	        name: 'in:',
	        description: 'The in: and out: directives are identical to transition:, except that the resulting transitions are not bidirectional.',
	        references: [
	            {
	                name: 'Svelte.dev Reference',
	                url: 'https://svelte.dev/docs/svelte/in-and-out'
	            }
	        ]
	    },
	    {
	        name: 'out:',
	        description: 'The in: and out: directives are identical to transition:, except that the resulting transitions are not bidirectional.',
	        references: [
	            {
	                name: 'Svelte.dev Reference',
	                url: 'https://svelte.dev/docs/svelte/in-and-out'
	            }
	        ]
	    },
	    {
	        name: 'animate:',
	        description: 'An animation is triggered when the contents of a keyed each block are re-ordered.',
	        references: [
	            {
	                name: 'Svelte.dev Reference',
	                url: 'https://svelte.dev/docs/svelte/animate'
	            }
	        ]
	    },
	    {
	        name: 'style:',
	        description: 'The style: directive provides a shorthand for setting multiple styles on an element.',
	        references: [
	            {
	                name: 'Svelte.dev Reference',
	                url: 'https://svelte.dev/docs/svelte/style'
	            }
	        ]
	    }
	];
	const sveltekitAttributes = [
	    {
	        name: 'data-sveltekit-keepfocus',
	        description: 'SvelteKit-specific attribute. Currently focused element will retain focus after navigation. Otherwise, focus will be reset to the body.',
	        valueSet: 'v'
	    },
	    {
	        name: 'data-sveltekit-noscroll',
	        description: 'SvelteKit-specific attribute. Will prevent scrolling after the link is clicked.',
	        valueSet: 'v'
	    },
	    {
	        name: 'data-sveltekit-preload-code',
	        description: "SvelteKit-specific attribute. Will cause SvelteKit to run the page's load function as soon as the user hovers over the link (on a desktop) or touches it (on mobile), rather than waiting for the click event to trigger navigation.",
	        valueSet: 'v',
	        values: [
	            { name: 'eager' },
	            { name: 'viewport' },
	            { name: 'hover' },
	            { name: 'tap' },
	            { name: 'off' }
	        ]
	    },
	    {
	        name: 'data-sveltekit-preload-data',
	        description: "SvelteKit-specific attribute. Will cause SvelteKit to run the page's load function as soon as the user hovers over the link (on a desktop) or touches it (on mobile), rather than waiting for the click event to trigger navigation.",
	        valueSet: 'v',
	        values: [{ name: 'hover' }, { name: 'tap' }, { name: 'off' }]
	    },
	    {
	        name: 'data-sveltekit-reload',
	        description: 'SvelteKit-specific attribute. Will cause SvelteKit to do a normal browser navigation which results in a full page reload.',
	        valueSet: 'v'
	    },
	    {
	        name: 'data-sveltekit-replacestate',
	        description: 'SvelteKit-specific attribute. Will replace the current `history` entry rather than creating a new one with `pushState` when the link is clicked.',
	        valueSet: 'v'
	    }
	];
	const svelteTags = [
	    {
	        name: 'svelte:self',
	        description: 'Allows a component to include itself, recursively.\n\nIt cannot appear at the top level of your markup; it must be inside an if or each block to prevent an infinite loop.',
	        attributes: []
	    },
	    {
	        name: 'svelte:component',
	        description: 'Renders a component dynamically, using the component constructor specified as the this property. When the property changes, the component is destroyed and recreated.\n\nIf this is falsy, no component is rendered.',
	        attributes: [
	            {
	                name: 'this',
	                description: 'Component to render.\n\nWhen this property changes, the component is destroyed and recreated.\nIf this is falsy, no component is rendered.'
	            }
	        ]
	    },
	    {
	        name: 'svelte:element',
	        description: 'Renders a DOM element dynamically, using the string as the this property. When the property changes, the element is destroyed and recreated.\n\nIf this is falsy, no element is rendered.',
	        attributes: [
	            {
	                name: 'this',
	                description: 'DOM element to render.\n\nWhen this property changes, the element is destroyed and recreated.\nIf this is falsy, no element is rendered.'
	            }
	        ]
	    },
	    {
	        name: 'svelte:window',
	        description: 'Allows you to add event listeners to the window object without worrying about removing them when the component is destroyed, or checking for the existence of window when server-side rendering.',
	        attributes: [
	            {
	                name: 'bind:innerWidth',
	                description: 'Bind to the inner width of the window. (read-only)'
	            },
	            {
	                name: 'bind:innerHeight',
	                description: 'Bind to the inner height of the window. (read-only)'
	            },
	            {
	                name: 'bind:outerWidth',
	                description: 'Bind to the outer width of the window. (read-only)'
	            },
	            {
	                name: 'bind:outerHeight',
	                description: 'Bind to the outer height of the window. (read-only)'
	            },
	            {
	                name: 'bind:scrollX',
	                description: 'Bind to the scroll x position of the window.'
	            },
	            {
	                name: 'bind:scrollY',
	                description: 'Bind to the scroll y position of the window.'
	            },
	            {
	                name: 'bind:online',
	                description: 'An alias for window.navigator.onLine'
	            }
	        ]
	    },
	    {
	        name: 'svelte:document',
	        description: "As with <svelte:window>, this element allows you to add listeners to events on document, such as visibilitychange, which don't fire on window.",
	        attributes: [
	            {
	                name: 'bind:fullscreenElement',
	                description: 'Bind to the element that is being in full screen mode in this document. (read-only)'
	            },
	            {
	                name: 'bind:visibilityState',
	                description: 'Bind to visibility of the document. (read-only)'
	            }
	        ]
	    },
	    {
	        name: 'svelte:body',
	        description: "As with <svelte:window>, this element allows you to add listeners to events on document.body, such as mouseenter and mouseleave which don't fire on window.",
	        attributes: []
	    },
	    {
	        name: 'svelte:head',
	        description: 'This element makes it possible to insert elements into document.head. During server-side rendering, head content exposed separately to the main html content.',
	        attributes: []
	    },
	    {
	        name: 'svelte:options',
	        description: 'Provides a place to specify per-component compiler options',
	        attributes: [
	            {
	                name: 'immutable',
	                description: 'If true, tells the compiler that you promise not to mutate any objects. This allows it to be less conservative about checking whether values have changed.',
	                values: [
	                    {
	                        name: '{true}',
	                        description: 'You never use mutable data, so the compiler can do simple referential equality checks to determine if values have changed'
	                    },
	                    {
	                        name: '{false}',
	                        description: 'The default. Svelte will be more conservative about whether or not mutable objects have changed'
	                    }
	                ]
	            },
	            {
	                name: 'accessors',
	                description: "If true, getters and setters will be created for the component's props. If false, they will only be created for readonly exported values (i.e. those declared with const, class and function). If compiling with customElement: true this option defaults to true.",
	                values: [
	                    {
	                        name: '{true}',
	                        description: "Adds getters and setters for the component's props"
	                    },
	                    {
	                        name: '{false}',
	                        description: 'The default.'
	                    }
	                ]
	            },
	            {
	                name: 'namespace',
	                description: 'The namespace where this component will be used, most commonly "svg"'
	            },
	            {
	                name: 'tag',
	                description: 'The name to use when compiling this component as a custom element'
	            }
	        ]
	    },
	    {
	        name: 'svelte:fragment',
	        description: 'This element is useful if you want to assign a component to a named slot without creating a wrapper DOM element.',
	        attributes: [
	            {
	                name: 'slot',
	                description: 'The name of the named slot that should be targeted.'
	            }
	        ]
	    },
	    {
	        name: 'slot',
	        description: 'Components can have child content, in the same way that elements can.\n\nThe content is exposed in the child component using the <slot> element, which can contain fallback content that is rendered if no children are provided.',
	        attributes: [
	            {
	                name: 'name',
	                description: 'Named slots allow consumers to target specific areas. They can also have fallback content.'
	            }
	        ]
	    },
	    {
	        name: 'svelte:boundary',
	        description: 'Represents a boundary in the application. Can catch errors and show fallback UI',
	        attributes: [
	            {
	                name: 'onerror',
	                description: 'Called when an error occured within the boundary'
	            }
	        ]
	    }
	];
	const mediaAttributes = [
	    {
	        name: 'bind:duration',
	        description: 'The total duration of the video, in seconds. (readonly)'
	    },
	    {
	        name: 'bind:buffered',
	        description: 'An array of {start, end} objects. (readonly)'
	    },
	    {
	        name: 'bind:seekable',
	        description: 'An array of {start, end} objects. (readonly)'
	    },
	    {
	        name: 'bind:played',
	        description: 'An array of {start, end} objects. (readonly)'
	    },
	    {
	        name: 'bind:seeking',
	        description: 'boolean. (readonly)'
	    },
	    {
	        name: 'bind:ended',
	        description: 'boolean. (readonly)'
	    },
	    {
	        name: 'bind:currentTime',
	        description: 'The current point in the video, in seconds.'
	    },
	    {
	        name: 'bind:playbackRate',
	        description: "how fast or slow to play the video, where 1 is 'normal'"
	    },
	    {
	        name: 'bind:paused'
	    },
	    {
	        name: 'bind:volume',
	        description: 'A value between 0 and 1'
	    },
	    {
	        name: 'bind:muted'
	    },
	    {
	        name: 'bind:readyState'
	    }
	];
	const videoAttributes = [
	    {
	        name: 'bind:videoWidth',
	        description: 'readonly'
	    },
	    {
	        name: 'bind:videoHeight',
	        description: 'readonly'
	    }
	];
	const indeterminateAttribute = {
	    name: 'indeterminate',
	    description: 'Available for type="checkbox"'
	};
	const addAttributes = {
	    select: [{ name: 'bind:value' }],
	    input: [
	        { name: 'bind:value' },
	        { name: 'bind:group', description: 'Available for type="radio" and type="checkbox"' },
	        { name: 'bind:checked', description: 'Available for type="checkbox"' },
	        { name: 'bind:files', description: 'Available for type="file" (readonly)' },
	        indeterminateAttribute,
	        { ...indeterminateAttribute, name: 'bind:indeterminate' }
	    ],
	    img: [{ name: 'bind:naturalWidth' }, { name: 'bind:naturalHeight' }],
	    textarea: [{ name: 'bind:value' }],
	    video: [...mediaAttributes, ...videoAttributes],
	    audio: [...mediaAttributes],
	    details: [
	        {
	            name: 'bind:open'
	        }
	    ],
	    script: [
	        {
	            name: 'generics',
	            description: 'Generics used within the components. Only available when using TypeScript.'
	        }
	    ]
	};
	const html5Tags = webCustomData_1.htmlData.tags.map((tag) => {
	    let attributes = tag.attributes.map(mapToSvelteEvent);
	    if (addAttributes[tag.name]) {
	        attributes = [...attributes, ...addAttributes[tag.name]];
	    }
	    return {
	        ...tag,
	        attributes
	    };
	});
	exports.svelteHtmlDataProvider = (0, vscode_html_languageservice_1.newHTMLDataProvider)('svelte-builtin', {
	    version: 1,
	    globalAttributes: [
	        ...webCustomData_1.htmlData.globalAttributes,
	        ...svelteDirectiveKeywords,
	        ...svelteEvents,
	        ...svelteAttributes,
	        ...sveltekitAttributes
	    ],
	    tags: [...html5Tags, ...svelteTags],
	    valueSets: webCustomData_1.htmlData.valueSets?.map((set) => ({
	        name: set.name,
	        values: (0, utils_1.unique)(set.values)
	    })) ?? []
	});
	const originalProvideAttributes = exports.svelteHtmlDataProvider.provideAttributes.bind(exports.svelteHtmlDataProvider);
	exports.svelteHtmlDataProvider.provideAttributes = (tag) => {
	    if (tag === 'svelte:boundary' || tag === 'svelte:options') {
	        return svelteTags.find((t) => t.name === tag)?.attributes ?? [];
	    }
	    return originalProvideAttributes(tag);
	};
	function isEvent(attr) {
	    return attr.name.startsWith('on');
	}
	function mapToSvelteEvent(attr) {
	    return {
	        ...attr,
	        name: attr.name.replace(/^on/, 'on:')
	    };
	}
} (dataProvider));
getDefaultExportFromCjs(dataProvider);

var __importDefault$2 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(HTMLPlugin$1, "__esModule", { value: true });
HTMLPlugin$1.HTMLPlugin = void 0;
const emmet_helper_1 = require$$0$1;
const vscode_html_languageservice_1 = require$$1$2;
const vscode_languageserver_1$4 = main$8;
const documents_1$3 = documents;
const dataProvider_1 = dataProvider;
const utils_1$5 = requireUtils$2();
const utils_2$1 = utils$6;
const importPackage_1$1 = importPackage;
const path_1$2 = __importDefault$2(path$1);
const logger_1$3 = logger;
const indentFolding_1 = indentFolding;
const wordHighlight_1 = wordHighlight;
const vscode_uri_1 = umdExports;
const wordPattern = /(-?\d*\.\d\w*)|([^`~!@$^&*()=+[{\]}\|;:'",.<>\/\s]+)/g;
const attributeValuePlaceHolder = '="$1"';
class HTMLPlugin {
    constructor(docManager, configManager, fileSystemProvider, workspaceFolders) {
        this.configManager = configManager;
        this.fileSystemProvider = fileSystemProvider;
        this.workspaceFolders = workspaceFolders;
        this.__name = 'html';
        this.lang = (0, vscode_html_languageservice_1.getLanguageService)({
            customDataProviders: this.getCustomDataProviders(),
            useDefaultDataProvider: false,
            clientCapabilities: this.configManager.getClientCapabilities()
        });
        this.documents = new WeakMap();
        this.styleScriptTemplate = new Set(['template', 'style', 'script']);
        this.htmlTriggerCharacters = ['.', ':', '<', '"', '=', '/'];
        this.loadedEmmetExtensionsPaths = '';
        configManager.onChange(() => {
            this.lang.setDataProviders(false, this.getCustomDataProviders());
            this.reloadEmmetExtensionsIfNeeded();
        });
        this.reloadEmmetExtensionsIfNeeded();
        const sync = (document) => {
            this.documents.set(document, document.html);
        };
        docManager.on('documentChange', sync);
        docManager.on('documentOpen', sync);
    }
    reloadEmmetExtensionsIfNeeded() {
        const emmetConfig = this.configManager.getEmmetConfig();
        const extensionsPath = emmetConfig.extensionsPath || [];
        const joinedPaths = Array.from(extensionsPath).sort().join(',');
        if (this.loadedEmmetExtensionsPaths !== joinedPaths) {
            this.loadedEmmetExtensionsPaths = joinedPaths;
            (0, emmet_helper_1.updateExtensionsPath)(extensionsPath, this.fileSystemProvider, this.workspaceFolders.map((folder) => vscode_uri_1.URI.parse(folder.uri))).catch((err) => logger_1$3.Logger.error(err));
        }
    }
    doHover(document, position) {
        if (!this.featureEnabled('hover')) {
            return null;
        }
        const html = this.documents.get(document);
        if (!html) {
            return null;
        }
        const node = html.findNodeAt(document.offsetAt(position));
        if (!node || (0, utils_2$1.possiblyComponent)(node)) {
            return null;
        }
        return this.lang.doHover(document, position, html);
    }
    async getCompletions(document, position, completionContext) {
        if (!this.featureEnabled('completions')) {
            return null;
        }
        const html = this.documents.get(document);
        if (!html) {
            return null;
        }
        if (this.isInsideMoustacheTag(html, document, position) ||
            (0, documents_1$3.isInTag)(position, document.scriptInfo) ||
            (0, documents_1$3.isInTag)(position, document.moduleScriptInfo)) {
            return null;
        }
        let emmetResults = {
            isIncomplete: false,
            items: []
        };
        let doEmmetCompleteInner = () => null;
        if (this.configManager.getConfig().html.completions.emmet &&
            this.configManager.getEmmetConfig().showExpandedAbbreviation !== 'never') {
            doEmmetCompleteInner = () => (0, emmet_helper_1.doComplete)(document, position, 'html', this.configManager.getEmmetConfig());
            this.lang.setCompletionParticipants([
                {
                    onHtmlContent: () => (emmetResults = doEmmetCompleteInner() || emmetResults)
                }
            ]);
        }
        if (completionContext?.triggerCharacter &&
            !this.htmlTriggerCharacters.includes(completionContext?.triggerCharacter)) {
            const node = html.findNodeAt(document.offsetAt(position));
            const offset = document.offsetAt(position);
            if (!node?.tag ||
                (offset > (node.startTagEnd ?? node.end) &&
                    (node.endTagStart == null || offset <= node.endTagStart))) {
                return doEmmetCompleteInner() ?? null;
            }
            return null;
        }
        const results = this.isInComponentTag(html, document, position)
            ?
                vscode_languageserver_1$4.CompletionList.create([])
            : this.lang.doComplete(document, position, html);
        const items = this.toCompletionItems(results.items);
        const filePath = document.getFilePath();
        const prettierConfig = filePath &&
            items.some((item) => item.label.startsWith('on:') || item.label.startsWith('bind:'))
            ? this.configManager.getMergedPrettierConfig(await (0, importPackage_1$1.importPrettier)(filePath).resolveConfig(filePath, {
                editorconfig: true
            }))
            : null;
        const svelteStrictMode = prettierConfig?.svelteStrictMode;
        const startQuote = svelteStrictMode ? '"{' : '{';
        const endQuote = svelteStrictMode ? '}"' : '}';
        items.forEach((item) => {
            if (item.label.endsWith(':')) {
                item.kind = vscode_languageserver_1$4.CompletionItemKind.Keyword;
                if (item.textEdit) {
                    item.textEdit.newText = item.textEdit.newText.replace(attributeValuePlaceHolder, '');
                }
            }
            if (!item.textEdit) {
                return;
            }
            if (item.label.startsWith('on')) {
                const isLegacyDirective = item.label.startsWith('on:');
                const modifierTabStop = isLegacyDirective ? '$2' : '';
                item.textEdit = {
                    ...item.textEdit,
                    newText: item.textEdit.newText.replace(attributeValuePlaceHolder, `${modifierTabStop}=${startQuote}$1${endQuote}`)
                };
                if (isLegacyDirective && document.isSvelte5) {
                    item.sortText = 'z' + (item.sortText ?? item.label);
                }
            }
            if (item.label.startsWith('bind:')) {
                item.textEdit = {
                    ...item.textEdit,
                    newText: item.textEdit.newText.replace(attributeValuePlaceHolder, `=${startQuote}$1${endQuote}`)
                };
            }
        });
        return vscode_languageserver_1$4.CompletionList.create([...items, ...this.getLangCompletions(items), ...emmetResults.items],
        emmetResults.items.length > 0);
    }
    toCompletionItems(items) {
        return items.map((item) => {
            if (!item.textEdit || vscode_languageserver_1$4.TextEdit.is(item.textEdit)) {
                return item;
            }
            return {
                ...item,
                textEdit: vscode_languageserver_1$4.TextEdit.replace(item.textEdit.replace, item.textEdit.newText)
            };
        });
    }
    isInComponentTag(html, document, position) {
        return !!(0, documents_1$3.getNodeIfIsInComponentStartTag)(html, document, document.offsetAt(position));
    }
    getLangCompletions(completions) {
        const styleScriptTemplateCompletions = completions.filter((completion) => completion.kind === vscode_languageserver_1$4.CompletionItemKind.Property &&
            this.styleScriptTemplate.has(completion.label));
        const langCompletions = [];
        addLangCompletion('script', ['ts']);
        addLangCompletion('style', ['less', 'scss']);
        addLangCompletion('template', ['pug']);
        return langCompletions;
        function addLangCompletion(tag, languages) {
            const existingCompletion = styleScriptTemplateCompletions.find((completion) => completion.label === tag);
            if (!existingCompletion) {
                return;
            }
            languages.forEach((lang) => langCompletions.push({
                ...existingCompletion,
                label: `${tag} (lang="${lang}")`,
                insertText: existingCompletion.insertText &&
                    `${existingCompletion.insertText} lang="${lang}"`,
                textEdit: existingCompletion.textEdit && vscode_languageserver_1$4.TextEdit.is(existingCompletion.textEdit)
                    ? {
                        range: existingCompletion.textEdit.range,
                        newText: `${existingCompletion.textEdit.newText} lang="${lang}"`
                    }
                    : undefined
            }));
        }
    }
    doTagComplete(document, position) {
        if (!this.featureEnabled('tagComplete')) {
            return null;
        }
        const html = this.documents.get(document);
        if (!html) {
            return null;
        }
        if (this.isInsideMoustacheTag(html, document, position)) {
            return null;
        }
        return this.lang.doTagComplete(document, position, html);
    }
    isInsideMoustacheTag(html, document, position) {
        const offset = document.offsetAt(position);
        const node = html.findNodeAt(offset);
        return (0, utils_1$5.isInsideMoustacheTag)(document.getText(), node.start, offset);
    }
    getDocumentSymbols(document) {
        if (!this.featureEnabled('documentSymbols')) {
            return [];
        }
        const html = this.documents.get(document);
        if (!html) {
            return [];
        }
        return this.lang.findDocumentSymbols(document, html);
    }
    rename(document, position, newName) {
        const html = this.documents.get(document);
        if (!html) {
            return null;
        }
        const node = html.findNodeAt(document.offsetAt(position));
        if (!node || (0, utils_2$1.possiblyComponent)(node)) {
            return null;
        }
        return this.lang.doRename(document, position, newName, html);
    }
    prepareRename(document, position) {
        const html = this.documents.get(document);
        if (!html) {
            return null;
        }
        const offset = document.offsetAt(position);
        const node = html.findNodeAt(offset);
        if (!node || (0, utils_2$1.possiblyComponent)(node) || !node.tag || !this.isRenameAtTag(node, offset)) {
            return null;
        }
        const tagNameStart = node.start + '<'.length;
        return (0, utils_1$5.toRange)(document, tagNameStart, tagNameStart + node.tag.length);
    }
    getLinkedEditingRanges(document, position) {
        if (!this.featureEnabled('linkedEditing')) {
            return null;
        }
        const html = this.documents.get(document);
        if (!html) {
            return null;
        }
        const ranges = this.lang.findLinkedEditingRanges(document, position, html);
        if (!ranges) {
            return null;
        }
        return {
            ranges,
            wordPattern: '(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\^\\&\\*\\(\\)\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\\'\\"\\,\\<\\>\\/\\s]+)'
        };
    }
    getFoldingRanges(document) {
        const result = this.lang.getFoldingRanges(document);
        const templateRange = document.templateInfo
            ? (0, indentFolding_1.indentBasedFoldingRangeForTag)(document, document.templateInfo)
            : [];
        const ARROW = '=>';
        if (!document.getText().includes(ARROW)) {
            return result.concat(templateRange);
        }
        const byEnd = new Map();
        for (const fold of result) {
            byEnd.set(fold.endLine, (byEnd.get(fold.endLine) ?? []).concat(fold));
        }
        let startIndex = 0;
        while (startIndex < document.getTextLength()) {
            const index = document.getText().indexOf(ARROW, startIndex);
            startIndex = index + ARROW.length;
            if (index === -1) {
                break;
            }
            const position = document.positionAt(index);
            const isInStyleOrScript = (0, documents_1$3.isInTag)(position, document.styleInfo) ||
                (0, documents_1$3.isInTag)(position, document.scriptInfo) ||
                (0, documents_1$3.isInTag)(position, document.moduleScriptInfo);
            if (isInStyleOrScript) {
                continue;
            }
            const tag = document.html.findNodeAt(index);
            if (!tag.startTagEnd || index > tag.startTagEnd) {
                continue;
            }
            const tagStartPosition = document.positionAt(tag.start);
            const range = byEnd
                .get(position.line)
                ?.find((r) => r.startLine === tagStartPosition.line);
            const newEndLine = document.positionAt(tag.end).line - 1;
            if (newEndLine <= tagStartPosition.line) {
                continue;
            }
            if (range) {
                range.endLine = newEndLine;
            }
            else {
                result.push({
                    startLine: tagStartPosition.line,
                    endLine: newEndLine
                });
            }
        }
        return result.concat(templateRange);
    }
    findDocumentHighlight(document, position) {
        const html = this.documents.get(document);
        if (!html) {
            return null;
        }
        const templateResult = (0, wordHighlight_1.wordHighlightForTag)(document, position, document.templateInfo, wordPattern);
        if (templateResult) {
            return templateResult;
        }
        const node = html.findNodeAt(document.offsetAt(position));
        if ((0, utils_2$1.possiblyComponent)(node)) {
            return null;
        }
        const result = this.lang.findDocumentHighlights(document, position, html);
        if (!result.length) {
            return null;
        }
        return result;
    }
    isRenameAtTag(node, offset) {
        if (!node.tag) {
            return false;
        }
        const startTagNameEnd = node.start + `<${node.tag}`.length;
        const isAtStartTag = offset > node.start && offset <= startTagNameEnd;
        const isAtEndTag = node.endTagStart !== undefined && offset >= node.endTagStart && offset < node.end;
        return isAtStartTag || isAtEndTag;
    }
    getCustomDataProviders() {
        const providers = this.configManager
            .getHTMLConfig()
            ?.customData?.map((customDataPath) => {
            try {
                const jsonPath = path_1$2.default.resolve(customDataPath);
                return (0, vscode_html_languageservice_1.newHTMLDataProvider)(customDataPath, commonjsRequire(jsonPath));
            }
            catch (error) {
                logger_1$3.Logger.error(error);
            }
        })
            .filter(utils_2$1.isNotNullOrUndefined) ?? [];
        return [dataProvider_1.svelteHtmlDataProvider].concat(providers);
    }
    featureEnabled(feature) {
        return (this.configManager.enabled('html.enable') &&
            this.configManager.enabled(`html.${feature}.enable`));
    }
}
HTMLPlugin$1.HTMLPlugin = HTMLPlugin;

var PluginHost$1 = {};

Object.defineProperty(PluginHost$1, "__esModule", { value: true });
PluginHost$1.PluginHost = void 0;
const perf_hooks_1 = require$$0$7;
const vscode_languageserver_1$3 = main$8;
const documents_1$2 = documents;
const logger_1$2 = logger;
const utils_1$4 = utils$6;
var ExecuteMode;
(function (ExecuteMode) {
    ExecuteMode[ExecuteMode["None"] = 0] = "None";
    ExecuteMode[ExecuteMode["FirstNonNull"] = 1] = "FirstNonNull";
    ExecuteMode[ExecuteMode["Collect"] = 2] = "Collect";
})(ExecuteMode || (ExecuteMode = {}));
class PluginHost {
    constructor(documentsManager) {
        this.documentsManager = documentsManager;
        this.plugins = [];
        this.pluginHostConfig = {
            filterIncompleteCompletions: true,
            definitionLinkSupport: false
        };
        this.deferredRequests = {};
        this.requestTimings = {};
    }
    initialize(pluginHostConfig) {
        this.pluginHostConfig = pluginHostConfig;
    }
    register(plugin) {
        this.plugins.push(plugin);
    }
    didUpdateDocument() {
        this.deferredRequests = {};
    }
    async getDiagnostics(textDocument, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        if (this.canSkipDiagnostics(document)) {
            return [];
        }
        return (await this.execute('getDiagnostics', [document, cancellationToken], ExecuteMode.Collect, 'high')).flat();
    }
    canSkipDiagnostics(document) {
        return ((document.getFilePath()?.includes('/node_modules/') ||
            document.getFilePath()?.includes('\\node_modules\\')) &&
            !(document.getFilePath()?.includes('/src/node_modules/') ||
                document.getFilePath()?.includes('\\src\\node_modules\\')));
    }
    async getDiagnosticsForPullMode(textDocument, previousResultId, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        let previousResultIdData = {};
        if (previousResultId) {
            try {
                previousResultIdData = JSON.parse(previousResultId);
            }
            catch (error) { }
        }
        if (this.canSkipDiagnostics(document)) {
            return {
                kind: 'full',
                items: []
            };
        }
        const plugins = this.plugins.filter((plugin) => typeof plugin.getDiagnosticsForPullMode === 'function');
        const results = await Promise.all(plugins.map(async (plugin) => [
            plugin.__name,
            await this.tryExecutePlugin(plugin, 'getDiagnosticsForPullMode', [document, previousResultIdData[plugin.__name], cancellationToken], { kind: 'full', items: [] })
        ]));
        const newResultId = JSON.stringify(Object.fromEntries(results.map(([name, res]) => [name, res.resultId])));
        const unchanged = results
            .filter(([, res]) => res.kind === 'unchanged')
            .map(([name]) => name);
        const fullResults = results.flatMap(([, res]) => (res.kind === 'full' ? res.items : []));
        if (unchanged.length === plugins.length) {
            return {
                kind: 'unchanged',
                resultId: newResultId
            };
        }
        if (unchanged.length === 0) {
            return {
                kind: 'full',
                resultId: newResultId,
                items: fullResults
            };
        }
        const unchangedPlugins = plugins.filter((plugin) => unchanged.includes(plugin.__name));
        const unchangedResults = await Promise.all(unchangedPlugins.map(async (plugin) => {
            const result = await this.tryExecutePlugin(plugin, 'getDiagnostics', [document, cancellationToken], []);
            return result;
        }));
        return {
            kind: 'full',
            resultId: newResultId,
            items: fullResults.concat(unchangedResults.flat())
        };
    }
    async doHover(textDocument, position) {
        const document = this.getDocument(textDocument.uri);
        return this.execute('doHover', [document, position], ExecuteMode.FirstNonNull, 'high');
    }
    async getCompletions(textDocument, position, completionContext, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        const completions = await Promise.all(this.plugins.map(async (plugin) => {
            const result = await this.tryExecutePlugin(plugin, 'getCompletions', [document, position, completionContext, cancellationToken], null);
            if (result) {
                return { result: result, plugin: plugin.__name };
            }
        })).then((completions) => completions.filter(utils_1$4.isNotNullOrUndefined));
        const html = completions.find((completion) => completion.plugin === 'html');
        const ts = completions.find((completion) => completion.plugin === 'ts');
        if (html && ts && (0, documents_1$2.getNodeIfIsInHTMLStartTag)(document.html, document.offsetAt(position))) {
            const htmlCompletions = new Set(html.result.items.map((item) => item.label));
            ts.result.items = ts.result.items.filter((item) => {
                const label = item.label;
                if (htmlCompletions.has(label)) {
                    return false;
                }
                if (label[0] === '"' && label[label.length - 1] === '"') {
                    item.label = item.label.slice(1, -1);
                    if (htmlCompletions.has(item.label)) {
                        return false;
                    }
                }
                if (label.startsWith('on')) {
                    if (htmlCompletions.has('on:' + label.slice(2))) {
                        return false;
                    }
                }
                item.sortText = 'Z' + (item.sortText || '');
                return true;
            });
        }
        let itemDefaults;
        if (completions.length === 1) {
            itemDefaults = completions[0]?.result.itemDefaults;
        }
        else {
            for (const completion of completions) {
                const itemDefaults = completion.result.itemDefaults;
                if (!itemDefaults) {
                    continue;
                }
                completion.result.items.forEach((item) => {
                    item.commitCharacters ??= itemDefaults.commitCharacters;
                });
            }
        }
        let flattenedCompletions = completions.map((completion) => completion.result.items).flat();
        const isIncomplete = completions.reduce((incomplete, completion) => incomplete || completion.result.isIncomplete, false);
        if (isIncomplete && this.pluginHostConfig.filterIncompleteCompletions) {
            const offset = document.offsetAt(position);
            const text = document.getText().substring(Math.max(0, offset - 20), offset);
            const start = (0, utils_1$4.regexLastIndexOf)(text, /[\W\s]/g) + 1;
            const filterValue = text.substring(start).toLowerCase();
            flattenedCompletions = flattenedCompletions.filter((comp) => comp.label.toLowerCase().includes(filterValue));
        }
        const result = vscode_languageserver_1$3.CompletionList.create(flattenedCompletions, isIncomplete);
        result.itemDefaults = itemDefaults;
        return result;
    }
    async resolveCompletion(textDocument, completionItem, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        const result = await this.execute('resolveCompletion', [document, completionItem, cancellationToken], ExecuteMode.FirstNonNull, 'high');
        return result ?? completionItem;
    }
    async formatDocument(textDocument, options) {
        const document = this.getDocument(textDocument.uri);
        return (await this.execute('formatDocument', [document, options], ExecuteMode.Collect, 'high')).flat();
    }
    async doTagComplete(textDocument, position) {
        const document = this.getDocument(textDocument.uri);
        return this.execute('doTagComplete', [document, position], ExecuteMode.FirstNonNull, 'high');
    }
    async getDocumentColors(textDocument) {
        const document = this.getDocument(textDocument.uri);
        const result = await this.execute('getDocumentColors', [document], ExecuteMode.Collect, 'low');
        return result?.flat() ?? [];
    }
    async getColorPresentations(textDocument, range, color) {
        const document = this.getDocument(textDocument.uri);
        return (await this.execute('getColorPresentations', [document, range, color], ExecuteMode.Collect, 'high')).flat();
    }
    async getDocumentSymbols(textDocument, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        await new Promise((resolve) => setTimeout(resolve, 1000));
        if (cancellationToken.isCancellationRequested) {
            return [];
        }
        return (await this.execute('getDocumentSymbols', [document, cancellationToken], ExecuteMode.Collect, 'high')).flat();
    }
    comparePosition(pos1, pos2) {
        if (pos1.line < pos2.line)
            return -1;
        if (pos1.line > pos2.line)
            return 1;
        if (pos1.character < pos2.character)
            return -1;
        if (pos1.character > pos2.character)
            return 1;
        return 0;
    }
    rangeContains(parent, child) {
        return (this.comparePosition(parent.start, child.start) <= 0 &&
            this.comparePosition(child.end, parent.end) <= 0);
    }
    async getHierarchicalDocumentSymbols(textDocument, cancellationToken) {
        const flat = await this.getDocumentSymbols(textDocument, cancellationToken);
        const symbols = flat
            .map((s) => vscode_languageserver_1$3.DocumentSymbol.create(s.name, undefined, s.kind, s.location.range, s.location.range, []))
            .sort((a, b) => {
            const start = this.comparePosition(a.range.start, b.range.start);
            if (start !== 0)
                return start;
            return this.comparePosition(b.range.end, a.range.end);
        });
        const stack = [];
        const roots = [];
        for (const node of symbols) {
            while (stack.length > 0 && !this.rangeContains(stack.at(-1).range, node.range)) {
                stack.pop();
            }
            if (stack.length > 0) {
                stack.at(-1).children.push(node);
            }
            else {
                roots.push(node);
            }
            stack.push(node);
        }
        return roots;
    }
    async getDefinitions(textDocument, position) {
        const document = this.getDocument(textDocument.uri);
        const definitions = (await this.execute('getDefinitions', [document, position], ExecuteMode.Collect, 'high')).flat();
        if (this.pluginHostConfig.definitionLinkSupport) {
            return definitions;
        }
        else {
            return definitions.map((def) => ({ range: def.targetSelectionRange, uri: def.targetUri }));
        }
    }
    async getCodeActions(textDocument, range, context, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        const actions = (await this.execute('getCodeActions', [document, range, context, cancellationToken], ExecuteMode.Collect, 'high')).flat();
        actions.sort((a, b) => {
            const aPrio = a.title.startsWith('(svelte)') ? 1 : 0;
            const bPrio = b.title.startsWith('(svelte)') ? 1 : 0;
            return aPrio - bPrio;
        });
        return actions;
    }
    async executeCommand(textDocument, command, args) {
        const document = this.getDocument(textDocument.uri);
        return await this.execute('executeCommand', [document, command, args], ExecuteMode.FirstNonNull, 'high');
    }
    async resolveCodeAction(textDocument, codeAction, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        const result = await this.execute('resolveCodeAction', [document, codeAction, cancellationToken], ExecuteMode.FirstNonNull, 'high');
        return result ?? codeAction;
    }
    async updateImports(fileRename) {
        return await this.execute('updateImports', [fileRename], ExecuteMode.FirstNonNull, 'high');
    }
    async prepareRename(textDocument, position) {
        const document = this.getDocument(textDocument.uri);
        return await this.execute('prepareRename', [document, position], ExecuteMode.FirstNonNull, 'high');
    }
    async rename(textDocument, position, newName) {
        const document = this.getDocument(textDocument.uri);
        return await this.execute('rename', [document, position, newName], ExecuteMode.FirstNonNull, 'high');
    }
    async findReferences(textDocument, position, context, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        return await this.execute('findReferences', [document, position, context, cancellationToken], ExecuteMode.FirstNonNull, 'high');
    }
    async fileReferences(uri) {
        return await this.execute('fileReferences', [uri], ExecuteMode.FirstNonNull, 'high');
    }
    async findComponentReferences(uri) {
        return await this.execute('findComponentReferences', [uri], ExecuteMode.FirstNonNull, 'high');
    }
    async getSignatureHelp(textDocument, position, context, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        return await this.execute('getSignatureHelp', [document, position, context, cancellationToken], ExecuteMode.FirstNonNull, 'high');
    }
    async getSelectionRanges(textDocument, positions) {
        const document = this.getDocument(textDocument.uri);
        try {
            return Promise.all(positions.map(async (position) => {
                for (const plugin of this.plugins) {
                    const range = await plugin.getSelectionRange?.(document, position);
                    if (range) {
                        return range;
                    }
                }
                return vscode_languageserver_1$3.SelectionRange.create(vscode_languageserver_1$3.Range.create(position, position));
            }));
        }
        catch (error) {
            logger_1$2.Logger.error(error);
            return null;
        }
    }
    async getSemanticTokens(textDocument, range, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        return await this.execute('getSemanticTokens', [document, range, cancellationToken], ExecuteMode.FirstNonNull, 'smart');
    }
    async getLinkedEditingRanges(textDocument, position) {
        const document = this.getDocument(textDocument.uri);
        return await this.execute('getLinkedEditingRanges', [document, position], ExecuteMode.FirstNonNull, 'high');
    }
    getImplementation(textDocument, position, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        return this.execute('getImplementation', [document, position, cancellationToken], ExecuteMode.FirstNonNull, 'high');
    }
    getTypeDefinition(textDocument, position) {
        const document = this.getDocument(textDocument.uri);
        return this.execute('getTypeDefinition', [document, position], ExecuteMode.FirstNonNull, 'high');
    }
    getInlayHints(textDocument, range, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        return this.execute('getInlayHints', [document, range, cancellationToken], ExecuteMode.FirstNonNull, 'smart');
    }
    prepareCallHierarchy(textDocument, position, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        return this.execute('prepareCallHierarchy', [document, position, cancellationToken], ExecuteMode.FirstNonNull, 'high');
    }
    getIncomingCalls(item, cancellationToken) {
        return this.execute('getIncomingCalls', [item, cancellationToken], ExecuteMode.FirstNonNull, 'high');
    }
    getOutgoingCalls(item, cancellationToken) {
        return this.execute('getOutgoingCalls', [item, cancellationToken], ExecuteMode.FirstNonNull, 'high');
    }
    async getCodeLens(textDocument) {
        const document = this.getDocument(textDocument.uri);
        if (!document) {
            throw new Error('Cannot call methods on an unopened document');
        }
        const result = await this.execute('getCodeLens', [document], ExecuteMode.Collect, 'smart');
        return result?.filter(Boolean).flat();
    }
    async getFoldingRanges(textDocument) {
        const document = this.getDocument(textDocument.uri);
        const result = (await this.execute('getFoldingRanges', [document], ExecuteMode.Collect, 'high')).flat();
        return result;
    }
    async resolveCodeLens(textDocument, codeLens, cancellationToken) {
        const document = this.getDocument(textDocument.uri);
        if (!document) {
            throw new Error('Cannot call methods on an unopened document');
        }
        return ((await this.execute('resolveCodeLens', [document, codeLens, cancellationToken], ExecuteMode.FirstNonNull, 'smart')) ?? codeLens);
    }
    findDocumentHighlight(textDocument, position) {
        const document = this.getDocument(textDocument.uri);
        if (!document) {
            throw new Error('Cannot call methods on an unopened document');
        }
        return (this.execute('findDocumentHighlight', [document, position], ExecuteMode.FirstNonNull, 'high') ?? []
        );
    }
    async getWorkspaceSymbols(query, token) {
        return await this.execute('getWorkspaceSymbols', [query, token], ExecuteMode.FirstNonNull, 'high');
    }
    onWatchFileChanges(onWatchFileChangesParas) {
        for (const support of this.plugins) {
            support.onWatchFileChanges?.(onWatchFileChangesParas);
        }
    }
    updateTsOrJsFile(fileName, changes) {
        for (const support of this.plugins) {
            support.updateTsOrJsFile?.(fileName, changes);
        }
    }
    getDocument(uri) {
        const document = this.documentsManager.get(uri);
        if (!document) {
            throw new Error('Cannot call methods on an unopened document');
        }
        return document;
    }
    async execute(name, args, mode, priority) {
        const plugins = this.plugins.filter((plugin) => typeof plugin[name] === 'function');
        const now = perf_hooks_1.performance.now();
        if (priority === 'smart' &&
            (this.requestTimings[name]?.[0] > 500 ||
                Object.values(this.requestTimings).filter((t) => t[0] > 400 && now - t[1] < 60 * 1000).length > 2)) {
            logger_1$2.Logger.debug(`Executing next invocation of "${name}" with low priority`);
            priority = 'low';
            if (this.requestTimings[name]) {
                this.requestTimings[name][0] = this.requestTimings[name][0] / 2 + 150;
            }
        }
        if (priority === 'low') {
            const debounce = async () => {
                const id = Math.random();
                this.deferredRequests[name] = [
                    id,
                    new Promise((resolve, reject) => {
                        setTimeout(() => {
                            if (!this.deferredRequests[name] ||
                                this.deferredRequests[name][0] === id) {
                                resolve();
                            }
                            else {
                                reject();
                            }
                        }, 1000);
                    })
                ];
                try {
                    await this.deferredRequests[name][1];
                    if (!this.deferredRequests[name]) {
                        return debounce();
                    }
                    return true;
                }
                catch (e) {
                    return false;
                }
            };
            const shouldContinue = await debounce();
            if (!shouldContinue) {
                return;
            }
        }
        const startTime = perf_hooks_1.performance.now();
        const result = await this.executePlugins(name, args, mode, plugins);
        this.requestTimings[name] = [perf_hooks_1.performance.now() - startTime, startTime];
        return result;
    }
    async executePlugins(name, args, mode, plugins) {
        switch (mode) {
            case ExecuteMode.FirstNonNull:
                for (const plugin of plugins) {
                    const res = await this.tryExecutePlugin(plugin, name, args, null);
                    if (res != null) {
                        return res;
                    }
                }
                return null;
            case ExecuteMode.Collect:
                return Promise.all(plugins.map((plugin) => this.tryExecutePlugin(plugin, name, args, [])));
            case ExecuteMode.None:
                await Promise.all(plugins.map((plugin) => this.tryExecutePlugin(plugin, name, args, null)));
                return;
        }
    }
    async tryExecutePlugin(plugin, fnName, args, failValue) {
        try {
            return await plugin[fnName](...args);
        }
        catch (e) {
            logger_1$2.Logger.error(e);
            return failValue;
        }
    }
}
PluginHost$1.PluginHost = PluginHost;

var interfaces = {};

Object.defineProperty(interfaces, "__esModule", { value: true });

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	__exportStar(CSSPlugin$1, exports);
	__exportStar(TypeScriptPlugin$1, exports);
	__exportStar(LSAndTSDocResolver$1, exports);
	__exportStar(SveltePlugin$1, exports);
	__exportStar(HTMLPlugin$1, exports);
	__exportStar(PluginHost$1, exports);
	__exportStar(interfaces, exports);
} (plugins));
getDefaultExportFromCjs(plugins);

var FallbackWatcher$1 = {};

Object.defineProperty(FallbackWatcher$1, "__esModule", { value: true });
FallbackWatcher$1.FallbackWatcher = void 0;
const chokidar_1 = require$$0$6;
const lodash_1$1 = lodashExports;
const path_1$1 = path$1;
const vscode_languageserver_1$2 = main$8;
const utils_1$3 = utils$6;
const url_1 = require$$5;
const DELAY = 50;
class FallbackWatcher {
    constructor(watchExtensions, workspacePaths) {
        this.callbacks = [];
        this.undeliveredFileEvents = [];
        this.scheduleTrigger = (0, lodash_1$1.debounce)(() => {
            const para = {
                changes: this.undeliveredFileEvents
            };
            this.undeliveredFileEvents = [];
            this.callbacks.forEach((callback) => callback(para));
        }, DELAY);
        const gitOrNodeModules = /\.git|node_modules/;
        const ignoredExtensions = (fileName, stats) => {
            return (stats?.isFile() === true && !watchExtensions.some((ext) => fileName.endsWith(ext)));
        };
        this.watcher = (0, chokidar_1.watch)(workspacePaths, {
            ignored: [gitOrNodeModules, ignoredExtensions],
            ignoreInitial: true,
            ignorePermissionErrors: true
        });
        this.watcher
            .on('add', (path) => this.onFSEvent(path, vscode_languageserver_1$2.FileChangeType.Created))
            .on('unlink', (path) => this.onFSEvent(path, vscode_languageserver_1$2.FileChangeType.Deleted))
            .on('change', (path) => this.onFSEvent(path, vscode_languageserver_1$2.FileChangeType.Changed));
    }
    convert(path, type) {
        return {
            type,
            uri: (0, utils_1$3.pathToUrl)(path)
        };
    }
    onFSEvent(path, type) {
        const fileEvent = this.convert(path, type);
        this.undeliveredFileEvents.push(fileEvent);
        this.scheduleTrigger();
    }
    onDidChangeWatchedFiles(callback) {
        this.callbacks.push(callback);
    }
    watchDirectory(patterns) {
        for (const pattern of patterns) {
            const basePath = (0, url_1.fileURLToPath)(typeof pattern.baseUri === 'string' ? pattern.baseUri : pattern.baseUri.uri);
            if (!basePath) {
                continue;
            }
            this.watcher.add((0, path_1$1.join)(basePath, pattern.pattern));
        }
    }
    dispose() {
        this.watcher.close();
    }
}
FallbackWatcher$1.FallbackWatcher = FallbackWatcher;

var FileSystemProvider$1 = {};

var __importDefault$1 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(FileSystemProvider$1, "__esModule", { value: true });
FileSystemProvider$1.FileSystemProvider = void 0;
const promises_1 = __importDefault$1(require$$1$3);
const vscode_css_languageservice_1 = require$$1$1;
const utils_1$2 = utils$6;
class FileSystemProvider {
    constructor() {
        this.readDirectory = this.readDirectory.bind(this);
        this.stat = this.stat.bind(this);
    }
    async stat(uri) {
        const path = typeof uri === 'string' ? (0, utils_1$2.urlToPath)(uri) : uri.fsPath;
        if (!path) {
            return this.unknownStat();
        }
        let stat;
        try {
            stat = await promises_1.default.stat(path);
        }
        catch (error) {
            if (error != null &&
                typeof error === 'object' &&
                'code' in error &&
                error.code === 'ENOENT') {
                return {
                    type: vscode_css_languageservice_1.FileType.Unknown,
                    ctime: -1,
                    mtime: -1,
                    size: -1
                };
            }
            throw error;
        }
        return {
            ctime: stat.ctimeMs,
            mtime: stat.mtimeMs,
            size: stat.size,
            type: this.getFileType(stat)
        };
    }
    unknownStat() {
        return {
            type: vscode_css_languageservice_1.FileType.Unknown,
            ctime: -1,
            mtime: -1,
            size: -1
        };
    }
    getFileType(stat) {
        return stat.isDirectory()
            ? vscode_css_languageservice_1.FileType.Directory
            : stat.isFile()
                ? vscode_css_languageservice_1.FileType.File
                : stat.isSymbolicLink()
                    ? vscode_css_languageservice_1.FileType.SymbolicLink
                    : vscode_css_languageservice_1.FileType.Unknown;
    }
    async readDirectory(uri) {
        const path = (0, utils_1$2.urlToPath)(uri);
        if (!path) {
            return [];
        }
        const files = await promises_1.default.readdir(path, {
            withFileTypes: true
        });
        return files.map((file) => [file.name, this.getFileType(file)]);
    }
    async readFile(uri) {
        const path = uri.fsPath;
        const data = await promises_1.default.readFile(path);
        return new Uint8Array(data);
    }
}
FileSystemProvider$1.FileSystemProvider = FileSystemProvider;

Object.defineProperty(server$1, "__esModule", { value: true });
server$1.startServer = startServer;
const vscode_languageserver_1$1 = main$8;
const node_1 = node$1;
const DiagnosticsManager_1 = DiagnosticsManager;
const documents_1$1 = documents;
const semanticTokenLegend_1 = semanticTokenLegend;
const logger_1$1 = logger;
const ls_config_1$1 = lsConfig;
const plugins_1$1 = plugins;
const utils_1$1 = utils$6;
const FallbackWatcher_1 = FallbackWatcher$1;
const configLoader_1 = configLoader;
const importPackage_1 = importPackage;
const CodeActionsProvider_1 = CodeActionsProvider;
const service_1$1 = service$1;
const FileSystemProvider_1$1 = FileSystemProvider$1;
var TagCloseRequest;
(function (TagCloseRequest) {
    TagCloseRequest.type = new vscode_languageserver_1$1.RequestType('html/tag');
})(TagCloseRequest || (TagCloseRequest = {}));
function startServer(options) {
    let connection = options?.connection;
    if (!connection) {
        if (process.argv.includes('--stdio')) {
            console.log = (...args) => {
                console.warn(...args);
            };
            connection = (0, node_1.createConnection)(process.stdin, process.stdout);
        }
        else {
            connection = (0, node_1.createConnection)(new node_1.IPCMessageReader(process), new node_1.IPCMessageWriter(process));
        }
    }
    if (options?.logErrorsOnly !== undefined) {
        logger_1$1.Logger.setLogErrorsOnly(options.logErrorsOnly);
    }
    const docManager = new documents_1$1.DocumentManager((textDocument) => new documents_1$1.Document(textDocument.uri, textDocument.text));
    const configManager = new ls_config_1$1.LSConfigManager();
    const pluginHost = new plugins_1$1.PluginHost(docManager);
    let sveltePlugin = undefined;
    let watcher;
    let pendingWatchPatterns = [];
    let watchDirectory = (patterns) => {
        pendingWatchPatterns = patterns;
    };
    const watchExtensions = ['.ts', '.js', '.mts', '.mjs', '.cjs', '.cts', '.json', '.svelte'];
    const nonRecursiveWatchPattern = '*.{' + watchExtensions.map((ext) => ext.slice(1)).join(',') + '}';
    const recursiveWatchPattern = '**/' + nonRecursiveWatchPattern;
    connection.onInitialize((evt) => {
        const workspaceUris = evt.workspaceFolders?.map((folder) => folder.uri.toString()) ?? [
            evt.rootUri ?? ''
        ];
        logger_1$1.Logger.log('Initialize language server at ', workspaceUris.join(', '));
        if (workspaceUris.length === 0) {
            logger_1$1.Logger.error('No workspace path set');
        }
        if (!evt.capabilities.workspace?.didChangeWatchedFiles?.dynamicRegistration) {
            const workspacePaths = workspaceUris.map(utils_1$1.urlToPath).filter(utils_1$1.isNotNullOrUndefined);
            watcher = new FallbackWatcher_1.FallbackWatcher(watchExtensions, workspacePaths);
            watcher.onDidChangeWatchedFiles(onDidChangeWatchedFiles);
            watchDirectory = (patterns) => {
                watcher?.watchDirectory(patterns);
            };
        }
        const isTrusted = evt.initializationOptions?.isTrusted ?? true;
        configLoader_1.configLoader.setDisabled(!isTrusted);
        (0, importPackage_1.setIsTrusted)(isTrusted);
        configManager.updateIsTrusted(isTrusted);
        if (!isTrusted) {
            logger_1$1.Logger.log('Workspace is not trusted, running with reduced capabilities.');
        }
        logger_1$1.Logger.setDebug((evt.initializationOptions?.configuration?.svelte ||
            evt.initializationOptions?.config)?.['language-server']?.debug);
        configManager.update(evt.initializationOptions?.configuration?.svelte?.plugin ||
            evt.initializationOptions?.config ||
            {});
        configManager.updateTsJsUserPreferences(evt.initializationOptions?.configuration ||
            evt.initializationOptions?.typescriptConfig ||
            {});
        configManager.updateTsJsFormateConfig(evt.initializationOptions?.configuration ||
            evt.initializationOptions?.typescriptConfig ||
            {});
        configManager.updateEmmetConfig(evt.initializationOptions?.configuration?.emmet ||
            evt.initializationOptions?.emmetConfig ||
            {});
        configManager.updatePrettierConfig(evt.initializationOptions?.configuration?.prettier ||
            evt.initializationOptions?.prettierConfig ||
            {});
        configManager.updateCssConfig(evt.initializationOptions?.configuration?.css);
        configManager.updateScssConfig(evt.initializationOptions?.configuration?.scss);
        configManager.updateLessConfig(evt.initializationOptions?.configuration?.less);
        configManager.updateHTMLConfig(evt.initializationOptions?.configuration?.html);
        configManager.updateClientCapabilities(evt.capabilities);
        pluginHost.initialize({
            filterIncompleteCompletions: !evt.initializationOptions?.dontFilterIncompleteCompletions,
            definitionLinkSupport: !!evt.capabilities.textDocument?.definition?.linkSupport
        });
        const fileSystemProvider = new FileSystemProvider_1$1.FileSystemProvider();
        const workspaceFolders = evt.workspaceFolders ?? [{ name: '', uri: evt.rootUri ?? '' }];
        pluginHost.register((sveltePlugin = new plugins_1$1.SveltePlugin(configManager)));
        pluginHost.register(new plugins_1$1.HTMLPlugin(docManager, configManager, fileSystemProvider, workspaceFolders));
        const cssLanguageServices = (0, service_1$1.createLanguageServices)({
            clientCapabilities: evt.capabilities,
            fileSystemProvider: fileSystemProvider
        });
        pluginHost.register(new plugins_1$1.CSSPlugin(docManager, configManager, workspaceFolders, cssLanguageServices));
        const normalizedWorkspaceUris = workspaceUris.map(utils_1$1.normalizeUri);
        pluginHost.register(new plugins_1$1.TypeScriptPlugin(configManager, new plugins_1$1.LSAndTSDocResolver(docManager, normalizedWorkspaceUris, configManager, {
            notifyExceedSizeLimit: notifyTsServiceExceedSizeLimit,
            onProjectReloaded: refreshCrossFilesSemanticFeatures,
            watch: true,
            nonRecursiveWatchPattern,
            watchDirectory: (patterns) => watchDirectory(patterns),
            reportConfigError(diagnostic) {
                connection?.sendDiagnostics(diagnostic);
            }
        }), normalizedWorkspaceUris, docManager));
        const clientSupportApplyEditCommand = !!evt.capabilities.workspace?.applyEdit;
        const clientCodeActionCapabilities = evt.capabilities.textDocument?.codeAction;
        const clientSupportedCodeActionKinds = clientCodeActionCapabilities?.codeActionLiteralSupport?.codeActionKind.valueSet;
        if (evt.capabilities.textDocument?.diagnostic) {
            const refreshDiagnostics = evt.capabilities.workspace?.diagnostics?.refreshSupport;
            diagnosticsManager = new DiagnosticsManager_1.PullDiagnosticsManager(connection.sendDiagnostics, refreshDiagnostics
                ? () => connection.sendRequest(vscode_languageserver_1$1.DiagnosticRefreshRequest.method)
                : () => { });
            connection.onRequest(vscode_languageserver_1$1.DocumentDiagnosticRequest.type, async (evt, token) => {
                await new Promise((resolve) => setTimeout(resolve, 200));
                if (token.isCancellationRequested) {
                    return null;
                }
                const diagnostics = await pluginHost.getDiagnosticsForPullMode(evt.textDocument, evt.previousResultId, token);
                return diagnostics;
            });
        }
        else {
            connection.onDidSaveTextDocument(diagnosticsManager.scheduleUpdateAll.bind(diagnosticsManager));
        }
        return {
            capabilities: {
                textDocumentSync: {
                    openClose: true,
                    change: vscode_languageserver_1$1.TextDocumentSyncKind.Incremental,
                    save: {
                        includeText: false
                    }
                },
                hoverProvider: true,
                completionProvider: {
                    resolveProvider: true,
                    triggerCharacters: [
                        '.',
                        '"',
                        "'",
                        '`',
                        '/',
                        '@',
                        '<',
                        '>',
                        '*',
                        '#',
                        '$',
                        '+',
                        '^',
                        '(',
                        '[',
                        '@',
                        '-',
                        ':',
                        '|'
                    ],
                    completionItem: {
                        labelDetailsSupport: true
                    }
                },
                documentFormattingProvider: true,
                colorProvider: true,
                documentSymbolProvider: true,
                definitionProvider: true,
                codeActionProvider: clientCodeActionCapabilities?.codeActionLiteralSupport
                    ? {
                        codeActionKinds: [
                            vscode_languageserver_1$1.CodeActionKind.QuickFix,
                            vscode_languageserver_1$1.CodeActionKind.SourceOrganizeImports,
                            CodeActionsProvider_1.SORT_IMPORT_CODE_ACTION_KIND,
                            CodeActionsProvider_1.ADD_MISSING_IMPORTS_CODE_ACTION_KIND,
                            CodeActionsProvider_1.REMOVE_UNUSED_IMPORTS_CODE_ACTION_KIND,
                            ...(clientSupportApplyEditCommand ? [vscode_languageserver_1$1.CodeActionKind.Refactor] : [])
                        ].filter(clientSupportedCodeActionKinds &&
                            evt.initializationOptions?.shouldFilterCodeActionKind
                            ? (kind) => clientSupportedCodeActionKinds.includes(kind)
                            : () => true),
                        resolveProvider: true
                    }
                    : true,
                executeCommandProvider: clientSupportApplyEditCommand
                    ? {
                        commands: [
                            'function_scope_0',
                            'function_scope_1',
                            'function_scope_2',
                            'function_scope_3',
                            'constant_scope_0',
                            'constant_scope_1',
                            'constant_scope_2',
                            'constant_scope_3',
                            'extract_to_svelte_component',
                            'migrate_to_svelte_5',
                            'Infer function return type'
                        ]
                    }
                    : undefined,
                renameProvider: evt.capabilities.textDocument?.rename?.prepareSupport
                    ? { prepareProvider: true }
                    : true,
                referencesProvider: true,
                selectionRangeProvider: true,
                signatureHelpProvider: {
                    triggerCharacters: ['(', ',', '<'],
                    retriggerCharacters: [')']
                },
                semanticTokensProvider: {
                    legend: (0, semanticTokenLegend_1.getSemanticTokenLegends)(),
                    range: true,
                    full: true
                },
                linkedEditingRangeProvider: true,
                implementationProvider: true,
                typeDefinitionProvider: true,
                inlayHintProvider: true,
                callHierarchyProvider: true,
                foldingRangeProvider: true,
                codeLensProvider: {
                    resolveProvider: true
                },
                documentHighlightProvider: evt.initializationOptions?.configuration?.svelte?.plugin?.svelte
                    ?.documentHighlight?.enable ?? true,
                workspaceSymbolProvider: true,
                diagnosticProvider: {
                    interFileDependencies: true,
                    workspaceDiagnostics: false
                }
            }
        };
    });
    connection.onInitialized(() => {
        if (watcher) {
            return;
        }
        const didChangeWatchedFiles = configManager.getClientCapabilities()?.workspace?.didChangeWatchedFiles;
        if (!didChangeWatchedFiles?.dynamicRegistration) {
            return;
        }
        connection?.client.register(vscode_languageserver_1$1.DidChangeWatchedFilesNotification.type, {
            watchers: [
                {
                    globPattern: recursiveWatchPattern
                }
            ]
        });
        if (didChangeWatchedFiles.relativePatternSupport) {
            watchDirectory = (patterns) => {
                connection?.client.register(vscode_languageserver_1$1.DidChangeWatchedFilesNotification.type, {
                    watchers: patterns.map((pattern) => ({
                        globPattern: pattern
                    }))
                });
            };
            if (pendingWatchPatterns.length) {
                watchDirectory(pendingWatchPatterns);
                pendingWatchPatterns = [];
            }
        }
    });
    function notifyTsServiceExceedSizeLimit() {
        connection?.sendNotification(vscode_languageserver_1$1.ShowMessageNotification.type, {
            message: 'Svelte language server detected a large amount of JS/Svelte files. ' +
                'To enable project-wide JavaScript/TypeScript language features for Svelte files, ' +
                'exclude large folders in the tsconfig.json or jsconfig.json with source files that you do not work on.',
            type: vscode_languageserver_1$1.MessageType.Warning
        });
    }
    connection.onExit(() => {
        watcher?.dispose();
    });
    connection.onRenameRequest((req) => pluginHost.rename(req.textDocument, req.position, req.newName));
    connection.onPrepareRename((req) => pluginHost.prepareRename(req.textDocument, req.position));
    connection.onDidChangeConfiguration(({ settings }) => {
        configManager.update(settings.svelte?.plugin);
        configManager.updateTsJsUserPreferences(settings);
        configManager.updateTsJsFormateConfig(settings);
        configManager.updateEmmetConfig(settings.emmet);
        configManager.updatePrettierConfig(settings.prettier);
        configManager.updateCssConfig(settings.css);
        configManager.updateScssConfig(settings.scss);
        configManager.updateLessConfig(settings.less);
        configManager.updateHTMLConfig(settings.html);
        logger_1$1.Logger.setDebug(settings.svelte?.['language-server']?.debug);
    });
    connection.onDidOpenTextDocument((evt) => {
        const document = docManager.openClientDocument(evt.textDocument);
        diagnosticsManager.scheduleUpdate(document);
    });
    connection.onDidCloseTextDocument((evt) => docManager.closeDocument(evt.textDocument.uri));
    connection.onDidChangeTextDocument((evt) => {
        diagnosticsManager.cancelStarted(evt.textDocument.uri);
        docManager.updateDocument(evt.textDocument, evt.contentChanges);
        pluginHost.didUpdateDocument();
    });
    connection.onHover((evt) => pluginHost.doHover(evt.textDocument, evt.position));
    connection.onCompletion((evt, cancellationToken) => pluginHost.getCompletions(evt.textDocument, evt.position, evt.context, cancellationToken));
    connection.onDocumentFormatting((evt) => pluginHost.formatDocument(evt.textDocument, evt.options));
    connection.onRequest(TagCloseRequest.type, (evt) => pluginHost.doTagComplete(evt.textDocument, evt.position));
    connection.onDocumentColor((evt) => pluginHost.getDocumentColors(evt.textDocument));
    connection.onColorPresentation((evt) => pluginHost.getColorPresentations(evt.textDocument, evt.range, evt.color));
    connection.onDocumentSymbol((evt, cancellationToken) => {
        if (configManager.getClientCapabilities()?.textDocument?.documentSymbol
            ?.hierarchicalDocumentSymbolSupport) {
            return pluginHost.getHierarchicalDocumentSymbols(evt.textDocument, cancellationToken);
        }
        else {
            return pluginHost.getDocumentSymbols(evt.textDocument, cancellationToken);
        }
    });
    connection.onDefinition((evt) => pluginHost.getDefinitions(evt.textDocument, evt.position));
    connection.onReferences((evt, cancellationToken) => pluginHost.findReferences(evt.textDocument, evt.position, evt.context, cancellationToken));
    connection.onCodeAction((evt, cancellationToken) => pluginHost.getCodeActions(evt.textDocument, evt.range, evt.context, cancellationToken));
    connection.onExecuteCommand(async (evt) => {
        const result = await pluginHost.executeCommand({ uri: evt.arguments?.[0] }, evt.command, evt.arguments);
        if (vscode_languageserver_1$1.WorkspaceEdit.is(result)) {
            const edit = { edit: result };
            connection?.sendRequest(vscode_languageserver_1$1.ApplyWorkspaceEditRequest.type.method, edit);
        }
        else if (result) {
            connection?.sendNotification(vscode_languageserver_1$1.ShowMessageNotification.type.method, {
                message: result,
                type: vscode_languageserver_1$1.MessageType.Error
            });
        }
    });
    connection.onCodeActionResolve((codeAction, cancellationToken) => {
        const data = codeAction.data;
        return pluginHost.resolveCodeAction(data, codeAction, cancellationToken);
    });
    connection.onCompletionResolve((completionItem, cancellationToken) => {
        const data = completionItem.data;
        if (!data) {
            return completionItem;
        }
        return pluginHost.resolveCompletion(data, completionItem, cancellationToken);
    });
    connection.onSignatureHelp((evt, cancellationToken) => pluginHost.getSignatureHelp(evt.textDocument, evt.position, evt.context, cancellationToken));
    connection.onSelectionRanges((evt) => pluginHost.getSelectionRanges(evt.textDocument, evt.positions));
    connection.onImplementation((evt, cancellationToken) => pluginHost.getImplementation(evt.textDocument, evt.position, cancellationToken));
    connection.onTypeDefinition((evt) => pluginHost.getTypeDefinition(evt.textDocument, evt.position));
    connection.onFoldingRanges((evt) => pluginHost.getFoldingRanges(evt.textDocument));
    connection.onCodeLens((evt) => pluginHost.getCodeLens(evt.textDocument));
    connection.onCodeLensResolve((codeLens, token) => {
        const data = codeLens.data;
        if (!data) {
            return codeLens;
        }
        return pluginHost.resolveCodeLens(data, codeLens, token);
    });
    connection.onDocumentHighlight((evt) => pluginHost.findDocumentHighlight(evt.textDocument, evt.position));
    connection.onWorkspaceSymbol((evt, token) => pluginHost.getWorkspaceSymbols(evt.query, token));
    let diagnosticsManager = new DiagnosticsManager_1.PushDiagnosticsManager(connection.sendDiagnostics, docManager, pluginHost.getDiagnostics.bind(pluginHost));
    const refreshSemanticTokens = (0, utils_1$1.debounceThrottle)(() => {
        if (configManager?.getClientCapabilities()?.workspace?.semanticTokens?.refreshSupport) {
            connection?.sendRequest(vscode_languageserver_1$1.SemanticTokensRefreshRequest.method);
        }
    }, 1500);
    const refreshInlayHints = (0, utils_1$1.debounceThrottle)(() => {
        if (configManager?.getClientCapabilities()?.workspace?.inlayHint?.refreshSupport) {
            connection?.sendRequest(vscode_languageserver_1$1.InlayHintRefreshRequest.method);
        }
    }, 1500);
    const refreshCrossFilesSemanticFeatures = () => {
        diagnosticsManager.scheduleUpdateAll();
        refreshInlayHints();
        refreshSemanticTokens();
    };
    connection.onDidChangeWatchedFiles(onDidChangeWatchedFiles);
    function onDidChangeWatchedFiles(para) {
        const onWatchFileChangesParas = para.changes
            .map((change) => ({
            fileName: (0, utils_1$1.urlToPath)(change.uri),
            changeType: change.type
        }))
            .filter((change) => !!change.fileName);
        pluginHost.onWatchFileChanges(onWatchFileChangesParas);
        refreshCrossFilesSemanticFeatures();
    }
    connection.onNotification('$/onDidChangeTsOrJsFile', async (e) => {
        const path = (0, utils_1$1.urlToPath)(e.uri);
        if (path) {
            pluginHost.updateTsOrJsFile(path, e.changes);
        }
        refreshCrossFilesSemanticFeatures();
    });
    connection.onRequest(vscode_languageserver_1$1.SemanticTokensRequest.type, (evt, cancellationToken) => pluginHost.getSemanticTokens(evt.textDocument, undefined, cancellationToken));
    connection.onRequest(vscode_languageserver_1$1.SemanticTokensRangeRequest.type, (evt, cancellationToken) => pluginHost.getSemanticTokens(evt.textDocument, evt.range, cancellationToken));
    connection.onRequest(vscode_languageserver_1$1.LinkedEditingRangeRequest.type, async (evt) => await pluginHost.getLinkedEditingRanges(evt.textDocument, evt.position));
    connection.onRequest(vscode_languageserver_1$1.InlayHintRequest.type, (evt, cancellationToken) => pluginHost.getInlayHints(evt.textDocument, evt.range, cancellationToken));
    connection.onRequest(vscode_languageserver_1$1.CallHierarchyPrepareRequest.type, async (evt, token) => await pluginHost.prepareCallHierarchy(evt.textDocument, evt.position, token));
    connection.onRequest(vscode_languageserver_1$1.CallHierarchyIncomingCallsRequest.type, async (evt, token) => await pluginHost.getIncomingCalls(evt.item, token));
    connection.onRequest(vscode_languageserver_1$1.CallHierarchyOutgoingCallsRequest.type, async (evt, token) => await pluginHost.getOutgoingCalls(evt.item, token));
    docManager.on('documentChange', (document) => diagnosticsManager.scheduleUpdate(document));
    docManager.on('documentClose', (document) => diagnosticsManager.removeDiagnostics(document));
    connection.onRequest('$/getEditsForFileRename', async (fileRename) => pluginHost.updateImports(fileRename));
    connection.onRequest('$/getFileReferences', async (uri) => {
        return pluginHost.fileReferences(uri);
    });
    connection.onRequest('$/getComponentReferences', async (uri) => {
        return pluginHost.findComponentReferences(uri);
    });
    connection.onRequest('$/getCompiledCode', async (uri) => {
        const doc = docManager.get(uri);
        if (!doc) {
            return null;
        }
        const compiled = await sveltePlugin.getCompiledResult(doc);
        if (compiled) {
            const js = compiled.js;
            const css = compiled.css;
            return { js, css };
        }
        else {
            return null;
        }
    });
    connection.listen();
}

var svelteCheck = {};

var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(svelteCheck, "__esModule", { value: true });
svelteCheck.SvelteCheck = void 0;
svelteCheck.mapSvelteCheckDiagnostics = mapSvelteCheckDiagnostics;
const path_1 = path$1;
const typescript_1 = __importDefault(ts);
const vscode_languageserver_1 = main$8;
const documents_1 = documents;
const logger_1 = logger;
const ls_config_1 = lsConfig;
const plugins_1 = plugins;
const FileSystemProvider_1 = FileSystemProvider$1;
const service_1 = service$1;
const DocumentSnapshot_1 = DocumentSnapshot;
const utils_1 = requireUtils();
const DiagnosticsProvider_1 = DiagnosticsProvider;
const utils_2 = utils$2;
const utils_3 = utils$6;
const lodash_1 = lodashExports;
function mapSvelteCheckDiagnostics(sourcePath, sourceText, tsDiagnostics, options) {
    logger_1.Logger.setLogErrorsOnly(true);
    const document = new documents_1.Document((0, utils_3.pathToUrl)(sourcePath), sourceText,  true);
    const snapshot = DocumentSnapshot_1.DocumentSnapshot.fromDocument(document, {
        parse: document.compiler?.parse,
        version: document.compiler?.VERSION,
        transformOnTemplateError: false,
        typingsNamespace: 'svelteHTML',
        emitJsDoc: true,
        rewriteExternalImports: options?.rewriteExternalImports
    });
    return (0, DiagnosticsProvider_1.mapAndFilterDiagnostics)(tsDiagnostics, document, snapshot);
}
class SvelteCheck {
    constructor(workspacePath, options = {}) {
        this.options = options;
        this.docManager = new documents_1.DocumentManager((textDocument) => new documents_1.Document(textDocument.uri, textDocument.text));
        this.configManager = new ls_config_1.LSConfigManager();
        this.pluginHost = new plugins_1.PluginHost(this.docManager);
        logger_1.Logger.setLogErrorsOnly(true);
        this.initialize(workspacePath, options);
    }
    async initialize(workspacePath, options) {
        if (options.tsconfig && !(0, path_1.isAbsolute)(options.tsconfig)) {
            throw new Error('tsconfigPath needs to be absolute, got ' + options.tsconfig);
        }
        this.configManager.update({
            svelte: {
                compilerWarnings: options.compilerWarnings
            }
        });
        if (shouldRegister('svelte')) {
            this.pluginHost.register(new plugins_1.SveltePlugin(this.configManager));
        }
        if (shouldRegister('css')) {
            const services = (0, service_1.createLanguageServices)({
                fileSystemProvider: new FileSystemProvider_1.FileSystemProvider()
            });
            const workspaceFolders = [
                {
                    name: '',
                    uri: (0, utils_3.pathToUrl)(workspacePath)
                }
            ];
            this.pluginHost.register(new plugins_1.CSSPlugin(this.docManager, this.configManager, workspaceFolders, services));
        }
        if (shouldRegister('js') || options.tsconfig) {
            const workspaceUris = [(0, utils_3.pathToUrl)(workspacePath)];
            this.lsAndTSDocResolver = new plugins_1.LSAndTSDocResolver(this.docManager, workspaceUris, this.configManager, {
                tsconfigPath: options.tsconfig,
                isSvelteCheck: true,
                onProjectReloaded: options.onProjectReload,
                watch: options.watch,
                onFileSnapshotCreated: options.onFileSnapshotCreated
            });
            this.pluginHost.register(new plugins_1.TypeScriptPlugin(this.configManager, this.lsAndTSDocResolver, workspaceUris, this.docManager));
        }
        function shouldRegister(source) {
            return !options.diagnosticSources || options.diagnosticSources.includes(source);
        }
    }
    async upsertDocument(doc, isNew) {
        const filePath = (0, utils_3.urlToPath)(doc.uri) || '';
        if (this.options.tsconfig) {
            const lsContainer = await this.getLSContainer(this.options.tsconfig);
            if (!lsContainer.fileBelongsToProject(filePath, isNew)) {
                return;
            }
        }
        if (doc.uri.endsWith('.ts') ||
            doc.uri.endsWith('.js') ||
            doc.uri.endsWith('.tsx') ||
            doc.uri.endsWith('.jsx') ||
            doc.uri.endsWith('.mjs') ||
            doc.uri.endsWith('.cjs') ||
            doc.uri.endsWith('.mts') ||
            doc.uri.endsWith('.cts')) {
            this.pluginHost.updateTsOrJsFile(filePath, [
                {
                    range: vscode_languageserver_1.Range.create(vscode_languageserver_1.Position.create(0, 0), vscode_languageserver_1.Position.create(Number.MAX_VALUE, Number.MAX_VALUE)),
                    text: doc.text
                }
            ]);
        }
        else {
            this.docManager.openClientDocument({
                text: doc.text,
                uri: doc.uri
            });
        }
    }
    async removeDocument(uri) {
        if (!this.docManager.get(uri)) {
            return;
        }
        this.docManager.closeDocument(uri);
        this.docManager.releaseDocument(uri);
        if (this.options.tsconfig) {
            const lsContainer = await this.getLSContainer(this.options.tsconfig);
            lsContainer.deleteSnapshot((0, utils_3.urlToPath)(uri) || '');
        }
    }
    async getDiagnostics() {
        if (this.options.tsconfig) {
            return this.getDiagnosticsForTsconfig(this.options.tsconfig);
        }
        return await Promise.all(this.docManager.getAllOpenedByClient().map(async (doc) => {
            const uri = doc[1].uri;
            return await this.getDiagnosticsForFile(uri);
        }));
    }
    async getDiagnosticsForTsconfig(tsconfigPath) {
        const lsContainer = await this.getLSContainer(tsconfigPath);
        const normalizedTsconfigPath = (0, utils_3.normalizePath)(tsconfigPath);
        const map = (diagnostic, range) => {
            const file = diagnostic.file;
            range ??= file
                ? (0, utils_2.convertRange)({ positionAt: file.getLineAndCharacterOfPosition.bind(file) }, diagnostic)
                : { start: { line: 0, character: 0 }, end: { line: 0, character: 0 } };
            return {
                range: range,
                severity: (0, utils_2.mapSeverity)(diagnostic.category),
                source: diagnostic.source,
                message: typescript_1.default.flattenDiagnosticMessageText(diagnostic.messageText, '\n'),
                code: diagnostic.code,
                tags: (0, utils_2.getDiagnosticTag)(diagnostic),
                data: {
                    positionUnknown: !diagnostic.start || !diagnostic.length
                }
            };
        };
        const isErrorCategory = (diagnostic) => diagnostic.category === typescript_1.default.DiagnosticCategory.Error;
        if (lsContainer.configErrors.some(isErrorCategory)) {
            return reportConfigError(lsContainer.configErrors);
        }
        const lang = lsContainer.getService();
        if (lsContainer.configErrors.some(isErrorCategory)) {
            return reportConfigError(lsContainer.configErrors);
        }
        const program = lang.getProgram();
        const globalOrConfigFileDiagnostics = program
            ? [...program.getGlobalDiagnostics(), ...program.getOptionsDiagnostics()]
            : [];
        const files = lang.getProgram()?.getSourceFiles() || [];
        const options = lang.getProgram()?.getCompilerOptions() || {};
        const diagnostics = await Promise.all(files.map((file) => {
            const uri = (0, utils_3.pathToUrl)(file.fileName);
            const doc = this.docManager.get(uri);
            if (doc) {
                this.docManager.markAsOpenedInClient(uri);
                return this.getDiagnosticsForFile(uri);
            }
            else {
                const skipDiagnosticsForFile = (options.skipLibCheck && file.isDeclarationFile) ||
                    (options.skipDefaultLibCheck && file.hasNoDefaultLib) ||
                    lsContainer.isShimFiles(file.fileName) ||
                    /\/node_modules\/.+\.(c|m)?js$/.test(file.fileName);
                const snapshot = lsContainer.snapshotManager.get(file.fileName);
                const isKitFile = snapshot?.kitFile ?? false;
                const diagnostics = [];
                if (!skipDiagnosticsForFile) {
                    const diagnosticSources = [
                        'getSyntacticDiagnostics',
                        'getSuggestionDiagnostics',
                        'getSemanticDiagnostics'
                    ];
                    for (const diagnosticSource of diagnosticSources) {
                        for (let diagnostic of lang[diagnosticSource](file.fileName)) {
                            if (!diagnostic.start || !diagnostic.length || !isKitFile) {
                                diagnostics.push(map(diagnostic));
                                continue;
                            }
                            let range = undefined;
                            const inGenerated = (0, utils_1.isInGeneratedCode)(file.text, diagnostic.start, diagnostic.start + diagnostic.length);
                            if (inGenerated && snapshot) {
                                const pos = snapshot.getOriginalPosition(snapshot.positionAt(diagnostic.start));
                                range = {
                                    start: pos,
                                    end: {
                                        line: pos.line,
                                        character: pos.character + 1
                                    }
                                };
                                if (diagnostic.code === 2307) {
                                    diagnostic = {
                                        ...diagnostic,
                                        messageText: typeof diagnostic.messageText === 'string' &&
                                            diagnostic.messageText.includes('./$types')
                                            ? diagnostic.messageText +
                                                ` (this likely means that SvelteKit's type generation didn't run yet - try running it by executing 'npm run dev' or 'npm run build')`
                                            : diagnostic.messageText
                                    };
                                }
                                else if (diagnostic.code === 2694) {
                                    diagnostic = {
                                        ...diagnostic,
                                        messageText: typeof diagnostic.messageText === 'string' &&
                                            diagnostic.messageText.includes('/$types')
                                            ? diagnostic.messageText +
                                                ` (this likely means that SvelteKit's generated types are out of date - try rerunning it by executing 'npm run dev' or 'npm run build')`
                                            : diagnostic.messageText
                                    };
                                }
                                else if (diagnostic.code !==
                                    2355 ) {
                                    continue;
                                }
                            }
                            diagnostics.push(map(diagnostic, range));
                        }
                    }
                }
                return {
                    filePath: file.fileName,
                    text: snapshot?.originalText ?? file.text,
                    diagnostics
                };
            }
        }));
        const configErrors = lsContainer.configErrors
            .concat(globalOrConfigFileDiagnostics.map((diagnostic) => ({
            ...diagnostic,
            category: diagnostic.category === typescript_1.default.DiagnosticCategory.Error
                ? typescript_1.default.DiagnosticCategory.Warning
                : diagnostic.category
        })));
        if (configErrors.length) {
            diagnostics.push(...reportConfigError(configErrors));
        }
        return diagnostics;
        function reportConfigError(errors) {
            const grouped = (0, lodash_1.groupBy)(errors, (error) => error.file?.fileName ?? normalizedTsconfigPath);
            const lspDiagnostics = errors.map((diagnostic) => map(diagnostic));
            return Object.entries(grouped).map(([filePath, errors]) => ({
                filePath,
                text: lspDiagnostics.some((diagnostic) => diagnostic.data?.positionUnknown)
                    ? (typescript_1.default.sys?.readFile(filePath) ?? '')
                    : '',
                diagnostics: lspDiagnostics
            }));
        }
    }
    async getDiagnosticsForFile(uri) {
        const diagnostics = await this.pluginHost.getDiagnostics({ uri });
        return {
            filePath: (0, utils_3.urlToPath)(uri) || '',
            text: this.docManager.get(uri)?.getText() || '',
            diagnostics
        };
    }
    getLSContainer(tsconfigPath) {
        if (!this.lsAndTSDocResolver) {
            throw new Error('Cannot run with tsconfig path without LS/TSdoc resolver');
        }
        return this.lsAndTSDocResolver.getTSService(tsconfigPath);
    }
    async getWatchDirectories() {
        if (!this.options.tsconfig) {
            return null;
        }
        const lsContainer = await this.getLSContainer(this.options.tsconfig);
        const projectConfig = lsContainer.getProjectConfig();
        if (!projectConfig.wildcardDirectories) {
            return null;
        }
        return Object.entries(projectConfig.wildcardDirectories).map(([dir, flags]) => ({
            path: dir,
            recursive: !!(flags & typescript_1.default.WatchDirectoryFlags.Recursive)
        }));
    }
}
svelteCheck.SvelteCheck = SvelteCheck;

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.SvelteCheck = exports.mapSvelteCheckDiagnostics = exports.getLineOffsets = exports.positionAt = exports.offsetAt = void 0;
	__exportStar(server$1, exports);
	var documents_1 = documents;
	Object.defineProperty(exports, "offsetAt", { enumerable: true, get: function () { return documents_1.offsetAt; } });
	Object.defineProperty(exports, "positionAt", { enumerable: true, get: function () { return documents_1.positionAt; } });
	Object.defineProperty(exports, "getLineOffsets", { enumerable: true, get: function () { return documents_1.getLineOffsets; } });
	var svelte_check_1 = svelteCheck;
	Object.defineProperty(exports, "mapSvelteCheckDiagnostics", { enumerable: true, get: function () { return svelte_check_1.mapSvelteCheckDiagnostics; } });
	Object.defineProperty(exports, "SvelteCheck", { enumerable: true, get: function () { return svelte_check_1.SvelteCheck; } });
} (src$1));
getDefaultExportFromCjs(src$1);

var main$2 = {};

var main$1 = {};

var ril = {};

var ral = {};

Object.defineProperty(ral, "__esModule", { value: true });
let _ral;
function RAL() {
    if (_ral === undefined) {
        throw new Error(`No runtime abstraction layer installed`);
    }
    return _ral;
}
(function (RAL) {
    function install(ral) {
        if (ral === undefined) {
            throw new Error(`No runtime abstraction layer provided`);
        }
        _ral = ral;
    }
    RAL.install = install;
})(RAL || (RAL = {}));
ral.default = RAL;

var disposable = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.Disposable = void 0;
	(function (Disposable) {
	    function create(func) {
	        return {
	            dispose: func
	        };
	    }
	    Disposable.create = create;
	})(exports.Disposable || (exports.Disposable = {}));
} (disposable));
getDefaultExportFromCjs(disposable);

var messageBuffer = {};

Object.defineProperty(messageBuffer, "__esModule", { value: true });
messageBuffer.AbstractMessageBuffer = void 0;
const CR = 13;
const LF = 10;
const CRLF = '\r\n';
class AbstractMessageBuffer {
    constructor(encoding = 'utf-8') {
        this._encoding = encoding;
        this._chunks = [];
        this._totalLength = 0;
    }
    get encoding() {
        return this._encoding;
    }
    append(chunk) {
        const toAppend = typeof chunk === 'string' ? this.fromString(chunk, this._encoding) : chunk;
        this._chunks.push(toAppend);
        this._totalLength += toAppend.byteLength;
    }
    tryReadHeaders() {
        if (this._chunks.length === 0) {
            return undefined;
        }
        let state = 0;
        let chunkIndex = 0;
        let offset = 0;
        let chunkBytesRead = 0;
        row: while (chunkIndex < this._chunks.length) {
            const chunk = this._chunks[chunkIndex];
            offset = 0;
            while (offset < chunk.length) {
                const value = chunk[offset];
                switch (value) {
                    case CR:
                        switch (state) {
                            case 0:
                                state = 1;
                                break;
                            case 2:
                                state = 3;
                                break;
                            default:
                                state = 0;
                        }
                        break;
                    case LF:
                        switch (state) {
                            case 1:
                                state = 2;
                                break;
                            case 3:
                                state = 4;
                                offset++;
                                break row;
                            default:
                                state = 0;
                        }
                        break;
                    default:
                        state = 0;
                }
                offset++;
            }
            chunkBytesRead += chunk.byteLength;
            chunkIndex++;
        }
        if (state !== 4) {
            return undefined;
        }
        const buffer = this._read(chunkBytesRead + offset);
        const result = new Map();
        const headers = this.toString(buffer, 'ascii').split(CRLF);
        if (headers.length < 2) {
            return result;
        }
        for (let i = 0; i < headers.length - 2; i++) {
            const header = headers[i];
            const index = header.indexOf(':');
            if (index === -1) {
                throw new Error('Message header must separate key and value using :');
            }
            const key = header.substr(0, index);
            const value = header.substr(index + 1).trim();
            result.set(key, value);
        }
        return result;
    }
    tryReadBody(length) {
        if (this._totalLength < length) {
            return undefined;
        }
        return this._read(length);
    }
    get numberOfBytes() {
        return this._totalLength;
    }
    _read(byteCount) {
        if (byteCount === 0) {
            return this.emptyBuffer();
        }
        if (byteCount > this._totalLength) {
            throw new Error(`Cannot read so many bytes!`);
        }
        if (this._chunks[0].byteLength === byteCount) {
            const chunk = this._chunks[0];
            this._chunks.shift();
            this._totalLength -= byteCount;
            return this.asNative(chunk);
        }
        if (this._chunks[0].byteLength > byteCount) {
            const chunk = this._chunks[0];
            const result = this.asNative(chunk, byteCount);
            this._chunks[0] = chunk.slice(byteCount);
            this._totalLength -= byteCount;
            return result;
        }
        const result = this.allocNative(byteCount);
        let resultOffset = 0;
        let chunkIndex = 0;
        while (byteCount > 0) {
            const chunk = this._chunks[chunkIndex];
            if (chunk.byteLength > byteCount) {
                const chunkPart = chunk.slice(0, byteCount);
                result.set(chunkPart, resultOffset);
                resultOffset += byteCount;
                this._chunks[chunkIndex] = chunk.slice(byteCount);
                this._totalLength -= byteCount;
                byteCount -= byteCount;
            }
            else {
                result.set(chunk, resultOffset);
                resultOffset += chunk.byteLength;
                this._chunks.shift();
                this._totalLength -= chunk.byteLength;
                byteCount -= chunk.byteLength;
            }
        }
        return result;
    }
}
messageBuffer.AbstractMessageBuffer = AbstractMessageBuffer;

Object.defineProperty(ril, "__esModule", { value: true });
const ral_1 = ral;
const util_1 = require$$0$2;
const disposable_1 = disposable;
const messageBuffer_1 = messageBuffer;
class MessageBuffer extends messageBuffer_1.AbstractMessageBuffer {
    constructor(encoding = 'utf-8') {
        super(encoding);
    }
    emptyBuffer() {
        return MessageBuffer.emptyBuffer;
    }
    fromString(value, encoding) {
        return Buffer.from(value, encoding);
    }
    toString(value, encoding) {
        if (value instanceof Buffer) {
            return value.toString(encoding);
        }
        else {
            return new util_1.TextDecoder(encoding).decode(value);
        }
    }
    asNative(buffer, length) {
        if (length === undefined) {
            return buffer instanceof Buffer ? buffer : Buffer.from(buffer);
        }
        else {
            return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length);
        }
    }
    allocNative(length) {
        return Buffer.allocUnsafe(length);
    }
}
MessageBuffer.emptyBuffer = Buffer.allocUnsafe(0);
class ReadableStreamWrapper {
    constructor(stream) {
        this.stream = stream;
    }
    onClose(listener) {
        this.stream.on('close', listener);
        return disposable_1.Disposable.create(() => this.stream.off('close', listener));
    }
    onError(listener) {
        this.stream.on('error', listener);
        return disposable_1.Disposable.create(() => this.stream.off('error', listener));
    }
    onEnd(listener) {
        this.stream.on('end', listener);
        return disposable_1.Disposable.create(() => this.stream.off('end', listener));
    }
    onData(listener) {
        this.stream.on('data', listener);
        return disposable_1.Disposable.create(() => this.stream.off('data', listener));
    }
}
class WritableStreamWrapper {
    constructor(stream) {
        this.stream = stream;
    }
    onClose(listener) {
        this.stream.on('close', listener);
        return disposable_1.Disposable.create(() => this.stream.off('close', listener));
    }
    onError(listener) {
        this.stream.on('error', listener);
        return disposable_1.Disposable.create(() => this.stream.off('error', listener));
    }
    onEnd(listener) {
        this.stream.on('end', listener);
        return disposable_1.Disposable.create(() => this.stream.off('end', listener));
    }
    write(data, encoding) {
        return new Promise((resolve, reject) => {
            const callback = (error) => {
                if (error === undefined || error === null) {
                    resolve();
                }
                else {
                    reject(error);
                }
            };
            if (typeof data === 'string') {
                this.stream.write(data, encoding, callback);
            }
            else {
                this.stream.write(data, callback);
            }
        });
    }
    end() {
        this.stream.end();
    }
}
const _ril = Object.freeze({
    messageBuffer: Object.freeze({
        create: (encoding) => new MessageBuffer(encoding)
    }),
    applicationJson: Object.freeze({
        encoder: Object.freeze({
            name: 'application/json',
            encode: (msg, options) => {
                try {
                    return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset));
                }
                catch (err) {
                    return Promise.reject(err);
                }
            }
        }),
        decoder: Object.freeze({
            name: 'application/json',
            decode: (buffer, options) => {
                try {
                    if (buffer instanceof Buffer) {
                        return Promise.resolve(JSON.parse(buffer.toString(options.charset)));
                    }
                    else {
                        return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer)));
                    }
                }
                catch (err) {
                    return Promise.reject(err);
                }
            }
        })
    }),
    stream: Object.freeze({
        asReadableStream: (stream) => new ReadableStreamWrapper(stream),
        asWritableStream: (stream) => new WritableStreamWrapper(stream)
    }),
    console: console,
    timer: Object.freeze({
        setTimeout(callback, ms, ...args) {
            const handle = setTimeout(callback, ms, ...args);
            return { dispose: () => clearTimeout(handle) };
        },
        setImmediate(callback, ...args) {
            const handle = setImmediate(callback, ...args);
            return { dispose: () => clearImmediate(handle) };
        },
        setInterval(callback, ms, ...args) {
            const handle = setInterval(callback, ms, ...args);
            return { dispose: () => clearInterval(handle) };
        }
    })
});
function RIL() {
    return _ril;
}
(function (RIL) {
    function install() {
        ral_1.default.install(_ril);
    }
    RIL.install = install;
})(RIL || (RIL = {}));
ril.default = RIL;

var api$1 = {};

var messages$1 = {};

var is$1 = {};

var hasRequiredIs;
function requireIs () {
	if (hasRequiredIs) return is$1;
	hasRequiredIs = 1;
	Object.defineProperty(is$1, "__esModule", { value: true });
	is$1.stringArray = is$1.array = is$1.func = is$1.error = is$1.number = is$1.string = is$1.boolean = void 0;
	function boolean(value) {
	    return value === true || value === false;
	}
	is$1.boolean = boolean;
	function string(value) {
	    return typeof value === 'string' || value instanceof String;
	}
	is$1.string = string;
	function number(value) {
	    return typeof value === 'number' || value instanceof Number;
	}
	is$1.number = number;
	function error(value) {
	    return value instanceof Error;
	}
	is$1.error = error;
	function func(value) {
	    return typeof value === 'function';
	}
	is$1.func = func;
	function array(value) {
	    return Array.isArray(value);
	}
	is$1.array = array;
	function stringArray(value) {
	    return array(value) && value.every(elem => string(elem));
	}
	is$1.stringArray = stringArray;
	return is$1;
}

var hasRequiredMessages;
function requireMessages () {
	if (hasRequiredMessages) return messages$1;
	hasRequiredMessages = 1;
	(function (exports) {
		Object.defineProperty(exports, "__esModule", { value: true });
		exports.Message = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0;
		const is = requireIs();
		var ErrorCodes;
		(function (ErrorCodes) {
		    ErrorCodes.ParseError = -32700;
		    ErrorCodes.InvalidRequest = -32600;
		    ErrorCodes.MethodNotFound = -32601;
		    ErrorCodes.InvalidParams = -32602;
		    ErrorCodes.InternalError = -32603;
		    ErrorCodes.jsonrpcReservedErrorRangeStart = -32099;
		    ErrorCodes.serverErrorStart = -32099;
		    ErrorCodes.MessageWriteError = -32099;
		    ErrorCodes.MessageReadError = -32098;
		    ErrorCodes.PendingResponseRejected = -32097;
		    ErrorCodes.ConnectionInactive = -32096;
		    ErrorCodes.ServerNotInitialized = -32002;
		    ErrorCodes.UnknownErrorCode = -32001;
		    ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000;
		    ErrorCodes.serverErrorEnd = -32000;
		})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
		class ResponseError extends Error {
		    constructor(code, message, data) {
		        super(message);
		        this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
		        this.data = data;
		        Object.setPrototypeOf(this, ResponseError.prototype);
		    }
		    toJson() {
		        const result = {
		            code: this.code,
		            message: this.message
		        };
		        if (this.data !== undefined) {
		            result.data = this.data;
		        }
		        return result;
		    }
		}
		exports.ResponseError = ResponseError;
		class ParameterStructures {
		    constructor(kind) {
		        this.kind = kind;
		    }
		    static is(value) {
		        return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition;
		    }
		    toString() {
		        return this.kind;
		    }
		}
		exports.ParameterStructures = ParameterStructures;
		ParameterStructures.auto = new ParameterStructures('auto');
		ParameterStructures.byPosition = new ParameterStructures('byPosition');
		ParameterStructures.byName = new ParameterStructures('byName');
		class AbstractMessageSignature {
		    constructor(method, numberOfParams) {
		        this.method = method;
		        this.numberOfParams = numberOfParams;
		    }
		    get parameterStructures() {
		        return ParameterStructures.auto;
		    }
		}
		exports.AbstractMessageSignature = AbstractMessageSignature;
		class RequestType0 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 0);
		    }
		}
		exports.RequestType0 = RequestType0;
		class RequestType extends AbstractMessageSignature {
		    constructor(method, _parameterStructures = ParameterStructures.auto) {
		        super(method, 1);
		        this._parameterStructures = _parameterStructures;
		    }
		    get parameterStructures() {
		        return this._parameterStructures;
		    }
		}
		exports.RequestType = RequestType;
		class RequestType1 extends AbstractMessageSignature {
		    constructor(method, _parameterStructures = ParameterStructures.auto) {
		        super(method, 1);
		        this._parameterStructures = _parameterStructures;
		    }
		    get parameterStructures() {
		        return this._parameterStructures;
		    }
		}
		exports.RequestType1 = RequestType1;
		class RequestType2 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 2);
		    }
		}
		exports.RequestType2 = RequestType2;
		class RequestType3 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 3);
		    }
		}
		exports.RequestType3 = RequestType3;
		class RequestType4 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 4);
		    }
		}
		exports.RequestType4 = RequestType4;
		class RequestType5 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 5);
		    }
		}
		exports.RequestType5 = RequestType5;
		class RequestType6 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 6);
		    }
		}
		exports.RequestType6 = RequestType6;
		class RequestType7 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 7);
		    }
		}
		exports.RequestType7 = RequestType7;
		class RequestType8 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 8);
		    }
		}
		exports.RequestType8 = RequestType8;
		class RequestType9 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 9);
		    }
		}
		exports.RequestType9 = RequestType9;
		class NotificationType extends AbstractMessageSignature {
		    constructor(method, _parameterStructures = ParameterStructures.auto) {
		        super(method, 1);
		        this._parameterStructures = _parameterStructures;
		    }
		    get parameterStructures() {
		        return this._parameterStructures;
		    }
		}
		exports.NotificationType = NotificationType;
		class NotificationType0 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 0);
		    }
		}
		exports.NotificationType0 = NotificationType0;
		class NotificationType1 extends AbstractMessageSignature {
		    constructor(method, _parameterStructures = ParameterStructures.auto) {
		        super(method, 1);
		        this._parameterStructures = _parameterStructures;
		    }
		    get parameterStructures() {
		        return this._parameterStructures;
		    }
		}
		exports.NotificationType1 = NotificationType1;
		class NotificationType2 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 2);
		    }
		}
		exports.NotificationType2 = NotificationType2;
		class NotificationType3 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 3);
		    }
		}
		exports.NotificationType3 = NotificationType3;
		class NotificationType4 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 4);
		    }
		}
		exports.NotificationType4 = NotificationType4;
		class NotificationType5 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 5);
		    }
		}
		exports.NotificationType5 = NotificationType5;
		class NotificationType6 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 6);
		    }
		}
		exports.NotificationType6 = NotificationType6;
		class NotificationType7 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 7);
		    }
		}
		exports.NotificationType7 = NotificationType7;
		class NotificationType8 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 8);
		    }
		}
		exports.NotificationType8 = NotificationType8;
		class NotificationType9 extends AbstractMessageSignature {
		    constructor(method) {
		        super(method, 9);
		    }
		}
		exports.NotificationType9 = NotificationType9;
		(function (Message) {
		    function isRequest(message) {
		        const candidate = message;
		        return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
		    }
		    Message.isRequest = isRequest;
		    function isNotification(message) {
		        const candidate = message;
		        return candidate && is.string(candidate.method) && message.id === void 0;
		    }
		    Message.isNotification = isNotification;
		    function isResponse(message) {
		        const candidate = message;
		        return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
		    }
		    Message.isResponse = isResponse;
		})(exports.Message || (exports.Message = {}));
	} (messages$1));
	return messages$1;
}

var linkedMap = {};

var hasRequiredLinkedMap;
function requireLinkedMap () {
	if (hasRequiredLinkedMap) return linkedMap;
	hasRequiredLinkedMap = 1;
	(function (exports) {
		var _a;
		Object.defineProperty(exports, "__esModule", { value: true });
		exports.LRUCache = exports.LinkedMap = exports.Touch = void 0;
		var Touch;
		(function (Touch) {
		    Touch.None = 0;
		    Touch.First = 1;
		    Touch.AsOld = Touch.First;
		    Touch.Last = 2;
		    Touch.AsNew = Touch.Last;
		})(Touch = exports.Touch || (exports.Touch = {}));
		class LinkedMap {
		    constructor() {
		        this[_a] = 'LinkedMap';
		        this._map = new Map();
		        this._head = undefined;
		        this._tail = undefined;
		        this._size = 0;
		        this._state = 0;
		    }
		    clear() {
		        this._map.clear();
		        this._head = undefined;
		        this._tail = undefined;
		        this._size = 0;
		        this._state++;
		    }
		    isEmpty() {
		        return !this._head && !this._tail;
		    }
		    get size() {
		        return this._size;
		    }
		    get first() {
		        return this._head?.value;
		    }
		    get last() {
		        return this._tail?.value;
		    }
		    has(key) {
		        return this._map.has(key);
		    }
		    get(key, touch = Touch.None) {
		        const item = this._map.get(key);
		        if (!item) {
		            return undefined;
		        }
		        if (touch !== Touch.None) {
		            this.touch(item, touch);
		        }
		        return item.value;
		    }
		    set(key, value, touch = Touch.None) {
		        let item = this._map.get(key);
		        if (item) {
		            item.value = value;
		            if (touch !== Touch.None) {
		                this.touch(item, touch);
		            }
		        }
		        else {
		            item = { key, value, next: undefined, previous: undefined };
		            switch (touch) {
		                case Touch.None:
		                    this.addItemLast(item);
		                    break;
		                case Touch.First:
		                    this.addItemFirst(item);
		                    break;
		                case Touch.Last:
		                    this.addItemLast(item);
		                    break;
		                default:
		                    this.addItemLast(item);
		                    break;
		            }
		            this._map.set(key, item);
		            this._size++;
		        }
		        return this;
		    }
		    delete(key) {
		        return !!this.remove(key);
		    }
		    remove(key) {
		        const item = this._map.get(key);
		        if (!item) {
		            return undefined;
		        }
		        this._map.delete(key);
		        this.removeItem(item);
		        this._size--;
		        return item.value;
		    }
		    shift() {
		        if (!this._head && !this._tail) {
		            return undefined;
		        }
		        if (!this._head || !this._tail) {
		            throw new Error('Invalid list');
		        }
		        const item = this._head;
		        this._map.delete(item.key);
		        this.removeItem(item);
		        this._size--;
		        return item.value;
		    }
		    forEach(callbackfn, thisArg) {
		        const state = this._state;
		        let current = this._head;
		        while (current) {
		            if (thisArg) {
		                callbackfn.bind(thisArg)(current.value, current.key, this);
		            }
		            else {
		                callbackfn(current.value, current.key, this);
		            }
		            if (this._state !== state) {
		                throw new Error(`LinkedMap got modified during iteration.`);
		            }
		            current = current.next;
		        }
		    }
		    keys() {
		        const state = this._state;
		        let current = this._head;
		        const iterator = {
		            [Symbol.iterator]: () => {
		                return iterator;
		            },
		            next: () => {
		                if (this._state !== state) {
		                    throw new Error(`LinkedMap got modified during iteration.`);
		                }
		                if (current) {
		                    const result = { value: current.key, done: false };
		                    current = current.next;
		                    return result;
		                }
		                else {
		                    return { value: undefined, done: true };
		                }
		            }
		        };
		        return iterator;
		    }
		    values() {
		        const state = this._state;
		        let current = this._head;
		        const iterator = {
		            [Symbol.iterator]: () => {
		                return iterator;
		            },
		            next: () => {
		                if (this._state !== state) {
		                    throw new Error(`LinkedMap got modified during iteration.`);
		                }
		                if (current) {
		                    const result = { value: current.value, done: false };
		                    current = current.next;
		                    return result;
		                }
		                else {
		                    return { value: undefined, done: true };
		                }
		            }
		        };
		        return iterator;
		    }
		    entries() {
		        const state = this._state;
		        let current = this._head;
		        const iterator = {
		            [Symbol.iterator]: () => {
		                return iterator;
		            },
		            next: () => {
		                if (this._state !== state) {
		                    throw new Error(`LinkedMap got modified during iteration.`);
		                }
		                if (current) {
		                    const result = { value: [current.key, current.value], done: false };
		                    current = current.next;
		                    return result;
		                }
		                else {
		                    return { value: undefined, done: true };
		                }
		            }
		        };
		        return iterator;
		    }
		    [(_a = Symbol.toStringTag, Symbol.iterator)]() {
		        return this.entries();
		    }
		    trimOld(newSize) {
		        if (newSize >= this.size) {
		            return;
		        }
		        if (newSize === 0) {
		            this.clear();
		            return;
		        }
		        let current = this._head;
		        let currentSize = this.size;
		        while (current && currentSize > newSize) {
		            this._map.delete(current.key);
		            current = current.next;
		            currentSize--;
		        }
		        this._head = current;
		        this._size = currentSize;
		        if (current) {
		            current.previous = undefined;
		        }
		        this._state++;
		    }
		    addItemFirst(item) {
		        if (!this._head && !this._tail) {
		            this._tail = item;
		        }
		        else if (!this._head) {
		            throw new Error('Invalid list');
		        }
		        else {
		            item.next = this._head;
		            this._head.previous = item;
		        }
		        this._head = item;
		        this._state++;
		    }
		    addItemLast(item) {
		        if (!this._head && !this._tail) {
		            this._head = item;
		        }
		        else if (!this._tail) {
		            throw new Error('Invalid list');
		        }
		        else {
		            item.previous = this._tail;
		            this._tail.next = item;
		        }
		        this._tail = item;
		        this._state++;
		    }
		    removeItem(item) {
		        if (item === this._head && item === this._tail) {
		            this._head = undefined;
		            this._tail = undefined;
		        }
		        else if (item === this._head) {
		            if (!item.next) {
		                throw new Error('Invalid list');
		            }
		            item.next.previous = undefined;
		            this._head = item.next;
		        }
		        else if (item === this._tail) {
		            if (!item.previous) {
		                throw new Error('Invalid list');
		            }
		            item.previous.next = undefined;
		            this._tail = item.previous;
		        }
		        else {
		            const next = item.next;
		            const previous = item.previous;
		            if (!next || !previous) {
		                throw new Error('Invalid list');
		            }
		            next.previous = previous;
		            previous.next = next;
		        }
		        item.next = undefined;
		        item.previous = undefined;
		        this._state++;
		    }
		    touch(item, touch) {
		        if (!this._head || !this._tail) {
		            throw new Error('Invalid list');
		        }
		        if ((touch !== Touch.First && touch !== Touch.Last)) {
		            return;
		        }
		        if (touch === Touch.First) {
		            if (item === this._head) {
		                return;
		            }
		            const next = item.next;
		            const previous = item.previous;
		            if (item === this._tail) {
		                previous.next = undefined;
		                this._tail = previous;
		            }
		            else {
		                next.previous = previous;
		                previous.next = next;
		            }
		            item.previous = undefined;
		            item.next = this._head;
		            this._head.previous = item;
		            this._head = item;
		            this._state++;
		        }
		        else if (touch === Touch.Last) {
		            if (item === this._tail) {
		                return;
		            }
		            const next = item.next;
		            const previous = item.previous;
		            if (item === this._head) {
		                next.previous = undefined;
		                this._head = next;
		            }
		            else {
		                next.previous = previous;
		                previous.next = next;
		            }
		            item.next = undefined;
		            item.previous = this._tail;
		            this._tail.next = item;
		            this._tail = item;
		            this._state++;
		        }
		    }
		    toJSON() {
		        const data = [];
		        this.forEach((value, key) => {
		            data.push([key, value]);
		        });
		        return data;
		    }
		    fromJSON(data) {
		        this.clear();
		        for (const [key, value] of data) {
		            this.set(key, value);
		        }
		    }
		}
		exports.LinkedMap = LinkedMap;
		class LRUCache extends LinkedMap {
		    constructor(limit, ratio = 1) {
		        super();
		        this._limit = limit;
		        this._ratio = Math.min(Math.max(0, ratio), 1);
		    }
		    get limit() {
		        return this._limit;
		    }
		    set limit(limit) {
		        this._limit = limit;
		        this.checkTrim();
		    }
		    get ratio() {
		        return this._ratio;
		    }
		    set ratio(ratio) {
		        this._ratio = Math.min(Math.max(0, ratio), 1);
		        this.checkTrim();
		    }
		    get(key, touch = Touch.AsNew) {
		        return super.get(key, touch);
		    }
		    peek(key) {
		        return super.get(key, Touch.None);
		    }
		    set(key, value) {
		        super.set(key, value, Touch.Last);
		        this.checkTrim();
		        return this;
		    }
		    checkTrim() {
		        if (this.size > this._limit) {
		            this.trimOld(Math.round(this._limit * this._ratio));
		        }
		    }
		}
		exports.LRUCache = LRUCache;
	} (linkedMap));
	return linkedMap;
}

var events = {};

var hasRequiredEvents;
function requireEvents () {
	if (hasRequiredEvents) return events;
	hasRequiredEvents = 1;
	(function (exports) {
		Object.defineProperty(exports, "__esModule", { value: true });
		exports.Emitter = exports.Event = void 0;
		const ral_1 = ral;
		(function (Event) {
		    const _disposable = { dispose() { } };
		    Event.None = function () { return _disposable; };
		})(exports.Event || (exports.Event = {}));
		class CallbackList {
		    add(callback, context = null, bucket) {
		        if (!this._callbacks) {
		            this._callbacks = [];
		            this._contexts = [];
		        }
		        this._callbacks.push(callback);
		        this._contexts.push(context);
		        if (Array.isArray(bucket)) {
		            bucket.push({ dispose: () => this.remove(callback, context) });
		        }
		    }
		    remove(callback, context = null) {
		        if (!this._callbacks) {
		            return;
		        }
		        let foundCallbackWithDifferentContext = false;
		        for (let i = 0, len = this._callbacks.length; i < len; i++) {
		            if (this._callbacks[i] === callback) {
		                if (this._contexts[i] === context) {
		                    this._callbacks.splice(i, 1);
		                    this._contexts.splice(i, 1);
		                    return;
		                }
		                else {
		                    foundCallbackWithDifferentContext = true;
		                }
		            }
		        }
		        if (foundCallbackWithDifferentContext) {
		            throw new Error('When adding a listener with a context, you should remove it with the same context');
		        }
		    }
		    invoke(...args) {
		        if (!this._callbacks) {
		            return [];
		        }
		        const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
		        for (let i = 0, len = callbacks.length; i < len; i++) {
		            try {
		                ret.push(callbacks[i].apply(contexts[i], args));
		            }
		            catch (e) {
		                (0, ral_1.default)().console.error(e);
		            }
		        }
		        return ret;
		    }
		    isEmpty() {
		        return !this._callbacks || this._callbacks.length === 0;
		    }
		    dispose() {
		        this._callbacks = undefined;
		        this._contexts = undefined;
		    }
		}
		class Emitter {
		    constructor(_options) {
		        this._options = _options;
		    }
		    get event() {
		        if (!this._event) {
		            this._event = (listener, thisArgs, disposables) => {
		                if (!this._callbacks) {
		                    this._callbacks = new CallbackList();
		                }
		                if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
		                    this._options.onFirstListenerAdd(this);
		                }
		                this._callbacks.add(listener, thisArgs);
		                const result = {
		                    dispose: () => {
		                        if (!this._callbacks) {
		                            return;
		                        }
		                        this._callbacks.remove(listener, thisArgs);
		                        result.dispose = Emitter._noop;
		                        if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
		                            this._options.onLastListenerRemove(this);
		                        }
		                    }
		                };
		                if (Array.isArray(disposables)) {
		                    disposables.push(result);
		                }
		                return result;
		            };
		        }
		        return this._event;
		    }
		    fire(event) {
		        if (this._callbacks) {
		            this._callbacks.invoke.call(this._callbacks, event);
		        }
		    }
		    dispose() {
		        if (this._callbacks) {
		            this._callbacks.dispose();
		            this._callbacks = undefined;
		        }
		    }
		}
		exports.Emitter = Emitter;
		Emitter._noop = function () { };
	} (events));
	return events;
}

var cancellation = {};

var hasRequiredCancellation;
function requireCancellation () {
	if (hasRequiredCancellation) return cancellation;
	hasRequiredCancellation = 1;
	(function (exports) {
		Object.defineProperty(exports, "__esModule", { value: true });
		exports.CancellationTokenSource = exports.CancellationToken = void 0;
		const ral_1 = ral;
		const Is = requireIs();
		const events_1 = requireEvents();
		var CancellationToken;
		(function (CancellationToken) {
		    CancellationToken.None = Object.freeze({
		        isCancellationRequested: false,
		        onCancellationRequested: events_1.Event.None
		    });
		    CancellationToken.Cancelled = Object.freeze({
		        isCancellationRequested: true,
		        onCancellationRequested: events_1.Event.None
		    });
		    function is(value) {
		        const candidate = value;
		        return candidate && (candidate === CancellationToken.None
		            || candidate === CancellationToken.Cancelled
		            || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
		    }
		    CancellationToken.is = is;
		})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
		const shortcutEvent = Object.freeze(function (callback, context) {
		    const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0);
		    return { dispose() { handle.dispose(); } };
		});
		class MutableToken {
		    constructor() {
		        this._isCancelled = false;
		    }
		    cancel() {
		        if (!this._isCancelled) {
		            this._isCancelled = true;
		            if (this._emitter) {
		                this._emitter.fire(undefined);
		                this.dispose();
		            }
		        }
		    }
		    get isCancellationRequested() {
		        return this._isCancelled;
		    }
		    get onCancellationRequested() {
		        if (this._isCancelled) {
		            return shortcutEvent;
		        }
		        if (!this._emitter) {
		            this._emitter = new events_1.Emitter();
		        }
		        return this._emitter.event;
		    }
		    dispose() {
		        if (this._emitter) {
		            this._emitter.dispose();
		            this._emitter = undefined;
		        }
		    }
		}
		class CancellationTokenSource {
		    get token() {
		        if (!this._token) {
		            this._token = new MutableToken();
		        }
		        return this._token;
		    }
		    cancel() {
		        if (!this._token) {
		            this._token = CancellationToken.Cancelled;
		        }
		        else {
		            this._token.cancel();
		        }
		    }
		    dispose() {
		        if (!this._token) {
		            this._token = CancellationToken.None;
		        }
		        else if (this._token instanceof MutableToken) {
		            this._token.dispose();
		        }
		    }
		}
		exports.CancellationTokenSource = CancellationTokenSource;
	} (cancellation));
	return cancellation;
}

var messageReader = {};

var hasRequiredMessageReader;
function requireMessageReader () {
	if (hasRequiredMessageReader) return messageReader;
	hasRequiredMessageReader = 1;
	(function (exports) {
		Object.defineProperty(exports, "__esModule", { value: true });
		exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = void 0;
		const ral_1 = ral;
		const Is = requireIs();
		const events_1 = requireEvents();
		(function (MessageReader) {
		    function is(value) {
		        let candidate = value;
		        return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
		            Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
		    }
		    MessageReader.is = is;
		})(exports.MessageReader || (exports.MessageReader = {}));
		class AbstractMessageReader {
		    constructor() {
		        this.errorEmitter = new events_1.Emitter();
		        this.closeEmitter = new events_1.Emitter();
		        this.partialMessageEmitter = new events_1.Emitter();
		    }
		    dispose() {
		        this.errorEmitter.dispose();
		        this.closeEmitter.dispose();
		    }
		    get onError() {
		        return this.errorEmitter.event;
		    }
		    fireError(error) {
		        this.errorEmitter.fire(this.asError(error));
		    }
		    get onClose() {
		        return this.closeEmitter.event;
		    }
		    fireClose() {
		        this.closeEmitter.fire(undefined);
		    }
		    get onPartialMessage() {
		        return this.partialMessageEmitter.event;
		    }
		    firePartialMessage(info) {
		        this.partialMessageEmitter.fire(info);
		    }
		    asError(error) {
		        if (error instanceof Error) {
		            return error;
		        }
		        else {
		            return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
		        }
		    }
		}
		exports.AbstractMessageReader = AbstractMessageReader;
		var ResolvedMessageReaderOptions;
		(function (ResolvedMessageReaderOptions) {
		    function fromOptions(options) {
		        let charset;
		        let contentDecoder;
		        const contentDecoders = new Map();
		        let contentTypeDecoder;
		        const contentTypeDecoders = new Map();
		        if (options === undefined || typeof options === 'string') {
		            charset = options ?? 'utf-8';
		        }
		        else {
		            charset = options.charset ?? 'utf-8';
		            if (options.contentDecoder !== undefined) {
		                contentDecoder = options.contentDecoder;
		                contentDecoders.set(contentDecoder.name, contentDecoder);
		            }
		            if (options.contentDecoders !== undefined) {
		                for (const decoder of options.contentDecoders) {
		                    contentDecoders.set(decoder.name, decoder);
		                }
		            }
		            if (options.contentTypeDecoder !== undefined) {
		                contentTypeDecoder = options.contentTypeDecoder;
		                contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
		            }
		            if (options.contentTypeDecoders !== undefined) {
		                for (const decoder of options.contentTypeDecoders) {
		                    contentTypeDecoders.set(decoder.name, decoder);
		                }
		            }
		        }
		        if (contentTypeDecoder === undefined) {
		            contentTypeDecoder = (0, ral_1.default)().applicationJson.decoder;
		            contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
		        }
		        return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders };
		    }
		    ResolvedMessageReaderOptions.fromOptions = fromOptions;
		})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {}));
		class ReadableStreamMessageReader extends AbstractMessageReader {
		    constructor(readable, options) {
		        super();
		        this.readable = readable;
		        this.options = ResolvedMessageReaderOptions.fromOptions(options);
		        this.buffer = (0, ral_1.default)().messageBuffer.create(this.options.charset);
		        this._partialMessageTimeout = 10000;
		        this.nextMessageLength = -1;
		        this.messageToken = 0;
		    }
		    set partialMessageTimeout(timeout) {
		        this._partialMessageTimeout = timeout;
		    }
		    get partialMessageTimeout() {
		        return this._partialMessageTimeout;
		    }
		    listen(callback) {
		        this.nextMessageLength = -1;
		        this.messageToken = 0;
		        this.partialMessageTimer = undefined;
		        this.callback = callback;
		        const result = this.readable.onData((data) => {
		            this.onData(data);
		        });
		        this.readable.onError((error) => this.fireError(error));
		        this.readable.onClose(() => this.fireClose());
		        return result;
		    }
		    onData(data) {
		        this.buffer.append(data);
		        while (true) {
		            if (this.nextMessageLength === -1) {
		                const headers = this.buffer.tryReadHeaders();
		                if (!headers) {
		                    return;
		                }
		                const contentLength = headers.get('Content-Length');
		                if (!contentLength) {
		                    throw new Error('Header must provide a Content-Length property.');
		                }
		                const length = parseInt(contentLength);
		                if (isNaN(length)) {
		                    throw new Error('Content-Length value must be a number.');
		                }
		                this.nextMessageLength = length;
		            }
		            const body = this.buffer.tryReadBody(this.nextMessageLength);
		            if (body === undefined) {
		                this.setPartialMessageTimer();
		                return;
		            }
		            this.clearPartialMessageTimer();
		            this.nextMessageLength = -1;
		            let p;
		            if (this.options.contentDecoder !== undefined) {
		                p = this.options.contentDecoder.decode(body);
		            }
		            else {
		                p = Promise.resolve(body);
		            }
		            p.then((value) => {
		                this.options.contentTypeDecoder.decode(value, this.options).then((msg) => {
		                    this.callback(msg);
		                }, (error) => {
		                    this.fireError(error);
		                });
		            }, (error) => {
		                this.fireError(error);
		            });
		        }
		    }
		    clearPartialMessageTimer() {
		        if (this.partialMessageTimer) {
		            this.partialMessageTimer.dispose();
		            this.partialMessageTimer = undefined;
		        }
		    }
		    setPartialMessageTimer() {
		        this.clearPartialMessageTimer();
		        if (this._partialMessageTimeout <= 0) {
		            return;
		        }
		        this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token, timeout) => {
		            this.partialMessageTimer = undefined;
		            if (token === this.messageToken) {
		                this.firePartialMessage({ messageToken: token, waitingTime: timeout });
		                this.setPartialMessageTimer();
		            }
		        }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
		    }
		}
		exports.ReadableStreamMessageReader = ReadableStreamMessageReader;
	} (messageReader));
	return messageReader;
}

var messageWriter = {};

var semaphore = {};

var hasRequiredSemaphore;
function requireSemaphore () {
	if (hasRequiredSemaphore) return semaphore;
	hasRequiredSemaphore = 1;
	Object.defineProperty(semaphore, "__esModule", { value: true });
	semaphore.Semaphore = void 0;
	const ral_1 = ral;
	class Semaphore {
	    constructor(capacity = 1) {
	        if (capacity <= 0) {
	            throw new Error('Capacity must be greater than 0');
	        }
	        this._capacity = capacity;
	        this._active = 0;
	        this._waiting = [];
	    }
	    lock(thunk) {
	        return new Promise((resolve, reject) => {
	            this._waiting.push({ thunk, resolve, reject });
	            this.runNext();
	        });
	    }
	    get active() {
	        return this._active;
	    }
	    runNext() {
	        if (this._waiting.length === 0 || this._active === this._capacity) {
	            return;
	        }
	        (0, ral_1.default)().timer.setImmediate(() => this.doRunNext());
	    }
	    doRunNext() {
	        if (this._waiting.length === 0 || this._active === this._capacity) {
	            return;
	        }
	        const next = this._waiting.shift();
	        this._active++;
	        if (this._active > this._capacity) {
	            throw new Error(`To many thunks active`);
	        }
	        try {
	            const result = next.thunk();
	            if (result instanceof Promise) {
	                result.then((value) => {
	                    this._active--;
	                    next.resolve(value);
	                    this.runNext();
	                }, (err) => {
	                    this._active--;
	                    next.reject(err);
	                    this.runNext();
	                });
	            }
	            else {
	                this._active--;
	                next.resolve(result);
	                this.runNext();
	            }
	        }
	        catch (err) {
	            this._active--;
	            next.reject(err);
	            this.runNext();
	        }
	    }
	}
	semaphore.Semaphore = Semaphore;
	return semaphore;
}

var hasRequiredMessageWriter;
function requireMessageWriter () {
	if (hasRequiredMessageWriter) return messageWriter;
	hasRequiredMessageWriter = 1;
	(function (exports) {
		Object.defineProperty(exports, "__esModule", { value: true });
		exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = void 0;
		const ral_1 = ral;
		const Is = requireIs();
		const semaphore_1 = requireSemaphore();
		const events_1 = requireEvents();
		const ContentLength = 'Content-Length: ';
		const CRLF = '\r\n';
		(function (MessageWriter) {
		    function is(value) {
		        let candidate = value;
		        return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
		            Is.func(candidate.onError) && Is.func(candidate.write);
		    }
		    MessageWriter.is = is;
		})(exports.MessageWriter || (exports.MessageWriter = {}));
		class AbstractMessageWriter {
		    constructor() {
		        this.errorEmitter = new events_1.Emitter();
		        this.closeEmitter = new events_1.Emitter();
		    }
		    dispose() {
		        this.errorEmitter.dispose();
		        this.closeEmitter.dispose();
		    }
		    get onError() {
		        return this.errorEmitter.event;
		    }
		    fireError(error, message, count) {
		        this.errorEmitter.fire([this.asError(error), message, count]);
		    }
		    get onClose() {
		        return this.closeEmitter.event;
		    }
		    fireClose() {
		        this.closeEmitter.fire(undefined);
		    }
		    asError(error) {
		        if (error instanceof Error) {
		            return error;
		        }
		        else {
		            return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
		        }
		    }
		}
		exports.AbstractMessageWriter = AbstractMessageWriter;
		var ResolvedMessageWriterOptions;
		(function (ResolvedMessageWriterOptions) {
		    function fromOptions(options) {
		        if (options === undefined || typeof options === 'string') {
		            return { charset: options ?? 'utf-8', contentTypeEncoder: (0, ral_1.default)().applicationJson.encoder };
		        }
		        else {
		            return { charset: options.charset ?? 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: options.contentTypeEncoder ?? (0, ral_1.default)().applicationJson.encoder };
		        }
		    }
		    ResolvedMessageWriterOptions.fromOptions = fromOptions;
		})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {}));
		class WriteableStreamMessageWriter extends AbstractMessageWriter {
		    constructor(writable, options) {
		        super();
		        this.writable = writable;
		        this.options = ResolvedMessageWriterOptions.fromOptions(options);
		        this.errorCount = 0;
		        this.writeSemaphore = new semaphore_1.Semaphore(1);
		        this.writable.onError((error) => this.fireError(error));
		        this.writable.onClose(() => this.fireClose());
		    }
		    async write(msg) {
		        return this.writeSemaphore.lock(async () => {
		            const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => {
		                if (this.options.contentEncoder !== undefined) {
		                    return this.options.contentEncoder.encode(buffer);
		                }
		                else {
		                    return buffer;
		                }
		            });
		            return payload.then((buffer) => {
		                const headers = [];
		                headers.push(ContentLength, buffer.byteLength.toString(), CRLF);
		                headers.push(CRLF);
		                return this.doWrite(msg, headers, buffer);
		            }, (error) => {
		                this.fireError(error);
		                throw error;
		            });
		        });
		    }
		    async doWrite(msg, headers, data) {
		        try {
		            await this.writable.write(headers.join(''), 'ascii');
		            return this.writable.write(data);
		        }
		        catch (error) {
		            this.handleError(error, msg);
		            return Promise.reject(error);
		        }
		    }
		    handleError(error, msg) {
		        this.errorCount++;
		        this.fireError(error, msg, this.errorCount);
		    }
		    end() {
		        this.writable.end();
		    }
		}
		exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter;
	} (messageWriter));
	return messageWriter;
}

var connection$1 = {};

var hasRequiredConnection;
function requireConnection () {
	if (hasRequiredConnection) return connection$1;
	hasRequiredConnection = 1;
	(function (exports) {
		Object.defineProperty(exports, "__esModule", { value: true });
		exports.createMessageConnection = exports.ConnectionOptions = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.Trace = exports.NullLogger = exports.ProgressType = exports.ProgressToken = void 0;
		const ral_1 = ral;
		const Is = requireIs();
		const messages_1 = requireMessages();
		const linkedMap_1 = requireLinkedMap();
		const events_1 = requireEvents();
		const cancellation_1 = requireCancellation();
		var CancelNotification;
		(function (CancelNotification) {
		    CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
		})(CancelNotification || (CancelNotification = {}));
		var ProgressToken;
		(function (ProgressToken) {
		    function is(value) {
		        return typeof value === 'string' || typeof value === 'number';
		    }
		    ProgressToken.is = is;
		})(ProgressToken = exports.ProgressToken || (exports.ProgressToken = {}));
		var ProgressNotification;
		(function (ProgressNotification) {
		    ProgressNotification.type = new messages_1.NotificationType('$/progress');
		})(ProgressNotification || (ProgressNotification = {}));
		class ProgressType {
		    constructor() {
		    }
		}
		exports.ProgressType = ProgressType;
		var StarRequestHandler;
		(function (StarRequestHandler) {
		    function is(value) {
		        return Is.func(value);
		    }
		    StarRequestHandler.is = is;
		})(StarRequestHandler || (StarRequestHandler = {}));
		exports.NullLogger = Object.freeze({
		    error: () => { },
		    warn: () => { },
		    info: () => { },
		    log: () => { }
		});
		var Trace;
		(function (Trace) {
		    Trace[Trace["Off"] = 0] = "Off";
		    Trace[Trace["Messages"] = 1] = "Messages";
		    Trace[Trace["Compact"] = 2] = "Compact";
		    Trace[Trace["Verbose"] = 3] = "Verbose";
		})(Trace = exports.Trace || (exports.Trace = {}));
		(function (TraceValues) {
		    TraceValues.Off = 'off';
		    TraceValues.Messages = 'messages';
		    TraceValues.Compact = 'compact';
		    TraceValues.Verbose = 'verbose';
		})(exports.TraceValues || (exports.TraceValues = {}));
		(function (Trace) {
		    function fromString(value) {
		        if (!Is.string(value)) {
		            return Trace.Off;
		        }
		        value = value.toLowerCase();
		        switch (value) {
		            case 'off':
		                return Trace.Off;
		            case 'messages':
		                return Trace.Messages;
		            case 'compact':
		                return Trace.Compact;
		            case 'verbose':
		                return Trace.Verbose;
		            default:
		                return Trace.Off;
		        }
		    }
		    Trace.fromString = fromString;
		    function toString(value) {
		        switch (value) {
		            case Trace.Off:
		                return 'off';
		            case Trace.Messages:
		                return 'messages';
		            case Trace.Compact:
		                return 'compact';
		            case Trace.Verbose:
		                return 'verbose';
		            default:
		                return 'off';
		        }
		    }
		    Trace.toString = toString;
		})(Trace = exports.Trace || (exports.Trace = {}));
		var TraceFormat;
		(function (TraceFormat) {
		    TraceFormat["Text"] = "text";
		    TraceFormat["JSON"] = "json";
		})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
		(function (TraceFormat) {
		    function fromString(value) {
		        if (!Is.string(value)) {
		            return TraceFormat.Text;
		        }
		        value = value.toLowerCase();
		        if (value === 'json') {
		            return TraceFormat.JSON;
		        }
		        else {
		            return TraceFormat.Text;
		        }
		    }
		    TraceFormat.fromString = fromString;
		})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
		var SetTraceNotification;
		(function (SetTraceNotification) {
		    SetTraceNotification.type = new messages_1.NotificationType('$/setTrace');
		})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
		var LogTraceNotification;
		(function (LogTraceNotification) {
		    LogTraceNotification.type = new messages_1.NotificationType('$/logTrace');
		})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
		var ConnectionErrors;
		(function (ConnectionErrors) {
		    ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
		    ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
		    ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
		})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
		class ConnectionError extends Error {
		    constructor(code, message) {
		        super(message);
		        this.code = code;
		        Object.setPrototypeOf(this, ConnectionError.prototype);
		    }
		}
		exports.ConnectionError = ConnectionError;
		var ConnectionStrategy;
		(function (ConnectionStrategy) {
		    function is(value) {
		        const candidate = value;
		        return candidate && Is.func(candidate.cancelUndispatched);
		    }
		    ConnectionStrategy.is = is;
		})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
		var CancellationReceiverStrategy;
		(function (CancellationReceiverStrategy) {
		    CancellationReceiverStrategy.Message = Object.freeze({
		        createCancellationTokenSource(_) {
		            return new cancellation_1.CancellationTokenSource();
		        }
		    });
		    function is(value) {
		        const candidate = value;
		        return candidate && Is.func(candidate.createCancellationTokenSource);
		    }
		    CancellationReceiverStrategy.is = is;
		})(CancellationReceiverStrategy = exports.CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = {}));
		var CancellationSenderStrategy;
		(function (CancellationSenderStrategy) {
		    CancellationSenderStrategy.Message = Object.freeze({
		        sendCancellation(conn, id) {
		            return conn.sendNotification(CancelNotification.type, { id });
		        },
		        cleanup(_) { }
		    });
		    function is(value) {
		        const candidate = value;
		        return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup);
		    }
		    CancellationSenderStrategy.is = is;
		})(CancellationSenderStrategy = exports.CancellationSenderStrategy || (exports.CancellationSenderStrategy = {}));
		var CancellationStrategy;
		(function (CancellationStrategy) {
		    CancellationStrategy.Message = Object.freeze({
		        receiver: CancellationReceiverStrategy.Message,
		        sender: CancellationSenderStrategy.Message
		    });
		    function is(value) {
		        const candidate = value;
		        return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender);
		    }
		    CancellationStrategy.is = is;
		})(CancellationStrategy = exports.CancellationStrategy || (exports.CancellationStrategy = {}));
		(function (ConnectionOptions) {
		    function is(value) {
		        const candidate = value;
		        return candidate && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy));
		    }
		    ConnectionOptions.is = is;
		})(exports.ConnectionOptions || (exports.ConnectionOptions = {}));
		var ConnectionState;
		(function (ConnectionState) {
		    ConnectionState[ConnectionState["New"] = 1] = "New";
		    ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
		    ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
		    ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
		})(ConnectionState || (ConnectionState = {}));
		function createMessageConnection(messageReader, messageWriter, _logger, options) {
		    const logger = _logger !== undefined ? _logger : exports.NullLogger;
		    let sequenceNumber = 0;
		    let notificationSequenceNumber = 0;
		    let unknownResponseSequenceNumber = 0;
		    const version = '2.0';
		    let starRequestHandler = undefined;
		    const requestHandlers = new Map();
		    let starNotificationHandler = undefined;
		    const notificationHandlers = new Map();
		    const progressHandlers = new Map();
		    let timer;
		    let messageQueue = new linkedMap_1.LinkedMap();
		    let responsePromises = new Map();
		    let knownCanceledRequests = new Set();
		    let requestTokens = new Map();
		    let trace = Trace.Off;
		    let traceFormat = TraceFormat.Text;
		    let tracer;
		    let state = ConnectionState.New;
		    const errorEmitter = new events_1.Emitter();
		    const closeEmitter = new events_1.Emitter();
		    const unhandledNotificationEmitter = new events_1.Emitter();
		    const unhandledProgressEmitter = new events_1.Emitter();
		    const disposeEmitter = new events_1.Emitter();
		    const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message;
		    function createRequestQueueKey(id) {
		        if (id === null) {
		            throw new Error(`Can't send requests with id null since the response can't be correlated.`);
		        }
		        return 'req-' + id.toString();
		    }
		    function createResponseQueueKey(id) {
		        if (id === null) {
		            return 'res-unknown-' + (++unknownResponseSequenceNumber).toString();
		        }
		        else {
		            return 'res-' + id.toString();
		        }
		    }
		    function createNotificationQueueKey() {
		        return 'not-' + (++notificationSequenceNumber).toString();
		    }
		    function addMessageToQueue(queue, message) {
		        if (messages_1.Message.isRequest(message)) {
		            queue.set(createRequestQueueKey(message.id), message);
		        }
		        else if (messages_1.Message.isResponse(message)) {
		            queue.set(createResponseQueueKey(message.id), message);
		        }
		        else {
		            queue.set(createNotificationQueueKey(), message);
		        }
		    }
		    function cancelUndispatched(_message) {
		        return undefined;
		    }
		    function isListening() {
		        return state === ConnectionState.Listening;
		    }
		    function isClosed() {
		        return state === ConnectionState.Closed;
		    }
		    function isDisposed() {
		        return state === ConnectionState.Disposed;
		    }
		    function closeHandler() {
		        if (state === ConnectionState.New || state === ConnectionState.Listening) {
		            state = ConnectionState.Closed;
		            closeEmitter.fire(undefined);
		        }
		    }
		    function readErrorHandler(error) {
		        errorEmitter.fire([error, undefined, undefined]);
		    }
		    function writeErrorHandler(data) {
		        errorEmitter.fire(data);
		    }
		    messageReader.onClose(closeHandler);
		    messageReader.onError(readErrorHandler);
		    messageWriter.onClose(closeHandler);
		    messageWriter.onError(writeErrorHandler);
		    function triggerMessageQueue() {
		        if (timer || messageQueue.size === 0) {
		            return;
		        }
		        timer = (0, ral_1.default)().timer.setImmediate(() => {
		            timer = undefined;
		            processMessageQueue();
		        });
		    }
		    function processMessageQueue() {
		        if (messageQueue.size === 0) {
		            return;
		        }
		        const message = messageQueue.shift();
		        try {
		            if (messages_1.Message.isRequest(message)) {
		                handleRequest(message);
		            }
		            else if (messages_1.Message.isNotification(message)) {
		                handleNotification(message);
		            }
		            else if (messages_1.Message.isResponse(message)) {
		                handleResponse(message);
		            }
		            else {
		                handleInvalidMessage(message);
		            }
		        }
		        finally {
		            triggerMessageQueue();
		        }
		    }
		    const callback = (message) => {
		        try {
		            if (messages_1.Message.isNotification(message) && message.method === CancelNotification.type.method) {
		                const cancelId = message.params.id;
		                const key = createRequestQueueKey(cancelId);
		                const toCancel = messageQueue.get(key);
		                if (messages_1.Message.isRequest(toCancel)) {
		                    const strategy = options?.connectionStrategy;
		                    const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
		                    if (response && (response.error !== undefined || response.result !== undefined)) {
		                        messageQueue.delete(key);
		                        requestTokens.delete(cancelId);
		                        response.id = toCancel.id;
		                        traceSendingResponse(response, message.method, Date.now());
		                        messageWriter.write(response).catch(() => logger.error(`Sending response for canceled message failed.`));
		                        return;
		                    }
		                }
		                const cancellationToken = requestTokens.get(cancelId);
		                if (cancellationToken !== undefined) {
		                    cancellationToken.cancel();
		                    traceReceivedNotification(message);
		                    return;
		                }
		                else {
		                    knownCanceledRequests.add(cancelId);
		                }
		            }
		            addMessageToQueue(messageQueue, message);
		        }
		        finally {
		            triggerMessageQueue();
		        }
		    };
		    function handleRequest(requestMessage) {
		        if (isDisposed()) {
		            return;
		        }
		        function reply(resultOrError, method, startTime) {
		            const message = {
		                jsonrpc: version,
		                id: requestMessage.id
		            };
		            if (resultOrError instanceof messages_1.ResponseError) {
		                message.error = resultOrError.toJson();
		            }
		            else {
		                message.result = resultOrError === undefined ? null : resultOrError;
		            }
		            traceSendingResponse(message, method, startTime);
		            messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));
		        }
		        function replyError(error, method, startTime) {
		            const message = {
		                jsonrpc: version,
		                id: requestMessage.id,
		                error: error.toJson()
		            };
		            traceSendingResponse(message, method, startTime);
		            messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));
		        }
		        function replySuccess(result, method, startTime) {
		            if (result === undefined) {
		                result = null;
		            }
		            const message = {
		                jsonrpc: version,
		                id: requestMessage.id,
		                result: result
		            };
		            traceSendingResponse(message, method, startTime);
		            messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));
		        }
		        traceReceivedRequest(requestMessage);
		        const element = requestHandlers.get(requestMessage.method);
		        let type;
		        let requestHandler;
		        if (element) {
		            type = element.type;
		            requestHandler = element.handler;
		        }
		        const startTime = Date.now();
		        if (requestHandler || starRequestHandler) {
		            const tokenKey = requestMessage.id ?? String(Date.now());
		            const cancellationSource = cancellationStrategy.receiver.createCancellationTokenSource(tokenKey);
		            if (requestMessage.id !== null && knownCanceledRequests.has(requestMessage.id)) {
		                cancellationSource.cancel();
		            }
		            if (requestMessage.id !== null) {
		                requestTokens.set(tokenKey, cancellationSource);
		            }
		            try {
		                let handlerResult;
		                if (requestHandler) {
		                    if (requestMessage.params === undefined) {
		                        if (type !== undefined && type.numberOfParams !== 0) {
		                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but received none.`), requestMessage.method, startTime);
		                            return;
		                        }
		                        handlerResult = requestHandler(cancellationSource.token);
		                    }
		                    else if (Array.isArray(requestMessage.params)) {
		                        if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byName) {
		                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime);
		                            return;
		                        }
		                        handlerResult = requestHandler(...requestMessage.params, cancellationSource.token);
		                    }
		                    else {
		                        if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) {
		                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime);
		                            return;
		                        }
		                        handlerResult = requestHandler(requestMessage.params, cancellationSource.token);
		                    }
		                }
		                else if (starRequestHandler) {
		                    handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
		                }
		                const promise = handlerResult;
		                if (!handlerResult) {
		                    requestTokens.delete(tokenKey);
		                    replySuccess(handlerResult, requestMessage.method, startTime);
		                }
		                else if (promise.then) {
		                    promise.then((resultOrError) => {
		                        requestTokens.delete(tokenKey);
		                        reply(resultOrError, requestMessage.method, startTime);
		                    }, error => {
		                        requestTokens.delete(tokenKey);
		                        if (error instanceof messages_1.ResponseError) {
		                            replyError(error, requestMessage.method, startTime);
		                        }
		                        else if (error && Is.string(error.message)) {
		                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
		                        }
		                        else {
		                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
		                        }
		                    });
		                }
		                else {
		                    requestTokens.delete(tokenKey);
		                    reply(handlerResult, requestMessage.method, startTime);
		                }
		            }
		            catch (error) {
		                requestTokens.delete(tokenKey);
		                if (error instanceof messages_1.ResponseError) {
		                    reply(error, requestMessage.method, startTime);
		                }
		                else if (error && Is.string(error.message)) {
		                    replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
		                }
		                else {
		                    replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
		                }
		            }
		        }
		        else {
		            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
		        }
		    }
		    function handleResponse(responseMessage) {
		        if (isDisposed()) {
		            return;
		        }
		        if (responseMessage.id === null) {
		            if (responseMessage.error) {
		                logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
		            }
		            else {
		                logger.error(`Received response message without id. No further error information provided.`);
		            }
		        }
		        else {
		            const key = responseMessage.id;
		            const responsePromise = responsePromises.get(key);
		            traceReceivedResponse(responseMessage, responsePromise);
		            if (responsePromise !== undefined) {
		                responsePromises.delete(key);
		                try {
		                    if (responseMessage.error) {
		                        const error = responseMessage.error;
		                        responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
		                    }
		                    else if (responseMessage.result !== undefined) {
		                        responsePromise.resolve(responseMessage.result);
		                    }
		                    else {
		                        throw new Error('Should never happen.');
		                    }
		                }
		                catch (error) {
		                    if (error.message) {
		                        logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
		                    }
		                    else {
		                        logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
		                    }
		                }
		            }
		        }
		    }
		    function handleNotification(message) {
		        if (isDisposed()) {
		            return;
		        }
		        let type = undefined;
		        let notificationHandler;
		        if (message.method === CancelNotification.type.method) {
		            const cancelId = message.params.id;
		            knownCanceledRequests.delete(cancelId);
		            traceReceivedNotification(message);
		            return;
		        }
		        else {
		            const element = notificationHandlers.get(message.method);
		            if (element) {
		                notificationHandler = element.handler;
		                type = element.type;
		            }
		        }
		        if (notificationHandler || starNotificationHandler) {
		            try {
		                traceReceivedNotification(message);
		                if (notificationHandler) {
		                    if (message.params === undefined) {
		                        if (type !== undefined) {
		                            if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) {
		                                logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received none.`);
		                            }
		                        }
		                        notificationHandler();
		                    }
		                    else if (Array.isArray(message.params)) {
		                        const params = message.params;
		                        if (message.method === ProgressNotification.type.method && params.length === 2 && ProgressToken.is(params[0])) {
		                            notificationHandler({ token: params[0], value: params[1] });
		                        }
		                        else {
		                            if (type !== undefined) {
		                                if (type.parameterStructures === messages_1.ParameterStructures.byName) {
		                                    logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`);
		                                }
		                                if (type.numberOfParams !== message.params.length) {
		                                    logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${params.length} arguments`);
		                                }
		                            }
		                            notificationHandler(...params);
		                        }
		                    }
		                    else {
		                        if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) {
		                            logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`);
		                        }
		                        notificationHandler(message.params);
		                    }
		                }
		                else if (starNotificationHandler) {
		                    starNotificationHandler(message.method, message.params);
		                }
		            }
		            catch (error) {
		                if (error.message) {
		                    logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
		                }
		                else {
		                    logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
		                }
		            }
		        }
		        else {
		            unhandledNotificationEmitter.fire(message);
		        }
		    }
		    function handleInvalidMessage(message) {
		        if (!message) {
		            logger.error('Received empty message.');
		            return;
		        }
		        logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
		        const responseMessage = message;
		        if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
		            const key = responseMessage.id;
		            const responseHandler = responsePromises.get(key);
		            if (responseHandler) {
		                responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
		            }
		        }
		    }
		    function stringifyTrace(params) {
		        if (params === undefined || params === null) {
		            return undefined;
		        }
		        switch (trace) {
		            case Trace.Verbose:
		                return JSON.stringify(params, null, 4);
		            case Trace.Compact:
		                return JSON.stringify(params);
		            default:
		                return undefined;
		        }
		    }
		    function traceSendingRequest(message) {
		        if (trace === Trace.Off || !tracer) {
		            return;
		        }
		        if (traceFormat === TraceFormat.Text) {
		            let data = undefined;
		            if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) {
		                data = `Params: ${stringifyTrace(message.params)}\n\n`;
		            }
		            tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
		        }
		        else {
		            logLSPMessage('send-request', message);
		        }
		    }
		    function traceSendingNotification(message) {
		        if (trace === Trace.Off || !tracer) {
		            return;
		        }
		        if (traceFormat === TraceFormat.Text) {
		            let data = undefined;
		            if (trace === Trace.Verbose || trace === Trace.Compact) {
		                if (message.params) {
		                    data = `Params: ${stringifyTrace(message.params)}\n\n`;
		                }
		                else {
		                    data = 'No parameters provided.\n\n';
		                }
		            }
		            tracer.log(`Sending notification '${message.method}'.`, data);
		        }
		        else {
		            logLSPMessage('send-notification', message);
		        }
		    }
		    function traceSendingResponse(message, method, startTime) {
		        if (trace === Trace.Off || !tracer) {
		            return;
		        }
		        if (traceFormat === TraceFormat.Text) {
		            let data = undefined;
		            if (trace === Trace.Verbose || trace === Trace.Compact) {
		                if (message.error && message.error.data) {
		                    data = `Error data: ${stringifyTrace(message.error.data)}\n\n`;
		                }
		                else {
		                    if (message.result) {
		                        data = `Result: ${stringifyTrace(message.result)}\n\n`;
		                    }
		                    else if (message.error === undefined) {
		                        data = 'No result returned.\n\n';
		                    }
		                }
		            }
		            tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
		        }
		        else {
		            logLSPMessage('send-response', message);
		        }
		    }
		    function traceReceivedRequest(message) {
		        if (trace === Trace.Off || !tracer) {
		            return;
		        }
		        if (traceFormat === TraceFormat.Text) {
		            let data = undefined;
		            if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) {
		                data = `Params: ${stringifyTrace(message.params)}\n\n`;
		            }
		            tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
		        }
		        else {
		            logLSPMessage('receive-request', message);
		        }
		    }
		    function traceReceivedNotification(message) {
		        if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
		            return;
		        }
		        if (traceFormat === TraceFormat.Text) {
		            let data = undefined;
		            if (trace === Trace.Verbose || trace === Trace.Compact) {
		                if (message.params) {
		                    data = `Params: ${stringifyTrace(message.params)}\n\n`;
		                }
		                else {
		                    data = 'No parameters provided.\n\n';
		                }
		            }
		            tracer.log(`Received notification '${message.method}'.`, data);
		        }
		        else {
		            logLSPMessage('receive-notification', message);
		        }
		    }
		    function traceReceivedResponse(message, responsePromise) {
		        if (trace === Trace.Off || !tracer) {
		            return;
		        }
		        if (traceFormat === TraceFormat.Text) {
		            let data = undefined;
		            if (trace === Trace.Verbose || trace === Trace.Compact) {
		                if (message.error && message.error.data) {
		                    data = `Error data: ${stringifyTrace(message.error.data)}\n\n`;
		                }
		                else {
		                    if (message.result) {
		                        data = `Result: ${stringifyTrace(message.result)}\n\n`;
		                    }
		                    else if (message.error === undefined) {
		                        data = 'No result returned.\n\n';
		                    }
		                }
		            }
		            if (responsePromise) {
		                const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
		                tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
		            }
		            else {
		                tracer.log(`Received response ${message.id} without active response promise.`, data);
		            }
		        }
		        else {
		            logLSPMessage('receive-response', message);
		        }
		    }
		    function logLSPMessage(type, message) {
		        if (!tracer || trace === Trace.Off) {
		            return;
		        }
		        const lspMessage = {
		            isLSPMessage: true,
		            type,
		            message,
		            timestamp: Date.now()
		        };
		        tracer.log(lspMessage);
		    }
		    function throwIfClosedOrDisposed() {
		        if (isClosed()) {
		            throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
		        }
		        if (isDisposed()) {
		            throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
		        }
		    }
		    function throwIfListening() {
		        if (isListening()) {
		            throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
		        }
		    }
		    function throwIfNotListening() {
		        if (!isListening()) {
		            throw new Error('Call listen() first.');
		        }
		    }
		    function undefinedToNull(param) {
		        if (param === undefined) {
		            return null;
		        }
		        else {
		            return param;
		        }
		    }
		    function nullToUndefined(param) {
		        if (param === null) {
		            return undefined;
		        }
		        else {
		            return param;
		        }
		    }
		    function isNamedParam(param) {
		        return param !== undefined && param !== null && !Array.isArray(param) && typeof param === 'object';
		    }
		    function computeSingleParam(parameterStructures, param) {
		        switch (parameterStructures) {
		            case messages_1.ParameterStructures.auto:
		                if (isNamedParam(param)) {
		                    return nullToUndefined(param);
		                }
		                else {
		                    return [undefinedToNull(param)];
		                }
		            case messages_1.ParameterStructures.byName:
		                if (!isNamedParam(param)) {
		                    throw new Error(`Received parameters by name but param is not an object literal.`);
		                }
		                return nullToUndefined(param);
		            case messages_1.ParameterStructures.byPosition:
		                return [undefinedToNull(param)];
		            default:
		                throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`);
		        }
		    }
		    function computeMessageParams(type, params) {
		        let result;
		        const numberOfParams = type.numberOfParams;
		        switch (numberOfParams) {
		            case 0:
		                result = undefined;
		                break;
		            case 1:
		                result = computeSingleParam(type.parameterStructures, params[0]);
		                break;
		            default:
		                result = [];
		                for (let i = 0; i < params.length && i < numberOfParams; i++) {
		                    result.push(undefinedToNull(params[i]));
		                }
		                if (params.length < numberOfParams) {
		                    for (let i = params.length; i < numberOfParams; i++) {
		                        result.push(null);
		                    }
		                }
		                break;
		        }
		        return result;
		    }
		    const connection = {
		        sendNotification: (type, ...args) => {
		            throwIfClosedOrDisposed();
		            let method;
		            let messageParams;
		            if (Is.string(type)) {
		                method = type;
		                const first = args[0];
		                let paramStart = 0;
		                let parameterStructures = messages_1.ParameterStructures.auto;
		                if (messages_1.ParameterStructures.is(first)) {
		                    paramStart = 1;
		                    parameterStructures = first;
		                }
		                let paramEnd = args.length;
		                const numberOfParams = paramEnd - paramStart;
		                switch (numberOfParams) {
		                    case 0:
		                        messageParams = undefined;
		                        break;
		                    case 1:
		                        messageParams = computeSingleParam(parameterStructures, args[paramStart]);
		                        break;
		                    default:
		                        if (parameterStructures === messages_1.ParameterStructures.byName) {
		                            throw new Error(`Received ${numberOfParams} parameters for 'by Name' notification parameter structure.`);
		                        }
		                        messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value));
		                        break;
		                }
		            }
		            else {
		                const params = args;
		                method = type.method;
		                messageParams = computeMessageParams(type, params);
		            }
		            const notificationMessage = {
		                jsonrpc: version,
		                method: method,
		                params: messageParams
		            };
		            traceSendingNotification(notificationMessage);
		            return messageWriter.write(notificationMessage).catch(() => logger.error(`Sending notification failed.`));
		        },
		        onNotification: (type, handler) => {
		            throwIfClosedOrDisposed();
		            let method;
		            if (Is.func(type)) {
		                starNotificationHandler = type;
		            }
		            else if (handler) {
		                if (Is.string(type)) {
		                    method = type;
		                    notificationHandlers.set(type, { type: undefined, handler });
		                }
		                else {
		                    method = type.method;
		                    notificationHandlers.set(type.method, { type, handler });
		                }
		            }
		            return {
		                dispose: () => {
		                    if (method !== undefined) {
		                        notificationHandlers.delete(method);
		                    }
		                    else {
		                        starNotificationHandler = undefined;
		                    }
		                }
		            };
		        },
		        onProgress: (_type, token, handler) => {
		            if (progressHandlers.has(token)) {
		                throw new Error(`Progress handler for token ${token} already registered`);
		            }
		            progressHandlers.set(token, handler);
		            return {
		                dispose: () => {
		                    progressHandlers.delete(token);
		                }
		            };
		        },
		        sendProgress: (_type, token, value) => {
		            return connection.sendNotification(ProgressNotification.type, { token, value });
		        },
		        onUnhandledProgress: unhandledProgressEmitter.event,
		        sendRequest: (type, ...args) => {
		            throwIfClosedOrDisposed();
		            throwIfNotListening();
		            let method;
		            let messageParams;
		            let token = undefined;
		            if (Is.string(type)) {
		                method = type;
		                const first = args[0];
		                const last = args[args.length - 1];
		                let paramStart = 0;
		                let parameterStructures = messages_1.ParameterStructures.auto;
		                if (messages_1.ParameterStructures.is(first)) {
		                    paramStart = 1;
		                    parameterStructures = first;
		                }
		                let paramEnd = args.length;
		                if (cancellation_1.CancellationToken.is(last)) {
		                    paramEnd = paramEnd - 1;
		                    token = last;
		                }
		                const numberOfParams = paramEnd - paramStart;
		                switch (numberOfParams) {
		                    case 0:
		                        messageParams = undefined;
		                        break;
		                    case 1:
		                        messageParams = computeSingleParam(parameterStructures, args[paramStart]);
		                        break;
		                    default:
		                        if (parameterStructures === messages_1.ParameterStructures.byName) {
		                            throw new Error(`Received ${numberOfParams} parameters for 'by Name' request parameter structure.`);
		                        }
		                        messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value));
		                        break;
		                }
		            }
		            else {
		                const params = args;
		                method = type.method;
		                messageParams = computeMessageParams(type, params);
		                const numberOfParams = type.numberOfParams;
		                token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
		            }
		            const id = sequenceNumber++;
		            let disposable;
		            if (token) {
		                disposable = token.onCancellationRequested(() => {
		                    const p = cancellationStrategy.sender.sendCancellation(connection, id);
		                    if (p === undefined) {
		                        logger.log(`Received no promise from cancellation strategy when cancelling id ${id}`);
		                        return Promise.resolve();
		                    }
		                    else {
		                        return p.catch(() => {
		                            logger.log(`Sending cancellation messages for id ${id} failed`);
		                        });
		                    }
		                });
		            }
		            const result = new Promise((resolve, reject) => {
		                const requestMessage = {
		                    jsonrpc: version,
		                    id: id,
		                    method: method,
		                    params: messageParams
		                };
		                const resolveWithCleanup = (r) => {
		                    resolve(r);
		                    cancellationStrategy.sender.cleanup(id);
		                    disposable?.dispose();
		                };
		                const rejectWithCleanup = (r) => {
		                    reject(r);
		                    cancellationStrategy.sender.cleanup(id);
		                    disposable?.dispose();
		                };
		                let responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup };
		                traceSendingRequest(requestMessage);
		                try {
		                    messageWriter.write(requestMessage).catch(() => logger.error(`Sending request failed.`));
		                }
		                catch (e) {
		                    responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
		                    responsePromise = null;
		                }
		                if (responsePromise) {
		                    responsePromises.set(id, responsePromise);
		                }
		            });
		            return result;
		        },
		        onRequest: (type, handler) => {
		            throwIfClosedOrDisposed();
		            let method = null;
		            if (StarRequestHandler.is(type)) {
		                method = undefined;
		                starRequestHandler = type;
		            }
		            else if (Is.string(type)) {
		                method = null;
		                if (handler !== undefined) {
		                    method = type;
		                    requestHandlers.set(type, { handler: handler, type: undefined });
		                }
		            }
		            else {
		                if (handler !== undefined) {
		                    method = type.method;
		                    requestHandlers.set(type.method, { type, handler });
		                }
		            }
		            return {
		                dispose: () => {
		                    if (method === null) {
		                        return;
		                    }
		                    if (method !== undefined) {
		                        requestHandlers.delete(method);
		                    }
		                    else {
		                        starRequestHandler = undefined;
		                    }
		                }
		            };
		        },
		        hasPendingResponse: () => {
		            return responsePromises.size > 0;
		        },
		        trace: async (_value, _tracer, sendNotificationOrTraceOptions) => {
		            let _sendNotification = false;
		            let _traceFormat = TraceFormat.Text;
		            if (sendNotificationOrTraceOptions !== undefined) {
		                if (Is.boolean(sendNotificationOrTraceOptions)) {
		                    _sendNotification = sendNotificationOrTraceOptions;
		                }
		                else {
		                    _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
		                    _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
		                }
		            }
		            trace = _value;
		            traceFormat = _traceFormat;
		            if (trace === Trace.Off) {
		                tracer = undefined;
		            }
		            else {
		                tracer = _tracer;
		            }
		            if (_sendNotification && !isClosed() && !isDisposed()) {
		                await connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
		            }
		        },
		        onError: errorEmitter.event,
		        onClose: closeEmitter.event,
		        onUnhandledNotification: unhandledNotificationEmitter.event,
		        onDispose: disposeEmitter.event,
		        end: () => {
		            messageWriter.end();
		        },
		        dispose: () => {
		            if (isDisposed()) {
		                return;
		            }
		            state = ConnectionState.Disposed;
		            disposeEmitter.fire(undefined);
		            const error = new messages_1.ResponseError(messages_1.ErrorCodes.PendingResponseRejected, 'Pending response rejected since connection got disposed');
		            for (const promise of responsePromises.values()) {
		                promise.reject(error);
		            }
		            responsePromises = new Map();
		            requestTokens = new Map();
		            knownCanceledRequests = new Set();
		            messageQueue = new linkedMap_1.LinkedMap();
		            if (Is.func(messageWriter.dispose)) {
		                messageWriter.dispose();
		            }
		            if (Is.func(messageReader.dispose)) {
		                messageReader.dispose();
		            }
		        },
		        listen: () => {
		            throwIfClosedOrDisposed();
		            throwIfListening();
		            state = ConnectionState.Listening;
		            messageReader.listen(callback);
		        },
		        inspect: () => {
		            (0, ral_1.default)().console.log('inspect');
		        }
		    };
		    connection.onNotification(LogTraceNotification.type, (params) => {
		        if (trace === Trace.Off || !tracer) {
		            return;
		        }
		        const verbose = trace === Trace.Verbose || trace === Trace.Compact;
		        tracer.log(params.message, verbose ? params.verbose : undefined);
		    });
		    connection.onNotification(ProgressNotification.type, (params) => {
		        const handler = progressHandlers.get(params.token);
		        if (handler) {
		            handler(params.value);
		        }
		        else {
		            unhandledProgressEmitter.fire(params);
		        }
		    });
		    return connection;
		}
		exports.createMessageConnection = createMessageConnection;
	} (connection$1));
	return connection$1;
}

var hasRequiredApi;
function requireApi () {
	if (hasRequiredApi) return api$1;
	hasRequiredApi = 1;
	(function (exports) {
		/// <reference path="../../typings/thenable.d.ts" />
		Object.defineProperty(exports, "__esModule", { value: true });
		exports.TraceFormat = exports.TraceValues = exports.Trace = exports.ProgressType = exports.ProgressToken = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.LRUCache = exports.Touch = exports.LinkedMap = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.Message = exports.RAL = void 0;
		exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = void 0;
		const messages_1 = requireMessages();
		Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return messages_1.Message; } });
		Object.defineProperty(exports, "RequestType", { enumerable: true, get: function () { return messages_1.RequestType; } });
		Object.defineProperty(exports, "RequestType0", { enumerable: true, get: function () { return messages_1.RequestType0; } });
		Object.defineProperty(exports, "RequestType1", { enumerable: true, get: function () { return messages_1.RequestType1; } });
		Object.defineProperty(exports, "RequestType2", { enumerable: true, get: function () { return messages_1.RequestType2; } });
		Object.defineProperty(exports, "RequestType3", { enumerable: true, get: function () { return messages_1.RequestType3; } });
		Object.defineProperty(exports, "RequestType4", { enumerable: true, get: function () { return messages_1.RequestType4; } });
		Object.defineProperty(exports, "RequestType5", { enumerable: true, get: function () { return messages_1.RequestType5; } });
		Object.defineProperty(exports, "RequestType6", { enumerable: true, get: function () { return messages_1.RequestType6; } });
		Object.defineProperty(exports, "RequestType7", { enumerable: true, get: function () { return messages_1.RequestType7; } });
		Object.defineProperty(exports, "RequestType8", { enumerable: true, get: function () { return messages_1.RequestType8; } });
		Object.defineProperty(exports, "RequestType9", { enumerable: true, get: function () { return messages_1.RequestType9; } });
		Object.defineProperty(exports, "ResponseError", { enumerable: true, get: function () { return messages_1.ResponseError; } });
		Object.defineProperty(exports, "ErrorCodes", { enumerable: true, get: function () { return messages_1.ErrorCodes; } });
		Object.defineProperty(exports, "NotificationType", { enumerable: true, get: function () { return messages_1.NotificationType; } });
		Object.defineProperty(exports, "NotificationType0", { enumerable: true, get: function () { return messages_1.NotificationType0; } });
		Object.defineProperty(exports, "NotificationType1", { enumerable: true, get: function () { return messages_1.NotificationType1; } });
		Object.defineProperty(exports, "NotificationType2", { enumerable: true, get: function () { return messages_1.NotificationType2; } });
		Object.defineProperty(exports, "NotificationType3", { enumerable: true, get: function () { return messages_1.NotificationType3; } });
		Object.defineProperty(exports, "NotificationType4", { enumerable: true, get: function () { return messages_1.NotificationType4; } });
		Object.defineProperty(exports, "NotificationType5", { enumerable: true, get: function () { return messages_1.NotificationType5; } });
		Object.defineProperty(exports, "NotificationType6", { enumerable: true, get: function () { return messages_1.NotificationType6; } });
		Object.defineProperty(exports, "NotificationType7", { enumerable: true, get: function () { return messages_1.NotificationType7; } });
		Object.defineProperty(exports, "NotificationType8", { enumerable: true, get: function () { return messages_1.NotificationType8; } });
		Object.defineProperty(exports, "NotificationType9", { enumerable: true, get: function () { return messages_1.NotificationType9; } });
		Object.defineProperty(exports, "ParameterStructures", { enumerable: true, get: function () { return messages_1.ParameterStructures; } });
		const linkedMap_1 = requireLinkedMap();
		Object.defineProperty(exports, "LinkedMap", { enumerable: true, get: function () { return linkedMap_1.LinkedMap; } });
		Object.defineProperty(exports, "LRUCache", { enumerable: true, get: function () { return linkedMap_1.LRUCache; } });
		Object.defineProperty(exports, "Touch", { enumerable: true, get: function () { return linkedMap_1.Touch; } });
		const disposable_1 = disposable;
		Object.defineProperty(exports, "Disposable", { enumerable: true, get: function () { return disposable_1.Disposable; } });
		const events_1 = requireEvents();
		Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return events_1.Event; } });
		Object.defineProperty(exports, "Emitter", { enumerable: true, get: function () { return events_1.Emitter; } });
		const cancellation_1 = requireCancellation();
		Object.defineProperty(exports, "CancellationTokenSource", { enumerable: true, get: function () { return cancellation_1.CancellationTokenSource; } });
		Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return cancellation_1.CancellationToken; } });
		const messageReader_1 = requireMessageReader();
		Object.defineProperty(exports, "MessageReader", { enumerable: true, get: function () { return messageReader_1.MessageReader; } });
		Object.defineProperty(exports, "AbstractMessageReader", { enumerable: true, get: function () { return messageReader_1.AbstractMessageReader; } });
		Object.defineProperty(exports, "ReadableStreamMessageReader", { enumerable: true, get: function () { return messageReader_1.ReadableStreamMessageReader; } });
		const messageWriter_1 = requireMessageWriter();
		Object.defineProperty(exports, "MessageWriter", { enumerable: true, get: function () { return messageWriter_1.MessageWriter; } });
		Object.defineProperty(exports, "AbstractMessageWriter", { enumerable: true, get: function () { return messageWriter_1.AbstractMessageWriter; } });
		Object.defineProperty(exports, "WriteableStreamMessageWriter", { enumerable: true, get: function () { return messageWriter_1.WriteableStreamMessageWriter; } });
		const connection_1 = requireConnection();
		Object.defineProperty(exports, "ConnectionStrategy", { enumerable: true, get: function () { return connection_1.ConnectionStrategy; } });
		Object.defineProperty(exports, "ConnectionOptions", { enumerable: true, get: function () { return connection_1.ConnectionOptions; } });
		Object.defineProperty(exports, "NullLogger", { enumerable: true, get: function () { return connection_1.NullLogger; } });
		Object.defineProperty(exports, "createMessageConnection", { enumerable: true, get: function () { return connection_1.createMessageConnection; } });
		Object.defineProperty(exports, "ProgressToken", { enumerable: true, get: function () { return connection_1.ProgressToken; } });
		Object.defineProperty(exports, "ProgressType", { enumerable: true, get: function () { return connection_1.ProgressType; } });
		Object.defineProperty(exports, "Trace", { enumerable: true, get: function () { return connection_1.Trace; } });
		Object.defineProperty(exports, "TraceValues", { enumerable: true, get: function () { return connection_1.TraceValues; } });
		Object.defineProperty(exports, "TraceFormat", { enumerable: true, get: function () { return connection_1.TraceFormat; } });
		Object.defineProperty(exports, "SetTraceNotification", { enumerable: true, get: function () { return connection_1.SetTraceNotification; } });
		Object.defineProperty(exports, "LogTraceNotification", { enumerable: true, get: function () { return connection_1.LogTraceNotification; } });
		Object.defineProperty(exports, "ConnectionErrors", { enumerable: true, get: function () { return connection_1.ConnectionErrors; } });
		Object.defineProperty(exports, "ConnectionError", { enumerable: true, get: function () { return connection_1.ConnectionError; } });
		Object.defineProperty(exports, "CancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.CancellationReceiverStrategy; } });
		Object.defineProperty(exports, "CancellationSenderStrategy", { enumerable: true, get: function () { return connection_1.CancellationSenderStrategy; } });
		Object.defineProperty(exports, "CancellationStrategy", { enumerable: true, get: function () { return connection_1.CancellationStrategy; } });
		const ral_1 = ral;
		exports.RAL = ral_1.default;
	} (api$1));
	return api$1;
}

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.createMessageConnection = exports.createServerSocketTransport = exports.createClientSocketTransport = exports.createServerPipeTransport = exports.createClientPipeTransport = exports.generateRandomPipeName = exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0;
	const ril_1 = ril;
	ril_1.default.install();
	const api_1 = requireApi();
	const path = path$1;
	const os = require$$2;
	const crypto_1 = require$$3;
	const net_1 = require$$4;
	__exportStar(requireApi(), exports);
	class IPCMessageReader extends api_1.AbstractMessageReader {
	    constructor(process) {
	        super();
	        this.process = process;
	        let eventEmitter = this.process;
	        eventEmitter.on('error', (error) => this.fireError(error));
	        eventEmitter.on('close', () => this.fireClose());
	    }
	    listen(callback) {
	        this.process.on('message', callback);
	        return api_1.Disposable.create(() => this.process.off('message', callback));
	    }
	}
	exports.IPCMessageReader = IPCMessageReader;
	class IPCMessageWriter extends api_1.AbstractMessageWriter {
	    constructor(process) {
	        super();
	        this.process = process;
	        this.errorCount = 0;
	        let eventEmitter = this.process;
	        eventEmitter.on('error', (error) => this.fireError(error));
	        eventEmitter.on('close', () => this.fireClose);
	    }
	    write(msg) {
	        try {
	            if (typeof this.process.send === 'function') {
	                this.process.send(msg, undefined, undefined, (error) => {
	                    if (error) {
	                        this.errorCount++;
	                        this.handleError(error, msg);
	                    }
	                    else {
	                        this.errorCount = 0;
	                    }
	                });
	            }
	            return Promise.resolve();
	        }
	        catch (error) {
	            this.handleError(error, msg);
	            return Promise.reject(error);
	        }
	    }
	    handleError(error, msg) {
	        this.errorCount++;
	        this.fireError(error, msg, this.errorCount);
	    }
	    end() {
	    }
	}
	exports.IPCMessageWriter = IPCMessageWriter;
	class SocketMessageReader extends api_1.ReadableStreamMessageReader {
	    constructor(socket, encoding = 'utf-8') {
	        super((0, ril_1.default)().stream.asReadableStream(socket), encoding);
	    }
	}
	exports.SocketMessageReader = SocketMessageReader;
	class SocketMessageWriter extends api_1.WriteableStreamMessageWriter {
	    constructor(socket, options) {
	        super((0, ril_1.default)().stream.asWritableStream(socket), options);
	        this.socket = socket;
	    }
	    dispose() {
	        super.dispose();
	        this.socket.destroy();
	    }
	}
	exports.SocketMessageWriter = SocketMessageWriter;
	class StreamMessageReader extends api_1.ReadableStreamMessageReader {
	    constructor(readble, encoding) {
	        super((0, ril_1.default)().stream.asReadableStream(readble), encoding);
	    }
	}
	exports.StreamMessageReader = StreamMessageReader;
	class StreamMessageWriter extends api_1.WriteableStreamMessageWriter {
	    constructor(writable, options) {
	        super((0, ril_1.default)().stream.asWritableStream(writable), options);
	    }
	}
	exports.StreamMessageWriter = StreamMessageWriter;
	const XDG_RUNTIME_DIR = process.env['XDG_RUNTIME_DIR'];
	const safeIpcPathLengths = new Map([
	    ['linux', 107],
	    ['darwin', 103]
	]);
	function generateRandomPipeName() {
	    const randomSuffix = (0, crypto_1.randomBytes)(21).toString('hex');
	    if (process.platform === 'win32') {
	        return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
	    }
	    let result;
	    if (XDG_RUNTIME_DIR) {
	        result = path.join(XDG_RUNTIME_DIR, `vscode-ipc-${randomSuffix}.sock`);
	    }
	    else {
	        result = path.join(os.tmpdir(), `vscode-${randomSuffix}.sock`);
	    }
	    const limit = safeIpcPathLengths.get(process.platform);
	    if (limit !== undefined && result.length >= limit) {
	        (0, ril_1.default)().console.warn(`WARNING: IPC handle "${result}" is longer than ${limit} characters.`);
	    }
	    return result;
	}
	exports.generateRandomPipeName = generateRandomPipeName;
	function createClientPipeTransport(pipeName, encoding = 'utf-8') {
	    let connectResolve;
	    const connected = new Promise((resolve, _reject) => {
	        connectResolve = resolve;
	    });
	    return new Promise((resolve, reject) => {
	        let server = (0, net_1.createServer)((socket) => {
	            server.close();
	            connectResolve([
	                new SocketMessageReader(socket, encoding),
	                new SocketMessageWriter(socket, encoding)
	            ]);
	        });
	        server.on('error', reject);
	        server.listen(pipeName, () => {
	            server.removeListener('error', reject);
	            resolve({
	                onConnected: () => { return connected; }
	            });
	        });
	    });
	}
	exports.createClientPipeTransport = createClientPipeTransport;
	function createServerPipeTransport(pipeName, encoding = 'utf-8') {
	    const socket = (0, net_1.createConnection)(pipeName);
	    return [
	        new SocketMessageReader(socket, encoding),
	        new SocketMessageWriter(socket, encoding)
	    ];
	}
	exports.createServerPipeTransport = createServerPipeTransport;
	function createClientSocketTransport(port, encoding = 'utf-8') {
	    let connectResolve;
	    const connected = new Promise((resolve, _reject) => {
	        connectResolve = resolve;
	    });
	    return new Promise((resolve, reject) => {
	        const server = (0, net_1.createServer)((socket) => {
	            server.close();
	            connectResolve([
	                new SocketMessageReader(socket, encoding),
	                new SocketMessageWriter(socket, encoding)
	            ]);
	        });
	        server.on('error', reject);
	        server.listen(port, '127.0.0.1', () => {
	            server.removeListener('error', reject);
	            resolve({
	                onConnected: () => { return connected; }
	            });
	        });
	    });
	}
	exports.createClientSocketTransport = createClientSocketTransport;
	function createServerSocketTransport(port, encoding = 'utf-8') {
	    const socket = (0, net_1.createConnection)(port, '127.0.0.1');
	    return [
	        new SocketMessageReader(socket, encoding),
	        new SocketMessageWriter(socket, encoding)
	    ];
	}
	exports.createServerSocketTransport = createServerSocketTransport;
	function isReadableStream(value) {
	    const candidate = value;
	    return candidate.read !== undefined && candidate.addListener !== undefined;
	}
	function isWritableStream(value) {
	    const candidate = value;
	    return candidate.write !== undefined && candidate.addListener !== undefined;
	}
	function createMessageConnection(input, output, logger, options) {
	    if (!logger) {
	        logger = api_1.NullLogger;
	    }
	    const reader = isReadableStream(input) ? new StreamMessageReader(input) : input;
	    const writer = isWritableStream(output) ? new StreamMessageWriter(output) : output;
	    if (api_1.ConnectionStrategy.is(options)) {
	        options = { connectionStrategy: options };
	    }
	    return (0, api_1.createMessageConnection)(reader, writer, logger, options);
	}
	exports.createMessageConnection = createMessageConnection;
} (main$1));
getDefaultExportFromCjs(main$1);

var node = main$1;
getDefaultExportFromCjs(node);

var api = {};

var DocumentUri;
(function (DocumentUri) {
    function is(value) {
        return typeof value === 'string';
    }
    DocumentUri.is = is;
})(DocumentUri || (DocumentUri = {}));
var URI;
(function (URI) {
    function is(value) {
        return typeof value === 'string';
    }
    URI.is = is;
})(URI || (URI = {}));
var integer;
(function (integer) {
    integer.MIN_VALUE = -2147483648;
    integer.MAX_VALUE = 2147483647;
    function is(value) {
        return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;
    }
    integer.is = is;
})(integer || (integer = {}));
var uinteger;
(function (uinteger) {
    uinteger.MIN_VALUE = 0;
    uinteger.MAX_VALUE = 2147483647;
    function is(value) {
        return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;
    }
    uinteger.is = is;
})(uinteger || (uinteger = {}));
var Position;
(function (Position) {
    function create(line, character) {
        if (line === Number.MAX_VALUE) {
            line = uinteger.MAX_VALUE;
        }
        if (character === Number.MAX_VALUE) {
            character = uinteger.MAX_VALUE;
        }
        return { line: line, character: character };
    }
    Position.create = create;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
    }
    Position.is = is;
})(Position || (Position = {}));
var Range;
(function (Range) {
    function create(one, two, three, four) {
        if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
            return { start: Position.create(one, two), end: Position.create(three, four) };
        }
        else if (Position.is(one) && Position.is(two)) {
            return { start: one, end: two };
        }
        else {
            throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]"));
        }
    }
    Range.create = create;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
    }
    Range.is = is;
})(Range || (Range = {}));
var Location;
(function (Location) {
    function create(uri, range) {
        return { uri: uri, range: range };
    }
    Location.create = create;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
    }
    Location.is = is;
})(Location || (Location = {}));
var LocationLink;
(function (LocationLink) {
    function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
        return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
    }
    LocationLink.create = create;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
            && Range.is(candidate.targetSelectionRange)
            && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
    }
    LocationLink.is = is;
})(LocationLink || (LocationLink = {}));
var Color;
(function (Color) {
    function create(red, green, blue, alpha) {
        return {
            red: red,
            green: green,
            blue: blue,
            alpha: alpha,
        };
    }
    Color.create = create;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1)
            && Is.numberRange(candidate.green, 0, 1)
            && Is.numberRange(candidate.blue, 0, 1)
            && Is.numberRange(candidate.alpha, 0, 1);
    }
    Color.is = is;
})(Color || (Color = {}));
var ColorInformation;
(function (ColorInformation) {
    function create(range, color) {
        return {
            range: range,
            color: color,
        };
    }
    ColorInformation.create = create;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);
    }
    ColorInformation.is = is;
})(ColorInformation || (ColorInformation = {}));
var ColorPresentation;
(function (ColorPresentation) {
    function create(label, textEdit, additionalTextEdits) {
        return {
            label: label,
            textEdit: textEdit,
            additionalTextEdits: additionalTextEdits,
        };
    }
    ColorPresentation.create = create;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && Is.string(candidate.label)
            && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
            && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
    }
    ColorPresentation.is = is;
})(ColorPresentation || (ColorPresentation = {}));
var FoldingRangeKind;
(function (FoldingRangeKind) {
    FoldingRangeKind.Comment = 'comment';
    FoldingRangeKind.Imports = 'imports';
    FoldingRangeKind.Region = 'region';
})(FoldingRangeKind || (FoldingRangeKind = {}));
var FoldingRange;
(function (FoldingRange) {
    function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {
        var result = {
            startLine: startLine,
            endLine: endLine
        };
        if (Is.defined(startCharacter)) {
            result.startCharacter = startCharacter;
        }
        if (Is.defined(endCharacter)) {
            result.endCharacter = endCharacter;
        }
        if (Is.defined(kind)) {
            result.kind = kind;
        }
        if (Is.defined(collapsedText)) {
            result.collapsedText = collapsedText;
        }
        return result;
    }
    FoldingRange.create = create;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)
            && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))
            && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))
            && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
    }
    FoldingRange.is = is;
})(FoldingRange || (FoldingRange = {}));
var DiagnosticRelatedInformation;
(function (DiagnosticRelatedInformation) {
    function create(location, message) {
        return {
            location: location,
            message: message
        };
    }
    DiagnosticRelatedInformation.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
    }
    DiagnosticRelatedInformation.is = is;
})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
var DiagnosticSeverity;
(function (DiagnosticSeverity) {
    DiagnosticSeverity.Error = 1;
    DiagnosticSeverity.Warning = 2;
    DiagnosticSeverity.Information = 3;
    DiagnosticSeverity.Hint = 4;
})(DiagnosticSeverity || (DiagnosticSeverity = {}));
var DiagnosticTag;
(function (DiagnosticTag) {
    DiagnosticTag.Unnecessary = 1;
    DiagnosticTag.Deprecated = 2;
})(DiagnosticTag || (DiagnosticTag = {}));
var CodeDescription;
(function (CodeDescription) {
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && Is.string(candidate.href);
    }
    CodeDescription.is = is;
})(CodeDescription || (CodeDescription = {}));
var Diagnostic;
(function (Diagnostic) {
    function create(range, message, severity, code, source, relatedInformation) {
        var result = { range: range, message: message };
        if (Is.defined(severity)) {
            result.severity = severity;
        }
        if (Is.defined(code)) {
            result.code = code;
        }
        if (Is.defined(source)) {
            result.source = source;
        }
        if (Is.defined(relatedInformation)) {
            result.relatedInformation = relatedInformation;
        }
        return result;
    }
    Diagnostic.create = create;
    function is(value) {
        var _a;
        var candidate = value;
        return Is.defined(candidate)
            && Range.is(candidate.range)
            && Is.string(candidate.message)
            && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
            && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
            && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))
            && (Is.string(candidate.source) || Is.undefined(candidate.source))
            && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
    }
    Diagnostic.is = is;
})(Diagnostic || (Diagnostic = {}));
var Command;
(function (Command) {
    function create(title, command) {
        var args = [];
        for (var _i = 2; _i < arguments.length; _i++) {
            args[_i - 2] = arguments[_i];
        }
        var result = { title: title, command: command };
        if (Is.defined(args) && args.length > 0) {
            result.arguments = args;
        }
        return result;
    }
    Command.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
    }
    Command.is = is;
})(Command || (Command = {}));
var TextEdit;
(function (TextEdit) {
    function replace(range, newText) {
        return { range: range, newText: newText };
    }
    TextEdit.replace = replace;
    function insert(position, newText) {
        return { range: { start: position, end: position }, newText: newText };
    }
    TextEdit.insert = insert;
    function del(range) {
        return { range: range, newText: '' };
    }
    TextEdit.del = del;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate)
            && Is.string(candidate.newText)
            && Range.is(candidate.range);
    }
    TextEdit.is = is;
})(TextEdit || (TextEdit = {}));
var ChangeAnnotation;
(function (ChangeAnnotation) {
    function create(label, needsConfirmation, description) {
        var result = { label: label };
        if (needsConfirmation !== undefined) {
            result.needsConfirmation = needsConfirmation;
        }
        if (description !== undefined) {
            result.description = description;
        }
        return result;
    }
    ChangeAnnotation.create = create;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && Is.string(candidate.label) &&
            (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&
            (Is.string(candidate.description) || candidate.description === undefined);
    }
    ChangeAnnotation.is = is;
})(ChangeAnnotation || (ChangeAnnotation = {}));
var ChangeAnnotationIdentifier;
(function (ChangeAnnotationIdentifier) {
    function is(value) {
        var candidate = value;
        return Is.string(candidate);
    }
    ChangeAnnotationIdentifier.is = is;
})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));
var AnnotatedTextEdit;
(function (AnnotatedTextEdit) {
    function replace(range, newText, annotation) {
        return { range: range, newText: newText, annotationId: annotation };
    }
    AnnotatedTextEdit.replace = replace;
    function insert(position, newText, annotation) {
        return { range: { start: position, end: position }, newText: newText, annotationId: annotation };
    }
    AnnotatedTextEdit.insert = insert;
    function del(range, annotation) {
        return { range: range, newText: '', annotationId: annotation };
    }
    AnnotatedTextEdit.del = del;
    function is(value) {
        var candidate = value;
        return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
    }
    AnnotatedTextEdit.is = is;
})(AnnotatedTextEdit || (AnnotatedTextEdit = {}));
var TextDocumentEdit;
(function (TextDocumentEdit) {
    function create(textDocument, edits) {
        return { textDocument: textDocument, edits: edits };
    }
    TextDocumentEdit.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate)
            && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)
            && Array.isArray(candidate.edits);
    }
    TextDocumentEdit.is = is;
})(TextDocumentEdit || (TextDocumentEdit = {}));
var CreateFile;
(function (CreateFile) {
    function create(uri, options, annotation) {
        var result = {
            kind: 'create',
            uri: uri
        };
        if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
            result.options = options;
        }
        if (annotation !== undefined) {
            result.annotationId = annotation;
        }
        return result;
    }
    CreateFile.create = create;
    function is(value) {
        var candidate = value;
        return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||
            ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
    }
    CreateFile.is = is;
})(CreateFile || (CreateFile = {}));
var RenameFile;
(function (RenameFile) {
    function create(oldUri, newUri, options, annotation) {
        var result = {
            kind: 'rename',
            oldUri: oldUri,
            newUri: newUri
        };
        if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
            result.options = options;
        }
        if (annotation !== undefined) {
            result.annotationId = annotation;
        }
        return result;
    }
    RenameFile.create = create;
    function is(value) {
        var candidate = value;
        return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||
            ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
    }
    RenameFile.is = is;
})(RenameFile || (RenameFile = {}));
var DeleteFile;
(function (DeleteFile) {
    function create(uri, options, annotation) {
        var result = {
            kind: 'delete',
            uri: uri
        };
        if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
            result.options = options;
        }
        if (annotation !== undefined) {
            result.annotationId = annotation;
        }
        return result;
    }
    DeleteFile.create = create;
    function is(value) {
        var candidate = value;
        return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||
            ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
    }
    DeleteFile.is = is;
})(DeleteFile || (DeleteFile = {}));
var WorkspaceEdit;
(function (WorkspaceEdit) {
    function is(value) {
        var candidate = value;
        return candidate &&
            (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
            (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {
                if (Is.string(change.kind)) {
                    return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
                }
                else {
                    return TextDocumentEdit.is(change);
                }
            }));
    }
    WorkspaceEdit.is = is;
})(WorkspaceEdit || (WorkspaceEdit = {}));
var TextEditChangeImpl =  (function () {
    function TextEditChangeImpl(edits, changeAnnotations) {
        this.edits = edits;
        this.changeAnnotations = changeAnnotations;
    }
    TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {
        var edit;
        var id;
        if (annotation === undefined) {
            edit = TextEdit.insert(position, newText);
        }
        else if (ChangeAnnotationIdentifier.is(annotation)) {
            id = annotation;
            edit = AnnotatedTextEdit.insert(position, newText, annotation);
        }
        else {
            this.assertChangeAnnotations(this.changeAnnotations);
            id = this.changeAnnotations.manage(annotation);
            edit = AnnotatedTextEdit.insert(position, newText, id);
        }
        this.edits.push(edit);
        if (id !== undefined) {
            return id;
        }
    };
    TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {
        var edit;
        var id;
        if (annotation === undefined) {
            edit = TextEdit.replace(range, newText);
        }
        else if (ChangeAnnotationIdentifier.is(annotation)) {
            id = annotation;
            edit = AnnotatedTextEdit.replace(range, newText, annotation);
        }
        else {
            this.assertChangeAnnotations(this.changeAnnotations);
            id = this.changeAnnotations.manage(annotation);
            edit = AnnotatedTextEdit.replace(range, newText, id);
        }
        this.edits.push(edit);
        if (id !== undefined) {
            return id;
        }
    };
    TextEditChangeImpl.prototype.delete = function (range, annotation) {
        var edit;
        var id;
        if (annotation === undefined) {
            edit = TextEdit.del(range);
        }
        else if (ChangeAnnotationIdentifier.is(annotation)) {
            id = annotation;
            edit = AnnotatedTextEdit.del(range, annotation);
        }
        else {
            this.assertChangeAnnotations(this.changeAnnotations);
            id = this.changeAnnotations.manage(annotation);
            edit = AnnotatedTextEdit.del(range, id);
        }
        this.edits.push(edit);
        if (id !== undefined) {
            return id;
        }
    };
    TextEditChangeImpl.prototype.add = function (edit) {
        this.edits.push(edit);
    };
    TextEditChangeImpl.prototype.all = function () {
        return this.edits;
    };
    TextEditChangeImpl.prototype.clear = function () {
        this.edits.splice(0, this.edits.length);
    };
    TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {
        if (value === undefined) {
            throw new Error("Text edit change is not configured to manage change annotations.");
        }
    };
    return TextEditChangeImpl;
}());
var ChangeAnnotations =  (function () {
    function ChangeAnnotations(annotations) {
        this._annotations = annotations === undefined ? Object.create(null) : annotations;
        this._counter = 0;
        this._size = 0;
    }
    ChangeAnnotations.prototype.all = function () {
        return this._annotations;
    };
    Object.defineProperty(ChangeAnnotations.prototype, "size", {
        get: function () {
            return this._size;
        },
        enumerable: false,
        configurable: true
    });
    ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {
        var id;
        if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
            id = idOrAnnotation;
        }
        else {
            id = this.nextId();
            annotation = idOrAnnotation;
        }
        if (this._annotations[id] !== undefined) {
            throw new Error("Id ".concat(id, " is already in use."));
        }
        if (annotation === undefined) {
            throw new Error("No annotation provided for id ".concat(id));
        }
        this._annotations[id] = annotation;
        this._size++;
        return id;
    };
    ChangeAnnotations.prototype.nextId = function () {
        this._counter++;
        return this._counter.toString();
    };
    return ChangeAnnotations;
}());
var WorkspaceChange =  (function () {
    function WorkspaceChange(workspaceEdit) {
        var _this = this;
        this._textEditChanges = Object.create(null);
        if (workspaceEdit !== undefined) {
            this._workspaceEdit = workspaceEdit;
            if (workspaceEdit.documentChanges) {
                this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
                workspaceEdit.changeAnnotations = this._changeAnnotations.all();
                workspaceEdit.documentChanges.forEach(function (change) {
                    if (TextDocumentEdit.is(change)) {
                        var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
                        _this._textEditChanges[change.textDocument.uri] = textEditChange;
                    }
                });
            }
            else if (workspaceEdit.changes) {
                Object.keys(workspaceEdit.changes).forEach(function (key) {
                    var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
                    _this._textEditChanges[key] = textEditChange;
                });
            }
        }
        else {
            this._workspaceEdit = {};
        }
    }
    Object.defineProperty(WorkspaceChange.prototype, "edit", {
        get: function () {
            this.initDocumentChanges();
            if (this._changeAnnotations !== undefined) {
                if (this._changeAnnotations.size === 0) {
                    this._workspaceEdit.changeAnnotations = undefined;
                }
                else {
                    this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
                }
            }
            return this._workspaceEdit;
        },
        enumerable: false,
        configurable: true
    });
    WorkspaceChange.prototype.getTextEditChange = function (key) {
        if (OptionalVersionedTextDocumentIdentifier.is(key)) {
            this.initDocumentChanges();
            if (this._workspaceEdit.documentChanges === undefined) {
                throw new Error('Workspace edit is not configured for document changes.');
            }
            var textDocument = { uri: key.uri, version: key.version };
            var result = this._textEditChanges[textDocument.uri];
            if (!result) {
                var edits = [];
                var textDocumentEdit = {
                    textDocument: textDocument,
                    edits: edits
                };
                this._workspaceEdit.documentChanges.push(textDocumentEdit);
                result = new TextEditChangeImpl(edits, this._changeAnnotations);
                this._textEditChanges[textDocument.uri] = result;
            }
            return result;
        }
        else {
            this.initChanges();
            if (this._workspaceEdit.changes === undefined) {
                throw new Error('Workspace edit is not configured for normal text edit changes.');
            }
            var result = this._textEditChanges[key];
            if (!result) {
                var edits = [];
                this._workspaceEdit.changes[key] = edits;
                result = new TextEditChangeImpl(edits);
                this._textEditChanges[key] = result;
            }
            return result;
        }
    };
    WorkspaceChange.prototype.initDocumentChanges = function () {
        if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
            this._changeAnnotations = new ChangeAnnotations();
            this._workspaceEdit.documentChanges = [];
            this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
        }
    };
    WorkspaceChange.prototype.initChanges = function () {
        if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
            this._workspaceEdit.changes = Object.create(null);
        }
    };
    WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {
        this.initDocumentChanges();
        if (this._workspaceEdit.documentChanges === undefined) {
            throw new Error('Workspace edit is not configured for document changes.');
        }
        var annotation;
        if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
            annotation = optionsOrAnnotation;
        }
        else {
            options = optionsOrAnnotation;
        }
        var operation;
        var id;
        if (annotation === undefined) {
            operation = CreateFile.create(uri, options);
        }
        else {
            id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
            operation = CreateFile.create(uri, options, id);
        }
        this._workspaceEdit.documentChanges.push(operation);
        if (id !== undefined) {
            return id;
        }
    };
    WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {
        this.initDocumentChanges();
        if (this._workspaceEdit.documentChanges === undefined) {
            throw new Error('Workspace edit is not configured for document changes.');
        }
        var annotation;
        if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
            annotation = optionsOrAnnotation;
        }
        else {
            options = optionsOrAnnotation;
        }
        var operation;
        var id;
        if (annotation === undefined) {
            operation = RenameFile.create(oldUri, newUri, options);
        }
        else {
            id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
            operation = RenameFile.create(oldUri, newUri, options, id);
        }
        this._workspaceEdit.documentChanges.push(operation);
        if (id !== undefined) {
            return id;
        }
    };
    WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {
        this.initDocumentChanges();
        if (this._workspaceEdit.documentChanges === undefined) {
            throw new Error('Workspace edit is not configured for document changes.');
        }
        var annotation;
        if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
            annotation = optionsOrAnnotation;
        }
        else {
            options = optionsOrAnnotation;
        }
        var operation;
        var id;
        if (annotation === undefined) {
            operation = DeleteFile.create(uri, options);
        }
        else {
            id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
            operation = DeleteFile.create(uri, options, id);
        }
        this._workspaceEdit.documentChanges.push(operation);
        if (id !== undefined) {
            return id;
        }
    };
    return WorkspaceChange;
}());
var TextDocumentIdentifier;
(function (TextDocumentIdentifier) {
    function create(uri) {
        return { uri: uri };
    }
    TextDocumentIdentifier.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate) && Is.string(candidate.uri);
    }
    TextDocumentIdentifier.is = is;
})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
var VersionedTextDocumentIdentifier;
(function (VersionedTextDocumentIdentifier) {
    function create(uri, version) {
        return { uri: uri, version: version };
    }
    VersionedTextDocumentIdentifier.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
    }
    VersionedTextDocumentIdentifier.is = is;
})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
var OptionalVersionedTextDocumentIdentifier;
(function (OptionalVersionedTextDocumentIdentifier) {
    function create(uri, version) {
        return { uri: uri, version: version };
    }
    OptionalVersionedTextDocumentIdentifier.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
    }
    OptionalVersionedTextDocumentIdentifier.is = is;
})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));
var TextDocumentItem;
(function (TextDocumentItem) {
    function create(uri, languageId, version, text) {
        return { uri: uri, languageId: languageId, version: version, text: text };
    }
    TextDocumentItem.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
    }
    TextDocumentItem.is = is;
})(TextDocumentItem || (TextDocumentItem = {}));
var MarkupKind;
(function (MarkupKind) {
    MarkupKind.PlainText = 'plaintext';
    MarkupKind.Markdown = 'markdown';
    function is(value) {
        var candidate = value;
        return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
    }
    MarkupKind.is = is;
})(MarkupKind || (MarkupKind = {}));
var MarkupContent;
(function (MarkupContent) {
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
    }
    MarkupContent.is = is;
})(MarkupContent || (MarkupContent = {}));
var CompletionItemKind;
(function (CompletionItemKind) {
    CompletionItemKind.Text = 1;
    CompletionItemKind.Method = 2;
    CompletionItemKind.Function = 3;
    CompletionItemKind.Constructor = 4;
    CompletionItemKind.Field = 5;
    CompletionItemKind.Variable = 6;
    CompletionItemKind.Class = 7;
    CompletionItemKind.Interface = 8;
    CompletionItemKind.Module = 9;
    CompletionItemKind.Property = 10;
    CompletionItemKind.Unit = 11;
    CompletionItemKind.Value = 12;
    CompletionItemKind.Enum = 13;
    CompletionItemKind.Keyword = 14;
    CompletionItemKind.Snippet = 15;
    CompletionItemKind.Color = 16;
    CompletionItemKind.File = 17;
    CompletionItemKind.Reference = 18;
    CompletionItemKind.Folder = 19;
    CompletionItemKind.EnumMember = 20;
    CompletionItemKind.Constant = 21;
    CompletionItemKind.Struct = 22;
    CompletionItemKind.Event = 23;
    CompletionItemKind.Operator = 24;
    CompletionItemKind.TypeParameter = 25;
})(CompletionItemKind || (CompletionItemKind = {}));
var InsertTextFormat;
(function (InsertTextFormat) {
    InsertTextFormat.PlainText = 1;
    InsertTextFormat.Snippet = 2;
})(InsertTextFormat || (InsertTextFormat = {}));
var CompletionItemTag;
(function (CompletionItemTag) {
    CompletionItemTag.Deprecated = 1;
})(CompletionItemTag || (CompletionItemTag = {}));
var InsertReplaceEdit;
(function (InsertReplaceEdit) {
    function create(newText, insert, replace) {
        return { newText: newText, insert: insert, replace: replace };
    }
    InsertReplaceEdit.create = create;
    function is(value) {
        var candidate = value;
        return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
    }
    InsertReplaceEdit.is = is;
})(InsertReplaceEdit || (InsertReplaceEdit = {}));
var InsertTextMode;
(function (InsertTextMode) {
    InsertTextMode.asIs = 1;
    InsertTextMode.adjustIndentation = 2;
})(InsertTextMode || (InsertTextMode = {}));
var CompletionItemLabelDetails;
(function (CompletionItemLabelDetails) {
    function is(value) {
        var candidate = value;
        return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) &&
            (Is.string(candidate.description) || candidate.description === undefined);
    }
    CompletionItemLabelDetails.is = is;
})(CompletionItemLabelDetails || (CompletionItemLabelDetails = {}));
var CompletionItem;
(function (CompletionItem) {
    function create(label) {
        return { label: label };
    }
    CompletionItem.create = create;
})(CompletionItem || (CompletionItem = {}));
var CompletionList;
(function (CompletionList) {
    function create(items, isIncomplete) {
        return { items: items ? items : [], isIncomplete: !!isIncomplete };
    }
    CompletionList.create = create;
})(CompletionList || (CompletionList = {}));
var MarkedString;
(function (MarkedString) {
    function fromPlainText(plainText) {
        return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&');
    }
    MarkedString.fromPlainText = fromPlainText;
    function is(value) {
        var candidate = value;
        return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
    }
    MarkedString.is = is;
})(MarkedString || (MarkedString = {}));
var Hover;
(function (Hover) {
    function is(value) {
        var candidate = value;
        return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
            MarkedString.is(candidate.contents) ||
            Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
    }
    Hover.is = is;
})(Hover || (Hover = {}));
var ParameterInformation;
(function (ParameterInformation) {
    function create(label, documentation) {
        return documentation ? { label: label, documentation: documentation } : { label: label };
    }
    ParameterInformation.create = create;
})(ParameterInformation || (ParameterInformation = {}));
var SignatureInformation;
(function (SignatureInformation) {
    function create(label, documentation) {
        var parameters = [];
        for (var _i = 2; _i < arguments.length; _i++) {
            parameters[_i - 2] = arguments[_i];
        }
        var result = { label: label };
        if (Is.defined(documentation)) {
            result.documentation = documentation;
        }
        if (Is.defined(parameters)) {
            result.parameters = parameters;
        }
        else {
            result.parameters = [];
        }
        return result;
    }
    SignatureInformation.create = create;
})(SignatureInformation || (SignatureInformation = {}));
var DocumentHighlightKind;
(function (DocumentHighlightKind) {
    DocumentHighlightKind.Text = 1;
    DocumentHighlightKind.Read = 2;
    DocumentHighlightKind.Write = 3;
})(DocumentHighlightKind || (DocumentHighlightKind = {}));
var DocumentHighlight;
(function (DocumentHighlight) {
    function create(range, kind) {
        var result = { range: range };
        if (Is.number(kind)) {
            result.kind = kind;
        }
        return result;
    }
    DocumentHighlight.create = create;
})(DocumentHighlight || (DocumentHighlight = {}));
var SymbolKind;
(function (SymbolKind) {
    SymbolKind.File = 1;
    SymbolKind.Module = 2;
    SymbolKind.Namespace = 3;
    SymbolKind.Package = 4;
    SymbolKind.Class = 5;
    SymbolKind.Method = 6;
    SymbolKind.Property = 7;
    SymbolKind.Field = 8;
    SymbolKind.Constructor = 9;
    SymbolKind.Enum = 10;
    SymbolKind.Interface = 11;
    SymbolKind.Function = 12;
    SymbolKind.Variable = 13;
    SymbolKind.Constant = 14;
    SymbolKind.String = 15;
    SymbolKind.Number = 16;
    SymbolKind.Boolean = 17;
    SymbolKind.Array = 18;
    SymbolKind.Object = 19;
    SymbolKind.Key = 20;
    SymbolKind.Null = 21;
    SymbolKind.EnumMember = 22;
    SymbolKind.Struct = 23;
    SymbolKind.Event = 24;
    SymbolKind.Operator = 25;
    SymbolKind.TypeParameter = 26;
})(SymbolKind || (SymbolKind = {}));
var SymbolTag;
(function (SymbolTag) {
    SymbolTag.Deprecated = 1;
})(SymbolTag || (SymbolTag = {}));
var SymbolInformation;
(function (SymbolInformation) {
    function create(name, kind, range, uri, containerName) {
        var result = {
            name: name,
            kind: kind,
            location: { uri: uri, range: range }
        };
        if (containerName) {
            result.containerName = containerName;
        }
        return result;
    }
    SymbolInformation.create = create;
})(SymbolInformation || (SymbolInformation = {}));
var WorkspaceSymbol;
(function (WorkspaceSymbol) {
    function create(name, kind, uri, range) {
        return range !== undefined
            ? { name: name, kind: kind, location: { uri: uri, range: range } }
            : { name: name, kind: kind, location: { uri: uri } };
    }
    WorkspaceSymbol.create = create;
})(WorkspaceSymbol || (WorkspaceSymbol = {}));
var DocumentSymbol;
(function (DocumentSymbol) {
    function create(name, detail, kind, range, selectionRange, children) {
        var result = {
            name: name,
            detail: detail,
            kind: kind,
            range: range,
            selectionRange: selectionRange
        };
        if (children !== undefined) {
            result.children = children;
        }
        return result;
    }
    DocumentSymbol.create = create;
    function is(value) {
        var candidate = value;
        return candidate &&
            Is.string(candidate.name) && Is.number(candidate.kind) &&
            Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
            (candidate.detail === undefined || Is.string(candidate.detail)) &&
            (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&
            (candidate.children === undefined || Array.isArray(candidate.children)) &&
            (candidate.tags === undefined || Array.isArray(candidate.tags));
    }
    DocumentSymbol.is = is;
})(DocumentSymbol || (DocumentSymbol = {}));
var CodeActionKind;
(function (CodeActionKind) {
    CodeActionKind.Empty = '';
    CodeActionKind.QuickFix = 'quickfix';
    CodeActionKind.Refactor = 'refactor';
    CodeActionKind.RefactorExtract = 'refactor.extract';
    CodeActionKind.RefactorInline = 'refactor.inline';
    CodeActionKind.RefactorRewrite = 'refactor.rewrite';
    CodeActionKind.Source = 'source';
    CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
    CodeActionKind.SourceFixAll = 'source.fixAll';
})(CodeActionKind || (CodeActionKind = {}));
var CodeActionTriggerKind;
(function (CodeActionTriggerKind) {
    CodeActionTriggerKind.Invoked = 1;
    CodeActionTriggerKind.Automatic = 2;
})(CodeActionTriggerKind || (CodeActionTriggerKind = {}));
var CodeActionContext;
(function (CodeActionContext) {
    function create(diagnostics, only, triggerKind) {
        var result = { diagnostics: diagnostics };
        if (only !== undefined && only !== null) {
            result.only = only;
        }
        if (triggerKind !== undefined && triggerKind !== null) {
            result.triggerKind = triggerKind;
        }
        return result;
    }
    CodeActionContext.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is)
            && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string))
            && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);
    }
    CodeActionContext.is = is;
})(CodeActionContext || (CodeActionContext = {}));
var CodeAction;
(function (CodeAction) {
    function create(title, kindOrCommandOrEdit, kind) {
        var result = { title: title };
        var checkKind = true;
        if (typeof kindOrCommandOrEdit === 'string') {
            checkKind = false;
            result.kind = kindOrCommandOrEdit;
        }
        else if (Command.is(kindOrCommandOrEdit)) {
            result.command = kindOrCommandOrEdit;
        }
        else {
            result.edit = kindOrCommandOrEdit;
        }
        if (checkKind && kind !== undefined) {
            result.kind = kind;
        }
        return result;
    }
    CodeAction.create = create;
    function is(value) {
        var candidate = value;
        return candidate && Is.string(candidate.title) &&
            (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
            (candidate.kind === undefined || Is.string(candidate.kind)) &&
            (candidate.edit !== undefined || candidate.command !== undefined) &&
            (candidate.command === undefined || Command.is(candidate.command)) &&
            (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&
            (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
    }
    CodeAction.is = is;
})(CodeAction || (CodeAction = {}));
var CodeLens;
(function (CodeLens) {
    function create(range, data) {
        var result = { range: range };
        if (Is.defined(data)) {
            result.data = data;
        }
        return result;
    }
    CodeLens.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
    }
    CodeLens.is = is;
})(CodeLens || (CodeLens = {}));
var FormattingOptions;
(function (FormattingOptions) {
    function create(tabSize, insertSpaces) {
        return { tabSize: tabSize, insertSpaces: insertSpaces };
    }
    FormattingOptions.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
    }
    FormattingOptions.is = is;
})(FormattingOptions || (FormattingOptions = {}));
var DocumentLink;
(function (DocumentLink) {
    function create(range, target, data) {
        return { range: range, target: target, data: data };
    }
    DocumentLink.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
    }
    DocumentLink.is = is;
})(DocumentLink || (DocumentLink = {}));
var SelectionRange;
(function (SelectionRange) {
    function create(range, parent) {
        return { range: range, parent: parent };
    }
    SelectionRange.create = create;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
    }
    SelectionRange.is = is;
})(SelectionRange || (SelectionRange = {}));
var SemanticTokenTypes;
(function (SemanticTokenTypes) {
    SemanticTokenTypes["namespace"] = "namespace";
    SemanticTokenTypes["type"] = "type";
    SemanticTokenTypes["class"] = "class";
    SemanticTokenTypes["enum"] = "enum";
    SemanticTokenTypes["interface"] = "interface";
    SemanticTokenTypes["struct"] = "struct";
    SemanticTokenTypes["typeParameter"] = "typeParameter";
    SemanticTokenTypes["parameter"] = "parameter";
    SemanticTokenTypes["variable"] = "variable";
    SemanticTokenTypes["property"] = "property";
    SemanticTokenTypes["enumMember"] = "enumMember";
    SemanticTokenTypes["event"] = "event";
    SemanticTokenTypes["function"] = "function";
    SemanticTokenTypes["method"] = "method";
    SemanticTokenTypes["macro"] = "macro";
    SemanticTokenTypes["keyword"] = "keyword";
    SemanticTokenTypes["modifier"] = "modifier";
    SemanticTokenTypes["comment"] = "comment";
    SemanticTokenTypes["string"] = "string";
    SemanticTokenTypes["number"] = "number";
    SemanticTokenTypes["regexp"] = "regexp";
    SemanticTokenTypes["operator"] = "operator";
    SemanticTokenTypes["decorator"] = "decorator";
})(SemanticTokenTypes || (SemanticTokenTypes = {}));
var SemanticTokenModifiers;
(function (SemanticTokenModifiers) {
    SemanticTokenModifiers["declaration"] = "declaration";
    SemanticTokenModifiers["definition"] = "definition";
    SemanticTokenModifiers["readonly"] = "readonly";
    SemanticTokenModifiers["static"] = "static";
    SemanticTokenModifiers["deprecated"] = "deprecated";
    SemanticTokenModifiers["abstract"] = "abstract";
    SemanticTokenModifiers["async"] = "async";
    SemanticTokenModifiers["modification"] = "modification";
    SemanticTokenModifiers["documentation"] = "documentation";
    SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
})(SemanticTokenModifiers || (SemanticTokenModifiers = {}));
var SemanticTokens;
(function (SemanticTokens) {
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
            Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
    }
    SemanticTokens.is = is;
})(SemanticTokens || (SemanticTokens = {}));
var InlineValueText;
(function (InlineValueText) {
    function create(range, text) {
        return { range: range, text: text };
    }
    InlineValueText.create = create;
    function is(value) {
        var candidate = value;
        return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);
    }
    InlineValueText.is = is;
})(InlineValueText || (InlineValueText = {}));
var InlineValueVariableLookup;
(function (InlineValueVariableLookup) {
    function create(range, variableName, caseSensitiveLookup) {
        return { range: range, variableName: variableName, caseSensitiveLookup: caseSensitiveLookup };
    }
    InlineValueVariableLookup.create = create;
    function is(value) {
        var candidate = value;
        return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup)
            && (Is.string(candidate.variableName) || candidate.variableName === undefined);
    }
    InlineValueVariableLookup.is = is;
})(InlineValueVariableLookup || (InlineValueVariableLookup = {}));
var InlineValueEvaluatableExpression;
(function (InlineValueEvaluatableExpression) {
    function create(range, expression) {
        return { range: range, expression: expression };
    }
    InlineValueEvaluatableExpression.create = create;
    function is(value) {
        var candidate = value;
        return candidate !== undefined && candidate !== null && Range.is(candidate.range)
            && (Is.string(candidate.expression) || candidate.expression === undefined);
    }
    InlineValueEvaluatableExpression.is = is;
})(InlineValueEvaluatableExpression || (InlineValueEvaluatableExpression = {}));
var InlineValueContext;
(function (InlineValueContext) {
    function create(frameId, stoppedLocation) {
        return { frameId: frameId, stoppedLocation: stoppedLocation };
    }
    InlineValueContext.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate) && Range.is(value.stoppedLocation);
    }
    InlineValueContext.is = is;
})(InlineValueContext || (InlineValueContext = {}));
var InlayHintKind;
(function (InlayHintKind) {
    InlayHintKind.Type = 1;
    InlayHintKind.Parameter = 2;
    function is(value) {
        return value === 1 || value === 2;
    }
    InlayHintKind.is = is;
})(InlayHintKind || (InlayHintKind = {}));
var InlayHintLabelPart;
(function (InlayHintLabelPart) {
    function create(value) {
        return { value: value };
    }
    InlayHintLabelPart.create = create;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate)
            && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
            && (candidate.location === undefined || Location.is(candidate.location))
            && (candidate.command === undefined || Command.is(candidate.command));
    }
    InlayHintLabelPart.is = is;
})(InlayHintLabelPart || (InlayHintLabelPart = {}));
var InlayHint;
(function (InlayHint) {
    function create(position, label, kind) {
        var result = { position: position, label: label };
        if (kind !== undefined) {
            result.kind = kind;
        }
        return result;
    }
    InlayHint.create = create;
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && Position.is(candidate.position)
            && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is))
            && (candidate.kind === undefined || InlayHintKind.is(candidate.kind))
            && (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is)
            && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
            && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft))
            && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight));
    }
    InlayHint.is = is;
})(InlayHint || (InlayHint = {}));
var WorkspaceFolder;
(function (WorkspaceFolder) {
    function is(value) {
        var candidate = value;
        return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);
    }
    WorkspaceFolder.is = is;
})(WorkspaceFolder || (WorkspaceFolder = {}));
var EOL = ['\n', '\r\n', '\r'];
var TextDocument;
(function (TextDocument) {
    function create(uri, languageId, version, content) {
        return new FullTextDocument(uri, languageId, version, content);
    }
    TextDocument.create = create;
    function is(value) {
        var candidate = value;
        return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)
            && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
    }
    TextDocument.is = is;
    function applyEdits(document, edits) {
        var text = document.getText();
        var sortedEdits = mergeSort(edits, function (a, b) {
            var diff = a.range.start.line - b.range.start.line;
            if (diff === 0) {
                return a.range.start.character - b.range.start.character;
            }
            return diff;
        });
        var lastModifiedOffset = text.length;
        for (var i = sortedEdits.length - 1; i >= 0; i--) {
            var e = sortedEdits[i];
            var startOffset = document.offsetAt(e.range.start);
            var endOffset = document.offsetAt(e.range.end);
            if (endOffset <= lastModifiedOffset) {
                text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
            }
            else {
                throw new Error('Overlapping edit');
            }
            lastModifiedOffset = startOffset;
        }
        return text;
    }
    TextDocument.applyEdits = applyEdits;
    function mergeSort(data, compare) {
        if (data.length <= 1) {
            return data;
        }
        var p = (data.length / 2) | 0;
        var left = data.slice(0, p);
        var right = data.slice(p);
        mergeSort(left, compare);
        mergeSort(right, compare);
        var leftIdx = 0;
        var rightIdx = 0;
        var i = 0;
        while (leftIdx < left.length && rightIdx < right.length) {
            var ret = compare(left[leftIdx], right[rightIdx]);
            if (ret <= 0) {
                data[i++] = left[leftIdx++];
            }
            else {
                data[i++] = right[rightIdx++];
            }
        }
        while (leftIdx < left.length) {
            data[i++] = left[leftIdx++];
        }
        while (rightIdx < right.length) {
            data[i++] = right[rightIdx++];
        }
        return data;
    }
})(TextDocument || (TextDocument = {}));
var FullTextDocument =  (function () {
    function FullTextDocument(uri, languageId, version, content) {
        this._uri = uri;
        this._languageId = languageId;
        this._version = version;
        this._content = content;
        this._lineOffsets = undefined;
    }
    Object.defineProperty(FullTextDocument.prototype, "uri", {
        get: function () {
            return this._uri;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FullTextDocument.prototype, "languageId", {
        get: function () {
            return this._languageId;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FullTextDocument.prototype, "version", {
        get: function () {
            return this._version;
        },
        enumerable: false,
        configurable: true
    });
    FullTextDocument.prototype.getText = function (range) {
        if (range) {
            var start = this.offsetAt(range.start);
            var end = this.offsetAt(range.end);
            return this._content.substring(start, end);
        }
        return this._content;
    };
    FullTextDocument.prototype.update = function (event, version) {
        this._content = event.text;
        this._version = version;
        this._lineOffsets = undefined;
    };
    FullTextDocument.prototype.getLineOffsets = function () {
        if (this._lineOffsets === undefined) {
            var lineOffsets = [];
            var text = this._content;
            var isLineStart = true;
            for (var i = 0; i < text.length; i++) {
                if (isLineStart) {
                    lineOffsets.push(i);
                    isLineStart = false;
                }
                var ch = text.charAt(i);
                isLineStart = (ch === '\r' || ch === '\n');
                if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
                    i++;
                }
            }
            if (isLineStart && text.length > 0) {
                lineOffsets.push(text.length);
            }
            this._lineOffsets = lineOffsets;
        }
        return this._lineOffsets;
    };
    FullTextDocument.prototype.positionAt = function (offset) {
        offset = Math.max(Math.min(offset, this._content.length), 0);
        var lineOffsets = this.getLineOffsets();
        var low = 0, high = lineOffsets.length;
        if (high === 0) {
            return Position.create(0, offset);
        }
        while (low < high) {
            var mid = Math.floor((low + high) / 2);
            if (lineOffsets[mid] > offset) {
                high = mid;
            }
            else {
                low = mid + 1;
            }
        }
        var line = low - 1;
        return Position.create(line, offset - lineOffsets[line]);
    };
    FullTextDocument.prototype.offsetAt = function (position) {
        var lineOffsets = this.getLineOffsets();
        if (position.line >= lineOffsets.length) {
            return this._content.length;
        }
        else if (position.line < 0) {
            return 0;
        }
        var lineOffset = lineOffsets[position.line];
        var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
        return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
    };
    Object.defineProperty(FullTextDocument.prototype, "lineCount", {
        get: function () {
            return this.getLineOffsets().length;
        },
        enumerable: false,
        configurable: true
    });
    return FullTextDocument;
}());
var Is;
(function (Is) {
    var toString = Object.prototype.toString;
    function defined(value) {
        return typeof value !== 'undefined';
    }
    Is.defined = defined;
    function undefined$1(value) {
        return typeof value === 'undefined';
    }
    Is.undefined = undefined$1;
    function boolean(value) {
        return value === true || value === false;
    }
    Is.boolean = boolean;
    function string(value) {
        return toString.call(value) === '[object String]';
    }
    Is.string = string;
    function number(value) {
        return toString.call(value) === '[object Number]';
    }
    Is.number = number;
    function numberRange(value, min, max) {
        return toString.call(value) === '[object Number]' && min <= value && value <= max;
    }
    Is.numberRange = numberRange;
    function integer(value) {
        return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;
    }
    Is.integer = integer;
    function uinteger(value) {
        return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;
    }
    Is.uinteger = uinteger;
    function func(value) {
        return toString.call(value) === '[object Function]';
    }
    Is.func = func;
    function objectLiteral(value) {
        return value !== null && typeof value === 'object';
    }
    Is.objectLiteral = objectLiteral;
    function typedArray(value, check) {
        return Array.isArray(value) && value.every(check);
    }
    Is.typedArray = typedArray;
})(Is || (Is = {}));

var main = /*#__PURE__*/Object.freeze({
	__proto__: null,
	get DocumentUri () { return DocumentUri; },
	get URI () { return URI; },
	get integer () { return integer; },
	get uinteger () { return uinteger; },
	get Position () { return Position; },
	get Range () { return Range; },
	get Location () { return Location; },
	get LocationLink () { return LocationLink; },
	get Color () { return Color; },
	get ColorInformation () { return ColorInformation; },
	get ColorPresentation () { return ColorPresentation; },
	get FoldingRangeKind () { return FoldingRangeKind; },
	get FoldingRange () { return FoldingRange; },
	get DiagnosticRelatedInformation () { return DiagnosticRelatedInformation; },
	get DiagnosticSeverity () { return DiagnosticSeverity; },
	get DiagnosticTag () { return DiagnosticTag; },
	get CodeDescription () { return CodeDescription; },
	get Diagnostic () { return Diagnostic; },
	get Command () { return Command; },
	get TextEdit () { return TextEdit; },
	get ChangeAnnotation () { return ChangeAnnotation; },
	get ChangeAnnotationIdentifier () { return ChangeAnnotationIdentifier; },
	get AnnotatedTextEdit () { return AnnotatedTextEdit; },
	get TextDocumentEdit () { return TextDocumentEdit; },
	get CreateFile () { return CreateFile; },
	get RenameFile () { return RenameFile; },
	get DeleteFile () { return DeleteFile; },
	get WorkspaceEdit () { return WorkspaceEdit; },
	WorkspaceChange: WorkspaceChange,
	get TextDocumentIdentifier () { return TextDocumentIdentifier; },
	get VersionedTextDocumentIdentifier () { return VersionedTextDocumentIdentifier; },
	get OptionalVersionedTextDocumentIdentifier () { return OptionalVersionedTextDocumentIdentifier; },
	get TextDocumentItem () { return TextDocumentItem; },
	get MarkupKind () { return MarkupKind; },
	get MarkupContent () { return MarkupContent; },
	get CompletionItemKind () { return CompletionItemKind; },
	get InsertTextFormat () { return InsertTextFormat; },
	get CompletionItemTag () { return CompletionItemTag; },
	get InsertReplaceEdit () { return InsertReplaceEdit; },
	get InsertTextMode () { return InsertTextMode; },
	get CompletionItemLabelDetails () { return CompletionItemLabelDetails; },
	get CompletionItem () { return CompletionItem; },
	get CompletionList () { return CompletionList; },
	get MarkedString () { return MarkedString; },
	get Hover () { return Hover; },
	get ParameterInformation () { return ParameterInformation; },
	get SignatureInformation () { return SignatureInformation; },
	get DocumentHighlightKind () { return DocumentHighlightKind; },
	get DocumentHighlight () { return DocumentHighlight; },
	get SymbolKind () { return SymbolKind; },
	get SymbolTag () { return SymbolTag; },
	get SymbolInformation () { return SymbolInformation; },
	get WorkspaceSymbol () { return WorkspaceSymbol; },
	get DocumentSymbol () { return DocumentSymbol; },
	get CodeActionKind () { return CodeActionKind; },
	get CodeActionTriggerKind () { return CodeActionTriggerKind; },
	get CodeActionContext () { return CodeActionContext; },
	get CodeAction () { return CodeAction; },
	get CodeLens () { return CodeLens; },
	get FormattingOptions () { return FormattingOptions; },
	get DocumentLink () { return DocumentLink; },
	get SelectionRange () { return SelectionRange; },
	get SemanticTokenTypes () { return SemanticTokenTypes; },
	get SemanticTokenModifiers () { return SemanticTokenModifiers; },
	get SemanticTokens () { return SemanticTokens; },
	get InlineValueText () { return InlineValueText; },
	get InlineValueVariableLookup () { return InlineValueVariableLookup; },
	get InlineValueEvaluatableExpression () { return InlineValueEvaluatableExpression; },
	get InlineValueContext () { return InlineValueContext; },
	get InlayHintKind () { return InlayHintKind; },
	get InlayHintLabelPart () { return InlayHintLabelPart; },
	get InlayHint () { return InlayHint; },
	get WorkspaceFolder () { return WorkspaceFolder; },
	EOL: EOL,
	get TextDocument () { return TextDocument; }
});

var require$$1 = /*@__PURE__*/getAugmentedNamespace(main);

var messages = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.ProtocolNotificationType = exports.ProtocolNotificationType0 = exports.ProtocolRequestType = exports.ProtocolRequestType0 = exports.RegistrationType = exports.MessageDirection = void 0;
	const vscode_jsonrpc_1 = main$1;
	(function (MessageDirection) {
	    MessageDirection["clientToServer"] = "clientToServer";
	    MessageDirection["serverToClient"] = "serverToClient";
	    MessageDirection["both"] = "both";
	})(exports.MessageDirection || (exports.MessageDirection = {}));
	class RegistrationType {
	    constructor(method) {
	        this.method = method;
	    }
	}
	exports.RegistrationType = RegistrationType;
	class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {
	    constructor(method) {
	        super(method);
	    }
	}
	exports.ProtocolRequestType0 = ProtocolRequestType0;
	class ProtocolRequestType extends vscode_jsonrpc_1.RequestType {
	    constructor(method) {
	        super(method, vscode_jsonrpc_1.ParameterStructures.byName);
	    }
	}
	exports.ProtocolRequestType = ProtocolRequestType;
	class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {
	    constructor(method) {
	        super(method);
	    }
	}
	exports.ProtocolNotificationType0 = ProtocolNotificationType0;
	class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
	    constructor(method) {
	        super(method, vscode_jsonrpc_1.ParameterStructures.byName);
	    }
	}
	exports.ProtocolNotificationType = ProtocolNotificationType;
} (messages));
getDefaultExportFromCjs(messages);

var protocol = {};

var is = {};

Object.defineProperty(is, "__esModule", { value: true });
is.objectLiteral = is.typedArray = is.stringArray = is.array = is.func = is.error = is.number = is.string = is.boolean = void 0;
function boolean(value) {
    return value === true || value === false;
}
is.boolean = boolean;
function string(value) {
    return typeof value === 'string' || value instanceof String;
}
is.string = string;
function number(value) {
    return typeof value === 'number' || value instanceof Number;
}
is.number = number;
function error(value) {
    return value instanceof Error;
}
is.error = error;
function func(value) {
    return typeof value === 'function';
}
is.func = func;
function array(value) {
    return Array.isArray(value);
}
is.array = array;
function stringArray(value) {
    return array(value) && value.every(elem => string(elem));
}
is.stringArray = stringArray;
function typedArray(value, check) {
    return Array.isArray(value) && value.every(check);
}
is.typedArray = typedArray;
function objectLiteral(value) {
    return value !== null && typeof value === 'object';
}
is.objectLiteral = objectLiteral;

var protocol_implementation = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.ImplementationRequest = void 0;
	const messages_1 = messages;
	(function (ImplementationRequest) {
	    ImplementationRequest.method = 'textDocument/implementation';
	    ImplementationRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
	})(exports.ImplementationRequest || (exports.ImplementationRequest = {}));
} (protocol_implementation));
getDefaultExportFromCjs(protocol_implementation);

var protocol_typeDefinition = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.TypeDefinitionRequest = void 0;
	const messages_1 = messages;
	(function (TypeDefinitionRequest) {
	    TypeDefinitionRequest.method = 'textDocument/typeDefinition';
	    TypeDefinitionRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
	})(exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
} (protocol_typeDefinition));
getDefaultExportFromCjs(protocol_typeDefinition);

var protocol_workspaceFolder = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = void 0;
	const messages_1 = messages;
	(function (WorkspaceFoldersRequest) {
	    WorkspaceFoldersRequest.method = 'workspace/workspaceFolders';
	    WorkspaceFoldersRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0(WorkspaceFoldersRequest.method);
	})(exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
	(function (DidChangeWorkspaceFoldersNotification) {
	    DidChangeWorkspaceFoldersNotification.method = 'workspace/didChangeWorkspaceFolders';
	    DidChangeWorkspaceFoldersNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType(DidChangeWorkspaceFoldersNotification.method);
	})(exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
} (protocol_workspaceFolder));
getDefaultExportFromCjs(protocol_workspaceFolder);

var protocol_configuration = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.ConfigurationRequest = void 0;
	const messages_1 = messages;
	(function (ConfigurationRequest) {
	    ConfigurationRequest.method = 'workspace/configuration';
	    ConfigurationRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    ConfigurationRequest.type = new messages_1.ProtocolRequestType(ConfigurationRequest.method);
	})(exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
} (protocol_configuration));
getDefaultExportFromCjs(protocol_configuration);

var protocol_colorProvider = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.ColorPresentationRequest = exports.DocumentColorRequest = void 0;
	const messages_1 = messages;
	(function (DocumentColorRequest) {
	    DocumentColorRequest.method = 'textDocument/documentColor';
	    DocumentColorRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
	})(exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
	(function (ColorPresentationRequest) {
	    ColorPresentationRequest.method = 'textDocument/colorPresentation';
	    ColorPresentationRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    ColorPresentationRequest.type = new messages_1.ProtocolRequestType(ColorPresentationRequest.method);
	})(exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
} (protocol_colorProvider));
getDefaultExportFromCjs(protocol_colorProvider);

var protocol_foldingRange = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.FoldingRangeRequest = void 0;
	const messages_1 = messages;
	(function (FoldingRangeRequest) {
	    FoldingRangeRequest.method = 'textDocument/foldingRange';
	    FoldingRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
	})(exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
} (protocol_foldingRange));
getDefaultExportFromCjs(protocol_foldingRange);

var protocol_declaration = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.DeclarationRequest = void 0;
	const messages_1 = messages;
	(function (DeclarationRequest) {
	    DeclarationRequest.method = 'textDocument/declaration';
	    DeclarationRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
	})(exports.DeclarationRequest || (exports.DeclarationRequest = {}));
} (protocol_declaration));
getDefaultExportFromCjs(protocol_declaration);

var protocol_selectionRange = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.SelectionRangeRequest = void 0;
	const messages_1 = messages;
	(function (SelectionRangeRequest) {
	    SelectionRangeRequest.method = 'textDocument/selectionRange';
	    SelectionRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
	})(exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
} (protocol_selectionRange));
getDefaultExportFromCjs(protocol_selectionRange);

var protocol_progress = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = void 0;
	const vscode_jsonrpc_1 = main$1;
	const messages_1 = messages;
	(function (WorkDoneProgress) {
	    WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
	    function is(value) {
	        return value === WorkDoneProgress.type;
	    }
	    WorkDoneProgress.is = is;
	})(exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
	(function (WorkDoneProgressCreateRequest) {
	    WorkDoneProgressCreateRequest.method = 'window/workDoneProgress/create';
	    WorkDoneProgressCreateRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType(WorkDoneProgressCreateRequest.method);
	})(exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
	(function (WorkDoneProgressCancelNotification) {
	    WorkDoneProgressCancelNotification.method = 'window/workDoneProgress/cancel';
	    WorkDoneProgressCancelNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType(WorkDoneProgressCancelNotification.method);
	})(exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
} (protocol_progress));
getDefaultExportFromCjs(protocol_progress);

var protocol_callHierarchy = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.CallHierarchyPrepareRequest = void 0;
	const messages_1 = messages;
	(function (CallHierarchyPrepareRequest) {
	    CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
	    CallHierarchyPrepareRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
	})(exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
	(function (CallHierarchyIncomingCallsRequest) {
	    CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
	    CallHierarchyIncomingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
	})(exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
	(function (CallHierarchyOutgoingCallsRequest) {
	    CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
	    CallHierarchyOutgoingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
	})(exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
} (protocol_callHierarchy));
getDefaultExportFromCjs(protocol_callHierarchy);

var protocol_semanticTokens = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat = void 0;
	const messages_1 = messages;
	(function (TokenFormat) {
	    TokenFormat.Relative = 'relative';
	})(exports.TokenFormat || (exports.TokenFormat = {}));
	var SemanticTokensRegistrationType;
	(function (SemanticTokensRegistrationType) {
	    SemanticTokensRegistrationType.method = 'textDocument/semanticTokens';
	    SemanticTokensRegistrationType.type = new messages_1.RegistrationType(SemanticTokensRegistrationType.method);
	})(SemanticTokensRegistrationType = exports.SemanticTokensRegistrationType || (exports.SemanticTokensRegistrationType = {}));
	(function (SemanticTokensRequest) {
	    SemanticTokensRequest.method = 'textDocument/semanticTokens/full';
	    SemanticTokensRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
	    SemanticTokensRequest.registrationMethod = SemanticTokensRegistrationType.method;
	})(exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
	(function (SemanticTokensDeltaRequest) {
	    SemanticTokensDeltaRequest.method = 'textDocument/semanticTokens/full/delta';
	    SemanticTokensDeltaRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    SemanticTokensDeltaRequest.type = new messages_1.ProtocolRequestType(SemanticTokensDeltaRequest.method);
	    SemanticTokensDeltaRequest.registrationMethod = SemanticTokensRegistrationType.method;
	})(exports.SemanticTokensDeltaRequest || (exports.SemanticTokensDeltaRequest = {}));
	(function (SemanticTokensRangeRequest) {
	    SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
	    SemanticTokensRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
	    SemanticTokensRangeRequest.registrationMethod = SemanticTokensRegistrationType.method;
	})(exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
	(function (SemanticTokensRefreshRequest) {
	    SemanticTokensRefreshRequest.method = `workspace/semanticTokens/refresh`;
	    SemanticTokensRefreshRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    SemanticTokensRefreshRequest.type = new messages_1.ProtocolRequestType0(SemanticTokensRefreshRequest.method);
	})(exports.SemanticTokensRefreshRequest || (exports.SemanticTokensRefreshRequest = {}));
} (protocol_semanticTokens));
getDefaultExportFromCjs(protocol_semanticTokens);

var protocol_showDocument = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.ShowDocumentRequest = void 0;
	const messages_1 = messages;
	(function (ShowDocumentRequest) {
	    ShowDocumentRequest.method = 'window/showDocument';
	    ShowDocumentRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    ShowDocumentRequest.type = new messages_1.ProtocolRequestType(ShowDocumentRequest.method);
	})(exports.ShowDocumentRequest || (exports.ShowDocumentRequest = {}));
} (protocol_showDocument));
getDefaultExportFromCjs(protocol_showDocument);

var protocol_linkedEditingRange = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.LinkedEditingRangeRequest = void 0;
	const messages_1 = messages;
	(function (LinkedEditingRangeRequest) {
	    LinkedEditingRangeRequest.method = 'textDocument/linkedEditingRange';
	    LinkedEditingRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    LinkedEditingRangeRequest.type = new messages_1.ProtocolRequestType(LinkedEditingRangeRequest.method);
	})(exports.LinkedEditingRangeRequest || (exports.LinkedEditingRangeRequest = {}));
} (protocol_linkedEditingRange));
getDefaultExportFromCjs(protocol_linkedEditingRange);

var protocol_fileOperations = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.DidRenameFilesNotification = exports.WillRenameFilesRequest = exports.DidCreateFilesNotification = exports.WillCreateFilesRequest = exports.FileOperationPatternKind = void 0;
	const messages_1 = messages;
	(function (FileOperationPatternKind) {
	    FileOperationPatternKind.file = 'file';
	    FileOperationPatternKind.folder = 'folder';
	})(exports.FileOperationPatternKind || (exports.FileOperationPatternKind = {}));
	(function (WillCreateFilesRequest) {
	    WillCreateFilesRequest.method = 'workspace/willCreateFiles';
	    WillCreateFilesRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    WillCreateFilesRequest.type = new messages_1.ProtocolRequestType(WillCreateFilesRequest.method);
	})(exports.WillCreateFilesRequest || (exports.WillCreateFilesRequest = {}));
	(function (DidCreateFilesNotification) {
	    DidCreateFilesNotification.method = 'workspace/didCreateFiles';
	    DidCreateFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidCreateFilesNotification.type = new messages_1.ProtocolNotificationType(DidCreateFilesNotification.method);
	})(exports.DidCreateFilesNotification || (exports.DidCreateFilesNotification = {}));
	(function (WillRenameFilesRequest) {
	    WillRenameFilesRequest.method = 'workspace/willRenameFiles';
	    WillRenameFilesRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    WillRenameFilesRequest.type = new messages_1.ProtocolRequestType(WillRenameFilesRequest.method);
	})(exports.WillRenameFilesRequest || (exports.WillRenameFilesRequest = {}));
	(function (DidRenameFilesNotification) {
	    DidRenameFilesNotification.method = 'workspace/didRenameFiles';
	    DidRenameFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidRenameFilesNotification.type = new messages_1.ProtocolNotificationType(DidRenameFilesNotification.method);
	})(exports.DidRenameFilesNotification || (exports.DidRenameFilesNotification = {}));
	(function (DidDeleteFilesNotification) {
	    DidDeleteFilesNotification.method = 'workspace/didDeleteFiles';
	    DidDeleteFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidDeleteFilesNotification.type = new messages_1.ProtocolNotificationType(DidDeleteFilesNotification.method);
	})(exports.DidDeleteFilesNotification || (exports.DidDeleteFilesNotification = {}));
	(function (WillDeleteFilesRequest) {
	    WillDeleteFilesRequest.method = 'workspace/willDeleteFiles';
	    WillDeleteFilesRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    WillDeleteFilesRequest.type = new messages_1.ProtocolRequestType(WillDeleteFilesRequest.method);
	})(exports.WillDeleteFilesRequest || (exports.WillDeleteFilesRequest = {}));
} (protocol_fileOperations));
getDefaultExportFromCjs(protocol_fileOperations);

var protocol_moniker = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = void 0;
	const messages_1 = messages;
	(function (UniquenessLevel) {
	    UniquenessLevel.document = 'document';
	    UniquenessLevel.project = 'project';
	    UniquenessLevel.group = 'group';
	    UniquenessLevel.scheme = 'scheme';
	    UniquenessLevel.global = 'global';
	})(exports.UniquenessLevel || (exports.UniquenessLevel = {}));
	(function (MonikerKind) {
	    MonikerKind.$import = 'import';
	    MonikerKind.$export = 'export';
	    MonikerKind.local = 'local';
	})(exports.MonikerKind || (exports.MonikerKind = {}));
	(function (MonikerRequest) {
	    MonikerRequest.method = 'textDocument/moniker';
	    MonikerRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    MonikerRequest.type = new messages_1.ProtocolRequestType(MonikerRequest.method);
	})(exports.MonikerRequest || (exports.MonikerRequest = {}));
} (protocol_moniker));
getDefaultExportFromCjs(protocol_moniker);

var protocol_typeHierarchy = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.TypeHierarchySubtypesRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchyPrepareRequest = void 0;
	const messages_1 = messages;
	(function (TypeHierarchyPrepareRequest) {
	    TypeHierarchyPrepareRequest.method = 'textDocument/prepareTypeHierarchy';
	    TypeHierarchyPrepareRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    TypeHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(TypeHierarchyPrepareRequest.method);
	})(exports.TypeHierarchyPrepareRequest || (exports.TypeHierarchyPrepareRequest = {}));
	(function (TypeHierarchySupertypesRequest) {
	    TypeHierarchySupertypesRequest.method = 'typeHierarchy/supertypes';
	    TypeHierarchySupertypesRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    TypeHierarchySupertypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySupertypesRequest.method);
	})(exports.TypeHierarchySupertypesRequest || (exports.TypeHierarchySupertypesRequest = {}));
	(function (TypeHierarchySubtypesRequest) {
	    TypeHierarchySubtypesRequest.method = 'typeHierarchy/subtypes';
	    TypeHierarchySubtypesRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    TypeHierarchySubtypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySubtypesRequest.method);
	})(exports.TypeHierarchySubtypesRequest || (exports.TypeHierarchySubtypesRequest = {}));
} (protocol_typeHierarchy));
getDefaultExportFromCjs(protocol_typeHierarchy);

var protocol_inlineValue = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.InlineValueRefreshRequest = exports.InlineValueRequest = void 0;
	const messages_1 = messages;
	(function (InlineValueRequest) {
	    InlineValueRequest.method = 'textDocument/inlineValue';
	    InlineValueRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    InlineValueRequest.type = new messages_1.ProtocolRequestType(InlineValueRequest.method);
	})(exports.InlineValueRequest || (exports.InlineValueRequest = {}));
	(function (InlineValueRefreshRequest) {
	    InlineValueRefreshRequest.method = `workspace/inlineValue/refresh`;
	    InlineValueRefreshRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    InlineValueRefreshRequest.type = new messages_1.ProtocolRequestType0(InlineValueRefreshRequest.method);
	})(exports.InlineValueRefreshRequest || (exports.InlineValueRefreshRequest = {}));
} (protocol_inlineValue));
getDefaultExportFromCjs(protocol_inlineValue);

var protocol_inlayHint = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = void 0;
	const messages_1 = messages;
	(function (InlayHintRequest) {
	    InlayHintRequest.method = 'textDocument/inlayHint';
	    InlayHintRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    InlayHintRequest.type = new messages_1.ProtocolRequestType(InlayHintRequest.method);
	})(exports.InlayHintRequest || (exports.InlayHintRequest = {}));
	(function (InlayHintResolveRequest) {
	    InlayHintResolveRequest.method = 'inlayHint/resolve';
	    InlayHintResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    InlayHintResolveRequest.type = new messages_1.ProtocolRequestType(InlayHintResolveRequest.method);
	})(exports.InlayHintResolveRequest || (exports.InlayHintResolveRequest = {}));
	(function (InlayHintRefreshRequest) {
	    InlayHintRefreshRequest.method = `workspace/inlayHint/refresh`;
	    InlayHintRefreshRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    InlayHintRefreshRequest.type = new messages_1.ProtocolRequestType0(InlayHintRefreshRequest.method);
	})(exports.InlayHintRefreshRequest || (exports.InlayHintRefreshRequest = {}));
} (protocol_inlayHint));
getDefaultExportFromCjs(protocol_inlayHint);

var protocol_diagnostic = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = void 0;
	const vscode_jsonrpc_1 = main$1;
	const Is = is;
	const messages_1 = messages;
	(function (DiagnosticServerCancellationData) {
	    function is(value) {
	        const candidate = value;
	        return candidate && Is.boolean(candidate.retriggerRequest);
	    }
	    DiagnosticServerCancellationData.is = is;
	})(exports.DiagnosticServerCancellationData || (exports.DiagnosticServerCancellationData = {}));
	(function (DocumentDiagnosticReportKind) {
	    DocumentDiagnosticReportKind.Full = 'full';
	    DocumentDiagnosticReportKind.Unchanged = 'unchanged';
	})(exports.DocumentDiagnosticReportKind || (exports.DocumentDiagnosticReportKind = {}));
	(function (DocumentDiagnosticRequest) {
	    DocumentDiagnosticRequest.method = 'textDocument/diagnostic';
	    DocumentDiagnosticRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentDiagnosticRequest.type = new messages_1.ProtocolRequestType(DocumentDiagnosticRequest.method);
	    DocumentDiagnosticRequest.partialResult = new vscode_jsonrpc_1.ProgressType();
	})(exports.DocumentDiagnosticRequest || (exports.DocumentDiagnosticRequest = {}));
	(function (WorkspaceDiagnosticRequest) {
	    WorkspaceDiagnosticRequest.method = 'workspace/diagnostic';
	    WorkspaceDiagnosticRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    WorkspaceDiagnosticRequest.type = new messages_1.ProtocolRequestType(WorkspaceDiagnosticRequest.method);
	    WorkspaceDiagnosticRequest.partialResult = new vscode_jsonrpc_1.ProgressType();
	})(exports.WorkspaceDiagnosticRequest || (exports.WorkspaceDiagnosticRequest = {}));
	(function (DiagnosticRefreshRequest) {
	    DiagnosticRefreshRequest.method = `workspace/diagnostic/refresh`;
	    DiagnosticRefreshRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DiagnosticRefreshRequest.type = new messages_1.ProtocolRequestType0(DiagnosticRefreshRequest.method);
	})(exports.DiagnosticRefreshRequest || (exports.DiagnosticRefreshRequest = {}));
} (protocol_diagnostic));
getDefaultExportFromCjs(protocol_diagnostic);

var protocol_notebook = {};

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = void 0;
	const vscode_languageserver_types_1 = require$$1;
	const Is = is;
	const messages_1 = messages;
	var NotebookCellKind;
	(function (NotebookCellKind) {
	    NotebookCellKind.Markup = 1;
	    NotebookCellKind.Code = 2;
	    function is(value) {
	        return value === 1 || value === 2;
	    }
	    NotebookCellKind.is = is;
	})(NotebookCellKind = exports.NotebookCellKind || (exports.NotebookCellKind = {}));
	var ExecutionSummary;
	(function (ExecutionSummary) {
	    function create(executionOrder, success) {
	        const result = { executionOrder };
	        if (success === true || success === false) {
	            result.success = success;
	        }
	        return result;
	    }
	    ExecutionSummary.create = create;
	    function is(value) {
	        const candidate = value;
	        return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.executionOrder) && (candidate.success === undefined || Is.boolean(candidate.success));
	    }
	    ExecutionSummary.is = is;
	    function equals(one, other) {
	        if (one === other) {
	            return true;
	        }
	        if (one === null || one === undefined || other === null || other === undefined) {
	            return false;
	        }
	        return one.executionOrder === other.executionOrder && one.success === other.success;
	    }
	    ExecutionSummary.equals = equals;
	})(ExecutionSummary = exports.ExecutionSummary || (exports.ExecutionSummary = {}));
	var NotebookCell;
	(function (NotebookCell) {
	    function create(kind, document) {
	        return { kind, document };
	    }
	    NotebookCell.create = create;
	    function is(value) {
	        const candidate = value;
	        return Is.objectLiteral(candidate) && NotebookCellKind.is(candidate.kind) && vscode_languageserver_types_1.DocumentUri.is(candidate.document) &&
	            (candidate.metadata === undefined || Is.objectLiteral(candidate.metadata));
	    }
	    NotebookCell.is = is;
	    function diff(one, two) {
	        const result = new Set();
	        if (one.document !== two.document) {
	            result.add('document');
	        }
	        if (one.kind !== two.kind) {
	            result.add('kind');
	        }
	        if (one.executionSummary !== two.executionSummary) {
	            result.add('executionSummary');
	        }
	        if ((one.metadata !== undefined || two.metadata !== undefined) && !equalsMetadata(one.metadata, two.metadata)) {
	            result.add('metadata');
	        }
	        if ((one.executionSummary !== undefined || two.executionSummary !== undefined) && !ExecutionSummary.equals(one.executionSummary, two.executionSummary)) {
	            result.add('executionSummary');
	        }
	        return result;
	    }
	    NotebookCell.diff = diff;
	    function equalsMetadata(one, other) {
	        if (one === other) {
	            return true;
	        }
	        if (one === null || one === undefined || other === null || other === undefined) {
	            return false;
	        }
	        if (typeof one !== typeof other) {
	            return false;
	        }
	        if (typeof one !== 'object') {
	            return false;
	        }
	        const oneArray = Array.isArray(one);
	        const otherArray = Array.isArray(other);
	        if (oneArray !== otherArray) {
	            return false;
	        }
	        if (oneArray && otherArray) {
	            if (one.length !== other.length) {
	                return false;
	            }
	            for (let i = 0; i < one.length; i++) {
	                if (!equalsMetadata(one[i], other[i])) {
	                    return false;
	                }
	            }
	        }
	        if (Is.objectLiteral(one) && Is.objectLiteral(other)) {
	            const oneKeys = Object.keys(one);
	            const otherKeys = Object.keys(other);
	            if (oneKeys.length !== otherKeys.length) {
	                return false;
	            }
	            oneKeys.sort();
	            otherKeys.sort();
	            if (!equalsMetadata(oneKeys, otherKeys)) {
	                return false;
	            }
	            for (let i = 0; i < oneKeys.length; i++) {
	                const prop = oneKeys[i];
	                if (!equalsMetadata(one[prop], other[prop])) {
	                    return false;
	                }
	            }
	        }
	        return true;
	    }
	})(NotebookCell = exports.NotebookCell || (exports.NotebookCell = {}));
	(function (NotebookDocument) {
	    function create(uri, notebookType, version, cells) {
	        return { uri, notebookType, version, cells };
	    }
	    NotebookDocument.create = create;
	    function is(value) {
	        const candidate = value;
	        return Is.objectLiteral(candidate) && Is.string(candidate.uri) && vscode_languageserver_types_1.integer.is(candidate.version) && Is.typedArray(candidate.cells, NotebookCell.is);
	    }
	    NotebookDocument.is = is;
	})(exports.NotebookDocument || (exports.NotebookDocument = {}));
	var NotebookDocumentSyncRegistrationType;
	(function (NotebookDocumentSyncRegistrationType) {
	    NotebookDocumentSyncRegistrationType.method = 'notebookDocument/sync';
	    NotebookDocumentSyncRegistrationType.messageDirection = messages_1.MessageDirection.clientToServer;
	    NotebookDocumentSyncRegistrationType.type = new messages_1.RegistrationType(NotebookDocumentSyncRegistrationType.method);
	})(NotebookDocumentSyncRegistrationType = exports.NotebookDocumentSyncRegistrationType || (exports.NotebookDocumentSyncRegistrationType = {}));
	(function (DidOpenNotebookDocumentNotification) {
	    DidOpenNotebookDocumentNotification.method = 'notebookDocument/didOpen';
	    DidOpenNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidOpenNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenNotebookDocumentNotification.method);
	    DidOpenNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method;
	})(exports.DidOpenNotebookDocumentNotification || (exports.DidOpenNotebookDocumentNotification = {}));
	(function (NotebookCellArrayChange) {
	    function is(value) {
	        const candidate = value;
	        return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.start) && vscode_languageserver_types_1.uinteger.is(candidate.deleteCount) && (candidate.cells === undefined || Is.typedArray(candidate.cells, NotebookCell.is));
	    }
	    NotebookCellArrayChange.is = is;
	    function create(start, deleteCount, cells) {
	        const result = { start, deleteCount };
	        if (cells !== undefined) {
	            result.cells = cells;
	        }
	        return result;
	    }
	    NotebookCellArrayChange.create = create;
	})(exports.NotebookCellArrayChange || (exports.NotebookCellArrayChange = {}));
	(function (DidChangeNotebookDocumentNotification) {
	    DidChangeNotebookDocumentNotification.method = 'notebookDocument/didChange';
	    DidChangeNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidChangeNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeNotebookDocumentNotification.method);
	    DidChangeNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method;
	})(exports.DidChangeNotebookDocumentNotification || (exports.DidChangeNotebookDocumentNotification = {}));
	(function (DidSaveNotebookDocumentNotification) {
	    DidSaveNotebookDocumentNotification.method = 'notebookDocument/didSave';
	    DidSaveNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidSaveNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveNotebookDocumentNotification.method);
	    DidSaveNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method;
	})(exports.DidSaveNotebookDocumentNotification || (exports.DidSaveNotebookDocumentNotification = {}));
	(function (DidCloseNotebookDocumentNotification) {
	    DidCloseNotebookDocumentNotification.method = 'notebookDocument/didClose';
	    DidCloseNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidCloseNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseNotebookDocumentNotification.method);
	    DidCloseNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method;
	})(exports.DidCloseNotebookDocumentNotification || (exports.DidCloseNotebookDocumentNotification = {}));
} (protocol_notebook));
getDefaultExportFromCjs(protocol_notebook);

(function (exports) {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.RelativePattern = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeErrorCodes = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.PositionEncodingKind = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.NotebookCellTextDocumentFilter = exports.NotebookDocumentFilter = exports.TextDocumentFilter = void 0;
	exports.TypeHierarchySubtypesRequest = exports.TypeHierarchyPrepareRequest = exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = void 0;
	exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = void 0;
	const messages_1 = messages;
	const vscode_languageserver_types_1 = require$$1;
	const Is = is;
	const protocol_implementation_1 = protocol_implementation;
	Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } });
	const protocol_typeDefinition_1 = protocol_typeDefinition;
	Object.defineProperty(exports, "TypeDefinitionRequest", { enumerable: true, get: function () { return protocol_typeDefinition_1.TypeDefinitionRequest; } });
	const protocol_workspaceFolder_1 = protocol_workspaceFolder;
	Object.defineProperty(exports, "WorkspaceFoldersRequest", { enumerable: true, get: function () { return protocol_workspaceFolder_1.WorkspaceFoldersRequest; } });
	Object.defineProperty(exports, "DidChangeWorkspaceFoldersNotification", { enumerable: true, get: function () { return protocol_workspaceFolder_1.DidChangeWorkspaceFoldersNotification; } });
	const protocol_configuration_1 = protocol_configuration;
	Object.defineProperty(exports, "ConfigurationRequest", { enumerable: true, get: function () { return protocol_configuration_1.ConfigurationRequest; } });
	const protocol_colorProvider_1 = protocol_colorProvider;
	Object.defineProperty(exports, "DocumentColorRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.DocumentColorRequest; } });
	Object.defineProperty(exports, "ColorPresentationRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.ColorPresentationRequest; } });
	const protocol_foldingRange_1 = protocol_foldingRange;
	Object.defineProperty(exports, "FoldingRangeRequest", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRequest; } });
	const protocol_declaration_1 = protocol_declaration;
	Object.defineProperty(exports, "DeclarationRequest", { enumerable: true, get: function () { return protocol_declaration_1.DeclarationRequest; } });
	const protocol_selectionRange_1 = protocol_selectionRange;
	Object.defineProperty(exports, "SelectionRangeRequest", { enumerable: true, get: function () { return protocol_selectionRange_1.SelectionRangeRequest; } });
	const protocol_progress_1 = protocol_progress;
	Object.defineProperty(exports, "WorkDoneProgress", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgress; } });
	Object.defineProperty(exports, "WorkDoneProgressCreateRequest", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCreateRequest; } });
	Object.defineProperty(exports, "WorkDoneProgressCancelNotification", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCancelNotification; } });
	const protocol_callHierarchy_1 = protocol_callHierarchy;
	Object.defineProperty(exports, "CallHierarchyIncomingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest; } });
	Object.defineProperty(exports, "CallHierarchyOutgoingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } });
	Object.defineProperty(exports, "CallHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } });
	const protocol_semanticTokens_1 = protocol_semanticTokens;
	Object.defineProperty(exports, "TokenFormat", { enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } });
	Object.defineProperty(exports, "SemanticTokensRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } });
	Object.defineProperty(exports, "SemanticTokensDeltaRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } });
	Object.defineProperty(exports, "SemanticTokensRangeRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRangeRequest; } });
	Object.defineProperty(exports, "SemanticTokensRefreshRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRefreshRequest; } });
	Object.defineProperty(exports, "SemanticTokensRegistrationType", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRegistrationType; } });
	const protocol_showDocument_1 = protocol_showDocument;
	Object.defineProperty(exports, "ShowDocumentRequest", { enumerable: true, get: function () { return protocol_showDocument_1.ShowDocumentRequest; } });
	const protocol_linkedEditingRange_1 = protocol_linkedEditingRange;
	Object.defineProperty(exports, "LinkedEditingRangeRequest", { enumerable: true, get: function () { return protocol_linkedEditingRange_1.LinkedEditingRangeRequest; } });
	const protocol_fileOperations_1 = protocol_fileOperations;
	Object.defineProperty(exports, "FileOperationPatternKind", { enumerable: true, get: function () { return protocol_fileOperations_1.FileOperationPatternKind; } });
	Object.defineProperty(exports, "DidCreateFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidCreateFilesNotification; } });
	Object.defineProperty(exports, "WillCreateFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillCreateFilesRequest; } });
	Object.defineProperty(exports, "DidRenameFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidRenameFilesNotification; } });
	Object.defineProperty(exports, "WillRenameFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillRenameFilesRequest; } });
	Object.defineProperty(exports, "DidDeleteFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidDeleteFilesNotification; } });
	Object.defineProperty(exports, "WillDeleteFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillDeleteFilesRequest; } });
	const protocol_moniker_1 = protocol_moniker;
	Object.defineProperty(exports, "UniquenessLevel", { enumerable: true, get: function () { return protocol_moniker_1.UniquenessLevel; } });
	Object.defineProperty(exports, "MonikerKind", { enumerable: true, get: function () { return protocol_moniker_1.MonikerKind; } });
	Object.defineProperty(exports, "MonikerRequest", { enumerable: true, get: function () { return protocol_moniker_1.MonikerRequest; } });
	const protocol_typeHierarchy_1 = protocol_typeHierarchy;
	Object.defineProperty(exports, "TypeHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchyPrepareRequest; } });
	Object.defineProperty(exports, "TypeHierarchySubtypesRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySubtypesRequest; } });
	Object.defineProperty(exports, "TypeHierarchySupertypesRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySupertypesRequest; } });
	const protocol_inlineValue_1 = protocol_inlineValue;
	Object.defineProperty(exports, "InlineValueRequest", { enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRequest; } });
	Object.defineProperty(exports, "InlineValueRefreshRequest", { enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRefreshRequest; } });
	const protocol_inlayHint_1 = protocol_inlayHint;
	Object.defineProperty(exports, "InlayHintRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRequest; } });
	Object.defineProperty(exports, "InlayHintResolveRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintResolveRequest; } });
	Object.defineProperty(exports, "InlayHintRefreshRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRefreshRequest; } });
	const protocol_diagnostic_1 = protocol_diagnostic;
	Object.defineProperty(exports, "DiagnosticServerCancellationData", { enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticServerCancellationData; } });
	Object.defineProperty(exports, "DocumentDiagnosticReportKind", { enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticReportKind; } });
	Object.defineProperty(exports, "DocumentDiagnosticRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticRequest; } });
	Object.defineProperty(exports, "WorkspaceDiagnosticRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.WorkspaceDiagnosticRequest; } });
	Object.defineProperty(exports, "DiagnosticRefreshRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticRefreshRequest; } });
	const protocol_notebook_1 = protocol_notebook;
	Object.defineProperty(exports, "NotebookCellKind", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCellKind; } });
	Object.defineProperty(exports, "ExecutionSummary", { enumerable: true, get: function () { return protocol_notebook_1.ExecutionSummary; } });
	Object.defineProperty(exports, "NotebookCell", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCell; } });
	Object.defineProperty(exports, "NotebookDocument", { enumerable: true, get: function () { return protocol_notebook_1.NotebookDocument; } });
	Object.defineProperty(exports, "NotebookDocumentSyncRegistrationType", { enumerable: true, get: function () { return protocol_notebook_1.NotebookDocumentSyncRegistrationType; } });
	Object.defineProperty(exports, "DidOpenNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidOpenNotebookDocumentNotification; } });
	Object.defineProperty(exports, "NotebookCellArrayChange", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCellArrayChange; } });
	Object.defineProperty(exports, "DidChangeNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidChangeNotebookDocumentNotification; } });
	Object.defineProperty(exports, "DidSaveNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidSaveNotebookDocumentNotification; } });
	Object.defineProperty(exports, "DidCloseNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidCloseNotebookDocumentNotification; } });
	var TextDocumentFilter;
	(function (TextDocumentFilter) {
	    function is(value) {
	        const candidate = value;
	        return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
	    }
	    TextDocumentFilter.is = is;
	})(TextDocumentFilter = exports.TextDocumentFilter || (exports.TextDocumentFilter = {}));
	var NotebookDocumentFilter;
	(function (NotebookDocumentFilter) {
	    function is(value) {
	        const candidate = value;
	        return Is.objectLiteral(candidate) && (Is.string(candidate.notebookType) || Is.string(candidate.scheme) || Is.string(candidate.pattern));
	    }
	    NotebookDocumentFilter.is = is;
	})(NotebookDocumentFilter = exports.NotebookDocumentFilter || (exports.NotebookDocumentFilter = {}));
	var NotebookCellTextDocumentFilter;
	(function (NotebookCellTextDocumentFilter) {
	    function is(value) {
	        const candidate = value;
	        return Is.objectLiteral(candidate)
	            && (Is.string(candidate.notebook) || NotebookDocumentFilter.is(candidate.notebook))
	            && (candidate.language === undefined || Is.string(candidate.language));
	    }
	    NotebookCellTextDocumentFilter.is = is;
	})(NotebookCellTextDocumentFilter = exports.NotebookCellTextDocumentFilter || (exports.NotebookCellTextDocumentFilter = {}));
	var DocumentSelector;
	(function (DocumentSelector) {
	    function is(value) {
	        if (!Array.isArray(value)) {
	            return false;
	        }
	        for (let elem of value) {
	            if (!Is.string(elem) && !TextDocumentFilter.is(elem) && !NotebookCellTextDocumentFilter.is(elem)) {
	                return false;
	            }
	        }
	        return true;
	    }
	    DocumentSelector.is = is;
	})(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
	(function (RegistrationRequest) {
	    RegistrationRequest.method = 'client/registerCapability';
	    RegistrationRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    RegistrationRequest.type = new messages_1.ProtocolRequestType(RegistrationRequest.method);
	})(exports.RegistrationRequest || (exports.RegistrationRequest = {}));
	(function (UnregistrationRequest) {
	    UnregistrationRequest.method = 'client/unregisterCapability';
	    UnregistrationRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    UnregistrationRequest.type = new messages_1.ProtocolRequestType(UnregistrationRequest.method);
	})(exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
	(function (ResourceOperationKind) {
	    ResourceOperationKind.Create = 'create';
	    ResourceOperationKind.Rename = 'rename';
	    ResourceOperationKind.Delete = 'delete';
	})(exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
	(function (FailureHandlingKind) {
	    FailureHandlingKind.Abort = 'abort';
	    FailureHandlingKind.Transactional = 'transactional';
	    FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
	    FailureHandlingKind.Undo = 'undo';
	})(exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
	(function (PositionEncodingKind) {
	    PositionEncodingKind.UTF8 = 'utf-8';
	    PositionEncodingKind.UTF16 = 'utf-16';
	    PositionEncodingKind.UTF32 = 'utf-32';
	})(exports.PositionEncodingKind || (exports.PositionEncodingKind = {}));
	(function (StaticRegistrationOptions) {
	    function hasId(value) {
	        const candidate = value;
	        return candidate && Is.string(candidate.id) && candidate.id.length > 0;
	    }
	    StaticRegistrationOptions.hasId = hasId;
	})(exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
	(function (TextDocumentRegistrationOptions) {
	    function is(value) {
	        const candidate = value;
	        return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
	    }
	    TextDocumentRegistrationOptions.is = is;
	})(exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
	(function (WorkDoneProgressOptions) {
	    function is(value) {
	        const candidate = value;
	        return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
	    }
	    WorkDoneProgressOptions.is = is;
	    function hasWorkDoneProgress(value) {
	        const candidate = value;
	        return candidate && Is.boolean(candidate.workDoneProgress);
	    }
	    WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
	})(exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
	(function (InitializeRequest) {
	    InitializeRequest.method = 'initialize';
	    InitializeRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    InitializeRequest.type = new messages_1.ProtocolRequestType(InitializeRequest.method);
	})(exports.InitializeRequest || (exports.InitializeRequest = {}));
	(function (InitializeErrorCodes) {
	    InitializeErrorCodes.unknownProtocolVersion = 1;
	})(exports.InitializeErrorCodes || (exports.InitializeErrorCodes = {}));
	(function (InitializedNotification) {
	    InitializedNotification.method = 'initialized';
	    InitializedNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    InitializedNotification.type = new messages_1.ProtocolNotificationType(InitializedNotification.method);
	})(exports.InitializedNotification || (exports.InitializedNotification = {}));
	(function (ShutdownRequest) {
	    ShutdownRequest.method = 'shutdown';
	    ShutdownRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    ShutdownRequest.type = new messages_1.ProtocolRequestType0(ShutdownRequest.method);
	})(exports.ShutdownRequest || (exports.ShutdownRequest = {}));
	(function (ExitNotification) {
	    ExitNotification.method = 'exit';
	    ExitNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    ExitNotification.type = new messages_1.ProtocolNotificationType0(ExitNotification.method);
	})(exports.ExitNotification || (exports.ExitNotification = {}));
	(function (DidChangeConfigurationNotification) {
	    DidChangeConfigurationNotification.method = 'workspace/didChangeConfiguration';
	    DidChangeConfigurationNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType(DidChangeConfigurationNotification.method);
	})(exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
	(function (MessageType) {
	    MessageType.Error = 1;
	    MessageType.Warning = 2;
	    MessageType.Info = 3;
	    MessageType.Log = 4;
	})(exports.MessageType || (exports.MessageType = {}));
	(function (ShowMessageNotification) {
	    ShowMessageNotification.method = 'window/showMessage';
	    ShowMessageNotification.messageDirection = messages_1.MessageDirection.serverToClient;
	    ShowMessageNotification.type = new messages_1.ProtocolNotificationType(ShowMessageNotification.method);
	})(exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
	(function (ShowMessageRequest) {
	    ShowMessageRequest.method = 'window/showMessageRequest';
	    ShowMessageRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    ShowMessageRequest.type = new messages_1.ProtocolRequestType(ShowMessageRequest.method);
	})(exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
	(function (LogMessageNotification) {
	    LogMessageNotification.method = 'window/logMessage';
	    LogMessageNotification.messageDirection = messages_1.MessageDirection.serverToClient;
	    LogMessageNotification.type = new messages_1.ProtocolNotificationType(LogMessageNotification.method);
	})(exports.LogMessageNotification || (exports.LogMessageNotification = {}));
	(function (TelemetryEventNotification) {
	    TelemetryEventNotification.method = 'telemetry/event';
	    TelemetryEventNotification.messageDirection = messages_1.MessageDirection.serverToClient;
	    TelemetryEventNotification.type = new messages_1.ProtocolNotificationType(TelemetryEventNotification.method);
	})(exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
	(function (TextDocumentSyncKind) {
	    TextDocumentSyncKind.None = 0;
	    TextDocumentSyncKind.Full = 1;
	    TextDocumentSyncKind.Incremental = 2;
	})(exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
	(function (DidOpenTextDocumentNotification) {
	    DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
	    DidOpenTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
	})(exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
	(function (TextDocumentContentChangeEvent) {
	    function isIncremental(event) {
	        let candidate = event;
	        return candidate !== undefined && candidate !== null &&
	            typeof candidate.text === 'string' && candidate.range !== undefined &&
	            (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
	    }
	    TextDocumentContentChangeEvent.isIncremental = isIncremental;
	    function isFull(event) {
	        let candidate = event;
	        return candidate !== undefined && candidate !== null &&
	            typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
	    }
	    TextDocumentContentChangeEvent.isFull = isFull;
	})(exports.TextDocumentContentChangeEvent || (exports.TextDocumentContentChangeEvent = {}));
	(function (DidChangeTextDocumentNotification) {
	    DidChangeTextDocumentNotification.method = 'textDocument/didChange';
	    DidChangeTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
	})(exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
	(function (DidCloseTextDocumentNotification) {
	    DidCloseTextDocumentNotification.method = 'textDocument/didClose';
	    DidCloseTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
	})(exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
	(function (DidSaveTextDocumentNotification) {
	    DidSaveTextDocumentNotification.method = 'textDocument/didSave';
	    DidSaveTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
	})(exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
	(function (TextDocumentSaveReason) {
	    TextDocumentSaveReason.Manual = 1;
	    TextDocumentSaveReason.AfterDelay = 2;
	    TextDocumentSaveReason.FocusOut = 3;
	})(exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
	(function (WillSaveTextDocumentNotification) {
	    WillSaveTextDocumentNotification.method = 'textDocument/willSave';
	    WillSaveTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
	})(exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
	(function (WillSaveTextDocumentWaitUntilRequest) {
	    WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
	    WillSaveTextDocumentWaitUntilRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
	})(exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
	(function (DidChangeWatchedFilesNotification) {
	    DidChangeWatchedFilesNotification.method = 'workspace/didChangeWatchedFiles';
	    DidChangeWatchedFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer;
	    DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType(DidChangeWatchedFilesNotification.method);
	})(exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
	(function (FileChangeType) {
	    FileChangeType.Created = 1;
	    FileChangeType.Changed = 2;
	    FileChangeType.Deleted = 3;
	})(exports.FileChangeType || (exports.FileChangeType = {}));
	(function (RelativePattern) {
	    function is(value) {
	        const candidate = value;
	        return Is.objectLiteral(candidate) && (vscode_languageserver_types_1.URI.is(candidate.baseUri) || vscode_languageserver_types_1.WorkspaceFolder.is(candidate.baseUri)) && Is.string(candidate.pattern);
	    }
	    RelativePattern.is = is;
	})(exports.RelativePattern || (exports.RelativePattern = {}));
	(function (WatchKind) {
	    WatchKind.Create = 1;
	    WatchKind.Change = 2;
	    WatchKind.Delete = 4;
	})(exports.WatchKind || (exports.WatchKind = {}));
	(function (PublishDiagnosticsNotification) {
	    PublishDiagnosticsNotification.method = 'textDocument/publishDiagnostics';
	    PublishDiagnosticsNotification.messageDirection = messages_1.MessageDirection.serverToClient;
	    PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType(PublishDiagnosticsNotification.method);
	})(exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
	(function (CompletionTriggerKind) {
	    CompletionTriggerKind.Invoked = 1;
	    CompletionTriggerKind.TriggerCharacter = 2;
	    CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
	})(exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
	(function (CompletionRequest) {
	    CompletionRequest.method = 'textDocument/completion';
	    CompletionRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
	})(exports.CompletionRequest || (exports.CompletionRequest = {}));
	(function (CompletionResolveRequest) {
	    CompletionResolveRequest.method = 'completionItem/resolve';
	    CompletionResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
	})(exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
	(function (HoverRequest) {
	    HoverRequest.method = 'textDocument/hover';
	    HoverRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
	})(exports.HoverRequest || (exports.HoverRequest = {}));
	(function (SignatureHelpTriggerKind) {
	    SignatureHelpTriggerKind.Invoked = 1;
	    SignatureHelpTriggerKind.TriggerCharacter = 2;
	    SignatureHelpTriggerKind.ContentChange = 3;
	})(exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
	(function (SignatureHelpRequest) {
	    SignatureHelpRequest.method = 'textDocument/signatureHelp';
	    SignatureHelpRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
	})(exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
	(function (DefinitionRequest) {
	    DefinitionRequest.method = 'textDocument/definition';
	    DefinitionRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
	})(exports.DefinitionRequest || (exports.DefinitionRequest = {}));
	(function (ReferencesRequest) {
	    ReferencesRequest.method = 'textDocument/references';
	    ReferencesRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
	})(exports.ReferencesRequest || (exports.ReferencesRequest = {}));
	(function (DocumentHighlightRequest) {
	    DocumentHighlightRequest.method = 'textDocument/documentHighlight';
	    DocumentHighlightRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
	})(exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
	(function (DocumentSymbolRequest) {
	    DocumentSymbolRequest.method = 'textDocument/documentSymbol';
	    DocumentSymbolRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
	})(exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
	(function (CodeActionRequest) {
	    CodeActionRequest.method = 'textDocument/codeAction';
	    CodeActionRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
	})(exports.CodeActionRequest || (exports.CodeActionRequest = {}));
	(function (CodeActionResolveRequest) {
	    CodeActionResolveRequest.method = 'codeAction/resolve';
	    CodeActionResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CodeActionResolveRequest.type = new messages_1.ProtocolRequestType(CodeActionResolveRequest.method);
	})(exports.CodeActionResolveRequest || (exports.CodeActionResolveRequest = {}));
	(function (WorkspaceSymbolRequest) {
	    WorkspaceSymbolRequest.method = 'workspace/symbol';
	    WorkspaceSymbolRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
	})(exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
	(function (WorkspaceSymbolResolveRequest) {
	    WorkspaceSymbolResolveRequest.method = 'workspaceSymbol/resolve';
	    WorkspaceSymbolResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    WorkspaceSymbolResolveRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolResolveRequest.method);
	})(exports.WorkspaceSymbolResolveRequest || (exports.WorkspaceSymbolResolveRequest = {}));
	(function (CodeLensRequest) {
	    CodeLensRequest.method = 'textDocument/codeLens';
	    CodeLensRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CodeLensRequest.type = new messages_1.ProtocolRequestType(CodeLensRequest.method);
	})(exports.CodeLensRequest || (exports.CodeLensRequest = {}));
	(function (CodeLensResolveRequest) {
	    CodeLensResolveRequest.method = 'codeLens/resolve';
	    CodeLensResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    CodeLensResolveRequest.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest.method);
	})(exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
	(function (CodeLensRefreshRequest) {
	    CodeLensRefreshRequest.method = `workspace/codeLens/refresh`;
	    CodeLensRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    CodeLensRefreshRequest.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest.method);
	})(exports.CodeLensRefreshRequest || (exports.CodeLensRefreshRequest = {}));
	(function (DocumentLinkRequest) {
	    DocumentLinkRequest.method = 'textDocument/documentLink';
	    DocumentLinkRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
	})(exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
	(function (DocumentLinkResolveRequest) {
	    DocumentLinkResolveRequest.method = 'documentLink/resolve';
	    DocumentLinkResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType(DocumentLinkResolveRequest.method);
	})(exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
	(function (DocumentFormattingRequest) {
	    DocumentFormattingRequest.method = 'textDocument/formatting';
	    DocumentFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
	})(exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
	(function (DocumentRangeFormattingRequest) {
	    DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
	    DocumentRangeFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
	})(exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
	(function (DocumentOnTypeFormattingRequest) {
	    DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
	    DocumentOnTypeFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
	})(exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
	(function (PrepareSupportDefaultBehavior) {
	    PrepareSupportDefaultBehavior.Identifier = 1;
	})(exports.PrepareSupportDefaultBehavior || (exports.PrepareSupportDefaultBehavior = {}));
	(function (RenameRequest) {
	    RenameRequest.method = 'textDocument/rename';
	    RenameRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
	})(exports.RenameRequest || (exports.RenameRequest = {}));
	(function (PrepareRenameRequest) {
	    PrepareRenameRequest.method = 'textDocument/prepareRename';
	    PrepareRenameRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
	})(exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
	(function (ExecuteCommandRequest) {
	    ExecuteCommandRequest.method = 'workspace/executeCommand';
	    ExecuteCommandRequest.messageDirection = messages_1.MessageDirection.clientToServer;
	    ExecuteCommandRequest.type = new messages_1.ProtocolRequestType(ExecuteCommandRequest.method);
	})(exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
	(function (ApplyWorkspaceEditRequest) {
	    ApplyWorkspaceEditRequest.method = 'workspace/applyEdit';
	    ApplyWorkspaceEditRequest.messageDirection = messages_1.MessageDirection.serverToClient;
	    ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
	})(exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
} (protocol));
getDefaultExportFromCjs(protocol);

var connection = {};

Object.defineProperty(connection, "__esModule", { value: true });
connection.createProtocolConnection = void 0;
const vscode_jsonrpc_1 = main$1;
function createProtocolConnection(input, output, logger, options) {
    if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {
        options = { connectionStrategy: options };
    }
    return (0, vscode_jsonrpc_1.createMessageConnection)(input, output, logger, options);
}
connection.createProtocolConnection = createProtocolConnection;

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.LSPErrorCodes = exports.createProtocolConnection = void 0;
	__exportStar(main$1, exports);
	__exportStar(require$$1, exports);
	__exportStar(messages, exports);
	__exportStar(protocol, exports);
	var connection_1 = connection;
	Object.defineProperty(exports, "createProtocolConnection", { enumerable: true, get: function () { return connection_1.createProtocolConnection; } });
	(function (LSPErrorCodes) {
	    LSPErrorCodes.lspReservedErrorRangeStart = -32899;
	    LSPErrorCodes.RequestFailed = -32803;
	    LSPErrorCodes.ServerCancelled = -32802;
	    LSPErrorCodes.ContentModified = -32801;
	    LSPErrorCodes.RequestCancelled = -32800;
	    LSPErrorCodes.lspReservedErrorRangeEnd = -32800;
	})(exports.LSPErrorCodes || (exports.LSPErrorCodes = {}));
} (api));
getDefaultExportFromCjs(api);

(function (exports) {
	var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    var desc = Object.getOwnPropertyDescriptor(m, k);
	    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
	      desc = { enumerable: true, get: function() { return m[k]; } };
	    }
	    Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
	    if (k2 === undefined) k2 = k;
	    o[k2] = m[k];
	}));
	var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
	    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.createProtocolConnection = void 0;
	const node_1 = node;
	__exportStar(node, exports);
	__exportStar(api, exports);
	function createProtocolConnection(input, output, logger, options) {
	    return (0, node_1.createMessageConnection)(input, output, logger, options);
	}
	exports.createProtocolConnection = createProtocolConnection;
} (main$2));
getDefaultExportFromCjs(main$2);

function parseOptions(cb) {
    const prog = sade('svelte-check', true)
        .version(require('../../package.json').version) // ends up in dist/src, that's why we go two levels up
        .option('--workspace', 'Path to your workspace. All subdirectories except node_modules and those listed in `--ignore` are checked. Defaults to current working directory.')
        .option('--output', 'What output format to use. Options are human, human-verbose, machine, machine-verbose.')
        .option('--watch', 'Will not exit after one pass but keep watching files for changes and rerun diagnostics', false)
        .option('--preserveWatchOutput', 'Do not clear the screen in watch mode', false)
        .option('--incremental', 'Use incremental checks with a disk cache of svelte2tsx outputs. Requires writing transpiled Svelte files to disk (.svelte-kit if available, else .svelte-check)', false)
        .option('--tsgo', 'Use tsgo for TypeScript diagnostics. Requires writing transpiled Svelte files to disk (.svelte-kit if available, else .svelte-check)', false)
        .option('--tsconfig', 'Pass a path to a tsconfig or jsconfig file. The path can be relative to the workspace path or absolute. Doing this means that only files matched by the files/include/exclude pattern of the config file are diagnosed. It also means that errors from TypeScript and JavaScript files are reported. When not given, searches for the next upper tsconfig/jsconfig in the workspace path.')
        .option('--no-tsconfig', 'Use this if you only want to check the Svelte files found in the current directory and below and ignore any JS/TS files (they will not be type-checked)', false)
        .option('--ignore', 'Only has an effect when using `--no-tsconfig` option. Files/folders to ignore - relative to workspace root, comma-separated, inside quotes. Example: `--ignore "dist,build"`')
        .option('--fail-on-warnings', 'Will also exit with error code when there are warnings', false)
        .option('--compiler-warnings', 'A list of Svelte compiler warning codes. Each entry defines whether that warning should be ignored or treated as an error. Warnings are comma-separated, between warning code and error level is a colon; all inside quotes. Example: `--compiler-warnings "css-unused-selector:ignore,unused-export-let:error"`')
        .option('--diagnostic-sources', 'A list of diagnostic sources which should run diagnostics on your code. Possible values are `js` (includes TS), `svelte`, `css`. Comma-separated, inside quotes. By default all are active. Example: `--diagnostic-sources "js,svelte"`')
        .option('--threshold', 'Filters the diagnostics to display. `error` will output only errors while `warning` will output warnings and errors.', 'warning')
        // read by sade and preprocessor like sass
        .option('--color', 'Force enabling of color output', false)
        .option('--no-color', 'Force disabling of color output', false)
        .action((opts) => {
        const workspaceUri = getWorkspaceUri(opts);
        const tsconfig = getTsconfig(opts, workspaceUri.fsPath);
        if (opts.ignore && tsconfig) {
            throwError('`--ignore` only has an effect when using `--no-tsconfig`');
        }
        cb({
            workspaceUri,
            outputFormat: getOutputFormat(opts),
            watch: !!opts.watch,
            preserveWatchOutput: !!opts.preserveWatchOutput,
            incremental: !!opts.incremental,
            tsgo: !!opts.tsgo,
            tsconfig,
            filePathsToIgnore: opts.ignore?.split(',') || [],
            failOnWarnings: !!opts['fail-on-warnings'],
            compilerWarnings: getCompilerWarnings(opts),
            diagnosticSources: getDiagnosticSources(opts),
            threshold: getThreshold(opts)
        });
    });
    prog.parse(process.argv, {
        unknown: (arg) => `Unknown option ${arg}`
    });
}
const outputFormats = ['human', 'human-verbose', 'machine', 'machine-verbose'];
function getOutputFormat(opts) {
    if (opts.output && outputFormats.includes(opts.output)) {
        return opts.output;
    }
    else if (process.env.CLAUDECODE === '1') {
        // https://github.com/sveltejs/language-tools/issues/2868
        return 'machine';
    }
    else {
        return 'human-verbose';
    }
}
function getWorkspaceUri(opts) {
    let workspaceUri;
    let workspacePath = opts.workspace;
    if (workspacePath) {
        if (!path__namespace.isAbsolute(workspacePath)) {
            workspacePath = path__namespace.resolve(process.cwd(), workspacePath);
        }
        workspaceUri = URI$2.file(workspacePath);
    }
    else {
        workspaceUri = URI$2.file(process.cwd());
    }
    return workspaceUri;
}
function findFile(searchPath, fileName) {
    try {
        for (;;) {
            const filePath = path__namespace.join(searchPath, fileName);
            if (fs__namespace.existsSync(filePath)) {
                return filePath;
            }
            const parentPath = path__namespace.dirname(searchPath);
            if (parentPath === searchPath) {
                return;
            }
            searchPath = parentPath;
        }
    }
    catch (e) {
        return;
    }
}
function getTsconfig(myArgs, workspacePath) {
    // Work around undocumented behavior in Sade where `no-tsconfig` is never true / means "tsconfig is false"
    if (myArgs['no-tsconfig'] || process.argv.includes('--no-tsconfig')) {
        return undefined;
    }
    let tsconfig = typeof myArgs.tsconfig === 'string' ? myArgs.tsconfig : undefined;
    if (!tsconfig) {
        const ts = findFile(workspacePath, 'tsconfig.json');
        const js = findFile(workspacePath, 'jsconfig.json');
        tsconfig = !!ts && (!js || ts.length >= js.length) ? ts : js;
    }
    if (tsconfig && !path__namespace.isAbsolute(tsconfig)) {
        tsconfig = path__namespace.join(workspacePath, tsconfig);
    }
    if (tsconfig && !fs__namespace.existsSync(tsconfig)) {
        throwError('Could not find tsconfig/jsconfig file at ' + myArgs.tsconfig);
    }
    return tsconfig;
}
function throwError(msg) {
    throw new Error('Invalid svelte-check CLI args: ' + msg);
}
function getCompilerWarnings(opts) {
    return stringToObj(opts['compiler-warnings']);
    function stringToObj(str = '') {
        return str
            .split(',')
            .map((s) => s.trim())
            .filter((s) => !!s)
            .reduce((settings, setting) => {
            const [name, val] = setting.split(':');
            if (val === 'error' || val === 'ignore') {
                settings[name] = val;
            }
            return settings;
        }, {});
    }
}
const diagnosticSources = ['js', 'css', 'svelte'];
function getDiagnosticSources(opts) {
    const sources = opts['diagnostic-sources'];
    return sources
        ? sources
            .split(',')
            ?.map((s) => s.trim())
            .filter((s) => diagnosticSources.includes(s))
        : diagnosticSources;
}
const thresholds = ['warning', 'error'];
function getThreshold(opts) {
    if (thresholds.includes(opts.threshold)) {
        return opts.threshold;
    }
    else {
        console.warn(`Invalid threshold "${opts.threshold}", using "warning" instead`);
        return 'warning';
    }
}

const DEFAULT_FILTER = () => true;
class HumanFriendlyWriter {
    constructor(stream, isVerbose = true, isWatchMode = false, clearScreen = true, diagnosticFilter = DEFAULT_FILTER) {
        this.stream = stream;
        this.isVerbose = isVerbose;
        this.isWatchMode = isWatchMode;
        this.clearScreen = clearScreen;
        this.diagnosticFilter = diagnosticFilter;
    }
    start(workspaceDir) {
        if (process.stdout.isTTY && this.isWatchMode && this.clearScreen) {
            // Clear screen
            const blank = '\n'.repeat(process.stdout.rows);
            this.stream.write(blank);
            process.stdout.cursorTo(0, 0);
            process.stdout.clearScreenDown();
        }
        if (this.isVerbose) {
            this.stream.write(`Loading svelte-check in workspace: ${workspaceDir}\n`);
            this.stream.write('Getting Svelte diagnostics...\n');
            this.stream.write('\n');
        }
    }
    file(diagnostics, workspaceDir, filename, text) {
        diagnostics.filter(this.diagnosticFilter).forEach((diagnostic) => {
            const source = diagnostic.source ? `(${diagnostic.source})` : '';
            // Display location in a format that IDEs will turn into file links
            const { line, character } = diagnostic.range.start;
            this.stream.write(`${workspaceDir}${path$1.sep}${pc.green(filename)}:${line + 1}:${character + 1}\n`);
            let msg;
            if (this.isVerbose) {
                const code = this.formatRelatedCode(diagnostic, text);
                msg = `${diagnostic.message} ${source}\n${pc.cyan(code.trimEnd())}`;
            }
            else {
                msg = `${diagnostic.message} ${source}`;
            }
            if (diagnostic.severity === main$2.DiagnosticSeverity.Error) {
                this.stream.write(`${pc.red('Error')}: ${msg}\n`);
            }
            else if (diagnostic.severity === main$2.DiagnosticSeverity.Warning) {
                this.stream.write(`${pc.yellow('Warn')}: ${msg}\n`);
            }
            this.stream.write('\n');
        });
    }
    formatRelatedCode(diagnostic, text) {
        if (!text || diagnostic.data?.positionUnknown) {
            return '';
        }
        // Show some context around diagnostic range
        const codePrevLine = this.getLine(diagnostic.range.start.line - 1, text);
        const codeLine = this.getCodeLine(diagnostic, text);
        const codeNextLine = this.getLine(diagnostic.range.end.line + 1, text);
        const code = codePrevLine + codeLine + codeNextLine;
        return code;
    }
    getCodeLine(diagnostic, text) {
        const startOffset = src$1.offsetAt(diagnostic.range.start, text);
        const endOffset = src$1.offsetAt(diagnostic.range.end, text);
        const codePrev = text.substring(src$1.offsetAt({ line: diagnostic.range.start.line, character: 0 }, text), startOffset);
        const codeHighlight = pc.magenta(text.substring(startOffset, endOffset));
        const codePost = text.substring(endOffset, src$1.offsetAt({ line: diagnostic.range.end.line, character: Number.MAX_SAFE_INTEGER }, text));
        return codePrev + codeHighlight + codePost;
    }
    getLine(line, text) {
        return text.substring(src$1.offsetAt({ line, character: 0 }, text), src$1.offsetAt({ line, character: Number.MAX_SAFE_INTEGER }, text));
    }
    completion(_f, errorCount, warningCount, fileCountWithProblems) {
        if (fileCountWithProblems) {
            this.stream.write('====================================\n');
        }
        const message = [
            'svelte-check found ',
            `${errorCount} ${errorCount === 1 ? 'error' : 'errors'} and `,
            `${warningCount} ${warningCount === 1 ? 'warning' : 'warnings'}`,
            `${fileCountWithProblems
                ? // prettier-ignore
                    ` in ${fileCountWithProblems} ${fileCountWithProblems === 1 ? 'file' : 'files'}`
                : ''}\n`
        ].join('');
        if (errorCount !== 0) {
            this.stream.write(pc.red(message));
        }
        else if (warningCount !== 0) {
            this.stream.write(pc.yellow(message));
        }
        else {
            this.stream.write(pc.green(message));
        }
        if (this.isWatchMode) {
            this.stream.write('Watching for file changes...');
        }
    }
    failure(err) {
        this.stream.write(`${err}\n`);
    }
}
class MachineFriendlyWriter {
    constructor(stream, isVerbose = false, diagnosticFilter = DEFAULT_FILTER) {
        this.stream = stream;
        this.isVerbose = isVerbose;
        this.diagnosticFilter = diagnosticFilter;
    }
    log(msg) {
        this.stream.write(`${new Date().getTime()} ${msg}\n`);
    }
    start(workspaceDir) {
        this.log(`START ${JSON.stringify(workspaceDir)}`);
    }
    file(diagnostics, workspaceDir, filename, _text) {
        diagnostics.filter(this.diagnosticFilter).forEach((d) => {
            const { message, severity, range, code, codeDescription, source } = d;
            const type = severity === main$2.DiagnosticSeverity.Error
                ? 'ERROR'
                : severity === main$2.DiagnosticSeverity.Warning
                    ? 'WARNING'
                    : null;
            if (type) {
                const { start, end } = range;
                if (this.isVerbose) {
                    this.log(JSON.stringify({
                        type,
                        filename,
                        start,
                        end,
                        message,
                        code,
                        codeDescription,
                        source
                    }));
                }
                else {
                    const fn = JSON.stringify(filename);
                    const msg = JSON.stringify(message);
                    this.log(`${type} ${fn} ${start.line + 1}:${start.character + 1} ${msg}`);
                }
            }
        });
    }
    completion(fileCount, errorCount, warningCount, fileCountWithProblems) {
        this.log([
            'COMPLETED',
            `${fileCount} FILES`,
            `${errorCount} ERRORS`,
            `${warningCount} WARNINGS`,
            `${fileCountWithProblems} FILES_WITH_PROBLEMS`
        ].join(' '));
    }
    failure(err) {
        this.log(`FAILURE ${JSON.stringify(err.message)}`);
    }
}

/**
 * Creates an array of predicate functions for testing if a path should be ignored.
 * Supports patterns with `**` at the start (matches anywhere) or end (matches prefix).
 * Throws if patterns contain `*` in unsupported positions.
 *
 * @param filePathsToIgnore - Array of ignore patterns (e.g., "node_modules/**", "**\/__tests__")
 * @returns Array of functions that return true if a path matches the corresponding pattern
 * @throws Error if a pattern uses unsupported glob syntax
 */
function createIgnored(filePathsToIgnore) {
    return filePathsToIgnore.map((i) => {
        if (i.endsWith('**'))
            i = i.slice(0, -2);
        if (i.startsWith('**')) {
            i = i.slice(2);
            if (i.includes('*'))
                throw new Error('Invalid svelte-check --ignore pattern: Only ** at the start or end is supported');
            return (path) => path.includes(i);
        }
        if (i.includes('*'))
            throw new Error('Invalid svelte-check --ignore pattern: Only ** at the start or end is supported');
        return (path) => path.startsWith(i);
    });
}
/**
 * Recursively finds files in the workspace that match the provided filter.
 * Excludes `node_modules` directories and hidden directories (starting with `.`).
 * Applies user-specified ignore patterns to filter results.
 *
 * @param workspacePath - Root directory to search from
 * @param filePathsToIgnore - Patterns for files/directories to exclude
 * @param filter - Predicate that decides whether a file should be included
 * @returns Array of absolute paths to all discovered matching files
 */
async function findFiles(workspacePath, filePathsToIgnore, filter) {
    const offset = workspacePath.length + 1;
    const ignored = createIgnored(filePathsToIgnore);
    const isIgnored = (filePath) => {
        const relative = filePath.slice(offset);
        for (const i of ignored) {
            if (i(relative)) {
                return true;
            }
        }
        return false;
    };
    return new dist.fdir()
        .filter((filePath) => filter(filePath) && !isIgnored(filePath))
        .exclude((_, filePath) => {
        return filePath.includes('/node_modules/') || filePath.includes('/.');
    })
        .withPathSeparator('/')
        .withFullPaths()
        .crawl(workspacePath)
        .withPromise();
}

const MANIFEST_VERSION = 3;
const SVELTE_KIT_DIR = '.svelte-kit';
const CACHE_DIR_NAME = '.svelte-check';
const EMIT_SUBDIR = 'svelte';
/**
 * Determines the cache directory location for svelte-check output.
 * Uses `.svelte-kit/.svelte-check` if a SvelteKit project is detected,
 * otherwise falls back to `.svelte-check` in the workspace root.
 */
function getCacheDir(workspacePath) {
    const svelteKitDir = path__namespace.join(workspacePath, SVELTE_KIT_DIR);
    if (fs__namespace.existsSync(svelteKitDir) && fs__namespace.statSync(svelteKitDir).isDirectory()) {
        return path__namespace.join(svelteKitDir, CACHE_DIR_NAME);
    }
    return path__namespace.join(workspacePath, CACHE_DIR_NAME);
}
function toPosixPath(value) {
    return value.replace(/\\/g, '/');
}
function toRelativePosix(baseDir, targetPath) {
    const relative = path__namespace.relative(baseDir, targetPath);
    return toPosixPath(relative || '.');
}
/**
 * Default SvelteKit file paths used when svelte.config.js doesn't specify custom paths.
 */
const defaultKitFilesSettings = {
    paramsPath: 'src/params',
    serverHooksPath: 'src/hooks.server',
    clientHooksPath: 'src/hooks.client',
    universalHooksPath: 'src/hooks'
};
/**
 * This function encapsulates the import call in a way
 * that TypeScript does not transpile `import()`.
 * https://github.com/microsoft/TypeScript/issues/43329
 */
const dynamicImport = new Function('modulePath', 'return import(modulePath)');
/**
 * Loads the svelte.config.js file and extracts SvelteKit file path settings.
 * Falls back to default paths if config doesn't exist or doesn't specify custom paths.
 *
 * @param workspacePath - Root directory of the project
 * @returns KitFilesSettings with paths for params, hooks files
 */
async function loadKitFilesSettings(workspacePath) {
    const configExtensions = ['js', 'cjs', 'mjs'];
    let configPath;
    for (const ext of configExtensions) {
        const tryPath = path__namespace.join(workspacePath, `svelte.config.${ext}`);
        if (fs__namespace.existsSync(tryPath)) {
            configPath = tryPath;
            break;
        }
    }
    if (!configPath) {
        return defaultKitFilesSettings;
    }
    try {
        const config = (await dynamicImport(require$$5.pathToFileURL(configPath)))?.default;
        if (!config?.kit?.files) {
            return defaultKitFilesSettings;
        }
        const files = config.kit.files;
        return {
            paramsPath: files.params ?? defaultKitFilesSettings.paramsPath,
            serverHooksPath: files.hooks?.server ?? defaultKitFilesSettings.serverHooksPath,
            clientHooksPath: files.hooks?.client ?? defaultKitFilesSettings.clientHooksPath,
            universalHooksPath: files.hooks?.universal ?? defaultKitFilesSettings.universalHooksPath
        };
    }
    catch {
        return defaultKitFilesSettings;
    }
}
/**
 * Transforms Svelte files into TypeScript/JavaScript using svelte2tsx and writes them to a cache directory.
 * Supports incremental builds by tracking file modification times and sizes in a manifest.
 *
 * @param workspacePath - Root directory of the project
 * @param filePathsToIgnore - Glob patterns for files to exclude from processing
 * @param incremental - When true, only reprocesses files that have changed since the last run
 * @returns Paths to cache/emit directories, manifest, processed entries, and list of changed files
 */
async function emitSvelteFiles(workspacePath, filePathsToIgnore, incremental) {
    const cacheDir = getCacheDir(workspacePath);
    const emitDir = path__namespace.join(cacheDir, EMIT_SUBDIR);
    const manifestPath = path__namespace.join(cacheDir, 'manifest.json');
    fs__namespace.mkdirSync(emitDir, { recursive: true });
    const manifest = incremental
        ? loadManifest(manifestPath, workspacePath)
        : { version: MANIFEST_VERSION, entries: {} };
    const kitFilesSettings = await loadKitFilesSettings(workspacePath);
    const isJsOrTsFile = (filePath) => filePath.endsWith('.ts') || filePath.endsWith('.js');
    const allRelevantFiles = await findFiles(workspacePath, filePathsToIgnore, (filePath) => filePath.endsWith('.svelte') ||
        (isJsOrTsFile(filePath) && internalHelpers.isKitFile(filePath, kitFilesSettings)));
    const svelteFiles = [];
    const kitFiles = [];
    for (const filePath of allRelevantFiles) {
        if (filePath.endsWith('.svelte')) {
            svelteFiles.push(filePath);
        }
        else {
            kitFiles.push(filePath);
        }
    }
    const currentSet = new Set(svelteFiles);
    const changedFiles = [];
    // Remove deleted files (only relevant for incremental builds with a persisted manifest)
    if (incremental) {
        pruneDeletedManifestEntries(manifest, currentSet, (entry) => !entry.isKitFile);
    }
    for (const sourcePath of svelteFiles) {
        const stats = fs__namespace.statSync(sourcePath);
        const entry = manifest.entries[sourcePath];
        // When file stats match the cached entry, avoid reading the file just to determine isTsFile
        // (only for Svelte entries, not Kit entries which don't have isTsFile)
        const statsUnchanged = !!entry &&
            !entry.isKitFile &&
            entry.mtimeMs === stats.mtimeMs &&
            entry.size === stats.size;
        let text;
        let isTsFile;
        if (statsUnchanged && entry.isTsFile !== undefined) {
            isTsFile = entry.isTsFile;
        }
        else {
            text = fs__namespace.readFileSync(sourcePath, 'utf-8');
            isTsFile = isTsSvelte(text);
        }
        const { outPath, dtsPath } = getOutputPaths(workspacePath, emitDir, sourcePath, isTsFile);
        const outPathChanged = !!entry && entry.outPath !== outPath;
        if (outPathChanged) {
            deleteEntry(entry);
        }
        const hasChanged = !incremental ||
            !entry ||
            entry.isKitFile || // Force reprocess if it was previously a Kit entry
            outPathChanged ||
            !statsUnchanged ||
            !fs__namespace.existsSync(entry.outPath) ||
            (entry.dtsPath && !fs__namespace.existsSync(entry.dtsPath));
        if (!hasChanged) {
            continue;
        }
        changedFiles.push(sourcePath);
        if (!text) {
            text = fs__namespace.readFileSync(sourcePath, 'utf-8');
        }
        fs__namespace.mkdirSync(path__namespace.dirname(outPath), { recursive: true });
        try {
            const tsx = svelte2tsx(text, {
                parse: compiler.parse,
                version: compiler.VERSION,
                filename: sourcePath,
                isTsFile,
                mode: 'ts',
                emitOnTemplateError: false,
                emitJsDoc: true, // without this, tsc/tsgo will choke on the syntactic errors and not emit semantic errors
                rewriteExternalImports: {
                    workspacePath,
                    generatedPath: outPath
                }
            });
            fs__namespace.writeFileSync(outPath, tsx.code, 'utf-8');
            const dtsImportPath = `./${path__namespace.basename(outPath)}`;
            const dtsContent = `export { default } from "${dtsImportPath}";\nexport * from "${dtsImportPath}";\n`;
            fs__namespace.writeFileSync(dtsPath, dtsContent, 'utf-8');
            manifest.entries[sourcePath] = {
                sourcePath,
                outPath,
                dtsPath,
                mtimeMs: stats.mtimeMs,
                size: stats.size,
                isTsFile
            };
        }
        catch (e) {
            // rely on the Svelte compiler to emit errors (when running the Svelte diagnostics)
            safeUnlink(outPath);
            safeUnlink(dtsPath);
            delete manifest.entries[sourcePath];
        }
    }
    // Process SvelteKit files (route files, hooks, params)
    const currentKitSet = new Set(kitFiles);
    // Remove deleted Kit files
    if (incremental) {
        pruneDeletedManifestEntries(manifest, currentKitSet, (entry) => !!entry.isKitFile);
    }
    for (const sourcePath of kitFiles) {
        const stats = fs__namespace.statSync(sourcePath);
        const entry = manifest.entries[sourcePath];
        const statsUnchanged = !!entry && entry.mtimeMs === stats.mtimeMs && entry.size === stats.size;
        const outPath = getKitOutputPath(workspacePath, emitDir, sourcePath);
        const outPathChanged = !!entry && entry.outPath !== outPath;
        if (outPathChanged) {
            deleteEntry(entry);
        }
        const hasChanged = !incremental || !entry || outPathChanged || !statsUnchanged || !fs__namespace.existsSync(outPath);
        if (!hasChanged) {
            continue;
        }
        changedFiles.push(sourcePath);
        const text = fs__namespace.readFileSync(sourcePath, 'utf-8');
        const isTsFile = sourcePath.endsWith('.ts');
        const result = internalHelpers.upsertKitFile(ts, sourcePath, kitFilesSettings, () => ts.createSourceFile(sourcePath, text, ts.ScriptTarget.Latest, true, isTsFile ? ts.ScriptKind.TS : ts.ScriptKind.JS), undefined, {
            workspacePath,
            generatedPath: outPath
        });
        if (!result) {
            // Not a Kit file or no transformations needed, skip
            continue;
        }
        fs__namespace.mkdirSync(path__namespace.dirname(outPath), { recursive: true });
        fs__namespace.writeFileSync(outPath, result.text, 'utf-8');
        manifest.entries[sourcePath] = {
            sourcePath,
            outPath,
            mtimeMs: stats.mtimeMs,
            size: stats.size,
            isKitFile: true,
            addedCode: result.addedCode
        };
    }
    if (incremental) {
        writeManifest(manifestPath, manifest, workspacePath);
    }
    return {
        cacheDir,
        emitDir,
        manifestPath,
        entries: Object.values(manifest.entries),
        changedFiles,
        workspacePath,
        manifest
    };
}
/**
 * Creates an overlay tsconfig.json that extends the project's tsconfig with additional
 * configuration needed for type-checking Svelte files. This includes:
 * - Adding the emit directory to `rootDirs` so TypeScript can resolve our virtual Svelte modules
 * - Rebasing include/exclude patterns to work from the cache directory
 * - Including svelte2tsx shim files for proper type definitions
 * - Configuring incremental build settings when enabled
 *
 * @param tsconfigPath - Path to the project's original tsconfig.json
 * @param emitResult - Result from emitSvelteFiles containing cache directory paths
 * @param incremental - Whether to enable TypeScript incremental compilation
 * @param useTsgo - Whether to configure for tsgo
 * @returns Path to the generated overlay tsconfig.json
 */
function writeOverlayTsconfig(tsconfigPath, emitResult, incremental, useTsgo) {
    const cacheDir = emitResult.cacheDir;
    const overlayPath = path__namespace.join(cacheDir, 'tsconfig.json');
    const tsBuildInfoFile = path__namespace.join(cacheDir, 'tsbuildinfo.json');
    const overlayDir = path__namespace.dirname(overlayPath);
    const configFile = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
    if (configFile.error) {
        throw new Error(ts.formatDiagnosticsWithColorAndContext([configFile.error], {
            getCanonicalFileName: (fileName) => fileName,
            getCurrentDirectory: ts.sys.getCurrentDirectory,
            getNewLine: () => ts.sys.newLine
        }));
    }
    const parsed = ts.parseJsonConfigFileContent(configFile.config, ts.sys, path__namespace.dirname(tsconfigPath));
    const baseRootDirs = parsed.options.rootDirs ??
        configFile.config?.compilerOptions?.rootDirs ?? ['.'];
    const baseRootDirsAbs = baseRootDirs.map((dir) => path__namespace.resolve(path__namespace.join(path__namespace.dirname(tsconfigPath)), dir));
    const rootDirs = Array.from(new Set([...baseRootDirsAbs, path__namespace.join(cacheDir, 'svelte')])).map((dir) => toRelativePosix(overlayDir, dir));
    const tsconfigDir = path__namespace.dirname(tsconfigPath);
    const rawInclude = normalizeConfigSpecs(parsed.raw?.include);
    const rawExclude = normalizeConfigSpecs(parsed.raw?.exclude);
    const rawFiles = normalizeConfigSpecs(parsed.raw?.files) ?? [];
    const include = rebaseConfigSpecs(rawInclude, tsconfigDir, overlayDir);
    const exclude = rebaseConfigSpecs(rawExclude, tsconfigDir, overlayDir);
    // Turn files/include/exclude specs that match .svelte files into corresponding includes for our virtual files.
    // We do this here instead of filtering on includes/excludes before deciding which Svelte files to
    // virtualize because includes/excludes could only do starting points and module resolution could
    // find other .svelte files which need to be included, too.
    let configFiles = rebaseConfigSpecs(rawFiles, tsconfigDir, overlayDir) ?? [];
    // Remove .svelte files from the files list to avoid TS6054; replace with .d.svelte.ts
    configFiles = configFiles.filter((file) => !file.endsWith('.svelte'));
    configFiles = configFiles.concat(rawFiles.map((file) => toVirtualSvelteDtsSpec(file)));
    const virtualInclude = rawInclude?.map((spec) => toVirtualSvelteDtsSpec(spec));
    const mergedInclude = [...(include ?? []), ...(virtualInclude ?? [])];
    const virtualExclude = rawExclude?.map((spec) => toVirtualSvelteDtsSpec(spec));
    const upsertedExcludes = emitResult.entries.map((e) => toRelativePosix(overlayDir, e.sourcePath));
    const mergedExclude = Array.from(new Set([...(exclude ?? []), ...(virtualExclude ?? []), ...upsertedExcludes]));
    const shimFiles = resolveSvelte2tsxShims().map((fileName) => toRelativePosix(overlayDir, fileName));
    const rebasedReferences = parsed.raw?.references?.map((ref) => ({
        ...ref,
        path: toRelativePosix(overlayDir, path__namespace.resolve(tsconfigDir, ref.path))
    }));
    const rebasedPaths = rebasePathsConfig(parsed.options, tsconfigDir, overlayDir, useTsgo);
    const overlay = {
        extends: toRelativePosix(overlayDir, tsconfigPath),
        compilerOptions: {
            rootDirs,
            allowArbitraryExtensions: true,
            noEmit: true,
            incremental,
            tsBuildInfoFile: toRelativePosix(overlayDir, tsBuildInfoFile),
            ...(rebasedPaths && Object.keys(rebasedPaths).length ? { paths: rebasedPaths } : {})
        },
        files: Array.from(new Set([...(configFiles ?? []), ...shimFiles])),
        ...(mergedInclude.length ? { include: mergedInclude } : {}),
        ...(mergedExclude.length ? { exclude: mergedExclude } : {}),
        ...(rebasedReferences ? { references: rebasedReferences } : {})
    };
    fs__namespace.writeFileSync(overlayPath, JSON.stringify(overlay, null, 2), 'utf-8');
    return overlayPath;
}
/**
 * Spawns a TypeScript compiler process (tsc or tsgo) to perform type-checking
 * and collects the diagnostics from its output.
 *
 * @param tsconfigPath - Path to the tsconfig.json to use for compilation
 * @param useTsgo - When true, uses the experimental native TypeScript compiler (tsgo)
 * @param incremental - Whether to enable incremental compilation for faster subsequent runs
 * @param cwd - Working directory for the TypeScript compiler process
 * @returns Parsed diagnostics containing file paths, positions, severity, and messages
 */
function runTypeScriptDiagnostics(tsconfigPath, useTsgo, incremental, cwd) {
    const args = [
        useTsgo
            ? path__namespace.join(path__namespace.dirname(require.resolve('@typescript/native-preview/package.json')), 'bin/tsgo.js')
            : require.resolve('typescript/bin/tsc'),
        '-p',
        tsconfigPath,
        '--pretty',
        'true',
        '--noErrorTruncation'
    ];
    if (incremental) {
        args.push('--incremental');
        args.push('--tsBuildInfoFile', toPosixPath(path__namespace.join(path__namespace.dirname(tsconfigPath), 'tsbuildinfo.json')));
    }
    return new Promise((resolve, reject) => {
        const proc = require$$3$1.spawn('node', args, {
            cwd,
            stdio: ['ignore', 'pipe', 'pipe'],
            env: process.env
        });
        let stdout = '';
        let stderr = '';
        proc.stdout.setEncoding('utf-8');
        proc.stderr.setEncoding('utf-8');
        proc.stdout.on('data', (data) => {
            stdout += data;
        });
        proc.stderr.on('data', (data) => {
            stderr += data;
        });
        proc.on('error', (err) => {
            reject(err);
        });
        proc.on('close', () => {
            const output = `${stdout}\n${stderr}`;
            try {
                resolve(parseDiagnostics(output, cwd));
            }
            catch (e) {
                reject(e);
            }
        });
    });
}
/**
 * Maps TypeScript CLI diagnostics back to their original Svelte source files.
 * For Svelte files, uses source maps to translate positions from the generated
 * TypeScript/JavaScript back to the original Svelte markup.
 * For non-Svelte files (TS/JS), passes diagnostics through with minimal transformation.
 *
 * @param diagnostics - Raw diagnostics parsed from TypeScript compiler output
 * @param emitResult - Emit result containing the mapping between source and generated files
 * @returns Diagnostics grouped by file with positions mapped to original sources
 */
function mapCliDiagnosticsToLsp(diagnostics, emitResult, tsconfigPath) {
    const entryByOutPath = new Map(emitResult.entries.map((entry) => [path__namespace.normalize(entry.outPath), entry]));
    const excludedSourcePaths = new Set(emitResult.entries
        .map((e) => e.isKitFile && e.addedCode?.length && path__namespace.normalize(e.sourcePath))
        .filter((p) => !!p));
    const diagnosticsByFile = new Map();
    for (const diagnostic of diagnostics) {
        const filePath = diagnostic.filePath ?? tsconfigPath;
        const key = filePath ? path__namespace.normalize(filePath) : '';
        // Even though we try to exclude +page.js etc files that had code inserted (due to SvelteKit's zero types feature)
        // we might still have them included through code in .svelte-kit/types importing them. So we exclude the diagnostics for these.
        if (excludedSourcePaths.has(key)) {
            continue;
        }
        const existing = diagnosticsByFile.get(key);
        if (existing) {
            existing.push(diagnostic);
        }
        else {
            diagnosticsByFile.set(key, [diagnostic]);
        }
    }
    const results = new Map();
    for (const [filePath, fileDiagnostics] of diagnosticsByFile.entries()) {
        const entry = entryByOutPath.get(filePath);
        if (entry) {
            const sourceText = fs__namespace.readFileSync(entry.sourcePath, 'utf-8');
            if (entry.isKitFile && entry.addedCode) {
                // Kit file: use addedCode for position mapping
                const source = isTypescriptFile(entry.sourcePath) ? 'ts' : 'js';
                const generatedText = fs__namespace.readFileSync(entry.outPath, 'utf-8');
                const sourceLineOffsets = src$1.getLineOffsets(sourceText);
                const generatedLineOffsets = src$1.getLineOffsets(generatedText);
                const mappedDiagnostics = fileDiagnostics.map((diag) => {
                    const generatedOffset = src$1.offsetAt({ line: diag.line, character: diag.character }, generatedText, generatedLineOffsets);
                    const { pos: startOffset } = internalHelpers.toOriginalPos(generatedOffset, entry.addedCode);
                    const { pos: endOffset } = internalHelpers.toOriginalPos(generatedOffset + diag.length, entry.addedCode);
                    const startPos = src$1.positionAt(startOffset, sourceText, sourceLineOffsets);
                    const endPos = src$1.positionAt(endOffset, sourceText, sourceLineOffsets);
                    return {
                        range: main$2.Range.create(startPos, endPos),
                        severity: diag.severity,
                        code: diag.code,
                        message: diag.message,
                        source
                    };
                });
                results.set(entry.sourcePath, {
                    filePath: entry.sourcePath,
                    text: sourceText,
                    diagnostics: mappedDiagnostics
                });
            }
            else {
                // Svelte file: use source maps for position mapping
                const generatedText = fs__namespace.readFileSync(entry.outPath, 'utf-8');
                const tsDiagnostics = fileDiagnostics.map((diag) => cliDiagnosticToTsDiagnostic(diag, entry.outPath, generatedText, entry.isTsFile ?? false));
                const mappedDiagnostics = src$1.mapSvelteCheckDiagnostics(entry.sourcePath, sourceText, tsDiagnostics, {
                    rewriteExternalImports: {
                        workspacePath: emitResult.workspacePath,
                        generatedPath: entry.outPath
                    }
                });
                results.set(entry.sourcePath, {
                    filePath: entry.sourcePath,
                    text: sourceText,
                    diagnostics: mappedDiagnostics
                });
            }
        }
        else {
            const text = fs__namespace.existsSync(filePath) ? fs__namespace.readFileSync(filePath, 'utf-8') : '';
            const source = isTypescriptFile(filePath) ? 'ts' : 'js';
            const mappedDiagnostics = fileDiagnostics.map((diag) => ({
                range: main$2.Range.create({ line: diag.line, character: diag.character }, { line: diag.line, character: diag.character + diag.length }),
                severity: diag.severity,
                code: diag.code,
                message: diag.message,
                source,
                data: {
                    positionUnknown: diag.filePath === null
                }
            }));
            results.set(filePath, {
                filePath,
                text,
                diagnostics: mappedDiagnostics
            });
        }
    }
    return Array.from(results.values());
}
/** Strips ANSI escape codes from a string */
function stripAnsi(str) {
    // eslint-disable-next-line no-control-regex
    return str.replace(/\x1b\[[0-9;]*m/g, '');
}
/**
 * Parses TypeScript pretty-printed compiler output into structured diagnostic objects.
 *
 * With `--pretty true`, tsc outputs diagnostics in this format (after ANSI stripping):
 *
 *     file.ts:5:10 - error TS2322: Type 'string' is not assignable to type 'number'.
 *
 *     5     let count: number = 'oops';
 *                               ~~~~~~
 *
 * We parse the header line for file/line/col/severity/code/message, then look ahead
 * for a `~~~~~~` underline line to determine the exact error span length.
 *
 * @param output - Raw stdout/stderr output from the TypeScript compiler
 * @param baseDir - Base directory for resolving relative file paths
 * @returns Array of parsed diagnostics with absolute file paths and 0-based positions
 */
function parseDiagnostics(output, baseDir) {
    const clean = stripAnsi(output);
    const diagnostics = [];
    const lines = clean.split(/\r?\n/);
    // Pretty format: file.ts:5:10 - error TS2322: message
    const headerRegex = /^((.+):(\d+):(\d+) - )?(error|warning) TS(\d+): (.*)$/;
    // Tilde underline: optional leading whitespace followed by one or more tildes
    const tildeRegex = /^(\s*)(~+)\s*$/;
    for (let i = 0; i < lines.length; i++) {
        const match = headerRegex.exec(lines[i].trim());
        if (!match) {
            continue;
        }
        const [, , filePath, lineStr = '0', colStr = '0', severity, codeStr, message] = match;
        const resolvedPath = filePath
            ? path__namespace.isAbsolute(filePath)
                ? filePath
                : path__namespace.resolve(baseDir, filePath)
            : null;
        const lineNum = Math.max(0, Number(lineStr) - 1);
        const colNum = Math.max(0, Number(colStr) - 1);
        // Look ahead (up to 4 lines) for a ~~ underline to determine span length.
        // The underline appears after the source context line in pretty output.
        let length = 1;
        // No file path, so no source context line.
        if (filePath) {
            for (let j = i + 1; j < Math.min(i + 5, lines.length); j++) {
                const tildeMatch = tildeRegex.exec(lines[j]);
                if (tildeMatch) {
                    length = tildeMatch[2].length;
                    break;
                }
                // Stop looking if we hit another diagnostic header
                if (headerRegex.test(lines[j].trim())) {
                    break;
                }
            }
        }
        diagnostics.push({
            filePath: resolvedPath,
            line: lineNum,
            character: colNum,
            length,
            severity: severity === 'warning' ? main$2.DiagnosticSeverity.Warning : main$2.DiagnosticSeverity.Error,
            code: Number(codeStr),
            message
        });
    }
    return diagnostics;
}
/**
 * Checks if a Svelte file contains a TypeScript script block (lang="ts" or lang="typescript").
 */
function isTsSvelte(text) {
    // Regex to match <script> tags and capture their attributes section.
    //   - <script\b ...attributes... >
    //   - Attributes: sequence of whitespace + name, optionally =value (double/single/unquoted)
    const scriptTagRegex = /<script\b((?:\s+[^=>'"\/\s]+(?:=(?:"[^"]*"|'[^']*'|[^>\s]+))?)*)\s*>/gi;
    // Regex to match a lang attribute (case-insensitive, with optional whitespace), capturing its value:
    //   - Double quoted: "value" (group 1)
    //   - Single quoted: 'value' (group 2)
    //   - Unquoted: bareword (group 3)
    const langAttrRegex = /\blang\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/i;
    let scriptMatch;
    while ((scriptMatch = scriptTagRegex.exec(text)) !== null) {
        const attrs = scriptMatch[1] ?? '';
        const langMatch = langAttrRegex.exec(attrs);
        if (!langMatch) {
            continue;
        }
        const lang = (langMatch[1] ?? langMatch[2] ?? langMatch[3] ?? '').toLowerCase();
        if (lang === 'ts' || lang === 'typescript') {
            return true;
        }
    }
    return false;
}
function isTypescriptFile(filePath) {
    return /\.(ts|tsx|mts|cts)$/.test(filePath);
}
/**
 * Converts a CLI-parsed diagnostic into a TypeScript Diagnostic object.
 * Creates a source file from the generated text to calculate precise byte positions.
 * Uses the span length parsed from tsc's ~~ underline output.
 *
 * @param diag - Parsed diagnostic from CLI output (includes span length from ~~ underlines)
 * @param filePath - Path to the generated TypeScript/JavaScript file
 * @param generatedText - Content of the generated file for position calculation
 * @param isTsFile - Whether the source Svelte file uses TypeScript
 * @returns TypeScript Diagnostic object suitable for further processing
 */
function cliDiagnosticToTsDiagnostic(diag, filePath, generatedText, isTsFile) {
    const sourceFile = ts.createSourceFile(filePath, generatedText, ts.ScriptTarget.Latest, true, isTsFile ? ts.ScriptKind.TS : ts.ScriptKind.JS);
    const start = sourceFile.getPositionOfLineAndCharacter(diag.line, diag.character);
    return {
        file: sourceFile,
        start,
        length: diag.length,
        category: diag.severity === main$2.DiagnosticSeverity.Warning
            ? ts.DiagnosticCategory.Warning
            : ts.DiagnosticCategory.Error,
        code: diag.code,
        messageText: diag.message,
        source: 'ts'
    };
}
/**
 * Computes the output file paths for a Svelte source file.
 * The result is a file path for for the actual generated code (prefixed with `++`
 * to prevent conflicts with other files) and a file path for the declaration file
 * which is the same as the original file but with a `.d.ts` extension.
 * We do this so that TypeScript can resolve imports to '.svelte' files even with module resolution
 * set to 'node16' or 'nodenext'.
 *
 * @param workspacePath - Root directory of the project
 * @param emitDir - Directory where generated files are written
 * @param sourcePath - Path to the source Svelte file
 * @param isTsFile - Whether the Svelte file uses TypeScript (affects extension)
 * @returns Paths for the generated code file (.ts/.js) and declaration file (.d.ts)
 */
function getOutputPaths(workspacePath, emitDir, sourcePath, isTsFile) {
    const relPath = path__namespace.relative(workspacePath, sourcePath);
    const base = relPath.replace(/\.svelte$/, `.svelte.${isTsFile ? 'ts' : 'js'}`);
    const baseOutputPath = path__namespace.join(emitDir, base);
    const outPath = path__namespace.join(path__namespace.dirname(baseOutputPath), `++${path__namespace.basename(baseOutputPath)}`);
    // .svelte.d.ts doesn't work in moduleResolution=node16+
    const dtsPath = baseOutputPath.replace(/\.svelte\.(ts|js)$/, '.d.svelte.ts');
    return {
        outPath: outPath.replace(/\\/g, '/'),
        dtsPath: dtsPath.replace(/\\/g, '/')
    };
}
/**
 * Computes the output file path for a SvelteKit route/hook/params file.
 * Unlike Svelte files, Kit files keep their original filename (no ++ prefix needed).
 *
 * @param workspacePath - Root directory of the project
 * @param emitDir - Directory where generated files are written
 * @param sourcePath - Path to the source Kit file
 * @returns Path for the generated code file
 */
function getKitOutputPath(workspacePath, emitDir, sourcePath) {
    const relPath = path__namespace.relative(workspacePath, sourcePath);
    return toPosixPath(path__namespace.join(emitDir, relPath));
}
/**
 * Rebases an array of tsconfig path specifications from one directory to another.
 * Used when creating the overlay tsconfig to make relative paths work correctly.
 */
function rebaseConfigSpecs(specs, fromDir, toDir) {
    if (!Array.isArray(specs)) {
        return undefined;
    }
    return specs.map((spec) => rebaseConfigSpec(String(spec), fromDir, toDir));
}
/**
 * Rebases a single tsconfig path specification from one directory to another.
 *
 * @param spec - The path specification to rebase (e.g., "./src", "${configDir}/lib")
 * @param fromDir - The directory the spec is currently relative to
 * @param toDir - The directory the spec should be relative to after rebasing
 * @returns The rebased path in POSIX format
 */
function rebaseConfigSpec(spec, fromDir, toDir) {
    const configDirPattern = /^\$\{configDir\}/i; // {configDir} is a special placeholder for the project root directory
    const resolved = configDirPattern.test(spec)
        ? path__namespace.resolve(fromDir, spec.replace(configDirPattern, '.'))
        : path__namespace.isAbsolute(spec)
            ? spec
            : path__namespace.resolve(fromDir, spec);
    return toRelativePosix(toDir, resolved);
}
/**
 * Normalizes tsconfig include/exclude/files specifications to a string array.
 * Handles undefined, null, single values, and arrays uniformly.
 */
function normalizeConfigSpecs(specs) {
    if (specs === undefined || specs === null) {
        return undefined;
    }
    if (Array.isArray(specs)) {
        return specs.map((spec) => String(spec));
    }
    return [String(specs)];
}
function rebasePathsConfig(options, tsconfigDir, overlayDir, useTsgo) {
    if (!options.paths) {
        return;
    }
    const rebased = {};
    let pathsBaseDir = tsconfigDir;
    let baseUrlAbsolute = useTsgo ? undefined : options.baseUrl;
    if (baseUrlAbsolute != null) {
        // should already be absolute, just to be sure.
        if (!path__namespace.isAbsolute(baseUrlAbsolute)) {
            baseUrlAbsolute = path__namespace.resolve(tsconfigDir, baseUrlAbsolute);
        }
        pathsBaseDir = path__namespace.resolve(tsconfigDir, baseUrlAbsolute);
    }
    else if (typeof options.pathsBasePath === 'string') {
        pathsBaseDir = options.pathsBasePath;
    }
    for (const [key, specs] of Object.entries(options.paths)) {
        const result = [];
        for (const spec of specs) {
            // ${configDir} placeholder should already be resolved here
            const absoluteSpec = path__namespace.isAbsolute(spec) ? spec : path__namespace.resolve(pathsBaseDir, spec);
            result.push(baseUrlAbsolute == null ? toRelativePosix(overlayDir, absoluteSpec) : spec);
            const patternRelativeToTsconfig = toPosixPath(path__namespace.relative(tsconfigDir, absoluteSpec));
            if (!patternRelativeToTsconfig.startsWith('../')) {
                const viralSveltePattern = path__namespace.resolve(overlayDir, path__namespace.join(EMIT_SUBDIR, patternRelativeToTsconfig));
                const relativeVirtualPattern = toRelativePosix(baseUrlAbsolute ?? overlayDir, viralSveltePattern);
                result.push('./' + relativeVirtualPattern);
            }
        }
        rebased[key] = result;
    }
    return rebased;
}
function toVirtualSvelteDtsSpec(spec) {
    const normalized = spec.replace(/^\$\{configDir\}/i, '.').replace(/\.svelte$/, '.d.svelte.ts');
    return `${EMIT_SUBDIR}/${normalized}`;
}
function deleteEntry(entry) {
    safeUnlink(entry.outPath);
    if (entry.dtsPath)
        safeUnlink(entry.dtsPath);
}
function pruneDeletedManifestEntries(manifest, currentSet, shouldConsiderEntry) {
    for (const [sourcePath, entry] of Object.entries(manifest.entries)) {
        if (shouldConsiderEntry(entry) && !currentSet.has(sourcePath)) {
            deleteEntry(entry);
            delete manifest.entries[sourcePath];
        }
    }
}
function safeUnlink(filePath) {
    try {
        fs__namespace.unlinkSync(filePath);
    }
    catch {
        // ignore
    }
}
/**
 * Loads the incremental build manifest from disk.
 * The manifest tracks which files have been processed and their metadata
 * to enable incremental rebuilds. Returns an empty manifest if the file
 * doesn't exist, is corrupt, or has an incompatible version.
 * Converts relative paths stored in the manifest to absolute paths for processing.
 *
 * @param manifestPath - Path to the manifest.json file
 * @param workspacePath - Workspace root for resolving relative paths
 * @returns The loaded manifest with absolute paths, or a fresh empty manifest
 */
function loadManifest(manifestPath, workspacePath) {
    if (!fs__namespace.existsSync(manifestPath)) {
        return { version: MANIFEST_VERSION, entries: {} };
    }
    try {
        const data = JSON.parse(fs__namespace.readFileSync(manifestPath, 'utf-8'));
        if (data.version !== MANIFEST_VERSION) {
            return { version: MANIFEST_VERSION, entries: {} };
        }
        // Resolve relative paths to absolute
        const resolvedEntries = {};
        for (const [relKey, entry] of Object.entries(data.entries)) {
            const absKey = toPosixPath(path__namespace.resolve(workspacePath, relKey));
            resolvedEntries[absKey] = {
                ...entry,
                sourcePath: toPosixPath(path__namespace.resolve(workspacePath, entry.sourcePath)),
                outPath: toPosixPath(path__namespace.resolve(workspacePath, entry.outPath)),
                dtsPath: entry.dtsPath
                    ? toPosixPath(path__namespace.resolve(workspacePath, entry.dtsPath))
                    : undefined
            };
        }
        return { version: data.version, entries: resolvedEntries };
    }
    catch {
        return { version: MANIFEST_VERSION, entries: {} };
    }
}
/**
 * Persists the incremental build manifest to disk.
 * Converts all absolute paths to relative paths before writing to ensure
 * the manifest remains portable across different machines/environments.
 *
 * @param manifestPath - Path where the manifest.json should be written
 * @param manifest - The manifest data with absolute paths
 * @param workspacePath - Workspace root for computing relative paths
 */
function writeManifest(manifestPath, manifest, workspacePath) {
    // Convert absolute paths to relative for storage
    const relativeEntries = {};
    for (const [absKey, entry] of Object.entries(manifest.entries)) {
        const relKey = toRelativePosix(workspacePath, absKey);
        relativeEntries[relKey] = {
            ...entry,
            sourcePath: toRelativePosix(workspacePath, entry.sourcePath),
            outPath: toRelativePosix(workspacePath, entry.outPath),
            dtsPath: entry.dtsPath ? toRelativePosix(workspacePath, entry.dtsPath) : undefined
        };
    }
    const data = {
        version: MANIFEST_VERSION,
        entries: relativeEntries
    };
    fs__namespace.writeFileSync(manifestPath, JSON.stringify(data, null, 2), 'utf-8');
}
/**
 * Updates the manifest with Svelte compiler warnings and CSS diagnostics.
 * These diagnostics are cached per-file to avoid recomputing them on incremental runs
 * when the source files haven't changed.
 *
 * @param emitResult - The emit result containing the manifest and path information
 * @param caches - Maps of file paths to their compiler warnings and CSS diagnostics
 */
function updateDiagnosticsCache(emitResult, caches) {
    const hasCompilerWarnings = !!caches.compilerWarningsByFile?.size;
    const hasCssDiagnostics = !!caches.cssDiagnosticsByFile?.size;
    if (!hasCompilerWarnings && !hasCssDiagnostics) {
        return;
    }
    const manifest = emitResult.manifest;
    if (caches.compilerWarningsByFile) {
        for (const [filePath, warnings] of caches.compilerWarningsByFile) {
            const entry = manifest.entries[filePath];
            if (entry) {
                entry.compilerWarnings = warnings;
            }
        }
    }
    if (caches.cssDiagnosticsByFile) {
        for (const [filePath, diagnostics] of caches.cssDiagnosticsByFile) {
            const entry = manifest.entries[filePath];
            if (entry) {
                entry.cssDiagnostics = diagnostics;
            }
        }
    }
    writeManifest(emitResult.manifestPath, manifest, emitResult.workspacePath);
}
/**
 * Resolves the paths to svelte2tsx shim declaration files.
 * These shims provide type definitions for Svelte-specific globals and JSX.
 * Uses different shim versions based on the installed Svelte version (v3 vs v4+).
 *
 * @returns Array of absolute paths to the shim .d.ts files
 */
function resolveSvelte2tsxShims() {
    const shimNames = [
        Number(compiler.VERSION.split('.')[0]) < 4 ? 'svelte-shims.d.ts' : 'svelte-shims-v4.d.ts',
        Number(compiler.VERSION.split('.')[0]) < 4 ? 'svelte-jsx.d.ts' : 'svelte-jsx-v4.d.ts'
        // 'svelte-native-jsx.d.ts' // TODO read tsconfig/svelte.config.js to see if it's enabled
    ];
    const resolved = [];
    for (const name of shimNames) {
        try {
            resolved.push(require.resolve(`./${name}`));
        }
        catch {
            // ignore missing optional shims
        }
    }
    return resolved;
}

/**
 * This code's groundwork is taken from https://github.com/vuejs/vetur/tree/master/vti
 */
async function openAllDocuments(workspaceUri, filePathsToIgnore, svelteCheck) {
    const absFilePaths = await findFiles(workspaceUri.fsPath, filePathsToIgnore, (filePath) => filePath.endsWith('.svelte'));
    await openDocuments(absFilePaths, svelteCheck);
}
async function openDocuments(filePaths, svelteCheck) {
    for (const absFilePath of filePaths) {
        const text = fs__namespace.readFileSync(absFilePath, 'utf-8');
        svelteCheck.upsertDocument({
            uri: URI$2.file(absFilePath).toString(),
            text
        }, true);
    }
}
async function getDiagnostics(workspaceUri, writer, svelteCheck) {
    try {
        const diagnostics = await svelteCheck.getDiagnostics();
        return writeDiagnostics(workspaceUri, writer, diagnostics);
    }
    catch (err) {
        writer.failure(err);
        return null;
    }
}
const FILE_ENDING_REGEX = /\.(svelte|d\.ts|ts|js|jsx|tsx|mjs|cjs|mts|cts)$/;
const VITE_CONFIG_REGEX = /vite\.config\.(js|ts)\.timestamp-/;
class DiagnosticsWatcher {
    constructor(workspaceUri, svelteCheck, writer, filePathsToIgnore, ignoreInitialAdd) {
        this.workspaceUri = workspaceUri;
        this.svelteCheck = svelteCheck;
        this.writer = writer;
        this.ignoreInitialAdd = ignoreInitialAdd;
        this.currentWatchedDirs = new Set();
        this.userIgnored = createIgnored(filePathsToIgnore);
        // Create watcher with initial paths
        this.watcher = require$$0$6.watch([], {
            ignored: (path, stats) => {
                if (path.includes('node_modules') ||
                    path.includes('.git') ||
                    stats?.isSocket() ||
                    (stats?.isFile() &&
                        (!FILE_ENDING_REGEX.test(path) || VITE_CONFIG_REGEX.test(path)))) {
                    return true;
                }
                if (this.userIgnored.length !== 0) {
                    // Make path relative to workspace for user ignores
                    const workspaceRelative = path.startsWith(this.workspaceUri.fsPath)
                        ? path.slice(this.workspaceUri.fsPath.length + 1)
                        : path;
                    for (const i of this.userIgnored) {
                        if (i(workspaceRelative)) {
                            return true;
                        }
                    }
                }
                return false;
            },
            ignoreInitial: this.ignoreInitialAdd
        })
            .on('add', (path) => this.updateDocument(path, true))
            .on('unlink', (path) => this.removeDocument(path))
            .on('change', (path) => this.updateDocument(path, false));
        this.updateWildcardWatcher().then(() => {
            // ensuring the typescript program is built after wildcard watchers are added
            // so that individual file watchers added from onFileSnapshotCreated
            // run after the wildcard ones
            if (this.ignoreInitialAdd) {
                getDiagnostics(this.workspaceUri, this.writer, this.svelteCheck);
            }
        });
    }
    isSubDir(candidate, parent) {
        const c = path__namespace.resolve(candidate);
        const p = path__namespace.resolve(parent);
        return c === p || c.startsWith(p + path__namespace.sep);
    }
    minimizeDirs(dirs) {
        const sorted = [...new Set(dirs.map((d) => path__namespace.resolve(d)))].sort();
        const result = [];
        for (const dir of sorted) {
            if (!result.some((p) => this.isSubDir(dir, p))) {
                result.push(dir);
            }
        }
        return result;
    }
    addWatchDirectory(dir) {
        if (!dir) {
            return;
        }
        // Skip if already covered by an existing watched directory
        for (const existing of this.currentWatchedDirs) {
            if (this.isSubDir(dir, existing)) {
                return;
            }
        }
        // Don't remove existing watchers, chokidar `unwatch` ignores future events from that path instead of closing the watcher in some cases
        for (const existing of this.currentWatchedDirs) {
            if (this.isSubDir(existing, dir)) {
                this.currentWatchedDirs.delete(existing);
            }
        }
        this.watcher.add(dir);
        this.currentWatchedDirs.add(dir);
    }
    async updateWildcardWatcher() {
        const watchDirs = await this.svelteCheck.getWatchDirectories();
        const desired = this.minimizeDirs((watchDirs?.map((d) => d.path) || [this.workspaceUri.fsPath]).map((p) => path__namespace.resolve(p)));
        const current = new Set([...this.currentWatchedDirs].map((p) => path__namespace.resolve(p)));
        const toAdd = desired.filter((d) => !current.has(d));
        if (toAdd.length) {
            this.watcher.add(toAdd);
        }
        this.currentWatchedDirs = new Set([...current, ...toAdd]);
    }
    async updateDocument(path, isNew) {
        await this.svelteCheck.upsertDocument({
            // delay reading until we actually need the text
            // prevents race conditions from crashing svelte-check when something is created and deleted immediately afterwards
            get text() {
                return fs__namespace.existsSync(path) ? fs__namespace.readFileSync(path, 'utf-8') : '';
            },
            uri: URI$2.file(path).toString()
        }, isNew);
        this.scheduleDiagnostics();
    }
    async removeDocument(path) {
        await this.svelteCheck.removeDocument(URI$2.file(path).toString());
        this.scheduleDiagnostics();
    }
    updateWildcardWatchers() {
        clearTimeout(this.pendingWatcherUpdate);
        this.pendingWatcherUpdate = setTimeout(() => this.updateWildcardWatcher(), 1000);
    }
    scheduleDiagnostics() {
        clearTimeout(this.updateDiagnostics);
        this.updateDiagnostics = setTimeout(() => getDiagnostics(this.workspaceUri, this.writer, this.svelteCheck), 1000);
    }
}
function createFilter(opts) {
    switch (opts.threshold) {
        case 'error':
            return (d) => d.severity === main$2.DiagnosticSeverity.Error;
        case 'warning':
            return (d) => d.severity === main$2.DiagnosticSeverity.Error ||
                d.severity === main$2.DiagnosticSeverity.Warning;
        default:
            return DEFAULT_FILTER;
    }
}
function instantiateWriter(opts) {
    const filter = createFilter(opts);
    if (opts.outputFormat === 'human-verbose' || opts.outputFormat === 'human') {
        return new HumanFriendlyWriter(process.stdout, opts.outputFormat === 'human-verbose', opts.watch, !opts.preserveWatchOutput, filter);
    }
    else {
        return new MachineFriendlyWriter(process.stdout, opts.outputFormat === 'machine-verbose', filter);
    }
}
function writeDiagnostics(workspaceUri, writer, diagnostics) {
    writer.start(workspaceUri.fsPath);
    const result = {
        fileCount: diagnostics.length,
        errorCount: 0,
        warningCount: 0,
        fileCountWithProblems: 0
    };
    for (const diagnostic of diagnostics) {
        writer.file(diagnostic.diagnostics, workspaceUri.fsPath, path__namespace.relative(workspaceUri.fsPath, diagnostic.filePath), diagnostic.text);
        let fileHasProblems = false;
        diagnostic.diagnostics.forEach((d) => {
            if (d.severity === main$2.DiagnosticSeverity.Error) {
                result.errorCount += 1;
                fileHasProblems = true;
            }
            else if (d.severity === main$2.DiagnosticSeverity.Warning) {
                result.warningCount += 1;
                fileHasProblems = true;
            }
        });
        if (fileHasProblems) {
            result.fileCountWithProblems += 1;
        }
    }
    writer.completion(result.fileCount, result.errorCount, result.warningCount, result.fileCountWithProblems);
    return result;
}
async function getSvelteDiagnosticsForIncremental(opts, emitResult) {
    const sources = opts.diagnosticSources;
    if (!sources.includes('svelte') && !sources.includes('css')) {
        return {
            diagnostics: [],
            compilerWarningsByFile: new Map(),
            cssDiagnosticsByFile: new Map()
        };
    }
    const diagnosticsByFile = new Map();
    const compilerWarningsByFile = new Map();
    const cssDiagnosticsByFile = new Map();
    const changedFiles = new Set(emitResult.changedFiles);
    const filesNeedingDiagnostics = [];
    const enabledSources = sources.filter((source) => source !== 'js');
    // Phase 1: Partition files into "needs fresh diagnostics" vs "use cached diagnostics"
    for (const entry of emitResult.entries) {
        const needsSvelte = sources.includes('svelte') &&
            (!entry.compilerWarnings || changedFiles.has(entry.sourcePath));
        const needsCss = sources.includes('css') &&
            (!entry.cssDiagnostics || changedFiles.has(entry.sourcePath));
        if (needsSvelte || needsCss) {
            filesNeedingDiagnostics.push(entry.sourcePath);
            continue;
        }
        if (sources.includes('svelte') && entry.compilerWarnings) {
            const text = fs__namespace.readFileSync(entry.sourcePath, 'utf-8');
            diagnosticsByFile.set(entry.sourcePath, {
                filePath: entry.sourcePath,
                text,
                diagnostics: [...entry.compilerWarnings]
            });
        }
        if (sources.includes('css') && entry.cssDiagnostics) {
            const existing = diagnosticsByFile.get(entry.sourcePath) ?? {
                filePath: entry.sourcePath,
                text: fs__namespace.readFileSync(entry.sourcePath, 'utf-8'),
                diagnostics: []
            };
            existing.diagnostics.push(...entry.cssDiagnostics);
            diagnosticsByFile.set(entry.sourcePath, existing);
        }
    }
    // Phase 2: Run fresh diagnostics for changed/uncached files via the language server
    if (enabledSources.length && filesNeedingDiagnostics.length > 0) {
        const svelteCheck = new src$1.SvelteCheck(opts.workspaceUri.fsPath, {
            compilerWarnings: opts.compilerWarnings,
            diagnosticSources: enabledSources,
            watch: false
        });
        await openDocuments(filesNeedingDiagnostics, svelteCheck);
        const runDiagnostics = await svelteCheck.getDiagnostics();
        for (const entry of runDiagnostics) {
            diagnosticsByFile.set(entry.filePath, entry);
            if (sources.includes('svelte')) {
                compilerWarningsByFile.set(entry.filePath, entry.diagnostics.filter((diag) => diag.source === 'svelte'));
            }
            if (sources.includes('css')) {
                cssDiagnosticsByFile.set(entry.filePath, entry.diagnostics.filter((diag) => diag.source === 'css'));
            }
        }
        for (const filePath of filesNeedingDiagnostics) {
            if (sources.includes('svelte') && !compilerWarningsByFile.has(filePath)) {
                compilerWarningsByFile.set(filePath, []);
            }
            if (sources.includes('css') && !cssDiagnosticsByFile.has(filePath)) {
                cssDiagnosticsByFile.set(filePath, []);
            }
            if (!diagnosticsByFile.has(filePath)) {
                const text = fs__namespace.readFileSync(filePath, 'utf-8');
                const diagnostics = [];
                if (sources.includes('svelte')) {
                    diagnostics.push(...(compilerWarningsByFile.get(filePath) ?? []));
                }
                if (sources.includes('css')) {
                    diagnostics.push(...(cssDiagnosticsByFile.get(filePath) ?? []));
                }
                diagnosticsByFile.set(filePath, {
                    filePath,
                    text,
                    diagnostics
                });
            }
        }
    }
    // Phase 3: Ensure every entry has a diagnostics record (empty if no diagnostics)
    for (const entry of emitResult.entries) {
        if (!diagnosticsByFile.has(entry.sourcePath)) {
            const text = fs__namespace.readFileSync(entry.sourcePath, 'utf-8');
            diagnosticsByFile.set(entry.sourcePath, {
                filePath: entry.sourcePath,
                text,
                diagnostics: []
            });
        }
    }
    return {
        diagnostics: Array.from(diagnosticsByFile.values()),
        compilerWarningsByFile,
        cssDiagnosticsByFile
    };
}
async function runWithVirtualFiles(opts, writer) {
    if (!opts.tsconfig) {
        throw new Error('`--incremental` / `--tsgo` requires a tsconfig/jsconfig file');
    }
    const emitResult = await emitSvelteFiles(opts.workspaceUri.fsPath, opts.filePathsToIgnore, opts.incremental);
    const overlayTsconfig = writeOverlayTsconfig(opts.tsconfig, emitResult, opts.incremental, opts.tsgo);
    const tsDiagnostics = mapCliDiagnosticsToLsp(await runTypeScriptDiagnostics(overlayTsconfig, opts.tsgo, opts.incremental, opts.workspaceUri.fsPath), emitResult, opts.tsconfig);
    const { diagnostics: svelteDiagnostics, compilerWarningsByFile, cssDiagnosticsByFile } = await getSvelteDiagnosticsForIncremental(opts, emitResult);
    if (opts.incremental) {
        updateDiagnosticsCache(emitResult, {
            compilerWarningsByFile,
            cssDiagnosticsByFile
        });
    }
    const diagnosticsByFile = new Map();
    for (const entry of svelteDiagnostics) {
        diagnosticsByFile.set(entry.filePath, {
            filePath: entry.filePath,
            text: entry.text,
            diagnostics: entry.diagnostics
        });
    }
    for (const entry of tsDiagnostics) {
        const existing = diagnosticsByFile.get(entry.filePath) ?? {
            filePath: entry.filePath,
            text: entry.text,
            diagnostics: []
        };
        existing.diagnostics.push(...entry.diagnostics);
        diagnosticsByFile.set(entry.filePath, existing);
    }
    return writeDiagnostics(opts.workspaceUri, writer, Array.from(diagnosticsByFile.values()));
}
async function watchWithVirtualFiles(opts, writer) {
    let pending;
    let running = false;
    let rerun = false;
    const userIgnored = createIgnored(opts.filePathsToIgnore);
    const run = async () => {
        if (running) {
            rerun = true;
            return;
        }
        running = true;
        try {
            await runWithVirtualFiles(opts, writer);
        }
        catch (err) {
            writer.failure(err);
        }
        finally {
            running = false;
            if (rerun) {
                rerun = false;
                run();
            }
        }
    };
    const schedule = () => {
        clearTimeout(pending);
        pending = setTimeout(run, 1000);
    };
    await run();
    require$$0$6.watch([], {
        ignored: (path, stats) => {
            if (path.includes('node_modules') ||
                path.includes('.git') ||
                (stats?.isFile() && (!FILE_ENDING_REGEX.test(path) || VITE_CONFIG_REGEX.test(path)))) {
                return true;
            }
            if (userIgnored.length !== 0) {
                const workspaceRelative = path.startsWith(opts.workspaceUri.fsPath)
                    ? path.slice(opts.workspaceUri.fsPath.length + 1)
                    : path;
                for (const i of userIgnored) {
                    if (i(workspaceRelative)) {
                        return true;
                    }
                }
            }
            return false;
        },
        ignoreInitial: true
    })
        .on('add', schedule)
        .on('unlink', schedule)
        .on('change', schedule)
        .add(opts.workspaceUri.fsPath);
}
// `process.stdout.write` is asynchronous on non-TTY pipes, and `process.exit`
// does not wait for queued writes to drain. Under heavy diagnostic load this
// caused the output to be cut short when using `--output machine-verbose`.
function exitAfterFlush(code) {
    let pending = 2;
    const done = () => {
        if (--pending === 0)
            process.exit(code);
    };
    process.stdout.write('', done);
    process.stderr.write('', done);
}
parseOptions(async (opts) => {
    try {
        const writer = instantiateWriter(opts);
        const svelteCheckOptions = {
            compilerWarnings: opts.compilerWarnings,
            diagnosticSources: opts.diagnosticSources,
            tsconfig: opts.tsconfig,
            watch: opts.watch
        };
        const useVirtualFiles = opts.incremental || opts.tsgo;
        if (useVirtualFiles && opts.watch) {
            await watchWithVirtualFiles(opts, writer);
        }
        else if (useVirtualFiles) {
            const result = await runWithVirtualFiles(opts, writer);
            const exitCode = result &&
                result.errorCount === 0 &&
                (!opts.failOnWarnings || result.warningCount === 0)
                ? 0
                : 1;
            exitAfterFlush(exitCode);
        }
        else if (opts.watch) {
            // Wire callbacks that can reference the watcher instance created below
            let watcher;
            svelteCheckOptions.onProjectReload = () => {
                watcher.updateWildcardWatchers();
                watcher.scheduleDiagnostics();
            };
            svelteCheckOptions.onFileSnapshotCreated = (filePath) => {
                const dirPath = path__namespace.dirname(filePath);
                watcher.addWatchDirectory(dirPath);
            };
            watcher = new DiagnosticsWatcher(opts.workspaceUri, new src$1.SvelteCheck(opts.workspaceUri.fsPath, svelteCheckOptions), writer, opts.filePathsToIgnore, !!opts.tsconfig);
        }
        else {
            const svelteCheck = new src$1.SvelteCheck(opts.workspaceUri.fsPath, svelteCheckOptions);
            if (!opts.tsconfig) {
                await openAllDocuments(opts.workspaceUri, opts.filePathsToIgnore, svelteCheck);
            }
            const result = await getDiagnostics(opts.workspaceUri, writer, svelteCheck);
            const exitCode = result &&
                result.errorCount === 0 &&
                (!opts.failOnWarnings || result.warningCount === 0)
                ? 0
                : 1;
            exitAfterFlush(exitCode);
        }
    }
    catch (_err) {
        console.error(_err);
        console.error('svelte-check failed');
    }
});
