UNPKG

@huntabyte/mdsvex

Version:

Markdown preprocessor for Svelte

2,293 lines (2,001 loc) 590 kB
import * as path from 'path'; import path__default, { join } from 'path'; import fs from 'fs'; import { parse as parse$8 } from 'svelte/compiler'; import util from 'util'; const defineConfig = (config) => config; var bail_1 = bail; function bail(err) { if (err) { throw err } } /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh <https://feross.org> * @license MIT */ var isBuffer = function isBuffer (obj) { return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) }; var hasOwn = Object.prototype.hasOwnProperty; var toStr = Object.prototype.toString; var defineProperty = Object.defineProperty; var gOPD = Object.getOwnPropertyDescriptor; var isArray = function isArray(arr) { if (typeof Array.isArray === 'function') { return Array.isArray(arr); } return toStr.call(arr) === '[object Array]'; }; var isPlainObject = function isPlainObject(obj) { if (!obj || toStr.call(obj) !== '[object Object]') { return false; } var hasOwnConstructor = hasOwn.call(obj, 'constructor'); var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); // Not own constructor property must be Object if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { return false; } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. var key; for (key in obj) { /**/ } return typeof key === 'undefined' || hasOwn.call(obj, key); }; // If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target var setProperty = function setProperty(target, options) { if (defineProperty && options.name === '__proto__') { defineProperty(target, options.name, { enumerable: true, configurable: true, value: options.newValue, writable: true }); } else { target[options.name] = options.newValue; } }; // Return undefined instead of __proto__ if '__proto__' is not an own property var getProperty = function getProperty(obj, name) { if (name === '__proto__') { if (!hasOwn.call(obj, name)) { return void 0; } else if (gOPD) { // In early versions of node, obj['__proto__'] is buggy when obj has // __proto__ as an own property. Object.getOwnPropertyDescriptor() works. return gOPD(obj, name).value; } } return obj[name]; }; var extend$2 = function extend() { var options, name, src, copy, copyIsArray, clone; var target = arguments[0]; var i = 1; var length = arguments.length; var deep = false; // Handle a deep copy situation if (typeof target === 'boolean') { deep = target; target = arguments[1] || {}; // skip the boolean and the target i = 2; } if (target == null || (typeof target !== 'object' && typeof target !== 'function')) { target = {}; } for (; i < length; ++i) { options = arguments[i]; // Only deal with non-null/undefined values if (options != null) { // Extend the base object for (name in options) { src = getProperty(target, name); copy = getProperty(options, name); // Prevent never-ending loop if (target !== copy) { // Recurse if we're merging plain objects or arrays if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { if (copyIsArray) { copyIsArray = false; clone = src && isArray(src) ? src : []; } else { clone = src && isPlainObject(src) ? src : {}; } // Never move original objects, clone them setProperty(target, { name: name, newValue: extend(deep, clone, copy) }); // Don't bring in undefined values } else if (typeof copy !== 'undefined') { setProperty(target, { name: name, newValue: copy }); } } } } } // Return the modified object return target; }; var isPlainObj = value => { if (Object.prototype.toString.call(value) !== '[object Object]') { return false; } const prototype = Object.getPrototypeOf(value); return prototype === null || prototype === Object.prototype; }; var slice$3 = [].slice; var wrap_1$1 = wrap$2; // Wrap `fn`. // Can be sync or async; return a promise, receive a completion handler, return // new values and errors. function wrap$2(fn, callback) { var invoked; return wrapped function wrapped() { var params = slice$3.call(arguments, 0); var callback = fn.length > params.length; var result; if (callback) { params.push(done); } try { result = fn.apply(null, params); } catch (error) { // Well, this is quite the pickle. // `fn` received a callback and invoked it (thus continuing the pipeline), // but later also threw an error. // We’re not about to restart the pipeline again, so the only thing left // to do is to throw the thing instead. if (callback && invoked) { throw error } return done(error) } if (!callback) { if (result && typeof result.then === 'function') { result.then(then, done); } else if (result instanceof Error) { done(result); } else { then(result); } } } // Invoke `next`, only once. function done() { if (!invoked) { invoked = true; callback.apply(null, arguments); } } // Invoke `done` with one value. // Tracks if an error is passed, too. function then(value) { done(null, value); } } var trough_1 = trough; trough.wrap = wrap_1$1; var slice$2 = [].slice; // Create new middleware. function trough() { var fns = []; var middleware = {}; middleware.run = run; middleware.use = use; return middleware // Run `fns`. Last argument must be a completion handler. function run() { var index = -1; var input = slice$2.call(arguments, 0, -1); var done = arguments[arguments.length - 1]; if (typeof done !== 'function') { throw new Error('Expected function as last argument, not ' + done) } next.apply(null, [null].concat(input)); // Run the next `fn`, if any. function next(err) { var fn = fns[++index]; var params = slice$2.call(arguments, 0); var values = params.slice(1); var length = input.length; var pos = -1; if (err) { done(err); return } // Copy non-nully input into values. while (++pos < length) { if (values[pos] === null || values[pos] === undefined) { values[pos] = input[pos]; } } input = values; // Next or done. if (fn) { wrap_1$1(fn, next).apply(null, input); } else { done.apply(null, [null].concat(input)); } } } // Add `fn` to the list. function use(fn) { if (typeof fn !== 'function') { throw new Error('Expected `fn` to be a function, not ' + fn) } fns.push(fn); return middleware } } var own$f = {}.hasOwnProperty; var unistUtilStringifyPosition = stringify$4; function stringify$4(value) { // Nothing. if (!value || typeof value !== 'object') { return '' } // Node. if (own$f.call(value, 'position') || own$f.call(value, 'type')) { return position$1(value.position) } // Position. if (own$f.call(value, 'start') || own$f.call(value, 'end')) { return position$1(value) } // Point. if (own$f.call(value, 'line') || own$f.call(value, 'column')) { return point(value) } // ? return '' } function point(point) { if (!point || typeof point !== 'object') { point = {}; } return index$6(point.line) + ':' + index$6(point.column) } function position$1(pos) { if (!pos || typeof pos !== 'object') { pos = {}; } return point(pos.start) + '-' + point(pos.end) } function index$6(value) { return value && typeof value === 'number' ? value : 1 } var vfileMessage = VMessage; // Inherit from `Error#`. function VMessagePrototype() {} VMessagePrototype.prototype = Error.prototype; VMessage.prototype = new VMessagePrototype(); // Message properties. var proto$6 = VMessage.prototype; proto$6.file = ''; proto$6.name = ''; proto$6.reason = ''; proto$6.message = ''; proto$6.stack = ''; proto$6.fatal = null; proto$6.column = null; proto$6.line = null; // Construct a new VMessage. // // Note: We cannot invoke `Error` on the created context, as that adds readonly // `line` and `column` attributes on Safari 9, thus throwing and failing the // data. function VMessage(reason, position, origin) { var parts; var range; var location; if (typeof position === 'string') { origin = position; position = null; } parts = parseOrigin(origin); range = unistUtilStringifyPosition(position) || '1:1'; location = { start: {line: null, column: null}, end: {line: null, column: null} }; // Node. if (position && position.position) { position = position.position; } if (position) { // Position. if (position.start) { location = position; position = position.start; } else { // Point. location.start = position; } } if (reason.stack) { this.stack = reason.stack; reason = reason.message; } this.message = reason; this.name = range; this.reason = reason; this.line = position ? position.line : null; this.column = position ? position.column : null; this.location = location; this.source = parts[0]; this.ruleId = parts[1]; } function parseOrigin(origin) { var result = [null, null]; var index; if (typeof origin === 'string') { index = origin.indexOf(':'); if (index === -1) { result[1] = origin; } else { result[0] = origin.slice(0, index); result[1] = origin.slice(index + 1); } } return result } function replaceExt(npath, ext) { if (typeof npath !== 'string') { return npath; } if (npath.length === 0) { return npath; } var nFileName = path__default.basename(npath, path__default.extname(npath)) + ext; return path__default.join(path__default.dirname(npath), nFileName); } var replaceExt_1 = replaceExt; var core$1 = VFile; var own$e = {}.hasOwnProperty; var proto$5 = VFile.prototype; // Order of setting (least specific to most), we need this because otherwise // `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a // stem can be set. var order$1 = ['history', 'path', 'basename', 'stem', 'extname', 'dirname']; proto$5.toString = toString; // Access full path (`~/index.min.js`). Object.defineProperty(proto$5, 'path', {get: getPath, set: setPath}); // Access parent path (`~`). Object.defineProperty(proto$5, 'dirname', {get: getDirname, set: setDirname}); // Access basename (`index.min.js`). Object.defineProperty(proto$5, 'basename', {get: getBasename, set: setBasename}); // Access extname (`.js`). Object.defineProperty(proto$5, 'extname', {get: getExtname, set: setExtname}); // Access stem (`index.min`). Object.defineProperty(proto$5, 'stem', {get: getStem, set: setStem}); // Construct a new file. function VFile(options) { var prop; var index; var length; if (!options) { options = {}; } else if (typeof options === 'string' || isBuffer(options)) { options = {contents: options}; } else if ('message' in options && 'messages' in options) { return options } if (!(this instanceof VFile)) { return new VFile(options) } this.data = {}; this.messages = []; this.history = []; this.cwd = process.cwd(); // Set path related properties in the correct order. index = -1; length = order$1.length; while (++index < length) { prop = order$1[index]; if (own$e.call(options, prop)) { this[prop] = options[prop]; } } // Set non-path related properties. for (prop in options) { if (order$1.indexOf(prop) === -1) { this[prop] = options[prop]; } } } function getPath() { return this.history[this.history.length - 1] } function setPath(path) { assertNonEmpty(path, 'path'); if (path !== this.path) { this.history.push(path); } } function getDirname() { return typeof this.path === 'string' ? path__default.dirname(this.path) : undefined } function setDirname(dirname) { assertPath(this.path, 'dirname'); this.path = path__default.join(dirname || '', this.basename); } function getBasename() { return typeof this.path === 'string' ? path__default.basename(this.path) : undefined } function setBasename(basename) { assertNonEmpty(basename, 'basename'); assertPart(basename, 'basename'); this.path = path__default.join(this.dirname || '', basename); } function getExtname() { return typeof this.path === 'string' ? path__default.extname(this.path) : undefined } function setExtname(extname) { var ext = extname || ''; assertPart(ext, 'extname'); assertPath(this.path, 'extname'); if (ext) { if (ext.charAt(0) !== '.') { throw new Error('`extname` must start with `.`') } if (ext.indexOf('.', 1) !== -1) { throw new Error('`extname` cannot contain multiple dots') } } this.path = replaceExt_1(this.path, ext); } function getStem() { return typeof this.path === 'string' ? path__default.basename(this.path, this.extname) : undefined } function setStem(stem) { assertNonEmpty(stem, 'stem'); assertPart(stem, 'stem'); this.path = path__default.join(this.dirname || '', stem + (this.extname || '')); } // Get the value of the file. function toString(encoding) { var value = this.contents || ''; return isBuffer(value) ? value.toString(encoding) : String(value) } // Assert that `part` is not a path (i.e., does not contain `path.sep`). function assertPart(part, name) { if (part.indexOf(path__default.sep) !== -1) { throw new Error( '`' + name + '` cannot be a path: did not expect `' + path__default.sep + '`' ) } } // Assert that `part` is not empty. function assertNonEmpty(part, name) { if (!part) { throw new Error('`' + name + '` cannot be empty') } } // Assert `path` exists. function assertPath(path, name) { if (!path) { throw new Error('Setting `' + name + '` requires `path` to be set too') } } var vfile = core$1; var proto$4 = core$1.prototype; proto$4.message = message; proto$4.info = info$1; proto$4.fail = fail; // Create a message with `reason` at `position`. // When an error is passed in as `reason`, copies the stack. function message(reason, position, origin) { var filePath = this.path; var message = new vfileMessage(reason, position, origin); if (filePath) { message.name = filePath + ':' + message.name; message.file = filePath; } message.fatal = false; this.messages.push(message); return message } // Fail: creates a vmessage, associates it with the file, and throws it. function fail() { var message = this.message.apply(this, arguments); message.fatal = true; throw message } // Info: creates a vmessage, associates it with the file, and marks the fatality // as null. function info$1() { var message = this.message.apply(this, arguments); message.fatal = null; return message } // Expose a frozen processor. var unified_1$1 = unified$1().freeze(); var slice$1 = [].slice; var own$d = {}.hasOwnProperty; // Process pipeline. var pipeline$1 = trough_1() .use(pipelineParse$1) .use(pipelineRun$1) .use(pipelineStringify$1); function pipelineParse$1(p, ctx) { ctx.tree = p.parse(ctx.file); } function pipelineRun$1(p, ctx, next) { p.run(ctx.tree, ctx.file, done); function done(err, tree, file) { if (err) { next(err); } else { ctx.tree = tree; ctx.file = file; next(); } } } function pipelineStringify$1(p, ctx) { var result = p.stringify(ctx.tree, ctx.file); var file = ctx.file; if (result === undefined || result === null) ; else if (typeof result === 'string' || isBuffer(result)) { file.contents = result; } else { file.result = result; } } // Function to create the first processor. function unified$1() { var attachers = []; var transformers = trough_1(); var namespace = {}; var frozen = false; var freezeIndex = -1; // Data management. processor.data = data; // Lock. processor.freeze = freeze; // Plugins. processor.attachers = attachers; processor.use = use; // API. processor.parse = parse; processor.stringify = stringify; processor.run = run; processor.runSync = runSync; processor.process = process; processor.processSync = processSync; // Expose. return processor // Create a new processor based on the processor in the current scope. function processor() { var destination = unified$1(); var length = attachers.length; var index = -1; while (++index < length) { destination.use.apply(null, attachers[index]); } destination.data(extend$2(true, {}, namespace)); return destination } // Freeze: used to signal a processor that has finished configuration. // // For example, take unified itself: it’s frozen. // Plugins should not be added to it. // Rather, it should be extended, by invoking it, before modifying it. // // In essence, always invoke this when exporting a processor. function freeze() { var values; var plugin; var options; var transformer; if (frozen) { return processor } while (++freezeIndex < attachers.length) { values = attachers[freezeIndex]; plugin = values[0]; options = values[1]; transformer = null; if (options === false) { continue } if (options === true) { values[1] = undefined; } transformer = plugin.apply(processor, values.slice(1)); if (typeof transformer === 'function') { transformers.use(transformer); } } frozen = true; freezeIndex = Infinity; return processor } // Data management. // Getter / setter for processor-specific informtion. function data(key, value) { if (typeof key === 'string') { // Set `key`. if (arguments.length === 2) { assertUnfrozen$1('data', frozen); namespace[key] = value; return processor } // Get `key`. return (own$d.call(namespace, key) && namespace[key]) || null } // Set space. if (key) { assertUnfrozen$1('data', frozen); namespace = key; return processor } // Get space. return namespace } // Plugin management. // // Pass it: // * an attacher and options, // * a preset, // * a list of presets, attachers, and arguments (list of attachers and // options). function use(value) { var settings; assertUnfrozen$1('use', frozen); if (value === null || value === undefined) ; else if (typeof value === 'function') { addPlugin.apply(null, arguments); } else if (typeof value === 'object') { if ('length' in value) { addList(value); } else { addPreset(value); } } else { throw new Error('Expected usable value, not `' + value + '`') } if (settings) { namespace.settings = extend$2(namespace.settings || {}, settings); } return processor function addPreset(result) { addList(result.plugins); if (result.settings) { settings = extend$2(settings || {}, result.settings); } } function add(value) { if (typeof value === 'function') { addPlugin(value); } else if (typeof value === 'object') { if ('length' in value) { addPlugin.apply(null, value); } else { addPreset(value); } } else { throw new Error('Expected usable value, not `' + value + '`') } } function addList(plugins) { var length; var index; if (plugins === null || plugins === undefined) ; else if (typeof plugins === 'object' && 'length' in plugins) { length = plugins.length; index = -1; while (++index < length) { add(plugins[index]); } } else { throw new Error('Expected a list of plugins, not `' + plugins + '`') } } function addPlugin(plugin, value) { var entry = find(plugin); if (entry) { if (isPlainObj(entry[1]) && isPlainObj(value)) { value = extend$2(entry[1], value); } entry[1] = value; } else { attachers.push(slice$1.call(arguments)); } } } function find(plugin) { var length = attachers.length; var index = -1; var entry; while (++index < length) { entry = attachers[index]; if (entry[0] === plugin) { return entry } } } // Parse a file (in string or vfile representation) into a unist node using // the `Parser` on the processor. function parse(doc) { var file = vfile(doc); var Parser; freeze(); Parser = processor.Parser; assertParser$1('parse', Parser); if (newable$1(Parser, 'parse')) { return new Parser(String(file), file).parse() } return Parser(String(file), file) // eslint-disable-line new-cap } // Run transforms on a unist node representation of a file (in string or // vfile representation), async. function run(node, file, cb) { assertNode$1(node); freeze(); if (!cb && typeof file === 'function') { cb = file; file = null; } if (!cb) { return new Promise(executor) } executor(null, cb); function executor(resolve, reject) { transformers.run(node, vfile(file), done); function done(err, tree, file) { tree = tree || node; if (err) { reject(err); } else if (resolve) { resolve(tree); } else { cb(null, tree, file); } } } } // Run transforms on a unist node representation of a file (in string or // vfile representation), sync. function runSync(node, file) { var complete = false; var result; run(node, file, done); assertDone$1('runSync', 'run', complete); return result function done(err, tree) { complete = true; bail_1(err); result = tree; } } // Stringify a unist node representation of a file (in string or vfile // representation) into a string using the `Compiler` on the processor. function stringify(node, doc) { var file = vfile(doc); var Compiler; freeze(); Compiler = processor.Compiler; assertCompiler$1('stringify', Compiler); assertNode$1(node); if (newable$1(Compiler, 'compile')) { return new Compiler(node, file).compile() } return Compiler(node, file) // eslint-disable-line new-cap } // Parse a file (in string or vfile representation) into a unist node using // the `Parser` on the processor, then run transforms on that node, and // compile the resulting node using the `Compiler` on the processor, and // store that result on the vfile. function process(doc, cb) { freeze(); assertParser$1('process', processor.Parser); assertCompiler$1('process', processor.Compiler); if (!cb) { return new Promise(executor) } executor(null, cb); function executor(resolve, reject) { var file = vfile(doc); pipeline$1.run(processor, {file: file}, done); function done(err) { if (err) { reject(err); } else if (resolve) { resolve(file); } else { cb(null, file); } } } } // Process the given document (in string or vfile representation), sync. function processSync(doc) { var complete = false; var file; freeze(); assertParser$1('processSync', processor.Parser); assertCompiler$1('processSync', processor.Compiler); file = vfile(doc); process(file, done); assertDone$1('processSync', 'process', complete); return file function done(err) { complete = true; bail_1(err); } } } // Check if `value` is a constructor. function newable$1(value, name) { return ( typeof value === 'function' && value.prototype && // A function with keys in its prototype is probably a constructor. // Classes’ prototype methods are not enumerable, so we check if some value // exists in the prototype. (keys$2(value.prototype) || name in value.prototype) ) } // Check if `value` is an object with keys. function keys$2(value) { var key; for (key in value) { return true } return false } // Assert a parser is available. function assertParser$1(name, Parser) { if (typeof Parser !== 'function') { throw new Error('Cannot `' + name + '` without `Parser`') } } // Assert a compiler is available. function assertCompiler$1(name, Compiler) { if (typeof Compiler !== 'function') { throw new Error('Cannot `' + name + '` without `Compiler`') } } // Assert the processor is not frozen. function assertUnfrozen$1(name, frozen) { if (frozen) { throw new Error( 'Cannot invoke `' + name + '` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.' ) } } // Assert `node` is a unist node. function assertNode$1(node) { if (!node || typeof node.type !== 'string') { throw new Error('Expected node, got `' + node + '`') } } // Assert that `complete` is `true`. function assertDone$1(name, asyncName, complete) { if (!complete) { throw new Error( '`' + name + '` finished async. Use `' + asyncName + '` instead' ) } } var immutable = extend$1; var hasOwnProperty = Object.prototype.hasOwnProperty; function extend$1() { var target = {}; for (var i = 0; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target } function commonjsRequire () { throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); } function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } function getCjsExportFromNamespace (n) { return n && n['default'] || n; } var inherits_browser = createCommonjsModule(function (module) { if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); } }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor; var TempCtor = function () {}; TempCtor.prototype = superCtor.prototype; ctor.prototype = new TempCtor(); ctor.prototype.constructor = ctor; } }; } }); var inherits = createCommonjsModule(function (module) { try { var util$1 = util; /* istanbul ignore next */ if (typeof util$1.inherits !== 'function') throw ''; module.exports = util$1.inherits; } catch (e) { /* istanbul ignore next */ module.exports = inherits_browser; } }); var unherit_1 = unherit; // Create a custom constructor which can be modified without affecting the // original class. function unherit(Super) { var result; var key; var value; inherits(Of, Super); inherits(From, Of); // Clone values. result = Of.prototype; for (key in result) { value = result[key]; if (value && typeof value === 'object') { result[key] = 'concat' in value ? value.concat() : immutable(value); } } return Of // Constructor accepting a single argument, which itself is an `arguments` // object. function From(parameters) { return Super.apply(this, parameters) } // Constructor accepting variadic arguments. function Of() { if (!(this instanceof Of)) { return new From(arguments) } return Super.apply(this, arguments) } } var stateToggle = factory$6; // Construct a state `toggler`: a function which inverses `property` in context // based on its current value. // The by `toggler` returned function restores that value. function factory$6(key, state, ctx) { return enter function enter() { var context = ctx || this; var current = context[key]; context[key] = !state; return exit function exit() { context[key] = current; } } } var vfileLocation = factory$5; function factory$5(file) { var contents = indices(String(file)); return { toPosition: offsetToPositionFactory(contents), toOffset: positionToOffsetFactory(contents) } } // Factory to get the line and column-based `position` for `offset` in the bound // indices. function offsetToPositionFactory(indices) { return offsetToPosition // Get the line and column-based `position` for `offset` in the bound indices. function offsetToPosition(offset) { var index = -1; var length = indices.length; if (offset < 0) { return {} } while (++index < length) { if (indices[index] > offset) { return { line: index + 1, column: offset - (indices[index - 1] || 0) + 1, offset: offset } } } return {} } } // Factory to get the `offset` for a line and column-based `position` in the // bound indices. function positionToOffsetFactory(indices) { return positionToOffset // Get the `offset` for a line and column-based `position` in the bound // indices. function positionToOffset(position) { var line = position && position.line; var column = position && position.column; if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { return (indices[line - 2] || 0) + column - 1 || 0 } return -1 } } // Get indices of line-breaks in `value`. function indices(value) { var result = []; var index = value.indexOf('\n'); while (index !== -1) { result.push(index + 1); index = value.indexOf('\n', index + 1); } result.push(value.length + 1); return result } var _unescape = factory$4; var backslash$7 = '\\'; // Factory to de-escape a value, based on a list at `key` in `ctx`. function factory$4(ctx, key) { return unescape // De-escape a string using the expression at `key` in `ctx`. function unescape(value) { var previous = 0; var index = value.indexOf(backslash$7); var escape = ctx[key]; var queue = []; var character; while (index !== -1) { queue.push(value.slice(previous, index)); previous = index + 1; character = value.charAt(previous); // If the following character is not a valid escape, add the slash. if (!character || escape.indexOf(character) === -1) { queue.push(backslash$7); } index = value.indexOf(backslash$7, previous + 1); } queue.push(value.slice(previous)); return queue.join('') } } var AElig$2 = "Æ"; var AMP$2 = "&"; var Aacute$2 = "Á"; var Acirc$2 = "Â"; var Agrave$2 = "À"; var Aring$2 = "Å"; var Atilde$2 = "Ã"; var Auml$2 = "Ä"; var COPY$1 = "©"; var Ccedil$2 = "Ç"; var ETH$2 = "Ð"; var Eacute$2 = "É"; var Ecirc$2 = "Ê"; var Egrave$2 = "È"; var Euml$2 = "Ë"; var GT$2 = ">"; var Iacute$2 = "Í"; var Icirc$2 = "Î"; var Igrave$2 = "Ì"; var Iuml$2 = "Ï"; var LT$2 = "<"; var Ntilde$2 = "Ñ"; var Oacute$2 = "Ó"; var Ocirc$2 = "Ô"; var Ograve$2 = "Ò"; var Oslash$2 = "Ø"; var Otilde$2 = "Õ"; var Ouml$2 = "Ö"; var QUOT$1 = "\""; var REG$1 = "®"; var THORN$2 = "Þ"; var Uacute$2 = "Ú"; var Ucirc$2 = "Û"; var Ugrave$2 = "Ù"; var Uuml$2 = "Ü"; var Yacute$2 = "Ý"; var aacute$2 = "á"; var acirc$2 = "â"; var acute$2 = "´"; var aelig$2 = "æ"; var agrave$2 = "à"; var amp$2 = "&"; var aring$2 = "å"; var atilde$2 = "ã"; var auml$2 = "ä"; var brvbar$2 = "¦"; var ccedil$2 = "ç"; var cedil$2 = "¸"; var cent$2 = "¢"; var copy$2 = "©"; var curren$2 = "¤"; var deg$2 = "°"; var divide$2 = "÷"; var eacute$2 = "é"; var ecirc$2 = "ê"; var egrave$2 = "è"; var eth$2 = "ð"; var euml$2 = "ë"; var frac12$2 = "½"; var frac14$2 = "¼"; var frac34$2 = "¾"; var gt$2 = ">"; var iacute$2 = "í"; var icirc$2 = "î"; var iexcl$2 = "¡"; var igrave$2 = "ì"; var iquest$2 = "¿"; var iuml$2 = "ï"; var laquo$2 = "«"; var lt$2 = "<"; var macr$2 = "¯"; var micro$2 = "µ"; var middot$2 = "·"; var nbsp$2 = " "; var not$2 = "¬"; var ntilde$2 = "ñ"; var oacute$2 = "ó"; var ocirc$2 = "ô"; var ograve$2 = "ò"; var ordf$2 = "ª"; var ordm$2 = "º"; var oslash$2 = "ø"; var otilde$2 = "õ"; var ouml$2 = "ö"; var para$2 = "¶"; var plusmn$2 = "±"; var pound$2 = "£"; var quot$2 = "\""; var raquo$2 = "»"; var reg$2 = "®"; var sect$2 = "§"; var shy$2 = "­"; var sup1$2 = "¹"; var sup2$2 = "²"; var sup3$2 = "³"; var szlig$2 = "ß"; var thorn$2 = "þ"; var times$2 = "×"; var uacute$2 = "ú"; var ucirc$2 = "û"; var ugrave$2 = "ù"; var uml$2 = "¨"; var uuml$2 = "ü"; var yacute$2 = "ý"; var yen$2 = "¥"; var yuml$2 = "ÿ"; var index$5 = { AElig: AElig$2, AMP: AMP$2, Aacute: Aacute$2, Acirc: Acirc$2, Agrave: Agrave$2, Aring: Aring$2, Atilde: Atilde$2, Auml: Auml$2, COPY: COPY$1, Ccedil: Ccedil$2, ETH: ETH$2, Eacute: Eacute$2, Ecirc: Ecirc$2, Egrave: Egrave$2, Euml: Euml$2, GT: GT$2, Iacute: Iacute$2, Icirc: Icirc$2, Igrave: Igrave$2, Iuml: Iuml$2, LT: LT$2, Ntilde: Ntilde$2, Oacute: Oacute$2, Ocirc: Ocirc$2, Ograve: Ograve$2, Oslash: Oslash$2, Otilde: Otilde$2, Ouml: Ouml$2, QUOT: QUOT$1, REG: REG$1, THORN: THORN$2, Uacute: Uacute$2, Ucirc: Ucirc$2, Ugrave: Ugrave$2, Uuml: Uuml$2, Yacute: Yacute$2, aacute: aacute$2, acirc: acirc$2, acute: acute$2, aelig: aelig$2, agrave: agrave$2, amp: amp$2, aring: aring$2, atilde: atilde$2, auml: auml$2, brvbar: brvbar$2, ccedil: ccedil$2, cedil: cedil$2, cent: cent$2, copy: copy$2, curren: curren$2, deg: deg$2, divide: divide$2, eacute: eacute$2, ecirc: ecirc$2, egrave: egrave$2, eth: eth$2, euml: euml$2, frac12: frac12$2, frac14: frac14$2, frac34: frac34$2, gt: gt$2, iacute: iacute$2, icirc: icirc$2, iexcl: iexcl$2, igrave: igrave$2, iquest: iquest$2, iuml: iuml$2, laquo: laquo$2, lt: lt$2, macr: macr$2, micro: micro$2, middot: middot$2, nbsp: nbsp$2, not: not$2, ntilde: ntilde$2, oacute: oacute$2, ocirc: ocirc$2, ograve: ograve$2, ordf: ordf$2, ordm: ordm$2, oslash: oslash$2, otilde: otilde$2, ouml: ouml$2, para: para$2, plusmn: plusmn$2, pound: pound$2, quot: quot$2, raquo: raquo$2, reg: reg$2, sect: sect$2, shy: shy$2, sup1: sup1$2, sup2: sup2$2, sup3: sup3$2, szlig: szlig$2, thorn: thorn$2, times: times$2, uacute: uacute$2, ucirc: ucirc$2, ugrave: ugrave$2, uml: uml$2, uuml: uuml$2, yacute: yacute$2, yen: yen$2, yuml: yuml$2 }; var characterEntitiesLegacy = /*#__PURE__*/Object.freeze({ __proto__: null, AElig: AElig$2, AMP: AMP$2, Aacute: Aacute$2, Acirc: Acirc$2, Agrave: Agrave$2, Aring: Aring$2, Atilde: Atilde$2, Auml: Auml$2, COPY: COPY$1, Ccedil: Ccedil$2, ETH: ETH$2, Eacute: Eacute$2, Ecirc: Ecirc$2, Egrave: Egrave$2, Euml: Euml$2, GT: GT$2, Iacute: Iacute$2, Icirc: Icirc$2, Igrave: Igrave$2, Iuml: Iuml$2, LT: LT$2, Ntilde: Ntilde$2, Oacute: Oacute$2, Ocirc: Ocirc$2, Ograve: Ograve$2, Oslash: Oslash$2, Otilde: Otilde$2, Ouml: Ouml$2, QUOT: QUOT$1, REG: REG$1, THORN: THORN$2, Uacute: Uacute$2, Ucirc: Ucirc$2, Ugrave: Ugrave$2, Uuml: Uuml$2, Yacute: Yacute$2, aacute: aacute$2, acirc: acirc$2, acute: acute$2, aelig: aelig$2, agrave: agrave$2, amp: amp$2, aring: aring$2, atilde: atilde$2, auml: auml$2, brvbar: brvbar$2, ccedil: ccedil$2, cedil: cedil$2, cent: cent$2, copy: copy$2, curren: curren$2, deg: deg$2, divide: divide$2, eacute: eacute$2, ecirc: ecirc$2, egrave: egrave$2, eth: eth$2, euml: euml$2, frac12: frac12$2, frac14: frac14$2, frac34: frac34$2, gt: gt$2, iacute: iacute$2, icirc: icirc$2, iexcl: iexcl$2, igrave: igrave$2, iquest: iquest$2, iuml: iuml$2, laquo: laquo$2, lt: lt$2, macr: macr$2, micro: micro$2, middot: middot$2, nbsp: nbsp$2, not: not$2, ntilde: ntilde$2, oacute: oacute$2, ocirc: ocirc$2, ograve: ograve$2, ordf: ordf$2, ordm: ordm$2, oslash: oslash$2, otilde: otilde$2, ouml: ouml$2, para: para$2, plusmn: plusmn$2, pound: pound$2, quot: quot$2, raquo: raquo$2, reg: reg$2, sect: sect$2, shy: shy$2, sup1: sup1$2, sup2: sup2$2, sup3: sup3$2, szlig: szlig$2, thorn: thorn$2, times: times$2, uacute: uacute$2, ucirc: ucirc$2, ugrave: ugrave$2, uml: uml$2, uuml: uuml$2, yacute: yacute$2, yen: yen$2, yuml: yuml$2, 'default': index$5 }); var index$4 = { "0": "�", "128": "€", "130": "‚", "131": "ƒ", "132": "„", "133": "…", "134": "†", "135": "‡", "136": "ˆ", "137": "‰", "138": "Š", "139": "‹", "140": "Œ", "142": "Ž", "145": "‘", "146": "’", "147": "“", "148": "”", "149": "•", "150": "–", "151": "—", "152": "˜", "153": "™", "154": "š", "155": "›", "156": "œ", "158": "ž", "159": "Ÿ" }; var characterReferenceInvalid = /*#__PURE__*/Object.freeze({ __proto__: null, 'default': index$4 }); var isDecimal = decimal$1; // Check if the given character code, or the character code at the first // character, is decimal. function decimal$1(character) { var code = typeof character === 'string' ? character.charCodeAt(0) : character; return code >= 48 && code <= 57 /* 0-9 */ } var isHexadecimal = hexadecimal; // Check if the given character code, or the character code at the first // character, is hexadecimal. function hexadecimal(character) { var code = typeof character === 'string' ? character.charCodeAt(0) : character; return ( (code >= 97 /* a */ && code <= 102) /* z */ || (code >= 65 /* A */ && code <= 70) /* Z */ || (code >= 48 /* A */ && code <= 57) /* Z */ ) } var isAlphabetical = alphabetical; // Check if the given character code, or the character code at the first // character, is alphabetical. function alphabetical(character) { var code = typeof character === 'string' ? character.charCodeAt(0) : character; return ( (code >= 97 && code <= 122) /* a-z */ || (code >= 65 && code <= 90) /* A-Z */ ) } var isAlphanumerical = alphanumerical; // Check if the given character code, or the character code at the first // character, is alphanumerical. function alphanumerical(character) { return isAlphabetical(character) || isDecimal(character) } var AEli = "Æ"; var AElig$1 = "Æ"; var AM = "&"; var AMP$1 = "&"; var Aacut = "Á"; var Aacute$1 = "Á"; var Abreve = "Ă"; var Acir = "Â"; var Acirc$1 = "Â"; var Acy = "А"; var Afr = "𝔄"; var Agrav = "À"; var Agrave$1 = "À"; var Alpha$1 = "Α"; var Amacr = "Ā"; var And = "⩓"; var Aogon = "Ą"; var Aopf = "𝔸"; var ApplyFunction = "⁡"; var Arin = "Å"; var Aring$1 = "Å"; var Ascr = "𝒜"; var Assign = "≔"; var Atild = "Ã"; var Atilde$1 = "Ã"; var Aum = "Ä"; var Auml$1 = "Ä"; var Backslash = "∖"; var Barv = "⫧"; var Barwed = "⌆"; var Bcy = "Б"; var Because = "∵"; var Bernoullis = "ℬ"; var Beta$1 = "Β"; var Bfr = "𝔅"; var Bopf = "𝔹"; var Breve = "˘"; var Bscr = "ℬ"; var Bumpeq = "≎"; var CHcy = "Ч"; var COP = "©"; var COPY = "©"; var Cacute = "Ć"; var Cap = "⋒"; var CapitalDifferentialD = "ⅅ"; var Cayleys = "ℭ"; var Ccaron = "Č"; var Ccedi = "Ç"; var Ccedil$1 = "Ç"; var Ccirc = "Ĉ"; var Cconint = "∰"; var Cdot = "Ċ"; var Cedilla = "¸"; var CenterDot = "·"; var Cfr = "ℭ"; var Chi$1 = "Χ"; var CircleDot = "⊙"; var CircleMinus = "⊖"; var CirclePlus = "⊕"; var CircleTimes = "⊗"; var ClockwiseContourIntegral = "∲"; var CloseCurlyDoubleQuote = "”"; var CloseCurlyQuote = "’"; var Colon = "∷"; var Colone = "⩴"; var Congruent = "≡"; var Conint = "∯"; var ContourIntegral = "∮"; var Copf = "ℂ"; var Coproduct = "∐"; var CounterClockwiseContourIntegral = "∳"; var Cross = "⨯"; var Cscr = "𝒞"; var Cup = "⋓"; var CupCap = "≍"; var DD = "ⅅ"; var DDotrahd = "⤑"; var DJcy = "Ђ"; var DScy = "Ѕ"; var DZcy = "Џ"; var Dagger$1 = "‡"; var Darr = "↡"; var Dashv = "⫤"; var Dcaron = "Ď"; var Dcy = "Д"; var Del = "∇"; var Delta$1 = "Δ"; var Dfr = "𝔇"; var DiacriticalAcute = "´"; var DiacriticalDot = "˙"; var DiacriticalDoubleAcute = "˝"; var DiacriticalGrave = "`"; var DiacriticalTilde = "˜"; var Diamond = "⋄"; var DifferentialD = "ⅆ"; var Dopf = "𝔻"; var Dot = "¨"; var DotDot = "⃜"; var DotEqual = "≐"; var DoubleContourIntegral = "∯"; var DoubleDot = "¨"; var DoubleDownArrow = "⇓"; var DoubleLeftArrow = "⇐"; var DoubleLeftRightArrow = "⇔"; var DoubleLeftTee = "⫤"; var DoubleLongLeftArrow = "⟸"; var DoubleLongLeftRightArrow = "⟺"; var DoubleLongRightArrow = "⟹"; var DoubleRightArrow = "⇒"; var DoubleRightTee = "⊨"; var DoubleUpArrow = "⇑"; var DoubleUpDownArrow = "⇕"; var DoubleVerticalBar = "∥"; var DownArrow = "↓"; var DownArrowBar = "⤓"; var DownArrowUpArrow = "⇵"; var DownBreve = "̑"; var DownLeftRightVector = "⥐"; var DownLeftTeeVector = "⥞"; var DownLeftVector = "↽"; var DownLeftVectorBar = "⥖"; var DownRightTeeVector = "⥟"; var DownRightVector = "⇁"; var DownRightVectorBar = "⥗"; var DownTee = "⊤"; var DownTeeArrow = "↧"; var Downarrow = "⇓"; var Dscr = "𝒟"; var Dstrok = "Đ"; var ENG = "Ŋ"; var ET = "Ð"; var ETH$1 = "Ð"; var Eacut = "É"; var Eacute$1 = "É"; var Ecaron = "Ě"; var Ecir = "Ê"; var Ecirc$1 = "Ê"; var Ecy = "Э"; var Edot = "Ė"; var Efr = "𝔈"; var Egrav = "È"; var Egrave$1 = "È"; var Element = "∈"; var Emacr = "Ē"; var EmptySmallSquare = "◻"; var EmptyVerySmallSquare = "▫"; var Eogon = "Ę"; var Eopf = "𝔼"; var Epsilon$1 = "Ε"; var Equal = "⩵"; var EqualTilde = "≂"; var Equilibrium = "⇌"; var Escr = "ℰ"; var Esim = "⩳"; var Eta$1 = "Η"; var Eum = "Ë"; var Euml$1 = "Ë"; var Exists = "∃"; var ExponentialE = "ⅇ"; var Fcy = "Ф"; var Ffr = "𝔉"; var FilledSmallSquare = "◼"; var FilledVerySmallSquare = "▪"; var Fopf = "𝔽"; var ForAll = "∀"; var Fouriertrf = "ℱ"; var Fscr = "ℱ"; var GJcy = "Ѓ"; var G = ">"; var GT$1 = ">"; var Gamma$1 = "Γ"; var Gammad = "Ϝ"; var Gbreve = "Ğ"; var Gcedil = "Ģ"; var Gcirc = "Ĝ"; var Gcy = "Г"; var Gdot = "Ġ"; var Gfr = "𝔊"; var Gg = "⋙"; var Gopf = "𝔾"; var GreaterEqual = "≥"; var GreaterEqualLess = "⋛"; var GreaterFullEqual = "≧"; var GreaterGreater = "⪢"; var GreaterLess = "≷"; var GreaterSlantEqual = "⩾"; var GreaterTilde = "≳"; var Gscr = "𝒢"; var Gt = "≫"; var HARDcy = "Ъ"; var Hacek = "ˇ"; var Hat = "^"; var Hcirc = "Ĥ"; var Hfr = "ℌ"; var HilbertSpace = "ℋ"; var Hopf = "ℍ"; var HorizontalLine = "─"; var Hscr = "ℋ"; var Hstrok = "Ħ"; var HumpDownHump = "≎"; var HumpEqual = "≏"; var IEcy = "Е"; var IJlig = "IJ"; var IOcy = "Ё"; var Iacut = "Í"; var Iacute$1 = "Í"; var Icir = "Î"; var Icirc$1 = "Î"; var Icy = "И"; var Idot = "İ"; var Ifr = "ℑ"; var Igrav = "Ì"; var Igrave$1 = "Ì"; var Im = "ℑ"; var Imacr = "Ī"; var ImaginaryI = "ⅈ"; var Implies = "⇒"; var Int = "∬"; var Integral = "∫"; var Intersection = "⋂"; var InvisibleComma = "⁣"; var InvisibleTimes = "⁢"; var Iogon = "Į"; var Iopf = "𝕀"; var Iota$1 = "Ι"; var Iscr = "ℐ"; var Itilde = "Ĩ"; var Iukcy = "І"; var Ium = "Ï"; var Iuml$1 = "Ï"; var Jcirc = "Ĵ"; var Jcy = "Й"; var Jfr = "𝔍"; var Jopf = "𝕁"; var Jscr = "𝒥"; var Jsercy = "Ј"; var Jukcy = "Є"; var KHcy = "Х"; var KJcy = "Ќ"; var Kappa$1 = "Κ"; var Kcedil = "Ķ"; var Kcy = "К"; var Kfr = "𝔎"; var Kopf = "𝕂"; var Kscr = "𝒦"; var LJcy = "Љ"; var L = "<"; var LT$1 = "<"; var Lacute = "Ĺ"; var Lambda$1 = "Λ"; var Lang = "⟪"; var Laplacetrf = "ℒ"; var Larr = "↞"; var Lcaron = "Ľ"; var Lcedil = "Ļ"; var Lcy = "Л"; var LeftAngleBracket = "⟨"; var LeftArrow = "←"; var LeftArrowBar = "⇤"; var LeftArrowRightArrow = "⇆"; var LeftCeiling = "⌈"; var LeftDoubleBracket = "⟦"; var LeftDownTeeVector = "⥡"; var LeftDownVector = "⇃"; var LeftDownVectorBar = "⥙"; var LeftFloor = "⌊"; var LeftRightArrow = "↔"; var LeftRightVector = "⥎"; var LeftTee = "⊣"; var LeftTeeArrow = "↤"; var LeftTeeVector = "⥚"; var LeftTriangle = "⊲"; var LeftTriangleBar = "⧏"; var LeftTriangleEqual = "⊴"; var LeftUpDownVector = "⥑"; var LeftUpTeeVector = "⥠"; var LeftUpVector = "↿"; var LeftUpVectorBar = "⥘"; var LeftVector = "↼"; var LeftVectorBar = "⥒"; var Leftarrow = "⇐"; var Leftrightarrow = "⇔"; var LessEqualGreater = "⋚"; var LessFullEqual = "≦"; var LessGreater = "≶"; var LessLess = "⪡"; var LessSlantEqual = "⩽"; var LessTilde = "≲"; var Lfr = "𝔏"; var Ll = "⋘"; var Lleftarrow = "⇚"; var Lmidot = "Ŀ"; var LongLeftArrow = "⟵"; var LongLeftRightArrow = "⟷"; var LongRightArrow = "⟶"; var Longleftarrow = "⟸"; var Longleftrightarrow = "⟺"; var Longrightarrow = "⟹"; var Lopf = "𝕃"; var LowerLeftArrow = "↙"; var LowerRightArrow = "↘"; var Lscr = "ℒ"; var Lsh = "↰"; var Lstrok = "Ł"; var Lt = "≪"; var Mcy = "М"; var MediumSpace = " "; var Mellintrf = "ℳ"; var Mfr = "𝔐"; var MinusPlus = "∓"; var Mopf = "𝕄"; var Mscr = "ℳ"; var Mu$1 = "Μ"; var NJcy = "Њ"; var Nacute = "Ń"; var Ncaron = "Ň"; var Ncedil = "Ņ"; var Ncy = "Н"; var NegativeMediumSpace = "​"; var NegativeThickSpace = "​"; var NegativeThinSpace = "​"; var NegativeVeryThinSpace = "​"; var NestedGreaterGreater = "≫"; var NestedLessLess = "≪"; var NewLine = "\n"; var Nfr = "𝔑"; var NoBreak = "⁠"; var NonBreakingSpace = " "; var Nopf = "ℕ"; var Not = "⫬"; var NotCongruent = "≢"; var NotCupCap = "≭"; var NotDoubleVerticalBar = "∦"; var NotElement = "∉"; var NotEqual = "≠"; var NotEqualTilde = "≂̸"; var NotExists = "∄"; var NotGreater = "≯"; var NotGreaterEqual = "≱"; var NotGreaterFullEqual = "≧̸"; var NotGreaterGreater = "≫̸"; var NotGreaterLess = "≹"; var NotGreaterSlantEqual = "⩾̸"; var NotGreaterTilde = "≵"; var NotHumpDownHump = "≎̸"; var NotHumpEqual = "≏̸"; var NotLeftTriangle = "⋪"; var NotLeftTriangleBar = "⧏̸"; var NotLeftTriangleEqual = "⋬"; var NotLess = "≮"; var NotLessEqual = "≰"; var NotLessGreater = "≸"; var NotLessLess = "≪̸"; var NotLessSlantEqual = "⩽̸"; var NotLessTilde = "≴"; var NotNestedGreaterGreater = "⪢̸"; var NotNestedLessLess = "⪡̸"; var NotPrecedes = "⊀"; var NotPrecedesEqual = "⪯̸"; var NotPrecedesSlantEqual = "⋠"; var NotReverseElement = "∌"; var NotRightTriangle = "⋫"; var NotRightTriangleBar = "⧐̸"; var NotRightTriangleEqual = "⋭"; var NotSquareSubset = "⊏̸"; var NotSquareSubsetEqual = "⋢"; var NotSquareSuperset = "⊐̸"; var NotSquareSupersetEqual = "⋣"; var NotSubset = "⊂⃒"; var NotSubsetEqual = "⊈"; var NotSucceeds = "⊁"; var NotSucceedsEqual = "⪰̸"; var NotSucceedsSlantEqual = "⋡"; var NotSucceedsTilde = "≿̸"; var NotSuperset = "⊃⃒"; var NotSupersetEqual = "⊉"; var NotTilde = "≁"; var NotTildeEqual = "≄"; var NotTildeFullEqual = "≇"; var NotTildeTilde = "≉"; var NotVerticalBar = "∤"; var Nscr = "𝒩"; var Ntild = "Ñ"; var Ntilde$1 = "Ñ"; var Nu$1 = "Ν"; var OElig$1 = "Œ"; var Oacut = "Ó"; var Oacute$1 = "Ó"; var Ocir = "Ô"; var Ocirc$1 = "Ô"; var Ocy = "О"; var Odblac = "Ő"; var Ofr = "𝔒"; var Ograv = "Ò"; var Ograve$1 = "Ò"; var Omacr = "Ō"; var Omega$1 = "Ω"; var Omicron$1 = "Ο"; var Oopf = "𝕆"; var OpenCurlyDoubleQuote = "“"; var OpenCurlyQuote = "‘"; var Or = "⩔"; var Oscr = "𝒪"; var Oslas = "Ø"; var Oslash$1 = "Ø"; var Otild = "Õ"; var Otilde$1 = "Õ"; var Otimes = "⨷"; var Oum = "Ö"; var Ouml$1 = "Ö"; var OverBar = "‾"; var OverBrace = "⏞"; var OverBracket = "⎴"; var OverParenthesis = "⏜"; var PartialD = "∂"; var Pcy = "П"; var Pfr = "𝔓"; var Phi$1 = "Φ"; var Pi$1 = "Π"; var PlusMinus = "±"; var Poincareplane = "ℌ"; var Popf = "ℙ"; var Pr = "⪻"; var Precedes = "≺"; var PrecedesEqual = "⪯"; var PrecedesSlantEqual = "≼"; var PrecedesTilde = "≾"; var Prime$1 = "″"; var Product = "∏"; var Proportion = "∷"; var Proportional = "∝"; var Pscr = "𝒫"; var Psi$1 = "Ψ"; var QUO = "\""; var QUOT = "\""; var Qfr = "𝔔"; var Qopf = "ℚ"; var Qscr = "𝒬"; var RBarr = "⤐"; var RE = "®"; var REG = "®"; var Racute = "Ŕ"; var Rang = "⟫"; var Rarr = "↠"; var Rarrtl = "⤖"; var Rcaron = "Ř"; var Rcedil = "Ŗ"; var Rcy = "Р"; var Re = "ℜ"; var ReverseElement = "∋"; var ReverseEquilibrium = "⇋"; var ReverseUpEquilibrium = "⥯"; var Rfr = "ℜ"; var Rho$1 = "Ρ"; var RightAngleBracket = "⟩"; var RightArrow = "→"; var RightArrowBar = "⇥"; var RightArrowLeftArrow = "⇄"; var RightCeiling = "⌉"; var RightDoubleBracket = "⟧"; var RightDownTeeVector = "⥝"; var RightDownVector = "⇂"; var RightDownVectorBar = "⥕"; var RightFloor = "⌋"; var RightTee = "⊢"; var RightTeeArrow = "↦"; var RightTeeVector = "⥛"; var RightTriangle = "⊳"; var RightTriangleBar = "⧐"; var RightTriangleEqual = "⊵"; var RightUpDownVector = "⥏"; var RightUpTeeVector = "⥜"; var RightUpVector = "↾"; var RightUpVectorBar = "⥔"; var RightVector = "⇀"; var RightVectorBar = "⥓"; var Rightarrow = "⇒"; var Ropf = "ℝ"; var RoundImplies = "⥰"; var Rrightarrow = "⇛"; var Rscr = "ℛ"; var Rsh = "↱"; var RuleDelayed = "⧴"; var SHCHcy = "Щ"; var SHcy = "Ш"; var SOFTcy = "Ь"; var Sacute = "Ś"; var Sc = "⪼"; var Scaron$1 = "Š"; var Scedil = "Ş"; var Scirc = "Ŝ"; var Scy = "С"; var Sfr = "𝔖"; var ShortDownArrow = "↓"; var ShortLeftArrow = "←"; var ShortRightArrow = "→"; var ShortUpArrow = "↑"; var Sigma$1 = "Σ"; var SmallCircle = "∘"; var Sopf = "𝕊"; var Sqrt = "√"; var Square = "□"; var SquareIntersection = "⊓"; var SquareSubset = "⊏"; var SquareSubsetEqual = "⊑"; var SquareSuperset = "⊐"; var SquareSupersetEqual = "⊒"; var SquareUnion = "⊔"; var Sscr = "𝒮"; var Star = "⋆"; var Sub = "⋐"; var Subset = "⋐"; var SubsetEqual = "⊆"; var Succeeds = "≻"; var SucceedsEqual = "⪰"; var SucceedsSlantEqual = "≽"; var SucceedsTilde = "≿"; var SuchThat = "∋"; var Sum = "∑"; var Sup = "⋑"; var Superset = "⊃"; var SupersetEqual = "⊇"; var Supset = "⋑"; var THOR = "Þ"; var THORN$1 = "Þ"; var TRADE = "™"; var TSHcy = "Ћ"; var TScy = "Ц"; var Tab = "\t"; var Tau$1 = "