39014 lines
1.3 MiB
39014 lines
1.3 MiB
(() => {
|
||
var __create = Object.create;
|
||
var __defProp = Object.defineProperty;
|
||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||
var __getProtoOf = Object.getPrototypeOf;
|
||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||
var __commonJS = (cb, mod) => function __require() {
|
||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||
};
|
||
var __export = (target, all) => {
|
||
for (var name42 in all)
|
||
__defProp(target, name42, { get: all[name42], 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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||
// If the importer is in node compatibility mode or this is not an ESM
|
||
// file that has been converted to a CommonJS file using a Babel-
|
||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||
mod
|
||
));
|
||
|
||
// node_modules/events/events.js
|
||
var require_events = __commonJS({
|
||
"node_modules/events/events.js"(exports, module) {
|
||
"use strict";
|
||
var R4 = typeof Reflect === "object" ? Reflect : null;
|
||
var ReflectApply = R4 && typeof R4.apply === "function" ? R4.apply : function ReflectApply2(target, receiver, args) {
|
||
return Function.prototype.apply.call(target, receiver, args);
|
||
};
|
||
var ReflectOwnKeys;
|
||
if (R4 && typeof R4.ownKeys === "function") {
|
||
ReflectOwnKeys = R4.ownKeys;
|
||
} else if (Object.getOwnPropertySymbols) {
|
||
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
||
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
||
};
|
||
} else {
|
||
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
||
return Object.getOwnPropertyNames(target);
|
||
};
|
||
}
|
||
function ProcessEmitWarning(warning) {
|
||
if (console && console.warn)
|
||
console.warn(warning);
|
||
}
|
||
var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
|
||
return value !== value;
|
||
};
|
||
function EventEmitter5() {
|
||
EventEmitter5.init.call(this);
|
||
}
|
||
module.exports = EventEmitter5;
|
||
module.exports.once = once;
|
||
EventEmitter5.EventEmitter = EventEmitter5;
|
||
EventEmitter5.prototype._events = void 0;
|
||
EventEmitter5.prototype._eventsCount = 0;
|
||
EventEmitter5.prototype._maxListeners = void 0;
|
||
var defaultMaxListeners = 10;
|
||
function checkListener(listener) {
|
||
if (typeof listener !== "function") {
|
||
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
||
}
|
||
}
|
||
Object.defineProperty(EventEmitter5, "defaultMaxListeners", {
|
||
enumerable: true,
|
||
get: function() {
|
||
return defaultMaxListeners;
|
||
},
|
||
set: function(arg) {
|
||
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
||
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
||
}
|
||
defaultMaxListeners = arg;
|
||
}
|
||
});
|
||
EventEmitter5.init = function() {
|
||
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
||
this._events = /* @__PURE__ */ Object.create(null);
|
||
this._eventsCount = 0;
|
||
}
|
||
this._maxListeners = this._maxListeners || void 0;
|
||
};
|
||
EventEmitter5.prototype.setMaxListeners = function setMaxListeners(n) {
|
||
if (typeof n !== "number" || n < 0 || NumberIsNaN(n)) {
|
||
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + ".");
|
||
}
|
||
this._maxListeners = n;
|
||
return this;
|
||
};
|
||
function _getMaxListeners(that) {
|
||
if (that._maxListeners === void 0)
|
||
return EventEmitter5.defaultMaxListeners;
|
||
return that._maxListeners;
|
||
}
|
||
EventEmitter5.prototype.getMaxListeners = function getMaxListeners() {
|
||
return _getMaxListeners(this);
|
||
};
|
||
EventEmitter5.prototype.emit = function emit(type) {
|
||
var args = [];
|
||
for (var i = 1; i < arguments.length; i++)
|
||
args.push(arguments[i]);
|
||
var doError = type === "error";
|
||
var events = this._events;
|
||
if (events !== void 0)
|
||
doError = doError && events.error === void 0;
|
||
else if (!doError)
|
||
return false;
|
||
if (doError) {
|
||
var er;
|
||
if (args.length > 0)
|
||
er = args[0];
|
||
if (er instanceof Error) {
|
||
throw er;
|
||
}
|
||
var err = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
|
||
err.context = er;
|
||
throw err;
|
||
}
|
||
var handler = events[type];
|
||
if (handler === void 0)
|
||
return false;
|
||
if (typeof handler === "function") {
|
||
ReflectApply(handler, this, args);
|
||
} else {
|
||
var len = handler.length;
|
||
var listeners = arrayClone(handler, len);
|
||
for (var i = 0; i < len; ++i)
|
||
ReflectApply(listeners[i], this, args);
|
||
}
|
||
return true;
|
||
};
|
||
function _addListener(target, type, listener, prepend) {
|
||
var m;
|
||
var events;
|
||
var existing;
|
||
checkListener(listener);
|
||
events = target._events;
|
||
if (events === void 0) {
|
||
events = target._events = /* @__PURE__ */ Object.create(null);
|
||
target._eventsCount = 0;
|
||
} else {
|
||
if (events.newListener !== void 0) {
|
||
target.emit(
|
||
"newListener",
|
||
type,
|
||
listener.listener ? listener.listener : listener
|
||
);
|
||
events = target._events;
|
||
}
|
||
existing = events[type];
|
||
}
|
||
if (existing === void 0) {
|
||
existing = events[type] = listener;
|
||
++target._eventsCount;
|
||
} else {
|
||
if (typeof existing === "function") {
|
||
existing = events[type] = prepend ? [listener, existing] : [existing, listener];
|
||
} else if (prepend) {
|
||
existing.unshift(listener);
|
||
} else {
|
||
existing.push(listener);
|
||
}
|
||
m = _getMaxListeners(target);
|
||
if (m > 0 && existing.length > m && !existing.warned) {
|
||
existing.warned = true;
|
||
var w = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
||
w.name = "MaxListenersExceededWarning";
|
||
w.emitter = target;
|
||
w.type = type;
|
||
w.count = existing.length;
|
||
ProcessEmitWarning(w);
|
||
}
|
||
}
|
||
return target;
|
||
}
|
||
EventEmitter5.prototype.addListener = function addListener(type, listener) {
|
||
return _addListener(this, type, listener, false);
|
||
};
|
||
EventEmitter5.prototype.on = EventEmitter5.prototype.addListener;
|
||
EventEmitter5.prototype.prependListener = function prependListener(type, listener) {
|
||
return _addListener(this, type, listener, true);
|
||
};
|
||
function onceWrapper() {
|
||
if (!this.fired) {
|
||
this.target.removeListener(this.type, this.wrapFn);
|
||
this.fired = true;
|
||
if (arguments.length === 0)
|
||
return this.listener.call(this.target);
|
||
return this.listener.apply(this.target, arguments);
|
||
}
|
||
}
|
||
function _onceWrap(target, type, listener) {
|
||
var state = { fired: false, wrapFn: void 0, target, type, listener };
|
||
var wrapped = onceWrapper.bind(state);
|
||
wrapped.listener = listener;
|
||
state.wrapFn = wrapped;
|
||
return wrapped;
|
||
}
|
||
EventEmitter5.prototype.once = function once2(type, listener) {
|
||
checkListener(listener);
|
||
this.on(type, _onceWrap(this, type, listener));
|
||
return this;
|
||
};
|
||
EventEmitter5.prototype.prependOnceListener = function prependOnceListener(type, listener) {
|
||
checkListener(listener);
|
||
this.prependListener(type, _onceWrap(this, type, listener));
|
||
return this;
|
||
};
|
||
EventEmitter5.prototype.removeListener = function removeListener(type, listener) {
|
||
var list, events, position, i, originalListener;
|
||
checkListener(listener);
|
||
events = this._events;
|
||
if (events === void 0)
|
||
return this;
|
||
list = events[type];
|
||
if (list === void 0)
|
||
return this;
|
||
if (list === listener || list.listener === listener) {
|
||
if (--this._eventsCount === 0)
|
||
this._events = /* @__PURE__ */ Object.create(null);
|
||
else {
|
||
delete events[type];
|
||
if (events.removeListener)
|
||
this.emit("removeListener", type, list.listener || listener);
|
||
}
|
||
} else if (typeof list !== "function") {
|
||
position = -1;
|
||
for (i = list.length - 1; i >= 0; i--) {
|
||
if (list[i] === listener || list[i].listener === listener) {
|
||
originalListener = list[i].listener;
|
||
position = i;
|
||
break;
|
||
}
|
||
}
|
||
if (position < 0)
|
||
return this;
|
||
if (position === 0)
|
||
list.shift();
|
||
else {
|
||
spliceOne(list, position);
|
||
}
|
||
if (list.length === 1)
|
||
events[type] = list[0];
|
||
if (events.removeListener !== void 0)
|
||
this.emit("removeListener", type, originalListener || listener);
|
||
}
|
||
return this;
|
||
};
|
||
EventEmitter5.prototype.off = EventEmitter5.prototype.removeListener;
|
||
EventEmitter5.prototype.removeAllListeners = function removeAllListeners(type) {
|
||
var listeners, events, i;
|
||
events = this._events;
|
||
if (events === void 0)
|
||
return this;
|
||
if (events.removeListener === void 0) {
|
||
if (arguments.length === 0) {
|
||
this._events = /* @__PURE__ */ Object.create(null);
|
||
this._eventsCount = 0;
|
||
} else if (events[type] !== void 0) {
|
||
if (--this._eventsCount === 0)
|
||
this._events = /* @__PURE__ */ Object.create(null);
|
||
else
|
||
delete events[type];
|
||
}
|
||
return this;
|
||
}
|
||
if (arguments.length === 0) {
|
||
var keys = Object.keys(events);
|
||
var key;
|
||
for (i = 0; i < keys.length; ++i) {
|
||
key = keys[i];
|
||
if (key === "removeListener")
|
||
continue;
|
||
this.removeAllListeners(key);
|
||
}
|
||
this.removeAllListeners("removeListener");
|
||
this._events = /* @__PURE__ */ Object.create(null);
|
||
this._eventsCount = 0;
|
||
return this;
|
||
}
|
||
listeners = events[type];
|
||
if (typeof listeners === "function") {
|
||
this.removeListener(type, listeners);
|
||
} else if (listeners !== void 0) {
|
||
for (i = listeners.length - 1; i >= 0; i--) {
|
||
this.removeListener(type, listeners[i]);
|
||
}
|
||
}
|
||
return this;
|
||
};
|
||
function _listeners(target, type, unwrap3) {
|
||
var events = target._events;
|
||
if (events === void 0)
|
||
return [];
|
||
var evlistener = events[type];
|
||
if (evlistener === void 0)
|
||
return [];
|
||
if (typeof evlistener === "function")
|
||
return unwrap3 ? [evlistener.listener || evlistener] : [evlistener];
|
||
return unwrap3 ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
||
}
|
||
EventEmitter5.prototype.listeners = function listeners(type) {
|
||
return _listeners(this, type, true);
|
||
};
|
||
EventEmitter5.prototype.rawListeners = function rawListeners(type) {
|
||
return _listeners(this, type, false);
|
||
};
|
||
EventEmitter5.listenerCount = function(emitter, type) {
|
||
if (typeof emitter.listenerCount === "function") {
|
||
return emitter.listenerCount(type);
|
||
} else {
|
||
return listenerCount.call(emitter, type);
|
||
}
|
||
};
|
||
EventEmitter5.prototype.listenerCount = listenerCount;
|
||
function listenerCount(type) {
|
||
var events = this._events;
|
||
if (events !== void 0) {
|
||
var evlistener = events[type];
|
||
if (typeof evlistener === "function") {
|
||
return 1;
|
||
} else if (evlistener !== void 0) {
|
||
return evlistener.length;
|
||
}
|
||
}
|
||
return 0;
|
||
}
|
||
EventEmitter5.prototype.eventNames = function eventNames() {
|
||
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
||
};
|
||
function arrayClone(arr, n) {
|
||
var copy = new Array(n);
|
||
for (var i = 0; i < n; ++i)
|
||
copy[i] = arr[i];
|
||
return copy;
|
||
}
|
||
function spliceOne(list, index) {
|
||
for (; index + 1 < list.length; index++)
|
||
list[index] = list[index + 1];
|
||
list.pop();
|
||
}
|
||
function unwrapListeners(arr) {
|
||
var ret = new Array(arr.length);
|
||
for (var i = 0; i < ret.length; ++i) {
|
||
ret[i] = arr[i].listener || arr[i];
|
||
}
|
||
return ret;
|
||
}
|
||
function once(emitter, name42) {
|
||
return new Promise(function(resolve, reject) {
|
||
function errorListener(err) {
|
||
emitter.removeListener(name42, resolver);
|
||
reject(err);
|
||
}
|
||
function resolver() {
|
||
if (typeof emitter.removeListener === "function") {
|
||
emitter.removeListener("error", errorListener);
|
||
}
|
||
resolve([].slice.call(arguments));
|
||
}
|
||
;
|
||
eventTargetAgnosticAddListener(emitter, name42, resolver, { once: true });
|
||
if (name42 !== "error") {
|
||
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
||
}
|
||
});
|
||
}
|
||
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
||
if (typeof emitter.on === "function") {
|
||
eventTargetAgnosticAddListener(emitter, "error", handler, flags);
|
||
}
|
||
}
|
||
function eventTargetAgnosticAddListener(emitter, name42, listener, flags) {
|
||
if (typeof emitter.on === "function") {
|
||
if (flags.once) {
|
||
emitter.once(name42, listener);
|
||
} else {
|
||
emitter.on(name42, listener);
|
||
}
|
||
} else if (typeof emitter.addEventListener === "function") {
|
||
emitter.addEventListener(name42, function wrapListener(arg) {
|
||
if (flags.once) {
|
||
emitter.removeEventListener(name42, wrapListener);
|
||
}
|
||
listener(arg);
|
||
});
|
||
} else {
|
||
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
// node_modules/source-map-js/lib/base64.js
|
||
var require_base64 = __commonJS({
|
||
"node_modules/source-map-js/lib/base64.js"(exports) {
|
||
var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
||
exports.encode = function(number2) {
|
||
if (0 <= number2 && number2 < intToCharMap.length) {
|
||
return intToCharMap[number2];
|
||
}
|
||
throw new TypeError("Must be between 0 and 63: " + number2);
|
||
};
|
||
exports.decode = function(charCode) {
|
||
var bigA = 65;
|
||
var bigZ = 90;
|
||
var littleA = 97;
|
||
var littleZ = 122;
|
||
var zero2 = 48;
|
||
var nine = 57;
|
||
var plus = 43;
|
||
var slash = 47;
|
||
var littleOffset = 26;
|
||
var numberOffset = 52;
|
||
if (bigA <= charCode && charCode <= bigZ) {
|
||
return charCode - bigA;
|
||
}
|
||
if (littleA <= charCode && charCode <= littleZ) {
|
||
return charCode - littleA + littleOffset;
|
||
}
|
||
if (zero2 <= charCode && charCode <= nine) {
|
||
return charCode - zero2 + numberOffset;
|
||
}
|
||
if (charCode == plus) {
|
||
return 62;
|
||
}
|
||
if (charCode == slash) {
|
||
return 63;
|
||
}
|
||
return -1;
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/source-map-js/lib/base64-vlq.js
|
||
var require_base64_vlq = __commonJS({
|
||
"node_modules/source-map-js/lib/base64-vlq.js"(exports) {
|
||
var base642 = require_base64();
|
||
var VLQ_BASE_SHIFT = 5;
|
||
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
|
||
var VLQ_BASE_MASK = VLQ_BASE - 1;
|
||
var VLQ_CONTINUATION_BIT = VLQ_BASE;
|
||
function toVLQSigned(aValue) {
|
||
return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
|
||
}
|
||
function fromVLQSigned(aValue) {
|
||
var isNegative = (aValue & 1) === 1;
|
||
var shifted = aValue >> 1;
|
||
return isNegative ? -shifted : shifted;
|
||
}
|
||
exports.encode = function base64VLQ_encode(aValue) {
|
||
var encoded = "";
|
||
var digit;
|
||
var vlq = toVLQSigned(aValue);
|
||
do {
|
||
digit = vlq & VLQ_BASE_MASK;
|
||
vlq >>>= VLQ_BASE_SHIFT;
|
||
if (vlq > 0) {
|
||
digit |= VLQ_CONTINUATION_BIT;
|
||
}
|
||
encoded += base642.encode(digit);
|
||
} while (vlq > 0);
|
||
return encoded;
|
||
};
|
||
exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
|
||
var strLen = aStr.length;
|
||
var result = 0;
|
||
var shift = 0;
|
||
var continuation, digit;
|
||
do {
|
||
if (aIndex >= strLen) {
|
||
throw new Error("Expected more digits in base 64 VLQ value.");
|
||
}
|
||
digit = base642.decode(aStr.charCodeAt(aIndex++));
|
||
if (digit === -1) {
|
||
throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
|
||
}
|
||
continuation = !!(digit & VLQ_CONTINUATION_BIT);
|
||
digit &= VLQ_BASE_MASK;
|
||
result = result + (digit << shift);
|
||
shift += VLQ_BASE_SHIFT;
|
||
} while (continuation);
|
||
aOutParam.value = fromVLQSigned(result);
|
||
aOutParam.rest = aIndex;
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/source-map-js/lib/util.js
|
||
var require_util = __commonJS({
|
||
"node_modules/source-map-js/lib/util.js"(exports) {
|
||
function getArg(aArgs, aName, aDefaultValue) {
|
||
if (aName in aArgs) {
|
||
return aArgs[aName];
|
||
} else if (arguments.length === 3) {
|
||
return aDefaultValue;
|
||
} else {
|
||
throw new Error('"' + aName + '" is a required argument.');
|
||
}
|
||
}
|
||
exports.getArg = getArg;
|
||
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
||
var dataUrlRegexp = /^data:.+\,.+$/;
|
||
function urlParse(aUrl) {
|
||
var match = aUrl.match(urlRegexp);
|
||
if (!match) {
|
||
return null;
|
||
}
|
||
return {
|
||
scheme: match[1],
|
||
auth: match[2],
|
||
host: match[3],
|
||
port: match[4],
|
||
path: match[5]
|
||
};
|
||
}
|
||
exports.urlParse = urlParse;
|
||
function urlGenerate(aParsedUrl) {
|
||
var url2 = "";
|
||
if (aParsedUrl.scheme) {
|
||
url2 += aParsedUrl.scheme + ":";
|
||
}
|
||
url2 += "//";
|
||
if (aParsedUrl.auth) {
|
||
url2 += aParsedUrl.auth + "@";
|
||
}
|
||
if (aParsedUrl.host) {
|
||
url2 += aParsedUrl.host;
|
||
}
|
||
if (aParsedUrl.port) {
|
||
url2 += ":" + aParsedUrl.port;
|
||
}
|
||
if (aParsedUrl.path) {
|
||
url2 += aParsedUrl.path;
|
||
}
|
||
return url2;
|
||
}
|
||
exports.urlGenerate = urlGenerate;
|
||
var MAX_CACHED_INPUTS = 32;
|
||
function lruMemoize(f) {
|
||
var cache = [];
|
||
return function(input) {
|
||
for (var i = 0; i < cache.length; i++) {
|
||
if (cache[i].input === input) {
|
||
var temp = cache[0];
|
||
cache[0] = cache[i];
|
||
cache[i] = temp;
|
||
return cache[0].result;
|
||
}
|
||
}
|
||
var result = f(input);
|
||
cache.unshift({
|
||
input,
|
||
result
|
||
});
|
||
if (cache.length > MAX_CACHED_INPUTS) {
|
||
cache.pop();
|
||
}
|
||
return result;
|
||
};
|
||
}
|
||
var normalize = lruMemoize(function normalize2(aPath) {
|
||
var path = aPath;
|
||
var url2 = urlParse(aPath);
|
||
if (url2) {
|
||
if (!url2.path) {
|
||
return aPath;
|
||
}
|
||
path = url2.path;
|
||
}
|
||
var isAbsolute = exports.isAbsolute(path);
|
||
var parts = [];
|
||
var start = 0;
|
||
var i = 0;
|
||
while (true) {
|
||
start = i;
|
||
i = path.indexOf("/", start);
|
||
if (i === -1) {
|
||
parts.push(path.slice(start));
|
||
break;
|
||
} else {
|
||
parts.push(path.slice(start, i));
|
||
while (i < path.length && path[i] === "/") {
|
||
i++;
|
||
}
|
||
}
|
||
}
|
||
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
||
part = parts[i];
|
||
if (part === ".") {
|
||
parts.splice(i, 1);
|
||
} else if (part === "..") {
|
||
up++;
|
||
} else if (up > 0) {
|
||
if (part === "") {
|
||
parts.splice(i + 1, up);
|
||
up = 0;
|
||
} else {
|
||
parts.splice(i, 2);
|
||
up--;
|
||
}
|
||
}
|
||
}
|
||
path = parts.join("/");
|
||
if (path === "") {
|
||
path = isAbsolute ? "/" : ".";
|
||
}
|
||
if (url2) {
|
||
url2.path = path;
|
||
return urlGenerate(url2);
|
||
}
|
||
return path;
|
||
});
|
||
exports.normalize = normalize;
|
||
function join(aRoot, aPath) {
|
||
if (aRoot === "") {
|
||
aRoot = ".";
|
||
}
|
||
if (aPath === "") {
|
||
aPath = ".";
|
||
}
|
||
var aPathUrl = urlParse(aPath);
|
||
var aRootUrl = urlParse(aRoot);
|
||
if (aRootUrl) {
|
||
aRoot = aRootUrl.path || "/";
|
||
}
|
||
if (aPathUrl && !aPathUrl.scheme) {
|
||
if (aRootUrl) {
|
||
aPathUrl.scheme = aRootUrl.scheme;
|
||
}
|
||
return urlGenerate(aPathUrl);
|
||
}
|
||
if (aPathUrl || aPath.match(dataUrlRegexp)) {
|
||
return aPath;
|
||
}
|
||
if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
|
||
aRootUrl.host = aPath;
|
||
return urlGenerate(aRootUrl);
|
||
}
|
||
var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath);
|
||
if (aRootUrl) {
|
||
aRootUrl.path = joined;
|
||
return urlGenerate(aRootUrl);
|
||
}
|
||
return joined;
|
||
}
|
||
exports.join = join;
|
||
exports.isAbsolute = function(aPath) {
|
||
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
||
};
|
||
function relative(aRoot, aPath) {
|
||
if (aRoot === "") {
|
||
aRoot = ".";
|
||
}
|
||
aRoot = aRoot.replace(/\/$/, "");
|
||
var level = 0;
|
||
while (aPath.indexOf(aRoot + "/") !== 0) {
|
||
var index = aRoot.lastIndexOf("/");
|
||
if (index < 0) {
|
||
return aPath;
|
||
}
|
||
aRoot = aRoot.slice(0, index);
|
||
if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
|
||
return aPath;
|
||
}
|
||
++level;
|
||
}
|
||
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
||
}
|
||
exports.relative = relative;
|
||
var supportsNullProto = function() {
|
||
var obj = /* @__PURE__ */ Object.create(null);
|
||
return !("__proto__" in obj);
|
||
}();
|
||
function identity(s) {
|
||
return s;
|
||
}
|
||
function toSetString(aStr) {
|
||
if (isProtoString(aStr)) {
|
||
return "$" + aStr;
|
||
}
|
||
return aStr;
|
||
}
|
||
exports.toSetString = supportsNullProto ? identity : toSetString;
|
||
function fromSetString(aStr) {
|
||
if (isProtoString(aStr)) {
|
||
return aStr.slice(1);
|
||
}
|
||
return aStr;
|
||
}
|
||
exports.fromSetString = supportsNullProto ? identity : fromSetString;
|
||
function isProtoString(s) {
|
||
if (!s) {
|
||
return false;
|
||
}
|
||
var length2 = s.length;
|
||
if (length2 < 9) {
|
||
return false;
|
||
}
|
||
if (s.charCodeAt(length2 - 1) !== 95 || s.charCodeAt(length2 - 2) !== 95 || s.charCodeAt(length2 - 3) !== 111 || s.charCodeAt(length2 - 4) !== 116 || s.charCodeAt(length2 - 5) !== 111 || s.charCodeAt(length2 - 6) !== 114 || s.charCodeAt(length2 - 7) !== 112 || s.charCodeAt(length2 - 8) !== 95 || s.charCodeAt(length2 - 9) !== 95) {
|
||
return false;
|
||
}
|
||
for (var i = length2 - 10; i >= 0; i--) {
|
||
if (s.charCodeAt(i) !== 36) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
|
||
var cmp = strcmp(mappingA.source, mappingB.source);
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.originalLine - mappingB.originalLine;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
||
if (cmp !== 0 || onlyCompareOriginal) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.generatedLine - mappingB.generatedLine;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
return strcmp(mappingA.name, mappingB.name);
|
||
}
|
||
exports.compareByOriginalPositions = compareByOriginalPositions;
|
||
function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) {
|
||
var cmp;
|
||
cmp = mappingA.originalLine - mappingB.originalLine;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
||
if (cmp !== 0 || onlyCompareOriginal) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.generatedLine - mappingB.generatedLine;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
return strcmp(mappingA.name, mappingB.name);
|
||
}
|
||
exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;
|
||
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
|
||
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
||
if (cmp !== 0 || onlyCompareGenerated) {
|
||
return cmp;
|
||
}
|
||
cmp = strcmp(mappingA.source, mappingB.source);
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.originalLine - mappingB.originalLine;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
return strcmp(mappingA.name, mappingB.name);
|
||
}
|
||
exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
|
||
function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) {
|
||
var cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
||
if (cmp !== 0 || onlyCompareGenerated) {
|
||
return cmp;
|
||
}
|
||
cmp = strcmp(mappingA.source, mappingB.source);
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.originalLine - mappingB.originalLine;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
return strcmp(mappingA.name, mappingB.name);
|
||
}
|
||
exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;
|
||
function strcmp(aStr1, aStr2) {
|
||
if (aStr1 === aStr2) {
|
||
return 0;
|
||
}
|
||
if (aStr1 === null) {
|
||
return 1;
|
||
}
|
||
if (aStr2 === null) {
|
||
return -1;
|
||
}
|
||
if (aStr1 > aStr2) {
|
||
return 1;
|
||
}
|
||
return -1;
|
||
}
|
||
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
|
||
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = strcmp(mappingA.source, mappingB.source);
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.originalLine - mappingB.originalLine;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
||
if (cmp !== 0) {
|
||
return cmp;
|
||
}
|
||
return strcmp(mappingA.name, mappingB.name);
|
||
}
|
||
exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
|
||
function parseSourceMapInput(str) {
|
||
return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
|
||
}
|
||
exports.parseSourceMapInput = parseSourceMapInput;
|
||
function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
|
||
sourceURL = sourceURL || "";
|
||
if (sourceRoot) {
|
||
if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") {
|
||
sourceRoot += "/";
|
||
}
|
||
sourceURL = sourceRoot + sourceURL;
|
||
}
|
||
if (sourceMapURL) {
|
||
var parsed = urlParse(sourceMapURL);
|
||
if (!parsed) {
|
||
throw new Error("sourceMapURL could not be parsed");
|
||
}
|
||
if (parsed.path) {
|
||
var index = parsed.path.lastIndexOf("/");
|
||
if (index >= 0) {
|
||
parsed.path = parsed.path.substring(0, index + 1);
|
||
}
|
||
}
|
||
sourceURL = join(urlGenerate(parsed), sourceURL);
|
||
}
|
||
return normalize(sourceURL);
|
||
}
|
||
exports.computeSourceURL = computeSourceURL;
|
||
}
|
||
});
|
||
|
||
// node_modules/source-map-js/lib/array-set.js
|
||
var require_array_set = __commonJS({
|
||
"node_modules/source-map-js/lib/array-set.js"(exports) {
|
||
var util = require_util();
|
||
var has = Object.prototype.hasOwnProperty;
|
||
var hasNativeMap = typeof Map !== "undefined";
|
||
function ArraySet() {
|
||
this._array = [];
|
||
this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
||
}
|
||
ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
|
||
var set = new ArraySet();
|
||
for (var i = 0, len = aArray.length; i < len; i++) {
|
||
set.add(aArray[i], aAllowDuplicates);
|
||
}
|
||
return set;
|
||
};
|
||
ArraySet.prototype.size = function ArraySet_size() {
|
||
return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
|
||
};
|
||
ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
|
||
var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
|
||
var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
|
||
var idx = this._array.length;
|
||
if (!isDuplicate || aAllowDuplicates) {
|
||
this._array.push(aStr);
|
||
}
|
||
if (!isDuplicate) {
|
||
if (hasNativeMap) {
|
||
this._set.set(aStr, idx);
|
||
} else {
|
||
this._set[sStr] = idx;
|
||
}
|
||
}
|
||
};
|
||
ArraySet.prototype.has = function ArraySet_has(aStr) {
|
||
if (hasNativeMap) {
|
||
return this._set.has(aStr);
|
||
} else {
|
||
var sStr = util.toSetString(aStr);
|
||
return has.call(this._set, sStr);
|
||
}
|
||
};
|
||
ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
|
||
if (hasNativeMap) {
|
||
var idx = this._set.get(aStr);
|
||
if (idx >= 0) {
|
||
return idx;
|
||
}
|
||
} else {
|
||
var sStr = util.toSetString(aStr);
|
||
if (has.call(this._set, sStr)) {
|
||
return this._set[sStr];
|
||
}
|
||
}
|
||
throw new Error('"' + aStr + '" is not in the set.');
|
||
};
|
||
ArraySet.prototype.at = function ArraySet_at(aIdx) {
|
||
if (aIdx >= 0 && aIdx < this._array.length) {
|
||
return this._array[aIdx];
|
||
}
|
||
throw new Error("No element indexed by " + aIdx);
|
||
};
|
||
ArraySet.prototype.toArray = function ArraySet_toArray() {
|
||
return this._array.slice();
|
||
};
|
||
exports.ArraySet = ArraySet;
|
||
}
|
||
});
|
||
|
||
// node_modules/source-map-js/lib/mapping-list.js
|
||
var require_mapping_list = __commonJS({
|
||
"node_modules/source-map-js/lib/mapping-list.js"(exports) {
|
||
var util = require_util();
|
||
function generatedPositionAfter(mappingA, mappingB) {
|
||
var lineA = mappingA.generatedLine;
|
||
var lineB = mappingB.generatedLine;
|
||
var columnA = mappingA.generatedColumn;
|
||
var columnB = mappingB.generatedColumn;
|
||
return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
|
||
}
|
||
function MappingList() {
|
||
this._array = [];
|
||
this._sorted = true;
|
||
this._last = { generatedLine: -1, generatedColumn: 0 };
|
||
}
|
||
MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
|
||
this._array.forEach(aCallback, aThisArg);
|
||
};
|
||
MappingList.prototype.add = function MappingList_add(aMapping) {
|
||
if (generatedPositionAfter(this._last, aMapping)) {
|
||
this._last = aMapping;
|
||
this._array.push(aMapping);
|
||
} else {
|
||
this._sorted = false;
|
||
this._array.push(aMapping);
|
||
}
|
||
};
|
||
MappingList.prototype.toArray = function MappingList_toArray() {
|
||
if (!this._sorted) {
|
||
this._array.sort(util.compareByGeneratedPositionsInflated);
|
||
this._sorted = true;
|
||
}
|
||
return this._array;
|
||
};
|
||
exports.MappingList = MappingList;
|
||
}
|
||
});
|
||
|
||
// node_modules/source-map-js/lib/source-map-generator.js
|
||
var require_source_map_generator = __commonJS({
|
||
"node_modules/source-map-js/lib/source-map-generator.js"(exports) {
|
||
var base64VLQ = require_base64_vlq();
|
||
var util = require_util();
|
||
var ArraySet = require_array_set().ArraySet;
|
||
var MappingList = require_mapping_list().MappingList;
|
||
function SourceMapGenerator2(aArgs) {
|
||
if (!aArgs) {
|
||
aArgs = {};
|
||
}
|
||
this._file = util.getArg(aArgs, "file", null);
|
||
this._sourceRoot = util.getArg(aArgs, "sourceRoot", null);
|
||
this._skipValidation = util.getArg(aArgs, "skipValidation", false);
|
||
this._sources = new ArraySet();
|
||
this._names = new ArraySet();
|
||
this._mappings = new MappingList();
|
||
this._sourcesContents = null;
|
||
}
|
||
SourceMapGenerator2.prototype._version = 3;
|
||
SourceMapGenerator2.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
|
||
var sourceRoot = aSourceMapConsumer.sourceRoot;
|
||
var generator = new SourceMapGenerator2({
|
||
file: aSourceMapConsumer.file,
|
||
sourceRoot
|
||
});
|
||
aSourceMapConsumer.eachMapping(function(mapping) {
|
||
var newMapping = {
|
||
generated: {
|
||
line: mapping.generatedLine,
|
||
column: mapping.generatedColumn
|
||
}
|
||
};
|
||
if (mapping.source != null) {
|
||
newMapping.source = mapping.source;
|
||
if (sourceRoot != null) {
|
||
newMapping.source = util.relative(sourceRoot, newMapping.source);
|
||
}
|
||
newMapping.original = {
|
||
line: mapping.originalLine,
|
||
column: mapping.originalColumn
|
||
};
|
||
if (mapping.name != null) {
|
||
newMapping.name = mapping.name;
|
||
}
|
||
}
|
||
generator.addMapping(newMapping);
|
||
});
|
||
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
||
var sourceRelative = sourceFile;
|
||
if (sourceRoot !== null) {
|
||
sourceRelative = util.relative(sourceRoot, sourceFile);
|
||
}
|
||
if (!generator._sources.has(sourceRelative)) {
|
||
generator._sources.add(sourceRelative);
|
||
}
|
||
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
||
if (content != null) {
|
||
generator.setSourceContent(sourceFile, content);
|
||
}
|
||
});
|
||
return generator;
|
||
};
|
||
SourceMapGenerator2.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
|
||
var generated = util.getArg(aArgs, "generated");
|
||
var original = util.getArg(aArgs, "original", null);
|
||
var source = util.getArg(aArgs, "source", null);
|
||
var name42 = util.getArg(aArgs, "name", null);
|
||
if (!this._skipValidation) {
|
||
this._validateMapping(generated, original, source, name42);
|
||
}
|
||
if (source != null) {
|
||
source = String(source);
|
||
if (!this._sources.has(source)) {
|
||
this._sources.add(source);
|
||
}
|
||
}
|
||
if (name42 != null) {
|
||
name42 = String(name42);
|
||
if (!this._names.has(name42)) {
|
||
this._names.add(name42);
|
||
}
|
||
}
|
||
this._mappings.add({
|
||
generatedLine: generated.line,
|
||
generatedColumn: generated.column,
|
||
originalLine: original != null && original.line,
|
||
originalColumn: original != null && original.column,
|
||
source,
|
||
name: name42
|
||
});
|
||
};
|
||
SourceMapGenerator2.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
|
||
var source = aSourceFile;
|
||
if (this._sourceRoot != null) {
|
||
source = util.relative(this._sourceRoot, source);
|
||
}
|
||
if (aSourceContent != null) {
|
||
if (!this._sourcesContents) {
|
||
this._sourcesContents = /* @__PURE__ */ Object.create(null);
|
||
}
|
||
this._sourcesContents[util.toSetString(source)] = aSourceContent;
|
||
} else if (this._sourcesContents) {
|
||
delete this._sourcesContents[util.toSetString(source)];
|
||
if (Object.keys(this._sourcesContents).length === 0) {
|
||
this._sourcesContents = null;
|
||
}
|
||
}
|
||
};
|
||
SourceMapGenerator2.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
|
||
var sourceFile = aSourceFile;
|
||
if (aSourceFile == null) {
|
||
if (aSourceMapConsumer.file == null) {
|
||
throw new Error(
|
||
`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`
|
||
);
|
||
}
|
||
sourceFile = aSourceMapConsumer.file;
|
||
}
|
||
var sourceRoot = this._sourceRoot;
|
||
if (sourceRoot != null) {
|
||
sourceFile = util.relative(sourceRoot, sourceFile);
|
||
}
|
||
var newSources = new ArraySet();
|
||
var newNames = new ArraySet();
|
||
this._mappings.unsortedForEach(function(mapping) {
|
||
if (mapping.source === sourceFile && mapping.originalLine != null) {
|
||
var original = aSourceMapConsumer.originalPositionFor({
|
||
line: mapping.originalLine,
|
||
column: mapping.originalColumn
|
||
});
|
||
if (original.source != null) {
|
||
mapping.source = original.source;
|
||
if (aSourceMapPath != null) {
|
||
mapping.source = util.join(aSourceMapPath, mapping.source);
|
||
}
|
||
if (sourceRoot != null) {
|
||
mapping.source = util.relative(sourceRoot, mapping.source);
|
||
}
|
||
mapping.originalLine = original.line;
|
||
mapping.originalColumn = original.column;
|
||
if (original.name != null) {
|
||
mapping.name = original.name;
|
||
}
|
||
}
|
||
}
|
||
var source = mapping.source;
|
||
if (source != null && !newSources.has(source)) {
|
||
newSources.add(source);
|
||
}
|
||
var name42 = mapping.name;
|
||
if (name42 != null && !newNames.has(name42)) {
|
||
newNames.add(name42);
|
||
}
|
||
}, this);
|
||
this._sources = newSources;
|
||
this._names = newNames;
|
||
aSourceMapConsumer.sources.forEach(function(sourceFile2) {
|
||
var content = aSourceMapConsumer.sourceContentFor(sourceFile2);
|
||
if (content != null) {
|
||
if (aSourceMapPath != null) {
|
||
sourceFile2 = util.join(aSourceMapPath, sourceFile2);
|
||
}
|
||
if (sourceRoot != null) {
|
||
sourceFile2 = util.relative(sourceRoot, sourceFile2);
|
||
}
|
||
this.setSourceContent(sourceFile2, content);
|
||
}
|
||
}, this);
|
||
};
|
||
SourceMapGenerator2.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
|
||
if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
|
||
throw new Error(
|
||
"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."
|
||
);
|
||
}
|
||
if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
|
||
return;
|
||
} else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
|
||
return;
|
||
} else {
|
||
throw new Error("Invalid mapping: " + JSON.stringify({
|
||
generated: aGenerated,
|
||
source: aSource,
|
||
original: aOriginal,
|
||
name: aName
|
||
}));
|
||
}
|
||
};
|
||
SourceMapGenerator2.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
|
||
var previousGeneratedColumn = 0;
|
||
var previousGeneratedLine = 1;
|
||
var previousOriginalColumn = 0;
|
||
var previousOriginalLine = 0;
|
||
var previousName = 0;
|
||
var previousSource = 0;
|
||
var result = "";
|
||
var next;
|
||
var mapping;
|
||
var nameIdx;
|
||
var sourceIdx;
|
||
var mappings = this._mappings.toArray();
|
||
for (var i = 0, len = mappings.length; i < len; i++) {
|
||
mapping = mappings[i];
|
||
next = "";
|
||
if (mapping.generatedLine !== previousGeneratedLine) {
|
||
previousGeneratedColumn = 0;
|
||
while (mapping.generatedLine !== previousGeneratedLine) {
|
||
next += ";";
|
||
previousGeneratedLine++;
|
||
}
|
||
} else {
|
||
if (i > 0) {
|
||
if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
|
||
continue;
|
||
}
|
||
next += ",";
|
||
}
|
||
}
|
||
next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
|
||
previousGeneratedColumn = mapping.generatedColumn;
|
||
if (mapping.source != null) {
|
||
sourceIdx = this._sources.indexOf(mapping.source);
|
||
next += base64VLQ.encode(sourceIdx - previousSource);
|
||
previousSource = sourceIdx;
|
||
next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
|
||
previousOriginalLine = mapping.originalLine - 1;
|
||
next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
|
||
previousOriginalColumn = mapping.originalColumn;
|
||
if (mapping.name != null) {
|
||
nameIdx = this._names.indexOf(mapping.name);
|
||
next += base64VLQ.encode(nameIdx - previousName);
|
||
previousName = nameIdx;
|
||
}
|
||
}
|
||
result += next;
|
||
}
|
||
return result;
|
||
};
|
||
SourceMapGenerator2.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
|
||
return aSources.map(function(source) {
|
||
if (!this._sourcesContents) {
|
||
return null;
|
||
}
|
||
if (aSourceRoot != null) {
|
||
source = util.relative(aSourceRoot, source);
|
||
}
|
||
var key = util.toSetString(source);
|
||
return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
|
||
}, this);
|
||
};
|
||
SourceMapGenerator2.prototype.toJSON = function SourceMapGenerator_toJSON() {
|
||
var map = {
|
||
version: this._version,
|
||
sources: this._sources.toArray(),
|
||
names: this._names.toArray(),
|
||
mappings: this._serializeMappings()
|
||
};
|
||
if (this._file != null) {
|
||
map.file = this._file;
|
||
}
|
||
if (this._sourceRoot != null) {
|
||
map.sourceRoot = this._sourceRoot;
|
||
}
|
||
if (this._sourcesContents) {
|
||
map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
|
||
}
|
||
return map;
|
||
};
|
||
SourceMapGenerator2.prototype.toString = function SourceMapGenerator_toString() {
|
||
return JSON.stringify(this.toJSON());
|
||
};
|
||
exports.SourceMapGenerator = SourceMapGenerator2;
|
||
}
|
||
});
|
||
|
||
// node_modules/esotope-hammerhead/esotope.js
|
||
var require_esotope = __commonJS({
|
||
"node_modules/esotope-hammerhead/esotope.js"(exports) {
|
||
"use strict";
|
||
var isArray;
|
||
var json;
|
||
var renumber;
|
||
var hexadecimal;
|
||
var quotes;
|
||
var escapeless;
|
||
var parentheses2;
|
||
var semicolons;
|
||
var safeConcatenation;
|
||
var directive;
|
||
var extra;
|
||
var parse45;
|
||
var Syntax2 = {
|
||
AssignmentExpression: "AssignmentExpression",
|
||
AssignmentPattern: "AssignmentPattern",
|
||
ArrayExpression: "ArrayExpression",
|
||
ArrayPattern: "ArrayPattern",
|
||
ArrowFunctionExpression: "ArrowFunctionExpression",
|
||
AwaitExpression: "AwaitExpression",
|
||
BlockStatement: "BlockStatement",
|
||
BinaryExpression: "BinaryExpression",
|
||
BreakStatement: "BreakStatement",
|
||
CallExpression: "CallExpression",
|
||
CatchClause: "CatchClause",
|
||
ClassBody: "ClassBody",
|
||
ClassDeclaration: "ClassDeclaration",
|
||
ClassExpression: "ClassExpression",
|
||
ComprehensionBlock: "ComprehensionBlock",
|
||
ComprehensionExpression: "ComprehensionExpression",
|
||
ConditionalExpression: "ConditionalExpression",
|
||
ContinueStatement: "ContinueStatement",
|
||
DirectiveStatement: "DirectiveStatement",
|
||
DoWhileStatement: "DoWhileStatement",
|
||
DebuggerStatement: "DebuggerStatement",
|
||
EmptyStatement: "EmptyStatement",
|
||
ExportAllDeclaration: "ExportAllDeclaration",
|
||
ExportBatchSpecifier: "ExportBatchSpecifier",
|
||
ExportDeclaration: "ExportDeclaration",
|
||
ExportNamedDeclaration: "ExportNamedDeclaration",
|
||
ExportSpecifier: "ExportSpecifier",
|
||
ExpressionStatement: "ExpressionStatement",
|
||
ForStatement: "ForStatement",
|
||
ForInStatement: "ForInStatement",
|
||
ForOfStatement: "ForOfStatement",
|
||
FunctionDeclaration: "FunctionDeclaration",
|
||
FunctionExpression: "FunctionExpression",
|
||
GeneratorExpression: "GeneratorExpression",
|
||
Identifier: "Identifier",
|
||
IfStatement: "IfStatement",
|
||
ImportExpression: "ImportExpression",
|
||
ImportSpecifier: "ImportSpecifier",
|
||
ImportDeclaration: "ImportDeclaration",
|
||
ChainExpression: "ChainExpression",
|
||
Literal: "Literal",
|
||
LabeledStatement: "LabeledStatement",
|
||
LogicalExpression: "LogicalExpression",
|
||
MemberExpression: "MemberExpression",
|
||
MetaProperty: "MetaProperty",
|
||
MethodDefinition: "MethodDefinition",
|
||
ModuleDeclaration: "ModuleDeclaration",
|
||
NewExpression: "NewExpression",
|
||
ObjectExpression: "ObjectExpression",
|
||
ObjectPattern: "ObjectPattern",
|
||
PrivateIdentifier: "PrivateIdentifier",
|
||
Program: "Program",
|
||
Property: "Property",
|
||
PropertyDefinition: "PropertyDefinition",
|
||
RestElement: "RestElement",
|
||
ReturnStatement: "ReturnStatement",
|
||
SequenceExpression: "SequenceExpression",
|
||
SpreadElement: "SpreadElement",
|
||
Super: "Super",
|
||
SwitchStatement: "SwitchStatement",
|
||
SwitchCase: "SwitchCase",
|
||
TaggedTemplateExpression: "TaggedTemplateExpression",
|
||
TemplateElement: "TemplateElement",
|
||
TemplateLiteral: "TemplateLiteral",
|
||
ThisExpression: "ThisExpression",
|
||
ThrowStatement: "ThrowStatement",
|
||
TryStatement: "TryStatement",
|
||
UnaryExpression: "UnaryExpression",
|
||
UpdateExpression: "UpdateExpression",
|
||
VariableDeclaration: "VariableDeclaration",
|
||
VariableDeclarator: "VariableDeclarator",
|
||
WhileStatement: "WhileStatement",
|
||
WithStatement: "WithStatement",
|
||
YieldExpression: "YieldExpression"
|
||
};
|
||
exports.Syntax = Syntax2;
|
||
var Precedence = {
|
||
Sequence: 0,
|
||
Yield: 1,
|
||
Assignment: 1,
|
||
Conditional: 2,
|
||
ArrowFunction: 2,
|
||
Coalesce: 3,
|
||
LogicalOR: 3,
|
||
LogicalAND: 4,
|
||
BitwiseOR: 5,
|
||
BitwiseXOR: 6,
|
||
BitwiseAND: 7,
|
||
Equality: 8,
|
||
Relational: 9,
|
||
BitwiseSHIFT: 10,
|
||
Additive: 11,
|
||
Multiplicative: 12,
|
||
Unary: 13,
|
||
Exponentiation: 14,
|
||
Postfix: 14,
|
||
Await: 14,
|
||
Call: 15,
|
||
New: 16,
|
||
TaggedTemplate: 17,
|
||
OptionalChaining: 17,
|
||
Member: 18,
|
||
Primary: 19
|
||
};
|
||
var BinaryPrecedence = {
|
||
"||": Precedence.LogicalOR,
|
||
"&&": Precedence.LogicalAND,
|
||
"|": Precedence.BitwiseOR,
|
||
"^": Precedence.BitwiseXOR,
|
||
"&": Precedence.BitwiseAND,
|
||
"==": Precedence.Equality,
|
||
"!=": Precedence.Equality,
|
||
"===": Precedence.Equality,
|
||
"!==": Precedence.Equality,
|
||
"is": Precedence.Equality,
|
||
"isnt": Precedence.Equality,
|
||
"<": Precedence.Relational,
|
||
">": Precedence.Relational,
|
||
"<=": Precedence.Relational,
|
||
">=": Precedence.Relational,
|
||
"in": Precedence.Relational,
|
||
"instanceof": Precedence.Relational,
|
||
"<<": Precedence.BitwiseSHIFT,
|
||
">>": Precedence.BitwiseSHIFT,
|
||
">>>": Precedence.BitwiseSHIFT,
|
||
"+": Precedence.Additive,
|
||
"-": Precedence.Additive,
|
||
"*": Precedence.Multiplicative,
|
||
"%": Precedence.Multiplicative,
|
||
"/": Precedence.Multiplicative,
|
||
"??": Precedence.Coalesce,
|
||
"**": Precedence.Exponentiation
|
||
};
|
||
function getDefaultOptions() {
|
||
return {
|
||
indent: null,
|
||
base: null,
|
||
parse: null,
|
||
format: {
|
||
indent: {
|
||
style: " ",
|
||
base: 0
|
||
},
|
||
newline: "\n",
|
||
space: " ",
|
||
json: false,
|
||
renumber: false,
|
||
hexadecimal: false,
|
||
quotes: "single",
|
||
escapeless: false,
|
||
compact: false,
|
||
parentheses: true,
|
||
semicolons: true,
|
||
safeConcatenation: false
|
||
},
|
||
directive: false,
|
||
raw: true,
|
||
verbatim: null
|
||
};
|
||
}
|
||
var NON_ASCII_WHITESPACES = [
|
||
5760,
|
||
6158,
|
||
8192,
|
||
8193,
|
||
8194,
|
||
8195,
|
||
8196,
|
||
8197,
|
||
8198,
|
||
8199,
|
||
8200,
|
||
8201,
|
||
8202,
|
||
8239,
|
||
8287,
|
||
12288,
|
||
65279
|
||
];
|
||
var NON_ASCII_IDENTIFIER_CHARACTERS_REGEXP = new RegExp(
|
||
"[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]"
|
||
);
|
||
function isIdentifierCh(cp) {
|
||
if (cp < 128) {
|
||
return cp >= 97 && cp <= 122 || // a..z
|
||
cp >= 65 && cp <= 90 || // A..Z
|
||
cp >= 48 && cp <= 57 || // 0..9
|
||
cp === 36 || cp === 95 || // $ (dollar) and _ (underscore)
|
||
cp === 92;
|
||
}
|
||
var ch = String.fromCharCode(cp);
|
||
return NON_ASCII_IDENTIFIER_CHARACTERS_REGEXP.test(ch);
|
||
}
|
||
function isLineTerminator(cp) {
|
||
return cp === 10 || cp === 13 || cp === 8232 || cp === 8233;
|
||
}
|
||
function isWhitespace2(cp) {
|
||
return cp === 32 || cp === 9 || isLineTerminator(cp) || cp === 11 || cp === 12 || cp === 160 || cp >= 5760 && NON_ASCII_WHITESPACES.indexOf(cp) >= 0;
|
||
}
|
||
function isDecimalDigit(cp) {
|
||
return cp >= 48 && cp <= 57;
|
||
}
|
||
function stringRepeat(str, num) {
|
||
var result = "";
|
||
for (num |= 0; num > 0; num >>>= 1, str += str) {
|
||
if (num & 1) {
|
||
result += str;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
isArray = Array.isArray;
|
||
if (!isArray) {
|
||
isArray = function isArray2(array) {
|
||
return Object.prototype.toString.call(array) === "[object Array]";
|
||
};
|
||
}
|
||
function updateDeeply(target, override) {
|
||
var key, val;
|
||
function isHashObject(target2) {
|
||
return typeof target2 === "object" && target2 instanceof Object && !(target2 instanceof RegExp);
|
||
}
|
||
for (key in override) {
|
||
if (override.hasOwnProperty(key)) {
|
||
val = override[key];
|
||
if (isHashObject(val)) {
|
||
if (isHashObject(target[key])) {
|
||
updateDeeply(target[key], val);
|
||
} else {
|
||
target[key] = updateDeeply({}, val);
|
||
}
|
||
} else {
|
||
target[key] = val;
|
||
}
|
||
}
|
||
}
|
||
return target;
|
||
}
|
||
function generateNumber(value) {
|
||
var result, point, temp, exponent, pos;
|
||
if (value === 1 / 0) {
|
||
return json ? "null" : renumber ? "1e400" : "1e+400";
|
||
}
|
||
result = "" + value;
|
||
if (!renumber || result.length < 3) {
|
||
return result;
|
||
}
|
||
point = result.indexOf(".");
|
||
if (!json && result.charCodeAt(0) === 48 && point === 1) {
|
||
point = 0;
|
||
result = result.slice(1);
|
||
}
|
||
temp = result;
|
||
result = result.replace("e+", "e");
|
||
exponent = 0;
|
||
if ((pos = temp.indexOf("e")) > 0) {
|
||
exponent = +temp.slice(pos + 1);
|
||
temp = temp.slice(0, pos);
|
||
}
|
||
if (point >= 0) {
|
||
exponent -= temp.length - point - 1;
|
||
temp = +(temp.slice(0, point) + temp.slice(point + 1)) + "";
|
||
}
|
||
pos = 0;
|
||
while (temp.charCodeAt(temp.length + pos - 1) === 48) {
|
||
--pos;
|
||
}
|
||
if (pos !== 0) {
|
||
exponent -= pos;
|
||
temp = temp.slice(0, pos);
|
||
}
|
||
if (exponent !== 0) {
|
||
temp += "e" + exponent;
|
||
}
|
||
if ((temp.length < result.length || hexadecimal && value > 1e12 && Math.floor(value) === value && (temp = "0x" + value.toString(16)).length < result.length) && +temp === value) {
|
||
result = temp;
|
||
}
|
||
return result;
|
||
}
|
||
function escapeRegExpCharacter(ch, previousIsBackslash) {
|
||
if ((ch & ~1) === 8232) {
|
||
return (previousIsBackslash ? "u" : "\\u") + (ch === 8232 ? "2028" : "2029");
|
||
} else if (ch === 10 || ch === 13) {
|
||
return (previousIsBackslash ? "" : "\\") + (ch === 10 ? "n" : "r");
|
||
}
|
||
return String.fromCharCode(ch);
|
||
}
|
||
function generateRegExp(reg) {
|
||
var match, result, flags, i, iz, ch, characterInBrack, previousIsBackslash;
|
||
result = reg.toString();
|
||
if (reg.source) {
|
||
match = result.match(/\/([^/]*)$/);
|
||
if (!match) {
|
||
return result;
|
||
}
|
||
flags = match[1];
|
||
result = "";
|
||
characterInBrack = false;
|
||
previousIsBackslash = false;
|
||
for (i = 0, iz = reg.source.length; i < iz; ++i) {
|
||
ch = reg.source.charCodeAt(i);
|
||
if (!previousIsBackslash) {
|
||
if (characterInBrack) {
|
||
if (ch === 93) {
|
||
characterInBrack = false;
|
||
}
|
||
} else {
|
||
if (ch === 47) {
|
||
result += "\\";
|
||
} else if (ch === 91) {
|
||
characterInBrack = true;
|
||
}
|
||
}
|
||
result += escapeRegExpCharacter(ch, previousIsBackslash);
|
||
previousIsBackslash = ch === 92;
|
||
} else {
|
||
result += escapeRegExpCharacter(ch, previousIsBackslash);
|
||
previousIsBackslash = false;
|
||
}
|
||
}
|
||
return "/" + result + "/" + flags;
|
||
}
|
||
return result;
|
||
}
|
||
function escapeAllowedCharacter(code2, next) {
|
||
var hex, result = "\\";
|
||
switch (code2) {
|
||
case 8:
|
||
result += "b";
|
||
break;
|
||
case 12:
|
||
result += "f";
|
||
break;
|
||
case 9:
|
||
result += "t";
|
||
break;
|
||
default:
|
||
hex = code2.toString(16).toUpperCase();
|
||
if (json || code2 > 255) {
|
||
result += "u" + "0000".slice(hex.length) + hex;
|
||
} else if (code2 === 0 && !isDecimalDigit(next)) {
|
||
result += "0";
|
||
} else if (code2 === 11) {
|
||
result += "x0B";
|
||
} else {
|
||
result += "x" + "00".slice(hex.length) + hex;
|
||
}
|
||
break;
|
||
}
|
||
return result;
|
||
}
|
||
function escapeDisallowedCharacter(code2) {
|
||
var result = "\\";
|
||
switch (code2) {
|
||
case 92:
|
||
result += "\\";
|
||
break;
|
||
case 10:
|
||
result += "n";
|
||
break;
|
||
case 13:
|
||
result += "r";
|
||
break;
|
||
case 8232:
|
||
result += "u2028";
|
||
break;
|
||
case 8233:
|
||
result += "u2029";
|
||
break;
|
||
}
|
||
return result;
|
||
}
|
||
function escapeDirective(str) {
|
||
var i, iz, code2, quote;
|
||
quote = quotes === "double" ? '"' : "'";
|
||
for (i = 0, iz = str.length; i < iz; ++i) {
|
||
code2 = str.charCodeAt(i);
|
||
if (code2 === 39) {
|
||
quote = '"';
|
||
break;
|
||
} else if (code2 === 34) {
|
||
quote = "'";
|
||
break;
|
||
} else if (code2 === 92) {
|
||
++i;
|
||
}
|
||
}
|
||
return quote + str + quote;
|
||
}
|
||
function escapeString(str) {
|
||
var result = "", i, len, code2, singleQuotes = 0, doubleQuotes = 0, single, quote;
|
||
for (i = 0, len = str.length; i < len; ++i) {
|
||
code2 = str.charCodeAt(i);
|
||
if (code2 === 39) {
|
||
++singleQuotes;
|
||
} else if (code2 === 34) {
|
||
++doubleQuotes;
|
||
} else if (code2 === 47 && json) {
|
||
result += "\\";
|
||
} else if (isLineTerminator(code2) || code2 === 92) {
|
||
result += escapeDisallowedCharacter(code2);
|
||
continue;
|
||
} else if (json && code2 < 32 || // SP
|
||
!(json || escapeless || code2 >= 32 && code2 <= 126)) {
|
||
result += escapeAllowedCharacter(code2, str.charCodeAt(i + 1));
|
||
continue;
|
||
}
|
||
result += String.fromCharCode(code2);
|
||
}
|
||
single = !(quotes === "double" || quotes === "auto" && doubleQuotes < singleQuotes);
|
||
quote = single ? "'" : '"';
|
||
if (!(single ? singleQuotes : doubleQuotes)) {
|
||
return quote + result + quote;
|
||
}
|
||
str = result;
|
||
result = quote;
|
||
for (i = 0, len = str.length; i < len; ++i) {
|
||
code2 = str.charCodeAt(i);
|
||
if (code2 === 39 && single || code2 === 34 && !single) {
|
||
result += "\\";
|
||
}
|
||
result += String.fromCharCode(code2);
|
||
}
|
||
return result + quote;
|
||
}
|
||
function join(l, r) {
|
||
if (!l.length)
|
||
return r;
|
||
if (!r.length)
|
||
return l;
|
||
var lCp = l.charCodeAt(l.length - 1), rCp = r.charCodeAt(0);
|
||
if (isIdentifierCh(lCp) && isIdentifierCh(rCp) || lCp === rCp && (lCp === 43 || lCp === 45) || // + +, - -
|
||
lCp === 47 && rCp === 105) {
|
||
return l + _.space + r;
|
||
} else if (isWhitespace2(lCp) || isWhitespace2(rCp))
|
||
return l + r;
|
||
return l + _.optSpace + r;
|
||
}
|
||
function shiftIndent() {
|
||
var prevIndent = _.indent;
|
||
_.indent += _.indentUnit;
|
||
return prevIndent;
|
||
}
|
||
function adoptionPrefix($stmt) {
|
||
if ($stmt.type === Syntax2.BlockStatement)
|
||
return _.optSpace;
|
||
if ($stmt.type === Syntax2.EmptyStatement)
|
||
return "";
|
||
return _.newline + _.indent + _.indentUnit;
|
||
}
|
||
function adoptionSuffix($stmt) {
|
||
if ($stmt.type === Syntax2.BlockStatement)
|
||
return _.optSpace;
|
||
return _.newline + _.indent;
|
||
}
|
||
function generateVerbatim($expr, settings2) {
|
||
var verbatim = $expr[extra.verbatim], strVerbatim = typeof verbatim === "string", precedence = !strVerbatim && verbatim.precedence !== void 0 ? verbatim.precedence : Precedence.Sequence, parenthesize = precedence < settings2.precedence, content = strVerbatim ? verbatim : verbatim.content, chunks = content.split(/\r\n|\n/), chunkCount = chunks.length;
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
_.js += chunks[0];
|
||
for (var i = 1; i < chunkCount; i++)
|
||
_.js += _.newline + _.indent + chunks[i];
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
}
|
||
function generateFunctionParams($node) {
|
||
var $params = $node.params, paramCount = $params.length, lastParamIdx = paramCount - 1, arrowFuncWithoutParentheses = $node.type === Syntax2.ArrowFunctionExpression && paramCount === 1 && $params[0].type === Syntax2.Identifier;
|
||
if (arrowFuncWithoutParentheses)
|
||
_.js += $params[0].name;
|
||
else {
|
||
_.js += "(";
|
||
for (var i = 0; i < paramCount; ++i) {
|
||
var $param = $params[i];
|
||
if ($params[i].type === Syntax2.Identifier)
|
||
_.js += $param.name;
|
||
else
|
||
ExprGen[$param.type]($param, Preset.e4);
|
||
if (i !== lastParamIdx)
|
||
_.js += "," + _.optSpace;
|
||
}
|
||
_.js += ")";
|
||
}
|
||
}
|
||
function generateFunctionBody($node) {
|
||
var $body = $node.body;
|
||
generateFunctionParams($node);
|
||
if ($node.type === Syntax2.ArrowFunctionExpression)
|
||
_.js += _.optSpace + "=>";
|
||
if ($node.expression) {
|
||
_.js += _.optSpace;
|
||
var exprJs = exprToJs($body, Preset.e4);
|
||
if (exprJs.charAt(0) === "{")
|
||
exprJs = "(" + exprJs + ")";
|
||
_.js += exprJs;
|
||
} else {
|
||
_.js += adoptionPrefix($body);
|
||
StmtGen[$body.type]($body, Preset.s8);
|
||
}
|
||
}
|
||
var Preset = {
|
||
e1: function(allowIn) {
|
||
return {
|
||
precedence: Precedence.Assignment,
|
||
allowIn,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
};
|
||
},
|
||
e2: function(allowIn) {
|
||
return {
|
||
precedence: Precedence.LogicalOR,
|
||
allowIn,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
};
|
||
},
|
||
e3: {
|
||
precedence: Precedence.Call,
|
||
allowIn: true,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: false
|
||
},
|
||
e4: {
|
||
precedence: Precedence.Assignment,
|
||
allowIn: true,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
},
|
||
e5: {
|
||
precedence: Precedence.Sequence,
|
||
allowIn: true,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
},
|
||
e6: function(allowUnparenthesizedNew) {
|
||
return {
|
||
precedence: Precedence.New,
|
||
allowIn: true,
|
||
allowCall: false,
|
||
allowUnparenthesizedNew
|
||
};
|
||
},
|
||
e7: {
|
||
precedence: Precedence.Unary,
|
||
allowIn: true,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
},
|
||
e8: {
|
||
precedence: Precedence.Postfix,
|
||
allowIn: true,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
},
|
||
e9: {
|
||
precedence: void 0,
|
||
allowIn: true,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
},
|
||
e10: {
|
||
precedence: Precedence.Call,
|
||
allowIn: true,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
},
|
||
e11: function(allowCall) {
|
||
return {
|
||
precedence: Precedence.Call,
|
||
allowIn: true,
|
||
allowCall,
|
||
allowUnparenthesizedNew: false
|
||
};
|
||
},
|
||
e12: {
|
||
precedence: Precedence.Primary,
|
||
allowIn: false,
|
||
allowCall: false,
|
||
allowUnparenthesizedNew: true
|
||
},
|
||
e13: {
|
||
precedence: Precedence.Primary,
|
||
allowIn: true,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
},
|
||
e14: {
|
||
precedence: Precedence.Sequence,
|
||
allowIn: false,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
},
|
||
e15: function(allowCall) {
|
||
return {
|
||
precedence: Precedence.Sequence,
|
||
allowIn: true,
|
||
allowCall,
|
||
allowUnparenthesizedNew: true
|
||
};
|
||
},
|
||
e16: function(precedence, allowIn) {
|
||
return {
|
||
precedence,
|
||
allowIn,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
};
|
||
},
|
||
e17: function(allowIn) {
|
||
return {
|
||
precedence: Precedence.Call,
|
||
allowIn,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
};
|
||
},
|
||
e18: function(allowIn) {
|
||
return {
|
||
precedence: Precedence.Assignment,
|
||
allowIn,
|
||
allowCall: true,
|
||
allowUnparenthesizedNew: true
|
||
};
|
||
},
|
||
e19: {
|
||
precedence: Precedence.Sequence,
|
||
allowIn: true,
|
||
allowCall: true,
|
||
semicolonOptional: false
|
||
},
|
||
e20: {
|
||
precedence: Precedence.Await,
|
||
allowCall: true
|
||
},
|
||
s1: function(functionBody, semicolonOptional) {
|
||
return {
|
||
allowIn: true,
|
||
functionBody: false,
|
||
directiveContext: functionBody,
|
||
semicolonOptional
|
||
};
|
||
},
|
||
s2: {
|
||
allowIn: true,
|
||
functionBody: false,
|
||
directiveContext: false,
|
||
semicolonOptional: true
|
||
},
|
||
s3: function(allowIn) {
|
||
return {
|
||
allowIn,
|
||
functionBody: false,
|
||
directiveContext: false,
|
||
semicolonOptional: false
|
||
};
|
||
},
|
||
s4: function(semicolonOptional) {
|
||
return {
|
||
allowIn: true,
|
||
functionBody: false,
|
||
directiveContext: false,
|
||
semicolonOptional
|
||
};
|
||
},
|
||
s5: function(semicolonOptional) {
|
||
return {
|
||
allowIn: true,
|
||
functionBody: false,
|
||
directiveContext: true,
|
||
semicolonOptional
|
||
};
|
||
},
|
||
s6: {
|
||
allowIn: false,
|
||
functionBody: false,
|
||
directiveContext: false,
|
||
semicolonOptional: false
|
||
},
|
||
s7: {
|
||
allowIn: true,
|
||
functionBody: false,
|
||
directiveContext: false,
|
||
semicolonOptional: false
|
||
},
|
||
s8: {
|
||
allowIn: true,
|
||
functionBody: true,
|
||
directiveContext: false,
|
||
semicolonOptional: false
|
||
}
|
||
};
|
||
var FLOATING_OR_OCTAL_REGEXP = /[.eExX]|^0[0-9]+/;
|
||
var LAST_DECIMAL_DIGIT_REGEXP = /[0-9]$/;
|
||
function isLogicalExpression(node) {
|
||
if (!node)
|
||
return false;
|
||
return node.type === Syntax2.LogicalExpression;
|
||
}
|
||
function needParensForLogicalExpression(node, parent) {
|
||
switch (node.operator) {
|
||
case "||":
|
||
if (!isLogicalExpression(parent))
|
||
return false;
|
||
return parent.operator === "??" || parent.operator === "&&";
|
||
case "&&":
|
||
return isLogicalExpression(parent, {
|
||
operator: "??"
|
||
});
|
||
case "??":
|
||
return isLogicalExpression(parent) && parent.operator !== "??";
|
||
}
|
||
}
|
||
function generateLogicalOrBinaryExpression($expr, settings2, $parent) {
|
||
var op = $expr.operator, precedence = BinaryPrecedence[$expr.operator], parenthesize = precedence < settings2.precedence, allowIn = settings2.allowIn || parenthesize, operandGenSettings = Preset.e16(precedence, allowIn), exprJs = exprToJs($expr.left, operandGenSettings, $expr);
|
||
parenthesize |= op === "in" && !allowIn;
|
||
var needParens = needParensForLogicalExpression($expr, $parent);
|
||
if (parenthesize || needParens)
|
||
_.js += "(";
|
||
if (exprJs.charCodeAt(exprJs.length - 1) === 47 && isIdentifierCh(op.charCodeAt(0)))
|
||
exprJs = exprJs + _.space + op;
|
||
else
|
||
exprJs = join(exprJs, op);
|
||
operandGenSettings.precedence++;
|
||
var rightJs = exprToJs($expr.right, operandGenSettings, $expr);
|
||
if (op === "/" && rightJs.charAt(0) === "/" || op.slice(-1) === "<" && rightJs.slice(0, 3) === "!--")
|
||
exprJs += _.space + rightJs;
|
||
else
|
||
exprJs = join(exprJs, rightJs);
|
||
_.js += exprJs;
|
||
if (parenthesize || needParens)
|
||
_.js += ")";
|
||
}
|
||
function generateArrayPatternOrExpression($expr) {
|
||
var $elems = $expr.elements, elemCount = $elems.length;
|
||
if (elemCount) {
|
||
var lastElemIdx = elemCount - 1, multiline = elemCount > 1, prevIndent = shiftIndent(), itemPrefix = _.newline + _.indent;
|
||
_.js += "[";
|
||
for (var i = 0; i < elemCount; i++) {
|
||
var $elem = $elems[i];
|
||
if (multiline)
|
||
_.js += itemPrefix;
|
||
if ($elem)
|
||
ExprGen[$elem.type]($elem, Preset.e4);
|
||
if (i !== lastElemIdx || !$elem)
|
||
_.js += ",";
|
||
}
|
||
_.indent = prevIndent;
|
||
if (multiline)
|
||
_.js += _.newline + _.indent;
|
||
_.js += "]";
|
||
} else
|
||
_.js += "[]";
|
||
}
|
||
function generateGeneratorOrComprehensionExpression($expr) {
|
||
var $blocks = $expr.blocks, $filter = $expr.filter, isGenerator = $expr.type === Syntax2.GeneratorExpression, exprJs = isGenerator ? "(" : "[", bodyJs = exprToJs($expr.body, Preset.e4);
|
||
if ($blocks) {
|
||
var prevIndent = shiftIndent(), blockCount = $blocks.length;
|
||
for (var i = 0; i < blockCount; ++i) {
|
||
var blockJs = exprToJs($blocks[i], Preset.e5);
|
||
exprJs = i > 0 ? join(exprJs, blockJs) : exprJs + blockJs;
|
||
}
|
||
_.indent = prevIndent;
|
||
}
|
||
if ($filter) {
|
||
var filterJs = exprToJs($filter, Preset.e5);
|
||
exprJs = join(exprJs, "if" + _.optSpace);
|
||
exprJs = join(exprJs, "(" + filterJs + ")");
|
||
}
|
||
exprJs = join(exprJs, bodyJs);
|
||
exprJs += isGenerator ? ")" : "]";
|
||
_.js += exprJs;
|
||
}
|
||
var ExprRawGen = {
|
||
SequenceExpression: function generateSequenceExpression($expr, settings2) {
|
||
var $children = $expr.expressions, childrenCount = $children.length, lastChildIdx = childrenCount - 1, parenthesize = Precedence.Sequence < settings2.precedence, exprGenSettings = Preset.e1(settings2.allowIn || parenthesize);
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
for (var i = 0; i < childrenCount; i++) {
|
||
var $child = $children[i];
|
||
ExprGen[$child.type]($child, exprGenSettings);
|
||
if (i !== lastChildIdx)
|
||
_.js += "," + _.optSpace;
|
||
}
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
AssignmentExpression: function generateAssignmentExpression($expr, settings2) {
|
||
var $left = $expr.left, $right = $expr.right, parenthesize = Precedence.Assignment < settings2.precedence, allowIn = settings2.allowIn || parenthesize;
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
ExprGen[$left.type]($left, Preset.e17(allowIn));
|
||
_.js += _.optSpace + $expr.operator + _.optSpace;
|
||
ExprGen[$right.type]($right, Preset.e18(allowIn));
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
AssignmentPattern: function generateAssignmentPattern($node) {
|
||
var $fakeAssign = {
|
||
left: $node.left,
|
||
right: $node.right,
|
||
operator: "="
|
||
};
|
||
ExprGen.AssignmentExpression($fakeAssign, Preset.e4);
|
||
},
|
||
ArrowFunctionExpression: function generateArrowFunctionExpression($expr, settings2) {
|
||
var parenthesize = Precedence.ArrowFunction < settings2.precedence;
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
if ($expr.async)
|
||
_.js += "async ";
|
||
generateFunctionBody($expr);
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
AwaitExpression: function generateAwaitExpression($expr, settings2) {
|
||
var parenthesize = Precedence.Await < settings2.precedence;
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
_.js += $expr.all ? "await* " : "await ";
|
||
ExprGen[$expr.argument.type]($expr.argument, Preset.e20);
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
ConditionalExpression: function generateConditionalExpression($expr, settings2) {
|
||
var $test = $expr.test, $conseq = $expr.consequent, $alt = $expr.alternate, parenthesize = Precedence.Conditional < settings2.precedence, allowIn = settings2.allowIn || parenthesize, testGenSettings = Preset.e2(allowIn), branchGenSettings = Preset.e1(allowIn);
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
ExprGen[$test.type]($test, testGenSettings);
|
||
_.js += _.optSpace + "?" + _.optSpace;
|
||
ExprGen[$conseq.type]($conseq, branchGenSettings);
|
||
_.js += _.optSpace + ":" + _.optSpace;
|
||
ExprGen[$alt.type]($alt, branchGenSettings);
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
LogicalExpression: generateLogicalOrBinaryExpression,
|
||
BinaryExpression: generateLogicalOrBinaryExpression,
|
||
CallExpression: function generateCallExpression($expr, settings2) {
|
||
var $callee = $expr.callee, $args = $expr["arguments"], argCount = $args.length, lastArgIdx = argCount - 1, parenthesize = !settings2.allowCall || Precedence.Call < settings2.precedence;
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
ExprGen[$callee.type]($callee, Preset.e3);
|
||
if ($expr.optional)
|
||
_.js += "?.";
|
||
_.js += "(";
|
||
for (var i = 0; i < argCount; ++i) {
|
||
var $arg = $args[i];
|
||
ExprGen[$arg.type]($arg, Preset.e4);
|
||
if (i !== lastArgIdx)
|
||
_.js += "," + _.optSpace;
|
||
}
|
||
_.js += ")";
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
NewExpression: function generateNewExpression($expr, settings2) {
|
||
var $args = $expr["arguments"], parenthesize = Precedence.New < settings2.precedence, argCount = $args.length, lastArgIdx = argCount - 1, withCall = !settings2.allowUnparenthesizedNew || parentheses2 || argCount > 0, calleeJs = exprToJs($expr.callee, Preset.e6(!withCall));
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
_.js += join("new", calleeJs);
|
||
if (withCall) {
|
||
_.js += "(";
|
||
for (var i = 0; i < argCount; ++i) {
|
||
var $arg = $args[i];
|
||
ExprGen[$arg.type]($arg, Preset.e4);
|
||
if (i !== lastArgIdx)
|
||
_.js += "," + _.optSpace;
|
||
}
|
||
_.js += ")";
|
||
}
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
MemberExpression: function generateMemberExpression($expr, settings2) {
|
||
var $obj = $expr.object, $prop = $expr.property, parenthesize = Precedence.Member < settings2.precedence, isNumObj = !$expr.computed && $obj.type === Syntax2.Literal && typeof $obj.value === "number";
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
if (isNumObj) {
|
||
var numJs = exprToJs($obj, Preset.e11(settings2.allowCall)), withPoint = LAST_DECIMAL_DIGIT_REGEXP.test(numJs) && !FLOATING_OR_OCTAL_REGEXP.test(numJs);
|
||
_.js += withPoint ? numJs + "." : numJs;
|
||
} else
|
||
ExprGen[$obj.type]($obj, Preset.e11(settings2.allowCall));
|
||
if ($expr.computed) {
|
||
if ($expr.optional)
|
||
_.js += "?.";
|
||
_.js += "[";
|
||
ExprGen[$prop.type]($prop, Preset.e15(settings2.allowCall));
|
||
_.js += "]";
|
||
} else
|
||
_.js += ($expr.optional ? "?." : ".") + $prop.name;
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
UnaryExpression: function generateUnaryExpression($expr, settings2) {
|
||
var parenthesize = Precedence.Unary < settings2.precedence, op = $expr.operator, argJs = exprToJs($expr.argument, Preset.e7);
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
if (_.optSpace === "" || op.length > 2)
|
||
_.js += join(op, argJs);
|
||
else {
|
||
_.js += op;
|
||
var leftCp = op.charCodeAt(op.length - 1), rightCp = argJs.charCodeAt(0);
|
||
if (leftCp === rightCp && (leftCp === 43 || leftCp === 45) || isIdentifierCh(leftCp) && isIdentifierCh(rightCp)) {
|
||
_.js += _.space;
|
||
}
|
||
_.js += argJs;
|
||
}
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
YieldExpression: function generateYieldExpression($expr, settings2) {
|
||
var $arg = $expr.argument, js = $expr.delegate ? "yield*" : "yield", parenthesize = Precedence.Yield < settings2.precedence;
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
if ($arg) {
|
||
var argJs = exprToJs($arg, Preset.e4);
|
||
js = join(js, argJs);
|
||
}
|
||
_.js += js;
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
UpdateExpression: function generateUpdateExpression($expr, settings2) {
|
||
var $arg = $expr.argument, $op = $expr.operator, prefix = $expr.prefix, precedence = prefix ? Precedence.Unary : Precedence.Postfix, parenthesize = precedence < settings2.precedence;
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
if (prefix) {
|
||
_.js += $op;
|
||
ExprGen[$arg.type]($arg, Preset.e8);
|
||
} else {
|
||
ExprGen[$arg.type]($arg, Preset.e8);
|
||
_.js += $op;
|
||
}
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
FunctionExpression: function generateFunctionExpression($expr) {
|
||
var isGenerator = !!$expr.generator;
|
||
if ($expr.async)
|
||
_.js += "async ";
|
||
_.js += isGenerator ? "function*" : "function";
|
||
if ($expr.id) {
|
||
_.js += isGenerator ? _.optSpace : _.space;
|
||
_.js += $expr.id.name;
|
||
} else
|
||
_.js += _.optSpace;
|
||
generateFunctionBody($expr);
|
||
},
|
||
ExportBatchSpecifier: function generateExportBatchSpecifier() {
|
||
_.js += "*";
|
||
},
|
||
ArrayPattern: generateArrayPatternOrExpression,
|
||
ArrayExpression: generateArrayPatternOrExpression,
|
||
ClassExpression: function generateClassExpression($expr) {
|
||
var $id = $expr.id, $super = $expr.superClass, $body = $expr.body, exprJs = "class";
|
||
if ($id) {
|
||
var idJs = exprToJs($id, Preset.e9);
|
||
exprJs = join(exprJs, idJs);
|
||
}
|
||
if ($super) {
|
||
var superJs = exprToJs($super, Preset.e4);
|
||
superJs = join("extends", superJs);
|
||
exprJs = join(exprJs, superJs);
|
||
}
|
||
_.js += exprJs + _.optSpace;
|
||
StmtGen[$body.type]($body, Preset.s2);
|
||
},
|
||
MetaProperty: function generateMetaProperty($expr, settings2) {
|
||
var $meta = $expr.meta, $property = $expr.property, parenthesize = Precedence.Member < settings2.precedence;
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
_.js += (typeof $meta === "string" ? $meta : $meta.name) + "." + (typeof $property === "string" ? $property : $property.name);
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
MethodDefinition: function generateMethodDefinition($expr) {
|
||
var exprJs = $expr["static"] ? "static" + _.optSpace : "", keyJs = exprToJs($expr.key, Preset.e5);
|
||
if ($expr.computed)
|
||
keyJs = "[" + keyJs + "]";
|
||
if ($expr.kind === "get" || $expr.kind === "set") {
|
||
keyJs = join($expr.kind, keyJs);
|
||
_.js += join(exprJs, keyJs);
|
||
} else {
|
||
if ($expr.value.generator)
|
||
_.js += exprJs + "*" + keyJs;
|
||
else if ($expr.value.async)
|
||
_.js += exprJs + "async " + keyJs;
|
||
else
|
||
_.js += join(exprJs, keyJs);
|
||
}
|
||
generateFunctionBody($expr.value);
|
||
},
|
||
Property: function generateProperty($expr) {
|
||
var $val = $expr.value, $kind = $expr.kind, keyJs = exprToJs($expr.key, Preset.e4);
|
||
if ($expr.computed)
|
||
keyJs = "[" + keyJs + "]";
|
||
if ($kind === "get" || $kind === "set") {
|
||
_.js += $kind + _.space + keyJs;
|
||
generateFunctionBody($val);
|
||
} else {
|
||
if ($expr.shorthand)
|
||
_.js += keyJs;
|
||
else if ($expr.method) {
|
||
if ($val.generator)
|
||
keyJs = "*" + keyJs;
|
||
else if ($val.async)
|
||
keyJs = "async " + keyJs;
|
||
_.js += keyJs;
|
||
generateFunctionBody($val);
|
||
} else {
|
||
_.js += keyJs + ":" + _.optSpace;
|
||
ExprGen[$val.type]($val, Preset.e4);
|
||
}
|
||
}
|
||
},
|
||
PropertyDefinition: function generatePropertyDefinition($expr) {
|
||
var $val = $expr.value, exprJs = $expr["static"] ? "static" + _.optSpace : "", keyJs = exprToJs($expr.key, Preset.e4);
|
||
if ($expr.computed)
|
||
keyJs = "[" + keyJs + "]";
|
||
_.js += exprJs + keyJs + "=" + _.optSpace;
|
||
ExprGen[$val.type]($val, Preset.e4);
|
||
if (semicolons || !settings.semicolonOptional)
|
||
_.js += ";";
|
||
},
|
||
ObjectExpression: function generateObjectExpression($expr) {
|
||
var $props = $expr.properties, propCount = $props.length;
|
||
if (propCount) {
|
||
var lastPropIdx = propCount - 1, prevIndent = shiftIndent();
|
||
_.js += "{";
|
||
for (var i = 0; i < propCount; i++) {
|
||
var $prop = $props[i], propType = $prop.type || Syntax2.Property;
|
||
_.js += _.newline + _.indent;
|
||
ExprGen[propType]($prop, Preset.e5);
|
||
if (i !== lastPropIdx)
|
||
_.js += ",";
|
||
}
|
||
_.indent = prevIndent;
|
||
_.js += _.newline + _.indent + "}";
|
||
} else
|
||
_.js += "{}";
|
||
},
|
||
ObjectPattern: function generateObjectPattern($expr) {
|
||
var $props = $expr.properties, propCount = $props.length;
|
||
if (propCount) {
|
||
var lastPropIdx = propCount - 1, multiline = false;
|
||
if (propCount === 1)
|
||
multiline = $props[0].value.type !== Syntax2.Identifier;
|
||
else {
|
||
for (var i = 0; i < propCount; i++) {
|
||
if (!$props[i].shorthand) {
|
||
multiline = true;
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
_.js += multiline ? "{" + _.newline : "{";
|
||
var prevIndent = shiftIndent(), propSuffix = "," + (multiline ? _.newline : _.optSpace);
|
||
for (var i = 0; i < propCount; i++) {
|
||
var $prop = $props[i];
|
||
if (multiline)
|
||
_.js += _.indent;
|
||
ExprGen[$prop.type]($prop, Preset.e5);
|
||
if (i !== lastPropIdx)
|
||
_.js += propSuffix;
|
||
}
|
||
_.indent = prevIndent;
|
||
_.js += multiline ? _.newline + _.indent + "}" : "}";
|
||
} else
|
||
_.js += "{}";
|
||
},
|
||
ThisExpression: function generateThisExpression() {
|
||
_.js += "this";
|
||
},
|
||
Identifier: function generateIdentifier($expr, precedence, flag) {
|
||
_.js += $expr.name;
|
||
},
|
||
PrivateIdentifier: function generatePrivateIdentifier($expr, precedence, flag) {
|
||
_.js += "#" + $expr.name;
|
||
},
|
||
ImportExpression: function generateImportExpression($expr, settings2) {
|
||
var parenthesize = Precedence.Call < settings2.precedence;
|
||
var $source = $expr.source;
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
_.js += "import(";
|
||
ExprGen[$source.type]($source, Preset.e4);
|
||
_.js += ")";
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
ImportSpecifier: function generateImportSpecifier($expr) {
|
||
_.js += $expr.imported.name;
|
||
if ($expr.local)
|
||
_.js += _.space + "as" + _.space + $expr.local.name;
|
||
},
|
||
ExportSpecifier: function generateImportOrExportSpecifier($expr) {
|
||
_.js += $expr.local.name;
|
||
if ($expr.exported)
|
||
_.js += _.space + "as" + _.space + $expr.exported.name;
|
||
},
|
||
ChainExpression: function generateChainExpression($expr, settings2) {
|
||
var parenthesize = Precedence.OptionalChaining < settings2.precedence;
|
||
var $expression = $expr.expression;
|
||
settings2 = settings2 || {};
|
||
var newSettings = {
|
||
precedence: Precedence.OptionalChaining,
|
||
allowIn: settings2.allowIn,
|
||
allowCall: settings2.allowCall,
|
||
allowUnparenthesizedNew: settings2.allowUnparenthesizedNew
|
||
};
|
||
if (parenthesize) {
|
||
newSettings.allowCall = true;
|
||
_.js += "(";
|
||
}
|
||
ExprGen[$expression.type]($expression, newSettings);
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
Literal: function generateLiteral($expr) {
|
||
if (extra.raw && $expr.raw !== void 0)
|
||
_.js += $expr.raw;
|
||
else if ($expr.value === null)
|
||
_.js += "null";
|
||
else {
|
||
var valueType = typeof $expr.value;
|
||
if (valueType === "string")
|
||
_.js += escapeString($expr.value);
|
||
else if (valueType === "number")
|
||
_.js += generateNumber($expr.value);
|
||
else if (valueType === "boolean")
|
||
_.js += $expr.value ? "true" : "false";
|
||
else
|
||
_.js += generateRegExp($expr.value);
|
||
}
|
||
},
|
||
GeneratorExpression: generateGeneratorOrComprehensionExpression,
|
||
ComprehensionExpression: generateGeneratorOrComprehensionExpression,
|
||
ComprehensionBlock: function generateComprehensionBlock($expr) {
|
||
var $left = $expr.left, leftJs = void 0, rightJs = exprToJs($expr.right, Preset.e5);
|
||
if ($left.type === Syntax2.VariableDeclaration)
|
||
leftJs = $left.kind + _.space + stmtToJs($left.declarations[0], Preset.s6);
|
||
else
|
||
leftJs = exprToJs($left, Preset.e10);
|
||
leftJs = join(leftJs, $expr.of ? "of" : "in");
|
||
_.js += "for" + _.optSpace + "(" + join(leftJs, rightJs) + ")";
|
||
},
|
||
RestElement: function generateRestElement($node) {
|
||
_.js += "..." + $node.argument.name;
|
||
},
|
||
SpreadElement: function generateSpreadElement($expr) {
|
||
var $arg = $expr.argument;
|
||
_.js += "...";
|
||
ExprGen[$arg.type]($arg, Preset.e4);
|
||
},
|
||
TaggedTemplateExpression: function generateTaggedTemplateExpression($expr, settings2) {
|
||
var $tag = $expr.tag, $quasi = $expr.quasi, parenthesize = Precedence.TaggedTemplate < settings2.precedence;
|
||
if (parenthesize)
|
||
_.js += "(";
|
||
ExprGen[$tag.type]($tag, Preset.e11(settings2.allowCall));
|
||
ExprGen[$quasi.type]($quasi, Preset.e12);
|
||
if (parenthesize)
|
||
_.js += ")";
|
||
},
|
||
TemplateElement: function generateTemplateElement($expr) {
|
||
_.js += $expr.value.raw;
|
||
},
|
||
TemplateLiteral: function generateTemplateLiteral($expr) {
|
||
var $quasis = $expr.quasis, $childExprs = $expr.expressions, quasiCount = $quasis.length, lastQuasiIdx = quasiCount - 1;
|
||
_.js += "`";
|
||
for (var i = 0; i < quasiCount; ++i) {
|
||
var $quasi = $quasis[i];
|
||
ExprGen[$quasi.type]($quasi, Preset.e13);
|
||
if (i !== lastQuasiIdx) {
|
||
var $childExpr = $childExprs[i];
|
||
_.js += "${" + _.optSpace;
|
||
ExprGen[$childExpr.type]($childExpr, Preset.e5);
|
||
_.js += _.optSpace + "}";
|
||
}
|
||
}
|
||
_.js += "`";
|
||
},
|
||
Super: function generateSuper() {
|
||
_.js += "super";
|
||
}
|
||
};
|
||
var EXPR_STMT_UNALLOWED_EXPR_REGEXP = /^{|^class(?:\s|{)|^(async )?function(?:\s|\*|\()/;
|
||
function generateTryStatementHandlers(stmtJs, $finalizer, handlers) {
|
||
var handlerCount = handlers.length, lastHandlerIdx = handlerCount - 1;
|
||
for (var i = 0; i < handlerCount; ++i) {
|
||
var handlerJs = stmtToJs(handlers[i], Preset.s7);
|
||
stmtJs = join(stmtJs, handlerJs);
|
||
if ($finalizer || i !== lastHandlerIdx)
|
||
stmtJs += adoptionSuffix(handlers[i].body);
|
||
}
|
||
return stmtJs;
|
||
}
|
||
function generateForStatementIterator($op, $stmt, settings2) {
|
||
var $body = $stmt.body, $left = $stmt.left, bodySemicolonOptional = !semicolons && settings2.semicolonOptional, prevIndent1 = shiftIndent(), awaitStr = $stmt.await ? " await" : "", stmtJs = "for" + awaitStr + _.optSpace + "(";
|
||
if ($left.type === Syntax2.VariableDeclaration) {
|
||
var prevIndent2 = shiftIndent();
|
||
stmtJs += $left.kind + _.space + stmtToJs($left.declarations[0], Preset.s6);
|
||
_.indent = prevIndent2;
|
||
} else
|
||
stmtJs += exprToJs($left, Preset.e10);
|
||
stmtJs = join(stmtJs, $op);
|
||
var rightJs = exprToJs($stmt.right, Preset.e4);
|
||
stmtJs = join(stmtJs, rightJs) + ")";
|
||
_.indent = prevIndent1;
|
||
_.js += stmtJs + adoptionPrefix($body);
|
||
StmtGen[$body.type]($body, Preset.s4(bodySemicolonOptional));
|
||
}
|
||
var StmtRawGen = {
|
||
BlockStatement: function generateBlockStatement($stmt, settings2) {
|
||
var $body = $stmt.body, len = $body.length, lastIdx = len - 1, prevIndent = shiftIndent();
|
||
_.js += "{" + _.newline;
|
||
for (var i = 0; i < len; i++) {
|
||
var $item = $body[i];
|
||
_.js += _.indent;
|
||
StmtGen[$item.type]($item, Preset.s1(settings2.functionBody, i === lastIdx));
|
||
_.js += _.newline;
|
||
}
|
||
_.indent = prevIndent;
|
||
_.js += _.indent + "}";
|
||
},
|
||
BreakStatement: function generateBreakStatement($stmt, settings2) {
|
||
if ($stmt.label)
|
||
_.js += "break " + $stmt.label.name;
|
||
else
|
||
_.js += "break";
|
||
if (semicolons || !settings2.semicolonOptional)
|
||
_.js += ";";
|
||
},
|
||
ContinueStatement: function generateContinueStatement($stmt, settings2) {
|
||
if ($stmt.label)
|
||
_.js += "continue " + $stmt.label.name;
|
||
else
|
||
_.js += "continue";
|
||
if (semicolons || !settings2.semicolonOptional)
|
||
_.js += ";";
|
||
},
|
||
ClassBody: function generateClassBody($stmt) {
|
||
var $body = $stmt.body, itemCount = $body.length, lastItemIdx = itemCount - 1, prevIndent = shiftIndent();
|
||
_.js += "{" + _.newline;
|
||
for (var i = 0; i < itemCount; i++) {
|
||
var $item = $body[i], itemType = $item.type || Syntax2.Property;
|
||
_.js += _.indent;
|
||
ExprGen[itemType]($item, Preset.e5);
|
||
if (i !== lastItemIdx)
|
||
_.js += _.newline;
|
||
}
|
||
_.indent = prevIndent;
|
||
_.js += _.newline + _.indent + "}";
|
||
},
|
||
ClassDeclaration: function generateClassDeclaration($stmt) {
|
||
var $body = $stmt.body, $super = $stmt.superClass, js = "class " + $stmt.id.name;
|
||
if ($super) {
|
||
var superJs = exprToJs($super, Preset.e4);
|
||
js += _.space + join("extends", superJs);
|
||
}
|
||
_.js += js + _.optSpace;
|
||
StmtGen[$body.type]($body, Preset.s2);
|
||
},
|
||
DirectiveStatement: function generateDirectiveStatement($stmt, settings2) {
|
||
if (extra.raw && $stmt.raw)
|
||
_.js += $stmt.raw;
|
||
else
|
||
_.js += escapeDirective($stmt.directive);
|
||
if (semicolons || !settings2.semicolonOptional)
|
||
_.js += ";";
|
||
},
|
||
DoWhileStatement: function generateDoWhileStatement($stmt, settings2) {
|
||
var $body = $stmt.body, $test = $stmt.test, bodyJs = adoptionPrefix($body) + stmtToJs($body, Preset.s7) + adoptionSuffix($body);
|
||
var stmtJs = join("do", bodyJs);
|
||
_.js += join(stmtJs, "while" + _.optSpace + "(");
|
||
ExprGen[$test.type]($test, Preset.e5);
|
||
_.js += ")";
|
||
if (semicolons || !settings2.semicolonOptional)
|
||
_.js += ";";
|
||
},
|
||
CatchClause: function generateCatchClause($stmt) {
|
||
var $param = $stmt.param, $guard = $stmt.guard, $body = $stmt.body, prevIndent = shiftIndent();
|
||
_.js += "catch" + _.optSpace;
|
||
if ($param) {
|
||
_.js += "(";
|
||
ExprGen[$param.type]($param, Preset.e5);
|
||
}
|
||
if ($guard) {
|
||
_.js += " if ";
|
||
ExprGen[$guard.type]($guard, Preset.e5);
|
||
}
|
||
_.indent = prevIndent;
|
||
if ($param) {
|
||
_.js += ")";
|
||
}
|
||
_.js += adoptionPrefix($body);
|
||
StmtGen[$body.type]($body, Preset.s7);
|
||
},
|
||
DebuggerStatement: function generateDebuggerStatement($stmt, settings2) {
|
||
_.js += "debugger";
|
||
if (semicolons || !settings2.semicolonOptional)
|
||
_.js += ";";
|
||
},
|
||
EmptyStatement: function generateEmptyStatement() {
|
||
_.js += ";";
|
||
},
|
||
ExportAllDeclaration: function($stmt, settings2) {
|
||
StmtRawGen.ExportDeclaration($stmt, settings2, true);
|
||
},
|
||
ExportDeclaration: function generateExportDeclaration($stmt, settings2, exportAll) {
|
||
var $specs = $stmt.specifiers, $decl = $stmt.declaration, withSemicolon = semicolons || !settings2.semicolonOptional;
|
||
if ($stmt["default"]) {
|
||
var declJs = exprToJs($decl, Preset.e4);
|
||
_.js += join("export default", declJs);
|
||
if (withSemicolon)
|
||
_.js += ";";
|
||
} else if ($specs || exportAll) {
|
||
var stmtJs = "export";
|
||
if (exportAll)
|
||
stmtJs += _.optSpace + "*";
|
||
else if ($specs.length === 0)
|
||
stmtJs += _.optSpace + "{" + _.optSpace + "}";
|
||
else if ($specs[0].type === Syntax2.ExportBatchSpecifier) {
|
||
var specJs = exprToJs($specs[0], Preset.e5);
|
||
stmtJs = join(stmtJs, specJs);
|
||
} else {
|
||
var prevIndent = shiftIndent(), specCount = $specs.length, lastSpecIdx = specCount - 1;
|
||
stmtJs += _.optSpace + "{";
|
||
for (var i = 0; i < specCount; ++i) {
|
||
stmtJs += _.newline + _.indent;
|
||
stmtJs += exprToJs($specs[i], Preset.e5);
|
||
if (i !== lastSpecIdx)
|
||
stmtJs += ",";
|
||
}
|
||
_.indent = prevIndent;
|
||
stmtJs += _.newline + _.indent + "}";
|
||
}
|
||
if ($stmt.source) {
|
||
_.js += join(stmtJs, "from" + _.optSpace);
|
||
ExprGen.Literal($stmt.source);
|
||
} else
|
||
_.js += stmtJs;
|
||
if (withSemicolon)
|
||
_.js += ";";
|
||
} else if ($decl) {
|
||
var declJs = stmtToJs($decl, Preset.s4(!withSemicolon));
|
||
_.js += join("export", declJs);
|
||
}
|
||
},
|
||
ExportNamedDeclaration: function($stmt, settings2) {
|
||
StmtRawGen.ExportDeclaration($stmt, settings2);
|
||
},
|
||
ExpressionStatement: function generateExpressionStatement($stmt, settings2) {
|
||
var exprJs = exprToJs($stmt.expression, Preset.e5), parenthesize = EXPR_STMT_UNALLOWED_EXPR_REGEXP.test(exprJs) || directive && settings2.directiveContext && $stmt.expression.type === Syntax2.Literal && typeof $stmt.expression.value === "string";
|
||
if (parenthesize)
|
||
_.js += "(" + exprJs + ")";
|
||
else
|
||
_.js += exprJs;
|
||
if (semicolons || !settings2.semicolonOptional)
|
||
_.js += ";";
|
||
},
|
||
ImportDeclaration: function generateImportDeclaration($stmt, settings2) {
|
||
var $specs = $stmt.specifiers, stmtJs = "import", specCount = $specs.length;
|
||
if (specCount) {
|
||
var hasBinding = !!$specs[0]["default"], firstNamedIdx = hasBinding ? 1 : 0, lastSpecIdx = specCount - 1;
|
||
if (hasBinding)
|
||
stmtJs = join(stmtJs, $specs[0].id.name);
|
||
if (firstNamedIdx < specCount) {
|
||
if (hasBinding)
|
||
stmtJs += ",";
|
||
stmtJs += _.optSpace + "{";
|
||
if (firstNamedIdx === lastSpecIdx)
|
||
stmtJs += _.optSpace + exprToJs($specs[firstNamedIdx], Preset.e5) + _.optSpace;
|
||
else {
|
||
var prevIndent = shiftIndent();
|
||
for (var i = firstNamedIdx; i < specCount; i++) {
|
||
stmtJs += _.newline + _.indent + exprToJs($specs[i], Preset.e5);
|
||
if (i !== lastSpecIdx)
|
||
stmtJs += ",";
|
||
}
|
||
_.indent = prevIndent;
|
||
stmtJs += _.newline + _.indent;
|
||
}
|
||
stmtJs += "}" + _.optSpace;
|
||
}
|
||
stmtJs = join(stmtJs, "from");
|
||
}
|
||
_.js += stmtJs + _.optSpace;
|
||
ExprGen.Literal($stmt.source);
|
||
if (semicolons || !settings2.semicolonOptional)
|
||
_.js += ";";
|
||
},
|
||
VariableDeclarator: function generateVariableDeclarator($stmt, settings2) {
|
||
var $id = $stmt.id, $init = $stmt.init, genSettings = Preset.e1(settings2.allowIn);
|
||
if ($init) {
|
||
ExprGen[$id.type]($id, genSettings);
|
||
_.js += _.optSpace + "=" + _.optSpace;
|
||
ExprGen[$init.type]($init, genSettings, $stmt);
|
||
} else {
|
||
if ($id.type === Syntax2.Identifier)
|
||
_.js += $id.name;
|
||
else
|
||
ExprGen[$id.type]($id, genSettings);
|
||
}
|
||
},
|
||
VariableDeclaration: function generateVariableDeclaration($stmt, settings2) {
|
||
var $decls = $stmt.declarations, len = $decls.length, prevIndent = len > 1 ? shiftIndent() : _.indent, declGenSettings = Preset.s3(settings2.allowIn);
|
||
_.js += $stmt.kind;
|
||
for (var i = 0; i < len; i++) {
|
||
var $decl = $decls[i];
|
||
_.js += i === 0 ? _.space : "," + _.optSpace;
|
||
StmtGen[$decl.type]($decl, declGenSettings);
|
||
}
|
||
if (semicolons || !settings2.semicolonOptional)
|
||
_.js += ";";
|
||
_.indent = prevIndent;
|
||
},
|
||
ThrowStatement: function generateThrowStatement($stmt, settings2) {
|
||
var argJs = exprToJs($stmt.argument, Preset.e5);
|
||
_.js += join("throw", argJs);
|
||
if (semicolons || !settings2.semicolonOptional)
|
||
_.js += ";";
|
||
},
|
||
TryStatement: function generateTryStatement($stmt) {
|
||
var $block = $stmt.block, $finalizer = $stmt.finalizer, stmtJs = "try" + adoptionPrefix($block) + stmtToJs($block, Preset.s7) + adoptionSuffix($block);
|
||
var $handlers = $stmt.handlers || $stmt.guardedHandlers;
|
||
if ($handlers)
|
||
stmtJs = generateTryStatementHandlers(stmtJs, $finalizer, $handlers);
|
||
if ($stmt.handler) {
|
||
$handlers = isArray($stmt.handler) ? $stmt.handler : [$stmt.handler];
|
||
stmtJs = generateTryStatementHandlers(stmtJs, $finalizer, $handlers);
|
||
}
|
||
if ($finalizer) {
|
||
stmtJs = join(stmtJs, "finally" + adoptionPrefix($finalizer));
|
||
stmtJs += stmtToJs($finalizer, Preset.s7);
|
||
}
|
||
_.js += stmtJs;
|
||
},
|
||
SwitchStatement: function generateSwitchStatement($stmt) {
|
||
var $cases = $stmt.cases, $discr = $stmt.discriminant, prevIndent = shiftIndent();
|
||
_.js += "switch" + _.optSpace + "(";
|
||
ExprGen[$discr.type]($discr, Preset.e5);
|
||
_.js += ")" + _.optSpace + "{" + _.newline;
|
||
_.indent = prevIndent;
|
||
if ($cases) {
|
||
var caseCount = $cases.length, lastCaseIdx = caseCount - 1;
|
||
for (var i = 0; i < caseCount; i++) {
|
||
var $case = $cases[i];
|
||
_.js += _.indent;
|
||
StmtGen[$case.type]($case, Preset.s4(i === lastCaseIdx));
|
||
_.js += _.newline;
|
||
}
|
||
}
|
||
_.js += _.indent + "}";
|
||
},
|
||
SwitchCase: function generateSwitchCase($stmt, settings2) {
|
||
var $conseqs = $stmt.consequent, $firstConseq = $conseqs[0], $test = $stmt.test, i = 0, conseqSemicolonOptional = !semicolons && settings2.semicolonOptional, conseqCount = $conseqs.length, lastConseqIdx = conseqCount - 1, prevIndent = shiftIndent();
|
||
if ($test) {
|
||
var testJs = exprToJs($test, Preset.e5);
|
||
_.js += join("case", testJs) + ":";
|
||
} else
|
||
_.js += "default:";
|
||
if (conseqCount && $firstConseq.type === Syntax2.BlockStatement) {
|
||
i++;
|
||
_.js += adoptionPrefix($firstConseq);
|
||
StmtGen[$firstConseq.type]($firstConseq, Preset.s7);
|
||
}
|
||
for (; i < conseqCount; i++) {
|
||
var $conseq = $conseqs[i], semicolonOptional = i === lastConseqIdx && conseqSemicolonOptional;
|
||
_.js += _.newline + _.indent;
|
||
StmtGen[$conseq.type]($conseq, Preset.s4(semicolonOptional));
|
||
}
|
||
_.indent = prevIndent;
|
||
},
|
||
IfStatement: function generateIfStatement($stmt, settings2) {
|
||
var $conseq = $stmt.consequent, $test = $stmt.test, prevIndent = shiftIndent(), semicolonOptional = !semicolons && settings2.semicolonOptional;
|
||
_.js += "if" + _.optSpace + "(";
|
||
ExprGen[$test.type]($test, Preset.e5);
|
||
_.js += ")";
|
||
_.indent = prevIndent;
|
||
_.js += adoptionPrefix($conseq);
|
||
if ($stmt.alternate) {
|
||
var conseq = stmtToJs($conseq, Preset.s7) + adoptionSuffix($conseq), alt = stmtToJs($stmt.alternate, Preset.s4(semicolonOptional));
|
||
if ($stmt.alternate.type === Syntax2.IfStatement)
|
||
alt = "else " + alt;
|
||
else
|
||
alt = join("else", adoptionPrefix($stmt.alternate) + alt);
|
||
_.js += join(conseq, alt);
|
||
} else
|
||
StmtGen[$conseq.type]($conseq, Preset.s4(semicolonOptional));
|
||
},
|
||
ForStatement: function generateForStatement($stmt, settings2) {
|
||
var $init = $stmt.init, $test = $stmt.test, $body = $stmt.body, $update = $stmt.update, bodySemicolonOptional = !semicolons && settings2.semicolonOptional, prevIndent = shiftIndent();
|
||
_.js += "for" + _.optSpace + "(";
|
||
if ($init) {
|
||
if ($init.type === Syntax2.VariableDeclaration)
|
||
StmtGen[$init.type]($init, Preset.s6);
|
||
else {
|
||
ExprGen[$init.type]($init, Preset.e14);
|
||
_.js += ";";
|
||
}
|
||
} else
|
||
_.js += ";";
|
||
if ($test) {
|
||
_.js += _.optSpace;
|
||
ExprGen[$test.type]($test, Preset.e5);
|
||
}
|
||
_.js += ";";
|
||
if ($update) {
|
||
_.js += _.optSpace;
|
||
ExprGen[$update.type]($update, Preset.e5);
|
||
}
|
||
_.js += ")";
|
||
_.indent = prevIndent;
|
||
_.js += adoptionPrefix($body);
|
||
StmtGen[$body.type]($body, Preset.s4(bodySemicolonOptional));
|
||
},
|
||
ForInStatement: function generateForInStatement($stmt, settings2) {
|
||
generateForStatementIterator("in", $stmt, settings2);
|
||
},
|
||
ForOfStatement: function generateForOfStatement($stmt, settings2) {
|
||
generateForStatementIterator("of", $stmt, settings2);
|
||
},
|
||
LabeledStatement: function generateLabeledStatement($stmt, settings2) {
|
||
var $body = $stmt.body, bodySemicolonOptional = !semicolons && settings2.semicolonOptional, prevIndent = _.indent;
|
||
_.js += $stmt.label.name + ":" + adoptionPrefix($body);
|
||
if ($body.type !== Syntax2.BlockStatement)
|
||
prevIndent = shiftIndent();
|
||
StmtGen[$body.type]($body, Preset.s4(bodySemicolonOptional));
|
||
_.indent = prevIndent;
|
||
},
|
||
ModuleDeclaration: function generateModuleDeclaration($stmt, settings2) {
|
||
_.js += "module" + _.space + $stmt.id.name + _.space + "from" + _.optSpace;
|
||
ExprGen.Literal($stmt.source);
|
||
if (semicolons || !settings2.semicolonOptional)
|
||
_.js += ";";
|
||
},
|
||
Program: function generateProgram($stmt) {
|
||
var $body = $stmt.body, len = $body.length, lastIdx = len - 1;
|
||
if (safeConcatenation && len > 0)
|
||
_.js += "\n";
|
||
for (var i = 0; i < len; i++) {
|
||
var $item = $body[i];
|
||
_.js += _.indent;
|
||
StmtGen[$item.type]($item, Preset.s5(!safeConcatenation && i === lastIdx));
|
||
if (i !== lastIdx)
|
||
_.js += _.newline;
|
||
}
|
||
},
|
||
FunctionDeclaration: function generateFunctionDeclaration($stmt) {
|
||
var isGenerator = !!$stmt.generator;
|
||
if ($stmt.async)
|
||
_.js += "async ";
|
||
_.js += isGenerator ? "function*" + _.optSpace : "function" + _.space;
|
||
_.js += $stmt.id.name;
|
||
generateFunctionBody($stmt);
|
||
},
|
||
ReturnStatement: function generateReturnStatement($stmt, settings2) {
|
||
var $arg = $stmt.argument;
|
||
if ($arg) {
|
||
var argJs = exprToJs($arg, Preset.e5);
|
||
_.js += join("return", argJs);
|
||
} else
|
||
_.js += "return";
|
||
if (semicolons || !settings2.semicolonOptional)
|
||
_.js += ";";
|
||
},
|
||
WhileStatement: function generateWhileStatement($stmt, settings2) {
|
||
var $body = $stmt.body, $test = $stmt.test, bodySemicolonOptional = !semicolons && settings2.semicolonOptional, prevIndent = shiftIndent();
|
||
_.js += "while" + _.optSpace + "(";
|
||
ExprGen[$test.type]($test, Preset.e5);
|
||
_.js += ")";
|
||
_.indent = prevIndent;
|
||
_.js += adoptionPrefix($body);
|
||
StmtGen[$body.type]($body, Preset.s4(bodySemicolonOptional));
|
||
},
|
||
WithStatement: function generateWithStatement($stmt, settings2) {
|
||
var $body = $stmt.body, $obj = $stmt.object, bodySemicolonOptional = !semicolons && settings2.semicolonOptional, prevIndent = shiftIndent();
|
||
_.js += "with" + _.optSpace + "(";
|
||
ExprGen[$obj.type]($obj, Preset.e5);
|
||
_.js += ")";
|
||
_.indent = prevIndent;
|
||
_.js += adoptionPrefix($body);
|
||
StmtGen[$body.type]($body, Preset.s4(bodySemicolonOptional));
|
||
}
|
||
};
|
||
function exprToJs($expr, settings2, $parent) {
|
||
var savedJs = _.js;
|
||
_.js = "";
|
||
ExprGen[$expr.type]($expr, settings2, $parent);
|
||
var src = _.js;
|
||
_.js = savedJs;
|
||
return src;
|
||
}
|
||
function stmtToJs($stmt, settings2) {
|
||
var savedJs = _.js;
|
||
_.js = "";
|
||
StmtGen[$stmt.type]($stmt, settings2);
|
||
var src = _.js;
|
||
_.js = savedJs;
|
||
return src;
|
||
}
|
||
function run($node) {
|
||
_.js = "";
|
||
if (StmtGen[$node.type])
|
||
StmtGen[$node.type]($node, Preset.s7);
|
||
else
|
||
ExprGen[$node.type]($node, Preset.e19);
|
||
return _.js;
|
||
}
|
||
function wrapExprGen(gen) {
|
||
return function($expr, settings2) {
|
||
if (extra.verbatim && $expr.hasOwnProperty(extra.verbatim))
|
||
generateVerbatim($expr, settings2);
|
||
else
|
||
gen($expr, settings2);
|
||
};
|
||
}
|
||
function createExprGenWithExtras() {
|
||
var gens = {};
|
||
for (var key in ExprRawGen) {
|
||
if (ExprRawGen.hasOwnProperty(key))
|
||
gens[key] = wrapExprGen(ExprRawGen[key]);
|
||
}
|
||
return gens;
|
||
}
|
||
var _ = {
|
||
js: "",
|
||
newline: "\n",
|
||
optSpace: " ",
|
||
space: " ",
|
||
indentUnit: " ",
|
||
indent: ""
|
||
};
|
||
var ExprGen = void 0;
|
||
var StmtGen = StmtRawGen;
|
||
exports.generate = function($node, options) {
|
||
var defaultOptions = getDefaultOptions(), result, pair;
|
||
if (options != null) {
|
||
if (typeof options.indent === "string") {
|
||
defaultOptions.format.indent.style = options.indent;
|
||
}
|
||
if (typeof options.base === "number") {
|
||
defaultOptions.format.indent.base = options.base;
|
||
}
|
||
options = updateDeeply(defaultOptions, options);
|
||
_.indentUnit = options.format.indent.style;
|
||
if (typeof options.base === "string") {
|
||
_.indent = options.base;
|
||
} else {
|
||
_.indent = stringRepeat(_.indentUnit, options.format.indent.base);
|
||
}
|
||
} else {
|
||
options = defaultOptions;
|
||
_.indentUnit = options.format.indent.style;
|
||
_.indent = stringRepeat(_.indentUnit, options.format.indent.base);
|
||
}
|
||
json = options.format.json;
|
||
renumber = options.format.renumber;
|
||
hexadecimal = json ? false : options.format.hexadecimal;
|
||
quotes = json ? "double" : options.format.quotes;
|
||
escapeless = options.format.escapeless;
|
||
_.newline = options.format.newline;
|
||
_.optSpace = options.format.space;
|
||
if (options.format.compact)
|
||
_.newline = _.optSpace = _.indentUnit = _.indent = "";
|
||
_.space = _.optSpace ? _.optSpace : " ";
|
||
parentheses2 = options.format.parentheses;
|
||
semicolons = options.format.semicolons;
|
||
safeConcatenation = options.format.safeConcatenation;
|
||
directive = options.directive;
|
||
parse45 = json ? null : options.parse;
|
||
extra = options;
|
||
if (extra.verbatim)
|
||
ExprGen = createExprGenWithExtras();
|
||
else
|
||
ExprGen = ExprRawGen;
|
||
return run($node);
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/set-cookie-parser/lib/set-cookie.js
|
||
var require_set_cookie = __commonJS({
|
||
"node_modules/set-cookie-parser/lib/set-cookie.js"(exports, module) {
|
||
"use strict";
|
||
var defaultParseOptions = {
|
||
decodeValues: true,
|
||
map: false,
|
||
silent: false
|
||
};
|
||
function isNonEmptyString(str) {
|
||
return typeof str === "string" && !!str.trim();
|
||
}
|
||
function parseString(setCookieValue, options) {
|
||
var parts = setCookieValue.split(";").filter(isNonEmptyString);
|
||
var nameValuePairStr = parts.shift();
|
||
var parsed = parseNameValuePair(nameValuePairStr);
|
||
var name42 = parsed.name;
|
||
var value = parsed.value;
|
||
options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
|
||
try {
|
||
value = options.decodeValues ? decodeURIComponent(value) : value;
|
||
} catch (e) {
|
||
console.error(
|
||
"set-cookie-parser encountered an error while decoding a cookie with value '" + value + "'. Set options.decodeValues to false to disable this feature.",
|
||
e
|
||
);
|
||
}
|
||
var cookie = {
|
||
name: name42,
|
||
value
|
||
};
|
||
parts.forEach(function(part) {
|
||
var sides = part.split("=");
|
||
var key = sides.shift().trimLeft().toLowerCase();
|
||
var value2 = sides.join("=");
|
||
if (key === "expires") {
|
||
cookie.expires = new Date(value2);
|
||
} else if (key === "max-age") {
|
||
cookie.maxAge = parseInt(value2, 10);
|
||
} else if (key === "secure") {
|
||
cookie.secure = true;
|
||
} else if (key === "httponly") {
|
||
cookie.httpOnly = true;
|
||
} else if (key === "samesite") {
|
||
cookie.sameSite = value2;
|
||
} else {
|
||
cookie[key] = value2;
|
||
}
|
||
});
|
||
return cookie;
|
||
}
|
||
function parseNameValuePair(nameValuePairStr) {
|
||
var name42 = "";
|
||
var value = "";
|
||
var nameValueArr = nameValuePairStr.split("=");
|
||
if (nameValueArr.length > 1) {
|
||
name42 = nameValueArr.shift();
|
||
value = nameValueArr.join("=");
|
||
} else {
|
||
value = nameValuePairStr;
|
||
}
|
||
return { name: name42, value };
|
||
}
|
||
function parse45(input, options) {
|
||
options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
|
||
if (!input) {
|
||
if (!options.map) {
|
||
return [];
|
||
} else {
|
||
return {};
|
||
}
|
||
}
|
||
if (input.headers) {
|
||
if (typeof input.headers.getSetCookie === "function") {
|
||
input = input.headers.getSetCookie();
|
||
} else if (input.headers["set-cookie"]) {
|
||
input = input.headers["set-cookie"];
|
||
} else {
|
||
var sch = input.headers[Object.keys(input.headers).find(function(key) {
|
||
return key.toLowerCase() === "set-cookie";
|
||
})];
|
||
if (!sch && input.headers.cookie && !options.silent) {
|
||
console.warn(
|
||
"Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
|
||
);
|
||
}
|
||
input = sch;
|
||
}
|
||
}
|
||
if (!Array.isArray(input)) {
|
||
input = [input];
|
||
}
|
||
options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
|
||
if (!options.map) {
|
||
return input.filter(isNonEmptyString).map(function(str) {
|
||
return parseString(str, options);
|
||
});
|
||
} else {
|
||
var cookies = {};
|
||
return input.filter(isNonEmptyString).reduce(function(cookies2, str) {
|
||
var cookie = parseString(str, options);
|
||
cookies2[cookie.name] = cookie;
|
||
return cookies2;
|
||
}, cookies);
|
||
}
|
||
}
|
||
function splitCookiesString(cookiesString) {
|
||
if (Array.isArray(cookiesString)) {
|
||
return cookiesString;
|
||
}
|
||
if (typeof cookiesString !== "string") {
|
||
return [];
|
||
}
|
||
var cookiesStrings = [];
|
||
var pos = 0;
|
||
var start;
|
||
var ch;
|
||
var lastComma;
|
||
var nextStart;
|
||
var cookiesSeparatorFound;
|
||
function skipWhitespace() {
|
||
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
|
||
pos += 1;
|
||
}
|
||
return pos < cookiesString.length;
|
||
}
|
||
function notSpecialChar() {
|
||
ch = cookiesString.charAt(pos);
|
||
return ch !== "=" && ch !== ";" && ch !== ",";
|
||
}
|
||
while (pos < cookiesString.length) {
|
||
start = pos;
|
||
cookiesSeparatorFound = false;
|
||
while (skipWhitespace()) {
|
||
ch = cookiesString.charAt(pos);
|
||
if (ch === ",") {
|
||
lastComma = pos;
|
||
pos += 1;
|
||
skipWhitespace();
|
||
nextStart = pos;
|
||
while (pos < cookiesString.length && notSpecialChar()) {
|
||
pos += 1;
|
||
}
|
||
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
||
cookiesSeparatorFound = true;
|
||
pos = nextStart;
|
||
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
||
start = pos;
|
||
} else {
|
||
pos = lastComma + 1;
|
||
}
|
||
} else {
|
||
pos += 1;
|
||
}
|
||
}
|
||
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
||
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
|
||
}
|
||
}
|
||
return cookiesStrings;
|
||
}
|
||
module.exports = parse45;
|
||
module.exports.parse = parse45;
|
||
module.exports.parseString = parseString;
|
||
module.exports.splitCookiesString = splitCookiesString;
|
||
}
|
||
});
|
||
|
||
// node_modules/mime-db/db.json
|
||
var require_db = __commonJS({
|
||
"node_modules/mime-db/db.json"(exports, module) {
|
||
module.exports = {
|
||
"application/1d-interleaved-parityfec": {
|
||
source: "iana"
|
||
},
|
||
"application/3gpdash-qoe-report+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/3gpp-ims+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/3gpphal+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/3gpphalforms+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/a2l": {
|
||
source: "iana"
|
||
},
|
||
"application/ace+cbor": {
|
||
source: "iana"
|
||
},
|
||
"application/activemessage": {
|
||
source: "iana"
|
||
},
|
||
"application/activity+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/alto-costmap+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/alto-costmapfilter+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/alto-directory+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/alto-endpointcost+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/alto-endpointcostparams+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/alto-endpointprop+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/alto-endpointpropparams+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/alto-error+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/alto-networkmap+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/alto-networkmapfilter+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/alto-updatestreamcontrol+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/alto-updatestreamparams+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/aml": {
|
||
source: "iana"
|
||
},
|
||
"application/andrew-inset": {
|
||
source: "iana",
|
||
extensions: ["ez"]
|
||
},
|
||
"application/applefile": {
|
||
source: "iana"
|
||
},
|
||
"application/applixware": {
|
||
source: "apache",
|
||
extensions: ["aw"]
|
||
},
|
||
"application/at+jwt": {
|
||
source: "iana"
|
||
},
|
||
"application/atf": {
|
||
source: "iana"
|
||
},
|
||
"application/atfx": {
|
||
source: "iana"
|
||
},
|
||
"application/atom+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["atom"]
|
||
},
|
||
"application/atomcat+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["atomcat"]
|
||
},
|
||
"application/atomdeleted+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["atomdeleted"]
|
||
},
|
||
"application/atomicmail": {
|
||
source: "iana"
|
||
},
|
||
"application/atomsvc+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["atomsvc"]
|
||
},
|
||
"application/atsc-dwd+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["dwd"]
|
||
},
|
||
"application/atsc-dynamic-event-message": {
|
||
source: "iana"
|
||
},
|
||
"application/atsc-held+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["held"]
|
||
},
|
||
"application/atsc-rdt+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/atsc-rsat+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["rsat"]
|
||
},
|
||
"application/atxml": {
|
||
source: "iana"
|
||
},
|
||
"application/auth-policy+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/bacnet-xdd+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/batch-smtp": {
|
||
source: "iana"
|
||
},
|
||
"application/bdoc": {
|
||
compressible: false,
|
||
extensions: ["bdoc"]
|
||
},
|
||
"application/beep+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/calendar+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/calendar+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xcs"]
|
||
},
|
||
"application/call-completion": {
|
||
source: "iana"
|
||
},
|
||
"application/cals-1840": {
|
||
source: "iana"
|
||
},
|
||
"application/captive+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/cbor": {
|
||
source: "iana"
|
||
},
|
||
"application/cbor-seq": {
|
||
source: "iana"
|
||
},
|
||
"application/cccex": {
|
||
source: "iana"
|
||
},
|
||
"application/ccmp+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/ccxml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["ccxml"]
|
||
},
|
||
"application/cdfx+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["cdfx"]
|
||
},
|
||
"application/cdmi-capability": {
|
||
source: "iana",
|
||
extensions: ["cdmia"]
|
||
},
|
||
"application/cdmi-container": {
|
||
source: "iana",
|
||
extensions: ["cdmic"]
|
||
},
|
||
"application/cdmi-domain": {
|
||
source: "iana",
|
||
extensions: ["cdmid"]
|
||
},
|
||
"application/cdmi-object": {
|
||
source: "iana",
|
||
extensions: ["cdmio"]
|
||
},
|
||
"application/cdmi-queue": {
|
||
source: "iana",
|
||
extensions: ["cdmiq"]
|
||
},
|
||
"application/cdni": {
|
||
source: "iana"
|
||
},
|
||
"application/cea": {
|
||
source: "iana"
|
||
},
|
||
"application/cea-2018+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/cellml+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/cfw": {
|
||
source: "iana"
|
||
},
|
||
"application/city+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/clr": {
|
||
source: "iana"
|
||
},
|
||
"application/clue+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/clue_info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/cms": {
|
||
source: "iana"
|
||
},
|
||
"application/cnrp+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/coap-group+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/coap-payload": {
|
||
source: "iana"
|
||
},
|
||
"application/commonground": {
|
||
source: "iana"
|
||
},
|
||
"application/conference-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/cose": {
|
||
source: "iana"
|
||
},
|
||
"application/cose-key": {
|
||
source: "iana"
|
||
},
|
||
"application/cose-key-set": {
|
||
source: "iana"
|
||
},
|
||
"application/cpl+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["cpl"]
|
||
},
|
||
"application/csrattrs": {
|
||
source: "iana"
|
||
},
|
||
"application/csta+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/cstadata+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/csvm+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/cu-seeme": {
|
||
source: "apache",
|
||
extensions: ["cu"]
|
||
},
|
||
"application/cwt": {
|
||
source: "iana"
|
||
},
|
||
"application/cybercash": {
|
||
source: "iana"
|
||
},
|
||
"application/dart": {
|
||
compressible: true
|
||
},
|
||
"application/dash+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["mpd"]
|
||
},
|
||
"application/dash-patch+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["mpp"]
|
||
},
|
||
"application/dashdelta": {
|
||
source: "iana"
|
||
},
|
||
"application/davmount+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["davmount"]
|
||
},
|
||
"application/dca-rft": {
|
||
source: "iana"
|
||
},
|
||
"application/dcd": {
|
||
source: "iana"
|
||
},
|
||
"application/dec-dx": {
|
||
source: "iana"
|
||
},
|
||
"application/dialog-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/dicom": {
|
||
source: "iana"
|
||
},
|
||
"application/dicom+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/dicom+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/dii": {
|
||
source: "iana"
|
||
},
|
||
"application/dit": {
|
||
source: "iana"
|
||
},
|
||
"application/dns": {
|
||
source: "iana"
|
||
},
|
||
"application/dns+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/dns-message": {
|
||
source: "iana"
|
||
},
|
||
"application/docbook+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["dbk"]
|
||
},
|
||
"application/dots+cbor": {
|
||
source: "iana"
|
||
},
|
||
"application/dskpp+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/dssc+der": {
|
||
source: "iana",
|
||
extensions: ["dssc"]
|
||
},
|
||
"application/dssc+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xdssc"]
|
||
},
|
||
"application/dvcs": {
|
||
source: "iana"
|
||
},
|
||
"application/ecmascript": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["es", "ecma"]
|
||
},
|
||
"application/edi-consent": {
|
||
source: "iana"
|
||
},
|
||
"application/edi-x12": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/edifact": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/efi": {
|
||
source: "iana"
|
||
},
|
||
"application/elm+json": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/elm+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/emergencycalldata.cap+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/emergencycalldata.comment+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/emergencycalldata.control+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/emergencycalldata.deviceinfo+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/emergencycalldata.ecall.msd": {
|
||
source: "iana"
|
||
},
|
||
"application/emergencycalldata.providerinfo+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/emergencycalldata.serviceinfo+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/emergencycalldata.subscriberinfo+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/emergencycalldata.veds+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/emma+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["emma"]
|
||
},
|
||
"application/emotionml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["emotionml"]
|
||
},
|
||
"application/encaprtp": {
|
||
source: "iana"
|
||
},
|
||
"application/epp+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/epub+zip": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["epub"]
|
||
},
|
||
"application/eshop": {
|
||
source: "iana"
|
||
},
|
||
"application/exi": {
|
||
source: "iana",
|
||
extensions: ["exi"]
|
||
},
|
||
"application/expect-ct-report+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/express": {
|
||
source: "iana",
|
||
extensions: ["exp"]
|
||
},
|
||
"application/fastinfoset": {
|
||
source: "iana"
|
||
},
|
||
"application/fastsoap": {
|
||
source: "iana"
|
||
},
|
||
"application/fdt+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["fdt"]
|
||
},
|
||
"application/fhir+json": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/fhir+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/fido.trusted-apps+json": {
|
||
compressible: true
|
||
},
|
||
"application/fits": {
|
||
source: "iana"
|
||
},
|
||
"application/flexfec": {
|
||
source: "iana"
|
||
},
|
||
"application/font-sfnt": {
|
||
source: "iana"
|
||
},
|
||
"application/font-tdpfr": {
|
||
source: "iana",
|
||
extensions: ["pfr"]
|
||
},
|
||
"application/font-woff": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/framework-attributes+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/geo+json": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["geojson"]
|
||
},
|
||
"application/geo+json-seq": {
|
||
source: "iana"
|
||
},
|
||
"application/geopackage+sqlite3": {
|
||
source: "iana"
|
||
},
|
||
"application/geoxacml+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/gltf-buffer": {
|
||
source: "iana"
|
||
},
|
||
"application/gml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["gml"]
|
||
},
|
||
"application/gpx+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["gpx"]
|
||
},
|
||
"application/gxf": {
|
||
source: "apache",
|
||
extensions: ["gxf"]
|
||
},
|
||
"application/gzip": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["gz"]
|
||
},
|
||
"application/h224": {
|
||
source: "iana"
|
||
},
|
||
"application/held+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/hjson": {
|
||
extensions: ["hjson"]
|
||
},
|
||
"application/http": {
|
||
source: "iana"
|
||
},
|
||
"application/hyperstudio": {
|
||
source: "iana",
|
||
extensions: ["stk"]
|
||
},
|
||
"application/ibe-key-request+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/ibe-pkg-reply+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/ibe-pp-data": {
|
||
source: "iana"
|
||
},
|
||
"application/iges": {
|
||
source: "iana"
|
||
},
|
||
"application/im-iscomposing+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/index": {
|
||
source: "iana"
|
||
},
|
||
"application/index.cmd": {
|
||
source: "iana"
|
||
},
|
||
"application/index.obj": {
|
||
source: "iana"
|
||
},
|
||
"application/index.response": {
|
||
source: "iana"
|
||
},
|
||
"application/index.vnd": {
|
||
source: "iana"
|
||
},
|
||
"application/inkml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["ink", "inkml"]
|
||
},
|
||
"application/iotp": {
|
||
source: "iana"
|
||
},
|
||
"application/ipfix": {
|
||
source: "iana",
|
||
extensions: ["ipfix"]
|
||
},
|
||
"application/ipp": {
|
||
source: "iana"
|
||
},
|
||
"application/isup": {
|
||
source: "iana"
|
||
},
|
||
"application/its+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["its"]
|
||
},
|
||
"application/java-archive": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["jar", "war", "ear"]
|
||
},
|
||
"application/java-serialized-object": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["ser"]
|
||
},
|
||
"application/java-vm": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["class"]
|
||
},
|
||
"application/javascript": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true,
|
||
extensions: ["js", "mjs"]
|
||
},
|
||
"application/jf2feed+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/jose": {
|
||
source: "iana"
|
||
},
|
||
"application/jose+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/jrd+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/jscalendar+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/json": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true,
|
||
extensions: ["json", "map"]
|
||
},
|
||
"application/json-patch+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/json-seq": {
|
||
source: "iana"
|
||
},
|
||
"application/json5": {
|
||
extensions: ["json5"]
|
||
},
|
||
"application/jsonml+json": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["jsonml"]
|
||
},
|
||
"application/jwk+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/jwk-set+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/jwt": {
|
||
source: "iana"
|
||
},
|
||
"application/kpml-request+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/kpml-response+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/ld+json": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["jsonld"]
|
||
},
|
||
"application/lgr+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["lgr"]
|
||
},
|
||
"application/link-format": {
|
||
source: "iana"
|
||
},
|
||
"application/load-control+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/lost+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["lostxml"]
|
||
},
|
||
"application/lostsync+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/lpf+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/lxf": {
|
||
source: "iana"
|
||
},
|
||
"application/mac-binhex40": {
|
||
source: "iana",
|
||
extensions: ["hqx"]
|
||
},
|
||
"application/mac-compactpro": {
|
||
source: "apache",
|
||
extensions: ["cpt"]
|
||
},
|
||
"application/macwriteii": {
|
||
source: "iana"
|
||
},
|
||
"application/mads+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["mads"]
|
||
},
|
||
"application/manifest+json": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true,
|
||
extensions: ["webmanifest"]
|
||
},
|
||
"application/marc": {
|
||
source: "iana",
|
||
extensions: ["mrc"]
|
||
},
|
||
"application/marcxml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["mrcx"]
|
||
},
|
||
"application/mathematica": {
|
||
source: "iana",
|
||
extensions: ["ma", "nb", "mb"]
|
||
},
|
||
"application/mathml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["mathml"]
|
||
},
|
||
"application/mathml-content+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mathml-presentation+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mbms-associated-procedure-description+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mbms-deregister+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mbms-envelope+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mbms-msk+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mbms-msk-response+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mbms-protection-description+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mbms-reception-report+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mbms-register+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mbms-register-response+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mbms-schedule+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mbms-user-service-description+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mbox": {
|
||
source: "iana",
|
||
extensions: ["mbox"]
|
||
},
|
||
"application/media-policy-dataset+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["mpf"]
|
||
},
|
||
"application/media_control+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mediaservercontrol+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["mscml"]
|
||
},
|
||
"application/merge-patch+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/metalink+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["metalink"]
|
||
},
|
||
"application/metalink4+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["meta4"]
|
||
},
|
||
"application/mets+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["mets"]
|
||
},
|
||
"application/mf4": {
|
||
source: "iana"
|
||
},
|
||
"application/mikey": {
|
||
source: "iana"
|
||
},
|
||
"application/mipc": {
|
||
source: "iana"
|
||
},
|
||
"application/missing-blocks+cbor-seq": {
|
||
source: "iana"
|
||
},
|
||
"application/mmt-aei+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["maei"]
|
||
},
|
||
"application/mmt-usd+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["musd"]
|
||
},
|
||
"application/mods+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["mods"]
|
||
},
|
||
"application/moss-keys": {
|
||
source: "iana"
|
||
},
|
||
"application/moss-signature": {
|
||
source: "iana"
|
||
},
|
||
"application/mosskey-data": {
|
||
source: "iana"
|
||
},
|
||
"application/mosskey-request": {
|
||
source: "iana"
|
||
},
|
||
"application/mp21": {
|
||
source: "iana",
|
||
extensions: ["m21", "mp21"]
|
||
},
|
||
"application/mp4": {
|
||
source: "iana",
|
||
extensions: ["mp4s", "m4p"]
|
||
},
|
||
"application/mpeg4-generic": {
|
||
source: "iana"
|
||
},
|
||
"application/mpeg4-iod": {
|
||
source: "iana"
|
||
},
|
||
"application/mpeg4-iod-xmt": {
|
||
source: "iana"
|
||
},
|
||
"application/mrb-consumer+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/mrb-publish+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/msc-ivr+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/msc-mixer+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/msword": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["doc", "dot"]
|
||
},
|
||
"application/mud+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/multipart-core": {
|
||
source: "iana"
|
||
},
|
||
"application/mxf": {
|
||
source: "iana",
|
||
extensions: ["mxf"]
|
||
},
|
||
"application/n-quads": {
|
||
source: "iana",
|
||
extensions: ["nq"]
|
||
},
|
||
"application/n-triples": {
|
||
source: "iana",
|
||
extensions: ["nt"]
|
||
},
|
||
"application/nasdata": {
|
||
source: "iana"
|
||
},
|
||
"application/news-checkgroups": {
|
||
source: "iana",
|
||
charset: "US-ASCII"
|
||
},
|
||
"application/news-groupinfo": {
|
||
source: "iana",
|
||
charset: "US-ASCII"
|
||
},
|
||
"application/news-transmission": {
|
||
source: "iana"
|
||
},
|
||
"application/nlsml+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/node": {
|
||
source: "iana",
|
||
extensions: ["cjs"]
|
||
},
|
||
"application/nss": {
|
||
source: "iana"
|
||
},
|
||
"application/oauth-authz-req+jwt": {
|
||
source: "iana"
|
||
},
|
||
"application/oblivious-dns-message": {
|
||
source: "iana"
|
||
},
|
||
"application/ocsp-request": {
|
||
source: "iana"
|
||
},
|
||
"application/ocsp-response": {
|
||
source: "iana"
|
||
},
|
||
"application/octet-stream": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"]
|
||
},
|
||
"application/oda": {
|
||
source: "iana",
|
||
extensions: ["oda"]
|
||
},
|
||
"application/odm+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/odx": {
|
||
source: "iana"
|
||
},
|
||
"application/oebps-package+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["opf"]
|
||
},
|
||
"application/ogg": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["ogx"]
|
||
},
|
||
"application/omdoc+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["omdoc"]
|
||
},
|
||
"application/onenote": {
|
||
source: "apache",
|
||
extensions: ["onetoc", "onetoc2", "onetmp", "onepkg"]
|
||
},
|
||
"application/opc-nodeset+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/oscore": {
|
||
source: "iana"
|
||
},
|
||
"application/oxps": {
|
||
source: "iana",
|
||
extensions: ["oxps"]
|
||
},
|
||
"application/p21": {
|
||
source: "iana"
|
||
},
|
||
"application/p21+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/p2p-overlay+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["relo"]
|
||
},
|
||
"application/parityfec": {
|
||
source: "iana"
|
||
},
|
||
"application/passport": {
|
||
source: "iana"
|
||
},
|
||
"application/patch-ops-error+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xer"]
|
||
},
|
||
"application/pdf": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["pdf"]
|
||
},
|
||
"application/pdx": {
|
||
source: "iana"
|
||
},
|
||
"application/pem-certificate-chain": {
|
||
source: "iana"
|
||
},
|
||
"application/pgp-encrypted": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["pgp"]
|
||
},
|
||
"application/pgp-keys": {
|
||
source: "iana",
|
||
extensions: ["asc"]
|
||
},
|
||
"application/pgp-signature": {
|
||
source: "iana",
|
||
extensions: ["asc", "sig"]
|
||
},
|
||
"application/pics-rules": {
|
||
source: "apache",
|
||
extensions: ["prf"]
|
||
},
|
||
"application/pidf+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/pidf-diff+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/pkcs10": {
|
||
source: "iana",
|
||
extensions: ["p10"]
|
||
},
|
||
"application/pkcs12": {
|
||
source: "iana"
|
||
},
|
||
"application/pkcs7-mime": {
|
||
source: "iana",
|
||
extensions: ["p7m", "p7c"]
|
||
},
|
||
"application/pkcs7-signature": {
|
||
source: "iana",
|
||
extensions: ["p7s"]
|
||
},
|
||
"application/pkcs8": {
|
||
source: "iana",
|
||
extensions: ["p8"]
|
||
},
|
||
"application/pkcs8-encrypted": {
|
||
source: "iana"
|
||
},
|
||
"application/pkix-attr-cert": {
|
||
source: "iana",
|
||
extensions: ["ac"]
|
||
},
|
||
"application/pkix-cert": {
|
||
source: "iana",
|
||
extensions: ["cer"]
|
||
},
|
||
"application/pkix-crl": {
|
||
source: "iana",
|
||
extensions: ["crl"]
|
||
},
|
||
"application/pkix-pkipath": {
|
||
source: "iana",
|
||
extensions: ["pkipath"]
|
||
},
|
||
"application/pkixcmp": {
|
||
source: "iana",
|
||
extensions: ["pki"]
|
||
},
|
||
"application/pls+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["pls"]
|
||
},
|
||
"application/poc-settings+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/postscript": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["ai", "eps", "ps"]
|
||
},
|
||
"application/ppsp-tracker+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/problem+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/problem+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/provenance+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["provx"]
|
||
},
|
||
"application/prs.alvestrand.titrax-sheet": {
|
||
source: "iana"
|
||
},
|
||
"application/prs.cww": {
|
||
source: "iana",
|
||
extensions: ["cww"]
|
||
},
|
||
"application/prs.cyn": {
|
||
source: "iana",
|
||
charset: "7-BIT"
|
||
},
|
||
"application/prs.hpub+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/prs.nprend": {
|
||
source: "iana"
|
||
},
|
||
"application/prs.plucker": {
|
||
source: "iana"
|
||
},
|
||
"application/prs.rdf-xml-crypt": {
|
||
source: "iana"
|
||
},
|
||
"application/prs.xsf+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/pskc+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["pskcxml"]
|
||
},
|
||
"application/pvd+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/qsig": {
|
||
source: "iana"
|
||
},
|
||
"application/raml+yaml": {
|
||
compressible: true,
|
||
extensions: ["raml"]
|
||
},
|
||
"application/raptorfec": {
|
||
source: "iana"
|
||
},
|
||
"application/rdap+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/rdf+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["rdf", "owl"]
|
||
},
|
||
"application/reginfo+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["rif"]
|
||
},
|
||
"application/relax-ng-compact-syntax": {
|
||
source: "iana",
|
||
extensions: ["rnc"]
|
||
},
|
||
"application/remote-printing": {
|
||
source: "iana"
|
||
},
|
||
"application/reputon+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/resource-lists+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["rl"]
|
||
},
|
||
"application/resource-lists-diff+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["rld"]
|
||
},
|
||
"application/rfc+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/riscos": {
|
||
source: "iana"
|
||
},
|
||
"application/rlmi+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/rls-services+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["rs"]
|
||
},
|
||
"application/route-apd+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["rapd"]
|
||
},
|
||
"application/route-s-tsid+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["sls"]
|
||
},
|
||
"application/route-usd+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["rusd"]
|
||
},
|
||
"application/rpki-ghostbusters": {
|
||
source: "iana",
|
||
extensions: ["gbr"]
|
||
},
|
||
"application/rpki-manifest": {
|
||
source: "iana",
|
||
extensions: ["mft"]
|
||
},
|
||
"application/rpki-publication": {
|
||
source: "iana"
|
||
},
|
||
"application/rpki-roa": {
|
||
source: "iana",
|
||
extensions: ["roa"]
|
||
},
|
||
"application/rpki-updown": {
|
||
source: "iana"
|
||
},
|
||
"application/rsd+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["rsd"]
|
||
},
|
||
"application/rss+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["rss"]
|
||
},
|
||
"application/rtf": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["rtf"]
|
||
},
|
||
"application/rtploopback": {
|
||
source: "iana"
|
||
},
|
||
"application/rtx": {
|
||
source: "iana"
|
||
},
|
||
"application/samlassertion+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/samlmetadata+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/sarif+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/sarif-external-properties+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/sbe": {
|
||
source: "iana"
|
||
},
|
||
"application/sbml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["sbml"]
|
||
},
|
||
"application/scaip+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/scim+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/scvp-cv-request": {
|
||
source: "iana",
|
||
extensions: ["scq"]
|
||
},
|
||
"application/scvp-cv-response": {
|
||
source: "iana",
|
||
extensions: ["scs"]
|
||
},
|
||
"application/scvp-vp-request": {
|
||
source: "iana",
|
||
extensions: ["spq"]
|
||
},
|
||
"application/scvp-vp-response": {
|
||
source: "iana",
|
||
extensions: ["spp"]
|
||
},
|
||
"application/sdp": {
|
||
source: "iana",
|
||
extensions: ["sdp"]
|
||
},
|
||
"application/secevent+jwt": {
|
||
source: "iana"
|
||
},
|
||
"application/senml+cbor": {
|
||
source: "iana"
|
||
},
|
||
"application/senml+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/senml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["senmlx"]
|
||
},
|
||
"application/senml-etch+cbor": {
|
||
source: "iana"
|
||
},
|
||
"application/senml-etch+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/senml-exi": {
|
||
source: "iana"
|
||
},
|
||
"application/sensml+cbor": {
|
||
source: "iana"
|
||
},
|
||
"application/sensml+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/sensml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["sensmlx"]
|
||
},
|
||
"application/sensml-exi": {
|
||
source: "iana"
|
||
},
|
||
"application/sep+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/sep-exi": {
|
||
source: "iana"
|
||
},
|
||
"application/session-info": {
|
||
source: "iana"
|
||
},
|
||
"application/set-payment": {
|
||
source: "iana"
|
||
},
|
||
"application/set-payment-initiation": {
|
||
source: "iana",
|
||
extensions: ["setpay"]
|
||
},
|
||
"application/set-registration": {
|
||
source: "iana"
|
||
},
|
||
"application/set-registration-initiation": {
|
||
source: "iana",
|
||
extensions: ["setreg"]
|
||
},
|
||
"application/sgml": {
|
||
source: "iana"
|
||
},
|
||
"application/sgml-open-catalog": {
|
||
source: "iana"
|
||
},
|
||
"application/shf+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["shf"]
|
||
},
|
||
"application/sieve": {
|
||
source: "iana",
|
||
extensions: ["siv", "sieve"]
|
||
},
|
||
"application/simple-filter+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/simple-message-summary": {
|
||
source: "iana"
|
||
},
|
||
"application/simplesymbolcontainer": {
|
||
source: "iana"
|
||
},
|
||
"application/sipc": {
|
||
source: "iana"
|
||
},
|
||
"application/slate": {
|
||
source: "iana"
|
||
},
|
||
"application/smil": {
|
||
source: "iana"
|
||
},
|
||
"application/smil+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["smi", "smil"]
|
||
},
|
||
"application/smpte336m": {
|
||
source: "iana"
|
||
},
|
||
"application/soap+fastinfoset": {
|
||
source: "iana"
|
||
},
|
||
"application/soap+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/sparql-query": {
|
||
source: "iana",
|
||
extensions: ["rq"]
|
||
},
|
||
"application/sparql-results+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["srx"]
|
||
},
|
||
"application/spdx+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/spirits-event+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/sql": {
|
||
source: "iana"
|
||
},
|
||
"application/srgs": {
|
||
source: "iana",
|
||
extensions: ["gram"]
|
||
},
|
||
"application/srgs+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["grxml"]
|
||
},
|
||
"application/sru+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["sru"]
|
||
},
|
||
"application/ssdl+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["ssdl"]
|
||
},
|
||
"application/ssml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["ssml"]
|
||
},
|
||
"application/stix+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/swid+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["swidtag"]
|
||
},
|
||
"application/tamp-apex-update": {
|
||
source: "iana"
|
||
},
|
||
"application/tamp-apex-update-confirm": {
|
||
source: "iana"
|
||
},
|
||
"application/tamp-community-update": {
|
||
source: "iana"
|
||
},
|
||
"application/tamp-community-update-confirm": {
|
||
source: "iana"
|
||
},
|
||
"application/tamp-error": {
|
||
source: "iana"
|
||
},
|
||
"application/tamp-sequence-adjust": {
|
||
source: "iana"
|
||
},
|
||
"application/tamp-sequence-adjust-confirm": {
|
||
source: "iana"
|
||
},
|
||
"application/tamp-status-query": {
|
||
source: "iana"
|
||
},
|
||
"application/tamp-status-response": {
|
||
source: "iana"
|
||
},
|
||
"application/tamp-update": {
|
||
source: "iana"
|
||
},
|
||
"application/tamp-update-confirm": {
|
||
source: "iana"
|
||
},
|
||
"application/tar": {
|
||
compressible: true
|
||
},
|
||
"application/taxii+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/td+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/tei+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["tei", "teicorpus"]
|
||
},
|
||
"application/tetra_isi": {
|
||
source: "iana"
|
||
},
|
||
"application/thraud+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["tfi"]
|
||
},
|
||
"application/timestamp-query": {
|
||
source: "iana"
|
||
},
|
||
"application/timestamp-reply": {
|
||
source: "iana"
|
||
},
|
||
"application/timestamped-data": {
|
||
source: "iana",
|
||
extensions: ["tsd"]
|
||
},
|
||
"application/tlsrpt+gzip": {
|
||
source: "iana"
|
||
},
|
||
"application/tlsrpt+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/tnauthlist": {
|
||
source: "iana"
|
||
},
|
||
"application/token-introspection+jwt": {
|
||
source: "iana"
|
||
},
|
||
"application/toml": {
|
||
compressible: true,
|
||
extensions: ["toml"]
|
||
},
|
||
"application/trickle-ice-sdpfrag": {
|
||
source: "iana"
|
||
},
|
||
"application/trig": {
|
||
source: "iana",
|
||
extensions: ["trig"]
|
||
},
|
||
"application/ttml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["ttml"]
|
||
},
|
||
"application/tve-trigger": {
|
||
source: "iana"
|
||
},
|
||
"application/tzif": {
|
||
source: "iana"
|
||
},
|
||
"application/tzif-leap": {
|
||
source: "iana"
|
||
},
|
||
"application/ubjson": {
|
||
compressible: false,
|
||
extensions: ["ubj"]
|
||
},
|
||
"application/ulpfec": {
|
||
source: "iana"
|
||
},
|
||
"application/urc-grpsheet+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/urc-ressheet+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["rsheet"]
|
||
},
|
||
"application/urc-targetdesc+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["td"]
|
||
},
|
||
"application/urc-uisocketdesc+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vcard+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vcard+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vemmi": {
|
||
source: "iana"
|
||
},
|
||
"application/vividence.scriptfile": {
|
||
source: "apache"
|
||
},
|
||
"application/vnd.1000minds.decision-model+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["1km"]
|
||
},
|
||
"application/vnd.3gpp-prose+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp-prose-pc3ch+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp-v2x-local-service-information": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp.5gnas": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp.access-transfer-events+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.bsf+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.gmop+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.gtpc": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp.interworking-data": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp.lpp": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp.mc-signalling-ear": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp.mcdata-affiliation-command+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcdata-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcdata-payload": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp.mcdata-service-config+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcdata-signalling": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp.mcdata-ue-config+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcdata-user-profile+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcptt-affiliation-command+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcptt-floor-request+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcptt-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcptt-location-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcptt-mbms-usage-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcptt-service-config+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcptt-signed+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcptt-ue-config+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcptt-ue-init-config+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcptt-user-profile+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcvideo-affiliation-command+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcvideo-affiliation-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcvideo-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcvideo-location-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcvideo-mbms-usage-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcvideo-service-config+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcvideo-transmission-request+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcvideo-ue-config+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mcvideo-user-profile+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.mid-call+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.ngap": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp.pfcp": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp.pic-bw-large": {
|
||
source: "iana",
|
||
extensions: ["plb"]
|
||
},
|
||
"application/vnd.3gpp.pic-bw-small": {
|
||
source: "iana",
|
||
extensions: ["psb"]
|
||
},
|
||
"application/vnd.3gpp.pic-bw-var": {
|
||
source: "iana",
|
||
extensions: ["pvb"]
|
||
},
|
||
"application/vnd.3gpp.s1ap": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp.sms": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp.sms+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.srvcc-ext+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.srvcc-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.state-and-event-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp.ussd+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp2.bcmcsinfo+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.3gpp2.sms": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3gpp2.tcap": {
|
||
source: "iana",
|
||
extensions: ["tcap"]
|
||
},
|
||
"application/vnd.3lightssoftware.imagescal": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.3m.post-it-notes": {
|
||
source: "iana",
|
||
extensions: ["pwn"]
|
||
},
|
||
"application/vnd.accpac.simply.aso": {
|
||
source: "iana",
|
||
extensions: ["aso"]
|
||
},
|
||
"application/vnd.accpac.simply.imp": {
|
||
source: "iana",
|
||
extensions: ["imp"]
|
||
},
|
||
"application/vnd.acucobol": {
|
||
source: "iana",
|
||
extensions: ["acu"]
|
||
},
|
||
"application/vnd.acucorp": {
|
||
source: "iana",
|
||
extensions: ["atc", "acutc"]
|
||
},
|
||
"application/vnd.adobe.air-application-installer-package+zip": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["air"]
|
||
},
|
||
"application/vnd.adobe.flash.movie": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.adobe.formscentral.fcdt": {
|
||
source: "iana",
|
||
extensions: ["fcdt"]
|
||
},
|
||
"application/vnd.adobe.fxp": {
|
||
source: "iana",
|
||
extensions: ["fxp", "fxpl"]
|
||
},
|
||
"application/vnd.adobe.partial-upload": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.adobe.xdp+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xdp"]
|
||
},
|
||
"application/vnd.adobe.xfdf": {
|
||
source: "iana",
|
||
extensions: ["xfdf"]
|
||
},
|
||
"application/vnd.aether.imp": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.afplinedata": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.afplinedata-pagedef": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.cmoca-cmresource": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.foca-charset": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.foca-codedfont": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.foca-codepage": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.modca": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.modca-cmtable": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.modca-formdef": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.modca-mediummap": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.modca-objectcontainer": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.modca-overlay": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.afpc.modca-pagesegment": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.age": {
|
||
source: "iana",
|
||
extensions: ["age"]
|
||
},
|
||
"application/vnd.ah-barcode": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ahead.space": {
|
||
source: "iana",
|
||
extensions: ["ahead"]
|
||
},
|
||
"application/vnd.airzip.filesecure.azf": {
|
||
source: "iana",
|
||
extensions: ["azf"]
|
||
},
|
||
"application/vnd.airzip.filesecure.azs": {
|
||
source: "iana",
|
||
extensions: ["azs"]
|
||
},
|
||
"application/vnd.amadeus+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.amazon.ebook": {
|
||
source: "apache",
|
||
extensions: ["azw"]
|
||
},
|
||
"application/vnd.amazon.mobi8-ebook": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.americandynamics.acc": {
|
||
source: "iana",
|
||
extensions: ["acc"]
|
||
},
|
||
"application/vnd.amiga.ami": {
|
||
source: "iana",
|
||
extensions: ["ami"]
|
||
},
|
||
"application/vnd.amundsen.maze+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.android.ota": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.android.package-archive": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["apk"]
|
||
},
|
||
"application/vnd.anki": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.anser-web-certificate-issue-initiation": {
|
||
source: "iana",
|
||
extensions: ["cii"]
|
||
},
|
||
"application/vnd.anser-web-funds-transfer-initiation": {
|
||
source: "apache",
|
||
extensions: ["fti"]
|
||
},
|
||
"application/vnd.antix.game-component": {
|
||
source: "iana",
|
||
extensions: ["atx"]
|
||
},
|
||
"application/vnd.apache.arrow.file": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.apache.arrow.stream": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.apache.thrift.binary": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.apache.thrift.compact": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.apache.thrift.json": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.api+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.aplextor.warrp+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.apothekende.reservation+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.apple.installer+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["mpkg"]
|
||
},
|
||
"application/vnd.apple.keynote": {
|
||
source: "iana",
|
||
extensions: ["key"]
|
||
},
|
||
"application/vnd.apple.mpegurl": {
|
||
source: "iana",
|
||
extensions: ["m3u8"]
|
||
},
|
||
"application/vnd.apple.numbers": {
|
||
source: "iana",
|
||
extensions: ["numbers"]
|
||
},
|
||
"application/vnd.apple.pages": {
|
||
source: "iana",
|
||
extensions: ["pages"]
|
||
},
|
||
"application/vnd.apple.pkpass": {
|
||
compressible: false,
|
||
extensions: ["pkpass"]
|
||
},
|
||
"application/vnd.arastra.swi": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.aristanetworks.swi": {
|
||
source: "iana",
|
||
extensions: ["swi"]
|
||
},
|
||
"application/vnd.artisan+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.artsquare": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.astraea-software.iota": {
|
||
source: "iana",
|
||
extensions: ["iota"]
|
||
},
|
||
"application/vnd.audiograph": {
|
||
source: "iana",
|
||
extensions: ["aep"]
|
||
},
|
||
"application/vnd.autopackage": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.avalon+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.avistar+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.balsamiq.bmml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["bmml"]
|
||
},
|
||
"application/vnd.balsamiq.bmpr": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.banana-accounting": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.bbf.usp.error": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.bbf.usp.msg": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.bbf.usp.msg+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.bekitzur-stech+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.bint.med-content": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.biopax.rdf+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.blink-idb-value-wrapper": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.blueice.multipass": {
|
||
source: "iana",
|
||
extensions: ["mpm"]
|
||
},
|
||
"application/vnd.bluetooth.ep.oob": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.bluetooth.le.oob": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.bmi": {
|
||
source: "iana",
|
||
extensions: ["bmi"]
|
||
},
|
||
"application/vnd.bpf": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.bpf3": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.businessobjects": {
|
||
source: "iana",
|
||
extensions: ["rep"]
|
||
},
|
||
"application/vnd.byu.uapi+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.cab-jscript": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.canon-cpdl": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.canon-lips": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.capasystems-pg+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.cendio.thinlinc.clientconf": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.century-systems.tcp_stream": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.chemdraw+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["cdxml"]
|
||
},
|
||
"application/vnd.chess-pgn": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.chipnuts.karaoke-mmd": {
|
||
source: "iana",
|
||
extensions: ["mmd"]
|
||
},
|
||
"application/vnd.ciedi": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.cinderella": {
|
||
source: "iana",
|
||
extensions: ["cdy"]
|
||
},
|
||
"application/vnd.cirpack.isdn-ext": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.citationstyles.style+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["csl"]
|
||
},
|
||
"application/vnd.claymore": {
|
||
source: "iana",
|
||
extensions: ["cla"]
|
||
},
|
||
"application/vnd.cloanto.rp9": {
|
||
source: "iana",
|
||
extensions: ["rp9"]
|
||
},
|
||
"application/vnd.clonk.c4group": {
|
||
source: "iana",
|
||
extensions: ["c4g", "c4d", "c4f", "c4p", "c4u"]
|
||
},
|
||
"application/vnd.cluetrust.cartomobile-config": {
|
||
source: "iana",
|
||
extensions: ["c11amc"]
|
||
},
|
||
"application/vnd.cluetrust.cartomobile-config-pkg": {
|
||
source: "iana",
|
||
extensions: ["c11amz"]
|
||
},
|
||
"application/vnd.coffeescript": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.collabio.xodocuments.document": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.collabio.xodocuments.document-template": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.collabio.xodocuments.presentation": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.collabio.xodocuments.presentation-template": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.collabio.xodocuments.spreadsheet": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.collabio.xodocuments.spreadsheet-template": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.collection+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.collection.doc+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.collection.next+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.comicbook+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.comicbook-rar": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.commerce-battelle": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.commonspace": {
|
||
source: "iana",
|
||
extensions: ["csp"]
|
||
},
|
||
"application/vnd.contact.cmsg": {
|
||
source: "iana",
|
||
extensions: ["cdbcmsg"]
|
||
},
|
||
"application/vnd.coreos.ignition+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.cosmocaller": {
|
||
source: "iana",
|
||
extensions: ["cmc"]
|
||
},
|
||
"application/vnd.crick.clicker": {
|
||
source: "iana",
|
||
extensions: ["clkx"]
|
||
},
|
||
"application/vnd.crick.clicker.keyboard": {
|
||
source: "iana",
|
||
extensions: ["clkk"]
|
||
},
|
||
"application/vnd.crick.clicker.palette": {
|
||
source: "iana",
|
||
extensions: ["clkp"]
|
||
},
|
||
"application/vnd.crick.clicker.template": {
|
||
source: "iana",
|
||
extensions: ["clkt"]
|
||
},
|
||
"application/vnd.crick.clicker.wordbank": {
|
||
source: "iana",
|
||
extensions: ["clkw"]
|
||
},
|
||
"application/vnd.criticaltools.wbs+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["wbs"]
|
||
},
|
||
"application/vnd.cryptii.pipe+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.crypto-shade-file": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.cryptomator.encrypted": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.cryptomator.vault": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ctc-posml": {
|
||
source: "iana",
|
||
extensions: ["pml"]
|
||
},
|
||
"application/vnd.ctct.ws+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.cups-pdf": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.cups-postscript": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.cups-ppd": {
|
||
source: "iana",
|
||
extensions: ["ppd"]
|
||
},
|
||
"application/vnd.cups-raster": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.cups-raw": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.curl": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.curl.car": {
|
||
source: "apache",
|
||
extensions: ["car"]
|
||
},
|
||
"application/vnd.curl.pcurl": {
|
||
source: "apache",
|
||
extensions: ["pcurl"]
|
||
},
|
||
"application/vnd.cyan.dean.root+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.cybank": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.cyclonedx+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.cyclonedx+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.d2l.coursepackage1p0+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.d3m-dataset": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.d3m-problem": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dart": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["dart"]
|
||
},
|
||
"application/vnd.data-vision.rdz": {
|
||
source: "iana",
|
||
extensions: ["rdz"]
|
||
},
|
||
"application/vnd.datapackage+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.dataresource+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.dbf": {
|
||
source: "iana",
|
||
extensions: ["dbf"]
|
||
},
|
||
"application/vnd.debian.binary-package": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dece.data": {
|
||
source: "iana",
|
||
extensions: ["uvf", "uvvf", "uvd", "uvvd"]
|
||
},
|
||
"application/vnd.dece.ttml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["uvt", "uvvt"]
|
||
},
|
||
"application/vnd.dece.unspecified": {
|
||
source: "iana",
|
||
extensions: ["uvx", "uvvx"]
|
||
},
|
||
"application/vnd.dece.zip": {
|
||
source: "iana",
|
||
extensions: ["uvz", "uvvz"]
|
||
},
|
||
"application/vnd.denovo.fcselayout-link": {
|
||
source: "iana",
|
||
extensions: ["fe_launch"]
|
||
},
|
||
"application/vnd.desmume.movie": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dir-bi.plate-dl-nosuffix": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dm.delegation+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.dna": {
|
||
source: "iana",
|
||
extensions: ["dna"]
|
||
},
|
||
"application/vnd.document+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.dolby.mlp": {
|
||
source: "apache",
|
||
extensions: ["mlp"]
|
||
},
|
||
"application/vnd.dolby.mobile.1": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dolby.mobile.2": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.doremir.scorecloud-binary-document": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dpgraph": {
|
||
source: "iana",
|
||
extensions: ["dpg"]
|
||
},
|
||
"application/vnd.dreamfactory": {
|
||
source: "iana",
|
||
extensions: ["dfac"]
|
||
},
|
||
"application/vnd.drive+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ds-keypoint": {
|
||
source: "apache",
|
||
extensions: ["kpxx"]
|
||
},
|
||
"application/vnd.dtg.local": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dtg.local.flash": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dtg.local.html": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dvb.ait": {
|
||
source: "iana",
|
||
extensions: ["ait"]
|
||
},
|
||
"application/vnd.dvb.dvbisl+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.dvb.dvbj": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dvb.esgcontainer": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dvb.ipdcdftnotifaccess": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dvb.ipdcesgaccess": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dvb.ipdcesgaccess2": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dvb.ipdcesgpdd": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dvb.ipdcroaming": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dvb.iptv.alfec-base": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dvb.iptv.alfec-enhancement": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dvb.notif-aggregate-root+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.dvb.notif-container+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.dvb.notif-generic+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.dvb.notif-ia-msglist+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.dvb.notif-ia-registration-request+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.dvb.notif-ia-registration-response+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.dvb.notif-init+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.dvb.pfr": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dvb.service": {
|
||
source: "iana",
|
||
extensions: ["svc"]
|
||
},
|
||
"application/vnd.dxr": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.dynageo": {
|
||
source: "iana",
|
||
extensions: ["geo"]
|
||
},
|
||
"application/vnd.dzr": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.easykaraoke.cdgdownload": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ecdis-update": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ecip.rlp": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.eclipse.ditto+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ecowin.chart": {
|
||
source: "iana",
|
||
extensions: ["mag"]
|
||
},
|
||
"application/vnd.ecowin.filerequest": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ecowin.fileupdate": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ecowin.series": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ecowin.seriesrequest": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ecowin.seriesupdate": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.efi.img": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.efi.iso": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.emclient.accessrequest+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.enliven": {
|
||
source: "iana",
|
||
extensions: ["nml"]
|
||
},
|
||
"application/vnd.enphase.envoy": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.eprints.data+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.epson.esf": {
|
||
source: "iana",
|
||
extensions: ["esf"]
|
||
},
|
||
"application/vnd.epson.msf": {
|
||
source: "iana",
|
||
extensions: ["msf"]
|
||
},
|
||
"application/vnd.epson.quickanime": {
|
||
source: "iana",
|
||
extensions: ["qam"]
|
||
},
|
||
"application/vnd.epson.salt": {
|
||
source: "iana",
|
||
extensions: ["slt"]
|
||
},
|
||
"application/vnd.epson.ssf": {
|
||
source: "iana",
|
||
extensions: ["ssf"]
|
||
},
|
||
"application/vnd.ericsson.quickcall": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.espass-espass+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.eszigno3+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["es3", "et3"]
|
||
},
|
||
"application/vnd.etsi.aoc+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.asic-e+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.etsi.asic-s+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.etsi.cug+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.iptvcommand+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.iptvdiscovery+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.iptvprofile+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.iptvsad-bc+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.iptvsad-cod+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.iptvsad-npvr+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.iptvservice+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.iptvsync+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.iptvueprofile+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.mcid+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.mheg5": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.etsi.overload-control-policy-dataset+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.pstn+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.sci+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.simservs+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.timestamp-token": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.etsi.tsl+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.etsi.tsl.der": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.eu.kasparian.car+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.eudora.data": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.evolv.ecig.profile": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.evolv.ecig.settings": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.evolv.ecig.theme": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.exstream-empower+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.exstream-package": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ezpix-album": {
|
||
source: "iana",
|
||
extensions: ["ez2"]
|
||
},
|
||
"application/vnd.ezpix-package": {
|
||
source: "iana",
|
||
extensions: ["ez3"]
|
||
},
|
||
"application/vnd.f-secure.mobile": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.familysearch.gedcom+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.fastcopy-disk-image": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.fdf": {
|
||
source: "iana",
|
||
extensions: ["fdf"]
|
||
},
|
||
"application/vnd.fdsn.mseed": {
|
||
source: "iana",
|
||
extensions: ["mseed"]
|
||
},
|
||
"application/vnd.fdsn.seed": {
|
||
source: "iana",
|
||
extensions: ["seed", "dataless"]
|
||
},
|
||
"application/vnd.ffsns": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ficlab.flb+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.filmit.zfc": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.fints": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.firemonkeys.cloudcell": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.flographit": {
|
||
source: "iana",
|
||
extensions: ["gph"]
|
||
},
|
||
"application/vnd.fluxtime.clip": {
|
||
source: "iana",
|
||
extensions: ["ftc"]
|
||
},
|
||
"application/vnd.font-fontforge-sfd": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.framemaker": {
|
||
source: "iana",
|
||
extensions: ["fm", "frame", "maker", "book"]
|
||
},
|
||
"application/vnd.frogans.fnc": {
|
||
source: "iana",
|
||
extensions: ["fnc"]
|
||
},
|
||
"application/vnd.frogans.ltf": {
|
||
source: "iana",
|
||
extensions: ["ltf"]
|
||
},
|
||
"application/vnd.fsc.weblaunch": {
|
||
source: "iana",
|
||
extensions: ["fsc"]
|
||
},
|
||
"application/vnd.fujifilm.fb.docuworks": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.fujifilm.fb.docuworks.binder": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.fujifilm.fb.docuworks.container": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.fujifilm.fb.jfi+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.fujitsu.oasys": {
|
||
source: "iana",
|
||
extensions: ["oas"]
|
||
},
|
||
"application/vnd.fujitsu.oasys2": {
|
||
source: "iana",
|
||
extensions: ["oa2"]
|
||
},
|
||
"application/vnd.fujitsu.oasys3": {
|
||
source: "iana",
|
||
extensions: ["oa3"]
|
||
},
|
||
"application/vnd.fujitsu.oasysgp": {
|
||
source: "iana",
|
||
extensions: ["fg5"]
|
||
},
|
||
"application/vnd.fujitsu.oasysprs": {
|
||
source: "iana",
|
||
extensions: ["bh2"]
|
||
},
|
||
"application/vnd.fujixerox.art-ex": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.fujixerox.art4": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.fujixerox.ddd": {
|
||
source: "iana",
|
||
extensions: ["ddd"]
|
||
},
|
||
"application/vnd.fujixerox.docuworks": {
|
||
source: "iana",
|
||
extensions: ["xdw"]
|
||
},
|
||
"application/vnd.fujixerox.docuworks.binder": {
|
||
source: "iana",
|
||
extensions: ["xbd"]
|
||
},
|
||
"application/vnd.fujixerox.docuworks.container": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.fujixerox.hbpl": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.fut-misnet": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.futoin+cbor": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.futoin+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.fuzzysheet": {
|
||
source: "iana",
|
||
extensions: ["fzs"]
|
||
},
|
||
"application/vnd.genomatix.tuxedo": {
|
||
source: "iana",
|
||
extensions: ["txd"]
|
||
},
|
||
"application/vnd.gentics.grd+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.geo+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.geocube+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.geogebra.file": {
|
||
source: "iana",
|
||
extensions: ["ggb"]
|
||
},
|
||
"application/vnd.geogebra.slides": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.geogebra.tool": {
|
||
source: "iana",
|
||
extensions: ["ggt"]
|
||
},
|
||
"application/vnd.geometry-explorer": {
|
||
source: "iana",
|
||
extensions: ["gex", "gre"]
|
||
},
|
||
"application/vnd.geonext": {
|
||
source: "iana",
|
||
extensions: ["gxt"]
|
||
},
|
||
"application/vnd.geoplan": {
|
||
source: "iana",
|
||
extensions: ["g2w"]
|
||
},
|
||
"application/vnd.geospace": {
|
||
source: "iana",
|
||
extensions: ["g3w"]
|
||
},
|
||
"application/vnd.gerber": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.globalplatform.card-content-mgt": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.globalplatform.card-content-mgt-response": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.gmx": {
|
||
source: "iana",
|
||
extensions: ["gmx"]
|
||
},
|
||
"application/vnd.google-apps.document": {
|
||
compressible: false,
|
||
extensions: ["gdoc"]
|
||
},
|
||
"application/vnd.google-apps.presentation": {
|
||
compressible: false,
|
||
extensions: ["gslides"]
|
||
},
|
||
"application/vnd.google-apps.spreadsheet": {
|
||
compressible: false,
|
||
extensions: ["gsheet"]
|
||
},
|
||
"application/vnd.google-earth.kml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["kml"]
|
||
},
|
||
"application/vnd.google-earth.kmz": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["kmz"]
|
||
},
|
||
"application/vnd.gov.sk.e-form+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.gov.sk.e-form+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.gov.sk.xmldatacontainer+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.grafeq": {
|
||
source: "iana",
|
||
extensions: ["gqf", "gqs"]
|
||
},
|
||
"application/vnd.gridmp": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.groove-account": {
|
||
source: "iana",
|
||
extensions: ["gac"]
|
||
},
|
||
"application/vnd.groove-help": {
|
||
source: "iana",
|
||
extensions: ["ghf"]
|
||
},
|
||
"application/vnd.groove-identity-message": {
|
||
source: "iana",
|
||
extensions: ["gim"]
|
||
},
|
||
"application/vnd.groove-injector": {
|
||
source: "iana",
|
||
extensions: ["grv"]
|
||
},
|
||
"application/vnd.groove-tool-message": {
|
||
source: "iana",
|
||
extensions: ["gtm"]
|
||
},
|
||
"application/vnd.groove-tool-template": {
|
||
source: "iana",
|
||
extensions: ["tpl"]
|
||
},
|
||
"application/vnd.groove-vcard": {
|
||
source: "iana",
|
||
extensions: ["vcg"]
|
||
},
|
||
"application/vnd.hal+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.hal+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["hal"]
|
||
},
|
||
"application/vnd.handheld-entertainment+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["zmm"]
|
||
},
|
||
"application/vnd.hbci": {
|
||
source: "iana",
|
||
extensions: ["hbci"]
|
||
},
|
||
"application/vnd.hc+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.hcl-bireports": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.hdt": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.heroku+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.hhe.lesson-player": {
|
||
source: "iana",
|
||
extensions: ["les"]
|
||
},
|
||
"application/vnd.hl7cda+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/vnd.hl7v2+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/vnd.hp-hpgl": {
|
||
source: "iana",
|
||
extensions: ["hpgl"]
|
||
},
|
||
"application/vnd.hp-hpid": {
|
||
source: "iana",
|
||
extensions: ["hpid"]
|
||
},
|
||
"application/vnd.hp-hps": {
|
||
source: "iana",
|
||
extensions: ["hps"]
|
||
},
|
||
"application/vnd.hp-jlyt": {
|
||
source: "iana",
|
||
extensions: ["jlt"]
|
||
},
|
||
"application/vnd.hp-pcl": {
|
||
source: "iana",
|
||
extensions: ["pcl"]
|
||
},
|
||
"application/vnd.hp-pclxl": {
|
||
source: "iana",
|
||
extensions: ["pclxl"]
|
||
},
|
||
"application/vnd.httphone": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.hydrostatix.sof-data": {
|
||
source: "iana",
|
||
extensions: ["sfd-hdstx"]
|
||
},
|
||
"application/vnd.hyper+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.hyper-item+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.hyperdrive+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.hzn-3d-crossword": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ibm.afplinedata": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ibm.electronic-media": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ibm.minipay": {
|
||
source: "iana",
|
||
extensions: ["mpy"]
|
||
},
|
||
"application/vnd.ibm.modcap": {
|
||
source: "iana",
|
||
extensions: ["afp", "listafp", "list3820"]
|
||
},
|
||
"application/vnd.ibm.rights-management": {
|
||
source: "iana",
|
||
extensions: ["irm"]
|
||
},
|
||
"application/vnd.ibm.secure-container": {
|
||
source: "iana",
|
||
extensions: ["sc"]
|
||
},
|
||
"application/vnd.iccprofile": {
|
||
source: "iana",
|
||
extensions: ["icc", "icm"]
|
||
},
|
||
"application/vnd.ieee.1905": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.igloader": {
|
||
source: "iana",
|
||
extensions: ["igl"]
|
||
},
|
||
"application/vnd.imagemeter.folder+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.imagemeter.image+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.immervision-ivp": {
|
||
source: "iana",
|
||
extensions: ["ivp"]
|
||
},
|
||
"application/vnd.immervision-ivu": {
|
||
source: "iana",
|
||
extensions: ["ivu"]
|
||
},
|
||
"application/vnd.ims.imsccv1p1": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ims.imsccv1p2": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ims.imsccv1p3": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ims.lis.v2.result+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ims.lti.v2.toolconsumerprofile+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ims.lti.v2.toolproxy+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ims.lti.v2.toolproxy.id+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ims.lti.v2.toolsettings+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ims.lti.v2.toolsettings.simple+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.informedcontrol.rms+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.informix-visionary": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.infotech.project": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.infotech.project+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.innopath.wamp.notification": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.insors.igm": {
|
||
source: "iana",
|
||
extensions: ["igm"]
|
||
},
|
||
"application/vnd.intercon.formnet": {
|
||
source: "iana",
|
||
extensions: ["xpw", "xpx"]
|
||
},
|
||
"application/vnd.intergeo": {
|
||
source: "iana",
|
||
extensions: ["i2g"]
|
||
},
|
||
"application/vnd.intertrust.digibox": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.intertrust.nncp": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.intu.qbo": {
|
||
source: "iana",
|
||
extensions: ["qbo"]
|
||
},
|
||
"application/vnd.intu.qfx": {
|
||
source: "iana",
|
||
extensions: ["qfx"]
|
||
},
|
||
"application/vnd.iptc.g2.catalogitem+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.iptc.g2.conceptitem+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.iptc.g2.knowledgeitem+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.iptc.g2.newsitem+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.iptc.g2.newsmessage+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.iptc.g2.packageitem+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.iptc.g2.planningitem+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ipunplugged.rcprofile": {
|
||
source: "iana",
|
||
extensions: ["rcprofile"]
|
||
},
|
||
"application/vnd.irepository.package+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["irp"]
|
||
},
|
||
"application/vnd.is-xpr": {
|
||
source: "iana",
|
||
extensions: ["xpr"]
|
||
},
|
||
"application/vnd.isac.fcs": {
|
||
source: "iana",
|
||
extensions: ["fcs"]
|
||
},
|
||
"application/vnd.iso11783-10+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.jam": {
|
||
source: "iana",
|
||
extensions: ["jam"]
|
||
},
|
||
"application/vnd.japannet-directory-service": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.japannet-jpnstore-wakeup": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.japannet-payment-wakeup": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.japannet-registration": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.japannet-registration-wakeup": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.japannet-setstore-wakeup": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.japannet-verification": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.japannet-verification-wakeup": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.jcp.javame.midlet-rms": {
|
||
source: "iana",
|
||
extensions: ["rms"]
|
||
},
|
||
"application/vnd.jisp": {
|
||
source: "iana",
|
||
extensions: ["jisp"]
|
||
},
|
||
"application/vnd.joost.joda-archive": {
|
||
source: "iana",
|
||
extensions: ["joda"]
|
||
},
|
||
"application/vnd.jsk.isdn-ngn": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.kahootz": {
|
||
source: "iana",
|
||
extensions: ["ktz", "ktr"]
|
||
},
|
||
"application/vnd.kde.karbon": {
|
||
source: "iana",
|
||
extensions: ["karbon"]
|
||
},
|
||
"application/vnd.kde.kchart": {
|
||
source: "iana",
|
||
extensions: ["chrt"]
|
||
},
|
||
"application/vnd.kde.kformula": {
|
||
source: "iana",
|
||
extensions: ["kfo"]
|
||
},
|
||
"application/vnd.kde.kivio": {
|
||
source: "iana",
|
||
extensions: ["flw"]
|
||
},
|
||
"application/vnd.kde.kontour": {
|
||
source: "iana",
|
||
extensions: ["kon"]
|
||
},
|
||
"application/vnd.kde.kpresenter": {
|
||
source: "iana",
|
||
extensions: ["kpr", "kpt"]
|
||
},
|
||
"application/vnd.kde.kspread": {
|
||
source: "iana",
|
||
extensions: ["ksp"]
|
||
},
|
||
"application/vnd.kde.kword": {
|
||
source: "iana",
|
||
extensions: ["kwd", "kwt"]
|
||
},
|
||
"application/vnd.kenameaapp": {
|
||
source: "iana",
|
||
extensions: ["htke"]
|
||
},
|
||
"application/vnd.kidspiration": {
|
||
source: "iana",
|
||
extensions: ["kia"]
|
||
},
|
||
"application/vnd.kinar": {
|
||
source: "iana",
|
||
extensions: ["kne", "knp"]
|
||
},
|
||
"application/vnd.koan": {
|
||
source: "iana",
|
||
extensions: ["skp", "skd", "skt", "skm"]
|
||
},
|
||
"application/vnd.kodak-descriptor": {
|
||
source: "iana",
|
||
extensions: ["sse"]
|
||
},
|
||
"application/vnd.las": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.las.las+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.las.las+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["lasxml"]
|
||
},
|
||
"application/vnd.laszip": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.leap+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.liberty-request+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.llamagraphics.life-balance.desktop": {
|
||
source: "iana",
|
||
extensions: ["lbd"]
|
||
},
|
||
"application/vnd.llamagraphics.life-balance.exchange+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["lbe"]
|
||
},
|
||
"application/vnd.logipipe.circuit+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.loom": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.lotus-1-2-3": {
|
||
source: "iana",
|
||
extensions: ["123"]
|
||
},
|
||
"application/vnd.lotus-approach": {
|
||
source: "iana",
|
||
extensions: ["apr"]
|
||
},
|
||
"application/vnd.lotus-freelance": {
|
||
source: "iana",
|
||
extensions: ["pre"]
|
||
},
|
||
"application/vnd.lotus-notes": {
|
||
source: "iana",
|
||
extensions: ["nsf"]
|
||
},
|
||
"application/vnd.lotus-organizer": {
|
||
source: "iana",
|
||
extensions: ["org"]
|
||
},
|
||
"application/vnd.lotus-screencam": {
|
||
source: "iana",
|
||
extensions: ["scm"]
|
||
},
|
||
"application/vnd.lotus-wordpro": {
|
||
source: "iana",
|
||
extensions: ["lwp"]
|
||
},
|
||
"application/vnd.macports.portpkg": {
|
||
source: "iana",
|
||
extensions: ["portpkg"]
|
||
},
|
||
"application/vnd.mapbox-vector-tile": {
|
||
source: "iana",
|
||
extensions: ["mvt"]
|
||
},
|
||
"application/vnd.marlin.drm.actiontoken+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.marlin.drm.conftoken+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.marlin.drm.license+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.marlin.drm.mdcf": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.mason+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.maxar.archive.3tz+zip": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"application/vnd.maxmind.maxmind-db": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.mcd": {
|
||
source: "iana",
|
||
extensions: ["mcd"]
|
||
},
|
||
"application/vnd.medcalcdata": {
|
||
source: "iana",
|
||
extensions: ["mc1"]
|
||
},
|
||
"application/vnd.mediastation.cdkey": {
|
||
source: "iana",
|
||
extensions: ["cdkey"]
|
||
},
|
||
"application/vnd.meridian-slingshot": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.mfer": {
|
||
source: "iana",
|
||
extensions: ["mwf"]
|
||
},
|
||
"application/vnd.mfmp": {
|
||
source: "iana",
|
||
extensions: ["mfm"]
|
||
},
|
||
"application/vnd.micro+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.micrografx.flo": {
|
||
source: "iana",
|
||
extensions: ["flo"]
|
||
},
|
||
"application/vnd.micrografx.igx": {
|
||
source: "iana",
|
||
extensions: ["igx"]
|
||
},
|
||
"application/vnd.microsoft.portable-executable": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.microsoft.windows.thumbnail-cache": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.miele+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.mif": {
|
||
source: "iana",
|
||
extensions: ["mif"]
|
||
},
|
||
"application/vnd.minisoft-hp3000-save": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.mitsubishi.misty-guard.trustweb": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.mobius.daf": {
|
||
source: "iana",
|
||
extensions: ["daf"]
|
||
},
|
||
"application/vnd.mobius.dis": {
|
||
source: "iana",
|
||
extensions: ["dis"]
|
||
},
|
||
"application/vnd.mobius.mbk": {
|
||
source: "iana",
|
||
extensions: ["mbk"]
|
||
},
|
||
"application/vnd.mobius.mqy": {
|
||
source: "iana",
|
||
extensions: ["mqy"]
|
||
},
|
||
"application/vnd.mobius.msl": {
|
||
source: "iana",
|
||
extensions: ["msl"]
|
||
},
|
||
"application/vnd.mobius.plc": {
|
||
source: "iana",
|
||
extensions: ["plc"]
|
||
},
|
||
"application/vnd.mobius.txf": {
|
||
source: "iana",
|
||
extensions: ["txf"]
|
||
},
|
||
"application/vnd.mophun.application": {
|
||
source: "iana",
|
||
extensions: ["mpn"]
|
||
},
|
||
"application/vnd.mophun.certificate": {
|
||
source: "iana",
|
||
extensions: ["mpc"]
|
||
},
|
||
"application/vnd.motorola.flexsuite": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.motorola.flexsuite.adsi": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.motorola.flexsuite.fis": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.motorola.flexsuite.gotap": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.motorola.flexsuite.kmr": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.motorola.flexsuite.ttc": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.motorola.flexsuite.wem": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.motorola.iprm": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.mozilla.xul+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xul"]
|
||
},
|
||
"application/vnd.ms-3mfdocument": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ms-artgalry": {
|
||
source: "iana",
|
||
extensions: ["cil"]
|
||
},
|
||
"application/vnd.ms-asf": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ms-cab-compressed": {
|
||
source: "iana",
|
||
extensions: ["cab"]
|
||
},
|
||
"application/vnd.ms-color.iccprofile": {
|
||
source: "apache"
|
||
},
|
||
"application/vnd.ms-excel": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["xls", "xlm", "xla", "xlc", "xlt", "xlw"]
|
||
},
|
||
"application/vnd.ms-excel.addin.macroenabled.12": {
|
||
source: "iana",
|
||
extensions: ["xlam"]
|
||
},
|
||
"application/vnd.ms-excel.sheet.binary.macroenabled.12": {
|
||
source: "iana",
|
||
extensions: ["xlsb"]
|
||
},
|
||
"application/vnd.ms-excel.sheet.macroenabled.12": {
|
||
source: "iana",
|
||
extensions: ["xlsm"]
|
||
},
|
||
"application/vnd.ms-excel.template.macroenabled.12": {
|
||
source: "iana",
|
||
extensions: ["xltm"]
|
||
},
|
||
"application/vnd.ms-fontobject": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["eot"]
|
||
},
|
||
"application/vnd.ms-htmlhelp": {
|
||
source: "iana",
|
||
extensions: ["chm"]
|
||
},
|
||
"application/vnd.ms-ims": {
|
||
source: "iana",
|
||
extensions: ["ims"]
|
||
},
|
||
"application/vnd.ms-lrm": {
|
||
source: "iana",
|
||
extensions: ["lrm"]
|
||
},
|
||
"application/vnd.ms-office.activex+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ms-officetheme": {
|
||
source: "iana",
|
||
extensions: ["thmx"]
|
||
},
|
||
"application/vnd.ms-opentype": {
|
||
source: "apache",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ms-outlook": {
|
||
compressible: false,
|
||
extensions: ["msg"]
|
||
},
|
||
"application/vnd.ms-package.obfuscated-opentype": {
|
||
source: "apache"
|
||
},
|
||
"application/vnd.ms-pki.seccat": {
|
||
source: "apache",
|
||
extensions: ["cat"]
|
||
},
|
||
"application/vnd.ms-pki.stl": {
|
||
source: "apache",
|
||
extensions: ["stl"]
|
||
},
|
||
"application/vnd.ms-playready.initiator+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ms-powerpoint": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["ppt", "pps", "pot"]
|
||
},
|
||
"application/vnd.ms-powerpoint.addin.macroenabled.12": {
|
||
source: "iana",
|
||
extensions: ["ppam"]
|
||
},
|
||
"application/vnd.ms-powerpoint.presentation.macroenabled.12": {
|
||
source: "iana",
|
||
extensions: ["pptm"]
|
||
},
|
||
"application/vnd.ms-powerpoint.slide.macroenabled.12": {
|
||
source: "iana",
|
||
extensions: ["sldm"]
|
||
},
|
||
"application/vnd.ms-powerpoint.slideshow.macroenabled.12": {
|
||
source: "iana",
|
||
extensions: ["ppsm"]
|
||
},
|
||
"application/vnd.ms-powerpoint.template.macroenabled.12": {
|
||
source: "iana",
|
||
extensions: ["potm"]
|
||
},
|
||
"application/vnd.ms-printdevicecapabilities+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ms-printing.printticket+xml": {
|
||
source: "apache",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ms-printschematicket+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ms-project": {
|
||
source: "iana",
|
||
extensions: ["mpp", "mpt"]
|
||
},
|
||
"application/vnd.ms-tnef": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ms-windows.devicepairing": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ms-windows.nwprinting.oob": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ms-windows.printerpairing": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ms-windows.wsd.oob": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ms-wmdrm.lic-chlg-req": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ms-wmdrm.lic-resp": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ms-wmdrm.meter-chlg-req": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ms-wmdrm.meter-resp": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ms-word.document.macroenabled.12": {
|
||
source: "iana",
|
||
extensions: ["docm"]
|
||
},
|
||
"application/vnd.ms-word.template.macroenabled.12": {
|
||
source: "iana",
|
||
extensions: ["dotm"]
|
||
},
|
||
"application/vnd.ms-works": {
|
||
source: "iana",
|
||
extensions: ["wps", "wks", "wcm", "wdb"]
|
||
},
|
||
"application/vnd.ms-wpl": {
|
||
source: "iana",
|
||
extensions: ["wpl"]
|
||
},
|
||
"application/vnd.ms-xpsdocument": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["xps"]
|
||
},
|
||
"application/vnd.msa-disk-image": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.mseq": {
|
||
source: "iana",
|
||
extensions: ["mseq"]
|
||
},
|
||
"application/vnd.msign": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.multiad.creator": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.multiad.creator.cif": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.music-niff": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.musician": {
|
||
source: "iana",
|
||
extensions: ["mus"]
|
||
},
|
||
"application/vnd.muvee.style": {
|
||
source: "iana",
|
||
extensions: ["msty"]
|
||
},
|
||
"application/vnd.mynfc": {
|
||
source: "iana",
|
||
extensions: ["taglet"]
|
||
},
|
||
"application/vnd.nacamar.ybrid+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.ncd.control": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ncd.reference": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.nearst.inv+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.nebumind.line": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.nervana": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.netfpx": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.neurolanguage.nlu": {
|
||
source: "iana",
|
||
extensions: ["nlu"]
|
||
},
|
||
"application/vnd.nimn": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.nintendo.nitro.rom": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.nintendo.snes.rom": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.nitf": {
|
||
source: "iana",
|
||
extensions: ["ntf", "nitf"]
|
||
},
|
||
"application/vnd.noblenet-directory": {
|
||
source: "iana",
|
||
extensions: ["nnd"]
|
||
},
|
||
"application/vnd.noblenet-sealer": {
|
||
source: "iana",
|
||
extensions: ["nns"]
|
||
},
|
||
"application/vnd.noblenet-web": {
|
||
source: "iana",
|
||
extensions: ["nnw"]
|
||
},
|
||
"application/vnd.nokia.catalogs": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.nokia.conml+wbxml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.nokia.conml+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.nokia.iptv.config+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.nokia.isds-radio-presets": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.nokia.landmark+wbxml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.nokia.landmark+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.nokia.landmarkcollection+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.nokia.n-gage.ac+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["ac"]
|
||
},
|
||
"application/vnd.nokia.n-gage.data": {
|
||
source: "iana",
|
||
extensions: ["ngdat"]
|
||
},
|
||
"application/vnd.nokia.n-gage.symbian.install": {
|
||
source: "iana",
|
||
extensions: ["n-gage"]
|
||
},
|
||
"application/vnd.nokia.ncd": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.nokia.pcd+wbxml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.nokia.pcd+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.nokia.radio-preset": {
|
||
source: "iana",
|
||
extensions: ["rpst"]
|
||
},
|
||
"application/vnd.nokia.radio-presets": {
|
||
source: "iana",
|
||
extensions: ["rpss"]
|
||
},
|
||
"application/vnd.novadigm.edm": {
|
||
source: "iana",
|
||
extensions: ["edm"]
|
||
},
|
||
"application/vnd.novadigm.edx": {
|
||
source: "iana",
|
||
extensions: ["edx"]
|
||
},
|
||
"application/vnd.novadigm.ext": {
|
||
source: "iana",
|
||
extensions: ["ext"]
|
||
},
|
||
"application/vnd.ntt-local.content-share": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ntt-local.file-transfer": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ntt-local.ogw_remote-access": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ntt-local.sip-ta_remote": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ntt-local.sip-ta_tcp_stream": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oasis.opendocument.chart": {
|
||
source: "iana",
|
||
extensions: ["odc"]
|
||
},
|
||
"application/vnd.oasis.opendocument.chart-template": {
|
||
source: "iana",
|
||
extensions: ["otc"]
|
||
},
|
||
"application/vnd.oasis.opendocument.database": {
|
||
source: "iana",
|
||
extensions: ["odb"]
|
||
},
|
||
"application/vnd.oasis.opendocument.formula": {
|
||
source: "iana",
|
||
extensions: ["odf"]
|
||
},
|
||
"application/vnd.oasis.opendocument.formula-template": {
|
||
source: "iana",
|
||
extensions: ["odft"]
|
||
},
|
||
"application/vnd.oasis.opendocument.graphics": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["odg"]
|
||
},
|
||
"application/vnd.oasis.opendocument.graphics-template": {
|
||
source: "iana",
|
||
extensions: ["otg"]
|
||
},
|
||
"application/vnd.oasis.opendocument.image": {
|
||
source: "iana",
|
||
extensions: ["odi"]
|
||
},
|
||
"application/vnd.oasis.opendocument.image-template": {
|
||
source: "iana",
|
||
extensions: ["oti"]
|
||
},
|
||
"application/vnd.oasis.opendocument.presentation": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["odp"]
|
||
},
|
||
"application/vnd.oasis.opendocument.presentation-template": {
|
||
source: "iana",
|
||
extensions: ["otp"]
|
||
},
|
||
"application/vnd.oasis.opendocument.spreadsheet": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["ods"]
|
||
},
|
||
"application/vnd.oasis.opendocument.spreadsheet-template": {
|
||
source: "iana",
|
||
extensions: ["ots"]
|
||
},
|
||
"application/vnd.oasis.opendocument.text": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["odt"]
|
||
},
|
||
"application/vnd.oasis.opendocument.text-master": {
|
||
source: "iana",
|
||
extensions: ["odm"]
|
||
},
|
||
"application/vnd.oasis.opendocument.text-template": {
|
||
source: "iana",
|
||
extensions: ["ott"]
|
||
},
|
||
"application/vnd.oasis.opendocument.text-web": {
|
||
source: "iana",
|
||
extensions: ["oth"]
|
||
},
|
||
"application/vnd.obn": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ocf+cbor": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oci.image.manifest.v1+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oftn.l10n+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oipf.contentaccessdownload+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oipf.contentaccessstreaming+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oipf.cspg-hexbinary": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oipf.dae.svg+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oipf.dae.xhtml+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oipf.mippvcontrolmessage+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oipf.pae.gem": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oipf.spdiscovery+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oipf.spdlist+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oipf.ueprofile+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oipf.userprofile+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.olpc-sugar": {
|
||
source: "iana",
|
||
extensions: ["xo"]
|
||
},
|
||
"application/vnd.oma-scws-config": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma-scws-http-request": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma-scws-http-response": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma.bcast.associated-procedure-parameter+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.bcast.drm-trigger+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.bcast.imd+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.bcast.ltkm": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma.bcast.notification+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.bcast.provisioningtrigger": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma.bcast.sgboot": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma.bcast.sgdd+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.bcast.sgdu": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma.bcast.simple-symbol-container": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma.bcast.smartcard-trigger+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.bcast.sprov+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.bcast.stkm": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma.cab-address-book+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.cab-feature-handler+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.cab-pcc+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.cab-subs-invite+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.cab-user-prefs+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.dcd": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma.dcdc": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma.dd2+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["dd2"]
|
||
},
|
||
"application/vnd.oma.drm.risd+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.group-usage-list+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.lwm2m+cbor": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma.lwm2m+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.lwm2m+tlv": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma.pal+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.poc.detailed-progress-report+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.poc.final-report+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.poc.groups+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.poc.invocation-descriptor+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.poc.optimized-progress-report+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.push": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.oma.scidm.messages+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oma.xcap-directory+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.omads-email+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/vnd.omads-file+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/vnd.omads-folder+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/vnd.omaloc-supl-init": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.onepager": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.onepagertamp": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.onepagertamx": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.onepagertat": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.onepagertatp": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.onepagertatx": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.openblox.game+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["obgx"]
|
||
},
|
||
"application/vnd.openblox.game-binary": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.openeye.oeb": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.openofficeorg.extension": {
|
||
source: "apache",
|
||
extensions: ["oxt"]
|
||
},
|
||
"application/vnd.openstreetmap.data+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["osm"]
|
||
},
|
||
"application/vnd.opentimestamps.ots": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.custom-properties+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.customxmlproperties+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.drawing+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.drawingml.chart+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.extended-properties+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.comments+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.presentation": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["pptx"]
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.slide": {
|
||
source: "iana",
|
||
extensions: ["sldx"]
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.slide+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": {
|
||
source: "iana",
|
||
extensions: ["ppsx"]
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.tags+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.template": {
|
||
source: "iana",
|
||
extensions: ["potx"]
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["xlsx"]
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.template": {
|
||
source: "iana",
|
||
extensions: ["xltx"]
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.theme+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.themeoverride+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.vmldrawing": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["docx"]
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.template": {
|
||
source: "iana",
|
||
extensions: ["dotx"]
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-package.core-properties+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.openxmlformats-package.relationships+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oracle.resource+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.orange.indata": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.osa.netdeploy": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.osgeo.mapguide.package": {
|
||
source: "iana",
|
||
extensions: ["mgp"]
|
||
},
|
||
"application/vnd.osgi.bundle": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.osgi.dp": {
|
||
source: "iana",
|
||
extensions: ["dp"]
|
||
},
|
||
"application/vnd.osgi.subsystem": {
|
||
source: "iana",
|
||
extensions: ["esa"]
|
||
},
|
||
"application/vnd.otps.ct-kip+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.oxli.countgraph": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.pagerduty+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.palm": {
|
||
source: "iana",
|
||
extensions: ["pdb", "pqa", "oprc"]
|
||
},
|
||
"application/vnd.panoply": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.paos.xml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.patentdive": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.patientecommsdoc": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.pawaafile": {
|
||
source: "iana",
|
||
extensions: ["paw"]
|
||
},
|
||
"application/vnd.pcos": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.pg.format": {
|
||
source: "iana",
|
||
extensions: ["str"]
|
||
},
|
||
"application/vnd.pg.osasli": {
|
||
source: "iana",
|
||
extensions: ["ei6"]
|
||
},
|
||
"application/vnd.piaccess.application-licence": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.picsel": {
|
||
source: "iana",
|
||
extensions: ["efif"]
|
||
},
|
||
"application/vnd.pmi.widget": {
|
||
source: "iana",
|
||
extensions: ["wg"]
|
||
},
|
||
"application/vnd.poc.group-advertisement+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.pocketlearn": {
|
||
source: "iana",
|
||
extensions: ["plf"]
|
||
},
|
||
"application/vnd.powerbuilder6": {
|
||
source: "iana",
|
||
extensions: ["pbd"]
|
||
},
|
||
"application/vnd.powerbuilder6-s": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.powerbuilder7": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.powerbuilder7-s": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.powerbuilder75": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.powerbuilder75-s": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.preminet": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.previewsystems.box": {
|
||
source: "iana",
|
||
extensions: ["box"]
|
||
},
|
||
"application/vnd.proteus.magazine": {
|
||
source: "iana",
|
||
extensions: ["mgz"]
|
||
},
|
||
"application/vnd.psfs": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.publishare-delta-tree": {
|
||
source: "iana",
|
||
extensions: ["qps"]
|
||
},
|
||
"application/vnd.pvi.ptid1": {
|
||
source: "iana",
|
||
extensions: ["ptid"]
|
||
},
|
||
"application/vnd.pwg-multiplexed": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.pwg-xhtml-print+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.qualcomm.brew-app-res": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.quarantainenet": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.quark.quarkxpress": {
|
||
source: "iana",
|
||
extensions: ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"]
|
||
},
|
||
"application/vnd.quobject-quoxdocument": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.radisys.moml+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-audit+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-audit-conf+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-audit-conn+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-audit-dialog+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-audit-stream+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-conf+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-dialog+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-dialog-base+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-dialog-fax-detect+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-dialog-fax-sendrecv+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-dialog-group+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-dialog-speech+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.radisys.msml-dialog-transform+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.rainstor.data": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.rapid": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.rar": {
|
||
source: "iana",
|
||
extensions: ["rar"]
|
||
},
|
||
"application/vnd.realvnc.bed": {
|
||
source: "iana",
|
||
extensions: ["bed"]
|
||
},
|
||
"application/vnd.recordare.musicxml": {
|
||
source: "iana",
|
||
extensions: ["mxl"]
|
||
},
|
||
"application/vnd.recordare.musicxml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["musicxml"]
|
||
},
|
||
"application/vnd.renlearn.rlprint": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.resilient.logic": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.restful+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.rig.cryptonote": {
|
||
source: "iana",
|
||
extensions: ["cryptonote"]
|
||
},
|
||
"application/vnd.rim.cod": {
|
||
source: "apache",
|
||
extensions: ["cod"]
|
||
},
|
||
"application/vnd.rn-realmedia": {
|
||
source: "apache",
|
||
extensions: ["rm"]
|
||
},
|
||
"application/vnd.rn-realmedia-vbr": {
|
||
source: "apache",
|
||
extensions: ["rmvb"]
|
||
},
|
||
"application/vnd.route66.link66+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["link66"]
|
||
},
|
||
"application/vnd.rs-274x": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ruckus.download": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.s3sms": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sailingtracker.track": {
|
||
source: "iana",
|
||
extensions: ["st"]
|
||
},
|
||
"application/vnd.sar": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sbm.cid": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sbm.mid2": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.scribus": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sealed.3df": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sealed.csf": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sealed.doc": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sealed.eml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sealed.mht": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sealed.net": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sealed.ppt": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sealed.tiff": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sealed.xls": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sealedmedia.softseal.html": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sealedmedia.softseal.pdf": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.seemail": {
|
||
source: "iana",
|
||
extensions: ["see"]
|
||
},
|
||
"application/vnd.seis+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.sema": {
|
||
source: "iana",
|
||
extensions: ["sema"]
|
||
},
|
||
"application/vnd.semd": {
|
||
source: "iana",
|
||
extensions: ["semd"]
|
||
},
|
||
"application/vnd.semf": {
|
||
source: "iana",
|
||
extensions: ["semf"]
|
||
},
|
||
"application/vnd.shade-save-file": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.shana.informed.formdata": {
|
||
source: "iana",
|
||
extensions: ["ifm"]
|
||
},
|
||
"application/vnd.shana.informed.formtemplate": {
|
||
source: "iana",
|
||
extensions: ["itp"]
|
||
},
|
||
"application/vnd.shana.informed.interchange": {
|
||
source: "iana",
|
||
extensions: ["iif"]
|
||
},
|
||
"application/vnd.shana.informed.package": {
|
||
source: "iana",
|
||
extensions: ["ipk"]
|
||
},
|
||
"application/vnd.shootproof+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.shopkick+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.shp": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.shx": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sigrok.session": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.simtech-mindmapper": {
|
||
source: "iana",
|
||
extensions: ["twd", "twds"]
|
||
},
|
||
"application/vnd.siren+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.smaf": {
|
||
source: "iana",
|
||
extensions: ["mmf"]
|
||
},
|
||
"application/vnd.smart.notebook": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.smart.teacher": {
|
||
source: "iana",
|
||
extensions: ["teacher"]
|
||
},
|
||
"application/vnd.snesdev-page-table": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.software602.filler.form+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["fo"]
|
||
},
|
||
"application/vnd.software602.filler.form-xml-zip": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.solent.sdkm+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["sdkm", "sdkd"]
|
||
},
|
||
"application/vnd.spotfire.dxp": {
|
||
source: "iana",
|
||
extensions: ["dxp"]
|
||
},
|
||
"application/vnd.spotfire.sfs": {
|
||
source: "iana",
|
||
extensions: ["sfs"]
|
||
},
|
||
"application/vnd.sqlite3": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sss-cod": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sss-dtf": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sss-ntf": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.stardivision.calc": {
|
||
source: "apache",
|
||
extensions: ["sdc"]
|
||
},
|
||
"application/vnd.stardivision.draw": {
|
||
source: "apache",
|
||
extensions: ["sda"]
|
||
},
|
||
"application/vnd.stardivision.impress": {
|
||
source: "apache",
|
||
extensions: ["sdd"]
|
||
},
|
||
"application/vnd.stardivision.math": {
|
||
source: "apache",
|
||
extensions: ["smf"]
|
||
},
|
||
"application/vnd.stardivision.writer": {
|
||
source: "apache",
|
||
extensions: ["sdw", "vor"]
|
||
},
|
||
"application/vnd.stardivision.writer-global": {
|
||
source: "apache",
|
||
extensions: ["sgl"]
|
||
},
|
||
"application/vnd.stepmania.package": {
|
||
source: "iana",
|
||
extensions: ["smzip"]
|
||
},
|
||
"application/vnd.stepmania.stepchart": {
|
||
source: "iana",
|
||
extensions: ["sm"]
|
||
},
|
||
"application/vnd.street-stream": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sun.wadl+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["wadl"]
|
||
},
|
||
"application/vnd.sun.xml.calc": {
|
||
source: "apache",
|
||
extensions: ["sxc"]
|
||
},
|
||
"application/vnd.sun.xml.calc.template": {
|
||
source: "apache",
|
||
extensions: ["stc"]
|
||
},
|
||
"application/vnd.sun.xml.draw": {
|
||
source: "apache",
|
||
extensions: ["sxd"]
|
||
},
|
||
"application/vnd.sun.xml.draw.template": {
|
||
source: "apache",
|
||
extensions: ["std"]
|
||
},
|
||
"application/vnd.sun.xml.impress": {
|
||
source: "apache",
|
||
extensions: ["sxi"]
|
||
},
|
||
"application/vnd.sun.xml.impress.template": {
|
||
source: "apache",
|
||
extensions: ["sti"]
|
||
},
|
||
"application/vnd.sun.xml.math": {
|
||
source: "apache",
|
||
extensions: ["sxm"]
|
||
},
|
||
"application/vnd.sun.xml.writer": {
|
||
source: "apache",
|
||
extensions: ["sxw"]
|
||
},
|
||
"application/vnd.sun.xml.writer.global": {
|
||
source: "apache",
|
||
extensions: ["sxg"]
|
||
},
|
||
"application/vnd.sun.xml.writer.template": {
|
||
source: "apache",
|
||
extensions: ["stw"]
|
||
},
|
||
"application/vnd.sus-calendar": {
|
||
source: "iana",
|
||
extensions: ["sus", "susp"]
|
||
},
|
||
"application/vnd.svd": {
|
||
source: "iana",
|
||
extensions: ["svd"]
|
||
},
|
||
"application/vnd.swiftview-ics": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.sycle+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.syft+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.symbian.install": {
|
||
source: "apache",
|
||
extensions: ["sis", "sisx"]
|
||
},
|
||
"application/vnd.syncml+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true,
|
||
extensions: ["xsm"]
|
||
},
|
||
"application/vnd.syncml.dm+wbxml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
extensions: ["bdm"]
|
||
},
|
||
"application/vnd.syncml.dm+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true,
|
||
extensions: ["xdm"]
|
||
},
|
||
"application/vnd.syncml.dm.notification": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.syncml.dmddf+wbxml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.syncml.dmddf+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true,
|
||
extensions: ["ddf"]
|
||
},
|
||
"application/vnd.syncml.dmtnds+wbxml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.syncml.dmtnds+xml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true
|
||
},
|
||
"application/vnd.syncml.ds.notification": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.tableschema+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.tao.intent-module-archive": {
|
||
source: "iana",
|
||
extensions: ["tao"]
|
||
},
|
||
"application/vnd.tcpdump.pcap": {
|
||
source: "iana",
|
||
extensions: ["pcap", "cap", "dmp"]
|
||
},
|
||
"application/vnd.think-cell.ppttc+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.tmd.mediaflex.api+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.tml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.tmobile-livetv": {
|
||
source: "iana",
|
||
extensions: ["tmo"]
|
||
},
|
||
"application/vnd.tri.onesource": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.trid.tpt": {
|
||
source: "iana",
|
||
extensions: ["tpt"]
|
||
},
|
||
"application/vnd.triscape.mxs": {
|
||
source: "iana",
|
||
extensions: ["mxs"]
|
||
},
|
||
"application/vnd.trueapp": {
|
||
source: "iana",
|
||
extensions: ["tra"]
|
||
},
|
||
"application/vnd.truedoc": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ubisoft.webplayer": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ufdl": {
|
||
source: "iana",
|
||
extensions: ["ufd", "ufdl"]
|
||
},
|
||
"application/vnd.uiq.theme": {
|
||
source: "iana",
|
||
extensions: ["utz"]
|
||
},
|
||
"application/vnd.umajin": {
|
||
source: "iana",
|
||
extensions: ["umj"]
|
||
},
|
||
"application/vnd.unity": {
|
||
source: "iana",
|
||
extensions: ["unityweb"]
|
||
},
|
||
"application/vnd.uoml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["uoml"]
|
||
},
|
||
"application/vnd.uplanet.alert": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uplanet.alert-wbxml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uplanet.bearer-choice": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uplanet.bearer-choice-wbxml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uplanet.cacheop": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uplanet.cacheop-wbxml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uplanet.channel": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uplanet.channel-wbxml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uplanet.list": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uplanet.list-wbxml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uplanet.listcmd": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uplanet.listcmd-wbxml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uplanet.signal": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.uri-map": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.valve.source.material": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.vcx": {
|
||
source: "iana",
|
||
extensions: ["vcx"]
|
||
},
|
||
"application/vnd.vd-study": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.vectorworks": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.vel+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.verimatrix.vcas": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.veritone.aion+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.veryant.thin": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.ves.encrypted": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.vidsoft.vidconference": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.visio": {
|
||
source: "iana",
|
||
extensions: ["vsd", "vst", "vss", "vsw"]
|
||
},
|
||
"application/vnd.visionary": {
|
||
source: "iana",
|
||
extensions: ["vis"]
|
||
},
|
||
"application/vnd.vividence.scriptfile": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.vsf": {
|
||
source: "iana",
|
||
extensions: ["vsf"]
|
||
},
|
||
"application/vnd.wap.sic": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.wap.slc": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.wap.wbxml": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
extensions: ["wbxml"]
|
||
},
|
||
"application/vnd.wap.wmlc": {
|
||
source: "iana",
|
||
extensions: ["wmlc"]
|
||
},
|
||
"application/vnd.wap.wmlscriptc": {
|
||
source: "iana",
|
||
extensions: ["wmlsc"]
|
||
},
|
||
"application/vnd.webturbo": {
|
||
source: "iana",
|
||
extensions: ["wtb"]
|
||
},
|
||
"application/vnd.wfa.dpp": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.wfa.p2p": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.wfa.wsc": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.windows.devicepairing": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.wmc": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.wmf.bootstrap": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.wolfram.mathematica": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.wolfram.mathematica.package": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.wolfram.player": {
|
||
source: "iana",
|
||
extensions: ["nbp"]
|
||
},
|
||
"application/vnd.wordperfect": {
|
||
source: "iana",
|
||
extensions: ["wpd"]
|
||
},
|
||
"application/vnd.wqd": {
|
||
source: "iana",
|
||
extensions: ["wqd"]
|
||
},
|
||
"application/vnd.wrq-hp3000-labelled": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.wt.stf": {
|
||
source: "iana",
|
||
extensions: ["stf"]
|
||
},
|
||
"application/vnd.wv.csp+wbxml": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.wv.csp+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.wv.ssp+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.xacml+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.xara": {
|
||
source: "iana",
|
||
extensions: ["xar"]
|
||
},
|
||
"application/vnd.xfdl": {
|
||
source: "iana",
|
||
extensions: ["xfdl"]
|
||
},
|
||
"application/vnd.xfdl.webform": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.xmi+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vnd.xmpie.cpkg": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.xmpie.dpkg": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.xmpie.plan": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.xmpie.ppkg": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.xmpie.xlim": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.yamaha.hv-dic": {
|
||
source: "iana",
|
||
extensions: ["hvd"]
|
||
},
|
||
"application/vnd.yamaha.hv-script": {
|
||
source: "iana",
|
||
extensions: ["hvs"]
|
||
},
|
||
"application/vnd.yamaha.hv-voice": {
|
||
source: "iana",
|
||
extensions: ["hvp"]
|
||
},
|
||
"application/vnd.yamaha.openscoreformat": {
|
||
source: "iana",
|
||
extensions: ["osf"]
|
||
},
|
||
"application/vnd.yamaha.openscoreformat.osfpvg+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["osfpvg"]
|
||
},
|
||
"application/vnd.yamaha.remote-setup": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.yamaha.smaf-audio": {
|
||
source: "iana",
|
||
extensions: ["saf"]
|
||
},
|
||
"application/vnd.yamaha.smaf-phrase": {
|
||
source: "iana",
|
||
extensions: ["spf"]
|
||
},
|
||
"application/vnd.yamaha.through-ngn": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.yamaha.tunnel-udpencap": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.yaoweme": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.yellowriver-custom-menu": {
|
||
source: "iana",
|
||
extensions: ["cmp"]
|
||
},
|
||
"application/vnd.youtube.yt": {
|
||
source: "iana"
|
||
},
|
||
"application/vnd.zul": {
|
||
source: "iana",
|
||
extensions: ["zir", "zirz"]
|
||
},
|
||
"application/vnd.zzazz.deck+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["zaz"]
|
||
},
|
||
"application/voicexml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["vxml"]
|
||
},
|
||
"application/voucher-cms+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/vq-rtcpxr": {
|
||
source: "iana"
|
||
},
|
||
"application/wasm": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["wasm"]
|
||
},
|
||
"application/watcherinfo+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["wif"]
|
||
},
|
||
"application/webpush-options+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/whoispp-query": {
|
||
source: "iana"
|
||
},
|
||
"application/whoispp-response": {
|
||
source: "iana"
|
||
},
|
||
"application/widget": {
|
||
source: "iana",
|
||
extensions: ["wgt"]
|
||
},
|
||
"application/winhlp": {
|
||
source: "apache",
|
||
extensions: ["hlp"]
|
||
},
|
||
"application/wita": {
|
||
source: "iana"
|
||
},
|
||
"application/wordperfect5.1": {
|
||
source: "iana"
|
||
},
|
||
"application/wsdl+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["wsdl"]
|
||
},
|
||
"application/wspolicy+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["wspolicy"]
|
||
},
|
||
"application/x-7z-compressed": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["7z"]
|
||
},
|
||
"application/x-abiword": {
|
||
source: "apache",
|
||
extensions: ["abw"]
|
||
},
|
||
"application/x-ace-compressed": {
|
||
source: "apache",
|
||
extensions: ["ace"]
|
||
},
|
||
"application/x-amf": {
|
||
source: "apache"
|
||
},
|
||
"application/x-apple-diskimage": {
|
||
source: "apache",
|
||
extensions: ["dmg"]
|
||
},
|
||
"application/x-arj": {
|
||
compressible: false,
|
||
extensions: ["arj"]
|
||
},
|
||
"application/x-authorware-bin": {
|
||
source: "apache",
|
||
extensions: ["aab", "x32", "u32", "vox"]
|
||
},
|
||
"application/x-authorware-map": {
|
||
source: "apache",
|
||
extensions: ["aam"]
|
||
},
|
||
"application/x-authorware-seg": {
|
||
source: "apache",
|
||
extensions: ["aas"]
|
||
},
|
||
"application/x-bcpio": {
|
||
source: "apache",
|
||
extensions: ["bcpio"]
|
||
},
|
||
"application/x-bdoc": {
|
||
compressible: false,
|
||
extensions: ["bdoc"]
|
||
},
|
||
"application/x-bittorrent": {
|
||
source: "apache",
|
||
extensions: ["torrent"]
|
||
},
|
||
"application/x-blorb": {
|
||
source: "apache",
|
||
extensions: ["blb", "blorb"]
|
||
},
|
||
"application/x-bzip": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["bz"]
|
||
},
|
||
"application/x-bzip2": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["bz2", "boz"]
|
||
},
|
||
"application/x-cbr": {
|
||
source: "apache",
|
||
extensions: ["cbr", "cba", "cbt", "cbz", "cb7"]
|
||
},
|
||
"application/x-cdlink": {
|
||
source: "apache",
|
||
extensions: ["vcd"]
|
||
},
|
||
"application/x-cfs-compressed": {
|
||
source: "apache",
|
||
extensions: ["cfs"]
|
||
},
|
||
"application/x-chat": {
|
||
source: "apache",
|
||
extensions: ["chat"]
|
||
},
|
||
"application/x-chess-pgn": {
|
||
source: "apache",
|
||
extensions: ["pgn"]
|
||
},
|
||
"application/x-chrome-extension": {
|
||
extensions: ["crx"]
|
||
},
|
||
"application/x-cocoa": {
|
||
source: "nginx",
|
||
extensions: ["cco"]
|
||
},
|
||
"application/x-compress": {
|
||
source: "apache"
|
||
},
|
||
"application/x-conference": {
|
||
source: "apache",
|
||
extensions: ["nsc"]
|
||
},
|
||
"application/x-cpio": {
|
||
source: "apache",
|
||
extensions: ["cpio"]
|
||
},
|
||
"application/x-csh": {
|
||
source: "apache",
|
||
extensions: ["csh"]
|
||
},
|
||
"application/x-deb": {
|
||
compressible: false
|
||
},
|
||
"application/x-debian-package": {
|
||
source: "apache",
|
||
extensions: ["deb", "udeb"]
|
||
},
|
||
"application/x-dgc-compressed": {
|
||
source: "apache",
|
||
extensions: ["dgc"]
|
||
},
|
||
"application/x-director": {
|
||
source: "apache",
|
||
extensions: ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"]
|
||
},
|
||
"application/x-doom": {
|
||
source: "apache",
|
||
extensions: ["wad"]
|
||
},
|
||
"application/x-dtbncx+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["ncx"]
|
||
},
|
||
"application/x-dtbook+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["dtb"]
|
||
},
|
||
"application/x-dtbresource+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["res"]
|
||
},
|
||
"application/x-dvi": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["dvi"]
|
||
},
|
||
"application/x-envoy": {
|
||
source: "apache",
|
||
extensions: ["evy"]
|
||
},
|
||
"application/x-eva": {
|
||
source: "apache",
|
||
extensions: ["eva"]
|
||
},
|
||
"application/x-font-bdf": {
|
||
source: "apache",
|
||
extensions: ["bdf"]
|
||
},
|
||
"application/x-font-dos": {
|
||
source: "apache"
|
||
},
|
||
"application/x-font-framemaker": {
|
||
source: "apache"
|
||
},
|
||
"application/x-font-ghostscript": {
|
||
source: "apache",
|
||
extensions: ["gsf"]
|
||
},
|
||
"application/x-font-libgrx": {
|
||
source: "apache"
|
||
},
|
||
"application/x-font-linux-psf": {
|
||
source: "apache",
|
||
extensions: ["psf"]
|
||
},
|
||
"application/x-font-pcf": {
|
||
source: "apache",
|
||
extensions: ["pcf"]
|
||
},
|
||
"application/x-font-snf": {
|
||
source: "apache",
|
||
extensions: ["snf"]
|
||
},
|
||
"application/x-font-speedo": {
|
||
source: "apache"
|
||
},
|
||
"application/x-font-sunos-news": {
|
||
source: "apache"
|
||
},
|
||
"application/x-font-type1": {
|
||
source: "apache",
|
||
extensions: ["pfa", "pfb", "pfm", "afm"]
|
||
},
|
||
"application/x-font-vfont": {
|
||
source: "apache"
|
||
},
|
||
"application/x-freearc": {
|
||
source: "apache",
|
||
extensions: ["arc"]
|
||
},
|
||
"application/x-futuresplash": {
|
||
source: "apache",
|
||
extensions: ["spl"]
|
||
},
|
||
"application/x-gca-compressed": {
|
||
source: "apache",
|
||
extensions: ["gca"]
|
||
},
|
||
"application/x-glulx": {
|
||
source: "apache",
|
||
extensions: ["ulx"]
|
||
},
|
||
"application/x-gnumeric": {
|
||
source: "apache",
|
||
extensions: ["gnumeric"]
|
||
},
|
||
"application/x-gramps-xml": {
|
||
source: "apache",
|
||
extensions: ["gramps"]
|
||
},
|
||
"application/x-gtar": {
|
||
source: "apache",
|
||
extensions: ["gtar"]
|
||
},
|
||
"application/x-gzip": {
|
||
source: "apache"
|
||
},
|
||
"application/x-hdf": {
|
||
source: "apache",
|
||
extensions: ["hdf"]
|
||
},
|
||
"application/x-httpd-php": {
|
||
compressible: true,
|
||
extensions: ["php"]
|
||
},
|
||
"application/x-install-instructions": {
|
||
source: "apache",
|
||
extensions: ["install"]
|
||
},
|
||
"application/x-iso9660-image": {
|
||
source: "apache",
|
||
extensions: ["iso"]
|
||
},
|
||
"application/x-iwork-keynote-sffkey": {
|
||
extensions: ["key"]
|
||
},
|
||
"application/x-iwork-numbers-sffnumbers": {
|
||
extensions: ["numbers"]
|
||
},
|
||
"application/x-iwork-pages-sffpages": {
|
||
extensions: ["pages"]
|
||
},
|
||
"application/x-java-archive-diff": {
|
||
source: "nginx",
|
||
extensions: ["jardiff"]
|
||
},
|
||
"application/x-java-jnlp-file": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["jnlp"]
|
||
},
|
||
"application/x-javascript": {
|
||
compressible: true
|
||
},
|
||
"application/x-keepass2": {
|
||
extensions: ["kdbx"]
|
||
},
|
||
"application/x-latex": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["latex"]
|
||
},
|
||
"application/x-lua-bytecode": {
|
||
extensions: ["luac"]
|
||
},
|
||
"application/x-lzh-compressed": {
|
||
source: "apache",
|
||
extensions: ["lzh", "lha"]
|
||
},
|
||
"application/x-makeself": {
|
||
source: "nginx",
|
||
extensions: ["run"]
|
||
},
|
||
"application/x-mie": {
|
||
source: "apache",
|
||
extensions: ["mie"]
|
||
},
|
||
"application/x-mobipocket-ebook": {
|
||
source: "apache",
|
||
extensions: ["prc", "mobi"]
|
||
},
|
||
"application/x-mpegurl": {
|
||
compressible: false
|
||
},
|
||
"application/x-ms-application": {
|
||
source: "apache",
|
||
extensions: ["application"]
|
||
},
|
||
"application/x-ms-shortcut": {
|
||
source: "apache",
|
||
extensions: ["lnk"]
|
||
},
|
||
"application/x-ms-wmd": {
|
||
source: "apache",
|
||
extensions: ["wmd"]
|
||
},
|
||
"application/x-ms-wmz": {
|
||
source: "apache",
|
||
extensions: ["wmz"]
|
||
},
|
||
"application/x-ms-xbap": {
|
||
source: "apache",
|
||
extensions: ["xbap"]
|
||
},
|
||
"application/x-msaccess": {
|
||
source: "apache",
|
||
extensions: ["mdb"]
|
||
},
|
||
"application/x-msbinder": {
|
||
source: "apache",
|
||
extensions: ["obd"]
|
||
},
|
||
"application/x-mscardfile": {
|
||
source: "apache",
|
||
extensions: ["crd"]
|
||
},
|
||
"application/x-msclip": {
|
||
source: "apache",
|
||
extensions: ["clp"]
|
||
},
|
||
"application/x-msdos-program": {
|
||
extensions: ["exe"]
|
||
},
|
||
"application/x-msdownload": {
|
||
source: "apache",
|
||
extensions: ["exe", "dll", "com", "bat", "msi"]
|
||
},
|
||
"application/x-msmediaview": {
|
||
source: "apache",
|
||
extensions: ["mvb", "m13", "m14"]
|
||
},
|
||
"application/x-msmetafile": {
|
||
source: "apache",
|
||
extensions: ["wmf", "wmz", "emf", "emz"]
|
||
},
|
||
"application/x-msmoney": {
|
||
source: "apache",
|
||
extensions: ["mny"]
|
||
},
|
||
"application/x-mspublisher": {
|
||
source: "apache",
|
||
extensions: ["pub"]
|
||
},
|
||
"application/x-msschedule": {
|
||
source: "apache",
|
||
extensions: ["scd"]
|
||
},
|
||
"application/x-msterminal": {
|
||
source: "apache",
|
||
extensions: ["trm"]
|
||
},
|
||
"application/x-mswrite": {
|
||
source: "apache",
|
||
extensions: ["wri"]
|
||
},
|
||
"application/x-netcdf": {
|
||
source: "apache",
|
||
extensions: ["nc", "cdf"]
|
||
},
|
||
"application/x-ns-proxy-autoconfig": {
|
||
compressible: true,
|
||
extensions: ["pac"]
|
||
},
|
||
"application/x-nzb": {
|
||
source: "apache",
|
||
extensions: ["nzb"]
|
||
},
|
||
"application/x-perl": {
|
||
source: "nginx",
|
||
extensions: ["pl", "pm"]
|
||
},
|
||
"application/x-pilot": {
|
||
source: "nginx",
|
||
extensions: ["prc", "pdb"]
|
||
},
|
||
"application/x-pkcs12": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["p12", "pfx"]
|
||
},
|
||
"application/x-pkcs7-certificates": {
|
||
source: "apache",
|
||
extensions: ["p7b", "spc"]
|
||
},
|
||
"application/x-pkcs7-certreqresp": {
|
||
source: "apache",
|
||
extensions: ["p7r"]
|
||
},
|
||
"application/x-pki-message": {
|
||
source: "iana"
|
||
},
|
||
"application/x-rar-compressed": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["rar"]
|
||
},
|
||
"application/x-redhat-package-manager": {
|
||
source: "nginx",
|
||
extensions: ["rpm"]
|
||
},
|
||
"application/x-research-info-systems": {
|
||
source: "apache",
|
||
extensions: ["ris"]
|
||
},
|
||
"application/x-sea": {
|
||
source: "nginx",
|
||
extensions: ["sea"]
|
||
},
|
||
"application/x-sh": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["sh"]
|
||
},
|
||
"application/x-shar": {
|
||
source: "apache",
|
||
extensions: ["shar"]
|
||
},
|
||
"application/x-shockwave-flash": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["swf"]
|
||
},
|
||
"application/x-silverlight-app": {
|
||
source: "apache",
|
||
extensions: ["xap"]
|
||
},
|
||
"application/x-sql": {
|
||
source: "apache",
|
||
extensions: ["sql"]
|
||
},
|
||
"application/x-stuffit": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["sit"]
|
||
},
|
||
"application/x-stuffitx": {
|
||
source: "apache",
|
||
extensions: ["sitx"]
|
||
},
|
||
"application/x-subrip": {
|
||
source: "apache",
|
||
extensions: ["srt"]
|
||
},
|
||
"application/x-sv4cpio": {
|
||
source: "apache",
|
||
extensions: ["sv4cpio"]
|
||
},
|
||
"application/x-sv4crc": {
|
||
source: "apache",
|
||
extensions: ["sv4crc"]
|
||
},
|
||
"application/x-t3vm-image": {
|
||
source: "apache",
|
||
extensions: ["t3"]
|
||
},
|
||
"application/x-tads": {
|
||
source: "apache",
|
||
extensions: ["gam"]
|
||
},
|
||
"application/x-tar": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["tar"]
|
||
},
|
||
"application/x-tcl": {
|
||
source: "apache",
|
||
extensions: ["tcl", "tk"]
|
||
},
|
||
"application/x-tex": {
|
||
source: "apache",
|
||
extensions: ["tex"]
|
||
},
|
||
"application/x-tex-tfm": {
|
||
source: "apache",
|
||
extensions: ["tfm"]
|
||
},
|
||
"application/x-texinfo": {
|
||
source: "apache",
|
||
extensions: ["texinfo", "texi"]
|
||
},
|
||
"application/x-tgif": {
|
||
source: "apache",
|
||
extensions: ["obj"]
|
||
},
|
||
"application/x-ustar": {
|
||
source: "apache",
|
||
extensions: ["ustar"]
|
||
},
|
||
"application/x-virtualbox-hdd": {
|
||
compressible: true,
|
||
extensions: ["hdd"]
|
||
},
|
||
"application/x-virtualbox-ova": {
|
||
compressible: true,
|
||
extensions: ["ova"]
|
||
},
|
||
"application/x-virtualbox-ovf": {
|
||
compressible: true,
|
||
extensions: ["ovf"]
|
||
},
|
||
"application/x-virtualbox-vbox": {
|
||
compressible: true,
|
||
extensions: ["vbox"]
|
||
},
|
||
"application/x-virtualbox-vbox-extpack": {
|
||
compressible: false,
|
||
extensions: ["vbox-extpack"]
|
||
},
|
||
"application/x-virtualbox-vdi": {
|
||
compressible: true,
|
||
extensions: ["vdi"]
|
||
},
|
||
"application/x-virtualbox-vhd": {
|
||
compressible: true,
|
||
extensions: ["vhd"]
|
||
},
|
||
"application/x-virtualbox-vmdk": {
|
||
compressible: true,
|
||
extensions: ["vmdk"]
|
||
},
|
||
"application/x-wais-source": {
|
||
source: "apache",
|
||
extensions: ["src"]
|
||
},
|
||
"application/x-web-app-manifest+json": {
|
||
compressible: true,
|
||
extensions: ["webapp"]
|
||
},
|
||
"application/x-www-form-urlencoded": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/x-x509-ca-cert": {
|
||
source: "iana",
|
||
extensions: ["der", "crt", "pem"]
|
||
},
|
||
"application/x-x509-ca-ra-cert": {
|
||
source: "iana"
|
||
},
|
||
"application/x-x509-next-ca-cert": {
|
||
source: "iana"
|
||
},
|
||
"application/x-xfig": {
|
||
source: "apache",
|
||
extensions: ["fig"]
|
||
},
|
||
"application/x-xliff+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["xlf"]
|
||
},
|
||
"application/x-xpinstall": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["xpi"]
|
||
},
|
||
"application/x-xz": {
|
||
source: "apache",
|
||
extensions: ["xz"]
|
||
},
|
||
"application/x-zmachine": {
|
||
source: "apache",
|
||
extensions: ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"]
|
||
},
|
||
"application/x400-bp": {
|
||
source: "iana"
|
||
},
|
||
"application/xacml+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/xaml+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["xaml"]
|
||
},
|
||
"application/xcap-att+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xav"]
|
||
},
|
||
"application/xcap-caps+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xca"]
|
||
},
|
||
"application/xcap-diff+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xdf"]
|
||
},
|
||
"application/xcap-el+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xel"]
|
||
},
|
||
"application/xcap-error+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/xcap-ns+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xns"]
|
||
},
|
||
"application/xcon-conference-info+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/xcon-conference-info-diff+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/xenc+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xenc"]
|
||
},
|
||
"application/xhtml+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xhtml", "xht"]
|
||
},
|
||
"application/xhtml-voice+xml": {
|
||
source: "apache",
|
||
compressible: true
|
||
},
|
||
"application/xliff+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xlf"]
|
||
},
|
||
"application/xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xml", "xsl", "xsd", "rng"]
|
||
},
|
||
"application/xml-dtd": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["dtd"]
|
||
},
|
||
"application/xml-external-parsed-entity": {
|
||
source: "iana"
|
||
},
|
||
"application/xml-patch+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/xmpp+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/xop+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xop"]
|
||
},
|
||
"application/xproc+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["xpl"]
|
||
},
|
||
"application/xslt+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xsl", "xslt"]
|
||
},
|
||
"application/xspf+xml": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["xspf"]
|
||
},
|
||
"application/xv+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["mxml", "xhvml", "xvml", "xvm"]
|
||
},
|
||
"application/yang": {
|
||
source: "iana",
|
||
extensions: ["yang"]
|
||
},
|
||
"application/yang-data+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/yang-data+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/yang-patch+json": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/yang-patch+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"application/yin+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["yin"]
|
||
},
|
||
"application/zip": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["zip"]
|
||
},
|
||
"application/zlib": {
|
||
source: "iana"
|
||
},
|
||
"application/zstd": {
|
||
source: "iana"
|
||
},
|
||
"audio/1d-interleaved-parityfec": {
|
||
source: "iana"
|
||
},
|
||
"audio/32kadpcm": {
|
||
source: "iana"
|
||
},
|
||
"audio/3gpp": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["3gpp"]
|
||
},
|
||
"audio/3gpp2": {
|
||
source: "iana"
|
||
},
|
||
"audio/aac": {
|
||
source: "iana"
|
||
},
|
||
"audio/ac3": {
|
||
source: "iana"
|
||
},
|
||
"audio/adpcm": {
|
||
source: "apache",
|
||
extensions: ["adp"]
|
||
},
|
||
"audio/amr": {
|
||
source: "iana",
|
||
extensions: ["amr"]
|
||
},
|
||
"audio/amr-wb": {
|
||
source: "iana"
|
||
},
|
||
"audio/amr-wb+": {
|
||
source: "iana"
|
||
},
|
||
"audio/aptx": {
|
||
source: "iana"
|
||
},
|
||
"audio/asc": {
|
||
source: "iana"
|
||
},
|
||
"audio/atrac-advanced-lossless": {
|
||
source: "iana"
|
||
},
|
||
"audio/atrac-x": {
|
||
source: "iana"
|
||
},
|
||
"audio/atrac3": {
|
||
source: "iana"
|
||
},
|
||
"audio/basic": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["au", "snd"]
|
||
},
|
||
"audio/bv16": {
|
||
source: "iana"
|
||
},
|
||
"audio/bv32": {
|
||
source: "iana"
|
||
},
|
||
"audio/clearmode": {
|
||
source: "iana"
|
||
},
|
||
"audio/cn": {
|
||
source: "iana"
|
||
},
|
||
"audio/dat12": {
|
||
source: "iana"
|
||
},
|
||
"audio/dls": {
|
||
source: "iana"
|
||
},
|
||
"audio/dsr-es201108": {
|
||
source: "iana"
|
||
},
|
||
"audio/dsr-es202050": {
|
||
source: "iana"
|
||
},
|
||
"audio/dsr-es202211": {
|
||
source: "iana"
|
||
},
|
||
"audio/dsr-es202212": {
|
||
source: "iana"
|
||
},
|
||
"audio/dv": {
|
||
source: "iana"
|
||
},
|
||
"audio/dvi4": {
|
||
source: "iana"
|
||
},
|
||
"audio/eac3": {
|
||
source: "iana"
|
||
},
|
||
"audio/encaprtp": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrc": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrc-qcp": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrc0": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrc1": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrcb": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrcb0": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrcb1": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrcnw": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrcnw0": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrcnw1": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrcwb": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrcwb0": {
|
||
source: "iana"
|
||
},
|
||
"audio/evrcwb1": {
|
||
source: "iana"
|
||
},
|
||
"audio/evs": {
|
||
source: "iana"
|
||
},
|
||
"audio/flexfec": {
|
||
source: "iana"
|
||
},
|
||
"audio/fwdred": {
|
||
source: "iana"
|
||
},
|
||
"audio/g711-0": {
|
||
source: "iana"
|
||
},
|
||
"audio/g719": {
|
||
source: "iana"
|
||
},
|
||
"audio/g722": {
|
||
source: "iana"
|
||
},
|
||
"audio/g7221": {
|
||
source: "iana"
|
||
},
|
||
"audio/g723": {
|
||
source: "iana"
|
||
},
|
||
"audio/g726-16": {
|
||
source: "iana"
|
||
},
|
||
"audio/g726-24": {
|
||
source: "iana"
|
||
},
|
||
"audio/g726-32": {
|
||
source: "iana"
|
||
},
|
||
"audio/g726-40": {
|
||
source: "iana"
|
||
},
|
||
"audio/g728": {
|
||
source: "iana"
|
||
},
|
||
"audio/g729": {
|
||
source: "iana"
|
||
},
|
||
"audio/g7291": {
|
||
source: "iana"
|
||
},
|
||
"audio/g729d": {
|
||
source: "iana"
|
||
},
|
||
"audio/g729e": {
|
||
source: "iana"
|
||
},
|
||
"audio/gsm": {
|
||
source: "iana"
|
||
},
|
||
"audio/gsm-efr": {
|
||
source: "iana"
|
||
},
|
||
"audio/gsm-hr-08": {
|
||
source: "iana"
|
||
},
|
||
"audio/ilbc": {
|
||
source: "iana"
|
||
},
|
||
"audio/ip-mr_v2.5": {
|
||
source: "iana"
|
||
},
|
||
"audio/isac": {
|
||
source: "apache"
|
||
},
|
||
"audio/l16": {
|
||
source: "iana"
|
||
},
|
||
"audio/l20": {
|
||
source: "iana"
|
||
},
|
||
"audio/l24": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"audio/l8": {
|
||
source: "iana"
|
||
},
|
||
"audio/lpc": {
|
||
source: "iana"
|
||
},
|
||
"audio/melp": {
|
||
source: "iana"
|
||
},
|
||
"audio/melp1200": {
|
||
source: "iana"
|
||
},
|
||
"audio/melp2400": {
|
||
source: "iana"
|
||
},
|
||
"audio/melp600": {
|
||
source: "iana"
|
||
},
|
||
"audio/mhas": {
|
||
source: "iana"
|
||
},
|
||
"audio/midi": {
|
||
source: "apache",
|
||
extensions: ["mid", "midi", "kar", "rmi"]
|
||
},
|
||
"audio/mobile-xmf": {
|
||
source: "iana",
|
||
extensions: ["mxmf"]
|
||
},
|
||
"audio/mp3": {
|
||
compressible: false,
|
||
extensions: ["mp3"]
|
||
},
|
||
"audio/mp4": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["m4a", "mp4a"]
|
||
},
|
||
"audio/mp4a-latm": {
|
||
source: "iana"
|
||
},
|
||
"audio/mpa": {
|
||
source: "iana"
|
||
},
|
||
"audio/mpa-robust": {
|
||
source: "iana"
|
||
},
|
||
"audio/mpeg": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"]
|
||
},
|
||
"audio/mpeg4-generic": {
|
||
source: "iana"
|
||
},
|
||
"audio/musepack": {
|
||
source: "apache"
|
||
},
|
||
"audio/ogg": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["oga", "ogg", "spx", "opus"]
|
||
},
|
||
"audio/opus": {
|
||
source: "iana"
|
||
},
|
||
"audio/parityfec": {
|
||
source: "iana"
|
||
},
|
||
"audio/pcma": {
|
||
source: "iana"
|
||
},
|
||
"audio/pcma-wb": {
|
||
source: "iana"
|
||
},
|
||
"audio/pcmu": {
|
||
source: "iana"
|
||
},
|
||
"audio/pcmu-wb": {
|
||
source: "iana"
|
||
},
|
||
"audio/prs.sid": {
|
||
source: "iana"
|
||
},
|
||
"audio/qcelp": {
|
||
source: "iana"
|
||
},
|
||
"audio/raptorfec": {
|
||
source: "iana"
|
||
},
|
||
"audio/red": {
|
||
source: "iana"
|
||
},
|
||
"audio/rtp-enc-aescm128": {
|
||
source: "iana"
|
||
},
|
||
"audio/rtp-midi": {
|
||
source: "iana"
|
||
},
|
||
"audio/rtploopback": {
|
||
source: "iana"
|
||
},
|
||
"audio/rtx": {
|
||
source: "iana"
|
||
},
|
||
"audio/s3m": {
|
||
source: "apache",
|
||
extensions: ["s3m"]
|
||
},
|
||
"audio/scip": {
|
||
source: "iana"
|
||
},
|
||
"audio/silk": {
|
||
source: "apache",
|
||
extensions: ["sil"]
|
||
},
|
||
"audio/smv": {
|
||
source: "iana"
|
||
},
|
||
"audio/smv-qcp": {
|
||
source: "iana"
|
||
},
|
||
"audio/smv0": {
|
||
source: "iana"
|
||
},
|
||
"audio/sofa": {
|
||
source: "iana"
|
||
},
|
||
"audio/sp-midi": {
|
||
source: "iana"
|
||
},
|
||
"audio/speex": {
|
||
source: "iana"
|
||
},
|
||
"audio/t140c": {
|
||
source: "iana"
|
||
},
|
||
"audio/t38": {
|
||
source: "iana"
|
||
},
|
||
"audio/telephone-event": {
|
||
source: "iana"
|
||
},
|
||
"audio/tetra_acelp": {
|
||
source: "iana"
|
||
},
|
||
"audio/tetra_acelp_bb": {
|
||
source: "iana"
|
||
},
|
||
"audio/tone": {
|
||
source: "iana"
|
||
},
|
||
"audio/tsvcis": {
|
||
source: "iana"
|
||
},
|
||
"audio/uemclip": {
|
||
source: "iana"
|
||
},
|
||
"audio/ulpfec": {
|
||
source: "iana"
|
||
},
|
||
"audio/usac": {
|
||
source: "iana"
|
||
},
|
||
"audio/vdvi": {
|
||
source: "iana"
|
||
},
|
||
"audio/vmr-wb": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.3gpp.iufp": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.4sb": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.audiokoz": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.celp": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.cisco.nse": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.cmles.radio-events": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.cns.anp1": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.cns.inf1": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.dece.audio": {
|
||
source: "iana",
|
||
extensions: ["uva", "uvva"]
|
||
},
|
||
"audio/vnd.digital-winds": {
|
||
source: "iana",
|
||
extensions: ["eol"]
|
||
},
|
||
"audio/vnd.dlna.adts": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.dolby.heaac.1": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.dolby.heaac.2": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.dolby.mlp": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.dolby.mps": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.dolby.pl2": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.dolby.pl2x": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.dolby.pl2z": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.dolby.pulse.1": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.dra": {
|
||
source: "iana",
|
||
extensions: ["dra"]
|
||
},
|
||
"audio/vnd.dts": {
|
||
source: "iana",
|
||
extensions: ["dts"]
|
||
},
|
||
"audio/vnd.dts.hd": {
|
||
source: "iana",
|
||
extensions: ["dtshd"]
|
||
},
|
||
"audio/vnd.dts.uhd": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.dvb.file": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.everad.plj": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.hns.audio": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.lucent.voice": {
|
||
source: "iana",
|
||
extensions: ["lvp"]
|
||
},
|
||
"audio/vnd.ms-playready.media.pya": {
|
||
source: "iana",
|
||
extensions: ["pya"]
|
||
},
|
||
"audio/vnd.nokia.mobile-xmf": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.nortel.vbk": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.nuera.ecelp4800": {
|
||
source: "iana",
|
||
extensions: ["ecelp4800"]
|
||
},
|
||
"audio/vnd.nuera.ecelp7470": {
|
||
source: "iana",
|
||
extensions: ["ecelp7470"]
|
||
},
|
||
"audio/vnd.nuera.ecelp9600": {
|
||
source: "iana",
|
||
extensions: ["ecelp9600"]
|
||
},
|
||
"audio/vnd.octel.sbc": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.presonus.multitrack": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.qcelp": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.rhetorex.32kadpcm": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.rip": {
|
||
source: "iana",
|
||
extensions: ["rip"]
|
||
},
|
||
"audio/vnd.rn-realaudio": {
|
||
compressible: false
|
||
},
|
||
"audio/vnd.sealedmedia.softseal.mpeg": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.vmx.cvsd": {
|
||
source: "iana"
|
||
},
|
||
"audio/vnd.wave": {
|
||
compressible: false
|
||
},
|
||
"audio/vorbis": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"audio/vorbis-config": {
|
||
source: "iana"
|
||
},
|
||
"audio/wav": {
|
||
compressible: false,
|
||
extensions: ["wav"]
|
||
},
|
||
"audio/wave": {
|
||
compressible: false,
|
||
extensions: ["wav"]
|
||
},
|
||
"audio/webm": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["weba"]
|
||
},
|
||
"audio/x-aac": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["aac"]
|
||
},
|
||
"audio/x-aiff": {
|
||
source: "apache",
|
||
extensions: ["aif", "aiff", "aifc"]
|
||
},
|
||
"audio/x-caf": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["caf"]
|
||
},
|
||
"audio/x-flac": {
|
||
source: "apache",
|
||
extensions: ["flac"]
|
||
},
|
||
"audio/x-m4a": {
|
||
source: "nginx",
|
||
extensions: ["m4a"]
|
||
},
|
||
"audio/x-matroska": {
|
||
source: "apache",
|
||
extensions: ["mka"]
|
||
},
|
||
"audio/x-mpegurl": {
|
||
source: "apache",
|
||
extensions: ["m3u"]
|
||
},
|
||
"audio/x-ms-wax": {
|
||
source: "apache",
|
||
extensions: ["wax"]
|
||
},
|
||
"audio/x-ms-wma": {
|
||
source: "apache",
|
||
extensions: ["wma"]
|
||
},
|
||
"audio/x-pn-realaudio": {
|
||
source: "apache",
|
||
extensions: ["ram", "ra"]
|
||
},
|
||
"audio/x-pn-realaudio-plugin": {
|
||
source: "apache",
|
||
extensions: ["rmp"]
|
||
},
|
||
"audio/x-realaudio": {
|
||
source: "nginx",
|
||
extensions: ["ra"]
|
||
},
|
||
"audio/x-tta": {
|
||
source: "apache"
|
||
},
|
||
"audio/x-wav": {
|
||
source: "apache",
|
||
extensions: ["wav"]
|
||
},
|
||
"audio/xm": {
|
||
source: "apache",
|
||
extensions: ["xm"]
|
||
},
|
||
"chemical/x-cdx": {
|
||
source: "apache",
|
||
extensions: ["cdx"]
|
||
},
|
||
"chemical/x-cif": {
|
||
source: "apache",
|
||
extensions: ["cif"]
|
||
},
|
||
"chemical/x-cmdf": {
|
||
source: "apache",
|
||
extensions: ["cmdf"]
|
||
},
|
||
"chemical/x-cml": {
|
||
source: "apache",
|
||
extensions: ["cml"]
|
||
},
|
||
"chemical/x-csml": {
|
||
source: "apache",
|
||
extensions: ["csml"]
|
||
},
|
||
"chemical/x-pdb": {
|
||
source: "apache"
|
||
},
|
||
"chemical/x-xyz": {
|
||
source: "apache",
|
||
extensions: ["xyz"]
|
||
},
|
||
"font/collection": {
|
||
source: "iana",
|
||
extensions: ["ttc"]
|
||
},
|
||
"font/otf": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["otf"]
|
||
},
|
||
"font/sfnt": {
|
||
source: "iana"
|
||
},
|
||
"font/ttf": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["ttf"]
|
||
},
|
||
"font/woff": {
|
||
source: "iana",
|
||
extensions: ["woff"]
|
||
},
|
||
"font/woff2": {
|
||
source: "iana",
|
||
extensions: ["woff2"]
|
||
},
|
||
"image/aces": {
|
||
source: "iana",
|
||
extensions: ["exr"]
|
||
},
|
||
"image/apng": {
|
||
compressible: false,
|
||
extensions: ["apng"]
|
||
},
|
||
"image/avci": {
|
||
source: "iana",
|
||
extensions: ["avci"]
|
||
},
|
||
"image/avcs": {
|
||
source: "iana",
|
||
extensions: ["avcs"]
|
||
},
|
||
"image/avif": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["avif"]
|
||
},
|
||
"image/bmp": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["bmp"]
|
||
},
|
||
"image/cgm": {
|
||
source: "iana",
|
||
extensions: ["cgm"]
|
||
},
|
||
"image/dicom-rle": {
|
||
source: "iana",
|
||
extensions: ["drle"]
|
||
},
|
||
"image/emf": {
|
||
source: "iana",
|
||
extensions: ["emf"]
|
||
},
|
||
"image/fits": {
|
||
source: "iana",
|
||
extensions: ["fits"]
|
||
},
|
||
"image/g3fax": {
|
||
source: "iana",
|
||
extensions: ["g3"]
|
||
},
|
||
"image/gif": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["gif"]
|
||
},
|
||
"image/heic": {
|
||
source: "iana",
|
||
extensions: ["heic"]
|
||
},
|
||
"image/heic-sequence": {
|
||
source: "iana",
|
||
extensions: ["heics"]
|
||
},
|
||
"image/heif": {
|
||
source: "iana",
|
||
extensions: ["heif"]
|
||
},
|
||
"image/heif-sequence": {
|
||
source: "iana",
|
||
extensions: ["heifs"]
|
||
},
|
||
"image/hej2k": {
|
||
source: "iana",
|
||
extensions: ["hej2"]
|
||
},
|
||
"image/hsj2": {
|
||
source: "iana",
|
||
extensions: ["hsj2"]
|
||
},
|
||
"image/ief": {
|
||
source: "iana",
|
||
extensions: ["ief"]
|
||
},
|
||
"image/jls": {
|
||
source: "iana",
|
||
extensions: ["jls"]
|
||
},
|
||
"image/jp2": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["jp2", "jpg2"]
|
||
},
|
||
"image/jpeg": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["jpeg", "jpg", "jpe"]
|
||
},
|
||
"image/jph": {
|
||
source: "iana",
|
||
extensions: ["jph"]
|
||
},
|
||
"image/jphc": {
|
||
source: "iana",
|
||
extensions: ["jhc"]
|
||
},
|
||
"image/jpm": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["jpm"]
|
||
},
|
||
"image/jpx": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["jpx", "jpf"]
|
||
},
|
||
"image/jxr": {
|
||
source: "iana",
|
||
extensions: ["jxr"]
|
||
},
|
||
"image/jxra": {
|
||
source: "iana",
|
||
extensions: ["jxra"]
|
||
},
|
||
"image/jxrs": {
|
||
source: "iana",
|
||
extensions: ["jxrs"]
|
||
},
|
||
"image/jxs": {
|
||
source: "iana",
|
||
extensions: ["jxs"]
|
||
},
|
||
"image/jxsc": {
|
||
source: "iana",
|
||
extensions: ["jxsc"]
|
||
},
|
||
"image/jxsi": {
|
||
source: "iana",
|
||
extensions: ["jxsi"]
|
||
},
|
||
"image/jxss": {
|
||
source: "iana",
|
||
extensions: ["jxss"]
|
||
},
|
||
"image/ktx": {
|
||
source: "iana",
|
||
extensions: ["ktx"]
|
||
},
|
||
"image/ktx2": {
|
||
source: "iana",
|
||
extensions: ["ktx2"]
|
||
},
|
||
"image/naplps": {
|
||
source: "iana"
|
||
},
|
||
"image/pjpeg": {
|
||
compressible: false
|
||
},
|
||
"image/png": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["png"]
|
||
},
|
||
"image/prs.btif": {
|
||
source: "iana",
|
||
extensions: ["btif"]
|
||
},
|
||
"image/prs.pti": {
|
||
source: "iana",
|
||
extensions: ["pti"]
|
||
},
|
||
"image/pwg-raster": {
|
||
source: "iana"
|
||
},
|
||
"image/sgi": {
|
||
source: "apache",
|
||
extensions: ["sgi"]
|
||
},
|
||
"image/svg+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["svg", "svgz"]
|
||
},
|
||
"image/t38": {
|
||
source: "iana",
|
||
extensions: ["t38"]
|
||
},
|
||
"image/tiff": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["tif", "tiff"]
|
||
},
|
||
"image/tiff-fx": {
|
||
source: "iana",
|
||
extensions: ["tfx"]
|
||
},
|
||
"image/vnd.adobe.photoshop": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["psd"]
|
||
},
|
||
"image/vnd.airzip.accelerator.azv": {
|
||
source: "iana",
|
||
extensions: ["azv"]
|
||
},
|
||
"image/vnd.cns.inf2": {
|
||
source: "iana"
|
||
},
|
||
"image/vnd.dece.graphic": {
|
||
source: "iana",
|
||
extensions: ["uvi", "uvvi", "uvg", "uvvg"]
|
||
},
|
||
"image/vnd.djvu": {
|
||
source: "iana",
|
||
extensions: ["djvu", "djv"]
|
||
},
|
||
"image/vnd.dvb.subtitle": {
|
||
source: "iana",
|
||
extensions: ["sub"]
|
||
},
|
||
"image/vnd.dwg": {
|
||
source: "iana",
|
||
extensions: ["dwg"]
|
||
},
|
||
"image/vnd.dxf": {
|
||
source: "iana",
|
||
extensions: ["dxf"]
|
||
},
|
||
"image/vnd.fastbidsheet": {
|
||
source: "iana",
|
||
extensions: ["fbs"]
|
||
},
|
||
"image/vnd.fpx": {
|
||
source: "iana",
|
||
extensions: ["fpx"]
|
||
},
|
||
"image/vnd.fst": {
|
||
source: "iana",
|
||
extensions: ["fst"]
|
||
},
|
||
"image/vnd.fujixerox.edmics-mmr": {
|
||
source: "iana",
|
||
extensions: ["mmr"]
|
||
},
|
||
"image/vnd.fujixerox.edmics-rlc": {
|
||
source: "iana",
|
||
extensions: ["rlc"]
|
||
},
|
||
"image/vnd.globalgraphics.pgb": {
|
||
source: "iana"
|
||
},
|
||
"image/vnd.microsoft.icon": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["ico"]
|
||
},
|
||
"image/vnd.mix": {
|
||
source: "iana"
|
||
},
|
||
"image/vnd.mozilla.apng": {
|
||
source: "iana"
|
||
},
|
||
"image/vnd.ms-dds": {
|
||
compressible: true,
|
||
extensions: ["dds"]
|
||
},
|
||
"image/vnd.ms-modi": {
|
||
source: "iana",
|
||
extensions: ["mdi"]
|
||
},
|
||
"image/vnd.ms-photo": {
|
||
source: "apache",
|
||
extensions: ["wdp"]
|
||
},
|
||
"image/vnd.net-fpx": {
|
||
source: "iana",
|
||
extensions: ["npx"]
|
||
},
|
||
"image/vnd.pco.b16": {
|
||
source: "iana",
|
||
extensions: ["b16"]
|
||
},
|
||
"image/vnd.radiance": {
|
||
source: "iana"
|
||
},
|
||
"image/vnd.sealed.png": {
|
||
source: "iana"
|
||
},
|
||
"image/vnd.sealedmedia.softseal.gif": {
|
||
source: "iana"
|
||
},
|
||
"image/vnd.sealedmedia.softseal.jpg": {
|
||
source: "iana"
|
||
},
|
||
"image/vnd.svf": {
|
||
source: "iana"
|
||
},
|
||
"image/vnd.tencent.tap": {
|
||
source: "iana",
|
||
extensions: ["tap"]
|
||
},
|
||
"image/vnd.valve.source.texture": {
|
||
source: "iana",
|
||
extensions: ["vtf"]
|
||
},
|
||
"image/vnd.wap.wbmp": {
|
||
source: "iana",
|
||
extensions: ["wbmp"]
|
||
},
|
||
"image/vnd.xiff": {
|
||
source: "iana",
|
||
extensions: ["xif"]
|
||
},
|
||
"image/vnd.zbrush.pcx": {
|
||
source: "iana",
|
||
extensions: ["pcx"]
|
||
},
|
||
"image/webp": {
|
||
source: "apache",
|
||
extensions: ["webp"]
|
||
},
|
||
"image/wmf": {
|
||
source: "iana",
|
||
extensions: ["wmf"]
|
||
},
|
||
"image/x-3ds": {
|
||
source: "apache",
|
||
extensions: ["3ds"]
|
||
},
|
||
"image/x-cmu-raster": {
|
||
source: "apache",
|
||
extensions: ["ras"]
|
||
},
|
||
"image/x-cmx": {
|
||
source: "apache",
|
||
extensions: ["cmx"]
|
||
},
|
||
"image/x-freehand": {
|
||
source: "apache",
|
||
extensions: ["fh", "fhc", "fh4", "fh5", "fh7"]
|
||
},
|
||
"image/x-icon": {
|
||
source: "apache",
|
||
compressible: true,
|
||
extensions: ["ico"]
|
||
},
|
||
"image/x-jng": {
|
||
source: "nginx",
|
||
extensions: ["jng"]
|
||
},
|
||
"image/x-mrsid-image": {
|
||
source: "apache",
|
||
extensions: ["sid"]
|
||
},
|
||
"image/x-ms-bmp": {
|
||
source: "nginx",
|
||
compressible: true,
|
||
extensions: ["bmp"]
|
||
},
|
||
"image/x-pcx": {
|
||
source: "apache",
|
||
extensions: ["pcx"]
|
||
},
|
||
"image/x-pict": {
|
||
source: "apache",
|
||
extensions: ["pic", "pct"]
|
||
},
|
||
"image/x-portable-anymap": {
|
||
source: "apache",
|
||
extensions: ["pnm"]
|
||
},
|
||
"image/x-portable-bitmap": {
|
||
source: "apache",
|
||
extensions: ["pbm"]
|
||
},
|
||
"image/x-portable-graymap": {
|
||
source: "apache",
|
||
extensions: ["pgm"]
|
||
},
|
||
"image/x-portable-pixmap": {
|
||
source: "apache",
|
||
extensions: ["ppm"]
|
||
},
|
||
"image/x-rgb": {
|
||
source: "apache",
|
||
extensions: ["rgb"]
|
||
},
|
||
"image/x-tga": {
|
||
source: "apache",
|
||
extensions: ["tga"]
|
||
},
|
||
"image/x-xbitmap": {
|
||
source: "apache",
|
||
extensions: ["xbm"]
|
||
},
|
||
"image/x-xcf": {
|
||
compressible: false
|
||
},
|
||
"image/x-xpixmap": {
|
||
source: "apache",
|
||
extensions: ["xpm"]
|
||
},
|
||
"image/x-xwindowdump": {
|
||
source: "apache",
|
||
extensions: ["xwd"]
|
||
},
|
||
"message/cpim": {
|
||
source: "iana"
|
||
},
|
||
"message/delivery-status": {
|
||
source: "iana"
|
||
},
|
||
"message/disposition-notification": {
|
||
source: "iana",
|
||
extensions: [
|
||
"disposition-notification"
|
||
]
|
||
},
|
||
"message/external-body": {
|
||
source: "iana"
|
||
},
|
||
"message/feedback-report": {
|
||
source: "iana"
|
||
},
|
||
"message/global": {
|
||
source: "iana",
|
||
extensions: ["u8msg"]
|
||
},
|
||
"message/global-delivery-status": {
|
||
source: "iana",
|
||
extensions: ["u8dsn"]
|
||
},
|
||
"message/global-disposition-notification": {
|
||
source: "iana",
|
||
extensions: ["u8mdn"]
|
||
},
|
||
"message/global-headers": {
|
||
source: "iana",
|
||
extensions: ["u8hdr"]
|
||
},
|
||
"message/http": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"message/imdn+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"message/news": {
|
||
source: "iana"
|
||
},
|
||
"message/partial": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"message/rfc822": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["eml", "mime"]
|
||
},
|
||
"message/s-http": {
|
||
source: "iana"
|
||
},
|
||
"message/sip": {
|
||
source: "iana"
|
||
},
|
||
"message/sipfrag": {
|
||
source: "iana"
|
||
},
|
||
"message/tracking-status": {
|
||
source: "iana"
|
||
},
|
||
"message/vnd.si.simp": {
|
||
source: "iana"
|
||
},
|
||
"message/vnd.wfa.wsc": {
|
||
source: "iana",
|
||
extensions: ["wsc"]
|
||
},
|
||
"model/3mf": {
|
||
source: "iana",
|
||
extensions: ["3mf"]
|
||
},
|
||
"model/e57": {
|
||
source: "iana"
|
||
},
|
||
"model/gltf+json": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["gltf"]
|
||
},
|
||
"model/gltf-binary": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["glb"]
|
||
},
|
||
"model/iges": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["igs", "iges"]
|
||
},
|
||
"model/mesh": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["msh", "mesh", "silo"]
|
||
},
|
||
"model/mtl": {
|
||
source: "iana",
|
||
extensions: ["mtl"]
|
||
},
|
||
"model/obj": {
|
||
source: "iana",
|
||
extensions: ["obj"]
|
||
},
|
||
"model/step": {
|
||
source: "iana"
|
||
},
|
||
"model/step+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["stpx"]
|
||
},
|
||
"model/step+zip": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["stpz"]
|
||
},
|
||
"model/step-xml+zip": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["stpxz"]
|
||
},
|
||
"model/stl": {
|
||
source: "iana",
|
||
extensions: ["stl"]
|
||
},
|
||
"model/vnd.collada+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["dae"]
|
||
},
|
||
"model/vnd.dwf": {
|
||
source: "iana",
|
||
extensions: ["dwf"]
|
||
},
|
||
"model/vnd.flatland.3dml": {
|
||
source: "iana"
|
||
},
|
||
"model/vnd.gdl": {
|
||
source: "iana",
|
||
extensions: ["gdl"]
|
||
},
|
||
"model/vnd.gs-gdl": {
|
||
source: "apache"
|
||
},
|
||
"model/vnd.gs.gdl": {
|
||
source: "iana"
|
||
},
|
||
"model/vnd.gtw": {
|
||
source: "iana",
|
||
extensions: ["gtw"]
|
||
},
|
||
"model/vnd.moml+xml": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"model/vnd.mts": {
|
||
source: "iana",
|
||
extensions: ["mts"]
|
||
},
|
||
"model/vnd.opengex": {
|
||
source: "iana",
|
||
extensions: ["ogex"]
|
||
},
|
||
"model/vnd.parasolid.transmit.binary": {
|
||
source: "iana",
|
||
extensions: ["x_b"]
|
||
},
|
||
"model/vnd.parasolid.transmit.text": {
|
||
source: "iana",
|
||
extensions: ["x_t"]
|
||
},
|
||
"model/vnd.pytha.pyox": {
|
||
source: "iana"
|
||
},
|
||
"model/vnd.rosette.annotated-data-model": {
|
||
source: "iana"
|
||
},
|
||
"model/vnd.sap.vds": {
|
||
source: "iana",
|
||
extensions: ["vds"]
|
||
},
|
||
"model/vnd.usdz+zip": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["usdz"]
|
||
},
|
||
"model/vnd.valve.source.compiled-map": {
|
||
source: "iana",
|
||
extensions: ["bsp"]
|
||
},
|
||
"model/vnd.vtu": {
|
||
source: "iana",
|
||
extensions: ["vtu"]
|
||
},
|
||
"model/vrml": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["wrl", "vrml"]
|
||
},
|
||
"model/x3d+binary": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["x3db", "x3dbz"]
|
||
},
|
||
"model/x3d+fastinfoset": {
|
||
source: "iana",
|
||
extensions: ["x3db"]
|
||
},
|
||
"model/x3d+vrml": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["x3dv", "x3dvz"]
|
||
},
|
||
"model/x3d+xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["x3d", "x3dz"]
|
||
},
|
||
"model/x3d-vrml": {
|
||
source: "iana",
|
||
extensions: ["x3dv"]
|
||
},
|
||
"multipart/alternative": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"multipart/appledouble": {
|
||
source: "iana"
|
||
},
|
||
"multipart/byteranges": {
|
||
source: "iana"
|
||
},
|
||
"multipart/digest": {
|
||
source: "iana"
|
||
},
|
||
"multipart/encrypted": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"multipart/form-data": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"multipart/header-set": {
|
||
source: "iana"
|
||
},
|
||
"multipart/mixed": {
|
||
source: "iana"
|
||
},
|
||
"multipart/multilingual": {
|
||
source: "iana"
|
||
},
|
||
"multipart/parallel": {
|
||
source: "iana"
|
||
},
|
||
"multipart/related": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"multipart/report": {
|
||
source: "iana"
|
||
},
|
||
"multipart/signed": {
|
||
source: "iana",
|
||
compressible: false
|
||
},
|
||
"multipart/vnd.bint.med-plus": {
|
||
source: "iana"
|
||
},
|
||
"multipart/voice-message": {
|
||
source: "iana"
|
||
},
|
||
"multipart/x-mixed-replace": {
|
||
source: "iana"
|
||
},
|
||
"text/1d-interleaved-parityfec": {
|
||
source: "iana"
|
||
},
|
||
"text/cache-manifest": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["appcache", "manifest"]
|
||
},
|
||
"text/calendar": {
|
||
source: "iana",
|
||
extensions: ["ics", "ifb"]
|
||
},
|
||
"text/calender": {
|
||
compressible: true
|
||
},
|
||
"text/cmd": {
|
||
compressible: true
|
||
},
|
||
"text/coffeescript": {
|
||
extensions: ["coffee", "litcoffee"]
|
||
},
|
||
"text/cql": {
|
||
source: "iana"
|
||
},
|
||
"text/cql-expression": {
|
||
source: "iana"
|
||
},
|
||
"text/cql-identifier": {
|
||
source: "iana"
|
||
},
|
||
"text/css": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true,
|
||
extensions: ["css"]
|
||
},
|
||
"text/csv": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["csv"]
|
||
},
|
||
"text/csv-schema": {
|
||
source: "iana"
|
||
},
|
||
"text/directory": {
|
||
source: "iana"
|
||
},
|
||
"text/dns": {
|
||
source: "iana"
|
||
},
|
||
"text/ecmascript": {
|
||
source: "iana"
|
||
},
|
||
"text/encaprtp": {
|
||
source: "iana"
|
||
},
|
||
"text/enriched": {
|
||
source: "iana"
|
||
},
|
||
"text/fhirpath": {
|
||
source: "iana"
|
||
},
|
||
"text/flexfec": {
|
||
source: "iana"
|
||
},
|
||
"text/fwdred": {
|
||
source: "iana"
|
||
},
|
||
"text/gff3": {
|
||
source: "iana"
|
||
},
|
||
"text/grammar-ref-list": {
|
||
source: "iana"
|
||
},
|
||
"text/html": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["html", "htm", "shtml"]
|
||
},
|
||
"text/jade": {
|
||
extensions: ["jade"]
|
||
},
|
||
"text/javascript": {
|
||
source: "iana",
|
||
compressible: true
|
||
},
|
||
"text/jcr-cnd": {
|
||
source: "iana"
|
||
},
|
||
"text/jsx": {
|
||
compressible: true,
|
||
extensions: ["jsx"]
|
||
},
|
||
"text/less": {
|
||
compressible: true,
|
||
extensions: ["less"]
|
||
},
|
||
"text/markdown": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["markdown", "md"]
|
||
},
|
||
"text/mathml": {
|
||
source: "nginx",
|
||
extensions: ["mml"]
|
||
},
|
||
"text/mdx": {
|
||
compressible: true,
|
||
extensions: ["mdx"]
|
||
},
|
||
"text/mizar": {
|
||
source: "iana"
|
||
},
|
||
"text/n3": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true,
|
||
extensions: ["n3"]
|
||
},
|
||
"text/parameters": {
|
||
source: "iana",
|
||
charset: "UTF-8"
|
||
},
|
||
"text/parityfec": {
|
||
source: "iana"
|
||
},
|
||
"text/plain": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["txt", "text", "conf", "def", "list", "log", "in", "ini"]
|
||
},
|
||
"text/provenance-notation": {
|
||
source: "iana",
|
||
charset: "UTF-8"
|
||
},
|
||
"text/prs.fallenstein.rst": {
|
||
source: "iana"
|
||
},
|
||
"text/prs.lines.tag": {
|
||
source: "iana",
|
||
extensions: ["dsc"]
|
||
},
|
||
"text/prs.prop.logic": {
|
||
source: "iana"
|
||
},
|
||
"text/raptorfec": {
|
||
source: "iana"
|
||
},
|
||
"text/red": {
|
||
source: "iana"
|
||
},
|
||
"text/rfc822-headers": {
|
||
source: "iana"
|
||
},
|
||
"text/richtext": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["rtx"]
|
||
},
|
||
"text/rtf": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["rtf"]
|
||
},
|
||
"text/rtp-enc-aescm128": {
|
||
source: "iana"
|
||
},
|
||
"text/rtploopback": {
|
||
source: "iana"
|
||
},
|
||
"text/rtx": {
|
||
source: "iana"
|
||
},
|
||
"text/sgml": {
|
||
source: "iana",
|
||
extensions: ["sgml", "sgm"]
|
||
},
|
||
"text/shaclc": {
|
||
source: "iana"
|
||
},
|
||
"text/shex": {
|
||
source: "iana",
|
||
extensions: ["shex"]
|
||
},
|
||
"text/slim": {
|
||
extensions: ["slim", "slm"]
|
||
},
|
||
"text/spdx": {
|
||
source: "iana",
|
||
extensions: ["spdx"]
|
||
},
|
||
"text/strings": {
|
||
source: "iana"
|
||
},
|
||
"text/stylus": {
|
||
extensions: ["stylus", "styl"]
|
||
},
|
||
"text/t140": {
|
||
source: "iana"
|
||
},
|
||
"text/tab-separated-values": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["tsv"]
|
||
},
|
||
"text/troff": {
|
||
source: "iana",
|
||
extensions: ["t", "tr", "roff", "man", "me", "ms"]
|
||
},
|
||
"text/turtle": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
extensions: ["ttl"]
|
||
},
|
||
"text/ulpfec": {
|
||
source: "iana"
|
||
},
|
||
"text/uri-list": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["uri", "uris", "urls"]
|
||
},
|
||
"text/vcard": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["vcard"]
|
||
},
|
||
"text/vnd.a": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.abc": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.ascii-art": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.curl": {
|
||
source: "iana",
|
||
extensions: ["curl"]
|
||
},
|
||
"text/vnd.curl.dcurl": {
|
||
source: "apache",
|
||
extensions: ["dcurl"]
|
||
},
|
||
"text/vnd.curl.mcurl": {
|
||
source: "apache",
|
||
extensions: ["mcurl"]
|
||
},
|
||
"text/vnd.curl.scurl": {
|
||
source: "apache",
|
||
extensions: ["scurl"]
|
||
},
|
||
"text/vnd.debian.copyright": {
|
||
source: "iana",
|
||
charset: "UTF-8"
|
||
},
|
||
"text/vnd.dmclientscript": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.dvb.subtitle": {
|
||
source: "iana",
|
||
extensions: ["sub"]
|
||
},
|
||
"text/vnd.esmertec.theme-descriptor": {
|
||
source: "iana",
|
||
charset: "UTF-8"
|
||
},
|
||
"text/vnd.familysearch.gedcom": {
|
||
source: "iana",
|
||
extensions: ["ged"]
|
||
},
|
||
"text/vnd.ficlab.flt": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.fly": {
|
||
source: "iana",
|
||
extensions: ["fly"]
|
||
},
|
||
"text/vnd.fmi.flexstor": {
|
||
source: "iana",
|
||
extensions: ["flx"]
|
||
},
|
||
"text/vnd.gml": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.graphviz": {
|
||
source: "iana",
|
||
extensions: ["gv"]
|
||
},
|
||
"text/vnd.hans": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.hgl": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.in3d.3dml": {
|
||
source: "iana",
|
||
extensions: ["3dml"]
|
||
},
|
||
"text/vnd.in3d.spot": {
|
||
source: "iana",
|
||
extensions: ["spot"]
|
||
},
|
||
"text/vnd.iptc.newsml": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.iptc.nitf": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.latex-z": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.motorola.reflex": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.ms-mediapackage": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.net2phone.commcenter.command": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.radisys.msml-basic-layout": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.senx.warpscript": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.si.uricatalogue": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.sosi": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.sun.j2me.app-descriptor": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
extensions: ["jad"]
|
||
},
|
||
"text/vnd.trolltech.linguist": {
|
||
source: "iana",
|
||
charset: "UTF-8"
|
||
},
|
||
"text/vnd.wap.si": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.wap.sl": {
|
||
source: "iana"
|
||
},
|
||
"text/vnd.wap.wml": {
|
||
source: "iana",
|
||
extensions: ["wml"]
|
||
},
|
||
"text/vnd.wap.wmlscript": {
|
||
source: "iana",
|
||
extensions: ["wmls"]
|
||
},
|
||
"text/vtt": {
|
||
source: "iana",
|
||
charset: "UTF-8",
|
||
compressible: true,
|
||
extensions: ["vtt"]
|
||
},
|
||
"text/x-asm": {
|
||
source: "apache",
|
||
extensions: ["s", "asm"]
|
||
},
|
||
"text/x-c": {
|
||
source: "apache",
|
||
extensions: ["c", "cc", "cxx", "cpp", "h", "hh", "dic"]
|
||
},
|
||
"text/x-component": {
|
||
source: "nginx",
|
||
extensions: ["htc"]
|
||
},
|
||
"text/x-fortran": {
|
||
source: "apache",
|
||
extensions: ["f", "for", "f77", "f90"]
|
||
},
|
||
"text/x-gwt-rpc": {
|
||
compressible: true
|
||
},
|
||
"text/x-handlebars-template": {
|
||
extensions: ["hbs"]
|
||
},
|
||
"text/x-java-source": {
|
||
source: "apache",
|
||
extensions: ["java"]
|
||
},
|
||
"text/x-jquery-tmpl": {
|
||
compressible: true
|
||
},
|
||
"text/x-lua": {
|
||
extensions: ["lua"]
|
||
},
|
||
"text/x-markdown": {
|
||
compressible: true,
|
||
extensions: ["mkd"]
|
||
},
|
||
"text/x-nfo": {
|
||
source: "apache",
|
||
extensions: ["nfo"]
|
||
},
|
||
"text/x-opml": {
|
||
source: "apache",
|
||
extensions: ["opml"]
|
||
},
|
||
"text/x-org": {
|
||
compressible: true,
|
||
extensions: ["org"]
|
||
},
|
||
"text/x-pascal": {
|
||
source: "apache",
|
||
extensions: ["p", "pas"]
|
||
},
|
||
"text/x-processing": {
|
||
compressible: true,
|
||
extensions: ["pde"]
|
||
},
|
||
"text/x-sass": {
|
||
extensions: ["sass"]
|
||
},
|
||
"text/x-scss": {
|
||
extensions: ["scss"]
|
||
},
|
||
"text/x-setext": {
|
||
source: "apache",
|
||
extensions: ["etx"]
|
||
},
|
||
"text/x-sfv": {
|
||
source: "apache",
|
||
extensions: ["sfv"]
|
||
},
|
||
"text/x-suse-ymp": {
|
||
compressible: true,
|
||
extensions: ["ymp"]
|
||
},
|
||
"text/x-uuencode": {
|
||
source: "apache",
|
||
extensions: ["uu"]
|
||
},
|
||
"text/x-vcalendar": {
|
||
source: "apache",
|
||
extensions: ["vcs"]
|
||
},
|
||
"text/x-vcard": {
|
||
source: "apache",
|
||
extensions: ["vcf"]
|
||
},
|
||
"text/xml": {
|
||
source: "iana",
|
||
compressible: true,
|
||
extensions: ["xml"]
|
||
},
|
||
"text/xml-external-parsed-entity": {
|
||
source: "iana"
|
||
},
|
||
"text/yaml": {
|
||
compressible: true,
|
||
extensions: ["yaml", "yml"]
|
||
},
|
||
"video/1d-interleaved-parityfec": {
|
||
source: "iana"
|
||
},
|
||
"video/3gpp": {
|
||
source: "iana",
|
||
extensions: ["3gp", "3gpp"]
|
||
},
|
||
"video/3gpp-tt": {
|
||
source: "iana"
|
||
},
|
||
"video/3gpp2": {
|
||
source: "iana",
|
||
extensions: ["3g2"]
|
||
},
|
||
"video/av1": {
|
||
source: "iana"
|
||
},
|
||
"video/bmpeg": {
|
||
source: "iana"
|
||
},
|
||
"video/bt656": {
|
||
source: "iana"
|
||
},
|
||
"video/celb": {
|
||
source: "iana"
|
||
},
|
||
"video/dv": {
|
||
source: "iana"
|
||
},
|
||
"video/encaprtp": {
|
||
source: "iana"
|
||
},
|
||
"video/ffv1": {
|
||
source: "iana"
|
||
},
|
||
"video/flexfec": {
|
||
source: "iana"
|
||
},
|
||
"video/h261": {
|
||
source: "iana",
|
||
extensions: ["h261"]
|
||
},
|
||
"video/h263": {
|
||
source: "iana",
|
||
extensions: ["h263"]
|
||
},
|
||
"video/h263-1998": {
|
||
source: "iana"
|
||
},
|
||
"video/h263-2000": {
|
||
source: "iana"
|
||
},
|
||
"video/h264": {
|
||
source: "iana",
|
||
extensions: ["h264"]
|
||
},
|
||
"video/h264-rcdo": {
|
||
source: "iana"
|
||
},
|
||
"video/h264-svc": {
|
||
source: "iana"
|
||
},
|
||
"video/h265": {
|
||
source: "iana"
|
||
},
|
||
"video/iso.segment": {
|
||
source: "iana",
|
||
extensions: ["m4s"]
|
||
},
|
||
"video/jpeg": {
|
||
source: "iana",
|
||
extensions: ["jpgv"]
|
||
},
|
||
"video/jpeg2000": {
|
||
source: "iana"
|
||
},
|
||
"video/jpm": {
|
||
source: "apache",
|
||
extensions: ["jpm", "jpgm"]
|
||
},
|
||
"video/jxsv": {
|
||
source: "iana"
|
||
},
|
||
"video/mj2": {
|
||
source: "iana",
|
||
extensions: ["mj2", "mjp2"]
|
||
},
|
||
"video/mp1s": {
|
||
source: "iana"
|
||
},
|
||
"video/mp2p": {
|
||
source: "iana"
|
||
},
|
||
"video/mp2t": {
|
||
source: "iana",
|
||
extensions: ["ts"]
|
||
},
|
||
"video/mp4": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["mp4", "mp4v", "mpg4"]
|
||
},
|
||
"video/mp4v-es": {
|
||
source: "iana"
|
||
},
|
||
"video/mpeg": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["mpeg", "mpg", "mpe", "m1v", "m2v"]
|
||
},
|
||
"video/mpeg4-generic": {
|
||
source: "iana"
|
||
},
|
||
"video/mpv": {
|
||
source: "iana"
|
||
},
|
||
"video/nv": {
|
||
source: "iana"
|
||
},
|
||
"video/ogg": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["ogv"]
|
||
},
|
||
"video/parityfec": {
|
||
source: "iana"
|
||
},
|
||
"video/pointer": {
|
||
source: "iana"
|
||
},
|
||
"video/quicktime": {
|
||
source: "iana",
|
||
compressible: false,
|
||
extensions: ["qt", "mov"]
|
||
},
|
||
"video/raptorfec": {
|
||
source: "iana"
|
||
},
|
||
"video/raw": {
|
||
source: "iana"
|
||
},
|
||
"video/rtp-enc-aescm128": {
|
||
source: "iana"
|
||
},
|
||
"video/rtploopback": {
|
||
source: "iana"
|
||
},
|
||
"video/rtx": {
|
||
source: "iana"
|
||
},
|
||
"video/scip": {
|
||
source: "iana"
|
||
},
|
||
"video/smpte291": {
|
||
source: "iana"
|
||
},
|
||
"video/smpte292m": {
|
||
source: "iana"
|
||
},
|
||
"video/ulpfec": {
|
||
source: "iana"
|
||
},
|
||
"video/vc1": {
|
||
source: "iana"
|
||
},
|
||
"video/vc2": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.cctv": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.dece.hd": {
|
||
source: "iana",
|
||
extensions: ["uvh", "uvvh"]
|
||
},
|
||
"video/vnd.dece.mobile": {
|
||
source: "iana",
|
||
extensions: ["uvm", "uvvm"]
|
||
},
|
||
"video/vnd.dece.mp4": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.dece.pd": {
|
||
source: "iana",
|
||
extensions: ["uvp", "uvvp"]
|
||
},
|
||
"video/vnd.dece.sd": {
|
||
source: "iana",
|
||
extensions: ["uvs", "uvvs"]
|
||
},
|
||
"video/vnd.dece.video": {
|
||
source: "iana",
|
||
extensions: ["uvv", "uvvv"]
|
||
},
|
||
"video/vnd.directv.mpeg": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.directv.mpeg-tts": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.dlna.mpeg-tts": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.dvb.file": {
|
||
source: "iana",
|
||
extensions: ["dvb"]
|
||
},
|
||
"video/vnd.fvt": {
|
||
source: "iana",
|
||
extensions: ["fvt"]
|
||
},
|
||
"video/vnd.hns.video": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.iptvforum.1dparityfec-1010": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.iptvforum.1dparityfec-2005": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.iptvforum.2dparityfec-1010": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.iptvforum.2dparityfec-2005": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.iptvforum.ttsavc": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.iptvforum.ttsmpeg2": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.motorola.video": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.motorola.videop": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.mpegurl": {
|
||
source: "iana",
|
||
extensions: ["mxu", "m4u"]
|
||
},
|
||
"video/vnd.ms-playready.media.pyv": {
|
||
source: "iana",
|
||
extensions: ["pyv"]
|
||
},
|
||
"video/vnd.nokia.interleaved-multimedia": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.nokia.mp4vr": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.nokia.videovoip": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.objectvideo": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.radgamettools.bink": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.radgamettools.smacker": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.sealed.mpeg1": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.sealed.mpeg4": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.sealed.swf": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.sealedmedia.softseal.mov": {
|
||
source: "iana"
|
||
},
|
||
"video/vnd.uvvu.mp4": {
|
||
source: "iana",
|
||
extensions: ["uvu", "uvvu"]
|
||
},
|
||
"video/vnd.vivo": {
|
||
source: "iana",
|
||
extensions: ["viv"]
|
||
},
|
||
"video/vnd.youtube.yt": {
|
||
source: "iana"
|
||
},
|
||
"video/vp8": {
|
||
source: "iana"
|
||
},
|
||
"video/vp9": {
|
||
source: "iana"
|
||
},
|
||
"video/webm": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["webm"]
|
||
},
|
||
"video/x-f4v": {
|
||
source: "apache",
|
||
extensions: ["f4v"]
|
||
},
|
||
"video/x-fli": {
|
||
source: "apache",
|
||
extensions: ["fli"]
|
||
},
|
||
"video/x-flv": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["flv"]
|
||
},
|
||
"video/x-m4v": {
|
||
source: "apache",
|
||
extensions: ["m4v"]
|
||
},
|
||
"video/x-matroska": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["mkv", "mk3d", "mks"]
|
||
},
|
||
"video/x-mng": {
|
||
source: "apache",
|
||
extensions: ["mng"]
|
||
},
|
||
"video/x-ms-asf": {
|
||
source: "apache",
|
||
extensions: ["asf", "asx"]
|
||
},
|
||
"video/x-ms-vob": {
|
||
source: "apache",
|
||
extensions: ["vob"]
|
||
},
|
||
"video/x-ms-wm": {
|
||
source: "apache",
|
||
extensions: ["wm"]
|
||
},
|
||
"video/x-ms-wmv": {
|
||
source: "apache",
|
||
compressible: false,
|
||
extensions: ["wmv"]
|
||
},
|
||
"video/x-ms-wmx": {
|
||
source: "apache",
|
||
extensions: ["wmx"]
|
||
},
|
||
"video/x-ms-wvx": {
|
||
source: "apache",
|
||
extensions: ["wvx"]
|
||
},
|
||
"video/x-msvideo": {
|
||
source: "apache",
|
||
extensions: ["avi"]
|
||
},
|
||
"video/x-sgi-movie": {
|
||
source: "apache",
|
||
extensions: ["movie"]
|
||
},
|
||
"video/x-smv": {
|
||
source: "apache",
|
||
extensions: ["smv"]
|
||
},
|
||
"x-conference/x-cooltalk": {
|
||
source: "apache",
|
||
extensions: ["ice"]
|
||
},
|
||
"x-shader/x-fragment": {
|
||
compressible: true
|
||
},
|
||
"x-shader/x-vertex": {
|
||
compressible: true
|
||
}
|
||
};
|
||
}
|
||
});
|
||
|
||
// node_modules/mime-db/index.js
|
||
var require_mime_db = __commonJS({
|
||
"node_modules/mime-db/index.js"(exports, module) {
|
||
module.exports = require_db();
|
||
}
|
||
});
|
||
|
||
// src/rewrite/html.js
|
||
var import_events = __toESM(require_events(), 1);
|
||
|
||
// node_modules/parse5/dist/common/unicode.js
|
||
var UNDEFINED_CODE_POINTS = /* @__PURE__ */ new Set([
|
||
65534,
|
||
65535,
|
||
131070,
|
||
131071,
|
||
196606,
|
||
196607,
|
||
262142,
|
||
262143,
|
||
327678,
|
||
327679,
|
||
393214,
|
||
393215,
|
||
458750,
|
||
458751,
|
||
524286,
|
||
524287,
|
||
589822,
|
||
589823,
|
||
655358,
|
||
655359,
|
||
720894,
|
||
720895,
|
||
786430,
|
||
786431,
|
||
851966,
|
||
851967,
|
||
917502,
|
||
917503,
|
||
983038,
|
||
983039,
|
||
1048574,
|
||
1048575,
|
||
1114110,
|
||
1114111
|
||
]);
|
||
var REPLACEMENT_CHARACTER = "\uFFFD";
|
||
var CODE_POINTS;
|
||
(function(CODE_POINTS2) {
|
||
CODE_POINTS2[CODE_POINTS2["EOF"] = -1] = "EOF";
|
||
CODE_POINTS2[CODE_POINTS2["NULL"] = 0] = "NULL";
|
||
CODE_POINTS2[CODE_POINTS2["TABULATION"] = 9] = "TABULATION";
|
||
CODE_POINTS2[CODE_POINTS2["CARRIAGE_RETURN"] = 13] = "CARRIAGE_RETURN";
|
||
CODE_POINTS2[CODE_POINTS2["LINE_FEED"] = 10] = "LINE_FEED";
|
||
CODE_POINTS2[CODE_POINTS2["FORM_FEED"] = 12] = "FORM_FEED";
|
||
CODE_POINTS2[CODE_POINTS2["SPACE"] = 32] = "SPACE";
|
||
CODE_POINTS2[CODE_POINTS2["EXCLAMATION_MARK"] = 33] = "EXCLAMATION_MARK";
|
||
CODE_POINTS2[CODE_POINTS2["QUOTATION_MARK"] = 34] = "QUOTATION_MARK";
|
||
CODE_POINTS2[CODE_POINTS2["NUMBER_SIGN"] = 35] = "NUMBER_SIGN";
|
||
CODE_POINTS2[CODE_POINTS2["AMPERSAND"] = 38] = "AMPERSAND";
|
||
CODE_POINTS2[CODE_POINTS2["APOSTROPHE"] = 39] = "APOSTROPHE";
|
||
CODE_POINTS2[CODE_POINTS2["HYPHEN_MINUS"] = 45] = "HYPHEN_MINUS";
|
||
CODE_POINTS2[CODE_POINTS2["SOLIDUS"] = 47] = "SOLIDUS";
|
||
CODE_POINTS2[CODE_POINTS2["DIGIT_0"] = 48] = "DIGIT_0";
|
||
CODE_POINTS2[CODE_POINTS2["DIGIT_9"] = 57] = "DIGIT_9";
|
||
CODE_POINTS2[CODE_POINTS2["SEMICOLON"] = 59] = "SEMICOLON";
|
||
CODE_POINTS2[CODE_POINTS2["LESS_THAN_SIGN"] = 60] = "LESS_THAN_SIGN";
|
||
CODE_POINTS2[CODE_POINTS2["EQUALS_SIGN"] = 61] = "EQUALS_SIGN";
|
||
CODE_POINTS2[CODE_POINTS2["GREATER_THAN_SIGN"] = 62] = "GREATER_THAN_SIGN";
|
||
CODE_POINTS2[CODE_POINTS2["QUESTION_MARK"] = 63] = "QUESTION_MARK";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_CAPITAL_A"] = 65] = "LATIN_CAPITAL_A";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_CAPITAL_F"] = 70] = "LATIN_CAPITAL_F";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_CAPITAL_X"] = 88] = "LATIN_CAPITAL_X";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_CAPITAL_Z"] = 90] = "LATIN_CAPITAL_Z";
|
||
CODE_POINTS2[CODE_POINTS2["RIGHT_SQUARE_BRACKET"] = 93] = "RIGHT_SQUARE_BRACKET";
|
||
CODE_POINTS2[CODE_POINTS2["GRAVE_ACCENT"] = 96] = "GRAVE_ACCENT";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_SMALL_A"] = 97] = "LATIN_SMALL_A";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_SMALL_F"] = 102] = "LATIN_SMALL_F";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_SMALL_X"] = 120] = "LATIN_SMALL_X";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_SMALL_Z"] = 122] = "LATIN_SMALL_Z";
|
||
CODE_POINTS2[CODE_POINTS2["REPLACEMENT_CHARACTER"] = 65533] = "REPLACEMENT_CHARACTER";
|
||
})(CODE_POINTS = CODE_POINTS || (CODE_POINTS = {}));
|
||
var SEQUENCES = {
|
||
DASH_DASH: "--",
|
||
CDATA_START: "[CDATA[",
|
||
DOCTYPE: "doctype",
|
||
SCRIPT: "script",
|
||
PUBLIC: "public",
|
||
SYSTEM: "system"
|
||
};
|
||
function isSurrogate(cp) {
|
||
return cp >= 55296 && cp <= 57343;
|
||
}
|
||
function isSurrogatePair(cp) {
|
||
return cp >= 56320 && cp <= 57343;
|
||
}
|
||
function getSurrogatePairCodePoint(cp1, cp2) {
|
||
return (cp1 - 55296) * 1024 + 9216 + cp2;
|
||
}
|
||
function isControlCodePoint(cp) {
|
||
return cp !== 32 && cp !== 10 && cp !== 13 && cp !== 9 && cp !== 12 && cp >= 1 && cp <= 31 || cp >= 127 && cp <= 159;
|
||
}
|
||
function isUndefinedCodePoint(cp) {
|
||
return cp >= 64976 && cp <= 65007 || UNDEFINED_CODE_POINTS.has(cp);
|
||
}
|
||
|
||
// node_modules/parse5/dist/common/error-codes.js
|
||
var ERR;
|
||
(function(ERR2) {
|
||
ERR2["controlCharacterInInputStream"] = "control-character-in-input-stream";
|
||
ERR2["noncharacterInInputStream"] = "noncharacter-in-input-stream";
|
||
ERR2["surrogateInInputStream"] = "surrogate-in-input-stream";
|
||
ERR2["nonVoidHtmlElementStartTagWithTrailingSolidus"] = "non-void-html-element-start-tag-with-trailing-solidus";
|
||
ERR2["endTagWithAttributes"] = "end-tag-with-attributes";
|
||
ERR2["endTagWithTrailingSolidus"] = "end-tag-with-trailing-solidus";
|
||
ERR2["unexpectedSolidusInTag"] = "unexpected-solidus-in-tag";
|
||
ERR2["unexpectedNullCharacter"] = "unexpected-null-character";
|
||
ERR2["unexpectedQuestionMarkInsteadOfTagName"] = "unexpected-question-mark-instead-of-tag-name";
|
||
ERR2["invalidFirstCharacterOfTagName"] = "invalid-first-character-of-tag-name";
|
||
ERR2["unexpectedEqualsSignBeforeAttributeName"] = "unexpected-equals-sign-before-attribute-name";
|
||
ERR2["missingEndTagName"] = "missing-end-tag-name";
|
||
ERR2["unexpectedCharacterInAttributeName"] = "unexpected-character-in-attribute-name";
|
||
ERR2["unknownNamedCharacterReference"] = "unknown-named-character-reference";
|
||
ERR2["missingSemicolonAfterCharacterReference"] = "missing-semicolon-after-character-reference";
|
||
ERR2["unexpectedCharacterAfterDoctypeSystemIdentifier"] = "unexpected-character-after-doctype-system-identifier";
|
||
ERR2["unexpectedCharacterInUnquotedAttributeValue"] = "unexpected-character-in-unquoted-attribute-value";
|
||
ERR2["eofBeforeTagName"] = "eof-before-tag-name";
|
||
ERR2["eofInTag"] = "eof-in-tag";
|
||
ERR2["missingAttributeValue"] = "missing-attribute-value";
|
||
ERR2["missingWhitespaceBetweenAttributes"] = "missing-whitespace-between-attributes";
|
||
ERR2["missingWhitespaceAfterDoctypePublicKeyword"] = "missing-whitespace-after-doctype-public-keyword";
|
||
ERR2["missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers"] = "missing-whitespace-between-doctype-public-and-system-identifiers";
|
||
ERR2["missingWhitespaceAfterDoctypeSystemKeyword"] = "missing-whitespace-after-doctype-system-keyword";
|
||
ERR2["missingQuoteBeforeDoctypePublicIdentifier"] = "missing-quote-before-doctype-public-identifier";
|
||
ERR2["missingQuoteBeforeDoctypeSystemIdentifier"] = "missing-quote-before-doctype-system-identifier";
|
||
ERR2["missingDoctypePublicIdentifier"] = "missing-doctype-public-identifier";
|
||
ERR2["missingDoctypeSystemIdentifier"] = "missing-doctype-system-identifier";
|
||
ERR2["abruptDoctypePublicIdentifier"] = "abrupt-doctype-public-identifier";
|
||
ERR2["abruptDoctypeSystemIdentifier"] = "abrupt-doctype-system-identifier";
|
||
ERR2["cdataInHtmlContent"] = "cdata-in-html-content";
|
||
ERR2["incorrectlyOpenedComment"] = "incorrectly-opened-comment";
|
||
ERR2["eofInScriptHtmlCommentLikeText"] = "eof-in-script-html-comment-like-text";
|
||
ERR2["eofInDoctype"] = "eof-in-doctype";
|
||
ERR2["nestedComment"] = "nested-comment";
|
||
ERR2["abruptClosingOfEmptyComment"] = "abrupt-closing-of-empty-comment";
|
||
ERR2["eofInComment"] = "eof-in-comment";
|
||
ERR2["incorrectlyClosedComment"] = "incorrectly-closed-comment";
|
||
ERR2["eofInCdata"] = "eof-in-cdata";
|
||
ERR2["absenceOfDigitsInNumericCharacterReference"] = "absence-of-digits-in-numeric-character-reference";
|
||
ERR2["nullCharacterReference"] = "null-character-reference";
|
||
ERR2["surrogateCharacterReference"] = "surrogate-character-reference";
|
||
ERR2["characterReferenceOutsideUnicodeRange"] = "character-reference-outside-unicode-range";
|
||
ERR2["controlCharacterReference"] = "control-character-reference";
|
||
ERR2["noncharacterCharacterReference"] = "noncharacter-character-reference";
|
||
ERR2["missingWhitespaceBeforeDoctypeName"] = "missing-whitespace-before-doctype-name";
|
||
ERR2["missingDoctypeName"] = "missing-doctype-name";
|
||
ERR2["invalidCharacterSequenceAfterDoctypeName"] = "invalid-character-sequence-after-doctype-name";
|
||
ERR2["duplicateAttribute"] = "duplicate-attribute";
|
||
ERR2["nonConformingDoctype"] = "non-conforming-doctype";
|
||
ERR2["missingDoctype"] = "missing-doctype";
|
||
ERR2["misplacedDoctype"] = "misplaced-doctype";
|
||
ERR2["endTagWithoutMatchingOpenElement"] = "end-tag-without-matching-open-element";
|
||
ERR2["closingOfElementWithOpenChildElements"] = "closing-of-element-with-open-child-elements";
|
||
ERR2["disallowedContentInNoscriptInHead"] = "disallowed-content-in-noscript-in-head";
|
||
ERR2["openElementsLeftAfterEof"] = "open-elements-left-after-eof";
|
||
ERR2["abandonedHeadElementChild"] = "abandoned-head-element-child";
|
||
ERR2["misplacedStartTagForHeadElement"] = "misplaced-start-tag-for-head-element";
|
||
ERR2["nestedNoscriptInHead"] = "nested-noscript-in-head";
|
||
ERR2["eofInElementThatCanContainOnlyText"] = "eof-in-element-that-can-contain-only-text";
|
||
})(ERR = ERR || (ERR = {}));
|
||
|
||
// node_modules/parse5/dist/tokenizer/preprocessor.js
|
||
var DEFAULT_BUFFER_WATERLINE = 1 << 16;
|
||
var Preprocessor = class {
|
||
constructor(handler) {
|
||
this.handler = handler;
|
||
this.html = "";
|
||
this.pos = -1;
|
||
this.lastGapPos = -2;
|
||
this.gapStack = [];
|
||
this.skipNextNewLine = false;
|
||
this.lastChunkWritten = false;
|
||
this.endOfChunkHit = false;
|
||
this.bufferWaterline = DEFAULT_BUFFER_WATERLINE;
|
||
this.isEol = false;
|
||
this.lineStartPos = 0;
|
||
this.droppedBufferSize = 0;
|
||
this.line = 1;
|
||
this.lastErrOffset = -1;
|
||
}
|
||
/** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */
|
||
get col() {
|
||
return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);
|
||
}
|
||
get offset() {
|
||
return this.droppedBufferSize + this.pos;
|
||
}
|
||
getError(code2) {
|
||
const { line, col, offset } = this;
|
||
return {
|
||
code: code2,
|
||
startLine: line,
|
||
endLine: line,
|
||
startCol: col,
|
||
endCol: col,
|
||
startOffset: offset,
|
||
endOffset: offset
|
||
};
|
||
}
|
||
_err(code2) {
|
||
if (this.handler.onParseError && this.lastErrOffset !== this.offset) {
|
||
this.lastErrOffset = this.offset;
|
||
this.handler.onParseError(this.getError(code2));
|
||
}
|
||
}
|
||
_addGap() {
|
||
this.gapStack.push(this.lastGapPos);
|
||
this.lastGapPos = this.pos;
|
||
}
|
||
_processSurrogate(cp) {
|
||
if (this.pos !== this.html.length - 1) {
|
||
const nextCp = this.html.charCodeAt(this.pos + 1);
|
||
if (isSurrogatePair(nextCp)) {
|
||
this.pos++;
|
||
this._addGap();
|
||
return getSurrogatePairCodePoint(cp, nextCp);
|
||
}
|
||
} else if (!this.lastChunkWritten) {
|
||
this.endOfChunkHit = true;
|
||
return CODE_POINTS.EOF;
|
||
}
|
||
this._err(ERR.surrogateInInputStream);
|
||
return cp;
|
||
}
|
||
willDropParsedChunk() {
|
||
return this.pos > this.bufferWaterline;
|
||
}
|
||
dropParsedChunk() {
|
||
if (this.willDropParsedChunk()) {
|
||
this.html = this.html.substring(this.pos);
|
||
this.lineStartPos -= this.pos;
|
||
this.droppedBufferSize += this.pos;
|
||
this.pos = 0;
|
||
this.lastGapPos = -2;
|
||
this.gapStack.length = 0;
|
||
}
|
||
}
|
||
write(chunk, isLastChunk) {
|
||
if (this.html.length > 0) {
|
||
this.html += chunk;
|
||
} else {
|
||
this.html = chunk;
|
||
}
|
||
this.endOfChunkHit = false;
|
||
this.lastChunkWritten = isLastChunk;
|
||
}
|
||
insertHtmlAtCurrentPos(chunk) {
|
||
this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1);
|
||
this.endOfChunkHit = false;
|
||
}
|
||
startsWith(pattern, caseSensitive) {
|
||
if (this.pos + pattern.length > this.html.length) {
|
||
this.endOfChunkHit = !this.lastChunkWritten;
|
||
return false;
|
||
}
|
||
if (caseSensitive) {
|
||
return this.html.startsWith(pattern, this.pos);
|
||
}
|
||
for (let i = 0; i < pattern.length; i++) {
|
||
const cp = this.html.charCodeAt(this.pos + i) | 32;
|
||
if (cp !== pattern.charCodeAt(i)) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
peek(offset) {
|
||
const pos = this.pos + offset;
|
||
if (pos >= this.html.length) {
|
||
this.endOfChunkHit = !this.lastChunkWritten;
|
||
return CODE_POINTS.EOF;
|
||
}
|
||
const code2 = this.html.charCodeAt(pos);
|
||
return code2 === CODE_POINTS.CARRIAGE_RETURN ? CODE_POINTS.LINE_FEED : code2;
|
||
}
|
||
advance() {
|
||
this.pos++;
|
||
if (this.isEol) {
|
||
this.isEol = false;
|
||
this.line++;
|
||
this.lineStartPos = this.pos;
|
||
}
|
||
if (this.pos >= this.html.length) {
|
||
this.endOfChunkHit = !this.lastChunkWritten;
|
||
return CODE_POINTS.EOF;
|
||
}
|
||
let cp = this.html.charCodeAt(this.pos);
|
||
if (cp === CODE_POINTS.CARRIAGE_RETURN) {
|
||
this.isEol = true;
|
||
this.skipNextNewLine = true;
|
||
return CODE_POINTS.LINE_FEED;
|
||
}
|
||
if (cp === CODE_POINTS.LINE_FEED) {
|
||
this.isEol = true;
|
||
if (this.skipNextNewLine) {
|
||
this.line--;
|
||
this.skipNextNewLine = false;
|
||
this._addGap();
|
||
return this.advance();
|
||
}
|
||
}
|
||
this.skipNextNewLine = false;
|
||
if (isSurrogate(cp)) {
|
||
cp = this._processSurrogate(cp);
|
||
}
|
||
const isCommonValidRange = this.handler.onParseError === null || cp > 31 && cp < 127 || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.CARRIAGE_RETURN || cp > 159 && cp < 64976;
|
||
if (!isCommonValidRange) {
|
||
this._checkForProblematicCharacters(cp);
|
||
}
|
||
return cp;
|
||
}
|
||
_checkForProblematicCharacters(cp) {
|
||
if (isControlCodePoint(cp)) {
|
||
this._err(ERR.controlCharacterInInputStream);
|
||
} else if (isUndefinedCodePoint(cp)) {
|
||
this._err(ERR.noncharacterInInputStream);
|
||
}
|
||
}
|
||
retreat(count) {
|
||
this.pos -= count;
|
||
while (this.pos < this.lastGapPos) {
|
||
this.lastGapPos = this.gapStack.pop();
|
||
this.pos--;
|
||
}
|
||
this.isEol = false;
|
||
}
|
||
};
|
||
|
||
// node_modules/parse5/dist/common/token.js
|
||
var TokenType;
|
||
(function(TokenType2) {
|
||
TokenType2[TokenType2["CHARACTER"] = 0] = "CHARACTER";
|
||
TokenType2[TokenType2["NULL_CHARACTER"] = 1] = "NULL_CHARACTER";
|
||
TokenType2[TokenType2["WHITESPACE_CHARACTER"] = 2] = "WHITESPACE_CHARACTER";
|
||
TokenType2[TokenType2["START_TAG"] = 3] = "START_TAG";
|
||
TokenType2[TokenType2["END_TAG"] = 4] = "END_TAG";
|
||
TokenType2[TokenType2["COMMENT"] = 5] = "COMMENT";
|
||
TokenType2[TokenType2["DOCTYPE"] = 6] = "DOCTYPE";
|
||
TokenType2[TokenType2["EOF"] = 7] = "EOF";
|
||
TokenType2[TokenType2["HIBERNATION"] = 8] = "HIBERNATION";
|
||
})(TokenType = TokenType || (TokenType = {}));
|
||
function getTokenAttr(token, attrName) {
|
||
for (let i = token.attrs.length - 1; i >= 0; i--) {
|
||
if (token.attrs[i].name === attrName) {
|
||
return token.attrs[i].value;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
// node_modules/entities/lib/esm/generated/decode-data-html.js
|
||
var decode_data_html_default = new Uint16Array(
|
||
// prettier-ignore
|
||
'\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map((c) => c.charCodeAt(0))
|
||
);
|
||
|
||
// node_modules/entities/lib/esm/generated/decode-data-xml.js
|
||
var decode_data_xml_default = new Uint16Array(
|
||
// prettier-ignore
|
||
"\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map((c) => c.charCodeAt(0))
|
||
);
|
||
|
||
// node_modules/entities/lib/esm/decode_codepoint.js
|
||
var _a;
|
||
var decodeMap = /* @__PURE__ */ new Map([
|
||
[0, 65533],
|
||
[128, 8364],
|
||
[130, 8218],
|
||
[131, 402],
|
||
[132, 8222],
|
||
[133, 8230],
|
||
[134, 8224],
|
||
[135, 8225],
|
||
[136, 710],
|
||
[137, 8240],
|
||
[138, 352],
|
||
[139, 8249],
|
||
[140, 338],
|
||
[142, 381],
|
||
[145, 8216],
|
||
[146, 8217],
|
||
[147, 8220],
|
||
[148, 8221],
|
||
[149, 8226],
|
||
[150, 8211],
|
||
[151, 8212],
|
||
[152, 732],
|
||
[153, 8482],
|
||
[154, 353],
|
||
[155, 8250],
|
||
[156, 339],
|
||
[158, 382],
|
||
[159, 376]
|
||
]);
|
||
var fromCodePoint = (
|
||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
|
||
(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function(codePoint) {
|
||
let output = "";
|
||
if (codePoint > 65535) {
|
||
codePoint -= 65536;
|
||
output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296);
|
||
codePoint = 56320 | codePoint & 1023;
|
||
}
|
||
output += String.fromCharCode(codePoint);
|
||
return output;
|
||
}
|
||
);
|
||
function replaceCodePoint(codePoint) {
|
||
var _a2;
|
||
if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
|
||
return 65533;
|
||
}
|
||
return (_a2 = decodeMap.get(codePoint)) !== null && _a2 !== void 0 ? _a2 : codePoint;
|
||
}
|
||
function decodeCodePoint(codePoint) {
|
||
return fromCodePoint(replaceCodePoint(codePoint));
|
||
}
|
||
|
||
// node_modules/entities/lib/esm/decode.js
|
||
var CharCodes;
|
||
(function(CharCodes2) {
|
||
CharCodes2[CharCodes2["NUM"] = 35] = "NUM";
|
||
CharCodes2[CharCodes2["SEMI"] = 59] = "SEMI";
|
||
CharCodes2[CharCodes2["ZERO"] = 48] = "ZERO";
|
||
CharCodes2[CharCodes2["NINE"] = 57] = "NINE";
|
||
CharCodes2[CharCodes2["LOWER_A"] = 97] = "LOWER_A";
|
||
CharCodes2[CharCodes2["LOWER_F"] = 102] = "LOWER_F";
|
||
CharCodes2[CharCodes2["LOWER_X"] = 120] = "LOWER_X";
|
||
CharCodes2[CharCodes2["To_LOWER_BIT"] = 32] = "To_LOWER_BIT";
|
||
})(CharCodes || (CharCodes = {}));
|
||
var BinTrieFlags;
|
||
(function(BinTrieFlags2) {
|
||
BinTrieFlags2[BinTrieFlags2["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
|
||
BinTrieFlags2[BinTrieFlags2["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
|
||
BinTrieFlags2[BinTrieFlags2["JUMP_TABLE"] = 127] = "JUMP_TABLE";
|
||
})(BinTrieFlags || (BinTrieFlags = {}));
|
||
function getDecoder(decodeTree) {
|
||
return function decodeHTMLBinary(str, strict) {
|
||
let ret = "";
|
||
let lastIdx = 0;
|
||
let strIdx = 0;
|
||
while ((strIdx = str.indexOf("&", strIdx)) >= 0) {
|
||
ret += str.slice(lastIdx, strIdx);
|
||
lastIdx = strIdx;
|
||
strIdx += 1;
|
||
if (str.charCodeAt(strIdx) === CharCodes.NUM) {
|
||
let start = strIdx + 1;
|
||
let base = 10;
|
||
let cp = str.charCodeAt(start);
|
||
if ((cp | CharCodes.To_LOWER_BIT) === CharCodes.LOWER_X) {
|
||
base = 16;
|
||
strIdx += 1;
|
||
start += 1;
|
||
}
|
||
do
|
||
cp = str.charCodeAt(++strIdx);
|
||
while (cp >= CharCodes.ZERO && cp <= CharCodes.NINE || base === 16 && (cp | CharCodes.To_LOWER_BIT) >= CharCodes.LOWER_A && (cp | CharCodes.To_LOWER_BIT) <= CharCodes.LOWER_F);
|
||
if (start !== strIdx) {
|
||
const entity = str.substring(start, strIdx);
|
||
const parsed = parseInt(entity, base);
|
||
if (str.charCodeAt(strIdx) === CharCodes.SEMI) {
|
||
strIdx += 1;
|
||
} else if (strict) {
|
||
continue;
|
||
}
|
||
ret += decodeCodePoint(parsed);
|
||
lastIdx = strIdx;
|
||
}
|
||
continue;
|
||
}
|
||
let resultIdx = 0;
|
||
let excess = 1;
|
||
let treeIdx = 0;
|
||
let current = decodeTree[treeIdx];
|
||
for (; strIdx < str.length; strIdx++, excess++) {
|
||
treeIdx = determineBranch(decodeTree, current, treeIdx + 1, str.charCodeAt(strIdx));
|
||
if (treeIdx < 0)
|
||
break;
|
||
current = decodeTree[treeIdx];
|
||
const masked = current & BinTrieFlags.VALUE_LENGTH;
|
||
if (masked) {
|
||
if (!strict || str.charCodeAt(strIdx) === CharCodes.SEMI) {
|
||
resultIdx = treeIdx;
|
||
excess = 0;
|
||
}
|
||
const valueLength = (masked >> 14) - 1;
|
||
if (valueLength === 0)
|
||
break;
|
||
treeIdx += valueLength;
|
||
}
|
||
}
|
||
if (resultIdx !== 0) {
|
||
const valueLength = (decodeTree[resultIdx] & BinTrieFlags.VALUE_LENGTH) >> 14;
|
||
ret += valueLength === 1 ? String.fromCharCode(decodeTree[resultIdx] & ~BinTrieFlags.VALUE_LENGTH) : valueLength === 2 ? String.fromCharCode(decodeTree[resultIdx + 1]) : String.fromCharCode(decodeTree[resultIdx + 1], decodeTree[resultIdx + 2]);
|
||
lastIdx = strIdx - excess + 1;
|
||
}
|
||
}
|
||
return ret + str.slice(lastIdx);
|
||
};
|
||
}
|
||
function determineBranch(decodeTree, current, nodeIdx, char) {
|
||
const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
|
||
const jumpOffset = current & BinTrieFlags.JUMP_TABLE;
|
||
if (branchCount === 0) {
|
||
return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;
|
||
}
|
||
if (jumpOffset) {
|
||
const value = char - jumpOffset;
|
||
return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
|
||
}
|
||
let lo = nodeIdx;
|
||
let hi = lo + branchCount - 1;
|
||
while (lo <= hi) {
|
||
const mid = lo + hi >>> 1;
|
||
const midVal = decodeTree[mid];
|
||
if (midVal < char) {
|
||
lo = mid + 1;
|
||
} else if (midVal > char) {
|
||
hi = mid - 1;
|
||
} else {
|
||
return decodeTree[mid + branchCount];
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
var htmlDecoder = getDecoder(decode_data_html_default);
|
||
var xmlDecoder = getDecoder(decode_data_xml_default);
|
||
|
||
// node_modules/parse5/dist/common/html.js
|
||
var NS;
|
||
(function(NS2) {
|
||
NS2["HTML"] = "http://www.w3.org/1999/xhtml";
|
||
NS2["MATHML"] = "http://www.w3.org/1998/Math/MathML";
|
||
NS2["SVG"] = "http://www.w3.org/2000/svg";
|
||
NS2["XLINK"] = "http://www.w3.org/1999/xlink";
|
||
NS2["XML"] = "http://www.w3.org/XML/1998/namespace";
|
||
NS2["XMLNS"] = "http://www.w3.org/2000/xmlns/";
|
||
})(NS = NS || (NS = {}));
|
||
var ATTRS;
|
||
(function(ATTRS2) {
|
||
ATTRS2["TYPE"] = "type";
|
||
ATTRS2["ACTION"] = "action";
|
||
ATTRS2["ENCODING"] = "encoding";
|
||
ATTRS2["PROMPT"] = "prompt";
|
||
ATTRS2["NAME"] = "name";
|
||
ATTRS2["COLOR"] = "color";
|
||
ATTRS2["FACE"] = "face";
|
||
ATTRS2["SIZE"] = "size";
|
||
})(ATTRS = ATTRS || (ATTRS = {}));
|
||
var DOCUMENT_MODE;
|
||
(function(DOCUMENT_MODE2) {
|
||
DOCUMENT_MODE2["NO_QUIRKS"] = "no-quirks";
|
||
DOCUMENT_MODE2["QUIRKS"] = "quirks";
|
||
DOCUMENT_MODE2["LIMITED_QUIRKS"] = "limited-quirks";
|
||
})(DOCUMENT_MODE = DOCUMENT_MODE || (DOCUMENT_MODE = {}));
|
||
var TAG_NAMES;
|
||
(function(TAG_NAMES2) {
|
||
TAG_NAMES2["A"] = "a";
|
||
TAG_NAMES2["ADDRESS"] = "address";
|
||
TAG_NAMES2["ANNOTATION_XML"] = "annotation-xml";
|
||
TAG_NAMES2["APPLET"] = "applet";
|
||
TAG_NAMES2["AREA"] = "area";
|
||
TAG_NAMES2["ARTICLE"] = "article";
|
||
TAG_NAMES2["ASIDE"] = "aside";
|
||
TAG_NAMES2["B"] = "b";
|
||
TAG_NAMES2["BASE"] = "base";
|
||
TAG_NAMES2["BASEFONT"] = "basefont";
|
||
TAG_NAMES2["BGSOUND"] = "bgsound";
|
||
TAG_NAMES2["BIG"] = "big";
|
||
TAG_NAMES2["BLOCKQUOTE"] = "blockquote";
|
||
TAG_NAMES2["BODY"] = "body";
|
||
TAG_NAMES2["BR"] = "br";
|
||
TAG_NAMES2["BUTTON"] = "button";
|
||
TAG_NAMES2["CAPTION"] = "caption";
|
||
TAG_NAMES2["CENTER"] = "center";
|
||
TAG_NAMES2["CODE"] = "code";
|
||
TAG_NAMES2["COL"] = "col";
|
||
TAG_NAMES2["COLGROUP"] = "colgroup";
|
||
TAG_NAMES2["DD"] = "dd";
|
||
TAG_NAMES2["DESC"] = "desc";
|
||
TAG_NAMES2["DETAILS"] = "details";
|
||
TAG_NAMES2["DIALOG"] = "dialog";
|
||
TAG_NAMES2["DIR"] = "dir";
|
||
TAG_NAMES2["DIV"] = "div";
|
||
TAG_NAMES2["DL"] = "dl";
|
||
TAG_NAMES2["DT"] = "dt";
|
||
TAG_NAMES2["EM"] = "em";
|
||
TAG_NAMES2["EMBED"] = "embed";
|
||
TAG_NAMES2["FIELDSET"] = "fieldset";
|
||
TAG_NAMES2["FIGCAPTION"] = "figcaption";
|
||
TAG_NAMES2["FIGURE"] = "figure";
|
||
TAG_NAMES2["FONT"] = "font";
|
||
TAG_NAMES2["FOOTER"] = "footer";
|
||
TAG_NAMES2["FOREIGN_OBJECT"] = "foreignObject";
|
||
TAG_NAMES2["FORM"] = "form";
|
||
TAG_NAMES2["FRAME"] = "frame";
|
||
TAG_NAMES2["FRAMESET"] = "frameset";
|
||
TAG_NAMES2["H1"] = "h1";
|
||
TAG_NAMES2["H2"] = "h2";
|
||
TAG_NAMES2["H3"] = "h3";
|
||
TAG_NAMES2["H4"] = "h4";
|
||
TAG_NAMES2["H5"] = "h5";
|
||
TAG_NAMES2["H6"] = "h6";
|
||
TAG_NAMES2["HEAD"] = "head";
|
||
TAG_NAMES2["HEADER"] = "header";
|
||
TAG_NAMES2["HGROUP"] = "hgroup";
|
||
TAG_NAMES2["HR"] = "hr";
|
||
TAG_NAMES2["HTML"] = "html";
|
||
TAG_NAMES2["I"] = "i";
|
||
TAG_NAMES2["IMG"] = "img";
|
||
TAG_NAMES2["IMAGE"] = "image";
|
||
TAG_NAMES2["INPUT"] = "input";
|
||
TAG_NAMES2["IFRAME"] = "iframe";
|
||
TAG_NAMES2["KEYGEN"] = "keygen";
|
||
TAG_NAMES2["LABEL"] = "label";
|
||
TAG_NAMES2["LI"] = "li";
|
||
TAG_NAMES2["LINK"] = "link";
|
||
TAG_NAMES2["LISTING"] = "listing";
|
||
TAG_NAMES2["MAIN"] = "main";
|
||
TAG_NAMES2["MALIGNMARK"] = "malignmark";
|
||
TAG_NAMES2["MARQUEE"] = "marquee";
|
||
TAG_NAMES2["MATH"] = "math";
|
||
TAG_NAMES2["MENU"] = "menu";
|
||
TAG_NAMES2["META"] = "meta";
|
||
TAG_NAMES2["MGLYPH"] = "mglyph";
|
||
TAG_NAMES2["MI"] = "mi";
|
||
TAG_NAMES2["MO"] = "mo";
|
||
TAG_NAMES2["MN"] = "mn";
|
||
TAG_NAMES2["MS"] = "ms";
|
||
TAG_NAMES2["MTEXT"] = "mtext";
|
||
TAG_NAMES2["NAV"] = "nav";
|
||
TAG_NAMES2["NOBR"] = "nobr";
|
||
TAG_NAMES2["NOFRAMES"] = "noframes";
|
||
TAG_NAMES2["NOEMBED"] = "noembed";
|
||
TAG_NAMES2["NOSCRIPT"] = "noscript";
|
||
TAG_NAMES2["OBJECT"] = "object";
|
||
TAG_NAMES2["OL"] = "ol";
|
||
TAG_NAMES2["OPTGROUP"] = "optgroup";
|
||
TAG_NAMES2["OPTION"] = "option";
|
||
TAG_NAMES2["P"] = "p";
|
||
TAG_NAMES2["PARAM"] = "param";
|
||
TAG_NAMES2["PLAINTEXT"] = "plaintext";
|
||
TAG_NAMES2["PRE"] = "pre";
|
||
TAG_NAMES2["RB"] = "rb";
|
||
TAG_NAMES2["RP"] = "rp";
|
||
TAG_NAMES2["RT"] = "rt";
|
||
TAG_NAMES2["RTC"] = "rtc";
|
||
TAG_NAMES2["RUBY"] = "ruby";
|
||
TAG_NAMES2["S"] = "s";
|
||
TAG_NAMES2["SCRIPT"] = "script";
|
||
TAG_NAMES2["SECTION"] = "section";
|
||
TAG_NAMES2["SELECT"] = "select";
|
||
TAG_NAMES2["SOURCE"] = "source";
|
||
TAG_NAMES2["SMALL"] = "small";
|
||
TAG_NAMES2["SPAN"] = "span";
|
||
TAG_NAMES2["STRIKE"] = "strike";
|
||
TAG_NAMES2["STRONG"] = "strong";
|
||
TAG_NAMES2["STYLE"] = "style";
|
||
TAG_NAMES2["SUB"] = "sub";
|
||
TAG_NAMES2["SUMMARY"] = "summary";
|
||
TAG_NAMES2["SUP"] = "sup";
|
||
TAG_NAMES2["TABLE"] = "table";
|
||
TAG_NAMES2["TBODY"] = "tbody";
|
||
TAG_NAMES2["TEMPLATE"] = "template";
|
||
TAG_NAMES2["TEXTAREA"] = "textarea";
|
||
TAG_NAMES2["TFOOT"] = "tfoot";
|
||
TAG_NAMES2["TD"] = "td";
|
||
TAG_NAMES2["TH"] = "th";
|
||
TAG_NAMES2["THEAD"] = "thead";
|
||
TAG_NAMES2["TITLE"] = "title";
|
||
TAG_NAMES2["TR"] = "tr";
|
||
TAG_NAMES2["TRACK"] = "track";
|
||
TAG_NAMES2["TT"] = "tt";
|
||
TAG_NAMES2["U"] = "u";
|
||
TAG_NAMES2["UL"] = "ul";
|
||
TAG_NAMES2["SVG"] = "svg";
|
||
TAG_NAMES2["VAR"] = "var";
|
||
TAG_NAMES2["WBR"] = "wbr";
|
||
TAG_NAMES2["XMP"] = "xmp";
|
||
})(TAG_NAMES = TAG_NAMES || (TAG_NAMES = {}));
|
||
var TAG_ID;
|
||
(function(TAG_ID2) {
|
||
TAG_ID2[TAG_ID2["UNKNOWN"] = 0] = "UNKNOWN";
|
||
TAG_ID2[TAG_ID2["A"] = 1] = "A";
|
||
TAG_ID2[TAG_ID2["ADDRESS"] = 2] = "ADDRESS";
|
||
TAG_ID2[TAG_ID2["ANNOTATION_XML"] = 3] = "ANNOTATION_XML";
|
||
TAG_ID2[TAG_ID2["APPLET"] = 4] = "APPLET";
|
||
TAG_ID2[TAG_ID2["AREA"] = 5] = "AREA";
|
||
TAG_ID2[TAG_ID2["ARTICLE"] = 6] = "ARTICLE";
|
||
TAG_ID2[TAG_ID2["ASIDE"] = 7] = "ASIDE";
|
||
TAG_ID2[TAG_ID2["B"] = 8] = "B";
|
||
TAG_ID2[TAG_ID2["BASE"] = 9] = "BASE";
|
||
TAG_ID2[TAG_ID2["BASEFONT"] = 10] = "BASEFONT";
|
||
TAG_ID2[TAG_ID2["BGSOUND"] = 11] = "BGSOUND";
|
||
TAG_ID2[TAG_ID2["BIG"] = 12] = "BIG";
|
||
TAG_ID2[TAG_ID2["BLOCKQUOTE"] = 13] = "BLOCKQUOTE";
|
||
TAG_ID2[TAG_ID2["BODY"] = 14] = "BODY";
|
||
TAG_ID2[TAG_ID2["BR"] = 15] = "BR";
|
||
TAG_ID2[TAG_ID2["BUTTON"] = 16] = "BUTTON";
|
||
TAG_ID2[TAG_ID2["CAPTION"] = 17] = "CAPTION";
|
||
TAG_ID2[TAG_ID2["CENTER"] = 18] = "CENTER";
|
||
TAG_ID2[TAG_ID2["CODE"] = 19] = "CODE";
|
||
TAG_ID2[TAG_ID2["COL"] = 20] = "COL";
|
||
TAG_ID2[TAG_ID2["COLGROUP"] = 21] = "COLGROUP";
|
||
TAG_ID2[TAG_ID2["DD"] = 22] = "DD";
|
||
TAG_ID2[TAG_ID2["DESC"] = 23] = "DESC";
|
||
TAG_ID2[TAG_ID2["DETAILS"] = 24] = "DETAILS";
|
||
TAG_ID2[TAG_ID2["DIALOG"] = 25] = "DIALOG";
|
||
TAG_ID2[TAG_ID2["DIR"] = 26] = "DIR";
|
||
TAG_ID2[TAG_ID2["DIV"] = 27] = "DIV";
|
||
TAG_ID2[TAG_ID2["DL"] = 28] = "DL";
|
||
TAG_ID2[TAG_ID2["DT"] = 29] = "DT";
|
||
TAG_ID2[TAG_ID2["EM"] = 30] = "EM";
|
||
TAG_ID2[TAG_ID2["EMBED"] = 31] = "EMBED";
|
||
TAG_ID2[TAG_ID2["FIELDSET"] = 32] = "FIELDSET";
|
||
TAG_ID2[TAG_ID2["FIGCAPTION"] = 33] = "FIGCAPTION";
|
||
TAG_ID2[TAG_ID2["FIGURE"] = 34] = "FIGURE";
|
||
TAG_ID2[TAG_ID2["FONT"] = 35] = "FONT";
|
||
TAG_ID2[TAG_ID2["FOOTER"] = 36] = "FOOTER";
|
||
TAG_ID2[TAG_ID2["FOREIGN_OBJECT"] = 37] = "FOREIGN_OBJECT";
|
||
TAG_ID2[TAG_ID2["FORM"] = 38] = "FORM";
|
||
TAG_ID2[TAG_ID2["FRAME"] = 39] = "FRAME";
|
||
TAG_ID2[TAG_ID2["FRAMESET"] = 40] = "FRAMESET";
|
||
TAG_ID2[TAG_ID2["H1"] = 41] = "H1";
|
||
TAG_ID2[TAG_ID2["H2"] = 42] = "H2";
|
||
TAG_ID2[TAG_ID2["H3"] = 43] = "H3";
|
||
TAG_ID2[TAG_ID2["H4"] = 44] = "H4";
|
||
TAG_ID2[TAG_ID2["H5"] = 45] = "H5";
|
||
TAG_ID2[TAG_ID2["H6"] = 46] = "H6";
|
||
TAG_ID2[TAG_ID2["HEAD"] = 47] = "HEAD";
|
||
TAG_ID2[TAG_ID2["HEADER"] = 48] = "HEADER";
|
||
TAG_ID2[TAG_ID2["HGROUP"] = 49] = "HGROUP";
|
||
TAG_ID2[TAG_ID2["HR"] = 50] = "HR";
|
||
TAG_ID2[TAG_ID2["HTML"] = 51] = "HTML";
|
||
TAG_ID2[TAG_ID2["I"] = 52] = "I";
|
||
TAG_ID2[TAG_ID2["IMG"] = 53] = "IMG";
|
||
TAG_ID2[TAG_ID2["IMAGE"] = 54] = "IMAGE";
|
||
TAG_ID2[TAG_ID2["INPUT"] = 55] = "INPUT";
|
||
TAG_ID2[TAG_ID2["IFRAME"] = 56] = "IFRAME";
|
||
TAG_ID2[TAG_ID2["KEYGEN"] = 57] = "KEYGEN";
|
||
TAG_ID2[TAG_ID2["LABEL"] = 58] = "LABEL";
|
||
TAG_ID2[TAG_ID2["LI"] = 59] = "LI";
|
||
TAG_ID2[TAG_ID2["LINK"] = 60] = "LINK";
|
||
TAG_ID2[TAG_ID2["LISTING"] = 61] = "LISTING";
|
||
TAG_ID2[TAG_ID2["MAIN"] = 62] = "MAIN";
|
||
TAG_ID2[TAG_ID2["MALIGNMARK"] = 63] = "MALIGNMARK";
|
||
TAG_ID2[TAG_ID2["MARQUEE"] = 64] = "MARQUEE";
|
||
TAG_ID2[TAG_ID2["MATH"] = 65] = "MATH";
|
||
TAG_ID2[TAG_ID2["MENU"] = 66] = "MENU";
|
||
TAG_ID2[TAG_ID2["META"] = 67] = "META";
|
||
TAG_ID2[TAG_ID2["MGLYPH"] = 68] = "MGLYPH";
|
||
TAG_ID2[TAG_ID2["MI"] = 69] = "MI";
|
||
TAG_ID2[TAG_ID2["MO"] = 70] = "MO";
|
||
TAG_ID2[TAG_ID2["MN"] = 71] = "MN";
|
||
TAG_ID2[TAG_ID2["MS"] = 72] = "MS";
|
||
TAG_ID2[TAG_ID2["MTEXT"] = 73] = "MTEXT";
|
||
TAG_ID2[TAG_ID2["NAV"] = 74] = "NAV";
|
||
TAG_ID2[TAG_ID2["NOBR"] = 75] = "NOBR";
|
||
TAG_ID2[TAG_ID2["NOFRAMES"] = 76] = "NOFRAMES";
|
||
TAG_ID2[TAG_ID2["NOEMBED"] = 77] = "NOEMBED";
|
||
TAG_ID2[TAG_ID2["NOSCRIPT"] = 78] = "NOSCRIPT";
|
||
TAG_ID2[TAG_ID2["OBJECT"] = 79] = "OBJECT";
|
||
TAG_ID2[TAG_ID2["OL"] = 80] = "OL";
|
||
TAG_ID2[TAG_ID2["OPTGROUP"] = 81] = "OPTGROUP";
|
||
TAG_ID2[TAG_ID2["OPTION"] = 82] = "OPTION";
|
||
TAG_ID2[TAG_ID2["P"] = 83] = "P";
|
||
TAG_ID2[TAG_ID2["PARAM"] = 84] = "PARAM";
|
||
TAG_ID2[TAG_ID2["PLAINTEXT"] = 85] = "PLAINTEXT";
|
||
TAG_ID2[TAG_ID2["PRE"] = 86] = "PRE";
|
||
TAG_ID2[TAG_ID2["RB"] = 87] = "RB";
|
||
TAG_ID2[TAG_ID2["RP"] = 88] = "RP";
|
||
TAG_ID2[TAG_ID2["RT"] = 89] = "RT";
|
||
TAG_ID2[TAG_ID2["RTC"] = 90] = "RTC";
|
||
TAG_ID2[TAG_ID2["RUBY"] = 91] = "RUBY";
|
||
TAG_ID2[TAG_ID2["S"] = 92] = "S";
|
||
TAG_ID2[TAG_ID2["SCRIPT"] = 93] = "SCRIPT";
|
||
TAG_ID2[TAG_ID2["SECTION"] = 94] = "SECTION";
|
||
TAG_ID2[TAG_ID2["SELECT"] = 95] = "SELECT";
|
||
TAG_ID2[TAG_ID2["SOURCE"] = 96] = "SOURCE";
|
||
TAG_ID2[TAG_ID2["SMALL"] = 97] = "SMALL";
|
||
TAG_ID2[TAG_ID2["SPAN"] = 98] = "SPAN";
|
||
TAG_ID2[TAG_ID2["STRIKE"] = 99] = "STRIKE";
|
||
TAG_ID2[TAG_ID2["STRONG"] = 100] = "STRONG";
|
||
TAG_ID2[TAG_ID2["STYLE"] = 101] = "STYLE";
|
||
TAG_ID2[TAG_ID2["SUB"] = 102] = "SUB";
|
||
TAG_ID2[TAG_ID2["SUMMARY"] = 103] = "SUMMARY";
|
||
TAG_ID2[TAG_ID2["SUP"] = 104] = "SUP";
|
||
TAG_ID2[TAG_ID2["TABLE"] = 105] = "TABLE";
|
||
TAG_ID2[TAG_ID2["TBODY"] = 106] = "TBODY";
|
||
TAG_ID2[TAG_ID2["TEMPLATE"] = 107] = "TEMPLATE";
|
||
TAG_ID2[TAG_ID2["TEXTAREA"] = 108] = "TEXTAREA";
|
||
TAG_ID2[TAG_ID2["TFOOT"] = 109] = "TFOOT";
|
||
TAG_ID2[TAG_ID2["TD"] = 110] = "TD";
|
||
TAG_ID2[TAG_ID2["TH"] = 111] = "TH";
|
||
TAG_ID2[TAG_ID2["THEAD"] = 112] = "THEAD";
|
||
TAG_ID2[TAG_ID2["TITLE"] = 113] = "TITLE";
|
||
TAG_ID2[TAG_ID2["TR"] = 114] = "TR";
|
||
TAG_ID2[TAG_ID2["TRACK"] = 115] = "TRACK";
|
||
TAG_ID2[TAG_ID2["TT"] = 116] = "TT";
|
||
TAG_ID2[TAG_ID2["U"] = 117] = "U";
|
||
TAG_ID2[TAG_ID2["UL"] = 118] = "UL";
|
||
TAG_ID2[TAG_ID2["SVG"] = 119] = "SVG";
|
||
TAG_ID2[TAG_ID2["VAR"] = 120] = "VAR";
|
||
TAG_ID2[TAG_ID2["WBR"] = 121] = "WBR";
|
||
TAG_ID2[TAG_ID2["XMP"] = 122] = "XMP";
|
||
})(TAG_ID = TAG_ID || (TAG_ID = {}));
|
||
var TAG_NAME_TO_ID = /* @__PURE__ */ new Map([
|
||
[TAG_NAMES.A, TAG_ID.A],
|
||
[TAG_NAMES.ADDRESS, TAG_ID.ADDRESS],
|
||
[TAG_NAMES.ANNOTATION_XML, TAG_ID.ANNOTATION_XML],
|
||
[TAG_NAMES.APPLET, TAG_ID.APPLET],
|
||
[TAG_NAMES.AREA, TAG_ID.AREA],
|
||
[TAG_NAMES.ARTICLE, TAG_ID.ARTICLE],
|
||
[TAG_NAMES.ASIDE, TAG_ID.ASIDE],
|
||
[TAG_NAMES.B, TAG_ID.B],
|
||
[TAG_NAMES.BASE, TAG_ID.BASE],
|
||
[TAG_NAMES.BASEFONT, TAG_ID.BASEFONT],
|
||
[TAG_NAMES.BGSOUND, TAG_ID.BGSOUND],
|
||
[TAG_NAMES.BIG, TAG_ID.BIG],
|
||
[TAG_NAMES.BLOCKQUOTE, TAG_ID.BLOCKQUOTE],
|
||
[TAG_NAMES.BODY, TAG_ID.BODY],
|
||
[TAG_NAMES.BR, TAG_ID.BR],
|
||
[TAG_NAMES.BUTTON, TAG_ID.BUTTON],
|
||
[TAG_NAMES.CAPTION, TAG_ID.CAPTION],
|
||
[TAG_NAMES.CENTER, TAG_ID.CENTER],
|
||
[TAG_NAMES.CODE, TAG_ID.CODE],
|
||
[TAG_NAMES.COL, TAG_ID.COL],
|
||
[TAG_NAMES.COLGROUP, TAG_ID.COLGROUP],
|
||
[TAG_NAMES.DD, TAG_ID.DD],
|
||
[TAG_NAMES.DESC, TAG_ID.DESC],
|
||
[TAG_NAMES.DETAILS, TAG_ID.DETAILS],
|
||
[TAG_NAMES.DIALOG, TAG_ID.DIALOG],
|
||
[TAG_NAMES.DIR, TAG_ID.DIR],
|
||
[TAG_NAMES.DIV, TAG_ID.DIV],
|
||
[TAG_NAMES.DL, TAG_ID.DL],
|
||
[TAG_NAMES.DT, TAG_ID.DT],
|
||
[TAG_NAMES.EM, TAG_ID.EM],
|
||
[TAG_NAMES.EMBED, TAG_ID.EMBED],
|
||
[TAG_NAMES.FIELDSET, TAG_ID.FIELDSET],
|
||
[TAG_NAMES.FIGCAPTION, TAG_ID.FIGCAPTION],
|
||
[TAG_NAMES.FIGURE, TAG_ID.FIGURE],
|
||
[TAG_NAMES.FONT, TAG_ID.FONT],
|
||
[TAG_NAMES.FOOTER, TAG_ID.FOOTER],
|
||
[TAG_NAMES.FOREIGN_OBJECT, TAG_ID.FOREIGN_OBJECT],
|
||
[TAG_NAMES.FORM, TAG_ID.FORM],
|
||
[TAG_NAMES.FRAME, TAG_ID.FRAME],
|
||
[TAG_NAMES.FRAMESET, TAG_ID.FRAMESET],
|
||
[TAG_NAMES.H1, TAG_ID.H1],
|
||
[TAG_NAMES.H2, TAG_ID.H2],
|
||
[TAG_NAMES.H3, TAG_ID.H3],
|
||
[TAG_NAMES.H4, TAG_ID.H4],
|
||
[TAG_NAMES.H5, TAG_ID.H5],
|
||
[TAG_NAMES.H6, TAG_ID.H6],
|
||
[TAG_NAMES.HEAD, TAG_ID.HEAD],
|
||
[TAG_NAMES.HEADER, TAG_ID.HEADER],
|
||
[TAG_NAMES.HGROUP, TAG_ID.HGROUP],
|
||
[TAG_NAMES.HR, TAG_ID.HR],
|
||
[TAG_NAMES.HTML, TAG_ID.HTML],
|
||
[TAG_NAMES.I, TAG_ID.I],
|
||
[TAG_NAMES.IMG, TAG_ID.IMG],
|
||
[TAG_NAMES.IMAGE, TAG_ID.IMAGE],
|
||
[TAG_NAMES.INPUT, TAG_ID.INPUT],
|
||
[TAG_NAMES.IFRAME, TAG_ID.IFRAME],
|
||
[TAG_NAMES.KEYGEN, TAG_ID.KEYGEN],
|
||
[TAG_NAMES.LABEL, TAG_ID.LABEL],
|
||
[TAG_NAMES.LI, TAG_ID.LI],
|
||
[TAG_NAMES.LINK, TAG_ID.LINK],
|
||
[TAG_NAMES.LISTING, TAG_ID.LISTING],
|
||
[TAG_NAMES.MAIN, TAG_ID.MAIN],
|
||
[TAG_NAMES.MALIGNMARK, TAG_ID.MALIGNMARK],
|
||
[TAG_NAMES.MARQUEE, TAG_ID.MARQUEE],
|
||
[TAG_NAMES.MATH, TAG_ID.MATH],
|
||
[TAG_NAMES.MENU, TAG_ID.MENU],
|
||
[TAG_NAMES.META, TAG_ID.META],
|
||
[TAG_NAMES.MGLYPH, TAG_ID.MGLYPH],
|
||
[TAG_NAMES.MI, TAG_ID.MI],
|
||
[TAG_NAMES.MO, TAG_ID.MO],
|
||
[TAG_NAMES.MN, TAG_ID.MN],
|
||
[TAG_NAMES.MS, TAG_ID.MS],
|
||
[TAG_NAMES.MTEXT, TAG_ID.MTEXT],
|
||
[TAG_NAMES.NAV, TAG_ID.NAV],
|
||
[TAG_NAMES.NOBR, TAG_ID.NOBR],
|
||
[TAG_NAMES.NOFRAMES, TAG_ID.NOFRAMES],
|
||
[TAG_NAMES.NOEMBED, TAG_ID.NOEMBED],
|
||
[TAG_NAMES.NOSCRIPT, TAG_ID.NOSCRIPT],
|
||
[TAG_NAMES.OBJECT, TAG_ID.OBJECT],
|
||
[TAG_NAMES.OL, TAG_ID.OL],
|
||
[TAG_NAMES.OPTGROUP, TAG_ID.OPTGROUP],
|
||
[TAG_NAMES.OPTION, TAG_ID.OPTION],
|
||
[TAG_NAMES.P, TAG_ID.P],
|
||
[TAG_NAMES.PARAM, TAG_ID.PARAM],
|
||
[TAG_NAMES.PLAINTEXT, TAG_ID.PLAINTEXT],
|
||
[TAG_NAMES.PRE, TAG_ID.PRE],
|
||
[TAG_NAMES.RB, TAG_ID.RB],
|
||
[TAG_NAMES.RP, TAG_ID.RP],
|
||
[TAG_NAMES.RT, TAG_ID.RT],
|
||
[TAG_NAMES.RTC, TAG_ID.RTC],
|
||
[TAG_NAMES.RUBY, TAG_ID.RUBY],
|
||
[TAG_NAMES.S, TAG_ID.S],
|
||
[TAG_NAMES.SCRIPT, TAG_ID.SCRIPT],
|
||
[TAG_NAMES.SECTION, TAG_ID.SECTION],
|
||
[TAG_NAMES.SELECT, TAG_ID.SELECT],
|
||
[TAG_NAMES.SOURCE, TAG_ID.SOURCE],
|
||
[TAG_NAMES.SMALL, TAG_ID.SMALL],
|
||
[TAG_NAMES.SPAN, TAG_ID.SPAN],
|
||
[TAG_NAMES.STRIKE, TAG_ID.STRIKE],
|
||
[TAG_NAMES.STRONG, TAG_ID.STRONG],
|
||
[TAG_NAMES.STYLE, TAG_ID.STYLE],
|
||
[TAG_NAMES.SUB, TAG_ID.SUB],
|
||
[TAG_NAMES.SUMMARY, TAG_ID.SUMMARY],
|
||
[TAG_NAMES.SUP, TAG_ID.SUP],
|
||
[TAG_NAMES.TABLE, TAG_ID.TABLE],
|
||
[TAG_NAMES.TBODY, TAG_ID.TBODY],
|
||
[TAG_NAMES.TEMPLATE, TAG_ID.TEMPLATE],
|
||
[TAG_NAMES.TEXTAREA, TAG_ID.TEXTAREA],
|
||
[TAG_NAMES.TFOOT, TAG_ID.TFOOT],
|
||
[TAG_NAMES.TD, TAG_ID.TD],
|
||
[TAG_NAMES.TH, TAG_ID.TH],
|
||
[TAG_NAMES.THEAD, TAG_ID.THEAD],
|
||
[TAG_NAMES.TITLE, TAG_ID.TITLE],
|
||
[TAG_NAMES.TR, TAG_ID.TR],
|
||
[TAG_NAMES.TRACK, TAG_ID.TRACK],
|
||
[TAG_NAMES.TT, TAG_ID.TT],
|
||
[TAG_NAMES.U, TAG_ID.U],
|
||
[TAG_NAMES.UL, TAG_ID.UL],
|
||
[TAG_NAMES.SVG, TAG_ID.SVG],
|
||
[TAG_NAMES.VAR, TAG_ID.VAR],
|
||
[TAG_NAMES.WBR, TAG_ID.WBR],
|
||
[TAG_NAMES.XMP, TAG_ID.XMP]
|
||
]);
|
||
function getTagID(tagName) {
|
||
var _a2;
|
||
return (_a2 = TAG_NAME_TO_ID.get(tagName)) !== null && _a2 !== void 0 ? _a2 : TAG_ID.UNKNOWN;
|
||
}
|
||
var $ = TAG_ID;
|
||
var SPECIAL_ELEMENTS = {
|
||
[NS.HTML]: /* @__PURE__ */ new Set([
|
||
$.ADDRESS,
|
||
$.APPLET,
|
||
$.AREA,
|
||
$.ARTICLE,
|
||
$.ASIDE,
|
||
$.BASE,
|
||
$.BASEFONT,
|
||
$.BGSOUND,
|
||
$.BLOCKQUOTE,
|
||
$.BODY,
|
||
$.BR,
|
||
$.BUTTON,
|
||
$.CAPTION,
|
||
$.CENTER,
|
||
$.COL,
|
||
$.COLGROUP,
|
||
$.DD,
|
||
$.DETAILS,
|
||
$.DIR,
|
||
$.DIV,
|
||
$.DL,
|
||
$.DT,
|
||
$.EMBED,
|
||
$.FIELDSET,
|
||
$.FIGCAPTION,
|
||
$.FIGURE,
|
||
$.FOOTER,
|
||
$.FORM,
|
||
$.FRAME,
|
||
$.FRAMESET,
|
||
$.H1,
|
||
$.H2,
|
||
$.H3,
|
||
$.H4,
|
||
$.H5,
|
||
$.H6,
|
||
$.HEAD,
|
||
$.HEADER,
|
||
$.HGROUP,
|
||
$.HR,
|
||
$.HTML,
|
||
$.IFRAME,
|
||
$.IMG,
|
||
$.INPUT,
|
||
$.LI,
|
||
$.LINK,
|
||
$.LISTING,
|
||
$.MAIN,
|
||
$.MARQUEE,
|
||
$.MENU,
|
||
$.META,
|
||
$.NAV,
|
||
$.NOEMBED,
|
||
$.NOFRAMES,
|
||
$.NOSCRIPT,
|
||
$.OBJECT,
|
||
$.OL,
|
||
$.P,
|
||
$.PARAM,
|
||
$.PLAINTEXT,
|
||
$.PRE,
|
||
$.SCRIPT,
|
||
$.SECTION,
|
||
$.SELECT,
|
||
$.SOURCE,
|
||
$.STYLE,
|
||
$.SUMMARY,
|
||
$.TABLE,
|
||
$.TBODY,
|
||
$.TD,
|
||
$.TEMPLATE,
|
||
$.TEXTAREA,
|
||
$.TFOOT,
|
||
$.TH,
|
||
$.THEAD,
|
||
$.TITLE,
|
||
$.TR,
|
||
$.TRACK,
|
||
$.UL,
|
||
$.WBR,
|
||
$.XMP
|
||
]),
|
||
[NS.MATHML]: /* @__PURE__ */ new Set([$.MI, $.MO, $.MN, $.MS, $.MTEXT, $.ANNOTATION_XML]),
|
||
[NS.SVG]: /* @__PURE__ */ new Set([$.TITLE, $.FOREIGN_OBJECT, $.DESC]),
|
||
[NS.XLINK]: /* @__PURE__ */ new Set(),
|
||
[NS.XML]: /* @__PURE__ */ new Set(),
|
||
[NS.XMLNS]: /* @__PURE__ */ new Set()
|
||
};
|
||
function isNumberedHeader(tn) {
|
||
return tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6;
|
||
}
|
||
var UNESCAPED_TEXT = /* @__PURE__ */ new Set([
|
||
TAG_NAMES.STYLE,
|
||
TAG_NAMES.SCRIPT,
|
||
TAG_NAMES.XMP,
|
||
TAG_NAMES.IFRAME,
|
||
TAG_NAMES.NOEMBED,
|
||
TAG_NAMES.NOFRAMES,
|
||
TAG_NAMES.PLAINTEXT
|
||
]);
|
||
function hasUnescapedText(tn, scriptingEnabled) {
|
||
return UNESCAPED_TEXT.has(tn) || scriptingEnabled && tn === TAG_NAMES.NOSCRIPT;
|
||
}
|
||
|
||
// node_modules/parse5/dist/tokenizer/index.js
|
||
var C1_CONTROLS_REFERENCE_REPLACEMENTS = /* @__PURE__ */ new Map([
|
||
[128, 8364],
|
||
[130, 8218],
|
||
[131, 402],
|
||
[132, 8222],
|
||
[133, 8230],
|
||
[134, 8224],
|
||
[135, 8225],
|
||
[136, 710],
|
||
[137, 8240],
|
||
[138, 352],
|
||
[139, 8249],
|
||
[140, 338],
|
||
[142, 381],
|
||
[145, 8216],
|
||
[146, 8217],
|
||
[147, 8220],
|
||
[148, 8221],
|
||
[149, 8226],
|
||
[150, 8211],
|
||
[151, 8212],
|
||
[152, 732],
|
||
[153, 8482],
|
||
[154, 353],
|
||
[155, 8250],
|
||
[156, 339],
|
||
[158, 382],
|
||
[159, 376]
|
||
]);
|
||
var State;
|
||
(function(State2) {
|
||
State2[State2["DATA"] = 0] = "DATA";
|
||
State2[State2["RCDATA"] = 1] = "RCDATA";
|
||
State2[State2["RAWTEXT"] = 2] = "RAWTEXT";
|
||
State2[State2["SCRIPT_DATA"] = 3] = "SCRIPT_DATA";
|
||
State2[State2["PLAINTEXT"] = 4] = "PLAINTEXT";
|
||
State2[State2["TAG_OPEN"] = 5] = "TAG_OPEN";
|
||
State2[State2["END_TAG_OPEN"] = 6] = "END_TAG_OPEN";
|
||
State2[State2["TAG_NAME"] = 7] = "TAG_NAME";
|
||
State2[State2["RCDATA_LESS_THAN_SIGN"] = 8] = "RCDATA_LESS_THAN_SIGN";
|
||
State2[State2["RCDATA_END_TAG_OPEN"] = 9] = "RCDATA_END_TAG_OPEN";
|
||
State2[State2["RCDATA_END_TAG_NAME"] = 10] = "RCDATA_END_TAG_NAME";
|
||
State2[State2["RAWTEXT_LESS_THAN_SIGN"] = 11] = "RAWTEXT_LESS_THAN_SIGN";
|
||
State2[State2["RAWTEXT_END_TAG_OPEN"] = 12] = "RAWTEXT_END_TAG_OPEN";
|
||
State2[State2["RAWTEXT_END_TAG_NAME"] = 13] = "RAWTEXT_END_TAG_NAME";
|
||
State2[State2["SCRIPT_DATA_LESS_THAN_SIGN"] = 14] = "SCRIPT_DATA_LESS_THAN_SIGN";
|
||
State2[State2["SCRIPT_DATA_END_TAG_OPEN"] = 15] = "SCRIPT_DATA_END_TAG_OPEN";
|
||
State2[State2["SCRIPT_DATA_END_TAG_NAME"] = 16] = "SCRIPT_DATA_END_TAG_NAME";
|
||
State2[State2["SCRIPT_DATA_ESCAPE_START"] = 17] = "SCRIPT_DATA_ESCAPE_START";
|
||
State2[State2["SCRIPT_DATA_ESCAPE_START_DASH"] = 18] = "SCRIPT_DATA_ESCAPE_START_DASH";
|
||
State2[State2["SCRIPT_DATA_ESCAPED"] = 19] = "SCRIPT_DATA_ESCAPED";
|
||
State2[State2["SCRIPT_DATA_ESCAPED_DASH"] = 20] = "SCRIPT_DATA_ESCAPED_DASH";
|
||
State2[State2["SCRIPT_DATA_ESCAPED_DASH_DASH"] = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH";
|
||
State2[State2["SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN"] = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN";
|
||
State2[State2["SCRIPT_DATA_ESCAPED_END_TAG_OPEN"] = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN";
|
||
State2[State2["SCRIPT_DATA_ESCAPED_END_TAG_NAME"] = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME";
|
||
State2[State2["SCRIPT_DATA_DOUBLE_ESCAPE_START"] = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START";
|
||
State2[State2["SCRIPT_DATA_DOUBLE_ESCAPED"] = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED";
|
||
State2[State2["SCRIPT_DATA_DOUBLE_ESCAPED_DASH"] = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH";
|
||
State2[State2["SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH"] = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH";
|
||
State2[State2["SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN"] = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN";
|
||
State2[State2["SCRIPT_DATA_DOUBLE_ESCAPE_END"] = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END";
|
||
State2[State2["BEFORE_ATTRIBUTE_NAME"] = 31] = "BEFORE_ATTRIBUTE_NAME";
|
||
State2[State2["ATTRIBUTE_NAME"] = 32] = "ATTRIBUTE_NAME";
|
||
State2[State2["AFTER_ATTRIBUTE_NAME"] = 33] = "AFTER_ATTRIBUTE_NAME";
|
||
State2[State2["BEFORE_ATTRIBUTE_VALUE"] = 34] = "BEFORE_ATTRIBUTE_VALUE";
|
||
State2[State2["ATTRIBUTE_VALUE_DOUBLE_QUOTED"] = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED";
|
||
State2[State2["ATTRIBUTE_VALUE_SINGLE_QUOTED"] = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED";
|
||
State2[State2["ATTRIBUTE_VALUE_UNQUOTED"] = 37] = "ATTRIBUTE_VALUE_UNQUOTED";
|
||
State2[State2["AFTER_ATTRIBUTE_VALUE_QUOTED"] = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED";
|
||
State2[State2["SELF_CLOSING_START_TAG"] = 39] = "SELF_CLOSING_START_TAG";
|
||
State2[State2["BOGUS_COMMENT"] = 40] = "BOGUS_COMMENT";
|
||
State2[State2["MARKUP_DECLARATION_OPEN"] = 41] = "MARKUP_DECLARATION_OPEN";
|
||
State2[State2["COMMENT_START"] = 42] = "COMMENT_START";
|
||
State2[State2["COMMENT_START_DASH"] = 43] = "COMMENT_START_DASH";
|
||
State2[State2["COMMENT"] = 44] = "COMMENT";
|
||
State2[State2["COMMENT_LESS_THAN_SIGN"] = 45] = "COMMENT_LESS_THAN_SIGN";
|
||
State2[State2["COMMENT_LESS_THAN_SIGN_BANG"] = 46] = "COMMENT_LESS_THAN_SIGN_BANG";
|
||
State2[State2["COMMENT_LESS_THAN_SIGN_BANG_DASH"] = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH";
|
||
State2[State2["COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH"] = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH";
|
||
State2[State2["COMMENT_END_DASH"] = 49] = "COMMENT_END_DASH";
|
||
State2[State2["COMMENT_END"] = 50] = "COMMENT_END";
|
||
State2[State2["COMMENT_END_BANG"] = 51] = "COMMENT_END_BANG";
|
||
State2[State2["DOCTYPE"] = 52] = "DOCTYPE";
|
||
State2[State2["BEFORE_DOCTYPE_NAME"] = 53] = "BEFORE_DOCTYPE_NAME";
|
||
State2[State2["DOCTYPE_NAME"] = 54] = "DOCTYPE_NAME";
|
||
State2[State2["AFTER_DOCTYPE_NAME"] = 55] = "AFTER_DOCTYPE_NAME";
|
||
State2[State2["AFTER_DOCTYPE_PUBLIC_KEYWORD"] = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD";
|
||
State2[State2["BEFORE_DOCTYPE_PUBLIC_IDENTIFIER"] = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER";
|
||
State2[State2["DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED"] = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED";
|
||
State2[State2["DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED"] = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED";
|
||
State2[State2["AFTER_DOCTYPE_PUBLIC_IDENTIFIER"] = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER";
|
||
State2[State2["BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS"] = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS";
|
||
State2[State2["AFTER_DOCTYPE_SYSTEM_KEYWORD"] = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD";
|
||
State2[State2["BEFORE_DOCTYPE_SYSTEM_IDENTIFIER"] = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER";
|
||
State2[State2["DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED"] = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED";
|
||
State2[State2["DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED"] = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED";
|
||
State2[State2["AFTER_DOCTYPE_SYSTEM_IDENTIFIER"] = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER";
|
||
State2[State2["BOGUS_DOCTYPE"] = 67] = "BOGUS_DOCTYPE";
|
||
State2[State2["CDATA_SECTION"] = 68] = "CDATA_SECTION";
|
||
State2[State2["CDATA_SECTION_BRACKET"] = 69] = "CDATA_SECTION_BRACKET";
|
||
State2[State2["CDATA_SECTION_END"] = 70] = "CDATA_SECTION_END";
|
||
State2[State2["CHARACTER_REFERENCE"] = 71] = "CHARACTER_REFERENCE";
|
||
State2[State2["NAMED_CHARACTER_REFERENCE"] = 72] = "NAMED_CHARACTER_REFERENCE";
|
||
State2[State2["AMBIGUOUS_AMPERSAND"] = 73] = "AMBIGUOUS_AMPERSAND";
|
||
State2[State2["NUMERIC_CHARACTER_REFERENCE"] = 74] = "NUMERIC_CHARACTER_REFERENCE";
|
||
State2[State2["HEXADEMICAL_CHARACTER_REFERENCE_START"] = 75] = "HEXADEMICAL_CHARACTER_REFERENCE_START";
|
||
State2[State2["HEXADEMICAL_CHARACTER_REFERENCE"] = 76] = "HEXADEMICAL_CHARACTER_REFERENCE";
|
||
State2[State2["DECIMAL_CHARACTER_REFERENCE"] = 77] = "DECIMAL_CHARACTER_REFERENCE";
|
||
State2[State2["NUMERIC_CHARACTER_REFERENCE_END"] = 78] = "NUMERIC_CHARACTER_REFERENCE_END";
|
||
})(State || (State = {}));
|
||
var TokenizerMode = {
|
||
DATA: State.DATA,
|
||
RCDATA: State.RCDATA,
|
||
RAWTEXT: State.RAWTEXT,
|
||
SCRIPT_DATA: State.SCRIPT_DATA,
|
||
PLAINTEXT: State.PLAINTEXT,
|
||
CDATA_SECTION: State.CDATA_SECTION
|
||
};
|
||
function isAsciiDigit(cp) {
|
||
return cp >= CODE_POINTS.DIGIT_0 && cp <= CODE_POINTS.DIGIT_9;
|
||
}
|
||
function isAsciiUpper(cp) {
|
||
return cp >= CODE_POINTS.LATIN_CAPITAL_A && cp <= CODE_POINTS.LATIN_CAPITAL_Z;
|
||
}
|
||
function isAsciiLower(cp) {
|
||
return cp >= CODE_POINTS.LATIN_SMALL_A && cp <= CODE_POINTS.LATIN_SMALL_Z;
|
||
}
|
||
function isAsciiLetter(cp) {
|
||
return isAsciiLower(cp) || isAsciiUpper(cp);
|
||
}
|
||
function isAsciiAlphaNumeric(cp) {
|
||
return isAsciiLetter(cp) || isAsciiDigit(cp);
|
||
}
|
||
function isAsciiUpperHexDigit(cp) {
|
||
return cp >= CODE_POINTS.LATIN_CAPITAL_A && cp <= CODE_POINTS.LATIN_CAPITAL_F;
|
||
}
|
||
function isAsciiLowerHexDigit(cp) {
|
||
return cp >= CODE_POINTS.LATIN_SMALL_A && cp <= CODE_POINTS.LATIN_SMALL_F;
|
||
}
|
||
function isAsciiHexDigit(cp) {
|
||
return isAsciiDigit(cp) || isAsciiUpperHexDigit(cp) || isAsciiLowerHexDigit(cp);
|
||
}
|
||
function toAsciiLower(cp) {
|
||
return cp + 32;
|
||
}
|
||
function isWhitespace(cp) {
|
||
return cp === CODE_POINTS.SPACE || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.TABULATION || cp === CODE_POINTS.FORM_FEED;
|
||
}
|
||
function isEntityInAttributeInvalidEnd(nextCp) {
|
||
return nextCp === CODE_POINTS.EQUALS_SIGN || isAsciiAlphaNumeric(nextCp);
|
||
}
|
||
function isScriptDataDoubleEscapeSequenceEnd(cp) {
|
||
return isWhitespace(cp) || cp === CODE_POINTS.SOLIDUS || cp === CODE_POINTS.GREATER_THAN_SIGN;
|
||
}
|
||
var Tokenizer = class {
|
||
constructor(options, handler) {
|
||
this.options = options;
|
||
this.handler = handler;
|
||
this.paused = false;
|
||
this.inLoop = false;
|
||
this.inForeignNode = false;
|
||
this.lastStartTagName = "";
|
||
this.active = false;
|
||
this.state = State.DATA;
|
||
this.returnState = State.DATA;
|
||
this.charRefCode = -1;
|
||
this.consumedAfterSnapshot = -1;
|
||
this.currentCharacterToken = null;
|
||
this.currentToken = null;
|
||
this.currentAttr = { name: "", value: "" };
|
||
this.preprocessor = new Preprocessor(handler);
|
||
this.currentLocation = this.getCurrentLocation(-1);
|
||
}
|
||
//Errors
|
||
_err(code2) {
|
||
var _a2, _b;
|
||
(_b = (_a2 = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a2, this.preprocessor.getError(code2));
|
||
}
|
||
// NOTE: `offset` may never run across line boundaries.
|
||
getCurrentLocation(offset) {
|
||
if (!this.options.sourceCodeLocationInfo) {
|
||
return null;
|
||
}
|
||
return {
|
||
startLine: this.preprocessor.line,
|
||
startCol: this.preprocessor.col - offset,
|
||
startOffset: this.preprocessor.offset - offset,
|
||
endLine: -1,
|
||
endCol: -1,
|
||
endOffset: -1
|
||
};
|
||
}
|
||
_runParsingLoop() {
|
||
if (this.inLoop)
|
||
return;
|
||
this.inLoop = true;
|
||
while (this.active && !this.paused) {
|
||
this.consumedAfterSnapshot = 0;
|
||
const cp = this._consume();
|
||
if (!this._ensureHibernation()) {
|
||
this._callState(cp);
|
||
}
|
||
}
|
||
this.inLoop = false;
|
||
}
|
||
//API
|
||
pause() {
|
||
this.paused = true;
|
||
}
|
||
resume(writeCallback) {
|
||
if (!this.paused) {
|
||
throw new Error("Parser was already resumed");
|
||
}
|
||
this.paused = false;
|
||
if (this.inLoop)
|
||
return;
|
||
this._runParsingLoop();
|
||
if (!this.paused) {
|
||
writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback();
|
||
}
|
||
}
|
||
write(chunk, isLastChunk, writeCallback) {
|
||
this.active = true;
|
||
this.preprocessor.write(chunk, isLastChunk);
|
||
this._runParsingLoop();
|
||
if (!this.paused) {
|
||
writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback();
|
||
}
|
||
}
|
||
insertHtmlAtCurrentPos(chunk) {
|
||
this.active = true;
|
||
this.preprocessor.insertHtmlAtCurrentPos(chunk);
|
||
this._runParsingLoop();
|
||
}
|
||
//Hibernation
|
||
_ensureHibernation() {
|
||
if (this.preprocessor.endOfChunkHit) {
|
||
this._unconsume(this.consumedAfterSnapshot);
|
||
this.active = false;
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
//Consumption
|
||
_consume() {
|
||
this.consumedAfterSnapshot++;
|
||
return this.preprocessor.advance();
|
||
}
|
||
_unconsume(count) {
|
||
this.consumedAfterSnapshot -= count;
|
||
this.preprocessor.retreat(count);
|
||
}
|
||
_reconsumeInState(state, cp) {
|
||
this.state = state;
|
||
this._callState(cp);
|
||
}
|
||
_advanceBy(count) {
|
||
this.consumedAfterSnapshot += count;
|
||
for (let i = 0; i < count; i++) {
|
||
this.preprocessor.advance();
|
||
}
|
||
}
|
||
_consumeSequenceIfMatch(pattern, caseSensitive) {
|
||
if (this.preprocessor.startsWith(pattern, caseSensitive)) {
|
||
this._advanceBy(pattern.length - 1);
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
//Token creation
|
||
_createStartTagToken() {
|
||
this.currentToken = {
|
||
type: TokenType.START_TAG,
|
||
tagName: "",
|
||
tagID: TAG_ID.UNKNOWN,
|
||
selfClosing: false,
|
||
ackSelfClosing: false,
|
||
attrs: [],
|
||
location: this.getCurrentLocation(1)
|
||
};
|
||
}
|
||
_createEndTagToken() {
|
||
this.currentToken = {
|
||
type: TokenType.END_TAG,
|
||
tagName: "",
|
||
tagID: TAG_ID.UNKNOWN,
|
||
selfClosing: false,
|
||
ackSelfClosing: false,
|
||
attrs: [],
|
||
location: this.getCurrentLocation(2)
|
||
};
|
||
}
|
||
_createCommentToken(offset) {
|
||
this.currentToken = {
|
||
type: TokenType.COMMENT,
|
||
data: "",
|
||
location: this.getCurrentLocation(offset)
|
||
};
|
||
}
|
||
_createDoctypeToken(initialName) {
|
||
this.currentToken = {
|
||
type: TokenType.DOCTYPE,
|
||
name: initialName,
|
||
forceQuirks: false,
|
||
publicId: null,
|
||
systemId: null,
|
||
location: this.currentLocation
|
||
};
|
||
}
|
||
_createCharacterToken(type, chars) {
|
||
this.currentCharacterToken = {
|
||
type,
|
||
chars,
|
||
location: this.currentLocation
|
||
};
|
||
}
|
||
//Tag attributes
|
||
_createAttr(attrNameFirstCh) {
|
||
this.currentAttr = {
|
||
name: attrNameFirstCh,
|
||
value: ""
|
||
};
|
||
this.currentLocation = this.getCurrentLocation(0);
|
||
}
|
||
_leaveAttrName() {
|
||
var _a2;
|
||
var _b;
|
||
const token = this.currentToken;
|
||
if (getTokenAttr(token, this.currentAttr.name) === null) {
|
||
token.attrs.push(this.currentAttr);
|
||
if (token.location && this.currentLocation) {
|
||
const attrLocations = (_a2 = (_b = token.location).attrs) !== null && _a2 !== void 0 ? _a2 : _b.attrs = /* @__PURE__ */ Object.create(null);
|
||
attrLocations[this.currentAttr.name] = this.currentLocation;
|
||
this._leaveAttrValue();
|
||
}
|
||
} else {
|
||
this._err(ERR.duplicateAttribute);
|
||
}
|
||
}
|
||
_leaveAttrValue() {
|
||
if (this.currentLocation) {
|
||
this.currentLocation.endLine = this.preprocessor.line;
|
||
this.currentLocation.endCol = this.preprocessor.col;
|
||
this.currentLocation.endOffset = this.preprocessor.offset;
|
||
}
|
||
}
|
||
//Token emission
|
||
prepareToken(ct) {
|
||
this._emitCurrentCharacterToken(ct.location);
|
||
this.currentToken = null;
|
||
if (ct.location) {
|
||
ct.location.endLine = this.preprocessor.line;
|
||
ct.location.endCol = this.preprocessor.col + 1;
|
||
ct.location.endOffset = this.preprocessor.offset + 1;
|
||
}
|
||
this.currentLocation = this.getCurrentLocation(-1);
|
||
}
|
||
emitCurrentTagToken() {
|
||
const ct = this.currentToken;
|
||
this.prepareToken(ct);
|
||
ct.tagID = getTagID(ct.tagName);
|
||
if (ct.type === TokenType.START_TAG) {
|
||
this.lastStartTagName = ct.tagName;
|
||
this.handler.onStartTag(ct);
|
||
} else {
|
||
if (ct.attrs.length > 0) {
|
||
this._err(ERR.endTagWithAttributes);
|
||
}
|
||
if (ct.selfClosing) {
|
||
this._err(ERR.endTagWithTrailingSolidus);
|
||
}
|
||
this.handler.onEndTag(ct);
|
||
}
|
||
this.preprocessor.dropParsedChunk();
|
||
}
|
||
emitCurrentComment(ct) {
|
||
this.prepareToken(ct);
|
||
this.handler.onComment(ct);
|
||
this.preprocessor.dropParsedChunk();
|
||
}
|
||
emitCurrentDoctype(ct) {
|
||
this.prepareToken(ct);
|
||
this.handler.onDoctype(ct);
|
||
this.preprocessor.dropParsedChunk();
|
||
}
|
||
_emitCurrentCharacterToken(nextLocation) {
|
||
if (this.currentCharacterToken) {
|
||
if (nextLocation && this.currentCharacterToken.location) {
|
||
this.currentCharacterToken.location.endLine = nextLocation.startLine;
|
||
this.currentCharacterToken.location.endCol = nextLocation.startCol;
|
||
this.currentCharacterToken.location.endOffset = nextLocation.startOffset;
|
||
}
|
||
switch (this.currentCharacterToken.type) {
|
||
case TokenType.CHARACTER: {
|
||
this.handler.onCharacter(this.currentCharacterToken);
|
||
break;
|
||
}
|
||
case TokenType.NULL_CHARACTER: {
|
||
this.handler.onNullCharacter(this.currentCharacterToken);
|
||
break;
|
||
}
|
||
case TokenType.WHITESPACE_CHARACTER: {
|
||
this.handler.onWhitespaceCharacter(this.currentCharacterToken);
|
||
break;
|
||
}
|
||
}
|
||
this.currentCharacterToken = null;
|
||
}
|
||
}
|
||
_emitEOFToken() {
|
||
const location = this.getCurrentLocation(0);
|
||
if (location) {
|
||
location.endLine = location.startLine;
|
||
location.endCol = location.startCol;
|
||
location.endOffset = location.startOffset;
|
||
}
|
||
this._emitCurrentCharacterToken(location);
|
||
this.handler.onEof({ type: TokenType.EOF, location });
|
||
this.active = false;
|
||
}
|
||
//Characters emission
|
||
//OPTIMIZATION: specification uses only one type of character tokens (one token per character).
|
||
//This causes a huge memory overhead and a lot of unnecessary parser loops. parse5 uses 3 groups of characters.
|
||
//If we have a sequence of characters that belong to the same group, the parser can process it
|
||
//as a single solid character token.
|
||
//So, there are 3 types of character tokens in parse5:
|
||
//1)TokenType.NULL_CHARACTER - \u0000-character sequences (e.g. '\u0000\u0000\u0000')
|
||
//2)TokenType.WHITESPACE_CHARACTER - any whitespace/new-line character sequences (e.g. '\n \r\t \f')
|
||
//3)TokenType.CHARACTER - any character sequence which don't belong to groups 1 and 2 (e.g. 'abcdef1234@@#$%^')
|
||
_appendCharToCurrentCharacterToken(type, ch) {
|
||
if (this.currentCharacterToken) {
|
||
if (this.currentCharacterToken.type !== type) {
|
||
this.currentLocation = this.getCurrentLocation(0);
|
||
this._emitCurrentCharacterToken(this.currentLocation);
|
||
this.preprocessor.dropParsedChunk();
|
||
} else {
|
||
this.currentCharacterToken.chars += ch;
|
||
return;
|
||
}
|
||
}
|
||
this._createCharacterToken(type, ch);
|
||
}
|
||
_emitCodePoint(cp) {
|
||
const type = isWhitespace(cp) ? TokenType.WHITESPACE_CHARACTER : cp === CODE_POINTS.NULL ? TokenType.NULL_CHARACTER : TokenType.CHARACTER;
|
||
this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp));
|
||
}
|
||
//NOTE: used when we emit characters explicitly.
|
||
//This is always for non-whitespace and non-null characters, which allows us to avoid additional checks.
|
||
_emitChars(ch) {
|
||
this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch);
|
||
}
|
||
// Character reference helpers
|
||
_matchNamedCharacterReference(cp) {
|
||
let result = null;
|
||
let excess = 0;
|
||
let withoutSemicolon = false;
|
||
for (let i = 0, current = decode_data_html_default[0]; i >= 0; cp = this._consume()) {
|
||
i = determineBranch(decode_data_html_default, current, i + 1, cp);
|
||
if (i < 0)
|
||
break;
|
||
excess += 1;
|
||
current = decode_data_html_default[i];
|
||
const masked = current & BinTrieFlags.VALUE_LENGTH;
|
||
if (masked) {
|
||
const valueLength = (masked >> 14) - 1;
|
||
if (cp !== CODE_POINTS.SEMICOLON && this._isCharacterReferenceInAttribute() && isEntityInAttributeInvalidEnd(this.preprocessor.peek(1))) {
|
||
result = [CODE_POINTS.AMPERSAND];
|
||
i += valueLength;
|
||
} else {
|
||
result = valueLength === 0 ? [decode_data_html_default[i] & ~BinTrieFlags.VALUE_LENGTH] : valueLength === 1 ? [decode_data_html_default[++i]] : [decode_data_html_default[++i], decode_data_html_default[++i]];
|
||
excess = 0;
|
||
withoutSemicolon = cp !== CODE_POINTS.SEMICOLON;
|
||
}
|
||
if (valueLength === 0) {
|
||
this._consume();
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
this._unconsume(excess);
|
||
if (withoutSemicolon && !this.preprocessor.endOfChunkHit) {
|
||
this._err(ERR.missingSemicolonAfterCharacterReference);
|
||
}
|
||
this._unconsume(1);
|
||
return result;
|
||
}
|
||
_isCharacterReferenceInAttribute() {
|
||
return this.returnState === State.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === State.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === State.ATTRIBUTE_VALUE_UNQUOTED;
|
||
}
|
||
_flushCodePointConsumedAsCharacterReference(cp) {
|
||
if (this._isCharacterReferenceInAttribute()) {
|
||
this.currentAttr.value += String.fromCodePoint(cp);
|
||
} else {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
// Calling states this way turns out to be much faster than any other approach.
|
||
_callState(cp) {
|
||
switch (this.state) {
|
||
case State.DATA: {
|
||
this._stateData(cp);
|
||
break;
|
||
}
|
||
case State.RCDATA: {
|
||
this._stateRcdata(cp);
|
||
break;
|
||
}
|
||
case State.RAWTEXT: {
|
||
this._stateRawtext(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA: {
|
||
this._stateScriptData(cp);
|
||
break;
|
||
}
|
||
case State.PLAINTEXT: {
|
||
this._statePlaintext(cp);
|
||
break;
|
||
}
|
||
case State.TAG_OPEN: {
|
||
this._stateTagOpen(cp);
|
||
break;
|
||
}
|
||
case State.END_TAG_OPEN: {
|
||
this._stateEndTagOpen(cp);
|
||
break;
|
||
}
|
||
case State.TAG_NAME: {
|
||
this._stateTagName(cp);
|
||
break;
|
||
}
|
||
case State.RCDATA_LESS_THAN_SIGN: {
|
||
this._stateRcdataLessThanSign(cp);
|
||
break;
|
||
}
|
||
case State.RCDATA_END_TAG_OPEN: {
|
||
this._stateRcdataEndTagOpen(cp);
|
||
break;
|
||
}
|
||
case State.RCDATA_END_TAG_NAME: {
|
||
this._stateRcdataEndTagName(cp);
|
||
break;
|
||
}
|
||
case State.RAWTEXT_LESS_THAN_SIGN: {
|
||
this._stateRawtextLessThanSign(cp);
|
||
break;
|
||
}
|
||
case State.RAWTEXT_END_TAG_OPEN: {
|
||
this._stateRawtextEndTagOpen(cp);
|
||
break;
|
||
}
|
||
case State.RAWTEXT_END_TAG_NAME: {
|
||
this._stateRawtextEndTagName(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_LESS_THAN_SIGN: {
|
||
this._stateScriptDataLessThanSign(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_END_TAG_OPEN: {
|
||
this._stateScriptDataEndTagOpen(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_END_TAG_NAME: {
|
||
this._stateScriptDataEndTagName(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPE_START: {
|
||
this._stateScriptDataEscapeStart(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPE_START_DASH: {
|
||
this._stateScriptDataEscapeStartDash(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPED: {
|
||
this._stateScriptDataEscaped(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPED_DASH: {
|
||
this._stateScriptDataEscapedDash(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPED_DASH_DASH: {
|
||
this._stateScriptDataEscapedDashDash(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: {
|
||
this._stateScriptDataEscapedLessThanSign(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: {
|
||
this._stateScriptDataEscapedEndTagOpen(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME: {
|
||
this._stateScriptDataEscapedEndTagName(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_DOUBLE_ESCAPE_START: {
|
||
this._stateScriptDataDoubleEscapeStart(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_DOUBLE_ESCAPED: {
|
||
this._stateScriptDataDoubleEscaped(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: {
|
||
this._stateScriptDataDoubleEscapedDash(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: {
|
||
this._stateScriptDataDoubleEscapedDashDash(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: {
|
||
this._stateScriptDataDoubleEscapedLessThanSign(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_DOUBLE_ESCAPE_END: {
|
||
this._stateScriptDataDoubleEscapeEnd(cp);
|
||
break;
|
||
}
|
||
case State.BEFORE_ATTRIBUTE_NAME: {
|
||
this._stateBeforeAttributeName(cp);
|
||
break;
|
||
}
|
||
case State.ATTRIBUTE_NAME: {
|
||
this._stateAttributeName(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_ATTRIBUTE_NAME: {
|
||
this._stateAfterAttributeName(cp);
|
||
break;
|
||
}
|
||
case State.BEFORE_ATTRIBUTE_VALUE: {
|
||
this._stateBeforeAttributeValue(cp);
|
||
break;
|
||
}
|
||
case State.ATTRIBUTE_VALUE_DOUBLE_QUOTED: {
|
||
this._stateAttributeValueDoubleQuoted(cp);
|
||
break;
|
||
}
|
||
case State.ATTRIBUTE_VALUE_SINGLE_QUOTED: {
|
||
this._stateAttributeValueSingleQuoted(cp);
|
||
break;
|
||
}
|
||
case State.ATTRIBUTE_VALUE_UNQUOTED: {
|
||
this._stateAttributeValueUnquoted(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_ATTRIBUTE_VALUE_QUOTED: {
|
||
this._stateAfterAttributeValueQuoted(cp);
|
||
break;
|
||
}
|
||
case State.SELF_CLOSING_START_TAG: {
|
||
this._stateSelfClosingStartTag(cp);
|
||
break;
|
||
}
|
||
case State.BOGUS_COMMENT: {
|
||
this._stateBogusComment(cp);
|
||
break;
|
||
}
|
||
case State.MARKUP_DECLARATION_OPEN: {
|
||
this._stateMarkupDeclarationOpen(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_START: {
|
||
this._stateCommentStart(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_START_DASH: {
|
||
this._stateCommentStartDash(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT: {
|
||
this._stateComment(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_LESS_THAN_SIGN: {
|
||
this._stateCommentLessThanSign(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_LESS_THAN_SIGN_BANG: {
|
||
this._stateCommentLessThanSignBang(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_LESS_THAN_SIGN_BANG_DASH: {
|
||
this._stateCommentLessThanSignBangDash(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: {
|
||
this._stateCommentLessThanSignBangDashDash(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_END_DASH: {
|
||
this._stateCommentEndDash(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_END: {
|
||
this._stateCommentEnd(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_END_BANG: {
|
||
this._stateCommentEndBang(cp);
|
||
break;
|
||
}
|
||
case State.DOCTYPE: {
|
||
this._stateDoctype(cp);
|
||
break;
|
||
}
|
||
case State.BEFORE_DOCTYPE_NAME: {
|
||
this._stateBeforeDoctypeName(cp);
|
||
break;
|
||
}
|
||
case State.DOCTYPE_NAME: {
|
||
this._stateDoctypeName(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_DOCTYPE_NAME: {
|
||
this._stateAfterDoctypeName(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_DOCTYPE_PUBLIC_KEYWORD: {
|
||
this._stateAfterDoctypePublicKeyword(cp);
|
||
break;
|
||
}
|
||
case State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: {
|
||
this._stateBeforeDoctypePublicIdentifier(cp);
|
||
break;
|
||
}
|
||
case State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: {
|
||
this._stateDoctypePublicIdentifierDoubleQuoted(cp);
|
||
break;
|
||
}
|
||
case State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: {
|
||
this._stateDoctypePublicIdentifierSingleQuoted(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: {
|
||
this._stateAfterDoctypePublicIdentifier(cp);
|
||
break;
|
||
}
|
||
case State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: {
|
||
this._stateBetweenDoctypePublicAndSystemIdentifiers(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_DOCTYPE_SYSTEM_KEYWORD: {
|
||
this._stateAfterDoctypeSystemKeyword(cp);
|
||
break;
|
||
}
|
||
case State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: {
|
||
this._stateBeforeDoctypeSystemIdentifier(cp);
|
||
break;
|
||
}
|
||
case State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: {
|
||
this._stateDoctypeSystemIdentifierDoubleQuoted(cp);
|
||
break;
|
||
}
|
||
case State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: {
|
||
this._stateDoctypeSystemIdentifierSingleQuoted(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: {
|
||
this._stateAfterDoctypeSystemIdentifier(cp);
|
||
break;
|
||
}
|
||
case State.BOGUS_DOCTYPE: {
|
||
this._stateBogusDoctype(cp);
|
||
break;
|
||
}
|
||
case State.CDATA_SECTION: {
|
||
this._stateCdataSection(cp);
|
||
break;
|
||
}
|
||
case State.CDATA_SECTION_BRACKET: {
|
||
this._stateCdataSectionBracket(cp);
|
||
break;
|
||
}
|
||
case State.CDATA_SECTION_END: {
|
||
this._stateCdataSectionEnd(cp);
|
||
break;
|
||
}
|
||
case State.CHARACTER_REFERENCE: {
|
||
this._stateCharacterReference(cp);
|
||
break;
|
||
}
|
||
case State.NAMED_CHARACTER_REFERENCE: {
|
||
this._stateNamedCharacterReference(cp);
|
||
break;
|
||
}
|
||
case State.AMBIGUOUS_AMPERSAND: {
|
||
this._stateAmbiguousAmpersand(cp);
|
||
break;
|
||
}
|
||
case State.NUMERIC_CHARACTER_REFERENCE: {
|
||
this._stateNumericCharacterReference(cp);
|
||
break;
|
||
}
|
||
case State.HEXADEMICAL_CHARACTER_REFERENCE_START: {
|
||
this._stateHexademicalCharacterReferenceStart(cp);
|
||
break;
|
||
}
|
||
case State.HEXADEMICAL_CHARACTER_REFERENCE: {
|
||
this._stateHexademicalCharacterReference(cp);
|
||
break;
|
||
}
|
||
case State.DECIMAL_CHARACTER_REFERENCE: {
|
||
this._stateDecimalCharacterReference(cp);
|
||
break;
|
||
}
|
||
case State.NUMERIC_CHARACTER_REFERENCE_END: {
|
||
this._stateNumericCharacterReferenceEnd(cp);
|
||
break;
|
||
}
|
||
default: {
|
||
throw new Error("Unknown state");
|
||
}
|
||
}
|
||
}
|
||
// State machine
|
||
// Data state
|
||
//------------------------------------------------------------------
|
||
_stateData(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.TAG_OPEN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.AMPERSAND: {
|
||
this.returnState = State.DATA;
|
||
this.state = State.CHARACTER_REFERENCE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitCodePoint(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// RCDATA state
|
||
//------------------------------------------------------------------
|
||
_stateRcdata(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.AMPERSAND: {
|
||
this.returnState = State.RCDATA;
|
||
this.state = State.CHARACTER_REFERENCE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.RCDATA_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// RAWTEXT state
|
||
//------------------------------------------------------------------
|
||
_stateRawtext(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.RAWTEXT_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data state
|
||
//------------------------------------------------------------------
|
||
_stateScriptData(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// PLAINTEXT state
|
||
//------------------------------------------------------------------
|
||
_statePlaintext(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Tag open state
|
||
//------------------------------------------------------------------
|
||
_stateTagOpen(cp) {
|
||
if (isAsciiLetter(cp)) {
|
||
this._createStartTagToken();
|
||
this.state = State.TAG_NAME;
|
||
this._stateTagName(cp);
|
||
} else
|
||
switch (cp) {
|
||
case CODE_POINTS.EXCLAMATION_MARK: {
|
||
this.state = State.MARKUP_DECLARATION_OPEN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.SOLIDUS: {
|
||
this.state = State.END_TAG_OPEN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUESTION_MARK: {
|
||
this._err(ERR.unexpectedQuestionMarkInsteadOfTagName);
|
||
this._createCommentToken(1);
|
||
this.state = State.BOGUS_COMMENT;
|
||
this._stateBogusComment(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofBeforeTagName);
|
||
this._emitChars("<");
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.invalidFirstCharacterOfTagName);
|
||
this._emitChars("<");
|
||
this.state = State.DATA;
|
||
this._stateData(cp);
|
||
}
|
||
}
|
||
}
|
||
// End tag open state
|
||
//------------------------------------------------------------------
|
||
_stateEndTagOpen(cp) {
|
||
if (isAsciiLetter(cp)) {
|
||
this._createEndTagToken();
|
||
this.state = State.TAG_NAME;
|
||
this._stateTagName(cp);
|
||
} else
|
||
switch (cp) {
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingEndTagName);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofBeforeTagName);
|
||
this._emitChars("</");
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.invalidFirstCharacterOfTagName);
|
||
this._createCommentToken(2);
|
||
this.state = State.BOGUS_COMMENT;
|
||
this._stateBogusComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// Tag name state
|
||
//------------------------------------------------------------------
|
||
_stateTagName(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
||
break;
|
||
}
|
||
case CODE_POINTS.SOLIDUS: {
|
||
this.state = State.SELF_CLOSING_START_TAG;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentTagToken();
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.tagName += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.tagName += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);
|
||
}
|
||
}
|
||
}
|
||
// RCDATA less-than sign state
|
||
//------------------------------------------------------------------
|
||
_stateRcdataLessThanSign(cp) {
|
||
if (cp === CODE_POINTS.SOLIDUS) {
|
||
this.state = State.RCDATA_END_TAG_OPEN;
|
||
} else {
|
||
this._emitChars("<");
|
||
this.state = State.RCDATA;
|
||
this._stateRcdata(cp);
|
||
}
|
||
}
|
||
// RCDATA end tag open state
|
||
//------------------------------------------------------------------
|
||
_stateRcdataEndTagOpen(cp) {
|
||
if (isAsciiLetter(cp)) {
|
||
this.state = State.RCDATA_END_TAG_NAME;
|
||
this._stateRcdataEndTagName(cp);
|
||
} else {
|
||
this._emitChars("</");
|
||
this.state = State.RCDATA;
|
||
this._stateRcdata(cp);
|
||
}
|
||
}
|
||
handleSpecialEndTag(_cp) {
|
||
if (!this.preprocessor.startsWith(this.lastStartTagName, false)) {
|
||
return !this._ensureHibernation();
|
||
}
|
||
this._createEndTagToken();
|
||
const token = this.currentToken;
|
||
token.tagName = this.lastStartTagName;
|
||
const cp = this.preprocessor.peek(this.lastStartTagName.length);
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this._advanceBy(this.lastStartTagName.length);
|
||
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
||
return false;
|
||
}
|
||
case CODE_POINTS.SOLIDUS: {
|
||
this._advanceBy(this.lastStartTagName.length);
|
||
this.state = State.SELF_CLOSING_START_TAG;
|
||
return false;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._advanceBy(this.lastStartTagName.length);
|
||
this.emitCurrentTagToken();
|
||
this.state = State.DATA;
|
||
return false;
|
||
}
|
||
default: {
|
||
return !this._ensureHibernation();
|
||
}
|
||
}
|
||
}
|
||
// RCDATA end tag name state
|
||
//------------------------------------------------------------------
|
||
_stateRcdataEndTagName(cp) {
|
||
if (this.handleSpecialEndTag(cp)) {
|
||
this._emitChars("</");
|
||
this.state = State.RCDATA;
|
||
this._stateRcdata(cp);
|
||
}
|
||
}
|
||
// RAWTEXT less-than sign state
|
||
//------------------------------------------------------------------
|
||
_stateRawtextLessThanSign(cp) {
|
||
if (cp === CODE_POINTS.SOLIDUS) {
|
||
this.state = State.RAWTEXT_END_TAG_OPEN;
|
||
} else {
|
||
this._emitChars("<");
|
||
this.state = State.RAWTEXT;
|
||
this._stateRawtext(cp);
|
||
}
|
||
}
|
||
// RAWTEXT end tag open state
|
||
//------------------------------------------------------------------
|
||
_stateRawtextEndTagOpen(cp) {
|
||
if (isAsciiLetter(cp)) {
|
||
this.state = State.RAWTEXT_END_TAG_NAME;
|
||
this._stateRawtextEndTagName(cp);
|
||
} else {
|
||
this._emitChars("</");
|
||
this.state = State.RAWTEXT;
|
||
this._stateRawtext(cp);
|
||
}
|
||
}
|
||
// RAWTEXT end tag name state
|
||
//------------------------------------------------------------------
|
||
_stateRawtextEndTagName(cp) {
|
||
if (this.handleSpecialEndTag(cp)) {
|
||
this._emitChars("</");
|
||
this.state = State.RAWTEXT;
|
||
this._stateRawtext(cp);
|
||
}
|
||
}
|
||
// Script data less-than sign state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataLessThanSign(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SOLIDUS: {
|
||
this.state = State.SCRIPT_DATA_END_TAG_OPEN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EXCLAMATION_MARK: {
|
||
this.state = State.SCRIPT_DATA_ESCAPE_START;
|
||
this._emitChars("<!");
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitChars("<");
|
||
this.state = State.SCRIPT_DATA;
|
||
this._stateScriptData(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data end tag open state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEndTagOpen(cp) {
|
||
if (isAsciiLetter(cp)) {
|
||
this.state = State.SCRIPT_DATA_END_TAG_NAME;
|
||
this._stateScriptDataEndTagName(cp);
|
||
} else {
|
||
this._emitChars("</");
|
||
this.state = State.SCRIPT_DATA;
|
||
this._stateScriptData(cp);
|
||
}
|
||
}
|
||
// Script data end tag name state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEndTagName(cp) {
|
||
if (this.handleSpecialEndTag(cp)) {
|
||
this._emitChars("</");
|
||
this.state = State.SCRIPT_DATA;
|
||
this._stateScriptData(cp);
|
||
}
|
||
}
|
||
// Script data escape start state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapeStart(cp) {
|
||
if (cp === CODE_POINTS.HYPHEN_MINUS) {
|
||
this.state = State.SCRIPT_DATA_ESCAPE_START_DASH;
|
||
this._emitChars("-");
|
||
} else {
|
||
this.state = State.SCRIPT_DATA;
|
||
this._stateScriptData(cp);
|
||
}
|
||
}
|
||
// Script data escape start dash state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapeStartDash(cp) {
|
||
if (cp === CODE_POINTS.HYPHEN_MINUS) {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH;
|
||
this._emitChars("-");
|
||
} else {
|
||
this.state = State.SCRIPT_DATA;
|
||
this._stateScriptData(cp);
|
||
}
|
||
}
|
||
// Script data escaped state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscaped(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_DASH;
|
||
this._emitChars("-");
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data escaped dash state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapedDash(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH;
|
||
this._emitChars("-");
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data escaped dash dash state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapedDashDash(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this._emitChars("-");
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA;
|
||
this._emitChars(">");
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data escaped less-than sign state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapedLessThanSign(cp) {
|
||
if (cp === CODE_POINTS.SOLIDUS) {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;
|
||
} else if (isAsciiLetter(cp)) {
|
||
this._emitChars("<");
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START;
|
||
this._stateScriptDataDoubleEscapeStart(cp);
|
||
} else {
|
||
this._emitChars("<");
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._stateScriptDataEscaped(cp);
|
||
}
|
||
}
|
||
// Script data escaped end tag open state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapedEndTagOpen(cp) {
|
||
if (isAsciiLetter(cp)) {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME;
|
||
this._stateScriptDataEscapedEndTagName(cp);
|
||
} else {
|
||
this._emitChars("</");
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._stateScriptDataEscaped(cp);
|
||
}
|
||
}
|
||
// Script data escaped end tag name state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapedEndTagName(cp) {
|
||
if (this.handleSpecialEndTag(cp)) {
|
||
this._emitChars("</");
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._stateScriptDataEscaped(cp);
|
||
}
|
||
}
|
||
// Script data double escape start state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataDoubleEscapeStart(cp) {
|
||
if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) {
|
||
this._emitCodePoint(cp);
|
||
for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) {
|
||
this._emitCodePoint(this._consume());
|
||
}
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
} else if (!this._ensureHibernation()) {
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._stateScriptDataEscaped(cp);
|
||
}
|
||
}
|
||
// Script data double escaped state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataDoubleEscaped(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH;
|
||
this._emitChars("-");
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;
|
||
this._emitChars("<");
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data double escaped dash state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataDoubleEscapedDash(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH;
|
||
this._emitChars("-");
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;
|
||
this._emitChars("<");
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data double escaped dash dash state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataDoubleEscapedDashDash(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this._emitChars("-");
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;
|
||
this._emitChars("<");
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA;
|
||
this._emitChars(">");
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data double escaped less-than sign state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataDoubleEscapedLessThanSign(cp) {
|
||
if (cp === CODE_POINTS.SOLIDUS) {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_END;
|
||
this._emitChars("/");
|
||
} else {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
this._stateScriptDataDoubleEscaped(cp);
|
||
}
|
||
}
|
||
// Script data double escape end state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataDoubleEscapeEnd(cp) {
|
||
if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) {
|
||
this._emitCodePoint(cp);
|
||
for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) {
|
||
this._emitCodePoint(this._consume());
|
||
}
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
} else if (!this._ensureHibernation()) {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
this._stateScriptDataDoubleEscaped(cp);
|
||
}
|
||
}
|
||
// Before attribute name state
|
||
//------------------------------------------------------------------
|
||
_stateBeforeAttributeName(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.SOLIDUS:
|
||
case CODE_POINTS.GREATER_THAN_SIGN:
|
||
case CODE_POINTS.EOF: {
|
||
this.state = State.AFTER_ATTRIBUTE_NAME;
|
||
this._stateAfterAttributeName(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EQUALS_SIGN: {
|
||
this._err(ERR.unexpectedEqualsSignBeforeAttributeName);
|
||
this._createAttr("=");
|
||
this.state = State.ATTRIBUTE_NAME;
|
||
break;
|
||
}
|
||
default: {
|
||
this._createAttr("");
|
||
this.state = State.ATTRIBUTE_NAME;
|
||
this._stateAttributeName(cp);
|
||
}
|
||
}
|
||
}
|
||
// Attribute name state
|
||
//------------------------------------------------------------------
|
||
_stateAttributeName(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED:
|
||
case CODE_POINTS.SOLIDUS:
|
||
case CODE_POINTS.GREATER_THAN_SIGN:
|
||
case CODE_POINTS.EOF: {
|
||
this._leaveAttrName();
|
||
this.state = State.AFTER_ATTRIBUTE_NAME;
|
||
this._stateAfterAttributeName(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EQUALS_SIGN: {
|
||
this._leaveAttrName();
|
||
this.state = State.BEFORE_ATTRIBUTE_VALUE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK:
|
||
case CODE_POINTS.APOSTROPHE:
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this._err(ERR.unexpectedCharacterInAttributeName);
|
||
this.currentAttr.name += String.fromCodePoint(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.currentAttr.name += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
default: {
|
||
this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);
|
||
}
|
||
}
|
||
}
|
||
// After attribute name state
|
||
//------------------------------------------------------------------
|
||
_stateAfterAttributeName(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.SOLIDUS: {
|
||
this.state = State.SELF_CLOSING_START_TAG;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EQUALS_SIGN: {
|
||
this.state = State.BEFORE_ATTRIBUTE_VALUE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentTagToken();
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._createAttr("");
|
||
this.state = State.ATTRIBUTE_NAME;
|
||
this._stateAttributeName(cp);
|
||
}
|
||
}
|
||
}
|
||
// Before attribute value state
|
||
//------------------------------------------------------------------
|
||
_stateBeforeAttributeValue(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this.state = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this.state = State.ATTRIBUTE_VALUE_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingAttributeValue);
|
||
this.state = State.DATA;
|
||
this.emitCurrentTagToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.ATTRIBUTE_VALUE_UNQUOTED;
|
||
this._stateAttributeValueUnquoted(cp);
|
||
}
|
||
}
|
||
}
|
||
// Attribute value (double-quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateAttributeValueDoubleQuoted(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.AMPERSAND: {
|
||
this.returnState = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED;
|
||
this.state = State.CHARACTER_REFERENCE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.currentAttr.value += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.currentAttr.value += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Attribute value (single-quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateAttributeValueSingleQuoted(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.AMPERSAND: {
|
||
this.returnState = State.ATTRIBUTE_VALUE_SINGLE_QUOTED;
|
||
this.state = State.CHARACTER_REFERENCE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.currentAttr.value += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.currentAttr.value += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Attribute value (unquoted) state
|
||
//------------------------------------------------------------------
|
||
_stateAttributeValueUnquoted(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this._leaveAttrValue();
|
||
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
||
break;
|
||
}
|
||
case CODE_POINTS.AMPERSAND: {
|
||
this.returnState = State.ATTRIBUTE_VALUE_UNQUOTED;
|
||
this.state = State.CHARACTER_REFERENCE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._leaveAttrValue();
|
||
this.state = State.DATA;
|
||
this.emitCurrentTagToken();
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.currentAttr.value += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK:
|
||
case CODE_POINTS.APOSTROPHE:
|
||
case CODE_POINTS.LESS_THAN_SIGN:
|
||
case CODE_POINTS.EQUALS_SIGN:
|
||
case CODE_POINTS.GRAVE_ACCENT: {
|
||
this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);
|
||
this.currentAttr.value += String.fromCodePoint(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.currentAttr.value += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// After attribute value (quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateAfterAttributeValueQuoted(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this._leaveAttrValue();
|
||
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
||
break;
|
||
}
|
||
case CODE_POINTS.SOLIDUS: {
|
||
this._leaveAttrValue();
|
||
this.state = State.SELF_CLOSING_START_TAG;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._leaveAttrValue();
|
||
this.state = State.DATA;
|
||
this.emitCurrentTagToken();
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingWhitespaceBetweenAttributes);
|
||
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
||
this._stateBeforeAttributeName(cp);
|
||
}
|
||
}
|
||
}
|
||
// Self-closing start tag state
|
||
//------------------------------------------------------------------
|
||
_stateSelfClosingStartTag(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
const token = this.currentToken;
|
||
token.selfClosing = true;
|
||
this.state = State.DATA;
|
||
this.emitCurrentTagToken();
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.unexpectedSolidusInTag);
|
||
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
||
this._stateBeforeAttributeName(cp);
|
||
}
|
||
}
|
||
}
|
||
// Bogus comment state
|
||
//------------------------------------------------------------------
|
||
_stateBogusComment(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentComment(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this.emitCurrentComment(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.data += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
default: {
|
||
token.data += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Markup declaration open state
|
||
//------------------------------------------------------------------
|
||
_stateMarkupDeclarationOpen(cp) {
|
||
if (this._consumeSequenceIfMatch(SEQUENCES.DASH_DASH, true)) {
|
||
this._createCommentToken(SEQUENCES.DASH_DASH.length + 1);
|
||
this.state = State.COMMENT_START;
|
||
} else if (this._consumeSequenceIfMatch(SEQUENCES.DOCTYPE, false)) {
|
||
this.currentLocation = this.getCurrentLocation(SEQUENCES.DOCTYPE.length + 1);
|
||
this.state = State.DOCTYPE;
|
||
} else if (this._consumeSequenceIfMatch(SEQUENCES.CDATA_START, true)) {
|
||
if (this.inForeignNode) {
|
||
this.state = State.CDATA_SECTION;
|
||
} else {
|
||
this._err(ERR.cdataInHtmlContent);
|
||
this._createCommentToken(SEQUENCES.CDATA_START.length + 1);
|
||
this.currentToken.data = "[CDATA[";
|
||
this.state = State.BOGUS_COMMENT;
|
||
}
|
||
} else if (!this._ensureHibernation()) {
|
||
this._err(ERR.incorrectlyOpenedComment);
|
||
this._createCommentToken(2);
|
||
this.state = State.BOGUS_COMMENT;
|
||
this._stateBogusComment(cp);
|
||
}
|
||
}
|
||
// Comment start state
|
||
//------------------------------------------------------------------
|
||
_stateCommentStart(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.COMMENT_START_DASH;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.abruptClosingOfEmptyComment);
|
||
this.state = State.DATA;
|
||
const token = this.currentToken;
|
||
this.emitCurrentComment(token);
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// Comment start dash state
|
||
//------------------------------------------------------------------
|
||
_stateCommentStartDash(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.COMMENT_END;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.abruptClosingOfEmptyComment);
|
||
this.state = State.DATA;
|
||
this.emitCurrentComment(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInComment);
|
||
this.emitCurrentComment(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.data += "-";
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// Comment state
|
||
//------------------------------------------------------------------
|
||
_stateComment(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.COMMENT_END_DASH;
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
token.data += "<";
|
||
this.state = State.COMMENT_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.data += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInComment);
|
||
this.emitCurrentComment(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.data += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Comment less-than sign state
|
||
//------------------------------------------------------------------
|
||
_stateCommentLessThanSign(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.EXCLAMATION_MARK: {
|
||
token.data += "!";
|
||
this.state = State.COMMENT_LESS_THAN_SIGN_BANG;
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
token.data += "<";
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// Comment less-than sign bang state
|
||
//------------------------------------------------------------------
|
||
_stateCommentLessThanSignBang(cp) {
|
||
if (cp === CODE_POINTS.HYPHEN_MINUS) {
|
||
this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH;
|
||
} else {
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
// Comment less-than sign bang dash state
|
||
//------------------------------------------------------------------
|
||
_stateCommentLessThanSignBangDash(cp) {
|
||
if (cp === CODE_POINTS.HYPHEN_MINUS) {
|
||
this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH;
|
||
} else {
|
||
this.state = State.COMMENT_END_DASH;
|
||
this._stateCommentEndDash(cp);
|
||
}
|
||
}
|
||
// Comment less-than sign bang dash dash state
|
||
//------------------------------------------------------------------
|
||
_stateCommentLessThanSignBangDashDash(cp) {
|
||
if (cp !== CODE_POINTS.GREATER_THAN_SIGN && cp !== CODE_POINTS.EOF) {
|
||
this._err(ERR.nestedComment);
|
||
}
|
||
this.state = State.COMMENT_END;
|
||
this._stateCommentEnd(cp);
|
||
}
|
||
// Comment end dash state
|
||
//------------------------------------------------------------------
|
||
_stateCommentEndDash(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.COMMENT_END;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInComment);
|
||
this.emitCurrentComment(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.data += "-";
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// Comment end state
|
||
//------------------------------------------------------------------
|
||
_stateCommentEnd(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentComment(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EXCLAMATION_MARK: {
|
||
this.state = State.COMMENT_END_BANG;
|
||
break;
|
||
}
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
token.data += "-";
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInComment);
|
||
this.emitCurrentComment(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.data += "--";
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// Comment end bang state
|
||
//------------------------------------------------------------------
|
||
_stateCommentEndBang(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
token.data += "--!";
|
||
this.state = State.COMMENT_END_DASH;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.incorrectlyClosedComment);
|
||
this.state = State.DATA;
|
||
this.emitCurrentComment(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInComment);
|
||
this.emitCurrentComment(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.data += "--!";
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// DOCTYPE state
|
||
//------------------------------------------------------------------
|
||
_stateDoctype(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this.state = State.BEFORE_DOCTYPE_NAME;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.BEFORE_DOCTYPE_NAME;
|
||
this._stateBeforeDoctypeName(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
this._createDoctypeToken(null);
|
||
const token = this.currentToken;
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingWhitespaceBeforeDoctypeName);
|
||
this.state = State.BEFORE_DOCTYPE_NAME;
|
||
this._stateBeforeDoctypeName(cp);
|
||
}
|
||
}
|
||
}
|
||
// Before DOCTYPE name state
|
||
//------------------------------------------------------------------
|
||
_stateBeforeDoctypeName(cp) {
|
||
if (isAsciiUpper(cp)) {
|
||
this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp)));
|
||
this.state = State.DOCTYPE_NAME;
|
||
} else
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._createDoctypeToken(REPLACEMENT_CHARACTER);
|
||
this.state = State.DOCTYPE_NAME;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingDoctypeName);
|
||
this._createDoctypeToken(null);
|
||
const token = this.currentToken;
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
this._createDoctypeToken(null);
|
||
const token = this.currentToken;
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._createDoctypeToken(String.fromCodePoint(cp));
|
||
this.state = State.DOCTYPE_NAME;
|
||
}
|
||
}
|
||
}
|
||
// DOCTYPE name state
|
||
//------------------------------------------------------------------
|
||
_stateDoctypeName(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this.state = State.AFTER_DOCTYPE_NAME;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.name += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);
|
||
}
|
||
}
|
||
}
|
||
// After DOCTYPE name state
|
||
//------------------------------------------------------------------
|
||
_stateAfterDoctypeName(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
if (this._consumeSequenceIfMatch(SEQUENCES.PUBLIC, false)) {
|
||
this.state = State.AFTER_DOCTYPE_PUBLIC_KEYWORD;
|
||
} else if (this._consumeSequenceIfMatch(SEQUENCES.SYSTEM, false)) {
|
||
this.state = State.AFTER_DOCTYPE_SYSTEM_KEYWORD;
|
||
} else if (!this._ensureHibernation()) {
|
||
this._err(ERR.invalidCharacterSequenceAfterDoctypeName);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
// After DOCTYPE public keyword state
|
||
//------------------------------------------------------------------
|
||
_stateAfterDoctypePublicKeyword(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this.state = State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);
|
||
token.publicId = "";
|
||
this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);
|
||
token.publicId = "";
|
||
this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingDoctypePublicIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// Before DOCTYPE public identifier state
|
||
//------------------------------------------------------------------
|
||
_stateBeforeDoctypePublicIdentifier(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
token.publicId = "";
|
||
this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
token.publicId = "";
|
||
this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingDoctypePublicIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// DOCTYPE public identifier (double-quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateDoctypePublicIdentifierDoubleQuoted(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.publicId += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.abruptDoctypePublicIdentifier);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.publicId += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// DOCTYPE public identifier (single-quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateDoctypePublicIdentifierSingleQuoted(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.publicId += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.abruptDoctypePublicIdentifier);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.publicId += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// After DOCTYPE public identifier state
|
||
//------------------------------------------------------------------
|
||
_stateAfterDoctypePublicIdentifier(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this.state = State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// Between DOCTYPE public and system identifiers state
|
||
//------------------------------------------------------------------
|
||
_stateBetweenDoctypePublicAndSystemIdentifiers(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// After DOCTYPE system keyword state
|
||
//------------------------------------------------------------------
|
||
_stateAfterDoctypeSystemKeyword(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this.state = State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// Before DOCTYPE system identifier state
|
||
//------------------------------------------------------------------
|
||
_stateBeforeDoctypeSystemIdentifier(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// DOCTYPE system identifier (double-quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateDoctypeSystemIdentifierDoubleQuoted(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.systemId += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.abruptDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.systemId += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// DOCTYPE system identifier (single-quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateDoctypeSystemIdentifierSingleQuoted(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.systemId += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.abruptDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.systemId += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// After DOCTYPE system identifier state
|
||
//------------------------------------------------------------------
|
||
_stateAfterDoctypeSystemIdentifier(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier);
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// Bogus DOCTYPE state
|
||
//------------------------------------------------------------------
|
||
_stateBogusDoctype(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
// CDATA section state
|
||
//------------------------------------------------------------------
|
||
_stateCdataSection(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.RIGHT_SQUARE_BRACKET: {
|
||
this.state = State.CDATA_SECTION_BRACKET;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInCdata);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// CDATA section bracket state
|
||
//------------------------------------------------------------------
|
||
_stateCdataSectionBracket(cp) {
|
||
if (cp === CODE_POINTS.RIGHT_SQUARE_BRACKET) {
|
||
this.state = State.CDATA_SECTION_END;
|
||
} else {
|
||
this._emitChars("]");
|
||
this.state = State.CDATA_SECTION;
|
||
this._stateCdataSection(cp);
|
||
}
|
||
}
|
||
// CDATA section end state
|
||
//------------------------------------------------------------------
|
||
_stateCdataSectionEnd(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.RIGHT_SQUARE_BRACKET: {
|
||
this._emitChars("]");
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitChars("]]");
|
||
this.state = State.CDATA_SECTION;
|
||
this._stateCdataSection(cp);
|
||
}
|
||
}
|
||
}
|
||
// Character reference state
|
||
//------------------------------------------------------------------
|
||
_stateCharacterReference(cp) {
|
||
if (cp === CODE_POINTS.NUMBER_SIGN) {
|
||
this.state = State.NUMERIC_CHARACTER_REFERENCE;
|
||
} else if (isAsciiAlphaNumeric(cp)) {
|
||
this.state = State.NAMED_CHARACTER_REFERENCE;
|
||
this._stateNamedCharacterReference(cp);
|
||
} else {
|
||
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
|
||
this._reconsumeInState(this.returnState, cp);
|
||
}
|
||
}
|
||
// Named character reference state
|
||
//------------------------------------------------------------------
|
||
_stateNamedCharacterReference(cp) {
|
||
const matchResult = this._matchNamedCharacterReference(cp);
|
||
if (this._ensureHibernation()) {
|
||
} else if (matchResult) {
|
||
for (let i = 0; i < matchResult.length; i++) {
|
||
this._flushCodePointConsumedAsCharacterReference(matchResult[i]);
|
||
}
|
||
this.state = this.returnState;
|
||
} else {
|
||
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
|
||
this.state = State.AMBIGUOUS_AMPERSAND;
|
||
}
|
||
}
|
||
// Ambiguos ampersand state
|
||
//------------------------------------------------------------------
|
||
_stateAmbiguousAmpersand(cp) {
|
||
if (isAsciiAlphaNumeric(cp)) {
|
||
this._flushCodePointConsumedAsCharacterReference(cp);
|
||
} else {
|
||
if (cp === CODE_POINTS.SEMICOLON) {
|
||
this._err(ERR.unknownNamedCharacterReference);
|
||
}
|
||
this._reconsumeInState(this.returnState, cp);
|
||
}
|
||
}
|
||
// Numeric character reference state
|
||
//------------------------------------------------------------------
|
||
_stateNumericCharacterReference(cp) {
|
||
this.charRefCode = 0;
|
||
if (cp === CODE_POINTS.LATIN_SMALL_X || cp === CODE_POINTS.LATIN_CAPITAL_X) {
|
||
this.state = State.HEXADEMICAL_CHARACTER_REFERENCE_START;
|
||
} else if (isAsciiDigit(cp)) {
|
||
this.state = State.DECIMAL_CHARACTER_REFERENCE;
|
||
this._stateDecimalCharacterReference(cp);
|
||
} else {
|
||
this._err(ERR.absenceOfDigitsInNumericCharacterReference);
|
||
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
|
||
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.NUMBER_SIGN);
|
||
this._reconsumeInState(this.returnState, cp);
|
||
}
|
||
}
|
||
// Hexademical character reference start state
|
||
//------------------------------------------------------------------
|
||
_stateHexademicalCharacterReferenceStart(cp) {
|
||
if (isAsciiHexDigit(cp)) {
|
||
this.state = State.HEXADEMICAL_CHARACTER_REFERENCE;
|
||
this._stateHexademicalCharacterReference(cp);
|
||
} else {
|
||
this._err(ERR.absenceOfDigitsInNumericCharacterReference);
|
||
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
|
||
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.NUMBER_SIGN);
|
||
this._unconsume(2);
|
||
this.state = this.returnState;
|
||
}
|
||
}
|
||
// Hexademical character reference state
|
||
//------------------------------------------------------------------
|
||
_stateHexademicalCharacterReference(cp) {
|
||
if (isAsciiUpperHexDigit(cp)) {
|
||
this.charRefCode = this.charRefCode * 16 + cp - 55;
|
||
} else if (isAsciiLowerHexDigit(cp)) {
|
||
this.charRefCode = this.charRefCode * 16 + cp - 87;
|
||
} else if (isAsciiDigit(cp)) {
|
||
this.charRefCode = this.charRefCode * 16 + cp - 48;
|
||
} else if (cp === CODE_POINTS.SEMICOLON) {
|
||
this.state = State.NUMERIC_CHARACTER_REFERENCE_END;
|
||
} else {
|
||
this._err(ERR.missingSemicolonAfterCharacterReference);
|
||
this.state = State.NUMERIC_CHARACTER_REFERENCE_END;
|
||
this._stateNumericCharacterReferenceEnd(cp);
|
||
}
|
||
}
|
||
// Decimal character reference state
|
||
//------------------------------------------------------------------
|
||
_stateDecimalCharacterReference(cp) {
|
||
if (isAsciiDigit(cp)) {
|
||
this.charRefCode = this.charRefCode * 10 + cp - 48;
|
||
} else if (cp === CODE_POINTS.SEMICOLON) {
|
||
this.state = State.NUMERIC_CHARACTER_REFERENCE_END;
|
||
} else {
|
||
this._err(ERR.missingSemicolonAfterCharacterReference);
|
||
this.state = State.NUMERIC_CHARACTER_REFERENCE_END;
|
||
this._stateNumericCharacterReferenceEnd(cp);
|
||
}
|
||
}
|
||
// Numeric character reference end state
|
||
//------------------------------------------------------------------
|
||
_stateNumericCharacterReferenceEnd(cp) {
|
||
if (this.charRefCode === CODE_POINTS.NULL) {
|
||
this._err(ERR.nullCharacterReference);
|
||
this.charRefCode = CODE_POINTS.REPLACEMENT_CHARACTER;
|
||
} else if (this.charRefCode > 1114111) {
|
||
this._err(ERR.characterReferenceOutsideUnicodeRange);
|
||
this.charRefCode = CODE_POINTS.REPLACEMENT_CHARACTER;
|
||
} else if (isSurrogate(this.charRefCode)) {
|
||
this._err(ERR.surrogateCharacterReference);
|
||
this.charRefCode = CODE_POINTS.REPLACEMENT_CHARACTER;
|
||
} else if (isUndefinedCodePoint(this.charRefCode)) {
|
||
this._err(ERR.noncharacterCharacterReference);
|
||
} else if (isControlCodePoint(this.charRefCode) || this.charRefCode === CODE_POINTS.CARRIAGE_RETURN) {
|
||
this._err(ERR.controlCharacterReference);
|
||
const replacement = C1_CONTROLS_REFERENCE_REPLACEMENTS.get(this.charRefCode);
|
||
if (replacement !== void 0) {
|
||
this.charRefCode = replacement;
|
||
}
|
||
}
|
||
this._flushCodePointConsumedAsCharacterReference(this.charRefCode);
|
||
this._reconsumeInState(this.returnState, cp);
|
||
}
|
||
};
|
||
|
||
// node_modules/parse5/dist/parser/open-element-stack.js
|
||
var IMPLICIT_END_TAG_REQUIRED = /* @__PURE__ */ new Set([TAG_ID.DD, TAG_ID.DT, TAG_ID.LI, TAG_ID.OPTGROUP, TAG_ID.OPTION, TAG_ID.P, TAG_ID.RB, TAG_ID.RP, TAG_ID.RT, TAG_ID.RTC]);
|
||
var IMPLICIT_END_TAG_REQUIRED_THOROUGHLY = /* @__PURE__ */ new Set([
|
||
...IMPLICIT_END_TAG_REQUIRED,
|
||
TAG_ID.CAPTION,
|
||
TAG_ID.COLGROUP,
|
||
TAG_ID.TBODY,
|
||
TAG_ID.TD,
|
||
TAG_ID.TFOOT,
|
||
TAG_ID.TH,
|
||
TAG_ID.THEAD,
|
||
TAG_ID.TR
|
||
]);
|
||
var SCOPING_ELEMENT_NS = /* @__PURE__ */ new Map([
|
||
[TAG_ID.APPLET, NS.HTML],
|
||
[TAG_ID.CAPTION, NS.HTML],
|
||
[TAG_ID.HTML, NS.HTML],
|
||
[TAG_ID.MARQUEE, NS.HTML],
|
||
[TAG_ID.OBJECT, NS.HTML],
|
||
[TAG_ID.TABLE, NS.HTML],
|
||
[TAG_ID.TD, NS.HTML],
|
||
[TAG_ID.TEMPLATE, NS.HTML],
|
||
[TAG_ID.TH, NS.HTML],
|
||
[TAG_ID.ANNOTATION_XML, NS.MATHML],
|
||
[TAG_ID.MI, NS.MATHML],
|
||
[TAG_ID.MN, NS.MATHML],
|
||
[TAG_ID.MO, NS.MATHML],
|
||
[TAG_ID.MS, NS.MATHML],
|
||
[TAG_ID.MTEXT, NS.MATHML],
|
||
[TAG_ID.DESC, NS.SVG],
|
||
[TAG_ID.FOREIGN_OBJECT, NS.SVG],
|
||
[TAG_ID.TITLE, NS.SVG]
|
||
]);
|
||
var NAMED_HEADERS = [TAG_ID.H1, TAG_ID.H2, TAG_ID.H3, TAG_ID.H4, TAG_ID.H5, TAG_ID.H6];
|
||
var TABLE_ROW_CONTEXT = [TAG_ID.TR, TAG_ID.TEMPLATE, TAG_ID.HTML];
|
||
var TABLE_BODY_CONTEXT = [TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD, TAG_ID.TEMPLATE, TAG_ID.HTML];
|
||
var TABLE_CONTEXT = [TAG_ID.TABLE, TAG_ID.TEMPLATE, TAG_ID.HTML];
|
||
var TABLE_CELLS = [TAG_ID.TD, TAG_ID.TH];
|
||
var OpenElementStack = class {
|
||
get currentTmplContentOrNode() {
|
||
return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
|
||
}
|
||
constructor(document, treeAdapter, handler) {
|
||
this.treeAdapter = treeAdapter;
|
||
this.handler = handler;
|
||
this.items = [];
|
||
this.tagIDs = [];
|
||
this.stackTop = -1;
|
||
this.tmplCount = 0;
|
||
this.currentTagId = TAG_ID.UNKNOWN;
|
||
this.current = document;
|
||
}
|
||
//Index of element
|
||
_indexOf(element) {
|
||
return this.items.lastIndexOf(element, this.stackTop);
|
||
}
|
||
//Update current element
|
||
_isInTemplate() {
|
||
return this.currentTagId === TAG_ID.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML;
|
||
}
|
||
_updateCurrentElement() {
|
||
this.current = this.items[this.stackTop];
|
||
this.currentTagId = this.tagIDs[this.stackTop];
|
||
}
|
||
//Mutations
|
||
push(element, tagID) {
|
||
this.stackTop++;
|
||
this.items[this.stackTop] = element;
|
||
this.current = element;
|
||
this.tagIDs[this.stackTop] = tagID;
|
||
this.currentTagId = tagID;
|
||
if (this._isInTemplate()) {
|
||
this.tmplCount++;
|
||
}
|
||
this.handler.onItemPush(element, tagID, true);
|
||
}
|
||
pop() {
|
||
const popped = this.current;
|
||
if (this.tmplCount > 0 && this._isInTemplate()) {
|
||
this.tmplCount--;
|
||
}
|
||
this.stackTop--;
|
||
this._updateCurrentElement();
|
||
this.handler.onItemPop(popped, true);
|
||
}
|
||
replace(oldElement, newElement) {
|
||
const idx = this._indexOf(oldElement);
|
||
this.items[idx] = newElement;
|
||
if (idx === this.stackTop) {
|
||
this.current = newElement;
|
||
}
|
||
}
|
||
insertAfter(referenceElement, newElement, newElementID) {
|
||
const insertionIdx = this._indexOf(referenceElement) + 1;
|
||
this.items.splice(insertionIdx, 0, newElement);
|
||
this.tagIDs.splice(insertionIdx, 0, newElementID);
|
||
this.stackTop++;
|
||
if (insertionIdx === this.stackTop) {
|
||
this._updateCurrentElement();
|
||
}
|
||
this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop);
|
||
}
|
||
popUntilTagNamePopped(tagName) {
|
||
let targetIdx = this.stackTop + 1;
|
||
do {
|
||
targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1);
|
||
} while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML);
|
||
this.shortenToLength(targetIdx < 0 ? 0 : targetIdx);
|
||
}
|
||
shortenToLength(idx) {
|
||
while (this.stackTop >= idx) {
|
||
const popped = this.current;
|
||
if (this.tmplCount > 0 && this._isInTemplate()) {
|
||
this.tmplCount -= 1;
|
||
}
|
||
this.stackTop--;
|
||
this._updateCurrentElement();
|
||
this.handler.onItemPop(popped, this.stackTop < idx);
|
||
}
|
||
}
|
||
popUntilElementPopped(element) {
|
||
const idx = this._indexOf(element);
|
||
this.shortenToLength(idx < 0 ? 0 : idx);
|
||
}
|
||
popUntilPopped(tagNames, targetNS) {
|
||
const idx = this._indexOfTagNames(tagNames, targetNS);
|
||
this.shortenToLength(idx < 0 ? 0 : idx);
|
||
}
|
||
popUntilNumberedHeaderPopped() {
|
||
this.popUntilPopped(NAMED_HEADERS, NS.HTML);
|
||
}
|
||
popUntilTableCellPopped() {
|
||
this.popUntilPopped(TABLE_CELLS, NS.HTML);
|
||
}
|
||
popAllUpToHtmlElement() {
|
||
this.tmplCount = 0;
|
||
this.shortenToLength(1);
|
||
}
|
||
_indexOfTagNames(tagNames, namespace) {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
if (tagNames.includes(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) {
|
||
return i;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
clearBackTo(tagNames, targetNS) {
|
||
const idx = this._indexOfTagNames(tagNames, targetNS);
|
||
this.shortenToLength(idx + 1);
|
||
}
|
||
clearBackToTableContext() {
|
||
this.clearBackTo(TABLE_CONTEXT, NS.HTML);
|
||
}
|
||
clearBackToTableBodyContext() {
|
||
this.clearBackTo(TABLE_BODY_CONTEXT, NS.HTML);
|
||
}
|
||
clearBackToTableRowContext() {
|
||
this.clearBackTo(TABLE_ROW_CONTEXT, NS.HTML);
|
||
}
|
||
remove(element) {
|
||
const idx = this._indexOf(element);
|
||
if (idx >= 0) {
|
||
if (idx === this.stackTop) {
|
||
this.pop();
|
||
} else {
|
||
this.items.splice(idx, 1);
|
||
this.tagIDs.splice(idx, 1);
|
||
this.stackTop--;
|
||
this._updateCurrentElement();
|
||
this.handler.onItemPop(element, false);
|
||
}
|
||
}
|
||
}
|
||
//Search
|
||
tryPeekProperlyNestedBodyElement() {
|
||
return this.stackTop >= 1 && this.tagIDs[1] === TAG_ID.BODY ? this.items[1] : null;
|
||
}
|
||
contains(element) {
|
||
return this._indexOf(element) > -1;
|
||
}
|
||
getCommonAncestor(element) {
|
||
const elementIdx = this._indexOf(element) - 1;
|
||
return elementIdx >= 0 ? this.items[elementIdx] : null;
|
||
}
|
||
isRootHtmlElementCurrent() {
|
||
return this.stackTop === 0 && this.tagIDs[0] === TAG_ID.HTML;
|
||
}
|
||
//Element in scope
|
||
hasInScope(tagName) {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (tn === tagName && ns === NS.HTML) {
|
||
return true;
|
||
}
|
||
if (SCOPING_ELEMENT_NS.get(tn) === ns) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
hasNumberedHeaderInScope() {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (isNumberedHeader(tn) && ns === NS.HTML) {
|
||
return true;
|
||
}
|
||
if (SCOPING_ELEMENT_NS.get(tn) === ns) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
hasInListItemScope(tagName) {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (tn === tagName && ns === NS.HTML) {
|
||
return true;
|
||
}
|
||
if ((tn === TAG_ID.UL || tn === TAG_ID.OL) && ns === NS.HTML || SCOPING_ELEMENT_NS.get(tn) === ns) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
hasInButtonScope(tagName) {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (tn === tagName && ns === NS.HTML) {
|
||
return true;
|
||
}
|
||
if (tn === TAG_ID.BUTTON && ns === NS.HTML || SCOPING_ELEMENT_NS.get(tn) === ns) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
hasInTableScope(tagName) {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (ns !== NS.HTML) {
|
||
continue;
|
||
}
|
||
if (tn === tagName) {
|
||
return true;
|
||
}
|
||
if (tn === TAG_ID.TABLE || tn === TAG_ID.TEMPLATE || tn === TAG_ID.HTML) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
hasTableBodyContextInTableScope() {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (ns !== NS.HTML) {
|
||
continue;
|
||
}
|
||
if (tn === TAG_ID.TBODY || tn === TAG_ID.THEAD || tn === TAG_ID.TFOOT) {
|
||
return true;
|
||
}
|
||
if (tn === TAG_ID.TABLE || tn === TAG_ID.HTML) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
hasInSelectScope(tagName) {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (ns !== NS.HTML) {
|
||
continue;
|
||
}
|
||
if (tn === tagName) {
|
||
return true;
|
||
}
|
||
if (tn !== TAG_ID.OPTION && tn !== TAG_ID.OPTGROUP) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
//Implied end tags
|
||
generateImpliedEndTags() {
|
||
while (IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) {
|
||
this.pop();
|
||
}
|
||
}
|
||
generateImpliedEndTagsThoroughly() {
|
||
while (IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {
|
||
this.pop();
|
||
}
|
||
}
|
||
generateImpliedEndTagsWithExclusion(exclusionId) {
|
||
while (this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {
|
||
this.pop();
|
||
}
|
||
}
|
||
};
|
||
|
||
// node_modules/parse5/dist/parser/formatting-element-list.js
|
||
var NOAH_ARK_CAPACITY = 3;
|
||
var EntryType;
|
||
(function(EntryType2) {
|
||
EntryType2[EntryType2["Marker"] = 0] = "Marker";
|
||
EntryType2[EntryType2["Element"] = 1] = "Element";
|
||
})(EntryType = EntryType || (EntryType = {}));
|
||
var MARKER = { type: EntryType.Marker };
|
||
var FormattingElementList = class {
|
||
constructor(treeAdapter) {
|
||
this.treeAdapter = treeAdapter;
|
||
this.entries = [];
|
||
this.bookmark = null;
|
||
}
|
||
//Noah Ark's condition
|
||
//OPTIMIZATION: at first we try to find possible candidates for exclusion using
|
||
//lightweight heuristics without thorough attributes check.
|
||
_getNoahArkConditionCandidates(newElement, neAttrs) {
|
||
const candidates = [];
|
||
const neAttrsLength = neAttrs.length;
|
||
const neTagName = this.treeAdapter.getTagName(newElement);
|
||
const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);
|
||
for (let i = 0; i < this.entries.length; i++) {
|
||
const entry = this.entries[i];
|
||
if (entry.type === EntryType.Marker) {
|
||
break;
|
||
}
|
||
const { element } = entry;
|
||
if (this.treeAdapter.getTagName(element) === neTagName && this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) {
|
||
const elementAttrs = this.treeAdapter.getAttrList(element);
|
||
if (elementAttrs.length === neAttrsLength) {
|
||
candidates.push({ idx: i, attrs: elementAttrs });
|
||
}
|
||
}
|
||
}
|
||
return candidates;
|
||
}
|
||
_ensureNoahArkCondition(newElement) {
|
||
if (this.entries.length < NOAH_ARK_CAPACITY)
|
||
return;
|
||
const neAttrs = this.treeAdapter.getAttrList(newElement);
|
||
const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs);
|
||
if (candidates.length < NOAH_ARK_CAPACITY)
|
||
return;
|
||
const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value]));
|
||
let validCandidates = 0;
|
||
for (let i = 0; i < candidates.length; i++) {
|
||
const candidate = candidates[i];
|
||
if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) {
|
||
validCandidates += 1;
|
||
if (validCandidates >= NOAH_ARK_CAPACITY) {
|
||
this.entries.splice(candidate.idx, 1);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
//Mutations
|
||
insertMarker() {
|
||
this.entries.unshift(MARKER);
|
||
}
|
||
pushElement(element, token) {
|
||
this._ensureNoahArkCondition(element);
|
||
this.entries.unshift({
|
||
type: EntryType.Element,
|
||
element,
|
||
token
|
||
});
|
||
}
|
||
insertElementAfterBookmark(element, token) {
|
||
const bookmarkIdx = this.entries.indexOf(this.bookmark);
|
||
this.entries.splice(bookmarkIdx, 0, {
|
||
type: EntryType.Element,
|
||
element,
|
||
token
|
||
});
|
||
}
|
||
removeEntry(entry) {
|
||
const entryIndex = this.entries.indexOf(entry);
|
||
if (entryIndex >= 0) {
|
||
this.entries.splice(entryIndex, 1);
|
||
}
|
||
}
|
||
/**
|
||
* Clears the list of formatting elements up to the last marker.
|
||
*
|
||
* @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker
|
||
*/
|
||
clearToLastMarker() {
|
||
const markerIdx = this.entries.indexOf(MARKER);
|
||
if (markerIdx >= 0) {
|
||
this.entries.splice(0, markerIdx + 1);
|
||
} else {
|
||
this.entries.length = 0;
|
||
}
|
||
}
|
||
//Search
|
||
getElementEntryInScopeWithTagName(tagName) {
|
||
const entry = this.entries.find((entry2) => entry2.type === EntryType.Marker || this.treeAdapter.getTagName(entry2.element) === tagName);
|
||
return entry && entry.type === EntryType.Element ? entry : null;
|
||
}
|
||
getElementEntry(element) {
|
||
return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element);
|
||
}
|
||
};
|
||
|
||
// node_modules/parse5/dist/tree-adapters/default.js
|
||
function createTextNode(value) {
|
||
return {
|
||
nodeName: "#text",
|
||
value,
|
||
parentNode: null
|
||
};
|
||
}
|
||
var defaultTreeAdapter = {
|
||
//Node construction
|
||
createDocument() {
|
||
return {
|
||
nodeName: "#document",
|
||
mode: DOCUMENT_MODE.NO_QUIRKS,
|
||
childNodes: []
|
||
};
|
||
},
|
||
createDocumentFragment() {
|
||
return {
|
||
nodeName: "#document-fragment",
|
||
childNodes: []
|
||
};
|
||
},
|
||
createElement(tagName, namespaceURI, attrs) {
|
||
return {
|
||
nodeName: tagName,
|
||
tagName,
|
||
attrs,
|
||
namespaceURI,
|
||
childNodes: [],
|
||
parentNode: null
|
||
};
|
||
},
|
||
createCommentNode(data) {
|
||
return {
|
||
nodeName: "#comment",
|
||
data,
|
||
parentNode: null
|
||
};
|
||
},
|
||
//Tree mutation
|
||
appendChild(parentNode, newNode) {
|
||
parentNode.childNodes.push(newNode);
|
||
newNode.parentNode = parentNode;
|
||
},
|
||
insertBefore(parentNode, newNode, referenceNode) {
|
||
const insertionIdx = parentNode.childNodes.indexOf(referenceNode);
|
||
parentNode.childNodes.splice(insertionIdx, 0, newNode);
|
||
newNode.parentNode = parentNode;
|
||
},
|
||
setTemplateContent(templateElement, contentElement) {
|
||
templateElement.content = contentElement;
|
||
},
|
||
getTemplateContent(templateElement) {
|
||
return templateElement.content;
|
||
},
|
||
setDocumentType(document, name42, publicId, systemId) {
|
||
const doctypeNode = document.childNodes.find((node) => node.nodeName === "#documentType");
|
||
if (doctypeNode) {
|
||
doctypeNode.name = name42;
|
||
doctypeNode.publicId = publicId;
|
||
doctypeNode.systemId = systemId;
|
||
} else {
|
||
const node = {
|
||
nodeName: "#documentType",
|
||
name: name42,
|
||
publicId,
|
||
systemId,
|
||
parentNode: null
|
||
};
|
||
defaultTreeAdapter.appendChild(document, node);
|
||
}
|
||
},
|
||
setDocumentMode(document, mode) {
|
||
document.mode = mode;
|
||
},
|
||
getDocumentMode(document) {
|
||
return document.mode;
|
||
},
|
||
detachNode(node) {
|
||
if (node.parentNode) {
|
||
const idx = node.parentNode.childNodes.indexOf(node);
|
||
node.parentNode.childNodes.splice(idx, 1);
|
||
node.parentNode = null;
|
||
}
|
||
},
|
||
insertText(parentNode, text2) {
|
||
if (parentNode.childNodes.length > 0) {
|
||
const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1];
|
||
if (defaultTreeAdapter.isTextNode(prevNode)) {
|
||
prevNode.value += text2;
|
||
return;
|
||
}
|
||
}
|
||
defaultTreeAdapter.appendChild(parentNode, createTextNode(text2));
|
||
},
|
||
insertTextBefore(parentNode, text2, referenceNode) {
|
||
const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];
|
||
if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) {
|
||
prevNode.value += text2;
|
||
} else {
|
||
defaultTreeAdapter.insertBefore(parentNode, createTextNode(text2), referenceNode);
|
||
}
|
||
},
|
||
adoptAttributes(recipient, attrs) {
|
||
const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name));
|
||
for (let j = 0; j < attrs.length; j++) {
|
||
if (!recipientAttrsMap.has(attrs[j].name)) {
|
||
recipient.attrs.push(attrs[j]);
|
||
}
|
||
}
|
||
},
|
||
//Tree traversing
|
||
getFirstChild(node) {
|
||
return node.childNodes[0];
|
||
},
|
||
getChildNodes(node) {
|
||
return node.childNodes;
|
||
},
|
||
getParentNode(node) {
|
||
return node.parentNode;
|
||
},
|
||
getAttrList(element) {
|
||
return element.attrs;
|
||
},
|
||
//Node data
|
||
getTagName(element) {
|
||
return element.tagName;
|
||
},
|
||
getNamespaceURI(element) {
|
||
return element.namespaceURI;
|
||
},
|
||
getTextNodeContent(textNode) {
|
||
return textNode.value;
|
||
},
|
||
getCommentNodeContent(commentNode) {
|
||
return commentNode.data;
|
||
},
|
||
getDocumentTypeNodeName(doctypeNode) {
|
||
return doctypeNode.name;
|
||
},
|
||
getDocumentTypeNodePublicId(doctypeNode) {
|
||
return doctypeNode.publicId;
|
||
},
|
||
getDocumentTypeNodeSystemId(doctypeNode) {
|
||
return doctypeNode.systemId;
|
||
},
|
||
//Node types
|
||
isTextNode(node) {
|
||
return node.nodeName === "#text";
|
||
},
|
||
isCommentNode(node) {
|
||
return node.nodeName === "#comment";
|
||
},
|
||
isDocumentTypeNode(node) {
|
||
return node.nodeName === "#documentType";
|
||
},
|
||
isElementNode(node) {
|
||
return Object.prototype.hasOwnProperty.call(node, "tagName");
|
||
},
|
||
// Source code location
|
||
setNodeSourceCodeLocation(node, location) {
|
||
node.sourceCodeLocation = location;
|
||
},
|
||
getNodeSourceCodeLocation(node) {
|
||
return node.sourceCodeLocation;
|
||
},
|
||
updateNodeSourceCodeLocation(node, endLocation) {
|
||
node.sourceCodeLocation = { ...node.sourceCodeLocation, ...endLocation };
|
||
}
|
||
};
|
||
|
||
// node_modules/parse5/dist/common/doctype.js
|
||
var VALID_DOCTYPE_NAME = "html";
|
||
var VALID_SYSTEM_ID = "about:legacy-compat";
|
||
var QUIRKS_MODE_SYSTEM_ID = "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd";
|
||
var QUIRKS_MODE_PUBLIC_ID_PREFIXES = [
|
||
"+//silmaril//dtd html pro v0r11 19970101//",
|
||
"-//as//dtd html 3.0 aswedit + extensions//",
|
||
"-//advasoft ltd//dtd html 3.0 aswedit + extensions//",
|
||
"-//ietf//dtd html 2.0 level 1//",
|
||
"-//ietf//dtd html 2.0 level 2//",
|
||
"-//ietf//dtd html 2.0 strict level 1//",
|
||
"-//ietf//dtd html 2.0 strict level 2//",
|
||
"-//ietf//dtd html 2.0 strict//",
|
||
"-//ietf//dtd html 2.0//",
|
||
"-//ietf//dtd html 2.1e//",
|
||
"-//ietf//dtd html 3.0//",
|
||
"-//ietf//dtd html 3.2 final//",
|
||
"-//ietf//dtd html 3.2//",
|
||
"-//ietf//dtd html 3//",
|
||
"-//ietf//dtd html level 0//",
|
||
"-//ietf//dtd html level 1//",
|
||
"-//ietf//dtd html level 2//",
|
||
"-//ietf//dtd html level 3//",
|
||
"-//ietf//dtd html strict level 0//",
|
||
"-//ietf//dtd html strict level 1//",
|
||
"-//ietf//dtd html strict level 2//",
|
||
"-//ietf//dtd html strict level 3//",
|
||
"-//ietf//dtd html strict//",
|
||
"-//ietf//dtd html//",
|
||
"-//metrius//dtd metrius presentational//",
|
||
"-//microsoft//dtd internet explorer 2.0 html strict//",
|
||
"-//microsoft//dtd internet explorer 2.0 html//",
|
||
"-//microsoft//dtd internet explorer 2.0 tables//",
|
||
"-//microsoft//dtd internet explorer 3.0 html strict//",
|
||
"-//microsoft//dtd internet explorer 3.0 html//",
|
||
"-//microsoft//dtd internet explorer 3.0 tables//",
|
||
"-//netscape comm. corp.//dtd html//",
|
||
"-//netscape comm. corp.//dtd strict html//",
|
||
"-//o'reilly and associates//dtd html 2.0//",
|
||
"-//o'reilly and associates//dtd html extended 1.0//",
|
||
"-//o'reilly and associates//dtd html extended relaxed 1.0//",
|
||
"-//sq//dtd html 2.0 hotmetal + extensions//",
|
||
"-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//",
|
||
"-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//",
|
||
"-//spyglass//dtd html 2.0 extended//",
|
||
"-//sun microsystems corp.//dtd hotjava html//",
|
||
"-//sun microsystems corp.//dtd hotjava strict html//",
|
||
"-//w3c//dtd html 3 1995-03-24//",
|
||
"-//w3c//dtd html 3.2 draft//",
|
||
"-//w3c//dtd html 3.2 final//",
|
||
"-//w3c//dtd html 3.2//",
|
||
"-//w3c//dtd html 3.2s draft//",
|
||
"-//w3c//dtd html 4.0 frameset//",
|
||
"-//w3c//dtd html 4.0 transitional//",
|
||
"-//w3c//dtd html experimental 19960712//",
|
||
"-//w3c//dtd html experimental 970421//",
|
||
"-//w3c//dtd w3 html//",
|
||
"-//w3o//dtd w3 html 3.0//",
|
||
"-//webtechs//dtd mozilla html 2.0//",
|
||
"-//webtechs//dtd mozilla html//"
|
||
];
|
||
var QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = [
|
||
...QUIRKS_MODE_PUBLIC_ID_PREFIXES,
|
||
"-//w3c//dtd html 4.01 frameset//",
|
||
"-//w3c//dtd html 4.01 transitional//"
|
||
];
|
||
var QUIRKS_MODE_PUBLIC_IDS = /* @__PURE__ */ new Set([
|
||
"-//w3o//dtd w3 html strict 3.0//en//",
|
||
"-/w3c/dtd html 4.0 transitional/en",
|
||
"html"
|
||
]);
|
||
var LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ["-//w3c//dtd xhtml 1.0 frameset//", "-//w3c//dtd xhtml 1.0 transitional//"];
|
||
var LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = [
|
||
...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES,
|
||
"-//w3c//dtd html 4.01 frameset//",
|
||
"-//w3c//dtd html 4.01 transitional//"
|
||
];
|
||
function hasPrefix(publicId, prefixes) {
|
||
return prefixes.some((prefix) => publicId.startsWith(prefix));
|
||
}
|
||
function isConforming(token) {
|
||
return token.name === VALID_DOCTYPE_NAME && token.publicId === null && (token.systemId === null || token.systemId === VALID_SYSTEM_ID);
|
||
}
|
||
function getDocumentMode(token) {
|
||
if (token.name !== VALID_DOCTYPE_NAME) {
|
||
return DOCUMENT_MODE.QUIRKS;
|
||
}
|
||
const { systemId } = token;
|
||
if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) {
|
||
return DOCUMENT_MODE.QUIRKS;
|
||
}
|
||
let { publicId } = token;
|
||
if (publicId !== null) {
|
||
publicId = publicId.toLowerCase();
|
||
if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) {
|
||
return DOCUMENT_MODE.QUIRKS;
|
||
}
|
||
let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES;
|
||
if (hasPrefix(publicId, prefixes)) {
|
||
return DOCUMENT_MODE.QUIRKS;
|
||
}
|
||
prefixes = systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES;
|
||
if (hasPrefix(publicId, prefixes)) {
|
||
return DOCUMENT_MODE.LIMITED_QUIRKS;
|
||
}
|
||
}
|
||
return DOCUMENT_MODE.NO_QUIRKS;
|
||
}
|
||
|
||
// node_modules/parse5/dist/common/foreign-content.js
|
||
var MIME_TYPES = {
|
||
TEXT_HTML: "text/html",
|
||
APPLICATION_XML: "application/xhtml+xml"
|
||
};
|
||
var DEFINITION_URL_ATTR = "definitionurl";
|
||
var ADJUSTED_DEFINITION_URL_ATTR = "definitionURL";
|
||
var SVG_ATTRS_ADJUSTMENT_MAP = new Map([
|
||
"attributeName",
|
||
"attributeType",
|
||
"baseFrequency",
|
||
"baseProfile",
|
||
"calcMode",
|
||
"clipPathUnits",
|
||
"diffuseConstant",
|
||
"edgeMode",
|
||
"filterUnits",
|
||
"glyphRef",
|
||
"gradientTransform",
|
||
"gradientUnits",
|
||
"kernelMatrix",
|
||
"kernelUnitLength",
|
||
"keyPoints",
|
||
"keySplines",
|
||
"keyTimes",
|
||
"lengthAdjust",
|
||
"limitingConeAngle",
|
||
"markerHeight",
|
||
"markerUnits",
|
||
"markerWidth",
|
||
"maskContentUnits",
|
||
"maskUnits",
|
||
"numOctaves",
|
||
"pathLength",
|
||
"patternContentUnits",
|
||
"patternTransform",
|
||
"patternUnits",
|
||
"pointsAtX",
|
||
"pointsAtY",
|
||
"pointsAtZ",
|
||
"preserveAlpha",
|
||
"preserveAspectRatio",
|
||
"primitiveUnits",
|
||
"refX",
|
||
"refY",
|
||
"repeatCount",
|
||
"repeatDur",
|
||
"requiredExtensions",
|
||
"requiredFeatures",
|
||
"specularConstant",
|
||
"specularExponent",
|
||
"spreadMethod",
|
||
"startOffset",
|
||
"stdDeviation",
|
||
"stitchTiles",
|
||
"surfaceScale",
|
||
"systemLanguage",
|
||
"tableValues",
|
||
"targetX",
|
||
"targetY",
|
||
"textLength",
|
||
"viewBox",
|
||
"viewTarget",
|
||
"xChannelSelector",
|
||
"yChannelSelector",
|
||
"zoomAndPan"
|
||
].map((attr) => [attr.toLowerCase(), attr]));
|
||
var XML_ATTRS_ADJUSTMENT_MAP = /* @__PURE__ */ new Map([
|
||
["xlink:actuate", { prefix: "xlink", name: "actuate", namespace: NS.XLINK }],
|
||
["xlink:arcrole", { prefix: "xlink", name: "arcrole", namespace: NS.XLINK }],
|
||
["xlink:href", { prefix: "xlink", name: "href", namespace: NS.XLINK }],
|
||
["xlink:role", { prefix: "xlink", name: "role", namespace: NS.XLINK }],
|
||
["xlink:show", { prefix: "xlink", name: "show", namespace: NS.XLINK }],
|
||
["xlink:title", { prefix: "xlink", name: "title", namespace: NS.XLINK }],
|
||
["xlink:type", { prefix: "xlink", name: "type", namespace: NS.XLINK }],
|
||
["xml:base", { prefix: "xml", name: "base", namespace: NS.XML }],
|
||
["xml:lang", { prefix: "xml", name: "lang", namespace: NS.XML }],
|
||
["xml:space", { prefix: "xml", name: "space", namespace: NS.XML }],
|
||
["xmlns", { prefix: "", name: "xmlns", namespace: NS.XMLNS }],
|
||
["xmlns:xlink", { prefix: "xmlns", name: "xlink", namespace: NS.XMLNS }]
|
||
]);
|
||
var SVG_TAG_NAMES_ADJUSTMENT_MAP = new Map([
|
||
"altGlyph",
|
||
"altGlyphDef",
|
||
"altGlyphItem",
|
||
"animateColor",
|
||
"animateMotion",
|
||
"animateTransform",
|
||
"clipPath",
|
||
"feBlend",
|
||
"feColorMatrix",
|
||
"feComponentTransfer",
|
||
"feComposite",
|
||
"feConvolveMatrix",
|
||
"feDiffuseLighting",
|
||
"feDisplacementMap",
|
||
"feDistantLight",
|
||
"feFlood",
|
||
"feFuncA",
|
||
"feFuncB",
|
||
"feFuncG",
|
||
"feFuncR",
|
||
"feGaussianBlur",
|
||
"feImage",
|
||
"feMerge",
|
||
"feMergeNode",
|
||
"feMorphology",
|
||
"feOffset",
|
||
"fePointLight",
|
||
"feSpecularLighting",
|
||
"feSpotLight",
|
||
"feTile",
|
||
"feTurbulence",
|
||
"foreignObject",
|
||
"glyphRef",
|
||
"linearGradient",
|
||
"radialGradient",
|
||
"textPath"
|
||
].map((tn) => [tn.toLowerCase(), tn]));
|
||
var EXITS_FOREIGN_CONTENT = /* @__PURE__ */ new Set([
|
||
TAG_ID.B,
|
||
TAG_ID.BIG,
|
||
TAG_ID.BLOCKQUOTE,
|
||
TAG_ID.BODY,
|
||
TAG_ID.BR,
|
||
TAG_ID.CENTER,
|
||
TAG_ID.CODE,
|
||
TAG_ID.DD,
|
||
TAG_ID.DIV,
|
||
TAG_ID.DL,
|
||
TAG_ID.DT,
|
||
TAG_ID.EM,
|
||
TAG_ID.EMBED,
|
||
TAG_ID.H1,
|
||
TAG_ID.H2,
|
||
TAG_ID.H3,
|
||
TAG_ID.H4,
|
||
TAG_ID.H5,
|
||
TAG_ID.H6,
|
||
TAG_ID.HEAD,
|
||
TAG_ID.HR,
|
||
TAG_ID.I,
|
||
TAG_ID.IMG,
|
||
TAG_ID.LI,
|
||
TAG_ID.LISTING,
|
||
TAG_ID.MENU,
|
||
TAG_ID.META,
|
||
TAG_ID.NOBR,
|
||
TAG_ID.OL,
|
||
TAG_ID.P,
|
||
TAG_ID.PRE,
|
||
TAG_ID.RUBY,
|
||
TAG_ID.S,
|
||
TAG_ID.SMALL,
|
||
TAG_ID.SPAN,
|
||
TAG_ID.STRONG,
|
||
TAG_ID.STRIKE,
|
||
TAG_ID.SUB,
|
||
TAG_ID.SUP,
|
||
TAG_ID.TABLE,
|
||
TAG_ID.TT,
|
||
TAG_ID.U,
|
||
TAG_ID.UL,
|
||
TAG_ID.VAR
|
||
]);
|
||
function causesExit(startTagToken) {
|
||
const tn = startTagToken.tagID;
|
||
const isFontWithAttrs = tn === TAG_ID.FONT && startTagToken.attrs.some(({ name: name42 }) => name42 === ATTRS.COLOR || name42 === ATTRS.SIZE || name42 === ATTRS.FACE);
|
||
return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn);
|
||
}
|
||
function adjustTokenMathMLAttrs(token) {
|
||
for (let i = 0; i < token.attrs.length; i++) {
|
||
if (token.attrs[i].name === DEFINITION_URL_ATTR) {
|
||
token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR;
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function adjustTokenSVGAttrs(token) {
|
||
for (let i = 0; i < token.attrs.length; i++) {
|
||
const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);
|
||
if (adjustedAttrName != null) {
|
||
token.attrs[i].name = adjustedAttrName;
|
||
}
|
||
}
|
||
}
|
||
function adjustTokenXMLAttrs(token) {
|
||
for (let i = 0; i < token.attrs.length; i++) {
|
||
const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);
|
||
if (adjustedAttrEntry) {
|
||
token.attrs[i].prefix = adjustedAttrEntry.prefix;
|
||
token.attrs[i].name = adjustedAttrEntry.name;
|
||
token.attrs[i].namespace = adjustedAttrEntry.namespace;
|
||
}
|
||
}
|
||
}
|
||
function adjustTokenSVGTagName(token) {
|
||
const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName);
|
||
if (adjustedTagName != null) {
|
||
token.tagName = adjustedTagName;
|
||
token.tagID = getTagID(token.tagName);
|
||
}
|
||
}
|
||
function isMathMLTextIntegrationPoint(tn, ns) {
|
||
return ns === NS.MATHML && (tn === TAG_ID.MI || tn === TAG_ID.MO || tn === TAG_ID.MN || tn === TAG_ID.MS || tn === TAG_ID.MTEXT);
|
||
}
|
||
function isHtmlIntegrationPoint(tn, ns, attrs) {
|
||
if (ns === NS.MATHML && tn === TAG_ID.ANNOTATION_XML) {
|
||
for (let i = 0; i < attrs.length; i++) {
|
||
if (attrs[i].name === ATTRS.ENCODING) {
|
||
const value = attrs[i].value.toLowerCase();
|
||
return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML;
|
||
}
|
||
}
|
||
}
|
||
return ns === NS.SVG && (tn === TAG_ID.FOREIGN_OBJECT || tn === TAG_ID.DESC || tn === TAG_ID.TITLE);
|
||
}
|
||
function isIntegrationPoint(tn, ns, attrs, foreignNS) {
|
||
return (!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs) || (!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns);
|
||
}
|
||
|
||
// node_modules/parse5/dist/parser/index.js
|
||
var HIDDEN_INPUT_TYPE = "hidden";
|
||
var AA_OUTER_LOOP_ITER = 8;
|
||
var AA_INNER_LOOP_ITER = 3;
|
||
var InsertionMode;
|
||
(function(InsertionMode2) {
|
||
InsertionMode2[InsertionMode2["INITIAL"] = 0] = "INITIAL";
|
||
InsertionMode2[InsertionMode2["BEFORE_HTML"] = 1] = "BEFORE_HTML";
|
||
InsertionMode2[InsertionMode2["BEFORE_HEAD"] = 2] = "BEFORE_HEAD";
|
||
InsertionMode2[InsertionMode2["IN_HEAD"] = 3] = "IN_HEAD";
|
||
InsertionMode2[InsertionMode2["IN_HEAD_NO_SCRIPT"] = 4] = "IN_HEAD_NO_SCRIPT";
|
||
InsertionMode2[InsertionMode2["AFTER_HEAD"] = 5] = "AFTER_HEAD";
|
||
InsertionMode2[InsertionMode2["IN_BODY"] = 6] = "IN_BODY";
|
||
InsertionMode2[InsertionMode2["TEXT"] = 7] = "TEXT";
|
||
InsertionMode2[InsertionMode2["IN_TABLE"] = 8] = "IN_TABLE";
|
||
InsertionMode2[InsertionMode2["IN_TABLE_TEXT"] = 9] = "IN_TABLE_TEXT";
|
||
InsertionMode2[InsertionMode2["IN_CAPTION"] = 10] = "IN_CAPTION";
|
||
InsertionMode2[InsertionMode2["IN_COLUMN_GROUP"] = 11] = "IN_COLUMN_GROUP";
|
||
InsertionMode2[InsertionMode2["IN_TABLE_BODY"] = 12] = "IN_TABLE_BODY";
|
||
InsertionMode2[InsertionMode2["IN_ROW"] = 13] = "IN_ROW";
|
||
InsertionMode2[InsertionMode2["IN_CELL"] = 14] = "IN_CELL";
|
||
InsertionMode2[InsertionMode2["IN_SELECT"] = 15] = "IN_SELECT";
|
||
InsertionMode2[InsertionMode2["IN_SELECT_IN_TABLE"] = 16] = "IN_SELECT_IN_TABLE";
|
||
InsertionMode2[InsertionMode2["IN_TEMPLATE"] = 17] = "IN_TEMPLATE";
|
||
InsertionMode2[InsertionMode2["AFTER_BODY"] = 18] = "AFTER_BODY";
|
||
InsertionMode2[InsertionMode2["IN_FRAMESET"] = 19] = "IN_FRAMESET";
|
||
InsertionMode2[InsertionMode2["AFTER_FRAMESET"] = 20] = "AFTER_FRAMESET";
|
||
InsertionMode2[InsertionMode2["AFTER_AFTER_BODY"] = 21] = "AFTER_AFTER_BODY";
|
||
InsertionMode2[InsertionMode2["AFTER_AFTER_FRAMESET"] = 22] = "AFTER_AFTER_FRAMESET";
|
||
})(InsertionMode || (InsertionMode = {}));
|
||
var BASE_LOC = {
|
||
startLine: -1,
|
||
startCol: -1,
|
||
startOffset: -1,
|
||
endLine: -1,
|
||
endCol: -1,
|
||
endOffset: -1
|
||
};
|
||
var TABLE_STRUCTURE_TAGS = /* @__PURE__ */ new Set([TAG_ID.TABLE, TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD, TAG_ID.TR]);
|
||
var defaultParserOptions = {
|
||
scriptingEnabled: true,
|
||
sourceCodeLocationInfo: false,
|
||
treeAdapter: defaultTreeAdapter,
|
||
onParseError: null
|
||
};
|
||
var Parser = class {
|
||
constructor(options, document, fragmentContext = null, scriptHandler = null) {
|
||
this.fragmentContext = fragmentContext;
|
||
this.scriptHandler = scriptHandler;
|
||
this.currentToken = null;
|
||
this.stopped = false;
|
||
this.insertionMode = InsertionMode.INITIAL;
|
||
this.originalInsertionMode = InsertionMode.INITIAL;
|
||
this.headElement = null;
|
||
this.formElement = null;
|
||
this.currentNotInHTML = false;
|
||
this.tmplInsertionModeStack = [];
|
||
this.pendingCharacterTokens = [];
|
||
this.hasNonWhitespacePendingCharacterToken = false;
|
||
this.framesetOk = true;
|
||
this.skipNextNewLine = false;
|
||
this.fosterParentingEnabled = false;
|
||
this.options = {
|
||
...defaultParserOptions,
|
||
...options
|
||
};
|
||
this.treeAdapter = this.options.treeAdapter;
|
||
this.onParseError = this.options.onParseError;
|
||
if (this.onParseError) {
|
||
this.options.sourceCodeLocationInfo = true;
|
||
}
|
||
this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument();
|
||
this.tokenizer = new Tokenizer(this.options, this);
|
||
this.activeFormattingElements = new FormattingElementList(this.treeAdapter);
|
||
this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : TAG_ID.UNKNOWN;
|
||
this._setContextModes(fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : this.document, this.fragmentContextID);
|
||
this.openElements = new OpenElementStack(this.document, this.treeAdapter, this);
|
||
}
|
||
// API
|
||
static parse(html, options) {
|
||
const parser = new this(options);
|
||
parser.tokenizer.write(html, true);
|
||
return parser.document;
|
||
}
|
||
static getFragmentParser(fragmentContext, options) {
|
||
const opts = {
|
||
...defaultParserOptions,
|
||
...options
|
||
};
|
||
fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : fragmentContext = opts.treeAdapter.createElement(TAG_NAMES.TEMPLATE, NS.HTML, []);
|
||
const documentMock = opts.treeAdapter.createElement("documentmock", NS.HTML, []);
|
||
const parser = new this(opts, documentMock, fragmentContext);
|
||
if (parser.fragmentContextID === TAG_ID.TEMPLATE) {
|
||
parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);
|
||
}
|
||
parser._initTokenizerForFragmentParsing();
|
||
parser._insertFakeRootElement();
|
||
parser._resetInsertionMode();
|
||
parser._findFormInFragmentContext();
|
||
return parser;
|
||
}
|
||
getFragment() {
|
||
const rootElement = this.treeAdapter.getFirstChild(this.document);
|
||
const fragment = this.treeAdapter.createDocumentFragment();
|
||
this._adoptNodes(rootElement, fragment);
|
||
return fragment;
|
||
}
|
||
//Errors
|
||
_err(token, code2, beforeToken) {
|
||
var _a2;
|
||
if (!this.onParseError)
|
||
return;
|
||
const loc = (_a2 = token.location) !== null && _a2 !== void 0 ? _a2 : BASE_LOC;
|
||
const err = {
|
||
code: code2,
|
||
startLine: loc.startLine,
|
||
startCol: loc.startCol,
|
||
startOffset: loc.startOffset,
|
||
endLine: beforeToken ? loc.startLine : loc.endLine,
|
||
endCol: beforeToken ? loc.startCol : loc.endCol,
|
||
endOffset: beforeToken ? loc.startOffset : loc.endOffset
|
||
};
|
||
this.onParseError(err);
|
||
}
|
||
//Stack events
|
||
onItemPush(node, tid, isTop) {
|
||
var _a2, _b;
|
||
(_b = (_a2 = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a2, node);
|
||
if (isTop && this.openElements.stackTop > 0)
|
||
this._setContextModes(node, tid);
|
||
}
|
||
onItemPop(node, isTop) {
|
||
var _a2, _b;
|
||
if (this.options.sourceCodeLocationInfo) {
|
||
this._setEndLocation(node, this.currentToken);
|
||
}
|
||
(_b = (_a2 = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a2, node, this.openElements.current);
|
||
if (isTop) {
|
||
let current;
|
||
let currentTagId;
|
||
if (this.openElements.stackTop === 0 && this.fragmentContext) {
|
||
current = this.fragmentContext;
|
||
currentTagId = this.fragmentContextID;
|
||
} else {
|
||
({ current, currentTagId } = this.openElements);
|
||
}
|
||
this._setContextModes(current, currentTagId);
|
||
}
|
||
}
|
||
_setContextModes(current, tid) {
|
||
const isHTML = current === this.document || this.treeAdapter.getNamespaceURI(current) === NS.HTML;
|
||
this.currentNotInHTML = !isHTML;
|
||
this.tokenizer.inForeignNode = !isHTML && !this._isIntegrationPoint(tid, current);
|
||
}
|
||
_switchToTextParsing(currentToken, nextTokenizerState) {
|
||
this._insertElement(currentToken, NS.HTML);
|
||
this.tokenizer.state = nextTokenizerState;
|
||
this.originalInsertionMode = this.insertionMode;
|
||
this.insertionMode = InsertionMode.TEXT;
|
||
}
|
||
switchToPlaintextParsing() {
|
||
this.insertionMode = InsertionMode.TEXT;
|
||
this.originalInsertionMode = InsertionMode.IN_BODY;
|
||
this.tokenizer.state = TokenizerMode.PLAINTEXT;
|
||
}
|
||
//Fragment parsing
|
||
_getAdjustedCurrentElement() {
|
||
return this.openElements.stackTop === 0 && this.fragmentContext ? this.fragmentContext : this.openElements.current;
|
||
}
|
||
_findFormInFragmentContext() {
|
||
let node = this.fragmentContext;
|
||
while (node) {
|
||
if (this.treeAdapter.getTagName(node) === TAG_NAMES.FORM) {
|
||
this.formElement = node;
|
||
break;
|
||
}
|
||
node = this.treeAdapter.getParentNode(node);
|
||
}
|
||
}
|
||
_initTokenizerForFragmentParsing() {
|
||
if (!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== NS.HTML) {
|
||
return;
|
||
}
|
||
switch (this.fragmentContextID) {
|
||
case TAG_ID.TITLE:
|
||
case TAG_ID.TEXTAREA: {
|
||
this.tokenizer.state = TokenizerMode.RCDATA;
|
||
break;
|
||
}
|
||
case TAG_ID.STYLE:
|
||
case TAG_ID.XMP:
|
||
case TAG_ID.IFRAME:
|
||
case TAG_ID.NOEMBED:
|
||
case TAG_ID.NOFRAMES:
|
||
case TAG_ID.NOSCRIPT: {
|
||
this.tokenizer.state = TokenizerMode.RAWTEXT;
|
||
break;
|
||
}
|
||
case TAG_ID.SCRIPT: {
|
||
this.tokenizer.state = TokenizerMode.SCRIPT_DATA;
|
||
break;
|
||
}
|
||
case TAG_ID.PLAINTEXT: {
|
||
this.tokenizer.state = TokenizerMode.PLAINTEXT;
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
//Tree mutation
|
||
_setDocumentType(token) {
|
||
const name42 = token.name || "";
|
||
const publicId = token.publicId || "";
|
||
const systemId = token.systemId || "";
|
||
this.treeAdapter.setDocumentType(this.document, name42, publicId, systemId);
|
||
if (token.location) {
|
||
const documentChildren = this.treeAdapter.getChildNodes(this.document);
|
||
const docTypeNode = documentChildren.find((node) => this.treeAdapter.isDocumentTypeNode(node));
|
||
if (docTypeNode) {
|
||
this.treeAdapter.setNodeSourceCodeLocation(docTypeNode, token.location);
|
||
}
|
||
}
|
||
}
|
||
_attachElementToTree(element, location) {
|
||
if (this.options.sourceCodeLocationInfo) {
|
||
const loc = location && {
|
||
...location,
|
||
startTag: location
|
||
};
|
||
this.treeAdapter.setNodeSourceCodeLocation(element, loc);
|
||
}
|
||
if (this._shouldFosterParentOnInsertion()) {
|
||
this._fosterParentElement(element);
|
||
} else {
|
||
const parent = this.openElements.currentTmplContentOrNode;
|
||
this.treeAdapter.appendChild(parent, element);
|
||
}
|
||
}
|
||
_appendElement(token, namespaceURI) {
|
||
const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
|
||
this._attachElementToTree(element, token.location);
|
||
}
|
||
_insertElement(token, namespaceURI) {
|
||
const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
|
||
this._attachElementToTree(element, token.location);
|
||
this.openElements.push(element, token.tagID);
|
||
}
|
||
_insertFakeElement(tagName, tagID) {
|
||
const element = this.treeAdapter.createElement(tagName, NS.HTML, []);
|
||
this._attachElementToTree(element, null);
|
||
this.openElements.push(element, tagID);
|
||
}
|
||
_insertTemplate(token) {
|
||
const tmpl = this.treeAdapter.createElement(token.tagName, NS.HTML, token.attrs);
|
||
const content = this.treeAdapter.createDocumentFragment();
|
||
this.treeAdapter.setTemplateContent(tmpl, content);
|
||
this._attachElementToTree(tmpl, token.location);
|
||
this.openElements.push(tmpl, token.tagID);
|
||
if (this.options.sourceCodeLocationInfo)
|
||
this.treeAdapter.setNodeSourceCodeLocation(content, null);
|
||
}
|
||
_insertFakeRootElement() {
|
||
const element = this.treeAdapter.createElement(TAG_NAMES.HTML, NS.HTML, []);
|
||
if (this.options.sourceCodeLocationInfo)
|
||
this.treeAdapter.setNodeSourceCodeLocation(element, null);
|
||
this.treeAdapter.appendChild(this.openElements.current, element);
|
||
this.openElements.push(element, TAG_ID.HTML);
|
||
}
|
||
_appendCommentNode(token, parent) {
|
||
const commentNode = this.treeAdapter.createCommentNode(token.data);
|
||
this.treeAdapter.appendChild(parent, commentNode);
|
||
if (this.options.sourceCodeLocationInfo) {
|
||
this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location);
|
||
}
|
||
}
|
||
_insertCharacters(token) {
|
||
let parent;
|
||
let beforeElement;
|
||
if (this._shouldFosterParentOnInsertion()) {
|
||
({ parent, beforeElement } = this._findFosterParentingLocation());
|
||
if (beforeElement) {
|
||
this.treeAdapter.insertTextBefore(parent, token.chars, beforeElement);
|
||
} else {
|
||
this.treeAdapter.insertText(parent, token.chars);
|
||
}
|
||
} else {
|
||
parent = this.openElements.currentTmplContentOrNode;
|
||
this.treeAdapter.insertText(parent, token.chars);
|
||
}
|
||
if (!token.location)
|
||
return;
|
||
const siblings = this.treeAdapter.getChildNodes(parent);
|
||
const textNodeIdx = beforeElement ? siblings.lastIndexOf(beforeElement) : siblings.length;
|
||
const textNode = siblings[textNodeIdx - 1];
|
||
const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode);
|
||
if (tnLoc) {
|
||
const { endLine, endCol, endOffset } = token.location;
|
||
this.treeAdapter.updateNodeSourceCodeLocation(textNode, { endLine, endCol, endOffset });
|
||
} else if (this.options.sourceCodeLocationInfo) {
|
||
this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location);
|
||
}
|
||
}
|
||
_adoptNodes(donor, recipient) {
|
||
for (let child = this.treeAdapter.getFirstChild(donor); child; child = this.treeAdapter.getFirstChild(donor)) {
|
||
this.treeAdapter.detachNode(child);
|
||
this.treeAdapter.appendChild(recipient, child);
|
||
}
|
||
}
|
||
_setEndLocation(element, closingToken) {
|
||
if (this.treeAdapter.getNodeSourceCodeLocation(element) && closingToken.location) {
|
||
const ctLoc = closingToken.location;
|
||
const tn = this.treeAdapter.getTagName(element);
|
||
const endLoc = (
|
||
// NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing
|
||
// tag and for cases like <td> <p> </td> - 'p' closes without a closing tag.
|
||
closingToken.type === TokenType.END_TAG && tn === closingToken.tagName ? {
|
||
endTag: { ...ctLoc },
|
||
endLine: ctLoc.endLine,
|
||
endCol: ctLoc.endCol,
|
||
endOffset: ctLoc.endOffset
|
||
} : {
|
||
endLine: ctLoc.startLine,
|
||
endCol: ctLoc.startCol,
|
||
endOffset: ctLoc.startOffset
|
||
}
|
||
);
|
||
this.treeAdapter.updateNodeSourceCodeLocation(element, endLoc);
|
||
}
|
||
}
|
||
//Token processing
|
||
shouldProcessStartTagTokenInForeignContent(token) {
|
||
if (!this.currentNotInHTML)
|
||
return false;
|
||
let current;
|
||
let currentTagId;
|
||
if (this.openElements.stackTop === 0 && this.fragmentContext) {
|
||
current = this.fragmentContext;
|
||
currentTagId = this.fragmentContextID;
|
||
} else {
|
||
({ current, currentTagId } = this.openElements);
|
||
}
|
||
if (token.tagID === TAG_ID.SVG && this.treeAdapter.getTagName(current) === TAG_NAMES.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(current) === NS.MATHML) {
|
||
return false;
|
||
}
|
||
return (
|
||
// Check that `current` is not an integration point for HTML or MathML elements.
|
||
this.tokenizer.inForeignNode || // If it _is_ an integration point, then we might have to check that it is not an HTML
|
||
// integration point.
|
||
(token.tagID === TAG_ID.MGLYPH || token.tagID === TAG_ID.MALIGNMARK) && !this._isIntegrationPoint(currentTagId, current, NS.HTML)
|
||
);
|
||
}
|
||
_processToken(token) {
|
||
switch (token.type) {
|
||
case TokenType.CHARACTER: {
|
||
this.onCharacter(token);
|
||
break;
|
||
}
|
||
case TokenType.NULL_CHARACTER: {
|
||
this.onNullCharacter(token);
|
||
break;
|
||
}
|
||
case TokenType.COMMENT: {
|
||
this.onComment(token);
|
||
break;
|
||
}
|
||
case TokenType.DOCTYPE: {
|
||
this.onDoctype(token);
|
||
break;
|
||
}
|
||
case TokenType.START_TAG: {
|
||
this._processStartTag(token);
|
||
break;
|
||
}
|
||
case TokenType.END_TAG: {
|
||
this.onEndTag(token);
|
||
break;
|
||
}
|
||
case TokenType.EOF: {
|
||
this.onEof(token);
|
||
break;
|
||
}
|
||
case TokenType.WHITESPACE_CHARACTER: {
|
||
this.onWhitespaceCharacter(token);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
//Integration points
|
||
_isIntegrationPoint(tid, element, foreignNS) {
|
||
const ns = this.treeAdapter.getNamespaceURI(element);
|
||
const attrs = this.treeAdapter.getAttrList(element);
|
||
return isIntegrationPoint(tid, ns, attrs, foreignNS);
|
||
}
|
||
//Active formatting elements reconstruction
|
||
_reconstructActiveFormattingElements() {
|
||
const listLength = this.activeFormattingElements.entries.length;
|
||
if (listLength) {
|
||
const endIndex = this.activeFormattingElements.entries.findIndex((entry) => entry.type === EntryType.Marker || this.openElements.contains(entry.element));
|
||
const unopenIdx = endIndex < 0 ? listLength - 1 : endIndex - 1;
|
||
for (let i = unopenIdx; i >= 0; i--) {
|
||
const entry = this.activeFormattingElements.entries[i];
|
||
this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));
|
||
entry.element = this.openElements.current;
|
||
}
|
||
}
|
||
}
|
||
//Close elements
|
||
_closeTableCell() {
|
||
this.openElements.generateImpliedEndTags();
|
||
this.openElements.popUntilTableCellPopped();
|
||
this.activeFormattingElements.clearToLastMarker();
|
||
this.insertionMode = InsertionMode.IN_ROW;
|
||
}
|
||
_closePElement() {
|
||
this.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.P);
|
||
this.openElements.popUntilTagNamePopped(TAG_ID.P);
|
||
}
|
||
//Insertion modes
|
||
_resetInsertionMode() {
|
||
for (let i = this.openElements.stackTop; i >= 0; i--) {
|
||
switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) {
|
||
case TAG_ID.TR: {
|
||
this.insertionMode = InsertionMode.IN_ROW;
|
||
return;
|
||
}
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.THEAD:
|
||
case TAG_ID.TFOOT: {
|
||
this.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
return;
|
||
}
|
||
case TAG_ID.CAPTION: {
|
||
this.insertionMode = InsertionMode.IN_CAPTION;
|
||
return;
|
||
}
|
||
case TAG_ID.COLGROUP: {
|
||
this.insertionMode = InsertionMode.IN_COLUMN_GROUP;
|
||
return;
|
||
}
|
||
case TAG_ID.TABLE: {
|
||
this.insertionMode = InsertionMode.IN_TABLE;
|
||
return;
|
||
}
|
||
case TAG_ID.BODY: {
|
||
this.insertionMode = InsertionMode.IN_BODY;
|
||
return;
|
||
}
|
||
case TAG_ID.FRAMESET: {
|
||
this.insertionMode = InsertionMode.IN_FRAMESET;
|
||
return;
|
||
}
|
||
case TAG_ID.SELECT: {
|
||
this._resetInsertionModeForSelect(i);
|
||
return;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
this.insertionMode = this.tmplInsertionModeStack[0];
|
||
return;
|
||
}
|
||
case TAG_ID.HTML: {
|
||
this.insertionMode = this.headElement ? InsertionMode.AFTER_HEAD : InsertionMode.BEFORE_HEAD;
|
||
return;
|
||
}
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TH: {
|
||
if (i > 0) {
|
||
this.insertionMode = InsertionMode.IN_CELL;
|
||
return;
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.HEAD: {
|
||
if (i > 0) {
|
||
this.insertionMode = InsertionMode.IN_HEAD;
|
||
return;
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
this.insertionMode = InsertionMode.IN_BODY;
|
||
}
|
||
_resetInsertionModeForSelect(selectIdx) {
|
||
if (selectIdx > 0) {
|
||
for (let i = selectIdx - 1; i > 0; i--) {
|
||
const tn = this.openElements.tagIDs[i];
|
||
if (tn === TAG_ID.TEMPLATE) {
|
||
break;
|
||
} else if (tn === TAG_ID.TABLE) {
|
||
this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE;
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
this.insertionMode = InsertionMode.IN_SELECT;
|
||
}
|
||
//Foster parenting
|
||
_isElementCausesFosterParenting(tn) {
|
||
return TABLE_STRUCTURE_TAGS.has(tn);
|
||
}
|
||
_shouldFosterParentOnInsertion() {
|
||
return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.currentTagId);
|
||
}
|
||
_findFosterParentingLocation() {
|
||
for (let i = this.openElements.stackTop; i >= 0; i--) {
|
||
const openElement = this.openElements.items[i];
|
||
switch (this.openElements.tagIDs[i]) {
|
||
case TAG_ID.TEMPLATE: {
|
||
if (this.treeAdapter.getNamespaceURI(openElement) === NS.HTML) {
|
||
return { parent: this.treeAdapter.getTemplateContent(openElement), beforeElement: null };
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TABLE: {
|
||
const parent = this.treeAdapter.getParentNode(openElement);
|
||
if (parent) {
|
||
return { parent, beforeElement: openElement };
|
||
}
|
||
return { parent: this.openElements.items[i - 1], beforeElement: null };
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
return { parent: this.openElements.items[0], beforeElement: null };
|
||
}
|
||
_fosterParentElement(element) {
|
||
const location = this._findFosterParentingLocation();
|
||
if (location.beforeElement) {
|
||
this.treeAdapter.insertBefore(location.parent, element, location.beforeElement);
|
||
} else {
|
||
this.treeAdapter.appendChild(location.parent, element);
|
||
}
|
||
}
|
||
//Special elements
|
||
_isSpecialElement(element, id) {
|
||
const ns = this.treeAdapter.getNamespaceURI(element);
|
||
return SPECIAL_ELEMENTS[ns].has(id);
|
||
}
|
||
onCharacter(token) {
|
||
this.skipNextNewLine = false;
|
||
if (this.tokenizer.inForeignNode) {
|
||
characterInForeignContent(this, token);
|
||
return;
|
||
}
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL: {
|
||
tokenInInitialMode(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HTML: {
|
||
tokenBeforeHtml(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HEAD: {
|
||
tokenBeforeHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD: {
|
||
tokenInHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT: {
|
||
tokenInHeadNoScript(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_HEAD: {
|
||
tokenAfterHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_BODY:
|
||
case InsertionMode.IN_CAPTION:
|
||
case InsertionMode.IN_CELL:
|
||
case InsertionMode.IN_TEMPLATE: {
|
||
characterInBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.TEXT:
|
||
case InsertionMode.IN_SELECT:
|
||
case InsertionMode.IN_SELECT_IN_TABLE: {
|
||
this._insertCharacters(token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE:
|
||
case InsertionMode.IN_TABLE_BODY:
|
||
case InsertionMode.IN_ROW: {
|
||
characterInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
characterInTableText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_COLUMN_GROUP: {
|
||
tokenInColumnGroup(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_BODY: {
|
||
tokenAfterBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_AFTER_BODY: {
|
||
tokenAfterAfterBody(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onNullCharacter(token) {
|
||
this.skipNextNewLine = false;
|
||
if (this.tokenizer.inForeignNode) {
|
||
nullCharacterInForeignContent(this, token);
|
||
return;
|
||
}
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL: {
|
||
tokenInInitialMode(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HTML: {
|
||
tokenBeforeHtml(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HEAD: {
|
||
tokenBeforeHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD: {
|
||
tokenInHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT: {
|
||
tokenInHeadNoScript(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_HEAD: {
|
||
tokenAfterHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.TEXT: {
|
||
this._insertCharacters(token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE:
|
||
case InsertionMode.IN_TABLE_BODY:
|
||
case InsertionMode.IN_ROW: {
|
||
characterInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_COLUMN_GROUP: {
|
||
tokenInColumnGroup(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_BODY: {
|
||
tokenAfterBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_AFTER_BODY: {
|
||
tokenAfterAfterBody(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onComment(token) {
|
||
this.skipNextNewLine = false;
|
||
if (this.currentNotInHTML) {
|
||
appendComment(this, token);
|
||
return;
|
||
}
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL:
|
||
case InsertionMode.BEFORE_HTML:
|
||
case InsertionMode.BEFORE_HEAD:
|
||
case InsertionMode.IN_HEAD:
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT:
|
||
case InsertionMode.AFTER_HEAD:
|
||
case InsertionMode.IN_BODY:
|
||
case InsertionMode.IN_TABLE:
|
||
case InsertionMode.IN_CAPTION:
|
||
case InsertionMode.IN_COLUMN_GROUP:
|
||
case InsertionMode.IN_TABLE_BODY:
|
||
case InsertionMode.IN_ROW:
|
||
case InsertionMode.IN_CELL:
|
||
case InsertionMode.IN_SELECT:
|
||
case InsertionMode.IN_SELECT_IN_TABLE:
|
||
case InsertionMode.IN_TEMPLATE:
|
||
case InsertionMode.IN_FRAMESET:
|
||
case InsertionMode.AFTER_FRAMESET: {
|
||
appendComment(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
tokenInTableText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_BODY: {
|
||
appendCommentToRootHtmlElement(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_AFTER_BODY:
|
||
case InsertionMode.AFTER_AFTER_FRAMESET: {
|
||
appendCommentToDocument(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onDoctype(token) {
|
||
this.skipNextNewLine = false;
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL: {
|
||
doctypeInInitialMode(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HEAD:
|
||
case InsertionMode.IN_HEAD:
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT:
|
||
case InsertionMode.AFTER_HEAD: {
|
||
this._err(token, ERR.misplacedDoctype);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
tokenInTableText(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onStartTag(token) {
|
||
this.skipNextNewLine = false;
|
||
this.currentToken = token;
|
||
this._processStartTag(token);
|
||
if (token.selfClosing && !token.ackSelfClosing) {
|
||
this._err(token, ERR.nonVoidHtmlElementStartTagWithTrailingSolidus);
|
||
}
|
||
}
|
||
/**
|
||
* Processes a given start tag.
|
||
*
|
||
* `onStartTag` checks if a self-closing tag was recognized. When a token
|
||
* is moved inbetween multiple insertion modes, this check for self-closing
|
||
* could lead to false positives. To avoid this, `_processStartTag` is used
|
||
* for nested calls.
|
||
*
|
||
* @param token The token to process.
|
||
*/
|
||
_processStartTag(token) {
|
||
if (this.shouldProcessStartTagTokenInForeignContent(token)) {
|
||
startTagInForeignContent(this, token);
|
||
} else {
|
||
this._startTagOutsideForeignContent(token);
|
||
}
|
||
}
|
||
_startTagOutsideForeignContent(token) {
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL: {
|
||
tokenInInitialMode(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HTML: {
|
||
startTagBeforeHtml(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HEAD: {
|
||
startTagBeforeHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD: {
|
||
startTagInHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT: {
|
||
startTagInHeadNoScript(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_HEAD: {
|
||
startTagAfterHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_BODY: {
|
||
startTagInBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE: {
|
||
startTagInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
tokenInTableText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_CAPTION: {
|
||
startTagInCaption(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_COLUMN_GROUP: {
|
||
startTagInColumnGroup(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_BODY: {
|
||
startTagInTableBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_ROW: {
|
||
startTagInRow(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_CELL: {
|
||
startTagInCell(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_SELECT: {
|
||
startTagInSelect(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_SELECT_IN_TABLE: {
|
||
startTagInSelectInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TEMPLATE: {
|
||
startTagInTemplate(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_BODY: {
|
||
startTagAfterBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_FRAMESET: {
|
||
startTagInFrameset(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_FRAMESET: {
|
||
startTagAfterFrameset(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_AFTER_BODY: {
|
||
startTagAfterAfterBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_AFTER_FRAMESET: {
|
||
startTagAfterAfterFrameset(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onEndTag(token) {
|
||
this.skipNextNewLine = false;
|
||
this.currentToken = token;
|
||
if (this.currentNotInHTML) {
|
||
endTagInForeignContent(this, token);
|
||
} else {
|
||
this._endTagOutsideForeignContent(token);
|
||
}
|
||
}
|
||
_endTagOutsideForeignContent(token) {
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL: {
|
||
tokenInInitialMode(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HTML: {
|
||
endTagBeforeHtml(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HEAD: {
|
||
endTagBeforeHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD: {
|
||
endTagInHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT: {
|
||
endTagInHeadNoScript(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_HEAD: {
|
||
endTagAfterHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_BODY: {
|
||
endTagInBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.TEXT: {
|
||
endTagInText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE: {
|
||
endTagInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
tokenInTableText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_CAPTION: {
|
||
endTagInCaption(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_COLUMN_GROUP: {
|
||
endTagInColumnGroup(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_BODY: {
|
||
endTagInTableBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_ROW: {
|
||
endTagInRow(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_CELL: {
|
||
endTagInCell(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_SELECT: {
|
||
endTagInSelect(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_SELECT_IN_TABLE: {
|
||
endTagInSelectInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TEMPLATE: {
|
||
endTagInTemplate(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_BODY: {
|
||
endTagAfterBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_FRAMESET: {
|
||
endTagInFrameset(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_FRAMESET: {
|
||
endTagAfterFrameset(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_AFTER_BODY: {
|
||
tokenAfterAfterBody(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onEof(token) {
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL: {
|
||
tokenInInitialMode(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HTML: {
|
||
tokenBeforeHtml(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HEAD: {
|
||
tokenBeforeHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD: {
|
||
tokenInHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT: {
|
||
tokenInHeadNoScript(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_HEAD: {
|
||
tokenAfterHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_BODY:
|
||
case InsertionMode.IN_TABLE:
|
||
case InsertionMode.IN_CAPTION:
|
||
case InsertionMode.IN_COLUMN_GROUP:
|
||
case InsertionMode.IN_TABLE_BODY:
|
||
case InsertionMode.IN_ROW:
|
||
case InsertionMode.IN_CELL:
|
||
case InsertionMode.IN_SELECT:
|
||
case InsertionMode.IN_SELECT_IN_TABLE: {
|
||
eofInBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.TEXT: {
|
||
eofInText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
tokenInTableText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TEMPLATE: {
|
||
eofInTemplate(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_BODY:
|
||
case InsertionMode.IN_FRAMESET:
|
||
case InsertionMode.AFTER_FRAMESET:
|
||
case InsertionMode.AFTER_AFTER_BODY:
|
||
case InsertionMode.AFTER_AFTER_FRAMESET: {
|
||
stopParsing(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onWhitespaceCharacter(token) {
|
||
if (this.skipNextNewLine) {
|
||
this.skipNextNewLine = false;
|
||
if (token.chars.charCodeAt(0) === CODE_POINTS.LINE_FEED) {
|
||
if (token.chars.length === 1) {
|
||
return;
|
||
}
|
||
token.chars = token.chars.substr(1);
|
||
}
|
||
}
|
||
if (this.tokenizer.inForeignNode) {
|
||
this._insertCharacters(token);
|
||
return;
|
||
}
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.IN_HEAD:
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT:
|
||
case InsertionMode.AFTER_HEAD:
|
||
case InsertionMode.TEXT:
|
||
case InsertionMode.IN_COLUMN_GROUP:
|
||
case InsertionMode.IN_SELECT:
|
||
case InsertionMode.IN_SELECT_IN_TABLE:
|
||
case InsertionMode.IN_FRAMESET:
|
||
case InsertionMode.AFTER_FRAMESET: {
|
||
this._insertCharacters(token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_BODY:
|
||
case InsertionMode.IN_CAPTION:
|
||
case InsertionMode.IN_CELL:
|
||
case InsertionMode.IN_TEMPLATE:
|
||
case InsertionMode.AFTER_BODY:
|
||
case InsertionMode.AFTER_AFTER_BODY:
|
||
case InsertionMode.AFTER_AFTER_FRAMESET: {
|
||
whitespaceCharacterInBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE:
|
||
case InsertionMode.IN_TABLE_BODY:
|
||
case InsertionMode.IN_ROW: {
|
||
characterInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
whitespaceCharacterInTableText(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
};
|
||
function aaObtainFormattingElementEntry(p, token) {
|
||
let formattingElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName);
|
||
if (formattingElementEntry) {
|
||
if (!p.openElements.contains(formattingElementEntry.element)) {
|
||
p.activeFormattingElements.removeEntry(formattingElementEntry);
|
||
formattingElementEntry = null;
|
||
} else if (!p.openElements.hasInScope(token.tagID)) {
|
||
formattingElementEntry = null;
|
||
}
|
||
} else {
|
||
genericEndTagInBody(p, token);
|
||
}
|
||
return formattingElementEntry;
|
||
}
|
||
function aaObtainFurthestBlock(p, formattingElementEntry) {
|
||
let furthestBlock = null;
|
||
let idx = p.openElements.stackTop;
|
||
for (; idx >= 0; idx--) {
|
||
const element = p.openElements.items[idx];
|
||
if (element === formattingElementEntry.element) {
|
||
break;
|
||
}
|
||
if (p._isSpecialElement(element, p.openElements.tagIDs[idx])) {
|
||
furthestBlock = element;
|
||
}
|
||
}
|
||
if (!furthestBlock) {
|
||
p.openElements.shortenToLength(idx < 0 ? 0 : idx);
|
||
p.activeFormattingElements.removeEntry(formattingElementEntry);
|
||
}
|
||
return furthestBlock;
|
||
}
|
||
function aaInnerLoop(p, furthestBlock, formattingElement) {
|
||
let lastElement = furthestBlock;
|
||
let nextElement = p.openElements.getCommonAncestor(furthestBlock);
|
||
for (let i = 0, element = nextElement; element !== formattingElement; i++, element = nextElement) {
|
||
nextElement = p.openElements.getCommonAncestor(element);
|
||
const elementEntry = p.activeFormattingElements.getElementEntry(element);
|
||
const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER;
|
||
const shouldRemoveFromOpenElements = !elementEntry || counterOverflow;
|
||
if (shouldRemoveFromOpenElements) {
|
||
if (counterOverflow) {
|
||
p.activeFormattingElements.removeEntry(elementEntry);
|
||
}
|
||
p.openElements.remove(element);
|
||
} else {
|
||
element = aaRecreateElementFromEntry(p, elementEntry);
|
||
if (lastElement === furthestBlock) {
|
||
p.activeFormattingElements.bookmark = elementEntry;
|
||
}
|
||
p.treeAdapter.detachNode(lastElement);
|
||
p.treeAdapter.appendChild(element, lastElement);
|
||
lastElement = element;
|
||
}
|
||
}
|
||
return lastElement;
|
||
}
|
||
function aaRecreateElementFromEntry(p, elementEntry) {
|
||
const ns = p.treeAdapter.getNamespaceURI(elementEntry.element);
|
||
const newElement = p.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs);
|
||
p.openElements.replace(elementEntry.element, newElement);
|
||
elementEntry.element = newElement;
|
||
return newElement;
|
||
}
|
||
function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) {
|
||
const tn = p.treeAdapter.getTagName(commonAncestor);
|
||
const tid = getTagID(tn);
|
||
if (p._isElementCausesFosterParenting(tid)) {
|
||
p._fosterParentElement(lastElement);
|
||
} else {
|
||
const ns = p.treeAdapter.getNamespaceURI(commonAncestor);
|
||
if (tid === TAG_ID.TEMPLATE && ns === NS.HTML) {
|
||
commonAncestor = p.treeAdapter.getTemplateContent(commonAncestor);
|
||
}
|
||
p.treeAdapter.appendChild(commonAncestor, lastElement);
|
||
}
|
||
}
|
||
function aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) {
|
||
const ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element);
|
||
const { token } = formattingElementEntry;
|
||
const newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs);
|
||
p._adoptNodes(furthestBlock, newElement);
|
||
p.treeAdapter.appendChild(furthestBlock, newElement);
|
||
p.activeFormattingElements.insertElementAfterBookmark(newElement, token);
|
||
p.activeFormattingElements.removeEntry(formattingElementEntry);
|
||
p.openElements.remove(formattingElementEntry.element);
|
||
p.openElements.insertAfter(furthestBlock, newElement, token.tagID);
|
||
}
|
||
function callAdoptionAgency(p, token) {
|
||
for (let i = 0; i < AA_OUTER_LOOP_ITER; i++) {
|
||
const formattingElementEntry = aaObtainFormattingElementEntry(p, token);
|
||
if (!formattingElementEntry) {
|
||
break;
|
||
}
|
||
const furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry);
|
||
if (!furthestBlock) {
|
||
break;
|
||
}
|
||
p.activeFormattingElements.bookmark = formattingElementEntry;
|
||
const lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element);
|
||
const commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element);
|
||
p.treeAdapter.detachNode(lastElement);
|
||
if (commonAncestor)
|
||
aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement);
|
||
aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry);
|
||
}
|
||
}
|
||
function appendComment(p, token) {
|
||
p._appendCommentNode(token, p.openElements.currentTmplContentOrNode);
|
||
}
|
||
function appendCommentToRootHtmlElement(p, token) {
|
||
p._appendCommentNode(token, p.openElements.items[0]);
|
||
}
|
||
function appendCommentToDocument(p, token) {
|
||
p._appendCommentNode(token, p.document);
|
||
}
|
||
function stopParsing(p, token) {
|
||
p.stopped = true;
|
||
if (token.location) {
|
||
const target = p.fragmentContext ? 0 : 2;
|
||
for (let i = p.openElements.stackTop; i >= target; i--) {
|
||
p._setEndLocation(p.openElements.items[i], token);
|
||
}
|
||
if (!p.fragmentContext && p.openElements.stackTop >= 0) {
|
||
const htmlElement = p.openElements.items[0];
|
||
const htmlLocation = p.treeAdapter.getNodeSourceCodeLocation(htmlElement);
|
||
if (htmlLocation && !htmlLocation.endTag) {
|
||
p._setEndLocation(htmlElement, token);
|
||
if (p.openElements.stackTop >= 1) {
|
||
const bodyElement = p.openElements.items[1];
|
||
const bodyLocation = p.treeAdapter.getNodeSourceCodeLocation(bodyElement);
|
||
if (bodyLocation && !bodyLocation.endTag) {
|
||
p._setEndLocation(bodyElement, token);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
function doctypeInInitialMode(p, token) {
|
||
p._setDocumentType(token);
|
||
const mode = token.forceQuirks ? DOCUMENT_MODE.QUIRKS : getDocumentMode(token);
|
||
if (!isConforming(token)) {
|
||
p._err(token, ERR.nonConformingDoctype);
|
||
}
|
||
p.treeAdapter.setDocumentMode(p.document, mode);
|
||
p.insertionMode = InsertionMode.BEFORE_HTML;
|
||
}
|
||
function tokenInInitialMode(p, token) {
|
||
p._err(token, ERR.missingDoctype, true);
|
||
p.treeAdapter.setDocumentMode(p.document, DOCUMENT_MODE.QUIRKS);
|
||
p.insertionMode = InsertionMode.BEFORE_HTML;
|
||
p._processToken(token);
|
||
}
|
||
function startTagBeforeHtml(p, token) {
|
||
if (token.tagID === TAG_ID.HTML) {
|
||
p._insertElement(token, NS.HTML);
|
||
p.insertionMode = InsertionMode.BEFORE_HEAD;
|
||
} else {
|
||
tokenBeforeHtml(p, token);
|
||
}
|
||
}
|
||
function endTagBeforeHtml(p, token) {
|
||
const tn = token.tagID;
|
||
if (tn === TAG_ID.HTML || tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.BR) {
|
||
tokenBeforeHtml(p, token);
|
||
}
|
||
}
|
||
function tokenBeforeHtml(p, token) {
|
||
p._insertFakeRootElement();
|
||
p.insertionMode = InsertionMode.BEFORE_HEAD;
|
||
p._processToken(token);
|
||
}
|
||
function startTagBeforeHead(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.HEAD: {
|
||
p._insertElement(token, NS.HTML);
|
||
p.headElement = p.openElements.current;
|
||
p.insertionMode = InsertionMode.IN_HEAD;
|
||
break;
|
||
}
|
||
default: {
|
||
tokenBeforeHead(p, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagBeforeHead(p, token) {
|
||
const tn = token.tagID;
|
||
if (tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.HTML || tn === TAG_ID.BR) {
|
||
tokenBeforeHead(p, token);
|
||
} else {
|
||
p._err(token, ERR.endTagWithoutMatchingOpenElement);
|
||
}
|
||
}
|
||
function tokenBeforeHead(p, token) {
|
||
p._insertFakeElement(TAG_NAMES.HEAD, TAG_ID.HEAD);
|
||
p.headElement = p.openElements.current;
|
||
p.insertionMode = InsertionMode.IN_HEAD;
|
||
p._processToken(token);
|
||
}
|
||
function startTagInHead(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BASE:
|
||
case TAG_ID.BASEFONT:
|
||
case TAG_ID.BGSOUND:
|
||
case TAG_ID.LINK:
|
||
case TAG_ID.META: {
|
||
p._appendElement(token, NS.HTML);
|
||
token.ackSelfClosing = true;
|
||
break;
|
||
}
|
||
case TAG_ID.TITLE: {
|
||
p._switchToTextParsing(token, TokenizerMode.RCDATA);
|
||
break;
|
||
}
|
||
case TAG_ID.NOSCRIPT: {
|
||
if (p.options.scriptingEnabled) {
|
||
p._switchToTextParsing(token, TokenizerMode.RAWTEXT);
|
||
} else {
|
||
p._insertElement(token, NS.HTML);
|
||
p.insertionMode = InsertionMode.IN_HEAD_NO_SCRIPT;
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.NOFRAMES:
|
||
case TAG_ID.STYLE: {
|
||
p._switchToTextParsing(token, TokenizerMode.RAWTEXT);
|
||
break;
|
||
}
|
||
case TAG_ID.SCRIPT: {
|
||
p._switchToTextParsing(token, TokenizerMode.SCRIPT_DATA);
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
p._insertTemplate(token);
|
||
p.activeFormattingElements.insertMarker();
|
||
p.framesetOk = false;
|
||
p.insertionMode = InsertionMode.IN_TEMPLATE;
|
||
p.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);
|
||
break;
|
||
}
|
||
case TAG_ID.HEAD: {
|
||
p._err(token, ERR.misplacedStartTagForHeadElement);
|
||
break;
|
||
}
|
||
default: {
|
||
tokenInHead(p, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInHead(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HEAD: {
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.AFTER_HEAD;
|
||
break;
|
||
}
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.BR:
|
||
case TAG_ID.HTML: {
|
||
tokenInHead(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
templateEndTagInHead(p, token);
|
||
break;
|
||
}
|
||
default: {
|
||
p._err(token, ERR.endTagWithoutMatchingOpenElement);
|
||
}
|
||
}
|
||
}
|
||
function templateEndTagInHead(p, token) {
|
||
if (p.openElements.tmplCount > 0) {
|
||
p.openElements.generateImpliedEndTagsThoroughly();
|
||
if (p.openElements.currentTagId !== TAG_ID.TEMPLATE) {
|
||
p._err(token, ERR.closingOfElementWithOpenChildElements);
|
||
}
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
|
||
p.activeFormattingElements.clearToLastMarker();
|
||
p.tmplInsertionModeStack.shift();
|
||
p._resetInsertionMode();
|
||
} else {
|
||
p._err(token, ERR.endTagWithoutMatchingOpenElement);
|
||
}
|
||
}
|
||
function tokenInHead(p, token) {
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.AFTER_HEAD;
|
||
p._processToken(token);
|
||
}
|
||
function startTagInHeadNoScript(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BASEFONT:
|
||
case TAG_ID.BGSOUND:
|
||
case TAG_ID.HEAD:
|
||
case TAG_ID.LINK:
|
||
case TAG_ID.META:
|
||
case TAG_ID.NOFRAMES:
|
||
case TAG_ID.STYLE: {
|
||
startTagInHead(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.NOSCRIPT: {
|
||
p._err(token, ERR.nestedNoscriptInHead);
|
||
break;
|
||
}
|
||
default: {
|
||
tokenInHeadNoScript(p, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInHeadNoScript(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.NOSCRIPT: {
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.IN_HEAD;
|
||
break;
|
||
}
|
||
case TAG_ID.BR: {
|
||
tokenInHeadNoScript(p, token);
|
||
break;
|
||
}
|
||
default: {
|
||
p._err(token, ERR.endTagWithoutMatchingOpenElement);
|
||
}
|
||
}
|
||
}
|
||
function tokenInHeadNoScript(p, token) {
|
||
const errCode = token.type === TokenType.EOF ? ERR.openElementsLeftAfterEof : ERR.disallowedContentInNoscriptInHead;
|
||
p._err(token, errCode);
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.IN_HEAD;
|
||
p._processToken(token);
|
||
}
|
||
function startTagAfterHead(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BODY: {
|
||
p._insertElement(token, NS.HTML);
|
||
p.framesetOk = false;
|
||
p.insertionMode = InsertionMode.IN_BODY;
|
||
break;
|
||
}
|
||
case TAG_ID.FRAMESET: {
|
||
p._insertElement(token, NS.HTML);
|
||
p.insertionMode = InsertionMode.IN_FRAMESET;
|
||
break;
|
||
}
|
||
case TAG_ID.BASE:
|
||
case TAG_ID.BASEFONT:
|
||
case TAG_ID.BGSOUND:
|
||
case TAG_ID.LINK:
|
||
case TAG_ID.META:
|
||
case TAG_ID.NOFRAMES:
|
||
case TAG_ID.SCRIPT:
|
||
case TAG_ID.STYLE:
|
||
case TAG_ID.TEMPLATE:
|
||
case TAG_ID.TITLE: {
|
||
p._err(token, ERR.abandonedHeadElementChild);
|
||
p.openElements.push(p.headElement, TAG_ID.HEAD);
|
||
startTagInHead(p, token);
|
||
p.openElements.remove(p.headElement);
|
||
break;
|
||
}
|
||
case TAG_ID.HEAD: {
|
||
p._err(token, ERR.misplacedStartTagForHeadElement);
|
||
break;
|
||
}
|
||
default: {
|
||
tokenAfterHead(p, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagAfterHead(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.HTML:
|
||
case TAG_ID.BR: {
|
||
tokenAfterHead(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
templateEndTagInHead(p, token);
|
||
break;
|
||
}
|
||
default: {
|
||
p._err(token, ERR.endTagWithoutMatchingOpenElement);
|
||
}
|
||
}
|
||
}
|
||
function tokenAfterHead(p, token) {
|
||
p._insertFakeElement(TAG_NAMES.BODY, TAG_ID.BODY);
|
||
p.insertionMode = InsertionMode.IN_BODY;
|
||
modeInBody(p, token);
|
||
}
|
||
function modeInBody(p, token) {
|
||
switch (token.type) {
|
||
case TokenType.CHARACTER: {
|
||
characterInBody(p, token);
|
||
break;
|
||
}
|
||
case TokenType.WHITESPACE_CHARACTER: {
|
||
whitespaceCharacterInBody(p, token);
|
||
break;
|
||
}
|
||
case TokenType.COMMENT: {
|
||
appendComment(p, token);
|
||
break;
|
||
}
|
||
case TokenType.START_TAG: {
|
||
startTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TokenType.END_TAG: {
|
||
endTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TokenType.EOF: {
|
||
eofInBody(p, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
function whitespaceCharacterInBody(p, token) {
|
||
p._reconstructActiveFormattingElements();
|
||
p._insertCharacters(token);
|
||
}
|
||
function characterInBody(p, token) {
|
||
p._reconstructActiveFormattingElements();
|
||
p._insertCharacters(token);
|
||
p.framesetOk = false;
|
||
}
|
||
function htmlStartTagInBody(p, token) {
|
||
if (p.openElements.tmplCount === 0) {
|
||
p.treeAdapter.adoptAttributes(p.openElements.items[0], token.attrs);
|
||
}
|
||
}
|
||
function bodyStartTagInBody(p, token) {
|
||
const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();
|
||
if (bodyElement && p.openElements.tmplCount === 0) {
|
||
p.framesetOk = false;
|
||
p.treeAdapter.adoptAttributes(bodyElement, token.attrs);
|
||
}
|
||
}
|
||
function framesetStartTagInBody(p, token) {
|
||
const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();
|
||
if (p.framesetOk && bodyElement) {
|
||
p.treeAdapter.detachNode(bodyElement);
|
||
p.openElements.popAllUpToHtmlElement();
|
||
p._insertElement(token, NS.HTML);
|
||
p.insertionMode = InsertionMode.IN_FRAMESET;
|
||
}
|
||
}
|
||
function addressStartTagInBody(p, token) {
|
||
if (p.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p._closePElement();
|
||
}
|
||
p._insertElement(token, NS.HTML);
|
||
}
|
||
function numberedHeaderStartTagInBody(p, token) {
|
||
if (p.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p._closePElement();
|
||
}
|
||
if (isNumberedHeader(p.openElements.currentTagId)) {
|
||
p.openElements.pop();
|
||
}
|
||
p._insertElement(token, NS.HTML);
|
||
}
|
||
function preStartTagInBody(p, token) {
|
||
if (p.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p._closePElement();
|
||
}
|
||
p._insertElement(token, NS.HTML);
|
||
p.skipNextNewLine = true;
|
||
p.framesetOk = false;
|
||
}
|
||
function formStartTagInBody(p, token) {
|
||
const inTemplate = p.openElements.tmplCount > 0;
|
||
if (!p.formElement || inTemplate) {
|
||
if (p.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p._closePElement();
|
||
}
|
||
p._insertElement(token, NS.HTML);
|
||
if (!inTemplate) {
|
||
p.formElement = p.openElements.current;
|
||
}
|
||
}
|
||
}
|
||
function listItemStartTagInBody(p, token) {
|
||
p.framesetOk = false;
|
||
const tn = token.tagID;
|
||
for (let i = p.openElements.stackTop; i >= 0; i--) {
|
||
const elementId = p.openElements.tagIDs[i];
|
||
if (tn === TAG_ID.LI && elementId === TAG_ID.LI || (tn === TAG_ID.DD || tn === TAG_ID.DT) && (elementId === TAG_ID.DD || elementId === TAG_ID.DT)) {
|
||
p.openElements.generateImpliedEndTagsWithExclusion(elementId);
|
||
p.openElements.popUntilTagNamePopped(elementId);
|
||
break;
|
||
}
|
||
if (elementId !== TAG_ID.ADDRESS && elementId !== TAG_ID.DIV && elementId !== TAG_ID.P && p._isSpecialElement(p.openElements.items[i], elementId)) {
|
||
break;
|
||
}
|
||
}
|
||
if (p.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p._closePElement();
|
||
}
|
||
p._insertElement(token, NS.HTML);
|
||
}
|
||
function plaintextStartTagInBody(p, token) {
|
||
if (p.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p._closePElement();
|
||
}
|
||
p._insertElement(token, NS.HTML);
|
||
p.tokenizer.state = TokenizerMode.PLAINTEXT;
|
||
}
|
||
function buttonStartTagInBody(p, token) {
|
||
if (p.openElements.hasInScope(TAG_ID.BUTTON)) {
|
||
p.openElements.generateImpliedEndTags();
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.BUTTON);
|
||
}
|
||
p._reconstructActiveFormattingElements();
|
||
p._insertElement(token, NS.HTML);
|
||
p.framesetOk = false;
|
||
}
|
||
function aStartTagInBody(p, token) {
|
||
const activeElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(TAG_NAMES.A);
|
||
if (activeElementEntry) {
|
||
callAdoptionAgency(p, token);
|
||
p.openElements.remove(activeElementEntry.element);
|
||
p.activeFormattingElements.removeEntry(activeElementEntry);
|
||
}
|
||
p._reconstructActiveFormattingElements();
|
||
p._insertElement(token, NS.HTML);
|
||
p.activeFormattingElements.pushElement(p.openElements.current, token);
|
||
}
|
||
function bStartTagInBody(p, token) {
|
||
p._reconstructActiveFormattingElements();
|
||
p._insertElement(token, NS.HTML);
|
||
p.activeFormattingElements.pushElement(p.openElements.current, token);
|
||
}
|
||
function nobrStartTagInBody(p, token) {
|
||
p._reconstructActiveFormattingElements();
|
||
if (p.openElements.hasInScope(TAG_ID.NOBR)) {
|
||
callAdoptionAgency(p, token);
|
||
p._reconstructActiveFormattingElements();
|
||
}
|
||
p._insertElement(token, NS.HTML);
|
||
p.activeFormattingElements.pushElement(p.openElements.current, token);
|
||
}
|
||
function appletStartTagInBody(p, token) {
|
||
p._reconstructActiveFormattingElements();
|
||
p._insertElement(token, NS.HTML);
|
||
p.activeFormattingElements.insertMarker();
|
||
p.framesetOk = false;
|
||
}
|
||
function tableStartTagInBody(p, token) {
|
||
if (p.treeAdapter.getDocumentMode(p.document) !== DOCUMENT_MODE.QUIRKS && p.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p._closePElement();
|
||
}
|
||
p._insertElement(token, NS.HTML);
|
||
p.framesetOk = false;
|
||
p.insertionMode = InsertionMode.IN_TABLE;
|
||
}
|
||
function areaStartTagInBody(p, token) {
|
||
p._reconstructActiveFormattingElements();
|
||
p._appendElement(token, NS.HTML);
|
||
p.framesetOk = false;
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function isHiddenInput(token) {
|
||
const inputType = getTokenAttr(token, ATTRS.TYPE);
|
||
return inputType != null && inputType.toLowerCase() === HIDDEN_INPUT_TYPE;
|
||
}
|
||
function inputStartTagInBody(p, token) {
|
||
p._reconstructActiveFormattingElements();
|
||
p._appendElement(token, NS.HTML);
|
||
if (!isHiddenInput(token)) {
|
||
p.framesetOk = false;
|
||
}
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function paramStartTagInBody(p, token) {
|
||
p._appendElement(token, NS.HTML);
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function hrStartTagInBody(p, token) {
|
||
if (p.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p._closePElement();
|
||
}
|
||
p._appendElement(token, NS.HTML);
|
||
p.framesetOk = false;
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function imageStartTagInBody(p, token) {
|
||
token.tagName = TAG_NAMES.IMG;
|
||
token.tagID = TAG_ID.IMG;
|
||
areaStartTagInBody(p, token);
|
||
}
|
||
function textareaStartTagInBody(p, token) {
|
||
p._insertElement(token, NS.HTML);
|
||
p.skipNextNewLine = true;
|
||
p.tokenizer.state = TokenizerMode.RCDATA;
|
||
p.originalInsertionMode = p.insertionMode;
|
||
p.framesetOk = false;
|
||
p.insertionMode = InsertionMode.TEXT;
|
||
}
|
||
function xmpStartTagInBody(p, token) {
|
||
if (p.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p._closePElement();
|
||
}
|
||
p._reconstructActiveFormattingElements();
|
||
p.framesetOk = false;
|
||
p._switchToTextParsing(token, TokenizerMode.RAWTEXT);
|
||
}
|
||
function iframeStartTagInBody(p, token) {
|
||
p.framesetOk = false;
|
||
p._switchToTextParsing(token, TokenizerMode.RAWTEXT);
|
||
}
|
||
function noembedStartTagInBody(p, token) {
|
||
p._switchToTextParsing(token, TokenizerMode.RAWTEXT);
|
||
}
|
||
function selectStartTagInBody(p, token) {
|
||
p._reconstructActiveFormattingElements();
|
||
p._insertElement(token, NS.HTML);
|
||
p.framesetOk = false;
|
||
p.insertionMode = p.insertionMode === InsertionMode.IN_TABLE || p.insertionMode === InsertionMode.IN_CAPTION || p.insertionMode === InsertionMode.IN_TABLE_BODY || p.insertionMode === InsertionMode.IN_ROW || p.insertionMode === InsertionMode.IN_CELL ? InsertionMode.IN_SELECT_IN_TABLE : InsertionMode.IN_SELECT;
|
||
}
|
||
function optgroupStartTagInBody(p, token) {
|
||
if (p.openElements.currentTagId === TAG_ID.OPTION) {
|
||
p.openElements.pop();
|
||
}
|
||
p._reconstructActiveFormattingElements();
|
||
p._insertElement(token, NS.HTML);
|
||
}
|
||
function rbStartTagInBody(p, token) {
|
||
if (p.openElements.hasInScope(TAG_ID.RUBY)) {
|
||
p.openElements.generateImpliedEndTags();
|
||
}
|
||
p._insertElement(token, NS.HTML);
|
||
}
|
||
function rtStartTagInBody(p, token) {
|
||
if (p.openElements.hasInScope(TAG_ID.RUBY)) {
|
||
p.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.RTC);
|
||
}
|
||
p._insertElement(token, NS.HTML);
|
||
}
|
||
function mathStartTagInBody(p, token) {
|
||
p._reconstructActiveFormattingElements();
|
||
adjustTokenMathMLAttrs(token);
|
||
adjustTokenXMLAttrs(token);
|
||
if (token.selfClosing) {
|
||
p._appendElement(token, NS.MATHML);
|
||
} else {
|
||
p._insertElement(token, NS.MATHML);
|
||
}
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function svgStartTagInBody(p, token) {
|
||
p._reconstructActiveFormattingElements();
|
||
adjustTokenSVGAttrs(token);
|
||
adjustTokenXMLAttrs(token);
|
||
if (token.selfClosing) {
|
||
p._appendElement(token, NS.SVG);
|
||
} else {
|
||
p._insertElement(token, NS.SVG);
|
||
}
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function genericStartTagInBody(p, token) {
|
||
p._reconstructActiveFormattingElements();
|
||
p._insertElement(token, NS.HTML);
|
||
}
|
||
function startTagInBody(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.I:
|
||
case TAG_ID.S:
|
||
case TAG_ID.B:
|
||
case TAG_ID.U:
|
||
case TAG_ID.EM:
|
||
case TAG_ID.TT:
|
||
case TAG_ID.BIG:
|
||
case TAG_ID.CODE:
|
||
case TAG_ID.FONT:
|
||
case TAG_ID.SMALL:
|
||
case TAG_ID.STRIKE:
|
||
case TAG_ID.STRONG: {
|
||
bStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.A: {
|
||
aStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.H1:
|
||
case TAG_ID.H2:
|
||
case TAG_ID.H3:
|
||
case TAG_ID.H4:
|
||
case TAG_ID.H5:
|
||
case TAG_ID.H6: {
|
||
numberedHeaderStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.P:
|
||
case TAG_ID.DL:
|
||
case TAG_ID.OL:
|
||
case TAG_ID.UL:
|
||
case TAG_ID.DIV:
|
||
case TAG_ID.DIR:
|
||
case TAG_ID.NAV:
|
||
case TAG_ID.MAIN:
|
||
case TAG_ID.MENU:
|
||
case TAG_ID.ASIDE:
|
||
case TAG_ID.CENTER:
|
||
case TAG_ID.FIGURE:
|
||
case TAG_ID.FOOTER:
|
||
case TAG_ID.HEADER:
|
||
case TAG_ID.HGROUP:
|
||
case TAG_ID.DIALOG:
|
||
case TAG_ID.DETAILS:
|
||
case TAG_ID.ADDRESS:
|
||
case TAG_ID.ARTICLE:
|
||
case TAG_ID.SECTION:
|
||
case TAG_ID.SUMMARY:
|
||
case TAG_ID.FIELDSET:
|
||
case TAG_ID.BLOCKQUOTE:
|
||
case TAG_ID.FIGCAPTION: {
|
||
addressStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.LI:
|
||
case TAG_ID.DD:
|
||
case TAG_ID.DT: {
|
||
listItemStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BR:
|
||
case TAG_ID.IMG:
|
||
case TAG_ID.WBR:
|
||
case TAG_ID.AREA:
|
||
case TAG_ID.EMBED:
|
||
case TAG_ID.KEYGEN: {
|
||
areaStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.HR: {
|
||
hrStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.RB:
|
||
case TAG_ID.RTC: {
|
||
rbStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.RT:
|
||
case TAG_ID.RP: {
|
||
rtStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.PRE:
|
||
case TAG_ID.LISTING: {
|
||
preStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.XMP: {
|
||
xmpStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.SVG: {
|
||
svgStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.HTML: {
|
||
htmlStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BASE:
|
||
case TAG_ID.LINK:
|
||
case TAG_ID.META:
|
||
case TAG_ID.STYLE:
|
||
case TAG_ID.TITLE:
|
||
case TAG_ID.SCRIPT:
|
||
case TAG_ID.BGSOUND:
|
||
case TAG_ID.BASEFONT:
|
||
case TAG_ID.TEMPLATE: {
|
||
startTagInHead(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BODY: {
|
||
bodyStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.FORM: {
|
||
formStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.NOBR: {
|
||
nobrStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.MATH: {
|
||
mathStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TABLE: {
|
||
tableStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.INPUT: {
|
||
inputStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.PARAM:
|
||
case TAG_ID.TRACK:
|
||
case TAG_ID.SOURCE: {
|
||
paramStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.IMAGE: {
|
||
imageStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BUTTON: {
|
||
buttonStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.APPLET:
|
||
case TAG_ID.OBJECT:
|
||
case TAG_ID.MARQUEE: {
|
||
appletStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.IFRAME: {
|
||
iframeStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.SELECT: {
|
||
selectStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.OPTION:
|
||
case TAG_ID.OPTGROUP: {
|
||
optgroupStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.NOEMBED: {
|
||
noembedStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.FRAMESET: {
|
||
framesetStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TEXTAREA: {
|
||
textareaStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.NOSCRIPT: {
|
||
if (p.options.scriptingEnabled) {
|
||
noembedStartTagInBody(p, token);
|
||
} else {
|
||
genericStartTagInBody(p, token);
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.PLAINTEXT: {
|
||
plaintextStartTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.COL:
|
||
case TAG_ID.TH:
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TR:
|
||
case TAG_ID.HEAD:
|
||
case TAG_ID.FRAME:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD:
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COLGROUP: {
|
||
break;
|
||
}
|
||
default: {
|
||
genericStartTagInBody(p, token);
|
||
}
|
||
}
|
||
}
|
||
function bodyEndTagInBody(p, token) {
|
||
if (p.openElements.hasInScope(TAG_ID.BODY)) {
|
||
p.insertionMode = InsertionMode.AFTER_BODY;
|
||
if (p.options.sourceCodeLocationInfo) {
|
||
const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();
|
||
if (bodyElement) {
|
||
p._setEndLocation(bodyElement, token);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
function htmlEndTagInBody(p, token) {
|
||
if (p.openElements.hasInScope(TAG_ID.BODY)) {
|
||
p.insertionMode = InsertionMode.AFTER_BODY;
|
||
endTagAfterBody(p, token);
|
||
}
|
||
}
|
||
function addressEndTagInBody(p, token) {
|
||
const tn = token.tagID;
|
||
if (p.openElements.hasInScope(tn)) {
|
||
p.openElements.generateImpliedEndTags();
|
||
p.openElements.popUntilTagNamePopped(tn);
|
||
}
|
||
}
|
||
function formEndTagInBody(p) {
|
||
const inTemplate = p.openElements.tmplCount > 0;
|
||
const { formElement } = p;
|
||
if (!inTemplate) {
|
||
p.formElement = null;
|
||
}
|
||
if ((formElement || inTemplate) && p.openElements.hasInScope(TAG_ID.FORM)) {
|
||
p.openElements.generateImpliedEndTags();
|
||
if (inTemplate) {
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.FORM);
|
||
} else if (formElement) {
|
||
p.openElements.remove(formElement);
|
||
}
|
||
}
|
||
}
|
||
function pEndTagInBody(p) {
|
||
if (!p.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p._insertFakeElement(TAG_NAMES.P, TAG_ID.P);
|
||
}
|
||
p._closePElement();
|
||
}
|
||
function liEndTagInBody(p) {
|
||
if (p.openElements.hasInListItemScope(TAG_ID.LI)) {
|
||
p.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.LI);
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.LI);
|
||
}
|
||
}
|
||
function ddEndTagInBody(p, token) {
|
||
const tn = token.tagID;
|
||
if (p.openElements.hasInScope(tn)) {
|
||
p.openElements.generateImpliedEndTagsWithExclusion(tn);
|
||
p.openElements.popUntilTagNamePopped(tn);
|
||
}
|
||
}
|
||
function numberedHeaderEndTagInBody(p) {
|
||
if (p.openElements.hasNumberedHeaderInScope()) {
|
||
p.openElements.generateImpliedEndTags();
|
||
p.openElements.popUntilNumberedHeaderPopped();
|
||
}
|
||
}
|
||
function appletEndTagInBody(p, token) {
|
||
const tn = token.tagID;
|
||
if (p.openElements.hasInScope(tn)) {
|
||
p.openElements.generateImpliedEndTags();
|
||
p.openElements.popUntilTagNamePopped(tn);
|
||
p.activeFormattingElements.clearToLastMarker();
|
||
}
|
||
}
|
||
function brEndTagInBody(p) {
|
||
p._reconstructActiveFormattingElements();
|
||
p._insertFakeElement(TAG_NAMES.BR, TAG_ID.BR);
|
||
p.openElements.pop();
|
||
p.framesetOk = false;
|
||
}
|
||
function genericEndTagInBody(p, token) {
|
||
const tn = token.tagName;
|
||
const tid = token.tagID;
|
||
for (let i = p.openElements.stackTop; i > 0; i--) {
|
||
const element = p.openElements.items[i];
|
||
const elementId = p.openElements.tagIDs[i];
|
||
if (tid === elementId && (tid !== TAG_ID.UNKNOWN || p.treeAdapter.getTagName(element) === tn)) {
|
||
p.openElements.generateImpliedEndTagsWithExclusion(tid);
|
||
if (p.openElements.stackTop >= i)
|
||
p.openElements.shortenToLength(i);
|
||
break;
|
||
}
|
||
if (p._isSpecialElement(element, elementId)) {
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function endTagInBody(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.A:
|
||
case TAG_ID.B:
|
||
case TAG_ID.I:
|
||
case TAG_ID.S:
|
||
case TAG_ID.U:
|
||
case TAG_ID.EM:
|
||
case TAG_ID.TT:
|
||
case TAG_ID.BIG:
|
||
case TAG_ID.CODE:
|
||
case TAG_ID.FONT:
|
||
case TAG_ID.NOBR:
|
||
case TAG_ID.SMALL:
|
||
case TAG_ID.STRIKE:
|
||
case TAG_ID.STRONG: {
|
||
callAdoptionAgency(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.P: {
|
||
pEndTagInBody(p);
|
||
break;
|
||
}
|
||
case TAG_ID.DL:
|
||
case TAG_ID.UL:
|
||
case TAG_ID.OL:
|
||
case TAG_ID.DIR:
|
||
case TAG_ID.DIV:
|
||
case TAG_ID.NAV:
|
||
case TAG_ID.PRE:
|
||
case TAG_ID.MAIN:
|
||
case TAG_ID.MENU:
|
||
case TAG_ID.ASIDE:
|
||
case TAG_ID.BUTTON:
|
||
case TAG_ID.CENTER:
|
||
case TAG_ID.FIGURE:
|
||
case TAG_ID.FOOTER:
|
||
case TAG_ID.HEADER:
|
||
case TAG_ID.HGROUP:
|
||
case TAG_ID.DIALOG:
|
||
case TAG_ID.ADDRESS:
|
||
case TAG_ID.ARTICLE:
|
||
case TAG_ID.DETAILS:
|
||
case TAG_ID.SECTION:
|
||
case TAG_ID.SUMMARY:
|
||
case TAG_ID.LISTING:
|
||
case TAG_ID.FIELDSET:
|
||
case TAG_ID.BLOCKQUOTE:
|
||
case TAG_ID.FIGCAPTION: {
|
||
addressEndTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.LI: {
|
||
liEndTagInBody(p);
|
||
break;
|
||
}
|
||
case TAG_ID.DD:
|
||
case TAG_ID.DT: {
|
||
ddEndTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.H1:
|
||
case TAG_ID.H2:
|
||
case TAG_ID.H3:
|
||
case TAG_ID.H4:
|
||
case TAG_ID.H5:
|
||
case TAG_ID.H6: {
|
||
numberedHeaderEndTagInBody(p);
|
||
break;
|
||
}
|
||
case TAG_ID.BR: {
|
||
brEndTagInBody(p);
|
||
break;
|
||
}
|
||
case TAG_ID.BODY: {
|
||
bodyEndTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.HTML: {
|
||
htmlEndTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.FORM: {
|
||
formEndTagInBody(p);
|
||
break;
|
||
}
|
||
case TAG_ID.APPLET:
|
||
case TAG_ID.OBJECT:
|
||
case TAG_ID.MARQUEE: {
|
||
appletEndTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
templateEndTagInHead(p, token);
|
||
break;
|
||
}
|
||
default: {
|
||
genericEndTagInBody(p, token);
|
||
}
|
||
}
|
||
}
|
||
function eofInBody(p, token) {
|
||
if (p.tmplInsertionModeStack.length > 0) {
|
||
eofInTemplate(p, token);
|
||
} else {
|
||
stopParsing(p, token);
|
||
}
|
||
}
|
||
function endTagInText(p, token) {
|
||
var _a2;
|
||
if (token.tagID === TAG_ID.SCRIPT) {
|
||
(_a2 = p.scriptHandler) === null || _a2 === void 0 ? void 0 : _a2.call(p, p.openElements.current);
|
||
}
|
||
p.openElements.pop();
|
||
p.insertionMode = p.originalInsertionMode;
|
||
}
|
||
function eofInText(p, token) {
|
||
p._err(token, ERR.eofInElementThatCanContainOnlyText);
|
||
p.openElements.pop();
|
||
p.insertionMode = p.originalInsertionMode;
|
||
p.onEof(token);
|
||
}
|
||
function characterInTable(p, token) {
|
||
if (TABLE_STRUCTURE_TAGS.has(p.openElements.currentTagId)) {
|
||
p.pendingCharacterTokens.length = 0;
|
||
p.hasNonWhitespacePendingCharacterToken = false;
|
||
p.originalInsertionMode = p.insertionMode;
|
||
p.insertionMode = InsertionMode.IN_TABLE_TEXT;
|
||
switch (token.type) {
|
||
case TokenType.CHARACTER: {
|
||
characterInTableText(p, token);
|
||
break;
|
||
}
|
||
case TokenType.WHITESPACE_CHARACTER: {
|
||
whitespaceCharacterInTableText(p, token);
|
||
break;
|
||
}
|
||
}
|
||
} else {
|
||
tokenInTable(p, token);
|
||
}
|
||
}
|
||
function captionStartTagInTable(p, token) {
|
||
p.openElements.clearBackToTableContext();
|
||
p.activeFormattingElements.insertMarker();
|
||
p._insertElement(token, NS.HTML);
|
||
p.insertionMode = InsertionMode.IN_CAPTION;
|
||
}
|
||
function colgroupStartTagInTable(p, token) {
|
||
p.openElements.clearBackToTableContext();
|
||
p._insertElement(token, NS.HTML);
|
||
p.insertionMode = InsertionMode.IN_COLUMN_GROUP;
|
||
}
|
||
function colStartTagInTable(p, token) {
|
||
p.openElements.clearBackToTableContext();
|
||
p._insertFakeElement(TAG_NAMES.COLGROUP, TAG_ID.COLGROUP);
|
||
p.insertionMode = InsertionMode.IN_COLUMN_GROUP;
|
||
startTagInColumnGroup(p, token);
|
||
}
|
||
function tbodyStartTagInTable(p, token) {
|
||
p.openElements.clearBackToTableContext();
|
||
p._insertElement(token, NS.HTML);
|
||
p.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
}
|
||
function tdStartTagInTable(p, token) {
|
||
p.openElements.clearBackToTableContext();
|
||
p._insertFakeElement(TAG_NAMES.TBODY, TAG_ID.TBODY);
|
||
p.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
startTagInTableBody(p, token);
|
||
}
|
||
function tableStartTagInTable(p, token) {
|
||
if (p.openElements.hasInTableScope(TAG_ID.TABLE)) {
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.TABLE);
|
||
p._resetInsertionMode();
|
||
p._processStartTag(token);
|
||
}
|
||
}
|
||
function inputStartTagInTable(p, token) {
|
||
if (isHiddenInput(token)) {
|
||
p._appendElement(token, NS.HTML);
|
||
} else {
|
||
tokenInTable(p, token);
|
||
}
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function formStartTagInTable(p, token) {
|
||
if (!p.formElement && p.openElements.tmplCount === 0) {
|
||
p._insertElement(token, NS.HTML);
|
||
p.formElement = p.openElements.current;
|
||
p.openElements.pop();
|
||
}
|
||
}
|
||
function startTagInTable(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TH:
|
||
case TAG_ID.TR: {
|
||
tdStartTagInTable(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.STYLE:
|
||
case TAG_ID.SCRIPT:
|
||
case TAG_ID.TEMPLATE: {
|
||
startTagInHead(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.COL: {
|
||
colStartTagInTable(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.FORM: {
|
||
formStartTagInTable(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TABLE: {
|
||
tableStartTagInTable(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD: {
|
||
tbodyStartTagInTable(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.INPUT: {
|
||
inputStartTagInTable(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.CAPTION: {
|
||
captionStartTagInTable(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.COLGROUP: {
|
||
colgroupStartTagInTable(p, token);
|
||
break;
|
||
}
|
||
default: {
|
||
tokenInTable(p, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInTable(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.TABLE: {
|
||
if (p.openElements.hasInTableScope(TAG_ID.TABLE)) {
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.TABLE);
|
||
p._resetInsertionMode();
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
templateEndTagInHead(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.HTML:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.TH:
|
||
case TAG_ID.THEAD:
|
||
case TAG_ID.TR: {
|
||
break;
|
||
}
|
||
default: {
|
||
tokenInTable(p, token);
|
||
}
|
||
}
|
||
}
|
||
function tokenInTable(p, token) {
|
||
const savedFosterParentingState = p.fosterParentingEnabled;
|
||
p.fosterParentingEnabled = true;
|
||
modeInBody(p, token);
|
||
p.fosterParentingEnabled = savedFosterParentingState;
|
||
}
|
||
function whitespaceCharacterInTableText(p, token) {
|
||
p.pendingCharacterTokens.push(token);
|
||
}
|
||
function characterInTableText(p, token) {
|
||
p.pendingCharacterTokens.push(token);
|
||
p.hasNonWhitespacePendingCharacterToken = true;
|
||
}
|
||
function tokenInTableText(p, token) {
|
||
let i = 0;
|
||
if (p.hasNonWhitespacePendingCharacterToken) {
|
||
for (; i < p.pendingCharacterTokens.length; i++) {
|
||
tokenInTable(p, p.pendingCharacterTokens[i]);
|
||
}
|
||
} else {
|
||
for (; i < p.pendingCharacterTokens.length; i++) {
|
||
p._insertCharacters(p.pendingCharacterTokens[i]);
|
||
}
|
||
}
|
||
p.insertionMode = p.originalInsertionMode;
|
||
p._processToken(token);
|
||
}
|
||
var TABLE_VOID_ELEMENTS = /* @__PURE__ */ new Set([TAG_ID.CAPTION, TAG_ID.COL, TAG_ID.COLGROUP, TAG_ID.TBODY, TAG_ID.TD, TAG_ID.TFOOT, TAG_ID.TH, TAG_ID.THEAD, TAG_ID.TR]);
|
||
function startTagInCaption(p, token) {
|
||
const tn = token.tagID;
|
||
if (TABLE_VOID_ELEMENTS.has(tn)) {
|
||
if (p.openElements.hasInTableScope(TAG_ID.CAPTION)) {
|
||
p.openElements.generateImpliedEndTags();
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.CAPTION);
|
||
p.activeFormattingElements.clearToLastMarker();
|
||
p.insertionMode = InsertionMode.IN_TABLE;
|
||
startTagInTable(p, token);
|
||
}
|
||
} else {
|
||
startTagInBody(p, token);
|
||
}
|
||
}
|
||
function endTagInCaption(p, token) {
|
||
const tn = token.tagID;
|
||
switch (tn) {
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.TABLE: {
|
||
if (p.openElements.hasInTableScope(TAG_ID.CAPTION)) {
|
||
p.openElements.generateImpliedEndTags();
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.CAPTION);
|
||
p.activeFormattingElements.clearToLastMarker();
|
||
p.insertionMode = InsertionMode.IN_TABLE;
|
||
if (tn === TAG_ID.TABLE) {
|
||
endTagInTable(p, token);
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.HTML:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.TH:
|
||
case TAG_ID.THEAD:
|
||
case TAG_ID.TR: {
|
||
break;
|
||
}
|
||
default: {
|
||
endTagInBody(p, token);
|
||
}
|
||
}
|
||
}
|
||
function startTagInColumnGroup(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.COL: {
|
||
p._appendElement(token, NS.HTML);
|
||
token.ackSelfClosing = true;
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
startTagInHead(p, token);
|
||
break;
|
||
}
|
||
default: {
|
||
tokenInColumnGroup(p, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInColumnGroup(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.COLGROUP: {
|
||
if (p.openElements.currentTagId === TAG_ID.COLGROUP) {
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.IN_TABLE;
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
templateEndTagInHead(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.COL: {
|
||
break;
|
||
}
|
||
default: {
|
||
tokenInColumnGroup(p, token);
|
||
}
|
||
}
|
||
}
|
||
function tokenInColumnGroup(p, token) {
|
||
if (p.openElements.currentTagId === TAG_ID.COLGROUP) {
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.IN_TABLE;
|
||
p._processToken(token);
|
||
}
|
||
}
|
||
function startTagInTableBody(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.TR: {
|
||
p.openElements.clearBackToTableBodyContext();
|
||
p._insertElement(token, NS.HTML);
|
||
p.insertionMode = InsertionMode.IN_ROW;
|
||
break;
|
||
}
|
||
case TAG_ID.TH:
|
||
case TAG_ID.TD: {
|
||
p.openElements.clearBackToTableBodyContext();
|
||
p._insertFakeElement(TAG_NAMES.TR, TAG_ID.TR);
|
||
p.insertionMode = InsertionMode.IN_ROW;
|
||
startTagInRow(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD: {
|
||
if (p.openElements.hasTableBodyContextInTableScope()) {
|
||
p.openElements.clearBackToTableBodyContext();
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.IN_TABLE;
|
||
startTagInTable(p, token);
|
||
}
|
||
break;
|
||
}
|
||
default: {
|
||
startTagInTable(p, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInTableBody(p, token) {
|
||
const tn = token.tagID;
|
||
switch (token.tagID) {
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD: {
|
||
if (p.openElements.hasInTableScope(tn)) {
|
||
p.openElements.clearBackToTableBodyContext();
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.IN_TABLE;
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TABLE: {
|
||
if (p.openElements.hasTableBodyContextInTableScope()) {
|
||
p.openElements.clearBackToTableBodyContext();
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.IN_TABLE;
|
||
endTagInTable(p, token);
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.HTML:
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TH:
|
||
case TAG_ID.TR: {
|
||
break;
|
||
}
|
||
default: {
|
||
endTagInTable(p, token);
|
||
}
|
||
}
|
||
}
|
||
function startTagInRow(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.TH:
|
||
case TAG_ID.TD: {
|
||
p.openElements.clearBackToTableRowContext();
|
||
p._insertElement(token, NS.HTML);
|
||
p.insertionMode = InsertionMode.IN_CELL;
|
||
p.activeFormattingElements.insertMarker();
|
||
break;
|
||
}
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD:
|
||
case TAG_ID.TR: {
|
||
if (p.openElements.hasInTableScope(TAG_ID.TR)) {
|
||
p.openElements.clearBackToTableRowContext();
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
startTagInTableBody(p, token);
|
||
}
|
||
break;
|
||
}
|
||
default: {
|
||
startTagInTable(p, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInRow(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.TR: {
|
||
if (p.openElements.hasInTableScope(TAG_ID.TR)) {
|
||
p.openElements.clearBackToTableRowContext();
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TABLE: {
|
||
if (p.openElements.hasInTableScope(TAG_ID.TR)) {
|
||
p.openElements.clearBackToTableRowContext();
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
endTagInTableBody(p, token);
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD: {
|
||
if (p.openElements.hasInTableScope(token.tagID) || p.openElements.hasInTableScope(TAG_ID.TR)) {
|
||
p.openElements.clearBackToTableRowContext();
|
||
p.openElements.pop();
|
||
p.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
endTagInTableBody(p, token);
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.HTML:
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TH: {
|
||
break;
|
||
}
|
||
default: {
|
||
endTagInTable(p, token);
|
||
}
|
||
}
|
||
}
|
||
function startTagInCell(p, token) {
|
||
const tn = token.tagID;
|
||
if (TABLE_VOID_ELEMENTS.has(tn)) {
|
||
if (p.openElements.hasInTableScope(TAG_ID.TD) || p.openElements.hasInTableScope(TAG_ID.TH)) {
|
||
p._closeTableCell();
|
||
startTagInRow(p, token);
|
||
}
|
||
} else {
|
||
startTagInBody(p, token);
|
||
}
|
||
}
|
||
function endTagInCell(p, token) {
|
||
const tn = token.tagID;
|
||
switch (tn) {
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TH: {
|
||
if (p.openElements.hasInTableScope(tn)) {
|
||
p.openElements.generateImpliedEndTags();
|
||
p.openElements.popUntilTagNamePopped(tn);
|
||
p.activeFormattingElements.clearToLastMarker();
|
||
p.insertionMode = InsertionMode.IN_ROW;
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TABLE:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD:
|
||
case TAG_ID.TR: {
|
||
if (p.openElements.hasInTableScope(tn)) {
|
||
p._closeTableCell();
|
||
endTagInRow(p, token);
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.HTML: {
|
||
break;
|
||
}
|
||
default: {
|
||
endTagInBody(p, token);
|
||
}
|
||
}
|
||
}
|
||
function startTagInSelect(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.OPTION: {
|
||
if (p.openElements.currentTagId === TAG_ID.OPTION) {
|
||
p.openElements.pop();
|
||
}
|
||
p._insertElement(token, NS.HTML);
|
||
break;
|
||
}
|
||
case TAG_ID.OPTGROUP: {
|
||
if (p.openElements.currentTagId === TAG_ID.OPTION) {
|
||
p.openElements.pop();
|
||
}
|
||
if (p.openElements.currentTagId === TAG_ID.OPTGROUP) {
|
||
p.openElements.pop();
|
||
}
|
||
p._insertElement(token, NS.HTML);
|
||
break;
|
||
}
|
||
case TAG_ID.INPUT:
|
||
case TAG_ID.KEYGEN:
|
||
case TAG_ID.TEXTAREA:
|
||
case TAG_ID.SELECT: {
|
||
if (p.openElements.hasInSelectScope(TAG_ID.SELECT)) {
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.SELECT);
|
||
p._resetInsertionMode();
|
||
if (token.tagID !== TAG_ID.SELECT) {
|
||
p._processStartTag(token);
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.SCRIPT:
|
||
case TAG_ID.TEMPLATE: {
|
||
startTagInHead(p, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
function endTagInSelect(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.OPTGROUP: {
|
||
if (p.openElements.stackTop > 0 && p.openElements.currentTagId === TAG_ID.OPTION && p.openElements.tagIDs[p.openElements.stackTop - 1] === TAG_ID.OPTGROUP) {
|
||
p.openElements.pop();
|
||
}
|
||
if (p.openElements.currentTagId === TAG_ID.OPTGROUP) {
|
||
p.openElements.pop();
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.OPTION: {
|
||
if (p.openElements.currentTagId === TAG_ID.OPTION) {
|
||
p.openElements.pop();
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.SELECT: {
|
||
if (p.openElements.hasInSelectScope(TAG_ID.SELECT)) {
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.SELECT);
|
||
p._resetInsertionMode();
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
templateEndTagInHead(p, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
function startTagInSelectInTable(p, token) {
|
||
const tn = token.tagID;
|
||
if (tn === TAG_ID.CAPTION || tn === TAG_ID.TABLE || tn === TAG_ID.TBODY || tn === TAG_ID.TFOOT || tn === TAG_ID.THEAD || tn === TAG_ID.TR || tn === TAG_ID.TD || tn === TAG_ID.TH) {
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.SELECT);
|
||
p._resetInsertionMode();
|
||
p._processStartTag(token);
|
||
} else {
|
||
startTagInSelect(p, token);
|
||
}
|
||
}
|
||
function endTagInSelectInTable(p, token) {
|
||
const tn = token.tagID;
|
||
if (tn === TAG_ID.CAPTION || tn === TAG_ID.TABLE || tn === TAG_ID.TBODY || tn === TAG_ID.TFOOT || tn === TAG_ID.THEAD || tn === TAG_ID.TR || tn === TAG_ID.TD || tn === TAG_ID.TH) {
|
||
if (p.openElements.hasInTableScope(tn)) {
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.SELECT);
|
||
p._resetInsertionMode();
|
||
p.onEndTag(token);
|
||
}
|
||
} else {
|
||
endTagInSelect(p, token);
|
||
}
|
||
}
|
||
function startTagInTemplate(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.BASE:
|
||
case TAG_ID.BASEFONT:
|
||
case TAG_ID.BGSOUND:
|
||
case TAG_ID.LINK:
|
||
case TAG_ID.META:
|
||
case TAG_ID.NOFRAMES:
|
||
case TAG_ID.SCRIPT:
|
||
case TAG_ID.STYLE:
|
||
case TAG_ID.TEMPLATE:
|
||
case TAG_ID.TITLE: {
|
||
startTagInHead(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD: {
|
||
p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE;
|
||
p.insertionMode = InsertionMode.IN_TABLE;
|
||
startTagInTable(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.COL: {
|
||
p.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP;
|
||
p.insertionMode = InsertionMode.IN_COLUMN_GROUP;
|
||
startTagInColumnGroup(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TR: {
|
||
p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY;
|
||
p.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
startTagInTableBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TH: {
|
||
p.tmplInsertionModeStack[0] = InsertionMode.IN_ROW;
|
||
p.insertionMode = InsertionMode.IN_ROW;
|
||
startTagInRow(p, token);
|
||
break;
|
||
}
|
||
default: {
|
||
p.tmplInsertionModeStack[0] = InsertionMode.IN_BODY;
|
||
p.insertionMode = InsertionMode.IN_BODY;
|
||
startTagInBody(p, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInTemplate(p, token) {
|
||
if (token.tagID === TAG_ID.TEMPLATE) {
|
||
templateEndTagInHead(p, token);
|
||
}
|
||
}
|
||
function eofInTemplate(p, token) {
|
||
if (p.openElements.tmplCount > 0) {
|
||
p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
|
||
p.activeFormattingElements.clearToLastMarker();
|
||
p.tmplInsertionModeStack.shift();
|
||
p._resetInsertionMode();
|
||
p.onEof(token);
|
||
} else {
|
||
stopParsing(p, token);
|
||
}
|
||
}
|
||
function startTagAfterBody(p, token) {
|
||
if (token.tagID === TAG_ID.HTML) {
|
||
startTagInBody(p, token);
|
||
} else {
|
||
tokenAfterBody(p, token);
|
||
}
|
||
}
|
||
function endTagAfterBody(p, token) {
|
||
var _a2;
|
||
if (token.tagID === TAG_ID.HTML) {
|
||
if (!p.fragmentContext) {
|
||
p.insertionMode = InsertionMode.AFTER_AFTER_BODY;
|
||
}
|
||
if (p.options.sourceCodeLocationInfo && p.openElements.tagIDs[0] === TAG_ID.HTML) {
|
||
p._setEndLocation(p.openElements.items[0], token);
|
||
const bodyElement = p.openElements.items[1];
|
||
if (bodyElement && !((_a2 = p.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a2 === void 0 ? void 0 : _a2.endTag)) {
|
||
p._setEndLocation(bodyElement, token);
|
||
}
|
||
}
|
||
} else {
|
||
tokenAfterBody(p, token);
|
||
}
|
||
}
|
||
function tokenAfterBody(p, token) {
|
||
p.insertionMode = InsertionMode.IN_BODY;
|
||
modeInBody(p, token);
|
||
}
|
||
function startTagInFrameset(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.FRAMESET: {
|
||
p._insertElement(token, NS.HTML);
|
||
break;
|
||
}
|
||
case TAG_ID.FRAME: {
|
||
p._appendElement(token, NS.HTML);
|
||
token.ackSelfClosing = true;
|
||
break;
|
||
}
|
||
case TAG_ID.NOFRAMES: {
|
||
startTagInHead(p, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
function endTagInFrameset(p, token) {
|
||
if (token.tagID === TAG_ID.FRAMESET && !p.openElements.isRootHtmlElementCurrent()) {
|
||
p.openElements.pop();
|
||
if (!p.fragmentContext && p.openElements.currentTagId !== TAG_ID.FRAMESET) {
|
||
p.insertionMode = InsertionMode.AFTER_FRAMESET;
|
||
}
|
||
}
|
||
}
|
||
function startTagAfterFrameset(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.NOFRAMES: {
|
||
startTagInHead(p, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
function endTagAfterFrameset(p, token) {
|
||
if (token.tagID === TAG_ID.HTML) {
|
||
p.insertionMode = InsertionMode.AFTER_AFTER_FRAMESET;
|
||
}
|
||
}
|
||
function startTagAfterAfterBody(p, token) {
|
||
if (token.tagID === TAG_ID.HTML) {
|
||
startTagInBody(p, token);
|
||
} else {
|
||
tokenAfterAfterBody(p, token);
|
||
}
|
||
}
|
||
function tokenAfterAfterBody(p, token) {
|
||
p.insertionMode = InsertionMode.IN_BODY;
|
||
modeInBody(p, token);
|
||
}
|
||
function startTagAfterAfterFrameset(p, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p, token);
|
||
break;
|
||
}
|
||
case TAG_ID.NOFRAMES: {
|
||
startTagInHead(p, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
function nullCharacterInForeignContent(p, token) {
|
||
token.chars = REPLACEMENT_CHARACTER;
|
||
p._insertCharacters(token);
|
||
}
|
||
function characterInForeignContent(p, token) {
|
||
p._insertCharacters(token);
|
||
p.framesetOk = false;
|
||
}
|
||
function popUntilHtmlOrIntegrationPoint(p) {
|
||
while (p.treeAdapter.getNamespaceURI(p.openElements.current) !== NS.HTML && !p._isIntegrationPoint(p.openElements.currentTagId, p.openElements.current)) {
|
||
p.openElements.pop();
|
||
}
|
||
}
|
||
function startTagInForeignContent(p, token) {
|
||
if (causesExit(token)) {
|
||
popUntilHtmlOrIntegrationPoint(p);
|
||
p._startTagOutsideForeignContent(token);
|
||
} else {
|
||
const current = p._getAdjustedCurrentElement();
|
||
const currentNs = p.treeAdapter.getNamespaceURI(current);
|
||
if (currentNs === NS.MATHML) {
|
||
adjustTokenMathMLAttrs(token);
|
||
} else if (currentNs === NS.SVG) {
|
||
adjustTokenSVGTagName(token);
|
||
adjustTokenSVGAttrs(token);
|
||
}
|
||
adjustTokenXMLAttrs(token);
|
||
if (token.selfClosing) {
|
||
p._appendElement(token, currentNs);
|
||
} else {
|
||
p._insertElement(token, currentNs);
|
||
}
|
||
token.ackSelfClosing = true;
|
||
}
|
||
}
|
||
function endTagInForeignContent(p, token) {
|
||
if (token.tagID === TAG_ID.P || token.tagID === TAG_ID.BR) {
|
||
popUntilHtmlOrIntegrationPoint(p);
|
||
p._endTagOutsideForeignContent(token);
|
||
return;
|
||
}
|
||
for (let i = p.openElements.stackTop; i > 0; i--) {
|
||
const element = p.openElements.items[i];
|
||
if (p.treeAdapter.getNamespaceURI(element) === NS.HTML) {
|
||
p._endTagOutsideForeignContent(token);
|
||
break;
|
||
}
|
||
const tagName = p.treeAdapter.getTagName(element);
|
||
if (tagName.toLowerCase() === token.tagName) {
|
||
token.tagName = tagName;
|
||
p.openElements.shortenToLength(i);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
|
||
// node_modules/entities/lib/esm/escape.js
|
||
var xmlCodeMap = /* @__PURE__ */ new Map([
|
||
[34, """],
|
||
[38, "&"],
|
||
[39, "'"],
|
||
[60, "<"],
|
||
[62, ">"]
|
||
]);
|
||
var getCodePoint = (
|
||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||
String.prototype.codePointAt != null ? (str, index) => str.codePointAt(index) : (
|
||
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
||
(c, index) => (c.charCodeAt(index) & 64512) === 55296 ? (c.charCodeAt(index) - 55296) * 1024 + c.charCodeAt(index + 1) - 56320 + 65536 : c.charCodeAt(index)
|
||
)
|
||
);
|
||
function getEscaper(regex, map) {
|
||
return function escape(data) {
|
||
let match;
|
||
let lastIdx = 0;
|
||
let result = "";
|
||
while (match = regex.exec(data)) {
|
||
if (lastIdx !== match.index) {
|
||
result += data.substring(lastIdx, match.index);
|
||
}
|
||
result += map.get(match[0].charCodeAt(0));
|
||
lastIdx = match.index + 1;
|
||
}
|
||
return result + data.substring(lastIdx);
|
||
};
|
||
}
|
||
var escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap);
|
||
var escapeAttribute = getEscaper(/["&\u00A0]/g, /* @__PURE__ */ new Map([
|
||
[34, """],
|
||
[38, "&"],
|
||
[160, " "]
|
||
]));
|
||
var escapeText = getEscaper(/[&<>\u00A0]/g, /* @__PURE__ */ new Map([
|
||
[38, "&"],
|
||
[60, "<"],
|
||
[62, ">"],
|
||
[160, " "]
|
||
]));
|
||
|
||
// node_modules/parse5/dist/serializer/index.js
|
||
var VOID_ELEMENTS = /* @__PURE__ */ new Set([
|
||
TAG_NAMES.AREA,
|
||
TAG_NAMES.BASE,
|
||
TAG_NAMES.BASEFONT,
|
||
TAG_NAMES.BGSOUND,
|
||
TAG_NAMES.BR,
|
||
TAG_NAMES.COL,
|
||
TAG_NAMES.EMBED,
|
||
TAG_NAMES.FRAME,
|
||
TAG_NAMES.HR,
|
||
TAG_NAMES.IMG,
|
||
TAG_NAMES.INPUT,
|
||
TAG_NAMES.KEYGEN,
|
||
TAG_NAMES.LINK,
|
||
TAG_NAMES.META,
|
||
TAG_NAMES.PARAM,
|
||
TAG_NAMES.SOURCE,
|
||
TAG_NAMES.TRACK,
|
||
TAG_NAMES.WBR
|
||
]);
|
||
function isVoidElement(node, options) {
|
||
return options.treeAdapter.isElementNode(node) && options.treeAdapter.getNamespaceURI(node) === NS.HTML && VOID_ELEMENTS.has(options.treeAdapter.getTagName(node));
|
||
}
|
||
var defaultOpts = { treeAdapter: defaultTreeAdapter, scriptingEnabled: true };
|
||
function serialize(node, options) {
|
||
const opts = { ...defaultOpts, ...options };
|
||
if (isVoidElement(node, opts)) {
|
||
return "";
|
||
}
|
||
return serializeChildNodes(node, opts);
|
||
}
|
||
function serializeChildNodes(parentNode, options) {
|
||
let html = "";
|
||
const container = options.treeAdapter.isElementNode(parentNode) && options.treeAdapter.getTagName(parentNode) === TAG_NAMES.TEMPLATE && options.treeAdapter.getNamespaceURI(parentNode) === NS.HTML ? options.treeAdapter.getTemplateContent(parentNode) : parentNode;
|
||
const childNodes = options.treeAdapter.getChildNodes(container);
|
||
if (childNodes) {
|
||
for (const currentNode of childNodes) {
|
||
html += serializeNode(currentNode, options);
|
||
}
|
||
}
|
||
return html;
|
||
}
|
||
function serializeNode(node, options) {
|
||
if (options.treeAdapter.isElementNode(node)) {
|
||
return serializeElement(node, options);
|
||
}
|
||
if (options.treeAdapter.isTextNode(node)) {
|
||
return serializeTextNode(node, options);
|
||
}
|
||
if (options.treeAdapter.isCommentNode(node)) {
|
||
return serializeCommentNode(node, options);
|
||
}
|
||
if (options.treeAdapter.isDocumentTypeNode(node)) {
|
||
return serializeDocumentTypeNode(node, options);
|
||
}
|
||
return "";
|
||
}
|
||
function serializeElement(node, options) {
|
||
const tn = options.treeAdapter.getTagName(node);
|
||
return `<${tn}${serializeAttributes(node, options)}>${isVoidElement(node, options) ? "" : `${serializeChildNodes(node, options)}</${tn}>`}`;
|
||
}
|
||
function serializeAttributes(node, { treeAdapter }) {
|
||
let html = "";
|
||
for (const attr of treeAdapter.getAttrList(node)) {
|
||
html += " ";
|
||
if (!attr.namespace) {
|
||
html += attr.name;
|
||
} else
|
||
switch (attr.namespace) {
|
||
case NS.XML: {
|
||
html += `xml:${attr.name}`;
|
||
break;
|
||
}
|
||
case NS.XMLNS: {
|
||
if (attr.name !== "xmlns") {
|
||
html += "xmlns:";
|
||
}
|
||
html += attr.name;
|
||
break;
|
||
}
|
||
case NS.XLINK: {
|
||
html += `xlink:${attr.name}`;
|
||
break;
|
||
}
|
||
default: {
|
||
html += `${attr.prefix}:${attr.name}`;
|
||
}
|
||
}
|
||
html += `="${escapeAttribute(attr.value)}"`;
|
||
}
|
||
return html;
|
||
}
|
||
function serializeTextNode(node, options) {
|
||
const { treeAdapter } = options;
|
||
const content = treeAdapter.getTextNodeContent(node);
|
||
const parent = treeAdapter.getParentNode(node);
|
||
const parentTn = parent && treeAdapter.isElementNode(parent) && treeAdapter.getTagName(parent);
|
||
return parentTn && treeAdapter.getNamespaceURI(parent) === NS.HTML && hasUnescapedText(parentTn, options.scriptingEnabled) ? content : escapeText(content);
|
||
}
|
||
function serializeCommentNode(node, { treeAdapter }) {
|
||
return `<!--${treeAdapter.getCommentNodeContent(node)}-->`;
|
||
}
|
||
function serializeDocumentTypeNode(node, { treeAdapter }) {
|
||
return `<!DOCTYPE ${treeAdapter.getDocumentTypeNodeName(node)}>`;
|
||
}
|
||
|
||
// node_modules/parse5/dist/index.js
|
||
function parse(html, options) {
|
||
return Parser.parse(html, options);
|
||
}
|
||
function parseFragment(fragmentContext, html, options) {
|
||
if (typeof fragmentContext === "string") {
|
||
options = html;
|
||
html = fragmentContext;
|
||
fragmentContext = null;
|
||
}
|
||
const parser = Parser.getFragmentParser(fragmentContext, options);
|
||
parser.tokenizer.write(html, true);
|
||
return parser.getFragment();
|
||
}
|
||
|
||
// src/rewrite/html.js
|
||
var HTML = class extends import_events.default {
|
||
/**
|
||
*
|
||
* @param {Ultraviolet} ctx
|
||
*/
|
||
constructor(ctx) {
|
||
super();
|
||
this.ctx = ctx;
|
||
this.rewriteUrl = ctx.rewriteUrl;
|
||
this.sourceUrl = ctx.sourceUrl;
|
||
}
|
||
rewrite(str, options = {}) {
|
||
if (!str)
|
||
return str;
|
||
return this.recast(
|
||
str,
|
||
(node) => {
|
||
if (node.tagName)
|
||
this.emit("element", node, "rewrite");
|
||
if (node.attr)
|
||
this.emit("attr", node, "rewrite");
|
||
if (node.nodeName === "#text")
|
||
this.emit("text", node, "rewrite");
|
||
},
|
||
options
|
||
);
|
||
}
|
||
source(str, options = {}) {
|
||
if (!str)
|
||
return str;
|
||
return this.recast(
|
||
str,
|
||
(node) => {
|
||
if (node.tagName)
|
||
this.emit("element", node, "source");
|
||
if (node.attr)
|
||
this.emit("attr", node, "source");
|
||
if (node.nodeName === "#text")
|
||
this.emit("text", node, "source");
|
||
},
|
||
options
|
||
);
|
||
}
|
||
recast(str, fn, options = {}) {
|
||
try {
|
||
const ast = (options.document ? parse : parseFragment)(
|
||
new String(str).toString()
|
||
);
|
||
this.iterate(ast, fn, options);
|
||
return serialize(ast);
|
||
} catch (e) {
|
||
return str;
|
||
}
|
||
}
|
||
iterate(ast, fn, fnOptions) {
|
||
if (!ast)
|
||
return ast;
|
||
if (ast.tagName) {
|
||
const element = new P5Element(ast, false, fnOptions);
|
||
fn(element);
|
||
if (ast.attrs) {
|
||
for (const attr of ast.attrs) {
|
||
if (!attr.skip)
|
||
fn(new AttributeEvent(element, attr, fnOptions));
|
||
}
|
||
}
|
||
}
|
||
if (ast.childNodes) {
|
||
for (const child of ast.childNodes) {
|
||
if (!child.skip)
|
||
this.iterate(child, fn, fnOptions);
|
||
}
|
||
}
|
||
if (ast.nodeName === "#text") {
|
||
fn(
|
||
new TextEvent(
|
||
ast,
|
||
new P5Element(ast.parentNode),
|
||
false,
|
||
fnOptions
|
||
)
|
||
);
|
||
}
|
||
return ast;
|
||
}
|
||
wrapSrcset(str, meta = this.ctx.meta) {
|
||
return str.split(",").map((src) => {
|
||
const parts = src.trimStart().split(" ");
|
||
if (parts[0])
|
||
parts[0] = this.ctx.rewriteUrl(parts[0], meta);
|
||
return parts.join(" ");
|
||
}).join(", ");
|
||
}
|
||
unwrapSrcset(str, meta = this.ctx.meta) {
|
||
return str.split(",").map((src) => {
|
||
const parts = src.trimStart().split(" ");
|
||
if (parts[0])
|
||
parts[0] = this.ctx.sourceUrl(parts[0], meta);
|
||
return parts.join(" ");
|
||
}).join(", ");
|
||
}
|
||
static parse = parse;
|
||
static parseFragment = parseFragment;
|
||
static serialize = serialize;
|
||
};
|
||
var P5Element = class _P5Element extends import_events.default {
|
||
constructor(node, stream = false, options = {}) {
|
||
super();
|
||
this.stream = stream;
|
||
this.node = node;
|
||
this.options = options;
|
||
}
|
||
setAttribute(name42, value) {
|
||
for (const attr of this.attrs) {
|
||
if (attr.name === name42) {
|
||
attr.value = value;
|
||
return true;
|
||
}
|
||
}
|
||
this.attrs.push({
|
||
name: name42,
|
||
value
|
||
});
|
||
}
|
||
getAttribute(name42) {
|
||
const attr = this.attrs.find((attr2) => attr2.name === name42) || {};
|
||
return attr.value;
|
||
}
|
||
hasAttribute(name42) {
|
||
return !!this.attrs.find((attr) => attr.name === name42);
|
||
}
|
||
removeAttribute(name42) {
|
||
const i = this.attrs.findIndex((attr) => attr.name === name42);
|
||
if (typeof i !== "undefined")
|
||
this.attrs.splice(i, 1);
|
||
}
|
||
get tagName() {
|
||
return this.node.tagName;
|
||
}
|
||
set tagName(val) {
|
||
this.node.tagName = val;
|
||
}
|
||
get childNodes() {
|
||
return !this.stream ? this.node.childNodes : null;
|
||
}
|
||
get innerHTML() {
|
||
return !this.stream ? serialize({
|
||
nodeName: "#document-fragment",
|
||
childNodes: this.childNodes
|
||
}) : null;
|
||
}
|
||
set innerHTML(val) {
|
||
if (!this.stream)
|
||
this.node.childNodes = parseFragment(val).childNodes;
|
||
}
|
||
get outerHTML() {
|
||
return !this.stream ? serialize({
|
||
nodeName: "#document-fragment",
|
||
childNodes: [this]
|
||
}) : null;
|
||
}
|
||
set outerHTML(val) {
|
||
if (!this.stream)
|
||
this.parentNode.childNodes.splice(
|
||
this.parentNode.childNodes.findIndex(
|
||
(node) => node === this.node
|
||
),
|
||
1,
|
||
...parseFragment(val).childNodes
|
||
);
|
||
}
|
||
get textContent() {
|
||
if (this.stream)
|
||
return null;
|
||
let str = "";
|
||
this.iterate(this.node, (node) => {
|
||
if (node.nodeName === "#text")
|
||
str += node.value;
|
||
});
|
||
return str;
|
||
}
|
||
set textContent(val) {
|
||
if (!this.stream)
|
||
this.node.childNodes = [
|
||
{
|
||
nodeName: "#text",
|
||
value: val,
|
||
parentNode: this.node
|
||
}
|
||
];
|
||
}
|
||
get nodeName() {
|
||
return this.node.nodeName;
|
||
}
|
||
get parentNode() {
|
||
return this.node.parentNode ? new _P5Element(this.node.parentNode) : null;
|
||
}
|
||
get attrs() {
|
||
return this.node.attrs;
|
||
}
|
||
get namespaceURI() {
|
||
return this.node.namespaceURI;
|
||
}
|
||
};
|
||
var AttributeEvent = class {
|
||
constructor(node, attr, options = {}) {
|
||
this.attr = attr;
|
||
this.attrs = node.attrs;
|
||
this.node = node;
|
||
this.options = options;
|
||
}
|
||
delete() {
|
||
const i = this.attrs.findIndex((attr) => attr === this.attr);
|
||
this.attrs.splice(i, 1);
|
||
Object.defineProperty(this, "deleted", {
|
||
get: () => true
|
||
});
|
||
return true;
|
||
}
|
||
get name() {
|
||
return this.attr.name;
|
||
}
|
||
set name(val) {
|
||
this.attr.name = val;
|
||
}
|
||
get value() {
|
||
return this.attr.value;
|
||
}
|
||
set value(val) {
|
||
this.attr.value = val;
|
||
}
|
||
get deleted() {
|
||
return false;
|
||
}
|
||
};
|
||
var TextEvent = class {
|
||
constructor(node, element, stream = false, options = {}) {
|
||
this.stream = stream;
|
||
this.node = node;
|
||
this.element = element;
|
||
this.options = options;
|
||
}
|
||
get nodeName() {
|
||
return this.node.nodeName;
|
||
}
|
||
get parentNode() {
|
||
return this.element;
|
||
}
|
||
get value() {
|
||
return this.stream ? this.node.text : this.node.value;
|
||
}
|
||
set value(val) {
|
||
if (this.stream)
|
||
this.node.text = val;
|
||
else
|
||
this.node.value = val;
|
||
}
|
||
};
|
||
var html_default = HTML;
|
||
|
||
// node_modules/css-tree/lib/tokenizer/types.js
|
||
var EOF = 0;
|
||
var Ident = 1;
|
||
var Function2 = 2;
|
||
var AtKeyword = 3;
|
||
var Hash = 4;
|
||
var String2 = 5;
|
||
var BadString = 6;
|
||
var Url = 7;
|
||
var BadUrl = 8;
|
||
var Delim = 9;
|
||
var Number2 = 10;
|
||
var Percentage = 11;
|
||
var Dimension = 12;
|
||
var WhiteSpace = 13;
|
||
var CDO = 14;
|
||
var CDC = 15;
|
||
var Colon = 16;
|
||
var Semicolon = 17;
|
||
var Comma = 18;
|
||
var LeftSquareBracket = 19;
|
||
var RightSquareBracket = 20;
|
||
var LeftParenthesis = 21;
|
||
var RightParenthesis = 22;
|
||
var LeftCurlyBracket = 23;
|
||
var RightCurlyBracket = 24;
|
||
var Comment = 25;
|
||
|
||
// node_modules/css-tree/lib/tokenizer/char-code-definitions.js
|
||
var EOF2 = 0;
|
||
function isDigit(code2) {
|
||
return code2 >= 48 && code2 <= 57;
|
||
}
|
||
function isHexDigit(code2) {
|
||
return isDigit(code2) || // 0 .. 9
|
||
code2 >= 65 && code2 <= 70 || // A .. F
|
||
code2 >= 97 && code2 <= 102;
|
||
}
|
||
function isUppercaseLetter(code2) {
|
||
return code2 >= 65 && code2 <= 90;
|
||
}
|
||
function isLowercaseLetter(code2) {
|
||
return code2 >= 97 && code2 <= 122;
|
||
}
|
||
function isLetter(code2) {
|
||
return isUppercaseLetter(code2) || isLowercaseLetter(code2);
|
||
}
|
||
function isNonAscii(code2) {
|
||
return code2 >= 128;
|
||
}
|
||
function isNameStart(code2) {
|
||
return isLetter(code2) || isNonAscii(code2) || code2 === 95;
|
||
}
|
||
function isName(code2) {
|
||
return isNameStart(code2) || isDigit(code2) || code2 === 45;
|
||
}
|
||
function isNonPrintable(code2) {
|
||
return code2 >= 0 && code2 <= 8 || code2 === 11 || code2 >= 14 && code2 <= 31 || code2 === 127;
|
||
}
|
||
function isNewline(code2) {
|
||
return code2 === 10 || code2 === 13 || code2 === 12;
|
||
}
|
||
function isWhiteSpace(code2) {
|
||
return isNewline(code2) || code2 === 32 || code2 === 9;
|
||
}
|
||
function isValidEscape(first, second) {
|
||
if (first !== 92) {
|
||
return false;
|
||
}
|
||
if (isNewline(second) || second === EOF2) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
function isIdentifierStart(first, second, third) {
|
||
if (first === 45) {
|
||
return isNameStart(second) || second === 45 || isValidEscape(second, third);
|
||
}
|
||
if (isNameStart(first)) {
|
||
return true;
|
||
}
|
||
if (first === 92) {
|
||
return isValidEscape(first, second);
|
||
}
|
||
return false;
|
||
}
|
||
function isNumberStart(first, second, third) {
|
||
if (first === 43 || first === 45) {
|
||
if (isDigit(second)) {
|
||
return 2;
|
||
}
|
||
return second === 46 && isDigit(third) ? 3 : 0;
|
||
}
|
||
if (first === 46) {
|
||
return isDigit(second) ? 2 : 0;
|
||
}
|
||
if (isDigit(first)) {
|
||
return 1;
|
||
}
|
||
return 0;
|
||
}
|
||
function isBOM(code2) {
|
||
if (code2 === 65279) {
|
||
return 1;
|
||
}
|
||
if (code2 === 65534) {
|
||
return 1;
|
||
}
|
||
return 0;
|
||
}
|
||
var CATEGORY = new Array(128);
|
||
var EofCategory = 128;
|
||
var WhiteSpaceCategory = 130;
|
||
var DigitCategory = 131;
|
||
var NameStartCategory = 132;
|
||
var NonPrintableCategory = 133;
|
||
for (let i = 0; i < CATEGORY.length; i++) {
|
||
CATEGORY[i] = isWhiteSpace(i) && WhiteSpaceCategory || isDigit(i) && DigitCategory || isNameStart(i) && NameStartCategory || isNonPrintable(i) && NonPrintableCategory || i || EofCategory;
|
||
}
|
||
function charCodeCategory(code2) {
|
||
return code2 < 128 ? CATEGORY[code2] : NameStartCategory;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/tokenizer/utils.js
|
||
function getCharCode(source, offset) {
|
||
return offset < source.length ? source.charCodeAt(offset) : 0;
|
||
}
|
||
function getNewlineLength(source, offset, code2) {
|
||
if (code2 === 13 && getCharCode(source, offset + 1) === 10) {
|
||
return 2;
|
||
}
|
||
return 1;
|
||
}
|
||
function cmpChar(testStr, offset, referenceCode) {
|
||
let code2 = testStr.charCodeAt(offset);
|
||
if (isUppercaseLetter(code2)) {
|
||
code2 = code2 | 32;
|
||
}
|
||
return code2 === referenceCode;
|
||
}
|
||
function cmpStr(testStr, start, end, referenceStr) {
|
||
if (end - start !== referenceStr.length) {
|
||
return false;
|
||
}
|
||
if (start < 0 || end > testStr.length) {
|
||
return false;
|
||
}
|
||
for (let i = start; i < end; i++) {
|
||
const referenceCode = referenceStr.charCodeAt(i - start);
|
||
let testCode = testStr.charCodeAt(i);
|
||
if (isUppercaseLetter(testCode)) {
|
||
testCode = testCode | 32;
|
||
}
|
||
if (testCode !== referenceCode) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function findWhiteSpaceStart(source, offset) {
|
||
for (; offset >= 0; offset--) {
|
||
if (!isWhiteSpace(source.charCodeAt(offset))) {
|
||
break;
|
||
}
|
||
}
|
||
return offset + 1;
|
||
}
|
||
function findWhiteSpaceEnd(source, offset) {
|
||
for (; offset < source.length; offset++) {
|
||
if (!isWhiteSpace(source.charCodeAt(offset))) {
|
||
break;
|
||
}
|
||
}
|
||
return offset;
|
||
}
|
||
function findDecimalNumberEnd(source, offset) {
|
||
for (; offset < source.length; offset++) {
|
||
if (!isDigit(source.charCodeAt(offset))) {
|
||
break;
|
||
}
|
||
}
|
||
return offset;
|
||
}
|
||
function consumeEscaped(source, offset) {
|
||
offset += 2;
|
||
if (isHexDigit(getCharCode(source, offset - 1))) {
|
||
for (const maxOffset = Math.min(source.length, offset + 5); offset < maxOffset; offset++) {
|
||
if (!isHexDigit(getCharCode(source, offset))) {
|
||
break;
|
||
}
|
||
}
|
||
const code2 = getCharCode(source, offset);
|
||
if (isWhiteSpace(code2)) {
|
||
offset += getNewlineLength(source, offset, code2);
|
||
}
|
||
}
|
||
return offset;
|
||
}
|
||
function consumeName(source, offset) {
|
||
for (; offset < source.length; offset++) {
|
||
const code2 = source.charCodeAt(offset);
|
||
if (isName(code2)) {
|
||
continue;
|
||
}
|
||
if (isValidEscape(code2, getCharCode(source, offset + 1))) {
|
||
offset = consumeEscaped(source, offset) - 1;
|
||
continue;
|
||
}
|
||
break;
|
||
}
|
||
return offset;
|
||
}
|
||
function consumeNumber(source, offset) {
|
||
let code2 = source.charCodeAt(offset);
|
||
if (code2 === 43 || code2 === 45) {
|
||
code2 = source.charCodeAt(offset += 1);
|
||
}
|
||
if (isDigit(code2)) {
|
||
offset = findDecimalNumberEnd(source, offset + 1);
|
||
code2 = source.charCodeAt(offset);
|
||
}
|
||
if (code2 === 46 && isDigit(source.charCodeAt(offset + 1))) {
|
||
offset += 2;
|
||
offset = findDecimalNumberEnd(source, offset);
|
||
}
|
||
if (cmpChar(
|
||
source,
|
||
offset,
|
||
101
|
||
/* e */
|
||
)) {
|
||
let sign = 0;
|
||
code2 = source.charCodeAt(offset + 1);
|
||
if (code2 === 45 || code2 === 43) {
|
||
sign = 1;
|
||
code2 = source.charCodeAt(offset + 2);
|
||
}
|
||
if (isDigit(code2)) {
|
||
offset = findDecimalNumberEnd(source, offset + 1 + sign + 1);
|
||
}
|
||
}
|
||
return offset;
|
||
}
|
||
function consumeBadUrlRemnants(source, offset) {
|
||
for (; offset < source.length; offset++) {
|
||
const code2 = source.charCodeAt(offset);
|
||
if (code2 === 41) {
|
||
offset++;
|
||
break;
|
||
}
|
||
if (isValidEscape(code2, getCharCode(source, offset + 1))) {
|
||
offset = consumeEscaped(source, offset);
|
||
}
|
||
}
|
||
return offset;
|
||
}
|
||
function decodeEscaped(escaped) {
|
||
if (escaped.length === 1 && !isHexDigit(escaped.charCodeAt(0))) {
|
||
return escaped[0];
|
||
}
|
||
let code2 = parseInt(escaped, 16);
|
||
if (code2 === 0 || // If this number is zero,
|
||
code2 >= 55296 && code2 <= 57343 || // or is for a surrogate,
|
||
code2 > 1114111) {
|
||
code2 = 65533;
|
||
}
|
||
return String.fromCodePoint(code2);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/tokenizer/names.js
|
||
var names_default = [
|
||
"EOF-token",
|
||
"ident-token",
|
||
"function-token",
|
||
"at-keyword-token",
|
||
"hash-token",
|
||
"string-token",
|
||
"bad-string-token",
|
||
"url-token",
|
||
"bad-url-token",
|
||
"delim-token",
|
||
"number-token",
|
||
"percentage-token",
|
||
"dimension-token",
|
||
"whitespace-token",
|
||
"CDO-token",
|
||
"CDC-token",
|
||
"colon-token",
|
||
"semicolon-token",
|
||
"comma-token",
|
||
"[-token",
|
||
"]-token",
|
||
"(-token",
|
||
")-token",
|
||
"{-token",
|
||
"}-token"
|
||
];
|
||
|
||
// node_modules/css-tree/lib/tokenizer/adopt-buffer.js
|
||
var MIN_SIZE = 16 * 1024;
|
||
function adoptBuffer(buffer = null, size) {
|
||
if (buffer === null || buffer.length < size) {
|
||
return new Uint32Array(Math.max(size + 1024, MIN_SIZE));
|
||
}
|
||
return buffer;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/tokenizer/OffsetToLocation.js
|
||
var N = 10;
|
||
var F = 12;
|
||
var R = 13;
|
||
function computeLinesAndColumns(host) {
|
||
const source = host.source;
|
||
const sourceLength = source.length;
|
||
const startOffset = source.length > 0 ? isBOM(source.charCodeAt(0)) : 0;
|
||
const lines = adoptBuffer(host.lines, sourceLength);
|
||
const columns = adoptBuffer(host.columns, sourceLength);
|
||
let line = host.startLine;
|
||
let column = host.startColumn;
|
||
for (let i = startOffset; i < sourceLength; i++) {
|
||
const code2 = source.charCodeAt(i);
|
||
lines[i] = line;
|
||
columns[i] = column++;
|
||
if (code2 === N || code2 === R || code2 === F) {
|
||
if (code2 === R && i + 1 < sourceLength && source.charCodeAt(i + 1) === N) {
|
||
i++;
|
||
lines[i] = line;
|
||
columns[i] = column;
|
||
}
|
||
line++;
|
||
column = 1;
|
||
}
|
||
}
|
||
lines[sourceLength] = line;
|
||
columns[sourceLength] = column;
|
||
host.lines = lines;
|
||
host.columns = columns;
|
||
host.computed = true;
|
||
}
|
||
var OffsetToLocation = class {
|
||
constructor() {
|
||
this.lines = null;
|
||
this.columns = null;
|
||
this.computed = false;
|
||
}
|
||
setSource(source, startOffset = 0, startLine = 1, startColumn = 1) {
|
||
this.source = source;
|
||
this.startOffset = startOffset;
|
||
this.startLine = startLine;
|
||
this.startColumn = startColumn;
|
||
this.computed = false;
|
||
}
|
||
getLocation(offset, filename) {
|
||
if (!this.computed) {
|
||
computeLinesAndColumns(this);
|
||
}
|
||
return {
|
||
source: filename,
|
||
offset: this.startOffset + offset,
|
||
line: this.lines[offset],
|
||
column: this.columns[offset]
|
||
};
|
||
}
|
||
getLocationRange(start, end, filename) {
|
||
if (!this.computed) {
|
||
computeLinesAndColumns(this);
|
||
}
|
||
return {
|
||
source: filename,
|
||
start: {
|
||
offset: this.startOffset + start,
|
||
line: this.lines[start],
|
||
column: this.columns[start]
|
||
},
|
||
end: {
|
||
offset: this.startOffset + end,
|
||
line: this.lines[end],
|
||
column: this.columns[end]
|
||
}
|
||
};
|
||
}
|
||
};
|
||
|
||
// node_modules/css-tree/lib/tokenizer/TokenStream.js
|
||
var OFFSET_MASK = 16777215;
|
||
var TYPE_SHIFT = 24;
|
||
var balancePair = /* @__PURE__ */ new Map([
|
||
[Function2, RightParenthesis],
|
||
[LeftParenthesis, RightParenthesis],
|
||
[LeftSquareBracket, RightSquareBracket],
|
||
[LeftCurlyBracket, RightCurlyBracket]
|
||
]);
|
||
var TokenStream = class {
|
||
constructor(source, tokenize3) {
|
||
this.setSource(source, tokenize3);
|
||
}
|
||
reset() {
|
||
this.eof = false;
|
||
this.tokenIndex = -1;
|
||
this.tokenType = 0;
|
||
this.tokenStart = this.firstCharOffset;
|
||
this.tokenEnd = this.firstCharOffset;
|
||
}
|
||
setSource(source = "", tokenize3 = () => {
|
||
}) {
|
||
source = String(source || "");
|
||
const sourceLength = source.length;
|
||
const offsetAndType = adoptBuffer(this.offsetAndType, source.length + 1);
|
||
const balance = adoptBuffer(this.balance, source.length + 1);
|
||
let tokenCount = 0;
|
||
let balanceCloseType = 0;
|
||
let balanceStart = 0;
|
||
let firstCharOffset = -1;
|
||
this.offsetAndType = null;
|
||
this.balance = null;
|
||
tokenize3(source, (type, start, end) => {
|
||
switch (type) {
|
||
default:
|
||
balance[tokenCount] = sourceLength;
|
||
break;
|
||
case balanceCloseType: {
|
||
let balancePrev = balanceStart & OFFSET_MASK;
|
||
balanceStart = balance[balancePrev];
|
||
balanceCloseType = balanceStart >> TYPE_SHIFT;
|
||
balance[tokenCount] = balancePrev;
|
||
balance[balancePrev++] = tokenCount;
|
||
for (; balancePrev < tokenCount; balancePrev++) {
|
||
if (balance[balancePrev] === sourceLength) {
|
||
balance[balancePrev] = tokenCount;
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
case LeftParenthesis:
|
||
case Function2:
|
||
case LeftSquareBracket:
|
||
case LeftCurlyBracket:
|
||
balance[tokenCount] = balanceStart;
|
||
balanceCloseType = balancePair.get(type);
|
||
balanceStart = balanceCloseType << TYPE_SHIFT | tokenCount;
|
||
break;
|
||
}
|
||
offsetAndType[tokenCount++] = type << TYPE_SHIFT | end;
|
||
if (firstCharOffset === -1) {
|
||
firstCharOffset = start;
|
||
}
|
||
});
|
||
offsetAndType[tokenCount] = EOF << TYPE_SHIFT | sourceLength;
|
||
balance[tokenCount] = sourceLength;
|
||
balance[sourceLength] = sourceLength;
|
||
while (balanceStart !== 0) {
|
||
const balancePrev = balanceStart & OFFSET_MASK;
|
||
balanceStart = balance[balancePrev];
|
||
balance[balancePrev] = sourceLength;
|
||
}
|
||
this.source = source;
|
||
this.firstCharOffset = firstCharOffset === -1 ? 0 : firstCharOffset;
|
||
this.tokenCount = tokenCount;
|
||
this.offsetAndType = offsetAndType;
|
||
this.balance = balance;
|
||
this.reset();
|
||
this.next();
|
||
}
|
||
lookupType(offset) {
|
||
offset += this.tokenIndex;
|
||
if (offset < this.tokenCount) {
|
||
return this.offsetAndType[offset] >> TYPE_SHIFT;
|
||
}
|
||
return EOF;
|
||
}
|
||
lookupOffset(offset) {
|
||
offset += this.tokenIndex;
|
||
if (offset < this.tokenCount) {
|
||
return this.offsetAndType[offset - 1] & OFFSET_MASK;
|
||
}
|
||
return this.source.length;
|
||
}
|
||
lookupValue(offset, referenceStr) {
|
||
offset += this.tokenIndex;
|
||
if (offset < this.tokenCount) {
|
||
return cmpStr(
|
||
this.source,
|
||
this.offsetAndType[offset - 1] & OFFSET_MASK,
|
||
this.offsetAndType[offset] & OFFSET_MASK,
|
||
referenceStr
|
||
);
|
||
}
|
||
return false;
|
||
}
|
||
getTokenStart(tokenIndex) {
|
||
if (tokenIndex === this.tokenIndex) {
|
||
return this.tokenStart;
|
||
}
|
||
if (tokenIndex > 0) {
|
||
return tokenIndex < this.tokenCount ? this.offsetAndType[tokenIndex - 1] & OFFSET_MASK : this.offsetAndType[this.tokenCount] & OFFSET_MASK;
|
||
}
|
||
return this.firstCharOffset;
|
||
}
|
||
substrToCursor(start) {
|
||
return this.source.substring(start, this.tokenStart);
|
||
}
|
||
isBalanceEdge(pos) {
|
||
return this.balance[this.tokenIndex] < pos;
|
||
}
|
||
isDelim(code2, offset) {
|
||
if (offset) {
|
||
return this.lookupType(offset) === Delim && this.source.charCodeAt(this.lookupOffset(offset)) === code2;
|
||
}
|
||
return this.tokenType === Delim && this.source.charCodeAt(this.tokenStart) === code2;
|
||
}
|
||
skip(tokenCount) {
|
||
let next = this.tokenIndex + tokenCount;
|
||
if (next < this.tokenCount) {
|
||
this.tokenIndex = next;
|
||
this.tokenStart = this.offsetAndType[next - 1] & OFFSET_MASK;
|
||
next = this.offsetAndType[next];
|
||
this.tokenType = next >> TYPE_SHIFT;
|
||
this.tokenEnd = next & OFFSET_MASK;
|
||
} else {
|
||
this.tokenIndex = this.tokenCount;
|
||
this.next();
|
||
}
|
||
}
|
||
next() {
|
||
let next = this.tokenIndex + 1;
|
||
if (next < this.tokenCount) {
|
||
this.tokenIndex = next;
|
||
this.tokenStart = this.tokenEnd;
|
||
next = this.offsetAndType[next];
|
||
this.tokenType = next >> TYPE_SHIFT;
|
||
this.tokenEnd = next & OFFSET_MASK;
|
||
} else {
|
||
this.eof = true;
|
||
this.tokenIndex = this.tokenCount;
|
||
this.tokenType = EOF;
|
||
this.tokenStart = this.tokenEnd = this.source.length;
|
||
}
|
||
}
|
||
skipSC() {
|
||
while (this.tokenType === WhiteSpace || this.tokenType === Comment) {
|
||
this.next();
|
||
}
|
||
}
|
||
skipUntilBalanced(startToken, stopConsume) {
|
||
let cursor = startToken;
|
||
let balanceEnd;
|
||
let offset;
|
||
loop:
|
||
for (; cursor < this.tokenCount; cursor++) {
|
||
balanceEnd = this.balance[cursor];
|
||
if (balanceEnd < startToken) {
|
||
break loop;
|
||
}
|
||
offset = cursor > 0 ? this.offsetAndType[cursor - 1] & OFFSET_MASK : this.firstCharOffset;
|
||
switch (stopConsume(this.source.charCodeAt(offset))) {
|
||
case 1:
|
||
break loop;
|
||
case 2:
|
||
cursor++;
|
||
break loop;
|
||
default:
|
||
if (this.balance[balanceEnd] === cursor) {
|
||
cursor = balanceEnd;
|
||
}
|
||
}
|
||
}
|
||
this.skip(cursor - this.tokenIndex);
|
||
}
|
||
forEachToken(fn) {
|
||
for (let i = 0, offset = this.firstCharOffset; i < this.tokenCount; i++) {
|
||
const start = offset;
|
||
const item = this.offsetAndType[i];
|
||
const end = item & OFFSET_MASK;
|
||
const type = item >> TYPE_SHIFT;
|
||
offset = end;
|
||
fn(type, start, end, i);
|
||
}
|
||
}
|
||
dump() {
|
||
const tokens = new Array(this.tokenCount);
|
||
this.forEachToken((type, start, end, index) => {
|
||
tokens[index] = {
|
||
idx: index,
|
||
type: names_default[type],
|
||
chunk: this.source.substring(start, end),
|
||
balance: this.balance[index]
|
||
};
|
||
});
|
||
return tokens;
|
||
}
|
||
};
|
||
|
||
// node_modules/css-tree/lib/tokenizer/index.js
|
||
function tokenize(source, onToken) {
|
||
function getCharCode2(offset2) {
|
||
return offset2 < sourceLength ? source.charCodeAt(offset2) : 0;
|
||
}
|
||
function consumeNumericToken() {
|
||
offset = consumeNumber(source, offset);
|
||
if (isIdentifierStart(getCharCode2(offset), getCharCode2(offset + 1), getCharCode2(offset + 2))) {
|
||
type = Dimension;
|
||
offset = consumeName(source, offset);
|
||
return;
|
||
}
|
||
if (getCharCode2(offset) === 37) {
|
||
type = Percentage;
|
||
offset++;
|
||
return;
|
||
}
|
||
type = Number2;
|
||
}
|
||
function consumeIdentLikeToken() {
|
||
const nameStartOffset = offset;
|
||
offset = consumeName(source, offset);
|
||
if (cmpStr(source, nameStartOffset, offset, "url") && getCharCode2(offset) === 40) {
|
||
offset = findWhiteSpaceEnd(source, offset + 1);
|
||
if (getCharCode2(offset) === 34 || getCharCode2(offset) === 39) {
|
||
type = Function2;
|
||
offset = nameStartOffset + 4;
|
||
return;
|
||
}
|
||
consumeUrlToken();
|
||
return;
|
||
}
|
||
if (getCharCode2(offset) === 40) {
|
||
type = Function2;
|
||
offset++;
|
||
return;
|
||
}
|
||
type = Ident;
|
||
}
|
||
function consumeStringToken(endingCodePoint) {
|
||
if (!endingCodePoint) {
|
||
endingCodePoint = getCharCode2(offset++);
|
||
}
|
||
type = String2;
|
||
for (; offset < source.length; offset++) {
|
||
const code2 = source.charCodeAt(offset);
|
||
switch (charCodeCategory(code2)) {
|
||
case endingCodePoint:
|
||
offset++;
|
||
return;
|
||
case WhiteSpaceCategory:
|
||
if (isNewline(code2)) {
|
||
offset += getNewlineLength(source, offset, code2);
|
||
type = BadString;
|
||
return;
|
||
}
|
||
break;
|
||
case 92:
|
||
if (offset === source.length - 1) {
|
||
break;
|
||
}
|
||
const nextCode = getCharCode2(offset + 1);
|
||
if (isNewline(nextCode)) {
|
||
offset += getNewlineLength(source, offset + 1, nextCode);
|
||
} else if (isValidEscape(code2, nextCode)) {
|
||
offset = consumeEscaped(source, offset) - 1;
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function consumeUrlToken() {
|
||
type = Url;
|
||
offset = findWhiteSpaceEnd(source, offset);
|
||
for (; offset < source.length; offset++) {
|
||
const code2 = source.charCodeAt(offset);
|
||
switch (charCodeCategory(code2)) {
|
||
case 41:
|
||
offset++;
|
||
return;
|
||
case WhiteSpaceCategory:
|
||
offset = findWhiteSpaceEnd(source, offset);
|
||
if (getCharCode2(offset) === 41 || offset >= source.length) {
|
||
if (offset < source.length) {
|
||
offset++;
|
||
}
|
||
return;
|
||
}
|
||
offset = consumeBadUrlRemnants(source, offset);
|
||
type = BadUrl;
|
||
return;
|
||
case 34:
|
||
case 39:
|
||
case 40:
|
||
case NonPrintableCategory:
|
||
offset = consumeBadUrlRemnants(source, offset);
|
||
type = BadUrl;
|
||
return;
|
||
case 92:
|
||
if (isValidEscape(code2, getCharCode2(offset + 1))) {
|
||
offset = consumeEscaped(source, offset) - 1;
|
||
break;
|
||
}
|
||
offset = consumeBadUrlRemnants(source, offset);
|
||
type = BadUrl;
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
source = String(source || "");
|
||
const sourceLength = source.length;
|
||
let start = isBOM(getCharCode2(0));
|
||
let offset = start;
|
||
let type;
|
||
while (offset < sourceLength) {
|
||
const code2 = source.charCodeAt(offset);
|
||
switch (charCodeCategory(code2)) {
|
||
case WhiteSpaceCategory:
|
||
type = WhiteSpace;
|
||
offset = findWhiteSpaceEnd(source, offset + 1);
|
||
break;
|
||
case 34:
|
||
consumeStringToken();
|
||
break;
|
||
case 35:
|
||
if (isName(getCharCode2(offset + 1)) || isValidEscape(getCharCode2(offset + 1), getCharCode2(offset + 2))) {
|
||
type = Hash;
|
||
offset = consumeName(source, offset + 1);
|
||
} else {
|
||
type = Delim;
|
||
offset++;
|
||
}
|
||
break;
|
||
case 39:
|
||
consumeStringToken();
|
||
break;
|
||
case 40:
|
||
type = LeftParenthesis;
|
||
offset++;
|
||
break;
|
||
case 41:
|
||
type = RightParenthesis;
|
||
offset++;
|
||
break;
|
||
case 43:
|
||
if (isNumberStart(code2, getCharCode2(offset + 1), getCharCode2(offset + 2))) {
|
||
consumeNumericToken();
|
||
} else {
|
||
type = Delim;
|
||
offset++;
|
||
}
|
||
break;
|
||
case 44:
|
||
type = Comma;
|
||
offset++;
|
||
break;
|
||
case 45:
|
||
if (isNumberStart(code2, getCharCode2(offset + 1), getCharCode2(offset + 2))) {
|
||
consumeNumericToken();
|
||
} else {
|
||
if (getCharCode2(offset + 1) === 45 && getCharCode2(offset + 2) === 62) {
|
||
type = CDC;
|
||
offset = offset + 3;
|
||
} else {
|
||
if (isIdentifierStart(code2, getCharCode2(offset + 1), getCharCode2(offset + 2))) {
|
||
consumeIdentLikeToken();
|
||
} else {
|
||
type = Delim;
|
||
offset++;
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
case 46:
|
||
if (isNumberStart(code2, getCharCode2(offset + 1), getCharCode2(offset + 2))) {
|
||
consumeNumericToken();
|
||
} else {
|
||
type = Delim;
|
||
offset++;
|
||
}
|
||
break;
|
||
case 47:
|
||
if (getCharCode2(offset + 1) === 42) {
|
||
type = Comment;
|
||
offset = source.indexOf("*/", offset + 2);
|
||
offset = offset === -1 ? source.length : offset + 2;
|
||
} else {
|
||
type = Delim;
|
||
offset++;
|
||
}
|
||
break;
|
||
case 58:
|
||
type = Colon;
|
||
offset++;
|
||
break;
|
||
case 59:
|
||
type = Semicolon;
|
||
offset++;
|
||
break;
|
||
case 60:
|
||
if (getCharCode2(offset + 1) === 33 && getCharCode2(offset + 2) === 45 && getCharCode2(offset + 3) === 45) {
|
||
type = CDO;
|
||
offset = offset + 4;
|
||
} else {
|
||
type = Delim;
|
||
offset++;
|
||
}
|
||
break;
|
||
case 64:
|
||
if (isIdentifierStart(getCharCode2(offset + 1), getCharCode2(offset + 2), getCharCode2(offset + 3))) {
|
||
type = AtKeyword;
|
||
offset = consumeName(source, offset + 1);
|
||
} else {
|
||
type = Delim;
|
||
offset++;
|
||
}
|
||
break;
|
||
case 91:
|
||
type = LeftSquareBracket;
|
||
offset++;
|
||
break;
|
||
case 92:
|
||
if (isValidEscape(code2, getCharCode2(offset + 1))) {
|
||
consumeIdentLikeToken();
|
||
} else {
|
||
type = Delim;
|
||
offset++;
|
||
}
|
||
break;
|
||
case 93:
|
||
type = RightSquareBracket;
|
||
offset++;
|
||
break;
|
||
case 123:
|
||
type = LeftCurlyBracket;
|
||
offset++;
|
||
break;
|
||
case 125:
|
||
type = RightCurlyBracket;
|
||
offset++;
|
||
break;
|
||
case DigitCategory:
|
||
consumeNumericToken();
|
||
break;
|
||
case NameStartCategory:
|
||
consumeIdentLikeToken();
|
||
break;
|
||
default:
|
||
type = Delim;
|
||
offset++;
|
||
}
|
||
onToken(type, start, start = offset);
|
||
}
|
||
}
|
||
|
||
// node_modules/css-tree/lib/utils/List.js
|
||
var releasedCursors = null;
|
||
var List = class _List {
|
||
static createItem(data) {
|
||
return {
|
||
prev: null,
|
||
next: null,
|
||
data
|
||
};
|
||
}
|
||
constructor() {
|
||
this.head = null;
|
||
this.tail = null;
|
||
this.cursor = null;
|
||
}
|
||
createItem(data) {
|
||
return _List.createItem(data);
|
||
}
|
||
// cursor helpers
|
||
allocateCursor(prev, next) {
|
||
let cursor;
|
||
if (releasedCursors !== null) {
|
||
cursor = releasedCursors;
|
||
releasedCursors = releasedCursors.cursor;
|
||
cursor.prev = prev;
|
||
cursor.next = next;
|
||
cursor.cursor = this.cursor;
|
||
} else {
|
||
cursor = {
|
||
prev,
|
||
next,
|
||
cursor: this.cursor
|
||
};
|
||
}
|
||
this.cursor = cursor;
|
||
return cursor;
|
||
}
|
||
releaseCursor() {
|
||
const { cursor } = this;
|
||
this.cursor = cursor.cursor;
|
||
cursor.prev = null;
|
||
cursor.next = null;
|
||
cursor.cursor = releasedCursors;
|
||
releasedCursors = cursor;
|
||
}
|
||
updateCursors(prevOld, prevNew, nextOld, nextNew) {
|
||
let { cursor } = this;
|
||
while (cursor !== null) {
|
||
if (cursor.prev === prevOld) {
|
||
cursor.prev = prevNew;
|
||
}
|
||
if (cursor.next === nextOld) {
|
||
cursor.next = nextNew;
|
||
}
|
||
cursor = cursor.cursor;
|
||
}
|
||
}
|
||
*[Symbol.iterator]() {
|
||
for (let cursor = this.head; cursor !== null; cursor = cursor.next) {
|
||
yield cursor.data;
|
||
}
|
||
}
|
||
// getters
|
||
get size() {
|
||
let size = 0;
|
||
for (let cursor = this.head; cursor !== null; cursor = cursor.next) {
|
||
size++;
|
||
}
|
||
return size;
|
||
}
|
||
get isEmpty() {
|
||
return this.head === null;
|
||
}
|
||
get first() {
|
||
return this.head && this.head.data;
|
||
}
|
||
get last() {
|
||
return this.tail && this.tail.data;
|
||
}
|
||
// convertors
|
||
fromArray(array) {
|
||
let cursor = null;
|
||
this.head = null;
|
||
for (let data of array) {
|
||
const item = _List.createItem(data);
|
||
if (cursor !== null) {
|
||
cursor.next = item;
|
||
} else {
|
||
this.head = item;
|
||
}
|
||
item.prev = cursor;
|
||
cursor = item;
|
||
}
|
||
this.tail = cursor;
|
||
return this;
|
||
}
|
||
toArray() {
|
||
return [...this];
|
||
}
|
||
toJSON() {
|
||
return [...this];
|
||
}
|
||
// array-like methods
|
||
forEach(fn, thisArg = this) {
|
||
const cursor = this.allocateCursor(null, this.head);
|
||
while (cursor.next !== null) {
|
||
const item = cursor.next;
|
||
cursor.next = item.next;
|
||
fn.call(thisArg, item.data, item, this);
|
||
}
|
||
this.releaseCursor();
|
||
}
|
||
forEachRight(fn, thisArg = this) {
|
||
const cursor = this.allocateCursor(this.tail, null);
|
||
while (cursor.prev !== null) {
|
||
const item = cursor.prev;
|
||
cursor.prev = item.prev;
|
||
fn.call(thisArg, item.data, item, this);
|
||
}
|
||
this.releaseCursor();
|
||
}
|
||
reduce(fn, initialValue, thisArg = this) {
|
||
let cursor = this.allocateCursor(null, this.head);
|
||
let acc = initialValue;
|
||
let item;
|
||
while (cursor.next !== null) {
|
||
item = cursor.next;
|
||
cursor.next = item.next;
|
||
acc = fn.call(thisArg, acc, item.data, item, this);
|
||
}
|
||
this.releaseCursor();
|
||
return acc;
|
||
}
|
||
reduceRight(fn, initialValue, thisArg = this) {
|
||
let cursor = this.allocateCursor(this.tail, null);
|
||
let acc = initialValue;
|
||
let item;
|
||
while (cursor.prev !== null) {
|
||
item = cursor.prev;
|
||
cursor.prev = item.prev;
|
||
acc = fn.call(thisArg, acc, item.data, item, this);
|
||
}
|
||
this.releaseCursor();
|
||
return acc;
|
||
}
|
||
some(fn, thisArg = this) {
|
||
for (let cursor = this.head; cursor !== null; cursor = cursor.next) {
|
||
if (fn.call(thisArg, cursor.data, cursor, this)) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
map(fn, thisArg = this) {
|
||
const result = new _List();
|
||
for (let cursor = this.head; cursor !== null; cursor = cursor.next) {
|
||
result.appendData(fn.call(thisArg, cursor.data, cursor, this));
|
||
}
|
||
return result;
|
||
}
|
||
filter(fn, thisArg = this) {
|
||
const result = new _List();
|
||
for (let cursor = this.head; cursor !== null; cursor = cursor.next) {
|
||
if (fn.call(thisArg, cursor.data, cursor, this)) {
|
||
result.appendData(cursor.data);
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
nextUntil(start, fn, thisArg = this) {
|
||
if (start === null) {
|
||
return;
|
||
}
|
||
const cursor = this.allocateCursor(null, start);
|
||
while (cursor.next !== null) {
|
||
const item = cursor.next;
|
||
cursor.next = item.next;
|
||
if (fn.call(thisArg, item.data, item, this)) {
|
||
break;
|
||
}
|
||
}
|
||
this.releaseCursor();
|
||
}
|
||
prevUntil(start, fn, thisArg = this) {
|
||
if (start === null) {
|
||
return;
|
||
}
|
||
const cursor = this.allocateCursor(start, null);
|
||
while (cursor.prev !== null) {
|
||
const item = cursor.prev;
|
||
cursor.prev = item.prev;
|
||
if (fn.call(thisArg, item.data, item, this)) {
|
||
break;
|
||
}
|
||
}
|
||
this.releaseCursor();
|
||
}
|
||
// mutation
|
||
clear() {
|
||
this.head = null;
|
||
this.tail = null;
|
||
}
|
||
copy() {
|
||
const result = new _List();
|
||
for (let data of this) {
|
||
result.appendData(data);
|
||
}
|
||
return result;
|
||
}
|
||
prepend(item) {
|
||
this.updateCursors(null, item, this.head, item);
|
||
if (this.head !== null) {
|
||
this.head.prev = item;
|
||
item.next = this.head;
|
||
} else {
|
||
this.tail = item;
|
||
}
|
||
this.head = item;
|
||
return this;
|
||
}
|
||
prependData(data) {
|
||
return this.prepend(_List.createItem(data));
|
||
}
|
||
append(item) {
|
||
return this.insert(item);
|
||
}
|
||
appendData(data) {
|
||
return this.insert(_List.createItem(data));
|
||
}
|
||
insert(item, before = null) {
|
||
if (before !== null) {
|
||
this.updateCursors(before.prev, item, before, item);
|
||
if (before.prev === null) {
|
||
if (this.head !== before) {
|
||
throw new Error("before doesn't belong to list");
|
||
}
|
||
this.head = item;
|
||
before.prev = item;
|
||
item.next = before;
|
||
this.updateCursors(null, item);
|
||
} else {
|
||
before.prev.next = item;
|
||
item.prev = before.prev;
|
||
before.prev = item;
|
||
item.next = before;
|
||
}
|
||
} else {
|
||
this.updateCursors(this.tail, item, null, item);
|
||
if (this.tail !== null) {
|
||
this.tail.next = item;
|
||
item.prev = this.tail;
|
||
} else {
|
||
this.head = item;
|
||
}
|
||
this.tail = item;
|
||
}
|
||
return this;
|
||
}
|
||
insertData(data, before) {
|
||
return this.insert(_List.createItem(data), before);
|
||
}
|
||
remove(item) {
|
||
this.updateCursors(item, item.prev, item, item.next);
|
||
if (item.prev !== null) {
|
||
item.prev.next = item.next;
|
||
} else {
|
||
if (this.head !== item) {
|
||
throw new Error("item doesn't belong to list");
|
||
}
|
||
this.head = item.next;
|
||
}
|
||
if (item.next !== null) {
|
||
item.next.prev = item.prev;
|
||
} else {
|
||
if (this.tail !== item) {
|
||
throw new Error("item doesn't belong to list");
|
||
}
|
||
this.tail = item.prev;
|
||
}
|
||
item.prev = null;
|
||
item.next = null;
|
||
return item;
|
||
}
|
||
push(data) {
|
||
this.insert(_List.createItem(data));
|
||
}
|
||
pop() {
|
||
return this.tail !== null ? this.remove(this.tail) : null;
|
||
}
|
||
unshift(data) {
|
||
this.prepend(_List.createItem(data));
|
||
}
|
||
shift() {
|
||
return this.head !== null ? this.remove(this.head) : null;
|
||
}
|
||
prependList(list) {
|
||
return this.insertList(list, this.head);
|
||
}
|
||
appendList(list) {
|
||
return this.insertList(list);
|
||
}
|
||
insertList(list, before) {
|
||
if (list.head === null) {
|
||
return this;
|
||
}
|
||
if (before !== void 0 && before !== null) {
|
||
this.updateCursors(before.prev, list.tail, before, list.head);
|
||
if (before.prev !== null) {
|
||
before.prev.next = list.head;
|
||
list.head.prev = before.prev;
|
||
} else {
|
||
this.head = list.head;
|
||
}
|
||
before.prev = list.tail;
|
||
list.tail.next = before;
|
||
} else {
|
||
this.updateCursors(this.tail, list.tail, null, list.head);
|
||
if (this.tail !== null) {
|
||
this.tail.next = list.head;
|
||
list.head.prev = this.tail;
|
||
} else {
|
||
this.head = list.head;
|
||
}
|
||
this.tail = list.tail;
|
||
}
|
||
list.head = null;
|
||
list.tail = null;
|
||
return this;
|
||
}
|
||
replace(oldItem, newItemOrList) {
|
||
if ("head" in newItemOrList) {
|
||
this.insertList(newItemOrList, oldItem);
|
||
} else {
|
||
this.insert(newItemOrList, oldItem);
|
||
}
|
||
this.remove(oldItem);
|
||
}
|
||
};
|
||
|
||
// node_modules/css-tree/lib/utils/create-custom-error.js
|
||
function createCustomError(name42, message) {
|
||
const error = Object.create(SyntaxError.prototype);
|
||
const errorStack = new Error();
|
||
return Object.assign(error, {
|
||
name: name42,
|
||
message,
|
||
get stack() {
|
||
return (errorStack.stack || "").replace(/^(.+\n){1,3}/, `${name42}: ${message}
|
||
`);
|
||
}
|
||
});
|
||
}
|
||
|
||
// node_modules/css-tree/lib/parser/SyntaxError.js
|
||
var MAX_LINE_LENGTH = 100;
|
||
var OFFSET_CORRECTION = 60;
|
||
var TAB_REPLACEMENT = " ";
|
||
function sourceFragment({ source, line, column }, extraLines) {
|
||
function processLines(start, end) {
|
||
return lines.slice(start, end).map(
|
||
(line2, idx) => String(start + idx + 1).padStart(maxNumLength) + " |" + line2
|
||
).join("\n");
|
||
}
|
||
const lines = source.split(/\r\n?|\n|\f/);
|
||
const startLine = Math.max(1, line - extraLines) - 1;
|
||
const endLine = Math.min(line + extraLines, lines.length + 1);
|
||
const maxNumLength = Math.max(4, String(endLine).length) + 1;
|
||
let cutLeft = 0;
|
||
column += (TAB_REPLACEMENT.length - 1) * (lines[line - 1].substr(0, column - 1).match(/\t/g) || []).length;
|
||
if (column > MAX_LINE_LENGTH) {
|
||
cutLeft = column - OFFSET_CORRECTION + 3;
|
||
column = OFFSET_CORRECTION - 2;
|
||
}
|
||
for (let i = startLine; i <= endLine; i++) {
|
||
if (i >= 0 && i < lines.length) {
|
||
lines[i] = lines[i].replace(/\t/g, TAB_REPLACEMENT);
|
||
lines[i] = (cutLeft > 0 && lines[i].length > cutLeft ? "\u2026" : "") + lines[i].substr(cutLeft, MAX_LINE_LENGTH - 2) + (lines[i].length > cutLeft + MAX_LINE_LENGTH - 1 ? "\u2026" : "");
|
||
}
|
||
}
|
||
return [
|
||
processLines(startLine, line),
|
||
new Array(column + maxNumLength + 2).join("-") + "^",
|
||
processLines(line, endLine)
|
||
].filter(Boolean).join("\n");
|
||
}
|
||
function SyntaxError2(message, source, offset, line, column) {
|
||
const error = Object.assign(createCustomError("SyntaxError", message), {
|
||
source,
|
||
offset,
|
||
line,
|
||
column,
|
||
sourceFragment(extraLines) {
|
||
return sourceFragment({ source, line, column }, isNaN(extraLines) ? 0 : extraLines);
|
||
},
|
||
get formattedMessage() {
|
||
return `Parse error: ${message}
|
||
` + sourceFragment({ source, line, column }, 2);
|
||
}
|
||
});
|
||
return error;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/parser/sequence.js
|
||
function readSequence(recognizer) {
|
||
const children = this.createList();
|
||
let space = false;
|
||
const context = {
|
||
recognizer
|
||
};
|
||
while (!this.eof) {
|
||
switch (this.tokenType) {
|
||
case Comment:
|
||
this.next();
|
||
continue;
|
||
case WhiteSpace:
|
||
space = true;
|
||
this.next();
|
||
continue;
|
||
}
|
||
let child = recognizer.getNode.call(this, context);
|
||
if (child === void 0) {
|
||
break;
|
||
}
|
||
if (space) {
|
||
if (recognizer.onWhiteSpace) {
|
||
recognizer.onWhiteSpace.call(this, child, children, context);
|
||
}
|
||
space = false;
|
||
}
|
||
children.push(child);
|
||
}
|
||
if (space && recognizer.onWhiteSpace) {
|
||
recognizer.onWhiteSpace.call(this, null, children, context);
|
||
}
|
||
return children;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/parser/create.js
|
||
var NOOP = () => {
|
||
};
|
||
var EXCLAMATIONMARK = 33;
|
||
var NUMBERSIGN = 35;
|
||
var SEMICOLON = 59;
|
||
var LEFTCURLYBRACKET = 123;
|
||
var NULL = 0;
|
||
function createParseContext(name42) {
|
||
return function() {
|
||
return this[name42]();
|
||
};
|
||
}
|
||
function fetchParseValues(dict) {
|
||
const result = /* @__PURE__ */ Object.create(null);
|
||
for (const name42 in dict) {
|
||
const item = dict[name42];
|
||
const fn = item.parse || item;
|
||
if (fn) {
|
||
result[name42] = fn;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
function processConfig(config) {
|
||
const parseConfig = {
|
||
context: /* @__PURE__ */ Object.create(null),
|
||
scope: Object.assign(/* @__PURE__ */ Object.create(null), config.scope),
|
||
atrule: fetchParseValues(config.atrule),
|
||
pseudo: fetchParseValues(config.pseudo),
|
||
node: fetchParseValues(config.node)
|
||
};
|
||
for (const name42 in config.parseContext) {
|
||
switch (typeof config.parseContext[name42]) {
|
||
case "function":
|
||
parseConfig.context[name42] = config.parseContext[name42];
|
||
break;
|
||
case "string":
|
||
parseConfig.context[name42] = createParseContext(config.parseContext[name42]);
|
||
break;
|
||
}
|
||
}
|
||
return {
|
||
config: parseConfig,
|
||
...parseConfig,
|
||
...parseConfig.node
|
||
};
|
||
}
|
||
function createParser(config) {
|
||
let source = "";
|
||
let filename = "<unknown>";
|
||
let needPositions = false;
|
||
let onParseError = NOOP;
|
||
let onParseErrorThrow = false;
|
||
const locationMap = new OffsetToLocation();
|
||
const parser = Object.assign(new TokenStream(), processConfig(config || {}), {
|
||
parseAtrulePrelude: true,
|
||
parseRulePrelude: true,
|
||
parseValue: true,
|
||
parseCustomProperty: false,
|
||
readSequence,
|
||
consumeUntilBalanceEnd: () => 0,
|
||
consumeUntilLeftCurlyBracket(code2) {
|
||
return code2 === LEFTCURLYBRACKET ? 1 : 0;
|
||
},
|
||
consumeUntilLeftCurlyBracketOrSemicolon(code2) {
|
||
return code2 === LEFTCURLYBRACKET || code2 === SEMICOLON ? 1 : 0;
|
||
},
|
||
consumeUntilExclamationMarkOrSemicolon(code2) {
|
||
return code2 === EXCLAMATIONMARK || code2 === SEMICOLON ? 1 : 0;
|
||
},
|
||
consumeUntilSemicolonIncluded(code2) {
|
||
return code2 === SEMICOLON ? 2 : 0;
|
||
},
|
||
createList() {
|
||
return new List();
|
||
},
|
||
createSingleNodeList(node) {
|
||
return new List().appendData(node);
|
||
},
|
||
getFirstListNode(list) {
|
||
return list && list.first;
|
||
},
|
||
getLastListNode(list) {
|
||
return list && list.last;
|
||
},
|
||
parseWithFallback(consumer, fallback) {
|
||
const startToken = this.tokenIndex;
|
||
try {
|
||
return consumer.call(this);
|
||
} catch (e) {
|
||
if (onParseErrorThrow) {
|
||
throw e;
|
||
}
|
||
const fallbackNode = fallback.call(this, startToken);
|
||
onParseErrorThrow = true;
|
||
onParseError(e, fallbackNode);
|
||
onParseErrorThrow = false;
|
||
return fallbackNode;
|
||
}
|
||
},
|
||
lookupNonWSType(offset) {
|
||
let type;
|
||
do {
|
||
type = this.lookupType(offset++);
|
||
if (type !== WhiteSpace) {
|
||
return type;
|
||
}
|
||
} while (type !== NULL);
|
||
return NULL;
|
||
},
|
||
charCodeAt(offset) {
|
||
return offset >= 0 && offset < source.length ? source.charCodeAt(offset) : 0;
|
||
},
|
||
substring(offsetStart, offsetEnd) {
|
||
return source.substring(offsetStart, offsetEnd);
|
||
},
|
||
substrToCursor(start) {
|
||
return this.source.substring(start, this.tokenStart);
|
||
},
|
||
cmpChar(offset, charCode) {
|
||
return cmpChar(source, offset, charCode);
|
||
},
|
||
cmpStr(offsetStart, offsetEnd, str) {
|
||
return cmpStr(source, offsetStart, offsetEnd, str);
|
||
},
|
||
consume(tokenType2) {
|
||
const start = this.tokenStart;
|
||
this.eat(tokenType2);
|
||
return this.substrToCursor(start);
|
||
},
|
||
consumeFunctionName() {
|
||
const name42 = source.substring(this.tokenStart, this.tokenEnd - 1);
|
||
this.eat(Function2);
|
||
return name42;
|
||
},
|
||
consumeNumber(type) {
|
||
const number2 = source.substring(this.tokenStart, consumeNumber(source, this.tokenStart));
|
||
this.eat(type);
|
||
return number2;
|
||
},
|
||
eat(tokenType2) {
|
||
if (this.tokenType !== tokenType2) {
|
||
const tokenName = names_default[tokenType2].slice(0, -6).replace(/-/g, " ").replace(/^./, (m) => m.toUpperCase());
|
||
let message = `${/[[\](){}]/.test(tokenName) ? `"${tokenName}"` : tokenName} is expected`;
|
||
let offset = this.tokenStart;
|
||
switch (tokenType2) {
|
||
case Ident:
|
||
if (this.tokenType === Function2 || this.tokenType === Url) {
|
||
offset = this.tokenEnd - 1;
|
||
message = "Identifier is expected but function found";
|
||
} else {
|
||
message = "Identifier is expected";
|
||
}
|
||
break;
|
||
case Hash:
|
||
if (this.isDelim(NUMBERSIGN)) {
|
||
this.next();
|
||
offset++;
|
||
message = "Name is expected";
|
||
}
|
||
break;
|
||
case Percentage:
|
||
if (this.tokenType === Number2) {
|
||
offset = this.tokenEnd;
|
||
message = "Percent sign is expected";
|
||
}
|
||
break;
|
||
}
|
||
this.error(message, offset);
|
||
}
|
||
this.next();
|
||
},
|
||
eatIdent(name42) {
|
||
if (this.tokenType !== Ident || this.lookupValue(0, name42) === false) {
|
||
this.error(`Identifier "${name42}" is expected`);
|
||
}
|
||
this.next();
|
||
},
|
||
eatDelim(code2) {
|
||
if (!this.isDelim(code2)) {
|
||
this.error(`Delim "${String.fromCharCode(code2)}" is expected`);
|
||
}
|
||
this.next();
|
||
},
|
||
getLocation(start, end) {
|
||
if (needPositions) {
|
||
return locationMap.getLocationRange(
|
||
start,
|
||
end,
|
||
filename
|
||
);
|
||
}
|
||
return null;
|
||
},
|
||
getLocationFromList(list) {
|
||
if (needPositions) {
|
||
const head = this.getFirstListNode(list);
|
||
const tail = this.getLastListNode(list);
|
||
return locationMap.getLocationRange(
|
||
head !== null ? head.loc.start.offset - locationMap.startOffset : this.tokenStart,
|
||
tail !== null ? tail.loc.end.offset - locationMap.startOffset : this.tokenStart,
|
||
filename
|
||
);
|
||
}
|
||
return null;
|
||
},
|
||
error(message, offset) {
|
||
const location = typeof offset !== "undefined" && offset < source.length ? locationMap.getLocation(offset) : this.eof ? locationMap.getLocation(findWhiteSpaceStart(source, source.length - 1)) : locationMap.getLocation(this.tokenStart);
|
||
throw new SyntaxError2(
|
||
message || "Unexpected input",
|
||
source,
|
||
location.offset,
|
||
location.line,
|
||
location.column
|
||
);
|
||
}
|
||
});
|
||
const parse45 = function(source_, options) {
|
||
source = source_;
|
||
options = options || {};
|
||
parser.setSource(source, tokenize);
|
||
locationMap.setSource(
|
||
source,
|
||
options.offset,
|
||
options.line,
|
||
options.column
|
||
);
|
||
filename = options.filename || "<unknown>";
|
||
needPositions = Boolean(options.positions);
|
||
onParseError = typeof options.onParseError === "function" ? options.onParseError : NOOP;
|
||
onParseErrorThrow = false;
|
||
parser.parseAtrulePrelude = "parseAtrulePrelude" in options ? Boolean(options.parseAtrulePrelude) : true;
|
||
parser.parseRulePrelude = "parseRulePrelude" in options ? Boolean(options.parseRulePrelude) : true;
|
||
parser.parseValue = "parseValue" in options ? Boolean(options.parseValue) : true;
|
||
parser.parseCustomProperty = "parseCustomProperty" in options ? Boolean(options.parseCustomProperty) : false;
|
||
const { context = "default", onComment } = options;
|
||
if (context in parser.context === false) {
|
||
throw new Error("Unknown context `" + context + "`");
|
||
}
|
||
if (typeof onComment === "function") {
|
||
parser.forEachToken((type, start, end) => {
|
||
if (type === Comment) {
|
||
const loc = parser.getLocation(start, end);
|
||
const value = cmpStr(source, end - 2, end, "*/") ? source.slice(start + 2, end - 2) : source.slice(start + 2, end);
|
||
onComment(value, loc);
|
||
}
|
||
});
|
||
}
|
||
const ast = parser.context[context].call(parser, options);
|
||
if (!parser.eof) {
|
||
parser.error();
|
||
}
|
||
return ast;
|
||
};
|
||
return Object.assign(parse45, {
|
||
SyntaxError: SyntaxError2,
|
||
config: parser.config
|
||
});
|
||
}
|
||
|
||
// node_modules/css-tree/lib/generator/sourceMap.js
|
||
var import_source_map_generator = __toESM(require_source_map_generator(), 1);
|
||
var trackNodes = /* @__PURE__ */ new Set(["Atrule", "Selector", "Declaration"]);
|
||
function generateSourceMap(handlers) {
|
||
const map = new import_source_map_generator.SourceMapGenerator();
|
||
const generated = {
|
||
line: 1,
|
||
column: 0
|
||
};
|
||
const original = {
|
||
line: 0,
|
||
// should be zero to add first mapping
|
||
column: 0
|
||
};
|
||
const activatedGenerated = {
|
||
line: 1,
|
||
column: 0
|
||
};
|
||
const activatedMapping = {
|
||
generated: activatedGenerated
|
||
};
|
||
let line = 1;
|
||
let column = 0;
|
||
let sourceMappingActive = false;
|
||
const origHandlersNode = handlers.node;
|
||
handlers.node = function(node) {
|
||
if (node.loc && node.loc.start && trackNodes.has(node.type)) {
|
||
const nodeLine = node.loc.start.line;
|
||
const nodeColumn = node.loc.start.column - 1;
|
||
if (original.line !== nodeLine || original.column !== nodeColumn) {
|
||
original.line = nodeLine;
|
||
original.column = nodeColumn;
|
||
generated.line = line;
|
||
generated.column = column;
|
||
if (sourceMappingActive) {
|
||
sourceMappingActive = false;
|
||
if (generated.line !== activatedGenerated.line || generated.column !== activatedGenerated.column) {
|
||
map.addMapping(activatedMapping);
|
||
}
|
||
}
|
||
sourceMappingActive = true;
|
||
map.addMapping({
|
||
source: node.loc.source,
|
||
original,
|
||
generated
|
||
});
|
||
}
|
||
}
|
||
origHandlersNode.call(this, node);
|
||
if (sourceMappingActive && trackNodes.has(node.type)) {
|
||
activatedGenerated.line = line;
|
||
activatedGenerated.column = column;
|
||
}
|
||
};
|
||
const origHandlersEmit = handlers.emit;
|
||
handlers.emit = function(value, type, auto) {
|
||
for (let i = 0; i < value.length; i++) {
|
||
if (value.charCodeAt(i) === 10) {
|
||
line++;
|
||
column = 0;
|
||
} else {
|
||
column++;
|
||
}
|
||
}
|
||
origHandlersEmit(value, type, auto);
|
||
};
|
||
const origHandlersResult = handlers.result;
|
||
handlers.result = function() {
|
||
if (sourceMappingActive) {
|
||
map.addMapping(activatedMapping);
|
||
}
|
||
return {
|
||
css: origHandlersResult(),
|
||
map
|
||
};
|
||
};
|
||
return handlers;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/generator/token-before.js
|
||
var token_before_exports = {};
|
||
__export(token_before_exports, {
|
||
safe: () => safe,
|
||
spec: () => spec
|
||
});
|
||
var PLUSSIGN = 43;
|
||
var HYPHENMINUS = 45;
|
||
var code = (type, value) => {
|
||
if (type === Delim) {
|
||
type = value;
|
||
}
|
||
if (typeof type === "string") {
|
||
const charCode = type.charCodeAt(0);
|
||
return charCode > 127 ? 32768 : charCode << 8;
|
||
}
|
||
return type;
|
||
};
|
||
var specPairs = [
|
||
[Ident, Ident],
|
||
[Ident, Function2],
|
||
[Ident, Url],
|
||
[Ident, BadUrl],
|
||
[Ident, "-"],
|
||
[Ident, Number2],
|
||
[Ident, Percentage],
|
||
[Ident, Dimension],
|
||
[Ident, CDC],
|
||
[Ident, LeftParenthesis],
|
||
[AtKeyword, Ident],
|
||
[AtKeyword, Function2],
|
||
[AtKeyword, Url],
|
||
[AtKeyword, BadUrl],
|
||
[AtKeyword, "-"],
|
||
[AtKeyword, Number2],
|
||
[AtKeyword, Percentage],
|
||
[AtKeyword, Dimension],
|
||
[AtKeyword, CDC],
|
||
[Hash, Ident],
|
||
[Hash, Function2],
|
||
[Hash, Url],
|
||
[Hash, BadUrl],
|
||
[Hash, "-"],
|
||
[Hash, Number2],
|
||
[Hash, Percentage],
|
||
[Hash, Dimension],
|
||
[Hash, CDC],
|
||
[Dimension, Ident],
|
||
[Dimension, Function2],
|
||
[Dimension, Url],
|
||
[Dimension, BadUrl],
|
||
[Dimension, "-"],
|
||
[Dimension, Number2],
|
||
[Dimension, Percentage],
|
||
[Dimension, Dimension],
|
||
[Dimension, CDC],
|
||
["#", Ident],
|
||
["#", Function2],
|
||
["#", Url],
|
||
["#", BadUrl],
|
||
["#", "-"],
|
||
["#", Number2],
|
||
["#", Percentage],
|
||
["#", Dimension],
|
||
["#", CDC],
|
||
// https://github.com/w3c/csswg-drafts/pull/6874
|
||
["-", Ident],
|
||
["-", Function2],
|
||
["-", Url],
|
||
["-", BadUrl],
|
||
["-", "-"],
|
||
["-", Number2],
|
||
["-", Percentage],
|
||
["-", Dimension],
|
||
["-", CDC],
|
||
// https://github.com/w3c/csswg-drafts/pull/6874
|
||
[Number2, Ident],
|
||
[Number2, Function2],
|
||
[Number2, Url],
|
||
[Number2, BadUrl],
|
||
[Number2, Number2],
|
||
[Number2, Percentage],
|
||
[Number2, Dimension],
|
||
[Number2, "%"],
|
||
[Number2, CDC],
|
||
// https://github.com/w3c/csswg-drafts/pull/6874
|
||
["@", Ident],
|
||
["@", Function2],
|
||
["@", Url],
|
||
["@", BadUrl],
|
||
["@", "-"],
|
||
["@", CDC],
|
||
// https://github.com/w3c/csswg-drafts/pull/6874
|
||
[".", Number2],
|
||
[".", Percentage],
|
||
[".", Dimension],
|
||
["+", Number2],
|
||
["+", Percentage],
|
||
["+", Dimension],
|
||
["/", "*"]
|
||
];
|
||
var safePairs = specPairs.concat([
|
||
[Ident, Hash],
|
||
[Dimension, Hash],
|
||
[Hash, Hash],
|
||
[AtKeyword, LeftParenthesis],
|
||
[AtKeyword, String2],
|
||
[AtKeyword, Colon],
|
||
[Percentage, Percentage],
|
||
[Percentage, Dimension],
|
||
[Percentage, Function2],
|
||
[Percentage, "-"],
|
||
[RightParenthesis, Ident],
|
||
[RightParenthesis, Function2],
|
||
[RightParenthesis, Percentage],
|
||
[RightParenthesis, Dimension],
|
||
[RightParenthesis, Hash],
|
||
[RightParenthesis, "-"]
|
||
]);
|
||
function createMap(pairs) {
|
||
const isWhiteSpaceRequired = new Set(
|
||
pairs.map(([prev, next]) => code(prev) << 16 | code(next))
|
||
);
|
||
return function(prevCode, type, value) {
|
||
const nextCode = code(type, value);
|
||
const nextCharCode = value.charCodeAt(0);
|
||
const emitWs = nextCharCode === HYPHENMINUS && type !== Ident && type !== Function2 && type !== CDC || nextCharCode === PLUSSIGN ? isWhiteSpaceRequired.has(prevCode << 16 | nextCharCode << 8) : isWhiteSpaceRequired.has(prevCode << 16 | nextCode);
|
||
if (emitWs) {
|
||
this.emit(" ", WhiteSpace, true);
|
||
}
|
||
return nextCode;
|
||
};
|
||
}
|
||
var spec = createMap(specPairs);
|
||
var safe = createMap(safePairs);
|
||
|
||
// node_modules/css-tree/lib/generator/create.js
|
||
var REVERSESOLIDUS = 92;
|
||
function processChildren(node, delimeter) {
|
||
if (typeof delimeter === "function") {
|
||
let prev = null;
|
||
node.children.forEach((node2) => {
|
||
if (prev !== null) {
|
||
delimeter.call(this, prev);
|
||
}
|
||
this.node(node2);
|
||
prev = node2;
|
||
});
|
||
return;
|
||
}
|
||
node.children.forEach(this.node, this);
|
||
}
|
||
function processChunk(chunk) {
|
||
tokenize(chunk, (type, start, end) => {
|
||
this.token(type, chunk.slice(start, end));
|
||
});
|
||
}
|
||
function createGenerator(config) {
|
||
const types2 = /* @__PURE__ */ new Map();
|
||
for (let name42 in config.node) {
|
||
const item = config.node[name42];
|
||
const fn = item.generate || item;
|
||
if (typeof fn === "function") {
|
||
types2.set(name42, item.generate || item);
|
||
}
|
||
}
|
||
return function(node, options) {
|
||
let buffer = "";
|
||
let prevCode = 0;
|
||
let handlers = {
|
||
node(node2) {
|
||
if (types2.has(node2.type)) {
|
||
types2.get(node2.type).call(publicApi, node2);
|
||
} else {
|
||
throw new Error("Unknown node type: " + node2.type);
|
||
}
|
||
},
|
||
tokenBefore: safe,
|
||
token(type, value) {
|
||
prevCode = this.tokenBefore(prevCode, type, value);
|
||
this.emit(value, type, false);
|
||
if (type === Delim && value.charCodeAt(0) === REVERSESOLIDUS) {
|
||
this.emit("\n", WhiteSpace, true);
|
||
}
|
||
},
|
||
emit(value) {
|
||
buffer += value;
|
||
},
|
||
result() {
|
||
return buffer;
|
||
}
|
||
};
|
||
if (options) {
|
||
if (typeof options.decorator === "function") {
|
||
handlers = options.decorator(handlers);
|
||
}
|
||
if (options.sourceMap) {
|
||
handlers = generateSourceMap(handlers);
|
||
}
|
||
if (options.mode in token_before_exports) {
|
||
handlers.tokenBefore = token_before_exports[options.mode];
|
||
}
|
||
}
|
||
const publicApi = {
|
||
node: (node2) => handlers.node(node2),
|
||
children: processChildren,
|
||
token: (type, value) => handlers.token(type, value),
|
||
tokenize: processChunk
|
||
};
|
||
handlers.node(node);
|
||
return handlers.result();
|
||
};
|
||
}
|
||
|
||
// node_modules/css-tree/lib/convertor/create.js
|
||
function createConvertor(walk3) {
|
||
return {
|
||
fromPlainObject(ast) {
|
||
walk3(ast, {
|
||
enter(node) {
|
||
if (node.children && node.children instanceof List === false) {
|
||
node.children = new List().fromArray(node.children);
|
||
}
|
||
}
|
||
});
|
||
return ast;
|
||
},
|
||
toPlainObject(ast) {
|
||
walk3(ast, {
|
||
leave(node) {
|
||
if (node.children && node.children instanceof List) {
|
||
node.children = node.children.toArray();
|
||
}
|
||
}
|
||
});
|
||
return ast;
|
||
}
|
||
};
|
||
}
|
||
|
||
// node_modules/css-tree/lib/walker/create.js
|
||
var { hasOwnProperty: hasOwnProperty2 } = Object.prototype;
|
||
var noop = function() {
|
||
};
|
||
function ensureFunction(value) {
|
||
return typeof value === "function" ? value : noop;
|
||
}
|
||
function invokeForType(fn, type) {
|
||
return function(node, item, list) {
|
||
if (node.type === type) {
|
||
fn.call(this, node, item, list);
|
||
}
|
||
};
|
||
}
|
||
function getWalkersFromStructure(name42, nodeType) {
|
||
const structure42 = nodeType.structure;
|
||
const walkers = [];
|
||
for (const key in structure42) {
|
||
if (hasOwnProperty2.call(structure42, key) === false) {
|
||
continue;
|
||
}
|
||
let fieldTypes = structure42[key];
|
||
const walker = {
|
||
name: key,
|
||
type: false,
|
||
nullable: false
|
||
};
|
||
if (!Array.isArray(fieldTypes)) {
|
||
fieldTypes = [fieldTypes];
|
||
}
|
||
for (const fieldType of fieldTypes) {
|
||
if (fieldType === null) {
|
||
walker.nullable = true;
|
||
} else if (typeof fieldType === "string") {
|
||
walker.type = "node";
|
||
} else if (Array.isArray(fieldType)) {
|
||
walker.type = "list";
|
||
}
|
||
}
|
||
if (walker.type) {
|
||
walkers.push(walker);
|
||
}
|
||
}
|
||
if (walkers.length) {
|
||
return {
|
||
context: nodeType.walkContext,
|
||
fields: walkers
|
||
};
|
||
}
|
||
return null;
|
||
}
|
||
function getTypesFromConfig(config) {
|
||
const types2 = {};
|
||
for (const name42 in config.node) {
|
||
if (hasOwnProperty2.call(config.node, name42)) {
|
||
const nodeType = config.node[name42];
|
||
if (!nodeType.structure) {
|
||
throw new Error("Missed `structure` field in `" + name42 + "` node type definition");
|
||
}
|
||
types2[name42] = getWalkersFromStructure(name42, nodeType);
|
||
}
|
||
}
|
||
return types2;
|
||
}
|
||
function createTypeIterator(config, reverse) {
|
||
const fields = config.fields.slice();
|
||
const contextName = config.context;
|
||
const useContext = typeof contextName === "string";
|
||
if (reverse) {
|
||
fields.reverse();
|
||
}
|
||
return function(node, context, walk3, walkReducer) {
|
||
let prevContextValue;
|
||
if (useContext) {
|
||
prevContextValue = context[contextName];
|
||
context[contextName] = node;
|
||
}
|
||
for (const field of fields) {
|
||
const ref = node[field.name];
|
||
if (!field.nullable || ref) {
|
||
if (field.type === "list") {
|
||
const breakWalk = reverse ? ref.reduceRight(walkReducer, false) : ref.reduce(walkReducer, false);
|
||
if (breakWalk) {
|
||
return true;
|
||
}
|
||
} else if (walk3(ref)) {
|
||
return true;
|
||
}
|
||
}
|
||
}
|
||
if (useContext) {
|
||
context[contextName] = prevContextValue;
|
||
}
|
||
};
|
||
}
|
||
function createFastTraveralMap({
|
||
StyleSheet,
|
||
Atrule,
|
||
Rule,
|
||
Block,
|
||
DeclarationList
|
||
}) {
|
||
return {
|
||
Atrule: {
|
||
StyleSheet,
|
||
Atrule,
|
||
Rule,
|
||
Block
|
||
},
|
||
Rule: {
|
||
StyleSheet,
|
||
Atrule,
|
||
Rule,
|
||
Block
|
||
},
|
||
Declaration: {
|
||
StyleSheet,
|
||
Atrule,
|
||
Rule,
|
||
Block,
|
||
DeclarationList
|
||
}
|
||
};
|
||
}
|
||
function createWalker(config) {
|
||
const types2 = getTypesFromConfig(config);
|
||
const iteratorsNatural = {};
|
||
const iteratorsReverse = {};
|
||
const breakWalk = Symbol("break-walk");
|
||
const skipNode = Symbol("skip-node");
|
||
for (const name42 in types2) {
|
||
if (hasOwnProperty2.call(types2, name42) && types2[name42] !== null) {
|
||
iteratorsNatural[name42] = createTypeIterator(types2[name42], false);
|
||
iteratorsReverse[name42] = createTypeIterator(types2[name42], true);
|
||
}
|
||
}
|
||
const fastTraversalIteratorsNatural = createFastTraveralMap(iteratorsNatural);
|
||
const fastTraversalIteratorsReverse = createFastTraveralMap(iteratorsReverse);
|
||
const walk3 = function(root, options) {
|
||
function walkNode(node, item, list) {
|
||
const enterRet = enter.call(context, node, item, list);
|
||
if (enterRet === breakWalk) {
|
||
return true;
|
||
}
|
||
if (enterRet === skipNode) {
|
||
return false;
|
||
}
|
||
if (iterators.hasOwnProperty(node.type)) {
|
||
if (iterators[node.type](node, context, walkNode, walkReducer)) {
|
||
return true;
|
||
}
|
||
}
|
||
if (leave.call(context, node, item, list) === breakWalk) {
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
let enter = noop;
|
||
let leave = noop;
|
||
let iterators = iteratorsNatural;
|
||
let walkReducer = (ret, data, item, list) => ret || walkNode(data, item, list);
|
||
const context = {
|
||
break: breakWalk,
|
||
skip: skipNode,
|
||
root,
|
||
stylesheet: null,
|
||
atrule: null,
|
||
atrulePrelude: null,
|
||
rule: null,
|
||
selector: null,
|
||
block: null,
|
||
declaration: null,
|
||
function: null
|
||
};
|
||
if (typeof options === "function") {
|
||
enter = options;
|
||
} else if (options) {
|
||
enter = ensureFunction(options.enter);
|
||
leave = ensureFunction(options.leave);
|
||
if (options.reverse) {
|
||
iterators = iteratorsReverse;
|
||
}
|
||
if (options.visit) {
|
||
if (fastTraversalIteratorsNatural.hasOwnProperty(options.visit)) {
|
||
iterators = options.reverse ? fastTraversalIteratorsReverse[options.visit] : fastTraversalIteratorsNatural[options.visit];
|
||
} else if (!types2.hasOwnProperty(options.visit)) {
|
||
throw new Error("Bad value `" + options.visit + "` for `visit` option (should be: " + Object.keys(types2).sort().join(", ") + ")");
|
||
}
|
||
enter = invokeForType(enter, options.visit);
|
||
leave = invokeForType(leave, options.visit);
|
||
}
|
||
}
|
||
if (enter === noop && leave === noop) {
|
||
throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");
|
||
}
|
||
walkNode(root);
|
||
};
|
||
walk3.break = breakWalk;
|
||
walk3.skip = skipNode;
|
||
walk3.find = function(ast, fn) {
|
||
let found = null;
|
||
walk3(ast, function(node, item, list) {
|
||
if (fn.call(this, node, item, list)) {
|
||
found = node;
|
||
return breakWalk;
|
||
}
|
||
});
|
||
return found;
|
||
};
|
||
walk3.findLast = function(ast, fn) {
|
||
let found = null;
|
||
walk3(ast, {
|
||
reverse: true,
|
||
enter(node, item, list) {
|
||
if (fn.call(this, node, item, list)) {
|
||
found = node;
|
||
return breakWalk;
|
||
}
|
||
}
|
||
});
|
||
return found;
|
||
};
|
||
walk3.findAll = function(ast, fn) {
|
||
const found = [];
|
||
walk3(ast, function(node, item, list) {
|
||
if (fn.call(this, node, item, list)) {
|
||
found.push(node);
|
||
}
|
||
});
|
||
return found;
|
||
};
|
||
return walk3;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/definition-syntax/generate.js
|
||
function noop2(value) {
|
||
return value;
|
||
}
|
||
function generateMultiplier(multiplier) {
|
||
const { min, max, comma } = multiplier;
|
||
if (min === 0 && max === 0) {
|
||
return comma ? "#?" : "*";
|
||
}
|
||
if (min === 0 && max === 1) {
|
||
return "?";
|
||
}
|
||
if (min === 1 && max === 0) {
|
||
return comma ? "#" : "+";
|
||
}
|
||
if (min === 1 && max === 1) {
|
||
return "";
|
||
}
|
||
return (comma ? "#" : "") + (min === max ? "{" + min + "}" : "{" + min + "," + (max !== 0 ? max : "") + "}");
|
||
}
|
||
function generateTypeOpts(node) {
|
||
switch (node.type) {
|
||
case "Range":
|
||
return " [" + (node.min === null ? "-\u221E" : node.min) + "," + (node.max === null ? "\u221E" : node.max) + "]";
|
||
default:
|
||
throw new Error("Unknown node type `" + node.type + "`");
|
||
}
|
||
}
|
||
function generateSequence(node, decorate, forceBraces, compact) {
|
||
const combinator = node.combinator === " " || compact ? node.combinator : " " + node.combinator + " ";
|
||
const result = node.terms.map((term) => internalGenerate(term, decorate, forceBraces, compact)).join(combinator);
|
||
if (node.explicit || forceBraces) {
|
||
return (compact || result[0] === "," ? "[" : "[ ") + result + (compact ? "]" : " ]");
|
||
}
|
||
return result;
|
||
}
|
||
function internalGenerate(node, decorate, forceBraces, compact) {
|
||
let result;
|
||
switch (node.type) {
|
||
case "Group":
|
||
result = generateSequence(node, decorate, forceBraces, compact) + (node.disallowEmpty ? "!" : "");
|
||
break;
|
||
case "Multiplier":
|
||
return internalGenerate(node.term, decorate, forceBraces, compact) + decorate(generateMultiplier(node), node);
|
||
case "Type":
|
||
result = "<" + node.name + (node.opts ? decorate(generateTypeOpts(node.opts), node.opts) : "") + ">";
|
||
break;
|
||
case "Property":
|
||
result = "<'" + node.name + "'>";
|
||
break;
|
||
case "Keyword":
|
||
result = node.name;
|
||
break;
|
||
case "AtKeyword":
|
||
result = "@" + node.name;
|
||
break;
|
||
case "Function":
|
||
result = node.name + "(";
|
||
break;
|
||
case "String":
|
||
case "Token":
|
||
result = node.value;
|
||
break;
|
||
case "Comma":
|
||
result = ",";
|
||
break;
|
||
default:
|
||
throw new Error("Unknown node type `" + node.type + "`");
|
||
}
|
||
return decorate(result, node);
|
||
}
|
||
function generate(node, options) {
|
||
let decorate = noop2;
|
||
let forceBraces = false;
|
||
let compact = false;
|
||
if (typeof options === "function") {
|
||
decorate = options;
|
||
} else if (options) {
|
||
forceBraces = Boolean(options.forceBraces);
|
||
compact = Boolean(options.compact);
|
||
if (typeof options.decorate === "function") {
|
||
decorate = options.decorate;
|
||
}
|
||
}
|
||
return internalGenerate(node, decorate, forceBraces, compact);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/lexer/error.js
|
||
var defaultLoc = { offset: 0, line: 1, column: 1 };
|
||
function locateMismatch(matchResult, node) {
|
||
const tokens = matchResult.tokens;
|
||
const longestMatch = matchResult.longestMatch;
|
||
const mismatchNode = longestMatch < tokens.length ? tokens[longestMatch].node || null : null;
|
||
const badNode = mismatchNode !== node ? mismatchNode : null;
|
||
let mismatchOffset = 0;
|
||
let mismatchLength = 0;
|
||
let entries = 0;
|
||
let css = "";
|
||
let start;
|
||
let end;
|
||
for (let i = 0; i < tokens.length; i++) {
|
||
const token = tokens[i].value;
|
||
if (i === longestMatch) {
|
||
mismatchLength = token.length;
|
||
mismatchOffset = css.length;
|
||
}
|
||
if (badNode !== null && tokens[i].node === badNode) {
|
||
if (i <= longestMatch) {
|
||
entries++;
|
||
} else {
|
||
entries = 0;
|
||
}
|
||
}
|
||
css += token;
|
||
}
|
||
if (longestMatch === tokens.length || entries > 1) {
|
||
start = fromLoc(badNode || node, "end") || buildLoc(defaultLoc, css);
|
||
end = buildLoc(start);
|
||
} else {
|
||
start = fromLoc(badNode, "start") || buildLoc(fromLoc(node, "start") || defaultLoc, css.slice(0, mismatchOffset));
|
||
end = fromLoc(badNode, "end") || buildLoc(start, css.substr(mismatchOffset, mismatchLength));
|
||
}
|
||
return {
|
||
css,
|
||
mismatchOffset,
|
||
mismatchLength,
|
||
start,
|
||
end
|
||
};
|
||
}
|
||
function fromLoc(node, point) {
|
||
const value = node && node.loc && node.loc[point];
|
||
if (value) {
|
||
return "line" in value ? buildLoc(value) : value;
|
||
}
|
||
return null;
|
||
}
|
||
function buildLoc({ offset, line, column }, extra) {
|
||
const loc = {
|
||
offset,
|
||
line,
|
||
column
|
||
};
|
||
if (extra) {
|
||
const lines = extra.split(/\n|\r\n?|\f/);
|
||
loc.offset += extra.length;
|
||
loc.line += lines.length - 1;
|
||
loc.column = lines.length === 1 ? loc.column + extra.length : lines.pop().length + 1;
|
||
}
|
||
return loc;
|
||
}
|
||
var SyntaxReferenceError = function(type, referenceName) {
|
||
const error = createCustomError(
|
||
"SyntaxReferenceError",
|
||
type + (referenceName ? " `" + referenceName + "`" : "")
|
||
);
|
||
error.reference = referenceName;
|
||
return error;
|
||
};
|
||
var SyntaxMatchError = function(message, syntax, node, matchResult) {
|
||
const error = createCustomError("SyntaxMatchError", message);
|
||
const {
|
||
css,
|
||
mismatchOffset,
|
||
mismatchLength,
|
||
start,
|
||
end
|
||
} = locateMismatch(matchResult, node);
|
||
error.rawMessage = message;
|
||
error.syntax = syntax ? generate(syntax) : "<generic>";
|
||
error.css = css;
|
||
error.mismatchOffset = mismatchOffset;
|
||
error.mismatchLength = mismatchLength;
|
||
error.message = message + "\n syntax: " + error.syntax + "\n value: " + (css || "<empty string>") + "\n --------" + new Array(error.mismatchOffset + 1).join("-") + "^";
|
||
Object.assign(error, start);
|
||
error.loc = {
|
||
source: node && node.loc && node.loc.source || "<unknown>",
|
||
start,
|
||
end
|
||
};
|
||
return error;
|
||
};
|
||
|
||
// node_modules/css-tree/lib/utils/names.js
|
||
var keywords = /* @__PURE__ */ new Map();
|
||
var properties = /* @__PURE__ */ new Map();
|
||
var HYPHENMINUS2 = 45;
|
||
var keyword = getKeywordDescriptor;
|
||
var property = getPropertyDescriptor;
|
||
function isCustomProperty(str, offset) {
|
||
offset = offset || 0;
|
||
return str.length - offset >= 2 && str.charCodeAt(offset) === HYPHENMINUS2 && str.charCodeAt(offset + 1) === HYPHENMINUS2;
|
||
}
|
||
function getVendorPrefix(str, offset) {
|
||
offset = offset || 0;
|
||
if (str.length - offset >= 3) {
|
||
if (str.charCodeAt(offset) === HYPHENMINUS2 && str.charCodeAt(offset + 1) !== HYPHENMINUS2) {
|
||
const secondDashIndex = str.indexOf("-", offset + 2);
|
||
if (secondDashIndex !== -1) {
|
||
return str.substring(offset, secondDashIndex + 1);
|
||
}
|
||
}
|
||
}
|
||
return "";
|
||
}
|
||
function getKeywordDescriptor(keyword2) {
|
||
if (keywords.has(keyword2)) {
|
||
return keywords.get(keyword2);
|
||
}
|
||
const name42 = keyword2.toLowerCase();
|
||
let descriptor = keywords.get(name42);
|
||
if (descriptor === void 0) {
|
||
const custom = isCustomProperty(name42, 0);
|
||
const vendor = !custom ? getVendorPrefix(name42, 0) : "";
|
||
descriptor = Object.freeze({
|
||
basename: name42.substr(vendor.length),
|
||
name: name42,
|
||
prefix: vendor,
|
||
vendor,
|
||
custom
|
||
});
|
||
}
|
||
keywords.set(keyword2, descriptor);
|
||
return descriptor;
|
||
}
|
||
function getPropertyDescriptor(property3) {
|
||
if (properties.has(property3)) {
|
||
return properties.get(property3);
|
||
}
|
||
let name42 = property3;
|
||
let hack = property3[0];
|
||
if (hack === "/") {
|
||
hack = property3[1] === "/" ? "//" : "/";
|
||
} else if (hack !== "_" && hack !== "*" && hack !== "$" && hack !== "#" && hack !== "+" && hack !== "&") {
|
||
hack = "";
|
||
}
|
||
const custom = isCustomProperty(name42, hack.length);
|
||
if (!custom) {
|
||
name42 = name42.toLowerCase();
|
||
if (properties.has(name42)) {
|
||
const descriptor2 = properties.get(name42);
|
||
properties.set(property3, descriptor2);
|
||
return descriptor2;
|
||
}
|
||
}
|
||
const vendor = !custom ? getVendorPrefix(name42, hack.length) : "";
|
||
const prefix = name42.substr(0, hack.length + vendor.length);
|
||
const descriptor = Object.freeze({
|
||
basename: name42.substr(prefix.length),
|
||
name: name42.substr(hack.length),
|
||
hack,
|
||
vendor,
|
||
prefix,
|
||
custom
|
||
});
|
||
properties.set(property3, descriptor);
|
||
return descriptor;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/lexer/generic-const.js
|
||
var cssWideKeywords = [
|
||
"initial",
|
||
"inherit",
|
||
"unset",
|
||
"revert",
|
||
"revert-layer"
|
||
];
|
||
|
||
// node_modules/css-tree/lib/lexer/generic-an-plus-b.js
|
||
var PLUSSIGN2 = 43;
|
||
var HYPHENMINUS3 = 45;
|
||
var N2 = 110;
|
||
var DISALLOW_SIGN = true;
|
||
var ALLOW_SIGN = false;
|
||
function isDelim(token, code2) {
|
||
return token !== null && token.type === Delim && token.value.charCodeAt(0) === code2;
|
||
}
|
||
function skipSC(token, offset, getNextToken) {
|
||
while (token !== null && (token.type === WhiteSpace || token.type === Comment)) {
|
||
token = getNextToken(++offset);
|
||
}
|
||
return offset;
|
||
}
|
||
function checkInteger(token, valueOffset, disallowSign, offset) {
|
||
if (!token) {
|
||
return 0;
|
||
}
|
||
const code2 = token.value.charCodeAt(valueOffset);
|
||
if (code2 === PLUSSIGN2 || code2 === HYPHENMINUS3) {
|
||
if (disallowSign) {
|
||
return 0;
|
||
}
|
||
valueOffset++;
|
||
}
|
||
for (; valueOffset < token.value.length; valueOffset++) {
|
||
if (!isDigit(token.value.charCodeAt(valueOffset))) {
|
||
return 0;
|
||
}
|
||
}
|
||
return offset + 1;
|
||
}
|
||
function consumeB(token, offset_, getNextToken) {
|
||
let sign = false;
|
||
let offset = skipSC(token, offset_, getNextToken);
|
||
token = getNextToken(offset);
|
||
if (token === null) {
|
||
return offset_;
|
||
}
|
||
if (token.type !== Number2) {
|
||
if (isDelim(token, PLUSSIGN2) || isDelim(token, HYPHENMINUS3)) {
|
||
sign = true;
|
||
offset = skipSC(getNextToken(++offset), offset, getNextToken);
|
||
token = getNextToken(offset);
|
||
if (token === null || token.type !== Number2) {
|
||
return 0;
|
||
}
|
||
} else {
|
||
return offset_;
|
||
}
|
||
}
|
||
if (!sign) {
|
||
const code2 = token.value.charCodeAt(0);
|
||
if (code2 !== PLUSSIGN2 && code2 !== HYPHENMINUS3) {
|
||
return 0;
|
||
}
|
||
}
|
||
return checkInteger(token, sign ? 0 : 1, sign, offset);
|
||
}
|
||
function anPlusB(token, getNextToken) {
|
||
let offset = 0;
|
||
if (!token) {
|
||
return 0;
|
||
}
|
||
if (token.type === Number2) {
|
||
return checkInteger(token, 0, ALLOW_SIGN, offset);
|
||
} else if (token.type === Ident && token.value.charCodeAt(0) === HYPHENMINUS3) {
|
||
if (!cmpChar(token.value, 1, N2)) {
|
||
return 0;
|
||
}
|
||
switch (token.value.length) {
|
||
case 2:
|
||
return consumeB(getNextToken(++offset), offset, getNextToken);
|
||
case 3:
|
||
if (token.value.charCodeAt(2) !== HYPHENMINUS3) {
|
||
return 0;
|
||
}
|
||
offset = skipSC(getNextToken(++offset), offset, getNextToken);
|
||
token = getNextToken(offset);
|
||
return checkInteger(token, 0, DISALLOW_SIGN, offset);
|
||
default:
|
||
if (token.value.charCodeAt(2) !== HYPHENMINUS3) {
|
||
return 0;
|
||
}
|
||
return checkInteger(token, 3, DISALLOW_SIGN, offset);
|
||
}
|
||
} else if (token.type === Ident || isDelim(token, PLUSSIGN2) && getNextToken(offset + 1).type === Ident) {
|
||
if (token.type !== Ident) {
|
||
token = getNextToken(++offset);
|
||
}
|
||
if (token === null || !cmpChar(token.value, 0, N2)) {
|
||
return 0;
|
||
}
|
||
switch (token.value.length) {
|
||
case 1:
|
||
return consumeB(getNextToken(++offset), offset, getNextToken);
|
||
case 2:
|
||
if (token.value.charCodeAt(1) !== HYPHENMINUS3) {
|
||
return 0;
|
||
}
|
||
offset = skipSC(getNextToken(++offset), offset, getNextToken);
|
||
token = getNextToken(offset);
|
||
return checkInteger(token, 0, DISALLOW_SIGN, offset);
|
||
default:
|
||
if (token.value.charCodeAt(1) !== HYPHENMINUS3) {
|
||
return 0;
|
||
}
|
||
return checkInteger(token, 2, DISALLOW_SIGN, offset);
|
||
}
|
||
} else if (token.type === Dimension) {
|
||
let code2 = token.value.charCodeAt(0);
|
||
let sign = code2 === PLUSSIGN2 || code2 === HYPHENMINUS3 ? 1 : 0;
|
||
let i = sign;
|
||
for (; i < token.value.length; i++) {
|
||
if (!isDigit(token.value.charCodeAt(i))) {
|
||
break;
|
||
}
|
||
}
|
||
if (i === sign) {
|
||
return 0;
|
||
}
|
||
if (!cmpChar(token.value, i, N2)) {
|
||
return 0;
|
||
}
|
||
if (i + 1 === token.value.length) {
|
||
return consumeB(getNextToken(++offset), offset, getNextToken);
|
||
} else {
|
||
if (token.value.charCodeAt(i + 1) !== HYPHENMINUS3) {
|
||
return 0;
|
||
}
|
||
if (i + 2 === token.value.length) {
|
||
offset = skipSC(getNextToken(++offset), offset, getNextToken);
|
||
token = getNextToken(offset);
|
||
return checkInteger(token, 0, DISALLOW_SIGN, offset);
|
||
} else {
|
||
return checkInteger(token, i + 2, DISALLOW_SIGN, offset);
|
||
}
|
||
}
|
||
}
|
||
return 0;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/lexer/generic-urange.js
|
||
var PLUSSIGN3 = 43;
|
||
var HYPHENMINUS4 = 45;
|
||
var QUESTIONMARK = 63;
|
||
var U = 117;
|
||
function isDelim2(token, code2) {
|
||
return token !== null && token.type === Delim && token.value.charCodeAt(0) === code2;
|
||
}
|
||
function startsWith(token, code2) {
|
||
return token.value.charCodeAt(0) === code2;
|
||
}
|
||
function hexSequence(token, offset, allowDash) {
|
||
let hexlen = 0;
|
||
for (let pos = offset; pos < token.value.length; pos++) {
|
||
const code2 = token.value.charCodeAt(pos);
|
||
if (code2 === HYPHENMINUS4 && allowDash && hexlen !== 0) {
|
||
hexSequence(token, offset + hexlen + 1, false);
|
||
return 6;
|
||
}
|
||
if (!isHexDigit(code2)) {
|
||
return 0;
|
||
}
|
||
if (++hexlen > 6) {
|
||
return 0;
|
||
}
|
||
;
|
||
}
|
||
return hexlen;
|
||
}
|
||
function withQuestionMarkSequence(consumed, length2, getNextToken) {
|
||
if (!consumed) {
|
||
return 0;
|
||
}
|
||
while (isDelim2(getNextToken(length2), QUESTIONMARK)) {
|
||
if (++consumed > 6) {
|
||
return 0;
|
||
}
|
||
length2++;
|
||
}
|
||
return length2;
|
||
}
|
||
function urange(token, getNextToken) {
|
||
let length2 = 0;
|
||
if (token === null || token.type !== Ident || !cmpChar(token.value, 0, U)) {
|
||
return 0;
|
||
}
|
||
token = getNextToken(++length2);
|
||
if (token === null) {
|
||
return 0;
|
||
}
|
||
if (isDelim2(token, PLUSSIGN3)) {
|
||
token = getNextToken(++length2);
|
||
if (token === null) {
|
||
return 0;
|
||
}
|
||
if (token.type === Ident) {
|
||
return withQuestionMarkSequence(hexSequence(token, 0, true), ++length2, getNextToken);
|
||
}
|
||
if (isDelim2(token, QUESTIONMARK)) {
|
||
return withQuestionMarkSequence(1, ++length2, getNextToken);
|
||
}
|
||
return 0;
|
||
}
|
||
if (token.type === Number2) {
|
||
const consumedHexLength = hexSequence(token, 1, true);
|
||
if (consumedHexLength === 0) {
|
||
return 0;
|
||
}
|
||
token = getNextToken(++length2);
|
||
if (token === null) {
|
||
return length2;
|
||
}
|
||
if (token.type === Dimension || token.type === Number2) {
|
||
if (!startsWith(token, HYPHENMINUS4) || !hexSequence(token, 1, false)) {
|
||
return 0;
|
||
}
|
||
return length2 + 1;
|
||
}
|
||
return withQuestionMarkSequence(consumedHexLength, length2, getNextToken);
|
||
}
|
||
if (token.type === Dimension) {
|
||
return withQuestionMarkSequence(hexSequence(token, 1, true), ++length2, getNextToken);
|
||
}
|
||
return 0;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/lexer/generic.js
|
||
var calcFunctionNames = ["calc(", "-moz-calc(", "-webkit-calc("];
|
||
var balancePair2 = /* @__PURE__ */ new Map([
|
||
[Function2, RightParenthesis],
|
||
[LeftParenthesis, RightParenthesis],
|
||
[LeftSquareBracket, RightSquareBracket],
|
||
[LeftCurlyBracket, RightCurlyBracket]
|
||
]);
|
||
function charCodeAt(str, index) {
|
||
return index < str.length ? str.charCodeAt(index) : 0;
|
||
}
|
||
function eqStr(actual, expected) {
|
||
return cmpStr(actual, 0, actual.length, expected);
|
||
}
|
||
function eqStrAny(actual, expected) {
|
||
for (let i = 0; i < expected.length; i++) {
|
||
if (eqStr(actual, expected[i])) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
function isPostfixIeHack(str, offset) {
|
||
if (offset !== str.length - 2) {
|
||
return false;
|
||
}
|
||
return charCodeAt(str, offset) === 92 && // U+005C REVERSE SOLIDUS (\)
|
||
isDigit(charCodeAt(str, offset + 1));
|
||
}
|
||
function outOfRange(opts, value, numEnd) {
|
||
if (opts && opts.type === "Range") {
|
||
const num = Number(
|
||
numEnd !== void 0 && numEnd !== value.length ? value.substr(0, numEnd) : value
|
||
);
|
||
if (isNaN(num)) {
|
||
return true;
|
||
}
|
||
if (opts.min !== null && num < opts.min && typeof opts.min !== "string") {
|
||
return true;
|
||
}
|
||
if (opts.max !== null && num > opts.max && typeof opts.max !== "string") {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
function consumeFunction(token, getNextToken) {
|
||
let balanceCloseType = 0;
|
||
let balanceStash = [];
|
||
let length2 = 0;
|
||
scan:
|
||
do {
|
||
switch (token.type) {
|
||
case RightCurlyBracket:
|
||
case RightParenthesis:
|
||
case RightSquareBracket:
|
||
if (token.type !== balanceCloseType) {
|
||
break scan;
|
||
}
|
||
balanceCloseType = balanceStash.pop();
|
||
if (balanceStash.length === 0) {
|
||
length2++;
|
||
break scan;
|
||
}
|
||
break;
|
||
case Function2:
|
||
case LeftParenthesis:
|
||
case LeftSquareBracket:
|
||
case LeftCurlyBracket:
|
||
balanceStash.push(balanceCloseType);
|
||
balanceCloseType = balancePair2.get(token.type);
|
||
break;
|
||
}
|
||
length2++;
|
||
} while (token = getNextToken(length2));
|
||
return length2;
|
||
}
|
||
function calc(next) {
|
||
return function(token, getNextToken, opts) {
|
||
if (token === null) {
|
||
return 0;
|
||
}
|
||
if (token.type === Function2 && eqStrAny(token.value, calcFunctionNames)) {
|
||
return consumeFunction(token, getNextToken);
|
||
}
|
||
return next(token, getNextToken, opts);
|
||
};
|
||
}
|
||
function tokenType(expectedTokenType) {
|
||
return function(token) {
|
||
if (token === null || token.type !== expectedTokenType) {
|
||
return 0;
|
||
}
|
||
return 1;
|
||
};
|
||
}
|
||
function customIdent(token) {
|
||
if (token === null || token.type !== Ident) {
|
||
return 0;
|
||
}
|
||
const name42 = token.value.toLowerCase();
|
||
if (eqStrAny(name42, cssWideKeywords)) {
|
||
return 0;
|
||
}
|
||
if (eqStr(name42, "default")) {
|
||
return 0;
|
||
}
|
||
return 1;
|
||
}
|
||
function customPropertyName(token) {
|
||
if (token === null || token.type !== Ident) {
|
||
return 0;
|
||
}
|
||
if (charCodeAt(token.value, 0) !== 45 || charCodeAt(token.value, 1) !== 45) {
|
||
return 0;
|
||
}
|
||
return 1;
|
||
}
|
||
function hexColor(token) {
|
||
if (token === null || token.type !== Hash) {
|
||
return 0;
|
||
}
|
||
const length2 = token.value.length;
|
||
if (length2 !== 4 && length2 !== 5 && length2 !== 7 && length2 !== 9) {
|
||
return 0;
|
||
}
|
||
for (let i = 1; i < length2; i++) {
|
||
if (!isHexDigit(charCodeAt(token.value, i))) {
|
||
return 0;
|
||
}
|
||
}
|
||
return 1;
|
||
}
|
||
function idSelector(token) {
|
||
if (token === null || token.type !== Hash) {
|
||
return 0;
|
||
}
|
||
if (!isIdentifierStart(charCodeAt(token.value, 1), charCodeAt(token.value, 2), charCodeAt(token.value, 3))) {
|
||
return 0;
|
||
}
|
||
return 1;
|
||
}
|
||
function declarationValue(token, getNextToken) {
|
||
if (!token) {
|
||
return 0;
|
||
}
|
||
let balanceCloseType = 0;
|
||
let balanceStash = [];
|
||
let length2 = 0;
|
||
scan:
|
||
do {
|
||
switch (token.type) {
|
||
case BadString:
|
||
case BadUrl:
|
||
break scan;
|
||
case RightCurlyBracket:
|
||
case RightParenthesis:
|
||
case RightSquareBracket:
|
||
if (token.type !== balanceCloseType) {
|
||
break scan;
|
||
}
|
||
balanceCloseType = balanceStash.pop();
|
||
break;
|
||
case Semicolon:
|
||
if (balanceCloseType === 0) {
|
||
break scan;
|
||
}
|
||
break;
|
||
case Delim:
|
||
if (balanceCloseType === 0 && token.value === "!") {
|
||
break scan;
|
||
}
|
||
break;
|
||
case Function2:
|
||
case LeftParenthesis:
|
||
case LeftSquareBracket:
|
||
case LeftCurlyBracket:
|
||
balanceStash.push(balanceCloseType);
|
||
balanceCloseType = balancePair2.get(token.type);
|
||
break;
|
||
}
|
||
length2++;
|
||
} while (token = getNextToken(length2));
|
||
return length2;
|
||
}
|
||
function anyValue(token, getNextToken) {
|
||
if (!token) {
|
||
return 0;
|
||
}
|
||
let balanceCloseType = 0;
|
||
let balanceStash = [];
|
||
let length2 = 0;
|
||
scan:
|
||
do {
|
||
switch (token.type) {
|
||
case BadString:
|
||
case BadUrl:
|
||
break scan;
|
||
case RightCurlyBracket:
|
||
case RightParenthesis:
|
||
case RightSquareBracket:
|
||
if (token.type !== balanceCloseType) {
|
||
break scan;
|
||
}
|
||
balanceCloseType = balanceStash.pop();
|
||
break;
|
||
case Function2:
|
||
case LeftParenthesis:
|
||
case LeftSquareBracket:
|
||
case LeftCurlyBracket:
|
||
balanceStash.push(balanceCloseType);
|
||
balanceCloseType = balancePair2.get(token.type);
|
||
break;
|
||
}
|
||
length2++;
|
||
} while (token = getNextToken(length2));
|
||
return length2;
|
||
}
|
||
function dimension(type) {
|
||
if (type) {
|
||
type = new Set(type);
|
||
}
|
||
return function(token, getNextToken, opts) {
|
||
if (token === null || token.type !== Dimension) {
|
||
return 0;
|
||
}
|
||
const numberEnd = consumeNumber(token.value, 0);
|
||
if (type !== null) {
|
||
const reverseSolidusOffset = token.value.indexOf("\\", numberEnd);
|
||
const unit = reverseSolidusOffset === -1 || !isPostfixIeHack(token.value, reverseSolidusOffset) ? token.value.substr(numberEnd) : token.value.substring(numberEnd, reverseSolidusOffset);
|
||
if (type.has(unit.toLowerCase()) === false) {
|
||
return 0;
|
||
}
|
||
}
|
||
if (outOfRange(opts, token.value, numberEnd)) {
|
||
return 0;
|
||
}
|
||
return 1;
|
||
};
|
||
}
|
||
function percentage(token, getNextToken, opts) {
|
||
if (token === null || token.type !== Percentage) {
|
||
return 0;
|
||
}
|
||
if (outOfRange(opts, token.value, token.value.length - 1)) {
|
||
return 0;
|
||
}
|
||
return 1;
|
||
}
|
||
function zero(next) {
|
||
if (typeof next !== "function") {
|
||
next = function() {
|
||
return 0;
|
||
};
|
||
}
|
||
return function(token, getNextToken, opts) {
|
||
if (token !== null && token.type === Number2) {
|
||
if (Number(token.value) === 0) {
|
||
return 1;
|
||
}
|
||
}
|
||
return next(token, getNextToken, opts);
|
||
};
|
||
}
|
||
function number(token, getNextToken, opts) {
|
||
if (token === null) {
|
||
return 0;
|
||
}
|
||
const numberEnd = consumeNumber(token.value, 0);
|
||
const isNumber = numberEnd === token.value.length;
|
||
if (!isNumber && !isPostfixIeHack(token.value, numberEnd)) {
|
||
return 0;
|
||
}
|
||
if (outOfRange(opts, token.value, numberEnd)) {
|
||
return 0;
|
||
}
|
||
return 1;
|
||
}
|
||
function integer(token, getNextToken, opts) {
|
||
if (token === null || token.type !== Number2) {
|
||
return 0;
|
||
}
|
||
let i = charCodeAt(token.value, 0) === 43 || // U+002B PLUS SIGN (+)
|
||
charCodeAt(token.value, 0) === 45 ? 1 : 0;
|
||
for (; i < token.value.length; i++) {
|
||
if (!isDigit(charCodeAt(token.value, i))) {
|
||
return 0;
|
||
}
|
||
}
|
||
if (outOfRange(opts, token.value, i)) {
|
||
return 0;
|
||
}
|
||
return 1;
|
||
}
|
||
var tokenTypes = {
|
||
"ident-token": tokenType(Ident),
|
||
"function-token": tokenType(Function2),
|
||
"at-keyword-token": tokenType(AtKeyword),
|
||
"hash-token": tokenType(Hash),
|
||
"string-token": tokenType(String2),
|
||
"bad-string-token": tokenType(BadString),
|
||
"url-token": tokenType(Url),
|
||
"bad-url-token": tokenType(BadUrl),
|
||
"delim-token": tokenType(Delim),
|
||
"number-token": tokenType(Number2),
|
||
"percentage-token": tokenType(Percentage),
|
||
"dimension-token": tokenType(Dimension),
|
||
"whitespace-token": tokenType(WhiteSpace),
|
||
"CDO-token": tokenType(CDO),
|
||
"CDC-token": tokenType(CDC),
|
||
"colon-token": tokenType(Colon),
|
||
"semicolon-token": tokenType(Semicolon),
|
||
"comma-token": tokenType(Comma),
|
||
"[-token": tokenType(LeftSquareBracket),
|
||
"]-token": tokenType(RightSquareBracket),
|
||
"(-token": tokenType(LeftParenthesis),
|
||
")-token": tokenType(RightParenthesis),
|
||
"{-token": tokenType(LeftCurlyBracket),
|
||
"}-token": tokenType(RightCurlyBracket)
|
||
};
|
||
var productionTypes = {
|
||
// token type aliases
|
||
"string": tokenType(String2),
|
||
"ident": tokenType(Ident),
|
||
// percentage
|
||
"percentage": calc(percentage),
|
||
// numeric
|
||
"zero": zero(),
|
||
"number": calc(number),
|
||
"integer": calc(integer),
|
||
// complex types
|
||
"custom-ident": customIdent,
|
||
"custom-property-name": customPropertyName,
|
||
"hex-color": hexColor,
|
||
"id-selector": idSelector,
|
||
// element( <id-selector> )
|
||
"an-plus-b": anPlusB,
|
||
"urange": urange,
|
||
"declaration-value": declarationValue,
|
||
"any-value": anyValue
|
||
};
|
||
function createDemensionTypes(units) {
|
||
const {
|
||
angle: angle2,
|
||
decibel: decibel2,
|
||
frequency: frequency2,
|
||
flex: flex2,
|
||
length: length2,
|
||
resolution: resolution2,
|
||
semitones: semitones2,
|
||
time: time2
|
||
} = units || {};
|
||
return {
|
||
"dimension": calc(dimension(null)),
|
||
"angle": calc(dimension(angle2)),
|
||
"decibel": calc(dimension(decibel2)),
|
||
"frequency": calc(dimension(frequency2)),
|
||
"flex": calc(dimension(flex2)),
|
||
"length": calc(zero(dimension(length2))),
|
||
"resolution": calc(dimension(resolution2)),
|
||
"semitones": calc(dimension(semitones2)),
|
||
"time": calc(dimension(time2))
|
||
};
|
||
}
|
||
function createGenericTypes(units) {
|
||
return {
|
||
...tokenTypes,
|
||
...productionTypes,
|
||
...createDemensionTypes(units)
|
||
};
|
||
}
|
||
|
||
// node_modules/css-tree/lib/lexer/units.js
|
||
var units_exports = {};
|
||
__export(units_exports, {
|
||
angle: () => angle,
|
||
decibel: () => decibel,
|
||
flex: () => flex,
|
||
frequency: () => frequency,
|
||
length: () => length,
|
||
resolution: () => resolution,
|
||
semitones: () => semitones,
|
||
time: () => time
|
||
});
|
||
var length = [
|
||
// absolute length units https://www.w3.org/TR/css-values-3/#lengths
|
||
"cm",
|
||
"mm",
|
||
"q",
|
||
"in",
|
||
"pt",
|
||
"pc",
|
||
"px",
|
||
// font-relative length units https://drafts.csswg.org/css-values-4/#font-relative-lengths
|
||
"em",
|
||
"rem",
|
||
"ex",
|
||
"rex",
|
||
"cap",
|
||
"rcap",
|
||
"ch",
|
||
"rch",
|
||
"ic",
|
||
"ric",
|
||
"lh",
|
||
"rlh",
|
||
// viewport-percentage lengths https://drafts.csswg.org/css-values-4/#viewport-relative-lengths
|
||
"vw",
|
||
"svw",
|
||
"lvw",
|
||
"dvw",
|
||
"vh",
|
||
"svh",
|
||
"lvh",
|
||
"dvh",
|
||
"vi",
|
||
"svi",
|
||
"lvi",
|
||
"dvi",
|
||
"vb",
|
||
"svb",
|
||
"lvb",
|
||
"dvb",
|
||
"vmin",
|
||
"svmin",
|
||
"lvmin",
|
||
"dvmin",
|
||
"vmax",
|
||
"svmax",
|
||
"lvmax",
|
||
"dvmax",
|
||
// container relative lengths https://drafts.csswg.org/css-contain-3/#container-lengths
|
||
"cqw",
|
||
"cqh",
|
||
"cqi",
|
||
"cqb",
|
||
"cqmin",
|
||
"cqmax"
|
||
];
|
||
var angle = ["deg", "grad", "rad", "turn"];
|
||
var time = ["s", "ms"];
|
||
var frequency = ["hz", "khz"];
|
||
var resolution = ["dpi", "dpcm", "dppx", "x"];
|
||
var flex = ["fr"];
|
||
var decibel = ["db"];
|
||
var semitones = ["st"];
|
||
|
||
// node_modules/css-tree/lib/definition-syntax/SyntaxError.js
|
||
function SyntaxError3(message, input, offset) {
|
||
return Object.assign(createCustomError("SyntaxError", message), {
|
||
input,
|
||
offset,
|
||
rawMessage: message,
|
||
message: message + "\n " + input + "\n--" + new Array((offset || input.length) + 1).join("-") + "^"
|
||
});
|
||
}
|
||
|
||
// node_modules/css-tree/lib/definition-syntax/tokenizer.js
|
||
var TAB = 9;
|
||
var N3 = 10;
|
||
var F2 = 12;
|
||
var R2 = 13;
|
||
var SPACE = 32;
|
||
var Tokenizer2 = class {
|
||
constructor(str) {
|
||
this.str = str;
|
||
this.pos = 0;
|
||
}
|
||
charCodeAt(pos) {
|
||
return pos < this.str.length ? this.str.charCodeAt(pos) : 0;
|
||
}
|
||
charCode() {
|
||
return this.charCodeAt(this.pos);
|
||
}
|
||
nextCharCode() {
|
||
return this.charCodeAt(this.pos + 1);
|
||
}
|
||
nextNonWsCode(pos) {
|
||
return this.charCodeAt(this.findWsEnd(pos));
|
||
}
|
||
findWsEnd(pos) {
|
||
for (; pos < this.str.length; pos++) {
|
||
const code2 = this.str.charCodeAt(pos);
|
||
if (code2 !== R2 && code2 !== N3 && code2 !== F2 && code2 !== SPACE && code2 !== TAB) {
|
||
break;
|
||
}
|
||
}
|
||
return pos;
|
||
}
|
||
substringToPos(end) {
|
||
return this.str.substring(this.pos, this.pos = end);
|
||
}
|
||
eat(code2) {
|
||
if (this.charCode() !== code2) {
|
||
this.error("Expect `" + String.fromCharCode(code2) + "`");
|
||
}
|
||
this.pos++;
|
||
}
|
||
peek() {
|
||
return this.pos < this.str.length ? this.str.charAt(this.pos++) : "";
|
||
}
|
||
error(message) {
|
||
throw new SyntaxError3(message, this.str, this.pos);
|
||
}
|
||
};
|
||
|
||
// node_modules/css-tree/lib/definition-syntax/parse.js
|
||
var TAB2 = 9;
|
||
var N4 = 10;
|
||
var F3 = 12;
|
||
var R3 = 13;
|
||
var SPACE2 = 32;
|
||
var EXCLAMATIONMARK2 = 33;
|
||
var NUMBERSIGN2 = 35;
|
||
var AMPERSAND = 38;
|
||
var APOSTROPHE = 39;
|
||
var LEFTPARENTHESIS = 40;
|
||
var RIGHTPARENTHESIS = 41;
|
||
var ASTERISK = 42;
|
||
var PLUSSIGN4 = 43;
|
||
var COMMA = 44;
|
||
var HYPERMINUS = 45;
|
||
var LESSTHANSIGN = 60;
|
||
var GREATERTHANSIGN = 62;
|
||
var QUESTIONMARK2 = 63;
|
||
var COMMERCIALAT = 64;
|
||
var LEFTSQUAREBRACKET = 91;
|
||
var RIGHTSQUAREBRACKET = 93;
|
||
var LEFTCURLYBRACKET2 = 123;
|
||
var VERTICALLINE = 124;
|
||
var RIGHTCURLYBRACKET = 125;
|
||
var INFINITY = 8734;
|
||
var NAME_CHAR = new Uint8Array(128).map(
|
||
(_, idx) => /[a-zA-Z0-9\-]/.test(String.fromCharCode(idx)) ? 1 : 0
|
||
);
|
||
var COMBINATOR_PRECEDENCE = {
|
||
" ": 1,
|
||
"&&": 2,
|
||
"||": 3,
|
||
"|": 4
|
||
};
|
||
function scanSpaces(tokenizer) {
|
||
return tokenizer.substringToPos(
|
||
tokenizer.findWsEnd(tokenizer.pos)
|
||
);
|
||
}
|
||
function scanWord(tokenizer) {
|
||
let end = tokenizer.pos;
|
||
for (; end < tokenizer.str.length; end++) {
|
||
const code2 = tokenizer.str.charCodeAt(end);
|
||
if (code2 >= 128 || NAME_CHAR[code2] === 0) {
|
||
break;
|
||
}
|
||
}
|
||
if (tokenizer.pos === end) {
|
||
tokenizer.error("Expect a keyword");
|
||
}
|
||
return tokenizer.substringToPos(end);
|
||
}
|
||
function scanNumber(tokenizer) {
|
||
let end = tokenizer.pos;
|
||
for (; end < tokenizer.str.length; end++) {
|
||
const code2 = tokenizer.str.charCodeAt(end);
|
||
if (code2 < 48 || code2 > 57) {
|
||
break;
|
||
}
|
||
}
|
||
if (tokenizer.pos === end) {
|
||
tokenizer.error("Expect a number");
|
||
}
|
||
return tokenizer.substringToPos(end);
|
||
}
|
||
function scanString(tokenizer) {
|
||
const end = tokenizer.str.indexOf("'", tokenizer.pos + 1);
|
||
if (end === -1) {
|
||
tokenizer.pos = tokenizer.str.length;
|
||
tokenizer.error("Expect an apostrophe");
|
||
}
|
||
return tokenizer.substringToPos(end + 1);
|
||
}
|
||
function readMultiplierRange(tokenizer) {
|
||
let min = null;
|
||
let max = null;
|
||
tokenizer.eat(LEFTCURLYBRACKET2);
|
||
min = scanNumber(tokenizer);
|
||
if (tokenizer.charCode() === COMMA) {
|
||
tokenizer.pos++;
|
||
if (tokenizer.charCode() !== RIGHTCURLYBRACKET) {
|
||
max = scanNumber(tokenizer);
|
||
}
|
||
} else {
|
||
max = min;
|
||
}
|
||
tokenizer.eat(RIGHTCURLYBRACKET);
|
||
return {
|
||
min: Number(min),
|
||
max: max ? Number(max) : 0
|
||
};
|
||
}
|
||
function readMultiplier(tokenizer) {
|
||
let range = null;
|
||
let comma = false;
|
||
switch (tokenizer.charCode()) {
|
||
case ASTERISK:
|
||
tokenizer.pos++;
|
||
range = {
|
||
min: 0,
|
||
max: 0
|
||
};
|
||
break;
|
||
case PLUSSIGN4:
|
||
tokenizer.pos++;
|
||
range = {
|
||
min: 1,
|
||
max: 0
|
||
};
|
||
break;
|
||
case QUESTIONMARK2:
|
||
tokenizer.pos++;
|
||
range = {
|
||
min: 0,
|
||
max: 1
|
||
};
|
||
break;
|
||
case NUMBERSIGN2:
|
||
tokenizer.pos++;
|
||
comma = true;
|
||
if (tokenizer.charCode() === LEFTCURLYBRACKET2) {
|
||
range = readMultiplierRange(tokenizer);
|
||
} else if (tokenizer.charCode() === QUESTIONMARK2) {
|
||
tokenizer.pos++;
|
||
range = {
|
||
min: 0,
|
||
max: 0
|
||
};
|
||
} else {
|
||
range = {
|
||
min: 1,
|
||
max: 0
|
||
};
|
||
}
|
||
break;
|
||
case LEFTCURLYBRACKET2:
|
||
range = readMultiplierRange(tokenizer);
|
||
break;
|
||
default:
|
||
return null;
|
||
}
|
||
return {
|
||
type: "Multiplier",
|
||
comma,
|
||
min: range.min,
|
||
max: range.max,
|
||
term: null
|
||
};
|
||
}
|
||
function maybeMultiplied(tokenizer, node) {
|
||
const multiplier = readMultiplier(tokenizer);
|
||
if (multiplier !== null) {
|
||
multiplier.term = node;
|
||
if (tokenizer.charCode() === NUMBERSIGN2 && tokenizer.charCodeAt(tokenizer.pos - 1) === PLUSSIGN4) {
|
||
return maybeMultiplied(tokenizer, multiplier);
|
||
}
|
||
return multiplier;
|
||
}
|
||
return node;
|
||
}
|
||
function maybeToken(tokenizer) {
|
||
const ch = tokenizer.peek();
|
||
if (ch === "") {
|
||
return null;
|
||
}
|
||
return {
|
||
type: "Token",
|
||
value: ch
|
||
};
|
||
}
|
||
function readProperty(tokenizer) {
|
||
let name42;
|
||
tokenizer.eat(LESSTHANSIGN);
|
||
tokenizer.eat(APOSTROPHE);
|
||
name42 = scanWord(tokenizer);
|
||
tokenizer.eat(APOSTROPHE);
|
||
tokenizer.eat(GREATERTHANSIGN);
|
||
return maybeMultiplied(tokenizer, {
|
||
type: "Property",
|
||
name: name42
|
||
});
|
||
}
|
||
function readTypeRange(tokenizer) {
|
||
let min = null;
|
||
let max = null;
|
||
let sign = 1;
|
||
tokenizer.eat(LEFTSQUAREBRACKET);
|
||
if (tokenizer.charCode() === HYPERMINUS) {
|
||
tokenizer.peek();
|
||
sign = -1;
|
||
}
|
||
if (sign == -1 && tokenizer.charCode() === INFINITY) {
|
||
tokenizer.peek();
|
||
} else {
|
||
min = sign * Number(scanNumber(tokenizer));
|
||
if (NAME_CHAR[tokenizer.charCode()] !== 0) {
|
||
min += scanWord(tokenizer);
|
||
}
|
||
}
|
||
scanSpaces(tokenizer);
|
||
tokenizer.eat(COMMA);
|
||
scanSpaces(tokenizer);
|
||
if (tokenizer.charCode() === INFINITY) {
|
||
tokenizer.peek();
|
||
} else {
|
||
sign = 1;
|
||
if (tokenizer.charCode() === HYPERMINUS) {
|
||
tokenizer.peek();
|
||
sign = -1;
|
||
}
|
||
max = sign * Number(scanNumber(tokenizer));
|
||
if (NAME_CHAR[tokenizer.charCode()] !== 0) {
|
||
max += scanWord(tokenizer);
|
||
}
|
||
}
|
||
tokenizer.eat(RIGHTSQUAREBRACKET);
|
||
return {
|
||
type: "Range",
|
||
min,
|
||
max
|
||
};
|
||
}
|
||
function readType(tokenizer) {
|
||
let name42;
|
||
let opts = null;
|
||
tokenizer.eat(LESSTHANSIGN);
|
||
name42 = scanWord(tokenizer);
|
||
if (tokenizer.charCode() === LEFTPARENTHESIS && tokenizer.nextCharCode() === RIGHTPARENTHESIS) {
|
||
tokenizer.pos += 2;
|
||
name42 += "()";
|
||
}
|
||
if (tokenizer.charCodeAt(tokenizer.findWsEnd(tokenizer.pos)) === LEFTSQUAREBRACKET) {
|
||
scanSpaces(tokenizer);
|
||
opts = readTypeRange(tokenizer);
|
||
}
|
||
tokenizer.eat(GREATERTHANSIGN);
|
||
return maybeMultiplied(tokenizer, {
|
||
type: "Type",
|
||
name: name42,
|
||
opts
|
||
});
|
||
}
|
||
function readKeywordOrFunction(tokenizer) {
|
||
const name42 = scanWord(tokenizer);
|
||
if (tokenizer.charCode() === LEFTPARENTHESIS) {
|
||
tokenizer.pos++;
|
||
return {
|
||
type: "Function",
|
||
name: name42
|
||
};
|
||
}
|
||
return maybeMultiplied(tokenizer, {
|
||
type: "Keyword",
|
||
name: name42
|
||
});
|
||
}
|
||
function regroupTerms(terms, combinators) {
|
||
function createGroup(terms2, combinator2) {
|
||
return {
|
||
type: "Group",
|
||
terms: terms2,
|
||
combinator: combinator2,
|
||
disallowEmpty: false,
|
||
explicit: false
|
||
};
|
||
}
|
||
let combinator;
|
||
combinators = Object.keys(combinators).sort((a, b) => COMBINATOR_PRECEDENCE[a] - COMBINATOR_PRECEDENCE[b]);
|
||
while (combinators.length > 0) {
|
||
combinator = combinators.shift();
|
||
let i = 0;
|
||
let subgroupStart = 0;
|
||
for (; i < terms.length; i++) {
|
||
const term = terms[i];
|
||
if (term.type === "Combinator") {
|
||
if (term.value === combinator) {
|
||
if (subgroupStart === -1) {
|
||
subgroupStart = i - 1;
|
||
}
|
||
terms.splice(i, 1);
|
||
i--;
|
||
} else {
|
||
if (subgroupStart !== -1 && i - subgroupStart > 1) {
|
||
terms.splice(
|
||
subgroupStart,
|
||
i - subgroupStart,
|
||
createGroup(terms.slice(subgroupStart, i), combinator)
|
||
);
|
||
i = subgroupStart + 1;
|
||
}
|
||
subgroupStart = -1;
|
||
}
|
||
}
|
||
}
|
||
if (subgroupStart !== -1 && combinators.length) {
|
||
terms.splice(
|
||
subgroupStart,
|
||
i - subgroupStart,
|
||
createGroup(terms.slice(subgroupStart, i), combinator)
|
||
);
|
||
}
|
||
}
|
||
return combinator;
|
||
}
|
||
function readImplicitGroup(tokenizer) {
|
||
const terms = [];
|
||
const combinators = {};
|
||
let token;
|
||
let prevToken = null;
|
||
let prevTokenPos = tokenizer.pos;
|
||
while (token = peek(tokenizer)) {
|
||
if (token.type !== "Spaces") {
|
||
if (token.type === "Combinator") {
|
||
if (prevToken === null || prevToken.type === "Combinator") {
|
||
tokenizer.pos = prevTokenPos;
|
||
tokenizer.error("Unexpected combinator");
|
||
}
|
||
combinators[token.value] = true;
|
||
} else if (prevToken !== null && prevToken.type !== "Combinator") {
|
||
combinators[" "] = true;
|
||
terms.push({
|
||
type: "Combinator",
|
||
value: " "
|
||
});
|
||
}
|
||
terms.push(token);
|
||
prevToken = token;
|
||
prevTokenPos = tokenizer.pos;
|
||
}
|
||
}
|
||
if (prevToken !== null && prevToken.type === "Combinator") {
|
||
tokenizer.pos -= prevTokenPos;
|
||
tokenizer.error("Unexpected combinator");
|
||
}
|
||
return {
|
||
type: "Group",
|
||
terms,
|
||
combinator: regroupTerms(terms, combinators) || " ",
|
||
disallowEmpty: false,
|
||
explicit: false
|
||
};
|
||
}
|
||
function readGroup(tokenizer) {
|
||
let result;
|
||
tokenizer.eat(LEFTSQUAREBRACKET);
|
||
result = readImplicitGroup(tokenizer);
|
||
tokenizer.eat(RIGHTSQUAREBRACKET);
|
||
result.explicit = true;
|
||
if (tokenizer.charCode() === EXCLAMATIONMARK2) {
|
||
tokenizer.pos++;
|
||
result.disallowEmpty = true;
|
||
}
|
||
return result;
|
||
}
|
||
function peek(tokenizer) {
|
||
let code2 = tokenizer.charCode();
|
||
if (code2 < 128 && NAME_CHAR[code2] === 1) {
|
||
return readKeywordOrFunction(tokenizer);
|
||
}
|
||
switch (code2) {
|
||
case RIGHTSQUAREBRACKET:
|
||
break;
|
||
case LEFTSQUAREBRACKET:
|
||
return maybeMultiplied(tokenizer, readGroup(tokenizer));
|
||
case LESSTHANSIGN:
|
||
return tokenizer.nextCharCode() === APOSTROPHE ? readProperty(tokenizer) : readType(tokenizer);
|
||
case VERTICALLINE:
|
||
return {
|
||
type: "Combinator",
|
||
value: tokenizer.substringToPos(
|
||
tokenizer.pos + (tokenizer.nextCharCode() === VERTICALLINE ? 2 : 1)
|
||
)
|
||
};
|
||
case AMPERSAND:
|
||
tokenizer.pos++;
|
||
tokenizer.eat(AMPERSAND);
|
||
return {
|
||
type: "Combinator",
|
||
value: "&&"
|
||
};
|
||
case COMMA:
|
||
tokenizer.pos++;
|
||
return {
|
||
type: "Comma"
|
||
};
|
||
case APOSTROPHE:
|
||
return maybeMultiplied(tokenizer, {
|
||
type: "String",
|
||
value: scanString(tokenizer)
|
||
});
|
||
case SPACE2:
|
||
case TAB2:
|
||
case N4:
|
||
case R3:
|
||
case F3:
|
||
return {
|
||
type: "Spaces",
|
||
value: scanSpaces(tokenizer)
|
||
};
|
||
case COMMERCIALAT:
|
||
code2 = tokenizer.nextCharCode();
|
||
if (code2 < 128 && NAME_CHAR[code2] === 1) {
|
||
tokenizer.pos++;
|
||
return {
|
||
type: "AtKeyword",
|
||
name: scanWord(tokenizer)
|
||
};
|
||
}
|
||
return maybeToken(tokenizer);
|
||
case ASTERISK:
|
||
case PLUSSIGN4:
|
||
case QUESTIONMARK2:
|
||
case NUMBERSIGN2:
|
||
case EXCLAMATIONMARK2:
|
||
break;
|
||
case LEFTCURLYBRACKET2:
|
||
code2 = tokenizer.nextCharCode();
|
||
if (code2 < 48 || code2 > 57) {
|
||
return maybeToken(tokenizer);
|
||
}
|
||
break;
|
||
default:
|
||
return maybeToken(tokenizer);
|
||
}
|
||
}
|
||
function parse2(source) {
|
||
const tokenizer = new Tokenizer2(source);
|
||
const result = readImplicitGroup(tokenizer);
|
||
if (tokenizer.pos !== source.length) {
|
||
tokenizer.error("Unexpected input");
|
||
}
|
||
if (result.terms.length === 1 && result.terms[0].type === "Group") {
|
||
return result.terms[0];
|
||
}
|
||
return result;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/definition-syntax/walk.js
|
||
var noop3 = function() {
|
||
};
|
||
function ensureFunction2(value) {
|
||
return typeof value === "function" ? value : noop3;
|
||
}
|
||
function walk(node, options, context) {
|
||
function walk3(node2) {
|
||
enter.call(context, node2);
|
||
switch (node2.type) {
|
||
case "Group":
|
||
node2.terms.forEach(walk3);
|
||
break;
|
||
case "Multiplier":
|
||
walk3(node2.term);
|
||
break;
|
||
case "Type":
|
||
case "Property":
|
||
case "Keyword":
|
||
case "AtKeyword":
|
||
case "Function":
|
||
case "String":
|
||
case "Token":
|
||
case "Comma":
|
||
break;
|
||
default:
|
||
throw new Error("Unknown type: " + node2.type);
|
||
}
|
||
leave.call(context, node2);
|
||
}
|
||
let enter = noop3;
|
||
let leave = noop3;
|
||
if (typeof options === "function") {
|
||
enter = options;
|
||
} else if (options) {
|
||
enter = ensureFunction2(options.enter);
|
||
leave = ensureFunction2(options.leave);
|
||
}
|
||
if (enter === noop3 && leave === noop3) {
|
||
throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");
|
||
}
|
||
walk3(node, context);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/lexer/prepare-tokens.js
|
||
var astToTokens = {
|
||
decorator(handlers) {
|
||
const tokens = [];
|
||
let curNode = null;
|
||
return {
|
||
...handlers,
|
||
node(node) {
|
||
const tmp = curNode;
|
||
curNode = node;
|
||
handlers.node.call(this, node);
|
||
curNode = tmp;
|
||
},
|
||
emit(value, type, auto) {
|
||
tokens.push({
|
||
type,
|
||
value,
|
||
node: auto ? null : curNode
|
||
});
|
||
},
|
||
result() {
|
||
return tokens;
|
||
}
|
||
};
|
||
}
|
||
};
|
||
function stringToTokens(str) {
|
||
const tokens = [];
|
||
tokenize(
|
||
str,
|
||
(type, start, end) => tokens.push({
|
||
type,
|
||
value: str.slice(start, end),
|
||
node: null
|
||
})
|
||
);
|
||
return tokens;
|
||
}
|
||
function prepare_tokens_default(value, syntax) {
|
||
if (typeof value === "string") {
|
||
return stringToTokens(value);
|
||
}
|
||
return syntax.generate(value, astToTokens);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/lexer/match-graph.js
|
||
var MATCH = { type: "Match" };
|
||
var MISMATCH = { type: "Mismatch" };
|
||
var DISALLOW_EMPTY = { type: "DisallowEmpty" };
|
||
var LEFTPARENTHESIS2 = 40;
|
||
var RIGHTPARENTHESIS2 = 41;
|
||
function createCondition(match, thenBranch, elseBranch) {
|
||
if (thenBranch === MATCH && elseBranch === MISMATCH) {
|
||
return match;
|
||
}
|
||
if (match === MATCH && thenBranch === MATCH && elseBranch === MATCH) {
|
||
return match;
|
||
}
|
||
if (match.type === "If" && match.else === MISMATCH && thenBranch === MATCH) {
|
||
thenBranch = match.then;
|
||
match = match.match;
|
||
}
|
||
return {
|
||
type: "If",
|
||
match,
|
||
then: thenBranch,
|
||
else: elseBranch
|
||
};
|
||
}
|
||
function isFunctionType(name42) {
|
||
return name42.length > 2 && name42.charCodeAt(name42.length - 2) === LEFTPARENTHESIS2 && name42.charCodeAt(name42.length - 1) === RIGHTPARENTHESIS2;
|
||
}
|
||
function isEnumCapatible(term) {
|
||
return term.type === "Keyword" || term.type === "AtKeyword" || term.type === "Function" || term.type === "Type" && isFunctionType(term.name);
|
||
}
|
||
function buildGroupMatchGraph(combinator, terms, atLeastOneTermMatched) {
|
||
switch (combinator) {
|
||
case " ": {
|
||
let result = MATCH;
|
||
for (let i = terms.length - 1; i >= 0; i--) {
|
||
const term = terms[i];
|
||
result = createCondition(
|
||
term,
|
||
result,
|
||
MISMATCH
|
||
);
|
||
}
|
||
;
|
||
return result;
|
||
}
|
||
case "|": {
|
||
let result = MISMATCH;
|
||
let map = null;
|
||
for (let i = terms.length - 1; i >= 0; i--) {
|
||
let term = terms[i];
|
||
if (isEnumCapatible(term)) {
|
||
if (map === null && i > 0 && isEnumCapatible(terms[i - 1])) {
|
||
map = /* @__PURE__ */ Object.create(null);
|
||
result = createCondition(
|
||
{
|
||
type: "Enum",
|
||
map
|
||
},
|
||
MATCH,
|
||
result
|
||
);
|
||
}
|
||
if (map !== null) {
|
||
const key = (isFunctionType(term.name) ? term.name.slice(0, -1) : term.name).toLowerCase();
|
||
if (key in map === false) {
|
||
map[key] = term;
|
||
continue;
|
||
}
|
||
}
|
||
}
|
||
map = null;
|
||
result = createCondition(
|
||
term,
|
||
MATCH,
|
||
result
|
||
);
|
||
}
|
||
;
|
||
return result;
|
||
}
|
||
case "&&": {
|
||
if (terms.length > 5) {
|
||
return {
|
||
type: "MatchOnce",
|
||
terms,
|
||
all: true
|
||
};
|
||
}
|
||
let result = MISMATCH;
|
||
for (let i = terms.length - 1; i >= 0; i--) {
|
||
const term = terms[i];
|
||
let thenClause;
|
||
if (terms.length > 1) {
|
||
thenClause = buildGroupMatchGraph(
|
||
combinator,
|
||
terms.filter(function(newGroupTerm) {
|
||
return newGroupTerm !== term;
|
||
}),
|
||
false
|
||
);
|
||
} else {
|
||
thenClause = MATCH;
|
||
}
|
||
result = createCondition(
|
||
term,
|
||
thenClause,
|
||
result
|
||
);
|
||
}
|
||
;
|
||
return result;
|
||
}
|
||
case "||": {
|
||
if (terms.length > 5) {
|
||
return {
|
||
type: "MatchOnce",
|
||
terms,
|
||
all: false
|
||
};
|
||
}
|
||
let result = atLeastOneTermMatched ? MATCH : MISMATCH;
|
||
for (let i = terms.length - 1; i >= 0; i--) {
|
||
const term = terms[i];
|
||
let thenClause;
|
||
if (terms.length > 1) {
|
||
thenClause = buildGroupMatchGraph(
|
||
combinator,
|
||
terms.filter(function(newGroupTerm) {
|
||
return newGroupTerm !== term;
|
||
}),
|
||
true
|
||
);
|
||
} else {
|
||
thenClause = MATCH;
|
||
}
|
||
result = createCondition(
|
||
term,
|
||
thenClause,
|
||
result
|
||
);
|
||
}
|
||
;
|
||
return result;
|
||
}
|
||
}
|
||
}
|
||
function buildMultiplierMatchGraph(node) {
|
||
let result = MATCH;
|
||
let matchTerm = buildMatchGraphInternal(node.term);
|
||
if (node.max === 0) {
|
||
matchTerm = createCondition(
|
||
matchTerm,
|
||
DISALLOW_EMPTY,
|
||
MISMATCH
|
||
);
|
||
result = createCondition(
|
||
matchTerm,
|
||
null,
|
||
// will be a loop
|
||
MISMATCH
|
||
);
|
||
result.then = createCondition(
|
||
MATCH,
|
||
MATCH,
|
||
result
|
||
// make a loop
|
||
);
|
||
if (node.comma) {
|
||
result.then.else = createCondition(
|
||
{ type: "Comma", syntax: node },
|
||
result,
|
||
MISMATCH
|
||
);
|
||
}
|
||
} else {
|
||
for (let i = node.min || 1; i <= node.max; i++) {
|
||
if (node.comma && result !== MATCH) {
|
||
result = createCondition(
|
||
{ type: "Comma", syntax: node },
|
||
result,
|
||
MISMATCH
|
||
);
|
||
}
|
||
result = createCondition(
|
||
matchTerm,
|
||
createCondition(
|
||
MATCH,
|
||
MATCH,
|
||
result
|
||
),
|
||
MISMATCH
|
||
);
|
||
}
|
||
}
|
||
if (node.min === 0) {
|
||
result = createCondition(
|
||
MATCH,
|
||
MATCH,
|
||
result
|
||
);
|
||
} else {
|
||
for (let i = 0; i < node.min - 1; i++) {
|
||
if (node.comma && result !== MATCH) {
|
||
result = createCondition(
|
||
{ type: "Comma", syntax: node },
|
||
result,
|
||
MISMATCH
|
||
);
|
||
}
|
||
result = createCondition(
|
||
matchTerm,
|
||
result,
|
||
MISMATCH
|
||
);
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
function buildMatchGraphInternal(node) {
|
||
if (typeof node === "function") {
|
||
return {
|
||
type: "Generic",
|
||
fn: node
|
||
};
|
||
}
|
||
switch (node.type) {
|
||
case "Group": {
|
||
let result = buildGroupMatchGraph(
|
||
node.combinator,
|
||
node.terms.map(buildMatchGraphInternal),
|
||
false
|
||
);
|
||
if (node.disallowEmpty) {
|
||
result = createCondition(
|
||
result,
|
||
DISALLOW_EMPTY,
|
||
MISMATCH
|
||
);
|
||
}
|
||
return result;
|
||
}
|
||
case "Multiplier":
|
||
return buildMultiplierMatchGraph(node);
|
||
case "Type":
|
||
case "Property":
|
||
return {
|
||
type: node.type,
|
||
name: node.name,
|
||
syntax: node
|
||
};
|
||
case "Keyword":
|
||
return {
|
||
type: node.type,
|
||
name: node.name.toLowerCase(),
|
||
syntax: node
|
||
};
|
||
case "AtKeyword":
|
||
return {
|
||
type: node.type,
|
||
name: "@" + node.name.toLowerCase(),
|
||
syntax: node
|
||
};
|
||
case "Function":
|
||
return {
|
||
type: node.type,
|
||
name: node.name.toLowerCase() + "(",
|
||
syntax: node
|
||
};
|
||
case "String":
|
||
if (node.value.length === 3) {
|
||
return {
|
||
type: "Token",
|
||
value: node.value.charAt(1),
|
||
syntax: node
|
||
};
|
||
}
|
||
return {
|
||
type: node.type,
|
||
value: node.value.substr(1, node.value.length - 2).replace(/\\'/g, "'"),
|
||
syntax: node
|
||
};
|
||
case "Token":
|
||
return {
|
||
type: node.type,
|
||
value: node.value,
|
||
syntax: node
|
||
};
|
||
case "Comma":
|
||
return {
|
||
type: node.type,
|
||
syntax: node
|
||
};
|
||
default:
|
||
throw new Error("Unknown node type:", node.type);
|
||
}
|
||
}
|
||
function buildMatchGraph(syntaxTree, ref) {
|
||
if (typeof syntaxTree === "string") {
|
||
syntaxTree = parse2(syntaxTree);
|
||
}
|
||
return {
|
||
type: "MatchGraph",
|
||
match: buildMatchGraphInternal(syntaxTree),
|
||
syntax: ref || null,
|
||
source: syntaxTree
|
||
};
|
||
}
|
||
|
||
// node_modules/css-tree/lib/lexer/match.js
|
||
var { hasOwnProperty: hasOwnProperty3 } = Object.prototype;
|
||
var STUB = 0;
|
||
var TOKEN = 1;
|
||
var OPEN_SYNTAX = 2;
|
||
var CLOSE_SYNTAX = 3;
|
||
var EXIT_REASON_MATCH = "Match";
|
||
var EXIT_REASON_MISMATCH = "Mismatch";
|
||
var EXIT_REASON_ITERATION_LIMIT = "Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)";
|
||
var ITERATION_LIMIT = 15e3;
|
||
var totalIterationCount = 0;
|
||
function reverseList(list) {
|
||
let prev = null;
|
||
let next = null;
|
||
let item = list;
|
||
while (item !== null) {
|
||
next = item.prev;
|
||
item.prev = prev;
|
||
prev = item;
|
||
item = next;
|
||
}
|
||
return prev;
|
||
}
|
||
function areStringsEqualCaseInsensitive(testStr, referenceStr) {
|
||
if (testStr.length !== referenceStr.length) {
|
||
return false;
|
||
}
|
||
for (let i = 0; i < testStr.length; i++) {
|
||
const referenceCode = referenceStr.charCodeAt(i);
|
||
let testCode = testStr.charCodeAt(i);
|
||
if (testCode >= 65 && testCode <= 90) {
|
||
testCode = testCode | 32;
|
||
}
|
||
if (testCode !== referenceCode) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function isContextEdgeDelim(token) {
|
||
if (token.type !== Delim) {
|
||
return false;
|
||
}
|
||
return token.value !== "?";
|
||
}
|
||
function isCommaContextStart(token) {
|
||
if (token === null) {
|
||
return true;
|
||
}
|
||
return token.type === Comma || token.type === Function2 || token.type === LeftParenthesis || token.type === LeftSquareBracket || token.type === LeftCurlyBracket || isContextEdgeDelim(token);
|
||
}
|
||
function isCommaContextEnd(token) {
|
||
if (token === null) {
|
||
return true;
|
||
}
|
||
return token.type === RightParenthesis || token.type === RightSquareBracket || token.type === RightCurlyBracket || token.type === Delim && token.value === "/";
|
||
}
|
||
function internalMatch(tokens, state, syntaxes) {
|
||
function moveToNextToken() {
|
||
do {
|
||
tokenIndex++;
|
||
token = tokenIndex < tokens.length ? tokens[tokenIndex] : null;
|
||
} while (token !== null && (token.type === WhiteSpace || token.type === Comment));
|
||
}
|
||
function getNextToken(offset) {
|
||
const nextIndex = tokenIndex + offset;
|
||
return nextIndex < tokens.length ? tokens[nextIndex] : null;
|
||
}
|
||
function stateSnapshotFromSyntax(nextState, prev) {
|
||
return {
|
||
nextState,
|
||
matchStack,
|
||
syntaxStack,
|
||
thenStack,
|
||
tokenIndex,
|
||
prev
|
||
};
|
||
}
|
||
function pushThenStack(nextState) {
|
||
thenStack = {
|
||
nextState,
|
||
matchStack,
|
||
syntaxStack,
|
||
prev: thenStack
|
||
};
|
||
}
|
||
function pushElseStack(nextState) {
|
||
elseStack = stateSnapshotFromSyntax(nextState, elseStack);
|
||
}
|
||
function addTokenToMatch() {
|
||
matchStack = {
|
||
type: TOKEN,
|
||
syntax: state.syntax,
|
||
token,
|
||
prev: matchStack
|
||
};
|
||
moveToNextToken();
|
||
syntaxStash = null;
|
||
if (tokenIndex > longestMatch) {
|
||
longestMatch = tokenIndex;
|
||
}
|
||
}
|
||
function openSyntax() {
|
||
syntaxStack = {
|
||
syntax: state.syntax,
|
||
opts: state.syntax.opts || syntaxStack !== null && syntaxStack.opts || null,
|
||
prev: syntaxStack
|
||
};
|
||
matchStack = {
|
||
type: OPEN_SYNTAX,
|
||
syntax: state.syntax,
|
||
token: matchStack.token,
|
||
prev: matchStack
|
||
};
|
||
}
|
||
function closeSyntax() {
|
||
if (matchStack.type === OPEN_SYNTAX) {
|
||
matchStack = matchStack.prev;
|
||
} else {
|
||
matchStack = {
|
||
type: CLOSE_SYNTAX,
|
||
syntax: syntaxStack.syntax,
|
||
token: matchStack.token,
|
||
prev: matchStack
|
||
};
|
||
}
|
||
syntaxStack = syntaxStack.prev;
|
||
}
|
||
let syntaxStack = null;
|
||
let thenStack = null;
|
||
let elseStack = null;
|
||
let syntaxStash = null;
|
||
let iterationCount = 0;
|
||
let exitReason = null;
|
||
let token = null;
|
||
let tokenIndex = -1;
|
||
let longestMatch = 0;
|
||
let matchStack = {
|
||
type: STUB,
|
||
syntax: null,
|
||
token: null,
|
||
prev: null
|
||
};
|
||
moveToNextToken();
|
||
while (exitReason === null && ++iterationCount < ITERATION_LIMIT) {
|
||
switch (state.type) {
|
||
case "Match":
|
||
if (thenStack === null) {
|
||
if (token !== null) {
|
||
if (tokenIndex !== tokens.length - 1 || token.value !== "\\0" && token.value !== "\\9") {
|
||
state = MISMATCH;
|
||
break;
|
||
}
|
||
}
|
||
exitReason = EXIT_REASON_MATCH;
|
||
break;
|
||
}
|
||
state = thenStack.nextState;
|
||
if (state === DISALLOW_EMPTY) {
|
||
if (thenStack.matchStack === matchStack) {
|
||
state = MISMATCH;
|
||
break;
|
||
} else {
|
||
state = MATCH;
|
||
}
|
||
}
|
||
while (thenStack.syntaxStack !== syntaxStack) {
|
||
closeSyntax();
|
||
}
|
||
thenStack = thenStack.prev;
|
||
break;
|
||
case "Mismatch":
|
||
if (syntaxStash !== null && syntaxStash !== false) {
|
||
if (elseStack === null || tokenIndex > elseStack.tokenIndex) {
|
||
elseStack = syntaxStash;
|
||
syntaxStash = false;
|
||
}
|
||
} else if (elseStack === null) {
|
||
exitReason = EXIT_REASON_MISMATCH;
|
||
break;
|
||
}
|
||
state = elseStack.nextState;
|
||
thenStack = elseStack.thenStack;
|
||
syntaxStack = elseStack.syntaxStack;
|
||
matchStack = elseStack.matchStack;
|
||
tokenIndex = elseStack.tokenIndex;
|
||
token = tokenIndex < tokens.length ? tokens[tokenIndex] : null;
|
||
elseStack = elseStack.prev;
|
||
break;
|
||
case "MatchGraph":
|
||
state = state.match;
|
||
break;
|
||
case "If":
|
||
if (state.else !== MISMATCH) {
|
||
pushElseStack(state.else);
|
||
}
|
||
if (state.then !== MATCH) {
|
||
pushThenStack(state.then);
|
||
}
|
||
state = state.match;
|
||
break;
|
||
case "MatchOnce":
|
||
state = {
|
||
type: "MatchOnceBuffer",
|
||
syntax: state,
|
||
index: 0,
|
||
mask: 0
|
||
};
|
||
break;
|
||
case "MatchOnceBuffer": {
|
||
const terms = state.syntax.terms;
|
||
if (state.index === terms.length) {
|
||
if (state.mask === 0 || state.syntax.all) {
|
||
state = MISMATCH;
|
||
break;
|
||
}
|
||
state = MATCH;
|
||
break;
|
||
}
|
||
if (state.mask === (1 << terms.length) - 1) {
|
||
state = MATCH;
|
||
break;
|
||
}
|
||
for (; state.index < terms.length; state.index++) {
|
||
const matchFlag = 1 << state.index;
|
||
if ((state.mask & matchFlag) === 0) {
|
||
pushElseStack(state);
|
||
pushThenStack({
|
||
type: "AddMatchOnce",
|
||
syntax: state.syntax,
|
||
mask: state.mask | matchFlag
|
||
});
|
||
state = terms[state.index++];
|
||
break;
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
case "AddMatchOnce":
|
||
state = {
|
||
type: "MatchOnceBuffer",
|
||
syntax: state.syntax,
|
||
index: 0,
|
||
mask: state.mask
|
||
};
|
||
break;
|
||
case "Enum":
|
||
if (token !== null) {
|
||
let name42 = token.value.toLowerCase();
|
||
if (name42.indexOf("\\") !== -1) {
|
||
name42 = name42.replace(/\\[09].*$/, "");
|
||
}
|
||
if (hasOwnProperty3.call(state.map, name42)) {
|
||
state = state.map[name42];
|
||
break;
|
||
}
|
||
}
|
||
state = MISMATCH;
|
||
break;
|
||
case "Generic": {
|
||
const opts = syntaxStack !== null ? syntaxStack.opts : null;
|
||
const lastTokenIndex2 = tokenIndex + Math.floor(state.fn(token, getNextToken, opts));
|
||
if (!isNaN(lastTokenIndex2) && lastTokenIndex2 > tokenIndex) {
|
||
while (tokenIndex < lastTokenIndex2) {
|
||
addTokenToMatch();
|
||
}
|
||
state = MATCH;
|
||
} else {
|
||
state = MISMATCH;
|
||
}
|
||
break;
|
||
}
|
||
case "Type":
|
||
case "Property": {
|
||
const syntaxDict = state.type === "Type" ? "types" : "properties";
|
||
const dictSyntax = hasOwnProperty3.call(syntaxes, syntaxDict) ? syntaxes[syntaxDict][state.name] : null;
|
||
if (!dictSyntax || !dictSyntax.match) {
|
||
throw new Error(
|
||
"Bad syntax reference: " + (state.type === "Type" ? "<" + state.name + ">" : "<'" + state.name + "'>")
|
||
);
|
||
}
|
||
if (syntaxStash !== false && token !== null && state.type === "Type") {
|
||
const lowPriorityMatching = (
|
||
// https://drafts.csswg.org/css-values-4/#custom-idents
|
||
// When parsing positionally-ambiguous keywords in a property value, a <custom-ident> production
|
||
// can only claim the keyword if no other unfulfilled production can claim it.
|
||
state.name === "custom-ident" && token.type === Ident || // https://drafts.csswg.org/css-values-4/#lengths
|
||
// ... if a `0` could be parsed as either a <number> or a <length> in a property (such as line-height),
|
||
// it must parse as a <number>
|
||
state.name === "length" && token.value === "0"
|
||
);
|
||
if (lowPriorityMatching) {
|
||
if (syntaxStash === null) {
|
||
syntaxStash = stateSnapshotFromSyntax(state, elseStack);
|
||
}
|
||
state = MISMATCH;
|
||
break;
|
||
}
|
||
}
|
||
openSyntax();
|
||
state = dictSyntax.match;
|
||
break;
|
||
}
|
||
case "Keyword": {
|
||
const name42 = state.name;
|
||
if (token !== null) {
|
||
let keywordName = token.value;
|
||
if (keywordName.indexOf("\\") !== -1) {
|
||
keywordName = keywordName.replace(/\\[09].*$/, "");
|
||
}
|
||
if (areStringsEqualCaseInsensitive(keywordName, name42)) {
|
||
addTokenToMatch();
|
||
state = MATCH;
|
||
break;
|
||
}
|
||
}
|
||
state = MISMATCH;
|
||
break;
|
||
}
|
||
case "AtKeyword":
|
||
case "Function":
|
||
if (token !== null && areStringsEqualCaseInsensitive(token.value, state.name)) {
|
||
addTokenToMatch();
|
||
state = MATCH;
|
||
break;
|
||
}
|
||
state = MISMATCH;
|
||
break;
|
||
case "Token":
|
||
if (token !== null && token.value === state.value) {
|
||
addTokenToMatch();
|
||
state = MATCH;
|
||
break;
|
||
}
|
||
state = MISMATCH;
|
||
break;
|
||
case "Comma":
|
||
if (token !== null && token.type === Comma) {
|
||
if (isCommaContextStart(matchStack.token)) {
|
||
state = MISMATCH;
|
||
} else {
|
||
addTokenToMatch();
|
||
state = isCommaContextEnd(token) ? MISMATCH : MATCH;
|
||
}
|
||
} else {
|
||
state = isCommaContextStart(matchStack.token) || isCommaContextEnd(token) ? MATCH : MISMATCH;
|
||
}
|
||
break;
|
||
case "String":
|
||
let string = "";
|
||
let lastTokenIndex = tokenIndex;
|
||
for (; lastTokenIndex < tokens.length && string.length < state.value.length; lastTokenIndex++) {
|
||
string += tokens[lastTokenIndex].value;
|
||
}
|
||
if (areStringsEqualCaseInsensitive(string, state.value)) {
|
||
while (tokenIndex < lastTokenIndex) {
|
||
addTokenToMatch();
|
||
}
|
||
state = MATCH;
|
||
} else {
|
||
state = MISMATCH;
|
||
}
|
||
break;
|
||
default:
|
||
throw new Error("Unknown node type: " + state.type);
|
||
}
|
||
}
|
||
totalIterationCount += iterationCount;
|
||
switch (exitReason) {
|
||
case null:
|
||
console.warn("[csstree-match] BREAK after " + ITERATION_LIMIT + " iterations");
|
||
exitReason = EXIT_REASON_ITERATION_LIMIT;
|
||
matchStack = null;
|
||
break;
|
||
case EXIT_REASON_MATCH:
|
||
while (syntaxStack !== null) {
|
||
closeSyntax();
|
||
}
|
||
break;
|
||
default:
|
||
matchStack = null;
|
||
}
|
||
return {
|
||
tokens,
|
||
reason: exitReason,
|
||
iterations: iterationCount,
|
||
match: matchStack,
|
||
longestMatch
|
||
};
|
||
}
|
||
function matchAsTree(tokens, matchGraph, syntaxes) {
|
||
const matchResult = internalMatch(tokens, matchGraph, syntaxes || {});
|
||
if (matchResult.match === null) {
|
||
return matchResult;
|
||
}
|
||
let item = matchResult.match;
|
||
let host = matchResult.match = {
|
||
syntax: matchGraph.syntax || null,
|
||
match: []
|
||
};
|
||
const hostStack = [host];
|
||
item = reverseList(item).prev;
|
||
while (item !== null) {
|
||
switch (item.type) {
|
||
case OPEN_SYNTAX:
|
||
host.match.push(host = {
|
||
syntax: item.syntax,
|
||
match: []
|
||
});
|
||
hostStack.push(host);
|
||
break;
|
||
case CLOSE_SYNTAX:
|
||
hostStack.pop();
|
||
host = hostStack[hostStack.length - 1];
|
||
break;
|
||
default:
|
||
host.match.push({
|
||
syntax: item.syntax || null,
|
||
token: item.token.value,
|
||
node: item.token.node
|
||
});
|
||
}
|
||
item = item.prev;
|
||
}
|
||
return matchResult;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/lexer/trace.js
|
||
var trace_exports = {};
|
||
__export(trace_exports, {
|
||
getTrace: () => getTrace,
|
||
isKeyword: () => isKeyword,
|
||
isProperty: () => isProperty,
|
||
isType: () => isType
|
||
});
|
||
function getTrace(node) {
|
||
function shouldPutToTrace(syntax) {
|
||
if (syntax === null) {
|
||
return false;
|
||
}
|
||
return syntax.type === "Type" || syntax.type === "Property" || syntax.type === "Keyword";
|
||
}
|
||
function hasMatch(matchNode) {
|
||
if (Array.isArray(matchNode.match)) {
|
||
for (let i = 0; i < matchNode.match.length; i++) {
|
||
if (hasMatch(matchNode.match[i])) {
|
||
if (shouldPutToTrace(matchNode.syntax)) {
|
||
result.unshift(matchNode.syntax);
|
||
}
|
||
return true;
|
||
}
|
||
}
|
||
} else if (matchNode.node === node) {
|
||
result = shouldPutToTrace(matchNode.syntax) ? [matchNode.syntax] : [];
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
let result = null;
|
||
if (this.matched !== null) {
|
||
hasMatch(this.matched);
|
||
}
|
||
return result;
|
||
}
|
||
function isType(node, type) {
|
||
return testNode(this, node, (match) => match.type === "Type" && match.name === type);
|
||
}
|
||
function isProperty(node, property3) {
|
||
return testNode(this, node, (match) => match.type === "Property" && match.name === property3);
|
||
}
|
||
function isKeyword(node) {
|
||
return testNode(this, node, (match) => match.type === "Keyword");
|
||
}
|
||
function testNode(match, node, fn) {
|
||
const trace = getTrace.call(match, node);
|
||
if (trace === null) {
|
||
return false;
|
||
}
|
||
return trace.some(fn);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/lexer/search.js
|
||
function getFirstMatchNode(matchNode) {
|
||
if ("node" in matchNode) {
|
||
return matchNode.node;
|
||
}
|
||
return getFirstMatchNode(matchNode.match[0]);
|
||
}
|
||
function getLastMatchNode(matchNode) {
|
||
if ("node" in matchNode) {
|
||
return matchNode.node;
|
||
}
|
||
return getLastMatchNode(matchNode.match[matchNode.match.length - 1]);
|
||
}
|
||
function matchFragments(lexer2, ast, match, type, name42) {
|
||
function findFragments(matchNode) {
|
||
if (matchNode.syntax !== null && matchNode.syntax.type === type && matchNode.syntax.name === name42) {
|
||
const start = getFirstMatchNode(matchNode);
|
||
const end = getLastMatchNode(matchNode);
|
||
lexer2.syntax.walk(ast, function(node, item, list) {
|
||
if (node === start) {
|
||
const nodes = new List();
|
||
do {
|
||
nodes.appendData(item.data);
|
||
if (item.data === end) {
|
||
break;
|
||
}
|
||
item = item.next;
|
||
} while (item !== null);
|
||
fragments.push({
|
||
parent: list,
|
||
nodes
|
||
});
|
||
}
|
||
});
|
||
}
|
||
if (Array.isArray(matchNode.match)) {
|
||
matchNode.match.forEach(findFragments);
|
||
}
|
||
}
|
||
const fragments = [];
|
||
if (match.matched !== null) {
|
||
findFragments(match.matched);
|
||
}
|
||
return fragments;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/lexer/structure.js
|
||
var { hasOwnProperty: hasOwnProperty4 } = Object.prototype;
|
||
function isValidNumber(value) {
|
||
return typeof value === "number" && isFinite(value) && Math.floor(value) === value && value >= 0;
|
||
}
|
||
function isValidLocation(loc) {
|
||
return Boolean(loc) && isValidNumber(loc.offset) && isValidNumber(loc.line) && isValidNumber(loc.column);
|
||
}
|
||
function createNodeStructureChecker(type, fields) {
|
||
return function checkNode(node, warn) {
|
||
if (!node || node.constructor !== Object) {
|
||
return warn(node, "Type of node should be an Object");
|
||
}
|
||
for (let key in node) {
|
||
let valid = true;
|
||
if (hasOwnProperty4.call(node, key) === false) {
|
||
continue;
|
||
}
|
||
if (key === "type") {
|
||
if (node.type !== type) {
|
||
warn(node, "Wrong node type `" + node.type + "`, expected `" + type + "`");
|
||
}
|
||
} else if (key === "loc") {
|
||
if (node.loc === null) {
|
||
continue;
|
||
} else if (node.loc && node.loc.constructor === Object) {
|
||
if (typeof node.loc.source !== "string") {
|
||
key += ".source";
|
||
} else if (!isValidLocation(node.loc.start)) {
|
||
key += ".start";
|
||
} else if (!isValidLocation(node.loc.end)) {
|
||
key += ".end";
|
||
} else {
|
||
continue;
|
||
}
|
||
}
|
||
valid = false;
|
||
} else if (fields.hasOwnProperty(key)) {
|
||
valid = false;
|
||
for (let i = 0; !valid && i < fields[key].length; i++) {
|
||
const fieldType = fields[key][i];
|
||
switch (fieldType) {
|
||
case String:
|
||
valid = typeof node[key] === "string";
|
||
break;
|
||
case Boolean:
|
||
valid = typeof node[key] === "boolean";
|
||
break;
|
||
case null:
|
||
valid = node[key] === null;
|
||
break;
|
||
default:
|
||
if (typeof fieldType === "string") {
|
||
valid = node[key] && node[key].type === fieldType;
|
||
} else if (Array.isArray(fieldType)) {
|
||
valid = node[key] instanceof List;
|
||
}
|
||
}
|
||
}
|
||
} else {
|
||
warn(node, "Unknown field `" + key + "` for " + type + " node type");
|
||
}
|
||
if (!valid) {
|
||
warn(node, "Bad value for `" + type + "." + key + "`");
|
||
}
|
||
}
|
||
for (const key in fields) {
|
||
if (hasOwnProperty4.call(fields, key) && hasOwnProperty4.call(node, key) === false) {
|
||
warn(node, "Field `" + type + "." + key + "` is missed");
|
||
}
|
||
}
|
||
};
|
||
}
|
||
function processStructure(name42, nodeType) {
|
||
const structure42 = nodeType.structure;
|
||
const fields = {
|
||
type: String,
|
||
loc: true
|
||
};
|
||
const docs = {
|
||
type: '"' + name42 + '"'
|
||
};
|
||
for (const key in structure42) {
|
||
if (hasOwnProperty4.call(structure42, key) === false) {
|
||
continue;
|
||
}
|
||
const docsTypes = [];
|
||
const fieldTypes = fields[key] = Array.isArray(structure42[key]) ? structure42[key].slice() : [structure42[key]];
|
||
for (let i = 0; i < fieldTypes.length; i++) {
|
||
const fieldType = fieldTypes[i];
|
||
if (fieldType === String || fieldType === Boolean) {
|
||
docsTypes.push(fieldType.name);
|
||
} else if (fieldType === null) {
|
||
docsTypes.push("null");
|
||
} else if (typeof fieldType === "string") {
|
||
docsTypes.push("<" + fieldType + ">");
|
||
} else if (Array.isArray(fieldType)) {
|
||
docsTypes.push("List");
|
||
} else {
|
||
throw new Error("Wrong value `" + fieldType + "` in `" + name42 + "." + key + "` structure definition");
|
||
}
|
||
}
|
||
docs[key] = docsTypes.join(" | ");
|
||
}
|
||
return {
|
||
docs,
|
||
check: createNodeStructureChecker(name42, fields)
|
||
};
|
||
}
|
||
function getStructureFromConfig(config) {
|
||
const structure42 = {};
|
||
if (config.node) {
|
||
for (const name42 in config.node) {
|
||
if (hasOwnProperty4.call(config.node, name42)) {
|
||
const nodeType = config.node[name42];
|
||
if (nodeType.structure) {
|
||
structure42[name42] = processStructure(name42, nodeType);
|
||
} else {
|
||
throw new Error("Missed `structure` field in `" + name42 + "` node type definition");
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return structure42;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/lexer/Lexer.js
|
||
var cssWideKeywordsSyntax = buildMatchGraph(cssWideKeywords.join(" | "));
|
||
function dumpMapSyntax(map, compact, syntaxAsAst) {
|
||
const result = {};
|
||
for (const name42 in map) {
|
||
if (map[name42].syntax) {
|
||
result[name42] = syntaxAsAst ? map[name42].syntax : generate(map[name42].syntax, { compact });
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
function dumpAtruleMapSyntax(map, compact, syntaxAsAst) {
|
||
const result = {};
|
||
for (const [name42, atrule] of Object.entries(map)) {
|
||
result[name42] = {
|
||
prelude: atrule.prelude && (syntaxAsAst ? atrule.prelude.syntax : generate(atrule.prelude.syntax, { compact })),
|
||
descriptors: atrule.descriptors && dumpMapSyntax(atrule.descriptors, compact, syntaxAsAst)
|
||
};
|
||
}
|
||
return result;
|
||
}
|
||
function valueHasVar(tokens) {
|
||
for (let i = 0; i < tokens.length; i++) {
|
||
if (tokens[i].value.toLowerCase() === "var(") {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
function buildMatchResult(matched, error, iterations) {
|
||
return {
|
||
matched,
|
||
iterations,
|
||
error,
|
||
...trace_exports
|
||
};
|
||
}
|
||
function matchSyntax(lexer2, syntax, value, useCssWideKeywords) {
|
||
const tokens = prepare_tokens_default(value, lexer2.syntax);
|
||
let result;
|
||
if (valueHasVar(tokens)) {
|
||
return buildMatchResult(null, new Error("Matching for a tree with var() is not supported"));
|
||
}
|
||
if (useCssWideKeywords) {
|
||
result = matchAsTree(tokens, lexer2.cssWideKeywordsSyntax, lexer2);
|
||
}
|
||
if (!useCssWideKeywords || !result.match) {
|
||
result = matchAsTree(tokens, syntax.match, lexer2);
|
||
if (!result.match) {
|
||
return buildMatchResult(
|
||
null,
|
||
new SyntaxMatchError(result.reason, syntax.syntax, value, result),
|
||
result.iterations
|
||
);
|
||
}
|
||
}
|
||
return buildMatchResult(result.match, null, result.iterations);
|
||
}
|
||
var Lexer = class {
|
||
constructor(config, syntax, structure42) {
|
||
this.cssWideKeywordsSyntax = cssWideKeywordsSyntax;
|
||
this.syntax = syntax;
|
||
this.generic = false;
|
||
this.units = { ...units_exports };
|
||
this.atrules = /* @__PURE__ */ Object.create(null);
|
||
this.properties = /* @__PURE__ */ Object.create(null);
|
||
this.types = /* @__PURE__ */ Object.create(null);
|
||
this.structure = structure42 || getStructureFromConfig(config);
|
||
if (config) {
|
||
if (config.units) {
|
||
for (const group of Object.keys(units_exports)) {
|
||
if (Array.isArray(config.units[group])) {
|
||
this.units[group] = config.units[group];
|
||
}
|
||
}
|
||
}
|
||
if (config.types) {
|
||
for (const name42 in config.types) {
|
||
this.addType_(name42, config.types[name42]);
|
||
}
|
||
}
|
||
if (config.generic) {
|
||
this.generic = true;
|
||
for (const [name42, value] of Object.entries(createGenericTypes(this.units))) {
|
||
this.addType_(name42, value);
|
||
}
|
||
}
|
||
if (config.atrules) {
|
||
for (const name42 in config.atrules) {
|
||
this.addAtrule_(name42, config.atrules[name42]);
|
||
}
|
||
}
|
||
if (config.properties) {
|
||
for (const name42 in config.properties) {
|
||
this.addProperty_(name42, config.properties[name42]);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
checkStructure(ast) {
|
||
function collectWarning(node, message) {
|
||
warns.push({ node, message });
|
||
}
|
||
const structure42 = this.structure;
|
||
const warns = [];
|
||
this.syntax.walk(ast, function(node) {
|
||
if (structure42.hasOwnProperty(node.type)) {
|
||
structure42[node.type].check(node, collectWarning);
|
||
} else {
|
||
collectWarning(node, "Unknown node type `" + node.type + "`");
|
||
}
|
||
});
|
||
return warns.length ? warns : false;
|
||
}
|
||
createDescriptor(syntax, type, name42, parent = null) {
|
||
const ref = {
|
||
type,
|
||
name: name42
|
||
};
|
||
const descriptor = {
|
||
type,
|
||
name: name42,
|
||
parent,
|
||
serializable: typeof syntax === "string" || syntax && typeof syntax.type === "string",
|
||
syntax: null,
|
||
match: null
|
||
};
|
||
if (typeof syntax === "function") {
|
||
descriptor.match = buildMatchGraph(syntax, ref);
|
||
} else {
|
||
if (typeof syntax === "string") {
|
||
Object.defineProperty(descriptor, "syntax", {
|
||
get() {
|
||
Object.defineProperty(descriptor, "syntax", {
|
||
value: parse2(syntax)
|
||
});
|
||
return descriptor.syntax;
|
||
}
|
||
});
|
||
} else {
|
||
descriptor.syntax = syntax;
|
||
}
|
||
Object.defineProperty(descriptor, "match", {
|
||
get() {
|
||
Object.defineProperty(descriptor, "match", {
|
||
value: buildMatchGraph(descriptor.syntax, ref)
|
||
});
|
||
return descriptor.match;
|
||
}
|
||
});
|
||
}
|
||
return descriptor;
|
||
}
|
||
addAtrule_(name42, syntax) {
|
||
if (!syntax) {
|
||
return;
|
||
}
|
||
this.atrules[name42] = {
|
||
type: "Atrule",
|
||
name: name42,
|
||
prelude: syntax.prelude ? this.createDescriptor(syntax.prelude, "AtrulePrelude", name42) : null,
|
||
descriptors: syntax.descriptors ? Object.keys(syntax.descriptors).reduce(
|
||
(map, descName) => {
|
||
map[descName] = this.createDescriptor(syntax.descriptors[descName], "AtruleDescriptor", descName, name42);
|
||
return map;
|
||
},
|
||
/* @__PURE__ */ Object.create(null)
|
||
) : null
|
||
};
|
||
}
|
||
addProperty_(name42, syntax) {
|
||
if (!syntax) {
|
||
return;
|
||
}
|
||
this.properties[name42] = this.createDescriptor(syntax, "Property", name42);
|
||
}
|
||
addType_(name42, syntax) {
|
||
if (!syntax) {
|
||
return;
|
||
}
|
||
this.types[name42] = this.createDescriptor(syntax, "Type", name42);
|
||
}
|
||
checkAtruleName(atruleName) {
|
||
if (!this.getAtrule(atruleName)) {
|
||
return new SyntaxReferenceError("Unknown at-rule", "@" + atruleName);
|
||
}
|
||
}
|
||
checkAtrulePrelude(atruleName, prelude) {
|
||
const error = this.checkAtruleName(atruleName);
|
||
if (error) {
|
||
return error;
|
||
}
|
||
const atrule = this.getAtrule(atruleName);
|
||
if (!atrule.prelude && prelude) {
|
||
return new SyntaxError("At-rule `@" + atruleName + "` should not contain a prelude");
|
||
}
|
||
if (atrule.prelude && !prelude) {
|
||
if (!matchSyntax(this, atrule.prelude, "", false).matched) {
|
||
return new SyntaxError("At-rule `@" + atruleName + "` should contain a prelude");
|
||
}
|
||
}
|
||
}
|
||
checkAtruleDescriptorName(atruleName, descriptorName) {
|
||
const error = this.checkAtruleName(atruleName);
|
||
if (error) {
|
||
return error;
|
||
}
|
||
const atrule = this.getAtrule(atruleName);
|
||
const descriptor = keyword(descriptorName);
|
||
if (!atrule.descriptors) {
|
||
return new SyntaxError("At-rule `@" + atruleName + "` has no known descriptors");
|
||
}
|
||
if (!atrule.descriptors[descriptor.name] && !atrule.descriptors[descriptor.basename]) {
|
||
return new SyntaxReferenceError("Unknown at-rule descriptor", descriptorName);
|
||
}
|
||
}
|
||
checkPropertyName(propertyName) {
|
||
if (!this.getProperty(propertyName)) {
|
||
return new SyntaxReferenceError("Unknown property", propertyName);
|
||
}
|
||
}
|
||
matchAtrulePrelude(atruleName, prelude) {
|
||
const error = this.checkAtrulePrelude(atruleName, prelude);
|
||
if (error) {
|
||
return buildMatchResult(null, error);
|
||
}
|
||
const atrule = this.getAtrule(atruleName);
|
||
if (!atrule.prelude) {
|
||
return buildMatchResult(null, null);
|
||
}
|
||
return matchSyntax(this, atrule.prelude, prelude || "", false);
|
||
}
|
||
matchAtruleDescriptor(atruleName, descriptorName, value) {
|
||
const error = this.checkAtruleDescriptorName(atruleName, descriptorName);
|
||
if (error) {
|
||
return buildMatchResult(null, error);
|
||
}
|
||
const atrule = this.getAtrule(atruleName);
|
||
const descriptor = keyword(descriptorName);
|
||
return matchSyntax(this, atrule.descriptors[descriptor.name] || atrule.descriptors[descriptor.basename], value, false);
|
||
}
|
||
matchDeclaration(node) {
|
||
if (node.type !== "Declaration") {
|
||
return buildMatchResult(null, new Error("Not a Declaration node"));
|
||
}
|
||
return this.matchProperty(node.property, node.value);
|
||
}
|
||
matchProperty(propertyName, value) {
|
||
if (property(propertyName).custom) {
|
||
return buildMatchResult(null, new Error("Lexer matching doesn't applicable for custom properties"));
|
||
}
|
||
const error = this.checkPropertyName(propertyName);
|
||
if (error) {
|
||
return buildMatchResult(null, error);
|
||
}
|
||
return matchSyntax(this, this.getProperty(propertyName), value, true);
|
||
}
|
||
matchType(typeName, value) {
|
||
const typeSyntax = this.getType(typeName);
|
||
if (!typeSyntax) {
|
||
return buildMatchResult(null, new SyntaxReferenceError("Unknown type", typeName));
|
||
}
|
||
return matchSyntax(this, typeSyntax, value, false);
|
||
}
|
||
match(syntax, value) {
|
||
if (typeof syntax !== "string" && (!syntax || !syntax.type)) {
|
||
return buildMatchResult(null, new SyntaxReferenceError("Bad syntax"));
|
||
}
|
||
if (typeof syntax === "string" || !syntax.match) {
|
||
syntax = this.createDescriptor(syntax, "Type", "anonymous");
|
||
}
|
||
return matchSyntax(this, syntax, value, false);
|
||
}
|
||
findValueFragments(propertyName, value, type, name42) {
|
||
return matchFragments(this, value, this.matchProperty(propertyName, value), type, name42);
|
||
}
|
||
findDeclarationValueFragments(declaration, type, name42) {
|
||
return matchFragments(this, declaration.value, this.matchDeclaration(declaration), type, name42);
|
||
}
|
||
findAllFragments(ast, type, name42) {
|
||
const result = [];
|
||
this.syntax.walk(ast, {
|
||
visit: "Declaration",
|
||
enter: (declaration) => {
|
||
result.push.apply(result, this.findDeclarationValueFragments(declaration, type, name42));
|
||
}
|
||
});
|
||
return result;
|
||
}
|
||
getAtrule(atruleName, fallbackBasename = true) {
|
||
const atrule = keyword(atruleName);
|
||
const atruleEntry = atrule.vendor && fallbackBasename ? this.atrules[atrule.name] || this.atrules[atrule.basename] : this.atrules[atrule.name];
|
||
return atruleEntry || null;
|
||
}
|
||
getAtrulePrelude(atruleName, fallbackBasename = true) {
|
||
const atrule = this.getAtrule(atruleName, fallbackBasename);
|
||
return atrule && atrule.prelude || null;
|
||
}
|
||
getAtruleDescriptor(atruleName, name42) {
|
||
return this.atrules.hasOwnProperty(atruleName) && this.atrules.declarators ? this.atrules[atruleName].declarators[name42] || null : null;
|
||
}
|
||
getProperty(propertyName, fallbackBasename = true) {
|
||
const property3 = property(propertyName);
|
||
const propertyEntry = property3.vendor && fallbackBasename ? this.properties[property3.name] || this.properties[property3.basename] : this.properties[property3.name];
|
||
return propertyEntry || null;
|
||
}
|
||
getType(name42) {
|
||
return hasOwnProperty.call(this.types, name42) ? this.types[name42] : null;
|
||
}
|
||
validate() {
|
||
function validate2(syntax, name42, broken, descriptor) {
|
||
if (broken.has(name42)) {
|
||
return broken.get(name42);
|
||
}
|
||
broken.set(name42, false);
|
||
if (descriptor.syntax !== null) {
|
||
walk(descriptor.syntax, function(node) {
|
||
if (node.type !== "Type" && node.type !== "Property") {
|
||
return;
|
||
}
|
||
const map = node.type === "Type" ? syntax.types : syntax.properties;
|
||
const brokenMap = node.type === "Type" ? brokenTypes : brokenProperties;
|
||
if (!hasOwnProperty.call(map, node.name) || validate2(syntax, node.name, brokenMap, map[node.name])) {
|
||
broken.set(name42, true);
|
||
}
|
||
}, this);
|
||
}
|
||
}
|
||
let brokenTypes = /* @__PURE__ */ new Map();
|
||
let brokenProperties = /* @__PURE__ */ new Map();
|
||
for (const key in this.types) {
|
||
validate2(this, key, brokenTypes, this.types[key]);
|
||
}
|
||
for (const key in this.properties) {
|
||
validate2(this, key, brokenProperties, this.properties[key]);
|
||
}
|
||
brokenTypes = [...brokenTypes.keys()].filter((name42) => brokenTypes.get(name42));
|
||
brokenProperties = [...brokenProperties.keys()].filter((name42) => brokenProperties.get(name42));
|
||
if (brokenTypes.length || brokenProperties.length) {
|
||
return {
|
||
types: brokenTypes,
|
||
properties: brokenProperties
|
||
};
|
||
}
|
||
return null;
|
||
}
|
||
dump(syntaxAsAst, pretty) {
|
||
return {
|
||
generic: this.generic,
|
||
units: this.units,
|
||
types: dumpMapSyntax(this.types, !pretty, syntaxAsAst),
|
||
properties: dumpMapSyntax(this.properties, !pretty, syntaxAsAst),
|
||
atrules: dumpAtruleMapSyntax(this.atrules, !pretty, syntaxAsAst)
|
||
};
|
||
}
|
||
toString() {
|
||
return JSON.stringify(this.dump());
|
||
}
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/config/mix.js
|
||
function appendOrSet(a, b) {
|
||
if (typeof b === "string" && /^\s*\|/.test(b)) {
|
||
return typeof a === "string" ? a + b : b.replace(/^\s*\|\s*/, "");
|
||
}
|
||
return b || null;
|
||
}
|
||
function sliceProps(obj, props) {
|
||
const result = /* @__PURE__ */ Object.create(null);
|
||
for (const [key, value] of Object.entries(obj)) {
|
||
if (value) {
|
||
result[key] = {};
|
||
for (const prop of Object.keys(value)) {
|
||
if (props.includes(prop)) {
|
||
result[key][prop] = value[prop];
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
function mix(dest, src) {
|
||
const result = { ...dest };
|
||
for (const [prop, value] of Object.entries(src)) {
|
||
switch (prop) {
|
||
case "generic":
|
||
result[prop] = Boolean(value);
|
||
break;
|
||
case "units":
|
||
result[prop] = { ...dest[prop] };
|
||
for (const [name42, patch] of Object.entries(value)) {
|
||
result[prop][name42] = Array.isArray(patch) ? patch : [];
|
||
}
|
||
break;
|
||
case "atrules":
|
||
result[prop] = { ...dest[prop] };
|
||
for (const [name42, atrule] of Object.entries(value)) {
|
||
const exists = result[prop][name42] || {};
|
||
const current = result[prop][name42] = {
|
||
prelude: exists.prelude || null,
|
||
descriptors: {
|
||
...exists.descriptors
|
||
}
|
||
};
|
||
if (!atrule) {
|
||
continue;
|
||
}
|
||
current.prelude = atrule.prelude ? appendOrSet(current.prelude, atrule.prelude) : current.prelude || null;
|
||
for (const [descriptorName, descriptorValue] of Object.entries(atrule.descriptors || {})) {
|
||
current.descriptors[descriptorName] = descriptorValue ? appendOrSet(current.descriptors[descriptorName], descriptorValue) : null;
|
||
}
|
||
if (!Object.keys(current.descriptors).length) {
|
||
current.descriptors = null;
|
||
}
|
||
}
|
||
break;
|
||
case "types":
|
||
case "properties":
|
||
result[prop] = { ...dest[prop] };
|
||
for (const [name42, syntax] of Object.entries(value)) {
|
||
result[prop][name42] = appendOrSet(result[prop][name42], syntax);
|
||
}
|
||
break;
|
||
case "scope":
|
||
result[prop] = { ...dest[prop] };
|
||
for (const [name42, props] of Object.entries(value)) {
|
||
result[prop][name42] = { ...result[prop][name42], ...props };
|
||
}
|
||
break;
|
||
case "parseContext":
|
||
result[prop] = {
|
||
...dest[prop],
|
||
...value
|
||
};
|
||
break;
|
||
case "atrule":
|
||
case "pseudo":
|
||
result[prop] = {
|
||
...dest[prop],
|
||
...sliceProps(value, ["parse"])
|
||
};
|
||
break;
|
||
case "node":
|
||
result[prop] = {
|
||
...dest[prop],
|
||
...sliceProps(value, ["name", "structure", "parse", "generate", "walkContext"])
|
||
};
|
||
break;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/create.js
|
||
function createSyntax(config) {
|
||
const parse45 = createParser(config);
|
||
const walk3 = createWalker(config);
|
||
const generate45 = createGenerator(config);
|
||
const { fromPlainObject: fromPlainObject2, toPlainObject: toPlainObject2 } = createConvertor(walk3);
|
||
const syntax = {
|
||
lexer: null,
|
||
createLexer: (config2) => new Lexer(config2, syntax, syntax.lexer.structure),
|
||
tokenize,
|
||
parse: parse45,
|
||
generate: generate45,
|
||
walk: walk3,
|
||
find: walk3.find,
|
||
findLast: walk3.findLast,
|
||
findAll: walk3.findAll,
|
||
fromPlainObject: fromPlainObject2,
|
||
toPlainObject: toPlainObject2,
|
||
fork(extension2) {
|
||
const base = mix({}, config);
|
||
return createSyntax(
|
||
typeof extension2 === "function" ? extension2(base, Object.assign) : mix(base, extension2)
|
||
);
|
||
}
|
||
};
|
||
syntax.lexer = new Lexer({
|
||
generic: true,
|
||
units: config.units,
|
||
types: config.types,
|
||
atrules: config.atrules,
|
||
properties: config.properties,
|
||
node: config.node
|
||
}, syntax);
|
||
return syntax;
|
||
}
|
||
var create_default = (config) => createSyntax(mix({}, config));
|
||
|
||
// node_modules/css-tree/dist/data.js
|
||
var data_default = {
|
||
"generic": true,
|
||
"units": {
|
||
"angle": [
|
||
"deg",
|
||
"grad",
|
||
"rad",
|
||
"turn"
|
||
],
|
||
"decibel": [
|
||
"db"
|
||
],
|
||
"flex": [
|
||
"fr"
|
||
],
|
||
"frequency": [
|
||
"hz",
|
||
"khz"
|
||
],
|
||
"length": [
|
||
"cm",
|
||
"mm",
|
||
"q",
|
||
"in",
|
||
"pt",
|
||
"pc",
|
||
"px",
|
||
"em",
|
||
"rem",
|
||
"ex",
|
||
"rex",
|
||
"cap",
|
||
"rcap",
|
||
"ch",
|
||
"rch",
|
||
"ic",
|
||
"ric",
|
||
"lh",
|
||
"rlh",
|
||
"vw",
|
||
"svw",
|
||
"lvw",
|
||
"dvw",
|
||
"vh",
|
||
"svh",
|
||
"lvh",
|
||
"dvh",
|
||
"vi",
|
||
"svi",
|
||
"lvi",
|
||
"dvi",
|
||
"vb",
|
||
"svb",
|
||
"lvb",
|
||
"dvb",
|
||
"vmin",
|
||
"svmin",
|
||
"lvmin",
|
||
"dvmin",
|
||
"vmax",
|
||
"svmax",
|
||
"lvmax",
|
||
"dvmax",
|
||
"cqw",
|
||
"cqh",
|
||
"cqi",
|
||
"cqb",
|
||
"cqmin",
|
||
"cqmax"
|
||
],
|
||
"resolution": [
|
||
"dpi",
|
||
"dpcm",
|
||
"dppx",
|
||
"x"
|
||
],
|
||
"semitones": [
|
||
"st"
|
||
],
|
||
"time": [
|
||
"s",
|
||
"ms"
|
||
]
|
||
},
|
||
"types": {
|
||
"abs()": "abs( <calc-sum> )",
|
||
"absolute-size": "xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large",
|
||
"acos()": "acos( <calc-sum> )",
|
||
"alpha-value": "<number>|<percentage>",
|
||
"angle-percentage": "<angle>|<percentage>",
|
||
"angular-color-hint": "<angle-percentage>",
|
||
"angular-color-stop": "<color>&&<color-stop-angle>?",
|
||
"angular-color-stop-list": "[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>",
|
||
"animateable-feature": "scroll-position|contents|<custom-ident>",
|
||
"asin()": "asin( <calc-sum> )",
|
||
"atan()": "atan( <calc-sum> )",
|
||
"atan2()": "atan2( <calc-sum> , <calc-sum> )",
|
||
"attachment": "scroll|fixed|local",
|
||
"attr()": "attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )",
|
||
"attr-matcher": "['~'|'|'|'^'|'$'|'*']? '='",
|
||
"attr-modifier": "i|s",
|
||
"attribute-selector": "'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'",
|
||
"auto-repeat": "repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )",
|
||
"auto-track-list": "[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",
|
||
"axis": "block|inline|vertical|horizontal",
|
||
"baseline-position": "[first|last]? baseline",
|
||
"basic-shape": "<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>",
|
||
"bg-image": "none|<image>",
|
||
"bg-layer": "<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>",
|
||
"bg-position": "[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]",
|
||
"bg-size": "[<length-percentage>|auto]{1,2}|cover|contain",
|
||
"blur()": "blur( <length> )",
|
||
"blend-mode": "normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",
|
||
"box": "border-box|padding-box|content-box",
|
||
"brightness()": "brightness( <number-percentage> )",
|
||
"calc()": "calc( <calc-sum> )",
|
||
"calc-sum": "<calc-product> [['+'|'-'] <calc-product>]*",
|
||
"calc-product": "<calc-value> ['*' <calc-value>|'/' <number>]*",
|
||
"calc-value": "<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )",
|
||
"calc-constant": "e|pi|infinity|-infinity|NaN",
|
||
"cf-final-image": "<image>|<color>",
|
||
"cf-mixing-image": "<percentage>?&&<image>",
|
||
"circle()": "circle( [<shape-radius>]? [at <position>]? )",
|
||
"clamp()": "clamp( <calc-sum>#{3} )",
|
||
"class-selector": "'.' <ident-token>",
|
||
"clip-source": "<url>",
|
||
"color": "<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>",
|
||
"color-stop": "<color-stop-length>|<color-stop-angle>",
|
||
"color-stop-angle": "<angle-percentage>{1,2}",
|
||
"color-stop-length": "<length-percentage>{1,2}",
|
||
"color-stop-list": "[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",
|
||
"combinator": "'>'|'+'|'~'|['||']",
|
||
"common-lig-values": "[common-ligatures|no-common-ligatures]",
|
||
"compat-auto": "searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button",
|
||
"composite-style": "clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor",
|
||
"compositing-operator": "add|subtract|intersect|exclude",
|
||
"compound-selector": "[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!",
|
||
"compound-selector-list": "<compound-selector>#",
|
||
"complex-selector": "<compound-selector> [<combinator>? <compound-selector>]*",
|
||
"complex-selector-list": "<complex-selector>#",
|
||
"conic-gradient()": "conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )",
|
||
"contextual-alt-values": "[contextual|no-contextual]",
|
||
"content-distribution": "space-between|space-around|space-evenly|stretch",
|
||
"content-list": "[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+",
|
||
"content-position": "center|start|end|flex-start|flex-end",
|
||
"content-replacement": "<image>",
|
||
"contrast()": "contrast( [<number-percentage>] )",
|
||
"cos()": "cos( <calc-sum> )",
|
||
"counter": "<counter()>|<counters()>",
|
||
"counter()": "counter( <counter-name> , <counter-style>? )",
|
||
"counter-name": "<custom-ident>",
|
||
"counter-style": "<counter-style-name>|symbols( )",
|
||
"counter-style-name": "<custom-ident>",
|
||
"counters()": "counters( <counter-name> , <string> , <counter-style>? )",
|
||
"cross-fade()": "cross-fade( <cf-mixing-image> , <cf-final-image>? )",
|
||
"cubic-bezier-timing-function": "ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )",
|
||
"deprecated-system-color": "ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText",
|
||
"discretionary-lig-values": "[discretionary-ligatures|no-discretionary-ligatures]",
|
||
"display-box": "contents|none",
|
||
"display-inside": "flow|flow-root|table|flex|grid|ruby",
|
||
"display-internal": "table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container",
|
||
"display-legacy": "inline-block|inline-list-item|inline-table|inline-flex|inline-grid",
|
||
"display-listitem": "<display-outside>?&&[flow|flow-root]?&&list-item",
|
||
"display-outside": "block|inline|run-in",
|
||
"drop-shadow()": "drop-shadow( <length>{2,3} <color>? )",
|
||
"east-asian-variant-values": "[jis78|jis83|jis90|jis04|simplified|traditional]",
|
||
"east-asian-width-values": "[full-width|proportional-width]",
|
||
"element()": "element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )",
|
||
"ellipse()": "ellipse( [<shape-radius>{2}]? [at <position>]? )",
|
||
"ending-shape": "circle|ellipse",
|
||
"env()": "env( <custom-ident> , <declaration-value>? )",
|
||
"exp()": "exp( <calc-sum> )",
|
||
"explicit-track-list": "[<line-names>? <track-size>]+ <line-names>?",
|
||
"family-name": "<string>|<custom-ident>+",
|
||
"feature-tag-value": "<string> [<integer>|on|off]?",
|
||
"feature-type": "@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation",
|
||
"feature-value-block": "<feature-type> '{' <feature-value-declaration-list> '}'",
|
||
"feature-value-block-list": "<feature-value-block>+",
|
||
"feature-value-declaration": "<custom-ident> : <integer>+ ;",
|
||
"feature-value-declaration-list": "<feature-value-declaration>",
|
||
"feature-value-name": "<custom-ident>",
|
||
"fill-rule": "nonzero|evenodd",
|
||
"filter-function": "<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>",
|
||
"filter-function-list": "[<filter-function>|<url>]+",
|
||
"final-bg-layer": "<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>",
|
||
"fixed-breadth": "<length-percentage>",
|
||
"fixed-repeat": "repeat( [<integer [1,\u221E]>] , [<line-names>? <fixed-size>]+ <line-names>? )",
|
||
"fixed-size": "<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )",
|
||
"font-stretch-absolute": "normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>",
|
||
"font-variant-css21": "[normal|small-caps]",
|
||
"font-weight-absolute": "normal|bold|<number [1,1000]>",
|
||
"frequency-percentage": "<frequency>|<percentage>",
|
||
"general-enclosed": "[<function-token> <any-value> )]|( <ident> <any-value> )",
|
||
"generic-family": "serif|sans-serif|cursive|fantasy|monospace|-apple-system",
|
||
"generic-name": "serif|sans-serif|cursive|fantasy|monospace",
|
||
"geometry-box": "<shape-box>|fill-box|stroke-box|view-box",
|
||
"gradient": "<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>",
|
||
"grayscale()": "grayscale( <number-percentage> )",
|
||
"grid-line": "auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]",
|
||
"historical-lig-values": "[historical-ligatures|no-historical-ligatures]",
|
||
"hsl()": "hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )",
|
||
"hsla()": "hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",
|
||
"hue": "<number>|<angle>",
|
||
"hue-rotate()": "hue-rotate( <angle> )",
|
||
"hwb()": "hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )",
|
||
"hypot()": "hypot( <calc-sum># )",
|
||
"image": "<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>",
|
||
"image()": "image( <image-tags>? [<image-src>? , <color>?]! )",
|
||
"image-set()": "image-set( <image-set-option># )",
|
||
"image-set-option": "[<image>|<string>] [<resolution>||type( <string> )]",
|
||
"image-src": "<url>|<string>",
|
||
"image-tags": "ltr|rtl",
|
||
"inflexible-breadth": "<length-percentage>|min-content|max-content|auto",
|
||
"inset()": "inset( <length-percentage>{1,4} [round <'border-radius'>]? )",
|
||
"invert()": "invert( <number-percentage> )",
|
||
"keyframes-name": "<custom-ident>|<string>",
|
||
"keyframe-block": "<keyframe-selector># { <declaration-list> }",
|
||
"keyframe-block-list": "<keyframe-block>+",
|
||
"keyframe-selector": "from|to|<percentage>",
|
||
"lab()": "lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )",
|
||
"layer()": "layer( <layer-name> )",
|
||
"layer-name": "<ident> ['.' <ident>]*",
|
||
"lch()": "lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )",
|
||
"leader()": "leader( <leader-type> )",
|
||
"leader-type": "dotted|solid|space|<string>",
|
||
"length-percentage": "<length>|<percentage>",
|
||
"line-names": "'[' <custom-ident>* ']'",
|
||
"line-name-list": "[<line-names>|<name-repeat>]+",
|
||
"line-style": "none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset",
|
||
"line-width": "<length>|thin|medium|thick",
|
||
"linear-color-hint": "<length-percentage>",
|
||
"linear-color-stop": "<color> <color-stop-length>?",
|
||
"linear-gradient()": "linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )",
|
||
"log()": "log( <calc-sum> , <calc-sum>? )",
|
||
"mask-layer": "<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>",
|
||
"mask-position": "[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?",
|
||
"mask-reference": "none|<image>|<mask-source>",
|
||
"mask-source": "<url>",
|
||
"masking-mode": "alpha|luminance|match-source",
|
||
"matrix()": "matrix( <number>#{6} )",
|
||
"matrix3d()": "matrix3d( <number>#{16} )",
|
||
"max()": "max( <calc-sum># )",
|
||
"media-and": "<media-in-parens> [and <media-in-parens>]+",
|
||
"media-condition": "<media-not>|<media-and>|<media-or>|<media-in-parens>",
|
||
"media-condition-without-or": "<media-not>|<media-and>|<media-in-parens>",
|
||
"media-feature": "( [<mf-plain>|<mf-boolean>|<mf-range>] )",
|
||
"media-in-parens": "( <media-condition> )|<media-feature>|<general-enclosed>",
|
||
"media-not": "not <media-in-parens>",
|
||
"media-or": "<media-in-parens> [or <media-in-parens>]+",
|
||
"media-query": "<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?",
|
||
"media-query-list": "<media-query>#",
|
||
"media-type": "<ident>",
|
||
"mf-boolean": "<mf-name>",
|
||
"mf-name": "<ident>",
|
||
"mf-plain": "<mf-name> : <mf-value>",
|
||
"mf-range": "<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>",
|
||
"mf-value": "<number>|<dimension>|<ident>|<ratio>",
|
||
"min()": "min( <calc-sum># )",
|
||
"minmax()": "minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )",
|
||
"mod()": "mod( <calc-sum> , <calc-sum> )",
|
||
"name-repeat": "repeat( [<integer [1,\u221E]>|auto-fill] , <line-names>+ )",
|
||
"named-color": "transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>",
|
||
"namespace-prefix": "<ident>",
|
||
"ns-prefix": "[<ident-token>|'*']? '|'",
|
||
"number-percentage": "<number>|<percentage>",
|
||
"numeric-figure-values": "[lining-nums|oldstyle-nums]",
|
||
"numeric-fraction-values": "[diagonal-fractions|stacked-fractions]",
|
||
"numeric-spacing-values": "[proportional-nums|tabular-nums]",
|
||
"nth": "<an-plus-b>|even|odd",
|
||
"opacity()": "opacity( [<number-percentage>] )",
|
||
"overflow-position": "unsafe|safe",
|
||
"outline-radius": "<length>|<percentage>",
|
||
"page-body": "<declaration>? [; <page-body>]?|<page-margin-box> <page-body>",
|
||
"page-margin-box": "<page-margin-box-type> '{' <declaration-list> '}'",
|
||
"page-margin-box-type": "@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom",
|
||
"page-selector-list": "[<page-selector>#]?",
|
||
"page-selector": "<pseudo-page>+|<ident> <pseudo-page>*",
|
||
"page-size": "A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger",
|
||
"path()": "path( [<fill-rule> ,]? <string> )",
|
||
"paint()": "paint( <ident> , <declaration-value>? )",
|
||
"perspective()": "perspective( [<length [0,\u221E]>|none] )",
|
||
"polygon()": "polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",
|
||
"position": "[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]",
|
||
"pow()": "pow( <calc-sum> , <calc-sum> )",
|
||
"pseudo-class-selector": "':' <ident-token>|':' <function-token> <any-value> ')'",
|
||
"pseudo-element-selector": "':' <pseudo-class-selector>",
|
||
"pseudo-page": ": [left|right|first|blank]",
|
||
"quote": "open-quote|close-quote|no-open-quote|no-close-quote",
|
||
"radial-gradient()": "radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )",
|
||
"ratio": "<number [0,\u221E]> [/ <number [0,\u221E]>]?",
|
||
"relative-selector": "<combinator>? <complex-selector>",
|
||
"relative-selector-list": "<relative-selector>#",
|
||
"relative-size": "larger|smaller",
|
||
"rem()": "rem( <calc-sum> , <calc-sum> )",
|
||
"repeat-style": "repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}",
|
||
"repeating-conic-gradient()": "repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )",
|
||
"repeating-linear-gradient()": "repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )",
|
||
"repeating-radial-gradient()": "repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )",
|
||
"reversed-counter-name": "reversed( <counter-name> )",
|
||
"rgb()": "rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )",
|
||
"rgba()": "rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )",
|
||
"rotate()": "rotate( [<angle>|<zero>] )",
|
||
"rotate3d()": "rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )",
|
||
"rotateX()": "rotateX( [<angle>|<zero>] )",
|
||
"rotateY()": "rotateY( [<angle>|<zero>] )",
|
||
"rotateZ()": "rotateZ( [<angle>|<zero>] )",
|
||
"round()": "round( <rounding-strategy>? , <calc-sum> , <calc-sum> )",
|
||
"rounding-strategy": "nearest|up|down|to-zero",
|
||
"saturate()": "saturate( <number-percentage> )",
|
||
"scale()": "scale( [<number>|<percentage>]#{1,2} )",
|
||
"scale3d()": "scale3d( [<number>|<percentage>]#{3} )",
|
||
"scaleX()": "scaleX( [<number>|<percentage>] )",
|
||
"scaleY()": "scaleY( [<number>|<percentage>] )",
|
||
"scaleZ()": "scaleZ( [<number>|<percentage>] )",
|
||
"scroller": "root|nearest",
|
||
"self-position": "center|start|end|self-start|self-end|flex-start|flex-end",
|
||
"shape-radius": "<length-percentage>|closest-side|farthest-side",
|
||
"sign()": "sign( <calc-sum> )",
|
||
"skew()": "skew( [<angle>|<zero>] , [<angle>|<zero>]? )",
|
||
"skewX()": "skewX( [<angle>|<zero>] )",
|
||
"skewY()": "skewY( [<angle>|<zero>] )",
|
||
"sepia()": "sepia( <number-percentage> )",
|
||
"shadow": "inset?&&<length>{2,4}&&<color>?",
|
||
"shadow-t": "[<length>{2,3}&&<color>?]",
|
||
"shape": "rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )",
|
||
"shape-box": "<box>|margin-box",
|
||
"side-or-corner": "[left|right]||[top|bottom]",
|
||
"sin()": "sin( <calc-sum> )",
|
||
"single-animation": "<time>||<easing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]",
|
||
"single-animation-direction": "normal|reverse|alternate|alternate-reverse",
|
||
"single-animation-fill-mode": "none|forwards|backwards|both",
|
||
"single-animation-iteration-count": "infinite|<number>",
|
||
"single-animation-play-state": "running|paused",
|
||
"single-animation-timeline": "auto|none|<timeline-name>|scroll( <axis>? <scroller>? )",
|
||
"single-transition": "[none|<single-transition-property>]||<time>||<easing-function>||<time>",
|
||
"single-transition-property": "all|<custom-ident>",
|
||
"size": "closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}",
|
||
"sqrt()": "sqrt( <calc-sum> )",
|
||
"step-position": "jump-start|jump-end|jump-none|jump-both|start|end",
|
||
"step-timing-function": "step-start|step-end|steps( <integer> [, <step-position>]? )",
|
||
"subclass-selector": "<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>",
|
||
"supports-condition": "not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*",
|
||
"supports-in-parens": "( <supports-condition> )|<supports-feature>|<general-enclosed>",
|
||
"supports-feature": "<supports-decl>|<supports-selector-fn>",
|
||
"supports-decl": "( <declaration> )",
|
||
"supports-selector-fn": "selector( <complex-selector> )",
|
||
"symbol": "<string>|<image>|<custom-ident>",
|
||
"tan()": "tan( <calc-sum> )",
|
||
"target": "<target-counter()>|<target-counters()>|<target-text()>",
|
||
"target-counter()": "target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )",
|
||
"target-counters()": "target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )",
|
||
"target-text()": "target-text( [<string>|<url>] , [content|before|after|first-letter]? )",
|
||
"time-percentage": "<time>|<percentage>",
|
||
"timeline-name": "<custom-ident>|<string>",
|
||
"easing-function": "linear|<cubic-bezier-timing-function>|<step-timing-function>",
|
||
"track-breadth": "<length-percentage>|<flex>|min-content|max-content|auto",
|
||
"track-list": "[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?",
|
||
"track-repeat": "repeat( [<integer [1,\u221E]>] , [<line-names>? <track-size>]+ <line-names>? )",
|
||
"track-size": "<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )",
|
||
"transform-function": "<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>",
|
||
"transform-list": "<transform-function>+",
|
||
"translate()": "translate( <length-percentage> , <length-percentage>? )",
|
||
"translate3d()": "translate3d( <length-percentage> , <length-percentage> , <length> )",
|
||
"translateX()": "translateX( <length-percentage> )",
|
||
"translateY()": "translateY( <length-percentage> )",
|
||
"translateZ()": "translateZ( <length> )",
|
||
"type-or-unit": "string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%",
|
||
"type-selector": "<wq-name>|<ns-prefix>? '*'",
|
||
"var()": "var( <custom-property-name> , <declaration-value>? )",
|
||
"viewport-length": "auto|<length-percentage>",
|
||
"visual-box": "content-box|padding-box|border-box",
|
||
"wq-name": "<ns-prefix>? <ident-token>",
|
||
"-legacy-gradient": "<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>",
|
||
"-legacy-linear-gradient": "-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )",
|
||
"-legacy-repeating-linear-gradient": "-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )",
|
||
"-legacy-linear-gradient-arguments": "[<angle>|<side-or-corner>]? , <color-stop-list>",
|
||
"-legacy-radial-gradient": "-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )",
|
||
"-legacy-repeating-radial-gradient": "-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )",
|
||
"-legacy-radial-gradient-arguments": "[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>",
|
||
"-legacy-radial-gradient-size": "closest-side|closest-corner|farthest-side|farthest-corner|contain|cover",
|
||
"-legacy-radial-gradient-shape": "circle|ellipse",
|
||
"-non-standard-font": "-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body",
|
||
"-non-standard-color": "-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text",
|
||
"-non-standard-image-rendering": "optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast",
|
||
"-non-standard-overflow": "-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable",
|
||
"-non-standard-width": "fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content",
|
||
"-webkit-gradient()": "-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )",
|
||
"-webkit-gradient-color-stop": "from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )",
|
||
"-webkit-gradient-point": "[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]",
|
||
"-webkit-gradient-radius": "<length>|<percentage>",
|
||
"-webkit-gradient-type": "linear|radial",
|
||
"-webkit-mask-box-repeat": "repeat|stretch|round",
|
||
"-webkit-mask-clip-style": "border|border-box|padding|padding-box|content|content-box|text",
|
||
"-ms-filter-function-list": "<-ms-filter-function>+",
|
||
"-ms-filter-function": "<-ms-filter-function-progid>|<-ms-filter-function-legacy>",
|
||
"-ms-filter-function-progid": "'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]",
|
||
"-ms-filter-function-legacy": "<ident-token>|<function-token> <any-value>? )",
|
||
"-ms-filter": "<string>",
|
||
"age": "child|young|old",
|
||
"attr-name": "<wq-name>",
|
||
"attr-fallback": "<any-value>",
|
||
"bg-clip": "<box>|border|text",
|
||
"bottom": "<length>|auto",
|
||
"generic-voice": "[<age>? <gender> <integer>?]",
|
||
"gender": "male|female|neutral",
|
||
"left": "<length>|auto",
|
||
"mask-image": "<mask-reference>#",
|
||
"paint": "none|<color>|<url> [none|<color>]?|context-fill|context-stroke",
|
||
"right": "<length>|auto",
|
||
"scroll-timeline-axis": "block|inline|vertical|horizontal",
|
||
"scroll-timeline-name": "none|<custom-ident>",
|
||
"single-animation-composition": "replace|add|accumulate",
|
||
"svg-length": "<percentage>|<length>|<number>",
|
||
"svg-writing-mode": "lr-tb|rl-tb|tb-rl|lr|rl|tb",
|
||
"top": "<length>|auto",
|
||
"x": "<number>",
|
||
"y": "<number>",
|
||
"declaration": "<ident-token> : <declaration-value>? ['!' important]?",
|
||
"declaration-list": "[<declaration>? ';']* <declaration>?",
|
||
"url": "url( <string> <url-modifier>* )|<url-token>",
|
||
"url-modifier": "<ident>|<function-token> <any-value> )",
|
||
"number-zero-one": "<number [0,1]>",
|
||
"number-one-or-greater": "<number [1,\u221E]>",
|
||
"-non-standard-display": "-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"
|
||
},
|
||
"properties": {
|
||
"--*": "<declaration-value>",
|
||
"-ms-accelerator": "false|true",
|
||
"-ms-block-progression": "tb|rl|bt|lr",
|
||
"-ms-content-zoom-chaining": "none|chained",
|
||
"-ms-content-zooming": "none|zoom",
|
||
"-ms-content-zoom-limit": "<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>",
|
||
"-ms-content-zoom-limit-max": "<percentage>",
|
||
"-ms-content-zoom-limit-min": "<percentage>",
|
||
"-ms-content-zoom-snap": "<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>",
|
||
"-ms-content-zoom-snap-points": "snapInterval( <percentage> , <percentage> )|snapList( <percentage># )",
|
||
"-ms-content-zoom-snap-type": "none|proximity|mandatory",
|
||
"-ms-filter": "<string>",
|
||
"-ms-flow-from": "[none|<custom-ident>]#",
|
||
"-ms-flow-into": "[none|<custom-ident>]#",
|
||
"-ms-grid-columns": "none|<track-list>|<auto-track-list>",
|
||
"-ms-grid-rows": "none|<track-list>|<auto-track-list>",
|
||
"-ms-high-contrast-adjust": "auto|none",
|
||
"-ms-hyphenate-limit-chars": "auto|<integer>{1,3}",
|
||
"-ms-hyphenate-limit-lines": "no-limit|<integer>",
|
||
"-ms-hyphenate-limit-zone": "<percentage>|<length>",
|
||
"-ms-ime-align": "auto|after",
|
||
"-ms-overflow-style": "auto|none|scrollbar|-ms-autohiding-scrollbar",
|
||
"-ms-scrollbar-3dlight-color": "<color>",
|
||
"-ms-scrollbar-arrow-color": "<color>",
|
||
"-ms-scrollbar-base-color": "<color>",
|
||
"-ms-scrollbar-darkshadow-color": "<color>",
|
||
"-ms-scrollbar-face-color": "<color>",
|
||
"-ms-scrollbar-highlight-color": "<color>",
|
||
"-ms-scrollbar-shadow-color": "<color>",
|
||
"-ms-scrollbar-track-color": "<color>",
|
||
"-ms-scroll-chaining": "chained|none",
|
||
"-ms-scroll-limit": "<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>",
|
||
"-ms-scroll-limit-x-max": "auto|<length>",
|
||
"-ms-scroll-limit-x-min": "<length>",
|
||
"-ms-scroll-limit-y-max": "auto|<length>",
|
||
"-ms-scroll-limit-y-min": "<length>",
|
||
"-ms-scroll-rails": "none|railed",
|
||
"-ms-scroll-snap-points-x": "snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )",
|
||
"-ms-scroll-snap-points-y": "snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )",
|
||
"-ms-scroll-snap-type": "none|proximity|mandatory",
|
||
"-ms-scroll-snap-x": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>",
|
||
"-ms-scroll-snap-y": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>",
|
||
"-ms-scroll-translation": "none|vertical-to-horizontal",
|
||
"-ms-text-autospace": "none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space",
|
||
"-ms-touch-select": "grippers|none",
|
||
"-ms-user-select": "none|element|text",
|
||
"-ms-wrap-flow": "auto|both|start|end|maximum|clear",
|
||
"-ms-wrap-margin": "<length>",
|
||
"-ms-wrap-through": "wrap|none",
|
||
"-moz-appearance": "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",
|
||
"-moz-binding": "<url>|none",
|
||
"-moz-border-bottom-colors": "<color>+|none",
|
||
"-moz-border-left-colors": "<color>+|none",
|
||
"-moz-border-right-colors": "<color>+|none",
|
||
"-moz-border-top-colors": "<color>+|none",
|
||
"-moz-context-properties": "none|[fill|fill-opacity|stroke|stroke-opacity]#",
|
||
"-moz-float-edge": "border-box|content-box|margin-box|padding-box",
|
||
"-moz-force-broken-image-icon": "0|1",
|
||
"-moz-image-region": "<shape>|auto",
|
||
"-moz-orient": "inline|block|horizontal|vertical",
|
||
"-moz-outline-radius": "<outline-radius>{1,4} [/ <outline-radius>{1,4}]?",
|
||
"-moz-outline-radius-bottomleft": "<outline-radius>",
|
||
"-moz-outline-radius-bottomright": "<outline-radius>",
|
||
"-moz-outline-radius-topleft": "<outline-radius>",
|
||
"-moz-outline-radius-topright": "<outline-radius>",
|
||
"-moz-stack-sizing": "ignore|stretch-to-fit",
|
||
"-moz-text-blink": "none|blink",
|
||
"-moz-user-focus": "ignore|normal|select-after|select-before|select-menu|select-same|select-all|none",
|
||
"-moz-user-input": "auto|none|enabled|disabled",
|
||
"-moz-user-modify": "read-only|read-write|write-only",
|
||
"-moz-window-dragging": "drag|no-drag",
|
||
"-moz-window-shadow": "default|menu|tooltip|sheet|none",
|
||
"-webkit-appearance": "none|button|button-bevel|caps-lock-indicator|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|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|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",
|
||
"-webkit-border-before": "<'border-width'>||<'border-style'>||<color>",
|
||
"-webkit-border-before-color": "<color>",
|
||
"-webkit-border-before-style": "<'border-style'>",
|
||
"-webkit-border-before-width": "<'border-width'>",
|
||
"-webkit-box-reflect": "[above|below|right|left]? <length>? <image>?",
|
||
"-webkit-line-clamp": "none|<integer>",
|
||
"-webkit-mask": "[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#",
|
||
"-webkit-mask-attachment": "<attachment>#",
|
||
"-webkit-mask-clip": "[<box>|border|padding|content|text]#",
|
||
"-webkit-mask-composite": "<composite-style>#",
|
||
"-webkit-mask-image": "<mask-reference>#",
|
||
"-webkit-mask-origin": "[<box>|border|padding|content]#",
|
||
"-webkit-mask-position": "<position>#",
|
||
"-webkit-mask-position-x": "[<length-percentage>|left|center|right]#",
|
||
"-webkit-mask-position-y": "[<length-percentage>|top|center|bottom]#",
|
||
"-webkit-mask-repeat": "<repeat-style>#",
|
||
"-webkit-mask-repeat-x": "repeat|no-repeat|space|round",
|
||
"-webkit-mask-repeat-y": "repeat|no-repeat|space|round",
|
||
"-webkit-mask-size": "<bg-size>#",
|
||
"-webkit-overflow-scrolling": "auto|touch",
|
||
"-webkit-tap-highlight-color": "<color>",
|
||
"-webkit-text-fill-color": "<color>",
|
||
"-webkit-text-stroke": "<length>||<color>",
|
||
"-webkit-text-stroke-color": "<color>",
|
||
"-webkit-text-stroke-width": "<length>",
|
||
"-webkit-touch-callout": "default|none",
|
||
"-webkit-user-modify": "read-only|read-write|read-write-plaintext-only",
|
||
"accent-color": "auto|<color>",
|
||
"align-content": "normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>",
|
||
"align-items": "normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]",
|
||
"align-self": "auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>",
|
||
"align-tracks": "[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",
|
||
"all": "initial|inherit|unset|revert|revert-layer",
|
||
"animation": "<single-animation>#",
|
||
"animation-composition": "<single-animation-composition>#",
|
||
"animation-delay": "<time>#",
|
||
"animation-direction": "<single-animation-direction>#",
|
||
"animation-duration": "<time>#",
|
||
"animation-fill-mode": "<single-animation-fill-mode>#",
|
||
"animation-iteration-count": "<single-animation-iteration-count>#",
|
||
"animation-name": "[none|<keyframes-name>]#",
|
||
"animation-play-state": "<single-animation-play-state>#",
|
||
"animation-timing-function": "<easing-function>#",
|
||
"animation-timeline": "<single-animation-timeline>#",
|
||
"appearance": "none|auto|textfield|menulist-button|<compat-auto>",
|
||
"aspect-ratio": "auto|<ratio>",
|
||
"azimuth": "<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards",
|
||
"backdrop-filter": "none|<filter-function-list>",
|
||
"backface-visibility": "visible|hidden",
|
||
"background": "[<bg-layer> ,]* <final-bg-layer>",
|
||
"background-attachment": "<attachment>#",
|
||
"background-blend-mode": "<blend-mode>#",
|
||
"background-clip": "<bg-clip>#",
|
||
"background-color": "<color>",
|
||
"background-image": "<bg-image>#",
|
||
"background-origin": "<box>#",
|
||
"background-position": "<bg-position>#",
|
||
"background-position-x": "[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#",
|
||
"background-position-y": "[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#",
|
||
"background-repeat": "<repeat-style>#",
|
||
"background-size": "<bg-size>#",
|
||
"block-overflow": "clip|ellipsis|<string>",
|
||
"block-size": "<'width'>",
|
||
"border": "<line-width>||<line-style>||<color>",
|
||
"border-block": "<'border-top-width'>||<'border-top-style'>||<color>",
|
||
"border-block-color": "<'border-top-color'>{1,2}",
|
||
"border-block-style": "<'border-top-style'>",
|
||
"border-block-width": "<'border-top-width'>",
|
||
"border-block-end": "<'border-top-width'>||<'border-top-style'>||<color>",
|
||
"border-block-end-color": "<'border-top-color'>",
|
||
"border-block-end-style": "<'border-top-style'>",
|
||
"border-block-end-width": "<'border-top-width'>",
|
||
"border-block-start": "<'border-top-width'>||<'border-top-style'>||<color>",
|
||
"border-block-start-color": "<'border-top-color'>",
|
||
"border-block-start-style": "<'border-top-style'>",
|
||
"border-block-start-width": "<'border-top-width'>",
|
||
"border-bottom": "<line-width>||<line-style>||<color>",
|
||
"border-bottom-color": "<'border-top-color'>",
|
||
"border-bottom-left-radius": "<length-percentage>{1,2}",
|
||
"border-bottom-right-radius": "<length-percentage>{1,2}",
|
||
"border-bottom-style": "<line-style>",
|
||
"border-bottom-width": "<line-width>",
|
||
"border-collapse": "collapse|separate",
|
||
"border-color": "<color>{1,4}",
|
||
"border-end-end-radius": "<length-percentage>{1,2}",
|
||
"border-end-start-radius": "<length-percentage>{1,2}",
|
||
"border-image": "<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>",
|
||
"border-image-outset": "[<length>|<number>]{1,4}",
|
||
"border-image-repeat": "[stretch|repeat|round|space]{1,2}",
|
||
"border-image-slice": "<number-percentage>{1,4}&&fill?",
|
||
"border-image-source": "none|<image>",
|
||
"border-image-width": "[<length-percentage>|<number>|auto]{1,4}",
|
||
"border-inline": "<'border-top-width'>||<'border-top-style'>||<color>",
|
||
"border-inline-end": "<'border-top-width'>||<'border-top-style'>||<color>",
|
||
"border-inline-color": "<'border-top-color'>{1,2}",
|
||
"border-inline-style": "<'border-top-style'>",
|
||
"border-inline-width": "<'border-top-width'>",
|
||
"border-inline-end-color": "<'border-top-color'>",
|
||
"border-inline-end-style": "<'border-top-style'>",
|
||
"border-inline-end-width": "<'border-top-width'>",
|
||
"border-inline-start": "<'border-top-width'>||<'border-top-style'>||<color>",
|
||
"border-inline-start-color": "<'border-top-color'>",
|
||
"border-inline-start-style": "<'border-top-style'>",
|
||
"border-inline-start-width": "<'border-top-width'>",
|
||
"border-left": "<line-width>||<line-style>||<color>",
|
||
"border-left-color": "<color>",
|
||
"border-left-style": "<line-style>",
|
||
"border-left-width": "<line-width>",
|
||
"border-radius": "<length-percentage>{1,4} [/ <length-percentage>{1,4}]?",
|
||
"border-right": "<line-width>||<line-style>||<color>",
|
||
"border-right-color": "<color>",
|
||
"border-right-style": "<line-style>",
|
||
"border-right-width": "<line-width>",
|
||
"border-spacing": "<length> <length>?",
|
||
"border-start-end-radius": "<length-percentage>{1,2}",
|
||
"border-start-start-radius": "<length-percentage>{1,2}",
|
||
"border-style": "<line-style>{1,4}",
|
||
"border-top": "<line-width>||<line-style>||<color>",
|
||
"border-top-color": "<color>",
|
||
"border-top-left-radius": "<length-percentage>{1,2}",
|
||
"border-top-right-radius": "<length-percentage>{1,2}",
|
||
"border-top-style": "<line-style>",
|
||
"border-top-width": "<line-width>",
|
||
"border-width": "<line-width>{1,4}",
|
||
"bottom": "<length>|<percentage>|auto",
|
||
"box-align": "start|center|end|baseline|stretch",
|
||
"box-decoration-break": "slice|clone",
|
||
"box-direction": "normal|reverse|inherit",
|
||
"box-flex": "<number>",
|
||
"box-flex-group": "<integer>",
|
||
"box-lines": "single|multiple",
|
||
"box-ordinal-group": "<integer>",
|
||
"box-orient": "horizontal|vertical|inline-axis|block-axis|inherit",
|
||
"box-pack": "start|center|end|justify",
|
||
"box-shadow": "none|<shadow>#",
|
||
"box-sizing": "content-box|border-box",
|
||
"break-after": "auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region",
|
||
"break-before": "auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region",
|
||
"break-inside": "auto|avoid|avoid-page|avoid-column|avoid-region",
|
||
"caption-side": "top|bottom|block-start|block-end|inline-start|inline-end",
|
||
"caret": "<'caret-color'>||<'caret-shape'>",
|
||
"caret-color": "auto|<color>",
|
||
"caret-shape": "auto|bar|block|underscore",
|
||
"clear": "none|left|right|both|inline-start|inline-end",
|
||
"clip": "<shape>|auto",
|
||
"clip-path": "<clip-source>|[<basic-shape>||<geometry-box>]|none",
|
||
"color": "<color>",
|
||
"print-color-adjust": "economy|exact",
|
||
"color-scheme": "normal|[light|dark|<custom-ident>]+&&only?",
|
||
"column-count": "<integer>|auto",
|
||
"column-fill": "auto|balance|balance-all",
|
||
"column-gap": "normal|<length-percentage>",
|
||
"column-rule": "<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>",
|
||
"column-rule-color": "<color>",
|
||
"column-rule-style": "<'border-style'>",
|
||
"column-rule-width": "<'border-width'>",
|
||
"column-span": "none|all",
|
||
"column-width": "<length>|auto",
|
||
"columns": "<'column-width'>||<'column-count'>",
|
||
"contain": "none|strict|content|[[size||inline-size]||layout||style||paint]",
|
||
"contain-intrinsic-size": "[none|<length>|auto <length>]{1,2}",
|
||
"contain-intrinsic-block-size": "none|<length>|auto <length>",
|
||
"contain-intrinsic-height": "none|<length>|auto <length>",
|
||
"contain-intrinsic-inline-size": "none|<length>|auto <length>",
|
||
"contain-intrinsic-width": "none|<length>|auto <length>",
|
||
"content": "normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?",
|
||
"content-visibility": "visible|auto|hidden",
|
||
"counter-increment": "[<counter-name> <integer>?]+|none",
|
||
"counter-reset": "[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none",
|
||
"counter-set": "[<counter-name> <integer>?]+|none",
|
||
"cursor": "[[<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|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",
|
||
"direction": "ltr|rtl",
|
||
"display": "[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>",
|
||
"empty-cells": "show|hide",
|
||
"filter": "none|<filter-function-list>|<-ms-filter-function-list>",
|
||
"flex": "none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]",
|
||
"flex-basis": "content|<'width'>",
|
||
"flex-direction": "row|row-reverse|column|column-reverse",
|
||
"flex-flow": "<'flex-direction'>||<'flex-wrap'>",
|
||
"flex-grow": "<number>",
|
||
"flex-shrink": "<number>",
|
||
"flex-wrap": "nowrap|wrap|wrap-reverse",
|
||
"float": "left|right|none|inline-start|inline-end",
|
||
"font": "[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar",
|
||
"font-family": "[<family-name>|<generic-family>]#",
|
||
"font-feature-settings": "normal|<feature-tag-value>#",
|
||
"font-kerning": "auto|normal|none",
|
||
"font-language-override": "normal|<string>",
|
||
"font-optical-sizing": "auto|none",
|
||
"font-variation-settings": "normal|[<string> <number>]#",
|
||
"font-size": "<absolute-size>|<relative-size>|<length-percentage>",
|
||
"font-size-adjust": "none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]",
|
||
"font-smooth": "auto|never|always|<absolute-size>|<length>",
|
||
"font-stretch": "<font-stretch-absolute>",
|
||
"font-style": "normal|italic|oblique <angle>?",
|
||
"font-synthesis": "none|[weight||style||small-caps]",
|
||
"font-variant": "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]",
|
||
"font-variant-alternates": "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> )]",
|
||
"font-variant-caps": "normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps",
|
||
"font-variant-east-asian": "normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]",
|
||
"font-variant-ligatures": "normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]",
|
||
"font-variant-numeric": "normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]",
|
||
"font-variant-position": "normal|sub|super",
|
||
"font-weight": "<font-weight-absolute>|bolder|lighter",
|
||
"forced-color-adjust": "auto|none",
|
||
"gap": "<'row-gap'> <'column-gap'>?",
|
||
"grid": "<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>",
|
||
"grid-area": "<grid-line> [/ <grid-line>]{0,3}",
|
||
"grid-auto-columns": "<track-size>+",
|
||
"grid-auto-flow": "[row|column]||dense",
|
||
"grid-auto-rows": "<track-size>+",
|
||
"grid-column": "<grid-line> [/ <grid-line>]?",
|
||
"grid-column-end": "<grid-line>",
|
||
"grid-column-gap": "<length-percentage>",
|
||
"grid-column-start": "<grid-line>",
|
||
"grid-gap": "<'grid-row-gap'> <'grid-column-gap'>?",
|
||
"grid-row": "<grid-line> [/ <grid-line>]?",
|
||
"grid-row-end": "<grid-line>",
|
||
"grid-row-gap": "<length-percentage>",
|
||
"grid-row-start": "<grid-line>",
|
||
"grid-template": "none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?",
|
||
"grid-template-areas": "none|<string>+",
|
||
"grid-template-columns": "none|<track-list>|<auto-track-list>|subgrid <line-name-list>?",
|
||
"grid-template-rows": "none|<track-list>|<auto-track-list>|subgrid <line-name-list>?",
|
||
"hanging-punctuation": "none|[first||[force-end|allow-end]||last]",
|
||
"height": "auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )",
|
||
"hyphenate-character": "auto|<string>",
|
||
"hyphens": "none|manual|auto",
|
||
"image-orientation": "from-image|<angle>|[<angle>? flip]",
|
||
"image-rendering": "auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>",
|
||
"image-resolution": "[from-image||<resolution>]&&snap?",
|
||
"ime-mode": "auto|normal|active|inactive|disabled",
|
||
"initial-letter": "normal|[<number> <integer>?]",
|
||
"initial-letter-align": "[auto|alphabetic|hanging|ideographic]",
|
||
"inline-size": "<'width'>",
|
||
"input-security": "auto|none",
|
||
"inset": "<'top'>{1,4}",
|
||
"inset-block": "<'top'>{1,2}",
|
||
"inset-block-end": "<'top'>",
|
||
"inset-block-start": "<'top'>",
|
||
"inset-inline": "<'top'>{1,2}",
|
||
"inset-inline-end": "<'top'>",
|
||
"inset-inline-start": "<'top'>",
|
||
"isolation": "auto|isolate",
|
||
"justify-content": "normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]",
|
||
"justify-items": "normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]",
|
||
"justify-self": "auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]",
|
||
"justify-tracks": "[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",
|
||
"left": "<length>|<percentage>|auto",
|
||
"letter-spacing": "normal|<length-percentage>",
|
||
"line-break": "auto|loose|normal|strict|anywhere",
|
||
"line-clamp": "none|<integer>",
|
||
"line-height": "normal|<number>|<length>|<percentage>",
|
||
"line-height-step": "<length>",
|
||
"list-style": "<'list-style-type'>||<'list-style-position'>||<'list-style-image'>",
|
||
"list-style-image": "<image>|none",
|
||
"list-style-position": "inside|outside",
|
||
"list-style-type": "<counter-style>|<string>|none",
|
||
"margin": "[<length>|<percentage>|auto]{1,4}",
|
||
"margin-block": "<'margin-left'>{1,2}",
|
||
"margin-block-end": "<'margin-left'>",
|
||
"margin-block-start": "<'margin-left'>",
|
||
"margin-bottom": "<length>|<percentage>|auto",
|
||
"margin-inline": "<'margin-left'>{1,2}",
|
||
"margin-inline-end": "<'margin-left'>",
|
||
"margin-inline-start": "<'margin-left'>",
|
||
"margin-left": "<length>|<percentage>|auto",
|
||
"margin-right": "<length>|<percentage>|auto",
|
||
"margin-top": "<length>|<percentage>|auto",
|
||
"margin-trim": "none|in-flow|all",
|
||
"mask": "<mask-layer>#",
|
||
"mask-border": "<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>",
|
||
"mask-border-mode": "luminance|alpha",
|
||
"mask-border-outset": "[<length>|<number>]{1,4}",
|
||
"mask-border-repeat": "[stretch|repeat|round|space]{1,2}",
|
||
"mask-border-slice": "<number-percentage>{1,4} fill?",
|
||
"mask-border-source": "none|<image>",
|
||
"mask-border-width": "[<length-percentage>|<number>|auto]{1,4}",
|
||
"mask-clip": "[<geometry-box>|no-clip]#",
|
||
"mask-composite": "<compositing-operator>#",
|
||
"mask-image": "<mask-reference>#",
|
||
"mask-mode": "<masking-mode>#",
|
||
"mask-origin": "<geometry-box>#",
|
||
"mask-position": "<position>#",
|
||
"mask-repeat": "<repeat-style>#",
|
||
"mask-size": "<bg-size>#",
|
||
"mask-type": "luminance|alpha",
|
||
"masonry-auto-flow": "[pack|next]||[definite-first|ordered]",
|
||
"math-depth": "auto-add|add( <integer> )|<integer>",
|
||
"math-shift": "normal|compact",
|
||
"math-style": "normal|compact",
|
||
"max-block-size": "<'max-width'>",
|
||
"max-height": "none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )",
|
||
"max-inline-size": "<'max-width'>",
|
||
"max-lines": "none|<integer>",
|
||
"max-width": "none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>",
|
||
"min-block-size": "<'min-width'>",
|
||
"min-height": "auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )",
|
||
"min-inline-size": "<'min-width'>",
|
||
"min-width": "auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>",
|
||
"mix-blend-mode": "<blend-mode>|plus-lighter",
|
||
"object-fit": "fill|contain|cover|none|scale-down",
|
||
"object-position": "<position>",
|
||
"offset": "[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?",
|
||
"offset-anchor": "auto|<position>",
|
||
"offset-distance": "<length-percentage>",
|
||
"offset-path": "none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]",
|
||
"offset-position": "auto|<position>",
|
||
"offset-rotate": "[auto|reverse]||<angle>",
|
||
"opacity": "<alpha-value>",
|
||
"order": "<integer>",
|
||
"orphans": "<integer>",
|
||
"outline": "[<'outline-color'>||<'outline-style'>||<'outline-width'>]",
|
||
"outline-color": "<color>|invert",
|
||
"outline-offset": "<length>",
|
||
"outline-style": "auto|<'border-style'>",
|
||
"outline-width": "<line-width>",
|
||
"overflow": "[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>",
|
||
"overflow-anchor": "auto|none",
|
||
"overflow-block": "visible|hidden|clip|scroll|auto",
|
||
"overflow-clip-box": "padding-box|content-box",
|
||
"overflow-clip-margin": "<visual-box>||<length [0,\u221E]>",
|
||
"overflow-inline": "visible|hidden|clip|scroll|auto",
|
||
"overflow-wrap": "normal|break-word|anywhere",
|
||
"overflow-x": "visible|hidden|clip|scroll|auto",
|
||
"overflow-y": "visible|hidden|clip|scroll|auto",
|
||
"overscroll-behavior": "[contain|none|auto]{1,2}",
|
||
"overscroll-behavior-block": "contain|none|auto",
|
||
"overscroll-behavior-inline": "contain|none|auto",
|
||
"overscroll-behavior-x": "contain|none|auto",
|
||
"overscroll-behavior-y": "contain|none|auto",
|
||
"padding": "[<length>|<percentage>]{1,4}",
|
||
"padding-block": "<'padding-left'>{1,2}",
|
||
"padding-block-end": "<'padding-left'>",
|
||
"padding-block-start": "<'padding-left'>",
|
||
"padding-bottom": "<length>|<percentage>",
|
||
"padding-inline": "<'padding-left'>{1,2}",
|
||
"padding-inline-end": "<'padding-left'>",
|
||
"padding-inline-start": "<'padding-left'>",
|
||
"padding-left": "<length>|<percentage>",
|
||
"padding-right": "<length>|<percentage>",
|
||
"padding-top": "<length>|<percentage>",
|
||
"page-break-after": "auto|always|avoid|left|right|recto|verso",
|
||
"page-break-before": "auto|always|avoid|left|right|recto|verso",
|
||
"page-break-inside": "auto|avoid",
|
||
"paint-order": "normal|[fill||stroke||markers]",
|
||
"perspective": "none|<length>",
|
||
"perspective-origin": "<position>",
|
||
"place-content": "<'align-content'> <'justify-content'>?",
|
||
"place-items": "<'align-items'> <'justify-items'>?",
|
||
"place-self": "<'align-self'> <'justify-self'>?",
|
||
"pointer-events": "auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",
|
||
"position": "static|relative|absolute|sticky|fixed|-webkit-sticky",
|
||
"quotes": "none|auto|[<string> <string>]+",
|
||
"resize": "none|both|horizontal|vertical|block|inline",
|
||
"right": "<length>|<percentage>|auto",
|
||
"rotate": "none|<angle>|[x|y|z|<number>{3}]&&<angle>",
|
||
"row-gap": "normal|<length-percentage>",
|
||
"ruby-align": "start|center|space-between|space-around",
|
||
"ruby-merge": "separate|collapse|auto",
|
||
"ruby-position": "[alternate||[over|under]]|inter-character",
|
||
"scale": "none|<number>{1,3}",
|
||
"scrollbar-color": "auto|<color>{2}",
|
||
"scrollbar-gutter": "auto|stable&&both-edges?",
|
||
"scrollbar-width": "auto|thin|none",
|
||
"scroll-behavior": "auto|smooth",
|
||
"scroll-margin": "<length>{1,4}",
|
||
"scroll-margin-block": "<length>{1,2}",
|
||
"scroll-margin-block-start": "<length>",
|
||
"scroll-margin-block-end": "<length>",
|
||
"scroll-margin-bottom": "<length>",
|
||
"scroll-margin-inline": "<length>{1,2}",
|
||
"scroll-margin-inline-start": "<length>",
|
||
"scroll-margin-inline-end": "<length>",
|
||
"scroll-margin-left": "<length>",
|
||
"scroll-margin-right": "<length>",
|
||
"scroll-margin-top": "<length>",
|
||
"scroll-padding": "[auto|<length-percentage>]{1,4}",
|
||
"scroll-padding-block": "[auto|<length-percentage>]{1,2}",
|
||
"scroll-padding-block-start": "auto|<length-percentage>",
|
||
"scroll-padding-block-end": "auto|<length-percentage>",
|
||
"scroll-padding-bottom": "auto|<length-percentage>",
|
||
"scroll-padding-inline": "[auto|<length-percentage>]{1,2}",
|
||
"scroll-padding-inline-start": "auto|<length-percentage>",
|
||
"scroll-padding-inline-end": "auto|<length-percentage>",
|
||
"scroll-padding-left": "auto|<length-percentage>",
|
||
"scroll-padding-right": "auto|<length-percentage>",
|
||
"scroll-padding-top": "auto|<length-percentage>",
|
||
"scroll-snap-align": "[none|start|end|center]{1,2}",
|
||
"scroll-snap-coordinate": "none|<position>#",
|
||
"scroll-snap-destination": "<position>",
|
||
"scroll-snap-points-x": "none|repeat( <length-percentage> )",
|
||
"scroll-snap-points-y": "none|repeat( <length-percentage> )",
|
||
"scroll-snap-stop": "normal|always",
|
||
"scroll-snap-type": "none|[x|y|block|inline|both] [mandatory|proximity]?",
|
||
"scroll-snap-type-x": "none|mandatory|proximity",
|
||
"scroll-snap-type-y": "none|mandatory|proximity",
|
||
"scroll-timeline": "<scroll-timeline-name>||<scroll-timeline-axis>",
|
||
"scroll-timeline-axis": "block|inline|vertical|horizontal",
|
||
"scroll-timeline-name": "none|<custom-ident>",
|
||
"shape-image-threshold": "<alpha-value>",
|
||
"shape-margin": "<length-percentage>",
|
||
"shape-outside": "none|[<shape-box>||<basic-shape>]|<image>",
|
||
"tab-size": "<integer>|<length>",
|
||
"table-layout": "auto|fixed",
|
||
"text-align": "start|end|left|right|center|justify|match-parent",
|
||
"text-align-last": "auto|start|end|left|right|center|justify",
|
||
"text-combine-upright": "none|all|[digits <integer>?]",
|
||
"text-decoration": "<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>",
|
||
"text-decoration-color": "<color>",
|
||
"text-decoration-line": "none|[underline||overline||line-through||blink]|spelling-error|grammar-error",
|
||
"text-decoration-skip": "none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]",
|
||
"text-decoration-skip-ink": "auto|all|none",
|
||
"text-decoration-style": "solid|double|dotted|dashed|wavy",
|
||
"text-decoration-thickness": "auto|from-font|<length>|<percentage>",
|
||
"text-emphasis": "<'text-emphasis-style'>||<'text-emphasis-color'>",
|
||
"text-emphasis-color": "<color>",
|
||
"text-emphasis-position": "[over|under]&&[right|left]",
|
||
"text-emphasis-style": "none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>",
|
||
"text-indent": "<length-percentage>&&hanging?&&each-line?",
|
||
"text-justify": "auto|inter-character|inter-word|none",
|
||
"text-orientation": "mixed|upright|sideways",
|
||
"text-overflow": "[clip|ellipsis|<string>]{1,2}",
|
||
"text-rendering": "auto|optimizeSpeed|optimizeLegibility|geometricPrecision",
|
||
"text-shadow": "none|<shadow-t>#",
|
||
"text-size-adjust": "none|auto|<percentage>",
|
||
"text-transform": "none|capitalize|uppercase|lowercase|full-width|full-size-kana",
|
||
"text-underline-offset": "auto|<length>|<percentage>",
|
||
"text-underline-position": "auto|from-font|[under||[left|right]]",
|
||
"top": "<length>|<percentage>|auto",
|
||
"touch-action": "auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",
|
||
"transform": "none|<transform-list>",
|
||
"transform-box": "content-box|border-box|fill-box|stroke-box|view-box",
|
||
"transform-origin": "[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?",
|
||
"transform-style": "flat|preserve-3d",
|
||
"transition": "<single-transition>#",
|
||
"transition-delay": "<time>#",
|
||
"transition-duration": "<time>#",
|
||
"transition-property": "none|<single-transition-property>#",
|
||
"transition-timing-function": "<easing-function>#",
|
||
"translate": "none|<length-percentage> [<length-percentage> <length>?]?",
|
||
"unicode-bidi": "normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext",
|
||
"user-select": "auto|text|none|contain|all",
|
||
"vertical-align": "baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",
|
||
"visibility": "visible|hidden|collapse",
|
||
"white-space": "normal|pre|nowrap|pre-wrap|pre-line|break-spaces",
|
||
"widows": "<integer>",
|
||
"width": "auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content",
|
||
"will-change": "auto|<animateable-feature>#",
|
||
"word-break": "normal|break-all|keep-all|break-word",
|
||
"word-spacing": "normal|<length>",
|
||
"word-wrap": "normal|break-word",
|
||
"writing-mode": "horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>",
|
||
"z-index": "auto|<integer>",
|
||
"zoom": "normal|reset|<number>|<percentage>",
|
||
"-moz-background-clip": "padding|border",
|
||
"-moz-border-radius-bottomleft": "<'border-bottom-left-radius'>",
|
||
"-moz-border-radius-bottomright": "<'border-bottom-right-radius'>",
|
||
"-moz-border-radius-topleft": "<'border-top-left-radius'>",
|
||
"-moz-border-radius-topright": "<'border-bottom-right-radius'>",
|
||
"-moz-control-character-visibility": "visible|hidden",
|
||
"-moz-osx-font-smoothing": "auto|grayscale",
|
||
"-moz-user-select": "none|text|all|-moz-none",
|
||
"-ms-flex-align": "start|end|center|baseline|stretch",
|
||
"-ms-flex-item-align": "auto|start|end|center|baseline|stretch",
|
||
"-ms-flex-line-pack": "start|end|center|justify|distribute|stretch",
|
||
"-ms-flex-negative": "<'flex-shrink'>",
|
||
"-ms-flex-pack": "start|end|center|justify|distribute",
|
||
"-ms-flex-order": "<integer>",
|
||
"-ms-flex-positive": "<'flex-grow'>",
|
||
"-ms-flex-preferred-size": "<'flex-basis'>",
|
||
"-ms-interpolation-mode": "nearest-neighbor|bicubic",
|
||
"-ms-grid-column-align": "start|end|center|stretch",
|
||
"-ms-grid-row-align": "start|end|center|stretch",
|
||
"-ms-hyphenate-limit-last": "none|always|column|page|spread",
|
||
"-webkit-background-clip": "[<box>|border|padding|content|text]#",
|
||
"-webkit-column-break-after": "always|auto|avoid",
|
||
"-webkit-column-break-before": "always|auto|avoid",
|
||
"-webkit-column-break-inside": "always|auto|avoid",
|
||
"-webkit-font-smoothing": "auto|none|antialiased|subpixel-antialiased",
|
||
"-webkit-mask-box-image": "[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?",
|
||
"-webkit-print-color-adjust": "economy|exact",
|
||
"-webkit-text-security": "none|circle|disc|square",
|
||
"-webkit-user-drag": "none|element|auto",
|
||
"-webkit-user-select": "auto|none|text|all",
|
||
"alignment-baseline": "auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical",
|
||
"baseline-shift": "baseline|sub|super|<svg-length>",
|
||
"behavior": "<url>+",
|
||
"clip-rule": "nonzero|evenodd",
|
||
"cue": "<'cue-before'> <'cue-after'>?",
|
||
"cue-after": "<url> <decibel>?|none",
|
||
"cue-before": "<url> <decibel>?|none",
|
||
"dominant-baseline": "auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",
|
||
"fill": "<paint>",
|
||
"fill-opacity": "<number-zero-one>",
|
||
"fill-rule": "nonzero|evenodd",
|
||
"glyph-orientation-horizontal": "<angle>",
|
||
"glyph-orientation-vertical": "<angle>",
|
||
"kerning": "auto|<svg-length>",
|
||
"marker": "none|<url>",
|
||
"marker-end": "none|<url>",
|
||
"marker-mid": "none|<url>",
|
||
"marker-start": "none|<url>",
|
||
"pause": "<'pause-before'> <'pause-after'>?",
|
||
"pause-after": "<time>|none|x-weak|weak|medium|strong|x-strong",
|
||
"pause-before": "<time>|none|x-weak|weak|medium|strong|x-strong",
|
||
"rest": "<'rest-before'> <'rest-after'>?",
|
||
"rest-after": "<time>|none|x-weak|weak|medium|strong|x-strong",
|
||
"rest-before": "<time>|none|x-weak|weak|medium|strong|x-strong",
|
||
"shape-rendering": "auto|optimizeSpeed|crispEdges|geometricPrecision",
|
||
"src": "[<url> [format( <string># )]?|local( <family-name> )]#",
|
||
"speak": "auto|none|normal",
|
||
"speak-as": "normal|spell-out||digits||[literal-punctuation|no-punctuation]",
|
||
"stroke": "<paint>",
|
||
"stroke-dasharray": "none|[<svg-length>+]#",
|
||
"stroke-dashoffset": "<svg-length>",
|
||
"stroke-linecap": "butt|round|square",
|
||
"stroke-linejoin": "miter|round|bevel",
|
||
"stroke-miterlimit": "<number-one-or-greater>",
|
||
"stroke-opacity": "<number-zero-one>",
|
||
"stroke-width": "<svg-length>",
|
||
"text-anchor": "start|middle|end",
|
||
"unicode-range": "<urange>#",
|
||
"voice-balance": "<number>|left|center|right|leftwards|rightwards",
|
||
"voice-duration": "auto|<time>",
|
||
"voice-family": "[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve",
|
||
"voice-pitch": "<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]",
|
||
"voice-range": "<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]",
|
||
"voice-rate": "[normal|x-slow|slow|medium|fast|x-fast]||<percentage>",
|
||
"voice-stress": "normal|strong|moderate|none|reduced",
|
||
"voice-volume": "silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"
|
||
},
|
||
"atrules": {
|
||
"charset": {
|
||
"prelude": "<string>",
|
||
"descriptors": null
|
||
},
|
||
"counter-style": {
|
||
"prelude": "<counter-style-name>",
|
||
"descriptors": {
|
||
"additive-symbols": "[<integer>&&<symbol>]#",
|
||
"fallback": "<counter-style-name>",
|
||
"negative": "<symbol> <symbol>?",
|
||
"pad": "<integer>&&<symbol>",
|
||
"prefix": "<symbol>",
|
||
"range": "[[<integer>|infinite]{2}]#|auto",
|
||
"speak-as": "auto|bullets|numbers|words|spell-out|<counter-style-name>",
|
||
"suffix": "<symbol>",
|
||
"symbols": "<symbol>+",
|
||
"system": "cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"
|
||
}
|
||
},
|
||
"document": {
|
||
"prelude": "[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",
|
||
"descriptors": null
|
||
},
|
||
"font-face": {
|
||
"prelude": null,
|
||
"descriptors": {
|
||
"ascent-override": "normal|<percentage>",
|
||
"descent-override": "normal|<percentage>",
|
||
"font-display": "[auto|block|swap|fallback|optional]",
|
||
"font-family": "<family-name>",
|
||
"font-feature-settings": "normal|<feature-tag-value>#",
|
||
"font-variation-settings": "normal|[<string> <number>]#",
|
||
"font-stretch": "<font-stretch-absolute>{1,2}",
|
||
"font-style": "normal|italic|oblique <angle>{0,2}",
|
||
"font-weight": "<font-weight-absolute>{1,2}",
|
||
"font-variant": "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]",
|
||
"line-gap-override": "normal|<percentage>",
|
||
"size-adjust": "<percentage>",
|
||
"src": "[<url> [format( <string># )]?|local( <family-name> )]#",
|
||
"unicode-range": "<urange>#"
|
||
}
|
||
},
|
||
"font-feature-values": {
|
||
"prelude": "<family-name>#",
|
||
"descriptors": null
|
||
},
|
||
"import": {
|
||
"prelude": "[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",
|
||
"descriptors": null
|
||
},
|
||
"keyframes": {
|
||
"prelude": "<keyframes-name>",
|
||
"descriptors": null
|
||
},
|
||
"layer": {
|
||
"prelude": "[<layer-name>#|<layer-name>?]",
|
||
"descriptors": null
|
||
},
|
||
"media": {
|
||
"prelude": "<media-query-list>",
|
||
"descriptors": null
|
||
},
|
||
"namespace": {
|
||
"prelude": "<namespace-prefix>? [<string>|<url>]",
|
||
"descriptors": null
|
||
},
|
||
"page": {
|
||
"prelude": "<page-selector-list>",
|
||
"descriptors": {
|
||
"bleed": "auto|<length>",
|
||
"marks": "none|[crop||cross]",
|
||
"size": "<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"
|
||
}
|
||
},
|
||
"property": {
|
||
"prelude": "<custom-property-name>",
|
||
"descriptors": {
|
||
"syntax": "<string>",
|
||
"inherits": "true|false",
|
||
"initial-value": "<string>"
|
||
}
|
||
},
|
||
"scroll-timeline": {
|
||
"prelude": "<timeline-name>",
|
||
"descriptors": null
|
||
},
|
||
"supports": {
|
||
"prelude": "<supports-condition>",
|
||
"descriptors": null
|
||
},
|
||
"viewport": {
|
||
"prelude": null,
|
||
"descriptors": {
|
||
"height": "<viewport-length>{1,2}",
|
||
"max-height": "<viewport-length>",
|
||
"max-width": "<viewport-length>",
|
||
"max-zoom": "auto|<number>|<percentage>",
|
||
"min-height": "<viewport-length>",
|
||
"min-width": "<viewport-length>",
|
||
"min-zoom": "auto|<number>|<percentage>",
|
||
"orientation": "auto|portrait|landscape",
|
||
"user-zoom": "zoom|fixed",
|
||
"viewport-fit": "auto|contain|cover",
|
||
"width": "<viewport-length>{1,2}",
|
||
"zoom": "auto|<number>|<percentage>"
|
||
}
|
||
},
|
||
"nest": {
|
||
"prelude": "<complex-selector-list>",
|
||
"descriptors": null
|
||
}
|
||
}
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/node/index.js
|
||
var node_exports = {};
|
||
__export(node_exports, {
|
||
AnPlusB: () => AnPlusB_exports,
|
||
Atrule: () => Atrule_exports,
|
||
AtrulePrelude: () => AtrulePrelude_exports,
|
||
AttributeSelector: () => AttributeSelector_exports,
|
||
Block: () => Block_exports,
|
||
Brackets: () => Brackets_exports,
|
||
CDC: () => CDC_exports,
|
||
CDO: () => CDO_exports,
|
||
ClassSelector: () => ClassSelector_exports,
|
||
Combinator: () => Combinator_exports,
|
||
Comment: () => Comment_exports,
|
||
Declaration: () => Declaration_exports,
|
||
DeclarationList: () => DeclarationList_exports,
|
||
Dimension: () => Dimension_exports,
|
||
Function: () => Function_exports,
|
||
Hash: () => Hash_exports,
|
||
IdSelector: () => IdSelector_exports,
|
||
Identifier: () => Identifier_exports,
|
||
MediaFeature: () => MediaFeature_exports,
|
||
MediaQuery: () => MediaQuery_exports,
|
||
MediaQueryList: () => MediaQueryList_exports,
|
||
NestingSelector: () => NestingSelector_exports,
|
||
Nth: () => Nth_exports,
|
||
Number: () => Number_exports,
|
||
Operator: () => Operator_exports,
|
||
Parentheses: () => Parentheses_exports,
|
||
Percentage: () => Percentage_exports,
|
||
PseudoClassSelector: () => PseudoClassSelector_exports,
|
||
PseudoElementSelector: () => PseudoElementSelector_exports,
|
||
Ratio: () => Ratio_exports,
|
||
Raw: () => Raw_exports,
|
||
Rule: () => Rule_exports,
|
||
Selector: () => Selector_exports,
|
||
SelectorList: () => SelectorList_exports,
|
||
String: () => String_exports,
|
||
StyleSheet: () => StyleSheet_exports,
|
||
TypeSelector: () => TypeSelector_exports,
|
||
UnicodeRange: () => UnicodeRange_exports,
|
||
Url: () => Url_exports,
|
||
Value: () => Value_exports,
|
||
WhiteSpace: () => WhiteSpace_exports
|
||
});
|
||
|
||
// node_modules/css-tree/lib/syntax/node/AnPlusB.js
|
||
var AnPlusB_exports = {};
|
||
__export(AnPlusB_exports, {
|
||
generate: () => generate2,
|
||
name: () => name,
|
||
parse: () => parse3,
|
||
structure: () => structure
|
||
});
|
||
var PLUSSIGN5 = 43;
|
||
var HYPHENMINUS5 = 45;
|
||
var N5 = 110;
|
||
var DISALLOW_SIGN2 = true;
|
||
var ALLOW_SIGN2 = false;
|
||
function checkInteger2(offset, disallowSign) {
|
||
let pos = this.tokenStart + offset;
|
||
const code2 = this.charCodeAt(pos);
|
||
if (code2 === PLUSSIGN5 || code2 === HYPHENMINUS5) {
|
||
if (disallowSign) {
|
||
this.error("Number sign is not allowed");
|
||
}
|
||
pos++;
|
||
}
|
||
for (; pos < this.tokenEnd; pos++) {
|
||
if (!isDigit(this.charCodeAt(pos))) {
|
||
this.error("Integer is expected", pos);
|
||
}
|
||
}
|
||
}
|
||
function checkTokenIsInteger(disallowSign) {
|
||
return checkInteger2.call(this, 0, disallowSign);
|
||
}
|
||
function expectCharCode(offset, code2) {
|
||
if (!this.cmpChar(this.tokenStart + offset, code2)) {
|
||
let msg = "";
|
||
switch (code2) {
|
||
case N5:
|
||
msg = "N is expected";
|
||
break;
|
||
case HYPHENMINUS5:
|
||
msg = "HyphenMinus is expected";
|
||
break;
|
||
}
|
||
this.error(msg, this.tokenStart + offset);
|
||
}
|
||
}
|
||
function consumeB2() {
|
||
let offset = 0;
|
||
let sign = 0;
|
||
let type = this.tokenType;
|
||
while (type === WhiteSpace || type === Comment) {
|
||
type = this.lookupType(++offset);
|
||
}
|
||
if (type !== Number2) {
|
||
if (this.isDelim(PLUSSIGN5, offset) || this.isDelim(HYPHENMINUS5, offset)) {
|
||
sign = this.isDelim(PLUSSIGN5, offset) ? PLUSSIGN5 : HYPHENMINUS5;
|
||
do {
|
||
type = this.lookupType(++offset);
|
||
} while (type === WhiteSpace || type === Comment);
|
||
if (type !== Number2) {
|
||
this.skip(offset);
|
||
checkTokenIsInteger.call(this, DISALLOW_SIGN2);
|
||
}
|
||
} else {
|
||
return null;
|
||
}
|
||
}
|
||
if (offset > 0) {
|
||
this.skip(offset);
|
||
}
|
||
if (sign === 0) {
|
||
type = this.charCodeAt(this.tokenStart);
|
||
if (type !== PLUSSIGN5 && type !== HYPHENMINUS5) {
|
||
this.error("Number sign is expected");
|
||
}
|
||
}
|
||
checkTokenIsInteger.call(this, sign !== 0);
|
||
return sign === HYPHENMINUS5 ? "-" + this.consume(Number2) : this.consume(Number2);
|
||
}
|
||
var name = "AnPlusB";
|
||
var structure = {
|
||
a: [String, null],
|
||
b: [String, null]
|
||
};
|
||
function parse3() {
|
||
const start = this.tokenStart;
|
||
let a = null;
|
||
let b = null;
|
||
if (this.tokenType === Number2) {
|
||
checkTokenIsInteger.call(this, ALLOW_SIGN2);
|
||
b = this.consume(Number2);
|
||
} else if (this.tokenType === Ident && this.cmpChar(this.tokenStart, HYPHENMINUS5)) {
|
||
a = "-1";
|
||
expectCharCode.call(this, 1, N5);
|
||
switch (this.tokenEnd - this.tokenStart) {
|
||
case 2:
|
||
this.next();
|
||
b = consumeB2.call(this);
|
||
break;
|
||
case 3:
|
||
expectCharCode.call(this, 2, HYPHENMINUS5);
|
||
this.next();
|
||
this.skipSC();
|
||
checkTokenIsInteger.call(this, DISALLOW_SIGN2);
|
||
b = "-" + this.consume(Number2);
|
||
break;
|
||
default:
|
||
expectCharCode.call(this, 2, HYPHENMINUS5);
|
||
checkInteger2.call(this, 3, DISALLOW_SIGN2);
|
||
this.next();
|
||
b = this.substrToCursor(start + 2);
|
||
}
|
||
} else if (this.tokenType === Ident || this.isDelim(PLUSSIGN5) && this.lookupType(1) === Ident) {
|
||
let sign = 0;
|
||
a = "1";
|
||
if (this.isDelim(PLUSSIGN5)) {
|
||
sign = 1;
|
||
this.next();
|
||
}
|
||
expectCharCode.call(this, 0, N5);
|
||
switch (this.tokenEnd - this.tokenStart) {
|
||
case 1:
|
||
this.next();
|
||
b = consumeB2.call(this);
|
||
break;
|
||
case 2:
|
||
expectCharCode.call(this, 1, HYPHENMINUS5);
|
||
this.next();
|
||
this.skipSC();
|
||
checkTokenIsInteger.call(this, DISALLOW_SIGN2);
|
||
b = "-" + this.consume(Number2);
|
||
break;
|
||
default:
|
||
expectCharCode.call(this, 1, HYPHENMINUS5);
|
||
checkInteger2.call(this, 2, DISALLOW_SIGN2);
|
||
this.next();
|
||
b = this.substrToCursor(start + sign + 1);
|
||
}
|
||
} else if (this.tokenType === Dimension) {
|
||
const code2 = this.charCodeAt(this.tokenStart);
|
||
const sign = code2 === PLUSSIGN5 || code2 === HYPHENMINUS5;
|
||
let i = this.tokenStart + sign;
|
||
for (; i < this.tokenEnd; i++) {
|
||
if (!isDigit(this.charCodeAt(i))) {
|
||
break;
|
||
}
|
||
}
|
||
if (i === this.tokenStart + sign) {
|
||
this.error("Integer is expected", this.tokenStart + sign);
|
||
}
|
||
expectCharCode.call(this, i - this.tokenStart, N5);
|
||
a = this.substring(start, i);
|
||
if (i + 1 === this.tokenEnd) {
|
||
this.next();
|
||
b = consumeB2.call(this);
|
||
} else {
|
||
expectCharCode.call(this, i - this.tokenStart + 1, HYPHENMINUS5);
|
||
if (i + 2 === this.tokenEnd) {
|
||
this.next();
|
||
this.skipSC();
|
||
checkTokenIsInteger.call(this, DISALLOW_SIGN2);
|
||
b = "-" + this.consume(Number2);
|
||
} else {
|
||
checkInteger2.call(this, i - this.tokenStart + 2, DISALLOW_SIGN2);
|
||
this.next();
|
||
b = this.substrToCursor(i + 1);
|
||
}
|
||
}
|
||
} else {
|
||
this.error();
|
||
}
|
||
if (a !== null && a.charCodeAt(0) === PLUSSIGN5) {
|
||
a = a.substr(1);
|
||
}
|
||
if (b !== null && b.charCodeAt(0) === PLUSSIGN5) {
|
||
b = b.substr(1);
|
||
}
|
||
return {
|
||
type: "AnPlusB",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
a,
|
||
b
|
||
};
|
||
}
|
||
function generate2(node) {
|
||
if (node.a) {
|
||
const a = node.a === "+1" && "n" || node.a === "1" && "n" || node.a === "-1" && "-n" || node.a + "n";
|
||
if (node.b) {
|
||
const b = node.b[0] === "-" || node.b[0] === "+" ? node.b : "+" + node.b;
|
||
this.tokenize(a + b);
|
||
} else {
|
||
this.tokenize(a);
|
||
}
|
||
} else {
|
||
this.tokenize(node.b);
|
||
}
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Atrule.js
|
||
var Atrule_exports = {};
|
||
__export(Atrule_exports, {
|
||
generate: () => generate3,
|
||
name: () => name2,
|
||
parse: () => parse4,
|
||
structure: () => structure2,
|
||
walkContext: () => walkContext
|
||
});
|
||
function consumeRaw(startToken) {
|
||
return this.Raw(startToken, this.consumeUntilLeftCurlyBracketOrSemicolon, true);
|
||
}
|
||
function isDeclarationBlockAtrule() {
|
||
for (let offset = 1, type; type = this.lookupType(offset); offset++) {
|
||
if (type === RightCurlyBracket) {
|
||
return true;
|
||
}
|
||
if (type === LeftCurlyBracket || type === AtKeyword) {
|
||
return false;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
var name2 = "Atrule";
|
||
var walkContext = "atrule";
|
||
var structure2 = {
|
||
name: String,
|
||
prelude: ["AtrulePrelude", "Raw", null],
|
||
block: ["Block", null]
|
||
};
|
||
function parse4(isDeclaration = false) {
|
||
const start = this.tokenStart;
|
||
let name42;
|
||
let nameLowerCase;
|
||
let prelude = null;
|
||
let block = null;
|
||
this.eat(AtKeyword);
|
||
name42 = this.substrToCursor(start + 1);
|
||
nameLowerCase = name42.toLowerCase();
|
||
this.skipSC();
|
||
if (this.eof === false && this.tokenType !== LeftCurlyBracket && this.tokenType !== Semicolon) {
|
||
if (this.parseAtrulePrelude) {
|
||
prelude = this.parseWithFallback(this.AtrulePrelude.bind(this, name42, isDeclaration), consumeRaw);
|
||
} else {
|
||
prelude = consumeRaw.call(this, this.tokenIndex);
|
||
}
|
||
this.skipSC();
|
||
}
|
||
switch (this.tokenType) {
|
||
case Semicolon:
|
||
this.next();
|
||
break;
|
||
case LeftCurlyBracket:
|
||
if (hasOwnProperty.call(this.atrule, nameLowerCase) && typeof this.atrule[nameLowerCase].block === "function") {
|
||
block = this.atrule[nameLowerCase].block.call(this, isDeclaration);
|
||
} else {
|
||
block = this.Block(isDeclarationBlockAtrule.call(this));
|
||
}
|
||
break;
|
||
}
|
||
return {
|
||
type: "Atrule",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
name: name42,
|
||
prelude,
|
||
block
|
||
};
|
||
}
|
||
function generate3(node) {
|
||
this.token(AtKeyword, "@" + node.name);
|
||
if (node.prelude !== null) {
|
||
this.node(node.prelude);
|
||
}
|
||
if (node.block) {
|
||
this.node(node.block);
|
||
} else {
|
||
this.token(Semicolon, ";");
|
||
}
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
|
||
var AtrulePrelude_exports = {};
|
||
__export(AtrulePrelude_exports, {
|
||
generate: () => generate4,
|
||
name: () => name3,
|
||
parse: () => parse5,
|
||
structure: () => structure3,
|
||
walkContext: () => walkContext2
|
||
});
|
||
var name3 = "AtrulePrelude";
|
||
var walkContext2 = "atrulePrelude";
|
||
var structure3 = {
|
||
children: [[]]
|
||
};
|
||
function parse5(name42) {
|
||
let children = null;
|
||
if (name42 !== null) {
|
||
name42 = name42.toLowerCase();
|
||
}
|
||
this.skipSC();
|
||
if (hasOwnProperty.call(this.atrule, name42) && typeof this.atrule[name42].prelude === "function") {
|
||
children = this.atrule[name42].prelude.call(this);
|
||
} else {
|
||
children = this.readSequence(this.scope.AtrulePrelude);
|
||
}
|
||
this.skipSC();
|
||
if (this.eof !== true && this.tokenType !== LeftCurlyBracket && this.tokenType !== Semicolon) {
|
||
this.error("Semicolon or block is expected");
|
||
}
|
||
return {
|
||
type: "AtrulePrelude",
|
||
loc: this.getLocationFromList(children),
|
||
children
|
||
};
|
||
}
|
||
function generate4(node) {
|
||
this.children(node);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/AttributeSelector.js
|
||
var AttributeSelector_exports = {};
|
||
__export(AttributeSelector_exports, {
|
||
generate: () => generate5,
|
||
name: () => name4,
|
||
parse: () => parse6,
|
||
structure: () => structure4
|
||
});
|
||
var DOLLARSIGN = 36;
|
||
var ASTERISK2 = 42;
|
||
var EQUALSSIGN = 61;
|
||
var CIRCUMFLEXACCENT = 94;
|
||
var VERTICALLINE2 = 124;
|
||
var TILDE = 126;
|
||
function getAttributeName() {
|
||
if (this.eof) {
|
||
this.error("Unexpected end of input");
|
||
}
|
||
const start = this.tokenStart;
|
||
let expectIdent = false;
|
||
if (this.isDelim(ASTERISK2)) {
|
||
expectIdent = true;
|
||
this.next();
|
||
} else if (!this.isDelim(VERTICALLINE2)) {
|
||
this.eat(Ident);
|
||
}
|
||
if (this.isDelim(VERTICALLINE2)) {
|
||
if (this.charCodeAt(this.tokenStart + 1) !== EQUALSSIGN) {
|
||
this.next();
|
||
this.eat(Ident);
|
||
} else if (expectIdent) {
|
||
this.error("Identifier is expected", this.tokenEnd);
|
||
}
|
||
} else if (expectIdent) {
|
||
this.error("Vertical line is expected");
|
||
}
|
||
return {
|
||
type: "Identifier",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
name: this.substrToCursor(start)
|
||
};
|
||
}
|
||
function getOperator() {
|
||
const start = this.tokenStart;
|
||
const code2 = this.charCodeAt(start);
|
||
if (code2 !== EQUALSSIGN && // =
|
||
code2 !== TILDE && // ~=
|
||
code2 !== CIRCUMFLEXACCENT && // ^=
|
||
code2 !== DOLLARSIGN && // $=
|
||
code2 !== ASTERISK2 && // *=
|
||
code2 !== VERTICALLINE2) {
|
||
this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected");
|
||
}
|
||
this.next();
|
||
if (code2 !== EQUALSSIGN) {
|
||
if (!this.isDelim(EQUALSSIGN)) {
|
||
this.error("Equal sign is expected");
|
||
}
|
||
this.next();
|
||
}
|
||
return this.substrToCursor(start);
|
||
}
|
||
var name4 = "AttributeSelector";
|
||
var structure4 = {
|
||
name: "Identifier",
|
||
matcher: [String, null],
|
||
value: ["String", "Identifier", null],
|
||
flags: [String, null]
|
||
};
|
||
function parse6() {
|
||
const start = this.tokenStart;
|
||
let name42;
|
||
let matcher = null;
|
||
let value = null;
|
||
let flags = null;
|
||
this.eat(LeftSquareBracket);
|
||
this.skipSC();
|
||
name42 = getAttributeName.call(this);
|
||
this.skipSC();
|
||
if (this.tokenType !== RightSquareBracket) {
|
||
if (this.tokenType !== Ident) {
|
||
matcher = getOperator.call(this);
|
||
this.skipSC();
|
||
value = this.tokenType === String2 ? this.String() : this.Identifier();
|
||
this.skipSC();
|
||
}
|
||
if (this.tokenType === Ident) {
|
||
flags = this.consume(Ident);
|
||
this.skipSC();
|
||
}
|
||
}
|
||
this.eat(RightSquareBracket);
|
||
return {
|
||
type: "AttributeSelector",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
name: name42,
|
||
matcher,
|
||
value,
|
||
flags
|
||
};
|
||
}
|
||
function generate5(node) {
|
||
this.token(Delim, "[");
|
||
this.node(node.name);
|
||
if (node.matcher !== null) {
|
||
this.tokenize(node.matcher);
|
||
this.node(node.value);
|
||
}
|
||
if (node.flags !== null) {
|
||
this.token(Ident, node.flags);
|
||
}
|
||
this.token(Delim, "]");
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Block.js
|
||
var Block_exports = {};
|
||
__export(Block_exports, {
|
||
generate: () => generate6,
|
||
name: () => name5,
|
||
parse: () => parse7,
|
||
structure: () => structure5,
|
||
walkContext: () => walkContext3
|
||
});
|
||
var AMPERSAND2 = 38;
|
||
function consumeRaw2(startToken) {
|
||
return this.Raw(startToken, null, true);
|
||
}
|
||
function consumeRule() {
|
||
return this.parseWithFallback(this.Rule, consumeRaw2);
|
||
}
|
||
function consumeRawDeclaration(startToken) {
|
||
return this.Raw(startToken, this.consumeUntilSemicolonIncluded, true);
|
||
}
|
||
function consumeDeclaration() {
|
||
if (this.tokenType === Semicolon) {
|
||
return consumeRawDeclaration.call(this, this.tokenIndex);
|
||
}
|
||
const node = this.parseWithFallback(this.Declaration, consumeRawDeclaration);
|
||
if (this.tokenType === Semicolon) {
|
||
this.next();
|
||
}
|
||
return node;
|
||
}
|
||
var name5 = "Block";
|
||
var walkContext3 = "block";
|
||
var structure5 = {
|
||
children: [[
|
||
"Atrule",
|
||
"Rule",
|
||
"Declaration"
|
||
]]
|
||
};
|
||
function parse7(isStyleBlock) {
|
||
const consumer = isStyleBlock ? consumeDeclaration : consumeRule;
|
||
const start = this.tokenStart;
|
||
let children = this.createList();
|
||
this.eat(LeftCurlyBracket);
|
||
scan:
|
||
while (!this.eof) {
|
||
switch (this.tokenType) {
|
||
case RightCurlyBracket:
|
||
break scan;
|
||
case WhiteSpace:
|
||
case Comment:
|
||
this.next();
|
||
break;
|
||
case AtKeyword:
|
||
children.push(this.parseWithFallback(this.Atrule.bind(this, isStyleBlock), consumeRaw2));
|
||
break;
|
||
default:
|
||
if (isStyleBlock && this.isDelim(AMPERSAND2)) {
|
||
children.push(consumeRule.call(this));
|
||
} else {
|
||
children.push(consumer.call(this));
|
||
}
|
||
}
|
||
}
|
||
if (!this.eof) {
|
||
this.eat(RightCurlyBracket);
|
||
}
|
||
return {
|
||
type: "Block",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
children
|
||
};
|
||
}
|
||
function generate6(node) {
|
||
this.token(LeftCurlyBracket, "{");
|
||
this.children(node, (prev) => {
|
||
if (prev.type === "Declaration") {
|
||
this.token(Semicolon, ";");
|
||
}
|
||
});
|
||
this.token(RightCurlyBracket, "}");
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Brackets.js
|
||
var Brackets_exports = {};
|
||
__export(Brackets_exports, {
|
||
generate: () => generate7,
|
||
name: () => name6,
|
||
parse: () => parse8,
|
||
structure: () => structure6
|
||
});
|
||
var name6 = "Brackets";
|
||
var structure6 = {
|
||
children: [[]]
|
||
};
|
||
function parse8(readSequence3, recognizer) {
|
||
const start = this.tokenStart;
|
||
let children = null;
|
||
this.eat(LeftSquareBracket);
|
||
children = readSequence3.call(this, recognizer);
|
||
if (!this.eof) {
|
||
this.eat(RightSquareBracket);
|
||
}
|
||
return {
|
||
type: "Brackets",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
children
|
||
};
|
||
}
|
||
function generate7(node) {
|
||
this.token(Delim, "[");
|
||
this.children(node);
|
||
this.token(Delim, "]");
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/CDC.js
|
||
var CDC_exports = {};
|
||
__export(CDC_exports, {
|
||
generate: () => generate8,
|
||
name: () => name7,
|
||
parse: () => parse9,
|
||
structure: () => structure7
|
||
});
|
||
var name7 = "CDC";
|
||
var structure7 = [];
|
||
function parse9() {
|
||
const start = this.tokenStart;
|
||
this.eat(CDC);
|
||
return {
|
||
type: "CDC",
|
||
loc: this.getLocation(start, this.tokenStart)
|
||
};
|
||
}
|
||
function generate8() {
|
||
this.token(CDC, "-->");
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/CDO.js
|
||
var CDO_exports = {};
|
||
__export(CDO_exports, {
|
||
generate: () => generate9,
|
||
name: () => name8,
|
||
parse: () => parse10,
|
||
structure: () => structure8
|
||
});
|
||
var name8 = "CDO";
|
||
var structure8 = [];
|
||
function parse10() {
|
||
const start = this.tokenStart;
|
||
this.eat(CDO);
|
||
return {
|
||
type: "CDO",
|
||
loc: this.getLocation(start, this.tokenStart)
|
||
};
|
||
}
|
||
function generate9() {
|
||
this.token(CDO, "<!--");
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/ClassSelector.js
|
||
var ClassSelector_exports = {};
|
||
__export(ClassSelector_exports, {
|
||
generate: () => generate10,
|
||
name: () => name9,
|
||
parse: () => parse11,
|
||
structure: () => structure9
|
||
});
|
||
var FULLSTOP = 46;
|
||
var name9 = "ClassSelector";
|
||
var structure9 = {
|
||
name: String
|
||
};
|
||
function parse11() {
|
||
this.eatDelim(FULLSTOP);
|
||
return {
|
||
type: "ClassSelector",
|
||
loc: this.getLocation(this.tokenStart - 1, this.tokenEnd),
|
||
name: this.consume(Ident)
|
||
};
|
||
}
|
||
function generate10(node) {
|
||
this.token(Delim, ".");
|
||
this.token(Ident, node.name);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Combinator.js
|
||
var Combinator_exports = {};
|
||
__export(Combinator_exports, {
|
||
generate: () => generate11,
|
||
name: () => name10,
|
||
parse: () => parse12,
|
||
structure: () => structure10
|
||
});
|
||
var PLUSSIGN6 = 43;
|
||
var SOLIDUS = 47;
|
||
var GREATERTHANSIGN2 = 62;
|
||
var TILDE2 = 126;
|
||
var name10 = "Combinator";
|
||
var structure10 = {
|
||
name: String
|
||
};
|
||
function parse12() {
|
||
const start = this.tokenStart;
|
||
let name42;
|
||
switch (this.tokenType) {
|
||
case WhiteSpace:
|
||
name42 = " ";
|
||
break;
|
||
case Delim:
|
||
switch (this.charCodeAt(this.tokenStart)) {
|
||
case GREATERTHANSIGN2:
|
||
case PLUSSIGN6:
|
||
case TILDE2:
|
||
this.next();
|
||
break;
|
||
case SOLIDUS:
|
||
this.next();
|
||
this.eatIdent("deep");
|
||
this.eatDelim(SOLIDUS);
|
||
break;
|
||
default:
|
||
this.error("Combinator is expected");
|
||
}
|
||
name42 = this.substrToCursor(start);
|
||
break;
|
||
}
|
||
return {
|
||
type: "Combinator",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
name: name42
|
||
};
|
||
}
|
||
function generate11(node) {
|
||
this.tokenize(node.name);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Comment.js
|
||
var Comment_exports = {};
|
||
__export(Comment_exports, {
|
||
generate: () => generate12,
|
||
name: () => name11,
|
||
parse: () => parse13,
|
||
structure: () => structure11
|
||
});
|
||
var ASTERISK3 = 42;
|
||
var SOLIDUS2 = 47;
|
||
var name11 = "Comment";
|
||
var structure11 = {
|
||
value: String
|
||
};
|
||
function parse13() {
|
||
const start = this.tokenStart;
|
||
let end = this.tokenEnd;
|
||
this.eat(Comment);
|
||
if (end - start + 2 >= 2 && this.charCodeAt(end - 2) === ASTERISK3 && this.charCodeAt(end - 1) === SOLIDUS2) {
|
||
end -= 2;
|
||
}
|
||
return {
|
||
type: "Comment",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
value: this.substring(start + 2, end)
|
||
};
|
||
}
|
||
function generate12(node) {
|
||
this.token(Comment, "/*" + node.value + "*/");
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Declaration.js
|
||
var Declaration_exports = {};
|
||
__export(Declaration_exports, {
|
||
generate: () => generate13,
|
||
name: () => name12,
|
||
parse: () => parse14,
|
||
structure: () => structure12,
|
||
walkContext: () => walkContext4
|
||
});
|
||
var EXCLAMATIONMARK3 = 33;
|
||
var NUMBERSIGN3 = 35;
|
||
var DOLLARSIGN2 = 36;
|
||
var AMPERSAND3 = 38;
|
||
var ASTERISK4 = 42;
|
||
var PLUSSIGN7 = 43;
|
||
var SOLIDUS3 = 47;
|
||
function consumeValueRaw(startToken) {
|
||
return this.Raw(startToken, this.consumeUntilExclamationMarkOrSemicolon, true);
|
||
}
|
||
function consumeCustomPropertyRaw(startToken) {
|
||
return this.Raw(startToken, this.consumeUntilExclamationMarkOrSemicolon, false);
|
||
}
|
||
function consumeValue() {
|
||
const startValueToken = this.tokenIndex;
|
||
const value = this.Value();
|
||
if (value.type !== "Raw" && this.eof === false && this.tokenType !== Semicolon && this.isDelim(EXCLAMATIONMARK3) === false && this.isBalanceEdge(startValueToken) === false) {
|
||
this.error();
|
||
}
|
||
return value;
|
||
}
|
||
var name12 = "Declaration";
|
||
var walkContext4 = "declaration";
|
||
var structure12 = {
|
||
important: [Boolean, String],
|
||
property: String,
|
||
value: ["Value", "Raw"]
|
||
};
|
||
function parse14() {
|
||
const start = this.tokenStart;
|
||
const startToken = this.tokenIndex;
|
||
const property3 = readProperty2.call(this);
|
||
const customProperty = isCustomProperty(property3);
|
||
const parseValue = customProperty ? this.parseCustomProperty : this.parseValue;
|
||
const consumeRaw7 = customProperty ? consumeCustomPropertyRaw : consumeValueRaw;
|
||
let important = false;
|
||
let value;
|
||
this.skipSC();
|
||
this.eat(Colon);
|
||
const valueStart = this.tokenIndex;
|
||
if (!customProperty) {
|
||
this.skipSC();
|
||
}
|
||
if (parseValue) {
|
||
value = this.parseWithFallback(consumeValue, consumeRaw7);
|
||
} else {
|
||
value = consumeRaw7.call(this, this.tokenIndex);
|
||
}
|
||
if (customProperty && value.type === "Value" && value.children.isEmpty) {
|
||
for (let offset = valueStart - this.tokenIndex; offset <= 0; offset++) {
|
||
if (this.lookupType(offset) === WhiteSpace) {
|
||
value.children.appendData({
|
||
type: "WhiteSpace",
|
||
loc: null,
|
||
value: " "
|
||
});
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
if (this.isDelim(EXCLAMATIONMARK3)) {
|
||
important = getImportant.call(this);
|
||
this.skipSC();
|
||
}
|
||
if (this.eof === false && this.tokenType !== Semicolon && this.isBalanceEdge(startToken) === false) {
|
||
this.error();
|
||
}
|
||
return {
|
||
type: "Declaration",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
important,
|
||
property: property3,
|
||
value
|
||
};
|
||
}
|
||
function generate13(node) {
|
||
this.token(Ident, node.property);
|
||
this.token(Colon, ":");
|
||
this.node(node.value);
|
||
if (node.important) {
|
||
this.token(Delim, "!");
|
||
this.token(Ident, node.important === true ? "important" : node.important);
|
||
}
|
||
}
|
||
function readProperty2() {
|
||
const start = this.tokenStart;
|
||
if (this.tokenType === Delim) {
|
||
switch (this.charCodeAt(this.tokenStart)) {
|
||
case ASTERISK4:
|
||
case DOLLARSIGN2:
|
||
case PLUSSIGN7:
|
||
case NUMBERSIGN3:
|
||
case AMPERSAND3:
|
||
this.next();
|
||
break;
|
||
case SOLIDUS3:
|
||
this.next();
|
||
if (this.isDelim(SOLIDUS3)) {
|
||
this.next();
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
if (this.tokenType === Hash) {
|
||
this.eat(Hash);
|
||
} else {
|
||
this.eat(Ident);
|
||
}
|
||
return this.substrToCursor(start);
|
||
}
|
||
function getImportant() {
|
||
this.eat(Delim);
|
||
this.skipSC();
|
||
const important = this.consume(Ident);
|
||
return important === "important" ? true : important;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/DeclarationList.js
|
||
var DeclarationList_exports = {};
|
||
__export(DeclarationList_exports, {
|
||
generate: () => generate14,
|
||
name: () => name13,
|
||
parse: () => parse15,
|
||
structure: () => structure13
|
||
});
|
||
var AMPERSAND4 = 38;
|
||
function consumeRaw3(startToken) {
|
||
return this.Raw(startToken, this.consumeUntilSemicolonIncluded, true);
|
||
}
|
||
var name13 = "DeclarationList";
|
||
var structure13 = {
|
||
children: [[
|
||
"Declaration",
|
||
"Atrule",
|
||
"Rule"
|
||
]]
|
||
};
|
||
function parse15() {
|
||
const children = this.createList();
|
||
scan:
|
||
while (!this.eof) {
|
||
switch (this.tokenType) {
|
||
case WhiteSpace:
|
||
case Comment:
|
||
case Semicolon:
|
||
this.next();
|
||
break;
|
||
case AtKeyword:
|
||
children.push(this.parseWithFallback(this.Atrule.bind(this, true), consumeRaw3));
|
||
break;
|
||
default:
|
||
if (this.isDelim(AMPERSAND4)) {
|
||
children.push(this.parseWithFallback(this.Rule, consumeRaw3));
|
||
} else {
|
||
children.push(this.parseWithFallback(this.Declaration, consumeRaw3));
|
||
}
|
||
}
|
||
}
|
||
return {
|
||
type: "DeclarationList",
|
||
loc: this.getLocationFromList(children),
|
||
children
|
||
};
|
||
}
|
||
function generate14(node) {
|
||
this.children(node, (prev) => {
|
||
if (prev.type === "Declaration") {
|
||
this.token(Semicolon, ";");
|
||
}
|
||
});
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Dimension.js
|
||
var Dimension_exports = {};
|
||
__export(Dimension_exports, {
|
||
generate: () => generate15,
|
||
name: () => name14,
|
||
parse: () => parse16,
|
||
structure: () => structure14
|
||
});
|
||
var name14 = "Dimension";
|
||
var structure14 = {
|
||
value: String,
|
||
unit: String
|
||
};
|
||
function parse16() {
|
||
const start = this.tokenStart;
|
||
const value = this.consumeNumber(Dimension);
|
||
return {
|
||
type: "Dimension",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
value,
|
||
unit: this.substring(start + value.length, this.tokenStart)
|
||
};
|
||
}
|
||
function generate15(node) {
|
||
this.token(Dimension, node.value + node.unit);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Function.js
|
||
var Function_exports = {};
|
||
__export(Function_exports, {
|
||
generate: () => generate16,
|
||
name: () => name15,
|
||
parse: () => parse17,
|
||
structure: () => structure15,
|
||
walkContext: () => walkContext5
|
||
});
|
||
var name15 = "Function";
|
||
var walkContext5 = "function";
|
||
var structure15 = {
|
||
name: String,
|
||
children: [[]]
|
||
};
|
||
function parse17(readSequence3, recognizer) {
|
||
const start = this.tokenStart;
|
||
const name42 = this.consumeFunctionName();
|
||
const nameLowerCase = name42.toLowerCase();
|
||
let children;
|
||
children = recognizer.hasOwnProperty(nameLowerCase) ? recognizer[nameLowerCase].call(this, recognizer) : readSequence3.call(this, recognizer);
|
||
if (!this.eof) {
|
||
this.eat(RightParenthesis);
|
||
}
|
||
return {
|
||
type: "Function",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
name: name42,
|
||
children
|
||
};
|
||
}
|
||
function generate16(node) {
|
||
this.token(Function2, node.name + "(");
|
||
this.children(node);
|
||
this.token(RightParenthesis, ")");
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Hash.js
|
||
var Hash_exports = {};
|
||
__export(Hash_exports, {
|
||
generate: () => generate17,
|
||
name: () => name16,
|
||
parse: () => parse18,
|
||
structure: () => structure16,
|
||
xxx: () => xxx
|
||
});
|
||
var xxx = "XXX";
|
||
var name16 = "Hash";
|
||
var structure16 = {
|
||
value: String
|
||
};
|
||
function parse18() {
|
||
const start = this.tokenStart;
|
||
this.eat(Hash);
|
||
return {
|
||
type: "Hash",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
value: this.substrToCursor(start + 1)
|
||
};
|
||
}
|
||
function generate17(node) {
|
||
this.token(Hash, "#" + node.value);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Identifier.js
|
||
var Identifier_exports = {};
|
||
__export(Identifier_exports, {
|
||
generate: () => generate18,
|
||
name: () => name17,
|
||
parse: () => parse19,
|
||
structure: () => structure17
|
||
});
|
||
var name17 = "Identifier";
|
||
var structure17 = {
|
||
name: String
|
||
};
|
||
function parse19() {
|
||
return {
|
||
type: "Identifier",
|
||
loc: this.getLocation(this.tokenStart, this.tokenEnd),
|
||
name: this.consume(Ident)
|
||
};
|
||
}
|
||
function generate18(node) {
|
||
this.token(Ident, node.name);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/IdSelector.js
|
||
var IdSelector_exports = {};
|
||
__export(IdSelector_exports, {
|
||
generate: () => generate19,
|
||
name: () => name18,
|
||
parse: () => parse20,
|
||
structure: () => structure18
|
||
});
|
||
var name18 = "IdSelector";
|
||
var structure18 = {
|
||
name: String
|
||
};
|
||
function parse20() {
|
||
const start = this.tokenStart;
|
||
this.eat(Hash);
|
||
return {
|
||
type: "IdSelector",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
name: this.substrToCursor(start + 1)
|
||
};
|
||
}
|
||
function generate19(node) {
|
||
this.token(Delim, "#" + node.name);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/MediaFeature.js
|
||
var MediaFeature_exports = {};
|
||
__export(MediaFeature_exports, {
|
||
generate: () => generate20,
|
||
name: () => name19,
|
||
parse: () => parse21,
|
||
structure: () => structure19
|
||
});
|
||
var name19 = "MediaFeature";
|
||
var structure19 = {
|
||
name: String,
|
||
value: ["Identifier", "Number", "Dimension", "Ratio", null]
|
||
};
|
||
function parse21() {
|
||
const start = this.tokenStart;
|
||
let name42;
|
||
let value = null;
|
||
this.eat(LeftParenthesis);
|
||
this.skipSC();
|
||
name42 = this.consume(Ident);
|
||
this.skipSC();
|
||
if (this.tokenType !== RightParenthesis) {
|
||
this.eat(Colon);
|
||
this.skipSC();
|
||
switch (this.tokenType) {
|
||
case Number2:
|
||
if (this.lookupNonWSType(1) === Delim) {
|
||
value = this.Ratio();
|
||
} else {
|
||
value = this.Number();
|
||
}
|
||
break;
|
||
case Dimension:
|
||
value = this.Dimension();
|
||
break;
|
||
case Ident:
|
||
value = this.Identifier();
|
||
break;
|
||
default:
|
||
this.error("Number, dimension, ratio or identifier is expected");
|
||
}
|
||
this.skipSC();
|
||
}
|
||
this.eat(RightParenthesis);
|
||
return {
|
||
type: "MediaFeature",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
name: name42,
|
||
value
|
||
};
|
||
}
|
||
function generate20(node) {
|
||
this.token(LeftParenthesis, "(");
|
||
this.token(Ident, node.name);
|
||
if (node.value !== null) {
|
||
this.token(Colon, ":");
|
||
this.node(node.value);
|
||
}
|
||
this.token(RightParenthesis, ")");
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/MediaQuery.js
|
||
var MediaQuery_exports = {};
|
||
__export(MediaQuery_exports, {
|
||
generate: () => generate21,
|
||
name: () => name20,
|
||
parse: () => parse22,
|
||
structure: () => structure20
|
||
});
|
||
var name20 = "MediaQuery";
|
||
var structure20 = {
|
||
children: [[
|
||
"Identifier",
|
||
"MediaFeature",
|
||
"WhiteSpace"
|
||
]]
|
||
};
|
||
function parse22() {
|
||
const children = this.createList();
|
||
let child = null;
|
||
this.skipSC();
|
||
scan:
|
||
while (!this.eof) {
|
||
switch (this.tokenType) {
|
||
case Comment:
|
||
case WhiteSpace:
|
||
this.next();
|
||
continue;
|
||
case Ident:
|
||
child = this.Identifier();
|
||
break;
|
||
case LeftParenthesis:
|
||
child = this.MediaFeature();
|
||
break;
|
||
default:
|
||
break scan;
|
||
}
|
||
children.push(child);
|
||
}
|
||
if (child === null) {
|
||
this.error("Identifier or parenthesis is expected");
|
||
}
|
||
return {
|
||
type: "MediaQuery",
|
||
loc: this.getLocationFromList(children),
|
||
children
|
||
};
|
||
}
|
||
function generate21(node) {
|
||
this.children(node);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/MediaQueryList.js
|
||
var MediaQueryList_exports = {};
|
||
__export(MediaQueryList_exports, {
|
||
generate: () => generate22,
|
||
name: () => name21,
|
||
parse: () => parse23,
|
||
structure: () => structure21
|
||
});
|
||
var name21 = "MediaQueryList";
|
||
var structure21 = {
|
||
children: [[
|
||
"MediaQuery"
|
||
]]
|
||
};
|
||
function parse23() {
|
||
const children = this.createList();
|
||
this.skipSC();
|
||
while (!this.eof) {
|
||
children.push(this.MediaQuery());
|
||
if (this.tokenType !== Comma) {
|
||
break;
|
||
}
|
||
this.next();
|
||
}
|
||
return {
|
||
type: "MediaQueryList",
|
||
loc: this.getLocationFromList(children),
|
||
children
|
||
};
|
||
}
|
||
function generate22(node) {
|
||
this.children(node, () => this.token(Comma, ","));
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/NestingSelector.js
|
||
var NestingSelector_exports = {};
|
||
__export(NestingSelector_exports, {
|
||
generate: () => generate23,
|
||
name: () => name22,
|
||
parse: () => parse24,
|
||
structure: () => structure22
|
||
});
|
||
var AMPERSAND5 = 38;
|
||
var name22 = "NestingSelector";
|
||
var structure22 = {};
|
||
function parse24() {
|
||
const start = this.tokenStart;
|
||
this.eatDelim(AMPERSAND5);
|
||
return {
|
||
type: "NestingSelector",
|
||
loc: this.getLocation(start, this.tokenStart)
|
||
};
|
||
}
|
||
function generate23() {
|
||
this.token(Delim, "&");
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Nth.js
|
||
var Nth_exports = {};
|
||
__export(Nth_exports, {
|
||
generate: () => generate24,
|
||
name: () => name23,
|
||
parse: () => parse25,
|
||
structure: () => structure23
|
||
});
|
||
var name23 = "Nth";
|
||
var structure23 = {
|
||
nth: ["AnPlusB", "Identifier"],
|
||
selector: ["SelectorList", null]
|
||
};
|
||
function parse25() {
|
||
this.skipSC();
|
||
const start = this.tokenStart;
|
||
let end = start;
|
||
let selector2 = null;
|
||
let nth2;
|
||
if (this.lookupValue(0, "odd") || this.lookupValue(0, "even")) {
|
||
nth2 = this.Identifier();
|
||
} else {
|
||
nth2 = this.AnPlusB();
|
||
}
|
||
end = this.tokenStart;
|
||
this.skipSC();
|
||
if (this.lookupValue(0, "of")) {
|
||
this.next();
|
||
selector2 = this.SelectorList();
|
||
end = this.tokenStart;
|
||
}
|
||
return {
|
||
type: "Nth",
|
||
loc: this.getLocation(start, end),
|
||
nth: nth2,
|
||
selector: selector2
|
||
};
|
||
}
|
||
function generate24(node) {
|
||
this.node(node.nth);
|
||
if (node.selector !== null) {
|
||
this.token(Ident, "of");
|
||
this.node(node.selector);
|
||
}
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Number.js
|
||
var Number_exports = {};
|
||
__export(Number_exports, {
|
||
generate: () => generate25,
|
||
name: () => name24,
|
||
parse: () => parse26,
|
||
structure: () => structure24
|
||
});
|
||
var name24 = "Number";
|
||
var structure24 = {
|
||
value: String
|
||
};
|
||
function parse26() {
|
||
return {
|
||
type: "Number",
|
||
loc: this.getLocation(this.tokenStart, this.tokenEnd),
|
||
value: this.consume(Number2)
|
||
};
|
||
}
|
||
function generate25(node) {
|
||
this.token(Number2, node.value);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Operator.js
|
||
var Operator_exports = {};
|
||
__export(Operator_exports, {
|
||
generate: () => generate26,
|
||
name: () => name25,
|
||
parse: () => parse27,
|
||
structure: () => structure25
|
||
});
|
||
var name25 = "Operator";
|
||
var structure25 = {
|
||
value: String
|
||
};
|
||
function parse27() {
|
||
const start = this.tokenStart;
|
||
this.next();
|
||
return {
|
||
type: "Operator",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
value: this.substrToCursor(start)
|
||
};
|
||
}
|
||
function generate26(node) {
|
||
this.tokenize(node.value);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Parentheses.js
|
||
var Parentheses_exports = {};
|
||
__export(Parentheses_exports, {
|
||
generate: () => generate27,
|
||
name: () => name26,
|
||
parse: () => parse28,
|
||
structure: () => structure26
|
||
});
|
||
var name26 = "Parentheses";
|
||
var structure26 = {
|
||
children: [[]]
|
||
};
|
||
function parse28(readSequence3, recognizer) {
|
||
const start = this.tokenStart;
|
||
let children = null;
|
||
this.eat(LeftParenthesis);
|
||
children = readSequence3.call(this, recognizer);
|
||
if (!this.eof) {
|
||
this.eat(RightParenthesis);
|
||
}
|
||
return {
|
||
type: "Parentheses",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
children
|
||
};
|
||
}
|
||
function generate27(node) {
|
||
this.token(LeftParenthesis, "(");
|
||
this.children(node);
|
||
this.token(RightParenthesis, ")");
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Percentage.js
|
||
var Percentage_exports = {};
|
||
__export(Percentage_exports, {
|
||
generate: () => generate28,
|
||
name: () => name27,
|
||
parse: () => parse29,
|
||
structure: () => structure27
|
||
});
|
||
var name27 = "Percentage";
|
||
var structure27 = {
|
||
value: String
|
||
};
|
||
function parse29() {
|
||
return {
|
||
type: "Percentage",
|
||
loc: this.getLocation(this.tokenStart, this.tokenEnd),
|
||
value: this.consumeNumber(Percentage)
|
||
};
|
||
}
|
||
function generate28(node) {
|
||
this.token(Percentage, node.value + "%");
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/PseudoClassSelector.js
|
||
var PseudoClassSelector_exports = {};
|
||
__export(PseudoClassSelector_exports, {
|
||
generate: () => generate29,
|
||
name: () => name28,
|
||
parse: () => parse30,
|
||
structure: () => structure28,
|
||
walkContext: () => walkContext6
|
||
});
|
||
var name28 = "PseudoClassSelector";
|
||
var walkContext6 = "function";
|
||
var structure28 = {
|
||
name: String,
|
||
children: [["Raw"], null]
|
||
};
|
||
function parse30() {
|
||
const start = this.tokenStart;
|
||
let children = null;
|
||
let name42;
|
||
let nameLowerCase;
|
||
this.eat(Colon);
|
||
if (this.tokenType === Function2) {
|
||
name42 = this.consumeFunctionName();
|
||
nameLowerCase = name42.toLowerCase();
|
||
if (hasOwnProperty.call(this.pseudo, nameLowerCase)) {
|
||
this.skipSC();
|
||
children = this.pseudo[nameLowerCase].call(this);
|
||
this.skipSC();
|
||
} else {
|
||
children = this.createList();
|
||
children.push(
|
||
this.Raw(this.tokenIndex, null, false)
|
||
);
|
||
}
|
||
this.eat(RightParenthesis);
|
||
} else {
|
||
name42 = this.consume(Ident);
|
||
}
|
||
return {
|
||
type: "PseudoClassSelector",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
name: name42,
|
||
children
|
||
};
|
||
}
|
||
function generate29(node) {
|
||
this.token(Colon, ":");
|
||
if (node.children === null) {
|
||
this.token(Ident, node.name);
|
||
} else {
|
||
this.token(Function2, node.name + "(");
|
||
this.children(node);
|
||
this.token(RightParenthesis, ")");
|
||
}
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/PseudoElementSelector.js
|
||
var PseudoElementSelector_exports = {};
|
||
__export(PseudoElementSelector_exports, {
|
||
generate: () => generate30,
|
||
name: () => name29,
|
||
parse: () => parse31,
|
||
structure: () => structure29,
|
||
walkContext: () => walkContext7
|
||
});
|
||
var name29 = "PseudoElementSelector";
|
||
var walkContext7 = "function";
|
||
var structure29 = {
|
||
name: String,
|
||
children: [["Raw"], null]
|
||
};
|
||
function parse31() {
|
||
const start = this.tokenStart;
|
||
let children = null;
|
||
let name42;
|
||
let nameLowerCase;
|
||
this.eat(Colon);
|
||
this.eat(Colon);
|
||
if (this.tokenType === Function2) {
|
||
name42 = this.consumeFunctionName();
|
||
nameLowerCase = name42.toLowerCase();
|
||
if (hasOwnProperty.call(this.pseudo, nameLowerCase)) {
|
||
this.skipSC();
|
||
children = this.pseudo[nameLowerCase].call(this);
|
||
this.skipSC();
|
||
} else {
|
||
children = this.createList();
|
||
children.push(
|
||
this.Raw(this.tokenIndex, null, false)
|
||
);
|
||
}
|
||
this.eat(RightParenthesis);
|
||
} else {
|
||
name42 = this.consume(Ident);
|
||
}
|
||
return {
|
||
type: "PseudoElementSelector",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
name: name42,
|
||
children
|
||
};
|
||
}
|
||
function generate30(node) {
|
||
this.token(Colon, ":");
|
||
this.token(Colon, ":");
|
||
if (node.children === null) {
|
||
this.token(Ident, node.name);
|
||
} else {
|
||
this.token(Function2, node.name + "(");
|
||
this.children(node);
|
||
this.token(RightParenthesis, ")");
|
||
}
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Ratio.js
|
||
var Ratio_exports = {};
|
||
__export(Ratio_exports, {
|
||
generate: () => generate31,
|
||
name: () => name30,
|
||
parse: () => parse32,
|
||
structure: () => structure30
|
||
});
|
||
var SOLIDUS4 = 47;
|
||
var FULLSTOP2 = 46;
|
||
function consumeNumber2() {
|
||
this.skipSC();
|
||
const value = this.consume(Number2);
|
||
for (let i = 0; i < value.length; i++) {
|
||
const code2 = value.charCodeAt(i);
|
||
if (!isDigit(code2) && code2 !== FULLSTOP2) {
|
||
this.error("Unsigned number is expected", this.tokenStart - value.length + i);
|
||
}
|
||
}
|
||
if (Number(value) === 0) {
|
||
this.error("Zero number is not allowed", this.tokenStart - value.length);
|
||
}
|
||
return value;
|
||
}
|
||
var name30 = "Ratio";
|
||
var structure30 = {
|
||
left: String,
|
||
right: String
|
||
};
|
||
function parse32() {
|
||
const start = this.tokenStart;
|
||
const left = consumeNumber2.call(this);
|
||
let right;
|
||
this.skipSC();
|
||
this.eatDelim(SOLIDUS4);
|
||
right = consumeNumber2.call(this);
|
||
return {
|
||
type: "Ratio",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
left,
|
||
right
|
||
};
|
||
}
|
||
function generate31(node) {
|
||
this.token(Number2, node.left);
|
||
this.token(Delim, "/");
|
||
this.token(Number2, node.right);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Raw.js
|
||
var Raw_exports = {};
|
||
__export(Raw_exports, {
|
||
generate: () => generate32,
|
||
name: () => name31,
|
||
parse: () => parse33,
|
||
structure: () => structure31
|
||
});
|
||
function getOffsetExcludeWS() {
|
||
if (this.tokenIndex > 0) {
|
||
if (this.lookupType(-1) === WhiteSpace) {
|
||
return this.tokenIndex > 1 ? this.getTokenStart(this.tokenIndex - 1) : this.firstCharOffset;
|
||
}
|
||
}
|
||
return this.tokenStart;
|
||
}
|
||
var name31 = "Raw";
|
||
var structure31 = {
|
||
value: String
|
||
};
|
||
function parse33(startToken, consumeUntil, excludeWhiteSpace) {
|
||
const startOffset = this.getTokenStart(startToken);
|
||
let endOffset;
|
||
this.skipUntilBalanced(startToken, consumeUntil || this.consumeUntilBalanceEnd);
|
||
if (excludeWhiteSpace && this.tokenStart > startOffset) {
|
||
endOffset = getOffsetExcludeWS.call(this);
|
||
} else {
|
||
endOffset = this.tokenStart;
|
||
}
|
||
return {
|
||
type: "Raw",
|
||
loc: this.getLocation(startOffset, endOffset),
|
||
value: this.substring(startOffset, endOffset)
|
||
};
|
||
}
|
||
function generate32(node) {
|
||
this.tokenize(node.value);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Rule.js
|
||
var Rule_exports = {};
|
||
__export(Rule_exports, {
|
||
generate: () => generate33,
|
||
name: () => name32,
|
||
parse: () => parse34,
|
||
structure: () => structure32,
|
||
walkContext: () => walkContext8
|
||
});
|
||
function consumeRaw4(startToken) {
|
||
return this.Raw(startToken, this.consumeUntilLeftCurlyBracket, true);
|
||
}
|
||
function consumePrelude() {
|
||
const prelude = this.SelectorList();
|
||
if (prelude.type !== "Raw" && this.eof === false && this.tokenType !== LeftCurlyBracket) {
|
||
this.error();
|
||
}
|
||
return prelude;
|
||
}
|
||
var name32 = "Rule";
|
||
var walkContext8 = "rule";
|
||
var structure32 = {
|
||
prelude: ["SelectorList", "Raw"],
|
||
block: ["Block"]
|
||
};
|
||
function parse34() {
|
||
const startToken = this.tokenIndex;
|
||
const startOffset = this.tokenStart;
|
||
let prelude;
|
||
let block;
|
||
if (this.parseRulePrelude) {
|
||
prelude = this.parseWithFallback(consumePrelude, consumeRaw4);
|
||
} else {
|
||
prelude = consumeRaw4.call(this, startToken);
|
||
}
|
||
block = this.Block(true);
|
||
return {
|
||
type: "Rule",
|
||
loc: this.getLocation(startOffset, this.tokenStart),
|
||
prelude,
|
||
block
|
||
};
|
||
}
|
||
function generate33(node) {
|
||
this.node(node.prelude);
|
||
this.node(node.block);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Selector.js
|
||
var Selector_exports = {};
|
||
__export(Selector_exports, {
|
||
generate: () => generate34,
|
||
name: () => name33,
|
||
parse: () => parse35,
|
||
structure: () => structure33
|
||
});
|
||
var name33 = "Selector";
|
||
var structure33 = {
|
||
children: [[
|
||
"TypeSelector",
|
||
"IdSelector",
|
||
"ClassSelector",
|
||
"AttributeSelector",
|
||
"PseudoClassSelector",
|
||
"PseudoElementSelector",
|
||
"Combinator",
|
||
"WhiteSpace"
|
||
]]
|
||
};
|
||
function parse35() {
|
||
const children = this.readSequence(this.scope.Selector);
|
||
if (this.getFirstListNode(children) === null) {
|
||
this.error("Selector is expected");
|
||
}
|
||
return {
|
||
type: "Selector",
|
||
loc: this.getLocationFromList(children),
|
||
children
|
||
};
|
||
}
|
||
function generate34(node) {
|
||
this.children(node);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/SelectorList.js
|
||
var SelectorList_exports = {};
|
||
__export(SelectorList_exports, {
|
||
generate: () => generate35,
|
||
name: () => name34,
|
||
parse: () => parse36,
|
||
structure: () => structure34,
|
||
walkContext: () => walkContext9
|
||
});
|
||
var name34 = "SelectorList";
|
||
var walkContext9 = "selector";
|
||
var structure34 = {
|
||
children: [[
|
||
"Selector",
|
||
"Raw"
|
||
]]
|
||
};
|
||
function parse36() {
|
||
const children = this.createList();
|
||
while (!this.eof) {
|
||
children.push(this.Selector());
|
||
if (this.tokenType === Comma) {
|
||
this.next();
|
||
continue;
|
||
}
|
||
break;
|
||
}
|
||
return {
|
||
type: "SelectorList",
|
||
loc: this.getLocationFromList(children),
|
||
children
|
||
};
|
||
}
|
||
function generate35(node) {
|
||
this.children(node, () => this.token(Comma, ","));
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/String.js
|
||
var String_exports = {};
|
||
__export(String_exports, {
|
||
generate: () => generate36,
|
||
name: () => name35,
|
||
parse: () => parse37,
|
||
structure: () => structure35
|
||
});
|
||
|
||
// node_modules/css-tree/lib/utils/string.js
|
||
var REVERSE_SOLIDUS = 92;
|
||
var QUOTATION_MARK = 34;
|
||
var APOSTROPHE2 = 39;
|
||
function decode(str) {
|
||
const len = str.length;
|
||
const firstChar = str.charCodeAt(0);
|
||
const start = firstChar === QUOTATION_MARK || firstChar === APOSTROPHE2 ? 1 : 0;
|
||
const end = start === 1 && len > 1 && str.charCodeAt(len - 1) === firstChar ? len - 2 : len - 1;
|
||
let decoded = "";
|
||
for (let i = start; i <= end; i++) {
|
||
let code2 = str.charCodeAt(i);
|
||
if (code2 === REVERSE_SOLIDUS) {
|
||
if (i === end) {
|
||
if (i !== len - 1) {
|
||
decoded = str.substr(i + 1);
|
||
}
|
||
break;
|
||
}
|
||
code2 = str.charCodeAt(++i);
|
||
if (isValidEscape(REVERSE_SOLIDUS, code2)) {
|
||
const escapeStart = i - 1;
|
||
const escapeEnd = consumeEscaped(str, escapeStart);
|
||
i = escapeEnd - 1;
|
||
decoded += decodeEscaped(str.substring(escapeStart + 1, escapeEnd));
|
||
} else {
|
||
if (code2 === 13 && str.charCodeAt(i + 1) === 10) {
|
||
i++;
|
||
}
|
||
}
|
||
} else {
|
||
decoded += str[i];
|
||
}
|
||
}
|
||
return decoded;
|
||
}
|
||
function encode(str, apostrophe) {
|
||
const quote = apostrophe ? "'" : '"';
|
||
const quoteCode = apostrophe ? APOSTROPHE2 : QUOTATION_MARK;
|
||
let encoded = "";
|
||
let wsBeforeHexIsNeeded = false;
|
||
for (let i = 0; i < str.length; i++) {
|
||
const code2 = str.charCodeAt(i);
|
||
if (code2 === 0) {
|
||
encoded += "\uFFFD";
|
||
continue;
|
||
}
|
||
if (code2 <= 31 || code2 === 127) {
|
||
encoded += "\\" + code2.toString(16);
|
||
wsBeforeHexIsNeeded = true;
|
||
continue;
|
||
}
|
||
if (code2 === quoteCode || code2 === REVERSE_SOLIDUS) {
|
||
encoded += "\\" + str.charAt(i);
|
||
wsBeforeHexIsNeeded = false;
|
||
} else {
|
||
if (wsBeforeHexIsNeeded && (isHexDigit(code2) || isWhiteSpace(code2))) {
|
||
encoded += " ";
|
||
}
|
||
encoded += str.charAt(i);
|
||
wsBeforeHexIsNeeded = false;
|
||
}
|
||
}
|
||
return quote + encoded + quote;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/String.js
|
||
var name35 = "String";
|
||
var structure35 = {
|
||
value: String
|
||
};
|
||
function parse37() {
|
||
return {
|
||
type: "String",
|
||
loc: this.getLocation(this.tokenStart, this.tokenEnd),
|
||
value: decode(this.consume(String2))
|
||
};
|
||
}
|
||
function generate36(node) {
|
||
this.token(String2, encode(node.value));
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/StyleSheet.js
|
||
var StyleSheet_exports = {};
|
||
__export(StyleSheet_exports, {
|
||
generate: () => generate37,
|
||
name: () => name36,
|
||
parse: () => parse38,
|
||
structure: () => structure36,
|
||
walkContext: () => walkContext10
|
||
});
|
||
var EXCLAMATIONMARK4 = 33;
|
||
function consumeRaw5(startToken) {
|
||
return this.Raw(startToken, null, false);
|
||
}
|
||
var name36 = "StyleSheet";
|
||
var walkContext10 = "stylesheet";
|
||
var structure36 = {
|
||
children: [[
|
||
"Comment",
|
||
"CDO",
|
||
"CDC",
|
||
"Atrule",
|
||
"Rule",
|
||
"Raw"
|
||
]]
|
||
};
|
||
function parse38() {
|
||
const start = this.tokenStart;
|
||
const children = this.createList();
|
||
let child;
|
||
scan:
|
||
while (!this.eof) {
|
||
switch (this.tokenType) {
|
||
case WhiteSpace:
|
||
this.next();
|
||
continue;
|
||
case Comment:
|
||
if (this.charCodeAt(this.tokenStart + 2) !== EXCLAMATIONMARK4) {
|
||
this.next();
|
||
continue;
|
||
}
|
||
child = this.Comment();
|
||
break;
|
||
case CDO:
|
||
child = this.CDO();
|
||
break;
|
||
case CDC:
|
||
child = this.CDC();
|
||
break;
|
||
case AtKeyword:
|
||
child = this.parseWithFallback(this.Atrule, consumeRaw5);
|
||
break;
|
||
default:
|
||
child = this.parseWithFallback(this.Rule, consumeRaw5);
|
||
}
|
||
children.push(child);
|
||
}
|
||
return {
|
||
type: "StyleSheet",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
children
|
||
};
|
||
}
|
||
function generate37(node) {
|
||
this.children(node);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/TypeSelector.js
|
||
var TypeSelector_exports = {};
|
||
__export(TypeSelector_exports, {
|
||
generate: () => generate38,
|
||
name: () => name37,
|
||
parse: () => parse39,
|
||
structure: () => structure37
|
||
});
|
||
var ASTERISK5 = 42;
|
||
var VERTICALLINE3 = 124;
|
||
function eatIdentifierOrAsterisk() {
|
||
if (this.tokenType !== Ident && this.isDelim(ASTERISK5) === false) {
|
||
this.error("Identifier or asterisk is expected");
|
||
}
|
||
this.next();
|
||
}
|
||
var name37 = "TypeSelector";
|
||
var structure37 = {
|
||
name: String
|
||
};
|
||
function parse39() {
|
||
const start = this.tokenStart;
|
||
if (this.isDelim(VERTICALLINE3)) {
|
||
this.next();
|
||
eatIdentifierOrAsterisk.call(this);
|
||
} else {
|
||
eatIdentifierOrAsterisk.call(this);
|
||
if (this.isDelim(VERTICALLINE3)) {
|
||
this.next();
|
||
eatIdentifierOrAsterisk.call(this);
|
||
}
|
||
}
|
||
return {
|
||
type: "TypeSelector",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
name: this.substrToCursor(start)
|
||
};
|
||
}
|
||
function generate38(node) {
|
||
this.tokenize(node.name);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/UnicodeRange.js
|
||
var UnicodeRange_exports = {};
|
||
__export(UnicodeRange_exports, {
|
||
generate: () => generate39,
|
||
name: () => name38,
|
||
parse: () => parse40,
|
||
structure: () => structure38
|
||
});
|
||
var PLUSSIGN8 = 43;
|
||
var HYPHENMINUS6 = 45;
|
||
var QUESTIONMARK3 = 63;
|
||
function eatHexSequence(offset, allowDash) {
|
||
let len = 0;
|
||
for (let pos = this.tokenStart + offset; pos < this.tokenEnd; pos++) {
|
||
const code2 = this.charCodeAt(pos);
|
||
if (code2 === HYPHENMINUS6 && allowDash && len !== 0) {
|
||
eatHexSequence.call(this, offset + len + 1, false);
|
||
return -1;
|
||
}
|
||
if (!isHexDigit(code2)) {
|
||
this.error(
|
||
allowDash && len !== 0 ? "Hyphen minus" + (len < 6 ? " or hex digit" : "") + " is expected" : len < 6 ? "Hex digit is expected" : "Unexpected input",
|
||
pos
|
||
);
|
||
}
|
||
if (++len > 6) {
|
||
this.error("Too many hex digits", pos);
|
||
}
|
||
;
|
||
}
|
||
this.next();
|
||
return len;
|
||
}
|
||
function eatQuestionMarkSequence(max) {
|
||
let count = 0;
|
||
while (this.isDelim(QUESTIONMARK3)) {
|
||
if (++count > max) {
|
||
this.error("Too many question marks");
|
||
}
|
||
this.next();
|
||
}
|
||
}
|
||
function startsWith2(code2) {
|
||
if (this.charCodeAt(this.tokenStart) !== code2) {
|
||
this.error((code2 === PLUSSIGN8 ? "Plus sign" : "Hyphen minus") + " is expected");
|
||
}
|
||
}
|
||
function scanUnicodeRange() {
|
||
let hexLength = 0;
|
||
switch (this.tokenType) {
|
||
case Number2:
|
||
hexLength = eatHexSequence.call(this, 1, true);
|
||
if (this.isDelim(QUESTIONMARK3)) {
|
||
eatQuestionMarkSequence.call(this, 6 - hexLength);
|
||
break;
|
||
}
|
||
if (this.tokenType === Dimension || this.tokenType === Number2) {
|
||
startsWith2.call(this, HYPHENMINUS6);
|
||
eatHexSequence.call(this, 1, false);
|
||
break;
|
||
}
|
||
break;
|
||
case Dimension:
|
||
hexLength = eatHexSequence.call(this, 1, true);
|
||
if (hexLength > 0) {
|
||
eatQuestionMarkSequence.call(this, 6 - hexLength);
|
||
}
|
||
break;
|
||
default:
|
||
this.eatDelim(PLUSSIGN8);
|
||
if (this.tokenType === Ident) {
|
||
hexLength = eatHexSequence.call(this, 0, true);
|
||
if (hexLength > 0) {
|
||
eatQuestionMarkSequence.call(this, 6 - hexLength);
|
||
}
|
||
break;
|
||
}
|
||
if (this.isDelim(QUESTIONMARK3)) {
|
||
this.next();
|
||
eatQuestionMarkSequence.call(this, 5);
|
||
break;
|
||
}
|
||
this.error("Hex digit or question mark is expected");
|
||
}
|
||
}
|
||
var name38 = "UnicodeRange";
|
||
var structure38 = {
|
||
value: String
|
||
};
|
||
function parse40() {
|
||
const start = this.tokenStart;
|
||
this.eatIdent("u");
|
||
scanUnicodeRange.call(this);
|
||
return {
|
||
type: "UnicodeRange",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
value: this.substrToCursor(start)
|
||
};
|
||
}
|
||
function generate39(node) {
|
||
this.tokenize(node.value);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Url.js
|
||
var Url_exports = {};
|
||
__export(Url_exports, {
|
||
generate: () => generate40,
|
||
name: () => name39,
|
||
parse: () => parse41,
|
||
structure: () => structure39
|
||
});
|
||
|
||
// node_modules/css-tree/lib/utils/url.js
|
||
var SPACE3 = 32;
|
||
var REVERSE_SOLIDUS2 = 92;
|
||
var QUOTATION_MARK2 = 34;
|
||
var APOSTROPHE3 = 39;
|
||
var LEFTPARENTHESIS3 = 40;
|
||
var RIGHTPARENTHESIS3 = 41;
|
||
function decode2(str) {
|
||
const len = str.length;
|
||
let start = 4;
|
||
let end = str.charCodeAt(len - 1) === RIGHTPARENTHESIS3 ? len - 2 : len - 1;
|
||
let decoded = "";
|
||
while (start < end && isWhiteSpace(str.charCodeAt(start))) {
|
||
start++;
|
||
}
|
||
while (start < end && isWhiteSpace(str.charCodeAt(end))) {
|
||
end--;
|
||
}
|
||
for (let i = start; i <= end; i++) {
|
||
let code2 = str.charCodeAt(i);
|
||
if (code2 === REVERSE_SOLIDUS2) {
|
||
if (i === end) {
|
||
if (i !== len - 1) {
|
||
decoded = str.substr(i + 1);
|
||
}
|
||
break;
|
||
}
|
||
code2 = str.charCodeAt(++i);
|
||
if (isValidEscape(REVERSE_SOLIDUS2, code2)) {
|
||
const escapeStart = i - 1;
|
||
const escapeEnd = consumeEscaped(str, escapeStart);
|
||
i = escapeEnd - 1;
|
||
decoded += decodeEscaped(str.substring(escapeStart + 1, escapeEnd));
|
||
} else {
|
||
if (code2 === 13 && str.charCodeAt(i + 1) === 10) {
|
||
i++;
|
||
}
|
||
}
|
||
} else {
|
||
decoded += str[i];
|
||
}
|
||
}
|
||
return decoded;
|
||
}
|
||
function encode2(str) {
|
||
let encoded = "";
|
||
let wsBeforeHexIsNeeded = false;
|
||
for (let i = 0; i < str.length; i++) {
|
||
const code2 = str.charCodeAt(i);
|
||
if (code2 === 0) {
|
||
encoded += "\uFFFD";
|
||
continue;
|
||
}
|
||
if (code2 <= 31 || code2 === 127) {
|
||
encoded += "\\" + code2.toString(16);
|
||
wsBeforeHexIsNeeded = true;
|
||
continue;
|
||
}
|
||
if (code2 === SPACE3 || code2 === REVERSE_SOLIDUS2 || code2 === QUOTATION_MARK2 || code2 === APOSTROPHE3 || code2 === LEFTPARENTHESIS3 || code2 === RIGHTPARENTHESIS3) {
|
||
encoded += "\\" + str.charAt(i);
|
||
wsBeforeHexIsNeeded = false;
|
||
} else {
|
||
if (wsBeforeHexIsNeeded && isHexDigit(code2)) {
|
||
encoded += " ";
|
||
}
|
||
encoded += str.charAt(i);
|
||
wsBeforeHexIsNeeded = false;
|
||
}
|
||
}
|
||
return "url(" + encoded + ")";
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Url.js
|
||
var name39 = "Url";
|
||
var structure39 = {
|
||
value: String
|
||
};
|
||
function parse41() {
|
||
const start = this.tokenStart;
|
||
let value;
|
||
switch (this.tokenType) {
|
||
case Url:
|
||
value = decode2(this.consume(Url));
|
||
break;
|
||
case Function2:
|
||
if (!this.cmpStr(this.tokenStart, this.tokenEnd, "url(")) {
|
||
this.error("Function name must be `url`");
|
||
}
|
||
this.eat(Function2);
|
||
this.skipSC();
|
||
value = decode(this.consume(String2));
|
||
this.skipSC();
|
||
if (!this.eof) {
|
||
this.eat(RightParenthesis);
|
||
}
|
||
break;
|
||
default:
|
||
this.error("Url or Function is expected");
|
||
}
|
||
return {
|
||
type: "Url",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
value
|
||
};
|
||
}
|
||
function generate40(node) {
|
||
this.token(Url, encode2(node.value));
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/Value.js
|
||
var Value_exports = {};
|
||
__export(Value_exports, {
|
||
generate: () => generate41,
|
||
name: () => name40,
|
||
parse: () => parse42,
|
||
structure: () => structure40
|
||
});
|
||
var name40 = "Value";
|
||
var structure40 = {
|
||
children: [[]]
|
||
};
|
||
function parse42() {
|
||
const start = this.tokenStart;
|
||
const children = this.readSequence(this.scope.Value);
|
||
return {
|
||
type: "Value",
|
||
loc: this.getLocation(start, this.tokenStart),
|
||
children
|
||
};
|
||
}
|
||
function generate41(node) {
|
||
this.children(node);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/node/WhiteSpace.js
|
||
var WhiteSpace_exports = {};
|
||
__export(WhiteSpace_exports, {
|
||
generate: () => generate42,
|
||
name: () => name41,
|
||
parse: () => parse43,
|
||
structure: () => structure41
|
||
});
|
||
var SPACE4 = Object.freeze({
|
||
type: "WhiteSpace",
|
||
loc: null,
|
||
value: " "
|
||
});
|
||
var name41 = "WhiteSpace";
|
||
var structure41 = {
|
||
value: String
|
||
};
|
||
function parse43() {
|
||
this.eat(WhiteSpace);
|
||
return SPACE4;
|
||
}
|
||
function generate42(node) {
|
||
this.token(WhiteSpace, node.value);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/config/lexer.js
|
||
var lexer_default = {
|
||
generic: true,
|
||
...data_default,
|
||
node: node_exports
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/scope/index.js
|
||
var scope_exports = {};
|
||
__export(scope_exports, {
|
||
AtrulePrelude: () => atrulePrelude_default,
|
||
Selector: () => selector_default,
|
||
Value: () => value_default
|
||
});
|
||
|
||
// node_modules/css-tree/lib/syntax/scope/default.js
|
||
var NUMBERSIGN4 = 35;
|
||
var ASTERISK6 = 42;
|
||
var PLUSSIGN9 = 43;
|
||
var HYPHENMINUS7 = 45;
|
||
var SOLIDUS5 = 47;
|
||
var U2 = 117;
|
||
function defaultRecognizer(context) {
|
||
switch (this.tokenType) {
|
||
case Hash:
|
||
return this.Hash();
|
||
case Comma:
|
||
return this.Operator();
|
||
case LeftParenthesis:
|
||
return this.Parentheses(this.readSequence, context.recognizer);
|
||
case LeftSquareBracket:
|
||
return this.Brackets(this.readSequence, context.recognizer);
|
||
case String2:
|
||
return this.String();
|
||
case Dimension:
|
||
return this.Dimension();
|
||
case Percentage:
|
||
return this.Percentage();
|
||
case Number2:
|
||
return this.Number();
|
||
case Function2:
|
||
return this.cmpStr(this.tokenStart, this.tokenEnd, "url(") ? this.Url() : this.Function(this.readSequence, context.recognizer);
|
||
case Url:
|
||
return this.Url();
|
||
case Ident:
|
||
if (this.cmpChar(this.tokenStart, U2) && this.cmpChar(this.tokenStart + 1, PLUSSIGN9)) {
|
||
return this.UnicodeRange();
|
||
} else {
|
||
return this.Identifier();
|
||
}
|
||
case Delim: {
|
||
const code2 = this.charCodeAt(this.tokenStart);
|
||
if (code2 === SOLIDUS5 || code2 === ASTERISK6 || code2 === PLUSSIGN9 || code2 === HYPHENMINUS7) {
|
||
return this.Operator();
|
||
}
|
||
if (code2 === NUMBERSIGN4) {
|
||
this.error("Hex or identifier is expected", this.tokenStart + 1);
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/scope/atrulePrelude.js
|
||
var atrulePrelude_default = {
|
||
getNode: defaultRecognizer
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/scope/selector.js
|
||
var NUMBERSIGN5 = 35;
|
||
var AMPERSAND6 = 38;
|
||
var ASTERISK7 = 42;
|
||
var PLUSSIGN10 = 43;
|
||
var SOLIDUS6 = 47;
|
||
var FULLSTOP3 = 46;
|
||
var GREATERTHANSIGN3 = 62;
|
||
var VERTICALLINE4 = 124;
|
||
var TILDE3 = 126;
|
||
function onWhiteSpace(next, children) {
|
||
if (children.last !== null && children.last.type !== "Combinator" && next !== null && next.type !== "Combinator") {
|
||
children.push({
|
||
// FIXME: this.Combinator() should be used instead
|
||
type: "Combinator",
|
||
loc: null,
|
||
name: " "
|
||
});
|
||
}
|
||
}
|
||
function getNode() {
|
||
switch (this.tokenType) {
|
||
case LeftSquareBracket:
|
||
return this.AttributeSelector();
|
||
case Hash:
|
||
return this.IdSelector();
|
||
case Colon:
|
||
if (this.lookupType(1) === Colon) {
|
||
return this.PseudoElementSelector();
|
||
} else {
|
||
return this.PseudoClassSelector();
|
||
}
|
||
case Ident:
|
||
return this.TypeSelector();
|
||
case Number2:
|
||
case Percentage:
|
||
return this.Percentage();
|
||
case Dimension:
|
||
if (this.charCodeAt(this.tokenStart) === FULLSTOP3) {
|
||
this.error("Identifier is expected", this.tokenStart + 1);
|
||
}
|
||
break;
|
||
case Delim: {
|
||
const code2 = this.charCodeAt(this.tokenStart);
|
||
switch (code2) {
|
||
case PLUSSIGN10:
|
||
case GREATERTHANSIGN3:
|
||
case TILDE3:
|
||
case SOLIDUS6:
|
||
return this.Combinator();
|
||
case FULLSTOP3:
|
||
return this.ClassSelector();
|
||
case ASTERISK7:
|
||
case VERTICALLINE4:
|
||
return this.TypeSelector();
|
||
case NUMBERSIGN5:
|
||
return this.IdSelector();
|
||
case AMPERSAND6:
|
||
return this.NestingSelector();
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
var selector_default = {
|
||
onWhiteSpace,
|
||
getNode
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/function/expression.js
|
||
function expression_default() {
|
||
return this.createSingleNodeList(
|
||
this.Raw(this.tokenIndex, null, false)
|
||
);
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/function/var.js
|
||
function var_default() {
|
||
const children = this.createList();
|
||
this.skipSC();
|
||
children.push(this.Identifier());
|
||
this.skipSC();
|
||
if (this.tokenType === Comma) {
|
||
children.push(this.Operator());
|
||
const startIndex = this.tokenIndex;
|
||
const value = this.parseCustomProperty ? this.Value(null) : this.Raw(this.tokenIndex, this.consumeUntilExclamationMarkOrSemicolon, false);
|
||
if (value.type === "Value" && value.children.isEmpty) {
|
||
for (let offset = startIndex - this.tokenIndex; offset <= 0; offset++) {
|
||
if (this.lookupType(offset) === WhiteSpace) {
|
||
value.children.appendData({
|
||
type: "WhiteSpace",
|
||
loc: null,
|
||
value: " "
|
||
});
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
children.push(value);
|
||
}
|
||
return children;
|
||
}
|
||
|
||
// node_modules/css-tree/lib/syntax/scope/value.js
|
||
function isPlusMinusOperator(node) {
|
||
return node !== null && node.type === "Operator" && (node.value[node.value.length - 1] === "-" || node.value[node.value.length - 1] === "+");
|
||
}
|
||
var value_default = {
|
||
getNode: defaultRecognizer,
|
||
onWhiteSpace(next, children) {
|
||
if (isPlusMinusOperator(next)) {
|
||
next.value = " " + next.value;
|
||
}
|
||
if (isPlusMinusOperator(children.last)) {
|
||
children.last.value += " ";
|
||
}
|
||
},
|
||
"expression": expression_default,
|
||
"var": var_default
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/atrule/font-face.js
|
||
var font_face_default = {
|
||
parse: {
|
||
prelude: null,
|
||
block() {
|
||
return this.Block(true);
|
||
}
|
||
}
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/atrule/import.js
|
||
var import_default6 = {
|
||
parse: {
|
||
prelude() {
|
||
const children = this.createList();
|
||
this.skipSC();
|
||
switch (this.tokenType) {
|
||
case String2:
|
||
children.push(this.String());
|
||
break;
|
||
case Url:
|
||
case Function2:
|
||
children.push(this.Url());
|
||
break;
|
||
default:
|
||
this.error("String or url() is expected");
|
||
}
|
||
if (this.lookupNonWSType(0) === Ident || this.lookupNonWSType(0) === LeftParenthesis) {
|
||
children.push(this.MediaQueryList());
|
||
}
|
||
return children;
|
||
},
|
||
block: null
|
||
}
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/atrule/media.js
|
||
var media_default = {
|
||
parse: {
|
||
prelude() {
|
||
return this.createSingleNodeList(
|
||
this.MediaQueryList()
|
||
);
|
||
},
|
||
block(isStyleBlock = false) {
|
||
return this.Block(isStyleBlock);
|
||
}
|
||
}
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/atrule/nest.js
|
||
var nest_default = {
|
||
parse: {
|
||
prelude() {
|
||
return this.createSingleNodeList(
|
||
this.SelectorList()
|
||
);
|
||
},
|
||
block() {
|
||
return this.Block(true);
|
||
}
|
||
}
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/atrule/page.js
|
||
var page_default = {
|
||
parse: {
|
||
prelude() {
|
||
return this.createSingleNodeList(
|
||
this.SelectorList()
|
||
);
|
||
},
|
||
block() {
|
||
return this.Block(true);
|
||
}
|
||
}
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/atrule/supports.js
|
||
function consumeRaw6() {
|
||
return this.createSingleNodeList(
|
||
this.Raw(this.tokenIndex, null, false)
|
||
);
|
||
}
|
||
function parentheses() {
|
||
this.skipSC();
|
||
if (this.tokenType === Ident && this.lookupNonWSType(1) === Colon) {
|
||
return this.createSingleNodeList(
|
||
this.Declaration()
|
||
);
|
||
}
|
||
return readSequence2.call(this);
|
||
}
|
||
function readSequence2() {
|
||
const children = this.createList();
|
||
let child;
|
||
this.skipSC();
|
||
scan:
|
||
while (!this.eof) {
|
||
switch (this.tokenType) {
|
||
case Comment:
|
||
case WhiteSpace:
|
||
this.next();
|
||
continue;
|
||
case Function2:
|
||
child = this.Function(consumeRaw6, this.scope.AtrulePrelude);
|
||
break;
|
||
case Ident:
|
||
child = this.Identifier();
|
||
break;
|
||
case LeftParenthesis:
|
||
child = this.Parentheses(parentheses, this.scope.AtrulePrelude);
|
||
break;
|
||
default:
|
||
break scan;
|
||
}
|
||
children.push(child);
|
||
}
|
||
return children;
|
||
}
|
||
var supports_default = {
|
||
parse: {
|
||
prelude() {
|
||
const children = readSequence2.call(this);
|
||
if (this.getFirstListNode(children) === null) {
|
||
this.error("Condition is expected");
|
||
}
|
||
return children;
|
||
},
|
||
block(isStyleBlock = false) {
|
||
return this.Block(isStyleBlock);
|
||
}
|
||
}
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/atrule/index.js
|
||
var atrule_default = {
|
||
"font-face": font_face_default,
|
||
"import": import_default6,
|
||
media: media_default,
|
||
nest: nest_default,
|
||
page: page_default,
|
||
supports: supports_default
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/pseudo/index.js
|
||
var selectorList = {
|
||
parse() {
|
||
return this.createSingleNodeList(
|
||
this.SelectorList()
|
||
);
|
||
}
|
||
};
|
||
var selector = {
|
||
parse() {
|
||
return this.createSingleNodeList(
|
||
this.Selector()
|
||
);
|
||
}
|
||
};
|
||
var identList = {
|
||
parse() {
|
||
return this.createSingleNodeList(
|
||
this.Identifier()
|
||
);
|
||
}
|
||
};
|
||
var nth = {
|
||
parse() {
|
||
return this.createSingleNodeList(
|
||
this.Nth()
|
||
);
|
||
}
|
||
};
|
||
var pseudo_default = {
|
||
"dir": identList,
|
||
"has": selectorList,
|
||
"lang": identList,
|
||
"matches": selectorList,
|
||
"is": selectorList,
|
||
"-moz-any": selectorList,
|
||
"-webkit-any": selectorList,
|
||
"where": selectorList,
|
||
"not": selectorList,
|
||
"nth-child": nth,
|
||
"nth-last-child": nth,
|
||
"nth-last-of-type": nth,
|
||
"nth-of-type": nth,
|
||
"slotted": selector,
|
||
"host": selector,
|
||
"host-context": selector
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/node/index-parse.js
|
||
var index_parse_exports = {};
|
||
__export(index_parse_exports, {
|
||
AnPlusB: () => parse3,
|
||
Atrule: () => parse4,
|
||
AtrulePrelude: () => parse5,
|
||
AttributeSelector: () => parse6,
|
||
Block: () => parse7,
|
||
Brackets: () => parse8,
|
||
CDC: () => parse9,
|
||
CDO: () => parse10,
|
||
ClassSelector: () => parse11,
|
||
Combinator: () => parse12,
|
||
Comment: () => parse13,
|
||
Declaration: () => parse14,
|
||
DeclarationList: () => parse15,
|
||
Dimension: () => parse16,
|
||
Function: () => parse17,
|
||
Hash: () => parse18,
|
||
IdSelector: () => parse20,
|
||
Identifier: () => parse19,
|
||
MediaFeature: () => parse21,
|
||
MediaQuery: () => parse22,
|
||
MediaQueryList: () => parse23,
|
||
NestingSelector: () => parse24,
|
||
Nth: () => parse25,
|
||
Number: () => parse26,
|
||
Operator: () => parse27,
|
||
Parentheses: () => parse28,
|
||
Percentage: () => parse29,
|
||
PseudoClassSelector: () => parse30,
|
||
PseudoElementSelector: () => parse31,
|
||
Ratio: () => parse32,
|
||
Raw: () => parse33,
|
||
Rule: () => parse34,
|
||
Selector: () => parse35,
|
||
SelectorList: () => parse36,
|
||
String: () => parse37,
|
||
StyleSheet: () => parse38,
|
||
TypeSelector: () => parse39,
|
||
UnicodeRange: () => parse40,
|
||
Url: () => parse41,
|
||
Value: () => parse42,
|
||
WhiteSpace: () => parse43
|
||
});
|
||
|
||
// node_modules/css-tree/lib/syntax/config/parser.js
|
||
var parser_default = {
|
||
parseContext: {
|
||
default: "StyleSheet",
|
||
stylesheet: "StyleSheet",
|
||
atrule: "Atrule",
|
||
atrulePrelude(options) {
|
||
return this.AtrulePrelude(options.atrule ? String(options.atrule) : null);
|
||
},
|
||
mediaQueryList: "MediaQueryList",
|
||
mediaQuery: "MediaQuery",
|
||
rule: "Rule",
|
||
selectorList: "SelectorList",
|
||
selector: "Selector",
|
||
block() {
|
||
return this.Block(true);
|
||
},
|
||
declarationList: "DeclarationList",
|
||
declaration: "Declaration",
|
||
value: "Value"
|
||
},
|
||
scope: scope_exports,
|
||
atrule: atrule_default,
|
||
pseudo: pseudo_default,
|
||
node: index_parse_exports
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/config/walker.js
|
||
var walker_default = {
|
||
node: node_exports
|
||
};
|
||
|
||
// node_modules/css-tree/lib/syntax/index.js
|
||
var syntax_default = create_default({
|
||
...lexer_default,
|
||
...parser_default,
|
||
...walker_default
|
||
});
|
||
|
||
// node_modules/css-tree/lib/index.js
|
||
var {
|
||
tokenize: tokenize2,
|
||
parse: parse44,
|
||
generate: generate43,
|
||
lexer,
|
||
createLexer,
|
||
walk: walk2,
|
||
find,
|
||
findLast,
|
||
findAll,
|
||
toPlainObject,
|
||
fromPlainObject,
|
||
fork
|
||
} = syntax_default;
|
||
|
||
// src/rewrite/css.js
|
||
var import_events2 = __toESM(require_events(), 1);
|
||
var CSS = class extends import_events2.default {
|
||
constructor(ctx) {
|
||
super();
|
||
this.ctx = ctx;
|
||
this.meta = ctx.meta;
|
||
this.parse = parse44;
|
||
this.walk = walk2;
|
||
this.generate = generate43;
|
||
}
|
||
rewrite(str, options) {
|
||
return this.recast(str, options, "rewrite");
|
||
}
|
||
source(str, options) {
|
||
return this.recast(str, options, "source");
|
||
}
|
||
recast(str, options, type) {
|
||
if (!str)
|
||
return str;
|
||
str = new String(str).toString();
|
||
try {
|
||
const ast = this.parse(str, {
|
||
...options,
|
||
parseCustomProperty: true
|
||
});
|
||
this.walk(ast, (node) => {
|
||
this.emit(node.type, node, options, type);
|
||
});
|
||
return this.generate(ast);
|
||
} catch (e) {
|
||
return str;
|
||
}
|
||
}
|
||
};
|
||
var css_default = CSS;
|
||
|
||
// node_modules/meriyah/dist/meriyah.esm.mjs
|
||
var errorMessages = {
|
||
[0]: "Unexpected token",
|
||
[28]: "Unexpected token: '%0'",
|
||
[1]: "Octal escape sequences are not allowed in strict mode",
|
||
[2]: "Octal escape sequences are not allowed in template strings",
|
||
[3]: "Unexpected token `#`",
|
||
[4]: "Illegal Unicode escape sequence",
|
||
[5]: "Invalid code point %0",
|
||
[6]: "Invalid hexadecimal escape sequence",
|
||
[8]: "Octal literals are not allowed in strict mode",
|
||
[7]: "Decimal integer literals with a leading zero are forbidden in strict mode",
|
||
[9]: "Expected number in radix %0",
|
||
[146]: "Invalid left-hand side assignment to a destructible right-hand side",
|
||
[10]: "Non-number found after exponent indicator",
|
||
[11]: "Invalid BigIntLiteral",
|
||
[12]: "No identifiers allowed directly after numeric literal",
|
||
[13]: "Escapes \\8 or \\9 are not syntactically valid escapes",
|
||
[14]: "Unterminated string literal",
|
||
[15]: "Unterminated template literal",
|
||
[16]: "Multiline comment was not closed properly",
|
||
[17]: "The identifier contained dynamic unicode escape that was not closed",
|
||
[18]: "Illegal character '%0'",
|
||
[19]: "Missing hexadecimal digits",
|
||
[20]: "Invalid implicit octal",
|
||
[21]: "Invalid line break in string literal",
|
||
[22]: "Only unicode escapes are legal in identifier names",
|
||
[23]: "Expected '%0'",
|
||
[24]: "Invalid left-hand side in assignment",
|
||
[25]: "Invalid left-hand side in async arrow",
|
||
[26]: 'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',
|
||
[27]: "Member access on super must be in a method",
|
||
[29]: "Await expression not allowed in formal parameter",
|
||
[30]: "Yield expression not allowed in formal parameter",
|
||
[93]: "Unexpected token: 'escaped keyword'",
|
||
[31]: "Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses",
|
||
[120]: "Async functions can only be declared at the top level or inside a block",
|
||
[32]: "Unterminated regular expression",
|
||
[33]: "Unexpected regular expression flag",
|
||
[34]: "Duplicate regular expression flag '%0'",
|
||
[35]: "%0 functions must have exactly %1 argument%2",
|
||
[36]: "Setter function argument must not be a rest parameter",
|
||
[37]: "%0 declaration must have a name in this context",
|
||
[38]: "Function name may not contain any reserved words or be eval or arguments in strict mode",
|
||
[39]: "The rest operator is missing an argument",
|
||
[40]: "A getter cannot be a generator",
|
||
[41]: "A setter cannot be a generator",
|
||
[42]: "A computed property name must be followed by a colon or paren",
|
||
[131]: "Object literal keys that are strings or numbers must be a method or have a colon",
|
||
[44]: "Found `* async x(){}` but this should be `async * x(){}`",
|
||
[43]: "Getters and setters can not be generators",
|
||
[45]: "'%0' can not be generator method",
|
||
[46]: "No line break is allowed after '=>'",
|
||
[47]: "The left-hand side of the arrow can only be destructed through assignment",
|
||
[48]: "The binding declaration is not destructible",
|
||
[49]: "Async arrow can not be followed by new expression",
|
||
[50]: "Classes may not have a static property named 'prototype'",
|
||
[51]: "Class constructor may not be a %0",
|
||
[52]: "Duplicate constructor method in class",
|
||
[53]: "Invalid increment/decrement operand",
|
||
[54]: "Invalid use of `new` keyword on an increment/decrement expression",
|
||
[55]: "`=>` is an invalid assignment target",
|
||
[56]: "Rest element may not have a trailing comma",
|
||
[57]: "Missing initializer in %0 declaration",
|
||
[58]: "'for-%0' loop head declarations can not have an initializer",
|
||
[59]: "Invalid left-hand side in for-%0 loop: Must have a single binding",
|
||
[60]: "Invalid shorthand property initializer",
|
||
[61]: "Property name __proto__ appears more than once in object literal",
|
||
[62]: "Let is disallowed as a lexically bound name",
|
||
[63]: "Invalid use of '%0' inside new expression",
|
||
[64]: "Illegal 'use strict' directive in function with non-simple parameter list",
|
||
[65]: 'Identifier "let" disallowed as left-hand side expression in strict mode',
|
||
[66]: "Illegal continue statement",
|
||
[67]: "Illegal break statement",
|
||
[68]: "Cannot have `let[...]` as a var name in strict mode",
|
||
[69]: "Invalid destructuring assignment target",
|
||
[70]: "Rest parameter may not have a default initializer",
|
||
[71]: "The rest argument must the be last parameter",
|
||
[72]: "Invalid rest argument",
|
||
[74]: "In strict mode code, functions can only be declared at top level or inside a block",
|
||
[75]: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",
|
||
[76]: "Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement",
|
||
[77]: "Class declaration can't appear in single-statement context",
|
||
[78]: "Invalid left-hand side in for-%0",
|
||
[79]: "Invalid assignment in for-%0",
|
||
[80]: "for await (... of ...) is only valid in async functions and async generators",
|
||
[81]: "The first token after the template expression should be a continuation of the template",
|
||
[83]: "`let` declaration not allowed here and `let` cannot be a regular var name in strict mode",
|
||
[82]: "`let \n [` is a restricted production at the start of a statement",
|
||
[84]: "Catch clause requires exactly one parameter, not more (and no trailing comma)",
|
||
[85]: "Catch clause parameter does not support default values",
|
||
[86]: "Missing catch or finally after try",
|
||
[87]: "More than one default clause in switch statement",
|
||
[88]: "Illegal newline after throw",
|
||
[89]: "Strict mode code may not include a with statement",
|
||
[90]: "Illegal return statement",
|
||
[91]: "The left hand side of the for-header binding declaration is not destructible",
|
||
[92]: "new.target only allowed within functions",
|
||
[94]: "'#' not followed by identifier",
|
||
[100]: "Invalid keyword",
|
||
[99]: "Can not use 'let' as a class name",
|
||
[98]: "'A lexical declaration can't define a 'let' binding",
|
||
[97]: "Can not use `let` as variable name in strict mode",
|
||
[95]: "'%0' may not be used as an identifier in this context",
|
||
[96]: "Await is only valid in async functions",
|
||
[101]: "The %0 keyword can only be used with the module goal",
|
||
[102]: "Unicode codepoint must not be greater than 0x10FFFF",
|
||
[103]: "%0 source must be string",
|
||
[104]: "Only a identifier can be used to indicate alias",
|
||
[105]: "Only '*' or '{...}' can be imported after default",
|
||
[106]: "Trailing decorator may be followed by method",
|
||
[107]: "Decorators can't be used with a constructor",
|
||
[109]: "HTML comments are only allowed with web compatibility (Annex B)",
|
||
[110]: "The identifier 'let' must not be in expression position in strict mode",
|
||
[111]: "Cannot assign to `eval` and `arguments` in strict mode",
|
||
[112]: "The left-hand side of a for-of loop may not start with 'let'",
|
||
[113]: "Block body arrows can not be immediately invoked without a group",
|
||
[114]: "Block body arrows can not be immediately accessed without a group",
|
||
[115]: "Unexpected strict mode reserved word",
|
||
[116]: "Unexpected eval or arguments in strict mode",
|
||
[117]: "Decorators must not be followed by a semicolon",
|
||
[118]: "Calling delete on expression not allowed in strict mode",
|
||
[119]: "Pattern can not have a tail",
|
||
[121]: "Can not have a `yield` expression on the left side of a ternary",
|
||
[122]: "An arrow function can not have a postfix update operator",
|
||
[123]: "Invalid object literal key character after generator star",
|
||
[124]: "Private fields can not be deleted",
|
||
[126]: "Classes may not have a field called constructor",
|
||
[125]: "Classes may not have a private element named constructor",
|
||
[127]: "A class field initializer may not contain arguments",
|
||
[128]: "Generators can only be declared at the top level or inside a block",
|
||
[129]: "Async methods are a restricted production and cannot have a newline following it",
|
||
[130]: "Unexpected character after object literal property name",
|
||
[132]: "Invalid key token",
|
||
[133]: "Label '%0' has already been declared",
|
||
[134]: "continue statement must be nested within an iteration statement",
|
||
[135]: "Undefined label '%0'",
|
||
[136]: "Trailing comma is disallowed inside import(...) arguments",
|
||
[137]: "import() requires exactly one argument",
|
||
[138]: "Cannot use new with import(...)",
|
||
[139]: "... is not allowed in import()",
|
||
[140]: "Expected '=>'",
|
||
[141]: "Duplicate binding '%0'",
|
||
[142]: "Cannot export a duplicate name '%0'",
|
||
[145]: "Duplicate %0 for-binding",
|
||
[143]: "Exported binding '%0' needs to refer to a top-level declared variable",
|
||
[144]: "Unexpected private field",
|
||
[148]: "Numeric separators are not allowed at the end of numeric literals",
|
||
[147]: "Only one underscore is allowed as numeric separator",
|
||
[149]: "JSX value should be either an expression or a quoted JSX text",
|
||
[150]: "Expected corresponding JSX closing tag for %0",
|
||
[151]: "Adjacent JSX elements must be wrapped in an enclosing tag",
|
||
[152]: "JSX attributes must only be assigned a non-empty 'expression'",
|
||
[153]: "'%0' has already been declared",
|
||
[154]: "'%0' shadowed a catch clause binding",
|
||
[155]: "Dot property must be an identifier",
|
||
[156]: "Encountered invalid input after spread/rest argument",
|
||
[157]: "Catch without try",
|
||
[158]: "Finally without try",
|
||
[159]: "Expected corresponding closing tag for JSX fragment",
|
||
[160]: "Coalescing and logical operators used together in the same expression must be disambiguated with parentheses",
|
||
[161]: "Invalid tagged template on optional chain",
|
||
[162]: "Invalid optional chain from super property",
|
||
[163]: "Invalid optional chain from new expression",
|
||
[164]: 'Cannot use "import.meta" outside a module',
|
||
[165]: "Leading decorators must be attached to a class declaration"
|
||
};
|
||
var ParseError = class extends SyntaxError {
|
||
constructor(startindex, line, column, type, ...params) {
|
||
const message = "[" + line + ":" + column + "]: " + errorMessages[type].replace(/%(\d+)/g, (_, i) => params[i]);
|
||
super(`${message}`);
|
||
this.index = startindex;
|
||
this.line = line;
|
||
this.column = column;
|
||
this.description = message;
|
||
this.loc = {
|
||
line,
|
||
column
|
||
};
|
||
}
|
||
};
|
||
function report(parser, type, ...params) {
|
||
throw new ParseError(parser.index, parser.line, parser.column, type, ...params);
|
||
}
|
||
function reportScopeError(scope) {
|
||
throw new ParseError(scope.index, scope.line, scope.column, scope.type, scope.params);
|
||
}
|
||
function reportMessageAt(index, line, column, type, ...params) {
|
||
throw new ParseError(index, line, column, type, ...params);
|
||
}
|
||
function reportScannerError(index, line, column, type) {
|
||
throw new ParseError(index, line, column, type);
|
||
}
|
||
var unicodeLookup = ((compressed, lookup2) => {
|
||
const result = new Uint32Array(104448);
|
||
let index = 0;
|
||
let subIndex = 0;
|
||
while (index < 3540) {
|
||
const inst = compressed[index++];
|
||
if (inst < 0) {
|
||
subIndex -= inst;
|
||
} else {
|
||
let code2 = compressed[index++];
|
||
if (inst & 2)
|
||
code2 = lookup2[code2];
|
||
if (inst & 1) {
|
||
result.fill(code2, subIndex, subIndex += compressed[index++]);
|
||
} else {
|
||
result[subIndex++] = code2;
|
||
}
|
||
}
|
||
}
|
||
return result;
|
||
})([-1, 2, 24, 2, 25, 2, 5, -1, 0, 77595648, 3, 44, 2, 3, 0, 14, 2, 57, 2, 58, 3, 0, 3, 0, 3168796671, 0, 4294956992, 2, 1, 2, 0, 2, 59, 3, 0, 4, 0, 4294966523, 3, 0, 4, 2, 16, 2, 60, 2, 0, 0, 4294836735, 0, 3221225471, 0, 4294901942, 2, 61, 0, 134152192, 3, 0, 2, 0, 4294951935, 3, 0, 2, 0, 2683305983, 0, 2684354047, 2, 17, 2, 0, 0, 4294961151, 3, 0, 2, 2, 19, 2, 0, 0, 608174079, 2, 0, 2, 131, 2, 6, 2, 56, -1, 2, 37, 0, 4294443263, 2, 1, 3, 0, 3, 0, 4294901711, 2, 39, 0, 4089839103, 0, 2961209759, 0, 1342439375, 0, 4294543342, 0, 3547201023, 0, 1577204103, 0, 4194240, 0, 4294688750, 2, 2, 0, 80831, 0, 4261478351, 0, 4294549486, 2, 2, 0, 2967484831, 0, 196559, 0, 3594373100, 0, 3288319768, 0, 8469959, 2, 194, 2, 3, 0, 3825204735, 0, 123747807, 0, 65487, 0, 4294828015, 0, 4092591615, 0, 1080049119, 0, 458703, 2, 3, 2, 0, 0, 2163244511, 0, 4227923919, 0, 4236247022, 2, 66, 0, 4284449919, 0, 851904, 2, 4, 2, 11, 0, 67076095, -1, 2, 67, 0, 1073741743, 0, 4093591391, -1, 0, 50331649, 0, 3265266687, 2, 32, 0, 4294844415, 0, 4278190047, 2, 18, 2, 129, -1, 3, 0, 2, 2, 21, 2, 0, 2, 9, 2, 0, 2, 14, 2, 15, 3, 0, 10, 2, 69, 2, 0, 2, 70, 2, 71, 2, 72, 2, 0, 2, 73, 2, 0, 2, 10, 0, 261632, 2, 23, 3, 0, 2, 2, 12, 2, 4, 3, 0, 18, 2, 74, 2, 5, 3, 0, 2, 2, 75, 0, 2088959, 2, 27, 2, 8, 0, 909311, 3, 0, 2, 0, 814743551, 2, 41, 0, 67057664, 3, 0, 2, 2, 40, 2, 0, 2, 28, 2, 0, 2, 29, 2, 7, 0, 268374015, 2, 26, 2, 49, 2, 0, 2, 76, 0, 134153215, -1, 2, 6, 2, 0, 2, 7, 0, 2684354559, 0, 67044351, 0, 3221160064, 0, 1, -1, 3, 0, 2, 2, 42, 0, 1046528, 3, 0, 3, 2, 8, 2, 0, 2, 51, 0, 4294960127, 2, 9, 2, 38, 2, 10, 0, 4294377472, 2, 11, 3, 0, 7, 0, 4227858431, 3, 0, 8, 2, 12, 2, 0, 2, 78, 2, 9, 2, 0, 2, 79, 2, 80, 2, 81, -1, 2, 124, 0, 1048577, 2, 82, 2, 13, -1, 2, 13, 0, 131042, 2, 83, 2, 84, 2, 85, 2, 0, 2, 33, -83, 2, 0, 2, 53, 2, 7, 3, 0, 4, 0, 1046559, 2, 0, 2, 14, 2, 0, 0, 2147516671, 2, 20, 3, 86, 2, 2, 0, -16, 2, 87, 0, 524222462, 2, 4, 2, 0, 0, 4269801471, 2, 4, 2, 0, 2, 15, 2, 77, 2, 16, 3, 0, 2, 2, 47, 2, 0, -1, 2, 17, -16, 3, 0, 206, -2, 3, 0, 655, 2, 18, 3, 0, 36, 2, 68, -1, 2, 17, 2, 9, 3, 0, 8, 2, 89, 2, 121, 2, 0, 0, 3220242431, 3, 0, 3, 2, 19, 2, 90, 2, 91, 3, 0, 2, 2, 92, 2, 0, 2, 93, 2, 94, 2, 0, 0, 4351, 2, 0, 2, 8, 3, 0, 2, 0, 67043391, 0, 3909091327, 2, 0, 2, 22, 2, 8, 2, 18, 3, 0, 2, 0, 67076097, 2, 7, 2, 0, 2, 20, 0, 67059711, 0, 4236247039, 3, 0, 2, 0, 939524103, 0, 8191999, 2, 97, 2, 98, 2, 15, 2, 21, 3, 0, 3, 0, 67057663, 3, 0, 349, 2, 99, 2, 100, 2, 6, -264, 3, 0, 11, 2, 22, 3, 0, 2, 2, 31, -1, 0, 3774349439, 2, 101, 2, 102, 3, 0, 2, 2, 19, 2, 103, 3, 0, 10, 2, 9, 2, 17, 2, 0, 2, 45, 2, 0, 2, 30, 2, 104, 2, 23, 0, 1638399, 2, 172, 2, 105, 3, 0, 3, 2, 18, 2, 24, 2, 25, 2, 5, 2, 26, 2, 0, 2, 7, 2, 106, -1, 2, 107, 2, 108, 2, 109, -1, 3, 0, 3, 2, 11, -2, 2, 0, 2, 27, -3, 2, 150, -4, 2, 18, 2, 0, 2, 35, 0, 1, 2, 0, 2, 62, 2, 28, 2, 11, 2, 9, 2, 0, 2, 110, -1, 3, 0, 4, 2, 9, 2, 21, 2, 111, 2, 6, 2, 0, 2, 112, 2, 0, 2, 48, -4, 3, 0, 9, 2, 20, 2, 29, 2, 30, -4, 2, 113, 2, 114, 2, 29, 2, 20, 2, 7, -2, 2, 115, 2, 29, 2, 31, -2, 2, 0, 2, 116, -2, 0, 4277137519, 0, 2269118463, -1, 3, 18, 2, -1, 2, 32, 2, 36, 2, 0, 3, 29, 2, 2, 34, 2, 19, -3, 3, 0, 2, 2, 33, -1, 2, 0, 2, 34, 2, 0, 2, 34, 2, 0, 2, 46, -10, 2, 0, 0, 203775, -2, 2, 18, 2, 43, 2, 35, -2, 2, 17, 2, 117, 2, 20, 3, 0, 2, 2, 36, 0, 2147549120, 2, 0, 2, 11, 2, 17, 2, 135, 2, 0, 2, 37, 2, 52, 0, 5242879, 3, 0, 2, 0, 402644511, -1, 2, 120, 0, 1090519039, -2, 2, 122, 2, 38, 2, 0, 0, 67045375, 2, 39, 0, 4226678271, 0, 3766565279, 0, 2039759, -4, 3, 0, 2, 0, 3288270847, 0, 3, 3, 0, 2, 0, 67043519, -5, 2, 0, 0, 4282384383, 0, 1056964609, -1, 3, 0, 2, 0, 67043345, -1, 2, 0, 2, 40, 2, 41, -1, 2, 10, 2, 42, -6, 2, 0, 2, 11, -3, 3, 0, 2, 0, 2147484671, 2, 125, 0, 4190109695, 2, 50, -2, 2, 126, 0, 4244635647, 0, 27, 2, 0, 2, 7, 2, 43, 2, 0, 2, 63, -1, 2, 0, 2, 40, -8, 2, 54, 2, 44, 0, 67043329, 2, 127, 2, 45, 0, 8388351, -2, 2, 128, 0, 3028287487, 2, 46, 2, 130, 0, 33259519, 2, 41, -9, 2, 20, -5, 2, 64, -2, 3, 0, 28, 2, 31, -3, 3, 0, 3, 2, 47, 3, 0, 6, 2, 48, -85, 3, 0, 33, 2, 47, -126, 3, 0, 18, 2, 36, -269, 3, 0, 17, 2, 40, 2, 7, 2, 41, -2, 2, 17, 2, 49, 2, 0, 2, 20, 2, 50, 2, 132, 2, 23, -21, 3, 0, 2, -4, 3, 0, 2, 0, 4294936575, 2, 0, 0, 4294934783, -2, 0, 196635, 3, 0, 191, 2, 51, 3, 0, 38, 2, 29, -1, 2, 33, -279, 3, 0, 8, 2, 7, -1, 2, 133, 2, 52, 3, 0, 11, 2, 6, -72, 3, 0, 3, 2, 134, 0, 1677656575, -166, 0, 4161266656, 0, 4071, 0, 15360, -4, 0, 28, -13, 3, 0, 2, 2, 37, 2, 0, 2, 136, 2, 137, 2, 55, 2, 0, 2, 138, 2, 139, 2, 140, 3, 0, 10, 2, 141, 2, 142, 2, 15, 3, 37, 2, 3, 53, 2, 3, 54, 2, 0, 4294954999, 2, 0, -16, 2, 0, 2, 88, 2, 0, 0, 2105343, 0, 4160749584, 0, 65534, -42, 0, 4194303871, 0, 2011, -6, 2, 0, 0, 1073684479, 0, 17407, -11, 2, 0, 2, 31, -40, 3, 0, 6, 0, 8323103, -1, 3, 0, 2, 2, 42, -37, 2, 55, 2, 144, 2, 145, 2, 146, 2, 147, 2, 148, -105, 2, 24, -32, 3, 0, 1334, 2, 9, -1, 3, 0, 129, 2, 27, 3, 0, 6, 2, 9, 3, 0, 180, 2, 149, 3, 0, 233, 0, 1, -96, 3, 0, 16, 2, 9, -47, 3, 0, 154, 2, 56, -22381, 3, 0, 7, 2, 23, -6130, 3, 5, 2, -1, 0, 69207040, 3, 44, 2, 3, 0, 14, 2, 57, 2, 58, -3, 0, 3168731136, 0, 4294956864, 2, 1, 2, 0, 2, 59, 3, 0, 4, 0, 4294966275, 3, 0, 4, 2, 16, 2, 60, 2, 0, 2, 33, -1, 2, 17, 2, 61, -1, 2, 0, 2, 56, 0, 4294885376, 3, 0, 2, 0, 3145727, 0, 2617294944, 0, 4294770688, 2, 23, 2, 62, 3, 0, 2, 0, 131135, 2, 95, 0, 70256639, 0, 71303167, 0, 272, 2, 40, 2, 56, -1, 2, 37, 2, 30, -1, 2, 96, 2, 63, 0, 4278255616, 0, 4294836227, 0, 4294549473, 0, 600178175, 0, 2952806400, 0, 268632067, 0, 4294543328, 0, 57540095, 0, 1577058304, 0, 1835008, 0, 4294688736, 2, 65, 2, 64, 0, 33554435, 2, 123, 2, 65, 2, 151, 0, 131075, 0, 3594373096, 0, 67094296, 2, 64, -1, 0, 4294828e3, 0, 603979263, 2, 160, 0, 3, 0, 4294828001, 0, 602930687, 2, 183, 0, 393219, 0, 4294828016, 0, 671088639, 0, 2154840064, 0, 4227858435, 0, 4236247008, 2, 66, 2, 36, -1, 2, 4, 0, 917503, 2, 36, -1, 2, 67, 0, 537788335, 0, 4026531935, -1, 0, 1, -1, 2, 32, 2, 68, 0, 7936, -3, 2, 0, 0, 2147485695, 0, 1010761728, 0, 4292984930, 0, 16387, 2, 0, 2, 14, 2, 15, 3, 0, 10, 2, 69, 2, 0, 2, 70, 2, 71, 2, 72, 2, 0, 2, 73, 2, 0, 2, 11, -1, 2, 23, 3, 0, 2, 2, 12, 2, 4, 3, 0, 18, 2, 74, 2, 5, 3, 0, 2, 2, 75, 0, 253951, 3, 19, 2, 0, 122879, 2, 0, 2, 8, 0, 276824064, -2, 3, 0, 2, 2, 40, 2, 0, 0, 4294903295, 2, 0, 2, 29, 2, 7, -1, 2, 17, 2, 49, 2, 0, 2, 76, 2, 41, -1, 2, 20, 2, 0, 2, 27, -2, 0, 128, -2, 2, 77, 2, 8, 0, 4064, -1, 2, 119, 0, 4227907585, 2, 0, 2, 118, 2, 0, 2, 48, 2, 173, 2, 9, 2, 38, 2, 10, -1, 0, 74440192, 3, 0, 6, -2, 3, 0, 8, 2, 12, 2, 0, 2, 78, 2, 9, 2, 0, 2, 79, 2, 80, 2, 81, -3, 2, 82, 2, 13, -3, 2, 83, 2, 84, 2, 85, 2, 0, 2, 33, -83, 2, 0, 2, 53, 2, 7, 3, 0, 4, 0, 817183, 2, 0, 2, 14, 2, 0, 0, 33023, 2, 20, 3, 86, 2, -17, 2, 87, 0, 524157950, 2, 4, 2, 0, 2, 88, 2, 4, 2, 0, 2, 15, 2, 77, 2, 16, 3, 0, 2, 2, 47, 2, 0, -1, 2, 17, -16, 3, 0, 206, -2, 3, 0, 655, 2, 18, 3, 0, 36, 2, 68, -1, 2, 17, 2, 9, 3, 0, 8, 2, 89, 0, 3072, 2, 0, 0, 2147516415, 2, 9, 3, 0, 2, 2, 23, 2, 90, 2, 91, 3, 0, 2, 2, 92, 2, 0, 2, 93, 2, 94, 0, 4294965179, 0, 7, 2, 0, 2, 8, 2, 91, 2, 8, -1, 0, 1761345536, 2, 95, 0, 4294901823, 2, 36, 2, 18, 2, 96, 2, 34, 2, 166, 0, 2080440287, 2, 0, 2, 33, 2, 143, 0, 3296722943, 2, 0, 0, 1046675455, 0, 939524101, 0, 1837055, 2, 97, 2, 98, 2, 15, 2, 21, 3, 0, 3, 0, 7, 3, 0, 349, 2, 99, 2, 100, 2, 6, -264, 3, 0, 11, 2, 22, 3, 0, 2, 2, 31, -1, 0, 2700607615, 2, 101, 2, 102, 3, 0, 2, 2, 19, 2, 103, 3, 0, 10, 2, 9, 2, 17, 2, 0, 2, 45, 2, 0, 2, 30, 2, 104, -3, 2, 105, 3, 0, 3, 2, 18, -1, 3, 5, 2, 2, 26, 2, 0, 2, 7, 2, 106, -1, 2, 107, 2, 108, 2, 109, -1, 3, 0, 3, 2, 11, -2, 2, 0, 2, 27, -8, 2, 18, 2, 0, 2, 35, -1, 2, 0, 2, 62, 2, 28, 2, 29, 2, 9, 2, 0, 2, 110, -1, 3, 0, 4, 2, 9, 2, 17, 2, 111, 2, 6, 2, 0, 2, 112, 2, 0, 2, 48, -4, 3, 0, 9, 2, 20, 2, 29, 2, 30, -4, 2, 113, 2, 114, 2, 29, 2, 20, 2, 7, -2, 2, 115, 2, 29, 2, 31, -2, 2, 0, 2, 116, -2, 0, 4277075969, 2, 29, -1, 3, 18, 2, -1, 2, 32, 2, 117, 2, 0, 3, 29, 2, 2, 34, 2, 19, -3, 3, 0, 2, 2, 33, -1, 2, 0, 2, 34, 2, 0, 2, 34, 2, 0, 2, 48, -10, 2, 0, 0, 197631, -2, 2, 18, 2, 43, 2, 118, -2, 2, 17, 2, 117, 2, 20, 2, 119, 2, 51, -2, 2, 119, 2, 23, 2, 17, 2, 33, 2, 119, 2, 36, 0, 4294901904, 0, 4718591, 2, 119, 2, 34, 0, 335544350, -1, 2, 120, 2, 121, -2, 2, 122, 2, 38, 2, 7, -1, 2, 123, 2, 65, 0, 3758161920, 0, 3, -4, 2, 0, 2, 27, 0, 2147485568, 0, 3, 2, 0, 2, 23, 0, 176, -5, 2, 0, 2, 47, 2, 186, -1, 2, 0, 2, 23, 2, 197, -1, 2, 0, 0, 16779263, -2, 2, 11, -7, 2, 0, 2, 121, -3, 3, 0, 2, 2, 124, 2, 125, 0, 2147549183, 0, 2, -2, 2, 126, 2, 35, 0, 10, 0, 4294965249, 0, 67633151, 0, 4026597376, 2, 0, 0, 536871935, -1, 2, 0, 2, 40, -8, 2, 54, 2, 47, 0, 1, 2, 127, 2, 23, -3, 2, 128, 2, 35, 2, 129, 2, 130, 0, 16778239, -10, 2, 34, -5, 2, 64, -2, 3, 0, 28, 2, 31, -3, 3, 0, 3, 2, 47, 3, 0, 6, 2, 48, -85, 3, 0, 33, 2, 47, -126, 3, 0, 18, 2, 36, -269, 3, 0, 17, 2, 40, 2, 7, -3, 2, 17, 2, 131, 2, 0, 2, 23, 2, 48, 2, 132, 2, 23, -21, 3, 0, 2, -4, 3, 0, 2, 0, 67583, -1, 2, 103, -2, 0, 11, 3, 0, 191, 2, 51, 3, 0, 38, 2, 29, -1, 2, 33, -279, 3, 0, 8, 2, 7, -1, 2, 133, 2, 52, 3, 0, 11, 2, 6, -72, 3, 0, 3, 2, 134, 2, 135, -187, 3, 0, 2, 2, 37, 2, 0, 2, 136, 2, 137, 2, 55, 2, 0, 2, 138, 2, 139, 2, 140, 3, 0, 10, 2, 141, 2, 142, 2, 15, 3, 37, 2, 3, 53, 2, 3, 54, 2, 2, 143, -73, 2, 0, 0, 1065361407, 0, 16384, -11, 2, 0, 2, 121, -40, 3, 0, 6, 2, 117, -1, 3, 0, 2, 0, 2063, -37, 2, 55, 2, 144, 2, 145, 2, 146, 2, 147, 2, 148, -138, 3, 0, 1334, 2, 9, -1, 3, 0, 129, 2, 27, 3, 0, 6, 2, 9, 3, 0, 180, 2, 149, 3, 0, 233, 0, 1, -96, 3, 0, 16, 2, 9, -47, 3, 0, 154, 2, 56, -28517, 2, 0, 0, 1, -1, 2, 124, 2, 0, 0, 8193, -21, 2, 193, 0, 10255, 0, 4, -11, 2, 64, 2, 171, -1, 0, 71680, -1, 2, 161, 0, 4292900864, 0, 805306431, -5, 2, 150, -1, 2, 157, -1, 0, 6144, -2, 2, 127, -1, 2, 154, -1, 0, 2147532800, 2, 151, 2, 165, 2, 0, 2, 164, 0, 524032, 0, 4, -4, 2, 190, 0, 205128192, 0, 1333757536, 0, 2147483696, 0, 423953, 0, 747766272, 0, 2717763192, 0, 4286578751, 0, 278545, 2, 152, 0, 4294886464, 0, 33292336, 0, 417809, 2, 152, 0, 1327482464, 0, 4278190128, 0, 700594195, 0, 1006647527, 0, 4286497336, 0, 4160749631, 2, 153, 0, 469762560, 0, 4171219488, 0, 8323120, 2, 153, 0, 202375680, 0, 3214918176, 0, 4294508592, 2, 153, -1, 0, 983584, 0, 48, 0, 58720273, 0, 3489923072, 0, 10517376, 0, 4293066815, 0, 1, 0, 2013265920, 2, 177, 2, 0, 0, 2089, 0, 3221225552, 0, 201375904, 2, 0, -2, 0, 256, 0, 122880, 0, 16777216, 2, 150, 0, 4160757760, 2, 0, -6, 2, 167, -11, 0, 3263218176, -1, 0, 49664, 0, 2160197632, 0, 8388802, -1, 0, 12713984, -1, 2, 154, 2, 159, 2, 178, -2, 2, 162, -20, 0, 3758096385, -2, 2, 155, 0, 4292878336, 2, 90, 2, 169, 0, 4294057984, -2, 2, 163, 2, 156, 2, 175, -2, 2, 155, -1, 2, 182, -1, 2, 170, 2, 124, 0, 4026593280, 0, 14, 0, 4292919296, -1, 2, 158, 0, 939588608, -1, 0, 805306368, -1, 2, 124, 0, 1610612736, 2, 156, 2, 157, 2, 4, 2, 0, -2, 2, 158, 2, 159, -3, 0, 267386880, -1, 2, 160, 0, 7168, -1, 0, 65024, 2, 154, 2, 161, 2, 179, -7, 2, 168, -8, 2, 162, -1, 0, 1426112704, 2, 163, -1, 2, 164, 0, 271581216, 0, 2149777408, 2, 23, 2, 161, 2, 124, 0, 851967, 2, 180, -1, 2, 23, 2, 181, -4, 2, 158, -20, 2, 195, 2, 165, -56, 0, 3145728, 2, 185, -4, 2, 166, 2, 124, -4, 0, 32505856, -1, 2, 167, -1, 0, 2147385088, 2, 90, 1, 2155905152, 2, -3, 2, 103, 2, 0, 2, 168, -2, 2, 169, -6, 2, 170, 0, 4026597375, 0, 1, -1, 0, 1, -1, 2, 171, -3, 2, 117, 2, 64, -2, 2, 166, -2, 2, 176, 2, 124, -878, 2, 159, -36, 2, 172, -1, 2, 201, -10, 2, 188, -5, 2, 174, -6, 0, 4294965251, 2, 27, -1, 2, 173, -1, 2, 174, -2, 0, 4227874752, -3, 0, 2146435072, 2, 159, -2, 0, 1006649344, 2, 124, -1, 2, 90, 0, 201375744, -3, 0, 134217720, 2, 90, 0, 4286677377, 0, 32896, -1, 2, 158, -3, 2, 175, -349, 2, 176, 0, 1920, 2, 177, 3, 0, 264, -11, 2, 157, -2, 2, 178, 2, 0, 0, 520617856, 0, 2692743168, 0, 36, -3, 0, 524284, -11, 2, 23, -1, 2, 187, -1, 2, 184, 0, 3221291007, 2, 178, -1, 2, 202, 0, 2158720, -3, 2, 159, 0, 1, -4, 2, 124, 0, 3808625411, 0, 3489628288, 2, 200, 0, 1207959680, 0, 3221274624, 2, 0, -3, 2, 179, 0, 120, 0, 7340032, -2, 2, 180, 2, 4, 2, 23, 2, 163, 3, 0, 4, 2, 159, -1, 2, 181, 2, 177, -1, 0, 8176, 2, 182, 2, 179, 2, 183, -1, 0, 4290773232, 2, 0, -4, 2, 163, 2, 189, 0, 15728640, 2, 177, -1, 2, 161, -1, 0, 4294934512, 3, 0, 4, -9, 2, 90, 2, 170, 2, 184, 3, 0, 4, 0, 704, 0, 1849688064, 2, 185, -1, 2, 124, 0, 4294901887, 2, 0, 0, 130547712, 0, 1879048192, 2, 199, 3, 0, 2, -1, 2, 186, 2, 187, -1, 0, 17829776, 0, 2025848832, 0, 4261477888, -2, 2, 0, -1, 0, 4286580608, -1, 0, 29360128, 2, 192, 0, 16252928, 0, 3791388672, 2, 38, 3, 0, 2, -2, 2, 196, 2, 0, -1, 2, 103, -1, 0, 66584576, -1, 2, 191, 3, 0, 9, 2, 124, -1, 0, 4294755328, 3, 0, 2, -1, 2, 161, 2, 178, 3, 0, 2, 2, 23, 2, 188, 2, 90, -2, 0, 245760, 0, 2147418112, -1, 2, 150, 2, 203, 0, 4227923456, -1, 2, 164, 2, 161, 2, 90, -3, 0, 4292870145, 0, 262144, 2, 124, 3, 0, 2, 0, 1073758848, 2, 189, -1, 0, 4227921920, 2, 190, 0, 68289024, 0, 528402016, 0, 4292927536, 3, 0, 4, -2, 0, 268435456, 2, 91, -2, 2, 191, 3, 0, 5, -1, 2, 192, 2, 163, 2, 0, -2, 0, 4227923936, 2, 62, -1, 2, 155, 2, 95, 2, 0, 2, 154, 2, 158, 3, 0, 6, -1, 2, 177, 3, 0, 3, -2, 0, 2146959360, 0, 9440640, 0, 104857600, 0, 4227923840, 3, 0, 2, 0, 768, 2, 193, 2, 77, -2, 2, 161, -2, 2, 119, -1, 2, 155, 3, 0, 8, 0, 512, 0, 8388608, 2, 194, 2, 172, 2, 187, 0, 4286578944, 3, 0, 2, 0, 1152, 0, 1266679808, 2, 191, 0, 576, 0, 4261707776, 2, 95, 3, 0, 9, 2, 155, 3, 0, 5, 2, 16, -1, 0, 2147221504, -28, 2, 178, 3, 0, 3, -3, 0, 4292902912, -6, 2, 96, 3, 0, 85, -33, 0, 4294934528, 3, 0, 126, -18, 2, 195, 3, 0, 269, -17, 2, 155, 2, 124, 2, 198, 3, 0, 2, 2, 23, 0, 4290822144, -2, 0, 67174336, 0, 520093700, 2, 17, 3, 0, 21, -2, 2, 179, 3, 0, 3, -2, 0, 30720, -1, 0, 32512, 3, 0, 2, 0, 4294770656, -191, 2, 174, -38, 2, 170, 2, 0, 2, 196, 3, 0, 279, -8, 2, 124, 2, 0, 0, 4294508543, 0, 65295, -11, 2, 177, 3, 0, 72, -3, 0, 3758159872, 0, 201391616, 3, 0, 155, -7, 2, 170, -1, 0, 384, -1, 0, 133693440, -3, 2, 196, -2, 2, 26, 3, 0, 4, 2, 169, -2, 2, 90, 2, 155, 3, 0, 4, -2, 2, 164, -1, 2, 150, 0, 335552923, 2, 197, -1, 0, 538974272, 0, 2214592512, 0, 132e3, -10, 0, 192, -8, 0, 12288, -21, 0, 134213632, 0, 4294901761, 3, 0, 42, 0, 100663424, 0, 4294965284, 3, 0, 6, -1, 0, 3221282816, 2, 198, 3, 0, 11, -1, 2, 199, 3, 0, 40, -6, 0, 4286578784, 2, 0, -2, 0, 1006694400, 3, 0, 24, 2, 35, -1, 2, 94, 3, 0, 2, 0, 1, 2, 163, 3, 0, 6, 2, 197, 0, 4110942569, 0, 1432950139, 0, 2701658217, 0, 4026532864, 0, 4026532881, 2, 0, 2, 45, 3, 0, 8, -1, 2, 158, -2, 2, 169, 0, 98304, 0, 65537, 2, 170, -5, 0, 4294950912, 2, 0, 2, 118, 0, 65528, 2, 177, 0, 4294770176, 2, 26, 3, 0, 4, -30, 2, 174, 0, 3758153728, -3, 2, 169, -2, 2, 155, 2, 188, 2, 158, -1, 2, 191, -1, 2, 161, 0, 4294754304, 3, 0, 2, -3, 0, 33554432, -2, 2, 200, -3, 2, 169, 0, 4175478784, 2, 201, 0, 4286643712, 0, 4286644216, 2, 0, -4, 2, 202, -1, 2, 165, 0, 4227923967, 3, 0, 32, -1334, 2, 163, 2, 0, -129, 2, 94, -6, 2, 163, -180, 2, 203, -233, 2, 4, 3, 0, 96, -16, 2, 163, 3, 0, 47, -154, 2, 165, 3, 0, 22381, -7, 2, 17, 3, 0, 6128], [4294967295, 4294967291, 4092460543, 4294828031, 4294967294, 134217726, 268435455, 2147483647, 1048575, 1073741823, 3892314111, 134217727, 1061158911, 536805376, 4294910143, 4160749567, 4294901759, 4294901760, 536870911, 262143, 8388607, 4294902783, 4294918143, 65535, 67043328, 2281701374, 4294967232, 2097151, 4294903807, 4194303, 255, 67108863, 4294967039, 511, 524287, 131071, 127, 4292870143, 4294902271, 4294549487, 33554431, 1023, 67047423, 4294901888, 4286578687, 4294770687, 67043583, 32767, 15, 2047999, 67043343, 16777215, 4294902e3, 4294934527, 4294966783, 4294967279, 2047, 262083, 20511, 4290772991, 41943039, 493567, 4294959104, 603979775, 65536, 602799615, 805044223, 4294965206, 8191, 1031749119, 4294917631, 2134769663, 4286578493, 4282253311, 4294942719, 33540095, 4294905855, 4294967264, 2868854591, 1608515583, 265232348, 534519807, 2147614720, 1060109444, 4093640016, 17376, 2139062143, 224, 4169138175, 4294909951, 4286578688, 4294967292, 4294965759, 2044, 4292870144, 4294966272, 4294967280, 8289918, 4294934399, 4294901775, 4294965375, 1602223615, 4294967259, 4294443008, 268369920, 4292804608, 486341884, 4294963199, 3087007615, 1073692671, 4128527, 4279238655, 4294902015, 4294966591, 2445279231, 3670015, 3238002687, 31, 63, 4294967288, 4294705151, 4095, 3221208447, 4294549472, 2147483648, 4285526655, 4294966527, 4294705152, 4294966143, 64, 4294966719, 16383, 3774873592, 458752, 536807423, 67043839, 3758096383, 3959414372, 3755993023, 2080374783, 4294835295, 4294967103, 4160749565, 4087, 184024726, 2862017156, 1593309078, 268434431, 268434414, 4294901763, 536870912, 2952790016, 202506752, 139264, 402653184, 4261412864, 4227922944, 49152, 61440, 3758096384, 117440512, 65280, 3233808384, 3221225472, 2097152, 4294965248, 32768, 57152, 67108864, 4293918720, 4290772992, 25165824, 57344, 4227915776, 4278190080, 4227907584, 65520, 4026531840, 4227858432, 4160749568, 3758129152, 4294836224, 63488, 1073741824, 4294967040, 4194304, 251658240, 196608, 4294963200, 64512, 417808, 4227923712, 12582912, 50331648, 65472, 4294967168, 4294966784, 16, 4294917120, 2080374784, 4096, 65408, 524288, 65532]);
|
||
function advanceChar(parser) {
|
||
parser.column++;
|
||
return parser.currentChar = parser.source.charCodeAt(++parser.index);
|
||
}
|
||
function consumeMultiUnitCodePoint(parser, hi) {
|
||
if ((hi & 64512) !== 55296)
|
||
return 0;
|
||
const lo = parser.source.charCodeAt(parser.index + 1);
|
||
if ((lo & 64512) !== 56320)
|
||
return 0;
|
||
hi = parser.currentChar = 65536 + ((hi & 1023) << 10) + (lo & 1023);
|
||
if ((unicodeLookup[(hi >>> 5) + 0] >>> hi & 31 & 1) === 0) {
|
||
report(parser, 18, fromCodePoint2(hi));
|
||
}
|
||
parser.index++;
|
||
parser.column++;
|
||
return 1;
|
||
}
|
||
function consumeLineFeed(parser, state) {
|
||
parser.currentChar = parser.source.charCodeAt(++parser.index);
|
||
parser.flags |= 1;
|
||
if ((state & 4) === 0) {
|
||
parser.column = 0;
|
||
parser.line++;
|
||
}
|
||
}
|
||
function scanNewLine(parser) {
|
||
parser.flags |= 1;
|
||
parser.currentChar = parser.source.charCodeAt(++parser.index);
|
||
parser.column = 0;
|
||
parser.line++;
|
||
}
|
||
function isExoticECMAScriptWhitespace(ch) {
|
||
return ch === 160 || ch === 65279 || ch === 133 || ch === 5760 || ch >= 8192 && ch <= 8203 || ch === 8239 || ch === 8287 || ch === 12288 || ch === 8201 || ch === 65519;
|
||
}
|
||
function fromCodePoint2(codePoint) {
|
||
return codePoint <= 65535 ? String.fromCharCode(codePoint) : String.fromCharCode(codePoint >>> 10) + String.fromCharCode(codePoint & 1023);
|
||
}
|
||
function toHex(code2) {
|
||
return code2 < 65 ? code2 - 48 : code2 - 65 + 10 & 15;
|
||
}
|
||
function convertTokenType(t) {
|
||
switch (t) {
|
||
case 134283266:
|
||
return "NumericLiteral";
|
||
case 134283267:
|
||
return "StringLiteral";
|
||
case 86021:
|
||
case 86022:
|
||
return "BooleanLiteral";
|
||
case 86023:
|
||
return "NullLiteral";
|
||
case 65540:
|
||
return "RegularExpression";
|
||
case 67174408:
|
||
case 67174409:
|
||
case 132:
|
||
return "TemplateLiteral";
|
||
default:
|
||
if ((t & 143360) === 143360)
|
||
return "Identifier";
|
||
if ((t & 4096) === 4096)
|
||
return "Keyword";
|
||
return "Punctuator";
|
||
}
|
||
}
|
||
var CharTypes = [
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
8 | 1024,
|
||
0,
|
||
0,
|
||
8 | 2048,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
8192,
|
||
0,
|
||
1 | 2,
|
||
0,
|
||
0,
|
||
8192,
|
||
0,
|
||
0,
|
||
0,
|
||
256,
|
||
0,
|
||
256 | 32768,
|
||
0,
|
||
0,
|
||
2 | 16 | 128 | 32 | 64,
|
||
2 | 16 | 128 | 32 | 64,
|
||
2 | 16 | 32 | 64,
|
||
2 | 16 | 32 | 64,
|
||
2 | 16 | 32 | 64,
|
||
2 | 16 | 32 | 64,
|
||
2 | 16 | 32 | 64,
|
||
2 | 16 | 32 | 64,
|
||
2 | 16 | 512 | 64,
|
||
2 | 16 | 512 | 64,
|
||
0,
|
||
0,
|
||
16384,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
1 | 2 | 64,
|
||
1 | 2 | 64,
|
||
1 | 2 | 64,
|
||
1 | 2 | 64,
|
||
1 | 2 | 64,
|
||
1 | 2 | 64,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
1 | 2,
|
||
0,
|
||
1,
|
||
0,
|
||
0,
|
||
1 | 2 | 4096,
|
||
0,
|
||
1 | 2 | 4 | 64,
|
||
1 | 2 | 4 | 64,
|
||
1 | 2 | 4 | 64,
|
||
1 | 2 | 4 | 64,
|
||
1 | 2 | 4 | 64,
|
||
1 | 2 | 4 | 64,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
1 | 2 | 4,
|
||
16384,
|
||
0,
|
||
0,
|
||
0,
|
||
0
|
||
];
|
||
var isIdStart = [
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
1,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
1,
|
||
0,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0
|
||
];
|
||
var isIdPart = [
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
1,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
1,
|
||
0,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
1,
|
||
0,
|
||
0,
|
||
0,
|
||
0,
|
||
0
|
||
];
|
||
function isIdentifierStart2(code2) {
|
||
return code2 <= 127 ? isIdStart[code2] : unicodeLookup[(code2 >>> 5) + 34816] >>> code2 & 31 & 1;
|
||
}
|
||
function isIdentifierPart(code2) {
|
||
return code2 <= 127 ? isIdPart[code2] : unicodeLookup[(code2 >>> 5) + 0] >>> code2 & 31 & 1 || (code2 === 8204 || code2 === 8205);
|
||
}
|
||
var CommentTypes = ["SingleLine", "MultiLine", "HTMLOpen", "HTMLClose", "HashbangComment"];
|
||
function skipHashBang(parser) {
|
||
const source = parser.source;
|
||
if (parser.currentChar === 35 && source.charCodeAt(parser.index + 1) === 33) {
|
||
advanceChar(parser);
|
||
advanceChar(parser);
|
||
skipSingleLineComment(parser, source, 0, 4, parser.tokenPos, parser.linePos, parser.colPos);
|
||
}
|
||
}
|
||
function skipSingleHTMLComment(parser, source, state, context, type, start, line, column) {
|
||
if (context & 2048)
|
||
report(parser, 0);
|
||
return skipSingleLineComment(parser, source, state, type, start, line, column);
|
||
}
|
||
function skipSingleLineComment(parser, source, state, type, start, line, column) {
|
||
const { index } = parser;
|
||
parser.tokenPos = parser.index;
|
||
parser.linePos = parser.line;
|
||
parser.colPos = parser.column;
|
||
while (parser.index < parser.end) {
|
||
if (CharTypes[parser.currentChar] & 8) {
|
||
const isCR = parser.currentChar === 13;
|
||
scanNewLine(parser);
|
||
if (isCR && parser.index < parser.end && parser.currentChar === 10)
|
||
parser.currentChar = source.charCodeAt(++parser.index);
|
||
break;
|
||
} else if ((parser.currentChar ^ 8232) <= 1) {
|
||
scanNewLine(parser);
|
||
break;
|
||
}
|
||
advanceChar(parser);
|
||
parser.tokenPos = parser.index;
|
||
parser.linePos = parser.line;
|
||
parser.colPos = parser.column;
|
||
}
|
||
if (parser.onComment) {
|
||
const loc = {
|
||
start: {
|
||
line,
|
||
column
|
||
},
|
||
end: {
|
||
line: parser.linePos,
|
||
column: parser.colPos
|
||
}
|
||
};
|
||
parser.onComment(CommentTypes[type & 255], source.slice(index, parser.tokenPos), start, parser.tokenPos, loc);
|
||
}
|
||
return state | 1;
|
||
}
|
||
function skipMultiLineComment(parser, source, state) {
|
||
const { index } = parser;
|
||
while (parser.index < parser.end) {
|
||
if (parser.currentChar < 43) {
|
||
let skippedOneAsterisk = false;
|
||
while (parser.currentChar === 42) {
|
||
if (!skippedOneAsterisk) {
|
||
state &= ~4;
|
||
skippedOneAsterisk = true;
|
||
}
|
||
if (advanceChar(parser) === 47) {
|
||
advanceChar(parser);
|
||
if (parser.onComment) {
|
||
const loc = {
|
||
start: {
|
||
line: parser.linePos,
|
||
column: parser.colPos
|
||
},
|
||
end: {
|
||
line: parser.line,
|
||
column: parser.column
|
||
}
|
||
};
|
||
parser.onComment(CommentTypes[1 & 255], source.slice(index, parser.index - 2), index - 2, parser.index, loc);
|
||
}
|
||
parser.tokenPos = parser.index;
|
||
parser.linePos = parser.line;
|
||
parser.colPos = parser.column;
|
||
return state;
|
||
}
|
||
}
|
||
if (skippedOneAsterisk) {
|
||
continue;
|
||
}
|
||
if (CharTypes[parser.currentChar] & 8) {
|
||
if (parser.currentChar === 13) {
|
||
state |= 1 | 4;
|
||
scanNewLine(parser);
|
||
} else {
|
||
consumeLineFeed(parser, state);
|
||
state = state & ~4 | 1;
|
||
}
|
||
} else {
|
||
advanceChar(parser);
|
||
}
|
||
} else if ((parser.currentChar ^ 8232) <= 1) {
|
||
state = state & ~4 | 1;
|
||
scanNewLine(parser);
|
||
} else {
|
||
state &= ~4;
|
||
advanceChar(parser);
|
||
}
|
||
}
|
||
report(parser, 16);
|
||
}
|
||
function scanRegularExpression(parser, context) {
|
||
const bodyStart = parser.index;
|
||
let preparseState = 0;
|
||
loop:
|
||
while (true) {
|
||
const ch = parser.currentChar;
|
||
advanceChar(parser);
|
||
if (preparseState & 1) {
|
||
preparseState &= ~1;
|
||
} else {
|
||
switch (ch) {
|
||
case 47:
|
||
if (!preparseState)
|
||
break loop;
|
||
else
|
||
break;
|
||
case 92:
|
||
preparseState |= 1;
|
||
break;
|
||
case 91:
|
||
preparseState |= 2;
|
||
break;
|
||
case 93:
|
||
preparseState &= 1;
|
||
break;
|
||
case 13:
|
||
case 10:
|
||
case 8232:
|
||
case 8233:
|
||
report(parser, 32);
|
||
}
|
||
}
|
||
if (parser.index >= parser.source.length) {
|
||
return report(parser, 32);
|
||
}
|
||
}
|
||
const bodyEnd = parser.index - 1;
|
||
let mask = 0;
|
||
let char = parser.currentChar;
|
||
const { index: flagStart } = parser;
|
||
while (isIdentifierPart(char)) {
|
||
switch (char) {
|
||
case 103:
|
||
if (mask & 2)
|
||
report(parser, 34, "g");
|
||
mask |= 2;
|
||
break;
|
||
case 105:
|
||
if (mask & 1)
|
||
report(parser, 34, "i");
|
||
mask |= 1;
|
||
break;
|
||
case 109:
|
||
if (mask & 4)
|
||
report(parser, 34, "m");
|
||
mask |= 4;
|
||
break;
|
||
case 117:
|
||
if (mask & 16)
|
||
report(parser, 34, "u");
|
||
mask |= 16;
|
||
break;
|
||
case 121:
|
||
if (mask & 8)
|
||
report(parser, 34, "y");
|
||
mask |= 8;
|
||
break;
|
||
case 115:
|
||
if (mask & 32)
|
||
report(parser, 34, "s");
|
||
mask |= 32;
|
||
break;
|
||
case 100:
|
||
if (mask & 64)
|
||
report(parser, 34, "d");
|
||
mask |= 64;
|
||
break;
|
||
default:
|
||
report(parser, 33);
|
||
}
|
||
char = advanceChar(parser);
|
||
}
|
||
const flags = parser.source.slice(flagStart, parser.index);
|
||
const pattern = parser.source.slice(bodyStart, bodyEnd);
|
||
parser.tokenRegExp = { pattern, flags };
|
||
if (context & 512)
|
||
parser.tokenRaw = parser.source.slice(parser.tokenPos, parser.index);
|
||
parser.tokenValue = validate(parser, pattern, flags);
|
||
return 65540;
|
||
}
|
||
function validate(parser, pattern, flags) {
|
||
try {
|
||
return new RegExp(pattern, flags);
|
||
} catch (e) {
|
||
try {
|
||
new RegExp(pattern, flags.replace("d", ""));
|
||
return null;
|
||
} catch (e2) {
|
||
report(parser, 32);
|
||
}
|
||
}
|
||
}
|
||
function scanString2(parser, context, quote) {
|
||
const { index: start } = parser;
|
||
let ret = "";
|
||
let char = advanceChar(parser);
|
||
let marker = parser.index;
|
||
while ((CharTypes[char] & 8) === 0) {
|
||
if (char === quote) {
|
||
ret += parser.source.slice(marker, parser.index);
|
||
advanceChar(parser);
|
||
if (context & 512)
|
||
parser.tokenRaw = parser.source.slice(start, parser.index);
|
||
parser.tokenValue = ret;
|
||
return 134283267;
|
||
}
|
||
if ((char & 8) === 8 && char === 92) {
|
||
ret += parser.source.slice(marker, parser.index);
|
||
char = advanceChar(parser);
|
||
if (char < 127 || char === 8232 || char === 8233) {
|
||
const code2 = parseEscape(parser, context, char);
|
||
if (code2 >= 0)
|
||
ret += fromCodePoint2(code2);
|
||
else
|
||
handleStringError(parser, code2, 0);
|
||
} else {
|
||
ret += fromCodePoint2(char);
|
||
}
|
||
marker = parser.index + 1;
|
||
}
|
||
if (parser.index >= parser.end)
|
||
report(parser, 14);
|
||
char = advanceChar(parser);
|
||
}
|
||
report(parser, 14);
|
||
}
|
||
function parseEscape(parser, context, first) {
|
||
switch (first) {
|
||
case 98:
|
||
return 8;
|
||
case 102:
|
||
return 12;
|
||
case 114:
|
||
return 13;
|
||
case 110:
|
||
return 10;
|
||
case 116:
|
||
return 9;
|
||
case 118:
|
||
return 11;
|
||
case 13: {
|
||
if (parser.index < parser.end) {
|
||
const nextChar = parser.source.charCodeAt(parser.index + 1);
|
||
if (nextChar === 10) {
|
||
parser.index = parser.index + 1;
|
||
parser.currentChar = nextChar;
|
||
}
|
||
}
|
||
}
|
||
case 10:
|
||
case 8232:
|
||
case 8233:
|
||
parser.column = -1;
|
||
parser.line++;
|
||
return -1;
|
||
case 48:
|
||
case 49:
|
||
case 50:
|
||
case 51: {
|
||
let code2 = first - 48;
|
||
let index = parser.index + 1;
|
||
let column = parser.column + 1;
|
||
if (index < parser.end) {
|
||
const next = parser.source.charCodeAt(index);
|
||
if ((CharTypes[next] & 32) === 0) {
|
||
if ((code2 !== 0 || CharTypes[next] & 512) && context & 1024)
|
||
return -2;
|
||
} else if (context & 1024) {
|
||
return -2;
|
||
} else {
|
||
parser.currentChar = next;
|
||
code2 = code2 << 3 | next - 48;
|
||
index++;
|
||
column++;
|
||
if (index < parser.end) {
|
||
const next2 = parser.source.charCodeAt(index);
|
||
if (CharTypes[next2] & 32) {
|
||
parser.currentChar = next2;
|
||
code2 = code2 << 3 | next2 - 48;
|
||
index++;
|
||
column++;
|
||
}
|
||
}
|
||
parser.flags |= 64;
|
||
parser.index = index - 1;
|
||
parser.column = column - 1;
|
||
}
|
||
}
|
||
return code2;
|
||
}
|
||
case 52:
|
||
case 53:
|
||
case 54:
|
||
case 55: {
|
||
if (context & 1024)
|
||
return -2;
|
||
let code2 = first - 48;
|
||
const index = parser.index + 1;
|
||
const column = parser.column + 1;
|
||
if (index < parser.end) {
|
||
const next = parser.source.charCodeAt(index);
|
||
if (CharTypes[next] & 32) {
|
||
code2 = code2 << 3 | next - 48;
|
||
parser.currentChar = next;
|
||
parser.index = index;
|
||
parser.column = column;
|
||
}
|
||
}
|
||
parser.flags |= 64;
|
||
return code2;
|
||
}
|
||
case 120: {
|
||
const ch1 = advanceChar(parser);
|
||
if ((CharTypes[ch1] & 64) === 0)
|
||
return -4;
|
||
const hi = toHex(ch1);
|
||
const ch2 = advanceChar(parser);
|
||
if ((CharTypes[ch2] & 64) === 0)
|
||
return -4;
|
||
const lo = toHex(ch2);
|
||
return hi << 4 | lo;
|
||
}
|
||
case 117: {
|
||
const ch = advanceChar(parser);
|
||
if (parser.currentChar === 123) {
|
||
let code2 = 0;
|
||
while ((CharTypes[advanceChar(parser)] & 64) !== 0) {
|
||
code2 = code2 << 4 | toHex(parser.currentChar);
|
||
if (code2 > 1114111)
|
||
return -5;
|
||
}
|
||
if (parser.currentChar < 1 || parser.currentChar !== 125) {
|
||
return -4;
|
||
}
|
||
return code2;
|
||
} else {
|
||
if ((CharTypes[ch] & 64) === 0)
|
||
return -4;
|
||
const ch2 = parser.source.charCodeAt(parser.index + 1);
|
||
if ((CharTypes[ch2] & 64) === 0)
|
||
return -4;
|
||
const ch3 = parser.source.charCodeAt(parser.index + 2);
|
||
if ((CharTypes[ch3] & 64) === 0)
|
||
return -4;
|
||
const ch4 = parser.source.charCodeAt(parser.index + 3);
|
||
if ((CharTypes[ch4] & 64) === 0)
|
||
return -4;
|
||
parser.index += 3;
|
||
parser.column += 3;
|
||
parser.currentChar = parser.source.charCodeAt(parser.index);
|
||
return toHex(ch) << 12 | toHex(ch2) << 8 | toHex(ch3) << 4 | toHex(ch4);
|
||
}
|
||
}
|
||
case 56:
|
||
case 57:
|
||
if ((context & 256) === 0)
|
||
return -3;
|
||
default:
|
||
return first;
|
||
}
|
||
}
|
||
function handleStringError(state, code2, isTemplate) {
|
||
switch (code2) {
|
||
case -1:
|
||
return;
|
||
case -2:
|
||
report(state, isTemplate ? 2 : 1);
|
||
case -3:
|
||
report(state, 13);
|
||
case -4:
|
||
report(state, 6);
|
||
case -5:
|
||
report(state, 102);
|
||
}
|
||
}
|
||
function scanTemplate(parser, context) {
|
||
const { index: start } = parser;
|
||
let token = 67174409;
|
||
let ret = "";
|
||
let char = advanceChar(parser);
|
||
while (char !== 96) {
|
||
if (char === 36 && parser.source.charCodeAt(parser.index + 1) === 123) {
|
||
advanceChar(parser);
|
||
token = 67174408;
|
||
break;
|
||
} else if ((char & 8) === 8 && char === 92) {
|
||
char = advanceChar(parser);
|
||
if (char > 126) {
|
||
ret += fromCodePoint2(char);
|
||
} else {
|
||
const code2 = parseEscape(parser, context | 1024, char);
|
||
if (code2 >= 0) {
|
||
ret += fromCodePoint2(code2);
|
||
} else if (code2 !== -1 && context & 65536) {
|
||
ret = void 0;
|
||
char = scanBadTemplate(parser, char);
|
||
if (char < 0)
|
||
token = 67174408;
|
||
break;
|
||
} else {
|
||
handleStringError(parser, code2, 1);
|
||
}
|
||
}
|
||
} else {
|
||
if (parser.index < parser.end && char === 13 && parser.source.charCodeAt(parser.index) === 10) {
|
||
ret += fromCodePoint2(char);
|
||
parser.currentChar = parser.source.charCodeAt(++parser.index);
|
||
}
|
||
if ((char & 83) < 3 && char === 10 || (char ^ 8232) <= 1) {
|
||
parser.column = -1;
|
||
parser.line++;
|
||
}
|
||
ret += fromCodePoint2(char);
|
||
}
|
||
if (parser.index >= parser.end)
|
||
report(parser, 15);
|
||
char = advanceChar(parser);
|
||
}
|
||
advanceChar(parser);
|
||
parser.tokenValue = ret;
|
||
parser.tokenRaw = parser.source.slice(start + 1, parser.index - (token === 67174409 ? 1 : 2));
|
||
return token;
|
||
}
|
||
function scanBadTemplate(parser, ch) {
|
||
while (ch !== 96) {
|
||
switch (ch) {
|
||
case 36: {
|
||
const index = parser.index + 1;
|
||
if (index < parser.end && parser.source.charCodeAt(index) === 123) {
|
||
parser.index = index;
|
||
parser.column++;
|
||
return -ch;
|
||
}
|
||
break;
|
||
}
|
||
case 10:
|
||
case 8232:
|
||
case 8233:
|
||
parser.column = -1;
|
||
parser.line++;
|
||
}
|
||
if (parser.index >= parser.end)
|
||
report(parser, 15);
|
||
ch = advanceChar(parser);
|
||
}
|
||
return ch;
|
||
}
|
||
function scanTemplateTail(parser, context) {
|
||
if (parser.index >= parser.end)
|
||
report(parser, 0);
|
||
parser.index--;
|
||
parser.column--;
|
||
return scanTemplate(parser, context);
|
||
}
|
||
function scanNumber2(parser, context, kind) {
|
||
let char = parser.currentChar;
|
||
let value = 0;
|
||
let digit = 9;
|
||
let atStart = kind & 64 ? 0 : 1;
|
||
let digits = 0;
|
||
let allowSeparator = 0;
|
||
if (kind & 64) {
|
||
value = "." + scanDecimalDigitsOrSeparator(parser, char);
|
||
char = parser.currentChar;
|
||
if (char === 110)
|
||
report(parser, 11);
|
||
} else {
|
||
if (char === 48) {
|
||
char = advanceChar(parser);
|
||
if ((char | 32) === 120) {
|
||
kind = 8 | 128;
|
||
char = advanceChar(parser);
|
||
while (CharTypes[char] & (64 | 4096)) {
|
||
if (char === 95) {
|
||
if (!allowSeparator)
|
||
report(parser, 147);
|
||
allowSeparator = 0;
|
||
char = advanceChar(parser);
|
||
continue;
|
||
}
|
||
allowSeparator = 1;
|
||
value = value * 16 + toHex(char);
|
||
digits++;
|
||
char = advanceChar(parser);
|
||
}
|
||
if (digits === 0 || !allowSeparator) {
|
||
report(parser, digits === 0 ? 19 : 148);
|
||
}
|
||
} else if ((char | 32) === 111) {
|
||
kind = 4 | 128;
|
||
char = advanceChar(parser);
|
||
while (CharTypes[char] & (32 | 4096)) {
|
||
if (char === 95) {
|
||
if (!allowSeparator) {
|
||
report(parser, 147);
|
||
}
|
||
allowSeparator = 0;
|
||
char = advanceChar(parser);
|
||
continue;
|
||
}
|
||
allowSeparator = 1;
|
||
value = value * 8 + (char - 48);
|
||
digits++;
|
||
char = advanceChar(parser);
|
||
}
|
||
if (digits === 0 || !allowSeparator) {
|
||
report(parser, digits === 0 ? 0 : 148);
|
||
}
|
||
} else if ((char | 32) === 98) {
|
||
kind = 2 | 128;
|
||
char = advanceChar(parser);
|
||
while (CharTypes[char] & (128 | 4096)) {
|
||
if (char === 95) {
|
||
if (!allowSeparator) {
|
||
report(parser, 147);
|
||
}
|
||
allowSeparator = 0;
|
||
char = advanceChar(parser);
|
||
continue;
|
||
}
|
||
allowSeparator = 1;
|
||
value = value * 2 + (char - 48);
|
||
digits++;
|
||
char = advanceChar(parser);
|
||
}
|
||
if (digits === 0 || !allowSeparator) {
|
||
report(parser, digits === 0 ? 0 : 148);
|
||
}
|
||
} else if (CharTypes[char] & 32) {
|
||
if (context & 1024)
|
||
report(parser, 1);
|
||
kind = 1;
|
||
while (CharTypes[char] & 16) {
|
||
if (CharTypes[char] & 512) {
|
||
kind = 32;
|
||
atStart = 0;
|
||
break;
|
||
}
|
||
value = value * 8 + (char - 48);
|
||
char = advanceChar(parser);
|
||
}
|
||
} else if (CharTypes[char] & 512) {
|
||
if (context & 1024)
|
||
report(parser, 1);
|
||
parser.flags |= 64;
|
||
kind = 32;
|
||
} else if (char === 95) {
|
||
report(parser, 0);
|
||
}
|
||
}
|
||
if (kind & 48) {
|
||
if (atStart) {
|
||
while (digit >= 0 && CharTypes[char] & (16 | 4096)) {
|
||
if (char === 95) {
|
||
char = advanceChar(parser);
|
||
if (char === 95 || kind & 32) {
|
||
reportScannerError(parser.index, parser.line, parser.index + 1, 147);
|
||
}
|
||
allowSeparator = 1;
|
||
continue;
|
||
}
|
||
allowSeparator = 0;
|
||
value = 10 * value + (char - 48);
|
||
char = advanceChar(parser);
|
||
--digit;
|
||
}
|
||
if (allowSeparator) {
|
||
reportScannerError(parser.index, parser.line, parser.index + 1, 148);
|
||
}
|
||
if (digit >= 0 && !isIdentifierStart2(char) && char !== 46) {
|
||
parser.tokenValue = value;
|
||
if (context & 512)
|
||
parser.tokenRaw = parser.source.slice(parser.tokenPos, parser.index);
|
||
return 134283266;
|
||
}
|
||
}
|
||
value += scanDecimalDigitsOrSeparator(parser, char);
|
||
char = parser.currentChar;
|
||
if (char === 46) {
|
||
if (advanceChar(parser) === 95)
|
||
report(parser, 0);
|
||
kind = 64;
|
||
value += "." + scanDecimalDigitsOrSeparator(parser, parser.currentChar);
|
||
char = parser.currentChar;
|
||
}
|
||
}
|
||
}
|
||
const end = parser.index;
|
||
let isBigInt = 0;
|
||
if (char === 110 && kind & 128) {
|
||
isBigInt = 1;
|
||
char = advanceChar(parser);
|
||
} else {
|
||
if ((char | 32) === 101) {
|
||
char = advanceChar(parser);
|
||
if (CharTypes[char] & 256)
|
||
char = advanceChar(parser);
|
||
const { index } = parser;
|
||
if ((CharTypes[char] & 16) === 0)
|
||
report(parser, 10);
|
||
value += parser.source.substring(end, index) + scanDecimalDigitsOrSeparator(parser, char);
|
||
char = parser.currentChar;
|
||
}
|
||
}
|
||
if (parser.index < parser.end && CharTypes[char] & 16 || isIdentifierStart2(char)) {
|
||
report(parser, 12);
|
||
}
|
||
if (isBigInt) {
|
||
parser.tokenRaw = parser.source.slice(parser.tokenPos, parser.index);
|
||
parser.tokenValue = BigInt(value);
|
||
return 134283389;
|
||
}
|
||
parser.tokenValue = kind & (1 | 2 | 8 | 4) ? value : kind & 32 ? parseFloat(parser.source.substring(parser.tokenPos, parser.index)) : +value;
|
||
if (context & 512)
|
||
parser.tokenRaw = parser.source.slice(parser.tokenPos, parser.index);
|
||
return 134283266;
|
||
}
|
||
function scanDecimalDigitsOrSeparator(parser, char) {
|
||
let allowSeparator = 0;
|
||
let start = parser.index;
|
||
let ret = "";
|
||
while (CharTypes[char] & (16 | 4096)) {
|
||
if (char === 95) {
|
||
const { index } = parser;
|
||
char = advanceChar(parser);
|
||
if (char === 95) {
|
||
reportScannerError(parser.index, parser.line, parser.index + 1, 147);
|
||
}
|
||
allowSeparator = 1;
|
||
ret += parser.source.substring(start, index);
|
||
start = parser.index;
|
||
continue;
|
||
}
|
||
allowSeparator = 0;
|
||
char = advanceChar(parser);
|
||
}
|
||
if (allowSeparator) {
|
||
reportScannerError(parser.index, parser.line, parser.index + 1, 148);
|
||
}
|
||
return ret + parser.source.substring(start, parser.index);
|
||
}
|
||
var KeywordDescTable = [
|
||
"end of source",
|
||
"identifier",
|
||
"number",
|
||
"string",
|
||
"regular expression",
|
||
"false",
|
||
"true",
|
||
"null",
|
||
"template continuation",
|
||
"template tail",
|
||
"=>",
|
||
"(",
|
||
"{",
|
||
".",
|
||
"...",
|
||
"}",
|
||
")",
|
||
";",
|
||
",",
|
||
"[",
|
||
"]",
|
||
":",
|
||
"?",
|
||
"'",
|
||
'"',
|
||
"</",
|
||
"/>",
|
||
"++",
|
||
"--",
|
||
"=",
|
||
"<<=",
|
||
">>=",
|
||
">>>=",
|
||
"**=",
|
||
"+=",
|
||
"-=",
|
||
"*=",
|
||
"/=",
|
||
"%=",
|
||
"^=",
|
||
"|=",
|
||
"&=",
|
||
"||=",
|
||
"&&=",
|
||
"??=",
|
||
"typeof",
|
||
"delete",
|
||
"void",
|
||
"!",
|
||
"~",
|
||
"+",
|
||
"-",
|
||
"in",
|
||
"instanceof",
|
||
"*",
|
||
"%",
|
||
"/",
|
||
"**",
|
||
"&&",
|
||
"||",
|
||
"===",
|
||
"!==",
|
||
"==",
|
||
"!=",
|
||
"<=",
|
||
">=",
|
||
"<",
|
||
">",
|
||
"<<",
|
||
">>",
|
||
">>>",
|
||
"&",
|
||
"|",
|
||
"^",
|
||
"var",
|
||
"let",
|
||
"const",
|
||
"break",
|
||
"case",
|
||
"catch",
|
||
"class",
|
||
"continue",
|
||
"debugger",
|
||
"default",
|
||
"do",
|
||
"else",
|
||
"export",
|
||
"extends",
|
||
"finally",
|
||
"for",
|
||
"function",
|
||
"if",
|
||
"import",
|
||
"new",
|
||
"return",
|
||
"super",
|
||
"switch",
|
||
"this",
|
||
"throw",
|
||
"try",
|
||
"while",
|
||
"with",
|
||
"implements",
|
||
"interface",
|
||
"package",
|
||
"private",
|
||
"protected",
|
||
"public",
|
||
"static",
|
||
"yield",
|
||
"as",
|
||
"async",
|
||
"await",
|
||
"constructor",
|
||
"get",
|
||
"set",
|
||
"from",
|
||
"of",
|
||
"enum",
|
||
"eval",
|
||
"arguments",
|
||
"escaped keyword",
|
||
"escaped future reserved keyword",
|
||
"reserved if strict",
|
||
"#",
|
||
"BigIntLiteral",
|
||
"??",
|
||
"?.",
|
||
"WhiteSpace",
|
||
"Illegal",
|
||
"LineTerminator",
|
||
"PrivateField",
|
||
"Template",
|
||
"@",
|
||
"target",
|
||
"meta",
|
||
"LineFeed",
|
||
"Escaped",
|
||
"JSXText"
|
||
];
|
||
var descKeywordTable = Object.create(null, {
|
||
this: { value: 86113 },
|
||
function: { value: 86106 },
|
||
if: { value: 20571 },
|
||
return: { value: 20574 },
|
||
var: { value: 86090 },
|
||
else: { value: 20565 },
|
||
for: { value: 20569 },
|
||
new: { value: 86109 },
|
||
in: { value: 8738868 },
|
||
typeof: { value: 16863277 },
|
||
while: { value: 20580 },
|
||
case: { value: 20558 },
|
||
break: { value: 20557 },
|
||
try: { value: 20579 },
|
||
catch: { value: 20559 },
|
||
delete: { value: 16863278 },
|
||
throw: { value: 86114 },
|
||
switch: { value: 86112 },
|
||
continue: { value: 20561 },
|
||
default: { value: 20563 },
|
||
instanceof: { value: 8476725 },
|
||
do: { value: 20564 },
|
||
void: { value: 16863279 },
|
||
finally: { value: 20568 },
|
||
async: { value: 209007 },
|
||
await: { value: 209008 },
|
||
class: { value: 86096 },
|
||
const: { value: 86092 },
|
||
constructor: { value: 12401 },
|
||
debugger: { value: 20562 },
|
||
export: { value: 20566 },
|
||
extends: { value: 20567 },
|
||
false: { value: 86021 },
|
||
from: { value: 12404 },
|
||
get: { value: 12402 },
|
||
implements: { value: 36966 },
|
||
import: { value: 86108 },
|
||
interface: { value: 36967 },
|
||
let: { value: 241739 },
|
||
null: { value: 86023 },
|
||
of: { value: 274549 },
|
||
package: { value: 36968 },
|
||
private: { value: 36969 },
|
||
protected: { value: 36970 },
|
||
public: { value: 36971 },
|
||
set: { value: 12403 },
|
||
static: { value: 36972 },
|
||
super: { value: 86111 },
|
||
true: { value: 86022 },
|
||
with: { value: 20581 },
|
||
yield: { value: 241773 },
|
||
enum: { value: 86134 },
|
||
eval: { value: 537079927 },
|
||
as: { value: 77934 },
|
||
arguments: { value: 537079928 },
|
||
target: { value: 143494 },
|
||
meta: { value: 143495 }
|
||
});
|
||
function scanIdentifier(parser, context, isValidAsKeyword) {
|
||
while (isIdPart[advanceChar(parser)]) {
|
||
}
|
||
parser.tokenValue = parser.source.slice(parser.tokenPos, parser.index);
|
||
return parser.currentChar !== 92 && parser.currentChar <= 126 ? descKeywordTable[parser.tokenValue] || 208897 : scanIdentifierSlowCase(parser, context, 0, isValidAsKeyword);
|
||
}
|
||
function scanUnicodeIdentifier(parser, context) {
|
||
const cookedChar = scanIdentifierUnicodeEscape(parser);
|
||
if (!isIdentifierPart(cookedChar))
|
||
report(parser, 4);
|
||
parser.tokenValue = fromCodePoint2(cookedChar);
|
||
return scanIdentifierSlowCase(parser, context, 1, CharTypes[cookedChar] & 4);
|
||
}
|
||
function scanIdentifierSlowCase(parser, context, hasEscape, isValidAsKeyword) {
|
||
let start = parser.index;
|
||
while (parser.index < parser.end) {
|
||
if (parser.currentChar === 92) {
|
||
parser.tokenValue += parser.source.slice(start, parser.index);
|
||
hasEscape = 1;
|
||
const code2 = scanIdentifierUnicodeEscape(parser);
|
||
if (!isIdentifierPart(code2))
|
||
report(parser, 4);
|
||
isValidAsKeyword = isValidAsKeyword && CharTypes[code2] & 4;
|
||
parser.tokenValue += fromCodePoint2(code2);
|
||
start = parser.index;
|
||
} else if (isIdentifierPart(parser.currentChar) || consumeMultiUnitCodePoint(parser, parser.currentChar)) {
|
||
advanceChar(parser);
|
||
} else {
|
||
break;
|
||
}
|
||
}
|
||
if (parser.index <= parser.end) {
|
||
parser.tokenValue += parser.source.slice(start, parser.index);
|
||
}
|
||
const length2 = parser.tokenValue.length;
|
||
if (isValidAsKeyword && length2 >= 2 && length2 <= 11) {
|
||
const token = descKeywordTable[parser.tokenValue];
|
||
if (token === void 0)
|
||
return 208897;
|
||
if (!hasEscape)
|
||
return token;
|
||
if (token === 209008) {
|
||
if ((context & (2048 | 4194304)) === 0) {
|
||
return token;
|
||
}
|
||
return 121;
|
||
}
|
||
if (context & 1024) {
|
||
if (token === 36972) {
|
||
return 122;
|
||
}
|
||
if ((token & 36864) === 36864) {
|
||
return 122;
|
||
}
|
||
if ((token & 20480) === 20480) {
|
||
if (context & 1073741824 && (context & 8192) === 0) {
|
||
return token;
|
||
} else {
|
||
return 121;
|
||
}
|
||
}
|
||
return 143483;
|
||
}
|
||
if (context & 1073741824 && (context & 8192) === 0 && (token & 20480) === 20480)
|
||
return token;
|
||
if (token === 241773) {
|
||
return context & 1073741824 ? 143483 : context & 2097152 ? 121 : token;
|
||
}
|
||
if (token === 209007) {
|
||
return 143483;
|
||
}
|
||
if ((token & 36864) === 36864) {
|
||
return token;
|
||
}
|
||
return 121;
|
||
}
|
||
return 208897;
|
||
}
|
||
function scanPrivateIdentifier(parser) {
|
||
if (!isIdentifierStart2(advanceChar(parser)))
|
||
report(parser, 94);
|
||
return 131;
|
||
}
|
||
function scanIdentifierUnicodeEscape(parser) {
|
||
if (parser.source.charCodeAt(parser.index + 1) !== 117) {
|
||
report(parser, 4);
|
||
}
|
||
parser.currentChar = parser.source.charCodeAt(parser.index += 2);
|
||
return scanUnicodeEscape(parser);
|
||
}
|
||
function scanUnicodeEscape(parser) {
|
||
let codePoint = 0;
|
||
const char = parser.currentChar;
|
||
if (char === 123) {
|
||
const begin = parser.index - 2;
|
||
while (CharTypes[advanceChar(parser)] & 64) {
|
||
codePoint = codePoint << 4 | toHex(parser.currentChar);
|
||
if (codePoint > 1114111)
|
||
reportScannerError(begin, parser.line, parser.index + 1, 102);
|
||
}
|
||
if (parser.currentChar !== 125) {
|
||
reportScannerError(begin, parser.line, parser.index - 1, 6);
|
||
}
|
||
advanceChar(parser);
|
||
return codePoint;
|
||
}
|
||
if ((CharTypes[char] & 64) === 0)
|
||
report(parser, 6);
|
||
const char2 = parser.source.charCodeAt(parser.index + 1);
|
||
if ((CharTypes[char2] & 64) === 0)
|
||
report(parser, 6);
|
||
const char3 = parser.source.charCodeAt(parser.index + 2);
|
||
if ((CharTypes[char3] & 64) === 0)
|
||
report(parser, 6);
|
||
const char4 = parser.source.charCodeAt(parser.index + 3);
|
||
if ((CharTypes[char4] & 64) === 0)
|
||
report(parser, 6);
|
||
codePoint = toHex(char) << 12 | toHex(char2) << 8 | toHex(char3) << 4 | toHex(char4);
|
||
parser.currentChar = parser.source.charCodeAt(parser.index += 4);
|
||
return codePoint;
|
||
}
|
||
var TokenLookup = [
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
128,
|
||
136,
|
||
128,
|
||
128,
|
||
130,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
129,
|
||
128,
|
||
16842800,
|
||
134283267,
|
||
131,
|
||
208897,
|
||
8457015,
|
||
8455751,
|
||
134283267,
|
||
67174411,
|
||
16,
|
||
8457014,
|
||
25233970,
|
||
18,
|
||
25233971,
|
||
67108877,
|
||
8457016,
|
||
134283266,
|
||
134283266,
|
||
134283266,
|
||
134283266,
|
||
134283266,
|
||
134283266,
|
||
134283266,
|
||
134283266,
|
||
134283266,
|
||
134283266,
|
||
21,
|
||
1074790417,
|
||
8456258,
|
||
1077936157,
|
||
8456259,
|
||
22,
|
||
133,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
208897,
|
||
69271571,
|
||
137,
|
||
20,
|
||
8455497,
|
||
208897,
|
||
132,
|
||
4096,
|
||
4096,
|
||
4096,
|
||
4096,
|
||
4096,
|
||
4096,
|
||
4096,
|
||
208897,
|
||
4096,
|
||
208897,
|
||
208897,
|
||
4096,
|
||
208897,
|
||
4096,
|
||
208897,
|
||
4096,
|
||
208897,
|
||
4096,
|
||
4096,
|
||
4096,
|
||
208897,
|
||
4096,
|
||
4096,
|
||
208897,
|
||
4096,
|
||
4096,
|
||
2162700,
|
||
8455240,
|
||
1074790415,
|
||
16842801,
|
||
129
|
||
];
|
||
function nextToken(parser, context) {
|
||
parser.flags = (parser.flags | 1) ^ 1;
|
||
parser.startPos = parser.index;
|
||
parser.startColumn = parser.column;
|
||
parser.startLine = parser.line;
|
||
parser.token = scanSingleToken(parser, context, 0);
|
||
if (parser.onToken && parser.token !== 1048576) {
|
||
const loc = {
|
||
start: {
|
||
line: parser.linePos,
|
||
column: parser.colPos
|
||
},
|
||
end: {
|
||
line: parser.line,
|
||
column: parser.column
|
||
}
|
||
};
|
||
parser.onToken(convertTokenType(parser.token), parser.tokenPos, parser.index, loc);
|
||
}
|
||
}
|
||
function scanSingleToken(parser, context, state) {
|
||
const isStartOfLine = parser.index === 0;
|
||
const source = parser.source;
|
||
let startPos = parser.index;
|
||
let startLine = parser.line;
|
||
let startColumn = parser.column;
|
||
while (parser.index < parser.end) {
|
||
parser.tokenPos = parser.index;
|
||
parser.colPos = parser.column;
|
||
parser.linePos = parser.line;
|
||
let char = parser.currentChar;
|
||
if (char <= 126) {
|
||
const token = TokenLookup[char];
|
||
switch (token) {
|
||
case 67174411:
|
||
case 16:
|
||
case 2162700:
|
||
case 1074790415:
|
||
case 69271571:
|
||
case 20:
|
||
case 21:
|
||
case 1074790417:
|
||
case 18:
|
||
case 16842801:
|
||
case 133:
|
||
case 129:
|
||
advanceChar(parser);
|
||
return token;
|
||
case 208897:
|
||
return scanIdentifier(parser, context, 0);
|
||
case 4096:
|
||
return scanIdentifier(parser, context, 1);
|
||
case 134283266:
|
||
return scanNumber2(parser, context, 16 | 128);
|
||
case 134283267:
|
||
return scanString2(parser, context, char);
|
||
case 132:
|
||
return scanTemplate(parser, context);
|
||
case 137:
|
||
return scanUnicodeIdentifier(parser, context);
|
||
case 131:
|
||
return scanPrivateIdentifier(parser);
|
||
case 128:
|
||
advanceChar(parser);
|
||
break;
|
||
case 130:
|
||
state |= 1 | 4;
|
||
scanNewLine(parser);
|
||
break;
|
||
case 136:
|
||
consumeLineFeed(parser, state);
|
||
state = state & ~4 | 1;
|
||
break;
|
||
case 8456258:
|
||
let ch = advanceChar(parser);
|
||
if (parser.index < parser.end) {
|
||
if (ch === 60) {
|
||
if (parser.index < parser.end && advanceChar(parser) === 61) {
|
||
advanceChar(parser);
|
||
return 4194334;
|
||
}
|
||
return 8456516;
|
||
} else if (ch === 61) {
|
||
advanceChar(parser);
|
||
return 8456256;
|
||
}
|
||
if (ch === 33) {
|
||
const index = parser.index + 1;
|
||
if (index + 1 < parser.end && source.charCodeAt(index) === 45 && source.charCodeAt(index + 1) == 45) {
|
||
parser.column += 3;
|
||
parser.currentChar = source.charCodeAt(parser.index += 3);
|
||
state = skipSingleHTMLComment(parser, source, state, context, 2, parser.tokenPos, parser.linePos, parser.colPos);
|
||
startPos = parser.tokenPos;
|
||
startLine = parser.linePos;
|
||
startColumn = parser.colPos;
|
||
continue;
|
||
}
|
||
return 8456258;
|
||
}
|
||
if (ch === 47) {
|
||
if ((context & 16) === 0)
|
||
return 8456258;
|
||
const index = parser.index + 1;
|
||
if (index < parser.end) {
|
||
ch = source.charCodeAt(index);
|
||
if (ch === 42 || ch === 47)
|
||
break;
|
||
}
|
||
advanceChar(parser);
|
||
return 25;
|
||
}
|
||
}
|
||
return 8456258;
|
||
case 1077936157: {
|
||
advanceChar(parser);
|
||
const ch2 = parser.currentChar;
|
||
if (ch2 === 61) {
|
||
if (advanceChar(parser) === 61) {
|
||
advanceChar(parser);
|
||
return 8455996;
|
||
}
|
||
return 8455998;
|
||
}
|
||
if (ch2 === 62) {
|
||
advanceChar(parser);
|
||
return 10;
|
||
}
|
||
return 1077936157;
|
||
}
|
||
case 16842800:
|
||
if (advanceChar(parser) !== 61) {
|
||
return 16842800;
|
||
}
|
||
if (advanceChar(parser) !== 61) {
|
||
return 8455999;
|
||
}
|
||
advanceChar(parser);
|
||
return 8455997;
|
||
case 8457015:
|
||
if (advanceChar(parser) !== 61)
|
||
return 8457015;
|
||
advanceChar(parser);
|
||
return 4194342;
|
||
case 8457014: {
|
||
advanceChar(parser);
|
||
if (parser.index >= parser.end)
|
||
return 8457014;
|
||
const ch2 = parser.currentChar;
|
||
if (ch2 === 61) {
|
||
advanceChar(parser);
|
||
return 4194340;
|
||
}
|
||
if (ch2 !== 42)
|
||
return 8457014;
|
||
if (advanceChar(parser) !== 61)
|
||
return 8457273;
|
||
advanceChar(parser);
|
||
return 4194337;
|
||
}
|
||
case 8455497:
|
||
if (advanceChar(parser) !== 61)
|
||
return 8455497;
|
||
advanceChar(parser);
|
||
return 4194343;
|
||
case 25233970: {
|
||
advanceChar(parser);
|
||
const ch2 = parser.currentChar;
|
||
if (ch2 === 43) {
|
||
advanceChar(parser);
|
||
return 33619995;
|
||
}
|
||
if (ch2 === 61) {
|
||
advanceChar(parser);
|
||
return 4194338;
|
||
}
|
||
return 25233970;
|
||
}
|
||
case 25233971: {
|
||
advanceChar(parser);
|
||
const ch2 = parser.currentChar;
|
||
if (ch2 === 45) {
|
||
advanceChar(parser);
|
||
if ((state & 1 || isStartOfLine) && parser.currentChar === 62) {
|
||
if ((context & 256) === 0)
|
||
report(parser, 109);
|
||
advanceChar(parser);
|
||
state = skipSingleHTMLComment(parser, source, state, context, 3, startPos, startLine, startColumn);
|
||
startPos = parser.tokenPos;
|
||
startLine = parser.linePos;
|
||
startColumn = parser.colPos;
|
||
continue;
|
||
}
|
||
return 33619996;
|
||
}
|
||
if (ch2 === 61) {
|
||
advanceChar(parser);
|
||
return 4194339;
|
||
}
|
||
return 25233971;
|
||
}
|
||
case 8457016: {
|
||
advanceChar(parser);
|
||
if (parser.index < parser.end) {
|
||
const ch2 = parser.currentChar;
|
||
if (ch2 === 47) {
|
||
advanceChar(parser);
|
||
state = skipSingleLineComment(parser, source, state, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
startPos = parser.tokenPos;
|
||
startLine = parser.linePos;
|
||
startColumn = parser.colPos;
|
||
continue;
|
||
}
|
||
if (ch2 === 42) {
|
||
advanceChar(parser);
|
||
state = skipMultiLineComment(parser, source, state);
|
||
startPos = parser.tokenPos;
|
||
startLine = parser.linePos;
|
||
startColumn = parser.colPos;
|
||
continue;
|
||
}
|
||
if (context & 32768) {
|
||
return scanRegularExpression(parser, context);
|
||
}
|
||
if (ch2 === 61) {
|
||
advanceChar(parser);
|
||
return 4259877;
|
||
}
|
||
}
|
||
return 8457016;
|
||
}
|
||
case 67108877:
|
||
const next = advanceChar(parser);
|
||
if (next >= 48 && next <= 57)
|
||
return scanNumber2(parser, context, 64 | 16);
|
||
if (next === 46) {
|
||
const index = parser.index + 1;
|
||
if (index < parser.end && source.charCodeAt(index) === 46) {
|
||
parser.column += 2;
|
||
parser.currentChar = source.charCodeAt(parser.index += 2);
|
||
return 14;
|
||
}
|
||
}
|
||
return 67108877;
|
||
case 8455240: {
|
||
advanceChar(parser);
|
||
const ch2 = parser.currentChar;
|
||
if (ch2 === 124) {
|
||
advanceChar(parser);
|
||
if (parser.currentChar === 61) {
|
||
advanceChar(parser);
|
||
return 4194346;
|
||
}
|
||
return 8979003;
|
||
}
|
||
if (ch2 === 61) {
|
||
advanceChar(parser);
|
||
return 4194344;
|
||
}
|
||
return 8455240;
|
||
}
|
||
case 8456259: {
|
||
advanceChar(parser);
|
||
const ch2 = parser.currentChar;
|
||
if (ch2 === 61) {
|
||
advanceChar(parser);
|
||
return 8456257;
|
||
}
|
||
if (ch2 !== 62)
|
||
return 8456259;
|
||
advanceChar(parser);
|
||
if (parser.index < parser.end) {
|
||
const ch3 = parser.currentChar;
|
||
if (ch3 === 62) {
|
||
if (advanceChar(parser) === 61) {
|
||
advanceChar(parser);
|
||
return 4194336;
|
||
}
|
||
return 8456518;
|
||
}
|
||
if (ch3 === 61) {
|
||
advanceChar(parser);
|
||
return 4194335;
|
||
}
|
||
}
|
||
return 8456517;
|
||
}
|
||
case 8455751: {
|
||
advanceChar(parser);
|
||
const ch2 = parser.currentChar;
|
||
if (ch2 === 38) {
|
||
advanceChar(parser);
|
||
if (parser.currentChar === 61) {
|
||
advanceChar(parser);
|
||
return 4194347;
|
||
}
|
||
return 8979258;
|
||
}
|
||
if (ch2 === 61) {
|
||
advanceChar(parser);
|
||
return 4194345;
|
||
}
|
||
return 8455751;
|
||
}
|
||
case 22: {
|
||
let ch2 = advanceChar(parser);
|
||
if (ch2 === 63) {
|
||
advanceChar(parser);
|
||
if (parser.currentChar === 61) {
|
||
advanceChar(parser);
|
||
return 4194348;
|
||
}
|
||
return 276889982;
|
||
}
|
||
if (ch2 === 46) {
|
||
const index = parser.index + 1;
|
||
if (index < parser.end) {
|
||
ch2 = source.charCodeAt(index);
|
||
if (!(ch2 >= 48 && ch2 <= 57)) {
|
||
advanceChar(parser);
|
||
return 67108991;
|
||
}
|
||
}
|
||
}
|
||
return 22;
|
||
}
|
||
}
|
||
} else {
|
||
if ((char ^ 8232) <= 1) {
|
||
state = state & ~4 | 1;
|
||
scanNewLine(parser);
|
||
continue;
|
||
}
|
||
if ((char & 64512) === 55296 || (unicodeLookup[(char >>> 5) + 34816] >>> char & 31 & 1) !== 0) {
|
||
if ((char & 64512) === 56320) {
|
||
char = (char & 1023) << 10 | char & 1023 | 65536;
|
||
if ((unicodeLookup[(char >>> 5) + 0] >>> char & 31 & 1) === 0) {
|
||
report(parser, 18, fromCodePoint2(char));
|
||
}
|
||
parser.index++;
|
||
parser.currentChar = char;
|
||
}
|
||
parser.column++;
|
||
parser.tokenValue = "";
|
||
return scanIdentifierSlowCase(parser, context, 0, 0);
|
||
}
|
||
if (isExoticECMAScriptWhitespace(char)) {
|
||
advanceChar(parser);
|
||
continue;
|
||
}
|
||
report(parser, 18, fromCodePoint2(char));
|
||
}
|
||
}
|
||
return 1048576;
|
||
}
|
||
var entities = {
|
||
AElig: "\xC6",
|
||
AMP: "&",
|
||
Aacute: "\xC1",
|
||
Abreve: "\u0102",
|
||
Acirc: "\xC2",
|
||
Acy: "\u0410",
|
||
Afr: "\u{1D504}",
|
||
Agrave: "\xC0",
|
||
Alpha: "\u0391",
|
||
Amacr: "\u0100",
|
||
And: "\u2A53",
|
||
Aogon: "\u0104",
|
||
Aopf: "\u{1D538}",
|
||
ApplyFunction: "\u2061",
|
||
Aring: "\xC5",
|
||
Ascr: "\u{1D49C}",
|
||
Assign: "\u2254",
|
||
Atilde: "\xC3",
|
||
Auml: "\xC4",
|
||
Backslash: "\u2216",
|
||
Barv: "\u2AE7",
|
||
Barwed: "\u2306",
|
||
Bcy: "\u0411",
|
||
Because: "\u2235",
|
||
Bernoullis: "\u212C",
|
||
Beta: "\u0392",
|
||
Bfr: "\u{1D505}",
|
||
Bopf: "\u{1D539}",
|
||
Breve: "\u02D8",
|
||
Bscr: "\u212C",
|
||
Bumpeq: "\u224E",
|
||
CHcy: "\u0427",
|
||
COPY: "\xA9",
|
||
Cacute: "\u0106",
|
||
Cap: "\u22D2",
|
||
CapitalDifferentialD: "\u2145",
|
||
Cayleys: "\u212D",
|
||
Ccaron: "\u010C",
|
||
Ccedil: "\xC7",
|
||
Ccirc: "\u0108",
|
||
Cconint: "\u2230",
|
||
Cdot: "\u010A",
|
||
Cedilla: "\xB8",
|
||
CenterDot: "\xB7",
|
||
Cfr: "\u212D",
|
||
Chi: "\u03A7",
|
||
CircleDot: "\u2299",
|
||
CircleMinus: "\u2296",
|
||
CirclePlus: "\u2295",
|
||
CircleTimes: "\u2297",
|
||
ClockwiseContourIntegral: "\u2232",
|
||
CloseCurlyDoubleQuote: "\u201D",
|
||
CloseCurlyQuote: "\u2019",
|
||
Colon: "\u2237",
|
||
Colone: "\u2A74",
|
||
Congruent: "\u2261",
|
||
Conint: "\u222F",
|
||
ContourIntegral: "\u222E",
|
||
Copf: "\u2102",
|
||
Coproduct: "\u2210",
|
||
CounterClockwiseContourIntegral: "\u2233",
|
||
Cross: "\u2A2F",
|
||
Cscr: "\u{1D49E}",
|
||
Cup: "\u22D3",
|
||
CupCap: "\u224D",
|
||
DD: "\u2145",
|
||
DDotrahd: "\u2911",
|
||
DJcy: "\u0402",
|
||
DScy: "\u0405",
|
||
DZcy: "\u040F",
|
||
Dagger: "\u2021",
|
||
Darr: "\u21A1",
|
||
Dashv: "\u2AE4",
|
||
Dcaron: "\u010E",
|
||
Dcy: "\u0414",
|
||
Del: "\u2207",
|
||
Delta: "\u0394",
|
||
Dfr: "\u{1D507}",
|
||
DiacriticalAcute: "\xB4",
|
||
DiacriticalDot: "\u02D9",
|
||
DiacriticalDoubleAcute: "\u02DD",
|
||
DiacriticalGrave: "`",
|
||
DiacriticalTilde: "\u02DC",
|
||
Diamond: "\u22C4",
|
||
DifferentialD: "\u2146",
|
||
Dopf: "\u{1D53B}",
|
||
Dot: "\xA8",
|
||
DotDot: "\u20DC",
|
||
DotEqual: "\u2250",
|
||
DoubleContourIntegral: "\u222F",
|
||
DoubleDot: "\xA8",
|
||
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",
|
||
DownArrowBar: "\u2913",
|
||
DownArrowUpArrow: "\u21F5",
|
||
DownBreve: "\u0311",
|
||
DownLeftRightVector: "\u2950",
|
||
DownLeftTeeVector: "\u295E",
|
||
DownLeftVector: "\u21BD",
|
||
DownLeftVectorBar: "\u2956",
|
||
DownRightTeeVector: "\u295F",
|
||
DownRightVector: "\u21C1",
|
||
DownRightVectorBar: "\u2957",
|
||
DownTee: "\u22A4",
|
||
DownTeeArrow: "\u21A7",
|
||
Downarrow: "\u21D3",
|
||
Dscr: "\u{1D49F}",
|
||
Dstrok: "\u0110",
|
||
ENG: "\u014A",
|
||
ETH: "\xD0",
|
||
Eacute: "\xC9",
|
||
Ecaron: "\u011A",
|
||
Ecirc: "\xCA",
|
||
Ecy: "\u042D",
|
||
Edot: "\u0116",
|
||
Efr: "\u{1D508}",
|
||
Egrave: "\xC8",
|
||
Element: "\u2208",
|
||
Emacr: "\u0112",
|
||
EmptySmallSquare: "\u25FB",
|
||
EmptyVerySmallSquare: "\u25AB",
|
||
Eogon: "\u0118",
|
||
Eopf: "\u{1D53C}",
|
||
Epsilon: "\u0395",
|
||
Equal: "\u2A75",
|
||
EqualTilde: "\u2242",
|
||
Equilibrium: "\u21CC",
|
||
Escr: "\u2130",
|
||
Esim: "\u2A73",
|
||
Eta: "\u0397",
|
||
Euml: "\xCB",
|
||
Exists: "\u2203",
|
||
ExponentialE: "\u2147",
|
||
Fcy: "\u0424",
|
||
Ffr: "\u{1D509}",
|
||
FilledSmallSquare: "\u25FC",
|
||
FilledVerySmallSquare: "\u25AA",
|
||
Fopf: "\u{1D53D}",
|
||
ForAll: "\u2200",
|
||
Fouriertrf: "\u2131",
|
||
Fscr: "\u2131",
|
||
GJcy: "\u0403",
|
||
GT: ">",
|
||
Gamma: "\u0393",
|
||
Gammad: "\u03DC",
|
||
Gbreve: "\u011E",
|
||
Gcedil: "\u0122",
|
||
Gcirc: "\u011C",
|
||
Gcy: "\u0413",
|
||
Gdot: "\u0120",
|
||
Gfr: "\u{1D50A}",
|
||
Gg: "\u22D9",
|
||
Gopf: "\u{1D53E}",
|
||
GreaterEqual: "\u2265",
|
||
GreaterEqualLess: "\u22DB",
|
||
GreaterFullEqual: "\u2267",
|
||
GreaterGreater: "\u2AA2",
|
||
GreaterLess: "\u2277",
|
||
GreaterSlantEqual: "\u2A7E",
|
||
GreaterTilde: "\u2273",
|
||
Gscr: "\u{1D4A2}",
|
||
Gt: "\u226B",
|
||
HARDcy: "\u042A",
|
||
Hacek: "\u02C7",
|
||
Hat: "^",
|
||
Hcirc: "\u0124",
|
||
Hfr: "\u210C",
|
||
HilbertSpace: "\u210B",
|
||
Hopf: "\u210D",
|
||
HorizontalLine: "\u2500",
|
||
Hscr: "\u210B",
|
||
Hstrok: "\u0126",
|
||
HumpDownHump: "\u224E",
|
||
HumpEqual: "\u224F",
|
||
IEcy: "\u0415",
|
||
IJlig: "\u0132",
|
||
IOcy: "\u0401",
|
||
Iacute: "\xCD",
|
||
Icirc: "\xCE",
|
||
Icy: "\u0418",
|
||
Idot: "\u0130",
|
||
Ifr: "\u2111",
|
||
Igrave: "\xCC",
|
||
Im: "\u2111",
|
||
Imacr: "\u012A",
|
||
ImaginaryI: "\u2148",
|
||
Implies: "\u21D2",
|
||
Int: "\u222C",
|
||
Integral: "\u222B",
|
||
Intersection: "\u22C2",
|
||
InvisibleComma: "\u2063",
|
||
InvisibleTimes: "\u2062",
|
||
Iogon: "\u012E",
|
||
Iopf: "\u{1D540}",
|
||
Iota: "\u0399",
|
||
Iscr: "\u2110",
|
||
Itilde: "\u0128",
|
||
Iukcy: "\u0406",
|
||
Iuml: "\xCF",
|
||
Jcirc: "\u0134",
|
||
Jcy: "\u0419",
|
||
Jfr: "\u{1D50D}",
|
||
Jopf: "\u{1D541}",
|
||
Jscr: "\u{1D4A5}",
|
||
Jsercy: "\u0408",
|
||
Jukcy: "\u0404",
|
||
KHcy: "\u0425",
|
||
KJcy: "\u040C",
|
||
Kappa: "\u039A",
|
||
Kcedil: "\u0136",
|
||
Kcy: "\u041A",
|
||
Kfr: "\u{1D50E}",
|
||
Kopf: "\u{1D542}",
|
||
Kscr: "\u{1D4A6}",
|
||
LJcy: "\u0409",
|
||
LT: "<",
|
||
Lacute: "\u0139",
|
||
Lambda: "\u039B",
|
||
Lang: "\u27EA",
|
||
Laplacetrf: "\u2112",
|
||
Larr: "\u219E",
|
||
Lcaron: "\u013D",
|
||
Lcedil: "\u013B",
|
||
Lcy: "\u041B",
|
||
LeftAngleBracket: "\u27E8",
|
||
LeftArrow: "\u2190",
|
||
LeftArrowBar: "\u21E4",
|
||
LeftArrowRightArrow: "\u21C6",
|
||
LeftCeiling: "\u2308",
|
||
LeftDoubleBracket: "\u27E6",
|
||
LeftDownTeeVector: "\u2961",
|
||
LeftDownVector: "\u21C3",
|
||
LeftDownVectorBar: "\u2959",
|
||
LeftFloor: "\u230A",
|
||
LeftRightArrow: "\u2194",
|
||
LeftRightVector: "\u294E",
|
||
LeftTee: "\u22A3",
|
||
LeftTeeArrow: "\u21A4",
|
||
LeftTeeVector: "\u295A",
|
||
LeftTriangle: "\u22B2",
|
||
LeftTriangleBar: "\u29CF",
|
||
LeftTriangleEqual: "\u22B4",
|
||
LeftUpDownVector: "\u2951",
|
||
LeftUpTeeVector: "\u2960",
|
||
LeftUpVector: "\u21BF",
|
||
LeftUpVectorBar: "\u2958",
|
||
LeftVector: "\u21BC",
|
||
LeftVectorBar: "\u2952",
|
||
Leftarrow: "\u21D0",
|
||
Leftrightarrow: "\u21D4",
|
||
LessEqualGreater: "\u22DA",
|
||
LessFullEqual: "\u2266",
|
||
LessGreater: "\u2276",
|
||
LessLess: "\u2AA1",
|
||
LessSlantEqual: "\u2A7D",
|
||
LessTilde: "\u2272",
|
||
Lfr: "\u{1D50F}",
|
||
Ll: "\u22D8",
|
||
Lleftarrow: "\u21DA",
|
||
Lmidot: "\u013F",
|
||
LongLeftArrow: "\u27F5",
|
||
LongLeftRightArrow: "\u27F7",
|
||
LongRightArrow: "\u27F6",
|
||
Longleftarrow: "\u27F8",
|
||
Longleftrightarrow: "\u27FA",
|
||
Longrightarrow: "\u27F9",
|
||
Lopf: "\u{1D543}",
|
||
LowerLeftArrow: "\u2199",
|
||
LowerRightArrow: "\u2198",
|
||
Lscr: "\u2112",
|
||
Lsh: "\u21B0",
|
||
Lstrok: "\u0141",
|
||
Lt: "\u226A",
|
||
Map: "\u2905",
|
||
Mcy: "\u041C",
|
||
MediumSpace: "\u205F",
|
||
Mellintrf: "\u2133",
|
||
Mfr: "\u{1D510}",
|
||
MinusPlus: "\u2213",
|
||
Mopf: "\u{1D544}",
|
||
Mscr: "\u2133",
|
||
Mu: "\u039C",
|
||
NJcy: "\u040A",
|
||
Nacute: "\u0143",
|
||
Ncaron: "\u0147",
|
||
Ncedil: "\u0145",
|
||
Ncy: "\u041D",
|
||
NegativeMediumSpace: "\u200B",
|
||
NegativeThickSpace: "\u200B",
|
||
NegativeThinSpace: "\u200B",
|
||
NegativeVeryThinSpace: "\u200B",
|
||
NestedGreaterGreater: "\u226B",
|
||
NestedLessLess: "\u226A",
|
||
NewLine: "\n",
|
||
Nfr: "\u{1D511}",
|
||
NoBreak: "\u2060",
|
||
NonBreakingSpace: "\xA0",
|
||
Nopf: "\u2115",
|
||
Not: "\u2AEC",
|
||
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",
|
||
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",
|
||
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",
|
||
Nscr: "\u{1D4A9}",
|
||
Ntilde: "\xD1",
|
||
Nu: "\u039D",
|
||
OElig: "\u0152",
|
||
Oacute: "\xD3",
|
||
Ocirc: "\xD4",
|
||
Ocy: "\u041E",
|
||
Odblac: "\u0150",
|
||
Ofr: "\u{1D512}",
|
||
Ograve: "\xD2",
|
||
Omacr: "\u014C",
|
||
Omega: "\u03A9",
|
||
Omicron: "\u039F",
|
||
Oopf: "\u{1D546}",
|
||
OpenCurlyDoubleQuote: "\u201C",
|
||
OpenCurlyQuote: "\u2018",
|
||
Or: "\u2A54",
|
||
Oscr: "\u{1D4AA}",
|
||
Oslash: "\xD8",
|
||
Otilde: "\xD5",
|
||
Otimes: "\u2A37",
|
||
Ouml: "\xD6",
|
||
OverBar: "\u203E",
|
||
OverBrace: "\u23DE",
|
||
OverBracket: "\u23B4",
|
||
OverParenthesis: "\u23DC",
|
||
PartialD: "\u2202",
|
||
Pcy: "\u041F",
|
||
Pfr: "\u{1D513}",
|
||
Phi: "\u03A6",
|
||
Pi: "\u03A0",
|
||
PlusMinus: "\xB1",
|
||
Poincareplane: "\u210C",
|
||
Popf: "\u2119",
|
||
Pr: "\u2ABB",
|
||
Precedes: "\u227A",
|
||
PrecedesEqual: "\u2AAF",
|
||
PrecedesSlantEqual: "\u227C",
|
||
PrecedesTilde: "\u227E",
|
||
Prime: "\u2033",
|
||
Product: "\u220F",
|
||
Proportion: "\u2237",
|
||
Proportional: "\u221D",
|
||
Pscr: "\u{1D4AB}",
|
||
Psi: "\u03A8",
|
||
QUOT: '"',
|
||
Qfr: "\u{1D514}",
|
||
Qopf: "\u211A",
|
||
Qscr: "\u{1D4AC}",
|
||
RBarr: "\u2910",
|
||
REG: "\xAE",
|
||
Racute: "\u0154",
|
||
Rang: "\u27EB",
|
||
Rarr: "\u21A0",
|
||
Rarrtl: "\u2916",
|
||
Rcaron: "\u0158",
|
||
Rcedil: "\u0156",
|
||
Rcy: "\u0420",
|
||
Re: "\u211C",
|
||
ReverseElement: "\u220B",
|
||
ReverseEquilibrium: "\u21CB",
|
||
ReverseUpEquilibrium: "\u296F",
|
||
Rfr: "\u211C",
|
||
Rho: "\u03A1",
|
||
RightAngleBracket: "\u27E9",
|
||
RightArrow: "\u2192",
|
||
RightArrowBar: "\u21E5",
|
||
RightArrowLeftArrow: "\u21C4",
|
||
RightCeiling: "\u2309",
|
||
RightDoubleBracket: "\u27E7",
|
||
RightDownTeeVector: "\u295D",
|
||
RightDownVector: "\u21C2",
|
||
RightDownVectorBar: "\u2955",
|
||
RightFloor: "\u230B",
|
||
RightTee: "\u22A2",
|
||
RightTeeArrow: "\u21A6",
|
||
RightTeeVector: "\u295B",
|
||
RightTriangle: "\u22B3",
|
||
RightTriangleBar: "\u29D0",
|
||
RightTriangleEqual: "\u22B5",
|
||
RightUpDownVector: "\u294F",
|
||
RightUpTeeVector: "\u295C",
|
||
RightUpVector: "\u21BE",
|
||
RightUpVectorBar: "\u2954",
|
||
RightVector: "\u21C0",
|
||
RightVectorBar: "\u2953",
|
||
Rightarrow: "\u21D2",
|
||
Ropf: "\u211D",
|
||
RoundImplies: "\u2970",
|
||
Rrightarrow: "\u21DB",
|
||
Rscr: "\u211B",
|
||
Rsh: "\u21B1",
|
||
RuleDelayed: "\u29F4",
|
||
SHCHcy: "\u0429",
|
||
SHcy: "\u0428",
|
||
SOFTcy: "\u042C",
|
||
Sacute: "\u015A",
|
||
Sc: "\u2ABC",
|
||
Scaron: "\u0160",
|
||
Scedil: "\u015E",
|
||
Scirc: "\u015C",
|
||
Scy: "\u0421",
|
||
Sfr: "\u{1D516}",
|
||
ShortDownArrow: "\u2193",
|
||
ShortLeftArrow: "\u2190",
|
||
ShortRightArrow: "\u2192",
|
||
ShortUpArrow: "\u2191",
|
||
Sigma: "\u03A3",
|
||
SmallCircle: "\u2218",
|
||
Sopf: "\u{1D54A}",
|
||
Sqrt: "\u221A",
|
||
Square: "\u25A1",
|
||
SquareIntersection: "\u2293",
|
||
SquareSubset: "\u228F",
|
||
SquareSubsetEqual: "\u2291",
|
||
SquareSuperset: "\u2290",
|
||
SquareSupersetEqual: "\u2292",
|
||
SquareUnion: "\u2294",
|
||
Sscr: "\u{1D4AE}",
|
||
Star: "\u22C6",
|
||
Sub: "\u22D0",
|
||
Subset: "\u22D0",
|
||
SubsetEqual: "\u2286",
|
||
Succeeds: "\u227B",
|
||
SucceedsEqual: "\u2AB0",
|
||
SucceedsSlantEqual: "\u227D",
|
||
SucceedsTilde: "\u227F",
|
||
SuchThat: "\u220B",
|
||
Sum: "\u2211",
|
||
Sup: "\u22D1",
|
||
Superset: "\u2283",
|
||
SupersetEqual: "\u2287",
|
||
Supset: "\u22D1",
|
||
THORN: "\xDE",
|
||
TRADE: "\u2122",
|
||
TSHcy: "\u040B",
|
||
TScy: "\u0426",
|
||
Tab: " ",
|
||
Tau: "\u03A4",
|
||
Tcaron: "\u0164",
|
||
Tcedil: "\u0162",
|
||
Tcy: "\u0422",
|
||
Tfr: "\u{1D517}",
|
||
Therefore: "\u2234",
|
||
Theta: "\u0398",
|
||
ThickSpace: "\u205F\u200A",
|
||
ThinSpace: "\u2009",
|
||
Tilde: "\u223C",
|
||
TildeEqual: "\u2243",
|
||
TildeFullEqual: "\u2245",
|
||
TildeTilde: "\u2248",
|
||
Topf: "\u{1D54B}",
|
||
TripleDot: "\u20DB",
|
||
Tscr: "\u{1D4AF}",
|
||
Tstrok: "\u0166",
|
||
Uacute: "\xDA",
|
||
Uarr: "\u219F",
|
||
Uarrocir: "\u2949",
|
||
Ubrcy: "\u040E",
|
||
Ubreve: "\u016C",
|
||
Ucirc: "\xDB",
|
||
Ucy: "\u0423",
|
||
Udblac: "\u0170",
|
||
Ufr: "\u{1D518}",
|
||
Ugrave: "\xD9",
|
||
Umacr: "\u016A",
|
||
UnderBar: "_",
|
||
UnderBrace: "\u23DF",
|
||
UnderBracket: "\u23B5",
|
||
UnderParenthesis: "\u23DD",
|
||
Union: "\u22C3",
|
||
UnionPlus: "\u228E",
|
||
Uogon: "\u0172",
|
||
Uopf: "\u{1D54C}",
|
||
UpArrow: "\u2191",
|
||
UpArrowBar: "\u2912",
|
||
UpArrowDownArrow: "\u21C5",
|
||
UpDownArrow: "\u2195",
|
||
UpEquilibrium: "\u296E",
|
||
UpTee: "\u22A5",
|
||
UpTeeArrow: "\u21A5",
|
||
Uparrow: "\u21D1",
|
||
Updownarrow: "\u21D5",
|
||
UpperLeftArrow: "\u2196",
|
||
UpperRightArrow: "\u2197",
|
||
Upsi: "\u03D2",
|
||
Upsilon: "\u03A5",
|
||
Uring: "\u016E",
|
||
Uscr: "\u{1D4B0}",
|
||
Utilde: "\u0168",
|
||
Uuml: "\xDC",
|
||
VDash: "\u22AB",
|
||
Vbar: "\u2AEB",
|
||
Vcy: "\u0412",
|
||
Vdash: "\u22A9",
|
||
Vdashl: "\u2AE6",
|
||
Vee: "\u22C1",
|
||
Verbar: "\u2016",
|
||
Vert: "\u2016",
|
||
VerticalBar: "\u2223",
|
||
VerticalLine: "|",
|
||
VerticalSeparator: "\u2758",
|
||
VerticalTilde: "\u2240",
|
||
VeryThinSpace: "\u200A",
|
||
Vfr: "\u{1D519}",
|
||
Vopf: "\u{1D54D}",
|
||
Vscr: "\u{1D4B1}",
|
||
Vvdash: "\u22AA",
|
||
Wcirc: "\u0174",
|
||
Wedge: "\u22C0",
|
||
Wfr: "\u{1D51A}",
|
||
Wopf: "\u{1D54E}",
|
||
Wscr: "\u{1D4B2}",
|
||
Xfr: "\u{1D51B}",
|
||
Xi: "\u039E",
|
||
Xopf: "\u{1D54F}",
|
||
Xscr: "\u{1D4B3}",
|
||
YAcy: "\u042F",
|
||
YIcy: "\u0407",
|
||
YUcy: "\u042E",
|
||
Yacute: "\xDD",
|
||
Ycirc: "\u0176",
|
||
Ycy: "\u042B",
|
||
Yfr: "\u{1D51C}",
|
||
Yopf: "\u{1D550}",
|
||
Yscr: "\u{1D4B4}",
|
||
Yuml: "\u0178",
|
||
ZHcy: "\u0416",
|
||
Zacute: "\u0179",
|
||
Zcaron: "\u017D",
|
||
Zcy: "\u0417",
|
||
Zdot: "\u017B",
|
||
ZeroWidthSpace: "\u200B",
|
||
Zeta: "\u0396",
|
||
Zfr: "\u2128",
|
||
Zopf: "\u2124",
|
||
Zscr: "\u{1D4B5}",
|
||
aacute: "\xE1",
|
||
abreve: "\u0103",
|
||
ac: "\u223E",
|
||
acE: "\u223E\u0333",
|
||
acd: "\u223F",
|
||
acirc: "\xE2",
|
||
acute: "\xB4",
|
||
acy: "\u0430",
|
||
aelig: "\xE6",
|
||
af: "\u2061",
|
||
afr: "\u{1D51E}",
|
||
agrave: "\xE0",
|
||
alefsym: "\u2135",
|
||
aleph: "\u2135",
|
||
alpha: "\u03B1",
|
||
amacr: "\u0101",
|
||
amalg: "\u2A3F",
|
||
amp: "&",
|
||
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: "\xC5",
|
||
angzarr: "\u237C",
|
||
aogon: "\u0105",
|
||
aopf: "\u{1D552}",
|
||
ap: "\u2248",
|
||
apE: "\u2A70",
|
||
apacir: "\u2A6F",
|
||
ape: "\u224A",
|
||
apid: "\u224B",
|
||
apos: "'",
|
||
approx: "\u2248",
|
||
approxeq: "\u224A",
|
||
aring: "\xE5",
|
||
ascr: "\u{1D4B6}",
|
||
ast: "*",
|
||
asymp: "\u2248",
|
||
asympeq: "\u224D",
|
||
atilde: "\xE3",
|
||
auml: "\xE4",
|
||
awconint: "\u2233",
|
||
awint: "\u2A11",
|
||
bNot: "\u2AED",
|
||
backcong: "\u224C",
|
||
backepsilon: "\u03F6",
|
||
backprime: "\u2035",
|
||
backsim: "\u223D",
|
||
backsimeq: "\u22CD",
|
||
barvee: "\u22BD",
|
||
barwed: "\u2305",
|
||
barwedge: "\u2305",
|
||
bbrk: "\u23B5",
|
||
bbrktbrk: "\u23B6",
|
||
bcong: "\u224C",
|
||
bcy: "\u0431",
|
||
bdquo: "\u201E",
|
||
becaus: "\u2235",
|
||
because: "\u2235",
|
||
bemptyv: "\u29B0",
|
||
bepsi: "\u03F6",
|
||
bernou: "\u212C",
|
||
beta: "\u03B2",
|
||
beth: "\u2136",
|
||
between: "\u226C",
|
||
bfr: "\u{1D51F}",
|
||
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: "=\u20E5",
|
||
bnequiv: "\u2261\u20E5",
|
||
bnot: "\u2310",
|
||
bopf: "\u{1D553}",
|
||
bot: "\u22A5",
|
||
bottom: "\u22A5",
|
||
bowtie: "\u22C8",
|
||
boxDL: "\u2557",
|
||
boxDR: "\u2554",
|
||
boxDl: "\u2556",
|
||
boxDr: "\u2553",
|
||
boxH: "\u2550",
|
||
boxHD: "\u2566",
|
||
boxHU: "\u2569",
|
||
boxHd: "\u2564",
|
||
boxHu: "\u2567",
|
||
boxUL: "\u255D",
|
||
boxUR: "\u255A",
|
||
boxUl: "\u255C",
|
||
boxUr: "\u2559",
|
||
boxV: "\u2551",
|
||
boxVH: "\u256C",
|
||
boxVL: "\u2563",
|
||
boxVR: "\u2560",
|
||
boxVh: "\u256B",
|
||
boxVl: "\u2562",
|
||
boxVr: "\u255F",
|
||
boxbox: "\u29C9",
|
||
boxdL: "\u2555",
|
||
boxdR: "\u2552",
|
||
boxdl: "\u2510",
|
||
boxdr: "\u250C",
|
||
boxh: "\u2500",
|
||
boxhD: "\u2565",
|
||
boxhU: "\u2568",
|
||
boxhd: "\u252C",
|
||
boxhu: "\u2534",
|
||
boxminus: "\u229F",
|
||
boxplus: "\u229E",
|
||
boxtimes: "\u22A0",
|
||
boxuL: "\u255B",
|
||
boxuR: "\u2558",
|
||
boxul: "\u2518",
|
||
boxur: "\u2514",
|
||
boxv: "\u2502",
|
||
boxvH: "\u256A",
|
||
boxvL: "\u2561",
|
||
boxvR: "\u255E",
|
||
boxvh: "\u253C",
|
||
boxvl: "\u2524",
|
||
boxvr: "\u251C",
|
||
bprime: "\u2035",
|
||
breve: "\u02D8",
|
||
brvbar: "\xA6",
|
||
bscr: "\u{1D4B7}",
|
||
bsemi: "\u204F",
|
||
bsim: "\u223D",
|
||
bsime: "\u22CD",
|
||
bsol: "\\",
|
||
bsolb: "\u29C5",
|
||
bsolhsub: "\u27C8",
|
||
bull: "\u2022",
|
||
bullet: "\u2022",
|
||
bump: "\u224E",
|
||
bumpE: "\u2AAE",
|
||
bumpe: "\u224F",
|
||
bumpeq: "\u224F",
|
||
cacute: "\u0107",
|
||
cap: "\u2229",
|
||
capand: "\u2A44",
|
||
capbrcup: "\u2A49",
|
||
capcap: "\u2A4B",
|
||
capcup: "\u2A47",
|
||
capdot: "\u2A40",
|
||
caps: "\u2229\uFE00",
|
||
caret: "\u2041",
|
||
caron: "\u02C7",
|
||
ccaps: "\u2A4D",
|
||
ccaron: "\u010D",
|
||
ccedil: "\xE7",
|
||
ccirc: "\u0109",
|
||
ccups: "\u2A4C",
|
||
ccupssm: "\u2A50",
|
||
cdot: "\u010B",
|
||
cedil: "\xB8",
|
||
cemptyv: "\u29B2",
|
||
cent: "\xA2",
|
||
centerdot: "\xB7",
|
||
cfr: "\u{1D520}",
|
||
chcy: "\u0447",
|
||
check: "\u2713",
|
||
checkmark: "\u2713",
|
||
chi: "\u03C7",
|
||
cir: "\u25CB",
|
||
cirE: "\u29C3",
|
||
circ: "\u02C6",
|
||
circeq: "\u2257",
|
||
circlearrowleft: "\u21BA",
|
||
circlearrowright: "\u21BB",
|
||
circledR: "\xAE",
|
||
circledS: "\u24C8",
|
||
circledast: "\u229B",
|
||
circledcirc: "\u229A",
|
||
circleddash: "\u229D",
|
||
cire: "\u2257",
|
||
cirfnint: "\u2A10",
|
||
cirmid: "\u2AEF",
|
||
cirscir: "\u29C2",
|
||
clubs: "\u2663",
|
||
clubsuit: "\u2663",
|
||
colon: ":",
|
||
colone: "\u2254",
|
||
coloneq: "\u2254",
|
||
comma: ",",
|
||
commat: "@",
|
||
comp: "\u2201",
|
||
compfn: "\u2218",
|
||
complement: "\u2201",
|
||
complexes: "\u2102",
|
||
cong: "\u2245",
|
||
congdot: "\u2A6D",
|
||
conint: "\u222E",
|
||
copf: "\u{1D554}",
|
||
coprod: "\u2210",
|
||
copy: "\xA9",
|
||
copysr: "\u2117",
|
||
crarr: "\u21B5",
|
||
cross: "\u2717",
|
||
cscr: "\u{1D4B8}",
|
||
csub: "\u2ACF",
|
||
csube: "\u2AD1",
|
||
csup: "\u2AD0",
|
||
csupe: "\u2AD2",
|
||
ctdot: "\u22EF",
|
||
cudarrl: "\u2938",
|
||
cudarrr: "\u2935",
|
||
cuepr: "\u22DE",
|
||
cuesc: "\u22DF",
|
||
cularr: "\u21B6",
|
||
cularrp: "\u293D",
|
||
cup: "\u222A",
|
||
cupbrcap: "\u2A48",
|
||
cupcap: "\u2A46",
|
||
cupcup: "\u2A4A",
|
||
cupdot: "\u228D",
|
||
cupor: "\u2A45",
|
||
cups: "\u222A\uFE00",
|
||
curarr: "\u21B7",
|
||
curarrm: "\u293C",
|
||
curlyeqprec: "\u22DE",
|
||
curlyeqsucc: "\u22DF",
|
||
curlyvee: "\u22CE",
|
||
curlywedge: "\u22CF",
|
||
curren: "\xA4",
|
||
curvearrowleft: "\u21B6",
|
||
curvearrowright: "\u21B7",
|
||
cuvee: "\u22CE",
|
||
cuwed: "\u22CF",
|
||
cwconint: "\u2232",
|
||
cwint: "\u2231",
|
||
cylcty: "\u232D",
|
||
dArr: "\u21D3",
|
||
dHar: "\u2965",
|
||
dagger: "\u2020",
|
||
daleth: "\u2138",
|
||
darr: "\u2193",
|
||
dash: "\u2010",
|
||
dashv: "\u22A3",
|
||
dbkarow: "\u290F",
|
||
dblac: "\u02DD",
|
||
dcaron: "\u010F",
|
||
dcy: "\u0434",
|
||
dd: "\u2146",
|
||
ddagger: "\u2021",
|
||
ddarr: "\u21CA",
|
||
ddotseq: "\u2A77",
|
||
deg: "\xB0",
|
||
delta: "\u03B4",
|
||
demptyv: "\u29B1",
|
||
dfisht: "\u297F",
|
||
dfr: "\u{1D521}",
|
||
dharl: "\u21C3",
|
||
dharr: "\u21C2",
|
||
diam: "\u22C4",
|
||
diamond: "\u22C4",
|
||
diamondsuit: "\u2666",
|
||
diams: "\u2666",
|
||
die: "\xA8",
|
||
digamma: "\u03DD",
|
||
disin: "\u22F2",
|
||
div: "\xF7",
|
||
divide: "\xF7",
|
||
divideontimes: "\u22C7",
|
||
divonx: "\u22C7",
|
||
djcy: "\u0452",
|
||
dlcorn: "\u231E",
|
||
dlcrop: "\u230D",
|
||
dollar: "$",
|
||
dopf: "\u{1D555}",
|
||
dot: "\u02D9",
|
||
doteq: "\u2250",
|
||
doteqdot: "\u2251",
|
||
dotminus: "\u2238",
|
||
dotplus: "\u2214",
|
||
dotsquare: "\u22A1",
|
||
doublebarwedge: "\u2306",
|
||
downarrow: "\u2193",
|
||
downdownarrows: "\u21CA",
|
||
downharpoonleft: "\u21C3",
|
||
downharpoonright: "\u21C2",
|
||
drbkarow: "\u2910",
|
||
drcorn: "\u231F",
|
||
drcrop: "\u230C",
|
||
dscr: "\u{1D4B9}",
|
||
dscy: "\u0455",
|
||
dsol: "\u29F6",
|
||
dstrok: "\u0111",
|
||
dtdot: "\u22F1",
|
||
dtri: "\u25BF",
|
||
dtrif: "\u25BE",
|
||
duarr: "\u21F5",
|
||
duhar: "\u296F",
|
||
dwangle: "\u29A6",
|
||
dzcy: "\u045F",
|
||
dzigrarr: "\u27FF",
|
||
eDDot: "\u2A77",
|
||
eDot: "\u2251",
|
||
eacute: "\xE9",
|
||
easter: "\u2A6E",
|
||
ecaron: "\u011B",
|
||
ecir: "\u2256",
|
||
ecirc: "\xEA",
|
||
ecolon: "\u2255",
|
||
ecy: "\u044D",
|
||
edot: "\u0117",
|
||
ee: "\u2147",
|
||
efDot: "\u2252",
|
||
efr: "\u{1D522}",
|
||
eg: "\u2A9A",
|
||
egrave: "\xE8",
|
||
egs: "\u2A96",
|
||
egsdot: "\u2A98",
|
||
el: "\u2A99",
|
||
elinters: "\u23E7",
|
||
ell: "\u2113",
|
||
els: "\u2A95",
|
||
elsdot: "\u2A97",
|
||
emacr: "\u0113",
|
||
empty: "\u2205",
|
||
emptyset: "\u2205",
|
||
emptyv: "\u2205",
|
||
emsp13: "\u2004",
|
||
emsp14: "\u2005",
|
||
emsp: "\u2003",
|
||
eng: "\u014B",
|
||
ensp: "\u2002",
|
||
eogon: "\u0119",
|
||
eopf: "\u{1D556}",
|
||
epar: "\u22D5",
|
||
eparsl: "\u29E3",
|
||
eplus: "\u2A71",
|
||
epsi: "\u03B5",
|
||
epsilon: "\u03B5",
|
||
epsiv: "\u03F5",
|
||
eqcirc: "\u2256",
|
||
eqcolon: "\u2255",
|
||
eqsim: "\u2242",
|
||
eqslantgtr: "\u2A96",
|
||
eqslantless: "\u2A95",
|
||
equals: "=",
|
||
equest: "\u225F",
|
||
equiv: "\u2261",
|
||
equivDD: "\u2A78",
|
||
eqvparsl: "\u29E5",
|
||
erDot: "\u2253",
|
||
erarr: "\u2971",
|
||
escr: "\u212F",
|
||
esdot: "\u2250",
|
||
esim: "\u2242",
|
||
eta: "\u03B7",
|
||
eth: "\xF0",
|
||
euml: "\xEB",
|
||
euro: "\u20AC",
|
||
excl: "!",
|
||
exist: "\u2203",
|
||
expectation: "\u2130",
|
||
exponentiale: "\u2147",
|
||
fallingdotseq: "\u2252",
|
||
fcy: "\u0444",
|
||
female: "\u2640",
|
||
ffilig: "\uFB03",
|
||
fflig: "\uFB00",
|
||
ffllig: "\uFB04",
|
||
ffr: "\u{1D523}",
|
||
filig: "\uFB01",
|
||
fjlig: "fj",
|
||
flat: "\u266D",
|
||
fllig: "\uFB02",
|
||
fltns: "\u25B1",
|
||
fnof: "\u0192",
|
||
fopf: "\u{1D557}",
|
||
forall: "\u2200",
|
||
fork: "\u22D4",
|
||
forkv: "\u2AD9",
|
||
fpartint: "\u2A0D",
|
||
frac12: "\xBD",
|
||
frac13: "\u2153",
|
||
frac14: "\xBC",
|
||
frac15: "\u2155",
|
||
frac16: "\u2159",
|
||
frac18: "\u215B",
|
||
frac23: "\u2154",
|
||
frac25: "\u2156",
|
||
frac34: "\xBE",
|
||
frac35: "\u2157",
|
||
frac38: "\u215C",
|
||
frac45: "\u2158",
|
||
frac56: "\u215A",
|
||
frac58: "\u215D",
|
||
frac78: "\u215E",
|
||
frasl: "\u2044",
|
||
frown: "\u2322",
|
||
fscr: "\u{1D4BB}",
|
||
gE: "\u2267",
|
||
gEl: "\u2A8C",
|
||
gacute: "\u01F5",
|
||
gamma: "\u03B3",
|
||
gammad: "\u03DD",
|
||
gap: "\u2A86",
|
||
gbreve: "\u011F",
|
||
gcirc: "\u011D",
|
||
gcy: "\u0433",
|
||
gdot: "\u0121",
|
||
ge: "\u2265",
|
||
gel: "\u22DB",
|
||
geq: "\u2265",
|
||
geqq: "\u2267",
|
||
geqslant: "\u2A7E",
|
||
ges: "\u2A7E",
|
||
gescc: "\u2AA9",
|
||
gesdot: "\u2A80",
|
||
gesdoto: "\u2A82",
|
||
gesdotol: "\u2A84",
|
||
gesl: "\u22DB\uFE00",
|
||
gesles: "\u2A94",
|
||
gfr: "\u{1D524}",
|
||
gg: "\u226B",
|
||
ggg: "\u22D9",
|
||
gimel: "\u2137",
|
||
gjcy: "\u0453",
|
||
gl: "\u2277",
|
||
glE: "\u2A92",
|
||
gla: "\u2AA5",
|
||
glj: "\u2AA4",
|
||
gnE: "\u2269",
|
||
gnap: "\u2A8A",
|
||
gnapprox: "\u2A8A",
|
||
gne: "\u2A88",
|
||
gneq: "\u2A88",
|
||
gneqq: "\u2269",
|
||
gnsim: "\u22E7",
|
||
gopf: "\u{1D558}",
|
||
grave: "`",
|
||
gscr: "\u210A",
|
||
gsim: "\u2273",
|
||
gsime: "\u2A8E",
|
||
gsiml: "\u2A90",
|
||
gt: ">",
|
||
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",
|
||
hArr: "\u21D4",
|
||
hairsp: "\u200A",
|
||
half: "\xBD",
|
||
hamilt: "\u210B",
|
||
hardcy: "\u044A",
|
||
harr: "\u2194",
|
||
harrcir: "\u2948",
|
||
harrw: "\u21AD",
|
||
hbar: "\u210F",
|
||
hcirc: "\u0125",
|
||
hearts: "\u2665",
|
||
heartsuit: "\u2665",
|
||
hellip: "\u2026",
|
||
hercon: "\u22B9",
|
||
hfr: "\u{1D525}",
|
||
hksearow: "\u2925",
|
||
hkswarow: "\u2926",
|
||
hoarr: "\u21FF",
|
||
homtht: "\u223B",
|
||
hookleftarrow: "\u21A9",
|
||
hookrightarrow: "\u21AA",
|
||
hopf: "\u{1D559}",
|
||
horbar: "\u2015",
|
||
hscr: "\u{1D4BD}",
|
||
hslash: "\u210F",
|
||
hstrok: "\u0127",
|
||
hybull: "\u2043",
|
||
hyphen: "\u2010",
|
||
iacute: "\xED",
|
||
ic: "\u2063",
|
||
icirc: "\xEE",
|
||
icy: "\u0438",
|
||
iecy: "\u0435",
|
||
iexcl: "\xA1",
|
||
iff: "\u21D4",
|
||
ifr: "\u{1D526}",
|
||
igrave: "\xEC",
|
||
ii: "\u2148",
|
||
iiiint: "\u2A0C",
|
||
iiint: "\u222D",
|
||
iinfin: "\u29DC",
|
||
iiota: "\u2129",
|
||
ijlig: "\u0133",
|
||
imacr: "\u012B",
|
||
image: "\u2111",
|
||
imagline: "\u2110",
|
||
imagpart: "\u2111",
|
||
imath: "\u0131",
|
||
imof: "\u22B7",
|
||
imped: "\u01B5",
|
||
in: "\u2208",
|
||
incare: "\u2105",
|
||
infin: "\u221E",
|
||
infintie: "\u29DD",
|
||
inodot: "\u0131",
|
||
int: "\u222B",
|
||
intcal: "\u22BA",
|
||
integers: "\u2124",
|
||
intercal: "\u22BA",
|
||
intlarhk: "\u2A17",
|
||
intprod: "\u2A3C",
|
||
iocy: "\u0451",
|
||
iogon: "\u012F",
|
||
iopf: "\u{1D55A}",
|
||
iota: "\u03B9",
|
||
iprod: "\u2A3C",
|
||
iquest: "\xBF",
|
||
iscr: "\u{1D4BE}",
|
||
isin: "\u2208",
|
||
isinE: "\u22F9",
|
||
isindot: "\u22F5",
|
||
isins: "\u22F4",
|
||
isinsv: "\u22F3",
|
||
isinv: "\u2208",
|
||
it: "\u2062",
|
||
itilde: "\u0129",
|
||
iukcy: "\u0456",
|
||
iuml: "\xEF",
|
||
jcirc: "\u0135",
|
||
jcy: "\u0439",
|
||
jfr: "\u{1D527}",
|
||
jmath: "\u0237",
|
||
jopf: "\u{1D55B}",
|
||
jscr: "\u{1D4BF}",
|
||
jsercy: "\u0458",
|
||
jukcy: "\u0454",
|
||
kappa: "\u03BA",
|
||
kappav: "\u03F0",
|
||
kcedil: "\u0137",
|
||
kcy: "\u043A",
|
||
kfr: "\u{1D528}",
|
||
kgreen: "\u0138",
|
||
khcy: "\u0445",
|
||
kjcy: "\u045C",
|
||
kopf: "\u{1D55C}",
|
||
kscr: "\u{1D4C0}",
|
||
lAarr: "\u21DA",
|
||
lArr: "\u21D0",
|
||
lAtail: "\u291B",
|
||
lBarr: "\u290E",
|
||
lE: "\u2266",
|
||
lEg: "\u2A8B",
|
||
lHar: "\u2962",
|
||
lacute: "\u013A",
|
||
laemptyv: "\u29B4",
|
||
lagran: "\u2112",
|
||
lambda: "\u03BB",
|
||
lang: "\u27E8",
|
||
langd: "\u2991",
|
||
langle: "\u27E8",
|
||
lap: "\u2A85",
|
||
laquo: "\xAB",
|
||
larr: "\u2190",
|
||
larrb: "\u21E4",
|
||
larrbfs: "\u291F",
|
||
larrfs: "\u291D",
|
||
larrhk: "\u21A9",
|
||
larrlp: "\u21AB",
|
||
larrpl: "\u2939",
|
||
larrsim: "\u2973",
|
||
larrtl: "\u21A2",
|
||
lat: "\u2AAB",
|
||
latail: "\u2919",
|
||
late: "\u2AAD",
|
||
lates: "\u2AAD\uFE00",
|
||
lbarr: "\u290C",
|
||
lbbrk: "\u2772",
|
||
lbrace: "{",
|
||
lbrack: "[",
|
||
lbrke: "\u298B",
|
||
lbrksld: "\u298F",
|
||
lbrkslu: "\u298D",
|
||
lcaron: "\u013E",
|
||
lcedil: "\u013C",
|
||
lceil: "\u2308",
|
||
lcub: "{",
|
||
lcy: "\u043B",
|
||
ldca: "\u2936",
|
||
ldquo: "\u201C",
|
||
ldquor: "\u201E",
|
||
ldrdhar: "\u2967",
|
||
ldrushar: "\u294B",
|
||
ldsh: "\u21B2",
|
||
le: "\u2264",
|
||
leftarrow: "\u2190",
|
||
leftarrowtail: "\u21A2",
|
||
leftharpoondown: "\u21BD",
|
||
leftharpoonup: "\u21BC",
|
||
leftleftarrows: "\u21C7",
|
||
leftrightarrow: "\u2194",
|
||
leftrightarrows: "\u21C6",
|
||
leftrightharpoons: "\u21CB",
|
||
leftrightsquigarrow: "\u21AD",
|
||
leftthreetimes: "\u22CB",
|
||
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",
|
||
lessgtr: "\u2276",
|
||
lesssim: "\u2272",
|
||
lfisht: "\u297C",
|
||
lfloor: "\u230A",
|
||
lfr: "\u{1D529}",
|
||
lg: "\u2276",
|
||
lgE: "\u2A91",
|
||
lhard: "\u21BD",
|
||
lharu: "\u21BC",
|
||
lharul: "\u296A",
|
||
lhblk: "\u2584",
|
||
ljcy: "\u0459",
|
||
ll: "\u226A",
|
||
llarr: "\u21C7",
|
||
llcorner: "\u231E",
|
||
llhard: "\u296B",
|
||
lltri: "\u25FA",
|
||
lmidot: "\u0140",
|
||
lmoust: "\u23B0",
|
||
lmoustache: "\u23B0",
|
||
lnE: "\u2268",
|
||
lnap: "\u2A89",
|
||
lnapprox: "\u2A89",
|
||
lne: "\u2A87",
|
||
lneq: "\u2A87",
|
||
lneqq: "\u2268",
|
||
lnsim: "\u22E6",
|
||
loang: "\u27EC",
|
||
loarr: "\u21FD",
|
||
lobrk: "\u27E6",
|
||
longleftarrow: "\u27F5",
|
||
longleftrightarrow: "\u27F7",
|
||
longmapsto: "\u27FC",
|
||
longrightarrow: "\u27F6",
|
||
looparrowleft: "\u21AB",
|
||
looparrowright: "\u21AC",
|
||
lopar: "\u2985",
|
||
lopf: "\u{1D55D}",
|
||
loplus: "\u2A2D",
|
||
lotimes: "\u2A34",
|
||
lowast: "\u2217",
|
||
lowbar: "_",
|
||
loz: "\u25CA",
|
||
lozenge: "\u25CA",
|
||
lozf: "\u29EB",
|
||
lpar: "(",
|
||
lparlt: "\u2993",
|
||
lrarr: "\u21C6",
|
||
lrcorner: "\u231F",
|
||
lrhar: "\u21CB",
|
||
lrhard: "\u296D",
|
||
lrm: "\u200E",
|
||
lrtri: "\u22BF",
|
||
lsaquo: "\u2039",
|
||
lscr: "\u{1D4C1}",
|
||
lsh: "\u21B0",
|
||
lsim: "\u2272",
|
||
lsime: "\u2A8D",
|
||
lsimg: "\u2A8F",
|
||
lsqb: "[",
|
||
lsquo: "\u2018",
|
||
lsquor: "\u201A",
|
||
lstrok: "\u0142",
|
||
lt: "<",
|
||
ltcc: "\u2AA6",
|
||
ltcir: "\u2A79",
|
||
ltdot: "\u22D6",
|
||
lthree: "\u22CB",
|
||
ltimes: "\u22C9",
|
||
ltlarr: "\u2976",
|
||
ltquest: "\u2A7B",
|
||
ltrPar: "\u2996",
|
||
ltri: "\u25C3",
|
||
ltrie: "\u22B4",
|
||
ltrif: "\u25C2",
|
||
lurdshar: "\u294A",
|
||
luruhar: "\u2966",
|
||
lvertneqq: "\u2268\uFE00",
|
||
lvnE: "\u2268\uFE00",
|
||
mDDot: "\u223A",
|
||
macr: "\xAF",
|
||
male: "\u2642",
|
||
malt: "\u2720",
|
||
maltese: "\u2720",
|
||
map: "\u21A6",
|
||
mapsto: "\u21A6",
|
||
mapstodown: "\u21A7",
|
||
mapstoleft: "\u21A4",
|
||
mapstoup: "\u21A5",
|
||
marker: "\u25AE",
|
||
mcomma: "\u2A29",
|
||
mcy: "\u043C",
|
||
mdash: "\u2014",
|
||
measuredangle: "\u2221",
|
||
mfr: "\u{1D52A}",
|
||
mho: "\u2127",
|
||
micro: "\xB5",
|
||
mid: "\u2223",
|
||
midast: "*",
|
||
midcir: "\u2AF0",
|
||
middot: "\xB7",
|
||
minus: "\u2212",
|
||
minusb: "\u229F",
|
||
minusd: "\u2238",
|
||
minusdu: "\u2A2A",
|
||
mlcp: "\u2ADB",
|
||
mldr: "\u2026",
|
||
mnplus: "\u2213",
|
||
models: "\u22A7",
|
||
mopf: "\u{1D55E}",
|
||
mp: "\u2213",
|
||
mscr: "\u{1D4C2}",
|
||
mstpos: "\u223E",
|
||
mu: "\u03BC",
|
||
multimap: "\u22B8",
|
||
mumap: "\u22B8",
|
||
nGg: "\u22D9\u0338",
|
||
nGt: "\u226B\u20D2",
|
||
nGtv: "\u226B\u0338",
|
||
nLeftarrow: "\u21CD",
|
||
nLeftrightarrow: "\u21CE",
|
||
nLl: "\u22D8\u0338",
|
||
nLt: "\u226A\u20D2",
|
||
nLtv: "\u226A\u0338",
|
||
nRightarrow: "\u21CF",
|
||
nVDash: "\u22AF",
|
||
nVdash: "\u22AE",
|
||
nabla: "\u2207",
|
||
nacute: "\u0144",
|
||
nang: "\u2220\u20D2",
|
||
nap: "\u2249",
|
||
napE: "\u2A70\u0338",
|
||
napid: "\u224B\u0338",
|
||
napos: "\u0149",
|
||
napprox: "\u2249",
|
||
natur: "\u266E",
|
||
natural: "\u266E",
|
||
naturals: "\u2115",
|
||
nbsp: "\xA0",
|
||
nbump: "\u224E\u0338",
|
||
nbumpe: "\u224F\u0338",
|
||
ncap: "\u2A43",
|
||
ncaron: "\u0148",
|
||
ncedil: "\u0146",
|
||
ncong: "\u2247",
|
||
ncongdot: "\u2A6D\u0338",
|
||
ncup: "\u2A42",
|
||
ncy: "\u043D",
|
||
ndash: "\u2013",
|
||
ne: "\u2260",
|
||
neArr: "\u21D7",
|
||
nearhk: "\u2924",
|
||
nearr: "\u2197",
|
||
nearrow: "\u2197",
|
||
nedot: "\u2250\u0338",
|
||
nequiv: "\u2262",
|
||
nesear: "\u2928",
|
||
nesim: "\u2242\u0338",
|
||
nexist: "\u2204",
|
||
nexists: "\u2204",
|
||
nfr: "\u{1D52B}",
|
||
ngE: "\u2267\u0338",
|
||
nge: "\u2271",
|
||
ngeq: "\u2271",
|
||
ngeqq: "\u2267\u0338",
|
||
ngeqslant: "\u2A7E\u0338",
|
||
nges: "\u2A7E\u0338",
|
||
ngsim: "\u2275",
|
||
ngt: "\u226F",
|
||
ngtr: "\u226F",
|
||
nhArr: "\u21CE",
|
||
nharr: "\u21AE",
|
||
nhpar: "\u2AF2",
|
||
ni: "\u220B",
|
||
nis: "\u22FC",
|
||
nisd: "\u22FA",
|
||
niv: "\u220B",
|
||
njcy: "\u045A",
|
||
nlArr: "\u21CD",
|
||
nlE: "\u2266\u0338",
|
||
nlarr: "\u219A",
|
||
nldr: "\u2025",
|
||
nle: "\u2270",
|
||
nleftarrow: "\u219A",
|
||
nleftrightarrow: "\u21AE",
|
||
nleq: "\u2270",
|
||
nleqq: "\u2266\u0338",
|
||
nleqslant: "\u2A7D\u0338",
|
||
nles: "\u2A7D\u0338",
|
||
nless: "\u226E",
|
||
nlsim: "\u2274",
|
||
nlt: "\u226E",
|
||
nltri: "\u22EA",
|
||
nltrie: "\u22EC",
|
||
nmid: "\u2224",
|
||
nopf: "\u{1D55F}",
|
||
not: "\xAC",
|
||
notin: "\u2209",
|
||
notinE: "\u22F9\u0338",
|
||
notindot: "\u22F5\u0338",
|
||
notinva: "\u2209",
|
||
notinvb: "\u22F7",
|
||
notinvc: "\u22F6",
|
||
notni: "\u220C",
|
||
notniva: "\u220C",
|
||
notnivb: "\u22FE",
|
||
notnivc: "\u22FD",
|
||
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: "\u219B",
|
||
nrtri: "\u22EB",
|
||
nrtrie: "\u22ED",
|
||
nsc: "\u2281",
|
||
nsccue: "\u22E1",
|
||
nsce: "\u2AB0\u0338",
|
||
nscr: "\u{1D4C3}",
|
||
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: "\xF1",
|
||
ntlg: "\u2278",
|
||
ntriangleleft: "\u22EA",
|
||
ntrianglelefteq: "\u22EC",
|
||
ntriangleright: "\u22EB",
|
||
ntrianglerighteq: "\u22ED",
|
||
nu: "\u03BD",
|
||
num: "#",
|
||
numero: "\u2116",
|
||
numsp: "\u2007",
|
||
nvDash: "\u22AD",
|
||
nvHarr: "\u2904",
|
||
nvap: "\u224D\u20D2",
|
||
nvdash: "\u22AC",
|
||
nvge: "\u2265\u20D2",
|
||
nvgt: ">\u20D2",
|
||
nvinfin: "\u29DE",
|
||
nvlArr: "\u2902",
|
||
nvle: "\u2264\u20D2",
|
||
nvlt: "<\u20D2",
|
||
nvltrie: "\u22B4\u20D2",
|
||
nvrArr: "\u2903",
|
||
nvrtrie: "\u22B5\u20D2",
|
||
nvsim: "\u223C\u20D2",
|
||
nwArr: "\u21D6",
|
||
nwarhk: "\u2923",
|
||
nwarr: "\u2196",
|
||
nwarrow: "\u2196",
|
||
nwnear: "\u2927",
|
||
oS: "\u24C8",
|
||
oacute: "\xF3",
|
||
oast: "\u229B",
|
||
ocir: "\u229A",
|
||
ocirc: "\xF4",
|
||
ocy: "\u043E",
|
||
odash: "\u229D",
|
||
odblac: "\u0151",
|
||
odiv: "\u2A38",
|
||
odot: "\u2299",
|
||
odsold: "\u29BC",
|
||
oelig: "\u0153",
|
||
ofcir: "\u29BF",
|
||
ofr: "\u{1D52C}",
|
||
ogon: "\u02DB",
|
||
ograve: "\xF2",
|
||
ogt: "\u29C1",
|
||
ohbar: "\u29B5",
|
||
ohm: "\u03A9",
|
||
oint: "\u222E",
|
||
olarr: "\u21BA",
|
||
olcir: "\u29BE",
|
||
olcross: "\u29BB",
|
||
oline: "\u203E",
|
||
olt: "\u29C0",
|
||
omacr: "\u014D",
|
||
omega: "\u03C9",
|
||
omicron: "\u03BF",
|
||
omid: "\u29B6",
|
||
ominus: "\u2296",
|
||
oopf: "\u{1D560}",
|
||
opar: "\u29B7",
|
||
operp: "\u29B9",
|
||
oplus: "\u2295",
|
||
or: "\u2228",
|
||
orarr: "\u21BB",
|
||
ord: "\u2A5D",
|
||
order: "\u2134",
|
||
orderof: "\u2134",
|
||
ordf: "\xAA",
|
||
ordm: "\xBA",
|
||
origof: "\u22B6",
|
||
oror: "\u2A56",
|
||
orslope: "\u2A57",
|
||
orv: "\u2A5B",
|
||
oscr: "\u2134",
|
||
oslash: "\xF8",
|
||
osol: "\u2298",
|
||
otilde: "\xF5",
|
||
otimes: "\u2297",
|
||
otimesas: "\u2A36",
|
||
ouml: "\xF6",
|
||
ovbar: "\u233D",
|
||
par: "\u2225",
|
||
para: "\xB6",
|
||
parallel: "\u2225",
|
||
parsim: "\u2AF3",
|
||
parsl: "\u2AFD",
|
||
part: "\u2202",
|
||
pcy: "\u043F",
|
||
percnt: "%",
|
||
period: ".",
|
||
permil: "\u2030",
|
||
perp: "\u22A5",
|
||
pertenk: "\u2031",
|
||
pfr: "\u{1D52D}",
|
||
phi: "\u03C6",
|
||
phiv: "\u03D5",
|
||
phmmat: "\u2133",
|
||
phone: "\u260E",
|
||
pi: "\u03C0",
|
||
pitchfork: "\u22D4",
|
||
piv: "\u03D6",
|
||
planck: "\u210F",
|
||
planckh: "\u210E",
|
||
plankv: "\u210F",
|
||
plus: "+",
|
||
plusacir: "\u2A23",
|
||
plusb: "\u229E",
|
||
pluscir: "\u2A22",
|
||
plusdo: "\u2214",
|
||
plusdu: "\u2A25",
|
||
pluse: "\u2A72",
|
||
plusmn: "\xB1",
|
||
plussim: "\u2A26",
|
||
plustwo: "\u2A27",
|
||
pm: "\xB1",
|
||
pointint: "\u2A15",
|
||
popf: "\u{1D561}",
|
||
pound: "\xA3",
|
||
pr: "\u227A",
|
||
prE: "\u2AB3",
|
||
prap: "\u2AB7",
|
||
prcue: "\u227C",
|
||
pre: "\u2AAF",
|
||
prec: "\u227A",
|
||
precapprox: "\u2AB7",
|
||
preccurlyeq: "\u227C",
|
||
preceq: "\u2AAF",
|
||
precnapprox: "\u2AB9",
|
||
precneqq: "\u2AB5",
|
||
precnsim: "\u22E8",
|
||
precsim: "\u227E",
|
||
prime: "\u2032",
|
||
primes: "\u2119",
|
||
prnE: "\u2AB5",
|
||
prnap: "\u2AB9",
|
||
prnsim: "\u22E8",
|
||
prod: "\u220F",
|
||
profalar: "\u232E",
|
||
profline: "\u2312",
|
||
profsurf: "\u2313",
|
||
prop: "\u221D",
|
||
propto: "\u221D",
|
||
prsim: "\u227E",
|
||
prurel: "\u22B0",
|
||
pscr: "\u{1D4C5}",
|
||
psi: "\u03C8",
|
||
puncsp: "\u2008",
|
||
qfr: "\u{1D52E}",
|
||
qint: "\u2A0C",
|
||
qopf: "\u{1D562}",
|
||
qprime: "\u2057",
|
||
qscr: "\u{1D4C6}",
|
||
quaternions: "\u210D",
|
||
quatint: "\u2A16",
|
||
quest: "?",
|
||
questeq: "\u225F",
|
||
quot: '"',
|
||
rAarr: "\u21DB",
|
||
rArr: "\u21D2",
|
||
rAtail: "\u291C",
|
||
rBarr: "\u290F",
|
||
rHar: "\u2964",
|
||
race: "\u223D\u0331",
|
||
racute: "\u0155",
|
||
radic: "\u221A",
|
||
raemptyv: "\u29B3",
|
||
rang: "\u27E9",
|
||
rangd: "\u2992",
|
||
range: "\u29A5",
|
||
rangle: "\u27E9",
|
||
raquo: "\xBB",
|
||
rarr: "\u2192",
|
||
rarrap: "\u2975",
|
||
rarrb: "\u21E5",
|
||
rarrbfs: "\u2920",
|
||
rarrc: "\u2933",
|
||
rarrfs: "\u291E",
|
||
rarrhk: "\u21AA",
|
||
rarrlp: "\u21AC",
|
||
rarrpl: "\u2945",
|
||
rarrsim: "\u2974",
|
||
rarrtl: "\u21A3",
|
||
rarrw: "\u219D",
|
||
ratail: "\u291A",
|
||
ratio: "\u2236",
|
||
rationals: "\u211A",
|
||
rbarr: "\u290D",
|
||
rbbrk: "\u2773",
|
||
rbrace: "}",
|
||
rbrack: "]",
|
||
rbrke: "\u298C",
|
||
rbrksld: "\u298E",
|
||
rbrkslu: "\u2990",
|
||
rcaron: "\u0159",
|
||
rcedil: "\u0157",
|
||
rceil: "\u2309",
|
||
rcub: "}",
|
||
rcy: "\u0440",
|
||
rdca: "\u2937",
|
||
rdldhar: "\u2969",
|
||
rdquo: "\u201D",
|
||
rdquor: "\u201D",
|
||
rdsh: "\u21B3",
|
||
real: "\u211C",
|
||
realine: "\u211B",
|
||
realpart: "\u211C",
|
||
reals: "\u211D",
|
||
rect: "\u25AD",
|
||
reg: "\xAE",
|
||
rfisht: "\u297D",
|
||
rfloor: "\u230B",
|
||
rfr: "\u{1D52F}",
|
||
rhard: "\u21C1",
|
||
rharu: "\u21C0",
|
||
rharul: "\u296C",
|
||
rho: "\u03C1",
|
||
rhov: "\u03F1",
|
||
rightarrow: "\u2192",
|
||
rightarrowtail: "\u21A3",
|
||
rightharpoondown: "\u21C1",
|
||
rightharpoonup: "\u21C0",
|
||
rightleftarrows: "\u21C4",
|
||
rightleftharpoons: "\u21CC",
|
||
rightrightarrows: "\u21C9",
|
||
rightsquigarrow: "\u219D",
|
||
rightthreetimes: "\u22CC",
|
||
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: "\u{1D563}",
|
||
roplus: "\u2A2E",
|
||
rotimes: "\u2A35",
|
||
rpar: ")",
|
||
rpargt: "\u2994",
|
||
rppolint: "\u2A12",
|
||
rrarr: "\u21C9",
|
||
rsaquo: "\u203A",
|
||
rscr: "\u{1D4C7}",
|
||
rsh: "\u21B1",
|
||
rsqb: "]",
|
||
rsquo: "\u2019",
|
||
rsquor: "\u2019",
|
||
rthree: "\u22CC",
|
||
rtimes: "\u22CA",
|
||
rtri: "\u25B9",
|
||
rtrie: "\u22B5",
|
||
rtrif: "\u25B8",
|
||
rtriltri: "\u29CE",
|
||
ruluhar: "\u2968",
|
||
rx: "\u211E",
|
||
sacute: "\u015B",
|
||
sbquo: "\u201A",
|
||
sc: "\u227B",
|
||
scE: "\u2AB4",
|
||
scap: "\u2AB8",
|
||
scaron: "\u0161",
|
||
sccue: "\u227D",
|
||
sce: "\u2AB0",
|
||
scedil: "\u015F",
|
||
scirc: "\u015D",
|
||
scnE: "\u2AB6",
|
||
scnap: "\u2ABA",
|
||
scnsim: "\u22E9",
|
||
scpolint: "\u2A13",
|
||
scsim: "\u227F",
|
||
scy: "\u0441",
|
||
sdot: "\u22C5",
|
||
sdotb: "\u22A1",
|
||
sdote: "\u2A66",
|
||
seArr: "\u21D8",
|
||
searhk: "\u2925",
|
||
searr: "\u2198",
|
||
searrow: "\u2198",
|
||
sect: "\xA7",
|
||
semi: ";",
|
||
seswar: "\u2929",
|
||
setminus: "\u2216",
|
||
setmn: "\u2216",
|
||
sext: "\u2736",
|
||
sfr: "\u{1D530}",
|
||
sfrown: "\u2322",
|
||
sharp: "\u266F",
|
||
shchcy: "\u0449",
|
||
shcy: "\u0448",
|
||
shortmid: "\u2223",
|
||
shortparallel: "\u2225",
|
||
shy: "\xAD",
|
||
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",
|
||
smallsetminus: "\u2216",
|
||
smashp: "\u2A33",
|
||
smeparsl: "\u29E4",
|
||
smid: "\u2223",
|
||
smile: "\u2323",
|
||
smt: "\u2AAA",
|
||
smte: "\u2AAC",
|
||
smtes: "\u2AAC\uFE00",
|
||
softcy: "\u044C",
|
||
sol: "/",
|
||
solb: "\u29C4",
|
||
solbar: "\u233F",
|
||
sopf: "\u{1D564}",
|
||
spades: "\u2660",
|
||
spadesuit: "\u2660",
|
||
spar: "\u2225",
|
||
sqcap: "\u2293",
|
||
sqcaps: "\u2293\uFE00",
|
||
sqcup: "\u2294",
|
||
sqcups: "\u2294\uFE00",
|
||
sqsub: "\u228F",
|
||
sqsube: "\u2291",
|
||
sqsubset: "\u228F",
|
||
sqsubseteq: "\u2291",
|
||
sqsup: "\u2290",
|
||
sqsupe: "\u2292",
|
||
sqsupset: "\u2290",
|
||
sqsupseteq: "\u2292",
|
||
squ: "\u25A1",
|
||
square: "\u25A1",
|
||
squarf: "\u25AA",
|
||
squf: "\u25AA",
|
||
srarr: "\u2192",
|
||
sscr: "\u{1D4C8}",
|
||
ssetmn: "\u2216",
|
||
ssmile: "\u2323",
|
||
sstarf: "\u22C6",
|
||
star: "\u2606",
|
||
starf: "\u2605",
|
||
straightepsilon: "\u03F5",
|
||
straightphi: "\u03D5",
|
||
strns: "\xAF",
|
||
sub: "\u2282",
|
||
subE: "\u2AC5",
|
||
subdot: "\u2ABD",
|
||
sube: "\u2286",
|
||
subedot: "\u2AC3",
|
||
submult: "\u2AC1",
|
||
subnE: "\u2ACB",
|
||
subne: "\u228A",
|
||
subplus: "\u2ABF",
|
||
subrarr: "\u2979",
|
||
subset: "\u2282",
|
||
subseteq: "\u2286",
|
||
subseteqq: "\u2AC5",
|
||
subsetneq: "\u228A",
|
||
subsetneqq: "\u2ACB",
|
||
subsim: "\u2AC7",
|
||
subsub: "\u2AD5",
|
||
subsup: "\u2AD3",
|
||
succ: "\u227B",
|
||
succapprox: "\u2AB8",
|
||
succcurlyeq: "\u227D",
|
||
succeq: "\u2AB0",
|
||
succnapprox: "\u2ABA",
|
||
succneqq: "\u2AB6",
|
||
succnsim: "\u22E9",
|
||
succsim: "\u227F",
|
||
sum: "\u2211",
|
||
sung: "\u266A",
|
||
sup1: "\xB9",
|
||
sup2: "\xB2",
|
||
sup3: "\xB3",
|
||
sup: "\u2283",
|
||
supE: "\u2AC6",
|
||
supdot: "\u2ABE",
|
||
supdsub: "\u2AD8",
|
||
supe: "\u2287",
|
||
supedot: "\u2AC4",
|
||
suphsol: "\u27C9",
|
||
suphsub: "\u2AD7",
|
||
suplarr: "\u297B",
|
||
supmult: "\u2AC2",
|
||
supnE: "\u2ACC",
|
||
supne: "\u228B",
|
||
supplus: "\u2AC0",
|
||
supset: "\u2283",
|
||
supseteq: "\u2287",
|
||
supseteqq: "\u2AC6",
|
||
supsetneq: "\u228B",
|
||
supsetneqq: "\u2ACC",
|
||
supsim: "\u2AC8",
|
||
supsub: "\u2AD4",
|
||
supsup: "\u2AD6",
|
||
swArr: "\u21D9",
|
||
swarhk: "\u2926",
|
||
swarr: "\u2199",
|
||
swarrow: "\u2199",
|
||
swnwar: "\u292A",
|
||
szlig: "\xDF",
|
||
target: "\u2316",
|
||
tau: "\u03C4",
|
||
tbrk: "\u23B4",
|
||
tcaron: "\u0165",
|
||
tcedil: "\u0163",
|
||
tcy: "\u0442",
|
||
tdot: "\u20DB",
|
||
telrec: "\u2315",
|
||
tfr: "\u{1D531}",
|
||
there4: "\u2234",
|
||
therefore: "\u2234",
|
||
theta: "\u03B8",
|
||
thetasym: "\u03D1",
|
||
thetav: "\u03D1",
|
||
thickapprox: "\u2248",
|
||
thicksim: "\u223C",
|
||
thinsp: "\u2009",
|
||
thkap: "\u2248",
|
||
thksim: "\u223C",
|
||
thorn: "\xFE",
|
||
tilde: "\u02DC",
|
||
times: "\xD7",
|
||
timesb: "\u22A0",
|
||
timesbar: "\u2A31",
|
||
timesd: "\u2A30",
|
||
tint: "\u222D",
|
||
toea: "\u2928",
|
||
top: "\u22A4",
|
||
topbot: "\u2336",
|
||
topcir: "\u2AF1",
|
||
topf: "\u{1D565}",
|
||
topfork: "\u2ADA",
|
||
tosa: "\u2929",
|
||
tprime: "\u2034",
|
||
trade: "\u2122",
|
||
triangle: "\u25B5",
|
||
triangledown: "\u25BF",
|
||
triangleleft: "\u25C3",
|
||
trianglelefteq: "\u22B4",
|
||
triangleq: "\u225C",
|
||
triangleright: "\u25B9",
|
||
trianglerighteq: "\u22B5",
|
||
tridot: "\u25EC",
|
||
trie: "\u225C",
|
||
triminus: "\u2A3A",
|
||
triplus: "\u2A39",
|
||
trisb: "\u29CD",
|
||
tritime: "\u2A3B",
|
||
trpezium: "\u23E2",
|
||
tscr: "\u{1D4C9}",
|
||
tscy: "\u0446",
|
||
tshcy: "\u045B",
|
||
tstrok: "\u0167",
|
||
twixt: "\u226C",
|
||
twoheadleftarrow: "\u219E",
|
||
twoheadrightarrow: "\u21A0",
|
||
uArr: "\u21D1",
|
||
uHar: "\u2963",
|
||
uacute: "\xFA",
|
||
uarr: "\u2191",
|
||
ubrcy: "\u045E",
|
||
ubreve: "\u016D",
|
||
ucirc: "\xFB",
|
||
ucy: "\u0443",
|
||
udarr: "\u21C5",
|
||
udblac: "\u0171",
|
||
udhar: "\u296E",
|
||
ufisht: "\u297E",
|
||
ufr: "\u{1D532}",
|
||
ugrave: "\xF9",
|
||
uharl: "\u21BF",
|
||
uharr: "\u21BE",
|
||
uhblk: "\u2580",
|
||
ulcorn: "\u231C",
|
||
ulcorner: "\u231C",
|
||
ulcrop: "\u230F",
|
||
ultri: "\u25F8",
|
||
umacr: "\u016B",
|
||
uml: "\xA8",
|
||
uogon: "\u0173",
|
||
uopf: "\u{1D566}",
|
||
uparrow: "\u2191",
|
||
updownarrow: "\u2195",
|
||
upharpoonleft: "\u21BF",
|
||
upharpoonright: "\u21BE",
|
||
uplus: "\u228E",
|
||
upsi: "\u03C5",
|
||
upsih: "\u03D2",
|
||
upsilon: "\u03C5",
|
||
upuparrows: "\u21C8",
|
||
urcorn: "\u231D",
|
||
urcorner: "\u231D",
|
||
urcrop: "\u230E",
|
||
uring: "\u016F",
|
||
urtri: "\u25F9",
|
||
uscr: "\u{1D4CA}",
|
||
utdot: "\u22F0",
|
||
utilde: "\u0169",
|
||
utri: "\u25B5",
|
||
utrif: "\u25B4",
|
||
uuarr: "\u21C8",
|
||
uuml: "\xFC",
|
||
uwangle: "\u29A7",
|
||
vArr: "\u21D5",
|
||
vBar: "\u2AE8",
|
||
vBarv: "\u2AE9",
|
||
vDash: "\u22A8",
|
||
vangrt: "\u299C",
|
||
varepsilon: "\u03F5",
|
||
varkappa: "\u03F0",
|
||
varnothing: "\u2205",
|
||
varphi: "\u03D5",
|
||
varpi: "\u03D6",
|
||
varpropto: "\u221D",
|
||
varr: "\u2195",
|
||
varrho: "\u03F1",
|
||
varsigma: "\u03C2",
|
||
varsubsetneq: "\u228A\uFE00",
|
||
varsubsetneqq: "\u2ACB\uFE00",
|
||
varsupsetneq: "\u228B\uFE00",
|
||
varsupsetneqq: "\u2ACC\uFE00",
|
||
vartheta: "\u03D1",
|
||
vartriangleleft: "\u22B2",
|
||
vartriangleright: "\u22B3",
|
||
vcy: "\u0432",
|
||
vdash: "\u22A2",
|
||
vee: "\u2228",
|
||
veebar: "\u22BB",
|
||
veeeq: "\u225A",
|
||
vellip: "\u22EE",
|
||
verbar: "|",
|
||
vert: "|",
|
||
vfr: "\u{1D533}",
|
||
vltri: "\u22B2",
|
||
vnsub: "\u2282\u20D2",
|
||
vnsup: "\u2283\u20D2",
|
||
vopf: "\u{1D567}",
|
||
vprop: "\u221D",
|
||
vrtri: "\u22B3",
|
||
vscr: "\u{1D4CB}",
|
||
vsubnE: "\u2ACB\uFE00",
|
||
vsubne: "\u228A\uFE00",
|
||
vsupnE: "\u2ACC\uFE00",
|
||
vsupne: "\u228B\uFE00",
|
||
vzigzag: "\u299A",
|
||
wcirc: "\u0175",
|
||
wedbar: "\u2A5F",
|
||
wedge: "\u2227",
|
||
wedgeq: "\u2259",
|
||
weierp: "\u2118",
|
||
wfr: "\u{1D534}",
|
||
wopf: "\u{1D568}",
|
||
wp: "\u2118",
|
||
wr: "\u2240",
|
||
wreath: "\u2240",
|
||
wscr: "\u{1D4CC}",
|
||
xcap: "\u22C2",
|
||
xcirc: "\u25EF",
|
||
xcup: "\u22C3",
|
||
xdtri: "\u25BD",
|
||
xfr: "\u{1D535}",
|
||
xhArr: "\u27FA",
|
||
xharr: "\u27F7",
|
||
xi: "\u03BE",
|
||
xlArr: "\u27F8",
|
||
xlarr: "\u27F5",
|
||
xmap: "\u27FC",
|
||
xnis: "\u22FB",
|
||
xodot: "\u2A00",
|
||
xopf: "\u{1D569}",
|
||
xoplus: "\u2A01",
|
||
xotime: "\u2A02",
|
||
xrArr: "\u27F9",
|
||
xrarr: "\u27F6",
|
||
xscr: "\u{1D4CD}",
|
||
xsqcup: "\u2A06",
|
||
xuplus: "\u2A04",
|
||
xutri: "\u25B3",
|
||
xvee: "\u22C1",
|
||
xwedge: "\u22C0",
|
||
yacute: "\xFD",
|
||
yacy: "\u044F",
|
||
ycirc: "\u0177",
|
||
ycy: "\u044B",
|
||
yen: "\xA5",
|
||
yfr: "\u{1D536}",
|
||
yicy: "\u0457",
|
||
yopf: "\u{1D56A}",
|
||
yscr: "\u{1D4CE}",
|
||
yucy: "\u044E",
|
||
yuml: "\xFF",
|
||
zacute: "\u017A",
|
||
zcaron: "\u017E",
|
||
zcy: "\u0437",
|
||
zdot: "\u017C",
|
||
zeetrf: "\u2128",
|
||
zeta: "\u03B6",
|
||
zfr: "\u{1D537}",
|
||
zhcy: "\u0436",
|
||
zigrarr: "\u21DD",
|
||
zopf: "\u{1D56B}",
|
||
zscr: "\u{1D4CF}",
|
||
zwj: "\u200D",
|
||
zwnj: "\u200C"
|
||
};
|
||
var decodeMap2 = {
|
||
"0": 65533,
|
||
"128": 8364,
|
||
"130": 8218,
|
||
"131": 402,
|
||
"132": 8222,
|
||
"133": 8230,
|
||
"134": 8224,
|
||
"135": 8225,
|
||
"136": 710,
|
||
"137": 8240,
|
||
"138": 352,
|
||
"139": 8249,
|
||
"140": 338,
|
||
"142": 381,
|
||
"145": 8216,
|
||
"146": 8217,
|
||
"147": 8220,
|
||
"148": 8221,
|
||
"149": 8226,
|
||
"150": 8211,
|
||
"151": 8212,
|
||
"152": 732,
|
||
"153": 8482,
|
||
"154": 353,
|
||
"155": 8250,
|
||
"156": 339,
|
||
"158": 382,
|
||
"159": 376
|
||
};
|
||
function decodeHTMLStrict(text2) {
|
||
return text2.replace(/&(?:[a-zA-Z]+|#[xX][\da-fA-F]+|#\d+);/g, (key) => {
|
||
if (key.charAt(1) === "#") {
|
||
const secondChar = key.charAt(2);
|
||
const codePoint = secondChar === "X" || secondChar === "x" ? parseInt(key.slice(3), 16) : parseInt(key.slice(2), 10);
|
||
return decodeCodePoint2(codePoint);
|
||
}
|
||
return entities[key.slice(1, -1)] || key;
|
||
});
|
||
}
|
||
function decodeCodePoint2(codePoint) {
|
||
if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
|
||
return "\uFFFD";
|
||
}
|
||
if (codePoint in decodeMap2) {
|
||
codePoint = decodeMap2[codePoint];
|
||
}
|
||
return String.fromCodePoint(codePoint);
|
||
}
|
||
function scanJSXAttributeValue(parser, context) {
|
||
parser.startPos = parser.tokenPos = parser.index;
|
||
parser.startColumn = parser.colPos = parser.column;
|
||
parser.startLine = parser.linePos = parser.line;
|
||
parser.token = CharTypes[parser.currentChar] & 8192 ? scanJSXString(parser, context) : scanSingleToken(parser, context, 0);
|
||
return parser.token;
|
||
}
|
||
function scanJSXString(parser, context) {
|
||
const quote = parser.currentChar;
|
||
let char = advanceChar(parser);
|
||
const start = parser.index;
|
||
while (char !== quote) {
|
||
if (parser.index >= parser.end)
|
||
report(parser, 14);
|
||
char = advanceChar(parser);
|
||
}
|
||
if (char !== quote)
|
||
report(parser, 14);
|
||
parser.tokenValue = parser.source.slice(start, parser.index);
|
||
advanceChar(parser);
|
||
if (context & 512)
|
||
parser.tokenRaw = parser.source.slice(parser.tokenPos, parser.index);
|
||
return 134283267;
|
||
}
|
||
function scanJSXToken(parser, context) {
|
||
parser.startPos = parser.tokenPos = parser.index;
|
||
parser.startColumn = parser.colPos = parser.column;
|
||
parser.startLine = parser.linePos = parser.line;
|
||
if (parser.index >= parser.end)
|
||
return parser.token = 1048576;
|
||
const token = TokenLookup[parser.source.charCodeAt(parser.index)];
|
||
switch (token) {
|
||
case 8456258: {
|
||
advanceChar(parser);
|
||
if (parser.currentChar === 47) {
|
||
advanceChar(parser);
|
||
parser.token = 25;
|
||
} else {
|
||
parser.token = 8456258;
|
||
}
|
||
break;
|
||
}
|
||
case 2162700: {
|
||
advanceChar(parser);
|
||
parser.token = 2162700;
|
||
break;
|
||
}
|
||
default: {
|
||
let state = 0;
|
||
while (parser.index < parser.end) {
|
||
const type = CharTypes[parser.source.charCodeAt(parser.index)];
|
||
if (type & 1024) {
|
||
state |= 1 | 4;
|
||
scanNewLine(parser);
|
||
} else if (type & 2048) {
|
||
consumeLineFeed(parser, state);
|
||
state = state & ~4 | 1;
|
||
} else {
|
||
advanceChar(parser);
|
||
}
|
||
if (CharTypes[parser.currentChar] & 16384)
|
||
break;
|
||
}
|
||
const raw = parser.source.slice(parser.tokenPos, parser.index);
|
||
if (context & 512)
|
||
parser.tokenRaw = raw;
|
||
parser.tokenValue = decodeHTMLStrict(raw);
|
||
parser.token = 138;
|
||
}
|
||
}
|
||
return parser.token;
|
||
}
|
||
function scanJSXIdentifier(parser) {
|
||
if ((parser.token & 143360) === 143360) {
|
||
const { index } = parser;
|
||
let char = parser.currentChar;
|
||
while (CharTypes[char] & (32768 | 2)) {
|
||
char = advanceChar(parser);
|
||
}
|
||
parser.tokenValue += parser.source.slice(index, parser.index);
|
||
}
|
||
parser.token = 208897;
|
||
return parser.token;
|
||
}
|
||
function matchOrInsertSemicolon(parser, context, specDeviation) {
|
||
if ((parser.flags & 1) === 0 && (parser.token & 1048576) !== 1048576 && !specDeviation) {
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
}
|
||
consumeOpt(parser, context, 1074790417);
|
||
}
|
||
function isValidStrictMode(parser, index, tokenPos, tokenValue) {
|
||
if (index - tokenPos < 13 && tokenValue === "use strict") {
|
||
if ((parser.token & 1048576) === 1048576 || parser.flags & 1) {
|
||
return 1;
|
||
}
|
||
}
|
||
return 0;
|
||
}
|
||
function optionalBit(parser, context, t) {
|
||
if (parser.token !== t)
|
||
return 0;
|
||
nextToken(parser, context);
|
||
return 1;
|
||
}
|
||
function consumeOpt(parser, context, t) {
|
||
if (parser.token !== t)
|
||
return false;
|
||
nextToken(parser, context);
|
||
return true;
|
||
}
|
||
function consume(parser, context, t) {
|
||
if (parser.token !== t)
|
||
report(parser, 23, KeywordDescTable[t & 255]);
|
||
nextToken(parser, context);
|
||
}
|
||
function reinterpretToPattern(state, node) {
|
||
switch (node.type) {
|
||
case "ArrayExpression":
|
||
node.type = "ArrayPattern";
|
||
const elements = node.elements;
|
||
for (let i = 0, n = elements.length; i < n; ++i) {
|
||
const element = elements[i];
|
||
if (element)
|
||
reinterpretToPattern(state, element);
|
||
}
|
||
return;
|
||
case "ObjectExpression":
|
||
node.type = "ObjectPattern";
|
||
const properties2 = node.properties;
|
||
for (let i = 0, n = properties2.length; i < n; ++i) {
|
||
reinterpretToPattern(state, properties2[i]);
|
||
}
|
||
return;
|
||
case "AssignmentExpression":
|
||
node.type = "AssignmentPattern";
|
||
if (node.operator !== "=")
|
||
report(state, 69);
|
||
delete node.operator;
|
||
reinterpretToPattern(state, node.left);
|
||
return;
|
||
case "Property":
|
||
reinterpretToPattern(state, node.value);
|
||
return;
|
||
case "SpreadElement":
|
||
node.type = "RestElement";
|
||
reinterpretToPattern(state, node.argument);
|
||
}
|
||
}
|
||
function validateBindingIdentifier(parser, context, kind, t, skipEvalArgCheck) {
|
||
if (context & 1024) {
|
||
if ((t & 36864) === 36864) {
|
||
report(parser, 115);
|
||
}
|
||
if (!skipEvalArgCheck && (t & 537079808) === 537079808) {
|
||
report(parser, 116);
|
||
}
|
||
}
|
||
if ((t & 20480) === 20480) {
|
||
report(parser, 100);
|
||
}
|
||
if (kind & (8 | 16) && t === 241739) {
|
||
report(parser, 98);
|
||
}
|
||
if (context & (4194304 | 2048) && t === 209008) {
|
||
report(parser, 96);
|
||
}
|
||
if (context & (2097152 | 1024) && t === 241773) {
|
||
report(parser, 95, "yield");
|
||
}
|
||
}
|
||
function validateFunctionName(parser, context, t) {
|
||
if (context & 1024) {
|
||
if ((t & 36864) === 36864) {
|
||
report(parser, 115);
|
||
}
|
||
if ((t & 537079808) === 537079808) {
|
||
report(parser, 116);
|
||
}
|
||
if (t === 122) {
|
||
report(parser, 93);
|
||
}
|
||
if (t === 121) {
|
||
report(parser, 93);
|
||
}
|
||
}
|
||
if ((t & 20480) === 20480) {
|
||
report(parser, 100);
|
||
}
|
||
if (context & (4194304 | 2048) && t === 209008) {
|
||
report(parser, 96);
|
||
}
|
||
if (context & (2097152 | 1024) && t === 241773) {
|
||
report(parser, 95, "yield");
|
||
}
|
||
}
|
||
function isStrictReservedWord(parser, context, t) {
|
||
if (t === 209008) {
|
||
if (context & (4194304 | 2048))
|
||
report(parser, 96);
|
||
parser.destructible |= 128;
|
||
}
|
||
if (t === 241773 && context & 2097152)
|
||
report(parser, 95, "yield");
|
||
return (t & 20480) === 20480 || (t & 36864) === 36864 || t == 122;
|
||
}
|
||
function isPropertyWithPrivateFieldKey(expr) {
|
||
return !expr.property ? false : expr.property.type === "PrivateIdentifier";
|
||
}
|
||
function isValidLabel(parser, labels, name42, isIterationStatement) {
|
||
while (labels) {
|
||
if (labels["$" + name42]) {
|
||
if (isIterationStatement)
|
||
report(parser, 134);
|
||
return 1;
|
||
}
|
||
if (isIterationStatement && labels.loop)
|
||
isIterationStatement = 0;
|
||
labels = labels["$"];
|
||
}
|
||
return 0;
|
||
}
|
||
function validateAndDeclareLabel(parser, labels, name42) {
|
||
let set = labels;
|
||
while (set) {
|
||
if (set["$" + name42])
|
||
report(parser, 133, name42);
|
||
set = set["$"];
|
||
}
|
||
labels["$" + name42] = 1;
|
||
}
|
||
function finishNode(parser, context, start, line, column, node) {
|
||
if (context & 2) {
|
||
node.start = start;
|
||
node.end = parser.startPos;
|
||
node.range = [start, parser.startPos];
|
||
}
|
||
if (context & 4) {
|
||
node.loc = {
|
||
start: {
|
||
line,
|
||
column
|
||
},
|
||
end: {
|
||
line: parser.startLine,
|
||
column: parser.startColumn
|
||
}
|
||
};
|
||
if (parser.sourceFile) {
|
||
node.loc.source = parser.sourceFile;
|
||
}
|
||
}
|
||
return node;
|
||
}
|
||
function isEqualTagName(elementName) {
|
||
switch (elementName.type) {
|
||
case "JSXIdentifier":
|
||
return elementName.name;
|
||
case "JSXNamespacedName":
|
||
return elementName.namespace + ":" + elementName.name;
|
||
case "JSXMemberExpression":
|
||
return isEqualTagName(elementName.object) + "." + isEqualTagName(elementName.property);
|
||
}
|
||
}
|
||
function createArrowHeadParsingScope(parser, context, value) {
|
||
const scope = addChildScope(createScope(), 1024);
|
||
addBlockName(parser, context, scope, value, 1, 0);
|
||
return scope;
|
||
}
|
||
function recordScopeError(parser, type, ...params) {
|
||
const { index, line, column } = parser;
|
||
return {
|
||
type,
|
||
params,
|
||
index,
|
||
line,
|
||
column
|
||
};
|
||
}
|
||
function createScope() {
|
||
return {
|
||
parent: void 0,
|
||
type: 2
|
||
};
|
||
}
|
||
function addChildScope(parent, type) {
|
||
return {
|
||
parent,
|
||
type,
|
||
scopeError: void 0
|
||
};
|
||
}
|
||
function addVarOrBlock(parser, context, scope, name42, kind, origin) {
|
||
if (kind & 4) {
|
||
addVarName(parser, context, scope, name42, kind);
|
||
} else {
|
||
addBlockName(parser, context, scope, name42, kind, origin);
|
||
}
|
||
if (origin & 64) {
|
||
declareUnboundVariable(parser, name42);
|
||
}
|
||
}
|
||
function addBlockName(parser, context, scope, name42, kind, origin) {
|
||
const value = scope["#" + name42];
|
||
if (value && (value & 2) === 0) {
|
||
if (kind & 1) {
|
||
scope.scopeError = recordScopeError(parser, 141, name42);
|
||
} else if (context & 256 && value & 64 && origin & 2)
|
||
;
|
||
else {
|
||
report(parser, 141, name42);
|
||
}
|
||
}
|
||
if (scope.type & 128 && (scope.parent["#" + name42] && (scope.parent["#" + name42] & 2) === 0)) {
|
||
report(parser, 141, name42);
|
||
}
|
||
if (scope.type & 1024 && value && (value & 2) === 0) {
|
||
if (kind & 1) {
|
||
scope.scopeError = recordScopeError(parser, 141, name42);
|
||
}
|
||
}
|
||
if (scope.type & 64) {
|
||
if (scope.parent["#" + name42] & 768)
|
||
report(parser, 154, name42);
|
||
}
|
||
scope["#" + name42] = kind;
|
||
}
|
||
function addVarName(parser, context, scope, name42, kind) {
|
||
let currentScope = scope;
|
||
while (currentScope && (currentScope.type & 256) === 0) {
|
||
const value = currentScope["#" + name42];
|
||
if (value & 248) {
|
||
if (context & 256 && (context & 1024) === 0 && (kind & 128 && value & 68 || value & 128 && kind & 68))
|
||
;
|
||
else {
|
||
report(parser, 141, name42);
|
||
}
|
||
}
|
||
if (currentScope === scope) {
|
||
if (value & 1 && kind & 1) {
|
||
currentScope.scopeError = recordScopeError(parser, 141, name42);
|
||
}
|
||
}
|
||
if (value & (512 | 256)) {
|
||
if ((value & 512) === 0 || (context & 256) === 0 || context & 1024) {
|
||
report(parser, 141, name42);
|
||
}
|
||
}
|
||
currentScope["#" + name42] = kind;
|
||
currentScope = currentScope.parent;
|
||
}
|
||
}
|
||
function declareUnboundVariable(parser, name42) {
|
||
if (parser.exportedNames !== void 0 && name42 !== "") {
|
||
if (parser.exportedNames["#" + name42]) {
|
||
report(parser, 142, name42);
|
||
}
|
||
parser.exportedNames["#" + name42] = 1;
|
||
}
|
||
}
|
||
function addBindingToExports(parser, name42) {
|
||
if (parser.exportedBindings !== void 0 && name42 !== "") {
|
||
parser.exportedBindings["#" + name42] = 1;
|
||
}
|
||
}
|
||
function pushComment(context, array) {
|
||
return function(type, value, start, end, loc) {
|
||
const comment = {
|
||
type,
|
||
value
|
||
};
|
||
if (context & 2) {
|
||
comment.start = start;
|
||
comment.end = end;
|
||
comment.range = [start, end];
|
||
}
|
||
if (context & 4) {
|
||
comment.loc = loc;
|
||
}
|
||
array.push(comment);
|
||
};
|
||
}
|
||
function pushToken(context, array) {
|
||
return function(token, start, end, loc) {
|
||
const tokens = {
|
||
token
|
||
};
|
||
if (context & 2) {
|
||
tokens.start = start;
|
||
tokens.end = end;
|
||
tokens.range = [start, end];
|
||
}
|
||
if (context & 4) {
|
||
tokens.loc = loc;
|
||
}
|
||
array.push(tokens);
|
||
};
|
||
}
|
||
function isValidIdentifier(context, t) {
|
||
if (context & (1024 | 2097152)) {
|
||
if (context & 2048 && t === 209008)
|
||
return false;
|
||
if (context & 2097152 && t === 241773)
|
||
return false;
|
||
return (t & 143360) === 143360 || (t & 12288) === 12288;
|
||
}
|
||
return (t & 143360) === 143360 || (t & 12288) === 12288 || (t & 36864) === 36864;
|
||
}
|
||
function classifyIdentifier(parser, context, t, isArrow) {
|
||
if ((t & 537079808) === 537079808) {
|
||
if (context & 1024)
|
||
report(parser, 116);
|
||
if (isArrow)
|
||
parser.flags |= 512;
|
||
}
|
||
if (!isValidIdentifier(context, t))
|
||
report(parser, 0);
|
||
}
|
||
function create(source, sourceFile, onComment, onToken) {
|
||
return {
|
||
source,
|
||
flags: 0,
|
||
index: 0,
|
||
line: 1,
|
||
column: 0,
|
||
startPos: 0,
|
||
end: source.length,
|
||
tokenPos: 0,
|
||
startColumn: 0,
|
||
colPos: 0,
|
||
linePos: 1,
|
||
startLine: 1,
|
||
sourceFile,
|
||
tokenValue: "",
|
||
token: 1048576,
|
||
tokenRaw: "",
|
||
tokenRegExp: void 0,
|
||
currentChar: source.charCodeAt(0),
|
||
exportedNames: [],
|
||
exportedBindings: [],
|
||
assignable: 1,
|
||
destructible: 0,
|
||
onComment,
|
||
onToken,
|
||
leadingDecorators: []
|
||
};
|
||
}
|
||
function parseSource(source, options, context) {
|
||
let sourceFile = "";
|
||
let onComment;
|
||
let onToken;
|
||
if (options != null) {
|
||
if (options.module)
|
||
context |= 2048 | 1024;
|
||
if (options.next)
|
||
context |= 1;
|
||
if (options.loc)
|
||
context |= 4;
|
||
if (options.ranges)
|
||
context |= 2;
|
||
if (options.uniqueKeyInPattern)
|
||
context |= -2147483648;
|
||
if (options.lexical)
|
||
context |= 64;
|
||
if (options.webcompat)
|
||
context |= 256;
|
||
if (options.directives)
|
||
context |= 8 | 512;
|
||
if (options.globalReturn)
|
||
context |= 32;
|
||
if (options.raw)
|
||
context |= 512;
|
||
if (options.preserveParens)
|
||
context |= 128;
|
||
if (options.impliedStrict)
|
||
context |= 1024;
|
||
if (options.jsx)
|
||
context |= 16;
|
||
if (options.identifierPattern)
|
||
context |= 268435456;
|
||
if (options.specDeviation)
|
||
context |= 536870912;
|
||
if (options.source)
|
||
sourceFile = options.source;
|
||
if (options.onComment != null) {
|
||
onComment = Array.isArray(options.onComment) ? pushComment(context, options.onComment) : options.onComment;
|
||
}
|
||
if (options.onToken != null) {
|
||
onToken = Array.isArray(options.onToken) ? pushToken(context, options.onToken) : options.onToken;
|
||
}
|
||
}
|
||
const parser = create(source, sourceFile, onComment, onToken);
|
||
if (context & 1)
|
||
skipHashBang(parser);
|
||
const scope = context & 64 ? createScope() : void 0;
|
||
let body = [];
|
||
let sourceType = "script";
|
||
if (context & 2048) {
|
||
sourceType = "module";
|
||
body = parseModuleItemList(parser, context | 8192, scope);
|
||
if (scope) {
|
||
for (const key in parser.exportedBindings) {
|
||
if (key[0] === "#" && !scope[key])
|
||
report(parser, 143, key.slice(1));
|
||
}
|
||
}
|
||
} else {
|
||
body = parseStatementList(parser, context | 8192, scope);
|
||
}
|
||
const node = {
|
||
type: "Program",
|
||
sourceType,
|
||
body
|
||
};
|
||
if (context & 2) {
|
||
node.start = 0;
|
||
node.end = source.length;
|
||
node.range = [0, source.length];
|
||
}
|
||
if (context & 4) {
|
||
node.loc = {
|
||
start: { line: 1, column: 0 },
|
||
end: { line: parser.line, column: parser.column }
|
||
};
|
||
if (parser.sourceFile)
|
||
node.loc.source = sourceFile;
|
||
}
|
||
return node;
|
||
}
|
||
function parseStatementList(parser, context, scope) {
|
||
nextToken(parser, context | 32768 | 1073741824);
|
||
const statements = [];
|
||
while (parser.token === 134283267) {
|
||
const { index, tokenPos, tokenValue, linePos, colPos, token } = parser;
|
||
const expr = parseLiteral(parser, context);
|
||
if (isValidStrictMode(parser, index, tokenPos, tokenValue))
|
||
context |= 1024;
|
||
statements.push(parseDirective(parser, context, expr, token, tokenPos, linePos, colPos));
|
||
}
|
||
while (parser.token !== 1048576) {
|
||
statements.push(parseStatementListItem(parser, context, scope, 4, {}));
|
||
}
|
||
return statements;
|
||
}
|
||
function parseModuleItemList(parser, context, scope) {
|
||
nextToken(parser, context | 32768);
|
||
const statements = [];
|
||
if (context & 8) {
|
||
while (parser.token === 134283267) {
|
||
const { tokenPos, linePos, colPos, token } = parser;
|
||
statements.push(parseDirective(parser, context, parseLiteral(parser, context), token, tokenPos, linePos, colPos));
|
||
}
|
||
}
|
||
while (parser.token !== 1048576) {
|
||
statements.push(parseModuleItem(parser, context, scope));
|
||
}
|
||
return statements;
|
||
}
|
||
function parseModuleItem(parser, context, scope) {
|
||
parser.leadingDecorators = parseDecorators(parser, context);
|
||
let moduleItem;
|
||
switch (parser.token) {
|
||
case 20566:
|
||
moduleItem = parseExportDeclaration(parser, context, scope);
|
||
break;
|
||
case 86108:
|
||
moduleItem = parseImportDeclaration(parser, context, scope);
|
||
break;
|
||
default:
|
||
moduleItem = parseStatementListItem(parser, context, scope, 4, {});
|
||
}
|
||
if (parser.leadingDecorators.length) {
|
||
report(parser, 165);
|
||
}
|
||
return moduleItem;
|
||
}
|
||
function parseStatementListItem(parser, context, scope, origin, labels) {
|
||
const start = parser.tokenPos;
|
||
const line = parser.linePos;
|
||
const column = parser.colPos;
|
||
switch (parser.token) {
|
||
case 86106:
|
||
return parseFunctionDeclaration(parser, context, scope, origin, 1, 0, 0, start, line, column);
|
||
case 133:
|
||
case 86096:
|
||
return parseClassDeclaration(parser, context, scope, 0, start, line, column);
|
||
case 86092:
|
||
return parseLexicalDeclaration(parser, context, scope, 16, 0, start, line, column);
|
||
case 241739:
|
||
return parseLetIdentOrVarDeclarationStatement(parser, context, scope, origin, start, line, column);
|
||
case 20566:
|
||
report(parser, 101, "export");
|
||
case 86108:
|
||
nextToken(parser, context);
|
||
switch (parser.token) {
|
||
case 67174411:
|
||
return parseImportCallDeclaration(parser, context, start, line, column);
|
||
case 67108877:
|
||
return parseImportMetaDeclaration(parser, context, start, line, column);
|
||
default:
|
||
report(parser, 101, "import");
|
||
}
|
||
case 209007:
|
||
return parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, 1, start, line, column);
|
||
default:
|
||
return parseStatement(parser, context, scope, origin, labels, 1, start, line, column);
|
||
}
|
||
}
|
||
function parseStatement(parser, context, scope, origin, labels, allowFuncDecl, start, line, column) {
|
||
switch (parser.token) {
|
||
case 86090:
|
||
return parseVariableStatement(parser, context, scope, 0, start, line, column);
|
||
case 20574:
|
||
return parseReturnStatement(parser, context, start, line, column);
|
||
case 20571:
|
||
return parseIfStatement(parser, context, scope, labels, start, line, column);
|
||
case 20569:
|
||
return parseForStatement(parser, context, scope, labels, start, line, column);
|
||
case 20564:
|
||
return parseDoWhileStatement(parser, context, scope, labels, start, line, column);
|
||
case 20580:
|
||
return parseWhileStatement(parser, context, scope, labels, start, line, column);
|
||
case 86112:
|
||
return parseSwitchStatement(parser, context, scope, labels, start, line, column);
|
||
case 1074790417:
|
||
return parseEmptyStatement(parser, context, start, line, column);
|
||
case 2162700:
|
||
return parseBlock(parser, context, scope ? addChildScope(scope, 2) : scope, labels, start, line, column);
|
||
case 86114:
|
||
return parseThrowStatement(parser, context, start, line, column);
|
||
case 20557:
|
||
return parseBreakStatement(parser, context, labels, start, line, column);
|
||
case 20561:
|
||
return parseContinueStatement(parser, context, labels, start, line, column);
|
||
case 20579:
|
||
return parseTryStatement(parser, context, scope, labels, start, line, column);
|
||
case 20581:
|
||
return parseWithStatement(parser, context, scope, labels, start, line, column);
|
||
case 20562:
|
||
return parseDebuggerStatement(parser, context, start, line, column);
|
||
case 209007:
|
||
return parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, 0, start, line, column);
|
||
case 20559:
|
||
report(parser, 157);
|
||
case 20568:
|
||
report(parser, 158);
|
||
case 86106:
|
||
report(parser, context & 1024 ? 74 : (context & 256) === 0 ? 76 : 75);
|
||
case 86096:
|
||
report(parser, 77);
|
||
default:
|
||
return parseExpressionOrLabelledStatement(parser, context, scope, origin, labels, allowFuncDecl, start, line, column);
|
||
}
|
||
}
|
||
function parseExpressionOrLabelledStatement(parser, context, scope, origin, labels, allowFuncDecl, start, line, column) {
|
||
const { tokenValue, token } = parser;
|
||
let expr;
|
||
switch (token) {
|
||
case 241739:
|
||
expr = parseIdentifier(parser, context, 0);
|
||
if (context & 1024)
|
||
report(parser, 83);
|
||
if (parser.token === 69271571)
|
||
report(parser, 82);
|
||
break;
|
||
default:
|
||
expr = parsePrimaryExpression(parser, context, 2, 0, 1, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
}
|
||
if (token & 143360 && parser.token === 21) {
|
||
return parseLabelledStatement(parser, context, scope, origin, labels, tokenValue, expr, token, allowFuncDecl, start, line, column);
|
||
}
|
||
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, start, line, column);
|
||
expr = parseAssignmentExpression(parser, context, 0, 0, start, line, column, expr);
|
||
if (parser.token === 18) {
|
||
expr = parseSequenceExpression(parser, context, 0, start, line, column, expr);
|
||
}
|
||
return parseExpressionStatement(parser, context, expr, start, line, column);
|
||
}
|
||
function parseBlock(parser, context, scope, labels, start, line, column) {
|
||
const body = [];
|
||
consume(parser, context | 32768, 2162700);
|
||
while (parser.token !== 1074790415) {
|
||
body.push(parseStatementListItem(parser, context, scope, 2, { $: labels }));
|
||
}
|
||
consume(parser, context | 32768, 1074790415);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "BlockStatement",
|
||
body
|
||
});
|
||
}
|
||
function parseReturnStatement(parser, context, start, line, column) {
|
||
if ((context & 32) === 0 && context & 8192)
|
||
report(parser, 90);
|
||
nextToken(parser, context | 32768);
|
||
const argument = parser.flags & 1 || parser.token & 1048576 ? null : parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ReturnStatement",
|
||
argument
|
||
});
|
||
}
|
||
function parseExpressionStatement(parser, context, expression, start, line, column) {
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ExpressionStatement",
|
||
expression
|
||
});
|
||
}
|
||
function parseLabelledStatement(parser, context, scope, origin, labels, value, expr, token, allowFuncDecl, start, line, column) {
|
||
validateBindingIdentifier(parser, context, 0, token, 1);
|
||
validateAndDeclareLabel(parser, labels, value);
|
||
nextToken(parser, context | 32768);
|
||
const body = allowFuncDecl && (context & 1024) === 0 && context & 256 && parser.token === 86106 ? parseFunctionDeclaration(parser, context, addChildScope(scope, 2), origin, 0, 0, 0, parser.tokenPos, parser.linePos, parser.colPos) : parseStatement(parser, context, scope, origin, labels, allowFuncDecl, parser.tokenPos, parser.linePos, parser.colPos);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "LabeledStatement",
|
||
label: expr,
|
||
body
|
||
});
|
||
}
|
||
function parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, origin, labels, allowFuncDecl, start, line, column) {
|
||
const { token, tokenValue } = parser;
|
||
let expr = parseIdentifier(parser, context, 0);
|
||
if (parser.token === 21) {
|
||
return parseLabelledStatement(parser, context, scope, origin, labels, tokenValue, expr, token, 1, start, line, column);
|
||
}
|
||
const asyncNewLine = parser.flags & 1;
|
||
if (!asyncNewLine) {
|
||
if (parser.token === 86106) {
|
||
if (!allowFuncDecl)
|
||
report(parser, 120);
|
||
return parseFunctionDeclaration(parser, context, scope, origin, 1, 0, 1, start, line, column);
|
||
}
|
||
if ((parser.token & 143360) === 143360) {
|
||
expr = parseAsyncArrowAfterIdent(parser, context, 1, start, line, column);
|
||
if (parser.token === 18)
|
||
expr = parseSequenceExpression(parser, context, 0, start, line, column, expr);
|
||
return parseExpressionStatement(parser, context, expr, start, line, column);
|
||
}
|
||
}
|
||
if (parser.token === 67174411) {
|
||
expr = parseAsyncArrowOrCallExpression(parser, context, expr, 1, 1, 0, asyncNewLine, start, line, column);
|
||
} else {
|
||
if (parser.token === 10) {
|
||
classifyIdentifier(parser, context, token, 1);
|
||
expr = parseArrowFromIdentifier(parser, context, parser.tokenValue, expr, 0, 1, 0, start, line, column);
|
||
}
|
||
parser.assignable = 1;
|
||
}
|
||
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, start, line, column);
|
||
if (parser.token === 18)
|
||
expr = parseSequenceExpression(parser, context, 0, start, line, column, expr);
|
||
expr = parseAssignmentExpression(parser, context, 0, 0, start, line, column, expr);
|
||
parser.assignable = 1;
|
||
return parseExpressionStatement(parser, context, expr, start, line, column);
|
||
}
|
||
function parseDirective(parser, context, expression, token, start, line, column) {
|
||
if (token !== 1074790417) {
|
||
parser.assignable = 2;
|
||
expression = parseMemberOrUpdateExpression(parser, context, expression, 0, 0, start, line, column);
|
||
if (parser.token !== 1074790417) {
|
||
expression = parseAssignmentExpression(parser, context, 0, 0, start, line, column, expression);
|
||
if (parser.token === 18) {
|
||
expression = parseSequenceExpression(parser, context, 0, start, line, column, expression);
|
||
}
|
||
}
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
}
|
||
return context & 8 && expression.type === "Literal" && typeof expression.value === "string" ? finishNode(parser, context, start, line, column, {
|
||
type: "ExpressionStatement",
|
||
expression,
|
||
directive: expression.raw.slice(1, -1)
|
||
}) : finishNode(parser, context, start, line, column, {
|
||
type: "ExpressionStatement",
|
||
expression
|
||
});
|
||
}
|
||
function parseEmptyStatement(parser, context, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "EmptyStatement"
|
||
});
|
||
}
|
||
function parseThrowStatement(parser, context, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
if (parser.flags & 1)
|
||
report(parser, 88);
|
||
const argument = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ThrowStatement",
|
||
argument
|
||
});
|
||
}
|
||
function parseIfStatement(parser, context, scope, labels, start, line, column) {
|
||
nextToken(parser, context);
|
||
consume(parser, context | 32768, 67174411);
|
||
parser.assignable = 1;
|
||
const test = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.line, parser.colPos);
|
||
consume(parser, context | 32768, 16);
|
||
const consequent = parseConsequentOrAlternative(parser, context, scope, labels, parser.tokenPos, parser.linePos, parser.colPos);
|
||
let alternate = null;
|
||
if (parser.token === 20565) {
|
||
nextToken(parser, context | 32768);
|
||
alternate = parseConsequentOrAlternative(parser, context, scope, labels, parser.tokenPos, parser.linePos, parser.colPos);
|
||
}
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "IfStatement",
|
||
test,
|
||
consequent,
|
||
alternate
|
||
});
|
||
}
|
||
function parseConsequentOrAlternative(parser, context, scope, labels, start, line, column) {
|
||
return context & 1024 || (context & 256) === 0 || parser.token !== 86106 ? parseStatement(parser, context, scope, 0, { $: labels }, 0, parser.tokenPos, parser.linePos, parser.colPos) : parseFunctionDeclaration(parser, context, addChildScope(scope, 2), 0, 0, 0, 0, start, line, column);
|
||
}
|
||
function parseSwitchStatement(parser, context, scope, labels, start, line, column) {
|
||
nextToken(parser, context);
|
||
consume(parser, context | 32768, 67174411);
|
||
const discriminant = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context, 16);
|
||
consume(parser, context, 2162700);
|
||
const cases = [];
|
||
let seenDefault = 0;
|
||
if (scope)
|
||
scope = addChildScope(scope, 8);
|
||
while (parser.token !== 1074790415) {
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
let test = null;
|
||
const consequent = [];
|
||
if (consumeOpt(parser, context | 32768, 20558)) {
|
||
test = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
} else {
|
||
consume(parser, context | 32768, 20563);
|
||
if (seenDefault)
|
||
report(parser, 87);
|
||
seenDefault = 1;
|
||
}
|
||
consume(parser, context | 32768, 21);
|
||
while (parser.token !== 20558 && parser.token !== 1074790415 && parser.token !== 20563) {
|
||
consequent.push(parseStatementListItem(parser, context | 4096, scope, 2, {
|
||
$: labels
|
||
}));
|
||
}
|
||
cases.push(finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "SwitchCase",
|
||
test,
|
||
consequent
|
||
}));
|
||
}
|
||
consume(parser, context | 32768, 1074790415);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "SwitchStatement",
|
||
discriminant,
|
||
cases
|
||
});
|
||
}
|
||
function parseWhileStatement(parser, context, scope, labels, start, line, column) {
|
||
nextToken(parser, context);
|
||
consume(parser, context | 32768, 67174411);
|
||
const test = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context | 32768, 16);
|
||
const body = parseIterationStatementBody(parser, context, scope, labels);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "WhileStatement",
|
||
test,
|
||
body
|
||
});
|
||
}
|
||
function parseIterationStatementBody(parser, context, scope, labels) {
|
||
return parseStatement(parser, (context | 134217728) ^ 134217728 | 131072, scope, 0, { loop: 1, $: labels }, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
}
|
||
function parseContinueStatement(parser, context, labels, start, line, column) {
|
||
if ((context & 131072) === 0)
|
||
report(parser, 66);
|
||
nextToken(parser, context);
|
||
let label = null;
|
||
if ((parser.flags & 1) === 0 && parser.token & 143360) {
|
||
const { tokenValue } = parser;
|
||
label = parseIdentifier(parser, context | 32768, 0);
|
||
if (!isValidLabel(parser, labels, tokenValue, 1))
|
||
report(parser, 135, tokenValue);
|
||
}
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ContinueStatement",
|
||
label
|
||
});
|
||
}
|
||
function parseBreakStatement(parser, context, labels, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
let label = null;
|
||
if ((parser.flags & 1) === 0 && parser.token & 143360) {
|
||
const { tokenValue } = parser;
|
||
label = parseIdentifier(parser, context | 32768, 0);
|
||
if (!isValidLabel(parser, labels, tokenValue, 0))
|
||
report(parser, 135, tokenValue);
|
||
} else if ((context & (4096 | 131072)) === 0) {
|
||
report(parser, 67);
|
||
}
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "BreakStatement",
|
||
label
|
||
});
|
||
}
|
||
function parseWithStatement(parser, context, scope, labels, start, line, column) {
|
||
nextToken(parser, context);
|
||
if (context & 1024)
|
||
report(parser, 89);
|
||
consume(parser, context | 32768, 67174411);
|
||
const object = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context | 32768, 16);
|
||
const body = parseStatement(parser, context, scope, 2, labels, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "WithStatement",
|
||
object,
|
||
body
|
||
});
|
||
}
|
||
function parseDebuggerStatement(parser, context, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "DebuggerStatement"
|
||
});
|
||
}
|
||
function parseTryStatement(parser, context, scope, labels, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
const firstScope = scope ? addChildScope(scope, 32) : void 0;
|
||
const block = parseBlock(parser, context, firstScope, { $: labels }, parser.tokenPos, parser.linePos, parser.colPos);
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
const handler = consumeOpt(parser, context | 32768, 20559) ? parseCatchBlock(parser, context, scope, labels, tokenPos, linePos, colPos) : null;
|
||
let finalizer = null;
|
||
if (parser.token === 20568) {
|
||
nextToken(parser, context | 32768);
|
||
const finalizerScope = firstScope ? addChildScope(scope, 4) : void 0;
|
||
finalizer = parseBlock(parser, context, finalizerScope, { $: labels }, parser.tokenPos, parser.linePos, parser.colPos);
|
||
}
|
||
if (!handler && !finalizer) {
|
||
report(parser, 86);
|
||
}
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "TryStatement",
|
||
block,
|
||
handler,
|
||
finalizer
|
||
});
|
||
}
|
||
function parseCatchBlock(parser, context, scope, labels, start, line, column) {
|
||
let param = null;
|
||
let additionalScope = scope;
|
||
if (consumeOpt(parser, context, 67174411)) {
|
||
if (scope)
|
||
scope = addChildScope(scope, 4);
|
||
param = parseBindingPattern(parser, context, scope, (parser.token & 2097152) === 2097152 ? 256 : 512, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
if (parser.token === 18) {
|
||
report(parser, 84);
|
||
} else if (parser.token === 1077936157) {
|
||
report(parser, 85);
|
||
}
|
||
consume(parser, context | 32768, 16);
|
||
if (scope)
|
||
additionalScope = addChildScope(scope, 64);
|
||
}
|
||
const body = parseBlock(parser, context, additionalScope, { $: labels }, parser.tokenPos, parser.linePos, parser.colPos);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "CatchClause",
|
||
param,
|
||
body
|
||
});
|
||
}
|
||
function parseStaticBlock(parser, context, scope, start, line, column) {
|
||
if (scope)
|
||
scope = addChildScope(scope, 2);
|
||
const ctorContext = 16384 | 524288;
|
||
context = (context | ctorContext) ^ ctorContext | 262144;
|
||
const { body } = parseBlock(parser, context, scope, {}, start, line, column);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "StaticBlock",
|
||
body
|
||
});
|
||
}
|
||
function parseDoWhileStatement(parser, context, scope, labels, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
const body = parseIterationStatementBody(parser, context, scope, labels);
|
||
consume(parser, context, 20580);
|
||
consume(parser, context | 32768, 67174411);
|
||
const test = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context | 32768, 16);
|
||
consumeOpt(parser, context, 1074790417);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "DoWhileStatement",
|
||
body,
|
||
test
|
||
});
|
||
}
|
||
function parseLetIdentOrVarDeclarationStatement(parser, context, scope, origin, start, line, column) {
|
||
const { token, tokenValue } = parser;
|
||
let expr = parseIdentifier(parser, context, 0);
|
||
if (parser.token & (143360 | 2097152)) {
|
||
const declarations = parseVariableDeclarationList(parser, context, scope, 8, 0);
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "VariableDeclaration",
|
||
kind: "let",
|
||
declarations
|
||
});
|
||
}
|
||
parser.assignable = 1;
|
||
if (context & 1024)
|
||
report(parser, 83);
|
||
if (parser.token === 21) {
|
||
return parseLabelledStatement(parser, context, scope, origin, {}, tokenValue, expr, token, 0, start, line, column);
|
||
}
|
||
if (parser.token === 10) {
|
||
let scope2 = void 0;
|
||
if (context & 64)
|
||
scope2 = createArrowHeadParsingScope(parser, context, tokenValue);
|
||
parser.flags = (parser.flags | 128) ^ 128;
|
||
expr = parseArrowFunctionExpression(parser, context, scope2, [expr], 0, start, line, column);
|
||
} else {
|
||
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, start, line, column);
|
||
expr = parseAssignmentExpression(parser, context, 0, 0, start, line, column, expr);
|
||
}
|
||
if (parser.token === 18) {
|
||
expr = parseSequenceExpression(parser, context, 0, start, line, column, expr);
|
||
}
|
||
return parseExpressionStatement(parser, context, expr, start, line, column);
|
||
}
|
||
function parseLexicalDeclaration(parser, context, scope, kind, origin, start, line, column) {
|
||
nextToken(parser, context);
|
||
const declarations = parseVariableDeclarationList(parser, context, scope, kind, origin);
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "VariableDeclaration",
|
||
kind: kind & 8 ? "let" : "const",
|
||
declarations
|
||
});
|
||
}
|
||
function parseVariableStatement(parser, context, scope, origin, start, line, column) {
|
||
nextToken(parser, context);
|
||
const declarations = parseVariableDeclarationList(parser, context, scope, 4, origin);
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "VariableDeclaration",
|
||
kind: "var",
|
||
declarations
|
||
});
|
||
}
|
||
function parseVariableDeclarationList(parser, context, scope, kind, origin) {
|
||
let bindingCount = 1;
|
||
const list = [parseVariableDeclaration(parser, context, scope, kind, origin)];
|
||
while (consumeOpt(parser, context, 18)) {
|
||
bindingCount++;
|
||
list.push(parseVariableDeclaration(parser, context, scope, kind, origin));
|
||
}
|
||
if (bindingCount > 1 && origin & 32 && parser.token & 262144) {
|
||
report(parser, 59, KeywordDescTable[parser.token & 255]);
|
||
}
|
||
return list;
|
||
}
|
||
function parseVariableDeclaration(parser, context, scope, kind, origin) {
|
||
const { token, tokenPos, linePos, colPos } = parser;
|
||
let init = null;
|
||
const id = parseBindingPattern(parser, context, scope, kind, origin, tokenPos, linePos, colPos);
|
||
if (parser.token === 1077936157) {
|
||
nextToken(parser, context | 32768);
|
||
init = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
if (origin & 32 || (token & 2097152) === 0) {
|
||
if (parser.token === 274549 || parser.token === 8738868 && (token & 2097152 || (kind & 4) === 0 || context & 1024)) {
|
||
reportMessageAt(tokenPos, parser.line, parser.index - 3, 58, parser.token === 274549 ? "of" : "in");
|
||
}
|
||
}
|
||
} else if ((kind & 16 || (token & 2097152) > 0) && (parser.token & 262144) !== 262144) {
|
||
report(parser, 57, kind & 16 ? "const" : "destructuring");
|
||
}
|
||
return finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "VariableDeclarator",
|
||
id,
|
||
init
|
||
});
|
||
}
|
||
function parseForStatement(parser, context, scope, labels, start, line, column) {
|
||
nextToken(parser, context);
|
||
const forAwait = ((context & 4194304) > 0 || (context & 2048) > 0 && (context & 8192) > 0) && consumeOpt(parser, context, 209008);
|
||
consume(parser, context | 32768, 67174411);
|
||
if (scope)
|
||
scope = addChildScope(scope, 1);
|
||
let test = null;
|
||
let update = null;
|
||
let destructible = 0;
|
||
let init = null;
|
||
let isVarDecl = parser.token === 86090 || parser.token === 241739 || parser.token === 86092;
|
||
let right;
|
||
const { token, tokenPos, linePos, colPos } = parser;
|
||
if (isVarDecl) {
|
||
if (token === 241739) {
|
||
init = parseIdentifier(parser, context, 0);
|
||
if (parser.token & (143360 | 2097152)) {
|
||
if (parser.token === 8738868) {
|
||
if (context & 1024)
|
||
report(parser, 65);
|
||
} else {
|
||
init = finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "VariableDeclaration",
|
||
kind: "let",
|
||
declarations: parseVariableDeclarationList(parser, context | 134217728, scope, 8, 32)
|
||
});
|
||
}
|
||
parser.assignable = 1;
|
||
} else if (context & 1024) {
|
||
report(parser, 65);
|
||
} else {
|
||
isVarDecl = false;
|
||
parser.assignable = 1;
|
||
init = parseMemberOrUpdateExpression(parser, context, init, 0, 0, tokenPos, linePos, colPos);
|
||
if (parser.token === 274549)
|
||
report(parser, 112);
|
||
}
|
||
} else {
|
||
nextToken(parser, context);
|
||
init = finishNode(parser, context, tokenPos, linePos, colPos, token === 86090 ? {
|
||
type: "VariableDeclaration",
|
||
kind: "var",
|
||
declarations: parseVariableDeclarationList(parser, context | 134217728, scope, 4, 32)
|
||
} : {
|
||
type: "VariableDeclaration",
|
||
kind: "const",
|
||
declarations: parseVariableDeclarationList(parser, context | 134217728, scope, 16, 32)
|
||
});
|
||
parser.assignable = 1;
|
||
}
|
||
} else if (token === 1074790417) {
|
||
if (forAwait)
|
||
report(parser, 80);
|
||
} else if ((token & 2097152) === 2097152) {
|
||
init = token === 2162700 ? parseObjectLiteralOrPattern(parser, context, void 0, 1, 0, 0, 2, 32, tokenPos, linePos, colPos) : parseArrayExpressionOrPattern(parser, context, void 0, 1, 0, 0, 2, 32, tokenPos, linePos, colPos);
|
||
destructible = parser.destructible;
|
||
if (context & 256 && destructible & 64) {
|
||
report(parser, 61);
|
||
}
|
||
parser.assignable = destructible & 16 ? 2 : 1;
|
||
init = parseMemberOrUpdateExpression(parser, context | 134217728, init, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
} else {
|
||
init = parseLeftHandSideExpression(parser, context | 134217728, 1, 0, 1, tokenPos, linePos, colPos);
|
||
}
|
||
if ((parser.token & 262144) === 262144) {
|
||
if (parser.token === 274549) {
|
||
if (parser.assignable & 2)
|
||
report(parser, 78, forAwait ? "await" : "of");
|
||
reinterpretToPattern(parser, init);
|
||
nextToken(parser, context | 32768);
|
||
right = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context | 32768, 16);
|
||
const body3 = parseIterationStatementBody(parser, context, scope, labels);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ForOfStatement",
|
||
left: init,
|
||
right,
|
||
body: body3,
|
||
await: forAwait
|
||
});
|
||
}
|
||
if (parser.assignable & 2)
|
||
report(parser, 78, "in");
|
||
reinterpretToPattern(parser, init);
|
||
nextToken(parser, context | 32768);
|
||
if (forAwait)
|
||
report(parser, 80);
|
||
right = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context | 32768, 16);
|
||
const body2 = parseIterationStatementBody(parser, context, scope, labels);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ForInStatement",
|
||
body: body2,
|
||
left: init,
|
||
right
|
||
});
|
||
}
|
||
if (forAwait)
|
||
report(parser, 80);
|
||
if (!isVarDecl) {
|
||
if (destructible & 8 && parser.token !== 1077936157) {
|
||
report(parser, 78, "loop");
|
||
}
|
||
init = parseAssignmentExpression(parser, context | 134217728, 0, 0, tokenPos, linePos, colPos, init);
|
||
}
|
||
if (parser.token === 18)
|
||
init = parseSequenceExpression(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos, init);
|
||
consume(parser, context | 32768, 1074790417);
|
||
if (parser.token !== 1074790417)
|
||
test = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context | 32768, 1074790417);
|
||
if (parser.token !== 16)
|
||
update = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context | 32768, 16);
|
||
const body = parseIterationStatementBody(parser, context, scope, labels);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ForStatement",
|
||
init,
|
||
test,
|
||
update,
|
||
body
|
||
});
|
||
}
|
||
function parseRestrictedIdentifier(parser, context, scope) {
|
||
if (!isValidIdentifier(context, parser.token))
|
||
report(parser, 115);
|
||
if ((parser.token & 537079808) === 537079808)
|
||
report(parser, 116);
|
||
if (scope)
|
||
addBlockName(parser, context, scope, parser.tokenValue, 8, 0);
|
||
return parseIdentifier(parser, context, 0);
|
||
}
|
||
function parseImportDeclaration(parser, context, scope) {
|
||
const start = parser.tokenPos;
|
||
const line = parser.linePos;
|
||
const column = parser.colPos;
|
||
nextToken(parser, context);
|
||
let source = null;
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
let specifiers = [];
|
||
if (parser.token === 134283267) {
|
||
source = parseLiteral(parser, context);
|
||
} else {
|
||
if (parser.token & 143360) {
|
||
const local = parseRestrictedIdentifier(parser, context, scope);
|
||
specifiers = [
|
||
finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "ImportDefaultSpecifier",
|
||
local
|
||
})
|
||
];
|
||
if (consumeOpt(parser, context, 18)) {
|
||
switch (parser.token) {
|
||
case 8457014:
|
||
specifiers.push(parseImportNamespaceSpecifier(parser, context, scope));
|
||
break;
|
||
case 2162700:
|
||
parseImportSpecifierOrNamedImports(parser, context, scope, specifiers);
|
||
break;
|
||
default:
|
||
report(parser, 105);
|
||
}
|
||
}
|
||
} else {
|
||
switch (parser.token) {
|
||
case 8457014:
|
||
specifiers = [parseImportNamespaceSpecifier(parser, context, scope)];
|
||
break;
|
||
case 2162700:
|
||
parseImportSpecifierOrNamedImports(parser, context, scope, specifiers);
|
||
break;
|
||
case 67174411:
|
||
return parseImportCallDeclaration(parser, context, start, line, column);
|
||
case 67108877:
|
||
return parseImportMetaDeclaration(parser, context, start, line, column);
|
||
default:
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
}
|
||
}
|
||
source = parseModuleSpecifier(parser, context);
|
||
}
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ImportDeclaration",
|
||
specifiers,
|
||
source
|
||
});
|
||
}
|
||
function parseImportNamespaceSpecifier(parser, context, scope) {
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
nextToken(parser, context);
|
||
consume(parser, context, 77934);
|
||
if ((parser.token & 134217728) === 134217728) {
|
||
reportMessageAt(tokenPos, parser.line, parser.index, 28, KeywordDescTable[parser.token & 255]);
|
||
}
|
||
return finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "ImportNamespaceSpecifier",
|
||
local: parseRestrictedIdentifier(parser, context, scope)
|
||
});
|
||
}
|
||
function parseModuleSpecifier(parser, context) {
|
||
consumeOpt(parser, context, 12404);
|
||
if (parser.token !== 134283267)
|
||
report(parser, 103, "Import");
|
||
return parseLiteral(parser, context);
|
||
}
|
||
function parseImportSpecifierOrNamedImports(parser, context, scope, specifiers) {
|
||
nextToken(parser, context);
|
||
while (parser.token & 143360) {
|
||
let { token, tokenValue, tokenPos, linePos, colPos } = parser;
|
||
const imported = parseIdentifier(parser, context, 0);
|
||
let local;
|
||
if (consumeOpt(parser, context, 77934)) {
|
||
if ((parser.token & 134217728) === 134217728 || parser.token === 18) {
|
||
report(parser, 104);
|
||
} else {
|
||
validateBindingIdentifier(parser, context, 16, parser.token, 0);
|
||
}
|
||
tokenValue = parser.tokenValue;
|
||
local = parseIdentifier(parser, context, 0);
|
||
} else {
|
||
validateBindingIdentifier(parser, context, 16, token, 0);
|
||
local = imported;
|
||
}
|
||
if (scope)
|
||
addBlockName(parser, context, scope, tokenValue, 8, 0);
|
||
specifiers.push(finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "ImportSpecifier",
|
||
local,
|
||
imported
|
||
}));
|
||
if (parser.token !== 1074790415)
|
||
consume(parser, context, 18);
|
||
}
|
||
consume(parser, context, 1074790415);
|
||
return specifiers;
|
||
}
|
||
function parseImportMetaDeclaration(parser, context, start, line, column) {
|
||
let expr = parseImportMetaExpression(parser, context, finishNode(parser, context, start, line, column, {
|
||
type: "Identifier",
|
||
name: "import"
|
||
}), start, line, column);
|
||
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, start, line, column);
|
||
expr = parseAssignmentExpression(parser, context, 0, 0, start, line, column, expr);
|
||
return parseExpressionStatement(parser, context, expr, start, line, column);
|
||
}
|
||
function parseImportCallDeclaration(parser, context, start, line, column) {
|
||
let expr = parseImportExpression(parser, context, 0, start, line, column);
|
||
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, start, line, column);
|
||
if (parser.token === 18) {
|
||
expr = parseSequenceExpression(parser, context, 0, start, line, column, expr);
|
||
}
|
||
return parseExpressionStatement(parser, context, expr, start, line, column);
|
||
}
|
||
function parseExportDeclaration(parser, context, scope) {
|
||
const start = parser.tokenPos;
|
||
const line = parser.linePos;
|
||
const column = parser.colPos;
|
||
nextToken(parser, context | 32768);
|
||
const specifiers = [];
|
||
let declaration = null;
|
||
let source = null;
|
||
let key;
|
||
if (consumeOpt(parser, context | 32768, 20563)) {
|
||
switch (parser.token) {
|
||
case 86106: {
|
||
declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
break;
|
||
}
|
||
case 133:
|
||
case 86096:
|
||
declaration = parseClassDeclaration(parser, context, scope, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
break;
|
||
case 209007:
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
declaration = parseIdentifier(parser, context, 0);
|
||
const { flags } = parser;
|
||
if ((flags & 1) === 0) {
|
||
if (parser.token === 86106) {
|
||
declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 1, 1, tokenPos, linePos, colPos);
|
||
} else {
|
||
if (parser.token === 67174411) {
|
||
declaration = parseAsyncArrowOrCallExpression(parser, context, declaration, 1, 1, 0, flags, tokenPos, linePos, colPos);
|
||
declaration = parseMemberOrUpdateExpression(parser, context, declaration, 0, 0, tokenPos, linePos, colPos);
|
||
declaration = parseAssignmentExpression(parser, context, 0, 0, tokenPos, linePos, colPos, declaration);
|
||
} else if (parser.token & 143360) {
|
||
if (scope)
|
||
scope = createArrowHeadParsingScope(parser, context, parser.tokenValue);
|
||
declaration = parseIdentifier(parser, context, 0);
|
||
declaration = parseArrowFunctionExpression(parser, context, scope, [declaration], 1, tokenPos, linePos, colPos);
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
default:
|
||
declaration = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
}
|
||
if (scope)
|
||
declareUnboundVariable(parser, "default");
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ExportDefaultDeclaration",
|
||
declaration
|
||
});
|
||
}
|
||
switch (parser.token) {
|
||
case 8457014: {
|
||
nextToken(parser, context);
|
||
let exported = null;
|
||
const isNamedDeclaration = consumeOpt(parser, context, 77934);
|
||
if (isNamedDeclaration) {
|
||
if (scope)
|
||
declareUnboundVariable(parser, parser.tokenValue);
|
||
exported = parseIdentifier(parser, context, 0);
|
||
}
|
||
consume(parser, context, 12404);
|
||
if (parser.token !== 134283267)
|
||
report(parser, 103, "Export");
|
||
source = parseLiteral(parser, context);
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ExportAllDeclaration",
|
||
source,
|
||
exported
|
||
});
|
||
}
|
||
case 2162700: {
|
||
nextToken(parser, context);
|
||
const tmpExportedNames = [];
|
||
const tmpExportedBindings = [];
|
||
while (parser.token & 143360) {
|
||
const { tokenPos: tokenPos2, tokenValue, linePos: linePos2, colPos: colPos2 } = parser;
|
||
const local = parseIdentifier(parser, context, 0);
|
||
let exported;
|
||
if (parser.token === 77934) {
|
||
nextToken(parser, context);
|
||
if ((parser.token & 134217728) === 134217728) {
|
||
report(parser, 104);
|
||
}
|
||
if (scope) {
|
||
tmpExportedNames.push(parser.tokenValue);
|
||
tmpExportedBindings.push(tokenValue);
|
||
}
|
||
exported = parseIdentifier(parser, context, 0);
|
||
} else {
|
||
if (scope) {
|
||
tmpExportedNames.push(parser.tokenValue);
|
||
tmpExportedBindings.push(parser.tokenValue);
|
||
}
|
||
exported = local;
|
||
}
|
||
specifiers.push(finishNode(parser, context, tokenPos2, linePos2, colPos2, {
|
||
type: "ExportSpecifier",
|
||
local,
|
||
exported
|
||
}));
|
||
if (parser.token !== 1074790415)
|
||
consume(parser, context, 18);
|
||
}
|
||
consume(parser, context, 1074790415);
|
||
if (consumeOpt(parser, context, 12404)) {
|
||
if (parser.token !== 134283267)
|
||
report(parser, 103, "Export");
|
||
source = parseLiteral(parser, context);
|
||
} else if (scope) {
|
||
let i = 0;
|
||
let iMax = tmpExportedNames.length;
|
||
for (; i < iMax; i++) {
|
||
declareUnboundVariable(parser, tmpExportedNames[i]);
|
||
}
|
||
i = 0;
|
||
iMax = tmpExportedBindings.length;
|
||
for (; i < iMax; i++) {
|
||
addBindingToExports(parser, tmpExportedBindings[i]);
|
||
}
|
||
}
|
||
matchOrInsertSemicolon(parser, context | 32768);
|
||
break;
|
||
}
|
||
case 86096:
|
||
declaration = parseClassDeclaration(parser, context, scope, 2, parser.tokenPos, parser.linePos, parser.colPos);
|
||
break;
|
||
case 86106:
|
||
declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 2, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
break;
|
||
case 241739:
|
||
declaration = parseLexicalDeclaration(parser, context, scope, 8, 64, parser.tokenPos, parser.linePos, parser.colPos);
|
||
break;
|
||
case 86092:
|
||
declaration = parseLexicalDeclaration(parser, context, scope, 16, 64, parser.tokenPos, parser.linePos, parser.colPos);
|
||
break;
|
||
case 86090:
|
||
declaration = parseVariableStatement(parser, context, scope, 64, parser.tokenPos, parser.linePos, parser.colPos);
|
||
break;
|
||
case 209007:
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
nextToken(parser, context);
|
||
if ((parser.flags & 1) === 0 && parser.token === 86106) {
|
||
declaration = parseFunctionDeclaration(parser, context, scope, 4, 1, 2, 1, tokenPos, linePos, colPos);
|
||
if (scope) {
|
||
key = declaration.id ? declaration.id.name : "";
|
||
declareUnboundVariable(parser, key);
|
||
}
|
||
break;
|
||
}
|
||
default:
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
}
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ExportNamedDeclaration",
|
||
declaration,
|
||
specifiers,
|
||
source
|
||
});
|
||
}
|
||
function parseExpression(parser, context, canAssign, isPattern, inGroup, start, line, column) {
|
||
let expr = parsePrimaryExpression(parser, context, 2, 0, canAssign, isPattern, inGroup, 1, start, line, column);
|
||
expr = parseMemberOrUpdateExpression(parser, context, expr, inGroup, 0, start, line, column);
|
||
return parseAssignmentExpression(parser, context, inGroup, 0, start, line, column, expr);
|
||
}
|
||
function parseSequenceExpression(parser, context, inGroup, start, line, column, expr) {
|
||
const expressions = [expr];
|
||
while (consumeOpt(parser, context | 32768, 18)) {
|
||
expressions.push(parseExpression(parser, context, 1, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos));
|
||
}
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "SequenceExpression",
|
||
expressions
|
||
});
|
||
}
|
||
function parseExpressions(parser, context, inGroup, canAssign, start, line, column) {
|
||
const expr = parseExpression(parser, context, canAssign, 0, inGroup, start, line, column);
|
||
return parser.token === 18 ? parseSequenceExpression(parser, context, inGroup, start, line, column, expr) : expr;
|
||
}
|
||
function parseAssignmentExpression(parser, context, inGroup, isPattern, start, line, column, left) {
|
||
const { token } = parser;
|
||
if ((token & 4194304) === 4194304) {
|
||
if (parser.assignable & 2)
|
||
report(parser, 24);
|
||
if (!isPattern && token === 1077936157 && left.type === "ArrayExpression" || left.type === "ObjectExpression") {
|
||
reinterpretToPattern(parser, left);
|
||
}
|
||
nextToken(parser, context | 32768);
|
||
const right = parseExpression(parser, context, 1, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, isPattern ? {
|
||
type: "AssignmentPattern",
|
||
left,
|
||
right
|
||
} : {
|
||
type: "AssignmentExpression",
|
||
left,
|
||
operator: KeywordDescTable[token & 255],
|
||
right
|
||
});
|
||
}
|
||
if ((token & 8454144) === 8454144) {
|
||
left = parseBinaryExpression(parser, context, inGroup, start, line, column, 4, token, left);
|
||
}
|
||
if (consumeOpt(parser, context | 32768, 22)) {
|
||
left = parseConditionalExpression(parser, context, left, start, line, column);
|
||
}
|
||
return left;
|
||
}
|
||
function parseAssignmentExpressionOrPattern(parser, context, inGroup, isPattern, start, line, column, left) {
|
||
const { token } = parser;
|
||
nextToken(parser, context | 32768);
|
||
const right = parseExpression(parser, context, 1, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
left = finishNode(parser, context, start, line, column, isPattern ? {
|
||
type: "AssignmentPattern",
|
||
left,
|
||
right
|
||
} : {
|
||
type: "AssignmentExpression",
|
||
left,
|
||
operator: KeywordDescTable[token & 255],
|
||
right
|
||
});
|
||
parser.assignable = 2;
|
||
return left;
|
||
}
|
||
function parseConditionalExpression(parser, context, test, start, line, column) {
|
||
const consequent = parseExpression(parser, (context | 134217728) ^ 134217728, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context | 32768, 21);
|
||
parser.assignable = 1;
|
||
const alternate = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ConditionalExpression",
|
||
test,
|
||
consequent,
|
||
alternate
|
||
});
|
||
}
|
||
function parseBinaryExpression(parser, context, inGroup, start, line, column, minPrec, operator, left) {
|
||
const bit = -((context & 134217728) > 0) & 8738868;
|
||
let t;
|
||
let prec;
|
||
parser.assignable = 2;
|
||
while (parser.token & 8454144) {
|
||
t = parser.token;
|
||
prec = t & 3840;
|
||
if (t & 524288 && operator & 268435456 || operator & 524288 && t & 268435456) {
|
||
report(parser, 160);
|
||
}
|
||
if (prec + ((t === 8457273) << 8) - ((bit === t) << 12) <= minPrec)
|
||
break;
|
||
nextToken(parser, context | 32768);
|
||
left = finishNode(parser, context, start, line, column, {
|
||
type: t & 524288 || t & 268435456 ? "LogicalExpression" : "BinaryExpression",
|
||
left,
|
||
right: parseBinaryExpression(parser, context, inGroup, parser.tokenPos, parser.linePos, parser.colPos, prec, t, parseLeftHandSideExpression(parser, context, 0, inGroup, 1, parser.tokenPos, parser.linePos, parser.colPos)),
|
||
operator: KeywordDescTable[t & 255]
|
||
});
|
||
}
|
||
if (parser.token === 1077936157)
|
||
report(parser, 24);
|
||
return left;
|
||
}
|
||
function parseUnaryExpression(parser, context, isLHS, start, line, column, inGroup) {
|
||
if (!isLHS)
|
||
report(parser, 0);
|
||
const unaryOperator = parser.token;
|
||
nextToken(parser, context | 32768);
|
||
const arg = parseLeftHandSideExpression(parser, context, 0, inGroup, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
if (parser.token === 8457273)
|
||
report(parser, 31);
|
||
if (context & 1024 && unaryOperator === 16863278) {
|
||
if (arg.type === "Identifier") {
|
||
report(parser, 118);
|
||
} else if (isPropertyWithPrivateFieldKey(arg)) {
|
||
report(parser, 124);
|
||
}
|
||
}
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "UnaryExpression",
|
||
operator: KeywordDescTable[unaryOperator & 255],
|
||
argument: arg,
|
||
prefix: true
|
||
});
|
||
}
|
||
function parseAsyncExpression(parser, context, inGroup, isLHS, canAssign, isPattern, inNew, start, line, column) {
|
||
const { token } = parser;
|
||
const expr = parseIdentifier(parser, context, isPattern);
|
||
const { flags } = parser;
|
||
if ((flags & 1) === 0) {
|
||
if (parser.token === 86106) {
|
||
return parseFunctionExpression(parser, context, 1, inGroup, start, line, column);
|
||
}
|
||
if ((parser.token & 143360) === 143360) {
|
||
if (!isLHS)
|
||
report(parser, 0);
|
||
return parseAsyncArrowAfterIdent(parser, context, canAssign, start, line, column);
|
||
}
|
||
}
|
||
if (!inNew && parser.token === 67174411) {
|
||
return parseAsyncArrowOrCallExpression(parser, context, expr, canAssign, 1, 0, flags, start, line, column);
|
||
}
|
||
if (parser.token === 10) {
|
||
classifyIdentifier(parser, context, token, 1);
|
||
if (inNew)
|
||
report(parser, 49);
|
||
return parseArrowFromIdentifier(parser, context, parser.tokenValue, expr, inNew, canAssign, 0, start, line, column);
|
||
}
|
||
return expr;
|
||
}
|
||
function parseYieldExpression(parser, context, inGroup, canAssign, start, line, column) {
|
||
if (inGroup)
|
||
parser.destructible |= 256;
|
||
if (context & 2097152) {
|
||
nextToken(parser, context | 32768);
|
||
if (context & 8388608)
|
||
report(parser, 30);
|
||
if (!canAssign)
|
||
report(parser, 24);
|
||
if (parser.token === 22)
|
||
report(parser, 121);
|
||
let argument = null;
|
||
let delegate = false;
|
||
if ((parser.flags & 1) === 0) {
|
||
delegate = consumeOpt(parser, context | 32768, 8457014);
|
||
if (parser.token & (12288 | 65536) || delegate) {
|
||
argument = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
}
|
||
}
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "YieldExpression",
|
||
argument,
|
||
delegate
|
||
});
|
||
}
|
||
if (context & 1024)
|
||
report(parser, 95, "yield");
|
||
return parseIdentifierOrArrow(parser, context, start, line, column);
|
||
}
|
||
function parseAwaitExpression(parser, context, inNew, inGroup, start, line, column) {
|
||
if (inGroup)
|
||
parser.destructible |= 128;
|
||
if (context & 4194304 || context & 2048 && context & 8192) {
|
||
if (inNew)
|
||
report(parser, 0);
|
||
if (context & 8388608) {
|
||
reportMessageAt(parser.index, parser.line, parser.index, 29);
|
||
}
|
||
nextToken(parser, context | 32768);
|
||
const argument = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
if (parser.token === 8457273)
|
||
report(parser, 31);
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "AwaitExpression",
|
||
argument
|
||
});
|
||
}
|
||
if (context & 2048)
|
||
report(parser, 96);
|
||
return parseIdentifierOrArrow(parser, context, start, line, column);
|
||
}
|
||
function parseFunctionBody(parser, context, scope, origin, firstRestricted, scopeError) {
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
consume(parser, context | 32768, 2162700);
|
||
const body = [];
|
||
const prevContext = context;
|
||
if (parser.token !== 1074790415) {
|
||
while (parser.token === 134283267) {
|
||
const { index, tokenPos: tokenPos2, tokenValue, token } = parser;
|
||
const expr = parseLiteral(parser, context);
|
||
if (isValidStrictMode(parser, index, tokenPos2, tokenValue)) {
|
||
context |= 1024;
|
||
if (parser.flags & 128) {
|
||
reportMessageAt(parser.index, parser.line, parser.tokenPos, 64);
|
||
}
|
||
if (parser.flags & 64) {
|
||
reportMessageAt(parser.index, parser.line, parser.tokenPos, 8);
|
||
}
|
||
}
|
||
body.push(parseDirective(parser, context, expr, token, tokenPos2, parser.linePos, parser.colPos));
|
||
}
|
||
if (context & 1024) {
|
||
if (firstRestricted) {
|
||
if ((firstRestricted & 537079808) === 537079808) {
|
||
report(parser, 116);
|
||
}
|
||
if ((firstRestricted & 36864) === 36864) {
|
||
report(parser, 38);
|
||
}
|
||
}
|
||
if (parser.flags & 512)
|
||
report(parser, 116);
|
||
if (parser.flags & 256)
|
||
report(parser, 115);
|
||
}
|
||
if (context & 64 && scope && scopeError !== void 0 && (prevContext & 1024) === 0 && (context & 8192) === 0) {
|
||
reportScopeError(scopeError);
|
||
}
|
||
}
|
||
parser.flags = (parser.flags | 512 | 256 | 64) ^ (512 | 256 | 64);
|
||
parser.destructible = (parser.destructible | 256) ^ 256;
|
||
while (parser.token !== 1074790415) {
|
||
body.push(parseStatementListItem(parser, context, scope, 4, {}));
|
||
}
|
||
consume(parser, origin & (16 | 8) ? context | 32768 : context, 1074790415);
|
||
parser.flags &= ~(128 | 64);
|
||
if (parser.token === 1077936157)
|
||
report(parser, 24);
|
||
return finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "BlockStatement",
|
||
body
|
||
});
|
||
}
|
||
function parseSuperExpression(parser, context, start, line, column) {
|
||
nextToken(parser, context);
|
||
switch (parser.token) {
|
||
case 67108991:
|
||
report(parser, 162);
|
||
case 67174411: {
|
||
if ((context & 524288) === 0)
|
||
report(parser, 26);
|
||
if (context & 16384)
|
||
report(parser, 27);
|
||
parser.assignable = 2;
|
||
break;
|
||
}
|
||
case 69271571:
|
||
case 67108877: {
|
||
if ((context & 262144) === 0)
|
||
report(parser, 27);
|
||
if (context & 16384)
|
||
report(parser, 27);
|
||
parser.assignable = 1;
|
||
break;
|
||
}
|
||
default:
|
||
report(parser, 28, "super");
|
||
}
|
||
return finishNode(parser, context, start, line, column, { type: "Super" });
|
||
}
|
||
function parseLeftHandSideExpression(parser, context, canAssign, inGroup, isLHS, start, line, column) {
|
||
const expression = parsePrimaryExpression(parser, context, 2, 0, canAssign, 0, inGroup, isLHS, start, line, column);
|
||
return parseMemberOrUpdateExpression(parser, context, expression, inGroup, 0, start, line, column);
|
||
}
|
||
function parseUpdateExpression(parser, context, expr, start, line, column) {
|
||
if (parser.assignable & 2)
|
||
report(parser, 53);
|
||
const { token } = parser;
|
||
nextToken(parser, context);
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "UpdateExpression",
|
||
argument: expr,
|
||
operator: KeywordDescTable[token & 255],
|
||
prefix: false
|
||
});
|
||
}
|
||
function parseMemberOrUpdateExpression(parser, context, expr, inGroup, inChain, start, line, column) {
|
||
if ((parser.token & 33619968) === 33619968 && (parser.flags & 1) === 0) {
|
||
expr = parseUpdateExpression(parser, context, expr, start, line, column);
|
||
} else if ((parser.token & 67108864) === 67108864) {
|
||
context = (context | 134217728) ^ 134217728;
|
||
switch (parser.token) {
|
||
case 67108877: {
|
||
nextToken(parser, (context | 1073741824 | 8192) ^ 8192);
|
||
parser.assignable = 1;
|
||
const property3 = parsePropertyOrPrivatePropertyName(parser, context);
|
||
expr = finishNode(parser, context, start, line, column, {
|
||
type: "MemberExpression",
|
||
object: expr,
|
||
computed: false,
|
||
property: property3
|
||
});
|
||
break;
|
||
}
|
||
case 69271571: {
|
||
let restoreHasOptionalChaining = false;
|
||
if ((parser.flags & 2048) === 2048) {
|
||
restoreHasOptionalChaining = true;
|
||
parser.flags = (parser.flags | 2048) ^ 2048;
|
||
}
|
||
nextToken(parser, context | 32768);
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
const property3 = parseExpressions(parser, context, inGroup, 1, tokenPos, linePos, colPos);
|
||
consume(parser, context, 20);
|
||
parser.assignable = 1;
|
||
expr = finishNode(parser, context, start, line, column, {
|
||
type: "MemberExpression",
|
||
object: expr,
|
||
computed: true,
|
||
property: property3
|
||
});
|
||
if (restoreHasOptionalChaining) {
|
||
parser.flags |= 2048;
|
||
}
|
||
break;
|
||
}
|
||
case 67174411: {
|
||
if ((parser.flags & 1024) === 1024) {
|
||
parser.flags = (parser.flags | 1024) ^ 1024;
|
||
return expr;
|
||
}
|
||
let restoreHasOptionalChaining = false;
|
||
if ((parser.flags & 2048) === 2048) {
|
||
restoreHasOptionalChaining = true;
|
||
parser.flags = (parser.flags | 2048) ^ 2048;
|
||
}
|
||
const args = parseArguments(parser, context, inGroup);
|
||
parser.assignable = 2;
|
||
expr = finishNode(parser, context, start, line, column, {
|
||
type: "CallExpression",
|
||
callee: expr,
|
||
arguments: args
|
||
});
|
||
if (restoreHasOptionalChaining) {
|
||
parser.flags |= 2048;
|
||
}
|
||
break;
|
||
}
|
||
case 67108991: {
|
||
nextToken(parser, (context | 1073741824 | 8192) ^ 8192);
|
||
parser.flags |= 2048;
|
||
parser.assignable = 2;
|
||
expr = parseOptionalChain(parser, context, expr, start, line, column);
|
||
break;
|
||
}
|
||
default:
|
||
if ((parser.flags & 2048) === 2048) {
|
||
report(parser, 161);
|
||
}
|
||
parser.assignable = 2;
|
||
expr = finishNode(parser, context, start, line, column, {
|
||
type: "TaggedTemplateExpression",
|
||
tag: expr,
|
||
quasi: parser.token === 67174408 ? parseTemplate(parser, context | 65536) : parseTemplateLiteral(parser, context, parser.tokenPos, parser.linePos, parser.colPos)
|
||
});
|
||
}
|
||
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 1, start, line, column);
|
||
}
|
||
if (inChain === 0 && (parser.flags & 2048) === 2048) {
|
||
parser.flags = (parser.flags | 2048) ^ 2048;
|
||
expr = finishNode(parser, context, start, line, column, {
|
||
type: "ChainExpression",
|
||
expression: expr
|
||
});
|
||
}
|
||
return expr;
|
||
}
|
||
function parseOptionalChain(parser, context, expr, start, line, column) {
|
||
let restoreHasOptionalChaining = false;
|
||
let node;
|
||
if (parser.token === 69271571 || parser.token === 67174411) {
|
||
if ((parser.flags & 2048) === 2048) {
|
||
restoreHasOptionalChaining = true;
|
||
parser.flags = (parser.flags | 2048) ^ 2048;
|
||
}
|
||
}
|
||
if (parser.token === 69271571) {
|
||
nextToken(parser, context | 32768);
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
const property3 = parseExpressions(parser, context, 0, 1, tokenPos, linePos, colPos);
|
||
consume(parser, context, 20);
|
||
parser.assignable = 2;
|
||
node = finishNode(parser, context, start, line, column, {
|
||
type: "MemberExpression",
|
||
object: expr,
|
||
computed: true,
|
||
optional: true,
|
||
property: property3
|
||
});
|
||
} else if (parser.token === 67174411) {
|
||
const args = parseArguments(parser, context, 0);
|
||
parser.assignable = 2;
|
||
node = finishNode(parser, context, start, line, column, {
|
||
type: "CallExpression",
|
||
callee: expr,
|
||
arguments: args,
|
||
optional: true
|
||
});
|
||
} else {
|
||
if ((parser.token & (143360 | 4096)) === 0)
|
||
report(parser, 155);
|
||
const property3 = parseIdentifier(parser, context, 0);
|
||
parser.assignable = 2;
|
||
node = finishNode(parser, context, start, line, column, {
|
||
type: "MemberExpression",
|
||
object: expr,
|
||
computed: false,
|
||
optional: true,
|
||
property: property3
|
||
});
|
||
}
|
||
if (restoreHasOptionalChaining) {
|
||
parser.flags |= 2048;
|
||
}
|
||
return node;
|
||
}
|
||
function parsePropertyOrPrivatePropertyName(parser, context) {
|
||
if ((parser.token & (143360 | 4096)) === 0 && parser.token !== 131) {
|
||
report(parser, 155);
|
||
}
|
||
return context & 1 && parser.token === 131 ? parsePrivateIdentifier(parser, context, parser.tokenPos, parser.linePos, parser.colPos) : parseIdentifier(parser, context, 0);
|
||
}
|
||
function parseUpdateExpressionPrefixed(parser, context, inNew, isLHS, start, line, column) {
|
||
if (inNew)
|
||
report(parser, 54);
|
||
if (!isLHS)
|
||
report(parser, 0);
|
||
const { token } = parser;
|
||
nextToken(parser, context | 32768);
|
||
const arg = parseLeftHandSideExpression(parser, context, 0, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
if (parser.assignable & 2) {
|
||
report(parser, 53);
|
||
}
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "UpdateExpression",
|
||
argument: arg,
|
||
operator: KeywordDescTable[token & 255],
|
||
prefix: true
|
||
});
|
||
}
|
||
function parsePrimaryExpression(parser, context, kind, inNew, canAssign, isPattern, inGroup, isLHS, start, line, column) {
|
||
if ((parser.token & 143360) === 143360) {
|
||
switch (parser.token) {
|
||
case 209008:
|
||
return parseAwaitExpression(parser, context, inNew, inGroup, start, line, column);
|
||
case 241773:
|
||
return parseYieldExpression(parser, context, inGroup, canAssign, start, line, column);
|
||
case 209007:
|
||
return parseAsyncExpression(parser, context, inGroup, isLHS, canAssign, isPattern, inNew, start, line, column);
|
||
}
|
||
const { token, tokenValue } = parser;
|
||
const expr = parseIdentifier(parser, context | 65536, isPattern);
|
||
if (parser.token === 10) {
|
||
if (!isLHS)
|
||
report(parser, 0);
|
||
classifyIdentifier(parser, context, token, 1);
|
||
return parseArrowFromIdentifier(parser, context, tokenValue, expr, inNew, canAssign, 0, start, line, column);
|
||
}
|
||
if (context & 16384 && token === 537079928)
|
||
report(parser, 127);
|
||
if (token === 241739) {
|
||
if (context & 1024)
|
||
report(parser, 110);
|
||
if (kind & (8 | 16))
|
||
report(parser, 98);
|
||
}
|
||
parser.assignable = context & 1024 && (token & 537079808) === 537079808 ? 2 : 1;
|
||
return expr;
|
||
}
|
||
if ((parser.token & 134217728) === 134217728) {
|
||
return parseLiteral(parser, context);
|
||
}
|
||
switch (parser.token) {
|
||
case 33619995:
|
||
case 33619996:
|
||
return parseUpdateExpressionPrefixed(parser, context, inNew, isLHS, start, line, column);
|
||
case 16863278:
|
||
case 16842800:
|
||
case 16842801:
|
||
case 25233970:
|
||
case 25233971:
|
||
case 16863277:
|
||
case 16863279:
|
||
return parseUnaryExpression(parser, context, isLHS, start, line, column, inGroup);
|
||
case 86106:
|
||
return parseFunctionExpression(parser, context, 0, inGroup, start, line, column);
|
||
case 2162700:
|
||
return parseObjectLiteral(parser, context, canAssign ? 0 : 1, inGroup, start, line, column);
|
||
case 69271571:
|
||
return parseArrayLiteral(parser, context, canAssign ? 0 : 1, inGroup, start, line, column);
|
||
case 67174411:
|
||
return parseParenthesizedExpression(parser, context, canAssign, 1, 0, start, line, column);
|
||
case 86021:
|
||
case 86022:
|
||
case 86023:
|
||
return parseNullOrTrueOrFalseLiteral(parser, context, start, line, column);
|
||
case 86113:
|
||
return parseThisExpression(parser, context);
|
||
case 65540:
|
||
return parseRegExpLiteral(parser, context, start, line, column);
|
||
case 133:
|
||
case 86096:
|
||
return parseClassExpression(parser, context, inGroup, start, line, column);
|
||
case 86111:
|
||
return parseSuperExpression(parser, context, start, line, column);
|
||
case 67174409:
|
||
return parseTemplateLiteral(parser, context, start, line, column);
|
||
case 67174408:
|
||
return parseTemplate(parser, context);
|
||
case 86109:
|
||
return parseNewExpression(parser, context, inGroup, start, line, column);
|
||
case 134283389:
|
||
return parseBigIntLiteral(parser, context, start, line, column);
|
||
case 131:
|
||
return parsePrivateIdentifier(parser, context, start, line, column);
|
||
case 86108:
|
||
return parseImportCallOrMetaExpression(parser, context, inNew, inGroup, start, line, column);
|
||
case 8456258:
|
||
if (context & 16)
|
||
return parseJSXRootElementOrFragment(parser, context, 1, start, line, column);
|
||
default:
|
||
if (isValidIdentifier(context, parser.token))
|
||
return parseIdentifierOrArrow(parser, context, start, line, column);
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
}
|
||
}
|
||
function parseImportCallOrMetaExpression(parser, context, inNew, inGroup, start, line, column) {
|
||
let expr = parseIdentifier(parser, context, 0);
|
||
if (parser.token === 67108877) {
|
||
return parseImportMetaExpression(parser, context, expr, start, line, column);
|
||
}
|
||
if (inNew)
|
||
report(parser, 138);
|
||
expr = parseImportExpression(parser, context, inGroup, start, line, column);
|
||
parser.assignable = 2;
|
||
return parseMemberOrUpdateExpression(parser, context, expr, inGroup, 0, start, line, column);
|
||
}
|
||
function parseImportMetaExpression(parser, context, meta, start, line, column) {
|
||
if ((context & 2048) === 0)
|
||
report(parser, 164);
|
||
nextToken(parser, context);
|
||
if (parser.token !== 143495 && parser.tokenValue !== "meta")
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "MetaProperty",
|
||
meta,
|
||
property: parseIdentifier(parser, context, 0)
|
||
});
|
||
}
|
||
function parseImportExpression(parser, context, inGroup, start, line, column) {
|
||
consume(parser, context | 32768, 67174411);
|
||
if (parser.token === 14)
|
||
report(parser, 139);
|
||
const source = parseExpression(parser, context, 1, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context, 16);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ImportExpression",
|
||
source
|
||
});
|
||
}
|
||
function parseBigIntLiteral(parser, context, start, line, column) {
|
||
const { tokenRaw, tokenValue } = parser;
|
||
nextToken(parser, context);
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, context & 512 ? {
|
||
type: "Literal",
|
||
value: tokenValue,
|
||
bigint: tokenRaw.slice(0, -1),
|
||
raw: tokenRaw
|
||
} : {
|
||
type: "Literal",
|
||
value: tokenValue,
|
||
bigint: tokenRaw.slice(0, -1)
|
||
});
|
||
}
|
||
function parseTemplateLiteral(parser, context, start, line, column) {
|
||
parser.assignable = 2;
|
||
const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
|
||
consume(parser, context, 67174409);
|
||
const quasis = [parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenPos, linePos, colPos, true)];
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "TemplateLiteral",
|
||
expressions: [],
|
||
quasis
|
||
});
|
||
}
|
||
function parseTemplate(parser, context) {
|
||
context = (context | 134217728) ^ 134217728;
|
||
const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
|
||
consume(parser, context | 32768, 67174408);
|
||
const quasis = [
|
||
parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenPos, linePos, colPos, false)
|
||
];
|
||
const expressions = [parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos)];
|
||
if (parser.token !== 1074790415)
|
||
report(parser, 81);
|
||
while ((parser.token = scanTemplateTail(parser, context)) !== 67174409) {
|
||
const { tokenValue: tokenValue2, tokenRaw: tokenRaw2, tokenPos: tokenPos2, linePos: linePos2, colPos: colPos2 } = parser;
|
||
consume(parser, context | 32768, 67174408);
|
||
quasis.push(parseTemplateElement(parser, context, tokenValue2, tokenRaw2, tokenPos2, linePos2, colPos2, false));
|
||
expressions.push(parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos));
|
||
if (parser.token !== 1074790415)
|
||
report(parser, 81);
|
||
}
|
||
{
|
||
const { tokenValue: tokenValue2, tokenRaw: tokenRaw2, tokenPos: tokenPos2, linePos: linePos2, colPos: colPos2 } = parser;
|
||
consume(parser, context, 67174409);
|
||
quasis.push(parseTemplateElement(parser, context, tokenValue2, tokenRaw2, tokenPos2, linePos2, colPos2, true));
|
||
}
|
||
return finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "TemplateLiteral",
|
||
expressions,
|
||
quasis
|
||
});
|
||
}
|
||
function parseTemplateElement(parser, context, cooked, raw, start, line, col, tail) {
|
||
const node = finishNode(parser, context, start, line, col, {
|
||
type: "TemplateElement",
|
||
value: {
|
||
cooked,
|
||
raw
|
||
},
|
||
tail
|
||
});
|
||
const tailSize = tail ? 1 : 2;
|
||
if (context & 2) {
|
||
node.start += 1;
|
||
node.range[0] += 1;
|
||
node.end -= tailSize;
|
||
node.range[1] -= tailSize;
|
||
}
|
||
if (context & 4) {
|
||
node.loc.start.column += 1;
|
||
node.loc.end.column -= tailSize;
|
||
}
|
||
return node;
|
||
}
|
||
function parseSpreadElement(parser, context, start, line, column) {
|
||
context = (context | 134217728) ^ 134217728;
|
||
consume(parser, context | 32768, 14);
|
||
const argument = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
parser.assignable = 1;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "SpreadElement",
|
||
argument
|
||
});
|
||
}
|
||
function parseArguments(parser, context, inGroup) {
|
||
nextToken(parser, context | 32768);
|
||
const args = [];
|
||
if (parser.token === 16) {
|
||
nextToken(parser, context);
|
||
return args;
|
||
}
|
||
while (parser.token !== 16) {
|
||
if (parser.token === 14) {
|
||
args.push(parseSpreadElement(parser, context, parser.tokenPos, parser.linePos, parser.colPos));
|
||
} else {
|
||
args.push(parseExpression(parser, context, 1, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos));
|
||
}
|
||
if (parser.token !== 18)
|
||
break;
|
||
nextToken(parser, context | 32768);
|
||
if (parser.token === 16)
|
||
break;
|
||
}
|
||
consume(parser, context, 16);
|
||
return args;
|
||
}
|
||
function parseIdentifier(parser, context, isPattern) {
|
||
const { tokenValue, tokenPos, linePos, colPos } = parser;
|
||
nextToken(parser, context);
|
||
return finishNode(parser, context, tokenPos, linePos, colPos, context & 268435456 ? {
|
||
type: "Identifier",
|
||
name: tokenValue,
|
||
pattern: isPattern === 1
|
||
} : {
|
||
type: "Identifier",
|
||
name: tokenValue
|
||
});
|
||
}
|
||
function parseLiteral(parser, context) {
|
||
const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser;
|
||
if (parser.token === 134283389) {
|
||
return parseBigIntLiteral(parser, context, tokenPos, linePos, colPos);
|
||
}
|
||
nextToken(parser, context);
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, tokenPos, linePos, colPos, context & 512 ? {
|
||
type: "Literal",
|
||
value: tokenValue,
|
||
raw: tokenRaw
|
||
} : {
|
||
type: "Literal",
|
||
value: tokenValue
|
||
});
|
||
}
|
||
function parseNullOrTrueOrFalseLiteral(parser, context, start, line, column) {
|
||
const raw = KeywordDescTable[parser.token & 255];
|
||
const value = parser.token === 86023 ? null : raw === "true";
|
||
nextToken(parser, context);
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, context & 512 ? {
|
||
type: "Literal",
|
||
value,
|
||
raw
|
||
} : {
|
||
type: "Literal",
|
||
value
|
||
});
|
||
}
|
||
function parseThisExpression(parser, context) {
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
nextToken(parser, context);
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "ThisExpression"
|
||
});
|
||
}
|
||
function parseFunctionDeclaration(parser, context, scope, origin, allowGen, flags, isAsync, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
const isGenerator = allowGen ? optionalBit(parser, context, 8457014) : 0;
|
||
let id = null;
|
||
let firstRestricted;
|
||
let functionScope = scope ? createScope() : void 0;
|
||
if (parser.token === 67174411) {
|
||
if ((flags & 1) === 0)
|
||
report(parser, 37, "Function");
|
||
} else {
|
||
const kind = origin & 4 && ((context & 8192) === 0 || (context & 2048) === 0) ? 4 : 64;
|
||
validateFunctionName(parser, context | (context & 3072) << 11, parser.token);
|
||
if (scope) {
|
||
if (kind & 4) {
|
||
addVarName(parser, context, scope, parser.tokenValue, kind);
|
||
} else {
|
||
addBlockName(parser, context, scope, parser.tokenValue, kind, origin);
|
||
}
|
||
functionScope = addChildScope(functionScope, 256);
|
||
if (flags) {
|
||
if (flags & 2) {
|
||
declareUnboundVariable(parser, parser.tokenValue);
|
||
}
|
||
}
|
||
}
|
||
firstRestricted = parser.token;
|
||
if (parser.token & 143360) {
|
||
id = parseIdentifier(parser, context, 0);
|
||
} else {
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
}
|
||
}
|
||
context = (context | 32243712) ^ 32243712 | 67108864 | isAsync * 2 + isGenerator << 21 | (isGenerator ? 0 : 1073741824);
|
||
if (scope)
|
||
functionScope = addChildScope(functionScope, 512);
|
||
const params = parseFormalParametersOrFormalList(parser, context | 8388608, functionScope, 0, 1);
|
||
const body = parseFunctionBody(parser, (context | 8192 | 4096 | 131072) ^ (8192 | 4096 | 131072), scope ? addChildScope(functionScope, 128) : functionScope, 8, firstRestricted, scope ? functionScope.scopeError : void 0);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "FunctionDeclaration",
|
||
id,
|
||
params,
|
||
body,
|
||
async: isAsync === 1,
|
||
generator: isGenerator === 1
|
||
});
|
||
}
|
||
function parseFunctionExpression(parser, context, isAsync, inGroup, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
const isGenerator = optionalBit(parser, context, 8457014);
|
||
const generatorAndAsyncFlags = isAsync * 2 + isGenerator << 21;
|
||
let id = null;
|
||
let firstRestricted;
|
||
let scope = context & 64 ? createScope() : void 0;
|
||
if ((parser.token & (143360 | 4096 | 36864)) > 0) {
|
||
validateFunctionName(parser, (context | 32243712) ^ 32243712 | generatorAndAsyncFlags, parser.token);
|
||
if (scope)
|
||
scope = addChildScope(scope, 256);
|
||
firstRestricted = parser.token;
|
||
id = parseIdentifier(parser, context, 0);
|
||
}
|
||
context = (context | 32243712) ^ 32243712 | 67108864 | generatorAndAsyncFlags | (isGenerator ? 0 : 1073741824);
|
||
if (scope)
|
||
scope = addChildScope(scope, 512);
|
||
const params = parseFormalParametersOrFormalList(parser, context | 8388608, scope, inGroup, 1);
|
||
const body = parseFunctionBody(parser, context & ~(134221824 | 8192 | 4096 | 131072 | 16384), scope ? addChildScope(scope, 128) : scope, 0, firstRestricted, void 0);
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "FunctionExpression",
|
||
id,
|
||
params,
|
||
body,
|
||
async: isAsync === 1,
|
||
generator: isGenerator === 1
|
||
});
|
||
}
|
||
function parseArrayLiteral(parser, context, skipInitializer, inGroup, start, line, column) {
|
||
const expr = parseArrayExpressionOrPattern(parser, context, void 0, skipInitializer, inGroup, 0, 2, 0, start, line, column);
|
||
if (context & 256 && parser.destructible & 64) {
|
||
report(parser, 61);
|
||
}
|
||
if (parser.destructible & 8) {
|
||
report(parser, 60);
|
||
}
|
||
return expr;
|
||
}
|
||
function parseArrayExpressionOrPattern(parser, context, scope, skipInitializer, inGroup, isPattern, kind, origin, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
const elements = [];
|
||
let destructible = 0;
|
||
context = (context | 134217728) ^ 134217728;
|
||
while (parser.token !== 20) {
|
||
if (consumeOpt(parser, context | 32768, 18)) {
|
||
elements.push(null);
|
||
} else {
|
||
let left;
|
||
const { token, tokenPos, linePos, colPos, tokenValue } = parser;
|
||
if (token & 143360) {
|
||
left = parsePrimaryExpression(parser, context, kind, 0, 1, 0, inGroup, 1, tokenPos, linePos, colPos);
|
||
if (parser.token === 1077936157) {
|
||
if (parser.assignable & 2)
|
||
report(parser, 24);
|
||
nextToken(parser, context | 32768);
|
||
if (scope)
|
||
addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
|
||
const right = parseExpression(parser, context, 1, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
left = finishNode(parser, context, tokenPos, linePos, colPos, isPattern ? {
|
||
type: "AssignmentPattern",
|
||
left,
|
||
right
|
||
} : {
|
||
type: "AssignmentExpression",
|
||
operator: "=",
|
||
left,
|
||
right
|
||
});
|
||
destructible |= parser.destructible & 256 ? 256 : 0 | parser.destructible & 128 ? 128 : 0;
|
||
} else if (parser.token === 18 || parser.token === 20) {
|
||
if (parser.assignable & 2) {
|
||
destructible |= 16;
|
||
} else if (scope) {
|
||
addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
|
||
}
|
||
destructible |= parser.destructible & 256 ? 256 : 0 | parser.destructible & 128 ? 128 : 0;
|
||
} else {
|
||
destructible |= kind & 1 ? 32 : (kind & 2) === 0 ? 16 : 0;
|
||
left = parseMemberOrUpdateExpression(parser, context, left, inGroup, 0, tokenPos, linePos, colPos);
|
||
if (parser.token !== 18 && parser.token !== 20) {
|
||
if (parser.token !== 1077936157)
|
||
destructible |= 16;
|
||
left = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, left);
|
||
} else if (parser.token !== 1077936157) {
|
||
destructible |= parser.assignable & 2 ? 16 : 32;
|
||
}
|
||
}
|
||
} else if (token & 2097152) {
|
||
left = parser.token === 2162700 ? parseObjectLiteralOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos) : parseArrayExpressionOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos);
|
||
destructible |= parser.destructible;
|
||
parser.assignable = parser.destructible & 16 ? 2 : 1;
|
||
if (parser.token === 18 || parser.token === 20) {
|
||
if (parser.assignable & 2) {
|
||
destructible |= 16;
|
||
}
|
||
} else if (parser.destructible & 8) {
|
||
report(parser, 69);
|
||
} else {
|
||
left = parseMemberOrUpdateExpression(parser, context, left, inGroup, 0, tokenPos, linePos, colPos);
|
||
destructible = parser.assignable & 2 ? 16 : 0;
|
||
if (parser.token !== 18 && parser.token !== 20) {
|
||
left = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, left);
|
||
} else if (parser.token !== 1077936157) {
|
||
destructible |= parser.assignable & 2 ? 16 : 32;
|
||
}
|
||
}
|
||
} else if (token === 14) {
|
||
left = parseSpreadOrRestElement(parser, context, scope, 20, kind, origin, 0, inGroup, isPattern, tokenPos, linePos, colPos);
|
||
destructible |= parser.destructible;
|
||
if (parser.token !== 18 && parser.token !== 20)
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
} else {
|
||
left = parseLeftHandSideExpression(parser, context, 1, 0, 1, tokenPos, linePos, colPos);
|
||
if (parser.token !== 18 && parser.token !== 20) {
|
||
left = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, left);
|
||
if ((kind & (2 | 1)) === 0 && token === 67174411)
|
||
destructible |= 16;
|
||
} else if (parser.assignable & 2) {
|
||
destructible |= 16;
|
||
} else if (token === 67174411) {
|
||
destructible |= parser.assignable & 1 && kind & (2 | 1) ? 32 : 16;
|
||
}
|
||
}
|
||
elements.push(left);
|
||
if (consumeOpt(parser, context | 32768, 18)) {
|
||
if (parser.token === 20)
|
||
break;
|
||
} else
|
||
break;
|
||
}
|
||
}
|
||
consume(parser, context, 20);
|
||
const node = finishNode(parser, context, start, line, column, {
|
||
type: isPattern ? "ArrayPattern" : "ArrayExpression",
|
||
elements
|
||
});
|
||
if (!skipInitializer && parser.token & 4194304) {
|
||
return parseArrayOrObjectAssignmentPattern(parser, context, destructible, inGroup, isPattern, start, line, column, node);
|
||
}
|
||
parser.destructible = destructible;
|
||
return node;
|
||
}
|
||
function parseArrayOrObjectAssignmentPattern(parser, context, destructible, inGroup, isPattern, start, line, column, node) {
|
||
if (parser.token !== 1077936157)
|
||
report(parser, 24);
|
||
nextToken(parser, context | 32768);
|
||
if (destructible & 16)
|
||
report(parser, 24);
|
||
if (!isPattern)
|
||
reinterpretToPattern(parser, node);
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
const right = parseExpression(parser, context, 1, 1, inGroup, tokenPos, linePos, colPos);
|
||
parser.destructible = (destructible | 64 | 8) ^ (8 | 64) | (parser.destructible & 128 ? 128 : 0) | (parser.destructible & 256 ? 256 : 0);
|
||
return finishNode(parser, context, start, line, column, isPattern ? {
|
||
type: "AssignmentPattern",
|
||
left: node,
|
||
right
|
||
} : {
|
||
type: "AssignmentExpression",
|
||
left: node,
|
||
operator: "=",
|
||
right
|
||
});
|
||
}
|
||
function parseSpreadOrRestElement(parser, context, scope, closingToken, kind, origin, isAsync, inGroup, isPattern, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
let argument = null;
|
||
let destructible = 0;
|
||
let { token, tokenValue, tokenPos, linePos, colPos } = parser;
|
||
if (token & (4096 | 143360)) {
|
||
parser.assignable = 1;
|
||
argument = parsePrimaryExpression(parser, context, kind, 0, 1, 0, inGroup, 1, tokenPos, linePos, colPos);
|
||
token = parser.token;
|
||
argument = parseMemberOrUpdateExpression(parser, context, argument, inGroup, 0, tokenPos, linePos, colPos);
|
||
if (parser.token !== 18 && parser.token !== closingToken) {
|
||
if (parser.assignable & 2 && parser.token === 1077936157)
|
||
report(parser, 69);
|
||
destructible |= 16;
|
||
argument = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, argument);
|
||
}
|
||
if (parser.assignable & 2) {
|
||
destructible |= 16;
|
||
} else if (token === closingToken || token === 18) {
|
||
if (scope)
|
||
addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
|
||
} else {
|
||
destructible |= 32;
|
||
}
|
||
destructible |= parser.destructible & 128 ? 128 : 0;
|
||
} else if (token === closingToken) {
|
||
report(parser, 39);
|
||
} else if (token & 2097152) {
|
||
argument = parser.token === 2162700 ? parseObjectLiteralOrPattern(parser, context, scope, 1, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos) : parseArrayExpressionOrPattern(parser, context, scope, 1, inGroup, isPattern, kind, origin, tokenPos, linePos, colPos);
|
||
token = parser.token;
|
||
if (token !== 1077936157 && token !== closingToken && token !== 18) {
|
||
if (parser.destructible & 8)
|
||
report(parser, 69);
|
||
argument = parseMemberOrUpdateExpression(parser, context, argument, inGroup, 0, tokenPos, linePos, colPos);
|
||
destructible |= parser.assignable & 2 ? 16 : 0;
|
||
if ((parser.token & 4194304) === 4194304) {
|
||
if (parser.token !== 1077936157)
|
||
destructible |= 16;
|
||
argument = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos, linePos, colPos, argument);
|
||
} else {
|
||
if ((parser.token & 8454144) === 8454144) {
|
||
argument = parseBinaryExpression(parser, context, 1, tokenPos, linePos, colPos, 4, token, argument);
|
||
}
|
||
if (consumeOpt(parser, context | 32768, 22)) {
|
||
argument = parseConditionalExpression(parser, context, argument, tokenPos, linePos, colPos);
|
||
}
|
||
destructible |= parser.assignable & 2 ? 16 : 32;
|
||
}
|
||
} else {
|
||
destructible |= closingToken === 1074790415 && token !== 1077936157 ? 16 : parser.destructible;
|
||
}
|
||
} else {
|
||
destructible |= 32;
|
||
argument = parseLeftHandSideExpression(parser, context, 1, inGroup, 1, parser.tokenPos, parser.linePos, parser.colPos);
|
||
const { token: token2, tokenPos: tokenPos2, linePos: linePos2, colPos: colPos2 } = parser;
|
||
if (token2 === 1077936157 && token2 !== closingToken && token2 !== 18) {
|
||
if (parser.assignable & 2)
|
||
report(parser, 24);
|
||
argument = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, argument);
|
||
destructible |= 16;
|
||
} else {
|
||
if (token2 === 18) {
|
||
destructible |= 16;
|
||
} else if (token2 !== closingToken) {
|
||
argument = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, argument);
|
||
}
|
||
destructible |= parser.assignable & 1 ? 32 : 16;
|
||
}
|
||
parser.destructible = destructible;
|
||
if (parser.token !== closingToken && parser.token !== 18)
|
||
report(parser, 156);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: isPattern ? "RestElement" : "SpreadElement",
|
||
argument
|
||
});
|
||
}
|
||
if (parser.token !== closingToken) {
|
||
if (kind & 1)
|
||
destructible |= isAsync ? 16 : 32;
|
||
if (consumeOpt(parser, context | 32768, 1077936157)) {
|
||
if (destructible & 16)
|
||
report(parser, 24);
|
||
reinterpretToPattern(parser, argument);
|
||
const right = parseExpression(parser, context, 1, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
argument = finishNode(parser, context, tokenPos, linePos, colPos, isPattern ? {
|
||
type: "AssignmentPattern",
|
||
left: argument,
|
||
right
|
||
} : {
|
||
type: "AssignmentExpression",
|
||
left: argument,
|
||
operator: "=",
|
||
right
|
||
});
|
||
destructible = 16;
|
||
} else {
|
||
destructible |= 16;
|
||
}
|
||
}
|
||
parser.destructible = destructible;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: isPattern ? "RestElement" : "SpreadElement",
|
||
argument
|
||
});
|
||
}
|
||
function parseMethodDefinition(parser, context, kind, inGroup, start, line, column) {
|
||
const modifierFlags = (kind & 64) === 0 ? 31981568 : 14680064;
|
||
context = (context | modifierFlags) ^ modifierFlags | (kind & 88) << 18 | 100925440;
|
||
let scope = context & 64 ? addChildScope(createScope(), 512) : void 0;
|
||
const params = parseMethodFormals(parser, context | 8388608, scope, kind, 1, inGroup);
|
||
if (scope)
|
||
scope = addChildScope(scope, 128);
|
||
const body = parseFunctionBody(parser, context & ~(134221824 | 8192), scope, 0, void 0, void 0);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "FunctionExpression",
|
||
params,
|
||
body,
|
||
async: (kind & 16) > 0,
|
||
generator: (kind & 8) > 0,
|
||
id: null
|
||
});
|
||
}
|
||
function parseObjectLiteral(parser, context, skipInitializer, inGroup, start, line, column) {
|
||
const expr = parseObjectLiteralOrPattern(parser, context, void 0, skipInitializer, inGroup, 0, 2, 0, start, line, column);
|
||
if (context & 256 && parser.destructible & 64) {
|
||
report(parser, 61);
|
||
}
|
||
if (parser.destructible & 8) {
|
||
report(parser, 60);
|
||
}
|
||
return expr;
|
||
}
|
||
function parseObjectLiteralOrPattern(parser, context, scope, skipInitializer, inGroup, isPattern, kind, origin, start, line, column) {
|
||
nextToken(parser, context);
|
||
const properties2 = [];
|
||
let destructible = 0;
|
||
let prototypeCount = 0;
|
||
context = (context | 134217728) ^ 134217728;
|
||
while (parser.token !== 1074790415) {
|
||
const { token, tokenValue, linePos, colPos, tokenPos } = parser;
|
||
if (token === 14) {
|
||
properties2.push(parseSpreadOrRestElement(parser, context, scope, 1074790415, kind, origin, 0, inGroup, isPattern, tokenPos, linePos, colPos));
|
||
} else {
|
||
let state = 0;
|
||
let key = null;
|
||
let value;
|
||
const t = parser.token;
|
||
if (parser.token & (143360 | 4096) || parser.token === 121) {
|
||
key = parseIdentifier(parser, context, 0);
|
||
if (parser.token === 18 || parser.token === 1074790415 || parser.token === 1077936157) {
|
||
state |= 4;
|
||
if (context & 1024 && (token & 537079808) === 537079808) {
|
||
destructible |= 16;
|
||
} else {
|
||
validateBindingIdentifier(parser, context, kind, token, 0);
|
||
}
|
||
if (scope)
|
||
addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
|
||
if (consumeOpt(parser, context | 32768, 1077936157)) {
|
||
destructible |= 8;
|
||
const right = parseExpression(parser, context, 1, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
destructible |= parser.destructible & 256 ? 256 : 0 | parser.destructible & 128 ? 128 : 0;
|
||
value = finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "AssignmentPattern",
|
||
left: context & -2147483648 ? Object.assign({}, key) : key,
|
||
right
|
||
});
|
||
} else {
|
||
destructible |= (token === 209008 ? 128 : 0) | (token === 121 ? 16 : 0);
|
||
value = context & -2147483648 ? Object.assign({}, key) : key;
|
||
}
|
||
} else if (consumeOpt(parser, context | 32768, 21)) {
|
||
const { tokenPos: tokenPos2, linePos: linePos2, colPos: colPos2 } = parser;
|
||
if (tokenValue === "__proto__")
|
||
prototypeCount++;
|
||
if (parser.token & 143360) {
|
||
const tokenAfterColon = parser.token;
|
||
const valueAfterColon = parser.tokenValue;
|
||
destructible |= t === 121 ? 16 : 0;
|
||
value = parsePrimaryExpression(parser, context, kind, 0, 1, 0, inGroup, 1, tokenPos2, linePos2, colPos2);
|
||
const { token: token2 } = parser;
|
||
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos2, linePos2, colPos2);
|
||
if (parser.token === 18 || parser.token === 1074790415) {
|
||
if (token2 === 1077936157 || token2 === 1074790415 || token2 === 18) {
|
||
destructible |= parser.destructible & 128 ? 128 : 0;
|
||
if (parser.assignable & 2) {
|
||
destructible |= 16;
|
||
} else if (scope && (tokenAfterColon & 143360) === 143360) {
|
||
addVarOrBlock(parser, context, scope, valueAfterColon, kind, origin);
|
||
}
|
||
} else {
|
||
destructible |= parser.assignable & 1 ? 32 : 16;
|
||
}
|
||
} else if ((parser.token & 4194304) === 4194304) {
|
||
if (parser.assignable & 2) {
|
||
destructible |= 16;
|
||
} else if (token2 !== 1077936157) {
|
||
destructible |= 32;
|
||
} else if (scope) {
|
||
addVarOrBlock(parser, context, scope, valueAfterColon, kind, origin);
|
||
}
|
||
value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, value);
|
||
} else {
|
||
destructible |= 16;
|
||
if ((parser.token & 8454144) === 8454144) {
|
||
value = parseBinaryExpression(parser, context, 1, tokenPos2, linePos2, colPos2, 4, token2, value);
|
||
}
|
||
if (consumeOpt(parser, context | 32768, 22)) {
|
||
value = parseConditionalExpression(parser, context, value, tokenPos2, linePos2, colPos2);
|
||
}
|
||
}
|
||
} else if ((parser.token & 2097152) === 2097152) {
|
||
value = parser.token === 69271571 ? parseArrayExpressionOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos2, linePos2, colPos2) : parseObjectLiteralOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos2, linePos2, colPos2);
|
||
destructible = parser.destructible;
|
||
parser.assignable = destructible & 16 ? 2 : 1;
|
||
if (parser.token === 18 || parser.token === 1074790415) {
|
||
if (parser.assignable & 2)
|
||
destructible |= 16;
|
||
} else if (parser.destructible & 8) {
|
||
report(parser, 69);
|
||
} else {
|
||
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos2, linePos2, colPos2);
|
||
destructible = parser.assignable & 2 ? 16 : 0;
|
||
if ((parser.token & 4194304) === 4194304) {
|
||
value = parseAssignmentExpressionOrPattern(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, value);
|
||
} else {
|
||
if ((parser.token & 8454144) === 8454144) {
|
||
value = parseBinaryExpression(parser, context, 1, tokenPos2, linePos2, colPos2, 4, token, value);
|
||
}
|
||
if (consumeOpt(parser, context | 32768, 22)) {
|
||
value = parseConditionalExpression(parser, context, value, tokenPos2, linePos2, colPos2);
|
||
}
|
||
destructible |= parser.assignable & 2 ? 16 : 32;
|
||
}
|
||
}
|
||
} else {
|
||
value = parseLeftHandSideExpression(parser, context, 1, inGroup, 1, tokenPos2, linePos2, colPos2);
|
||
destructible |= parser.assignable & 1 ? 32 : 16;
|
||
if (parser.token === 18 || parser.token === 1074790415) {
|
||
if (parser.assignable & 2)
|
||
destructible |= 16;
|
||
} else {
|
||
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos2, linePos2, colPos2);
|
||
destructible = parser.assignable & 2 ? 16 : 0;
|
||
if (parser.token !== 18 && token !== 1074790415) {
|
||
if (parser.token !== 1077936157)
|
||
destructible |= 16;
|
||
value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, value);
|
||
}
|
||
}
|
||
}
|
||
} else if (parser.token === 69271571) {
|
||
destructible |= 16;
|
||
if (token === 209007)
|
||
state |= 16;
|
||
state |= (token === 12402 ? 256 : token === 12403 ? 512 : 1) | 2;
|
||
key = parseComputedPropertyName(parser, context, inGroup);
|
||
destructible |= parser.assignable;
|
||
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
} else if (parser.token & (143360 | 4096)) {
|
||
destructible |= 16;
|
||
if (token === 121)
|
||
report(parser, 93);
|
||
if (token === 209007) {
|
||
if (parser.flags & 1)
|
||
report(parser, 129);
|
||
state |= 16;
|
||
}
|
||
key = parseIdentifier(parser, context, 0);
|
||
state |= token === 12402 ? 256 : token === 12403 ? 512 : 1;
|
||
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
} else if (parser.token === 67174411) {
|
||
destructible |= 16;
|
||
state |= 1;
|
||
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
} else if (parser.token === 8457014) {
|
||
destructible |= 16;
|
||
if (token === 12402) {
|
||
report(parser, 40);
|
||
} else if (token === 12403) {
|
||
report(parser, 41);
|
||
} else if (token === 143483) {
|
||
report(parser, 93);
|
||
}
|
||
nextToken(parser, context);
|
||
state |= 8 | 1 | (token === 209007 ? 16 : 0);
|
||
if (parser.token & 143360) {
|
||
key = parseIdentifier(parser, context, 0);
|
||
} else if ((parser.token & 134217728) === 134217728) {
|
||
key = parseLiteral(parser, context);
|
||
} else if (parser.token === 69271571) {
|
||
state |= 2;
|
||
key = parseComputedPropertyName(parser, context, inGroup);
|
||
destructible |= parser.assignable;
|
||
} else {
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
}
|
||
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
} else if ((parser.token & 134217728) === 134217728) {
|
||
if (token === 209007)
|
||
state |= 16;
|
||
state |= token === 12402 ? 256 : token === 12403 ? 512 : 1;
|
||
destructible |= 16;
|
||
key = parseLiteral(parser, context);
|
||
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
} else {
|
||
report(parser, 130);
|
||
}
|
||
} else if ((parser.token & 134217728) === 134217728) {
|
||
key = parseLiteral(parser, context);
|
||
if (parser.token === 21) {
|
||
consume(parser, context | 32768, 21);
|
||
const { tokenPos: tokenPos2, linePos: linePos2, colPos: colPos2 } = parser;
|
||
if (tokenValue === "__proto__")
|
||
prototypeCount++;
|
||
if (parser.token & 143360) {
|
||
value = parsePrimaryExpression(parser, context, kind, 0, 1, 0, inGroup, 1, tokenPos2, linePos2, colPos2);
|
||
const { token: token2, tokenValue: valueAfterColon } = parser;
|
||
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos2, linePos2, colPos2);
|
||
if (parser.token === 18 || parser.token === 1074790415) {
|
||
if (token2 === 1077936157 || token2 === 1074790415 || token2 === 18) {
|
||
if (parser.assignable & 2) {
|
||
destructible |= 16;
|
||
} else if (scope) {
|
||
addVarOrBlock(parser, context, scope, valueAfterColon, kind, origin);
|
||
}
|
||
} else {
|
||
destructible |= parser.assignable & 1 ? 32 : 16;
|
||
}
|
||
} else if (parser.token === 1077936157) {
|
||
if (parser.assignable & 2)
|
||
destructible |= 16;
|
||
value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, value);
|
||
} else {
|
||
destructible |= 16;
|
||
value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, value);
|
||
}
|
||
} else if ((parser.token & 2097152) === 2097152) {
|
||
value = parser.token === 69271571 ? parseArrayExpressionOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos2, linePos2, colPos2) : parseObjectLiteralOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos2, linePos2, colPos2);
|
||
destructible = parser.destructible;
|
||
parser.assignable = destructible & 16 ? 2 : 1;
|
||
if (parser.token === 18 || parser.token === 1074790415) {
|
||
if (parser.assignable & 2) {
|
||
destructible |= 16;
|
||
}
|
||
} else if ((parser.destructible & 8) !== 8) {
|
||
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos2, linePos2, colPos2);
|
||
destructible = parser.assignable & 2 ? 16 : 0;
|
||
if ((parser.token & 4194304) === 4194304) {
|
||
value = parseAssignmentExpressionOrPattern(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, value);
|
||
} else {
|
||
if ((parser.token & 8454144) === 8454144) {
|
||
value = parseBinaryExpression(parser, context, 1, tokenPos2, linePos2, colPos2, 4, token, value);
|
||
}
|
||
if (consumeOpt(parser, context | 32768, 22)) {
|
||
value = parseConditionalExpression(parser, context, value, tokenPos2, linePos2, colPos2);
|
||
}
|
||
destructible |= parser.assignable & 2 ? 16 : 32;
|
||
}
|
||
}
|
||
} else {
|
||
value = parseLeftHandSideExpression(parser, context, 1, 0, 1, tokenPos2, linePos2, colPos2);
|
||
destructible |= parser.assignable & 1 ? 32 : 16;
|
||
if (parser.token === 18 || parser.token === 1074790415) {
|
||
if (parser.assignable & 2) {
|
||
destructible |= 16;
|
||
}
|
||
} else {
|
||
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos2, linePos2, colPos2);
|
||
destructible = parser.assignable & 1 ? 0 : 16;
|
||
if (parser.token !== 18 && parser.token !== 1074790415) {
|
||
if (parser.token !== 1077936157)
|
||
destructible |= 16;
|
||
value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, value);
|
||
}
|
||
}
|
||
}
|
||
} else if (parser.token === 67174411) {
|
||
state |= 1;
|
||
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
destructible = parser.assignable | 16;
|
||
} else {
|
||
report(parser, 131);
|
||
}
|
||
} else if (parser.token === 69271571) {
|
||
key = parseComputedPropertyName(parser, context, inGroup);
|
||
destructible |= parser.destructible & 256 ? 256 : 0;
|
||
state |= 2;
|
||
if (parser.token === 21) {
|
||
nextToken(parser, context | 32768);
|
||
const { tokenPos: tokenPos2, linePos: linePos2, colPos: colPos2, tokenValue: tokenValue2, token: tokenAfterColon } = parser;
|
||
if (parser.token & 143360) {
|
||
value = parsePrimaryExpression(parser, context, kind, 0, 1, 0, inGroup, 1, tokenPos2, linePos2, colPos2);
|
||
const { token: token2 } = parser;
|
||
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos2, linePos2, colPos2);
|
||
if ((parser.token & 4194304) === 4194304) {
|
||
destructible |= parser.assignable & 2 ? 16 : token2 === 1077936157 ? 0 : 32;
|
||
value = parseAssignmentExpressionOrPattern(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, value);
|
||
} else if (parser.token === 18 || parser.token === 1074790415) {
|
||
if (token2 === 1077936157 || token2 === 1074790415 || token2 === 18) {
|
||
if (parser.assignable & 2) {
|
||
destructible |= 16;
|
||
} else if (scope && (tokenAfterColon & 143360) === 143360) {
|
||
addVarOrBlock(parser, context, scope, tokenValue2, kind, origin);
|
||
}
|
||
} else {
|
||
destructible |= parser.assignable & 1 ? 32 : 16;
|
||
}
|
||
} else {
|
||
destructible |= 16;
|
||
value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, value);
|
||
}
|
||
} else if ((parser.token & 2097152) === 2097152) {
|
||
value = parser.token === 69271571 ? parseArrayExpressionOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos2, linePos2, colPos2) : parseObjectLiteralOrPattern(parser, context, scope, 0, inGroup, isPattern, kind, origin, tokenPos2, linePos2, colPos2);
|
||
destructible = parser.destructible;
|
||
parser.assignable = destructible & 16 ? 2 : 1;
|
||
if (parser.token === 18 || parser.token === 1074790415) {
|
||
if (parser.assignable & 2)
|
||
destructible |= 16;
|
||
} else if (destructible & 8) {
|
||
report(parser, 60);
|
||
} else {
|
||
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos2, linePos2, colPos2);
|
||
destructible = parser.assignable & 2 ? destructible | 16 : 0;
|
||
if ((parser.token & 4194304) === 4194304) {
|
||
if (parser.token !== 1077936157)
|
||
destructible |= 16;
|
||
value = parseAssignmentExpressionOrPattern(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, value);
|
||
} else {
|
||
if ((parser.token & 8454144) === 8454144) {
|
||
value = parseBinaryExpression(parser, context, 1, tokenPos2, linePos2, colPos2, 4, token, value);
|
||
}
|
||
if (consumeOpt(parser, context | 32768, 22)) {
|
||
value = parseConditionalExpression(parser, context, value, tokenPos2, linePos2, colPos2);
|
||
}
|
||
destructible |= parser.assignable & 2 ? 16 : 32;
|
||
}
|
||
}
|
||
} else {
|
||
value = parseLeftHandSideExpression(parser, context, 1, 0, 1, tokenPos2, linePos2, colPos2);
|
||
destructible |= parser.assignable & 1 ? 32 : 16;
|
||
if (parser.token === 18 || parser.token === 1074790415) {
|
||
if (parser.assignable & 2)
|
||
destructible |= 16;
|
||
} else {
|
||
value = parseMemberOrUpdateExpression(parser, context, value, inGroup, 0, tokenPos2, linePos2, colPos2);
|
||
destructible = parser.assignable & 1 ? 0 : 16;
|
||
if (parser.token !== 18 && parser.token !== 1074790415) {
|
||
if (parser.token !== 1077936157)
|
||
destructible |= 16;
|
||
value = parseAssignmentExpression(parser, context, inGroup, isPattern, tokenPos2, linePos2, colPos2, value);
|
||
}
|
||
}
|
||
}
|
||
} else if (parser.token === 67174411) {
|
||
state |= 1;
|
||
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, linePos, colPos);
|
||
destructible = 16;
|
||
} else {
|
||
report(parser, 42);
|
||
}
|
||
} else if (token === 8457014) {
|
||
consume(parser, context | 32768, 8457014);
|
||
state |= 8;
|
||
if (parser.token & 143360) {
|
||
const { token: token2, line: line2, index } = parser;
|
||
key = parseIdentifier(parser, context, 0);
|
||
state |= 1;
|
||
if (parser.token === 67174411) {
|
||
destructible |= 16;
|
||
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
} else {
|
||
reportMessageAt(index, line2, index, token2 === 209007 ? 44 : token2 === 12402 || parser.token === 12403 ? 43 : 45, KeywordDescTable[token2 & 255]);
|
||
}
|
||
} else if ((parser.token & 134217728) === 134217728) {
|
||
destructible |= 16;
|
||
key = parseLiteral(parser, context);
|
||
state |= 1;
|
||
value = parseMethodDefinition(parser, context, state, inGroup, tokenPos, linePos, colPos);
|
||
} else if (parser.token === 69271571) {
|
||
destructible |= 16;
|
||
state |= 2 | 1;
|
||
key = parseComputedPropertyName(parser, context, inGroup);
|
||
value = parseMethodDefinition(parser, context, state, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
} else {
|
||
report(parser, 123);
|
||
}
|
||
} else {
|
||
report(parser, 28, KeywordDescTable[token & 255]);
|
||
}
|
||
destructible |= parser.destructible & 128 ? 128 : 0;
|
||
parser.destructible = destructible;
|
||
properties2.push(finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "Property",
|
||
key,
|
||
value,
|
||
kind: !(state & 768) ? "init" : state & 512 ? "set" : "get",
|
||
computed: (state & 2) > 0,
|
||
method: (state & 1) > 0,
|
||
shorthand: (state & 4) > 0
|
||
}));
|
||
}
|
||
destructible |= parser.destructible;
|
||
if (parser.token !== 18)
|
||
break;
|
||
nextToken(parser, context);
|
||
}
|
||
consume(parser, context, 1074790415);
|
||
if (prototypeCount > 1)
|
||
destructible |= 64;
|
||
const node = finishNode(parser, context, start, line, column, {
|
||
type: isPattern ? "ObjectPattern" : "ObjectExpression",
|
||
properties: properties2
|
||
});
|
||
if (!skipInitializer && parser.token & 4194304) {
|
||
return parseArrayOrObjectAssignmentPattern(parser, context, destructible, inGroup, isPattern, start, line, column, node);
|
||
}
|
||
parser.destructible = destructible;
|
||
return node;
|
||
}
|
||
function parseMethodFormals(parser, context, scope, kind, type, inGroup) {
|
||
consume(parser, context, 67174411);
|
||
const params = [];
|
||
parser.flags = (parser.flags | 128) ^ 128;
|
||
if (parser.token === 16) {
|
||
if (kind & 512) {
|
||
report(parser, 35, "Setter", "one", "");
|
||
}
|
||
nextToken(parser, context);
|
||
return params;
|
||
}
|
||
if (kind & 256) {
|
||
report(parser, 35, "Getter", "no", "s");
|
||
}
|
||
if (kind & 512 && parser.token === 14) {
|
||
report(parser, 36);
|
||
}
|
||
context = (context | 134217728) ^ 134217728;
|
||
let setterArgs = 0;
|
||
let isSimpleParameterList = 0;
|
||
while (parser.token !== 18) {
|
||
let left = null;
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
if (parser.token & 143360) {
|
||
if ((context & 1024) === 0) {
|
||
if ((parser.token & 36864) === 36864) {
|
||
parser.flags |= 256;
|
||
}
|
||
if ((parser.token & 537079808) === 537079808) {
|
||
parser.flags |= 512;
|
||
}
|
||
}
|
||
left = parseAndClassifyIdentifier(parser, context, scope, kind | 1, 0, tokenPos, linePos, colPos);
|
||
} else {
|
||
if (parser.token === 2162700) {
|
||
left = parseObjectLiteralOrPattern(parser, context, scope, 1, inGroup, 1, type, 0, tokenPos, linePos, colPos);
|
||
} else if (parser.token === 69271571) {
|
||
left = parseArrayExpressionOrPattern(parser, context, scope, 1, inGroup, 1, type, 0, tokenPos, linePos, colPos);
|
||
} else if (parser.token === 14) {
|
||
left = parseSpreadOrRestElement(parser, context, scope, 16, type, 0, 0, inGroup, 1, tokenPos, linePos, colPos);
|
||
}
|
||
isSimpleParameterList = 1;
|
||
if (parser.destructible & (32 | 16))
|
||
report(parser, 48);
|
||
}
|
||
if (parser.token === 1077936157) {
|
||
nextToken(parser, context | 32768);
|
||
isSimpleParameterList = 1;
|
||
const right = parseExpression(parser, context, 1, 1, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
left = finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "AssignmentPattern",
|
||
left,
|
||
right
|
||
});
|
||
}
|
||
setterArgs++;
|
||
params.push(left);
|
||
if (!consumeOpt(parser, context, 18))
|
||
break;
|
||
if (parser.token === 16) {
|
||
break;
|
||
}
|
||
}
|
||
if (kind & 512 && setterArgs !== 1) {
|
||
report(parser, 35, "Setter", "one", "");
|
||
}
|
||
if (scope && scope.scopeError !== void 0)
|
||
reportScopeError(scope.scopeError);
|
||
if (isSimpleParameterList)
|
||
parser.flags |= 128;
|
||
consume(parser, context, 16);
|
||
return params;
|
||
}
|
||
function parseComputedPropertyName(parser, context, inGroup) {
|
||
nextToken(parser, context | 32768);
|
||
const key = parseExpression(parser, (context | 134217728) ^ 134217728, 1, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context, 20);
|
||
return key;
|
||
}
|
||
function parseParenthesizedExpression(parser, context, canAssign, kind, origin, start, line, column) {
|
||
parser.flags = (parser.flags | 128) ^ 128;
|
||
const { tokenPos: piStart, linePos: plStart, colPos: pcStart } = parser;
|
||
nextToken(parser, context | 32768 | 1073741824);
|
||
const scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
|
||
context = (context | 134217728) ^ 134217728;
|
||
if (consumeOpt(parser, context, 16)) {
|
||
return parseParenthesizedArrow(parser, context, scope, [], canAssign, 0, start, line, column);
|
||
}
|
||
let destructible = 0;
|
||
parser.destructible &= ~(256 | 128);
|
||
let expr;
|
||
let expressions = [];
|
||
let isSequence = 0;
|
||
let isSimpleParameterList = 0;
|
||
const { tokenPos: iStart, linePos: lStart, colPos: cStart } = parser;
|
||
parser.assignable = 1;
|
||
while (parser.token !== 16) {
|
||
const { token, tokenPos, linePos, colPos } = parser;
|
||
if (token & (143360 | 4096)) {
|
||
if (scope)
|
||
addBlockName(parser, context, scope, parser.tokenValue, 1, 0);
|
||
expr = parsePrimaryExpression(parser, context, kind, 0, 1, 0, 1, 1, tokenPos, linePos, colPos);
|
||
if (parser.token === 16 || parser.token === 18) {
|
||
if (parser.assignable & 2) {
|
||
destructible |= 16;
|
||
isSimpleParameterList = 1;
|
||
} else if ((token & 537079808) === 537079808 || (token & 36864) === 36864) {
|
||
isSimpleParameterList = 1;
|
||
}
|
||
} else {
|
||
if (parser.token === 1077936157) {
|
||
isSimpleParameterList = 1;
|
||
} else {
|
||
destructible |= 16;
|
||
}
|
||
expr = parseMemberOrUpdateExpression(parser, context, expr, 1, 0, tokenPos, linePos, colPos);
|
||
if (parser.token !== 16 && parser.token !== 18) {
|
||
expr = parseAssignmentExpression(parser, context, 1, 0, tokenPos, linePos, colPos, expr);
|
||
}
|
||
}
|
||
} else if ((token & 2097152) === 2097152) {
|
||
expr = token === 2162700 ? parseObjectLiteralOrPattern(parser, context | 1073741824, scope, 0, 1, 0, kind, origin, tokenPos, linePos, colPos) : parseArrayExpressionOrPattern(parser, context | 1073741824, scope, 0, 1, 0, kind, origin, tokenPos, linePos, colPos);
|
||
destructible |= parser.destructible;
|
||
isSimpleParameterList = 1;
|
||
parser.assignable = 2;
|
||
if (parser.token !== 16 && parser.token !== 18) {
|
||
if (destructible & 8)
|
||
report(parser, 119);
|
||
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, tokenPos, linePos, colPos);
|
||
destructible |= 16;
|
||
if (parser.token !== 16 && parser.token !== 18) {
|
||
expr = parseAssignmentExpression(parser, context, 0, 0, tokenPos, linePos, colPos, expr);
|
||
}
|
||
}
|
||
} else if (token === 14) {
|
||
expr = parseSpreadOrRestElement(parser, context, scope, 16, kind, origin, 0, 1, 0, tokenPos, linePos, colPos);
|
||
if (parser.destructible & 16)
|
||
report(parser, 72);
|
||
isSimpleParameterList = 1;
|
||
if (isSequence && (parser.token === 16 || parser.token === 18)) {
|
||
expressions.push(expr);
|
||
}
|
||
destructible |= 8;
|
||
break;
|
||
} else {
|
||
destructible |= 16;
|
||
expr = parseExpression(parser, context, 1, 0, 1, tokenPos, linePos, colPos);
|
||
if (isSequence && (parser.token === 16 || parser.token === 18)) {
|
||
expressions.push(expr);
|
||
}
|
||
if (parser.token === 18) {
|
||
if (!isSequence) {
|
||
isSequence = 1;
|
||
expressions = [expr];
|
||
}
|
||
}
|
||
if (isSequence) {
|
||
while (consumeOpt(parser, context | 32768, 18)) {
|
||
expressions.push(parseExpression(parser, context, 1, 0, 1, parser.tokenPos, parser.linePos, parser.colPos));
|
||
}
|
||
parser.assignable = 2;
|
||
expr = finishNode(parser, context, iStart, lStart, cStart, {
|
||
type: "SequenceExpression",
|
||
expressions
|
||
});
|
||
}
|
||
consume(parser, context, 16);
|
||
parser.destructible = destructible;
|
||
return expr;
|
||
}
|
||
if (isSequence && (parser.token === 16 || parser.token === 18)) {
|
||
expressions.push(expr);
|
||
}
|
||
if (!consumeOpt(parser, context | 32768, 18))
|
||
break;
|
||
if (!isSequence) {
|
||
isSequence = 1;
|
||
expressions = [expr];
|
||
}
|
||
if (parser.token === 16) {
|
||
destructible |= 8;
|
||
break;
|
||
}
|
||
}
|
||
if (isSequence) {
|
||
parser.assignable = 2;
|
||
expr = finishNode(parser, context, iStart, lStart, cStart, {
|
||
type: "SequenceExpression",
|
||
expressions
|
||
});
|
||
}
|
||
consume(parser, context, 16);
|
||
if (destructible & 16 && destructible & 8)
|
||
report(parser, 146);
|
||
destructible |= parser.destructible & 256 ? 256 : 0 | parser.destructible & 128 ? 128 : 0;
|
||
if (parser.token === 10) {
|
||
if (destructible & (32 | 16))
|
||
report(parser, 47);
|
||
if (context & (4194304 | 2048) && destructible & 128)
|
||
report(parser, 29);
|
||
if (context & (1024 | 2097152) && destructible & 256) {
|
||
report(parser, 30);
|
||
}
|
||
if (isSimpleParameterList)
|
||
parser.flags |= 128;
|
||
return parseParenthesizedArrow(parser, context, scope, isSequence ? expressions : [expr], canAssign, 0, start, line, column);
|
||
} else if (destructible & 8) {
|
||
report(parser, 140);
|
||
}
|
||
parser.destructible = (parser.destructible | 256) ^ 256 | destructible;
|
||
return context & 128 ? finishNode(parser, context, piStart, plStart, pcStart, {
|
||
type: "ParenthesizedExpression",
|
||
expression: expr
|
||
}) : expr;
|
||
}
|
||
function parseIdentifierOrArrow(parser, context, start, line, column) {
|
||
const { tokenValue } = parser;
|
||
const expr = parseIdentifier(parser, context, 0);
|
||
parser.assignable = 1;
|
||
if (parser.token === 10) {
|
||
let scope = void 0;
|
||
if (context & 64)
|
||
scope = createArrowHeadParsingScope(parser, context, tokenValue);
|
||
parser.flags = (parser.flags | 128) ^ 128;
|
||
return parseArrowFunctionExpression(parser, context, scope, [expr], 0, start, line, column);
|
||
}
|
||
return expr;
|
||
}
|
||
function parseArrowFromIdentifier(parser, context, value, expr, inNew, canAssign, isAsync, start, line, column) {
|
||
if (!canAssign)
|
||
report(parser, 55);
|
||
if (inNew)
|
||
report(parser, 49);
|
||
parser.flags &= ~128;
|
||
const scope = context & 64 ? createArrowHeadParsingScope(parser, context, value) : void 0;
|
||
return parseArrowFunctionExpression(parser, context, scope, [expr], isAsync, start, line, column);
|
||
}
|
||
function parseParenthesizedArrow(parser, context, scope, params, canAssign, isAsync, start, line, column) {
|
||
if (!canAssign)
|
||
report(parser, 55);
|
||
for (let i = 0; i < params.length; ++i)
|
||
reinterpretToPattern(parser, params[i]);
|
||
return parseArrowFunctionExpression(parser, context, scope, params, isAsync, start, line, column);
|
||
}
|
||
function parseArrowFunctionExpression(parser, context, scope, params, isAsync, start, line, column) {
|
||
if (parser.flags & 1)
|
||
report(parser, 46);
|
||
consume(parser, context | 32768, 10);
|
||
context = (context | 15728640) ^ 15728640 | isAsync << 22;
|
||
const expression = parser.token !== 2162700;
|
||
let body;
|
||
if (scope && scope.scopeError !== void 0) {
|
||
reportScopeError(scope.scopeError);
|
||
}
|
||
if (expression) {
|
||
body = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
} else {
|
||
if (scope)
|
||
scope = addChildScope(scope, 128);
|
||
body = parseFunctionBody(parser, (context | 134221824 | 8192 | 16384) ^ (134221824 | 8192 | 16384), scope, 16, void 0, void 0);
|
||
switch (parser.token) {
|
||
case 69271571:
|
||
if ((parser.flags & 1) === 0) {
|
||
report(parser, 113);
|
||
}
|
||
break;
|
||
case 67108877:
|
||
case 67174409:
|
||
case 22:
|
||
report(parser, 114);
|
||
case 67174411:
|
||
if ((parser.flags & 1) === 0) {
|
||
report(parser, 113);
|
||
}
|
||
parser.flags |= 1024;
|
||
break;
|
||
}
|
||
if ((parser.token & 8454144) === 8454144 && (parser.flags & 1) === 0)
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
if ((parser.token & 33619968) === 33619968)
|
||
report(parser, 122);
|
||
}
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "ArrowFunctionExpression",
|
||
params,
|
||
body,
|
||
async: isAsync === 1,
|
||
expression
|
||
});
|
||
}
|
||
function parseFormalParametersOrFormalList(parser, context, scope, inGroup, kind) {
|
||
consume(parser, context, 67174411);
|
||
parser.flags = (parser.flags | 128) ^ 128;
|
||
const params = [];
|
||
if (consumeOpt(parser, context, 16))
|
||
return params;
|
||
context = (context | 134217728) ^ 134217728;
|
||
let isSimpleParameterList = 0;
|
||
while (parser.token !== 18) {
|
||
let left;
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
if (parser.token & 143360) {
|
||
if ((context & 1024) === 0) {
|
||
if ((parser.token & 36864) === 36864) {
|
||
parser.flags |= 256;
|
||
}
|
||
if ((parser.token & 537079808) === 537079808) {
|
||
parser.flags |= 512;
|
||
}
|
||
}
|
||
left = parseAndClassifyIdentifier(parser, context, scope, kind | 1, 0, tokenPos, linePos, colPos);
|
||
} else {
|
||
if (parser.token === 2162700) {
|
||
left = parseObjectLiteralOrPattern(parser, context, scope, 1, inGroup, 1, kind, 0, tokenPos, linePos, colPos);
|
||
} else if (parser.token === 69271571) {
|
||
left = parseArrayExpressionOrPattern(parser, context, scope, 1, inGroup, 1, kind, 0, tokenPos, linePos, colPos);
|
||
} else if (parser.token === 14) {
|
||
left = parseSpreadOrRestElement(parser, context, scope, 16, kind, 0, 0, inGroup, 1, tokenPos, linePos, colPos);
|
||
} else {
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
}
|
||
isSimpleParameterList = 1;
|
||
if (parser.destructible & (32 | 16)) {
|
||
report(parser, 48);
|
||
}
|
||
}
|
||
if (parser.token === 1077936157) {
|
||
nextToken(parser, context | 32768);
|
||
isSimpleParameterList = 1;
|
||
const right = parseExpression(parser, context, 1, 1, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
left = finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "AssignmentPattern",
|
||
left,
|
||
right
|
||
});
|
||
}
|
||
params.push(left);
|
||
if (!consumeOpt(parser, context, 18))
|
||
break;
|
||
if (parser.token === 16) {
|
||
break;
|
||
}
|
||
}
|
||
if (isSimpleParameterList)
|
||
parser.flags |= 128;
|
||
if (scope && (isSimpleParameterList || context & 1024) && scope.scopeError !== void 0) {
|
||
reportScopeError(scope.scopeError);
|
||
}
|
||
consume(parser, context, 16);
|
||
return params;
|
||
}
|
||
function parseMembeExpressionNoCall(parser, context, expr, inGroup, start, line, column) {
|
||
const { token } = parser;
|
||
if (token & 67108864) {
|
||
if (token === 67108877) {
|
||
nextToken(parser, context | 1073741824);
|
||
parser.assignable = 1;
|
||
const property3 = parsePropertyOrPrivatePropertyName(parser, context);
|
||
return parseMembeExpressionNoCall(parser, context, finishNode(parser, context, start, line, column, {
|
||
type: "MemberExpression",
|
||
object: expr,
|
||
computed: false,
|
||
property: property3
|
||
}), 0, start, line, column);
|
||
} else if (token === 69271571) {
|
||
nextToken(parser, context | 32768);
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
const property3 = parseExpressions(parser, context, inGroup, 1, tokenPos, linePos, colPos);
|
||
consume(parser, context, 20);
|
||
parser.assignable = 1;
|
||
return parseMembeExpressionNoCall(parser, context, finishNode(parser, context, start, line, column, {
|
||
type: "MemberExpression",
|
||
object: expr,
|
||
computed: true,
|
||
property: property3
|
||
}), 0, start, line, column);
|
||
} else if (token === 67174408 || token === 67174409) {
|
||
parser.assignable = 2;
|
||
return parseMembeExpressionNoCall(parser, context, finishNode(parser, context, start, line, column, {
|
||
type: "TaggedTemplateExpression",
|
||
tag: expr,
|
||
quasi: parser.token === 67174408 ? parseTemplate(parser, context | 65536) : parseTemplateLiteral(parser, context, parser.tokenPos, parser.linePos, parser.colPos)
|
||
}), 0, start, line, column);
|
||
}
|
||
}
|
||
return expr;
|
||
}
|
||
function parseNewExpression(parser, context, inGroup, start, line, column) {
|
||
const id = parseIdentifier(parser, context | 32768, 0);
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
if (consumeOpt(parser, context, 67108877)) {
|
||
if (context & 67108864 && parser.token === 143494) {
|
||
parser.assignable = 2;
|
||
return parseMetaProperty(parser, context, id, start, line, column);
|
||
}
|
||
report(parser, 92);
|
||
}
|
||
parser.assignable = 2;
|
||
if ((parser.token & 16842752) === 16842752) {
|
||
report(parser, 63, KeywordDescTable[parser.token & 255]);
|
||
}
|
||
const expr = parsePrimaryExpression(parser, context, 2, 1, 0, 0, inGroup, 1, tokenPos, linePos, colPos);
|
||
context = (context | 134217728) ^ 134217728;
|
||
if (parser.token === 67108991)
|
||
report(parser, 163);
|
||
const callee = parseMembeExpressionNoCall(parser, context, expr, inGroup, tokenPos, linePos, colPos);
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "NewExpression",
|
||
callee,
|
||
arguments: parser.token === 67174411 ? parseArguments(parser, context, inGroup) : []
|
||
});
|
||
}
|
||
function parseMetaProperty(parser, context, meta, start, line, column) {
|
||
const property3 = parseIdentifier(parser, context, 0);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "MetaProperty",
|
||
meta,
|
||
property: property3
|
||
});
|
||
}
|
||
function parseAsyncArrowAfterIdent(parser, context, canAssign, start, line, column) {
|
||
if (parser.token === 209008)
|
||
report(parser, 29);
|
||
if (context & (1024 | 2097152) && parser.token === 241773) {
|
||
report(parser, 30);
|
||
}
|
||
if ((parser.token & 537079808) === 537079808) {
|
||
parser.flags |= 512;
|
||
}
|
||
return parseArrowFromIdentifier(parser, context, parser.tokenValue, parseIdentifier(parser, context, 0), 0, canAssign, 1, start, line, column);
|
||
}
|
||
function parseAsyncArrowOrCallExpression(parser, context, callee, canAssign, kind, origin, flags, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
const scope = context & 64 ? addChildScope(createScope(), 1024) : void 0;
|
||
context = (context | 134217728) ^ 134217728;
|
||
if (consumeOpt(parser, context, 16)) {
|
||
if (parser.token === 10) {
|
||
if (flags & 1)
|
||
report(parser, 46);
|
||
return parseParenthesizedArrow(parser, context, scope, [], canAssign, 1, start, line, column);
|
||
}
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "CallExpression",
|
||
callee,
|
||
arguments: []
|
||
});
|
||
}
|
||
let destructible = 0;
|
||
let expr = null;
|
||
let isSimpleParameterList = 0;
|
||
parser.destructible = (parser.destructible | 256 | 128) ^ (256 | 128);
|
||
const params = [];
|
||
while (parser.token !== 16) {
|
||
const { token, tokenPos, linePos, colPos } = parser;
|
||
if (token & (143360 | 4096)) {
|
||
if (scope)
|
||
addBlockName(parser, context, scope, parser.tokenValue, kind, 0);
|
||
expr = parsePrimaryExpression(parser, context, kind, 0, 1, 0, 1, 1, tokenPos, linePos, colPos);
|
||
if (parser.token === 16 || parser.token === 18) {
|
||
if (parser.assignable & 2) {
|
||
destructible |= 16;
|
||
isSimpleParameterList = 1;
|
||
} else if ((token & 537079808) === 537079808) {
|
||
parser.flags |= 512;
|
||
} else if ((token & 36864) === 36864) {
|
||
parser.flags |= 256;
|
||
}
|
||
} else {
|
||
if (parser.token === 1077936157) {
|
||
isSimpleParameterList = 1;
|
||
} else {
|
||
destructible |= 16;
|
||
}
|
||
expr = parseMemberOrUpdateExpression(parser, context, expr, 1, 0, tokenPos, linePos, colPos);
|
||
if (parser.token !== 16 && parser.token !== 18) {
|
||
expr = parseAssignmentExpression(parser, context, 1, 0, tokenPos, linePos, colPos, expr);
|
||
}
|
||
}
|
||
} else if (token & 2097152) {
|
||
expr = token === 2162700 ? parseObjectLiteralOrPattern(parser, context, scope, 0, 1, 0, kind, origin, tokenPos, linePos, colPos) : parseArrayExpressionOrPattern(parser, context, scope, 0, 1, 0, kind, origin, tokenPos, linePos, colPos);
|
||
destructible |= parser.destructible;
|
||
isSimpleParameterList = 1;
|
||
if (parser.token !== 16 && parser.token !== 18) {
|
||
if (destructible & 8)
|
||
report(parser, 119);
|
||
expr = parseMemberOrUpdateExpression(parser, context, expr, 0, 0, tokenPos, linePos, colPos);
|
||
destructible |= 16;
|
||
if ((parser.token & 8454144) === 8454144) {
|
||
expr = parseBinaryExpression(parser, context, 1, start, line, column, 4, token, expr);
|
||
}
|
||
if (consumeOpt(parser, context | 32768, 22)) {
|
||
expr = parseConditionalExpression(parser, context, expr, start, line, column);
|
||
}
|
||
}
|
||
} else if (token === 14) {
|
||
expr = parseSpreadOrRestElement(parser, context, scope, 16, kind, origin, 1, 1, 0, tokenPos, linePos, colPos);
|
||
destructible |= (parser.token === 16 ? 0 : 16) | parser.destructible;
|
||
isSimpleParameterList = 1;
|
||
} else {
|
||
expr = parseExpression(parser, context, 1, 0, 0, tokenPos, linePos, colPos);
|
||
destructible = parser.assignable;
|
||
params.push(expr);
|
||
while (consumeOpt(parser, context | 32768, 18)) {
|
||
params.push(parseExpression(parser, context, 1, 0, 0, tokenPos, linePos, colPos));
|
||
}
|
||
destructible |= parser.assignable;
|
||
consume(parser, context, 16);
|
||
parser.destructible = destructible | 16;
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "CallExpression",
|
||
callee,
|
||
arguments: params
|
||
});
|
||
}
|
||
params.push(expr);
|
||
if (!consumeOpt(parser, context | 32768, 18))
|
||
break;
|
||
}
|
||
consume(parser, context, 16);
|
||
destructible |= parser.destructible & 256 ? 256 : 0 | parser.destructible & 128 ? 128 : 0;
|
||
if (parser.token === 10) {
|
||
if (destructible & (32 | 16))
|
||
report(parser, 25);
|
||
if (parser.flags & 1 || flags & 1)
|
||
report(parser, 46);
|
||
if (destructible & 128)
|
||
report(parser, 29);
|
||
if (context & (1024 | 2097152) && destructible & 256)
|
||
report(parser, 30);
|
||
if (isSimpleParameterList)
|
||
parser.flags |= 128;
|
||
return parseParenthesizedArrow(parser, context, scope, params, canAssign, 1, start, line, column);
|
||
} else if (destructible & 8) {
|
||
report(parser, 60);
|
||
}
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "CallExpression",
|
||
callee,
|
||
arguments: params
|
||
});
|
||
}
|
||
function parseRegExpLiteral(parser, context, start, line, column) {
|
||
const { tokenRaw, tokenRegExp, tokenValue } = parser;
|
||
nextToken(parser, context);
|
||
parser.assignable = 2;
|
||
return context & 512 ? finishNode(parser, context, start, line, column, {
|
||
type: "Literal",
|
||
value: tokenValue,
|
||
regex: tokenRegExp,
|
||
raw: tokenRaw
|
||
}) : finishNode(parser, context, start, line, column, {
|
||
type: "Literal",
|
||
value: tokenValue,
|
||
regex: tokenRegExp
|
||
});
|
||
}
|
||
function parseClassDeclaration(parser, context, scope, flags, start, line, column) {
|
||
context = (context | 16777216 | 1024) ^ 16777216;
|
||
let decorators = parseDecorators(parser, context);
|
||
if (decorators.length) {
|
||
start = parser.tokenPos;
|
||
line = parser.linePos;
|
||
column = parser.colPos;
|
||
}
|
||
if (parser.leadingDecorators.length) {
|
||
parser.leadingDecorators.push(...decorators);
|
||
decorators = parser.leadingDecorators;
|
||
parser.leadingDecorators = [];
|
||
}
|
||
nextToken(parser, context);
|
||
let id = null;
|
||
let superClass = null;
|
||
const { tokenValue } = parser;
|
||
if (parser.token & 4096 && parser.token !== 20567) {
|
||
if (isStrictReservedWord(parser, context, parser.token)) {
|
||
report(parser, 115);
|
||
}
|
||
if ((parser.token & 537079808) === 537079808) {
|
||
report(parser, 116);
|
||
}
|
||
if (scope) {
|
||
addBlockName(parser, context, scope, tokenValue, 32, 0);
|
||
if (flags) {
|
||
if (flags & 2) {
|
||
declareUnboundVariable(parser, tokenValue);
|
||
}
|
||
}
|
||
}
|
||
id = parseIdentifier(parser, context, 0);
|
||
} else {
|
||
if ((flags & 1) === 0)
|
||
report(parser, 37, "Class");
|
||
}
|
||
let inheritedContext = context;
|
||
if (consumeOpt(parser, context | 32768, 20567)) {
|
||
superClass = parseLeftHandSideExpression(parser, context, 0, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
inheritedContext |= 524288;
|
||
} else {
|
||
inheritedContext = (inheritedContext | 524288) ^ 524288;
|
||
}
|
||
const body = parseClassBody(parser, inheritedContext, context, scope, 2, 8, 0);
|
||
return finishNode(parser, context, start, line, column, context & 1 ? {
|
||
type: "ClassDeclaration",
|
||
id,
|
||
superClass,
|
||
decorators,
|
||
body
|
||
} : {
|
||
type: "ClassDeclaration",
|
||
id,
|
||
superClass,
|
||
body
|
||
});
|
||
}
|
||
function parseClassExpression(parser, context, inGroup, start, line, column) {
|
||
let id = null;
|
||
let superClass = null;
|
||
context = (context | 1024 | 16777216) ^ 16777216;
|
||
const decorators = parseDecorators(parser, context);
|
||
if (decorators.length) {
|
||
start = parser.tokenPos;
|
||
line = parser.linePos;
|
||
column = parser.colPos;
|
||
}
|
||
nextToken(parser, context);
|
||
if (parser.token & 4096 && parser.token !== 20567) {
|
||
if (isStrictReservedWord(parser, context, parser.token))
|
||
report(parser, 115);
|
||
if ((parser.token & 537079808) === 537079808) {
|
||
report(parser, 116);
|
||
}
|
||
id = parseIdentifier(parser, context, 0);
|
||
}
|
||
let inheritedContext = context;
|
||
if (consumeOpt(parser, context | 32768, 20567)) {
|
||
superClass = parseLeftHandSideExpression(parser, context, 0, inGroup, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
inheritedContext |= 524288;
|
||
} else {
|
||
inheritedContext = (inheritedContext | 524288) ^ 524288;
|
||
}
|
||
const body = parseClassBody(parser, inheritedContext, context, void 0, 2, 0, inGroup);
|
||
parser.assignable = 2;
|
||
return finishNode(parser, context, start, line, column, context & 1 ? {
|
||
type: "ClassExpression",
|
||
id,
|
||
superClass,
|
||
decorators,
|
||
body
|
||
} : {
|
||
type: "ClassExpression",
|
||
id,
|
||
superClass,
|
||
body
|
||
});
|
||
}
|
||
function parseDecorators(parser, context) {
|
||
const list = [];
|
||
if (context & 1) {
|
||
while (parser.token === 133) {
|
||
list.push(parseDecoratorList(parser, context, parser.tokenPos, parser.linePos, parser.colPos));
|
||
}
|
||
}
|
||
return list;
|
||
}
|
||
function parseDecoratorList(parser, context, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
let expression = parsePrimaryExpression(parser, context, 2, 0, 1, 0, 0, 1, start, line, column);
|
||
expression = parseMemberOrUpdateExpression(parser, context, expression, 0, 0, start, line, column);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "Decorator",
|
||
expression
|
||
});
|
||
}
|
||
function parseClassBody(parser, context, inheritedContext, scope, kind, origin, inGroup) {
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
consume(parser, context | 32768, 2162700);
|
||
context = (context | 134217728) ^ 134217728;
|
||
let hasConstr = parser.flags & 32;
|
||
parser.flags = (parser.flags | 32) ^ 32;
|
||
const body = [];
|
||
let decorators;
|
||
while (parser.token !== 1074790415) {
|
||
let length2 = 0;
|
||
decorators = parseDecorators(parser, context);
|
||
length2 = decorators.length;
|
||
if (length2 > 0 && parser.tokenValue === "constructor") {
|
||
report(parser, 107);
|
||
}
|
||
if (parser.token === 1074790415)
|
||
report(parser, 106);
|
||
if (consumeOpt(parser, context, 1074790417)) {
|
||
if (length2 > 0)
|
||
report(parser, 117);
|
||
continue;
|
||
}
|
||
body.push(parseClassElementList(parser, context, scope, inheritedContext, kind, decorators, 0, inGroup, parser.tokenPos, parser.linePos, parser.colPos));
|
||
}
|
||
consume(parser, origin & 8 ? context | 32768 : context, 1074790415);
|
||
parser.flags = parser.flags & ~32 | hasConstr;
|
||
return finishNode(parser, context, tokenPos, linePos, colPos, {
|
||
type: "ClassBody",
|
||
body
|
||
});
|
||
}
|
||
function parseClassElementList(parser, context, scope, inheritedContext, type, decorators, isStatic, inGroup, start, line, column) {
|
||
let kind = isStatic ? 32 : 0;
|
||
let key = null;
|
||
const { token, tokenPos, linePos, colPos } = parser;
|
||
if (token & (143360 | 36864)) {
|
||
key = parseIdentifier(parser, context, 0);
|
||
switch (token) {
|
||
case 36972:
|
||
if (!isStatic && parser.token !== 67174411 && (parser.token & 1048576) !== 1048576 && parser.token !== 1077936157) {
|
||
return parseClassElementList(parser, context, scope, inheritedContext, type, decorators, 1, inGroup, start, line, column);
|
||
}
|
||
break;
|
||
case 209007:
|
||
if (parser.token !== 67174411 && (parser.flags & 1) === 0) {
|
||
if (context & 1 && (parser.token & 1073741824) === 1073741824) {
|
||
return parsePropertyDefinition(parser, context, key, kind, decorators, tokenPos, linePos, colPos);
|
||
}
|
||
kind |= 16 | (optionalBit(parser, context, 8457014) ? 8 : 0);
|
||
}
|
||
break;
|
||
case 12402:
|
||
if (parser.token !== 67174411) {
|
||
if (context & 1 && (parser.token & 1073741824) === 1073741824) {
|
||
return parsePropertyDefinition(parser, context, key, kind, decorators, tokenPos, linePos, colPos);
|
||
}
|
||
kind |= 256;
|
||
}
|
||
break;
|
||
case 12403:
|
||
if (parser.token !== 67174411) {
|
||
if (context & 1 && (parser.token & 1073741824) === 1073741824) {
|
||
return parsePropertyDefinition(parser, context, key, kind, decorators, tokenPos, linePos, colPos);
|
||
}
|
||
kind |= 512;
|
||
}
|
||
break;
|
||
}
|
||
} else if (token === 69271571) {
|
||
kind |= 2;
|
||
key = parseComputedPropertyName(parser, inheritedContext, inGroup);
|
||
} else if ((token & 134217728) === 134217728) {
|
||
key = parseLiteral(parser, context);
|
||
} else if (token === 8457014) {
|
||
kind |= 8;
|
||
nextToken(parser, context);
|
||
} else if (context & 1 && parser.token === 131) {
|
||
kind |= 4096;
|
||
key = parsePrivateIdentifier(parser, context | 16384, tokenPos, linePos, colPos);
|
||
} else if (context & 1 && (parser.token & 1073741824) === 1073741824) {
|
||
kind |= 128;
|
||
} else if (isStatic && token === 2162700) {
|
||
return parseStaticBlock(parser, context, scope, tokenPos, linePos, colPos);
|
||
} else if (token === 122) {
|
||
key = parseIdentifier(parser, context, 0);
|
||
if (parser.token !== 67174411)
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
} else {
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
}
|
||
if (kind & (8 | 16 | 768)) {
|
||
if (parser.token & 143360) {
|
||
key = parseIdentifier(parser, context, 0);
|
||
} else if ((parser.token & 134217728) === 134217728) {
|
||
key = parseLiteral(parser, context);
|
||
} else if (parser.token === 69271571) {
|
||
kind |= 2;
|
||
key = parseComputedPropertyName(parser, context, 0);
|
||
} else if (parser.token === 122) {
|
||
key = parseIdentifier(parser, context, 0);
|
||
} else if (context & 1 && parser.token === 131) {
|
||
kind |= 4096;
|
||
key = parsePrivateIdentifier(parser, context, tokenPos, linePos, colPos);
|
||
} else
|
||
report(parser, 132);
|
||
}
|
||
if ((kind & 2) === 0) {
|
||
if (parser.tokenValue === "constructor") {
|
||
if ((parser.token & 1073741824) === 1073741824) {
|
||
report(parser, 126);
|
||
} else if ((kind & 32) === 0 && parser.token === 67174411) {
|
||
if (kind & (768 | 16 | 128 | 8)) {
|
||
report(parser, 51, "accessor");
|
||
} else if ((context & 524288) === 0) {
|
||
if (parser.flags & 32)
|
||
report(parser, 52);
|
||
else
|
||
parser.flags |= 32;
|
||
}
|
||
}
|
||
kind |= 64;
|
||
} else if ((kind & 4096) === 0 && kind & (32 | 768 | 8 | 16) && parser.tokenValue === "prototype") {
|
||
report(parser, 50);
|
||
}
|
||
}
|
||
if (context & 1 && parser.token !== 67174411) {
|
||
return parsePropertyDefinition(parser, context, key, kind, decorators, tokenPos, linePos, colPos);
|
||
}
|
||
const value = parseMethodDefinition(parser, context, kind, inGroup, parser.tokenPos, parser.linePos, parser.colPos);
|
||
return finishNode(parser, context, start, line, column, context & 1 ? {
|
||
type: "MethodDefinition",
|
||
kind: (kind & 32) === 0 && kind & 64 ? "constructor" : kind & 256 ? "get" : kind & 512 ? "set" : "method",
|
||
static: (kind & 32) > 0,
|
||
computed: (kind & 2) > 0,
|
||
key,
|
||
decorators,
|
||
value
|
||
} : {
|
||
type: "MethodDefinition",
|
||
kind: (kind & 32) === 0 && kind & 64 ? "constructor" : kind & 256 ? "get" : kind & 512 ? "set" : "method",
|
||
static: (kind & 32) > 0,
|
||
computed: (kind & 2) > 0,
|
||
key,
|
||
value
|
||
});
|
||
}
|
||
function parsePrivateIdentifier(parser, context, start, line, column) {
|
||
nextToken(parser, context);
|
||
const { tokenValue } = parser;
|
||
if (tokenValue === "constructor")
|
||
report(parser, 125);
|
||
nextToken(parser, context);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "PrivateIdentifier",
|
||
name: tokenValue
|
||
});
|
||
}
|
||
function parsePropertyDefinition(parser, context, key, state, decorators, start, line, column) {
|
||
let value = null;
|
||
if (state & 8)
|
||
report(parser, 0);
|
||
if (parser.token === 1077936157) {
|
||
nextToken(parser, context | 32768);
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
if (parser.token === 537079928)
|
||
report(parser, 116);
|
||
value = parsePrimaryExpression(parser, context | 16384, 2, 0, 1, 0, 0, 1, tokenPos, linePos, colPos);
|
||
if ((parser.token & 1073741824) !== 1073741824) {
|
||
value = parseMemberOrUpdateExpression(parser, context | 16384, value, 0, 0, tokenPos, linePos, colPos);
|
||
value = parseAssignmentExpression(parser, context | 16384, 0, 0, tokenPos, linePos, colPos, value);
|
||
if (parser.token === 18) {
|
||
value = parseSequenceExpression(parser, context, 0, start, line, column, value);
|
||
}
|
||
}
|
||
}
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "PropertyDefinition",
|
||
key,
|
||
value,
|
||
static: (state & 32) > 0,
|
||
computed: (state & 2) > 0,
|
||
decorators
|
||
});
|
||
}
|
||
function parseBindingPattern(parser, context, scope, type, origin, start, line, column) {
|
||
if (parser.token & 143360)
|
||
return parseAndClassifyIdentifier(parser, context, scope, type, origin, start, line, column);
|
||
if ((parser.token & 2097152) !== 2097152)
|
||
report(parser, 28, KeywordDescTable[parser.token & 255]);
|
||
const left = parser.token === 69271571 ? parseArrayExpressionOrPattern(parser, context, scope, 1, 0, 1, type, origin, start, line, column) : parseObjectLiteralOrPattern(parser, context, scope, 1, 0, 1, type, origin, start, line, column);
|
||
if (parser.destructible & 16)
|
||
report(parser, 48);
|
||
if (parser.destructible & 32)
|
||
report(parser, 48);
|
||
return left;
|
||
}
|
||
function parseAndClassifyIdentifier(parser, context, scope, kind, origin, start, line, column) {
|
||
const { tokenValue, token } = parser;
|
||
if (context & 1024) {
|
||
if ((token & 537079808) === 537079808) {
|
||
report(parser, 116);
|
||
} else if ((token & 36864) === 36864) {
|
||
report(parser, 115);
|
||
}
|
||
}
|
||
if ((token & 20480) === 20480) {
|
||
report(parser, 100);
|
||
}
|
||
if (context & (2048 | 2097152) && token === 241773) {
|
||
report(parser, 30);
|
||
}
|
||
if (token === 241739) {
|
||
if (kind & (8 | 16))
|
||
report(parser, 98);
|
||
}
|
||
if (context & (4194304 | 2048) && token === 209008) {
|
||
report(parser, 96);
|
||
}
|
||
nextToken(parser, context);
|
||
if (scope)
|
||
addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "Identifier",
|
||
name: tokenValue
|
||
});
|
||
}
|
||
function parseJSXRootElementOrFragment(parser, context, inJSXChild, start, line, column) {
|
||
nextToken(parser, context);
|
||
if (parser.token === 8456259) {
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXFragment",
|
||
openingFragment: parseOpeningFragment(parser, context, start, line, column),
|
||
children: parseJSXChildren(parser, context),
|
||
closingFragment: parseJSXClosingFragment(parser, context, inJSXChild, parser.tokenPos, parser.linePos, parser.colPos)
|
||
});
|
||
}
|
||
let closingElement = null;
|
||
let children = [];
|
||
const openingElement = parseJSXOpeningFragmentOrSelfCloseElement(parser, context, inJSXChild, start, line, column);
|
||
if (!openingElement.selfClosing) {
|
||
children = parseJSXChildren(parser, context);
|
||
closingElement = parseJSXClosingElement(parser, context, inJSXChild, parser.tokenPos, parser.linePos, parser.colPos);
|
||
const close = isEqualTagName(closingElement.name);
|
||
if (isEqualTagName(openingElement.name) !== close)
|
||
report(parser, 150, close);
|
||
}
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXElement",
|
||
children,
|
||
openingElement,
|
||
closingElement
|
||
});
|
||
}
|
||
function parseOpeningFragment(parser, context, start, line, column) {
|
||
scanJSXToken(parser, context);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXOpeningFragment"
|
||
});
|
||
}
|
||
function parseJSXClosingElement(parser, context, inJSXChild, start, line, column) {
|
||
consume(parser, context, 25);
|
||
const name42 = parseJSXElementName(parser, context, parser.tokenPos, parser.linePos, parser.colPos);
|
||
if (inJSXChild) {
|
||
consume(parser, context, 8456259);
|
||
} else {
|
||
parser.token = scanJSXToken(parser, context);
|
||
}
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXClosingElement",
|
||
name: name42
|
||
});
|
||
}
|
||
function parseJSXClosingFragment(parser, context, inJSXChild, start, line, column) {
|
||
consume(parser, context, 25);
|
||
if (inJSXChild) {
|
||
consume(parser, context, 8456259);
|
||
} else {
|
||
consume(parser, context, 8456259);
|
||
}
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXClosingFragment"
|
||
});
|
||
}
|
||
function parseJSXChildren(parser, context) {
|
||
const children = [];
|
||
while (parser.token !== 25) {
|
||
parser.index = parser.tokenPos = parser.startPos;
|
||
parser.column = parser.colPos = parser.startColumn;
|
||
parser.line = parser.linePos = parser.startLine;
|
||
scanJSXToken(parser, context);
|
||
children.push(parseJSXChild(parser, context, parser.tokenPos, parser.linePos, parser.colPos));
|
||
}
|
||
return children;
|
||
}
|
||
function parseJSXChild(parser, context, start, line, column) {
|
||
if (parser.token === 138)
|
||
return parseJSXText(parser, context, start, line, column);
|
||
if (parser.token === 2162700)
|
||
return parseJSXExpressionContainer(parser, context, 0, 0, start, line, column);
|
||
if (parser.token === 8456258)
|
||
return parseJSXRootElementOrFragment(parser, context, 0, start, line, column);
|
||
report(parser, 0);
|
||
}
|
||
function parseJSXText(parser, context, start, line, column) {
|
||
scanJSXToken(parser, context);
|
||
const node = {
|
||
type: "JSXText",
|
||
value: parser.tokenValue
|
||
};
|
||
if (context & 512) {
|
||
node.raw = parser.tokenRaw;
|
||
}
|
||
return finishNode(parser, context, start, line, column, node);
|
||
}
|
||
function parseJSXOpeningFragmentOrSelfCloseElement(parser, context, inJSXChild, start, line, column) {
|
||
if ((parser.token & 143360) !== 143360 && (parser.token & 4096) !== 4096)
|
||
report(parser, 0);
|
||
const tagName = parseJSXElementName(parser, context, parser.tokenPos, parser.linePos, parser.colPos);
|
||
const attributes2 = parseJSXAttributes(parser, context);
|
||
const selfClosing = parser.token === 8457016;
|
||
if (parser.token === 8456259) {
|
||
scanJSXToken(parser, context);
|
||
} else {
|
||
consume(parser, context, 8457016);
|
||
if (inJSXChild) {
|
||
consume(parser, context, 8456259);
|
||
} else {
|
||
scanJSXToken(parser, context);
|
||
}
|
||
}
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXOpeningElement",
|
||
name: tagName,
|
||
attributes: attributes2,
|
||
selfClosing
|
||
});
|
||
}
|
||
function parseJSXElementName(parser, context, start, line, column) {
|
||
scanJSXIdentifier(parser);
|
||
let key = parseJSXIdentifier(parser, context, start, line, column);
|
||
if (parser.token === 21)
|
||
return parseJSXNamespacedName(parser, context, key, start, line, column);
|
||
while (consumeOpt(parser, context, 67108877)) {
|
||
scanJSXIdentifier(parser);
|
||
key = parseJSXMemberExpression(parser, context, key, start, line, column);
|
||
}
|
||
return key;
|
||
}
|
||
function parseJSXMemberExpression(parser, context, object, start, line, column) {
|
||
const property3 = parseJSXIdentifier(parser, context, parser.tokenPos, parser.linePos, parser.colPos);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXMemberExpression",
|
||
object,
|
||
property: property3
|
||
});
|
||
}
|
||
function parseJSXAttributes(parser, context) {
|
||
const attributes2 = [];
|
||
while (parser.token !== 8457016 && parser.token !== 8456259 && parser.token !== 1048576) {
|
||
attributes2.push(parseJsxAttribute(parser, context, parser.tokenPos, parser.linePos, parser.colPos));
|
||
}
|
||
return attributes2;
|
||
}
|
||
function parseJSXSpreadAttribute(parser, context, start, line, column) {
|
||
nextToken(parser, context);
|
||
consume(parser, context, 14);
|
||
const expression = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context, 1074790415);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXSpreadAttribute",
|
||
argument: expression
|
||
});
|
||
}
|
||
function parseJsxAttribute(parser, context, start, line, column) {
|
||
if (parser.token === 2162700)
|
||
return parseJSXSpreadAttribute(parser, context, start, line, column);
|
||
scanJSXIdentifier(parser);
|
||
let value = null;
|
||
let name42 = parseJSXIdentifier(parser, context, start, line, column);
|
||
if (parser.token === 21) {
|
||
name42 = parseJSXNamespacedName(parser, context, name42, start, line, column);
|
||
}
|
||
if (parser.token === 1077936157) {
|
||
const token = scanJSXAttributeValue(parser, context);
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
switch (token) {
|
||
case 134283267:
|
||
value = parseLiteral(parser, context);
|
||
break;
|
||
case 8456258:
|
||
value = parseJSXRootElementOrFragment(parser, context, 1, tokenPos, linePos, colPos);
|
||
break;
|
||
case 2162700:
|
||
value = parseJSXExpressionContainer(parser, context, 1, 1, tokenPos, linePos, colPos);
|
||
break;
|
||
default:
|
||
report(parser, 149);
|
||
}
|
||
}
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXAttribute",
|
||
value,
|
||
name: name42
|
||
});
|
||
}
|
||
function parseJSXNamespacedName(parser, context, namespace, start, line, column) {
|
||
consume(parser, context, 21);
|
||
const name42 = parseJSXIdentifier(parser, context, parser.tokenPos, parser.linePos, parser.colPos);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXNamespacedName",
|
||
namespace,
|
||
name: name42
|
||
});
|
||
}
|
||
function parseJSXExpressionContainer(parser, context, inJSXChild, isAttr, start, line, column) {
|
||
nextToken(parser, context | 32768);
|
||
const { tokenPos, linePos, colPos } = parser;
|
||
if (parser.token === 14)
|
||
return parseJSXSpreadChild(parser, context, start, line, column);
|
||
let expression = null;
|
||
if (parser.token === 1074790415) {
|
||
if (isAttr)
|
||
report(parser, 152);
|
||
expression = parseJSXEmptyExpression(parser, context, parser.startPos, parser.startLine, parser.startColumn);
|
||
} else {
|
||
expression = parseExpression(parser, context, 1, 0, 0, tokenPos, linePos, colPos);
|
||
}
|
||
if (inJSXChild) {
|
||
consume(parser, context, 1074790415);
|
||
} else {
|
||
scanJSXToken(parser, context);
|
||
}
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXExpressionContainer",
|
||
expression
|
||
});
|
||
}
|
||
function parseJSXSpreadChild(parser, context, start, line, column) {
|
||
consume(parser, context, 14);
|
||
const expression = parseExpression(parser, context, 1, 0, 0, parser.tokenPos, parser.linePos, parser.colPos);
|
||
consume(parser, context, 1074790415);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXSpreadChild",
|
||
expression
|
||
});
|
||
}
|
||
function parseJSXEmptyExpression(parser, context, start, line, column) {
|
||
parser.startPos = parser.tokenPos;
|
||
parser.startLine = parser.linePos;
|
||
parser.startColumn = parser.colPos;
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXEmptyExpression"
|
||
});
|
||
}
|
||
function parseJSXIdentifier(parser, context, start, line, column) {
|
||
const { tokenValue } = parser;
|
||
nextToken(parser, context);
|
||
return finishNode(parser, context, start, line, column, {
|
||
type: "JSXIdentifier",
|
||
name: tokenValue
|
||
});
|
||
}
|
||
function parseScript(source, options) {
|
||
return parseSource(source, options, 0);
|
||
}
|
||
|
||
// src/rewrite/js.js
|
||
var import_esotope_hammerhead = __toESM(require_esotope(), 1);
|
||
var import_events3 = __toESM(require_events(), 1);
|
||
var JS = class extends import_events3.default {
|
||
constructor() {
|
||
super();
|
||
this.parseOptions = {
|
||
ranges: true,
|
||
module: true,
|
||
globalReturn: true
|
||
};
|
||
this.generationOptions = {
|
||
format: {
|
||
quotes: "double",
|
||
escapeless: true,
|
||
compact: true
|
||
}
|
||
};
|
||
this.parse = parseScript;
|
||
this.generate = import_esotope_hammerhead.generate;
|
||
}
|
||
rewrite(str, data = {}) {
|
||
return this.recast(str, data, "rewrite");
|
||
}
|
||
source(str, data = {}) {
|
||
return this.recast(str, data, "source");
|
||
}
|
||
recast(str, data = {}, type = "") {
|
||
try {
|
||
const output = [];
|
||
const ast = this.parse(str, this.parseOptions);
|
||
const meta = {
|
||
data,
|
||
changes: [],
|
||
input: str,
|
||
ast,
|
||
get slice() {
|
||
return slice;
|
||
}
|
||
};
|
||
let slice = 0;
|
||
this.iterate(ast, (node, parent = null) => {
|
||
if (parent && parent.inTransformer)
|
||
node.isTransformer = true;
|
||
node.parent = parent;
|
||
this.emit(node.type, node, meta, type);
|
||
});
|
||
meta.changes.sort((a, b) => a.start - b.start || a.end - b.end);
|
||
for (const change of meta.changes) {
|
||
if ("start" in change && typeof change.start === "number")
|
||
output.push(str.slice(slice, change.start));
|
||
if (change.node)
|
||
output.push(
|
||
typeof change.node === "string" ? change.node : (0, import_esotope_hammerhead.generate)(change.node, this.generationOptions)
|
||
);
|
||
if ("end" in change && typeof change.end === "number")
|
||
slice = change.end;
|
||
}
|
||
output.push(str.slice(slice));
|
||
return output.join("");
|
||
} catch (e) {
|
||
return str;
|
||
}
|
||
}
|
||
iterate(ast, handler) {
|
||
if (typeof ast != "object" || !handler)
|
||
return;
|
||
walk3(ast, null, handler);
|
||
function walk3(node, parent, handler2) {
|
||
if (typeof node != "object" || !handler2)
|
||
return;
|
||
handler2(node, parent, handler2);
|
||
for (const child in node) {
|
||
if (child === "parent")
|
||
continue;
|
||
if (Array.isArray(node[child])) {
|
||
node[child].forEach((entry) => {
|
||
if (entry)
|
||
walk3(entry, node, handler2);
|
||
});
|
||
} else {
|
||
if (node[child])
|
||
walk3(node[child], node, handler2);
|
||
}
|
||
}
|
||
if (typeof node.iterateEnd === "function")
|
||
node.iterateEnd();
|
||
}
|
||
}
|
||
};
|
||
var js_default = JS;
|
||
|
||
// src/rewrite/index.js
|
||
var import_set_cookie_parser2 = __toESM(require_set_cookie(), 1);
|
||
|
||
// src/rewrite/codecs.js
|
||
var xor = {
|
||
encode(str) {
|
||
if (!str)
|
||
return str;
|
||
return encodeURIComponent(
|
||
str.toString().split("").map(
|
||
(char, ind) => ind % 2 ? String.fromCharCode(char.charCodeAt() ^ 2) : char
|
||
).join("")
|
||
);
|
||
},
|
||
decode(str) {
|
||
if (!str)
|
||
return str;
|
||
let [input, ...search] = str.split("?");
|
||
return decodeURIComponent(input).split("").map(
|
||
(char, ind) => ind % 2 ? String.fromCharCode(char.charCodeAt(0) ^ 2) : char
|
||
).join("") + (search.length ? "?" + search.join("?") : "");
|
||
}
|
||
};
|
||
var plain = {
|
||
encode(str) {
|
||
if (!str)
|
||
return str;
|
||
return encodeURIComponent(str);
|
||
},
|
||
decode(str) {
|
||
if (!str)
|
||
return str;
|
||
return decodeURIComponent(str);
|
||
}
|
||
};
|
||
var base64 = {
|
||
encode(str) {
|
||
if (!str)
|
||
return str;
|
||
str = str.toString();
|
||
const b64chs = Array.from(
|
||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
||
);
|
||
let u32;
|
||
let c0;
|
||
let c1;
|
||
let c2;
|
||
let asc = "";
|
||
let pad = str.length % 3;
|
||
for (let i = 0; i < str.length; ) {
|
||
if ((c0 = str.charCodeAt(i++)) > 255 || (c1 = str.charCodeAt(i++)) > 255 || (c2 = str.charCodeAt(i++)) > 255)
|
||
throw new TypeError("invalid character found");
|
||
u32 = c0 << 16 | c1 << 8 | c2;
|
||
asc += b64chs[u32 >> 18 & 63] + b64chs[u32 >> 12 & 63] + b64chs[u32 >> 6 & 63] + b64chs[u32 & 63];
|
||
}
|
||
return encodeURIComponent(
|
||
pad ? asc.slice(0, pad - 3) + "===".substr(pad) : asc
|
||
);
|
||
},
|
||
decode(str) {
|
||
if (!str)
|
||
return str;
|
||
str = decodeURIComponent(str.toString());
|
||
const b64tab = {
|
||
0: 52,
|
||
1: 53,
|
||
2: 54,
|
||
3: 55,
|
||
4: 56,
|
||
5: 57,
|
||
6: 58,
|
||
7: 59,
|
||
8: 60,
|
||
9: 61,
|
||
A: 0,
|
||
B: 1,
|
||
C: 2,
|
||
D: 3,
|
||
E: 4,
|
||
F: 5,
|
||
G: 6,
|
||
H: 7,
|
||
I: 8,
|
||
J: 9,
|
||
K: 10,
|
||
L: 11,
|
||
M: 12,
|
||
N: 13,
|
||
O: 14,
|
||
P: 15,
|
||
Q: 16,
|
||
R: 17,
|
||
S: 18,
|
||
T: 19,
|
||
U: 20,
|
||
V: 21,
|
||
W: 22,
|
||
X: 23,
|
||
Y: 24,
|
||
Z: 25,
|
||
a: 26,
|
||
b: 27,
|
||
c: 28,
|
||
d: 29,
|
||
e: 30,
|
||
f: 31,
|
||
g: 32,
|
||
h: 33,
|
||
i: 34,
|
||
j: 35,
|
||
k: 36,
|
||
l: 37,
|
||
m: 38,
|
||
n: 39,
|
||
o: 40,
|
||
p: 41,
|
||
q: 42,
|
||
r: 43,
|
||
s: 44,
|
||
t: 45,
|
||
u: 46,
|
||
v: 47,
|
||
w: 48,
|
||
x: 49,
|
||
y: 50,
|
||
z: 51,
|
||
"+": 62,
|
||
"/": 63,
|
||
"=": 64
|
||
};
|
||
str = str.replace(/\s+/g, "");
|
||
str += "==".slice(2 - (str.length & 3));
|
||
let u24;
|
||
let bin = "";
|
||
let r1;
|
||
let r2;
|
||
for (let i = 0; i < str.length; ) {
|
||
u24 = b64tab[str.charAt(i++)] << 18 | b64tab[str.charAt(i++)] << 12 | (r1 = b64tab[str.charAt(i++)]) << 6 | (r2 = b64tab[str.charAt(i++)]);
|
||
bin += r1 === 64 ? String.fromCharCode(u24 >> 16 & 255) : r2 === 64 ? String.fromCharCode(u24 >> 16 & 255, u24 >> 8 & 255) : String.fromCharCode(
|
||
u24 >> 16 & 255,
|
||
u24 >> 8 & 255,
|
||
u24 & 255
|
||
);
|
||
}
|
||
return bin;
|
||
}
|
||
};
|
||
|
||
// src/rewrite/mime.js
|
||
var mime_exports = {};
|
||
__export(mime_exports, {
|
||
charset: () => charset,
|
||
charsets: () => charsets,
|
||
contentType: () => contentType,
|
||
extension: () => extension,
|
||
lookup: () => lookup
|
||
});
|
||
var import_mime_db = __toESM(require_mime_db(), 1);
|
||
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
|
||
var TEXT_TYPE_REGEXP = /^text\//i;
|
||
var extensions = /* @__PURE__ */ Object.create(null);
|
||
var types = /* @__PURE__ */ Object.create(null);
|
||
var charsets = { lookup: charset };
|
||
populateMaps(extensions, types);
|
||
function charset(type) {
|
||
if (!type || typeof type !== "string") {
|
||
return false;
|
||
}
|
||
const match = EXTRACT_TYPE_REGEXP.exec(type);
|
||
const mime = match && import_mime_db.default[match[1].toLowerCase()];
|
||
if (mime && mime.charset) {
|
||
return mime.charset;
|
||
}
|
||
if (match && TEXT_TYPE_REGEXP.test(match[1])) {
|
||
return "UTF-8";
|
||
}
|
||
return false;
|
||
}
|
||
function contentType(str) {
|
||
if (!str || typeof str !== "string") {
|
||
return false;
|
||
}
|
||
let mime = str.indexOf("/") === -1 ? lookup(str) : str;
|
||
if (!mime) {
|
||
return false;
|
||
}
|
||
if (mime.indexOf("charset") === -1) {
|
||
const detected = charset(mime);
|
||
if (detected)
|
||
mime += "; charset=" + detected.toLowerCase();
|
||
}
|
||
return mime;
|
||
}
|
||
function extension(type) {
|
||
if (!type || typeof type !== "string") {
|
||
return false;
|
||
}
|
||
const match = EXTRACT_TYPE_REGEXP.exec(type);
|
||
const exts = match && extensions[match[1].toLowerCase()];
|
||
if (!exts || !exts.length) {
|
||
return false;
|
||
}
|
||
return exts[0];
|
||
}
|
||
function lookup(path) {
|
||
if (!path || typeof path !== "string") {
|
||
return false;
|
||
}
|
||
const extension2 = extname("x." + path).toLowerCase().slice(1);
|
||
if (!extension2) {
|
||
return false;
|
||
}
|
||
return types[extension2] || false;
|
||
}
|
||
function populateMaps(extensions2, types2) {
|
||
const preference = ["nginx", "apache", void 0, "iana"];
|
||
for (const type in import_mime_db.default) {
|
||
const mime = import_mime_db.default[type];
|
||
const exts = mime.extensions;
|
||
if (!exts || !exts.length) {
|
||
return;
|
||
}
|
||
extensions2[type] = exts;
|
||
for (let i = 0; i < exts.length; i++) {
|
||
const extension2 = exts[i];
|
||
if (types2[extension2]) {
|
||
const from = preference.indexOf(import_mime_db.default[types2[extension2]].source);
|
||
const to = preference.indexOf(mime.source);
|
||
if (types2[extension2] !== "application/octet-stream" && (from > to || from === to && types2[extension2].substr(0, 12) === "application/")) {
|
||
continue;
|
||
}
|
||
}
|
||
types2[extension2] = type;
|
||
}
|
||
}
|
||
}
|
||
function extname(path = "") {
|
||
if (!path.includes("."))
|
||
return "";
|
||
const map = path.split(".");
|
||
return "." + map[map.length - 1];
|
||
}
|
||
|
||
// src/rewrite/cookie.js
|
||
var import_set_cookie_parser = __toESM(require_set_cookie(), 1);
|
||
function validateCookie(cookie, meta, js = false) {
|
||
if (cookie.httpOnly && !!js)
|
||
return false;
|
||
if (cookie.domain.startsWith(".")) {
|
||
if (!meta.url.hostname.endsWith(cookie.domain.slice(1)))
|
||
return false;
|
||
return true;
|
||
}
|
||
if (cookie.domain !== meta.url.hostname)
|
||
return false;
|
||
if (cookie.secure && meta.url.protocol === "http:")
|
||
return false;
|
||
if (!meta.url.pathname.startsWith(cookie.path))
|
||
return false;
|
||
return true;
|
||
}
|
||
async function db2(openDB2) {
|
||
const db3 = await openDB2("__op", 1, {
|
||
upgrade(db4) {
|
||
const store = db4.createObjectStore("cookies", {
|
||
keyPath: "id"
|
||
});
|
||
store.createIndex("path", "path");
|
||
}
|
||
});
|
||
db3.transaction(["cookies"], "readwrite").store.index("path");
|
||
return db3;
|
||
}
|
||
function serialize2(cookies = [], meta, js) {
|
||
let str = "";
|
||
for (const cookie of cookies) {
|
||
if (!validateCookie(cookie, meta, js))
|
||
continue;
|
||
if (str.length)
|
||
str += "; ";
|
||
str += cookie.name;
|
||
str += "=";
|
||
str += cookie.value;
|
||
}
|
||
return str;
|
||
}
|
||
async function getCookies(db3) {
|
||
const now = /* @__PURE__ */ new Date();
|
||
return (await db3.getAll("cookies")).filter((cookie) => {
|
||
let expired = false;
|
||
if (cookie.set) {
|
||
if (cookie.maxAge) {
|
||
expired = cookie.set.getTime() + cookie.maxAge * 1e3 < now;
|
||
} else if (cookie.expires) {
|
||
expired = new Date(cookie.expires.toLocaleString()) < now;
|
||
}
|
||
}
|
||
if (expired) {
|
||
db3.delete("cookies", cookie.id);
|
||
return false;
|
||
}
|
||
return true;
|
||
});
|
||
}
|
||
function setCookies(data, db3, meta) {
|
||
if (!db3)
|
||
return false;
|
||
const cookies = (0, import_set_cookie_parser.default)(data, {
|
||
decodeValues: false
|
||
});
|
||
for (const cookie of cookies) {
|
||
if (!cookie.domain)
|
||
cookie.domain = "." + meta.url.hostname;
|
||
if (!cookie.path)
|
||
cookie.path = "/";
|
||
if (!cookie.domain.startsWith(".")) {
|
||
cookie.domain = "." + cookie.domain;
|
||
}
|
||
db3.put("cookies", {
|
||
...cookie,
|
||
id: `${cookie.domain}@${cookie.path}@${cookie.name}`,
|
||
set: new Date(Date.now())
|
||
});
|
||
}
|
||
return true;
|
||
}
|
||
|
||
// src/rewrite/rewrite.html.js
|
||
function attributes(ctx, meta = ctx.meta) {
|
||
const { html, js, attributePrefix } = ctx;
|
||
const origPrefix = attributePrefix + "-attr-";
|
||
html.on("attr", (attr, type) => {
|
||
if (attr.node.tagName === "base" && attr.name === "href" && attr.options.document) {
|
||
meta.base = new URL(attr.value, meta.url);
|
||
}
|
||
if (type === "rewrite" && isUrl(attr.name, attr.tagName)) {
|
||
attr.node.setAttribute(origPrefix + attr.name, attr.value);
|
||
attr.value = ctx.rewriteUrl(attr.value, meta);
|
||
}
|
||
if (type === "rewrite" && isSrcset(attr.name)) {
|
||
attr.node.setAttribute(origPrefix + attr.name, attr.value);
|
||
attr.value = html.wrapSrcset(attr.value, meta);
|
||
}
|
||
if (type === "rewrite" && isHtml(attr.name)) {
|
||
attr.node.setAttribute(origPrefix + attr.name, attr.value);
|
||
attr.value = html.rewrite(attr.value, {
|
||
...meta,
|
||
document: true,
|
||
injectHead: attr.options.injectHead || []
|
||
});
|
||
}
|
||
if (type === "rewrite" && isStyle(attr.name)) {
|
||
attr.node.setAttribute(origPrefix + attr.name, attr.value);
|
||
attr.value = ctx.rewriteCSS(attr.value, {
|
||
context: "declarationList"
|
||
});
|
||
}
|
||
if (type === "rewrite" && isForbidden(attr.name)) {
|
||
attr.name = origPrefix + attr.name;
|
||
}
|
||
if (type === "rewrite" && isEvent(attr.name)) {
|
||
attr.node.setAttribute(origPrefix + attr.name, attr.value);
|
||
attr.value = js.rewrite(attr.value, meta);
|
||
}
|
||
if (type === "source" && attr.name.startsWith(origPrefix)) {
|
||
if (attr.node.hasAttribute(attr.name.slice(origPrefix.length)))
|
||
attr.node.removeAttribute(attr.name.slice(origPrefix.length));
|
||
attr.name = attr.name.slice(origPrefix.length);
|
||
}
|
||
});
|
||
}
|
||
function text(ctx) {
|
||
const { html, js, css } = ctx;
|
||
html.on("text", (text2, type) => {
|
||
if (text2.element.tagName === "script") {
|
||
text2.value = type === "rewrite" ? js.rewrite(text2.value) : js.source(text2.value);
|
||
}
|
||
if (text2.element.tagName === "style") {
|
||
text2.value = type === "rewrite" ? css.rewrite(text2.value) : css.source(text2.value);
|
||
}
|
||
});
|
||
return true;
|
||
}
|
||
function isUrl(name42, tag) {
|
||
return tag === "object" && name42 === "data" || [
|
||
"src",
|
||
"href",
|
||
"ping",
|
||
"movie",
|
||
"action",
|
||
"poster",
|
||
"profile",
|
||
"background"
|
||
].indexOf(name42) > -1;
|
||
}
|
||
function isEvent(name42) {
|
||
return [
|
||
"onafterprint",
|
||
"onbeforeprint",
|
||
"onbeforeunload",
|
||
"onerror",
|
||
"onhashchange",
|
||
"onload",
|
||
"onmessage",
|
||
"onoffline",
|
||
"ononline",
|
||
"onpagehide",
|
||
"onpopstate",
|
||
"onstorage",
|
||
"onunload",
|
||
"onblur",
|
||
"onchange",
|
||
"oncontextmenu",
|
||
"onfocus",
|
||
"oninput",
|
||
"oninvalid",
|
||
"onreset",
|
||
"onsearch",
|
||
"onselect",
|
||
"onsubmit",
|
||
"onkeydown",
|
||
"onkeypress",
|
||
"onkeyup",
|
||
"onclick",
|
||
"ondblclick",
|
||
"onmousedown",
|
||
"onmousemove",
|
||
"onmouseout",
|
||
"onmouseover",
|
||
"onmouseup",
|
||
"onmousewheel",
|
||
"onwheel",
|
||
"ondrag",
|
||
"ondragend",
|
||
"ondragenter",
|
||
"ondragleave",
|
||
"ondragover",
|
||
"ondragstart",
|
||
"ondrop",
|
||
"onscroll",
|
||
"oncopy",
|
||
"oncut",
|
||
"onpaste",
|
||
"onabort",
|
||
"oncanplay",
|
||
"oncanplaythrough",
|
||
"oncuechange",
|
||
"ondurationchange",
|
||
"onemptied",
|
||
"onended",
|
||
"onerror",
|
||
"onloadeddata",
|
||
"onloadedmetadata",
|
||
"onloadstart",
|
||
"onpause",
|
||
"onplay",
|
||
"onplaying",
|
||
"onprogress",
|
||
"onratechange",
|
||
"onseeked",
|
||
"onseeking",
|
||
"onstalled",
|
||
"onsuspend",
|
||
"ontimeupdate",
|
||
"onvolumechange",
|
||
"onwaiting"
|
||
].indexOf(name42) > -1;
|
||
}
|
||
function injectHead(ctx) {
|
||
const { html } = ctx;
|
||
html.on("element", (element, type) => {
|
||
if (type !== "rewrite")
|
||
return false;
|
||
if (element.tagName !== "head")
|
||
return false;
|
||
if (!("injectHead" in element.options))
|
||
return false;
|
||
element.childNodes.unshift(...element.options.injectHead);
|
||
});
|
||
}
|
||
function createJsInject(bareURL = "", bareData = {}, cookies = "", referrer = "") {
|
||
return `self.__uv$bareData = ${JSON.stringify(bareData)};self.__uv$cookies = ${JSON.stringify(cookies)};self.__uv$referrer = ${JSON.stringify(referrer)};self.__uv$bareURL = ${JSON.stringify(bareURL)}; `;
|
||
}
|
||
function createHtmlInject(handlerScript, bundleScript, clientScript, configScript, bareURL, bareData, cookies, referrer) {
|
||
return [
|
||
{
|
||
tagName: "script",
|
||
nodeName: "script",
|
||
childNodes: [
|
||
{
|
||
nodeName: "#text",
|
||
value: createJsInject(bareURL, bareData, cookies, referrer)
|
||
}
|
||
],
|
||
attrs: [
|
||
{
|
||
name: "__uv-script",
|
||
value: "1",
|
||
skip: true
|
||
}
|
||
],
|
||
skip: true
|
||
},
|
||
{
|
||
tagName: "script",
|
||
nodeName: "script",
|
||
childNodes: [],
|
||
attrs: [
|
||
{ name: "src", value: bundleScript, skip: true },
|
||
{
|
||
name: "__uv-script",
|
||
value: "1",
|
||
skip: true
|
||
}
|
||
]
|
||
},
|
||
{
|
||
tagName: "script",
|
||
nodeName: "script",
|
||
childNodes: [],
|
||
attrs: [
|
||
{ name: "src", value: clientScript, skip: true },
|
||
{
|
||
name: "__uv-script",
|
||
value: "1",
|
||
skip: true
|
||
}
|
||
]
|
||
},
|
||
{
|
||
tagName: "script",
|
||
nodeName: "script",
|
||
childNodes: [],
|
||
attrs: [
|
||
{ name: "src", value: configScript, skip: true },
|
||
{
|
||
name: "__uv-script",
|
||
value: "1",
|
||
skip: true
|
||
}
|
||
]
|
||
},
|
||
{
|
||
tagName: "script",
|
||
nodeName: "script",
|
||
childNodes: [],
|
||
attrs: [
|
||
{ name: "src", value: handlerScript, skip: true },
|
||
{
|
||
name: "__uv-script",
|
||
value: "1",
|
||
skip: true
|
||
}
|
||
]
|
||
}
|
||
];
|
||
}
|
||
function isForbidden(name42) {
|
||
return ["http-equiv", "integrity", "sandbox", "nonce", "crossorigin"].indexOf(
|
||
name42
|
||
) > -1;
|
||
}
|
||
function isHtml(name42) {
|
||
return name42 === "srcdoc";
|
||
}
|
||
function isStyle(name42) {
|
||
return name42 === "style";
|
||
}
|
||
function isSrcset(name42) {
|
||
return name42 === "srcset" || name42 === "imagesrcset";
|
||
}
|
||
|
||
// src/rewrite/rewrite.css.js
|
||
function url(ctx) {
|
||
const { css } = ctx;
|
||
css.on("Url", (node, data, type) => {
|
||
node.value = type === "rewrite" ? ctx.rewriteUrl(node.value) : ctx.sourceUrl(node.value);
|
||
});
|
||
}
|
||
function importStyle(ctx) {
|
||
const { css } = ctx;
|
||
css.on("Atrule", (node, data, type) => {
|
||
if (node.name !== "import")
|
||
return false;
|
||
const { data: url2 } = node.prelude.children.head;
|
||
if (url2.type === "Url")
|
||
return false;
|
||
url2.value = type === "rewrite" ? ctx.rewriteUrl(url2.value) : ctx.sourceUrl(url2.value);
|
||
});
|
||
}
|
||
|
||
// src/rewrite/rewrite.script.js
|
||
var import_esotope_hammerhead2 = __toESM(require_esotope(), 1);
|
||
function property2(ctx) {
|
||
const { js } = ctx;
|
||
js.on("MemberExpression", (node, data, type) => {
|
||
if (node.object.type === "Super")
|
||
return false;
|
||
if (type === "rewrite" && computedProperty(node)) {
|
||
data.changes.push({
|
||
node: "__uv.$wrap((",
|
||
start: node.property.start,
|
||
end: node.property.start
|
||
});
|
||
node.iterateEnd = function() {
|
||
data.changes.push({
|
||
node: "))",
|
||
start: node.property.end,
|
||
end: node.property.end
|
||
});
|
||
};
|
||
}
|
||
if (!node.computed && node.property.name === "location" && type === "rewrite" || node.property.name === "__uv$location" && type === "source") {
|
||
data.changes.push({
|
||
start: node.property.start,
|
||
end: node.property.end,
|
||
node: type === "rewrite" ? "__uv$setSource(__uv).__uv$location" : "location"
|
||
});
|
||
}
|
||
if (!node.computed && node.property.name === "top" && type === "rewrite" || node.property.name === "__uv$top" && type === "source") {
|
||
data.changes.push({
|
||
start: node.property.start,
|
||
end: node.property.end,
|
||
node: type === "rewrite" ? "__uv$setSource(__uv).__uv$top" : "top"
|
||
});
|
||
}
|
||
if (!node.computed && node.property.name === "parent" && type === "rewrite" || node.property.name === "__uv$parent" && type === "source") {
|
||
data.changes.push({
|
||
start: node.property.start,
|
||
end: node.property.end,
|
||
node: type === "rewrite" ? "__uv$setSource(__uv).__uv$parent" : "parent"
|
||
});
|
||
}
|
||
if (!node.computed && node.property.name === "postMessage" && type === "rewrite") {
|
||
data.changes.push({
|
||
start: node.property.start,
|
||
end: node.property.end,
|
||
node: "__uv$setSource(__uv).postMessage"
|
||
});
|
||
}
|
||
if (!node.computed && node.property.name === "eval" && type === "rewrite" || node.property.name === "__uv$eval" && type === "source") {
|
||
data.changes.push({
|
||
start: node.property.start,
|
||
end: node.property.end,
|
||
node: type === "rewrite" ? "__uv$setSource(__uv).__uv$eval" : "eval"
|
||
});
|
||
}
|
||
if (!node.computed && node.property.name === "__uv$setSource" && type === "source" && node.parent.type === import_esotope_hammerhead2.Syntax.CallExpression) {
|
||
const { parent, property: property3 } = node;
|
||
data.changes.push({
|
||
start: property3.start - 1,
|
||
end: parent.end
|
||
});
|
||
node.iterateEnd = function() {
|
||
data.changes.push({
|
||
start: property3.start,
|
||
end: parent.end
|
||
});
|
||
};
|
||
}
|
||
});
|
||
}
|
||
function identifier(ctx) {
|
||
const { js } = ctx;
|
||
js.on("Identifier", (node, data, type) => {
|
||
if (type !== "rewrite")
|
||
return false;
|
||
const { parent } = node;
|
||
if (!["location", "eval", "parent", "top"].includes(node.name))
|
||
return false;
|
||
if (parent.type === import_esotope_hammerhead2.Syntax.VariableDeclarator && parent.id === node)
|
||
return false;
|
||
if ((parent.type === import_esotope_hammerhead2.Syntax.AssignmentExpression || parent.type === import_esotope_hammerhead2.Syntax.AssignmentPattern) && parent.left === node)
|
||
return false;
|
||
if ((parent.type === import_esotope_hammerhead2.Syntax.FunctionExpression || parent.type === import_esotope_hammerhead2.Syntax.FunctionDeclaration) && parent.id === node)
|
||
return false;
|
||
if (parent.type === import_esotope_hammerhead2.Syntax.MemberExpression && parent.property === node && !parent.computed)
|
||
return false;
|
||
if (node.name === "eval" && parent.type === import_esotope_hammerhead2.Syntax.CallExpression && parent.callee === node)
|
||
return false;
|
||
if (parent.type === import_esotope_hammerhead2.Syntax.Property && parent.key === node)
|
||
return false;
|
||
if (parent.type === import_esotope_hammerhead2.Syntax.Property && parent.value === node && parent.shorthand)
|
||
return false;
|
||
if (parent.type === import_esotope_hammerhead2.Syntax.UpdateExpression && (parent.operator === "++" || parent.operator === "--"))
|
||
return false;
|
||
if ((parent.type === import_esotope_hammerhead2.Syntax.FunctionExpression || parent.type === import_esotope_hammerhead2.Syntax.FunctionDeclaration || parent.type === import_esotope_hammerhead2.Syntax.ArrowFunctionExpression) && parent.params.indexOf(node) !== -1)
|
||
return false;
|
||
if (parent.type === import_esotope_hammerhead2.Syntax.MethodDefinition)
|
||
return false;
|
||
if (parent.type === import_esotope_hammerhead2.Syntax.ClassDeclaration)
|
||
return false;
|
||
if (parent.type === import_esotope_hammerhead2.Syntax.RestElement)
|
||
return false;
|
||
if (parent.type === import_esotope_hammerhead2.Syntax.ExportSpecifier)
|
||
return false;
|
||
if (parent.type === import_esotope_hammerhead2.Syntax.ImportSpecifier)
|
||
return false;
|
||
data.changes.push({
|
||
start: node.start,
|
||
end: node.end,
|
||
node: "__uv.$get(" + node.name + ")"
|
||
});
|
||
});
|
||
}
|
||
function wrapEval(ctx) {
|
||
const { js } = ctx;
|
||
js.on("CallExpression", (node, data, type) => {
|
||
if (type !== "rewrite")
|
||
return false;
|
||
if (!node.arguments.length)
|
||
return false;
|
||
if (node.callee.type !== "Identifier")
|
||
return false;
|
||
if (node.callee.name !== "eval")
|
||
return false;
|
||
const [script] = node.arguments;
|
||
data.changes.push({
|
||
node: "__uv.js.rewrite(",
|
||
start: script.start,
|
||
end: script.start
|
||
});
|
||
node.iterateEnd = function() {
|
||
data.changes.push({
|
||
node: ")",
|
||
start: script.end,
|
||
end: script.end
|
||
});
|
||
};
|
||
});
|
||
}
|
||
function importDeclaration(ctx) {
|
||
const { js } = ctx;
|
||
js.on(import_esotope_hammerhead2.Syntax.Literal, (node, data, type) => {
|
||
if (!((node.parent.type === import_esotope_hammerhead2.Syntax.ImportDeclaration || node.parent.type === import_esotope_hammerhead2.Syntax.ExportAllDeclaration || node.parent.type === import_esotope_hammerhead2.Syntax.ExportNamedDeclaration) && node.parent.source === node))
|
||
return false;
|
||
data.changes.push({
|
||
start: node.start + 1,
|
||
end: node.end - 1,
|
||
node: type === "rewrite" ? ctx.rewriteUrl(node.value) : ctx.sourceUrl(node.value)
|
||
});
|
||
});
|
||
}
|
||
function dynamicImport(ctx) {
|
||
const { js } = ctx;
|
||
js.on(import_esotope_hammerhead2.Syntax.ImportExpression, (node, data, type) => {
|
||
if (type !== "rewrite")
|
||
return false;
|
||
data.changes.push({
|
||
// pass script URL to dynamicImport
|
||
// import() is always relative to script URL
|
||
node: `__uv.rewriteImport(${JSON.stringify(ctx.meta.url)},`,
|
||
start: node.source.start,
|
||
end: node.source.start
|
||
});
|
||
node.iterateEnd = function() {
|
||
data.changes.push({
|
||
node: ")",
|
||
start: node.source.end,
|
||
end: node.source.end
|
||
});
|
||
};
|
||
});
|
||
}
|
||
function unwrap(ctx) {
|
||
const { js } = ctx;
|
||
js.on("CallExpression", (node, data, type) => {
|
||
if (type !== "source")
|
||
return false;
|
||
if (!isWrapped(node.callee))
|
||
return false;
|
||
switch (node.callee.property.name) {
|
||
case "$wrap":
|
||
{
|
||
if (!node.arguments || node.parent.type !== import_esotope_hammerhead2.Syntax.MemberExpression || node.parent.property !== node)
|
||
return false;
|
||
const [property3] = node.arguments;
|
||
data.changes.push({
|
||
start: node.callee.start,
|
||
end: property3.start
|
||
});
|
||
node.iterateEnd = function() {
|
||
data.changes.push({
|
||
start: node.end - 2,
|
||
end: node.end
|
||
});
|
||
};
|
||
}
|
||
break;
|
||
case "$get":
|
||
case "rewriteUrl":
|
||
{
|
||
const [arg] = node.arguments;
|
||
data.changes.push({
|
||
start: node.callee.start,
|
||
end: arg.start
|
||
});
|
||
node.iterateEnd = function() {
|
||
data.changes.push({
|
||
start: node.end - 1,
|
||
end: node.end
|
||
});
|
||
};
|
||
}
|
||
break;
|
||
case "rewrite":
|
||
{
|
||
const [script] = node.arguments;
|
||
data.changes.push({
|
||
start: node.callee.start,
|
||
end: script.start
|
||
});
|
||
node.iterateEnd = function() {
|
||
data.changes.push({
|
||
start: node.end - 1,
|
||
end: node.end
|
||
});
|
||
};
|
||
}
|
||
break;
|
||
}
|
||
});
|
||
}
|
||
function isWrapped(node) {
|
||
if (node.type !== import_esotope_hammerhead2.Syntax.MemberExpression)
|
||
return false;
|
||
if (node.property.name === "rewrite" && isWrapped(node.object))
|
||
return true;
|
||
if (node.object.type !== import_esotope_hammerhead2.Syntax.Identifier || node.object.name !== "__uv")
|
||
return false;
|
||
if (!["js", "$get", "$wrap", "rewriteUrl"].includes(node.property.name))
|
||
return false;
|
||
return true;
|
||
}
|
||
function computedProperty(parent) {
|
||
if (!parent.computed)
|
||
return false;
|
||
const { property: node } = parent;
|
||
if (node.type === "Literal" && !["location", "top", "parent"])
|
||
return false;
|
||
return true;
|
||
}
|
||
|
||
// node_modules/idb/build/wrap-idb-value.js
|
||
var instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);
|
||
var idbProxyableTypes;
|
||
var cursorAdvanceMethods;
|
||
function getIdbProxyableTypes() {
|
||
return idbProxyableTypes || (idbProxyableTypes = [
|
||
IDBDatabase,
|
||
IDBObjectStore,
|
||
IDBIndex,
|
||
IDBCursor,
|
||
IDBTransaction
|
||
]);
|
||
}
|
||
function getCursorAdvanceMethods() {
|
||
return cursorAdvanceMethods || (cursorAdvanceMethods = [
|
||
IDBCursor.prototype.advance,
|
||
IDBCursor.prototype.continue,
|
||
IDBCursor.prototype.continuePrimaryKey
|
||
]);
|
||
}
|
||
var cursorRequestMap = /* @__PURE__ */ new WeakMap();
|
||
var transactionDoneMap = /* @__PURE__ */ new WeakMap();
|
||
var transactionStoreNamesMap = /* @__PURE__ */ new WeakMap();
|
||
var transformCache = /* @__PURE__ */ new WeakMap();
|
||
var reverseTransformCache = /* @__PURE__ */ new WeakMap();
|
||
function promisifyRequest(request) {
|
||
const promise = new Promise((resolve, reject) => {
|
||
const unlisten = () => {
|
||
request.removeEventListener("success", success);
|
||
request.removeEventListener("error", error);
|
||
};
|
||
const success = () => {
|
||
resolve(wrap(request.result));
|
||
unlisten();
|
||
};
|
||
const error = () => {
|
||
reject(request.error);
|
||
unlisten();
|
||
};
|
||
request.addEventListener("success", success);
|
||
request.addEventListener("error", error);
|
||
});
|
||
promise.then((value) => {
|
||
if (value instanceof IDBCursor) {
|
||
cursorRequestMap.set(value, request);
|
||
}
|
||
}).catch(() => {
|
||
});
|
||
reverseTransformCache.set(promise, request);
|
||
return promise;
|
||
}
|
||
function cacheDonePromiseForTransaction(tx) {
|
||
if (transactionDoneMap.has(tx))
|
||
return;
|
||
const done = new Promise((resolve, reject) => {
|
||
const unlisten = () => {
|
||
tx.removeEventListener("complete", complete);
|
||
tx.removeEventListener("error", error);
|
||
tx.removeEventListener("abort", error);
|
||
};
|
||
const complete = () => {
|
||
resolve();
|
||
unlisten();
|
||
};
|
||
const error = () => {
|
||
reject(tx.error || new DOMException("AbortError", "AbortError"));
|
||
unlisten();
|
||
};
|
||
tx.addEventListener("complete", complete);
|
||
tx.addEventListener("error", error);
|
||
tx.addEventListener("abort", error);
|
||
});
|
||
transactionDoneMap.set(tx, done);
|
||
}
|
||
var idbProxyTraps = {
|
||
get(target, prop, receiver) {
|
||
if (target instanceof IDBTransaction) {
|
||
if (prop === "done")
|
||
return transactionDoneMap.get(target);
|
||
if (prop === "objectStoreNames") {
|
||
return target.objectStoreNames || transactionStoreNamesMap.get(target);
|
||
}
|
||
if (prop === "store") {
|
||
return receiver.objectStoreNames[1] ? void 0 : receiver.objectStore(receiver.objectStoreNames[0]);
|
||
}
|
||
}
|
||
return wrap(target[prop]);
|
||
},
|
||
set(target, prop, value) {
|
||
target[prop] = value;
|
||
return true;
|
||
},
|
||
has(target, prop) {
|
||
if (target instanceof IDBTransaction && (prop === "done" || prop === "store")) {
|
||
return true;
|
||
}
|
||
return prop in target;
|
||
}
|
||
};
|
||
function replaceTraps(callback) {
|
||
idbProxyTraps = callback(idbProxyTraps);
|
||
}
|
||
function wrapFunction(func) {
|
||
if (func === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype)) {
|
||
return function(storeNames, ...args) {
|
||
const tx = func.call(unwrap2(this), storeNames, ...args);
|
||
transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);
|
||
return wrap(tx);
|
||
};
|
||
}
|
||
if (getCursorAdvanceMethods().includes(func)) {
|
||
return function(...args) {
|
||
func.apply(unwrap2(this), args);
|
||
return wrap(cursorRequestMap.get(this));
|
||
};
|
||
}
|
||
return function(...args) {
|
||
return wrap(func.apply(unwrap2(this), args));
|
||
};
|
||
}
|
||
function transformCachableValue(value) {
|
||
if (typeof value === "function")
|
||
return wrapFunction(value);
|
||
if (value instanceof IDBTransaction)
|
||
cacheDonePromiseForTransaction(value);
|
||
if (instanceOfAny(value, getIdbProxyableTypes()))
|
||
return new Proxy(value, idbProxyTraps);
|
||
return value;
|
||
}
|
||
function wrap(value) {
|
||
if (value instanceof IDBRequest)
|
||
return promisifyRequest(value);
|
||
if (transformCache.has(value))
|
||
return transformCache.get(value);
|
||
const newValue = transformCachableValue(value);
|
||
if (newValue !== value) {
|
||
transformCache.set(value, newValue);
|
||
reverseTransformCache.set(newValue, value);
|
||
}
|
||
return newValue;
|
||
}
|
||
var unwrap2 = (value) => reverseTransformCache.get(value);
|
||
|
||
// node_modules/idb/build/index.js
|
||
function openDB(name42, version, { blocked, upgrade, blocking, terminated } = {}) {
|
||
const request = indexedDB.open(name42, version);
|
||
const openPromise = wrap(request);
|
||
if (upgrade) {
|
||
request.addEventListener("upgradeneeded", (event) => {
|
||
upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);
|
||
});
|
||
}
|
||
if (blocked) {
|
||
request.addEventListener("blocked", (event) => blocked(
|
||
// Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
|
||
event.oldVersion,
|
||
event.newVersion,
|
||
event
|
||
));
|
||
}
|
||
openPromise.then((db3) => {
|
||
if (terminated)
|
||
db3.addEventListener("close", () => terminated());
|
||
if (blocking) {
|
||
db3.addEventListener("versionchange", (event) => blocking(event.oldVersion, event.newVersion, event));
|
||
}
|
||
}).catch(() => {
|
||
});
|
||
return openPromise;
|
||
}
|
||
var readMethods = ["get", "getKey", "getAll", "getAllKeys", "count"];
|
||
var writeMethods = ["put", "add", "delete", "clear"];
|
||
var cachedMethods = /* @__PURE__ */ new Map();
|
||
function getMethod(target, prop) {
|
||
if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop === "string")) {
|
||
return;
|
||
}
|
||
if (cachedMethods.get(prop))
|
||
return cachedMethods.get(prop);
|
||
const targetFuncName = prop.replace(/FromIndex$/, "");
|
||
const useIndex = prop !== targetFuncName;
|
||
const isWrite = writeMethods.includes(targetFuncName);
|
||
if (
|
||
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
|
||
!(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || readMethods.includes(targetFuncName))
|
||
) {
|
||
return;
|
||
}
|
||
const method = async function(storeName, ...args) {
|
||
const tx = this.transaction(storeName, isWrite ? "readwrite" : "readonly");
|
||
let target2 = tx.store;
|
||
if (useIndex)
|
||
target2 = target2.index(args.shift());
|
||
return (await Promise.all([
|
||
target2[targetFuncName](...args),
|
||
isWrite && tx.done
|
||
]))[0];
|
||
};
|
||
cachedMethods.set(prop, method);
|
||
return method;
|
||
}
|
||
replaceTraps((oldTraps) => ({
|
||
...oldTraps,
|
||
get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),
|
||
has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop)
|
||
}));
|
||
|
||
// node_modules/@tomphttp/bare-client/dist/index.js
|
||
var fetch = globalThis.fetch;
|
||
var WebSocket = globalThis.WebSocket;
|
||
var Request = globalThis.Request;
|
||
var Response = globalThis.Response;
|
||
var WebSocketFields = {
|
||
prototype: {
|
||
send: WebSocket.prototype.send
|
||
},
|
||
CLOSED: WebSocket.CLOSED,
|
||
CLOSING: WebSocket.CLOSING,
|
||
CONNECTING: WebSocket.CONNECTING,
|
||
OPEN: WebSocket.OPEN
|
||
};
|
||
var maxRedirects = 20;
|
||
var statusEmpty = [101, 204, 205, 304];
|
||
var statusRedirect = [301, 302, 303, 307, 308];
|
||
var BareError = class extends Error {
|
||
status;
|
||
body;
|
||
constructor(status, body) {
|
||
super(body.message || body.code);
|
||
this.status = status;
|
||
this.body = body;
|
||
}
|
||
};
|
||
var Client = class {
|
||
base;
|
||
/**
|
||
*
|
||
* @param version Version provided by extension
|
||
* @param server Bare Server URL provided by BareClient
|
||
*/
|
||
constructor(version, server) {
|
||
this.base = new URL(`./v${version}/`, server);
|
||
}
|
||
};
|
||
function safeAdd(x, y) {
|
||
const lsw = (x & 65535) + (y & 65535);
|
||
const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
||
return msw << 16 | lsw & 65535;
|
||
}
|
||
function bitRotateLeft(num, cnt) {
|
||
return num << cnt | num >>> 32 - cnt;
|
||
}
|
||
function md5cmn(q, a, b, x, s, t) {
|
||
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
|
||
}
|
||
function md5ff(a, b, c, d, x, s, t) {
|
||
return md5cmn(b & c | ~b & d, a, b, x, s, t);
|
||
}
|
||
function md5gg(a, b, c, d, x, s, t) {
|
||
return md5cmn(b & d | c & ~d, a, b, x, s, t);
|
||
}
|
||
function md5hh(a, b, c, d, x, s, t) {
|
||
return md5cmn(b ^ c ^ d, a, b, x, s, t);
|
||
}
|
||
function md5ii(a, b, c, d, x, s, t) {
|
||
return md5cmn(c ^ (b | ~d), a, b, x, s, t);
|
||
}
|
||
function binlMD5(x, len) {
|
||
x[len >> 5] |= 128 << len % 32;
|
||
x[(len + 64 >>> 9 << 4) + 14] = len;
|
||
let a = 1732584193;
|
||
let b = -271733879;
|
||
let c = -1732584194;
|
||
let d = 271733878;
|
||
for (let i = 0; i < x.length; i += 16) {
|
||
const olda = a;
|
||
const oldb = b;
|
||
const oldc = c;
|
||
const oldd = d;
|
||
a = md5ff(a, b, c, d, x[i], 7, -680876936);
|
||
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
|
||
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
|
||
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
|
||
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
|
||
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
|
||
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
|
||
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
|
||
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
|
||
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
|
||
c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
|
||
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
|
||
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
|
||
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
|
||
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
|
||
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
|
||
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
|
||
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
|
||
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
|
||
b = md5gg(b, c, d, a, x[i], 20, -373897302);
|
||
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
|
||
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
|
||
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
|
||
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
|
||
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
|
||
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
|
||
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
|
||
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
|
||
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
|
||
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
|
||
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
|
||
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
|
||
a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
|
||
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
|
||
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
|
||
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
|
||
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
|
||
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
|
||
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
|
||
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
|
||
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
|
||
d = md5hh(d, a, b, c, x[i], 11, -358537222);
|
||
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
|
||
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
|
||
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
|
||
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
|
||
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
|
||
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
|
||
a = md5ii(a, b, c, d, x[i], 6, -198630844);
|
||
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
|
||
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
|
||
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
|
||
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
|
||
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
|
||
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
|
||
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
|
||
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
|
||
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
|
||
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
|
||
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
|
||
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
|
||
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
|
||
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
|
||
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
|
||
a = safeAdd(a, olda);
|
||
b = safeAdd(b, oldb);
|
||
c = safeAdd(c, oldc);
|
||
d = safeAdd(d, oldd);
|
||
}
|
||
return [a, b, c, d];
|
||
}
|
||
function binl2rstr(input) {
|
||
let output = "";
|
||
const length32 = input.length * 32;
|
||
for (let i = 0; i < length32; i += 8) {
|
||
output += String.fromCharCode(input[i >> 5] >>> i % 32 & 255);
|
||
}
|
||
return output;
|
||
}
|
||
function rstr2binl(input) {
|
||
const output = [];
|
||
const outputLen = input.length >> 2;
|
||
for (let i = 0; i < outputLen; i += 1) {
|
||
output[i] = 0;
|
||
}
|
||
const length8 = input.length * 8;
|
||
for (let i = 0; i < length8; i += 8) {
|
||
output[i >> 5] |= (input.charCodeAt(i / 8) & 255) << i % 32;
|
||
}
|
||
return output;
|
||
}
|
||
function rstrMD5(s) {
|
||
return binl2rstr(binlMD5(rstr2binl(s), s.length * 8));
|
||
}
|
||
function rstrHMACMD5(key, data) {
|
||
let bkey = rstr2binl(key);
|
||
const ipad = [];
|
||
const opad = [];
|
||
if (bkey.length > 16) {
|
||
bkey = binlMD5(bkey, key.length * 8);
|
||
}
|
||
for (let i = 0; i < 16; i += 1) {
|
||
ipad[i] = bkey[i] ^ 909522486;
|
||
opad[i] = bkey[i] ^ 1549556828;
|
||
}
|
||
const hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
|
||
return binl2rstr(binlMD5(opad.concat(hash), 512 + 128));
|
||
}
|
||
function rstr2hex(input) {
|
||
const hexTab = "0123456789abcdef";
|
||
let output = "";
|
||
for (let i = 0; i < input.length; i += 1) {
|
||
const x = input.charCodeAt(i);
|
||
output += hexTab.charAt(x >>> 4 & 15) + hexTab.charAt(x & 15);
|
||
}
|
||
return output;
|
||
}
|
||
function str2rstrUTF8(input) {
|
||
return unescape(encodeURIComponent(input));
|
||
}
|
||
function rawMD5(s) {
|
||
return rstrMD5(str2rstrUTF8(s));
|
||
}
|
||
function hexMD5(s) {
|
||
return rstr2hex(rawMD5(s));
|
||
}
|
||
function rawHMACMD5(k, d) {
|
||
return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d));
|
||
}
|
||
function hexHMACMD5(k, d) {
|
||
return rstr2hex(rawHMACMD5(k, d));
|
||
}
|
||
function md5(string, key, raw) {
|
||
if (!key) {
|
||
if (!raw) {
|
||
return hexMD5(string);
|
||
}
|
||
return rawMD5(string);
|
||
}
|
||
if (!raw) {
|
||
return hexHMACMD5(key, string);
|
||
}
|
||
return rawHMACMD5(key, string);
|
||
}
|
||
var MAX_HEADER_VALUE = 3072;
|
||
function splitHeaders(headers) {
|
||
const output = new Headers(headers);
|
||
if (headers.has("x-bare-headers")) {
|
||
const value = headers.get("x-bare-headers");
|
||
if (value.length > MAX_HEADER_VALUE) {
|
||
output.delete("x-bare-headers");
|
||
let split = 0;
|
||
for (let i = 0; i < value.length; i += MAX_HEADER_VALUE) {
|
||
const part = value.slice(i, i + MAX_HEADER_VALUE);
|
||
const id = split++;
|
||
output.set(`x-bare-headers-${id}`, `;${part}`);
|
||
}
|
||
}
|
||
}
|
||
return output;
|
||
}
|
||
function joinHeaders(headers) {
|
||
const output = new Headers(headers);
|
||
const prefix = "x-bare-headers";
|
||
if (headers.has(`${prefix}-0`)) {
|
||
const join = [];
|
||
for (const [header, value] of headers) {
|
||
if (!header.startsWith(prefix)) {
|
||
continue;
|
||
}
|
||
if (!value.startsWith(";")) {
|
||
throw new BareError(400, {
|
||
code: "INVALID_BARE_HEADER",
|
||
id: `request.headers.${header}`,
|
||
message: `Value didn't begin with semi-colon.`
|
||
});
|
||
}
|
||
const id = parseInt(header.slice(prefix.length + 1));
|
||
join[id] = value.slice(1);
|
||
output.delete(header);
|
||
}
|
||
output.set(prefix, join.join(""));
|
||
}
|
||
return output;
|
||
}
|
||
var ClientV3 = class extends Client {
|
||
ws;
|
||
http;
|
||
constructor(server) {
|
||
super(3, server);
|
||
this.ws = new URL(this.base);
|
||
this.http = new URL(this.base);
|
||
if (this.ws.protocol === "https:") {
|
||
this.ws.protocol = "wss:";
|
||
} else {
|
||
this.ws.protocol = "ws:";
|
||
}
|
||
}
|
||
connect(remote, protocols, getRequestHeaders, onMeta, onReadyState) {
|
||
const ws = new WebSocket(this.ws);
|
||
const cleanup = () => {
|
||
ws.removeEventListener("close", closeListener);
|
||
ws.removeEventListener("message", messageListener);
|
||
};
|
||
const closeListener = () => {
|
||
cleanup();
|
||
};
|
||
const messageListener = (event) => {
|
||
cleanup();
|
||
if (typeof event.data !== "string")
|
||
throw new TypeError("the first websocket message was not a text frame");
|
||
const message = JSON.parse(event.data);
|
||
if (message.type !== "open")
|
||
throw new TypeError("message was not of open type");
|
||
event.stopImmediatePropagation();
|
||
onMeta({
|
||
protocol: message.protocol,
|
||
setCookies: message.setCookies
|
||
});
|
||
onReadyState(WebSocketFields.OPEN);
|
||
ws.dispatchEvent(new Event("open"));
|
||
};
|
||
ws.addEventListener("close", closeListener);
|
||
ws.addEventListener("message", messageListener);
|
||
ws.addEventListener(
|
||
"open",
|
||
(event) => {
|
||
event.stopImmediatePropagation();
|
||
onReadyState(WebSocketFields.CONNECTING);
|
||
getRequestHeaders().then((headers) => WebSocketFields.prototype.send.call(ws, JSON.stringify({
|
||
type: "connect",
|
||
remote: remote.toString(),
|
||
protocols,
|
||
headers,
|
||
forwardHeaders: []
|
||
})));
|
||
},
|
||
// only block the open event once
|
||
{ once: true }
|
||
);
|
||
return ws;
|
||
}
|
||
async request(method, requestHeaders, body, remote, cache, duplex, signal) {
|
||
if (remote.protocol.startsWith("blob:")) {
|
||
const response2 = await fetch(remote);
|
||
const result2 = new Response(response2.body, response2);
|
||
result2.rawHeaders = Object.fromEntries(response2.headers);
|
||
result2.rawResponse = response2;
|
||
return result2;
|
||
}
|
||
const bareHeaders = {};
|
||
if (requestHeaders instanceof Headers) {
|
||
for (const [header, value] of requestHeaders) {
|
||
bareHeaders[header] = value;
|
||
}
|
||
} else {
|
||
for (const header in requestHeaders) {
|
||
bareHeaders[header] = requestHeaders[header];
|
||
}
|
||
}
|
||
const options = {
|
||
credentials: "omit",
|
||
method,
|
||
signal
|
||
};
|
||
if (cache !== "only-if-cached") {
|
||
options.cache = cache;
|
||
}
|
||
if (body !== void 0) {
|
||
options.body = body;
|
||
}
|
||
if (duplex !== void 0) {
|
||
options.duplex = duplex;
|
||
}
|
||
options.headers = this.createBareHeaders(remote, bareHeaders);
|
||
const response = await fetch(this.http + "?cache=" + md5(remote.toString()), options);
|
||
const readResponse = await this.readBareResponse(response);
|
||
const result = new Response(statusEmpty.includes(readResponse.status) ? void 0 : response.body, {
|
||
status: readResponse.status,
|
||
statusText: readResponse.statusText ?? void 0,
|
||
headers: new Headers(readResponse.headers)
|
||
});
|
||
result.rawHeaders = readResponse.headers;
|
||
result.rawResponse = response;
|
||
return result;
|
||
}
|
||
async readBareResponse(response) {
|
||
if (!response.ok) {
|
||
throw new BareError(response.status, await response.json());
|
||
}
|
||
const responseHeaders = joinHeaders(response.headers);
|
||
const result = {};
|
||
const xBareStatus = responseHeaders.get("x-bare-status");
|
||
if (xBareStatus !== null)
|
||
result.status = parseInt(xBareStatus);
|
||
const xBareStatusText = responseHeaders.get("x-bare-status-text");
|
||
if (xBareStatusText !== null)
|
||
result.statusText = xBareStatusText;
|
||
const xBareHeaders = responseHeaders.get("x-bare-headers");
|
||
if (xBareHeaders !== null)
|
||
result.headers = JSON.parse(xBareHeaders);
|
||
return result;
|
||
}
|
||
createBareHeaders(remote, bareHeaders, forwardHeaders = [], passHeaders = [], passStatus = []) {
|
||
const headers = new Headers();
|
||
headers.set("x-bare-url", remote.toString());
|
||
headers.set("x-bare-headers", JSON.stringify(bareHeaders));
|
||
for (const header of forwardHeaders) {
|
||
headers.append("x-bare-forward-headers", header);
|
||
}
|
||
for (const header of passHeaders) {
|
||
headers.append("x-bare-pass-headers", header);
|
||
}
|
||
for (const status of passStatus) {
|
||
headers.append("x-bare-pass-status", status.toString());
|
||
}
|
||
splitHeaders(headers);
|
||
return headers;
|
||
}
|
||
};
|
||
var validChars = "!#$%&'*+-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz|~";
|
||
function validProtocol(protocol) {
|
||
for (let i = 0; i < protocol.length; i++) {
|
||
const char = protocol[i];
|
||
if (!validChars.includes(char)) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
var clientCtors = [
|
||
["v3", ClientV3]
|
||
];
|
||
async function fetchManifest(server, signal) {
|
||
const outgoing = await fetch(server, { signal });
|
||
if (!outgoing.ok) {
|
||
throw new Error(`Unable to fetch Bare meta: ${outgoing.status} ${await outgoing.text()}`);
|
||
}
|
||
return await outgoing.json();
|
||
}
|
||
var getRealReadyState = Object.getOwnPropertyDescriptor(WebSocket.prototype, "readyState").get;
|
||
var wsProtocols = ["ws:", "wss:"];
|
||
var BareClient = class {
|
||
manifest;
|
||
client;
|
||
server;
|
||
working;
|
||
onDemand;
|
||
onDemandSignal;
|
||
constructor(server, _) {
|
||
this.server = new URL(server);
|
||
if (!_ || _ instanceof AbortSignal) {
|
||
this.onDemand = true;
|
||
this.onDemandSignal = _;
|
||
} else {
|
||
this.onDemand = false;
|
||
this.loadManifest(_);
|
||
}
|
||
}
|
||
loadManifest(manifest) {
|
||
this.manifest = manifest;
|
||
this.client = this.getClient();
|
||
return this.client;
|
||
}
|
||
demand() {
|
||
if (!this.onDemand)
|
||
return this.client;
|
||
if (!this.working)
|
||
this.working = fetchManifest(this.server, this.onDemandSignal).then((manifest) => this.loadManifest(manifest)).catch((err) => {
|
||
delete this.working;
|
||
throw err;
|
||
});
|
||
return this.working;
|
||
}
|
||
getClient() {
|
||
for (const [version, ctor] of clientCtors)
|
||
if (this.manifest.versions.includes(version))
|
||
return new ctor(this.server);
|
||
throw new Error("Unable to find compatible client version. Starting from v2.0.0, @tomphttp/bare-client only supports Bare servers v3+. For more information, see https://github.com/tomphttp/bare-client/");
|
||
}
|
||
createWebSocket(remote, protocols = [], options) {
|
||
if (!this.client)
|
||
throw new TypeError("You need to wait for the client to finish fetching the manifest before creating any WebSockets. Try caching the manifest data before making this request.");
|
||
try {
|
||
remote = new URL(remote);
|
||
} catch (err) {
|
||
throw new DOMException(`Faiiled to construct 'WebSocket': The URL '${remote}' is invalid.`);
|
||
}
|
||
if (!wsProtocols.includes(remote.protocol))
|
||
throw new DOMException(`Failed to construct 'WebSocket': The URL's scheme must be either 'ws' or 'wss'. '${remote.protocol}' is not allowed.`);
|
||
if (!Array.isArray(protocols))
|
||
protocols = [protocols];
|
||
protocols = protocols.map(String);
|
||
for (const proto of protocols)
|
||
if (!validProtocol(proto))
|
||
throw new DOMException(`Failed to construct 'WebSocket': The subprotocol '${proto}' is invalid.`);
|
||
const socket = this.client.connect(remote, protocols, async () => {
|
||
const resolvedHeaders = typeof options.headers === "function" ? await options.headers() : options.headers || {};
|
||
const requestHeaders = resolvedHeaders instanceof Headers ? Object.fromEntries(resolvedHeaders) : resolvedHeaders;
|
||
requestHeaders["Host"] = remote.host;
|
||
requestHeaders["Pragma"] = "no-cache";
|
||
requestHeaders["Cache-Control"] = "no-cache";
|
||
requestHeaders["Upgrade"] = "websocket";
|
||
requestHeaders["Connection"] = "Upgrade";
|
||
return requestHeaders;
|
||
}, (meta) => {
|
||
fakeProtocol = meta.protocol;
|
||
if (options.setCookiesCallback)
|
||
options.setCookiesCallback(meta.setCookies);
|
||
}, (readyState) => {
|
||
fakeReadyState = readyState;
|
||
}, options.webSocketImpl || WebSocket);
|
||
let fakeProtocol = "";
|
||
let fakeReadyState = WebSocketFields.CONNECTING;
|
||
const getReadyState = () => {
|
||
const realReadyState = getRealReadyState.call(socket);
|
||
return realReadyState === WebSocketFields.OPEN ? fakeReadyState : realReadyState;
|
||
};
|
||
if (options.readyStateHook)
|
||
options.readyStateHook(socket, getReadyState);
|
||
else {
|
||
Object.defineProperty(socket, "readyState", {
|
||
get: getReadyState,
|
||
configurable: true,
|
||
enumerable: true
|
||
});
|
||
}
|
||
const getSendError = () => {
|
||
const readyState = getReadyState();
|
||
if (readyState === WebSocketFields.CONNECTING)
|
||
return new DOMException("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.");
|
||
};
|
||
if (options.sendErrorHook)
|
||
options.sendErrorHook(socket, getSendError);
|
||
else {
|
||
socket.send = function(...args) {
|
||
const error = getSendError();
|
||
if (error)
|
||
throw error;
|
||
else
|
||
WebSocketFields.prototype.send.call(this, ...args);
|
||
};
|
||
}
|
||
if (options.urlHook)
|
||
options.urlHook(socket, remote);
|
||
else
|
||
Object.defineProperty(socket, "url", {
|
||
get: () => remote.toString(),
|
||
configurable: true,
|
||
enumerable: true
|
||
});
|
||
const getProtocol = () => fakeProtocol;
|
||
if (options.protocolHook)
|
||
options.protocolHook(socket, getProtocol);
|
||
else
|
||
Object.defineProperty(socket, "protocol", {
|
||
get: getProtocol,
|
||
configurable: true,
|
||
enumerable: true
|
||
});
|
||
return socket;
|
||
}
|
||
async fetch(url2, init) {
|
||
const req = isUrlLike(url2) ? new Request(url2, init) : url2;
|
||
const inputHeaders = init?.headers || req.headers;
|
||
const headers = inputHeaders instanceof Headers ? Object.fromEntries(inputHeaders) : inputHeaders;
|
||
const duplex = init?.duplex;
|
||
const body = init?.body || req.body;
|
||
let urlO = new URL(req.url);
|
||
const client = await this.demand();
|
||
for (let i = 0; ; i++) {
|
||
if ("host" in headers)
|
||
headers.host = urlO.host;
|
||
else
|
||
headers.Host = urlO.host;
|
||
const response = await client.request(req.method, headers, body, urlO, req.cache, duplex, req.signal);
|
||
response.finalURL = urlO.toString();
|
||
const redirect = init?.redirect || req.redirect;
|
||
if (statusRedirect.includes(response.status)) {
|
||
switch (redirect) {
|
||
case "follow": {
|
||
const location = response.headers.get("location");
|
||
if (maxRedirects > i && location !== null) {
|
||
urlO = new URL(location, urlO);
|
||
continue;
|
||
} else
|
||
throw new TypeError("Failed to fetch");
|
||
}
|
||
case "error":
|
||
throw new TypeError("Failed to fetch");
|
||
case "manual":
|
||
return response;
|
||
}
|
||
} else {
|
||
return response;
|
||
}
|
||
}
|
||
}
|
||
};
|
||
function isUrlLike(url2) {
|
||
return typeof url2 === "string" || url2 instanceof URL;
|
||
}
|
||
|
||
// src/rewrite/index.js
|
||
var import_events4 = __toESM(require_events(), 1);
|
||
var Ultraviolet = class _Ultraviolet {
|
||
/**
|
||
*
|
||
* @param {UVConfig} [options]
|
||
*/
|
||
constructor(options = {}) {
|
||
this.prefix = options.prefix || "/service/";
|
||
this.urlRegex = /^(#|about:|data:|mailto:)/;
|
||
this.rewriteUrl = options.rewriteUrl || this.rewriteUrl;
|
||
this.rewriteImport = options.rewriteImport || this.rewriteImport;
|
||
this.sourceUrl = options.sourceUrl || this.sourceUrl;
|
||
this.encodeUrl = options.encodeUrl || this.encodeUrl;
|
||
this.decodeUrl = options.decodeUrl || this.decodeUrl;
|
||
this.vanilla = "vanilla" in options ? options.vanilla : false;
|
||
this.meta = options.meta || {};
|
||
this.meta.base ||= void 0;
|
||
this.meta.origin ||= "";
|
||
this.bundleScript = options.bundle || "/uv.bundle.js";
|
||
this.handlerScript = options.handler || "/uv.handler.js";
|
||
this.clientScript = options.client || options.bundle && options.bundle.includes("uv.bundle.js") && options.bundle.replace("uv.bundle.js", "uv.client.js") || "/uv.client.js";
|
||
this.configScript = options.config || "/uv.config.js";
|
||
this.meta.url ||= this.meta.base || "";
|
||
this.codec = _Ultraviolet.codec;
|
||
this.html = new html_default(this);
|
||
this.css = new css_default(this);
|
||
this.js = new js_default(this);
|
||
this.openDB = this.constructor.openDB;
|
||
this.master = "__uv";
|
||
this.dataPrefix = "__uv$";
|
||
this.attributePrefix = "__uv";
|
||
this.createHtmlInject = createHtmlInject;
|
||
this.createJsInject = createJsInject;
|
||
this.attrs = {
|
||
isUrl,
|
||
isForbidden,
|
||
isHtml,
|
||
isSrcset,
|
||
isStyle
|
||
};
|
||
if (!this.vanilla)
|
||
this.implementUVMiddleware();
|
||
this.cookie = {
|
||
validateCookie,
|
||
db: () => {
|
||
return db2(this.constructor.openDB);
|
||
},
|
||
getCookies,
|
||
setCookies,
|
||
serialize: serialize2,
|
||
setCookie: import_set_cookie_parser2.default
|
||
};
|
||
}
|
||
/**
|
||
*
|
||
* @param {string} str Script being imported
|
||
* @param {string} src Script that is importing
|
||
* @param {*} meta
|
||
*/
|
||
rewriteImport(str, src, meta = this.meta) {
|
||
return this.rewriteUrl(str, {
|
||
...meta,
|
||
base: src
|
||
});
|
||
}
|
||
rewriteUrl(str, meta = this.meta) {
|
||
str = new String(str).trim();
|
||
if (!str || this.urlRegex.test(str))
|
||
return str;
|
||
if (str.startsWith("javascript:")) {
|
||
return "javascript:" + this.js.rewrite(str.slice("javascript:".length));
|
||
}
|
||
try {
|
||
return meta.origin + this.prefix + this.encodeUrl(new URL(str, meta.base).href);
|
||
} catch (e) {
|
||
return meta.origin + this.prefix + this.encodeUrl(str);
|
||
}
|
||
}
|
||
sourceUrl(str, meta = this.meta) {
|
||
if (!str || this.urlRegex.test(str))
|
||
return str;
|
||
try {
|
||
return new URL(
|
||
this.decodeUrl(
|
||
str.slice(this.prefix.length + meta.origin.length)
|
||
),
|
||
meta.base
|
||
).href;
|
||
} catch (e) {
|
||
return this.decodeUrl(
|
||
str.slice(this.prefix.length + meta.origin.length)
|
||
);
|
||
}
|
||
}
|
||
encodeUrl(str) {
|
||
return encodeURIComponent(str);
|
||
}
|
||
decodeUrl(str) {
|
||
return decodeURIComponent(str);
|
||
}
|
||
implementUVMiddleware() {
|
||
attributes(this);
|
||
text(this);
|
||
injectHead(this);
|
||
url(this);
|
||
importStyle(this);
|
||
importDeclaration(this);
|
||
dynamicImport(this);
|
||
property2(this);
|
||
wrapEval(this);
|
||
identifier(this);
|
||
unwrap(this);
|
||
}
|
||
get rewriteHtml() {
|
||
return this.html.rewrite.bind(this.html);
|
||
}
|
||
get sourceHtml() {
|
||
return this.html.source.bind(this.html);
|
||
}
|
||
get rewriteCSS() {
|
||
return this.css.rewrite.bind(this.css);
|
||
}
|
||
get sourceCSS() {
|
||
return this.css.source.bind(this.css);
|
||
}
|
||
get rewriteJS() {
|
||
return this.js.rewrite.bind(this.js);
|
||
}
|
||
get sourceJS() {
|
||
return this.js.source.bind(this.js);
|
||
}
|
||
static codec = { xor, base64, plain };
|
||
static mime = mime_exports;
|
||
static setCookie = import_set_cookie_parser2.default;
|
||
static openDB = openDB;
|
||
static BareClient = BareClient;
|
||
static EventEmitter = import_events4.default;
|
||
};
|
||
var rewrite_default = Ultraviolet;
|
||
if (typeof self === "object")
|
||
self.Ultraviolet = Ultraviolet;
|
||
})();
|
||
/*! Bundled license information:
|
||
|
||
mime-db/index.js:
|
||
(*!
|
||
* mime-db
|
||
* Copyright(c) 2014 Jonathan Ong
|
||
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
||
* MIT Licensed
|
||
*)
|
||
*/
|
||
//# sourceMappingURL=uv.bundle.js.map
|