You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
parttimejob/node_modules/vue-markdown/dist/vue-markdown.js

22448 lines
994 KiB

4 weeks ago
/**
* vue-markdown v2.2.4
* https://github.com/miaolz123/vue-markdown
* MIT License
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["VueMarkdown"] = factory();
else
root["VueMarkdown"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.install = install;
var _VueMarkdown = __webpack_require__(1);
var _VueMarkdown2 = _interopRequireDefault(_VueMarkdown);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function install(Vue) {
Vue.component('vue-markdown', _VueMarkdown2.default);
}
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getIterator2 = __webpack_require__(2);
var _getIterator3 = _interopRequireDefault(_getIterator2);
var _keys = __webpack_require__(55);
var _keys2 = _interopRequireDefault(_keys);
var _markdownIt = __webpack_require__(59);
var _markdownIt2 = _interopRequireDefault(_markdownIt);
var _markdownItEmoji = __webpack_require__(127);
var _markdownItEmoji2 = _interopRequireDefault(_markdownItEmoji);
var _markdownItSub = __webpack_require__(133);
var _markdownItSub2 = _interopRequireDefault(_markdownItSub);
var _markdownItSup = __webpack_require__(134);
var _markdownItSup2 = _interopRequireDefault(_markdownItSup);
var _markdownItFootnote = __webpack_require__(135);
var _markdownItFootnote2 = _interopRequireDefault(_markdownItFootnote);
var _markdownItDeflist = __webpack_require__(136);
var _markdownItDeflist2 = _interopRequireDefault(_markdownItDeflist);
var _markdownItAbbr = __webpack_require__(137);
var _markdownItAbbr2 = _interopRequireDefault(_markdownItAbbr);
var _markdownItIns = __webpack_require__(138);
var _markdownItIns2 = _interopRequireDefault(_markdownItIns);
var _markdownItMark = __webpack_require__(139);
var _markdownItMark2 = _interopRequireDefault(_markdownItMark);
var _markdownItTocAndAnchor = __webpack_require__(140);
var _markdownItTocAndAnchor2 = _interopRequireDefault(_markdownItTocAndAnchor);
var _markdownItKatex = __webpack_require__(153);
var _markdownItKatex2 = _interopRequireDefault(_markdownItKatex);
var _markdownItTaskLists = __webpack_require__(177);
var _markdownItTaskLists2 = _interopRequireDefault(_markdownItTaskLists);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = {
md: new _markdownIt2.default(),
template: '<div><slot></slot></div>',
data: function data() {
return {
sourceData: this.source
};
},
props: {
watches: {
type: Array,
default: function _default() {
return ['source', 'show', 'toc'];
}
},
source: {
type: String,
default: ''
},
show: {
type: Boolean,
default: true
},
highlight: {
type: Boolean,
default: true
},
html: {
type: Boolean,
default: true
},
xhtmlOut: {
type: Boolean,
default: true
},
breaks: {
type: Boolean,
default: true
},
linkify: {
type: Boolean,
default: true
},
emoji: {
type: Boolean,
default: true
},
typographer: {
type: Boolean,
default: true
},
langPrefix: {
type: String,
default: 'language-'
},
quotes: {
type: String,
default: '“”‘’'
},
tableClass: {
type: String,
default: 'table'
},
taskLists: {
type: Boolean,
default: true
},
toc: {
type: Boolean,
default: false
},
tocId: {
type: String
},
tocClass: {
type: String,
default: 'table-of-contents'
},
tocFirstLevel: {
type: Number,
default: 2
},
tocLastLevel: {
type: Number
},
tocAnchorLink: {
type: Boolean,
default: true
},
tocAnchorClass: {
type: String,
default: 'toc-anchor'
},
tocAnchorLinkSymbol: {
type: String,
default: '#'
},
tocAnchorLinkSpace: {
type: Boolean,
default: true
},
tocAnchorLinkClass: {
type: String,
default: 'toc-anchor-link'
},
anchorAttributes: {
type: Object,
default: function _default() {
return {};
}
},
prerender: {
type: Function,
default: function _default(sourceData) {
return sourceData;
}
},
postrender: {
type: Function,
default: function _default(htmlData) {
return htmlData;
}
}
},
computed: {
tocLastLevelComputed: function tocLastLevelComputed() {
return this.tocLastLevel > this.tocFirstLevel ? this.tocLastLevel : this.tocFirstLevel + 1;
}
},
render: function render(createElement) {
var _this = this;
this.md = new _markdownIt2.default().use(_markdownItSub2.default).use(_markdownItSup2.default).use(_markdownItFootnote2.default).use(_markdownItDeflist2.default).use(_markdownItAbbr2.default).use(_markdownItIns2.default).use(_markdownItMark2.default).use(_markdownItKatex2.default, { "throwOnError": false, "errorColor": " #cc0000" }).use(_markdownItTaskLists2.default, { enabled: this.taskLists });
if (this.emoji) {
this.md.use(_markdownItEmoji2.default);
}
this.md.set({
html: this.html,
xhtmlOut: this.xhtmlOut,
breaks: this.breaks,
linkify: this.linkify,
typographer: this.typographer,
langPrefix: this.langPrefix,
quotes: this.quotes
});
this.md.renderer.rules.table_open = function () {
return '<table class="' + _this.tableClass + '">\n';
};
var defaultLinkRenderer = this.md.renderer.rules.link_open || function (tokens, idx, options, env, self) {
return self.renderToken(tokens, idx, options);
};
this.md.renderer.rules.link_open = function (tokens, idx, options, env, self) {
(0, _keys2.default)(_this.anchorAttributes).map(function (attribute) {
var aIndex = tokens[idx].attrIndex(attribute);
var value = _this.anchorAttributes[attribute];
if (aIndex < 0) {
tokens[idx].attrPush([attribute, value]); // add new attribute
} else {
tokens[idx].attrs[aIndex][1] = value;
}
});
return defaultLinkRenderer(tokens, idx, options, env, self);
};
if (this.toc) {
this.md.use(_markdownItTocAndAnchor2.default, {
tocClassName: this.tocClass,
tocFirstLevel: this.tocFirstLevel,
tocLastLevel: this.tocLastLevelComputed,
anchorLink: this.tocAnchorLink,
anchorLinkSymbol: this.tocAnchorLinkSymbol,
anchorLinkSpace: this.tocAnchorLinkSpace,
anchorClassName: this.tocAnchorClass,
anchorLinkSymbolClassName: this.tocAnchorLinkClass,
tocCallback: function tocCallback(tocMarkdown, tocArray, tocHtml) {
if (tocHtml) {
if (_this.tocId && document.getElementById(_this.tocId)) {
document.getElementById(_this.tocId).innerHTML = tocHtml;
}
_this.$emit('toc-rendered', tocHtml);
}
}
});
}
var outHtml = this.show ? this.md.render(this.prerender(this.sourceData)) : '';
outHtml = this.postrender(outHtml);
this.$emit('rendered', outHtml);
return createElement('div', {
domProps: {
innerHTML: outHtml
}
});
},
beforeMount: function beforeMount() {
var _this2 = this;
if (this.$slots.default) {
this.sourceData = '';
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = (0, _getIterator3.default)(this.$slots.default), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var slot = _step.value;
this.sourceData += slot.text;
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
}
this.$watch('source', function () {
_this2.sourceData = _this2.prerender(_this2.source);
_this2.$forceUpdate();
});
this.watches.forEach(function (v) {
_this2.$watch(v, function () {
_this2.$forceUpdate();
});
});
}
};
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(3), __esModule: true };
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(4);
__webpack_require__(50);
module.exports = __webpack_require__(52);
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(5);
var global = __webpack_require__(16)
, hide = __webpack_require__(20)
, Iterators = __webpack_require__(8)
, TO_STRING_TAG = __webpack_require__(47)('toStringTag');
for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
var NAME = collections[i]
, Collection = global[NAME]
, proto = Collection && Collection.prototype;
if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
Iterators[NAME] = Iterators.Array;
}
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
var addToUnscopables = __webpack_require__(6)
, step = __webpack_require__(7)
, Iterators = __webpack_require__(8)
, toIObject = __webpack_require__(9);
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__(13)(Array, 'Array', function(iterated, kind){
this._t = toIObject(iterated); // target
this._i = 0; // next index
this._k = kind; // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function(){
var O = this._t
, kind = this._k
, index = this._i++;
if(!O || index >= O.length){
this._t = undefined;
return step(1);
}
if(kind == 'keys' )return step(0, index);
if(kind == 'values')return step(0, O[index]);
return step(0, [index, O[index]]);
}, 'values');
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
/***/ }),
/* 6 */
/***/ (function(module, exports) {
module.exports = function(){ /* empty */ };
/***/ }),
/* 7 */
/***/ (function(module, exports) {
module.exports = function(done, value){
return {value: value, done: !!done};
};
/***/ }),
/* 8 */
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(10)
, defined = __webpack_require__(12);
module.exports = function(it){
return IObject(defined(it));
};
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(11);
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ }),
/* 11 */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function(it){
return toString.call(it).slice(8, -1);
};
/***/ }),
/* 12 */
/***/ (function(module, exports) {
// 7.2.1 RequireObjectCoercible(argument)
module.exports = function(it){
if(it == undefined)throw TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
var LIBRARY = __webpack_require__(14)
, $export = __webpack_require__(15)
, redefine = __webpack_require__(30)
, hide = __webpack_require__(20)
, has = __webpack_require__(31)
, Iterators = __webpack_require__(8)
, $iterCreate = __webpack_require__(32)
, setToStringTag = __webpack_require__(46)
, getPrototypeOf = __webpack_require__(48)
, ITERATOR = __webpack_require__(47)('iterator')
, BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
, FF_ITERATOR = '@@iterator'
, KEYS = 'keys'
, VALUES = 'values';
var returnThis = function(){ return this; };
module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
$iterCreate(Constructor, NAME, next);
var getMethod = function(kind){
if(!BUGGY && kind in proto)return proto[kind];
switch(kind){
case KEYS: return function keys(){ return new Constructor(this, kind); };
case VALUES: return function values(){ return new Constructor(this, kind); };
} return function entries(){ return new Constructor(this, kind); };
};
var TAG = NAME + ' Iterator'
, DEF_VALUES = DEFAULT == VALUES
, VALUES_BUG = false
, proto = Base.prototype
, $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
, $default = $native || getMethod(DEFAULT)
, $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
, $anyNative = NAME == 'Array' ? proto.entries || $native : $native
, methods, key, IteratorPrototype;
// Fix native
if($anyNative){
IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
if(IteratorPrototype !== Object.prototype){
// Set @@toStringTag to native iterators
setToStringTag(IteratorPrototype, TAG, true);
// fix for some old engines
if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
}
}
// fix Array#{values, @@iterator}.name in V8 / FF
if(DEF_VALUES && $native && $native.name !== VALUES){
VALUES_BUG = true;
$default = function values(){ return $native.call(this); };
}
// Define iterator
if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
hide(proto, ITERATOR, $default);
}
// Plug for library
Iterators[NAME] = $default;
Iterators[TAG] = returnThis;
if(DEFAULT){
methods = {
values: DEF_VALUES ? $default : getMethod(VALUES),
keys: IS_SET ? $default : getMethod(KEYS),
entries: $entries
};
if(FORCED)for(key in methods){
if(!(key in proto))redefine(proto, key, methods[key]);
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
}
return methods;
};
/***/ }),
/* 14 */
/***/ (function(module, exports) {
module.exports = true;
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(16)
, core = __webpack_require__(17)
, ctx = __webpack_require__(18)
, hide = __webpack_require__(20)
, PROTOTYPE = 'prototype';
var $export = function(type, name, source){
var IS_FORCED = type & $export.F
, IS_GLOBAL = type & $export.G
, IS_STATIC = type & $export.S
, IS_PROTO = type & $export.P
, IS_BIND = type & $export.B
, IS_WRAP = type & $export.W
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
, expProto = exports[PROTOTYPE]
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
, key, own, out;
if(IS_GLOBAL)source = name;
for(key in source){
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
if(own && key in exports)continue;
// export native or passed
out = own ? target[key] : source[key];
// prevent global pollution for namespaces
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
// bind timers to global for call from export context
: IS_BIND && own ? ctx(out, global)
// wrap global constructors for prevent change them in library
: IS_WRAP && target[key] == out ? (function(C){
var F = function(a, b, c){
if(this instanceof C){
switch(arguments.length){
case 0: return new C;
case 1: return new C(a);
case 2: return new C(a, b);
} return new C(a, b, c);
} return C.apply(this, arguments);
};
F[PROTOTYPE] = C[PROTOTYPE];
return F;
// make static versions for prototype methods
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
if(IS_PROTO){
(exports.virtual || (exports.virtual = {}))[key] = out;
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
}
}
};
// type bitmap
$export.F = 1; // forced
$export.G = 2; // global
$export.S = 4; // static
$export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
$export.U = 64; // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;
/***/ }),
/* 16 */
/***/ (function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
/***/ }),
/* 17 */
/***/ (function(module, exports) {
var core = module.exports = {version: '2.4.0'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(19);
module.exports = function(fn, that, length){
aFunction(fn);
if(that === undefined)return fn;
switch(length){
case 1: return function(a){
return fn.call(that, a);
};
case 2: return function(a, b){
return fn.call(that, a, b);
};
case 3: return function(a, b, c){
return fn.call(that, a, b, c);
};
}
return function(/* ...args */){
return fn.apply(that, arguments);
};
};
/***/ }),
/* 19 */
/***/ (function(module, exports) {
module.exports = function(it){
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(21)
, createDesc = __webpack_require__(29);
module.exports = __webpack_require__(25) ? function(object, key, value){
return dP.f(object, key, createDesc(1, value));
} : function(object, key, value){
object[key] = value;
return object;
};
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(22)
, IE8_DOM_DEFINE = __webpack_require__(24)
, toPrimitive = __webpack_require__(28)
, dP = Object.defineProperty;
exports.f = __webpack_require__(25) ? Object.defineProperty : function defineProperty(O, P, Attributes){
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if(IE8_DOM_DEFINE)try {
return dP(O, P, Attributes);
} catch(e){ /* empty */ }
if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
if('value' in Attributes)O[P] = Attributes.value;
return O;
};
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(23);
module.exports = function(it){
if(!isObject(it))throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/* 23 */
/***/ (function(module, exports) {
module.exports = function(it){
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(25) && !__webpack_require__(26)(function(){
return Object.defineProperty(__webpack_require__(27)('div'), 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(26)(function(){
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ }),
/* 26 */
/***/ (function(module, exports) {
module.exports = function(exec){
try {
return !!exec();
} catch(e){
return true;
}
};
/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(23)
, document = __webpack_require__(16).document
// in old IE typeof document.createElement is 'object'
, is = isObject(document) && isObject(document.createElement);
module.exports = function(it){
return is ? document.createElement(it) : {};
};
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(23);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function(it, S){
if(!isObject(it))return it;
var fn, val;
if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/* 29 */
/***/ (function(module, exports) {
module.exports = function(bitmap, value){
return {
enumerable : !(bitmap & 1),
configurable: !(bitmap & 2),
writable : !(bitmap & 4),
value : value
};
};
/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(20);
/***/ }),
/* 31 */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function(it, key){
return hasOwnProperty.call(it, key);
};
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
var create = __webpack_require__(33)
, descriptor = __webpack_require__(29)
, setToStringTag = __webpack_require__(46)
, IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(20)(IteratorPrototype, __webpack_require__(47)('iterator'), function(){ return this; });
module.exports = function(Constructor, NAME, next){
Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
setToStringTag(Constructor, NAME + ' Iterator');
};
/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(22)
, dPs = __webpack_require__(34)
, enumBugKeys = __webpack_require__(44)
, IE_PROTO = __webpack_require__(41)('IE_PROTO')
, Empty = function(){ /* empty */ }
, PROTOTYPE = 'prototype';
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function(){
// Thrash, waste and sodomy: IE GC bug
var iframe = __webpack_require__(27)('iframe')
, i = enumBugKeys.length
, lt = '<'
, gt = '>'
, iframeDocument;
iframe.style.display = 'none';
__webpack_require__(45).appendChild(iframe);
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
// createDict = iframe.contentWindow.Object;
// html.removeChild(iframe);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
iframeDocument.close();
createDict = iframeDocument.F;
while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
return createDict();
};
module.exports = Object.create || function create(O, Properties){
var result;
if(O !== null){
Empty[PROTOTYPE] = anObject(O);
result = new Empty;
Empty[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = createDict();
return Properties === undefined ? result : dPs(result, Properties);
};
/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(21)
, anObject = __webpack_require__(22)
, getKeys = __webpack_require__(35);
module.exports = __webpack_require__(25) ? Object.defineProperties : function defineProperties(O, Properties){
anObject(O);
var keys = getKeys(Properties)
, length = keys.length
, i = 0
, P;
while(length > i)dP.f(O, P = keys[i++], Properties[P]);
return O;
};
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(36)
, enumBugKeys = __webpack_require__(44);
module.exports = Object.keys || function keys(O){
return $keys(O, enumBugKeys);
};
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(31)
, toIObject = __webpack_require__(9)
, arrayIndexOf = __webpack_require__(37)(false)
, IE_PROTO = __webpack_require__(41)('IE_PROTO');
module.exports = function(object, names){
var O = toIObject(object)
, i = 0
, result = []
, key;
for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
// Don't enum bug & hidden keys
while(names.length > i)if(has(O, key = names[i++])){
~arrayIndexOf(result, key) || result.push(key);
}
return result;
};
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__(9)
, toLength = __webpack_require__(38)
, toIndex = __webpack_require__(40);
module.exports = function(IS_INCLUDES){
return function($this, el, fromIndex){
var O = toIObject($this)
, length = toLength(O.length)
, index = toIndex(fromIndex, length)
, value;
// Array#includes uses SameValueZero equality algorithm
if(IS_INCLUDES && el != el)while(length > index){
value = O[index++];
if(value != value)return true;
// Array#toIndex ignores holes, Array#includes - not
} else for(;length > index; index++)if(IS_INCLUDES || index in O){
if(O[index] === el)return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__(39)
, min = Math.min;
module.exports = function(it){
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/* 39 */
/***/ (function(module, exports) {
// 7.1.4 ToInteger
var ceil = Math.ceil
, floor = Math.floor;
module.exports = function(it){
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(39)
, max = Math.max
, min = Math.min;
module.exports = function(index, length){
index = toInteger(index);
return index < 0 ? max(index + length, 0) : min(index, length);
};
/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__(42)('keys')
, uid = __webpack_require__(43);
module.exports = function(key){
return shared[key] || (shared[key] = uid(key));
};
/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(16)
, SHARED = '__core-js_shared__'
, store = global[SHARED] || (global[SHARED] = {});
module.exports = function(key){
return store[key] || (store[key] = {});
};
/***/ }),
/* 43 */
/***/ (function(module, exports) {
var id = 0
, px = Math.random();
module.exports = function(key){
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/* 44 */
/***/ (function(module, exports) {
// IE 8- don't enum bug keys
module.exports = (
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(16).document && document.documentElement;
/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {
var def = __webpack_require__(21).f
, has = __webpack_require__(31)
, TAG = __webpack_require__(47)('toStringTag');
module.exports = function(it, tag, stat){
if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
};
/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__(42)('wks')
, uid = __webpack_require__(43)
, Symbol = __webpack_require__(16).Symbol
, USE_SYMBOL = typeof Symbol == 'function';
var $exports = module.exports = function(name){
return store[name] || (store[name] =
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};
$exports.store = store;
/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(31)
, toObject = __webpack_require__(49)
, IE_PROTO = __webpack_require__(41)('IE_PROTO')
, ObjectProto = Object.prototype;
module.exports = Object.getPrototypeOf || function(O){
O = toObject(O);
if(has(O, IE_PROTO))return O[IE_PROTO];
if(typeof O.constructor == 'function' && O instanceof O.constructor){
return O.constructor.prototype;
} return O instanceof Object ? ObjectProto : null;
};
/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(12);
module.exports = function(it){
return Object(defined(it));
};
/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
var $at = __webpack_require__(51)(true);
// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(13)(String, 'String', function(iterated){
this._t = String(iterated); // target
this._i = 0; // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
}, function(){
var O = this._t
, index = this._i
, point;
if(index >= O.length)return {value: undefined, done: true};
point = $at(O, index);
this._i += point.length;
return {value: point, done: false};
});
/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(39)
, defined = __webpack_require__(12);
// true -> String#at
// false -> String#codePointAt
module.exports = function(TO_STRING){
return function(that, pos){
var s = String(defined(that))
, i = toInteger(pos)
, l = s.length
, a, b;
if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
a = s.charCodeAt(i);
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
? TO_STRING ? s.charAt(i) : a
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
};
};
/***/ }),
/* 52 */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(22)
, get = __webpack_require__(53);
module.exports = __webpack_require__(17).getIterator = function(it){
var iterFn = get(it);
if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
return anObject(iterFn.call(it));
};
/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(54)
, ITERATOR = __webpack_require__(47)('iterator')
, Iterators = __webpack_require__(8);
module.exports = __webpack_require__(17).getIteratorMethod = function(it){
if(it != undefined)return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(11)
, TAG = __webpack_require__(47)('toStringTag')
// ES3 wrong here
, ARG = cof(function(){ return arguments; }()) == 'Arguments';
// fallback for IE11 Script Access Denied error
var tryGet = function(it, key){
try {
return it[key];
} catch(e){ /* empty */ }
};
module.exports = function(it){
var O, T, B;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
: typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
// builtinTag case
: ARG ? cof(O)
// ES3 arguments fallback
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};
/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(56), __esModule: true };
/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(57);
module.exports = __webpack_require__(17).Object.keys;
/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 Object.keys(O)
var toObject = __webpack_require__(49)
, $keys = __webpack_require__(35);
__webpack_require__(58)('keys', function(){
return function keys(it){
return $keys(toObject(it));
};
});
/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {
// most Object methods by ES6 should accept primitives
var $export = __webpack_require__(15)
, core = __webpack_require__(17)
, fails = __webpack_require__(26);
module.exports = function(KEY, exec){
var fn = (core.Object || {})[KEY] || Object[KEY]
, exp = {};
exp[KEY] = exec(fn);
$export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
};
/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
module.exports = __webpack_require__(60);
/***/ }),
/* 60 */
/***/ (function(module, exports, __webpack_require__) {
// Main parser class
'use strict';
var utils = __webpack_require__(61);
var helpers = __webpack_require__(75);
var Renderer = __webpack_require__(79);
var ParserCore = __webpack_require__(80);
var ParserBlock = __webpack_require__(90);
var ParserInline = __webpack_require__(105);
var LinkifyIt = __webpack_require__(120);
var mdurl = __webpack_require__(65);
var punycode = __webpack_require__(122);
var config = {
'default': __webpack_require__(124),
zero: __webpack_require__(125),
commonmark: __webpack_require__(126)
};
////////////////////////////////////////////////////////////////////////////////
//
// This validator can prohibit more than really needed to prevent XSS. It's a
// tradeoff to keep code simple and to be secure by default.
//
// If you need different setup - override validator method as you wish. Or
// replace it with dummy function and use external sanitizer.
//
var BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;
var GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/;
function validateLink(url) {
// url should be normalized at this point, and existing entities are decoded
var str = url.trim().toLowerCase();
return BAD_PROTO_RE.test(str) ? (GOOD_DATA_RE.test(str) ? true : false) : true;
}
////////////////////////////////////////////////////////////////////////////////
var RECODE_HOSTNAME_FOR = [ 'http:', 'https:', 'mailto:' ];
function normalizeLink(url) {
var parsed = mdurl.parse(url, true);
if (parsed.hostname) {
// Encode hostnames in urls like:
// `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
//
// We don't encode unknown schemas, because it's likely that we encode
// something we shouldn't (e.g. `skype:name` treated as `skype:host`)
//
if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
try {
parsed.hostname = punycode.toASCII(parsed.hostname);
} catch (er) { /**/ }
}
}
return mdurl.encode(mdurl.format(parsed));
}
function normalizeLinkText(url) {
var parsed = mdurl.parse(url, true);
if (parsed.hostname) {
// Encode hostnames in urls like:
// `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
//
// We don't encode unknown schemas, because it's likely that we encode
// something we shouldn't (e.g. `skype:name` treated as `skype:host`)
//
if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
try {
parsed.hostname = punycode.toUnicode(parsed.hostname);
} catch (er) { /**/ }
}
}
return mdurl.decode(mdurl.format(parsed));
}
/**
* class MarkdownIt
*
* Main parser/renderer class.
*
* ##### Usage
*
* ```javascript
* // node.js, "classic" way:
* var MarkdownIt = require('markdown-it'),
* md = new MarkdownIt();
* var result = md.render('# markdown-it rulezz!');
*
* // node.js, the same, but with sugar:
* var md = require('markdown-it')();
* var result = md.render('# markdown-it rulezz!');
*
* // browser without AMD, added to "window" on script load
* // Note, there are no dash.
* var md = window.markdownit();
* var result = md.render('# markdown-it rulezz!');
* ```
*
* Single line rendering, without paragraph wrap:
*
* ```javascript
* var md = require('markdown-it')();
* var result = md.renderInline('__markdown-it__ rulezz!');
* ```
**/
/**
* new MarkdownIt([presetName, options])
* - presetName (String): optional, `commonmark` / `zero`
* - options (Object)
*
* Creates parser instanse with given config. Can be called without `new`.
*
* ##### presetName
*
* MarkdownIt provides named presets as a convenience to quickly
* enable/disable active syntax rules and options for common use cases.
*
* - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -
* configures parser to strict [CommonMark](http://commonmark.org/) mode.
* - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -
* similar to GFM, used when no preset name given. Enables all available rules,
* but still without html, typographer & autolinker.
* - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -
* all rules disabled. Useful to quickly setup your config via `.enable()`.
* For example, when you need only `bold` and `italic` markup and nothing else.
*
* ##### options:
*
* - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!
* That's not safe! You may need external sanitizer to protect output from XSS.
* It's better to extend features via plugins, instead of enabling HTML.
* - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags
* (`<br />`). This is needed only for full CommonMark compatibility. In real
* world you will need HTML output.
* - __breaks__ - `false`. Set `true` to convert `\n` in paragraphs into `<br>`.
* - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.
* Can be useful for external highlighters.
* - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.
* - __typographer__ - `false`. Set `true` to enable [some language-neutral
* replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +
* quotes beautification (smartquotes).
* - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement
* pairs, when typographer enabled and smartquotes on. For example, you can
* use `'«»„“'` for Russian, `'„“‚‘'` for German, and
* `['«\xA0', '\xA0»', '\xA0', '\xA0']` for French (including nbsp).
* - __highlight__ - `null`. Highlighter function for fenced code blocks.
* Highlighter `function (str, lang)` should return escaped HTML. It can also
* return empty string if the source was not changed and should be escaped
* externaly. If result starts with <pre... internal wrapper is skipped.
*
* ##### Example
*
* ```javascript
* // commonmark mode
* var md = require('markdown-it')('commonmark');
*
* // default mode
* var md = require('markdown-it')();
*
* // enable everything
* var md = require('markdown-it')({
* html: true,
* linkify: true,
* typographer: true
* });
* ```
*
* ##### Syntax highlighting
*
* ```js
* var hljs = require('highlight.js') // https://highlightjs.org/
*
* var md = require('markdown-it')({
* highlight: function (str, lang) {
* if (lang && hljs.getLanguage(lang)) {
* try {
* return hljs.highlight(lang, str, true).value;
* } catch (__) {}
* }
*
* return ''; // use external default escaping
* }
* });
* ```
*
* Or with full wrapper override (if you need assign class to `<pre>`):
*
* ```javascript
* var hljs = require('highlight.js') // https://highlightjs.org/
*
* // Actual default values
* var md = require('markdown-it')({
* highlight: function (str, lang) {
* if (lang && hljs.getLanguage(lang)) {
* try {
* return '<pre class="hljs"><code>' +
* hljs.highlight(lang, str, true).value +
* '</code></pre>';
* } catch (__) {}
* }
*
* return '<pre class="hljs"><code>' + md.utils.escapeHtml(str) + '</code></pre>';
* }
* });
* ```
*
**/
function MarkdownIt(presetName, options) {
if (!(this instanceof MarkdownIt)) {
return new MarkdownIt(presetName, options);
}
if (!options) {
if (!utils.isString(presetName)) {
options = presetName || {};
presetName = 'default';
}
}
/**
* MarkdownIt#inline -> ParserInline
*
* Instance of [[ParserInline]]. You may need it to add new rules when
* writing plugins. For simple rules control use [[MarkdownIt.disable]] and
* [[MarkdownIt.enable]].
**/
this.inline = new ParserInline();
/**
* MarkdownIt#block -> ParserBlock
*
* Instance of [[ParserBlock]]. You may need it to add new rules when
* writing plugins. For simple rules control use [[MarkdownIt.disable]] and
* [[MarkdownIt.enable]].
**/
this.block = new ParserBlock();
/**
* MarkdownIt#core -> Core
*
* Instance of [[Core]] chain executor. You may need it to add new rules when
* writing plugins. For simple rules control use [[MarkdownIt.disable]] and
* [[MarkdownIt.enable]].
**/
this.core = new ParserCore();
/**
* MarkdownIt#renderer -> Renderer
*
* Instance of [[Renderer]]. Use it to modify output look. Or to add rendering
* rules for new token types, generated by plugins.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* function myToken(tokens, idx, options, env, self) {
* //...
* return result;
* };
*
* md.renderer.rules['my_token'] = myToken
* ```
*
* See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).
**/
this.renderer = new Renderer();
/**
* MarkdownIt#linkify -> LinkifyIt
*
* [linkify-it](https://github.com/markdown-it/linkify-it) instance.
* Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)
* rule.
**/
this.linkify = new LinkifyIt();
/**
* MarkdownIt#validateLink(url) -> Boolean
*
* Link validation function. CommonMark allows too much in links. By default
* we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
* except some embedded image types.
*
* You can change this behaviour:
*
* ```javascript
* var md = require('markdown-it')();
* // enable everything
* md.validateLink = function () { return true; }
* ```
**/
this.validateLink = validateLink;
/**
* MarkdownIt#normalizeLink(url) -> String
*
* Function used to encode link url to a machine-readable format,
* which includes url-encoding, punycode, etc.
**/
this.normalizeLink = normalizeLink;
/**
* MarkdownIt#normalizeLinkText(url) -> String
*
* Function used to decode link url to a human-readable format`
**/
this.normalizeLinkText = normalizeLinkText;
// Expose utils & helpers for easy acces from plugins
/**
* MarkdownIt#utils -> utils
*
* Assorted utility functions, useful to write plugins. See details
* [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).
**/
this.utils = utils;
/**
* MarkdownIt#helpers -> helpers
*
* Link components parser functions, useful to write plugins. See details
* [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).
**/
this.helpers = helpers;
this.options = {};
this.configure(presetName);
if (options) { this.set(options); }
}
/** chainable
* MarkdownIt.set(options)
*
* Set parser options (in the same format as in constructor). Probably, you
* will never need it, but you can change options after constructor call.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')()
* .set({ html: true, breaks: true })
* .set({ typographer, true });
* ```
*
* __Note:__ To achieve the best possible performance, don't modify a
* `markdown-it` instance options on the fly. If you need multiple configurations
* it's best to create multiple instances and initialize each with separate
* config.
**/
MarkdownIt.prototype.set = function (options) {
utils.assign(this.options, options);
return this;
};
/** chainable, internal
* MarkdownIt.configure(presets)
*
* Batch load of all options and compenent settings. This is internal method,
* and you probably will not need it. But if you with - see available presets
* and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
*
* We strongly recommend to use presets instead of direct config loads. That
* will give better compatibility with next versions.
**/
MarkdownIt.prototype.configure = function (presets) {
var self = this, presetName;
if (utils.isString(presets)) {
presetName = presets;
presets = config[presetName];
if (!presets) { throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name'); }
}
if (!presets) { throw new Error('Wrong `markdown-it` preset, can\'t be empty'); }
if (presets.options) { self.set(presets.options); }
if (presets.components) {
Object.keys(presets.components).forEach(function (name) {
if (presets.components[name].rules) {
self[name].ruler.enableOnly(presets.components[name].rules);
}
if (presets.components[name].rules2) {
self[name].ruler2.enableOnly(presets.components[name].rules2);
}
});
}
return this;
};
/** chainable
* MarkdownIt.enable(list, ignoreInvalid)
* - list (String|Array): rule name or list of rule names to enable
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* Enable list or rules. It will automatically find appropriate components,
* containing rules with given names. If rule not found, and `ignoreInvalid`
* not set - throws exception.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')()
* .enable(['sub', 'sup'])
* .disable('smartquotes');
* ```
**/
MarkdownIt.prototype.enable = function (list, ignoreInvalid) {
var result = [];
if (!Array.isArray(list)) { list = [ list ]; }
[ 'core', 'block', 'inline' ].forEach(function (chain) {
result = result.concat(this[chain].ruler.enable(list, true));
}, this);
result = result.concat(this.inline.ruler2.enable(list, true));
var missed = list.filter(function (name) { return result.indexOf(name) < 0; });
if (missed.length && !ignoreInvalid) {
throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);
}
return this;
};
/** chainable
* MarkdownIt.disable(list, ignoreInvalid)
* - list (String|Array): rule name or list of rule names to disable.
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* The same as [[MarkdownIt.enable]], but turn specified rules off.
**/
MarkdownIt.prototype.disable = function (list, ignoreInvalid) {
var result = [];
if (!Array.isArray(list)) { list = [ list ]; }
[ 'core', 'block', 'inline' ].forEach(function (chain) {
result = result.concat(this[chain].ruler.disable(list, true));
}, this);
result = result.concat(this.inline.ruler2.disable(list, true));
var missed = list.filter(function (name) { return result.indexOf(name) < 0; });
if (missed.length && !ignoreInvalid) {
throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);
}
return this;
};
/** chainable
* MarkdownIt.use(plugin, params)
*
* Load specified plugin with given params into current parser instance.
* It's just a sugar to call `plugin(md, params)` with curring.
*
* ##### Example
*
* ```javascript
* var iterator = require('markdown-it-for-inline');
* var md = require('markdown-it')()
* .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
* tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');
* });
* ```
**/
MarkdownIt.prototype.use = function (plugin /*, params, ... */) {
var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));
plugin.apply(plugin, args);
return this;
};
/** internal
* MarkdownIt.parse(src, env) -> Array
* - src (String): source string
* - env (Object): environment sandbox
*
* Parse input string and returns list of block tokens (special token type
* "inline" will contain list of inline tokens). You should not call this
* method directly, until you write custom renderer (for example, to produce
* AST).
*
* `env` is used to pass data between "distributed" rules and return additional
* metadata like reference info, needed for the renderer. It also can be used to
* inject data in specific cases. Usually, you will be ok to pass `{}`,
* and then pass updated object to renderer.
**/
MarkdownIt.prototype.parse = function (src, env) {
var state = new this.core.State(src, this, env);
this.core.process(state);
return state.tokens;
};
/**
* MarkdownIt.render(src [, env]) -> String
* - src (String): source string
* - env (Object): environment sandbox
*
* Render markdown string into html. It does all magic for you :).
*
* `env` can be used to inject additional metadata (`{}` by default).
* But you will not need it with high probability. See also comment
* in [[MarkdownIt.parse]].
**/
MarkdownIt.prototype.render = function (src, env) {
env = env || {};
return this.renderer.render(this.parse(src, env), this.options, env);
};
/** internal
* MarkdownIt.parseInline(src, env) -> Array
* - src (String): source string
* - env (Object): environment sandbox
*
* The same as [[MarkdownIt.parse]] but skip all block rules. It returns the
* block tokens list with the single `inline` element, containing parsed inline
* tokens in `children` property. Also updates `env` object.
**/
MarkdownIt.prototype.parseInline = function (src, env) {
var state = new this.core.State(src, this, env);
state.inlineMode = true;
this.core.process(state);
return state.tokens;
};
/**
* MarkdownIt.renderInline(src [, env]) -> String
* - src (String): source string
* - env (Object): environment sandbox
*
* Similar to [[MarkdownIt.render]] but for single paragraph content. Result
* will NOT be wrapped into `<p>` tags.
**/
MarkdownIt.prototype.renderInline = function (src, env) {
env = env || {};
return this.renderer.render(this.parseInline(src, env), this.options, env);
};
module.exports = MarkdownIt;
/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {
// Utilities
//
'use strict';
function _class(obj) { return Object.prototype.toString.call(obj); }
function isString(obj) { return _class(obj) === '[object String]'; }
var _hasOwnProperty = Object.prototype.hasOwnProperty;
function has(object, key) {
return _hasOwnProperty.call(object, key);
}
// Merge objects
//
function assign(obj /*from1, from2, from3, ...*/) {
var sources = Array.prototype.slice.call(arguments, 1);
sources.forEach(function (source) {
if (!source) { return; }
if (typeof source !== 'object') {
throw new TypeError(source + 'must be object');
}
Object.keys(source).forEach(function (key) {
obj[key] = source[key];
});
});
return obj;
}
// Remove element from array and put another array at those position.
// Useful for some operations with tokens
function arrayReplaceAt(src, pos, newElements) {
return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));
}
////////////////////////////////////////////////////////////////////////////////
function isValidEntityCode(c) {
/*eslint no-bitwise:0*/
// broken sequence
if (c >= 0xD800 && c <= 0xDFFF) { return false; }
// never used
if (c >= 0xFDD0 && c <= 0xFDEF) { return false; }
if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; }
// control codes
if (c >= 0x00 && c <= 0x08) { return false; }
if (c === 0x0B) { return false; }
if (c >= 0x0E && c <= 0x1F) { return false; }
if (c >= 0x7F && c <= 0x9F) { return false; }
// out of range
if (c > 0x10FFFF) { return false; }
return true;
}
function fromCodePoint(c) {
/*eslint no-bitwise:0*/
if (c > 0xffff) {
c -= 0x10000;
var surrogate1 = 0xd800 + (c >> 10),
surrogate2 = 0xdc00 + (c & 0x3ff);
return String.fromCharCode(surrogate1, surrogate2);
}
return String.fromCharCode(c);
}
var UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g;
var ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;
var UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');
var DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;
var entities = __webpack_require__(62);
function replaceEntityPattern(match, name) {
var code = 0;
if (has(entities, name)) {
return entities[name];
}
if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {
code = name[1].toLowerCase() === 'x' ?
parseInt(name.slice(2), 16)
:
parseInt(name.slice(1), 10);
if (isValidEntityCode(code)) {
return fromCodePoint(code);
}
}
return match;
}
/*function replaceEntities(str) {
if (str.indexOf('&') < 0) { return str; }
return str.replace(ENTITY_RE, replaceEntityPattern);
}*/
function unescapeMd(str) {
if (str.indexOf('\\') < 0) { return str; }
return str.replace(UNESCAPE_MD_RE, '$1');
}
function unescapeAll(str) {
if (str.indexOf('\\') < 0 && str.indexOf('&') < 0) { return str; }
return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {
if (escaped) { return escaped; }
return replaceEntityPattern(match, entity);
});
}
////////////////////////////////////////////////////////////////////////////////
var HTML_ESCAPE_TEST_RE = /[&<>"]/;
var HTML_ESCAPE_REPLACE_RE = /[&<>"]/g;
var HTML_REPLACEMENTS = {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;'
};
function replaceUnsafeChar(ch) {
return HTML_REPLACEMENTS[ch];
}
function escapeHtml(str) {
if (HTML_ESCAPE_TEST_RE.test(str)) {
return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
}
return str;
}
////////////////////////////////////////////////////////////////////////////////
var REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g;
function escapeRE(str) {
return str.replace(REGEXP_ESCAPE_RE, '\\$&');
}
////////////////////////////////////////////////////////////////////////////////
function isSpace(code) {
switch (code) {
case 0x09:
case 0x20:
return true;
}
return false;
}
// Zs (unicode class) || [\t\f\v\r\n]
function isWhiteSpace(code) {
if (code >= 0x2000 && code <= 0x200A) { return true; }
switch (code) {
case 0x09: // \t
case 0x0A: // \n
case 0x0B: // \v
case 0x0C: // \f
case 0x0D: // \r
case 0x20:
case 0xA0:
case 0x1680:
case 0x202F:
case 0x205F:
case 0x3000:
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
/*eslint-disable max-len*/
var UNICODE_PUNCT_RE = __webpack_require__(64);
// Currently without astral characters support.
function isPunctChar(ch) {
return UNICODE_PUNCT_RE.test(ch);
}
// Markdown ASCII punctuation characters.
//
// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
// http://spec.commonmark.org/0.15/#ascii-punctuation-character
//
// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.
//
function isMdAsciiPunct(ch) {
switch (ch) {
case 0x21/* ! */:
case 0x22/* " */:
case 0x23/* # */:
case 0x24/* $ */:
case 0x25/* % */:
case 0x26/* & */:
case 0x27/* ' */:
case 0x28/* ( */:
case 0x29/* ) */:
case 0x2A/* * */:
case 0x2B/* + */:
case 0x2C/* , */:
case 0x2D/* - */:
case 0x2E/* . */:
case 0x2F/* / */:
case 0x3A/* : */:
case 0x3B/* ; */:
case 0x3C/* < */:
case 0x3D/* = */:
case 0x3E/* > */:
case 0x3F/* ? */:
case 0x40/* @ */:
case 0x5B/* [ */:
case 0x5C/* \ */:
case 0x5D/* ] */:
case 0x5E/* ^ */:
case 0x5F/* _ */:
case 0x60/* ` */:
case 0x7B/* { */:
case 0x7C/* | */:
case 0x7D/* } */:
case 0x7E/* ~ */:
return true;
default:
return false;
}
}
// Hepler to unify [reference labels].
//
function normalizeReference(str) {
// use .toUpperCase() instead of .toLowerCase()
// here to avoid a conflict with Object.prototype
// members (most notably, `__proto__`)
return str.trim().replace(/\s+/g, ' ').toUpperCase();
}
////////////////////////////////////////////////////////////////////////////////
// Re-export libraries commonly used in both markdown-it and its plugins,
// so plugins won't have to depend on them explicitly, which reduces their
// bundled size (e.g. a browser build).
//
exports.lib = {};
exports.lib.mdurl = __webpack_require__(65);
exports.lib.ucmicro = __webpack_require__(70);
exports.assign = assign;
exports.isString = isString;
exports.has = has;
exports.unescapeMd = unescapeMd;
exports.unescapeAll = unescapeAll;
exports.isValidEntityCode = isValidEntityCode;
exports.fromCodePoint = fromCodePoint;
// exports.replaceEntities = replaceEntities;
exports.escapeHtml = escapeHtml;
exports.arrayReplaceAt = arrayReplaceAt;
exports.isSpace = isSpace;
exports.isWhiteSpace = isWhiteSpace;
exports.isMdAsciiPunct = isMdAsciiPunct;
exports.isPunctChar = isPunctChar;
exports.escapeRE = escapeRE;
exports.normalizeReference = normalizeReference;
/***/ }),
/* 62 */
/***/ (function(module, exports, __webpack_require__) {
// HTML5 entities map: { name -> utf16string }
//
'use strict';
/*eslint quotes:0*/
module.exports = __webpack_require__(63);
/***/ }),
/* 63 */
/***/ (function(module, exports) {
module.exports = {"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"'","ApplyFunction":"","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"","backsim":"∽","backsimeq":"⋍","Backslash":"","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"","Bernoullis":"","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"","caps":"∩︀","caret":"","caron":"ˇ","Cayleys":"","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"<EFBFBD>
/***/ }),
/* 64 */
/***/ (function(module, exports) {
module.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E44\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/
/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
module.exports.encode = __webpack_require__(66);
module.exports.decode = __webpack_require__(67);
module.exports.format = __webpack_require__(68);
module.exports.parse = __webpack_require__(69);
/***/ }),
/* 66 */
/***/ (function(module, exports) {
'use strict';
var encodeCache = {};
// Create a lookup array where anything but characters in `chars` string
// and alphanumeric chars is percent-encoded.
//
function getEncodeCache(exclude) {
var i, ch, cache = encodeCache[exclude];
if (cache) { return cache; }
cache = encodeCache[exclude] = [];
for (i = 0; i < 128; i++) {
ch = String.fromCharCode(i);
if (/^[0-9a-z]$/i.test(ch)) {
// always allow unencoded alphanumeric characters
cache.push(ch);
} else {
cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));
}
}
for (i = 0; i < exclude.length; i++) {
cache[exclude.charCodeAt(i)] = exclude[i];
}
return cache;
}
// Encode unsafe characters with percent-encoding, skipping already
// encoded sequences.
//
// - string - string to encode
// - exclude - list of characters to ignore (in addition to a-zA-Z0-9)
// - keepEscaped - don't encode '%' in a correct escape sequence (default: true)
//
function encode(string, exclude, keepEscaped) {
var i, l, code, nextCode, cache,
result = '';
if (typeof exclude !== 'string') {
// encode(string, keepEscaped)
keepEscaped = exclude;
exclude = encode.defaultChars;
}
if (typeof keepEscaped === 'undefined') {
keepEscaped = true;
}
cache = getEncodeCache(exclude);
for (i = 0, l = string.length; i < l; i++) {
code = string.charCodeAt(i);
if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {
if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {
result += string.slice(i, i + 3);
i += 2;
continue;
}
}
if (code < 128) {
result += cache[code];
continue;
}
if (code >= 0xD800 && code <= 0xDFFF) {
if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {
nextCode = string.charCodeAt(i + 1);
if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {
result += encodeURIComponent(string[i] + string[i + 1]);
i++;
continue;
}
}
result += '%EF%BF%BD';
continue;
}
result += encodeURIComponent(string[i]);
}
return result;
}
encode.defaultChars = ";/?:@&=+$,-_.!~*'()#";
encode.componentChars = "-_.!~*'()";
module.exports = encode;
/***/ }),
/* 67 */
/***/ (function(module, exports) {
'use strict';
/* eslint-disable no-bitwise */
var decodeCache = {};
function getDecodeCache(exclude) {
var i, ch, cache = decodeCache[exclude];
if (cache) { return cache; }
cache = decodeCache[exclude] = [];
for (i = 0; i < 128; i++) {
ch = String.fromCharCode(i);
cache.push(ch);
}
for (i = 0; i < exclude.length; i++) {
ch = exclude.charCodeAt(i);
cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2);
}
return cache;
}
// Decode percent-encoded string.
//
function decode(string, exclude) {
var cache;
if (typeof exclude !== 'string') {
exclude = decode.defaultChars;
}
cache = getDecodeCache(exclude);
return string.replace(/(%[a-f0-9]{2})+/gi, function(seq) {
var i, l, b1, b2, b3, b4, chr,
result = '';
for (i = 0, l = seq.length; i < l; i += 3) {
b1 = parseInt(seq.slice(i + 1, i + 3), 16);
if (b1 < 0x80) {
result += cache[b1];
continue;
}
if ((b1 & 0xE0) === 0xC0 && (i + 3 < l)) {
// 110xxxxx 10xxxxxx
b2 = parseInt(seq.slice(i + 4, i + 6), 16);
if ((b2 & 0xC0) === 0x80) {
chr = ((b1 << 6) & 0x7C0) | (b2 & 0x3F);
if (chr < 0x80) {
result += '\ufffd\ufffd';
} else {
result += String.fromCharCode(chr);
}
i += 3;
continue;
}
}
if ((b1 & 0xF0) === 0xE0 && (i + 6 < l)) {
// 1110xxxx 10xxxxxx 10xxxxxx
b2 = parseInt(seq.slice(i + 4, i + 6), 16);
b3 = parseInt(seq.slice(i + 7, i + 9), 16);
if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {
chr = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F);
if (chr < 0x800 || (chr >= 0xD800 && chr <= 0xDFFF)) {
result += '\ufffd\ufffd\ufffd';
} else {
result += String.fromCharCode(chr);
}
i += 6;
continue;
}
}
if ((b1 & 0xF8) === 0xF0 && (i + 9 < l)) {
// 111110xx 10xxxxxx 10xxxxxx 10xxxxxx
b2 = parseInt(seq.slice(i + 4, i + 6), 16);
b3 = parseInt(seq.slice(i + 7, i + 9), 16);
b4 = parseInt(seq.slice(i + 10, i + 12), 16);
if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {
chr = ((b1 << 18) & 0x1C0000) | ((b2 << 12) & 0x3F000) | ((b3 << 6) & 0xFC0) | (b4 & 0x3F);
if (chr < 0x10000 || chr > 0x10FFFF) {
result += '\ufffd\ufffd\ufffd\ufffd';
} else {
chr -= 0x10000;
result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF));
}
i += 9;
continue;
}
}
result += '\ufffd';
}
return result;
});
}
decode.defaultChars = ';/?:@&=+$,#';
decode.componentChars = '';
module.exports = decode;
/***/ }),
/* 68 */
/***/ (function(module, exports) {
'use strict';
module.exports = function format(url) {
var result = '';
result += url.protocol || '';
result += url.slashes ? '//' : '';
result += url.auth ? url.auth + '@' : '';
if (url.hostname && url.hostname.indexOf(':') !== -1) {
// ipv6 address
result += '[' + url.hostname + ']';
} else {
result += url.hostname || '';
}
result += url.port ? ':' + url.port : '';
result += url.pathname || '';
result += url.search || '';
result += url.hash || '';
return result;
};
/***/ }),
/* 69 */
/***/ (function(module, exports) {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
//
// Changes from joyent/node:
//
// 1. No leading slash in paths,
// e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`
//
// 2. Backslashes are not replaced with slashes,
// so `http:\\example.org\` is treated like a relative path
//
// 3. Trailing colon is treated like a part of the path,
// i.e. in `http://example.org:foo` pathname is `:foo`
//
// 4. Nothing is URL-encoded in the resulting object,
// (in joyent/node some chars in auth and paths are encoded)
//
// 5. `url.parse()` does not have `parseQueryString` argument
//
// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,
// which can be constructed using other parts of the url.
//
function Url() {
this.protocol = null;
this.slashes = null;
this.auth = null;
this.port = null;
this.hostname = null;
this.hash = null;
this.search = null;
this.pathname = null;
}
// Reference: RFC 3986, RFC 1808, RFC 2396
// define these here so at least they only have to be
// compiled once on the first module load.
var protocolPattern = /^([a-z0-9.+-]+:)/i,
portPattern = /:[0-9]*$/,
// Special case for a simple path URL
simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
// RFC 2396: characters reserved for delimiting URLs.
// We actually just auto-escape these.
delims = [ '<', '>', '"', '`', ' ', '\r', '\n', '\t' ],
// RFC 2396: characters not allowed for various reasons.
unwise = [ '{', '}', '|', '\\', '^', '`' ].concat(delims),
// Allowed by RFCs, but cause of XSS attacks. Always escape these.
autoEscape = [ '\'' ].concat(unwise),
// Characters that are never ever allowed in a hostname.
// Note that any invalid chars are also handled, but these
// are the ones that are *expected* to be seen, so we fast-path
// them.
nonHostChars = [ '%', '/', '?', ';', '#' ].concat(autoEscape),
hostEndingChars = [ '/', '?', '#' ],
hostnameMaxLen = 255,
hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
// protocols that can allow "unsafe" and "unwise" chars.
/* eslint-disable no-script-url */
// protocols that never have a hostname.
hostlessProtocol = {
'javascript': true,
'javascript:': true
},
// protocols that always contain a // bit.
slashedProtocol = {
'http': true,
'https': true,
'ftp': true,
'gopher': true,
'file': true,
'http:': true,
'https:': true,
'ftp:': true,
'gopher:': true,
'file:': true
};
/* eslint-enable no-script-url */
function urlParse(url, slashesDenoteHost) {
if (url && url instanceof Url) { return url; }
var u = new Url();
u.parse(url, slashesDenoteHost);
return u;
}
Url.prototype.parse = function(url, slashesDenoteHost) {
var i, l, lowerProto, hec, slashes,
rest = url;
// trim before proceeding.
// This is to support parse stuff like " http://foo.com \n"
rest = rest.trim();
if (!slashesDenoteHost && url.split('#').length === 1) {
// Try fast path regexp
var simplePath = simplePathPattern.exec(rest);
if (simplePath) {
this.pathname = simplePath[1];
if (simplePath[2]) {
this.search = simplePath[2];
}
return this;
}
}
var proto = protocolPattern.exec(rest);
if (proto) {
proto = proto[0];
lowerProto = proto.toLowerCase();
this.protocol = proto;
rest = rest.substr(proto.length);
}
// figure out if it's got a host
// user@server is *always* interpreted as a hostname, and url
// resolution will treat //foo/bar as host=foo,path=bar because that's
// how the browser resolves relative URLs.
if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
slashes = rest.substr(0, 2) === '//';
if (slashes && !(proto && hostlessProtocol[proto])) {
rest = rest.substr(2);
this.slashes = true;
}
}
if (!hostlessProtocol[proto] &&
(slashes || (proto && !slashedProtocol[proto]))) {
// there's a hostname.
// the first instance of /, ?, ;, or # ends the host.
//
// If there is an @ in the hostname, then non-host chars *are* allowed
// to the left of the last @ sign, unless some host-ending character
// comes *before* the @-sign.
// URLs are obnoxious.
//
// ex:
// http://a@b@c/ => user:a@b host:c
// http://a@b?@c => user:a host:c path:/?@c
// v0.12 TODO(isaacs): This is not quite how Chrome does things.
// Review our test case against browsers more comprehensively.
// find the first instance of any hostEndingChars
var hostEnd = -1;
for (i = 0; i < hostEndingChars.length; i++) {
hec = rest.indexOf(hostEndingChars[i]);
if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
hostEnd = hec;
}
}
// at this point, either we have an explicit point where the
// auth portion cannot go past, or the last @ char is the decider.
var auth, atSign;
if (hostEnd === -1) {
// atSign can be anywhere.
atSign = rest.lastIndexOf('@');
} else {
// atSign must be in auth portion.
// http://a@b/c@d => host:b auth:a path:/c@d
atSign = rest.lastIndexOf('@', hostEnd);
}
// Now we have a portion which is definitely the auth.
// Pull that off.
if (atSign !== -1) {
auth = rest.slice(0, atSign);
rest = rest.slice(atSign + 1);
this.auth = auth;
}
// the host is the remaining to the left of the first non-host char
hostEnd = -1;
for (i = 0; i < nonHostChars.length; i++) {
hec = rest.indexOf(nonHostChars[i]);
if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
hostEnd = hec;
}
}
// if we still have not hit it, then the entire thing is a host.
if (hostEnd === -1) {
hostEnd = rest.length;
}
if (rest[hostEnd - 1] === ':') { hostEnd--; }
var host = rest.slice(0, hostEnd);
rest = rest.slice(hostEnd);
// pull out port.
this.parseHost(host);
// we've indicated that there is a hostname,
// so even if it's empty, it has to be present.
this.hostname = this.hostname || '';
// if hostname begins with [ and ends with ]
// assume that it's an IPv6 address.
var ipv6Hostname = this.hostname[0] === '[' &&
this.hostname[this.hostname.length - 1] === ']';
// validate a little.
if (!ipv6Hostname) {
var hostparts = this.hostname.split(/\./);
for (i = 0, l = hostparts.length; i < l; i++) {
var part = hostparts[i];
if (!part) { continue; }
if (!part.match(hostnamePartPattern)) {
var newpart = '';
for (var j = 0, k = part.length; j < k; j++) {
if (part.charCodeAt(j) > 127) {
// we replace non-ASCII char with a temporary placeholder
// we need this to make sure size of hostname is not
// broken by replacing non-ASCII by nothing
newpart += 'x';
} else {
newpart += part[j];
}
}
// we test again with ASCII char only
if (!newpart.match(hostnamePartPattern)) {
var validParts = hostparts.slice(0, i);
var notHost = hostparts.slice(i + 1);
var bit = part.match(hostnamePartStart);
if (bit) {
validParts.push(bit[1]);
notHost.unshift(bit[2]);
}
if (notHost.length) {
rest = notHost.join('.') + rest;
}
this.hostname = validParts.join('.');
break;
}
}
}
}
if (this.hostname.length > hostnameMaxLen) {
this.hostname = '';
}
// strip [ and ] from the hostname
// the host field still retains them, though
if (ipv6Hostname) {
this.hostname = this.hostname.substr(1, this.hostname.length - 2);
}
}
// chop off from the tail first.
var hash = rest.indexOf('#');
if (hash !== -1) {
// got a fragment string.
this.hash = rest.substr(hash);
rest = rest.slice(0, hash);
}
var qm = rest.indexOf('?');
if (qm !== -1) {
this.search = rest.substr(qm);
rest = rest.slice(0, qm);
}
if (rest) { this.pathname = rest; }
if (slashedProtocol[lowerProto] &&
this.hostname && !this.pathname) {
this.pathname = '';
}
return this;
};
Url.prototype.parseHost = function(host) {
var port = portPattern.exec(host);
if (port) {
port = port[0];
if (port !== ':') {
this.port = port.substr(1);
}
host = host.substr(0, host.length - port.length);
}
if (host) { this.hostname = host; }
};
module.exports = urlParse;
/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.Any = __webpack_require__(71);
exports.Cc = __webpack_require__(72);
exports.Cf = __webpack_require__(73);
exports.P = __webpack_require__(64);
exports.Z = __webpack_require__(74);
/***/ }),
/* 71 */
/***/ (function(module, exports) {
module.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/
/***/ }),
/* 72 */
/***/ (function(module, exports) {
module.exports=/[\0-\x1F\x7F-\x9F]/
/***/ }),
/* 73 */
/***/ (function(module, exports) {
module.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/
/***/ }),
/* 74 */
/***/ (function(module, exports) {
module.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/
/***/ }),
/* 75 */
/***/ (function(module, exports, __webpack_require__) {
// Just a shortcut for bulk export
'use strict';
exports.parseLinkLabel = __webpack_require__(76);
exports.parseLinkDestination = __webpack_require__(77);
exports.parseLinkTitle = __webpack_require__(78);
/***/ }),
/* 76 */
/***/ (function(module, exports) {
// Parse link label
//
// this function assumes that first character ("[") already matches;
// returns the end of the label
//
'use strict';
module.exports = function parseLinkLabel(state, start, disableNested) {
var level, found, marker, prevPos,
labelEnd = -1,
max = state.posMax,
oldPos = state.pos;
state.pos = start + 1;
level = 1;
while (state.pos < max) {
marker = state.src.charCodeAt(state.pos);
if (marker === 0x5D /* ] */) {
level--;
if (level === 0) {
found = true;
break;
}
}
prevPos = state.pos;
state.md.inline.skipToken(state);
if (marker === 0x5B /* [ */) {
if (prevPos === state.pos - 1) {
// increase level if we find text `[`, which is not a part of any token
level++;
} else if (disableNested) {
state.pos = oldPos;
return -1;
}
}
}
if (found) {
labelEnd = state.pos;
}
// restore old state
state.pos = oldPos;
return labelEnd;
};
/***/ }),
/* 77 */
/***/ (function(module, exports, __webpack_require__) {
// Parse link destination
//
'use strict';
var isSpace = __webpack_require__(61).isSpace;
var unescapeAll = __webpack_require__(61).unescapeAll;
module.exports = function parseLinkDestination(str, pos, max) {
var code, level,
lines = 0,
start = pos,
result = {
ok: false,
pos: 0,
lines: 0,
str: ''
};
if (str.charCodeAt(pos) === 0x3C /* < */) {
pos++;
while (pos < max) {
code = str.charCodeAt(pos);
if (code === 0x0A /* \n */ || isSpace(code)) { return result; }
if (code === 0x3E /* > */) {
result.pos = pos + 1;
result.str = unescapeAll(str.slice(start + 1, pos));
result.ok = true;
return result;
}
if (code === 0x5C /* \ */ && pos + 1 < max) {
pos += 2;
continue;
}
pos++;
}
// no closing '>'
return result;
}
// this should be ... } else { ... branch
level = 0;
while (pos < max) {
code = str.charCodeAt(pos);
if (code === 0x20) { break; }
// ascii control characters
if (code < 0x20 || code === 0x7F) { break; }
if (code === 0x5C /* \ */ && pos + 1 < max) {
pos += 2;
continue;
}
if (code === 0x28 /* ( */) {
level++;
if (level > 1) { break; }
}
if (code === 0x29 /* ) */) {
level--;
if (level < 0) { break; }
}
pos++;
}
if (start === pos) { return result; }
result.str = unescapeAll(str.slice(start, pos));
result.lines = lines;
result.pos = pos;
result.ok = true;
return result;
};
/***/ }),
/* 78 */
/***/ (function(module, exports, __webpack_require__) {
// Parse link title
//
'use strict';
var unescapeAll = __webpack_require__(61).unescapeAll;
module.exports = function parseLinkTitle(str, pos, max) {
var code,
marker,
lines = 0,
start = pos,
result = {
ok: false,
pos: 0,
lines: 0,
str: ''
};
if (pos >= max) { return result; }
marker = str.charCodeAt(pos);
if (marker !== 0x22 /* " */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return result; }
pos++;
// if opening marker is "(", switch it to closing marker ")"
if (marker === 0x28) { marker = 0x29; }
while (pos < max) {
code = str.charCodeAt(pos);
if (code === marker) {
result.pos = pos + 1;
result.lines = lines;
result.str = unescapeAll(str.slice(start + 1, pos));
result.ok = true;
return result;
} else if (code === 0x0A) {
lines++;
} else if (code === 0x5C /* \ */ && pos + 1 < max) {
pos++;
if (str.charCodeAt(pos) === 0x0A) {
lines++;
}
}
pos++;
}
return result;
};
/***/ }),
/* 79 */
/***/ (function(module, exports, __webpack_require__) {
/**
* class Renderer
*
* Generates HTML from parsed token stream. Each instance has independent
* copy of rules. Those can be rewritten with ease. Also, you can add new
* rules if you create plugin and adds new token types.
**/
'use strict';
var assign = __webpack_require__(61).assign;
var unescapeAll = __webpack_require__(61).unescapeAll;
var escapeHtml = __webpack_require__(61).escapeHtml;
////////////////////////////////////////////////////////////////////////////////
var default_rules = {};
default_rules.code_inline = function (tokens, idx, options, env, slf) {
var token = tokens[idx],
attrs = slf.renderAttrs(token);
return '<code' + (attrs ? ' ' + attrs : '') + '>' +
escapeHtml(tokens[idx].content) +
'</code>';
};
default_rules.code_block = function (tokens, idx, options, env, slf) {
var token = tokens[idx],
attrs = slf.renderAttrs(token);
return '<pre' + (attrs ? ' ' + attrs : '') + '><code>' +
escapeHtml(tokens[idx].content) +
'</code></pre>\n';
};
default_rules.fence = function (tokens, idx, options, env, slf) {
var token = tokens[idx],
info = token.info ? unescapeAll(token.info).trim() : '',
langName = '',
highlighted, i, tmpAttrs, tmpToken;
if (info) {
langName = info.split(/\s+/g)[0];
}
if (options.highlight) {
highlighted = options.highlight(token.content, langName) || escapeHtml(token.content);
} else {
highlighted = escapeHtml(token.content);
}
if (highlighted.indexOf('<pre') === 0) {
return highlighted + '\n';
}
// If language exists, inject class gently, without mudofying original token.
// May be, one day we will add .clone() for token and simplify this part, but
// now we prefer to keep things local.
if (info) {
i = token.attrIndex('class');
tmpAttrs = token.attrs ? token.attrs.slice() : [];
if (i < 0) {
tmpAttrs.push([ 'class', options.langPrefix + langName ]);
} else {
tmpAttrs[i] += ' ' + options.langPrefix + langName;
}
// Fake token just to render attributes
tmpToken = {
attrs: tmpAttrs
};
return '<pre><code' + slf.renderAttrs(tmpToken) + '>'
+ highlighted
+ '</code></pre>\n';
}
return '<pre><code' + slf.renderAttrs(token) + '>'
+ highlighted
+ '</code></pre>\n';
};
default_rules.image = function (tokens, idx, options, env, slf) {
var token = tokens[idx];
// "alt" attr MUST be set, even if empty. Because it's mandatory and
// should be placed on proper position for tests.
//
// Replace content with actual value
token.attrs[token.attrIndex('alt')][1] =
slf.renderInlineAsText(token.children, options, env);
return slf.renderToken(tokens, idx, options);
};
default_rules.hardbreak = function (tokens, idx, options /*, env */) {
return options.xhtmlOut ? '<br />\n' : '<br>\n';
};
default_rules.softbreak = function (tokens, idx, options /*, env */) {
return options.breaks ? (options.xhtmlOut ? '<br />\n' : '<br>\n') : '\n';
};
default_rules.text = function (tokens, idx /*, options, env */) {
return escapeHtml(tokens[idx].content);
};
default_rules.html_block = function (tokens, idx /*, options, env */) {
return tokens[idx].content;
};
default_rules.html_inline = function (tokens, idx /*, options, env */) {
return tokens[idx].content;
};
/**
* new Renderer()
*
* Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.
**/
function Renderer() {
/**
* Renderer#rules -> Object
*
* Contains render rules for tokens. Can be updated and extended.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.renderer.rules.strong_open = function () { return '<b>'; };
* md.renderer.rules.strong_close = function () { return '</b>'; };
*
* var result = md.renderInline(...);
* ```
*
* Each rule is called as independed static function with fixed signature:
*
* ```javascript
* function my_token_render(tokens, idx, options, env, renderer) {
* // ...
* return renderedHTML;
* }
* ```
*
* See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)
* for more details and examples.
**/
this.rules = assign({}, default_rules);
}
/**
* Renderer.renderAttrs(token) -> String
*
* Render token attributes to string.
**/
Renderer.prototype.renderAttrs = function renderAttrs(token) {
var i, l, result;
if (!token.attrs) { return ''; }
result = '';
for (i = 0, l = token.attrs.length; i < l; i++) {
result += ' ' + escapeHtml(token.attrs[i][0]) + '="' + escapeHtml(token.attrs[i][1]) + '"';
}
return result;
};
/**
* Renderer.renderToken(tokens, idx, options) -> String
* - tokens (Array): list of tokens
* - idx (Numbed): token index to render
* - options (Object): params of parser instance
*
* Default token renderer. Can be overriden by custom function
* in [[Renderer#rules]].
**/
Renderer.prototype.renderToken = function renderToken(tokens, idx, options) {
var nextToken,
result = '',
needLf = false,
token = tokens[idx];
// Tight list paragraphs
if (token.hidden) {
return '';
}
// Insert a newline between hidden paragraph and subsequent opening
// block-level tag.
//
// For example, here we should insert a newline before blockquote:
// - a
// >
//
if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {
result += '\n';
}
// Add token name, e.g. `<img`
result += (token.nesting === -1 ? '</' : '<') + token.tag;
// Encode attributes, e.g. `<img src="foo"`
result += this.renderAttrs(token);
// Add a slash for self-closing tags, e.g. `<img src="foo" /`
if (token.nesting === 0 && options.xhtmlOut) {
result += ' /';
}
// Check if we need to add a newline after this tag
if (token.block) {
needLf = true;
if (token.nesting === 1) {
if (idx + 1 < tokens.length) {
nextToken = tokens[idx + 1];
if (nextToken.type === 'inline' || nextToken.hidden) {
// Block-level tag containing an inline tag.
//
needLf = false;
} else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {
// Opening tag + closing tag of the same type. E.g. `<li></li>`.
//
needLf = false;
}
}
}
}
result += needLf ? '>\n' : '>';
return result;
};
/**
* Renderer.renderInline(tokens, options, env) -> String
* - tokens (Array): list on block tokens to renter
* - options (Object): params of parser instance
* - env (Object): additional data from parsed input (references, for example)
*
* The same as [[Renderer.render]], but for single token of `inline` type.
**/
Renderer.prototype.renderInline = function (tokens, options, env) {
var type,
result = '',
rules = this.rules;
for (var i = 0, len = tokens.length; i < len; i++) {
type = tokens[i].type;
if (typeof rules[type] !== 'undefined') {
result += rules[type](tokens, i, options, env, this);
} else {
result += this.renderToken(tokens, i, options);
}
}
return result;
};
/** internal
* Renderer.renderInlineAsText(tokens, options, env) -> String
* - tokens (Array): list on block tokens to renter
* - options (Object): params of parser instance
* - env (Object): additional data from parsed input (references, for example)
*
* Special kludge for image `alt` attributes to conform CommonMark spec.
* Don't try to use it! Spec requires to show `alt` content with stripped markup,
* instead of simple escaping.
**/
Renderer.prototype.renderInlineAsText = function (tokens, options, env) {
var result = '';
for (var i = 0, len = tokens.length; i < len; i++) {
if (tokens[i].type === 'text') {
result += tokens[i].content;
} else if (tokens[i].type === 'image') {
result += this.renderInlineAsText(tokens[i].children, options, env);
}
}
return result;
};
/**
* Renderer.render(tokens, options, env) -> String
* - tokens (Array): list on block tokens to renter
* - options (Object): params of parser instance
* - env (Object): additional data from parsed input (references, for example)
*
* Takes token stream and generates HTML. Probably, you will never need to call
* this method directly.
**/
Renderer.prototype.render = function (tokens, options, env) {
var i, len, type,
result = '',
rules = this.rules;
for (i = 0, len = tokens.length; i < len; i++) {
type = tokens[i].type;
if (type === 'inline') {
result += this.renderInline(tokens[i].children, options, env);
} else if (typeof rules[type] !== 'undefined') {
result += rules[tokens[i].type](tokens, i, options, env, this);
} else {
result += this.renderToken(tokens, i, options, env);
}
}
return result;
};
module.exports = Renderer;
/***/ }),
/* 80 */
/***/ (function(module, exports, __webpack_require__) {
/** internal
* class Core
*
* Top-level rules executor. Glues block/inline parsers and does intermediate
* transformations.
**/
'use strict';
var Ruler = __webpack_require__(81);
var _rules = [
[ 'normalize', __webpack_require__(82) ],
[ 'block', __webpack_require__(83) ],
[ 'inline', __webpack_require__(84) ],
[ 'linkify', __webpack_require__(85) ],
[ 'replacements', __webpack_require__(86) ],
[ 'smartquotes', __webpack_require__(87) ]
];
/**
* new Core()
**/
function Core() {
/**
* Core#ruler -> Ruler
*
* [[Ruler]] instance. Keep configuration of core rules.
**/
this.ruler = new Ruler();
for (var i = 0; i < _rules.length; i++) {
this.ruler.push(_rules[i][0], _rules[i][1]);
}
}
/**
* Core.process(state)
*
* Executes core chain rules.
**/
Core.prototype.process = function (state) {
var i, l, rules;
rules = this.ruler.getRules('');
for (i = 0, l = rules.length; i < l; i++) {
rules[i](state);
}
};
Core.prototype.State = __webpack_require__(88);
module.exports = Core;
/***/ }),
/* 81 */
/***/ (function(module, exports) {
/**
* class Ruler
*
* Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and
* [[MarkdownIt#inline]] to manage sequences of functions (rules):
*
* - keep rules in defined order
* - assign the name to each rule
* - enable/disable rules
* - add/replace rules
* - allow assign rules to additional named chains (in the same)
* - cacheing lists of active rules
*
* You will not need use this class directly until write plugins. For simple
* rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and
* [[MarkdownIt.use]].
**/
'use strict';
/**
* new Ruler()
**/
function Ruler() {
// List of added rules. Each element is:
//
// {
// name: XXX,
// enabled: Boolean,
// fn: Function(),
// alt: [ name2, name3 ]
// }
//
this.__rules__ = [];
// Cached rule chains.
//
// First level - chain name, '' for default.
// Second level - diginal anchor for fast filtering by charcodes.
//
this.__cache__ = null;
}
////////////////////////////////////////////////////////////////////////////////
// Helper methods, should not be used directly
// Find rule index by name
//
Ruler.prototype.__find__ = function (name) {
for (var i = 0; i < this.__rules__.length; i++) {
if (this.__rules__[i].name === name) {
return i;
}
}
return -1;
};
// Build rules lookup cache
//
Ruler.prototype.__compile__ = function () {
var self = this;
var chains = [ '' ];
// collect unique names
self.__rules__.forEach(function (rule) {
if (!rule.enabled) { return; }
rule.alt.forEach(function (altName) {
if (chains.indexOf(altName) < 0) {
chains.push(altName);
}
});
});
self.__cache__ = {};
chains.forEach(function (chain) {
self.__cache__[chain] = [];
self.__rules__.forEach(function (rule) {
if (!rule.enabled) { return; }
if (chain && rule.alt.indexOf(chain) < 0) { return; }
self.__cache__[chain].push(rule.fn);
});
});
};
/**
* Ruler.at(name, fn [, options])
* - name (String): rule name to replace.
* - fn (Function): new rule function.
* - options (Object): new rule options (not mandatory).
*
* Replace rule by name with new function & options. Throws error if name not
* found.
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* Replace existing typorgapher replacement rule with new one:
*
* ```javascript
* var md = require('markdown-it')();
*
* md.core.ruler.at('replacements', function replace(state) {
* //...
* });
* ```
**/
Ruler.prototype.at = function (name, fn, options) {
var index = this.__find__(name);
var opt = options || {};
if (index === -1) { throw new Error('Parser rule not found: ' + name); }
this.__rules__[index].fn = fn;
this.__rules__[index].alt = opt.alt || [];
this.__cache__ = null;
};
/**
* Ruler.before(beforeName, ruleName, fn [, options])
* - beforeName (String): new rule will be added before this one.
* - ruleName (String): name of added rule.
* - fn (Function): rule function.
* - options (Object): rule options (not mandatory).
*
* Add new rule to chain before one with given name. See also
* [[Ruler.after]], [[Ruler.push]].
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.block.ruler.before('paragraph', 'my_rule', function replace(state) {
* //...
* });
* ```
**/
Ruler.prototype.before = function (beforeName, ruleName, fn, options) {
var index = this.__find__(beforeName);
var opt = options || {};
if (index === -1) { throw new Error('Parser rule not found: ' + beforeName); }
this.__rules__.splice(index, 0, {
name: ruleName,
enabled: true,
fn: fn,
alt: opt.alt || []
});
this.__cache__ = null;
};
/**
* Ruler.after(afterName, ruleName, fn [, options])
* - afterName (String): new rule will be added after this one.
* - ruleName (String): name of added rule.
* - fn (Function): rule function.
* - options (Object): rule options (not mandatory).
*
* Add new rule to chain after one with given name. See also
* [[Ruler.before]], [[Ruler.push]].
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.inline.ruler.after('text', 'my_rule', function replace(state) {
* //...
* });
* ```
**/
Ruler.prototype.after = function (afterName, ruleName, fn, options) {
var index = this.__find__(afterName);
var opt = options || {};
if (index === -1) { throw new Error('Parser rule not found: ' + afterName); }
this.__rules__.splice(index + 1, 0, {
name: ruleName,
enabled: true,
fn: fn,
alt: opt.alt || []
});
this.__cache__ = null;
};
/**
* Ruler.push(ruleName, fn [, options])
* - ruleName (String): name of added rule.
* - fn (Function): rule function.
* - options (Object): rule options (not mandatory).
*
* Push new rule to the end of chain. See also
* [[Ruler.before]], [[Ruler.after]].
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.core.ruler.push('my_rule', function replace(state) {
* //...
* });
* ```
**/
Ruler.prototype.push = function (ruleName, fn, options) {
var opt = options || {};
this.__rules__.push({
name: ruleName,
enabled: true,
fn: fn,
alt: opt.alt || []
});
this.__cache__ = null;
};
/**
* Ruler.enable(list [, ignoreInvalid]) -> Array
* - list (String|Array): list of rule names to enable.
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* Enable rules with given names. If any rule name not found - throw Error.
* Errors can be disabled by second param.
*
* Returns list of found rule names (if no exception happened).
*
* See also [[Ruler.disable]], [[Ruler.enableOnly]].
**/
Ruler.prototype.enable = function (list, ignoreInvalid) {
if (!Array.isArray(list)) { list = [ list ]; }
var result = [];
// Search by name and enable
list.forEach(function (name) {
var idx = this.__find__(name);
if (idx < 0) {
if (ignoreInvalid) { return; }
throw new Error('Rules manager: invalid rule name ' + name);
}
this.__rules__[idx].enabled = true;
result.push(name);
}, this);
this.__cache__ = null;
return result;
};
/**
* Ruler.enableOnly(list [, ignoreInvalid])
* - list (String|Array): list of rule names to enable (whitelist).
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* Enable rules with given names, and disable everything else. If any rule name
* not found - throw Error. Errors can be disabled by second param.
*
* See also [[Ruler.disable]], [[Ruler.enable]].
**/
Ruler.prototype.enableOnly = function (list, ignoreInvalid) {
if (!Array.isArray(list)) { list = [ list ]; }
this.__rules__.forEach(function (rule) { rule.enabled = false; });
this.enable(list, ignoreInvalid);
};
/**
* Ruler.disable(list [, ignoreInvalid]) -> Array
* - list (String|Array): list of rule names to disable.
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* Disable rules with given names. If any rule name not found - throw Error.
* Errors can be disabled by second param.
*
* Returns list of found rule names (if no exception happened).
*
* See also [[Ruler.enable]], [[Ruler.enableOnly]].
**/
Ruler.prototype.disable = function (list, ignoreInvalid) {
if (!Array.isArray(list)) { list = [ list ]; }
var result = [];
// Search by name and disable
list.forEach(function (name) {
var idx = this.__find__(name);
if (idx < 0) {
if (ignoreInvalid) { return; }
throw new Error('Rules manager: invalid rule name ' + name);
}
this.__rules__[idx].enabled = false;
result.push(name);
}, this);
this.__cache__ = null;
return result;
};
/**
* Ruler.getRules(chainName) -> Array
*
* Return array of active functions (rules) for given chain name. It analyzes
* rules configuration, compiles caches if not exists and returns result.
*
* Default chain name is `''` (empty string). It can't be skipped. That's
* done intentionally, to keep signature monomorphic for high speed.
**/
Ruler.prototype.getRules = function (chainName) {
if (this.__cache__ === null) {
this.__compile__();
}
// Chain can be empty, if rules disabled. But we still have to return Array.
return this.__cache__[chainName] || [];
};
module.exports = Ruler;
/***/ }),
/* 82 */
/***/ (function(module, exports) {
// Normalize input string
'use strict';
var NEWLINES_RE = /\r[\n\u0085]?|[\u2424\u2028\u0085]/g;
var NULL_RE = /\u0000/g;
module.exports = function inline(state) {
var str;
// Normalize newlines
str = state.src.replace(NEWLINES_RE, '\n');
// Replace NULL characters
str = str.replace(NULL_RE, '\uFFFD');
state.src = str;
};
/***/ }),
/* 83 */
/***/ (function(module, exports) {
'use strict';
module.exports = function block(state) {
var token;
if (state.inlineMode) {
token = new state.Token('inline', '', 0);
token.content = state.src;
token.map = [ 0, 1 ];
token.children = [];
state.tokens.push(token);
} else {
state.md.block.parse(state.src, state.md, state.env, state.tokens);
}
};
/***/ }),
/* 84 */
/***/ (function(module, exports) {
'use strict';
module.exports = function inline(state) {
var tokens = state.tokens, tok, i, l;
// Parse inlines
for (i = 0, l = tokens.length; i < l; i++) {
tok = tokens[i];
if (tok.type === 'inline') {
state.md.inline.parse(tok.content, state.md, state.env, tok.children);
}
}
};
/***/ }),
/* 85 */
/***/ (function(module, exports, __webpack_require__) {
// Replace link-like texts with link nodes.
//
// Currently restricted by `md.validateLink()` to http/https/ftp
//
'use strict';
var arrayReplaceAt = __webpack_require__(61).arrayReplaceAt;
function isLinkOpen(str) {
return /^<a[>\s]/i.test(str);
}
function isLinkClose(str) {
return /^<\/a\s*>/i.test(str);
}
module.exports = function linkify(state) {
var i, j, l, tokens, token, currentToken, nodes, ln, text, pos, lastPos,
level, htmlLinkLevel, url, fullUrl, urlText,
blockTokens = state.tokens,
links;
if (!state.md.options.linkify) { return; }
for (j = 0, l = blockTokens.length; j < l; j++) {
if (blockTokens[j].type !== 'inline' ||
!state.md.linkify.pretest(blockTokens[j].content)) {
continue;
}
tokens = blockTokens[j].children;
htmlLinkLevel = 0;
// We scan from the end, to keep position when new tags added.
// Use reversed logic in links start/end match
for (i = tokens.length - 1; i >= 0; i--) {
currentToken = tokens[i];
// Skip content of markdown links
if (currentToken.type === 'link_close') {
i--;
while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {
i--;
}
continue;
}
// Skip content of html tag links
if (currentToken.type === 'html_inline') {
if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) {
htmlLinkLevel--;
}
if (isLinkClose(currentToken.content)) {
htmlLinkLevel++;
}
}
if (htmlLinkLevel > 0) { continue; }
if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {
text = currentToken.content;
links = state.md.linkify.match(text);
// Now split string to nodes
nodes = [];
level = currentToken.level;
lastPos = 0;
for (ln = 0; ln < links.length; ln++) {
url = links[ln].url;
fullUrl = state.md.normalizeLink(url);
if (!state.md.validateLink(fullUrl)) { continue; }
urlText = links[ln].text;
// Linkifier might send raw hostnames like "example.com", where url
// starts with domain name. So we prepend http:// in those cases,
// and remove it afterwards.
//
if (!links[ln].schema) {
urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\/\//, '');
} else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {
urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');
} else {
urlText = state.md.normalizeLinkText(urlText);
}
pos = links[ln].index;
if (pos > lastPos) {
token = new state.Token('text', '', 0);
token.content = text.slice(lastPos, pos);
token.level = level;
nodes.push(token);
}
token = new state.Token('link_open', 'a', 1);
token.attrs = [ [ 'href', fullUrl ] ];
token.level = level++;
token.markup = 'linkify';
token.info = 'auto';
nodes.push(token);
token = new state.Token('text', '', 0);
token.content = urlText;
token.level = level;
nodes.push(token);
token = new state.Token('link_close', 'a', -1);
token.level = --level;
token.markup = 'linkify';
token.info = 'auto';
nodes.push(token);
lastPos = links[ln].lastIndex;
}
if (lastPos < text.length) {
token = new state.Token('text', '', 0);
token.content = text.slice(lastPos);
token.level = level;
nodes.push(token);
}
// replace current node
blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);
}
}
}
};
/***/ }),
/* 86 */
/***/ (function(module, exports) {
// Simple typographyc replacements
//
// (c) (C) → ©
// (tm) (TM) → ™
// (r) (R) → ®
// +- → ±
// (p) (P) -> §
// ... → … (also ?.... → ?.., !.... → !..)
// ???????? → ???, !!!!! → !!!, `,,` → `,`
// -- → &ndash;, --- → &mdash;
//
'use strict';
// TODO:
// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾
// - miltiplication 2 x 4 -> 2 × 4
var RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/;
// Workaround for phantomjs - need regex without /g flag,
// or root check will fail every second time
var SCOPED_ABBR_TEST_RE = /\((c|tm|r|p)\)/i;
var SCOPED_ABBR_RE = /\((c|tm|r|p)\)/ig;
var SCOPED_ABBR = {
c: '©',
r: '®',
p: '§',
tm: '™'
};
function replaceFn(match, name) {
return SCOPED_ABBR[name.toLowerCase()];
}
function replace_scoped(inlineTokens) {
var i, token;
for (i = inlineTokens.length - 1; i >= 0; i--) {
token = inlineTokens[i];
if (token.type === 'text') {
token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);
}
}
}
function replace_rare(inlineTokens) {
var i, token;
for (i = inlineTokens.length - 1; i >= 0; i--) {
token = inlineTokens[i];
if (token.type === 'text') {
if (RARE_RE.test(token.content)) {
token.content = token.content
.replace(/\+-/g, '±')
// .., ..., ....... -> …
// but ?..... & !..... -> ?.. & !..
.replace(/\.{2,}/g, '…').replace(/([?!])…/g, '$1..')
.replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')
// em-dash
.replace(/(^|[^-])---([^-]|$)/mg, '$1\u2014$2')
// en-dash
.replace(/(^|\s)--(\s|$)/mg, '$1\u2013$2')
.replace(/(^|[^-\s])--([^-\s]|$)/mg, '$1\u2013$2');
}
}
}
}
module.exports = function replace(state) {
var blkIdx;
if (!state.md.options.typographer) { return; }
for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
if (state.tokens[blkIdx].type !== 'inline') { continue; }
if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {
replace_scoped(state.tokens[blkIdx].children);
}
if (RARE_RE.test(state.tokens[blkIdx].content)) {
replace_rare(state.tokens[blkIdx].children);
}
}
};
/***/ }),
/* 87 */
/***/ (function(module, exports, __webpack_require__) {
// Convert straight quotation marks to typographic ones
//
'use strict';
var isWhiteSpace = __webpack_require__(61).isWhiteSpace;
var isPunctChar = __webpack_require__(61).isPunctChar;
var isMdAsciiPunct = __webpack_require__(61).isMdAsciiPunct;
var QUOTE_TEST_RE = /['"]/;
var QUOTE_RE = /['"]/g;
var APOSTROPHE = '\u2019'; /* */
function replaceAt(str, index, ch) {
return str.substr(0, index) + ch + str.substr(index + 1);
}
function process_inlines(tokens, state) {
var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar,
isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace,
canOpen, canClose, j, isSingle, stack, openQuote, closeQuote;
stack = [];
for (i = 0; i < tokens.length; i++) {
token = tokens[i];
thisLevel = tokens[i].level;
for (j = stack.length - 1; j >= 0; j--) {
if (stack[j].level <= thisLevel) { break; }
}
stack.length = j + 1;
if (token.type !== 'text') { continue; }
text = token.content;
pos = 0;
max = text.length;
/*eslint no-labels:0,block-scoped-var:0*/
OUTER:
while (pos < max) {
QUOTE_RE.lastIndex = pos;
t = QUOTE_RE.exec(text);
if (!t) { break; }
canOpen = canClose = true;
pos = t.index + 1;
isSingle = (t[0] === "'");
// Find previous character,
// default to space if it's the beginning of the line
//
lastChar = 0x20;
if (t.index - 1 >= 0) {
lastChar = text.charCodeAt(t.index - 1);
} else {
for (j = i - 1; j >= 0; j--) {
if (tokens[j].type !== 'text') { continue; }
lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);
break;
}
}
// Find next character,
// default to space if it's the end of the line
//
nextChar = 0x20;
if (pos < max) {
nextChar = text.charCodeAt(pos);
} else {
for (j = i + 1; j < tokens.length; j++) {
if (tokens[j].type !== 'text') { continue; }
nextChar = tokens[j].content.charCodeAt(0);
break;
}
}
isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
isLastWhiteSpace = isWhiteSpace(lastChar);
isNextWhiteSpace = isWhiteSpace(nextChar);
if (isNextWhiteSpace) {
canOpen = false;
} else if (isNextPunctChar) {
if (!(isLastWhiteSpace || isLastPunctChar)) {
canOpen = false;
}
}
if (isLastWhiteSpace) {
canClose = false;
} else if (isLastPunctChar) {
if (!(isNextWhiteSpace || isNextPunctChar)) {
canClose = false;
}
}
if (nextChar === 0x22 /* " */ && t[0] === '"') {
if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) {
// special case: 1"" - count first quote as an inch
canClose = canOpen = false;
}
}
if (canOpen && canClose) {
// treat this as the middle of the word
canOpen = false;
canClose = isNextPunctChar;
}
if (!canOpen && !canClose) {
// middle of word
if (isSingle) {
token.content = replaceAt(token.content, t.index, APOSTROPHE);
}
continue;
}
if (canClose) {
// this could be a closing quote, rewind the stack to get a match
for (j = stack.length - 1; j >= 0; j--) {
item = stack[j];
if (stack[j].level < thisLevel) { break; }
if (item.single === isSingle && stack[j].level === thisLevel) {
item = stack[j];
if (isSingle) {
openQuote = state.md.options.quotes[2];
closeQuote = state.md.options.quotes[3];
} else {
openQuote = state.md.options.quotes[0];
closeQuote = state.md.options.quotes[1];
}
// replace token.content *before* tokens[item.token].content,
// because, if they are pointing at the same token, replaceAt
// could mess up indices when quote length != 1
token.content = replaceAt(token.content, t.index, closeQuote);
tokens[item.token].content = replaceAt(
tokens[item.token].content, item.pos, openQuote);
pos += closeQuote.length - 1;
if (item.token === i) { pos += openQuote.length - 1; }
text = token.content;
max = text.length;
stack.length = j;
continue OUTER;
}
}
}
if (canOpen) {
stack.push({
token: i,
pos: t.index,
single: isSingle,
level: thisLevel
});
} else if (canClose && isSingle) {
token.content = replaceAt(token.content, t.index, APOSTROPHE);
}
}
}
}
module.exports = function smartquotes(state) {
/*eslint max-depth:0*/
var blkIdx;
if (!state.md.options.typographer) { return; }
for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
if (state.tokens[blkIdx].type !== 'inline' ||
!QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {
continue;
}
process_inlines(state.tokens[blkIdx].children, state);
}
};
/***/ }),
/* 88 */
/***/ (function(module, exports, __webpack_require__) {
// Core state object
//
'use strict';
var Token = __webpack_require__(89);
function StateCore(src, md, env) {
this.src = src;
this.env = env;
this.tokens = [];
this.inlineMode = false;
this.md = md; // link to parser instance
}
// re-export Token class to use in core rules
StateCore.prototype.Token = Token;
module.exports = StateCore;
/***/ }),
/* 89 */
/***/ (function(module, exports) {
// Token class
'use strict';
/**
* class Token
**/
/**
* new Token(type, tag, nesting)
*
* Create new token and fill passed properties.
**/
function Token(type, tag, nesting) {
/**
* Token#type -> String
*
* Type of the token (string, e.g. "paragraph_open")
**/
this.type = type;
/**
* Token#tag -> String
*
* html tag name, e.g. "p"
**/
this.tag = tag;
/**
* Token#attrs -> Array
*
* Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`
**/
this.attrs = null;
/**
* Token#map -> Array
*
* Source map info. Format: `[ line_begin, line_end ]`
**/
this.map = null;
/**
* Token#nesting -> Number
*
* Level change (number in {-1, 0, 1} set), where:
*
* - `1` means the tag is opening
* - `0` means the tag is self-closing
* - `-1` means the tag is closing
**/
this.nesting = nesting;
/**
* Token#level -> Number
*
* nesting level, the same as `state.level`
**/
this.level = 0;
/**
* Token#children -> Array
*
* An array of child nodes (inline and img tokens)
**/
this.children = null;
/**
* Token#content -> String
*
* In a case of self-closing tag (code, html, fence, etc.),
* it has contents of this tag.
**/
this.content = '';
/**
* Token#markup -> String
*
* '*' or '_' for emphasis, fence string for fence, etc.
**/
this.markup = '';
/**
* Token#info -> String
*
* fence infostring
**/
this.info = '';
/**
* Token#meta -> Object
*
* A place for plugins to store an arbitrary data
**/
this.meta = null;
/**
* Token#block -> Boolean
*
* True for block-level tokens, false for inline tokens.
* Used in renderer to calculate line breaks
**/
this.block = false;
/**
* Token#hidden -> Boolean
*
* If it's true, ignore this element when rendering. Used for tight lists
* to hide paragraphs.
**/
this.hidden = false;
}
/**
* Token.attrIndex(name) -> Number
*
* Search attribute index by name.
**/
Token.prototype.attrIndex = function attrIndex(name) {
var attrs, i, len;
if (!this.attrs) { return -1; }
attrs = this.attrs;
for (i = 0, len = attrs.length; i < len; i++) {
if (attrs[i][0] === name) { return i; }
}
return -1;
};
/**
* Token.attrPush(attrData)
*
* Add `[ name, value ]` attribute to list. Init attrs if necessary
**/
Token.prototype.attrPush = function attrPush(attrData) {
if (this.attrs) {
this.attrs.push(attrData);
} else {
this.attrs = [ attrData ];
}
};
/**
* Token.attrSet(name, value)
*
* Set `name` attribute to `value`. Override old value if exists.
**/
Token.prototype.attrSet = function attrSet(name, value) {
var idx = this.attrIndex(name),
attrData = [ name, value ];
if (idx < 0) {
this.attrPush(attrData);
} else {
this.attrs[idx] = attrData;
}
};
/**
* Token.attrGet(name)
*
* Get the value of attribute `name`, or null if it does not exist.
**/
Token.prototype.attrGet = function attrGet(name) {
var idx = this.attrIndex(name), value = null;
if (idx >= 0) {
value = this.attrs[idx][1];
}
return value;
};
/**
* Token.attrJoin(name, value)
*
* Join value to existing attribute via space. Or create new attribute if not
* exists. Useful to operate with token classes.
**/
Token.prototype.attrJoin = function attrJoin(name, value) {
var idx = this.attrIndex(name);
if (idx < 0) {
this.attrPush([ name, value ]);
} else {
this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value;
}
};
module.exports = Token;
/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {
/** internal
* class ParserBlock
*
* Block-level tokenizer.
**/
'use strict';
var Ruler = __webpack_require__(81);
var _rules = [
// First 2 params - rule name & source. Secondary array - list of rules,
// which can be terminated by this one.
[ 'table', __webpack_require__(91), [ 'paragraph', 'reference' ] ],
[ 'code', __webpack_require__(92) ],
[ 'fence', __webpack_require__(93), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
[ 'blockquote', __webpack_require__(94), [ 'paragraph', 'reference', 'list' ] ],
[ 'hr', __webpack_require__(95), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
[ 'list', __webpack_require__(96), [ 'paragraph', 'reference', 'blockquote' ] ],
[ 'reference', __webpack_require__(97) ],
[ 'heading', __webpack_require__(98), [ 'paragraph', 'reference', 'blockquote' ] ],
[ 'lheading', __webpack_require__(99) ],
[ 'html_block', __webpack_require__(100), [ 'paragraph', 'reference', 'blockquote' ] ],
[ 'paragraph', __webpack_require__(103) ]
];
/**
* new ParserBlock()
**/
function ParserBlock() {
/**
* ParserBlock#ruler -> Ruler
*
* [[Ruler]] instance. Keep configuration of block rules.
**/
this.ruler = new Ruler();
for (var i = 0; i < _rules.length; i++) {
this.ruler.push(_rules[i][0], _rules[i][1], { alt: (_rules[i][2] || []).slice() });
}
}
// Generate tokens for input range
//
ParserBlock.prototype.tokenize = function (state, startLine, endLine) {
var ok, i,
rules = this.ruler.getRules(''),
len = rules.length,
line = startLine,
hasEmptyLines = false,
maxNesting = state.md.options.maxNesting;
while (line < endLine) {
state.line = line = state.skipEmptyLines(line);
if (line >= endLine) { break; }
// Termination condition for nested calls.
// Nested calls currently used for blockquotes & lists
if (state.sCount[line] < state.blkIndent) { break; }
// If nesting level exceeded - skip tail to the end. That's not ordinary
// situation and we should not care about content.
if (state.level >= maxNesting) {
state.line = endLine;
break;
}
// Try all possible rules.
// On success, rule should:
//
// - update `state.line`
// - update `state.tokens`
// - return true
for (i = 0; i < len; i++) {
ok = rules[i](state, line, endLine, false);
if (ok) { break; }
}
// set state.tight iff we had an empty line before current tag
// i.e. latest empty line should not count
state.tight = !hasEmptyLines;
// paragraph might "eat" one newline after it in nested lists
if (state.isEmpty(state.line - 1)) {
hasEmptyLines = true;
}
line = state.line;
if (line < endLine && state.isEmpty(line)) {
hasEmptyLines = true;
line++;
// two empty lines should stop the parser in list mode
if (line < endLine && state.parentType === 'list' && state.isEmpty(line)) { break; }
state.line = line;
}
}
};
/**
* ParserBlock.parse(str, md, env, outTokens)
*
* Process input string and push block tokens into `outTokens`
**/
ParserBlock.prototype.parse = function (src, md, env, outTokens) {
var state;
if (!src) { return; }
state = new this.State(src, md, env, outTokens);
this.tokenize(state, state.line, state.lineMax);
};
ParserBlock.prototype.State = __webpack_require__(104);
module.exports = ParserBlock;
/***/ }),
/* 91 */
/***/ (function(module, exports) {
// GFM table, non-standard
'use strict';
function getLine(state, line) {
var pos = state.bMarks[line] + state.blkIndent,
max = state.eMarks[line];
return state.src.substr(pos, max - pos);
}
function escapedSplit(str) {
var result = [],
pos = 0,
max = str.length,
ch,
escapes = 0,
lastPos = 0,
backTicked = false,
lastBackTick = 0;
ch = str.charCodeAt(pos);
while (pos < max) {
if (ch === 0x60/* ` */ && (escapes % 2 === 0)) {
backTicked = !backTicked;
lastBackTick = pos;
} else if (ch === 0x7c/* | */ && (escapes % 2 === 0) && !backTicked) {
result.push(str.substring(lastPos, pos));
lastPos = pos + 1;
} else if (ch === 0x5c/* \ */) {
escapes++;
} else {
escapes = 0;
}
pos++;
// If there was an un-closed backtick, go back to just after
// the last backtick, but as if it was a normal character
if (pos === max && backTicked) {
backTicked = false;
pos = lastBackTick + 1;
}
ch = str.charCodeAt(pos);
}
result.push(str.substring(lastPos));
return result;
}
module.exports = function table(state, startLine, endLine, silent) {
var ch, lineText, pos, i, nextLine, columns, columnCount, token,
aligns, t, tableLines, tbodyLines;
// should have at least three lines
if (startLine + 2 > endLine) { return false; }
nextLine = startLine + 1;
if (state.sCount[nextLine] < state.blkIndent) { return false; }
// first character of the second line should be '|' or '-'
pos = state.bMarks[nextLine] + state.tShift[nextLine];
if (pos >= state.eMarks[nextLine]) { return false; }
ch = state.src.charCodeAt(pos);
if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */) { return false; }
lineText = getLine(state, startLine + 1);
if (!/^[-:| ]+$/.test(lineText)) { return false; }
columns = lineText.split('|');
aligns = [];
for (i = 0; i < columns.length; i++) {
t = columns[i].trim();
if (!t) {
// allow empty columns before and after table, but not in between columns;
// e.g. allow ` |---| `, disallow ` ---||--- `
if (i === 0 || i === columns.length - 1) {
continue;
} else {
return false;
}
}
if (!/^:?-+:?$/.test(t)) { return false; }
if (t.charCodeAt(t.length - 1) === 0x3A/* : */) {
aligns.push(t.charCodeAt(0) === 0x3A/* : */ ? 'center' : 'right');
} else if (t.charCodeAt(0) === 0x3A/* : */) {
aligns.push('left');
} else {
aligns.push('');
}
}
lineText = getLine(state, startLine).trim();
if (lineText.indexOf('|') === -1) { return false; }
columns = escapedSplit(lineText.replace(/^\||\|$/g, ''));
// header row will define an amount of columns in the entire table,
// and align row shouldn't be smaller than that (the rest of the rows can)
columnCount = columns.length;
if (columnCount > aligns.length) { return false; }
if (silent) { return true; }
token = state.push('table_open', 'table', 1);
token.map = tableLines = [ startLine, 0 ];
token = state.push('thead_open', 'thead', 1);
token.map = [ startLine, startLine + 1 ];
token = state.push('tr_open', 'tr', 1);
token.map = [ startLine, startLine + 1 ];
for (i = 0; i < columns.length; i++) {
token = state.push('th_open', 'th', 1);
token.map = [ startLine, startLine + 1 ];
if (aligns[i]) {
token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];
}
token = state.push('inline', '', 0);
token.content = columns[i].trim();
token.map = [ startLine, startLine + 1 ];
token.children = [];
token = state.push('th_close', 'th', -1);
}
token = state.push('tr_close', 'tr', -1);
token = state.push('thead_close', 'thead', -1);
token = state.push('tbody_open', 'tbody', 1);
token.map = tbodyLines = [ startLine + 2, 0 ];
for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {
if (state.sCount[nextLine] < state.blkIndent) { break; }
lineText = getLine(state, nextLine);
if (lineText.indexOf('|') === -1) { break; }
// keep spaces at beginning of line to indicate an empty first cell, but
// strip trailing whitespace
columns = escapedSplit(lineText.replace(/^\||\|\s*$/g, ''));
token = state.push('tr_open', 'tr', 1);
for (i = 0; i < columnCount; i++) {
token = state.push('td_open', 'td', 1);
if (aligns[i]) {
token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];
}
token = state.push('inline', '', 0);
token.content = columns[i] ? columns[i].trim() : '';
token.children = [];
token = state.push('td_close', 'td', -1);
}
token = state.push('tr_close', 'tr', -1);
}
token = state.push('tbody_close', 'tbody', -1);
token = state.push('table_close', 'table', -1);
tableLines[1] = tbodyLines[1] = nextLine;
state.line = nextLine;
return true;
};
/***/ }),
/* 92 */
/***/ (function(module, exports) {
// Code block (4 spaces padded)
'use strict';
module.exports = function code(state, startLine, endLine/*, silent*/) {
var nextLine, last, token, emptyLines = 0;
if (state.sCount[startLine] - state.blkIndent < 4) { return false; }
last = nextLine = startLine + 1;
while (nextLine < endLine) {
if (state.isEmpty(nextLine)) {
emptyLines++;
// workaround for lists: 2 blank lines should terminate indented
// code block, but not fenced code block
if (emptyLines >= 2 && state.parentType === 'list') {
break;
}
nextLine++;
continue;
}
emptyLines = 0;
if (state.sCount[nextLine] - state.blkIndent >= 4) {
nextLine++;
last = nextLine;
continue;
}
break;
}
state.line = last;
token = state.push('code_block', 'code', 0);
token.content = state.getLines(startLine, last, 4 + state.blkIndent, true);
token.map = [ startLine, state.line ];
return true;
};
/***/ }),
/* 93 */
/***/ (function(module, exports) {
// fences (``` lang, ~~~ lang)
'use strict';
module.exports = function fence(state, startLine, endLine, silent) {
var marker, len, params, nextLine, mem, token, markup,
haveEndMarker = false,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
if (pos + 3 > max) { return false; }
marker = state.src.charCodeAt(pos);
if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {
return false;
}
// scan marker length
mem = pos;
pos = state.skipChars(pos, marker);
len = pos - mem;
if (len < 3) { return false; }
markup = state.src.slice(mem, pos);
params = state.src.slice(pos, max);
if (params.indexOf('`') >= 0) { return false; }
// Since start is found, we can report success here in validation mode
if (silent) { return true; }
// search end of block
nextLine = startLine;
for (;;) {
nextLine++;
if (nextLine >= endLine) {
// unclosed block should be autoclosed by end of document.
// also block seems to be autoclosed by end of parent
break;
}
pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
if (pos < max && state.sCount[nextLine] < state.blkIndent) {
// non-empty line with negative indent should stop the list:
// - ```
// test
break;
}
if (state.src.charCodeAt(pos) !== marker) { continue; }
if (state.sCount[nextLine] - state.blkIndent >= 4) {
// closing fence should be indented less than 4 spaces
continue;
}
pos = state.skipChars(pos, marker);
// closing code fence must be at least as long as the opening one
if (pos - mem < len) { continue; }
// make sure tail has spaces only
pos = state.skipSpaces(pos);
if (pos < max) { continue; }
haveEndMarker = true;
// found!
break;
}
// If a fence has heading spaces, they should be removed from its inner block
len = state.sCount[startLine];
state.line = nextLine + (haveEndMarker ? 1 : 0);
token = state.push('fence', 'code', 0);
token.info = params;
token.content = state.getLines(startLine + 1, nextLine, len, true);
token.markup = markup;
token.map = [ startLine, state.line ];
return true;
};
/***/ }),
/* 94 */
/***/ (function(module, exports, __webpack_require__) {
// Block quotes
'use strict';
var isSpace = __webpack_require__(61).isSpace;
module.exports = function blockquote(state, startLine, endLine, silent) {
var nextLine, lastLineEmpty, oldTShift, oldSCount, oldBMarks, oldIndent, oldParentType, lines, initial, offset, ch,
terminatorRules, token,
i, l, terminate,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// check the block quote marker
if (state.src.charCodeAt(pos++) !== 0x3E/* > */) { return false; }
// we know that it's going to be a valid blockquote,
// so no point trying to find the end of it in silent mode
if (silent) { return true; }
// skip one optional space (but not tab, check cmark impl) after '>'
if (state.src.charCodeAt(pos) === 0x20) { pos++; }
oldIndent = state.blkIndent;
state.blkIndent = 0;
// skip spaces after ">" and re-calculate offset
initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]);
oldBMarks = [ state.bMarks[startLine] ];
state.bMarks[startLine] = pos;
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (isSpace(ch)) {
if (ch === 0x09) {
offset += 4 - offset % 4;
} else {
offset++;
}
} else {
break;
}
pos++;
}
lastLineEmpty = pos >= max;
oldSCount = [ state.sCount[startLine] ];
state.sCount[startLine] = offset - initial;
oldTShift = [ state.tShift[startLine] ];
state.tShift[startLine] = pos - state.bMarks[startLine];
terminatorRules = state.md.block.ruler.getRules('blockquote');
// Search the end of the block
//
// Block ends with either:
// 1. an empty line outside:
// ```
// > test
//
// ```
// 2. an empty line inside:
// ```
// >
// test
// ```
// 3. another tag
// ```
// > test
// - - -
// ```
for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {
if (state.sCount[nextLine] < oldIndent) { break; }
pos = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
if (pos >= max) {
// Case 1: line is not inside the blockquote, and this line is empty.
break;
}
if (state.src.charCodeAt(pos++) === 0x3E/* > */) {
// This line is inside the blockquote.
// skip one optional space (but not tab, check cmark impl) after '>'
if (state.src.charCodeAt(pos) === 0x20) { pos++; }
// skip spaces after ">" and re-calculate offset
initial = offset = state.sCount[nextLine] + pos - (state.bMarks[nextLine] + state.tShift[nextLine]);
oldBMarks.push(state.bMarks[nextLine]);
state.bMarks[nextLine] = pos;
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (isSpace(ch)) {
if (ch === 0x09) {
offset += 4 - offset % 4;
} else {
offset++;
}
} else {
break;
}
pos++;
}
lastLineEmpty = pos >= max;
oldSCount.push(state.sCount[nextLine]);
state.sCount[nextLine] = offset - initial;
oldTShift.push(state.tShift[nextLine]);
state.tShift[nextLine] = pos - state.bMarks[nextLine];
continue;
}
// Case 2: line is not inside the blockquote, and the last line was empty.
if (lastLineEmpty) { break; }
// Case 3: another tag found.
terminate = false;
for (i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) { break; }
oldBMarks.push(state.bMarks[nextLine]);
oldTShift.push(state.tShift[nextLine]);
oldSCount.push(state.sCount[nextLine]);
// A negative indentation means that this is a paragraph continuation
//
state.sCount[nextLine] = -1;
}
oldParentType = state.parentType;
state.parentType = 'blockquote';
token = state.push('blockquote_open', 'blockquote', 1);
token.markup = '>';
token.map = lines = [ startLine, 0 ];
state.md.block.tokenize(state, startLine, nextLine);
token = state.push('blockquote_close', 'blockquote', -1);
token.markup = '>';
state.parentType = oldParentType;
lines[1] = state.line;
// Restore original tShift; this might not be necessary since the parser
// has already been here, but just to make sure we can do that.
for (i = 0; i < oldTShift.length; i++) {
state.bMarks[i + startLine] = oldBMarks[i];
state.tShift[i + startLine] = oldTShift[i];
state.sCount[i + startLine] = oldSCount[i];
}
state.blkIndent = oldIndent;
return true;
};
/***/ }),
/* 95 */
/***/ (function(module, exports, __webpack_require__) {
// Horizontal rule
'use strict';
var isSpace = __webpack_require__(61).isSpace;
module.exports = function hr(state, startLine, endLine, silent) {
var marker, cnt, ch, token,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
marker = state.src.charCodeAt(pos++);
// Check hr marker
if (marker !== 0x2A/* * */ &&
marker !== 0x2D/* - */ &&
marker !== 0x5F/* _ */) {
return false;
}
// markers can be mixed with spaces, but there should be at least 3 of them
cnt = 1;
while (pos < max) {
ch = state.src.charCodeAt(pos++);
if (ch !== marker && !isSpace(ch)) { return false; }
if (ch === marker) { cnt++; }
}
if (cnt < 3) { return false; }
if (silent) { return true; }
state.line = startLine + 1;
token = state.push('hr', 'hr', 0);
token.map = [ startLine, state.line ];
token.markup = Array(cnt + 1).join(String.fromCharCode(marker));
return true;
};
/***/ }),
/* 96 */
/***/ (function(module, exports, __webpack_require__) {
// Lists
'use strict';
var isSpace = __webpack_require__(61).isSpace;
// Search `[-+*][\n ]`, returns next pos arter marker on success
// or -1 on fail.
function skipBulletListMarker(state, startLine) {
var marker, pos, max, ch;
pos = state.bMarks[startLine] + state.tShift[startLine];
max = state.eMarks[startLine];
marker = state.src.charCodeAt(pos++);
// Check bullet
if (marker !== 0x2A/* * */ &&
marker !== 0x2D/* - */ &&
marker !== 0x2B/* + */) {
return -1;
}
if (pos < max) {
ch = state.src.charCodeAt(pos);
if (!isSpace(ch)) {
// " -test " - is not a list item
return -1;
}
}
return pos;
}
// Search `\d+[.)][\n ]`, returns next pos arter marker on success
// or -1 on fail.
function skipOrderedListMarker(state, startLine) {
var ch,
start = state.bMarks[startLine] + state.tShift[startLine],
pos = start,
max = state.eMarks[startLine];
// List marker should have at least 2 chars (digit + dot)
if (pos + 1 >= max) { return -1; }
ch = state.src.charCodeAt(pos++);
if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1; }
for (;;) {
// EOL -> fail
if (pos >= max) { return -1; }
ch = state.src.charCodeAt(pos++);
if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {
// List marker should have no more than 9 digits
// (prevents integer overflow in browsers)
if (pos - start >= 10) { return -1; }
continue;
}
// found valid marker
if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {
break;
}
return -1;
}
if (pos < max) {
ch = state.src.charCodeAt(pos);
if (!isSpace(ch)) {
// " 1.test " - is not a list item
return -1;
}
}
return pos;
}
function markTightParagraphs(state, idx) {
var i, l,
level = state.level + 2;
for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {
if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {
state.tokens[i + 2].hidden = true;
state.tokens[i].hidden = true;
i += 2;
}
}
}
module.exports = function list(state, startLine, endLine, silent) {
var nextLine,
initial,
offset,
indent,
oldTShift,
oldIndent,
oldLIndent,
oldTight,
oldParentType,
start,
posAfterMarker,
ch,
pos,
max,
indentAfterMarker,
markerValue,
markerCharCode,
isOrdered,
contentStart,
listTokIdx,
prevEmptyEnd,
listLines,
itemLines,
tight = true,
terminatorRules,
token,
i, l, terminate;
// Detect list type and position after marker
if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {
isOrdered = true;
} else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {
isOrdered = false;
} else {
return false;
}
// We should terminate list on style change. Remember first one to compare.
markerCharCode = state.src.charCodeAt(posAfterMarker - 1);
// For validation mode we can terminate immediately
if (silent) { return true; }
// Start list
listTokIdx = state.tokens.length;
if (isOrdered) {
start = state.bMarks[startLine] + state.tShift[startLine];
markerValue = Number(state.src.substr(start, posAfterMarker - start - 1));
token = state.push('ordered_list_open', 'ol', 1);
if (markerValue !== 1) {
token.attrs = [ [ 'start', markerValue ] ];
}
} else {
token = state.push('bullet_list_open', 'ul', 1);
}
token.map = listLines = [ startLine, 0 ];
token.markup = String.fromCharCode(markerCharCode);
//
// Iterate list items
//
nextLine = startLine;
prevEmptyEnd = false;
terminatorRules = state.md.block.ruler.getRules('list');
while (nextLine < endLine) {
pos = posAfterMarker;
max = state.eMarks[nextLine];
initial = offset = state.sCount[nextLine] + posAfterMarker - (state.bMarks[startLine] + state.tShift[startLine]);
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (isSpace(ch)) {
if (ch === 0x09) {
offset += 4 - offset % 4;
} else {
offset++;
}
} else {
break;
}
pos++;
}
contentStart = pos;
if (contentStart >= max) {
// trimming space in "- \n 3" case, indent is 1 here
indentAfterMarker = 1;
} else {
indentAfterMarker = offset - initial;
}
// If we have more than 4 spaces, the indent is 1
// (the rest is just indented code block)
if (indentAfterMarker > 4) { indentAfterMarker = 1; }
// " - test"
// ^^^^^ - calculating total length of this thing
indent = initial + indentAfterMarker;
// Run subparser & write tokens
token = state.push('list_item_open', 'li', 1);
token.markup = String.fromCharCode(markerCharCode);
token.map = itemLines = [ startLine, 0 ];
oldIndent = state.blkIndent;
oldTight = state.tight;
oldTShift = state.tShift[startLine];
oldLIndent = state.sCount[startLine];
oldParentType = state.parentType;
state.blkIndent = indent;
state.tight = true;
state.parentType = 'list';
state.tShift[startLine] = contentStart - state.bMarks[startLine];
state.sCount[startLine] = offset;
if (contentStart >= max && state.isEmpty(startLine + 1)) {
// workaround for this case
// (list item is empty, list terminates before "foo"):
// ~~~~~~~~
// -
//
// foo
// ~~~~~~~~
state.line = Math.min(state.line + 2, endLine);
} else {
state.md.block.tokenize(state, startLine, endLine, true);
}
// If any of list item is tight, mark list as tight
if (!state.tight || prevEmptyEnd) {
tight = false;
}
// Item become loose if finish with empty line,
// but we should filter last element, because it means list finish
prevEmptyEnd = (state.line - startLine) > 1 && state.isEmpty(state.line - 1);
state.blkIndent = oldIndent;
state.tShift[startLine] = oldTShift;
state.sCount[startLine] = oldLIndent;
state.tight = oldTight;
state.parentType = oldParentType;
token = state.push('list_item_close', 'li', -1);
token.markup = String.fromCharCode(markerCharCode);
nextLine = startLine = state.line;
itemLines[1] = nextLine;
contentStart = state.bMarks[startLine];
if (nextLine >= endLine) { break; }
if (state.isEmpty(nextLine)) {
break;
}
//
// Try to check if list is terminated or continued.
//
if (state.sCount[nextLine] < state.blkIndent) { break; }
// fail if terminating block found
terminate = false;
for (i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) { break; }
// fail if list has another type
if (isOrdered) {
posAfterMarker = skipOrderedListMarker(state, nextLine);
if (posAfterMarker < 0) { break; }
} else {
posAfterMarker = skipBulletListMarker(state, nextLine);
if (posAfterMarker < 0) { break; }
}
if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; }
}
// Finilize list
if (isOrdered) {
token = state.push('ordered_list_close', 'ol', -1);
} else {
token = state.push('bullet_list_close', 'ul', -1);
}
token.markup = String.fromCharCode(markerCharCode);
listLines[1] = nextLine;
state.line = nextLine;
// mark paragraphs tight if needed
if (tight) {
markTightParagraphs(state, listTokIdx);
}
return true;
};
/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
var parseLinkDestination = __webpack_require__(77);
var parseLinkTitle = __webpack_require__(78);
var normalizeReference = __webpack_require__(61).normalizeReference;
var isSpace = __webpack_require__(61).isSpace;
module.exports = function reference(state, startLine, _endLine, silent) {
var ch,
destEndPos,
destEndLineNo,
endLine,
href,
i,
l,
label,
labelEnd,
res,
start,
str,
terminate,
terminatorRules,
title,
lines = 0,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine],
nextLine = startLine + 1;
if (state.src.charCodeAt(pos) !== 0x5B/* [ */) { return false; }
// Simple check to quickly interrupt scan on [link](url) at the start of line.
// Can be useful on practice: https://github.com/markdown-it/markdown-it/issues/54
while (++pos < max) {
if (state.src.charCodeAt(pos) === 0x5D /* ] */ &&
state.src.charCodeAt(pos - 1) !== 0x5C/* \ */) {
if (pos + 1 === max) { return false; }
if (state.src.charCodeAt(pos + 1) !== 0x3A/* : */) { return false; }
break;
}
}
endLine = state.lineMax;
// jump line-by-line until empty one or EOF
terminatorRules = state.md.block.ruler.getRules('reference');
for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
// this would be a code block normally, but after paragraph
// it's considered a lazy continuation regardless of what's there
if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }
// quirk for blockquotes, this line should already be checked by that rule
if (state.sCount[nextLine] < 0) { continue; }
// Some tags can terminate paragraph without empty line.
terminate = false;
for (i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) { break; }
}
str = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
max = str.length;
for (pos = 1; pos < max; pos++) {
ch = str.charCodeAt(pos);
if (ch === 0x5B /* [ */) {
return false;
} else if (ch === 0x5D /* ] */) {
labelEnd = pos;
break;
} else if (ch === 0x0A /* \n */) {
lines++;
} else if (ch === 0x5C /* \ */) {
pos++;
if (pos < max && str.charCodeAt(pos) === 0x0A) {
lines++;
}
}
}
if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return false; }
// [label]: destination 'title'
// ^^^ skip optional whitespace here
for (pos = labelEnd + 2; pos < max; pos++) {
ch = str.charCodeAt(pos);
if (ch === 0x0A) {
lines++;
} else if (isSpace(ch)) {
/*eslint no-empty:0*/
} else {
break;
}
}
// [label]: destination 'title'
// ^^^^^^^^^^^ parse this
res = parseLinkDestination(str, pos, max);
if (!res.ok) { return false; }
href = state.md.normalizeLink(res.str);
if (!state.md.validateLink(href)) { return false; }
pos = res.pos;
lines += res.lines;
// save cursor state, we could require to rollback later
destEndPos = pos;
destEndLineNo = lines;
// [label]: destination 'title'
// ^^^ skipping those spaces
start = pos;
for (; pos < max; pos++) {
ch = str.charCodeAt(pos);
if (ch === 0x0A) {
lines++;
} else if (isSpace(ch)) {
/*eslint no-empty:0*/
} else {
break;
}
}
// [label]: destination 'title'
// ^^^^^^^ parse this
res = parseLinkTitle(str, pos, max);
if (pos < max && start !== pos && res.ok) {
title = res.str;
pos = res.pos;
lines += res.lines;
} else {
title = '';
pos = destEndPos;
lines = destEndLineNo;
}
// skip trailing spaces until the rest of the line
while (pos < max) {
ch = str.charCodeAt(pos);
if (!isSpace(ch)) { break; }
pos++;
}
if (pos < max && str.charCodeAt(pos) !== 0x0A) {
if (title) {
// garbage at the end of the line after title,
// but it could still be a valid reference if we roll back
title = '';
pos = destEndPos;
lines = destEndLineNo;
while (pos < max) {
ch = str.charCodeAt(pos);
if (!isSpace(ch)) { break; }
pos++;
}
}
}
if (pos < max && str.charCodeAt(pos) !== 0x0A) {
// garbage at the end of the line
return false;
}
label = normalizeReference(str.slice(1, labelEnd));
if (!label) {
// CommonMark 0.20 disallows empty labels
return false;
}
// Reference can not terminate anything. This check is for safety only.
/*istanbul ignore if*/
if (silent) { return true; }
if (typeof state.env.references === 'undefined') {
state.env.references = {};
}
if (typeof state.env.references[label] === 'undefined') {
state.env.references[label] = { title: title, href: href };
}
state.line = startLine + lines + 1;
return true;
};
/***/ }),
/* 98 */
/***/ (function(module, exports, __webpack_require__) {
// heading (#, ##, ...)
'use strict';
var isSpace = __webpack_require__(61).isSpace;
module.exports = function heading(state, startLine, endLine, silent) {
var ch, level, tmp, token,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
ch = state.src.charCodeAt(pos);
if (ch !== 0x23/* # */ || pos >= max) { return false; }
// count heading level
level = 1;
ch = state.src.charCodeAt(++pos);
while (ch === 0x23/* # */ && pos < max && level <= 6) {
level++;
ch = state.src.charCodeAt(++pos);
}
if (level > 6 || (pos < max && ch !== 0x20/* space */)) { return false; }
if (silent) { return true; }
// Let's cut tails like ' ### ' from the end of string
max = state.skipSpacesBack(max, pos);
tmp = state.skipCharsBack(max, 0x23, pos); // #
if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {
max = tmp;
}
state.line = startLine + 1;
token = state.push('heading_open', 'h' + String(level), 1);
token.markup = '########'.slice(0, level);
token.map = [ startLine, state.line ];
token = state.push('inline', '', 0);
token.content = state.src.slice(pos, max).trim();
token.map = [ startLine, state.line ];
token.children = [];
token = state.push('heading_close', 'h' + String(level), -1);
token.markup = '########'.slice(0, level);
return true;
};
/***/ }),
/* 99 */
/***/ (function(module, exports) {
// lheading (---, ===)
'use strict';
module.exports = function lheading(state, startLine, endLine/*, silent*/) {
var content, terminate, i, l, token, pos, max, level, marker,
nextLine = startLine + 1,
terminatorRules = state.md.block.ruler.getRules('paragraph');
// jump line-by-line until empty one or EOF
for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
// this would be a code block normally, but after paragraph
// it's considered a lazy continuation regardless of what's there
if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }
//
// Check for underline in setext header
//
if (state.sCount[nextLine] >= state.blkIndent) {
pos = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
if (pos < max) {
marker = state.src.charCodeAt(pos);
if (marker === 0x2D/* - */ || marker === 0x3D/* = */) {
pos = state.skipChars(pos, marker);
pos = state.skipSpaces(pos);
if (pos >= max) {
level = (marker === 0x3D/* = */ ? 1 : 2);
break;
}
}
}
}
// quirk for blockquotes, this line should already be checked by that rule
if (state.sCount[nextLine] < 0) { continue; }
// Some tags can terminate paragraph without empty line.
terminate = false;
for (i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) { break; }
}
if (!level) {
// Didn't find valid underline
return false;
}
content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
state.line = nextLine + 1;
token = state.push('heading_open', 'h' + String(level), 1);
token.markup = String.fromCharCode(marker);
token.map = [ startLine, state.line ];
token = state.push('inline', '', 0);
token.content = content;
token.map = [ startLine, state.line - 1 ];
token.children = [];
token = state.push('heading_close', 'h' + String(level), -1);
token.markup = String.fromCharCode(marker);
return true;
};
/***/ }),
/* 100 */
/***/ (function(module, exports, __webpack_require__) {
// HTML block
'use strict';
var block_names = __webpack_require__(101);
var HTML_OPEN_CLOSE_TAG_RE = __webpack_require__(102).HTML_OPEN_CLOSE_TAG_RE;
// An array of opening and corresponding closing sequences for html tags,
// last argument defines whether it can terminate a paragraph or not
//
var HTML_SEQUENCES = [
[ /^<(script|pre|style)(?=(\s|>|$))/i, /<\/(script|pre|style)>/i, true ],
[ /^<!--/, /-->/, true ],
[ /^<\?/, /\?>/, true ],
[ /^<![A-Z]/, />/, true ],
[ /^<!\[CDATA\[/, /\]\]>/, true ],
[ new RegExp('^</?(' + block_names.join('|') + ')(?=(\\s|/?>|$))', 'i'), /^$/, true ],
[ new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\s*$'), /^$/, false ]
];
module.exports = function html_block(state, startLine, endLine, silent) {
var i, nextLine, token, lineText,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
if (!state.md.options.html) { return false; }
if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }
lineText = state.src.slice(pos, max);
for (i = 0; i < HTML_SEQUENCES.length; i++) {
if (HTML_SEQUENCES[i][0].test(lineText)) { break; }
}
if (i === HTML_SEQUENCES.length) { return false; }
if (silent) {
// true if this sequence can be a terminator, false otherwise
return HTML_SEQUENCES[i][2];
}
nextLine = startLine + 1;
// If we are here - we detected HTML block.
// Let's roll down till block end.
if (!HTML_SEQUENCES[i][1].test(lineText)) {
for (; nextLine < endLine; nextLine++) {
if (state.sCount[nextLine] < state.blkIndent) { break; }
pos = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
lineText = state.src.slice(pos, max);
if (HTML_SEQUENCES[i][1].test(lineText)) {
if (lineText.length !== 0) { nextLine++; }
break;
}
}
}
state.line = nextLine;
token = state.push('html_block', '', 0);
token.map = [ startLine, nextLine ];
token.content = state.getLines(startLine, nextLine, state.blkIndent, true);
return true;
};
/***/ }),
/* 101 */
/***/ (function(module, exports) {
// List of valid html blocks names, accorting to commonmark spec
// http://jgm.github.io/CommonMark/spec.html#html-blocks
'use strict';
module.exports = [
'address',
'article',
'aside',
'base',
'basefont',
'blockquote',
'body',
'caption',
'center',
'col',
'colgroup',
'dd',
'details',
'dialog',
'dir',
'div',
'dl',
'dt',
'fieldset',
'figcaption',
'figure',
'footer',
'form',
'frame',
'frameset',
'h1',
'head',
'header',
'hr',
'html',
'iframe',
'legend',
'li',
'link',
'main',
'menu',
'menuitem',
'meta',
'nav',
'noframes',
'ol',
'optgroup',
'option',
'p',
'param',
'pre',
'section',
'source',
'title',
'summary',
'table',
'tbody',
'td',
'tfoot',
'th',
'thead',
'title',
'tr',
'track',
'ul'
];
/***/ }),
/* 102 */
/***/ (function(module, exports) {
// Regexps to match html elements
'use strict';
var attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*';
var unquoted = '[^"\'=<>`\\x00-\\x20]+';
var single_quoted = "'[^']*'";
var double_quoted = '"[^"]*"';
var attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')';
var attribute = '(?:\\s+' + attr_name + '(?:\\s*=\\s*' + attr_value + ')?)';
var open_tag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>';
var close_tag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>';
var comment = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->';
var processing = '<[?].*?[?]>';
var declaration = '<![A-Z]+\\s+[^>]*>';
var cdata = '<!\\[CDATA\\[[\\s\\S]*?\\]\\]>';
var HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment +
'|' + processing + '|' + declaration + '|' + cdata + ')');
var HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')');
module.exports.HTML_TAG_RE = HTML_TAG_RE;
module.exports.HTML_OPEN_CLOSE_TAG_RE = HTML_OPEN_CLOSE_TAG_RE;
/***/ }),
/* 103 */
/***/ (function(module, exports) {
// Paragraph
'use strict';
module.exports = function paragraph(state, startLine/*, endLine*/) {
var content, terminate, i, l, token,
nextLine = startLine + 1,
terminatorRules = state.md.block.ruler.getRules('paragraph'),
endLine = state.lineMax;
// jump line-by-line until empty one or EOF
for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
// this would be a code block normally, but after paragraph
// it's considered a lazy continuation regardless of what's there
if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }
// quirk for blockquotes, this line should already be checked by that rule
if (state.sCount[nextLine] < 0) { continue; }
// Some tags can terminate paragraph without empty line.
terminate = false;
for (i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) { break; }
}
content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
state.line = nextLine;
token = state.push('paragraph_open', 'p', 1);
token.map = [ startLine, state.line ];
token = state.push('inline', '', 0);
token.content = content;
token.map = [ startLine, state.line ];
token.children = [];
token = state.push('paragraph_close', 'p', -1);
return true;
};
/***/ }),
/* 104 */
/***/ (function(module, exports, __webpack_require__) {
// Parser state class
'use strict';
var Token = __webpack_require__(89);
var isSpace = __webpack_require__(61).isSpace;
function StateBlock(src, md, env, tokens) {
var ch, s, start, pos, len, indent, offset, indent_found;
this.src = src;
// link to parser instance
this.md = md;
this.env = env;
//
// Internal state vartiables
//
this.tokens = tokens;
this.bMarks = []; // line begin offsets for fast jumps
this.eMarks = []; // line end offsets for fast jumps
this.tShift = []; // offsets of the first non-space characters (tabs not expanded)
this.sCount = []; // indents for each line (tabs expanded)
// block parser variables
this.blkIndent = 0; // required block content indent
// (for example, if we are in list)
this.line = 0; // line index in src
this.lineMax = 0; // lines count
this.tight = false; // loose/tight mode for lists
this.parentType = 'root'; // if `list`, block parser stops on two newlines
this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)
this.level = 0;
// renderer
this.result = '';
// Create caches
// Generate markers.
s = this.src;
indent_found = false;
for (start = pos = indent = offset = 0, len = s.length; pos < len; pos++) {
ch = s.charCodeAt(pos);
if (!indent_found) {
if (isSpace(ch)) {
indent++;
if (ch === 0x09) {
offset += 4 - offset % 4;
} else {
offset++;
}
continue;
} else {
indent_found = true;
}
}
if (ch === 0x0A || pos === len - 1) {
if (ch !== 0x0A) { pos++; }
this.bMarks.push(start);
this.eMarks.push(pos);
this.tShift.push(indent);
this.sCount.push(offset);
indent_found = false;
indent = 0;
offset = 0;
start = pos + 1;
}
}
// Push fake entry to simplify cache bounds checks
this.bMarks.push(s.length);
this.eMarks.push(s.length);
this.tShift.push(0);
this.sCount.push(0);
this.lineMax = this.bMarks.length - 1; // don't count last fake line
}
// Push new token to "stream".
//
StateBlock.prototype.push = function (type, tag, nesting) {
var token = new Token(type, tag, nesting);
token.block = true;
if (nesting < 0) { this.level--; }
token.level = this.level;
if (nesting > 0) { this.level++; }
this.tokens.push(token);
return token;
};
StateBlock.prototype.isEmpty = function isEmpty(line) {
return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];
};
StateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {
for (var max = this.lineMax; from < max; from++) {
if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {
break;
}
}
return from;
};
// Skip spaces from given position.
StateBlock.prototype.skipSpaces = function skipSpaces(pos) {
var ch;
for (var max = this.src.length; pos < max; pos++) {
ch = this.src.charCodeAt(pos);
if (!isSpace(ch)) { break; }
}
return pos;
};
// Skip spaces from given position in reverse.
StateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {
if (pos <= min) { return pos; }
while (pos > min) {
if (!isSpace(this.src.charCodeAt(--pos))) { return pos + 1; }
}
return pos;
};
// Skip char codes from given position
StateBlock.prototype.skipChars = function skipChars(pos, code) {
for (var max = this.src.length; pos < max; pos++) {
if (this.src.charCodeAt(pos) !== code) { break; }
}
return pos;
};
// Skip char codes reverse from given position - 1
StateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {
if (pos <= min) { return pos; }
while (pos > min) {
if (code !== this.src.charCodeAt(--pos)) { return pos + 1; }
}
return pos;
};
// cut lines range from source.
StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {
var i, lineIndent, ch, first, last, queue, lineStart,
line = begin;
if (begin >= end) {
return '';
}
queue = new Array(end - begin);
for (i = 0; line < end; line++, i++) {
lineIndent = 0;
lineStart = first = this.bMarks[line];
if (line + 1 < end || keepLastLF) {
// No need for bounds check because we have fake entry on tail.
last = this.eMarks[line] + 1;
} else {
last = this.eMarks[line];
}
while (first < last && lineIndent < indent) {
ch = this.src.charCodeAt(first);
if (isSpace(ch)) {
if (ch === 0x09) {
lineIndent += 4 - lineIndent % 4;
} else {
lineIndent++;
}
} else if (first - lineStart < this.tShift[line]) {
// patched tShift masked characters to look like spaces (blockquotes, list markers)
lineIndent++;
} else {
break;
}
first++;
}
queue[i] = this.src.slice(first, last);
}
return queue.join('');
};
// re-export Token class to use in block rules
StateBlock.prototype.Token = Token;
module.exports = StateBlock;
/***/ }),
/* 105 */
/***/ (function(module, exports, __webpack_require__) {
/** internal
* class ParserInline
*
* Tokenizes paragraph content.
**/
'use strict';
var Ruler = __webpack_require__(81);
////////////////////////////////////////////////////////////////////////////////
// Parser rules
var _rules = [
[ 'text', __webpack_require__(106) ],
[ 'newline', __webpack_require__(107) ],
[ 'escape', __webpack_require__(108) ],
[ 'backticks', __webpack_require__(109) ],
[ 'strikethrough', __webpack_require__(110).tokenize ],
[ 'emphasis', __webpack_require__(111).tokenize ],
[ 'link', __webpack_require__(112) ],
[ 'image', __webpack_require__(113) ],
[ 'autolink', __webpack_require__(114) ],
[ 'html_inline', __webpack_require__(115) ],
[ 'entity', __webpack_require__(116) ]
];
var _rules2 = [
[ 'balance_pairs', __webpack_require__(117) ],
[ 'strikethrough', __webpack_require__(110).postProcess ],
[ 'emphasis', __webpack_require__(111).postProcess ],
[ 'text_collapse', __webpack_require__(118) ]
];
/**
* new ParserInline()
**/
function ParserInline() {
var i;
/**
* ParserInline#ruler -> Ruler
*
* [[Ruler]] instance. Keep configuration of inline rules.
**/
this.ruler = new Ruler();
for (i = 0; i < _rules.length; i++) {
this.ruler.push(_rules[i][0], _rules[i][1]);
}
/**
* ParserInline#ruler2 -> Ruler
*
* [[Ruler]] instance. Second ruler used for post-processing
* (e.g. in emphasis-like rules).
**/
this.ruler2 = new Ruler();
for (i = 0; i < _rules2.length; i++) {
this.ruler2.push(_rules2[i][0], _rules2[i][1]);
}
}
// Skip single token by running all rules in validation mode;
// returns `true` if any rule reported success
//
ParserInline.prototype.skipToken = function (state) {
var ok, i, pos = state.pos,
rules = this.ruler.getRules(''),
len = rules.length,
maxNesting = state.md.options.maxNesting,
cache = state.cache;
if (typeof cache[pos] !== 'undefined') {
state.pos = cache[pos];
return;
}
if (state.level < maxNesting) {
for (i = 0; i < len; i++) {
// Increment state.level and decrement it later to limit recursion.
// It's harmless to do here, because no tokens are created. But ideally,
// we'd need a separate private state variable for this purpose.
//
state.level++;
ok = rules[i](state, true);
state.level--;
if (ok) { break; }
}
} else {
// Too much nesting, just skip until the end of the paragraph.
//
// NOTE: this will cause links to behave incorrectly in the following case,
// when an amount of `[` is exactly equal to `maxNesting + 1`:
//
// [[[[[[[[[[[[[[[[[[[[[foo]()
//
// TODO: remove this workaround when CM standard will allow nested links
// (we can replace it by preventing links from being parsed in
// validation mode)
//
state.pos = state.posMax;
}
if (!ok) { state.pos++; }
cache[pos] = state.pos;
};
// Generate tokens for input range
//
ParserInline.prototype.tokenize = function (state) {
var ok, i,
rules = this.ruler.getRules(''),
len = rules.length,
end = state.posMax,
maxNesting = state.md.options.maxNesting;
while (state.pos < end) {
// Try all possible rules.
// On success, rule should:
//
// - update `state.pos`
// - update `state.tokens`
// - return true
if (state.level < maxNesting) {
for (i = 0; i < len; i++) {
ok = rules[i](state, false);
if (ok) { break; }
}
}
if (ok) {
if (state.pos >= end) { break; }
continue;
}
state.pending += state.src[state.pos++];
}
if (state.pending) {
state.pushPending();
}
};
/**
* ParserInline.parse(str, md, env, outTokens)
*
* Process input string and push inline tokens into `outTokens`
**/
ParserInline.prototype.parse = function (str, md, env, outTokens) {
var i, rules, len;
var state = new this.State(str, md, env, outTokens);
this.tokenize(state);
rules = this.ruler2.getRules('');
len = rules.length;
for (i = 0; i < len; i++) {
rules[i](state);
}
};
ParserInline.prototype.State = __webpack_require__(119);
module.exports = ParserInline;
/***/ }),
/* 106 */
/***/ (function(module, exports) {
// Skip text characters for text token, place those to pending buffer
// and increment current pos
'use strict';
// Rule to skip pure text
// '{}$%@~+=:' reserved for extentions
// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
// !!!! Don't confuse with "Markdown ASCII Punctuation" chars
// http://spec.commonmark.org/0.15/#ascii-punctuation-character
function isTerminatorChar(ch) {
switch (ch) {
case 0x0A/* \n */:
case 0x21/* ! */:
case 0x23/* # */:
case 0x24/* $ */:
case 0x25/* % */:
case 0x26/* & */:
case 0x2A/* * */:
case 0x2B/* + */:
case 0x2D/* - */:
case 0x3A/* : */:
case 0x3C/* < */:
case 0x3D/* = */:
case 0x3E/* > */:
case 0x40/* @ */:
case 0x5B/* [ */:
case 0x5C/* \ */:
case 0x5D/* ] */:
case 0x5E/* ^ */:
case 0x5F/* _ */:
case 0x60/* ` */:
case 0x7B/* { */:
case 0x7D/* } */:
case 0x7E/* ~ */:
return true;
default:
return false;
}
}
module.exports = function text(state, silent) {
var pos = state.pos;
while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {
pos++;
}
if (pos === state.pos) { return false; }
if (!silent) { state.pending += state.src.slice(state.pos, pos); }
state.pos = pos;
return true;
};
// Alternative implementation, for memory.
//
// It costs 10% of performance, but allows extend terminators list, if place it
// to `ParcerInline` property. Probably, will switch to it sometime, such
// flexibility required.
/*
var TERMINATOR_RE = /[\n!#$%&*+\-:<=>@[\\\]^_`{}~]/;
module.exports = function text(state, silent) {
var pos = state.pos,
idx = state.src.slice(pos).search(TERMINATOR_RE);
// first char is terminator -> empty text
if (idx === 0) { return false; }
// no terminator -> text till end of string
if (idx < 0) {
if (!silent) { state.pending += state.src.slice(pos); }
state.pos = state.src.length;
return true;
}
if (!silent) { state.pending += state.src.slice(pos, pos + idx); }
state.pos += idx;
return true;
};*/
/***/ }),
/* 107 */
/***/ (function(module, exports) {
// Proceess '\n'
'use strict';
module.exports = function newline(state, silent) {
var pmax, max, pos = state.pos;
if (state.src.charCodeAt(pos) !== 0x0A/* \n */) { return false; }
pmax = state.pending.length - 1;
max = state.posMax;
// ' \n' -> hardbreak
// Lookup in pending chars is bad practice! Don't copy to other rules!
// Pending string is stored in concat mode, indexed lookups will cause
// convertion to flat mode.
if (!silent) {
if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {
if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {
state.pending = state.pending.replace(/ +$/, '');
state.push('hardbreak', 'br', 0);
} else {
state.pending = state.pending.slice(0, -1);
state.push('softbreak', 'br', 0);
}
} else {
state.push('softbreak', 'br', 0);
}
}
pos++;
// skip heading spaces for next line
while (pos < max && state.src.charCodeAt(pos) === 0x20) { pos++; }
state.pos = pos;
return true;
};
/***/ }),
/* 108 */
/***/ (function(module, exports, __webpack_require__) {
// Proceess escaped chars and hardbreaks
'use strict';
var isSpace = __webpack_require__(61).isSpace;
var ESCAPED = [];
for (var i = 0; i < 256; i++) { ESCAPED.push(0); }
'\\!"#$%&\'()*+,./:;<=>?@[]^_`{|}~-'
.split('').forEach(function (ch) { ESCAPED[ch.charCodeAt(0)] = 1; });
module.exports = function escape(state, silent) {
var ch, pos = state.pos, max = state.posMax;
if (state.src.charCodeAt(pos) !== 0x5C/* \ */) { return false; }
pos++;
if (pos < max) {
ch = state.src.charCodeAt(pos);
if (ch < 256 && ESCAPED[ch] !== 0) {
if (!silent) { state.pending += state.src[pos]; }
state.pos += 2;
return true;
}
if (ch === 0x0A) {
if (!silent) {
state.push('hardbreak', 'br', 0);
}
pos++;
// skip leading whitespaces from next line
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (!isSpace(ch)) { break; }
pos++;
}
state.pos = pos;
return true;
}
}
if (!silent) { state.pending += '\\'; }
state.pos++;
return true;
};
/***/ }),
/* 109 */
/***/ (function(module, exports) {
// Parse backticks
'use strict';
module.exports = function backtick(state, silent) {
var start, max, marker, matchStart, matchEnd, token,
pos = state.pos,
ch = state.src.charCodeAt(pos);
if (ch !== 0x60/* ` */) { return false; }
start = pos;
pos++;
max = state.posMax;
while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++; }
marker = state.src.slice(start, pos);
matchStart = matchEnd = pos;
while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {
matchEnd = matchStart + 1;
while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++; }
if (matchEnd - matchStart === marker.length) {
if (!silent) {
token = state.push('code_inline', 'code', 0);
token.markup = marker;
token.content = state.src.slice(pos, matchStart)
.replace(/[ \n]+/g, ' ')
.trim();
}
state.pos = matchEnd;
return true;
}
}
if (!silent) { state.pending += marker; }
state.pos += marker.length;
return true;
};
/***/ }),
/* 110 */
/***/ (function(module, exports) {
// ~~strike through~~
//
'use strict';
// Insert each marker as a separate text token, and add it to delimiter list
//
module.exports.tokenize = function strikethrough(state, silent) {
var i, scanned, token, len, ch,
start = state.pos,
marker = state.src.charCodeAt(start);
if (silent) { return false; }
if (marker !== 0x7E/* ~ */) { return false; }
scanned = state.scanDelims(state.pos, true);
len = scanned.length;
ch = String.fromCharCode(marker);
if (len < 2) { return false; }
if (len % 2) {
token = state.push('text', '', 0);
token.content = ch;
len--;
}
for (i = 0; i < len; i += 2) {
token = state.push('text', '', 0);
token.content = ch + ch;
state.delimiters.push({
marker: marker,
jump: i,
token: state.tokens.length - 1,
level: state.level,
end: -1,
open: scanned.can_open,
close: scanned.can_close
});
}
state.pos += scanned.length;
return true;
};
// Walk through delimiter list and replace text tokens with tags
//
module.exports.postProcess = function strikethrough(state) {
var i, j,
startDelim,
endDelim,
token,
loneMarkers = [],
delimiters = state.delimiters,
max = state.delimiters.length;
for (i = 0; i < max; i++) {
startDelim = delimiters[i];
if (startDelim.marker !== 0x7E/* ~ */) {
continue;
}
if (startDelim.end === -1) {
continue;
}
endDelim = delimiters[startDelim.end];
token = state.tokens[startDelim.token];
token.type = 's_open';
token.tag = 's';
token.nesting = 1;
token.markup = '~~';
token.content = '';
token = state.tokens[endDelim.token];
token.type = 's_close';
token.tag = 's';
token.nesting = -1;
token.markup = '~~';
token.content = '';
if (state.tokens[endDelim.token - 1].type === 'text' &&
state.tokens[endDelim.token - 1].content === '~') {
loneMarkers.push(endDelim.token - 1);
}
}
// If a marker sequence has an odd number of characters, it's splitted
// like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the
// start of the sequence.
//
// So, we have to move all those markers after subsequent s_close tags.
//
while (loneMarkers.length) {
i = loneMarkers.pop();
j = i + 1;
while (j < state.tokens.length && state.tokens[j].type === 's_close') {
j++;
}
j--;
if (i !== j) {
token = state.tokens[j];
state.tokens[j] = state.tokens[i];
state.tokens[i] = token;
}
}
};
/***/ }),
/* 111 */
/***/ (function(module, exports) {
// Process *this* and _that_
//
'use strict';
// Insert each marker as a separate text token, and add it to delimiter list
//
module.exports.tokenize = function emphasis(state, silent) {
var i, scanned, token,
start = state.pos,
marker = state.src.charCodeAt(start);
if (silent) { return false; }
if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) { return false; }
scanned = state.scanDelims(state.pos, marker === 0x2A);
for (i = 0; i < scanned.length; i++) {
token = state.push('text', '', 0);
token.content = String.fromCharCode(marker);
state.delimiters.push({
// Char code of the starting marker (number).
//
marker: marker,
// An amount of characters before this one that's equivalent to
// current one. In plain English: if this delimiter does not open
// an emphasis, neither do previous `jump` characters.
//
// Used to skip sequences like "*****" in one step, for 1st asterisk
// value will be 0, for 2nd it's 1 and so on.
//
jump: i,
// A position of the token this delimiter corresponds to.
//
token: state.tokens.length - 1,
// Token level.
//
level: state.level,
// If this delimiter is matched as a valid opener, `end` will be
// equal to its position, otherwise it's `-1`.
//
end: -1,
// Boolean flags that determine if this delimiter could open or close
// an emphasis.
//
open: scanned.can_open,
close: scanned.can_close
});
}
state.pos += scanned.length;
return true;
};
// Walk through delimiter list and replace text tokens with tags
//
module.exports.postProcess = function emphasis(state) {
var i,
startDelim,
endDelim,
token,
ch,
isStrong,
delimiters = state.delimiters,
max = state.delimiters.length;
for (i = 0; i < max; i++) {
startDelim = delimiters[i];
if (startDelim.marker !== 0x5F/* _ */ && startDelim.marker !== 0x2A/* * */) {
continue;
}
// Process only opening markers
if (startDelim.end === -1) {
continue;
}
endDelim = delimiters[startDelim.end];
// If the next delimiter has the same marker and is adjacent to this one,
// merge those into one strong delimiter.
//
// `<em><em>whatever</em></em>` -> `<strong>whatever</strong>`
//
isStrong = i + 1 < max &&
delimiters[i + 1].end === startDelim.end - 1 &&
delimiters[i + 1].token === startDelim.token + 1 &&
delimiters[startDelim.end - 1].token === endDelim.token - 1 &&
delimiters[i + 1].marker === startDelim.marker;
ch = String.fromCharCode(startDelim.marker);
token = state.tokens[startDelim.token];
token.type = isStrong ? 'strong_open' : 'em_open';
token.tag = isStrong ? 'strong' : 'em';
token.nesting = 1;
token.markup = isStrong ? ch + ch : ch;
token.content = '';
token = state.tokens[endDelim.token];
token.type = isStrong ? 'strong_close' : 'em_close';
token.tag = isStrong ? 'strong' : 'em';
token.nesting = -1;
token.markup = isStrong ? ch + ch : ch;
token.content = '';
if (isStrong) {
state.tokens[delimiters[i + 1].token].content = '';
state.tokens[delimiters[startDelim.end - 1].token].content = '';
i++;
}
}
};
/***/ }),
/* 112 */
/***/ (function(module, exports, __webpack_require__) {
// Process [link](<to> "stuff")
'use strict';
var parseLinkLabel = __webpack_require__(76);
var parseLinkDestination = __webpack_require__(77);
var parseLinkTitle = __webpack_require__(78);
var normalizeReference = __webpack_require__(61).normalizeReference;
var isSpace = __webpack_require__(61).isSpace;
module.exports = function link(state, silent) {
var attrs,
code,
label,
labelEnd,
labelStart,
pos,
res,
ref,
title,
token,
href = '',
oldPos = state.pos,
max = state.posMax,
start = state.pos;
if (state.src.charCodeAt(state.pos) !== 0x5B/* [ */) { return false; }
labelStart = state.pos + 1;
labelEnd = parseLinkLabel(state, state.pos, true);
// parser failed to find ']', so it's not a valid link
if (labelEnd < 0) { return false; }
pos = labelEnd + 1;
if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {
//
// Inline link
//
// [link]( <href> "title" )
// ^^ skipping these spaces
pos++;
for (; pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 0x0A) { break; }
}
if (pos >= max) { return false; }
// [link]( <href> "title" )
// ^^^^^^ parsing link destination
start = pos;
res = parseLinkDestination(state.src, pos, state.posMax);
if (res.ok) {
href = state.md.normalizeLink(res.str);
if (state.md.validateLink(href)) {
pos = res.pos;
} else {
href = '';
}
}
// [link]( <href> "title" )
// ^^ skipping these spaces
start = pos;
for (; pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 0x0A) { break; }
}
// [link]( <href> "title" )
// ^^^^^^^ parsing link title
res = parseLinkTitle(state.src, pos, state.posMax);
if (pos < max && start !== pos && res.ok) {
title = res.str;
pos = res.pos;
// [link]( <href> "title" )
// ^^ skipping these spaces
for (; pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 0x0A) { break; }
}
} else {
title = '';
}
if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {
state.pos = oldPos;
return false;
}
pos++;
} else {
//
// Link reference
//
if (typeof state.env.references === 'undefined') { return false; }
if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {
start = pos + 1;
pos = parseLinkLabel(state, pos);
if (pos >= 0) {
label = state.src.slice(start, pos++);
} else {
pos = labelEnd + 1;
}
} else {
pos = labelEnd + 1;
}
// covers label === '' and label === undefined
// (collapsed reference link and shortcut reference link respectively)
if (!label) { label = state.src.slice(labelStart, labelEnd); }
ref = state.env.references[normalizeReference(label)];
if (!ref) {
state.pos = oldPos;
return false;
}
href = ref.href;
title = ref.title;
}
//
// We found the end of the link, and know for a fact it's a valid link;
// so all that's left to do is to call tokenizer.
//
if (!silent) {
state.pos = labelStart;
state.posMax = labelEnd;
token = state.push('link_open', 'a', 1);
token.attrs = attrs = [ [ 'href', href ] ];
if (title) {
attrs.push([ 'title', title ]);
}
state.md.inline.tokenize(state);
token = state.push('link_close', 'a', -1);
}
state.pos = pos;
state.posMax = max;
return true;
};
/***/ }),
/* 113 */
/***/ (function(module, exports, __webpack_require__) {
// Process ![image](<src> "title")
'use strict';
var parseLinkLabel = __webpack_require__(76);
var parseLinkDestination = __webpack_require__(77);
var parseLinkTitle = __webpack_require__(78);
var normalizeReference = __webpack_require__(61).normalizeReference;
var isSpace = __webpack_require__(61).isSpace;
module.exports = function image(state, silent) {
var attrs,
code,
content,
label,
labelEnd,
labelStart,
pos,
ref,
res,
title,
token,
tokens,
start,
href = '',
oldPos = state.pos,
max = state.posMax;
if (state.src.charCodeAt(state.pos) !== 0x21/* ! */) { return false; }
if (state.src.charCodeAt(state.pos + 1) !== 0x5B/* [ */) { return false; }
labelStart = state.pos + 2;
labelEnd = parseLinkLabel(state, state.pos + 1, false);
// parser failed to find ']', so it's not a valid link
if (labelEnd < 0) { return false; }
pos = labelEnd + 1;
if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {
//
// Inline link
//
// [link]( <href> "title" )
// ^^ skipping these spaces
pos++;
for (; pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 0x0A) { break; }
}
if (pos >= max) { return false; }
// [link]( <href> "title" )
// ^^^^^^ parsing link destination
start = pos;
res = parseLinkDestination(state.src, pos, state.posMax);
if (res.ok) {
href = state.md.normalizeLink(res.str);
if (state.md.validateLink(href)) {
pos = res.pos;
} else {
href = '';
}
}
// [link]( <href> "title" )
// ^^ skipping these spaces
start = pos;
for (; pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 0x0A) { break; }
}
// [link]( <href> "title" )
// ^^^^^^^ parsing link title
res = parseLinkTitle(state.src, pos, state.posMax);
if (pos < max && start !== pos && res.ok) {
title = res.str;
pos = res.pos;
// [link]( <href> "title" )
// ^^ skipping these spaces
for (; pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 0x0A) { break; }
}
} else {
title = '';
}
if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {
state.pos = oldPos;
return false;
}
pos++;
} else {
//
// Link reference
//
if (typeof state.env.references === 'undefined') { return false; }
if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {
start = pos + 1;
pos = parseLinkLabel(state, pos);
if (pos >= 0) {
label = state.src.slice(start, pos++);
} else {
pos = labelEnd + 1;
}
} else {
pos = labelEnd + 1;
}
// covers label === '' and label === undefined
// (collapsed reference link and shortcut reference link respectively)
if (!label) { label = state.src.slice(labelStart, labelEnd); }
ref = state.env.references[normalizeReference(label)];
if (!ref) {
state.pos = oldPos;
return false;
}
href = ref.href;
title = ref.title;
}
//
// We found the end of the link, and know for a fact it's a valid link;
// so all that's left to do is to call tokenizer.
//
if (!silent) {
content = state.src.slice(labelStart, labelEnd);
state.md.inline.parse(
content,
state.md,
state.env,
tokens = []
);
token = state.push('image', 'img', 0);
token.attrs = attrs = [ [ 'src', href ], [ 'alt', '' ] ];
token.children = tokens;
token.content = content;
if (title) {
attrs.push([ 'title', title ]);
}
}
state.pos = pos;
state.posMax = max;
return true;
};
/***/ }),
/* 114 */
/***/ (function(module, exports) {
// Process autolinks '<protocol:...>'
'use strict';
/*eslint max-len:0*/
var EMAIL_RE = /^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/;
var AUTOLINK_RE = /^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;
module.exports = function autolink(state, silent) {
var tail, linkMatch, emailMatch, url, fullUrl, token,
pos = state.pos;
if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }
tail = state.src.slice(pos);
if (tail.indexOf('>') < 0) { return false; }
if (AUTOLINK_RE.test(tail)) {
linkMatch = tail.match(AUTOLINK_RE);
url = linkMatch[0].slice(1, -1);
fullUrl = state.md.normalizeLink(url);
if (!state.md.validateLink(fullUrl)) { return false; }
if (!silent) {
token = state.push('link_open', 'a', 1);
token.attrs = [ [ 'href', fullUrl ] ];
token.markup = 'autolink';
token.info = 'auto';
token = state.push('text', '', 0);
token.content = state.md.normalizeLinkText(url);
token = state.push('link_close', 'a', -1);
token.markup = 'autolink';
token.info = 'auto';
}
state.pos += linkMatch[0].length;
return true;
}
if (EMAIL_RE.test(tail)) {
emailMatch = tail.match(EMAIL_RE);
url = emailMatch[0].slice(1, -1);
fullUrl = state.md.normalizeLink('mailto:' + url);
if (!state.md.validateLink(fullUrl)) { return false; }
if (!silent) {
token = state.push('link_open', 'a', 1);
token.attrs = [ [ 'href', fullUrl ] ];
token.markup = 'autolink';
token.info = 'auto';
token = state.push('text', '', 0);
token.content = state.md.normalizeLinkText(url);
token = state.push('link_close', 'a', -1);
token.markup = 'autolink';
token.info = 'auto';
}
state.pos += emailMatch[0].length;
return true;
}
return false;
};
/***/ }),
/* 115 */
/***/ (function(module, exports, __webpack_require__) {
// Process html tags
'use strict';
var HTML_TAG_RE = __webpack_require__(102).HTML_TAG_RE;
function isLetter(ch) {
/*eslint no-bitwise:0*/
var lc = ch | 0x20; // to lower case
return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */);
}
module.exports = function html_inline(state, silent) {
var ch, match, max, token,
pos = state.pos;
if (!state.md.options.html) { return false; }
// Check start
max = state.posMax;
if (state.src.charCodeAt(pos) !== 0x3C/* < */ ||
pos + 2 >= max) {
return false;
}
// Quick fail on second char
ch = state.src.charCodeAt(pos + 1);
if (ch !== 0x21/* ! */ &&
ch !== 0x3F/* ? */ &&
ch !== 0x2F/* / */ &&
!isLetter(ch)) {
return false;
}
match = state.src.slice(pos).match(HTML_TAG_RE);
if (!match) { return false; }
if (!silent) {
token = state.push('html_inline', '', 0);
token.content = state.src.slice(pos, pos + match[0].length);
}
state.pos += match[0].length;
return true;
};
/***/ }),
/* 116 */
/***/ (function(module, exports, __webpack_require__) {
// Process html entity - &#123;, &#xAF;, &quot;, ...
'use strict';
var entities = __webpack_require__(62);
var has = __webpack_require__(61).has;
var isValidEntityCode = __webpack_require__(61).isValidEntityCode;
var fromCodePoint = __webpack_require__(61).fromCodePoint;
var DIGITAL_RE = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i;
var NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;
module.exports = function entity(state, silent) {
var ch, code, match, pos = state.pos, max = state.posMax;
if (state.src.charCodeAt(pos) !== 0x26/* & */) { return false; }
if (pos + 1 < max) {
ch = state.src.charCodeAt(pos + 1);
if (ch === 0x23 /* # */) {
match = state.src.slice(pos).match(DIGITAL_RE);
if (match) {
if (!silent) {
code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);
state.pending += isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);
}
state.pos += match[0].length;
return true;
}
} else {
match = state.src.slice(pos).match(NAMED_RE);
if (match) {
if (has(entities, match[1])) {
if (!silent) { state.pending += entities[match[1]]; }
state.pos += match[0].length;
return true;
}
}
}
}
if (!silent) { state.pending += '&'; }
state.pos++;
return true;
};
/***/ }),
/* 117 */
/***/ (function(module, exports) {
// For each opening emphasis-like marker find a matching closing one
//
'use strict';
module.exports = function link_pairs(state) {
var i, j, lastDelim, currDelim,
delimiters = state.delimiters,
max = state.delimiters.length;
for (i = 0; i < max; i++) {
lastDelim = delimiters[i];
if (!lastDelim.close) { continue; }
j = i - lastDelim.jump - 1;
while (j >= 0) {
currDelim = delimiters[j];
if (currDelim.open &&
currDelim.marker === lastDelim.marker &&
currDelim.end < 0 &&
currDelim.level === lastDelim.level) {
lastDelim.jump = i - j;
lastDelim.open = false;
currDelim.end = i;
currDelim.jump = 0;
break;
}
j -= currDelim.jump + 1;
}
}
};
/***/ }),
/* 118 */
/***/ (function(module, exports) {
// Merge adjacent text nodes into one, and re-calculate all token levels
//
'use strict';
module.exports = function text_collapse(state) {
var curr, last,
level = 0,
tokens = state.tokens,
max = state.tokens.length;
for (curr = last = 0; curr < max; curr++) {
// re-calculate levels
level += tokens[curr].nesting;
tokens[curr].level = level;
if (tokens[curr].type === 'text' &&
curr + 1 < max &&
tokens[curr + 1].type === 'text') {
// collapse two adjacent text nodes
tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
} else {
if (curr !== last) { tokens[last] = tokens[curr]; }
last++;
}
}
if (curr !== last) {
tokens.length = last;
}
};
/***/ }),
/* 119 */
/***/ (function(module, exports, __webpack_require__) {
// Inline parser state
'use strict';
var Token = __webpack_require__(89);
var isWhiteSpace = __webpack_require__(61).isWhiteSpace;
var isPunctChar = __webpack_require__(61).isPunctChar;
var isMdAsciiPunct = __webpack_require__(61).isMdAsciiPunct;
function StateInline(src, md, env, outTokens) {
this.src = src;
this.env = env;
this.md = md;
this.tokens = outTokens;
this.pos = 0;
this.posMax = this.src.length;
this.level = 0;
this.pending = '';
this.pendingLevel = 0;
this.cache = {}; // Stores { start: end } pairs. Useful for backtrack
// optimization of pairs parse (emphasis, strikes).
this.delimiters = []; // Emphasis-like delimiters
}
// Flush pending text
//
StateInline.prototype.pushPending = function () {
var token = new Token('text', '', 0);
token.content = this.pending;
token.level = this.pendingLevel;
this.tokens.push(token);
this.pending = '';
return token;
};
// Push new token to "stream".
// If pending text exists - flush it as text token
//
StateInline.prototype.push = function (type, tag, nesting) {
if (this.pending) {
this.pushPending();
}
var token = new Token(type, tag, nesting);
if (nesting < 0) { this.level--; }
token.level = this.level;
if (nesting > 0) { this.level++; }
this.pendingLevel = this.level;
this.tokens.push(token);
return token;
};
// Scan a sequence of emphasis-like markers, and determine whether
// it can start an emphasis sequence or end an emphasis sequence.
//
// - start - position to scan from (it should point at a valid marker);
// - canSplitWord - determine if these markers can be found inside a word
//
StateInline.prototype.scanDelims = function (start, canSplitWord) {
var pos = start, lastChar, nextChar, count, can_open, can_close,
isLastWhiteSpace, isLastPunctChar,
isNextWhiteSpace, isNextPunctChar,
left_flanking = true,
right_flanking = true,
max = this.posMax,
marker = this.src.charCodeAt(start);
// treat beginning of the line as a whitespace
lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;
while (pos < max && this.src.charCodeAt(pos) === marker) { pos++; }
count = pos - start;
// treat end of the line as a whitespace
nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;
isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
isLastWhiteSpace = isWhiteSpace(lastChar);
isNextWhiteSpace = isWhiteSpace(nextChar);
if (isNextWhiteSpace) {
left_flanking = false;
} else if (isNextPunctChar) {
if (!(isLastWhiteSpace || isLastPunctChar)) {
left_flanking = false;
}
}
if (isLastWhiteSpace) {
right_flanking = false;
} else if (isLastPunctChar) {
if (!(isNextWhiteSpace || isNextPunctChar)) {
right_flanking = false;
}
}
if (!canSplitWord) {
can_open = left_flanking && (!right_flanking || isLastPunctChar);
can_close = right_flanking && (!left_flanking || isNextPunctChar);
} else {
can_open = left_flanking;
can_close = right_flanking;
}
return {
can_open: can_open,
can_close: can_close,
length: count
};
};
// re-export Token class to use in block rules
StateInline.prototype.Token = Token;
module.exports = StateInline;
/***/ }),
/* 120 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
////////////////////////////////////////////////////////////////////////////////
// Helpers
// Merge objects
//
function assign(obj /*from1, from2, from3, ...*/) {
var sources = Array.prototype.slice.call(arguments, 1);
sources.forEach(function (source) {
if (!source) { return; }
Object.keys(source).forEach(function (key) {
obj[key] = source[key];
});
});
return obj;
}
function _class(obj) { return Object.prototype.toString.call(obj); }
function isString(obj) { return _class(obj) === '[object String]'; }
function isObject(obj) { return _class(obj) === '[object Object]'; }
function isRegExp(obj) { return _class(obj) === '[object RegExp]'; }
function isFunction(obj) { return _class(obj) === '[object Function]'; }
function escapeRE(str) { return str.replace(/[.?*+^$[\]\\(){}|-]/g, '\\$&'); }
////////////////////////////////////////////////////////////////////////////////
var defaultOptions = {
fuzzyLink: true,
fuzzyEmail: true,
fuzzyIP: false
};
function isOptionsObj(obj) {
return Object.keys(obj || {}).reduce(function (acc, k) {
return acc || defaultOptions.hasOwnProperty(k);
}, false);
}
var defaultSchemas = {
'http:': {
validate: function (text, pos, self) {
var tail = text.slice(pos);
if (!self.re.http) {
// compile lazily, because "host"-containing variables can change on tlds update.
self.re.http = new RegExp(
'^\\/\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'
);
}
if (self.re.http.test(tail)) {
return tail.match(self.re.http)[0].length;
}
return 0;
}
},
'https:': 'http:',
'ftp:': 'http:',
'//': {
validate: function (text, pos, self) {
var tail = text.slice(pos);
if (!self.re.no_http) {
// compile lazily, because "host"-containing variables can change on tlds update.
self.re.no_http = new RegExp(
'^' +
self.re.src_auth +
// Don't allow single-level domains, because of false positives like '//test'
// with code comments
'(?:localhost|(?:(?:' + self.re.src_domain + ')\\.)+' + self.re.src_domain_root + ')' +
self.re.src_port +
self.re.src_host_terminator +
self.re.src_path,
'i'
);
}
if (self.re.no_http.test(tail)) {
// should not be `://` & `///`, that protects from errors in protocol name
if (pos >= 3 && text[pos - 3] === ':') { return 0; }
if (pos >= 3 && text[pos - 3] === '/') { return 0; }
return tail.match(self.re.no_http)[0].length;
}
return 0;
}
},
'mailto:': {
validate: function (text, pos, self) {
var tail = text.slice(pos);
if (!self.re.mailto) {
self.re.mailto = new RegExp(
'^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'
);
}
if (self.re.mailto.test(tail)) {
return tail.match(self.re.mailto)[0].length;
}
return 0;
}
}
};
/*eslint-disable max-len*/
// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)
var tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';
// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead
var tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');
/*eslint-enable max-len*/
////////////////////////////////////////////////////////////////////////////////
function resetScanCache(self) {
self.__index__ = -1;
self.__text_cache__ = '';
}
function createValidator(re) {
return function (text, pos) {
var tail = text.slice(pos);
if (re.test(tail)) {
return tail.match(re)[0].length;
}
return 0;
};
}
function createNormalizer() {
return function (match, self) {
self.normalize(match);
};
}
// Schemas compiler. Build regexps.
//
function compile(self) {
// Load & clone RE patterns.
var re = self.re = assign({}, __webpack_require__(121));
// Define dynamic patterns
var tlds = self.__tlds__.slice();
if (!self.__tlds_replaced__) {
tlds.push(tlds_2ch_src_re);
}
tlds.push(re.src_xn);
re.src_tlds = tlds.join('|');
function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }
re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');
re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');
re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');
re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');
//
// Compile each schema
//
var aliases = [];
self.__compiled__ = {}; // Reset compiled data
function schemaError(name, val) {
throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val);
}
Object.keys(self.__schemas__).forEach(function (name) {
var val = self.__schemas__[name];
// skip disabled methods
if (val === null) { return; }
var compiled = { validate: null, link: null };
self.__compiled__[name] = compiled;
if (isObject(val)) {
if (isRegExp(val.validate)) {
compiled.validate = createValidator(val.validate);
} else if (isFunction(val.validate)) {
compiled.validate = val.validate;
} else {
schemaError(name, val);
}
if (isFunction(val.normalize)) {
compiled.normalize = val.normalize;
} else if (!val.normalize) {
compiled.normalize = createNormalizer();
} else {
schemaError(name, val);
}
return;
}
if (isString(val)) {
aliases.push(name);
return;
}
schemaError(name, val);
});
//
// Compile postponed aliases
//
aliases.forEach(function (alias) {
if (!self.__compiled__[self.__schemas__[alias]]) {
// Silently fail on missed schemas to avoid errons on disable.
// schemaError(alias, self.__schemas__[alias]);
return;
}
self.__compiled__[alias].validate =
self.__compiled__[self.__schemas__[alias]].validate;
self.__compiled__[alias].normalize =
self.__compiled__[self.__schemas__[alias]].normalize;
});
//
// Fake record for guessed links
//
self.__compiled__[''] = { validate: null, normalize: createNormalizer() };
//
// Build schema condition
//
var slist = Object.keys(self.__compiled__)
.filter(function (name) {
// Filter disabled & fake schemas
return name.length > 0 && self.__compiled__[name];
})
.map(escapeRE)
.join('|');
// (?!_) cause 1.5x slowdown
self.re.schema_test = RegExp('(^|(?!_)(?:[><]|' + re.src_ZPCc + '))(' + slist + ')', 'i');
self.re.schema_search = RegExp('(^|(?!_)(?:[><]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');
self.re.pretest = RegExp(
'(' + self.re.schema_test.source + ')|' +
'(' + self.re.host_fuzzy_test.source + ')|' +
'@',
'i');
//
// Cleanup
//
resetScanCache(self);
}
/**
* class Match
*
* Match result. Single element of array, returned by [[LinkifyIt#match]]
**/
function Match(self, shift) {
var start = self.__index__,
end = self.__last_index__,
text = self.__text_cache__.slice(start, end);
/**
* Match#schema -> String
*
* Prefix (protocol) for matched string.
**/
this.schema = self.__schema__.toLowerCase();
/**
* Match#index -> Number
*
* First position of matched string.
**/
this.index = start + shift;
/**
* Match#lastIndex -> Number
*
* Next position after matched string.
**/
this.lastIndex = end + shift;
/**
* Match#raw -> String
*
* Matched string.
**/
this.raw = text;
/**
* Match#text -> String
*
* Notmalized text of matched string.
**/
this.text = text;
/**
* Match#url -> String
*
* Normalized url of matched string.
**/
this.url = text;
}
function createMatch(self, shift) {
var match = new Match(self, shift);
self.__compiled__[match.schema].normalize(match, self);
return match;
}
/**
* class LinkifyIt
**/
/**
* new LinkifyIt(schemas, options)
* - schemas (Object): Optional. Additional schemas to validate (prefix/validator)
* - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
*
* Creates new linkifier instance with optional additional schemas.
* Can be called without `new` keyword for convenience.
*
* By default understands:
*
* - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links
* - "fuzzy" links and emails (example.com, foo@bar.com).
*
* `schemas` is an object, where each key/value describes protocol/rule:
*
* - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`
* for example). `linkify-it` makes shure that prefix is not preceeded with
* alphanumeric char and symbols. Only whitespaces and punctuation allowed.
* - __value__ - rule to check tail after link prefix
* - _String_ - just alias to existing rule
* - _Object_
* - _validate_ - validator function (should return matched length on success),
* or `RegExp`.
* - _normalize_ - optional function to normalize text & url of matched result
* (for example, for @twitter mentions).
*
* `options`:
*
* - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.
* - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts
* like version numbers. Default `false`.
* - __fuzzyEmail__ - recognize emails without `mailto:` prefix.
*
**/
function LinkifyIt(schemas, options) {
if (!(this instanceof LinkifyIt)) {
return new LinkifyIt(schemas, options);
}
if (!options) {
if (isOptionsObj(schemas)) {
options = schemas;
schemas = {};
}
}
this.__opts__ = assign({}, defaultOptions, options);
// Cache last tested result. Used to skip repeating steps on next `match` call.
this.__index__ = -1;
this.__last_index__ = -1; // Next scan position
this.__schema__ = '';
this.__text_cache__ = '';
this.__schemas__ = assign({}, defaultSchemas, schemas);
this.__compiled__ = {};
this.__tlds__ = tlds_default;
this.__tlds_replaced__ = false;
this.re = {};
compile(this);
}
/** chainable
* LinkifyIt#add(schema, definition)
* - schema (String): rule name (fixed pattern prefix)
* - definition (String|RegExp|Object): schema definition
*
* Add new rule definition. See constructor description for details.
**/
LinkifyIt.prototype.add = function add(schema, definition) {
this.__schemas__[schema] = definition;
compile(this);
return this;
};
/** chainable
* LinkifyIt#set(options)
* - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
*
* Set recognition options for links without schema.
**/
LinkifyIt.prototype.set = function set(options) {
this.__opts__ = assign(this.__opts__, options);
return this;
};
/**
* LinkifyIt#test(text) -> Boolean
*
* Searches linkifiable pattern and returns `true` on success or `false` on fail.
**/
LinkifyIt.prototype.test = function test(text) {
// Reset scan cache
this.__text_cache__ = text;
this.__index__ = -1;
if (!text.length) { return false; }
var m, ml, me, len, shift, next, re, tld_pos, at_pos;
// try to scan for link with schema - that's the most simple rule
if (this.re.schema_test.test(text)) {
re = this.re.schema_search;
re.lastIndex = 0;
while ((m = re.exec(text)) !== null) {
len = this.testSchemaAt(text, m[2], re.lastIndex);
if (len) {
this.__schema__ = m[2];
this.__index__ = m.index + m[1].length;
this.__last_index__ = m.index + m[0].length + len;
break;
}
}
}
if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {
// guess schemaless links
tld_pos = text.search(this.re.host_fuzzy_test);
if (tld_pos >= 0) {
// if tld is located after found link - no need to check fuzzy pattern
if (this.__index__ < 0 || tld_pos < this.__index__) {
if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {
shift = ml.index + ml[1].length;
if (this.__index__ < 0 || shift < this.__index__) {
this.__schema__ = '';
this.__index__ = shift;
this.__last_index__ = ml.index + ml[0].length;
}
}
}
}
}
if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {
// guess schemaless emails
at_pos = text.indexOf('@');
if (at_pos >= 0) {
// We can't skip this check, because this cases are possible:
// 192.168.1.1@gmail.com, my.in@example.com
if ((me = text.match(this.re.email_fuzzy)) !== null) {
shift = me.index + me[1].length;
next = me.index + me[0].length;
if (this.__index__ < 0 || shift < this.__index__ ||
(shift === this.__index__ && next > this.__last_index__)) {
this.__schema__ = 'mailto:';
this.__index__ = shift;
this.__last_index__ = next;
}
}
}
}
return this.__index__ >= 0;
};
/**
* LinkifyIt#pretest(text) -> Boolean
*
* Very quick check, that can give false positives. Returns true if link MAY BE
* can exists. Can be used for speed optimization, when you need to check that
* link NOT exists.
**/
LinkifyIt.prototype.pretest = function pretest(text) {
return this.re.pretest.test(text);
};
/**
* LinkifyIt#testSchemaAt(text, name, position) -> Number
* - text (String): text to scan
* - name (String): rule (schema) name
* - position (Number): text offset to check from
*
* Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly
* at given position. Returns length of found pattern (0 on fail).
**/
LinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {
// If not supported schema check requested - terminate
if (!this.__compiled__[schema.toLowerCase()]) {
return 0;
}
return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);
};
/**
* LinkifyIt#match(text) -> Array|null
*
* Returns array of found link descriptions or `null` on fail. We strongly
* recommend to use [[LinkifyIt#test]] first, for best speed.
*
* ##### Result match description
*
* - __schema__ - link schema, can be empty for fuzzy links, or `//` for
* protocol-neutral links.
* - __index__ - offset of matched text
* - __lastIndex__ - index of next char after mathch end
* - __raw__ - matched text
* - __text__ - normalized text
* - __url__ - link, generated from matched text
**/
LinkifyIt.prototype.match = function match(text) {
var shift = 0, result = [];
// Try to take previous element from cache, if .test() called before
if (this.__index__ >= 0 && this.__text_cache__ === text) {
result.push(createMatch(this, shift));
shift = this.__last_index__;
}
// Cut head if cache was used
var tail = shift ? text.slice(shift) : text;
// Scan string until end reached
while (this.test(tail)) {
result.push(createMatch(this, shift));
tail = tail.slice(this.__last_index__);
shift += this.__last_index__;
}
if (result.length) {
return result;
}
return null;
};
/** chainable
* LinkifyIt#tlds(list [, keepOld]) -> this
* - list (Array): list of tlds
* - keepOld (Boolean): merge with current list if `true` (`false` by default)
*
* Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)
* to avoid false positives. By default this algorythm used:
*
* - hostname with any 2-letter root zones are ok.
* - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф
* are ok.
* - encoded (`xn--...`) root zones are ok.
*
* If list is replaced, then exact match for 2-chars root zones will be checked.
**/
LinkifyIt.prototype.tlds = function tlds(list, keepOld) {
list = Array.isArray(list) ? list : [ list ];
if (!keepOld) {
this.__tlds__ = list.slice();
this.__tlds_replaced__ = true;
compile(this);
return this;
}
this.__tlds__ = this.__tlds__.concat(list)
.sort()
.filter(function (el, idx, arr) {
return el !== arr[idx - 1];
})
.reverse();
compile(this);
return this;
};
/**
* LinkifyIt#normalize(match)
*
* Default normalizer (if schema does not define it's own).
**/
LinkifyIt.prototype.normalize = function normalize(match) {
// Do minimal possible changes by default. Need to collect feedback prior
// to move forward https://github.com/markdown-it/linkify-it/issues/1
if (!match.schema) { match.url = 'http://' + match.url; }
if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {
match.url = 'mailto:' + match.url;
}
};
module.exports = LinkifyIt;
/***/ }),
/* 121 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
// Use direct extract instead of `regenerate` to reduse browserified size
var src_Any = exports.src_Any = __webpack_require__(71).source;
var src_Cc = exports.src_Cc = __webpack_require__(72).source;
var src_Z = exports.src_Z = __webpack_require__(74).source;
var src_P = exports.src_P = __webpack_require__(64).source;
// \p{\Z\P\Cc\CF} (white spaces + control + format + punctuation)
var src_ZPCc = exports.src_ZPCc = [ src_Z, src_P, src_Cc ].join('|');
// \p{\Z\Cc} (white spaces + control)
var src_ZCc = exports.src_ZCc = [ src_Z, src_Cc ].join('|');
// All possible word characters (everything without punctuation, spaces & controls)
// Defined via punctuation & spaces to save space
// Should be something like \p{\L\N\S\M} (\w but without `_`)
var src_pseudo_letter = '(?:(?!>|<|' + src_ZPCc + ')' + src_Any + ')';
// The same as abothe but without [0-9]
// var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';
////////////////////////////////////////////////////////////////////////////////
var src_ip4 = exports.src_ip4 =
'(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';
// Prohibit [@/] in user/pass to avoid wrong domain fetch.
exports.src_auth = '(?:(?:(?!' + src_ZCc + '|[@/]).)+@)?';
var src_port = exports.src_port =
'(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?';
var src_host_terminator = exports.src_host_terminator =
'(?=$|>|<|' + src_ZPCc + ')(?!-|_|:\\d|\\.-|\\.(?!$|' + src_ZPCc + '))';
var src_path = exports.src_path =
'(?:' +
'[/?#]' +
'(?:' +
'(?!' + src_ZCc + '|[()[\\]{}.,"\'?!\\-<>]).|' +
'\\[(?:(?!' + src_ZCc + '|\\]).)*\\]|' +
'\\((?:(?!' + src_ZCc + '|[)]).)*\\)|' +
'\\{(?:(?!' + src_ZCc + '|[}]).)*\\}|' +
'\\"(?:(?!' + src_ZCc + '|["]).)+\\"|' +
"\\'(?:(?!" + src_ZCc + "|[']).)+\\'|" +
"\\'(?=" + src_pseudo_letter + ').|' + // allow `I'm_king` if no pair found
'\\.{2,3}[a-zA-Z0-9%/]|' + // github has ... in commit range links. Restrict to
// - english
// - percent-encoded
// - parts of file path
// until more examples found.
'\\.(?!' + src_ZCc + '|[.]).|' +
'\\-(?!--(?:[^-]|$))(?:-*)|' + // `---` => long dash, terminate
'\\,(?!' + src_ZCc + ').|' + // allow `,,,` in paths
'\\!(?!' + src_ZCc + '|[!]).|' +
'\\?(?!' + src_ZCc + '|[?]).' +
')+' +
'|\\/' +
')?';
var src_email_name = exports.src_email_name =
'[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+';
var src_xn = exports.src_xn =
'xn--[a-z0-9\\-]{1,59}';
// More to read about domain names
// http://serverfault.com/questions/638260/
var src_domain_root = exports.src_domain_root =
// Allow letters & digits (http://test1)
'(?:' +
src_xn +
'|' +
src_pseudo_letter + '{1,63}' +
')';
var src_domain = exports.src_domain =
'(?:' +
src_xn +
'|' +
'(?:' + src_pseudo_letter + ')' +
'|' +
// don't allow `--` in domain names, because:
// - that can conflict with markdown &mdash; / &ndash;
// - nobody use those anyway
'(?:' + src_pseudo_letter + '(?:-(?!-)|' + src_pseudo_letter + '){0,61}' + src_pseudo_letter + ')' +
')';
var src_host = exports.src_host =
'(?:' +
// Don't need IP check, because digits are already allowed in normal domain names
// src_ip4 +
// '|' +
'(?:(?:(?:' + src_domain + ')\\.)*' + src_domain_root + ')' +
')';
var tpl_host_fuzzy = exports.tpl_host_fuzzy =
'(?:' +
src_ip4 +
'|' +
'(?:(?:(?:' + src_domain + ')\\.)+(?:%TLDS%))' +
')';
var tpl_host_no_ip_fuzzy = exports.tpl_host_no_ip_fuzzy =
'(?:(?:(?:' + src_domain + ')\\.)+(?:%TLDS%))';
exports.src_host_strict =
src_host + src_host_terminator;
var tpl_host_fuzzy_strict = exports.tpl_host_fuzzy_strict =
tpl_host_fuzzy + src_host_terminator;
exports.src_host_port_strict =
src_host + src_port + src_host_terminator;
var tpl_host_port_fuzzy_strict = exports.tpl_host_port_fuzzy_strict =
tpl_host_fuzzy + src_port + src_host_terminator;
var tpl_host_port_no_ip_fuzzy_strict = exports.tpl_host_port_no_ip_fuzzy_strict =
tpl_host_no_ip_fuzzy + src_port + src_host_terminator;
////////////////////////////////////////////////////////////////////////////////
// Main rules
// Rude test fuzzy links by host, for quick deny
exports.tpl_host_fuzzy_test =
'localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + src_ZPCc + '|>|$))';
exports.tpl_email_fuzzy =
'(^|<|>|\\(|' + src_ZCc + ')(' + src_email_name + '@' + tpl_host_fuzzy_strict + ')';
exports.tpl_link_fuzzy =
// Fuzzy link can't be prepended with .:/\- and non punctuation.
// but can start with > (markdown blockquote)
'(^|(?![.:/\\-_@])(?:[$+<=>^`|]|' + src_ZPCc + '))' +
'((?![$+<=>^`|])' + tpl_host_port_fuzzy_strict + src_path + ')';
exports.tpl_link_no_ip_fuzzy =
// Fuzzy link can't be prepended with .:/\- and non punctuation.
// but can start with > (markdown blockquote)
'(^|(?![.:/\\-_@])(?:[$+<=>^`|]|' + src_ZPCc + '))' +
'((?![$+<=>^`|])' + tpl_host_port_no_ip_fuzzy_strict + src_path + ')';
/***/ }),
/* 122 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {/*! https://mths.be/punycode v1.4.1 by @mathias */
;(function(root) {
/** Detect free variables */
var freeExports = typeof exports == 'object' && exports &&
!exports.nodeType && exports;
var freeModule = typeof module == 'object' && module &&
!module.nodeType && module;
var freeGlobal = typeof global == 'object' && global;
if (
freeGlobal.global === freeGlobal ||
freeGlobal.window === freeGlobal ||
freeGlobal.self === freeGlobal
) {
root = freeGlobal;
}
/**
* The `punycode` object.
* @name punycode
* @type Object
*/
var punycode,
/** Highest positive signed 32-bit float value */
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
/** Bootstring parameters */
base = 36,
tMin = 1,
tMax = 26,
skew = 38,
damp = 700,
initialBias = 72,
initialN = 128, // 0x80
delimiter = '-', // '\x2D'
/** Regular expressions */
regexPunycode = /^xn--/,
regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
/** Error messages */
errors = {
'overflow': 'Overflow: input needs wider integers to process',
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
'invalid-input': 'Invalid input'
},
/** Convenience shortcuts */
baseMinusTMin = base - tMin,
floor = Math.floor,
stringFromCharCode = String.fromCharCode,
/** Temporary variable */
key;
/*--------------------------------------------------------------------------*/
/**
* A generic error utility function.
* @private
* @param {String} type The error type.
* @returns {Error} Throws a `RangeError` with the applicable error message.
*/
function error(type) {
throw new RangeError(errors[type]);
}
/**
* A generic `Array#map` utility function.
* @private
* @param {Array} array The array to iterate over.
* @param {Function} callback The function that gets called for every array
* item.
* @returns {Array} A new array of values returned by the callback function.
*/
function map(array, fn) {
var length = array.length;
var result = [];
while (length--) {
result[length] = fn(array[length]);
}
return result;
}
/**
* A simple `Array#map`-like wrapper to work with domain name strings or email
* addresses.
* @private
* @param {String} domain The domain name or email address.
* @param {Function} callback The function that gets called for every
* character.
* @returns {Array} A new string of characters returned by the callback
* function.
*/
function mapDomain(string, fn) {
var parts = string.split('@');
var result = '';
if (parts.length > 1) {
// In email addresses, only the domain name should be punycoded. Leave
// the local part (i.e. everything up to `@`) intact.
result = parts[0] + '@';
string = parts[1];
}
// Avoid `split(regex)` for IE8 compatibility. See #17.
string = string.replace(regexSeparators, '\x2E');
var labels = string.split('.');
var encoded = map(labels, fn).join('.');
return result + encoded;
}
/**
* Creates an array containing the numeric code points of each Unicode
* character in the string. While JavaScript uses UCS-2 internally,
* this function will convert a pair of surrogate halves (each of which
* UCS-2 exposes as separate characters) into a single code point,
* matching UTF-16.
* @see `punycode.ucs2.encode`
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode.ucs2
* @name decode
* @param {String} string The Unicode input string (UCS-2).
* @returns {Array} The new array of code points.
*/
function ucs2decode(string) {
var output = [],
counter = 0,
length = string.length,
value,
extra;
while (counter < length) {
value = string.charCodeAt(counter++);
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
// high surrogate, and there is a next character
extra = string.charCodeAt(counter++);
if ((extra & 0xFC00) == 0xDC00) { // low surrogate
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
} else {
// unmatched surrogate; only append this code unit, in case the next
// code unit is the high surrogate of a surrogate pair
output.push(value);
counter--;
}
} else {
output.push(value);
}
}
return output;
}
/**
* Creates a string based on an array of numeric code points.
* @see `punycode.ucs2.decode`
* @memberOf punycode.ucs2
* @name encode
* @param {Array} codePoints The array of numeric code points.
* @returns {String} The new Unicode string (UCS-2).
*/
function ucs2encode(array) {
return map(array, function(value) {
var output = '';
if (value > 0xFFFF) {
value -= 0x10000;
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
value = 0xDC00 | value & 0x3FF;
}
output += stringFromCharCode(value);
return output;
}).join('');
}
/**
* Converts a basic code point into a digit/integer.
* @see `digitToBasic()`
* @private
* @param {Number} codePoint The basic numeric code point value.
* @returns {Number} The numeric value of a basic code point (for use in
* representing integers) in the range `0` to `base - 1`, or `base` if
* the code point does not represent a value.
*/
function basicToDigit(codePoint) {
if (codePoint - 48 < 10) {
return codePoint - 22;
}
if (codePoint - 65 < 26) {
return codePoint - 65;
}
if (codePoint - 97 < 26) {
return codePoint - 97;
}
return base;
}
/**
* Converts a digit/integer into a basic code point.
* @see `basicToDigit()`
* @private
* @param {Number} digit The numeric value of a basic code point.
* @returns {Number} The basic code point whose value (when used for
* representing integers) is `digit`, which needs to be in the range
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
* used; else, the lowercase form is used. The behavior is undefined
* if `flag` is non-zero and `digit` has no uppercase form.
*/
function digitToBasic(digit, flag) {
// 0..25 map to ASCII a..z or A..Z
// 26..35 map to ASCII 0..9
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
}
/**
* Bias adaptation function as per section 3.4 of RFC 3492.
* https://tools.ietf.org/html/rfc3492#section-3.4
* @private
*/
function adapt(delta, numPoints, firstTime) {
var k = 0;
delta = firstTime ? floor(delta / damp) : delta >> 1;
delta += floor(delta / numPoints);
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
delta = floor(delta / baseMinusTMin);
}
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
}
/**
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
* symbols.
* @memberOf punycode
* @param {String} input The Punycode string of ASCII-only symbols.
* @returns {String} The resulting string of Unicode symbols.
*/
function decode(input) {
// Don't use UCS-2
var output = [],
inputLength = input.length,
out,
i = 0,
n = initialN,
bias = initialBias,
basic,
j,
index,
oldi,
w,
k,
digit,
t,
/** Cached calculation results */
baseMinusT;
// Handle the basic code points: let `basic` be the number of input code
// points before the last delimiter, or `0` if there is none, then copy
// the first basic code points to the output.
basic = input.lastIndexOf(delimiter);
if (basic < 0) {
basic = 0;
}
for (j = 0; j < basic; ++j) {
// if it's not a basic code point
if (input.charCodeAt(j) >= 0x80) {
error('not-basic');
}
output.push(input.charCodeAt(j));
}
// Main decoding loop: start just after the last delimiter if any basic code
// points were copied; start at the beginning otherwise.
for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
// `index` is the index of the next character to be consumed.
// Decode a generalized variable-length integer into `delta`,
// which gets added to `i`. The overflow checking is easier
// if we increase `i` as we go, then subtract off its starting
// value at the end to obtain `delta`.
for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
if (index >= inputLength) {
error('invalid-input');
}
digit = basicToDigit(input.charCodeAt(index++));
if (digit >= base || digit > floor((maxInt - i) / w)) {
error('overflow');
}
i += digit * w;
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (digit < t) {
break;
}
baseMinusT = base - t;
if (w > floor(maxInt / baseMinusT)) {
error('overflow');
}
w *= baseMinusT;
}
out = output.length + 1;
bias = adapt(i - oldi, out, oldi == 0);
// `i` was supposed to wrap around from `out` to `0`,
// incrementing `n` each time, so we'll fix that now:
if (floor(i / out) > maxInt - n) {
error('overflow');
}
n += floor(i / out);
i %= out;
// Insert `n` at position `i` of the output
output.splice(i++, 0, n);
}
return ucs2encode(output);
}
/**
* Converts a string of Unicode symbols (e.g. a domain name label) to a
* Punycode string of ASCII-only symbols.
* @memberOf punycode
* @param {String} input The string of Unicode symbols.
* @returns {String} The resulting Punycode string of ASCII-only symbols.
*/
function encode(input) {
var n,
delta,
handledCPCount,
basicLength,
bias,
j,
m,
q,
k,
t,
currentValue,
output = [],
/** `inputLength` will hold the number of code points in `input`. */
inputLength,
/** Cached calculation results */
handledCPCountPlusOne,
baseMinusT,
qMinusT;
// Convert the input in UCS-2 to Unicode
input = ucs2decode(input);
// Cache the length
inputLength = input.length;
// Initialize the state
n = initialN;
delta = 0;
bias = initialBias;
// Handle the basic code points
for (j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue < 0x80) {
output.push(stringFromCharCode(currentValue));
}
}
handledCPCount = basicLength = output.length;
// `handledCPCount` is the number of code points that have been handled;
// `basicLength` is the number of basic code points.
// Finish the basic string - if it is not empty - with a delimiter
if (basicLength) {
output.push(delimiter);
}
// Main encoding loop:
while (handledCPCount < inputLength) {
// All non-basic code points < n have been handled already. Find the next
// larger one:
for (m = maxInt, j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue >= n && currentValue < m) {
m = currentValue;
}
}
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
// but guard against overflow
handledCPCountPlusOne = handledCPCount + 1;
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
error('overflow');
}
delta += (m - n) * handledCPCountPlusOne;
n = m;
for (j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue < n && ++delta > maxInt) {
error('overflow');
}
if (currentValue == n) {
// Represent delta as a generalized variable-length integer
for (q = delta, k = base; /* no condition */; k += base) {
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (q < t) {
break;
}
qMinusT = q - t;
baseMinusT = base - t;
output.push(
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
);
q = floor(qMinusT / baseMinusT);
}
output.push(stringFromCharCode(digitToBasic(q, 0)));
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
delta = 0;
++handledCPCount;
}
}
++delta;
++n;
}
return output.join('');
}
/**
* Converts a Punycode string representing a domain name or an email address
* to Unicode. Only the Punycoded parts of the input will be converted, i.e.
* it doesn't matter if you call it on a string that has already been
* converted to Unicode.
* @memberOf punycode
* @param {String} input The Punycoded domain name or email address to
* convert to Unicode.
* @returns {String} The Unicode representation of the given Punycode
* string.
*/
function toUnicode(input) {
return mapDomain(input, function(string) {
return regexPunycode.test(string)
? decode(string.slice(4).toLowerCase())
: string;
});
}
/**
* Converts a Unicode string representing a domain name or an email address to
* Punycode. Only the non-ASCII parts of the domain name will be converted,
* i.e. it doesn't matter if you call it with a domain that's already in
* ASCII.
* @memberOf punycode
* @param {String} input The domain name or email address to convert, as a
* Unicode string.
* @returns {String} The Punycode representation of the given domain name or
* email address.
*/
function toASCII(input) {
return mapDomain(input, function(string) {
return regexNonASCII.test(string)
? 'xn--' + encode(string)
: string;
});
}
/*--------------------------------------------------------------------------*/
/** Define the public API */
punycode = {
/**
* A string representing the current Punycode.js version number.
* @memberOf punycode
* @type String
*/
'version': '1.4.1',
/**
* An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to Unicode code points, and back.
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode
* @type Object
*/
'ucs2': {
'decode': ucs2decode,
'encode': ucs2encode
},
'decode': decode,
'encode': encode,
'toASCII': toASCII,
'toUnicode': toUnicode
};
/** Expose `punycode` */
// Some AMD build optimizers, like r.js, check for specific condition patterns
// like the following:
if (
true
) {
!(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
return punycode;
}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (freeExports && freeModule) {
if (module.exports == freeExports) {
// in Node.js, io.js, or RingoJS v0.8.0+
freeModule.exports = punycode;
} else {
// in Narwhal or RingoJS v0.7.0-
for (key in punycode) {
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
}
}
} else {
// in Rhino or a web browser
root.punycode = punycode;
}
}(this));
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(123)(module), (function() { return this; }())))
/***/ }),
/* 123 */
/***/ (function(module, exports) {
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
module.children = [];
module.webpackPolyfill = 1;
}
return module;
}
/***/ }),
/* 124 */
/***/ (function(module, exports) {
// markdown-it default options
'use strict';
module.exports = {
options: {
html: false, // Enable HTML tags in source
xhtmlOut: false, // Use '/' to close single tags (<br />)
breaks: false, // Convert '\n' in paragraphs into <br>
langPrefix: 'language-', // CSS language prefix for fenced blocks
linkify: false, // autoconvert URL-like texts to links
// Enable some language-neutral replacements + quotes beautification
typographer: false,
// Double + single quotes replacement pairs, when typographer enabled,
// and smartquotes on. Could be either a String or an Array.
//
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
// and ['«\xA0', '\xA0»', '\xA0', '\xA0'] for French (including nbsp).
quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
// Highlighter function. Should return escaped HTML,
// or '' if the source string is not changed and should be escaped externaly.
// If result starts with <pre... internal wrapper is skipped.
//
// function (/*str, lang*/) { return ''; }
//
highlight: null,
maxNesting: 100 // Internal protection, recursion limit
},
components: {
core: {},
block: {},
inline: {}
}
};
/***/ }),
/* 125 */
/***/ (function(module, exports) {
// "Zero" preset, with nothing enabled. Useful for manual configuring of simple
// modes. For example, to parse bold/italic only.
'use strict';
module.exports = {
options: {
html: false, // Enable HTML tags in source
xhtmlOut: false, // Use '/' to close single tags (<br />)
breaks: false, // Convert '\n' in paragraphs into <br>
langPrefix: 'language-', // CSS language prefix for fenced blocks
linkify: false, // autoconvert URL-like texts to links
// Enable some language-neutral replacements + quotes beautification
typographer: false,
// Double + single quotes replacement pairs, when typographer enabled,
// and smartquotes on. Could be either a String or an Array.
//
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
// and ['«\xA0', '\xA0»', '\xA0', '\xA0'] for French (including nbsp).
quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
// Highlighter function. Should return escaped HTML,
// or '' if the source string is not changed and should be escaped externaly.
// If result starts with <pre... internal wrapper is skipped.
//
// function (/*str, lang*/) { return ''; }
//
highlight: null,
maxNesting: 20 // Internal protection, recursion limit
},
components: {
core: {
rules: [
'normalize',
'block',
'inline'
]
},
block: {
rules: [
'paragraph'
]
},
inline: {
rules: [
'text'
],
rules2: [
'balance_pairs',
'text_collapse'
]
}
}
};
/***/ }),
/* 126 */
/***/ (function(module, exports) {
// Commonmark default options
'use strict';
module.exports = {
options: {
html: true, // Enable HTML tags in source
xhtmlOut: true, // Use '/' to close single tags (<br />)
breaks: false, // Convert '\n' in paragraphs into <br>
langPrefix: 'language-', // CSS language prefix for fenced blocks
linkify: false, // autoconvert URL-like texts to links
// Enable some language-neutral replacements + quotes beautification
typographer: false,
// Double + single quotes replacement pairs, when typographer enabled,
// and smartquotes on. Could be either a String or an Array.
//
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
// and ['«\xA0', '\xA0»', '\xA0', '\xA0'] for French (including nbsp).
quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
// Highlighter function. Should return escaped HTML,
// or '' if the source string is not changed and should be escaped externaly.
// If result starts with <pre... internal wrapper is skipped.
//
// function (/*str, lang*/) { return ''; }
//
highlight: null,
maxNesting: 20 // Internal protection, recursion limit
},
components: {
core: {
rules: [
'normalize',
'block',
'inline'
]
},
block: {
rules: [
'blockquote',
'code',
'fence',
'heading',
'hr',
'html_block',
'lheading',
'list',
'reference',
'paragraph'
]
},
inline: {
rules: [
'autolink',
'backticks',
'emphasis',
'entity',
'escape',
'html_inline',
'image',
'link',
'newline',
'text'
],
rules2: [
'balance_pairs',
'emphasis',
'text_collapse'
]
}
}
};
/***/ }),
/* 127 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
var emojies_defs = __webpack_require__(128);
var emojies_shortcuts = __webpack_require__(129);
var emoji_html = __webpack_require__(130);
var emoji_replace = __webpack_require__(131);
var normalize_opts = __webpack_require__(132);
module.exports = function emoji_plugin(md, options) {
var defaults = {
defs: emojies_defs,
shortcuts: emojies_shortcuts,
enabled: []
};
var opts = normalize_opts(md.utils.assign({}, defaults, options || {}));
md.renderer.rules.emoji = emoji_html;
md.core.ruler.push('emoji', emoji_replace(md, opts.defs, opts.shortcuts, opts.scanRE, opts.replaceRE));
};
/***/ }),
/* 128 */
/***/ (function(module, exports) {
module.exports = {"100":"💯","1234":"🔢","grinning":"😀","smiley":"😃","smile":"😄","grin":"😁","laughing":"😆","satisfied":"😆","sweat_smile":"😅","joy":"😂","rofl":"🤣","relaxed":"☺️","blush":"😊","innocent":"😇","slightly_smiling_face":"🙂","upside_down_face":"🙃","wink":"😉","relieved":"😌","heart_eyes":"😍","kissing_heart":"😘","kissing":"😗","kissing_smiling_eyes":"😙","kissing_closed_eyes":"😚","yum":"😋","stuck_out_tongue_winking_eye":"😜","stuck_out_tongue_closed_eyes":"😝","stuck_out_tongue":"😛","money_mouth_face":"🤑","hugs":"🤗","nerd_face":"🤓","sunglasses":"😎","clown_face":"🤡","cowboy_hat_face":"🤠","smirk":"😏","unamused":"😒","disappointed":"😞","pensive":"😔","worried":"😟","confused":"😕","slightly_frowning_face":"🙁","frowning_face":"☹️","persevere":"😣","confounded":"😖","tired_face":"😫","weary":"😩","triumph":"😤","angry":"😠","rage":"😡","pout":"😡","no_mouth":"😶","neutral_face":"😐","expressionless":"😑","hushed":"😯","frowning":"😦","anguished":"😧","open_mouth":"😮","astonished":"😲","dizzy_face":"😵","flushed":"😳","scream":"😱","fearful":"😨","cold_sweat":"😰","cry":"😢","disappointed_relieved":"😥","drooling_face":"🤤","sob":"😭","sweat":"😓","sleepy":"😪","sleeping":"😴","roll_eyes":"🙄","thinking":"🤔","lying_face":"🤥","grimacing":"😬","zipper_mouth_face":"🤐","nauseated_face":"🤢","sneezing_face":"🤧","mask":"😷","face_with_thermometer":"🤒","face_with_head_bandage":"🤕","smiling_imp":"😈","imp":"👿","japanese_ogre":"👹","japanese_goblin":"👺","hankey":"💩","poop":"💩","shit":"💩","ghost":"👻","skull":"💀","skull_and_crossbones":"☠️","alien":"👽","space_invader":"👾","robot":"🤖","jack_o_lantern":"🎃","smiley_cat":"😺","smile_cat":"😸","joy_cat":"😹","heart_eyes_cat":"😻","smirk_cat":"😼","kissing_cat":"😽","scream_cat":"🙀","crying_cat_face":"😿","pouting_cat":"😾","open_hands":"👐","raised_hands":"🙌","clap":"👏","pray":"🙏","handshake":"🤝","+1":"👍","thumbsup":"👍","-1":"👎","thumbsdown":"👎","fist_oncoming":"👊","facepunch":"👊","punch":"👊","fist_raised":"✊","fist":"✊","fist_left":"🤛","fist_right":"🤜","crossed_fingers":"🤞","v":"✌️","metal":"🤘","ok_hand":"👌","point_left":"👈","point_right":"👉","point_up_2":"👆","point_down":"👇","point_up":"☝️","hand":"✋","raised_hand":"✋","raised_back_of_hand":"🤚","raised_hand_with_fingers_splayed":"🖐","vulcan_salute":"🖖","wave":"👋","call_me_hand":"🤙","muscle":"💪","middle_finger":"🖕","fu":"🖕","writing_hand":"✍️","selfie":"🤳","nail_care":"💅","ring":"💍","lipstick":"💄","kiss":"💋","lips":"👄","tongue":"👅","ear":"👂","nose":"👃","footprints":"👣","eye":"👁","eyes":"👀","speaking_head":"🗣","bust_in_silhouette":"👤","busts_in_silhouette":"👥","baby":"👶","boy":"👦","girl":"👧","man":"👨","woman":"👩","blonde_woman":"👱‍♀","blonde_man":"👱","person_with_blond_hair":"👱","older_man":"👴","older_woman":"👵","man_with_gua_pi_mao":"👲","woman_with_turban":"👳‍♀","man_with_turban":"👳","policewoman":"👮‍♀","policeman":"👮","cop":"👮","construction_worker_woman":"👷‍♀","construction_worker_man":"👷","construction_worker":"👷","guardswoman":"💂‍♀","guardsman":"💂","female_detective":"🕵️‍♀️","male_detective":"🕵","detective":"🕵","woman_health_worker":"👩‍⚕","man_health_worker":"👨‍⚕","woman_farmer":"👩‍🌾","man_farmer":"👨‍🌾","woman_cook":"👩‍🍳","man_cook":"👨‍🍳","woman_student":"👩‍🎓","man_student":"👨‍🎓","woman_singer":"👩‍🎤","man_singer":"👨‍🎤","woman_teacher":"👩‍🏫","man_teacher":"👨‍🏫","woman_factory_worker":"👩‍🏭","man_factory_worker":"👨‍🏭","woman_technologist":"👩‍💻","man_technologist":"👨‍💻","woman_office_worker":"👩‍💼","man_of
/***/ }),
/* 129 */
/***/ (function(module, exports) {
// Emoticons -> Emoji mapping.
//
// (!) Some patterns skipped, to avoid collisions
// without increase matcher complicity. Than can change in future.
//
// Places to look for more emoticons info:
//
// - http://en.wikipedia.org/wiki/List_of_emoticons#Western
// - https://github.com/wooorm/emoticon/blob/master/Support.md
// - http://factoryjoe.com/projects/emoticons/
//
'use strict';
module.exports = {
angry: [ '>:(', '>:-(' ],
blush: [ ':")', ':-")' ],
broken_heart: [ '</3', '<\\3' ],
// :\ and :-\ not used because of conflict with markdown escaping
confused: [ ':/', ':-/' ], // twemoji shows question
cry: [ ":'(", ":'-(", ':,(', ':,-(' ],
frowning: [ ':(', ':-(' ],
heart: [ '<3' ],
imp: [ ']:(', ']:-(' ],
innocent: [ 'o:)', 'O:)', 'o:-)', 'O:-)', '0:)', '0:-)' ],
joy: [ ":')", ":'-)", ':,)', ':,-)', ":'D", ":'-D", ':,D', ':,-D' ],
kissing: [ ':*', ':-*' ],
laughing: [ 'x-)', 'X-)' ],
neutral_face: [ ':|', ':-|' ],
open_mouth: [ ':o', ':-o', ':O', ':-O' ],
rage: [ ':@', ':-@' ],
smile: [ ':D', ':-D' ],
smiley: [ ':)', ':-)' ],
smiling_imp: [ ']:)', ']:-)' ],
sob: [ ":,'(", ":,'-(", ';(', ';-(' ],
stuck_out_tongue: [ ':P', ':-P' ],
sunglasses: [ '8-)', 'B-)' ],
sweat: [ ',:(', ',:-(' ],
sweat_smile: [ ',:)', ',:-)' ],
unamused: [ ':s', ':-S', ':z', ':-Z', ':$', ':-$' ],
wink: [ ';)', ';-)' ]
};
/***/ }),
/* 130 */
/***/ (function(module, exports) {
'use strict';
module.exports = function emoji_html(tokens, idx /*, options, env */) {
return tokens[idx].content;
};
/***/ }),
/* 131 */
/***/ (function(module, exports) {
// Emojies & shortcuts replacement logic.
//
// Note: In theory, it could be faster to parse :smile: in inline chain and
// leave only shortcuts here. But, who care...
//
'use strict';
module.exports = function create_rule(md, emojies, shortcuts, scanRE, replaceRE) {
var arrayReplaceAt = md.utils.arrayReplaceAt,
ucm = md.utils.lib.ucmicro,
ZPCc = new RegExp([ ucm.Z.source, ucm.P.source, ucm.Cc.source ].join('|'));
function splitTextToken(text, level, Token) {
var token, last_pos = 0, nodes = [];
text.replace(replaceRE, function (match, offset, src) {
var emoji_name;
// Validate emoji name
if (shortcuts.hasOwnProperty(match)) {
// replace shortcut with full name
emoji_name = shortcuts[match];
// Don't allow letters before any shortcut (as in no ":/" in http://)
if (offset > 0 && !ZPCc.test(src[offset - 1])) {
return;
}
// Don't allow letters after any shortcut
if (offset + match.length < src.length && !ZPCc.test(src[offset + match.length])) {
return;
}
} else {
emoji_name = match.slice(1, -1);
}
// Add new tokens to pending list
if (offset > last_pos) {
token = new Token('text', '', 0);
token.content = text.slice(last_pos, offset);
nodes.push(token);
}
token = new Token('emoji', '', 0);
token.markup = emoji_name;
token.content = emojies[emoji_name];
nodes.push(token);
last_pos = offset + match.length;
});
if (last_pos < text.length) {
token = new Token('text', '', 0);
token.content = text.slice(last_pos);
nodes.push(token);
}
return nodes;
}
return function emoji_replace(state) {
var i, j, l, tokens, token,
blockTokens = state.tokens,
autolinkLevel = 0;
for (j = 0, l = blockTokens.length; j < l; j++) {
if (blockTokens[j].type !== 'inline') { continue; }
tokens = blockTokens[j].children;
// We scan from the end, to keep position when new tags added.
// Use reversed logic in links start/end match
for (i = tokens.length - 1; i >= 0; i--) {
token = tokens[i];
if (token.type === 'link_open' || token.type === 'link_close') {
if (token.info === 'auto') { autolinkLevel -= token.nesting; }
}
if (token.type === 'text' && autolinkLevel === 0 && scanRE.test(token.content)) {
// replace current node
blockTokens[j].children = tokens = arrayReplaceAt(
tokens, i, splitTextToken(token.content, token.level, state.Token)
);
}
}
}
};
};
/***/ }),
/* 132 */
/***/ (function(module, exports) {
// Convert input options to more useable format
// and compile search regexp
'use strict';
function quoteRE(str) {
return str.replace(/[.?*+^$[\]\\(){}|-]/g, '\\$&');
}
module.exports = function normalize_opts(options) {
var emojies = options.defs,
shortcuts;
// Filter emojies by whitelist, if needed
if (options.enabled.length) {
emojies = Object.keys(emojies).reduce(function (acc, key) {
if (options.enabled.indexOf(key) >= 0) {
acc[key] = emojies[key];
}
return acc;
}, {});
}
// Flatten shortcuts to simple object: { alias: emoji_name }
shortcuts = Object.keys(options.shortcuts).reduce(function (acc, key) {
// Skip aliases for filtered emojies, to reduce regexp
if (!emojies[key]) { return acc; }
if (Array.isArray(options.shortcuts[key])) {
options.shortcuts[key].forEach(function (alias) {
acc[alias] = key;
});
return acc;
}
acc[options.shortcuts[key]] = key;
return acc;
}, {});
// Compile regexp
var names = Object.keys(emojies)
.map(function (name) { return ':' + name + ':'; })
.concat(Object.keys(shortcuts))
.sort()
.reverse()
.map(function (name) { return quoteRE(name); })
.join('|');
var scanRE = RegExp(names);
var replaceRE = RegExp(names, 'g');
return {
defs: emojies,
shortcuts: shortcuts,
scanRE: scanRE,
replaceRE: replaceRE
};
};
/***/ }),
/* 133 */
/***/ (function(module, exports) {
// Process ~subscript~
'use strict';
// same as UNESCAPE_MD_RE plus a space
var UNESCAPE_RE = /\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
function subscript(state, silent) {
var found,
content,
token,
max = state.posMax,
start = state.pos;
if (state.src.charCodeAt(start) !== 0x7E/* ~ */) { return false; }
if (silent) { return false; } // don't run any pairs in validation mode
if (start + 2 >= max) { return false; }
state.pos = start + 1;
while (state.pos < max) {
if (state.src.charCodeAt(state.pos) === 0x7E/* ~ */) {
found = true;
break;
}
state.md.inline.skipToken(state);
}
if (!found || start + 1 === state.pos) {
state.pos = start;
return false;
}
content = state.src.slice(start + 1, state.pos);
// don't allow unescaped spaces/newlines inside
if (content.match(/(^|[^\\])(\\\\)*\s/)) {
state.pos = start;
return false;
}
// found!
state.posMax = state.pos;
state.pos = start + 1;
// Earlier we checked !silent, but this implementation does not need it
token = state.push('sub_open', 'sub', 1);
token.markup = '~';
token = state.push('text', '', 0);
token.content = content.replace(UNESCAPE_RE, '$1');
token = state.push('sub_close', 'sub', -1);
token.markup = '~';
state.pos = state.posMax + 1;
state.posMax = max;
return true;
}
module.exports = function sub_plugin(md) {
md.inline.ruler.after('emphasis', 'sub', subscript);
};
/***/ }),
/* 134 */
/***/ (function(module, exports) {
// Process ^superscript^
'use strict';
// same as UNESCAPE_MD_RE plus a space
var UNESCAPE_RE = /\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
function superscript(state, silent) {
var found,
content,
token,
max = state.posMax,
start = state.pos;
if (state.src.charCodeAt(start) !== 0x5E/* ^ */) { return false; }
if (silent) { return false; } // don't run any pairs in validation mode
if (start + 2 >= max) { return false; }
state.pos = start + 1;
while (state.pos < max) {
if (state.src.charCodeAt(state.pos) === 0x5E/* ^ */) {
found = true;
break;
}
state.md.inline.skipToken(state);
}
if (!found || start + 1 === state.pos) {
state.pos = start;
return false;
}
content = state.src.slice(start + 1, state.pos);
// don't allow unescaped spaces/newlines inside
if (content.match(/(^|[^\\])(\\\\)*\s/)) {
state.pos = start;
return false;
}
// found!
state.posMax = state.pos;
state.pos = start + 1;
// Earlier we checked !silent, but this implementation does not need it
token = state.push('sup_open', 'sup', 1);
token.markup = '^';
token = state.push('text', '', 0);
token.content = content.replace(UNESCAPE_RE, '$1');
token = state.push('sup_close', 'sup', -1);
token.markup = '^';
state.pos = state.posMax + 1;
state.posMax = max;
return true;
}
module.exports = function sup_plugin(md) {
md.inline.ruler.after('emphasis', 'sup', superscript);
};
/***/ }),
/* 135 */
/***/ (function(module, exports) {
// Process footnotes
//
'use strict';
////////////////////////////////////////////////////////////////////////////////
// Renderer partials
function _footnote_ref(tokens, idx) {
var n = Number(tokens[idx].meta.id + 1).toString();
var id = 'fnref' + n;
if (tokens[idx].meta.subId > 0) {
id += ':' + tokens[idx].meta.subId;
}
return '<sup class="footnote-ref"><a href="#fn' + n + '" id="' + id + '">[' + n + ']</a></sup>';
}
function _footnote_block_open(tokens, idx, options) {
return (options.xhtmlOut ? '<hr class="footnotes-sep" />\n' : '<hr class="footnotes-sep">\n') +
'<section class="footnotes">\n' +
'<ol class="footnotes-list">\n';
}
function _footnote_block_close() {
return '</ol>\n</section>\n';
}
function _footnote_open(tokens, idx) {
var id = Number(tokens[idx].meta.id + 1).toString();
return '<li id="fn' + id + '" class="footnote-item">';
}
function _footnote_close() {
return '</li>\n';
}
function _footnote_anchor(tokens, idx) {
var n = Number(tokens[idx].meta.id + 1).toString();
var id = 'fnref' + n;
if (tokens[idx].meta.subId > 0) {
id += ':' + tokens[idx].meta.subId;
}
return ' <a href="#' + id + '" class="footnote-backref">\u21a9</a>'; /* ↩ */
}
////////////////////////////////////////////////////////////////////////////////
module.exports = function sub_plugin(md) {
var parseLinkLabel = md.helpers.parseLinkLabel,
isSpace = md.utils.isSpace;
md.renderer.rules.footnote_ref = _footnote_ref;
md.renderer.rules.footnote_block_open = _footnote_block_open;
md.renderer.rules.footnote_block_close = _footnote_block_close;
md.renderer.rules.footnote_open = _footnote_open;
md.renderer.rules.footnote_close = _footnote_close;
md.renderer.rules.footnote_anchor = _footnote_anchor;
// Process footnote block definition
function footnote_def(state, startLine, endLine, silent) {
var oldBMark, oldTShift, oldSCount, oldParentType, pos, label, token,
initial, offset, ch, posAfterColon,
start = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// line should be at least 5 chars - "[^x]:"
if (start + 4 > max) { return false; }
if (state.src.charCodeAt(start) !== 0x5B/* [ */) { return false; }
if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) { return false; }
for (pos = start + 2; pos < max; pos++) {
if (state.src.charCodeAt(pos) === 0x20) { return false; }
if (state.src.charCodeAt(pos) === 0x5D /* ] */) {
break;
}
}
if (pos === start + 2) { return false; } // no empty footnote labels
if (pos + 1 >= max || state.src.charCodeAt(++pos) !== 0x3A /* : */) { return false; }
if (silent) { return true; }
pos++;
if (!state.env.footnotes) { state.env.footnotes = {}; }
if (!state.env.footnotes.refs) { state.env.footnotes.refs = {}; }
label = state.src.slice(start + 2, pos - 2);
state.env.footnotes.refs[':' + label] = -1;
token = new state.Token('footnote_reference_open', '', 1);
token.meta = { label: label };
token.level = state.level++;
state.tokens.push(token);
oldBMark = state.bMarks[startLine];
oldTShift = state.tShift[startLine];
oldSCount = state.sCount[startLine];
oldParentType = state.parentType;
posAfterColon = pos;
initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]);
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (isSpace(ch)) {
if (ch === 0x09) {
offset += 4 - offset % 4;
} else {
offset++;
}
} else {
break;
}
pos++;
}
state.tShift[startLine] = pos - posAfterColon;
state.sCount[startLine] = offset - initial;
state.bMarks[startLine] = posAfterColon;
state.blkIndent += 4;
state.parentType = 'footnote';
if (state.sCount[startLine] < state.blkIndent) {
state.sCount[startLine] += state.blkIndent;
}
state.md.block.tokenize(state, startLine, endLine, true);
state.parentType = oldParentType;
state.blkIndent -= 4;
state.tShift[startLine] = oldTShift;
state.sCount[startLine] = oldSCount;
state.bMarks[startLine] = oldBMark;
token = new state.Token('footnote_reference_close', '', -1);
token.level = --state.level;
state.tokens.push(token);
return true;
}
// Process inline footnotes (^[...])
function footnote_inline(state, silent) {
var labelStart,
labelEnd,
footnoteId,
token,
tokens,
max = state.posMax,
start = state.pos;
if (start + 2 >= max) { return false; }
if (state.src.charCodeAt(start) !== 0x5E/* ^ */) { return false; }
if (state.src.charCodeAt(start + 1) !== 0x5B/* [ */) { return false; }
labelStart = start + 2;
labelEnd = parseLinkLabel(state, start + 1);
// parser failed to find ']', so it's not a valid note
if (labelEnd < 0) { return false; }
// We found the end of the link, and know for a fact it's a valid link;
// so all that's left to do is to call tokenizer.
//
if (!silent) {
if (!state.env.footnotes) { state.env.footnotes = {}; }
if (!state.env.footnotes.list) { state.env.footnotes.list = []; }
footnoteId = state.env.footnotes.list.length;
state.md.inline.parse(
state.src.slice(labelStart, labelEnd),
state.md,
state.env,
tokens = []
);
token = state.push('footnote_ref', '', 0);
token.meta = { id: footnoteId };
state.env.footnotes.list[footnoteId] = { tokens: tokens };
}
state.pos = labelEnd + 1;
state.posMax = max;
return true;
}
// Process footnote references ([^...])
function footnote_ref(state, silent) {
var label,
pos,
footnoteId,
footnoteSubId,
token,
max = state.posMax,
start = state.pos;
// should be at least 4 chars - "[^x]"
if (start + 3 > max) { return false; }
if (!state.env.footnotes || !state.env.footnotes.refs) { return false; }
if (state.src.charCodeAt(start) !== 0x5B/* [ */) { return false; }
if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) { return false; }
for (pos = start + 2; pos < max; pos++) {
if (state.src.charCodeAt(pos) === 0x20) { return false; }
if (state.src.charCodeAt(pos) === 0x0A) { return false; }
if (state.src.charCodeAt(pos) === 0x5D /* ] */) {
break;
}
}
if (pos === start + 2) { return false; } // no empty footnote labels
if (pos >= max) { return false; }
pos++;
label = state.src.slice(start + 2, pos - 1);
if (typeof state.env.footnotes.refs[':' + label] === 'undefined') { return false; }
if (!silent) {
if (!state.env.footnotes.list) { state.env.footnotes.list = []; }
if (state.env.footnotes.refs[':' + label] < 0) {
footnoteId = state.env.footnotes.list.length;
state.env.footnotes.list[footnoteId] = { label: label, count: 0 };
state.env.footnotes.refs[':' + label] = footnoteId;
} else {
footnoteId = state.env.footnotes.refs[':' + label];
}
footnoteSubId = state.env.footnotes.list[footnoteId].count;
state.env.footnotes.list[footnoteId].count++;
token = state.push('footnote_ref', '', 0);
token.meta = { id: footnoteId, subId: footnoteSubId };
}
state.pos = pos;
state.posMax = max;
return true;
}
// Glue footnote tokens to end of token stream
function footnote_tail(state) {
var i, l, j, t, lastParagraph, list, token, tokens, current, currentLabel,
insideRef = false,
refTokens = {};
if (!state.env.footnotes) { return; }
state.tokens = state.tokens.filter(function(tok) {
if (tok.type === 'footnote_reference_open') {
insideRef = true;
current = [];
currentLabel = tok.meta.label;
return false;
}
if (tok.type === 'footnote_reference_close') {
insideRef = false;
// prepend ':' to avoid conflict with Object.prototype members
refTokens[':' + currentLabel] = current;
return false;
}
if (insideRef) { current.push(tok); }
return !insideRef;
});
if (!state.env.footnotes.list) { return; }
list = state.env.footnotes.list;
token = new state.Token('footnote_block_open', '', 1);
state.tokens.push(token);
for (i = 0, l = list.length; i < l; i++) {
token = new state.Token('footnote_open', '', 1);
token.meta = { id: i };
state.tokens.push(token);
if (list[i].tokens) {
tokens = [];
token = new state.Token('paragraph_open', 'p', 1);
token.block = true;
tokens.push(token);
token = new state.Token('inline', '', 0);
token.children = list[i].tokens;
token.content = '';
tokens.push(token);
token = new state.Token('paragraph_close', 'p', -1);
token.block = true;
tokens.push(token);
} else if (list[i].label) {
tokens = refTokens[':' + list[i].label];
}
state.tokens = state.tokens.concat(tokens);
if (state.tokens[state.tokens.length - 1].type === 'paragraph_close') {
lastParagraph = state.tokens.pop();
} else {
lastParagraph = null;
}
t = list[i].count > 0 ? list[i].count : 1;
for (j = 0; j < t; j++) {
token = new state.Token('footnote_anchor', '', 0);
token.meta = { id: i, subId: j };
state.tokens.push(token);
}
if (lastParagraph) {
state.tokens.push(lastParagraph);
}
token = new state.Token('footnote_close', '', -1);
state.tokens.push(token);
}
token = new state.Token('footnote_block_close', '', -1);
state.tokens.push(token);
}
md.block.ruler.before('reference', 'footnote_def', footnote_def, { alt: [ 'paragraph', 'reference' ] });
md.inline.ruler.after('image', 'footnote_inline', footnote_inline);
md.inline.ruler.after('footnote_inline', 'footnote_ref', footnote_ref);
md.core.ruler.after('inline', 'footnote_tail', footnote_tail);
};
/***/ }),
/* 136 */
/***/ (function(module, exports) {
// Process definition lists
//
'use strict';
module.exports = function deflist_plugin(md) {
var isSpace = md.utils.isSpace;
// Search `[:~][\n ]`, returns next pos after marker on success
// or -1 on fail.
function skipMarker(state, line) {
var pos, marker,
start = state.bMarks[line] + state.tShift[line],
max = state.eMarks[line];
if (start >= max) { return -1; }
// Check bullet
marker = state.src.charCodeAt(start++);
if (marker !== 0x7E/* ~ */ && marker !== 0x3A/* : */) { return -1; }
pos = state.skipSpaces(start);
// require space after ":"
if (start === pos) { return -1; }
// no empty definitions, e.g. " : "
if (pos >= max) { return -1; }
return start;
}
function markTightParagraphs(state, idx) {
var i, l,
level = state.level + 2;
for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {
if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {
state.tokens[i + 2].hidden = true;
state.tokens[i].hidden = true;
i += 2;
}
}
}
function deflist(state, startLine, endLine, silent) {
var ch,
contentStart,
ddLine,
dtLine,
itemLines,
listLines,
listTokIdx,
max,
nextLine,
offset,
oldDDIndent,
oldIndent,
oldParentType,
oldSCount,
oldTShift,
oldTight,
pos,
prevEmptyEnd,
tight,
token;
if (silent) {
// quirk: validation mode validates a dd block only, not a whole deflist
if (state.ddIndent < 0) { return false; }
return skipMarker(state, startLine) >= 0;
}
nextLine = startLine + 1;
if (nextLine >= endLine) { return false; }
if (state.isEmpty(nextLine)) {
nextLine++;
if (nextLine >= endLine) { return false; }
}
if (state.sCount[nextLine] < state.blkIndent) { return false; }
contentStart = skipMarker(state, nextLine);
if (contentStart < 0) { return false; }
// Start list
listTokIdx = state.tokens.length;
tight = true;
token = state.push('dl_open', 'dl', 1);
token.map = listLines = [ startLine, 0 ];
//
// Iterate list items
//
dtLine = startLine;
ddLine = nextLine;
// One definition list can contain multiple DTs,
// and one DT can be followed by multiple DDs.
//
// Thus, there is two loops here, and label is
// needed to break out of the second one
//
/*eslint no-labels:0,block-scoped-var:0*/
OUTER:
for (;;) {
prevEmptyEnd = false;
token = state.push('dt_open', 'dt', 1);
token.map = [ dtLine, dtLine ];
token = state.push('inline', '', 0);
token.map = [ dtLine, dtLine ];
token.content = state.getLines(dtLine, dtLine + 1, state.blkIndent, false).trim();
token.children = [];
token = state.push('dt_close', 'dt', -1);
for (;;) {
token = state.push('dd_open', 'dd', 1);
token.map = itemLines = [ nextLine, 0 ];
pos = contentStart;
max = state.eMarks[ddLine];
offset = state.sCount[ddLine] + contentStart - (state.bMarks[ddLine] + state.tShift[ddLine]);
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (isSpace(ch)) {
if (ch === 0x09) {
offset += 4 - offset % 4;
} else {
offset++;
}
} else {
break;
}
pos++;
}
contentStart = pos;
oldTight = state.tight;
oldDDIndent = state.ddIndent;
oldIndent = state.blkIndent;
oldTShift = state.tShift[ddLine];
oldSCount = state.sCount[ddLine];
oldParentType = state.parentType;
state.blkIndent = state.ddIndent = state.sCount[ddLine] + 2;
state.tShift[ddLine] = contentStart - state.bMarks[ddLine];
state.sCount[ddLine] = offset;
state.tight = true;
state.parentType = 'deflist';
state.md.block.tokenize(state, ddLine, endLine, true);
// If any of list item is tight, mark list as tight
if (!state.tight || prevEmptyEnd) {
tight = false;
}
// Item become loose if finish with empty line,
// but we should filter last element, because it means list finish
prevEmptyEnd = (state.line - ddLine) > 1 && state.isEmpty(state.line - 1);
state.tShift[ddLine] = oldTShift;
state.sCount[ddLine] = oldSCount;
state.tight = oldTight;
state.parentType = oldParentType;
state.blkIndent = oldIndent;
state.ddIndent = oldDDIndent;
token = state.push('dd_close', 'dd', -1);
itemLines[1] = nextLine = state.line;
if (nextLine >= endLine) { break OUTER; }
if (state.sCount[nextLine] < state.blkIndent) { break OUTER; }
contentStart = skipMarker(state, nextLine);
if (contentStart < 0) { break; }
ddLine = nextLine;
// go to the next loop iteration:
// insert DD tag and repeat checking
}
if (nextLine >= endLine) { break; }
dtLine = nextLine;
if (state.isEmpty(dtLine)) { break; }
if (state.sCount[dtLine] < state.blkIndent) { break; }
ddLine = dtLine + 1;
if (ddLine >= endLine) { break; }
if (state.isEmpty(ddLine)) { ddLine++; }
if (ddLine >= endLine) { break; }
if (state.sCount[ddLine] < state.blkIndent) { break; }
contentStart = skipMarker(state, ddLine);
if (contentStart < 0) { break; }
// go to the next loop iteration:
// insert DT and DD tags and repeat checking
}
// Finilize list
token = state.push('dl_close', 'dl', -1);
listLines[1] = nextLine;
state.line = nextLine;
// mark paragraphs tight if needed
if (tight) {
markTightParagraphs(state, listTokIdx);
}
return true;
}
md.block.ruler.before('paragraph', 'deflist', deflist, { alt: [ 'paragraph', 'reference' ] });
};
/***/ }),
/* 137 */
/***/ (function(module, exports) {
// Enclose abbreviations in <abbr> tags
//
'use strict';
module.exports = function sub_plugin(md) {
var escapeRE = md.utils.escapeRE,
arrayReplaceAt = md.utils.arrayReplaceAt;
// ASCII characters in Cc, Sc, Sm, Sk categories we should terminate on;
// you can check character classes here:
// http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
var OTHER_CHARS = ' \r\n$+<=>^`|~';
var UNICODE_PUNCT_RE = md.utils.lib.ucmicro.P.source;
var UNICODE_SPACE_RE = md.utils.lib.ucmicro.Z.source;
function abbr_def(state, startLine, endLine, silent) {
var label, title, ch, labelStart, labelEnd,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
if (pos + 2 >= max) { return false; }
if (state.src.charCodeAt(pos++) !== 0x2A/* * */) { return false; }
if (state.src.charCodeAt(pos++) !== 0x5B/* [ */) { return false; }
labelStart = pos;
for (; pos < max; pos++) {
ch = state.src.charCodeAt(pos);
if (ch === 0x5B /* [ */) {
return false;
} else if (ch === 0x5D /* ] */) {
labelEnd = pos;
break;
} else if (ch === 0x5C /* \ */) {
pos++;
}
}
if (labelEnd < 0 || state.src.charCodeAt(labelEnd + 1) !== 0x3A/* : */) {
return false;
}
if (silent) { return true; }
label = state.src.slice(labelStart, labelEnd).replace(/\\(.)/g, '$1');
title = state.src.slice(labelEnd + 2, max).trim();
if (label.length === 0) { return false; }
if (title.length === 0) { return false; }
if (!state.env.abbreviations) { state.env.abbreviations = {}; }
// prepend ':' to avoid conflict with Object.prototype members
if (typeof state.env.abbreviations[':' + label] === 'undefined') {
state.env.abbreviations[':' + label] = title;
}
state.line = startLine + 1;
return true;
}
function abbr_replace(state) {
var i, j, l, tokens, token, text, nodes, pos, reg, m, regText, regSimple,
currentToken,
blockTokens = state.tokens;
if (!state.env.abbreviations) { return; }
regSimple = new RegExp('(?:' +
Object.keys(state.env.abbreviations).map(function (x) {
return x.substr(1);
}).sort(function (a, b) {
return b.length - a.length;
}).map(escapeRE).join('|') +
')');
regText = '(^|' + UNICODE_PUNCT_RE + '|' + UNICODE_SPACE_RE +
'|[' + OTHER_CHARS.split('').map(escapeRE).join('') + '])'
+ '(' + Object.keys(state.env.abbreviations).map(function (x) {
return x.substr(1);
}).sort(function (a, b) {
return b.length - a.length;
}).map(escapeRE).join('|') + ')'
+ '($|' + UNICODE_PUNCT_RE + '|' + UNICODE_SPACE_RE +
'|[' + OTHER_CHARS.split('').map(escapeRE).join('') + '])';
reg = new RegExp(regText, 'g');
for (j = 0, l = blockTokens.length; j < l; j++) {
if (blockTokens[j].type !== 'inline') { continue; }
tokens = blockTokens[j].children;
// We scan from the end, to keep position when new tags added.
for (i = tokens.length - 1; i >= 0; i--) {
currentToken = tokens[i];
if (currentToken.type !== 'text') { continue; }
pos = 0;
text = currentToken.content;
reg.lastIndex = 0;
nodes = [];
// fast regexp run to determine whether there are any abbreviated words
// in the current token
if (!regSimple.test(text)) { continue; }
while ((m = reg.exec(text))) {
if (m.index > 0 || m[1].length > 0) {
token = new state.Token('text', '', 0);
token.content = text.slice(pos, m.index + m[1].length);
nodes.push(token);
}
token = new state.Token('abbr_open', 'abbr', 1);
token.attrs = [ [ 'title', state.env.abbreviations[':' + m[2]] ] ];
nodes.push(token);
token = new state.Token('text', '', 0);
token.content = m[2];
nodes.push(token);
token = new state.Token('abbr_close', 'abbr', -1);
nodes.push(token);
reg.lastIndex -= m[3].length;
pos = reg.lastIndex;
}
if (!nodes.length) { continue; }
if (pos < text.length) {
token = new state.Token('text', '', 0);
token.content = text.slice(pos);
nodes.push(token);
}
// replace current node
blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);
}
}
}
md.block.ruler.before('reference', 'abbr_def', abbr_def, { alt: [ 'paragraph', 'reference' ] });
md.core.ruler.after('linkify', 'abbr_replace', abbr_replace);
};
/***/ }),
/* 138 */
/***/ (function(module, exports) {
'use strict';
module.exports = function ins_plugin(md) {
// Insert each marker as a separate text token, and add it to delimiter list
//
function tokenize(state, silent) {
var i, scanned, token, len, ch,
start = state.pos,
marker = state.src.charCodeAt(start);
if (silent) { return false; }
if (marker !== 0x2B/* + */) { return false; }
scanned = state.scanDelims(state.pos, true);
len = scanned.length;
ch = String.fromCharCode(marker);
if (len < 2) { return false; }
if (len % 2) {
token = state.push('text', '', 0);
token.content = ch;
len--;
}
for (i = 0; i < len; i += 2) {
token = state.push('text', '', 0);
token.content = ch + ch;
state.delimiters.push({
marker: marker,
jump: i,
token: state.tokens.length - 1,
level: state.level,
end: -1,
open: scanned.can_open,
close: scanned.can_close
});
}
state.pos += scanned.length;
return true;
}
// Walk through delimiter list and replace text tokens with tags
//
function postProcess(state) {
var i, j,
startDelim,
endDelim,
token,
loneMarkers = [],
delimiters = state.delimiters,
max = state.delimiters.length;
for (i = 0; i < max; i++) {
startDelim = delimiters[i];
if (startDelim.marker !== 0x2B/* + */) {
continue;
}
if (startDelim.end === -1) {
continue;
}
endDelim = delimiters[startDelim.end];
token = state.tokens[startDelim.token];
token.type = 'ins_open';
token.tag = 'ins';
token.nesting = 1;
token.markup = '++';
token.content = '';
token = state.tokens[endDelim.token];
token.type = 'ins_close';
token.tag = 'ins';
token.nesting = -1;
token.markup = '++';
token.content = '';
if (state.tokens[endDelim.token - 1].type === 'text' &&
state.tokens[endDelim.token - 1].content === '+') {
loneMarkers.push(endDelim.token - 1);
}
}
// If a marker sequence has an odd number of characters, it's splitted
// like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the
// start of the sequence.
//
// So, we have to move all those markers after subsequent s_close tags.
//
while (loneMarkers.length) {
i = loneMarkers.pop();
j = i + 1;
while (j < state.tokens.length && state.tokens[j].type === 'ins_close') {
j++;
}
j--;
if (i !== j) {
token = state.tokens[j];
state.tokens[j] = state.tokens[i];
state.tokens[i] = token;
}
}
}
md.inline.ruler.before('emphasis', 'ins', tokenize);
md.inline.ruler2.before('emphasis', 'ins', postProcess);
};
/***/ }),
/* 139 */
/***/ (function(module, exports) {
'use strict';
module.exports = function ins_plugin(md) {
// Insert each marker as a separate text token, and add it to delimiter list
//
function tokenize(state, silent) {
var i, scanned, token, len, ch,
start = state.pos,
marker = state.src.charCodeAt(start);
if (silent) { return false; }
if (marker !== 0x3D/* = */) { return false; }
scanned = state.scanDelims(state.pos, true);
len = scanned.length;
ch = String.fromCharCode(marker);
if (len < 2) { return false; }
if (len % 2) {
token = state.push('text', '', 0);
token.content = ch;
len--;
}
for (i = 0; i < len; i += 2) {
token = state.push('text', '', 0);
token.content = ch + ch;
state.delimiters.push({
marker: marker,
jump: i,
token: state.tokens.length - 1,
level: state.level,
end: -1,
open: scanned.can_open,
close: scanned.can_close
});
}
state.pos += scanned.length;
return true;
}
// Walk through delimiter list and replace text tokens with tags
//
function postProcess(state) {
var i, j,
startDelim,
endDelim,
token,
loneMarkers = [],
delimiters = state.delimiters,
max = state.delimiters.length;
for (i = 0; i < max; i++) {
startDelim = delimiters[i];
if (startDelim.marker !== 0x3D/* = */) {
continue;
}
if (startDelim.end === -1) {
continue;
}
endDelim = delimiters[startDelim.end];
token = state.tokens[startDelim.token];
token.type = 'mark_open';
token.tag = 'mark';
token.nesting = 1;
token.markup = '==';
token.content = '';
token = state.tokens[endDelim.token];
token.type = 'mark_close';
token.tag = 'mark';
token.nesting = -1;
token.markup = '==';
token.content = '';
if (state.tokens[endDelim.token - 1].type === 'text' &&
state.tokens[endDelim.token - 1].content === '=') {
loneMarkers.push(endDelim.token - 1);
}
}
// If a marker sequence has an odd number of characters, it's splitted
// like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the
// start of the sequence.
//
// So, we have to move all those markers after subsequent s_close tags.
//
while (loneMarkers.length) {
i = loneMarkers.pop();
j = i + 1;
while (j < state.tokens.length && state.tokens[j].type === 'mark_close') {
j++;
}
j--;
if (i !== j) {
token = state.tokens[j];
state.tokens[j] = state.tokens[i];
state.tokens[i] = token;
}
}
}
md.inline.ruler.before('emphasis', 'mark', tokenize);
md.inline.ruler2.before('emphasis', 'mark', postProcess);
};
/***/ }),
/* 140 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports.default = function (md, options) {
options = _extends({
toc: true,
tocClassName: "markdownIt-TOC",
tocFirstLevel: 1,
tocLastLevel: 6,
tocCallback: null,
anchorLink: true,
anchorLinkSymbol: "#",
anchorLinkBefore: true,
anchorClassName: "markdownIt-Anchor",
resetIds: true,
anchorLinkSpace: true,
anchorLinkSymbolClassName: null
}, options);
markdownItSecondInstance = (0, _clone2.default)(md);
// initialize key ids for each instance
headingIds = {};
md.core.ruler.push("init_toc", function (state) {
Token = state.Token;
var tokens = state.tokens;
// reset key ids for each document
if (options.resetIds) {
headingIds = {};
}
var tocArray = [];
var tocMarkdown = "";
var tocTokens = [];
for (var i = 0; i < tokens.length; i++) {
if (tokens[i].type !== "heading_close") {
continue;
}
var heading = tokens[i - 1];
var heading_close = tokens[i];
if (heading.type === "inline") {
var content = void 0;
if (heading.children && heading.children[0].type === "link_open") {
// headings that contain links have to be processed
// differently since nested links aren't allowed in markdown
content = heading.children[1].content;
heading._tocAnchor = makeSafe(content, headingIds);
} else {
content = heading.content;
heading._tocAnchor = makeSafe(heading.children.reduce(function (acc, t) {
return acc + t.content;
}, ""), headingIds);
}
tocArray.push({
content: content,
anchor: heading._tocAnchor,
level: +heading_close.tag.substr(1, 1)
});
}
}
tocMarkdown = generateTocMarkdownFromArray(tocArray, options);
tocTokens = markdownItSecondInstance.parse(tocMarkdown, {});
// Adding tocClassName to 'ul' element
if (_typeof(tocTokens[0]) === "object" && tocTokens[0].type === "bullet_list_open") {
var attrs = tocTokens[0].attrs = tocTokens[0].attrs || [];
attrs.push(["class", options.tocClassName]);
}
tocHtml = markdownItSecondInstance.renderer.render(tocTokens, markdownItSecondInstance.options);
if (typeof state.env.tocCallback === "function") {
state.env.tocCallback.call(undefined, tocMarkdown, tocArray, tocHtml);
} else if (typeof options.tocCallback === "function") {
options.tocCallback.call(undefined, tocMarkdown, tocArray, tocHtml);
} else if (typeof md.options.tocCallback === "function") {
md.options.tocCallback.call(undefined, tocMarkdown, tocArray, tocHtml);
}
});
md.inline.ruler.after("emphasis", "toc", function (state, silent) {
var token = void 0;
var match = void 0;
while (state.src.indexOf("\n") >= 0 && state.src.indexOf("\n") < state.src.indexOf(TOC)) {
if (state.tokens.slice(-1)[0].type === "softbreak") {
state.src = state.src.split("\n").slice(1).join("\n");
state.pos = 0;
}
}
if (
// Reject if the token does not start with @[
state.src.charCodeAt(state.pos) !== 0x40 || state.src.charCodeAt(state.pos + 1) !== 0x5B ||
// Dont run any pairs in validation mode
silent) {
return false;
}
// Detect TOC markdown
match = TOC_RE.exec(state.src);
match = !match ? [] : match.filter(function (m) {
return m;
});
if (match.length < 1) {
return false;
}
// Build content
token = state.push("toc_open", "toc", 1);
token.markup = TOC;
token = state.push("toc_body", "", 0);
token = state.push("toc_close", "toc", -1);
// Update pos so the parser can continue
var newline = state.src.indexOf("\n");
if (newline !== -1) {
state.pos = state.pos + newline;
} else {
state.pos = state.pos + state.posMax + 1;
}
return true;
});
var originalHeadingOpen = md.renderer.rules.heading_open || function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var tokens = args[0],
idx = args[1],
options = args[2],
self = args[4];
return self.renderToken(tokens, idx, options);
};
md.renderer.rules.heading_open = function () {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
var tokens = args[0],
idx = args[1];
var attrs = tokens[idx].attrs = tokens[idx].attrs || [];
var anchor = tokens[idx + 1]._tocAnchor;
attrs.push(["id", anchor]);
if (options.anchorLink) {
renderAnchorLink.apply(undefined, [anchor, options].concat(args));
}
return originalHeadingOpen.apply(this, args);
};
md.renderer.rules.toc_open = function () {
return "";
};
md.renderer.rules.toc_close = function () {
return "";
};
md.renderer.rules.toc_body = function () {
return "";
};
if (options.toc) {
md.renderer.rules.toc_body = function () {
return tocHtml;
};
}
};
var _clone = __webpack_require__(141);
var _clone2 = _interopRequireDefault(_clone);
var _uslug = __webpack_require__(146);
var _uslug2 = _interopRequireDefault(_uslug);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
var TOC = "@[toc]";
var TOC_RE = /^@\[toc\]/im;
var markdownItSecondInstance = function markdownItSecondInstance() {};
var Token = function Token() {};
var headingIds = {};
var tocHtml = "";
var repeat = function repeat(string, num) {
return new Array(num + 1).join(string);
};
var makeSafe = function makeSafe(string, headingIds) {
var key = (0, _uslug2.default)(string); // slugify
if (!headingIds[key]) {
headingIds[key] = 0;
}
headingIds[key]++;
return key + (headingIds[key] > 1 ? "-" + headingIds[key] : "");
};
var space = function space() {
return _extends({}, new Token("text", "", 0), { content: " " });
};
var renderAnchorLinkSymbol = function renderAnchorLinkSymbol(options) {
if (options.anchorLinkSymbolClassName) {
return [_extends({}, new Token("span_open", "span", 1), {
attrs: [["class", options.anchorLinkSymbolClassName]]
}), _extends({}, new Token("text", "", 0), {
content: options.anchorLinkSymbol
}), new Token("span_close", "span", -1)];
} else {
return [_extends({}, new Token("text", "", 0), {
content: options.anchorLinkSymbol
})];
}
};
var renderAnchorLink = function renderAnchorLink(anchor, options, tokens, idx) {
var _tokens$children;
var linkTokens = [_extends({}, new Token("link_open", "a", 1), {
attrs: [["class", options.anchorClassName], ["href", "#" + anchor]]
})].concat(_toConsumableArray(renderAnchorLinkSymbol(options)), [new Token("link_close", "a", -1)]);
// `push` or `unshift` according to anchorLinkBefore option
// space is at the opposite side.
var actionOnArray = {
false: "push",
true: "unshift"
};
// insert space between anchor link and heading ?
if (options.anchorLinkSpace) {
linkTokens[actionOnArray[!options.anchorLinkBefore]](space());
}
(_tokens$children = tokens[idx + 1].children)[actionOnArray[options.anchorLinkBefore]].apply(_tokens$children, _toConsumableArray(linkTokens));
};
var treeToMarkdownBulletList = function treeToMarkdownBulletList(tree) {
var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
return tree.map(function (item) {
var indentation = " ";
var node = repeat(indentation, indent) + "*";
if (item.heading.content) {
node += " " + ("[" + item.heading.content + "](#" + item.heading.anchor + ")\n");
} else {
node += "\n";
}
if (item.nodes.length) {
node += treeToMarkdownBulletList(item.nodes, indent + 1);
}
return node;
}).join("");
};
var generateTocMarkdownFromArray = function generateTocMarkdownFromArray(headings, options) {
var tree = { nodes: [] };
// create an ast
headings.forEach(function (heading) {
if (heading.level < options.tocFirstLevel || heading.level > options.tocLastLevel) {
return;
}
var i = 1;
var lastItem = tree;
for (; i < heading.level - options.tocFirstLevel + 1; i++) {
if (lastItem.nodes.length === 0) {
lastItem.nodes.push({
heading: {},
nodes: []
});
}
lastItem = lastItem.nodes[lastItem.nodes.length - 1];
}
lastItem.nodes.push({
heading: heading,
nodes: []
});
});
return treeToMarkdownBulletList(tree.nodes);
};
/***/ }),
/* 141 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(Buffer) {var clone = (function() {
'use strict';
function _instanceof(obj, type) {
return type != null && obj instanceof type;
}
var nativeMap;
try {
nativeMap = Map;
} catch(_) {
// maybe a reference error because no `Map`. Give it a dummy value that no
// value will ever be an instanceof.
nativeMap = function() {};
}
var nativeSet;
try {
nativeSet = Set;
} catch(_) {
nativeSet = function() {};
}
var nativePromise;
try {
nativePromise = Promise;
} catch(_) {
nativePromise = function() {};
}
/**
* Clones (copies) an Object using deep copying.
*
* This function supports circular references by default, but if you are certain
* there are no circular references in your object, you can save some CPU time
* by calling clone(obj, false).
*
* Caution: if `circular` is false and `parent` contains circular references,
* your program may enter an infinite loop and crash.
*
* @param `parent` - the object to be cloned
* @param `circular` - set to true if the object to be cloned may contain
* circular references. (optional - true by default)
* @param `depth` - set to a number if the object is only to be cloned to
* a particular depth. (optional - defaults to Infinity)
* @param `prototype` - sets the prototype to be used when cloning an object.
* (optional - defaults to parent prototype).
* @param `includeNonEnumerable` - set to true if the non-enumerable properties
* should be cloned as well. Non-enumerable properties on the prototype
* chain will be ignored. (optional - false by default)
*/
function clone(parent, circular, depth, prototype, includeNonEnumerable) {
if (typeof circular === 'object') {
depth = circular.depth;
prototype = circular.prototype;
includeNonEnumerable = circular.includeNonEnumerable;
circular = circular.circular;
}
// maintain two arrays for circular references, where corresponding parents
// and children have the same index
var allParents = [];
var allChildren = [];
var useBuffer = typeof Buffer != 'undefined';
if (typeof circular == 'undefined')
circular = true;
if (typeof depth == 'undefined')
depth = Infinity;
// recurse this function so we don't reset allParents and allChildren
function _clone(parent, depth) {
// cloning null always returns null
if (parent === null)
return null;
if (depth === 0)
return parent;
var child;
var proto;
if (typeof parent != 'object') {
return parent;
}
if (_instanceof(parent, nativeMap)) {
child = new nativeMap();
} else if (_instanceof(parent, nativeSet)) {
child = new nativeSet();
} else if (_instanceof(parent, nativePromise)) {
child = new nativePromise(function (resolve, reject) {
parent.then(function(value) {
resolve(_clone(value, depth - 1));
}, function(err) {
reject(_clone(err, depth - 1));
});
});
} else if (clone.__isArray(parent)) {
child = [];
} else if (clone.__isRegExp(parent)) {
child = new RegExp(parent.source, __getRegExpFlags(parent));
if (parent.lastIndex) child.lastIndex = parent.lastIndex;
} else if (clone.__isDate(parent)) {
child = new Date(parent.getTime());
} else if (useBuffer && Buffer.isBuffer(parent)) {
child = new Buffer(parent.length);
parent.copy(child);
return child;
} else if (_instanceof(parent, Error)) {
child = Object.create(parent);
} else {
if (typeof prototype == 'undefined') {
proto = Object.getPrototypeOf(parent);
child = Object.create(proto);
}
else {
child = Object.create(prototype);
proto = prototype;
}
}
if (circular) {
var index = allParents.indexOf(parent);
if (index != -1) {
return allChildren[index];
}
allParents.push(parent);
allChildren.push(child);
}
if (_instanceof(parent, nativeMap)) {
parent.forEach(function(value, key) {
var keyChild = _clone(key, depth - 1);
var valueChild = _clone(value, depth - 1);
child.set(keyChild, valueChild);
});
}
if (_instanceof(parent, nativeSet)) {
parent.forEach(function(value) {
var entryChild = _clone(value, depth - 1);
child.add(entryChild);
});
}
for (var i in parent) {
var attrs;
if (proto) {
attrs = Object.getOwnPropertyDescriptor(proto, i);
}
if (attrs && attrs.set == null) {
continue;
}
child[i] = _clone(parent[i], depth - 1);
}
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(parent);
for (var i = 0; i < symbols.length; i++) {
// Don't need to worry about cloning a symbol because it is a primitive,
// like a number or string.
var symbol = symbols[i];
var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);
if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
continue;
}
child[symbol] = _clone(parent[symbol], depth - 1);
if (!descriptor.enumerable) {
Object.defineProperty(child, symbol, {
enumerable: false
});
}
}
}
if (includeNonEnumerable) {
var allPropertyNames = Object.getOwnPropertyNames(parent);
for (var i = 0; i < allPropertyNames.length; i++) {
var propertyName = allPropertyNames[i];
var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);
if (descriptor && descriptor.enumerable) {
continue;
}
child[propertyName] = _clone(parent[propertyName], depth - 1);
Object.defineProperty(child, propertyName, {
enumerable: false
});
}
}
return child;
}
return _clone(parent, depth);
}
/**
* Simple flat clone using prototype, accepts only objects, usefull for property
* override on FLAT configuration object (no nested props).
*
* USE WITH CAUTION! This may not behave as you wish if you do not know how this
* works.
*/
clone.clonePrototype = function clonePrototype(parent) {
if (parent === null)
return null;
var c = function () {};
c.prototype = parent;
return new c();
};
// private utility functions
function __objToStr(o) {
return Object.prototype.toString.call(o);
}
clone.__objToStr = __objToStr;
function __isDate(o) {
return typeof o === 'object' && __objToStr(o) === '[object Date]';
}
clone.__isDate = __isDate;
function __isArray(o) {
return typeof o === 'object' && __objToStr(o) === '[object Array]';
}
clone.__isArray = __isArray;
function __isRegExp(o) {
return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
}
clone.__isRegExp = __isRegExp;
function __getRegExpFlags(re) {
var flags = '';
if (re.global) flags += 'g';
if (re.ignoreCase) flags += 'i';
if (re.multiline) flags += 'm';
return flags;
}
clone.__getRegExpFlags = __getRegExpFlags;
return clone;
})();
if (typeof module === 'object' && module.exports) {
module.exports = clone;
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(142).Buffer))
/***/ }),
/* 142 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
/* eslint-disable no-proto */
'use strict'
var base64 = __webpack_require__(143)
var ieee754 = __webpack_require__(144)
var isArray = __webpack_require__(145)
exports.Buffer = Buffer
exports.SlowBuffer = SlowBuffer
exports.INSPECT_MAX_BYTES = 50
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
* === false Use Object implementation (most compatible, even IE6)
*
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
* Opera 11.6+, iOS 4.2+.
*
* Due to various browser bugs, sometimes the Object implementation will be used even
* when the browser supports typed arrays.
*
* Note:
*
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
*
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
*
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
* incorrect length in some situations.
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
* get the Object implementation, which is slower but behaves correctly.
*/
Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
? global.TYPED_ARRAY_SUPPORT
: typedArraySupport()
/*
* Export kMaxLength after typed array support is determined.
*/
exports.kMaxLength = kMaxLength()
function typedArraySupport () {
try {
var arr = new Uint8Array(1)
arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
return arr.foo() === 42 && // typed array instances can be augmented
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
} catch (e) {
return false
}
}
function kMaxLength () {
return Buffer.TYPED_ARRAY_SUPPORT
? 0x7fffffff
: 0x3fffffff
}
function createBuffer (that, length) {
if (kMaxLength() < length) {
throw new RangeError('Invalid typed array length')
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = new Uint8Array(length)
that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
if (that === null) {
that = new Buffer(length)
}
that.length = length
}
return that
}
/**
* The Buffer constructor returns instances of `Uint8Array` that have their
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
* returns a single octet.
*
* The `Uint8Array` prototype remains unmodified.
*/
function Buffer (arg, encodingOrOffset, length) {
if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
return new Buffer(arg, encodingOrOffset, length)
}
// Common case.
if (typeof arg === 'number') {
if (typeof encodingOrOffset === 'string') {
throw new Error(
'If encoding is specified then the first argument must be a string'
)
}
return allocUnsafe(this, arg)
}
return from(this, arg, encodingOrOffset, length)
}
Buffer.poolSize = 8192 // not used by this implementation
// TODO: Legacy, not needed anymore. Remove in next major version.
Buffer._augment = function (arr) {
arr.__proto__ = Buffer.prototype
return arr
}
function from (that, value, encodingOrOffset, length) {
if (typeof value === 'number') {
throw new TypeError('"value" argument must not be a number')
}
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
return fromArrayBuffer(that, value, encodingOrOffset, length)
}
if (typeof value === 'string') {
return fromString(that, value, encodingOrOffset)
}
return fromObject(that, value)
}
/**
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
* if value is a number.
* Buffer.from(str[, encoding])
* Buffer.from(array)
* Buffer.from(buffer)
* Buffer.from(arrayBuffer[, byteOffset[, length]])
**/
Buffer.from = function (value, encodingOrOffset, length) {
return from(null, value, encodingOrOffset, length)
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
Buffer.prototype.__proto__ = Uint8Array.prototype
Buffer.__proto__ = Uint8Array
if (typeof Symbol !== 'undefined' && Symbol.species &&
Buffer[Symbol.species] === Buffer) {
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
Object.defineProperty(Buffer, Symbol.species, {
value: null,
configurable: true
})
}
}
function assertSize (size) {
if (typeof size !== 'number') {
throw new TypeError('"size" argument must be a number')
} else if (size < 0) {
throw new RangeError('"size" argument must not be negative')
}
}
function alloc (that, size, fill, encoding) {
assertSize(size)
if (size <= 0) {
return createBuffer(that, size)
}
if (fill !== undefined) {
// Only pay attention to encoding if it's a string. This
// prevents accidentally sending in a number that would
// be interpretted as a start offset.
return typeof encoding === 'string'
? createBuffer(that, size).fill(fill, encoding)
: createBuffer(that, size).fill(fill)
}
return createBuffer(that, size)
}
/**
* Creates a new filled Buffer instance.
* alloc(size[, fill[, encoding]])
**/
Buffer.alloc = function (size, fill, encoding) {
return alloc(null, size, fill, encoding)
}
function allocUnsafe (that, size) {
assertSize(size)
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) {
for (var i = 0; i < size; ++i) {
that[i] = 0
}
}
return that
}
/**
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
* */
Buffer.allocUnsafe = function (size) {
return allocUnsafe(null, size)
}
/**
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
*/
Buffer.allocUnsafeSlow = function (size) {
return allocUnsafe(null, size)
}
function fromString (that, string, encoding) {
if (typeof encoding !== 'string' || encoding === '') {
encoding = 'utf8'
}
if (!Buffer.isEncoding(encoding)) {
throw new TypeError('"encoding" must be a valid string encoding')
}
var length = byteLength(string, encoding) | 0
that = createBuffer(that, length)
var actual = that.write(string, encoding)
if (actual !== length) {
// Writing a hex string, for example, that contains invalid characters will
// cause everything after the first invalid character to be ignored. (e.g.
// 'abxxcd' will be treated as 'ab')
that = that.slice(0, actual)
}
return that
}
function fromArrayLike (that, array) {
var length = array.length < 0 ? 0 : checked(array.length) | 0
that = createBuffer(that, length)
for (var i = 0; i < length; i += 1) {
that[i] = array[i] & 255
}
return that
}
function fromArrayBuffer (that, array, byteOffset, length) {
array.byteLength // this throws if `array` is not a valid ArrayBuffer
if (byteOffset < 0 || array.byteLength < byteOffset) {
throw new RangeError('\'offset\' is out of bounds')
}
if (array.byteLength < byteOffset + (length || 0)) {
throw new RangeError('\'length\' is out of bounds')
}
if (byteOffset === undefined && length === undefined) {
array = new Uint8Array(array)
} else if (length === undefined) {
array = new Uint8Array(array, byteOffset)
} else {
array = new Uint8Array(array, byteOffset, length)
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = array
that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
that = fromArrayLike(that, array)
}
return that
}
function fromObject (that, obj) {
if (Buffer.isBuffer(obj)) {
var len = checked(obj.length) | 0
that = createBuffer(that, len)
if (that.length === 0) {
return that
}
obj.copy(that, 0, 0, len)
return that
}
if (obj) {
if ((typeof ArrayBuffer !== 'undefined' &&
obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
if (typeof obj.length !== 'number' || isnan(obj.length)) {
return createBuffer(that, 0)
}
return fromArrayLike(that, obj)
}
if (obj.type === 'Buffer' && isArray(obj.data)) {
return fromArrayLike(that, obj.data)
}
}
throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
}
function checked (length) {
// Note: cannot use `length < kMaxLength()` here because that fails when
// length is NaN (which is otherwise coerced to zero.)
if (length >= kMaxLength()) {
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
'size: 0x' + kMaxLength().toString(16) + ' bytes')
}
return length | 0
}
function SlowBuffer (length) {
if (+length != length) { // eslint-disable-line eqeqeq
length = 0
}
return Buffer.alloc(+length)
}
Buffer.isBuffer = function isBuffer (b) {
return !!(b != null && b._isBuffer)
}
Buffer.compare = function compare (a, b) {
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
throw new TypeError('Arguments must be Buffers')
}
if (a === b) return 0
var x = a.length
var y = b.length
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
if (a[i] !== b[i]) {
x = a[i]
y = b[i]
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
}
Buffer.isEncoding = function isEncoding (encoding) {
switch (String(encoding).toLowerCase()) {
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'latin1':
case 'binary':
case 'base64':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return true
default:
return false
}
}
Buffer.concat = function concat (list, length) {
if (!isArray(list)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
if (list.length === 0) {
return Buffer.alloc(0)
}
var i
if (length === undefined) {
length = 0
for (i = 0; i < list.length; ++i) {
length += list[i].length
}
}
var buffer = Buffer.allocUnsafe(length)
var pos = 0
for (i = 0; i < list.length; ++i) {
var buf = list[i]
if (!Buffer.isBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
buf.copy(buffer, pos)
pos += buf.length
}
return buffer
}
function byteLength (string, encoding) {
if (Buffer.isBuffer(string)) {
return string.length
}
if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
(ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
return string.byteLength
}
if (typeof string !== 'string') {
string = '' + string
}
var len = string.length
if (len === 0) return 0
// Use a for loop to avoid recursion
var loweredCase = false
for (;;) {
switch (encoding) {
case 'ascii':
case 'latin1':
case 'binary':
return len
case 'utf8':
case 'utf-8':
case undefined:
return utf8ToBytes(string).length
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return len * 2
case 'hex':
return len >>> 1
case 'base64':
return base64ToBytes(string).length
default:
if (loweredCase) return utf8ToBytes(string).length // assume utf8
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
}
}
Buffer.byteLength = byteLength
function slowToString (encoding, start, end) {
var loweredCase = false
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
// property of a typed array.
// This behaves neither like String nor Uint8Array in that we set start/end
// to their upper/lower bounds if the value passed is out of range.
// undefined is handled specially as per ECMA-262 6th Edition,
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
if (start === undefined || start < 0) {
start = 0
}
// Return early if start > this.length. Done here to prevent potential uint32
// coercion fail below.
if (start > this.length) {
return ''
}
if (end === undefined || end > this.length) {
end = this.length
}
if (end <= 0) {
return ''
}
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
end >>>= 0
start >>>= 0
if (end <= start) {
return ''
}
if (!encoding) encoding = 'utf8'
while (true) {
switch (encoding) {
case 'hex':
return hexSlice(this, start, end)
case 'utf8':
case 'utf-8':
return utf8Slice(this, start, end)
case 'ascii':
return asciiSlice(this, start, end)
case 'latin1':
case 'binary':
return latin1Slice(this, start, end)
case 'base64':
return base64Slice(this, start, end)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return utf16leSlice(this, start, end)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = (encoding + '').toLowerCase()
loweredCase = true
}
}
}
// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
// Buffer instances.
Buffer.prototype._isBuffer = true
function swap (b, n, m) {
var i = b[n]
b[n] = b[m]
b[m] = i
}
Buffer.prototype.swap16 = function swap16 () {
var len = this.length
if (len % 2 !== 0) {
throw new RangeError('Buffer size must be a multiple of 16-bits')
}
for (var i = 0; i < len; i += 2) {
swap(this, i, i + 1)
}
return this
}
Buffer.prototype.swap32 = function swap32 () {
var len = this.length
if (len % 4 !== 0) {
throw new RangeError('Buffer size must be a multiple of 32-bits')
}
for (var i = 0; i < len; i += 4) {
swap(this, i, i + 3)
swap(this, i + 1, i + 2)
}
return this
}
Buffer.prototype.swap64 = function swap64 () {
var len = this.length
if (len % 8 !== 0) {
throw new RangeError('Buffer size must be a multiple of 64-bits')
}
for (var i = 0; i < len; i += 8) {
swap(this, i, i + 7)
swap(this, i + 1, i + 6)
swap(this, i + 2, i + 5)
swap(this, i + 3, i + 4)
}
return this
}
Buffer.prototype.toString = function toString () {
var length = this.length | 0
if (length === 0) return ''
if (arguments.length === 0) return utf8Slice(this, 0, length)
return slowToString.apply(this, arguments)
}
Buffer.prototype.equals = function equals (b) {
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
if (this === b) return true
return Buffer.compare(this, b) === 0
}
Buffer.prototype.inspect = function inspect () {
var str = ''
var max = exports.INSPECT_MAX_BYTES
if (this.length > 0) {
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
if (this.length > max) str += ' ... '
}
return '<Buffer ' + str + '>'
}
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
if (!Buffer.isBuffer(target)) {
throw new TypeError('Argument must be a Buffer')
}
if (start === undefined) {
start = 0
}
if (end === undefined) {
end = target ? target.length : 0
}
if (thisStart === undefined) {
thisStart = 0
}
if (thisEnd === undefined) {
thisEnd = this.length
}
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
throw new RangeError('out of range index')
}
if (thisStart >= thisEnd && start >= end) {
return 0
}
if (thisStart >= thisEnd) {
return -1
}
if (start >= end) {
return 1
}
start >>>= 0
end >>>= 0
thisStart >>>= 0
thisEnd >>>= 0
if (this === target) return 0
var x = thisEnd - thisStart
var y = end - start
var len = Math.min(x, y)
var thisCopy = this.slice(thisStart, thisEnd)
var targetCopy = target.slice(start, end)
for (var i = 0; i < len; ++i) {
if (thisCopy[i] !== targetCopy[i]) {
x = thisCopy[i]
y = targetCopy[i]
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
}
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
//
// Arguments:
// - buffer - a Buffer to search
// - val - a string, Buffer, or number
// - byteOffset - an index into `buffer`; will be clamped to an int32
// - encoding - an optional encoding, relevant is val is a string
// - dir - true for indexOf, false for lastIndexOf
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
// Empty buffer means no match
if (buffer.length === 0) return -1
// Normalize byteOffset
if (typeof byteOffset === 'string') {
encoding = byteOffset
byteOffset = 0
} else if (byteOffset > 0x7fffffff) {
byteOffset = 0x7fffffff
} else if (byteOffset < -0x80000000) {
byteOffset = -0x80000000
}
byteOffset = +byteOffset // Coerce to Number.
if (isNaN(byteOffset)) {
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
byteOffset = dir ? 0 : (buffer.length - 1)
}
// Normalize byteOffset: negative offsets start from the end of the buffer
if (byteOffset < 0) byteOffset = buffer.length + byteOffset
if (byteOffset >= buffer.length) {
if (dir) return -1
else byteOffset = buffer.length - 1
} else if (byteOffset < 0) {
if (dir) byteOffset = 0
else return -1
}
// Normalize val
if (typeof val === 'string') {
val = Buffer.from(val, encoding)
}
// Finally, search either indexOf (if dir is true) or lastIndexOf
if (Buffer.isBuffer(val)) {
// Special case: looking for empty string/buffer always fails
if (val.length === 0) {
return -1
}
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
} else if (typeof val === 'number') {
val = val & 0xFF // Search for a byte value [0-255]
if (Buffer.TYPED_ARRAY_SUPPORT &&
typeof Uint8Array.prototype.indexOf === 'function') {
if (dir) {
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
} else {
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
}
}
return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
}
throw new TypeError('val must be string, number or Buffer')
}
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
var indexSize = 1
var arrLength = arr.length
var valLength = val.length
if (encoding !== undefined) {
encoding = String(encoding).toLowerCase()
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
encoding === 'utf16le' || encoding === 'utf-16le') {
if (arr.length < 2 || val.length < 2) {
return -1
}
indexSize = 2
arrLength /= 2
valLength /= 2
byteOffset /= 2
}
}
function read (buf, i) {
if (indexSize === 1) {
return buf[i]
} else {
return buf.readUInt16BE(i * indexSize)
}
}
var i
if (dir) {
var foundIndex = -1
for (i = byteOffset; i < arrLength; i++) {
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
if (foundIndex === -1) foundIndex = i
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
} else {
if (foundIndex !== -1) i -= i - foundIndex
foundIndex = -1
}
}
} else {
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
for (i = byteOffset; i >= 0; i--) {
var found = true
for (var j = 0; j < valLength; j++) {
if (read(arr, i + j) !== read(val, j)) {
found = false
break
}
}
if (found) return i
}
}
return -1
}
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
return this.indexOf(val, byteOffset, encoding) !== -1
}
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
}
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
}
function hexWrite (buf, string, offset, length) {
offset = Number(offset) || 0
var remaining = buf.length - offset
if (!length) {
length = remaining
} else {
length = Number(length)
if (length > remaining) {
length = remaining
}
}
// must be an even number of digits
var strLen = string.length
if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
if (length > strLen / 2) {
length = strLen / 2
}
for (var i = 0; i < length; ++i) {
var parsed = parseInt(string.substr(i * 2, 2), 16)
if (isNaN(parsed)) return i
buf[offset + i] = parsed
}
return i
}
function utf8Write (buf, string, offset, length) {
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
}
function asciiWrite (buf, string, offset, length) {
return blitBuffer(asciiToBytes(string), buf, offset, length)
}
function latin1Write (buf, string, offset, length) {
return asciiWrite(buf, string, offset, length)
}
function base64Write (buf, string, offset, length) {
return blitBuffer(base64ToBytes(string), buf, offset, length)
}
function ucs2Write (buf, string, offset, length) {
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
}
Buffer.prototype.write = function write (string, offset, length, encoding) {
// Buffer#write(string)
if (offset === undefined) {
encoding = 'utf8'
length = this.length
offset = 0
// Buffer#write(string, encoding)
} else if (length === undefined && typeof offset === 'string') {
encoding = offset
length = this.length
offset = 0
// Buffer#write(string, offset[, length][, encoding])
} else if (isFinite(offset)) {
offset = offset | 0
if (isFinite(length)) {
length = length | 0
if (encoding === undefined) encoding = 'utf8'
} else {
encoding = length
length = undefined
}
// legacy write(string, encoding, offset, length) - remove in v0.13
} else {
throw new Error(
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
)
}
var remaining = this.length - offset
if (length === undefined || length > remaining) length = remaining
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
throw new RangeError('Attempt to write outside buffer bounds')
}
if (!encoding) encoding = 'utf8'
var loweredCase = false
for (;;) {
switch (encoding) {
case 'hex':
return hexWrite(this, string, offset, length)
case 'utf8':
case 'utf-8':
return utf8Write(this, string, offset, length)
case 'ascii':
return asciiWrite(this, string, offset, length)
case 'latin1':
case 'binary':
return latin1Write(this, string, offset, length)
case 'base64':
// Warning: maxLength not taken into account in base64Write
return base64Write(this, string, offset, length)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return ucs2Write(this, string, offset, length)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
}
}
Buffer.prototype.toJSON = function toJSON () {
return {
type: 'Buffer',
data: Array.prototype.slice.call(this._arr || this, 0)
}
}
function base64Slice (buf, start, end) {
if (start === 0 && end === buf.length) {
return base64.fromByteArray(buf)
} else {
return base64.fromByteArray(buf.slice(start, end))
}
}
function utf8Slice (buf, start, end) {
end = Math.min(buf.length, end)
var res = []
var i = start
while (i < end) {
var firstByte = buf[i]
var codePoint = null
var bytesPerSequence = (firstByte > 0xEF) ? 4
: (firstByte > 0xDF) ? 3
: (firstByte > 0xBF) ? 2
: 1
if (i + bytesPerSequence <= end) {
var secondByte, thirdByte, fourthByte, tempCodePoint
switch (bytesPerSequence) {
case 1:
if (firstByte < 0x80) {
codePoint = firstByte
}
break
case 2:
secondByte = buf[i + 1]
if ((secondByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
if (tempCodePoint > 0x7F) {
codePoint = tempCodePoint
}
}
break
case 3:
secondByte = buf[i + 1]
thirdByte = buf[i + 2]
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
codePoint = tempCodePoint
}
}
break
case 4:
secondByte = buf[i + 1]
thirdByte = buf[i + 2]
fourthByte = buf[i + 3]
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
codePoint = tempCodePoint
}
}
}
}
if (codePoint === null) {
// we did not generate a valid codePoint so insert a
// replacement char (U+FFFD) and advance only 1 byte
codePoint = 0xFFFD
bytesPerSequence = 1
} else if (codePoint > 0xFFFF) {
// encode to utf16 (surrogate pair dance)
codePoint -= 0x10000
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
codePoint = 0xDC00 | codePoint & 0x3FF
}
res.push(codePoint)
i += bytesPerSequence
}
return decodeCodePointsArray(res)
}
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
// the lowest limit is Chrome, with 0x10000 args.
// We go 1 magnitude less, for safety
var MAX_ARGUMENTS_LENGTH = 0x1000
function decodeCodePointsArray (codePoints) {
var len = codePoints.length
if (len <= MAX_ARGUMENTS_LENGTH) {
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
}
// Decode in chunks to avoid "call stack size exceeded".
var res = ''
var i = 0
while (i < len) {
res += String.fromCharCode.apply(
String,
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
)
}
return res
}
function asciiSlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i] & 0x7F)
}
return ret
}
function latin1Slice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i])
}
return ret
}
function hexSlice (buf, start, end) {
var len = buf.length
if (!start || start < 0) start = 0
if (!end || end < 0 || end > len) end = len
var out = ''
for (var i = start; i < end; ++i) {
out += toHex(buf[i])
}
return out
}
function utf16leSlice (buf, start, end) {
var bytes = buf.slice(start, end)
var res = ''
for (var i = 0; i < bytes.length; i += 2) {
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
}
return res
}
Buffer.prototype.slice = function slice (start, end) {
var len = this.length
start = ~~start
end = end === undefined ? len : ~~end
if (start < 0) {
start += len
if (start < 0) start = 0
} else if (start > len) {
start = len
}
if (end < 0) {
end += len
if (end < 0) end = 0
} else if (end > len) {
end = len
}
if (end < start) end = start
var newBuf
if (Buffer.TYPED_ARRAY_SUPPORT) {
newBuf = this.subarray(start, end)
newBuf.__proto__ = Buffer.prototype
} else {
var sliceLen = end - start
newBuf = new Buffer(sliceLen, undefined)
for (var i = 0; i < sliceLen; ++i) {
newBuf[i] = this[i + start]
}
}
return newBuf
}
/*
* Need to make sure that buffer isn't trying to write out of bounds.
*/
function checkOffset (offset, ext, length) {
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
}
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul
}
return val
}
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
checkOffset(offset, byteLength, this.length)
}
var val = this[offset + --byteLength]
var mul = 1
while (byteLength > 0 && (mul *= 0x100)) {
val += this[offset + --byteLength] * mul
}
return val
}
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length)
return this[offset]
}
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
return this[offset] | (this[offset + 1] << 8)
}
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
return (this[offset] << 8) | this[offset + 1]
}
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ((this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16)) +
(this[offset + 3] * 0x1000000)
}
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset] * 0x1000000) +
((this[offset + 1] << 16) |
(this[offset + 2] << 8) |
this[offset + 3])
}
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul
}
mul *= 0x80
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var i = byteLength
var mul = 1
var val = this[offset + --i]
while (i > 0 && (mul *= 0x100)) {
val += this[offset + --i] * mul
}
mul *= 0x80
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length)
if (!(this[offset] & 0x80)) return (this[offset])
return ((0xff - this[offset] + 1) * -1)
}
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
var val = this[offset] | (this[offset + 1] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
var val = this[offset + 1] | (this[offset] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16) |
(this[offset + 3] << 24)
}
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset] << 24) |
(this[offset + 1] << 16) |
(this[offset + 2] << 8) |
(this[offset + 3])
}
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, true, 23, 4)
}
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, false, 23, 4)
}
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, true, 52, 8)
}
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, false, 52, 8)
}
function checkInt (buf, value, offset, ext, max, min) {
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
if (offset + ext > buf.length) throw new RangeError('Index out of range')
}
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1
checkInt(this, value, offset, byteLength, maxBytes, 0)
}
var mul = 1
var i = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1
checkInt(this, value, offset, byteLength, maxBytes, 0)
}
var i = byteLength - 1
var mul = 1
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
this[offset] = (value & 0xff)
return offset + 1
}
function objectWriteUInt16 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
(littleEndian ? i : 1 - i) * 8
}
}
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
}
return offset + 2
}
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = (value & 0xff)
} else {
objectWriteUInt16(this, value, offset, false)
}
return offset + 2
}
function objectWriteUInt32 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffffffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
}
}
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset + 3] = (value >>> 24)
this[offset + 2] = (value >>> 16)
this[offset + 1] = (value >>> 8)
this[offset] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, true)
}
return offset + 4
}
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, false)
}
return offset + 4
}
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1)
checkInt(this, value, offset, byteLength, limit - 1, -limit)
}
var i = 0
var mul = 1
var sub = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
sub = 1
}
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1)
checkInt(this, value, offset, byteLength, limit - 1, -limit)
}
var i = byteLength - 1
var mul = 1
var sub = 0
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
sub = 1
}
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
if (value < 0) value = 0xff + value + 1
this[offset] = (value & 0xff)
return offset + 1
}
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
}
return offset + 2
}
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = (value & 0xff)
} else {
objectWriteUInt16(this, value, offset, false)
}
return offset + 2
}
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
this[offset + 2] = (value >>> 16)
this[offset + 3] = (value >>> 24)
} else {
objectWriteUInt32(this, value, offset, true)
}
return offset + 4
}
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (value < 0) value = 0xffffffff + value + 1
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, false)
}
return offset + 4
}
function checkIEEE754 (buf, value, offset, ext, max, min) {
if (offset + ext > buf.length) throw new RangeError('Index out of range')
if (offset < 0) throw new RangeError('Index out of range')
}
function writeFloat (buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
}
ieee754.write(buf, value, offset, littleEndian, 23, 4)
return offset + 4
}
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
return writeFloat(this, value, offset, true, noAssert)
}
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
return writeFloat(this, value, offset, false, noAssert)
}
function writeDouble (buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
}
ieee754.write(buf, value, offset, littleEndian, 52, 8)
return offset + 8
}
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
return writeDouble(this, value, offset, true, noAssert)
}
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
return writeDouble(this, value, offset, false, noAssert)
}
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
if (!start) start = 0
if (!end && end !== 0) end = this.length
if (targetStart >= target.length) targetStart = target.length
if (!targetStart) targetStart = 0
if (end > 0 && end < start) end = start
// Copy 0 bytes; we're done
if (end === start) return 0
if (target.length === 0 || this.length === 0) return 0
// Fatal error conditions
if (targetStart < 0) {
throw new RangeError('targetStart out of bounds')
}
if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
if (end < 0) throw new RangeError('sourceEnd out of bounds')
// Are we oob?
if (end > this.length) end = this.length
if (target.length - targetStart < end - start) {
end = target.length - targetStart + start
}
var len = end - start
var i
if (this === target && start < targetStart && targetStart < end) {
// descending copy from end
for (i = len - 1; i >= 0; --i) {
target[i + targetStart] = this[i + start]
}
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
// ascending copy from start
for (i = 0; i < len; ++i) {
target[i + targetStart] = this[i + start]
}
} else {
Uint8Array.prototype.set.call(
target,
this.subarray(start, start + len),
targetStart
)
}
return len
}
// Usage:
// buffer.fill(number[, offset[, end]])
// buffer.fill(buffer[, offset[, end]])
// buffer.fill(string[, offset[, end]][, encoding])
Buffer.prototype.fill = function fill (val, start, end, encoding) {
// Handle string cases:
if (typeof val === 'string') {
if (typeof start === 'string') {
encoding = start
start = 0
end = this.length
} else if (typeof end === 'string') {
encoding = end
end = this.length
}
if (val.length === 1) {
var code = val.charCodeAt(0)
if (code < 256) {
val = code
}
}
if (encoding !== undefined && typeof encoding !== 'string') {
throw new TypeError('encoding must be a string')
}
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
throw new TypeError('Unknown encoding: ' + encoding)
}
} else if (typeof val === 'number') {
val = val & 255
}
// Invalid ranges are not set to a default, so can range check early.
if (start < 0 || this.length < start || this.length < end) {
throw new RangeError('Out of range index')
}
if (end <= start) {
return this
}
start = start >>> 0
end = end === undefined ? this.length : end >>> 0
if (!val) val = 0
var i
if (typeof val === 'number') {
for (i = start; i < end; ++i) {
this[i] = val
}
} else {
var bytes = Buffer.isBuffer(val)
? val
: utf8ToBytes(new Buffer(val, encoding).toString())
var len = bytes.length
for (i = 0; i < end - start; ++i) {
this[i + start] = bytes[i % len]
}
}
return this
}
// HELPER FUNCTIONS
// ================
var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
function base64clean (str) {
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = stringtrim(str).replace(INVALID_BASE64_RE, '')
// Node converts strings with length < 2 to ''
if (str.length < 2) return ''
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
while (str.length % 4 !== 0) {
str = str + '='
}
return str
}
function stringtrim (str) {
if (str.trim) return str.trim()
return str.replace(/^\s+|\s+$/g, '')
}
function toHex (n) {
if (n < 16) return '0' + n.toString(16)
return n.toString(16)
}
function utf8ToBytes (string, units) {
units = units || Infinity
var codePoint
var length = string.length
var leadSurrogate = null
var bytes = []
for (var i = 0; i < length; ++i) {
codePoint = string.charCodeAt(i)
// is surrogate component
if (codePoint > 0xD7FF && codePoint < 0xE000) {
// last char was a lead
if (!leadSurrogate) {
// no lead yet
if (codePoint > 0xDBFF) {
// unexpected trail
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
} else if (i + 1 === length) {
// unpaired lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
}
// valid lead
leadSurrogate = codePoint
continue
}
// 2 leads in a row
if (codePoint < 0xDC00) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
leadSurrogate = codePoint
continue
}
// valid surrogate pair
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
} else if (leadSurrogate) {
// valid bmp char, but last char was a lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
}
leadSurrogate = null
// encode utf8
if (codePoint < 0x80) {
if ((units -= 1) < 0) break
bytes.push(codePoint)
} else if (codePoint < 0x800) {
if ((units -= 2) < 0) break
bytes.push(
codePoint >> 0x6 | 0xC0,
codePoint & 0x3F | 0x80
)
} else if (codePoint < 0x10000) {
if ((units -= 3) < 0) break
bytes.push(
codePoint >> 0xC | 0xE0,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
)
} else if (codePoint < 0x110000) {
if ((units -= 4) < 0) break
bytes.push(
codePoint >> 0x12 | 0xF0,
codePoint >> 0xC & 0x3F | 0x80,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
)
} else {
throw new Error('Invalid code point')
}
}
return bytes
}
function asciiToBytes (str) {
var byteArray = []
for (var i = 0; i < str.length; ++i) {
// Node's code seems to be doing this and not & 0x7F..
byteArray.push(str.charCodeAt(i) & 0xFF)
}
return byteArray
}
function utf16leToBytes (str, units) {
var c, hi, lo
var byteArray = []
for (var i = 0; i < str.length; ++i) {
if ((units -= 2) < 0) break
c = str.charCodeAt(i)
hi = c >> 8
lo = c % 256
byteArray.push(lo)
byteArray.push(hi)
}
return byteArray
}
function base64ToBytes (str) {
return base64.toByteArray(base64clean(str))
}
function blitBuffer (src, dst, offset, length) {
for (var i = 0; i < length; ++i) {
if ((i + offset >= dst.length) || (i >= src.length)) break
dst[i + offset] = src[i]
}
return i
}
function isnan (val) {
return val !== val // eslint-disable-line no-self-compare
}
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ }),
/* 143 */
/***/ (function(module, exports) {
'use strict'
exports.byteLength = byteLength
exports.toByteArray = toByteArray
exports.fromByteArray = fromByteArray
var lookup = []
var revLookup = []
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
for (var i = 0, len = code.length; i < len; ++i) {
lookup[i] = code[i]
revLookup[code.charCodeAt(i)] = i
}
revLookup['-'.charCodeAt(0)] = 62
revLookup['_'.charCodeAt(0)] = 63
function placeHoldersCount (b64) {
var len = b64.length
if (len % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
}
// the number of equal signs (place holders)
// if there are two placeholders, than the two characters before it
// represent one byte
// if there is only one, then the three characters before it represent 2 bytes
// this is just a cheap hack to not do indexOf twice
return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
}
function byteLength (b64) {
// base64 is 4/3 + up to two characters of the original data
return (b64.length * 3 / 4) - placeHoldersCount(b64)
}
function toByteArray (b64) {
var i, l, tmp, placeHolders, arr
var len = b64.length
placeHolders = placeHoldersCount(b64)
arr = new Arr((len * 3 / 4) - placeHolders)
// if there are placeholders, only get up to the last complete 4 chars
l = placeHolders > 0 ? len - 4 : len
var L = 0
for (i = 0; i < l; i += 4) {
tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
arr[L++] = (tmp >> 16) & 0xFF
arr[L++] = (tmp >> 8) & 0xFF
arr[L++] = tmp & 0xFF
}
if (placeHolders === 2) {
tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
arr[L++] = tmp & 0xFF
} else if (placeHolders === 1) {
tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
arr[L++] = (tmp >> 8) & 0xFF
arr[L++] = tmp & 0xFF
}
return arr
}
function tripletToBase64 (num) {
return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
}
function encodeChunk (uint8, start, end) {
var tmp
var output = []
for (var i = start; i < end; i += 3) {
tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
output.push(tripletToBase64(tmp))
}
return output.join('')
}
function fromByteArray (uint8) {
var tmp
var len = uint8.length
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
var output = ''
var parts = []
var maxChunkLength = 16383 // must be multiple of 3
// go through the array every three bytes, we'll deal with trailing stuff later
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
}
// pad the end with zeros, but make sure to not forget the extra bytes
if (extraBytes === 1) {
tmp = uint8[len - 1]
output += lookup[tmp >> 2]
output += lookup[(tmp << 4) & 0x3F]
output += '=='
} else if (extraBytes === 2) {
tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
output += lookup[tmp >> 10]
output += lookup[(tmp >> 4) & 0x3F]
output += lookup[(tmp << 2) & 0x3F]
output += '='
}
parts.push(output)
return parts.join('')
}
/***/ }),
/* 144 */
/***/ (function(module, exports) {
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m
var eLen = nBytes * 8 - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var nBits = -7
var i = isLE ? (nBytes - 1) : 0
var d = isLE ? -1 : 1
var s = buffer[offset + i]
i += d
e = s & ((1 << (-nBits)) - 1)
s >>= (-nBits)
nBits += eLen
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
m = e & ((1 << (-nBits)) - 1)
e >>= (-nBits)
nBits += mLen
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
if (e === 0) {
e = 1 - eBias
} else if (e === eMax) {
return m ? NaN : ((s ? -1 : 1) * Infinity)
} else {
m = m + Math.pow(2, mLen)
e = e - eBias
}
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
}
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c
var eLen = nBytes * 8 - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
var i = isLE ? 0 : (nBytes - 1)
var d = isLE ? 1 : -1
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
value = Math.abs(value)
if (isNaN(value) || value === Infinity) {
m = isNaN(value) ? 1 : 0
e = eMax
} else {
e = Math.floor(Math.log(value) / Math.LN2)
if (value * (c = Math.pow(2, -e)) < 1) {
e--
c *= 2
}
if (e + eBias >= 1) {
value += rt / c
} else {
value += rt * Math.pow(2, 1 - eBias)
}
if (value * c >= 2) {
e++
c /= 2
}
if (e + eBias >= eMax) {
m = 0
e = eMax
} else if (e + eBias >= 1) {
m = (value * c - 1) * Math.pow(2, mLen)
e = e + eBias
} else {
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
e = 0
}
}
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
e = (e << mLen) | m
eLen += mLen
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
buffer[offset + i - d] |= s * 128
}
/***/ }),
/* 145 */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
/***/ }),
/* 146 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(147);
/***/ }),
/* 147 */
/***/ (function(module, exports, __webpack_require__) {
(function() {
var L = __webpack_require__(148).L,
N = __webpack_require__(149).N,
Z = __webpack_require__(150).Z,
M = __webpack_require__(151).M,
unorm = __webpack_require__(152);
var _unicodeCategory = function(code) {
if (~L.indexOf(code)) return 'L';
if (~N.indexOf(code)) return 'N';
if (~Z.indexOf(code)) return 'Z';
if (~M.indexOf(code)) return 'M';
return undefined;
};
module.exports = function(string, options) {
string = string || '';
options = options || {};
var allowedChars = options.allowedChars || '-_~';
var lower = typeof options.lower === 'boolean' ? options.lower : true;
var spaces = typeof options.spaces === 'boolean' ? options.spaces : false;
var rv = [];
var chars = unorm.nfkc(string);
for(var i = 0; i < chars.length; i++) {
var c = chars[i];
var code = c.charCodeAt(0);
// Allow Common CJK Unified Ideographs
// See: http://www.unicode.org/versions/Unicode6.0.0/ch12.pdf - Table 12-2
if (0x4E00 <= code && code <= 0x9FFF) {
rv.push(c);
continue;
}
// Allow Hangul
if (0xAC00 <= code && code <= 0xD7A3) {
rv.push(c);
continue;
}
// Japanese ideographic punctuation
if ((0x3000 <= code && code <= 0x3002) || (0xFF01 <= code && code <= 0xFF02)) {
rv.push(' ');
}
if (allowedChars.indexOf(c) != -1) {
rv.push(c);
continue;
}
var val = _unicodeCategory(code);
if (val && ~'LNM'.indexOf(val)) rv.push(c);
if (val && ~'Z'.indexOf(val)) rv.push(' ');
}
var slug = rv.join('').replace(/^\s+|\s+$/g, '').replace(/\s+/g,' ');
if (!spaces) slug = slug.replace(/[\s\-]+/g,'-');
if (lower) slug = slug.toLowerCase();
return slug;
};
}());
/***/ }),
/* 148 */
/***/ (function(module, exports) {
/*
* List of Unicode code that are flagged as letter.
*
* Contains Unicode code of:
* - Lu = Letter, uppercase
* - Ll = Letter, lowercase
* - Lt = Letter, titlecase
* - Lm = Letter, modifier
* - Lo = Letter, other
*
* This list has been computed from http://unicode.org/Public/UNIDATA/UnicodeData.txt
*
*/
exports.L = [65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 170, 181, 186, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 736, 737, 738, 739, 740, 748, 750, 880, 881, 882, 883, 884, 886, 887, 890, 891, 892, 893, 895, 902, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 11
/***/ }),
/* 149 */
/***/ (function(module, exports) {
/*
* List of Unicode code that are flagged as number.
*
* Contains Unicode code of:
* - Nd = Number, decimal digit
* - Nl = Number, letter
* - No = Number, other
*
* This list has been computed from http://unicode.org/Public/UNIDATA/UnicodeData.txt
* curl -s http://unicode.org/Public/UNIDATA/UnicodeData.txt | grep -E ';Nd;|;Nl;|;No;' | cut -d \; -f 1 | xargs -I{} printf '%d, ' 0x{}
*
*/
exports.N = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 178, 179, 185, 188, 189, 190, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2548, 2549, 2550, 2551, 2552, 2553, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670, 2671, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 2918, 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2930, 2931, 2932, 2933, 2934, 2935, 3046, 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058, 3174, 3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182, 3183, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 3310, 3311, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 3440, 3441, 3442, 3443, 3444, 3445, 3558, 3559, 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673, 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799, 3800, 3801, 3872, 3873, 3874, 3875, 3876, 3877, 3878, 3879, 3880, 3881, 3882, 3883, 3884, 3885, 3886, 3887, 3888, 3889, 3890, 3891, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248, 4249, 4969, 4970, 4971, 4972, 4973, 4974, 4975, 4976, 4977, 4978, 4979, 4980, 4981, 4982, 4983, 4984, 4985, 4986, 4987, 4988, 5870, 5871, 5872, 6112, 6113, 6114, 6115, 6116, 6117, 6118, 6119, 6120, 6121, 6128, 6129, 6130, 6131, 6132, 6133, 6134, 6135, 6136, 6137, 6160, 6161, 6162, 6163, 6164, 6165, 6166, 6167, 6168, 6169, 6470, 6471, 6472, 6473, 6474, 6475, 6476, 6477, 6478, 6479, 6608, 6609, 6610, 6611, 6612, 6613, 6614, 6615, 6616, 6617, 6618, 6784, 6785, 6786, 6787, 6788, 6789, 6790, 6791, 6792, 6793, 6800, 6801, 6802, 6803, 6804, 6805, 6806, 6807, 6808, 6809, 6992, 6993, 6994, 6995, 6996, 6997, 6998, 6999, 7000, 7001, 7088, 7089, 7090, 7091, 7092, 7093, 7094, 7095, 7096, 7097, 7232, 7233, 7234, 7235, 7236, 7237, 7238, 7239, 7240, 7241, 7248, 7249, 7250, 7251, 7252, 7253, 7254, 7255, 7256, 7257, 8304, 8308, 8309, 8310, 8311, 8312, 8313, 8320, 8321, 8322, 8323, 8324, 8325, 8326, 8327, 8328, 8329, 8528, 8529, 8530, 8531, 8532, 8533, 8534, 8535, 8536, 8537, 8538, 8539, 8540, 8541, 8542, 8543, 8544, 8545, 8546, 8547, 8548, 8549, 8550, 8551, 8552, 8553, 8554, 8555, 8556, 8557, 8558, 8559, 8560, 8561, 8562, 8563, 8564, 8565, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 8573, 8574, 8575, 8576, 8577, 8578, 8581, 8582, 8583, 8584, 8585, 9312, 9313, 9314, 9315, 9316, 9317, 9318, 9319, 9320, 9321, 9322, 9323, 9324, 9325, 9326, 9327, 9328, 9329, 9330, 9331, 9332, 9333, 9334, 9335, 9336, 9337, 9338, 9339, 9340, 9341, 9342, 9343, 9344, 9345, 9346, 9347, 9348, 9349, 9350, 9351, 9352, 9353, 9354, 9355, 9356, 9357, 9358, 9359, 9360, 9361, 9362, 9363, 9364, 9365, 9366, 9367, 9368, 9369, 9370, 9371, 9450, 9451, 9452, 9453, 9454, 9455, 9456, 9457, 9458, 9459, 9460, 9461, 9462, 9463, 9464, 9465, 9466, 9467, 9468, 9469, 9470, 9471, 10102, 10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122, 10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 11517, 12295, 12321, 12322, 12323, 12324, 12325, 12326, 12327, 12328, 12329, 12344, 12345, 12346, 12690, 12691, 12692, 12693, 12832, 12833, 12834, 12835, 12836, 12837, 12838, 12839, 12840, 12841, 12872, 12873, 12874, 12875, 12876, 12877, 12878, 12879, 12881, 12882, 12883, 12884, 12885, 12886, 12887, 12888, 12889, 12890, 12891, 12892, 12893, 12894, 12895, 12928, 12929, 12930, 12931, 12932, 12933, 12934, 12935, 12936, 12937, 12977, 12978, 12979, 12980, 12981, 12982, 12983, 12984, 12985, 12986, 12987, 12988, 12989, 12990, 12991, 42528, 42529, 42530, 42531, 42532, 42533, 42534, 42535, 42536, 42537, 42726, 42727, 42728, 42729, 42730, 42731, 42732, 42733, 42734, 42735, 43056, 43057, 43058, 43059, 43060, 43061, 43216, 43217, 43218, 43219, 43220, 43221, 432
/***/ }),
/* 150 */
/***/ (function(module, exports) {
/*
* List of Unicode code that are flagged as separator.
*
* Contains Unicode code of:
* - Zs = Separator, space
* - Zl = Separator, line
* - Zp = Separator, paragraph
*
* This list has been computed from http://unicode.org/Public/UNIDATA/UnicodeData.txt
* curl -s http://unicode.org/Public/UNIDATA/UnicodeData.txt | grep -E ';Zs;|;Zl;|;Zp;' | cut -d \; -f 1 | xargs -I{} printf '%d, ' 0x{}
*
*/
exports.Z = [32, 160, 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288];
/***/ }),
/* 151 */
/***/ (function(module, exports) {
/*
* List of Unicode code that are flagged as mark.
*
* Contains Unicode code of:
* - Mc = Mark, spacing combining
* - Me = Mark, enclosing
* - Mn = Mark, nonspacing
*
* This list has been computed from http://unicode.org/Public/UNIDATA/UnicodeData.txt
* curl -s http://unicode.org/Public/UNIDATA/UnicodeData.txt | grep -E ';Mc;|;Me;|;Mn;' | cut -d \; -f 1 | xargs -I{} printf '%d, ' 0x{}
*
*/
exports.M = [768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1471, 1473, 1474, 1476, 1477, 1479, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1648, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1759, 1760, 1761, 1762, 1763, 1764, 1767, 1768, 1770, 1771, 1772, 1773, 1809, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2070, 2071, 2072, 2073, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2085, 2086, 2087, 2089, 2090, 2091, 2092, 2093, 2137, 2138, 2139, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2362, 2363, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2402, 2403, 2433, 2434, 2435, 2492, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2503, 2504, 2507, 2508, 2509, 2519, 2530, 2531, 2561, 2562, 2563, 2620, 2622, 2623, 2624, 2625, 2626, 2631, 2632, 2635, 2636, 2637, 2641, 2672, 2673, 2677, 2689, 2690, 2691, 2748, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2759, 2760, 2761, 2763, 2764, 2765, 2786, 2787, 2817, 2818, 2819, 2876, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2887, 2888, 2891, 2892, 2893, 2902, 2903, 2914, 2915, 2946, 3006, 3007, 3008, 3009, 3010, 3014, 3015, 3016, 3018, 3019, 3020, 3021, 3031, 3072, 3073, 3074, 3075, 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3142, 3143, 3144, 3146, 3147, 3148, 3149, 3157, 3158, 3170, 3171, 3201, 3202, 3203, 3260, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3270, 3271, 3272, 3274, 3275, 3276, 3277, 3285, 3286, 3298, 3299, 3329, 3330, 3331, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3398, 3399, 3400, 3402, 3403, 3404, 3405, 3415, 3426, 3427, 3458, 3459, 3530, 3535, 3536, 3537, 3538, 3539, 3540, 3542, 3544, 3545, 3546, 3547, 3548, 3549, 3550, 3551, 3570, 3571, 3633, 3636, 3637, 3638, 3639, 3640, 3641, 3642, 3655, 3656, 3657, 3658, 3659, 3660, 3661, 3662, 3761, 3764, 3765, 3766, 3767, 3768, 3769, 3771, 3772, 3784, 3785, 3786, 3787, 3788, 3789, 3864, 3865, 3893, 3895, 3897, 3902, 3903, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 3960, 3961, 3962, 3963, 3964, 3965, 3966, 3967, 3968, 3969, 3970, 3971, 3972, 3974, 3975, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989, 3990, 3991, 3993, 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023, 4024, 4025, 4026, 4027, 4028, 4038, 4139, 4140, 4141, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 4150, 4151, 4152, 4153, 4154, 4155, 4156, 4157, 4158, 4182, 4183, 4184, 4185, 4190, 4191, 4192, 4194, 4195, 4196, 4199, 4200, 4201, 4202, 4203, 4204, 4205, 4209, 4210, 4211, 4212, 4226, 4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4239, 4250, 4251, 4252, 4253, 4957,
/***/ }),
/* 152 */
/***/ (function(module, exports, __webpack_require__) {
(function (root) {
"use strict";
/***** unorm.js *****/
/*
* UnicodeNormalizer 1.0.0
* Copyright (c) 2008 Matsuza
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* $Date: 2008-06-05 16:44:17 +0200 (Thu, 05 Jun 2008) $
* $Rev: 13309 $
*/
var DEFAULT_FEATURE = [null, 0, {}];
var CACHE_THRESHOLD = 10;
var SBase = 0xAC00, LBase = 0x1100, VBase = 0x1161, TBase = 0x11A7, LCount = 19, VCount = 21, TCount = 28;
var NCount = VCount * TCount; // 588
var SCount = LCount * NCount; // 11172
var UChar = function(cp, feature){
this.codepoint = cp;
this.feature = feature;
};
// Strategies
var cache = {};
var cacheCounter = [];
for (var i = 0; i <= 0xFF; ++i){
cacheCounter[i] = 0;
}
function fromCache(next, cp, needFeature){
var ret = cache[cp];
if(!ret){
ret = next(cp, needFeature);
if(!!ret.feature && ++cacheCounter[(cp >> 8) & 0xFF] > CACHE_THRESHOLD){
cache[cp] = ret;
}
}
return ret;
}
function fromData(next, cp, needFeature){
var hash = cp & 0xFF00;
var dunit = UChar.udata[hash] || {};
var f = dunit[cp];
return f ? new UChar(cp, f) : new UChar(cp, DEFAULT_FEATURE);
}
function fromCpOnly(next, cp, needFeature){
return !!needFeature ? next(cp, needFeature) : new UChar(cp, null);
}
function fromRuleBasedJamo(next, cp, needFeature){
var j;
if(cp < LBase || (LBase + LCount <= cp && cp < SBase) || (SBase + SCount < cp)){
return next(cp, needFeature);
}
if(LBase <= cp && cp < LBase + LCount){
var c = {};
var base = (cp - LBase) * VCount;
for (j = 0; j < VCount; ++j){
c[VBase + j] = SBase + TCount * (j + base);
}
return new UChar(cp, [,,c]);
}
var SIndex = cp - SBase;
var TIndex = SIndex % TCount;
var feature = [];
if(TIndex !== 0){
feature[0] = [SBase + SIndex - TIndex, TBase + TIndex];
} else {
feature[0] = [LBase + Math.floor(SIndex / NCount), VBase + Math.floor((SIndex % NCount) / TCount)];
feature[2] = {};
for (j = 1; j < TCount; ++j){
feature[2][TBase + j] = cp + j;
}
}
return new UChar(cp, feature);
}
function fromCpFilter(next, cp, needFeature){
return cp < 60 || 13311 < cp && cp < 42607 ? new UChar(cp, DEFAULT_FEATURE) : next(cp, needFeature);
}
var strategies = [fromCpFilter, fromCache, fromCpOnly, fromRuleBasedJamo, fromData];
UChar.fromCharCode = strategies.reduceRight(function (next, strategy) {
return function (cp, needFeature) {
return strategy(next, cp, needFeature);
};
}, null);
UChar.isHighSurrogate = function(cp){
return cp >= 0xD800 && cp <= 0xDBFF;
};
UChar.isLowSurrogate = function(cp){
return cp >= 0xDC00 && cp <= 0xDFFF;
};
UChar.prototype.prepFeature = function(){
if(!this.feature){
this.feature = UChar.fromCharCode(this.codepoint, true).feature;
}
};
UChar.prototype.toString = function(){
if(this.codepoint < 0x10000){
return String.fromCharCode(this.codepoint);
} else {
var x = this.codepoint - 0x10000;
return String.fromCharCode(Math.floor(x / 0x400) + 0xD800, x % 0x400 + 0xDC00);
}
};
UChar.prototype.getDecomp = function(){
this.prepFeature();
return this.feature[0] || null;
};
UChar.prototype.isCompatibility = function(){
this.prepFeature();
return !!this.feature[1] && (this.feature[1] & (1 << 8));
};
UChar.prototype.isExclude = function(){
this.prepFeature();
return !!this.feature[1] && (this.feature[1] & (1 << 9));
};
UChar.prototype.getCanonicalClass = function(){
this.prepFeature();
return !!this.feature[1] ? (this.feature[1] & 0xff) : 0;
};
UChar.prototype.getComposite = function(following){
this.prepFeature();
if(!this.feature[2]){
return null;
}
var cp = this.feature[2][following.codepoint];
return cp ? UChar.fromCharCode(cp) : null;
};
var UCharIterator = function(str){
this.str = str;
this.cursor = 0;
};
UCharIterator.prototype.next = function(){
if(!!this.str && this.cursor < this.str.length){
var cp = this.str.charCodeAt(this.cursor++);
var d;
if(UChar.isHighSurrogate(cp) && this.cursor < this.str.length && UChar.isLowSurrogate((d = this.str.charCodeAt(this.cursor)))){
cp = (cp - 0xD800) * 0x400 + (d -0xDC00) + 0x10000;
++this.cursor;
}
return UChar.fromCharCode(cp);
} else {
this.str = null;
return null;
}
};
var RecursDecompIterator = function(it, cano){
this.it = it;
this.canonical = cano;
this.resBuf = [];
};
RecursDecompIterator.prototype.next = function(){
function recursiveDecomp(cano, uchar){
var decomp = uchar.getDecomp();
if(!!decomp && !(cano && uchar.isCompatibility())){
var ret = [];
for(var i = 0; i < decomp.length; ++i){
var a = recursiveDecomp(cano, UChar.fromCharCode(decomp[i]));
ret = ret.concat(a);
}
return ret;
} else {
return [uchar];
}
}
if(this.resBuf.length === 0){
var uchar = this.it.next();
if(!uchar){
return null;
}
this.resBuf = recursiveDecomp(this.canonical, uchar);
}
return this.resBuf.shift();
};
var DecompIterator = function(it){
this.it = it;
this.resBuf = [];
};
DecompIterator.prototype.next = function(){
var cc;
if(this.resBuf.length === 0){
do{
var uchar = this.it.next();
if(!uchar){
break;
}
cc = uchar.getCanonicalClass();
var inspt = this.resBuf.length;
if(cc !== 0){
for(; inspt > 0; --inspt){
var uchar2 = this.resBuf[inspt - 1];
var cc2 = uchar2.getCanonicalClass();
if(cc2 <= cc){
break;
}
}
}
this.resBuf.splice(inspt, 0, uchar);
} while(cc !== 0);
}
return this.resBuf.shift();
};
var CompIterator = function(it){
this.it = it;
this.procBuf = [];
this.resBuf = [];
this.lastClass = null;
};
CompIterator.prototype.next = function(){
while(this.resBuf.length === 0){
var uchar = this.it.next();
if(!uchar){
this.resBuf = this.procBuf;
this.procBuf = [];
break;
}
if(this.procBuf.length === 0){
this.lastClass = uchar.getCanonicalClass();
this.procBuf.push(uchar);
} else {
var starter = this.procBuf[0];
var composite = starter.getComposite(uchar);
var cc = uchar.getCanonicalClass();
if(!!composite && (this.lastClass < cc || this.lastClass === 0)){
this.procBuf[0] = composite;
} else {
if(cc === 0){
this.resBuf = this.procBuf;
this.procBuf = [];
}
this.lastClass = cc;
this.procBuf.push(uchar);
}
}
}
return this.resBuf.shift();
};
var createIterator = function(mode, str){
switch(mode){
case "NFD":
return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true));
case "NFKD":
return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false));
case "NFC":
return new CompIterator(new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)));
case "NFKC":
return new CompIterator(new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)));
}
throw mode + " is invalid";
};
var normalize = function(mode, str){
var it = createIterator(mode, str);
var ret = "";
var uchar;
while(!!(uchar = it.next())){
ret += uchar.toString();
}
return ret;
};
/* API functions */
function nfd(str){
return normalize("NFD", str);
}
function nfkd(str){
return normalize("NFKD", str);
}
function nfc(str){
return normalize("NFC", str);
}
function nfkc(str){
return normalize("NFKC", str);
}
/* Unicode data */
UChar.udata={
0:{60:[,,{824:8814}],61:[,,{824:8800}],62:[,,{824:8815}],65:[,,{768:192,769:193,770:194,771:195,772:256,774:258,775:550,776:196,777:7842,778:197,780:461,783:512,785:514,803:7840,805:7680,808:260}],66:[,,{775:7682,803:7684,817:7686}],67:[,,{769:262,770:264,775:266,780:268,807:199}],68:[,,{775:7690,780:270,803:7692,807:7696,813:7698,817:7694}],69:[,,{768:200,769:201,770:202,771:7868,772:274,774:276,775:278,776:203,777:7866,780:282,783:516,785:518,803:7864,807:552,808:280,813:7704,816:7706}],70:[,,{775:7710}],71:[,,{769:500,770:284,772:7712,774:286,775:288,780:486,807:290}],72:[,,{770:292,775:7714,776:7718,780:542,803:7716,807:7720,814:7722}],73:[,,{768:204,769:205,770:206,771:296,772:298,774:300,775:304,776:207,777:7880,780:463,783:520,785:522,803:7882,808:302,816:7724}],74:[,,{770:308}],75:[,,{769:7728,780:488,803:7730,807:310,817:7732}],76:[,,{769:313,780:317,803:7734,807:315,813:7740,817:7738}],77:[,,{769:7742,775:7744,803:7746}],78:[,,{768:504,769:323,771:209,775:7748,780:327,803:7750,807:325,813:7754,817:7752}],79:[,,{768:210,769:211,770:212,771:213,772:332,774:334,775:558,776:214,777:7886,779:336,780:465,783:524,785:526,795:416,803:7884,808:490}],80:[,,{769:7764,775:7766}],82:[,,{769:340,775:7768,780:344,783:528,785:530,803:7770,807:342,817:7774}],83:[,,{769:346,770:348,775:7776,780:352,803:7778,806:536,807:350}],84:[,,{775:7786,780:356,803:7788,806:538,807:354,813:7792,817:7790}],85:[,,{768:217,769:218,770:219,771:360,772:362,774:364,776:220,777:7910,778:366,779:368,780:467,783:532,785:534,795:431,803:7908,804:7794,808:370,813:7798,816:7796}],86:[,,{771:7804,803:7806}],87:[,,{768:7808,769:7810,770:372,775:7814,776:7812,803:7816}],88:[,,{775:7818,776:7820}],89:[,,{768:7922,769:221,770:374,771:7928,772:562,775:7822,776:376,777:7926,803:7924}],90:[,,{769:377,770:7824,775:379,780:381,803:7826,817:7828}],97:[,,{768:224,769:225,770:226,771:227,772:257,774:259,775:551,776:228,777:7843,778:229,780:462,783:513,785:515,803:7841,805:7681,808:261}],98:[,,{775:7683,803:7685,817:7687}],99:[,,{769:263,770:265,775:267,780:269,807:231}],100:[,,{775:7691,780:271,803:7693,807:7697,813:7699,817:7695}],101:[,,{768:232,769:233,770:234,771:7869,772:275,774:277,775:279,776:235,777:7867,780:283,783:517,785:519,803:7865,807:553,808:281,813:7705,816:7707}],102:[,,{775:7711}],103:[,,{769:501,770:285,772:7713,774:287,775:289,780:487,807:291}],104:[,,{770:293,775:7715,776:7719,780:543,803:7717,807:7721,814:7723,817:7830}],105:[,,{768:236,769:237,770:238,771:297,772:299,774:301,776:239,777:7881,780:464,783:521,785:523,803:7883,808:303,816:7725}],106:[,,{770:309,780:496}],107:[,,{769:7729,780:489,803:7731,807:311,817:7733}],108:[,,{769:314,780:318,803:7735,807:316,813:7741,817:7739}],109:[,,{769:7743,775:7745,803:7747}],110:[,,{768:505,769:324,771:241,775:7749,780:328,803:7751,807:326,813:7755,817:7753}],111:[,,{768:242,769:243,770:244,771:245,772:333,774:335,775:559,776:246,777:7887,779:337,780:466,783:525,785:527,795:417,803:7885,808:491}],112:[,,{769:7765,775:7767}],114:[,,{769:341,775:7769,780:345,783:529,785:531,803:7771,807:343,817:7775}],115:[,,{769:347,770:349,775:7777,780:353,803:7779,806:537,807:351}],116:[,,{775:7787,776:7831,780:357,803:7789,806:539,807:355,813:7793,817:7791}],117:[,,{768:249,769:250,770:251,771:361,772:363,774:365,776:252,777:7911,778:367,779:369,780:468,783:533,785:535,795:432,803:7909,804:7795,808:371,813:7799,816:7797}],118:[,,{771:7805,803:7807}],119:[,,{768:7809,769:7811,770:373,775:7815,776:7813,778:7832,803:7817}],120:[,,{775:7819,776:7821}],121:[,,{768:7923,769:253,770:375,771:7929,772:563,775:7823,776:255,777:7927,778:7833,803:7925}],122:[,,{769:378,770:7825,775:380,780:382,803:7827,817:7829}],160:[[32],256],168:[[32,776],256,{768:8173,769:901,834:8129}],170:[[97],256],175:[[32,772],256],178:[[50],256],179:[[51],256],180:[[32,769],256],181:[[956],256],184:[[32,807],256],185:[[49],256],186:[[111],256],188:[[49,8260,52],256],189:[[49,8260,50],256],190:[[51,8260,52],256],192:[[65,768]],193:[[65,769]],194:[[65,770],,{768:7846,769:7844,771:7850,777:7848}],195:[[65,771]],196:[[65,776],,{772:478}],197:[[65,778],,{
256:{256:[[65,772]],257:[[97,772]],258:[[65,774],,{768:7856,769:7854,771:7860,777:7858}],259:[[97,774],,{768:7857,769:7855,771:7861,777:7859}],260:[[65,808]],261:[[97,808]],262:[[67,769]],263:[[99,769]],264:[[67,770]],265:[[99,770]],266:[[67,775]],267:[[99,775]],268:[[67,780]],269:[[99,780]],270:[[68,780]],271:[[100,780]],274:[[69,772],,{768:7700,769:7702}],275:[[101,772],,{768:7701,769:7703}],276:[[69,774]],277:[[101,774]],278:[[69,775]],279:[[101,775]],280:[[69,808]],281:[[101,808]],282:[[69,780]],283:[[101,780]],284:[[71,770]],285:[[103,770]],286:[[71,774]],287:[[103,774]],288:[[71,775]],289:[[103,775]],290:[[71,807]],291:[[103,807]],292:[[72,770]],293:[[104,770]],296:[[73,771]],297:[[105,771]],298:[[73,772]],299:[[105,772]],300:[[73,774]],301:[[105,774]],302:[[73,808]],303:[[105,808]],304:[[73,775]],306:[[73,74],256],307:[[105,106],256],308:[[74,770]],309:[[106,770]],310:[[75,807]],311:[[107,807]],313:[[76,769]],314:[[108,769]],315:[[76,807]],316:[[108,807]],317:[[76,780]],318:[[108,780]],319:[[76,183],256],320:[[108,183],256],323:[[78,769]],324:[[110,769]],325:[[78,807]],326:[[110,807]],327:[[78,780]],328:[[110,780]],329:[[700,110],256],332:[[79,772],,{768:7760,769:7762}],333:[[111,772],,{768:7761,769:7763}],334:[[79,774]],335:[[111,774]],336:[[79,779]],337:[[111,779]],340:[[82,769]],341:[[114,769]],342:[[82,807]],343:[[114,807]],344:[[82,780]],345:[[114,780]],346:[[83,769],,{775:7780}],347:[[115,769],,{775:7781}],348:[[83,770]],349:[[115,770]],350:[[83,807]],351:[[115,807]],352:[[83,780],,{775:7782}],353:[[115,780],,{775:7783}],354:[[84,807]],355:[[116,807]],356:[[84,780]],357:[[116,780]],360:[[85,771],,{769:7800}],361:[[117,771],,{769:7801}],362:[[85,772],,{776:7802}],363:[[117,772],,{776:7803}],364:[[85,774]],365:[[117,774]],366:[[85,778]],367:[[117,778]],368:[[85,779]],369:[[117,779]],370:[[85,808]],371:[[117,808]],372:[[87,770]],373:[[119,770]],374:[[89,770]],375:[[121,770]],376:[[89,776]],377:[[90,769]],378:[[122,769]],379:[[90,775]],380:[[122,775]],381:[[90,780]],382:[[122,780]],383:[[115],256,{775:7835}],416:[[79,795],,{768:7900,769:7898,771:7904,777:7902,803:7906}],417:[[111,795],,{768:7901,769:7899,771:7905,777:7903,803:7907}],431:[[85,795],,{768:7914,769:7912,771:7918,777:7916,803:7920}],432:[[117,795],,{768:7915,769:7913,771:7919,777:7917,803:7921}],439:[,,{780:494}],452:[[68,381],256],453:[[68,382],256],454:[[100,382],256],455:[[76,74],256],456:[[76,106],256],457:[[108,106],256],458:[[78,74],256],459:[[78,106],256],460:[[110,106],256],461:[[65,780]],462:[[97,780]],463:[[73,780]],464:[[105,780]],465:[[79,780]],466:[[111,780]],467:[[85,780]],468:[[117,780]],469:[[220,772]],470:[[252,772]],471:[[220,769]],472:[[252,769]],473:[[220,780]],474:[[252,780]],475:[[220,768]],476:[[252,768]],478:[[196,772]],479:[[228,772]],480:[[550,772]],481:[[551,772]],482:[[198,772]],483:[[230,772]],486:[[71,780]],487:[[103,780]],488:[[75,780]],489:[[107,780]],490:[[79,808],,{772:492}],491:[[111,808],,{772:493}],492:[[490,772]],493:[[491,772]],494:[[439,780]],495:[[658,780]],496:[[106,780]],497:[[68,90],256],498:[[68,122],256],499:[[100,122],256],500:[[71,769]],501:[[103,769]],504:[[78,768]],505:[[110,768]],506:[[197,769]],507:[[229,769]],508:[[198,769]],509:[[230,769]],510:[[216,769]],511:[[248,769]],66045:[,220]},
512:{512:[[65,783]],513:[[97,783]],514:[[65,785]],515:[[97,785]],516:[[69,783]],517:[[101,783]],518:[[69,785]],519:[[101,785]],520:[[73,783]],521:[[105,783]],522:[[73,785]],523:[[105,785]],524:[[79,783]],525:[[111,783]],526:[[79,785]],527:[[111,785]],528:[[82,783]],529:[[114,783]],530:[[82,785]],531:[[114,785]],532:[[85,783]],533:[[117,783]],534:[[85,785]],535:[[117,785]],536:[[83,806]],537:[[115,806]],538:[[84,806]],539:[[116,806]],542:[[72,780]],543:[[104,780]],550:[[65,775],,{772:480}],551:[[97,775],,{772:481}],552:[[69,807],,{774:7708}],553:[[101,807],,{774:7709}],554:[[214,772]],555:[[246,772]],556:[[213,772]],557:[[245,772]],558:[[79,775],,{772:560}],559:[[111,775],,{772:561}],560:[[558,772]],561:[[559,772]],562:[[89,772]],563:[[121,772]],658:[,,{780:495}],688:[[104],256],689:[[614],256],690:[[106],256],691:[[114],256],692:[[633],256],693:[[635],256],694:[[641],256],695:[[119],256],696:[[121],256],728:[[32,774],256],729:[[32,775],256],730:[[32,778],256],731:[[32,808],256],732:[[32,771],256],733:[[32,779],256],736:[[611],256],737:[[108],256],738:[[115],256],739:[[120],256],740:[[661],256],66272:[,220]},
768:{768:[,230],769:[,230],770:[,230],771:[,230],772:[,230],773:[,230],774:[,230],775:[,230],776:[,230,{769:836}],777:[,230],778:[,230],779:[,230],780:[,230],781:[,230],782:[,230],783:[,230],784:[,230],785:[,230],786:[,230],787:[,230],788:[,230],789:[,232],790:[,220],791:[,220],792:[,220],793:[,220],794:[,232],795:[,216],796:[,220],797:[,220],798:[,220],799:[,220],800:[,220],801:[,202],802:[,202],803:[,220],804:[,220],805:[,220],806:[,220],807:[,202],808:[,202],809:[,220],810:[,220],811:[,220],812:[,220],813:[,220],814:[,220],815:[,220],816:[,220],817:[,220],818:[,220],819:[,220],820:[,1],821:[,1],822:[,1],823:[,1],824:[,1],825:[,220],826:[,220],827:[,220],828:[,220],829:[,230],830:[,230],831:[,230],832:[[768],230],833:[[769],230],834:[,230],835:[[787],230],836:[[776,769],230],837:[,240],838:[,230],839:[,220],840:[,220],841:[,220],842:[,230],843:[,230],844:[,230],845:[,220],846:[,220],848:[,230],849:[,230],850:[,230],851:[,220],852:[,220],853:[,220],854:[,220],855:[,230],856:[,232],857:[,220],858:[,220],859:[,230],860:[,233],861:[,234],862:[,234],863:[,233],864:[,234],865:[,234],866:[,233],867:[,230],868:[,230],869:[,230],870:[,230],871:[,230],872:[,230],873:[,230],874:[,230],875:[,230],876:[,230],877:[,230],878:[,230],879:[,230],884:[[697]],890:[[32,837],256],894:[[59]],900:[[32,769],256],901:[[168,769]],902:[[913,769]],903:[[183]],904:[[917,769]],905:[[919,769]],906:[[921,769]],908:[[927,769]],910:[[933,769]],911:[[937,769]],912:[[970,769]],913:[,,{768:8122,769:902,772:8121,774:8120,787:7944,788:7945,837:8124}],917:[,,{768:8136,769:904,787:7960,788:7961}],919:[,,{768:8138,769:905,787:7976,788:7977,837:8140}],921:[,,{768:8154,769:906,772:8153,774:8152,776:938,787:7992,788:7993}],927:[,,{768:8184,769:908,787:8008,788:8009}],929:[,,{788:8172}],933:[,,{768:8170,769:910,772:8169,774:8168,776:939,788:8025}],937:[,,{768:8186,769:911,787:8040,788:8041,837:8188}],938:[[921,776]],939:[[933,776]],940:[[945,769],,{837:8116}],941:[[949,769]],942:[[951,769],,{837:8132}],943:[[953,769]],944:[[971,769]],945:[,,{768:8048,769:940,772:8113,774:8112,787:7936,788:7937,834:8118,837:8115}],949:[,,{768:8050,769:941,787:7952,788:7953}],951:[,,{768:8052,769:942,787:7968,788:7969,834:8134,837:8131}],953:[,,{768:8054,769:943,772:8145,774:8144,776:970,787:7984,788:7985,834:8150}],959:[,,{768:8056,769:972,787:8000,788:8001}],961:[,,{787:8164,788:8165}],965:[,,{768:8058,769:973,772:8161,774:8160,776:971,787:8016,788:8017,834:8166}],969:[,,{768:8060,769:974,787:8032,788:8033,834:8182,837:8179}],970:[[953,776],,{768:8146,769:912,834:8151}],971:[[965,776],,{768:8162,769:944,834:8167}],972:[[959,769]],973:[[965,769]],974:[[969,769],,{837:8180}],976:[[946],256],977:[[952],256],978:[[933],256,{769:979,776:980}],979:[[978,769]],980:[[978,776]],981:[[966],256],982:[[960],256],1008:[[954],256],1009:[[961],256],1010:[[962],256],1012:[[920],256],1013:[[949],256],1017:[[931],256],66422:[,230],66423:[,230],66424:[,230],66425:[,230],66426:[,230]},
1024:{1024:[[1045,768]],1025:[[1045,776]],1027:[[1043,769]],1030:[,,{776:1031}],1031:[[1030,776]],1036:[[1050,769]],1037:[[1048,768]],1038:[[1059,774]],1040:[,,{774:1232,776:1234}],1043:[,,{769:1027}],1045:[,,{768:1024,774:1238,776:1025}],1046:[,,{774:1217,776:1244}],1047:[,,{776:1246}],1048:[,,{768:1037,772:1250,774:1049,776:1252}],1049:[[1048,774]],1050:[,,{769:1036}],1054:[,,{776:1254}],1059:[,,{772:1262,774:1038,776:1264,779:1266}],1063:[,,{776:1268}],1067:[,,{776:1272}],1069:[,,{776:1260}],1072:[,,{774:1233,776:1235}],1075:[,,{769:1107}],1077:[,,{768:1104,774:1239,776:1105}],1078:[,,{774:1218,776:1245}],1079:[,,{776:1247}],1080:[,,{768:1117,772:1251,774:1081,776:1253}],1081:[[1080,774]],1082:[,,{769:1116}],1086:[,,{776:1255}],1091:[,,{772:1263,774:1118,776:1265,779:1267}],1095:[,,{776:1269}],1099:[,,{776:1273}],1101:[,,{776:1261}],1104:[[1077,768]],1105:[[1077,776]],1107:[[1075,769]],1110:[,,{776:1111}],1111:[[1110,776]],1116:[[1082,769]],1117:[[1080,768]],1118:[[1091,774]],1140:[,,{783:1142}],1141:[,,{783:1143}],1142:[[1140,783]],1143:[[1141,783]],1155:[,230],1156:[,230],1157:[,230],1158:[,230],1159:[,230],1217:[[1046,774]],1218:[[1078,774]],1232:[[1040,774]],1233:[[1072,774]],1234:[[1040,776]],1235:[[1072,776]],1238:[[1045,774]],1239:[[1077,774]],1240:[,,{776:1242}],1241:[,,{776:1243}],1242:[[1240,776]],1243:[[1241,776]],1244:[[1046,776]],1245:[[1078,776]],1246:[[1047,776]],1247:[[1079,776]],1250:[[1048,772]],1251:[[1080,772]],1252:[[1048,776]],1253:[[1080,776]],1254:[[1054,776]],1255:[[1086,776]],1256:[,,{776:1258}],1257:[,,{776:1259}],1258:[[1256,776]],1259:[[1257,776]],1260:[[1069,776]],1261:[[1101,776]],1262:[[1059,772]],1263:[[1091,772]],1264:[[1059,776]],1265:[[1091,776]],1266:[[1059,779]],1267:[[1091,779]],1268:[[1063,776]],1269:[[1095,776]],1272:[[1067,776]],1273:[[1099,776]]},
1280:{1415:[[1381,1410],256],1425:[,220],1426:[,230],1427:[,230],1428:[,230],1429:[,230],1430:[,220],1431:[,230],1432:[,230],1433:[,230],1434:[,222],1435:[,220],1436:[,230],1437:[,230],1438:[,230],1439:[,230],1440:[,230],1441:[,230],1442:[,220],1443:[,220],1444:[,220],1445:[,220],1446:[,220],1447:[,220],1448:[,230],1449:[,230],1450:[,220],1451:[,230],1452:[,230],1453:[,222],1454:[,228],1455:[,230],1456:[,10],1457:[,11],1458:[,12],1459:[,13],1460:[,14],1461:[,15],1462:[,16],1463:[,17],1464:[,18],1465:[,19],1466:[,19],1467:[,20],1468:[,21],1469:[,22],1471:[,23],1473:[,24],1474:[,25],1476:[,230],1477:[,220],1479:[,18]},
1536:{1552:[,230],1553:[,230],1554:[,230],1555:[,230],1556:[,230],1557:[,230],1558:[,230],1559:[,230],1560:[,30],1561:[,31],1562:[,32],1570:[[1575,1619]],1571:[[1575,1620]],1572:[[1608,1620]],1573:[[1575,1621]],1574:[[1610,1620]],1575:[,,{1619:1570,1620:1571,1621:1573}],1608:[,,{1620:1572}],1610:[,,{1620:1574}],1611:[,27],1612:[,28],1613:[,29],1614:[,30],1615:[,31],1616:[,32],1617:[,33],1618:[,34],1619:[,230],1620:[,230],1621:[,220],1622:[,220],1623:[,230],1624:[,230],1625:[,230],1626:[,230],1627:[,230],1628:[,220],1629:[,230],1630:[,230],1631:[,220],1648:[,35],1653:[[1575,1652],256],1654:[[1608,1652],256],1655:[[1735,1652],256],1656:[[1610,1652],256],1728:[[1749,1620]],1729:[,,{1620:1730}],1730:[[1729,1620]],1746:[,,{1620:1747}],1747:[[1746,1620]],1749:[,,{1620:1728}],1750:[,230],1751:[,230],1752:[,230],1753:[,230],1754:[,230],1755:[,230],1756:[,230],1759:[,230],1760:[,230],1761:[,230],1762:[,230],1763:[,220],1764:[,230],1767:[,230],1768:[,230],1770:[,220],1771:[,230],1772:[,230],1773:[,220]},
1792:{1809:[,36],1840:[,230],1841:[,220],1842:[,230],1843:[,230],1844:[,220],1845:[,230],1846:[,230],1847:[,220],1848:[,220],1849:[,220],1850:[,230],1851:[,220],1852:[,220],1853:[,230],1854:[,220],1855:[,230],1856:[,230],1857:[,230],1858:[,220],1859:[,230],1860:[,220],1861:[,230],1862:[,220],1863:[,230],1864:[,220],1865:[,230],1866:[,230],2027:[,230],2028:[,230],2029:[,230],2030:[,230],2031:[,230],2032:[,230],2033:[,230],2034:[,220],2035:[,230]},
2048:{2070:[,230],2071:[,230],2072:[,230],2073:[,230],2075:[,230],2076:[,230],2077:[,230],2078:[,230],2079:[,230],2080:[,230],2081:[,230],2082:[,230],2083:[,230],2085:[,230],2086:[,230],2087:[,230],2089:[,230],2090:[,230],2091:[,230],2092:[,230],2093:[,230],2137:[,220],2138:[,220],2139:[,220],2276:[,230],2277:[,230],2278:[,220],2279:[,230],2280:[,230],2281:[,220],2282:[,230],2283:[,230],2284:[,230],2285:[,220],2286:[,220],2287:[,220],2288:[,27],2289:[,28],2290:[,29],2291:[,230],2292:[,230],2293:[,230],2294:[,220],2295:[,230],2296:[,230],2297:[,220],2298:[,220],2299:[,230],2300:[,230],2301:[,230],2302:[,230],2303:[,230]},
2304:{2344:[,,{2364:2345}],2345:[[2344,2364]],2352:[,,{2364:2353}],2353:[[2352,2364]],2355:[,,{2364:2356}],2356:[[2355,2364]],2364:[,7],2381:[,9],2385:[,230],2386:[,220],2387:[,230],2388:[,230],2392:[[2325,2364],512],2393:[[2326,2364],512],2394:[[2327,2364],512],2395:[[2332,2364],512],2396:[[2337,2364],512],2397:[[2338,2364],512],2398:[[2347,2364],512],2399:[[2351,2364],512],2492:[,7],2503:[,,{2494:2507,2519:2508}],2507:[[2503,2494]],2508:[[2503,2519]],2509:[,9],2524:[[2465,2492],512],2525:[[2466,2492],512],2527:[[2479,2492],512]},
2560:{2611:[[2610,2620],512],2614:[[2616,2620],512],2620:[,7],2637:[,9],2649:[[2582,2620],512],2650:[[2583,2620],512],2651:[[2588,2620],512],2654:[[2603,2620],512],2748:[,7],2765:[,9],68109:[,220],68111:[,230],68152:[,230],68153:[,1],68154:[,220],68159:[,9],68325:[,230],68326:[,220]},
2816:{2876:[,7],2887:[,,{2878:2891,2902:2888,2903:2892}],2888:[[2887,2902]],2891:[[2887,2878]],2892:[[2887,2903]],2893:[,9],2908:[[2849,2876],512],2909:[[2850,2876],512],2962:[,,{3031:2964}],2964:[[2962,3031]],3014:[,,{3006:3018,3031:3020}],3015:[,,{3006:3019}],3018:[[3014,3006]],3019:[[3015,3006]],3020:[[3014,3031]],3021:[,9]},
3072:{3142:[,,{3158:3144}],3144:[[3142,3158]],3149:[,9],3157:[,84],3158:[,91],3260:[,7],3263:[,,{3285:3264}],3264:[[3263,3285]],3270:[,,{3266:3274,3285:3271,3286:3272}],3271:[[3270,3285]],3272:[[3270,3286]],3274:[[3270,3266],,{3285:3275}],3275:[[3274,3285]],3277:[,9]},
3328:{3398:[,,{3390:3402,3415:3404}],3399:[,,{3390:3403}],3402:[[3398,3390]],3403:[[3399,3390]],3404:[[3398,3415]],3405:[,9],3530:[,9],3545:[,,{3530:3546,3535:3548,3551:3550}],3546:[[3545,3530]],3548:[[3545,3535],,{3530:3549}],3549:[[3548,3530]],3550:[[3545,3551]]},
3584:{3635:[[3661,3634],256],3640:[,103],3641:[,103],3642:[,9],3656:[,107],3657:[,107],3658:[,107],3659:[,107],3763:[[3789,3762],256],3768:[,118],3769:[,118],3784:[,122],3785:[,122],3786:[,122],3787:[,122],3804:[[3755,3737],256],3805:[[3755,3745],256]},
3840:{3852:[[3851],256],3864:[,220],3865:[,220],3893:[,220],3895:[,220],3897:[,216],3907:[[3906,4023],512],3917:[[3916,4023],512],3922:[[3921,4023],512],3927:[[3926,4023],512],3932:[[3931,4023],512],3945:[[3904,4021],512],3953:[,129],3954:[,130],3955:[[3953,3954],512],3956:[,132],3957:[[3953,3956],512],3958:[[4018,3968],512],3959:[[4018,3969],256],3960:[[4019,3968],512],3961:[[4019,3969],256],3962:[,130],3963:[,130],3964:[,130],3965:[,130],3968:[,130],3969:[[3953,3968],512],3970:[,230],3971:[,230],3972:[,9],3974:[,230],3975:[,230],3987:[[3986,4023],512],3997:[[3996,4023],512],4002:[[4001,4023],512],4007:[[4006,4023],512],4012:[[4011,4023],512],4025:[[3984,4021],512],4038:[,220]},
4096:{4133:[,,{4142:4134}],4134:[[4133,4142]],4151:[,7],4153:[,9],4154:[,9],4237:[,220],4348:[[4316],256],69702:[,9],69759:[,9],69785:[,,{69818:69786}],69786:[[69785,69818]],69787:[,,{69818:69788}],69788:[[69787,69818]],69797:[,,{69818:69803}],69803:[[69797,69818]],69817:[,9],69818:[,7]},
4352:{69888:[,230],69889:[,230],69890:[,230],69934:[[69937,69927]],69935:[[69938,69927]],69937:[,,{69927:69934}],69938:[,,{69927:69935}],69939:[,9],69940:[,9],70003:[,7],70080:[,9]},
4608:{70197:[,9],70198:[,7],70377:[,7],70378:[,9]},
4864:{4957:[,230],4958:[,230],4959:[,230],70460:[,7],70471:[,,{70462:70475,70487:70476}],70475:[[70471,70462]],70476:[[70471,70487]],70477:[,9],70502:[,230],70503:[,230],70504:[,230],70505:[,230],70506:[,230],70507:[,230],70508:[,230],70512:[,230],70513:[,230],70514:[,230],70515:[,230],70516:[,230]},
5120:{70841:[,,{70832:70844,70842:70843,70845:70846}],70843:[[70841,70842]],70844:[[70841,70832]],70846:[[70841,70845]],70850:[,9],70851:[,7]},
5376:{71096:[,,{71087:71098}],71097:[,,{71087:71099}],71098:[[71096,71087]],71099:[[71097,71087]],71103:[,9],71104:[,7]},
5632:{71231:[,9],71350:[,9],71351:[,7]},
5888:{5908:[,9],5940:[,9],6098:[,9],6109:[,230]},
6144:{6313:[,228]},
6400:{6457:[,222],6458:[,230],6459:[,220]},
6656:{6679:[,230],6680:[,220],6752:[,9],6773:[,230],6774:[,230],6775:[,230],6776:[,230],6777:[,230],6778:[,230],6779:[,230],6780:[,230],6783:[,220],6832:[,230],6833:[,230],6834:[,230],6835:[,230],6836:[,230],6837:[,220],6838:[,220],6839:[,220],6840:[,220],6841:[,220],6842:[,220],6843:[,230],6844:[,230],6845:[,220]},
6912:{6917:[,,{6965:6918}],6918:[[6917,6965]],6919:[,,{6965:6920}],6920:[[6919,6965]],6921:[,,{6965:6922}],6922:[[6921,6965]],6923:[,,{6965:6924}],6924:[[6923,6965]],6925:[,,{6965:6926}],6926:[[6925,6965]],6929:[,,{6965:6930}],6930:[[6929,6965]],6964:[,7],6970:[,,{6965:6971}],6971:[[6970,6965]],6972:[,,{6965:6973}],6973:[[6972,6965]],6974:[,,{6965:6976}],6975:[,,{6965:6977}],6976:[[6974,6965]],6977:[[6975,6965]],6978:[,,{6965:6979}],6979:[[6978,6965]],6980:[,9],7019:[,230],7020:[,220],7021:[,230],7022:[,230],7023:[,230],7024:[,230],7025:[,230],7026:[,230],7027:[,230],7082:[,9],7083:[,9],7142:[,7],7154:[,9],7155:[,9]},
7168:{7223:[,7],7376:[,230],7377:[,230],7378:[,230],7380:[,1],7381:[,220],7382:[,220],7383:[,220],7384:[,220],7385:[,220],7386:[,230],7387:[,230],7388:[,220],7389:[,220],7390:[,220],7391:[,220],7392:[,230],7394:[,1],7395:[,1],7396:[,1],7397:[,1],7398:[,1],7399:[,1],7400:[,1],7405:[,220],7412:[,230],7416:[,230],7417:[,230]},
7424:{7468:[[65],256],7469:[[198],256],7470:[[66],256],7472:[[68],256],7473:[[69],256],7474:[[398],256],7475:[[71],256],7476:[[72],256],7477:[[73],256],7478:[[74],256],7479:[[75],256],7480:[[76],256],7481:[[77],256],7482:[[78],256],7484:[[79],256],7485:[[546],256],7486:[[80],256],7487:[[82],256],7488:[[84],256],7489:[[85],256],7490:[[87],256],7491:[[97],256],7492:[[592],256],7493:[[593],256],7494:[[7426],256],7495:[[98],256],7496:[[100],256],7497:[[101],256],7498:[[601],256],7499:[[603],256],7500:[[604],256],7501:[[103],256],7503:[[107],256],7504:[[109],256],7505:[[331],256],7506:[[111],256],7507:[[596],256],7508:[[7446],256],7509:[[7447],256],7510:[[112],256],7511:[[116],256],7512:[[117],256],7513:[[7453],256],7514:[[623],256],7515:[[118],256],7516:[[7461],256],7517:[[946],256],7518:[[947],256],7519:[[948],256],7520:[[966],256],7521:[[967],256],7522:[[105],256],7523:[[114],256],7524:[[117],256],7525:[[118],256],7526:[[946],256],7527:[[947],256],7528:[[961],256],7529:[[966],256],7530:[[967],256],7544:[[1085],256],7579:[[594],256],7580:[[99],256],7581:[[597],256],7582:[[240],256],7583:[[604],256],7584:[[102],256],7585:[[607],256],7586:[[609],256],7587:[[613],256],7588:[[616],256],7589:[[617],256],7590:[[618],256],7591:[[7547],256],7592:[[669],256],7593:[[621],256],7594:[[7557],256],7595:[[671],256],7596:[[625],256],7597:[[624],256],7598:[[626],256],7599:[[627],256],7600:[[628],256],7601:[[629],256],7602:[[632],256],7603:[[642],256],7604:[[643],256],7605:[[427],256],7606:[[649],256],7607:[[650],256],7608:[[7452],256],7609:[[651],256],7610:[[652],256],7611:[[122],256],7612:[[656],256],7613:[[657],256],7614:[[658],256],7615:[[952],256],7616:[,230],7617:[,230],7618:[,220],7619:[,230],7620:[,230],7621:[,230],7622:[,230],7623:[,230],7624:[,230],7625:[,230],7626:[,220],7627:[,230],7628:[,230],7629:[,234],7630:[,214],7631:[,220],7632:[,202],7633:[,230],7634:[,230],7635:[,230],7636:[,230],7637:[,230],7638:[,230],7639:[,230],7640:[,230],7641:[,230],7642:[,230],7643:[,230],7644:[,230],7645:[,230],7646:[,230],7647:[,230],7648:[,230],7649:[,230],7650:[,230],7651:[,230],7652:[,230],7653:[,230],7654:[,230],7655:[,230],7656:[,230],7657:[,230],7658:[,230],7659:[,230],7660:[,230],7661:[,230],7662:[,230],7663:[,230],7664:[,230],7665:[,230],7666:[,230],7667:[,230],7668:[,230],7669:[,230],7676:[,233],7677:[,220],7678:[,230],7679:[,220]},
7680:{7680:[[65,805]],7681:[[97,805]],7682:[[66,775]],7683:[[98,775]],7684:[[66,803]],7685:[[98,803]],7686:[[66,817]],7687:[[98,817]],7688:[[199,769]],7689:[[231,769]],7690:[[68,775]],7691:[[100,775]],7692:[[68,803]],7693:[[100,803]],7694:[[68,817]],7695:[[100,817]],7696:[[68,807]],7697:[[100,807]],7698:[[68,813]],7699:[[100,813]],7700:[[274,768]],7701:[[275,768]],7702:[[274,769]],7703:[[275,769]],7704:[[69,813]],7705:[[101,813]],7706:[[69,816]],7707:[[101,816]],7708:[[552,774]],7709:[[553,774]],7710:[[70,775]],7711:[[102,775]],7712:[[71,772]],7713:[[103,772]],7714:[[72,775]],7715:[[104,775]],7716:[[72,803]],7717:[[104,803]],7718:[[72,776]],7719:[[104,776]],7720:[[72,807]],7721:[[104,807]],7722:[[72,814]],7723:[[104,814]],7724:[[73,816]],7725:[[105,816]],7726:[[207,769]],7727:[[239,769]],7728:[[75,769]],7729:[[107,769]],7730:[[75,803]],7731:[[107,803]],7732:[[75,817]],7733:[[107,817]],7734:[[76,803],,{772:7736}],7735:[[108,803],,{772:7737}],7736:[[7734,772]],7737:[[7735,772]],7738:[[76,817]],7739:[[108,817]],7740:[[76,813]],7741:[[108,813]],7742:[[77,769]],7743:[[109,769]],7744:[[77,775]],7745:[[109,775]],7746:[[77,803]],7747:[[109,803]],7748:[[78,775]],7749:[[110,775]],7750:[[78,803]],7751:[[110,803]],7752:[[78,817]],7753:[[110,817]],7754:[[78,813]],7755:[[110,813]],7756:[[213,769]],7757:[[245,769]],7758:[[213,776]],7759:[[245,776]],7760:[[332,768]],7761:[[333,768]],7762:[[332,769]],7763:[[333,769]],7764:[[80,769]],7765:[[112,769]],7766:[[80,775]],7767:[[112,775]],7768:[[82,775]],7769:[[114,775]],7770:[[82,803],,{772:7772}],7771:[[114,803],,{772:7773}],7772:[[7770,772]],7773:[[7771,772]],7774:[[82,817]],7775:[[114,817]],7776:[[83,775]],7777:[[115,775]],7778:[[83,803],,{775:7784}],7779:[[115,803],,{775:7785}],7780:[[346,775]],7781:[[347,775]],7782:[[352,775]],7783:[[353,775]],7784:[[7778,775]],7785:[[7779,775]],7786:[[84,775]],7787:[[116,775]],7788:[[84,803]],7789:[[116,803]],7790:[[84,817]],7791:[[116,817]],7792:[[84,813]],7793:[[116,813]],7794:[[85,804]],7795:[[117,804]],7796:[[85,816]],7797:[[117,816]],7798:[[85,813]],7799:[[117,813]],7800:[[360,769]],7801:[[361,769]],7802:[[362,776]],7803:[[363,776]],7804:[[86,771]],7805:[[118,771]],7806:[[86,803]],7807:[[118,803]],7808:[[87,768]],7809:[[119,768]],7810:[[87,769]],7811:[[119,769]],7812:[[87,776]],7813:[[119,776]],7814:[[87,775]],7815:[[119,775]],7816:[[87,803]],7817:[[119,803]],7818:[[88,775]],7819:[[120,775]],7820:[[88,776]],7821:[[120,776]],7822:[[89,775]],7823:[[121,775]],7824:[[90,770]],7825:[[122,770]],7826:[[90,803]],7827:[[122,803]],7828:[[90,817]],7829:[[122,817]],7830:[[104,817]],7831:[[116,776]],7832:[[119,778]],7833:[[121,778]],7834:[[97,702],256],7835:[[383,775]],7840:[[65,803],,{770:7852,774:7862}],7841:[[97,803],,{770:7853,774:7863}],7842:[[65,777]],7843:[[97,777]],7844:[[194,769]],7845:[[226,769]],7846:[[194,768]],7847:[[226,768]],7848:[[194,777]],7849:[[226,777]],7850:[[194,771]],7851:[[226,771]],7852:[[7840,770]],7853:[[7841,770]],7854:[[258,769]],7855:[[259,769]],7856:[[258,768]],7857:[[259,768]],7858:[[258,777]],7859:[[259,777]],7860:[[258,771]],7861:[[259,771]],7862:[[7840,774]],7863:[[7841,774]],7864:[[69,803],,{770:7878}],7865:[[101,803],,{770:7879}],7866:[[69,777]],7867:[[101,777]],7868:[[69,771]],7869:[[101,771]],7870:[[202,769]],7871:[[234,769]],7872:[[202,768]],7873:[[234,768]],7874:[[202,777]],7875:[[234,777]],7876:[[202,771]],7877:[[234,771]],7878:[[7864,770]],7879:[[7865,770]],7880:[[73,777]],7881:[[105,777]],7882:[[73,803]],7883:[[105,803]],7884:[[79,803],,{770:7896}],7885:[[111,803],,{770:7897}],7886:[[79,777]],7887:[[111,777]],7888:[[212,769]],7889:[[244,769]],7890:[[212,768]],7891:[[244,768]],7892:[[212,777]],7893:[[244,777]],7894:[[212,771]],7895:[[244,771]],7896:[[7884,770]],7897:[[7885,770]],7898:[[416,769]],7899:[[417,769]],7900:[[416,768]],7901:[[417,768]],7902:[[416,777]],7903:[[417,777]],7904:[[416,771]],7905:[[417,771]],7906:[[416,803]],7907:[[417,803]],7908:[[85,803]],7909:[[117,803]],7910:[[85,777]],7911:[[117,777]],7912:[[431,769]],7913:[[432,769]],7914:[[431,768]],7915:[[432,768]],7916:[[431,777]],7917:[[432,777]],7918:[[
7936:{7936:[[945,787],,{768:7938,769:7940,834:7942,837:8064}],7937:[[945,788],,{768:7939,769:7941,834:7943,837:8065}],7938:[[7936,768],,{837:8066}],7939:[[7937,768],,{837:8067}],7940:[[7936,769],,{837:8068}],7941:[[7937,769],,{837:8069}],7942:[[7936,834],,{837:8070}],7943:[[7937,834],,{837:8071}],7944:[[913,787],,{768:7946,769:7948,834:7950,837:8072}],7945:[[913,788],,{768:7947,769:7949,834:7951,837:8073}],7946:[[7944,768],,{837:8074}],7947:[[7945,768],,{837:8075}],7948:[[7944,769],,{837:8076}],7949:[[7945,769],,{837:8077}],7950:[[7944,834],,{837:8078}],7951:[[7945,834],,{837:8079}],7952:[[949,787],,{768:7954,769:7956}],7953:[[949,788],,{768:7955,769:7957}],7954:[[7952,768]],7955:[[7953,768]],7956:[[7952,769]],7957:[[7953,769]],7960:[[917,787],,{768:7962,769:7964}],7961:[[917,788],,{768:7963,769:7965}],7962:[[7960,768]],7963:[[7961,768]],7964:[[7960,769]],7965:[[7961,769]],7968:[[951,787],,{768:7970,769:7972,834:7974,837:8080}],7969:[[951,788],,{768:7971,769:7973,834:7975,837:8081}],7970:[[7968,768],,{837:8082}],7971:[[7969,768],,{837:8083}],7972:[[7968,769],,{837:8084}],7973:[[7969,769],,{837:8085}],7974:[[7968,834],,{837:8086}],7975:[[7969,834],,{837:8087}],7976:[[919,787],,{768:7978,769:7980,834:7982,837:8088}],7977:[[919,788],,{768:7979,769:7981,834:7983,837:8089}],7978:[[7976,768],,{837:8090}],7979:[[7977,768],,{837:8091}],7980:[[7976,769],,{837:8092}],7981:[[7977,769],,{837:8093}],7982:[[7976,834],,{837:8094}],7983:[[7977,834],,{837:8095}],7984:[[953,787],,{768:7986,769:7988,834:7990}],7985:[[953,788],,{768:7987,769:7989,834:7991}],7986:[[7984,768]],7987:[[7985,768]],7988:[[7984,769]],7989:[[7985,769]],7990:[[7984,834]],7991:[[7985,834]],7992:[[921,787],,{768:7994,769:7996,834:7998}],7993:[[921,788],,{768:7995,769:7997,834:7999}],7994:[[7992,768]],7995:[[7993,768]],7996:[[7992,769]],7997:[[7993,769]],7998:[[7992,834]],7999:[[7993,834]],8000:[[959,787],,{768:8002,769:8004}],8001:[[959,788],,{768:8003,769:8005}],8002:[[8000,768]],8003:[[8001,768]],8004:[[8000,769]],8005:[[8001,769]],8008:[[927,787],,{768:8010,769:8012}],8009:[[927,788],,{768:8011,769:8013}],8010:[[8008,768]],8011:[[8009,768]],8012:[[8008,769]],8013:[[8009,769]],8016:[[965,787],,{768:8018,769:8020,834:8022}],8017:[[965,788],,{768:8019,769:8021,834:8023}],8018:[[8016,768]],8019:[[8017,768]],8020:[[8016,769]],8021:[[8017,769]],8022:[[8016,834]],8023:[[8017,834]],8025:[[933,788],,{768:8027,769:8029,834:8031}],8027:[[8025,768]],8029:[[8025,769]],8031:[[8025,834]],8032:[[969,787],,{768:8034,769:8036,834:8038,837:8096}],8033:[[969,788],,{768:8035,769:8037,834:8039,837:8097}],8034:[[8032,768],,{837:8098}],8035:[[8033,768],,{837:8099}],8036:[[8032,769],,{837:8100}],8037:[[8033,769],,{837:8101}],8038:[[8032,834],,{837:8102}],8039:[[8033,834],,{837:8103}],8040:[[937,787],,{768:8042,769:8044,834:8046,837:8104}],8041:[[937,788],,{768:8043,769:8045,834:8047,837:8105}],8042:[[8040,768],,{837:8106}],8043:[[8041,768],,{837:8107}],8044:[[8040,769],,{837:8108}],8045:[[8041,769],,{837:8109}],8046:[[8040,834],,{837:8110}],8047:[[8041,834],,{837:8111}],8048:[[945,768],,{837:8114}],8049:[[940]],8050:[[949,768]],8051:[[941]],8052:[[951,768],,{837:8130}],8053:[[942]],8054:[[953,768]],8055:[[943]],8056:[[959,768]],8057:[[972]],8058:[[965,768]],8059:[[973]],8060:[[969,768],,{837:8178}],8061:[[974]],8064:[[7936,837]],8065:[[7937,837]],8066:[[7938,837]],8067:[[7939,837]],8068:[[7940,837]],8069:[[7941,837]],8070:[[7942,837]],8071:[[7943,837]],8072:[[7944,837]],8073:[[7945,837]],8074:[[7946,837]],8075:[[7947,837]],8076:[[7948,837]],8077:[[7949,837]],8078:[[7950,837]],8079:[[7951,837]],8080:[[7968,837]],8081:[[7969,837]],8082:[[7970,837]],8083:[[7971,837]],8084:[[7972,837]],8085:[[7973,837]],8086:[[7974,837]],8087:[[7975,837]],8088:[[7976,837]],8089:[[7977,837]],8090:[[7978,837]],8091:[[7979,837]],8092:[[7980,837]],8093:[[7981,837]],8094:[[7982,837]],8095:[[7983,837]],8096:[[8032,837]],8097:[[8033,837]],8098:[[8034,837]],8099:[[8035,837]],8100:[[8036,837]],8101:[[8037,837]],8102:[[8038,837]],8103:[[8039,837]],8104:[[8040,837]],8105:[[8041,837]],8106:[[8042,837]],8107:[[8043,837]]
8192:{8192:[[8194]],8193:[[8195]],8194:[[32],256],8195:[[32],256],8196:[[32],256],8197:[[32],256],8198:[[32],256],8199:[[32],256],8200:[[32],256],8201:[[32],256],8202:[[32],256],8209:[[8208],256],8215:[[32,819],256],8228:[[46],256],8229:[[46,46],256],8230:[[46,46,46],256],8239:[[32],256],8243:[[8242,8242],256],8244:[[8242,8242,8242],256],8246:[[8245,8245],256],8247:[[8245,8245,8245],256],8252:[[33,33],256],8254:[[32,773],256],8263:[[63,63],256],8264:[[63,33],256],8265:[[33,63],256],8279:[[8242,8242,8242,8242],256],8287:[[32],256],8304:[[48],256],8305:[[105],256],8308:[[52],256],8309:[[53],256],8310:[[54],256],8311:[[55],256],8312:[[56],256],8313:[[57],256],8314:[[43],256],8315:[[8722],256],8316:[[61],256],8317:[[40],256],8318:[[41],256],8319:[[110],256],8320:[[48],256],8321:[[49],256],8322:[[50],256],8323:[[51],256],8324:[[52],256],8325:[[53],256],8326:[[54],256],8327:[[55],256],8328:[[56],256],8329:[[57],256],8330:[[43],256],8331:[[8722],256],8332:[[61],256],8333:[[40],256],8334:[[41],256],8336:[[97],256],8337:[[101],256],8338:[[111],256],8339:[[120],256],8340:[[601],256],8341:[[104],256],8342:[[107],256],8343:[[108],256],8344:[[109],256],8345:[[110],256],8346:[[112],256],8347:[[115],256],8348:[[116],256],8360:[[82,115],256],8400:[,230],8401:[,230],8402:[,1],8403:[,1],8404:[,230],8405:[,230],8406:[,230],8407:[,230],8408:[,1],8409:[,1],8410:[,1],8411:[,230],8412:[,230],8417:[,230],8421:[,1],8422:[,1],8423:[,230],8424:[,220],8425:[,230],8426:[,1],8427:[,1],8428:[,220],8429:[,220],8430:[,220],8431:[,220],8432:[,230]},
8448:{8448:[[97,47,99],256],8449:[[97,47,115],256],8450:[[67],256],8451:[[176,67],256],8453:[[99,47,111],256],8454:[[99,47,117],256],8455:[[400],256],8457:[[176,70],256],8458:[[103],256],8459:[[72],256],8460:[[72],256],8461:[[72],256],8462:[[104],256],8463:[[295],256],8464:[[73],256],8465:[[73],256],8466:[[76],256],8467:[[108],256],8469:[[78],256],8470:[[78,111],256],8473:[[80],256],8474:[[81],256],8475:[[82],256],8476:[[82],256],8477:[[82],256],8480:[[83,77],256],8481:[[84,69,76],256],8482:[[84,77],256],8484:[[90],256],8486:[[937]],8488:[[90],256],8490:[[75]],8491:[[197]],8492:[[66],256],8493:[[67],256],8495:[[101],256],8496:[[69],256],8497:[[70],256],8499:[[77],256],8500:[[111],256],8501:[[1488],256],8502:[[1489],256],8503:[[1490],256],8504:[[1491],256],8505:[[105],256],8507:[[70,65,88],256],8508:[[960],256],8509:[[947],256],8510:[[915],256],8511:[[928],256],8512:[[8721],256],8517:[[68],256],8518:[[100],256],8519:[[101],256],8520:[[105],256],8521:[[106],256],8528:[[49,8260,55],256],8529:[[49,8260,57],256],8530:[[49,8260,49,48],256],8531:[[49,8260,51],256],8532:[[50,8260,51],256],8533:[[49,8260,53],256],8534:[[50,8260,53],256],8535:[[51,8260,53],256],8536:[[52,8260,53],256],8537:[[49,8260,54],256],8538:[[53,8260,54],256],8539:[[49,8260,56],256],8540:[[51,8260,56],256],8541:[[53,8260,56],256],8542:[[55,8260,56],256],8543:[[49,8260],256],8544:[[73],256],8545:[[73,73],256],8546:[[73,73,73],256],8547:[[73,86],256],8548:[[86],256],8549:[[86,73],256],8550:[[86,73,73],256],8551:[[86,73,73,73],256],8552:[[73,88],256],8553:[[88],256],8554:[[88,73],256],8555:[[88,73,73],256],8556:[[76],256],8557:[[67],256],8558:[[68],256],8559:[[77],256],8560:[[105],256],8561:[[105,105],256],8562:[[105,105,105],256],8563:[[105,118],256],8564:[[118],256],8565:[[118,105],256],8566:[[118,105,105],256],8567:[[118,105,105,105],256],8568:[[105,120],256],8569:[[120],256],8570:[[120,105],256],8571:[[120,105,105],256],8572:[[108],256],8573:[[99],256],8574:[[100],256],8575:[[109],256],8585:[[48,8260,51],256],8592:[,,{824:8602}],8594:[,,{824:8603}],8596:[,,{824:8622}],8602:[[8592,824]],8603:[[8594,824]],8622:[[8596,824]],8653:[[8656,824]],8654:[[8660,824]],8655:[[8658,824]],8656:[,,{824:8653}],8658:[,,{824:8655}],8660:[,,{824:8654}]},
8704:{8707:[,,{824:8708}],8708:[[8707,824]],8712:[,,{824:8713}],8713:[[8712,824]],8715:[,,{824:8716}],8716:[[8715,824]],8739:[,,{824:8740}],8740:[[8739,824]],8741:[,,{824:8742}],8742:[[8741,824]],8748:[[8747,8747],256],8749:[[8747,8747,8747],256],8751:[[8750,8750],256],8752:[[8750,8750,8750],256],8764:[,,{824:8769}],8769:[[8764,824]],8771:[,,{824:8772}],8772:[[8771,824]],8773:[,,{824:8775}],8775:[[8773,824]],8776:[,,{824:8777}],8777:[[8776,824]],8781:[,,{824:8813}],8800:[[61,824]],8801:[,,{824:8802}],8802:[[8801,824]],8804:[,,{824:8816}],8805:[,,{824:8817}],8813:[[8781,824]],8814:[[60,824]],8815:[[62,824]],8816:[[8804,824]],8817:[[8805,824]],8818:[,,{824:8820}],8819:[,,{824:8821}],8820:[[8818,824]],8821:[[8819,824]],8822:[,,{824:8824}],8823:[,,{824:8825}],8824:[[8822,824]],8825:[[8823,824]],8826:[,,{824:8832}],8827:[,,{824:8833}],8828:[,,{824:8928}],8829:[,,{824:8929}],8832:[[8826,824]],8833:[[8827,824]],8834:[,,{824:8836}],8835:[,,{824:8837}],8836:[[8834,824]],8837:[[8835,824]],8838:[,,{824:8840}],8839:[,,{824:8841}],8840:[[8838,824]],8841:[[8839,824]],8849:[,,{824:8930}],8850:[,,{824:8931}],8866:[,,{824:8876}],8872:[,,{824:8877}],8873:[,,{824:8878}],8875:[,,{824:8879}],8876:[[8866,824]],8877:[[8872,824]],8878:[[8873,824]],8879:[[8875,824]],8882:[,,{824:8938}],8883:[,,{824:8939}],8884:[,,{824:8940}],8885:[,,{824:8941}],8928:[[8828,824]],8929:[[8829,824]],8930:[[8849,824]],8931:[[8850,824]],8938:[[8882,824]],8939:[[8883,824]],8940:[[8884,824]],8941:[[8885,824]]},
8960:{9001:[[12296]],9002:[[12297]]},
9216:{9312:[[49],256],9313:[[50],256],9314:[[51],256],9315:[[52],256],9316:[[53],256],9317:[[54],256],9318:[[55],256],9319:[[56],256],9320:[[57],256],9321:[[49,48],256],9322:[[49,49],256],9323:[[49,50],256],9324:[[49,51],256],9325:[[49,52],256],9326:[[49,53],256],9327:[[49,54],256],9328:[[49,55],256],9329:[[49,56],256],9330:[[49,57],256],9331:[[50,48],256],9332:[[40,49,41],256],9333:[[40,50,41],256],9334:[[40,51,41],256],9335:[[40,52,41],256],9336:[[40,53,41],256],9337:[[40,54,41],256],9338:[[40,55,41],256],9339:[[40,56,41],256],9340:[[40,57,41],256],9341:[[40,49,48,41],256],9342:[[40,49,49,41],256],9343:[[40,49,50,41],256],9344:[[40,49,51,41],256],9345:[[40,49,52,41],256],9346:[[40,49,53,41],256],9347:[[40,49,54,41],256],9348:[[40,49,55,41],256],9349:[[40,49,56,41],256],9350:[[40,49,57,41],256],9351:[[40,50,48,41],256],9352:[[49,46],256],9353:[[50,46],256],9354:[[51,46],256],9355:[[52,46],256],9356:[[53,46],256],9357:[[54,46],256],9358:[[55,46],256],9359:[[56,46],256],9360:[[57,46],256],9361:[[49,48,46],256],9362:[[49,49,46],256],9363:[[49,50,46],256],9364:[[49,51,46],256],9365:[[49,52,46],256],9366:[[49,53,46],256],9367:[[49,54,46],256],9368:[[49,55,46],256],9369:[[49,56,46],256],9370:[[49,57,46],256],9371:[[50,48,46],256],9372:[[40,97,41],256],9373:[[40,98,41],256],9374:[[40,99,41],256],9375:[[40,100,41],256],9376:[[40,101,41],256],9377:[[40,102,41],256],9378:[[40,103,41],256],9379:[[40,104,41],256],9380:[[40,105,41],256],9381:[[40,106,41],256],9382:[[40,107,41],256],9383:[[40,108,41],256],9384:[[40,109,41],256],9385:[[40,110,41],256],9386:[[40,111,41],256],9387:[[40,112,41],256],9388:[[40,113,41],256],9389:[[40,114,41],256],9390:[[40,115,41],256],9391:[[40,116,41],256],9392:[[40,117,41],256],9393:[[40,118,41],256],9394:[[40,119,41],256],9395:[[40,120,41],256],9396:[[40,121,41],256],9397:[[40,122,41],256],9398:[[65],256],9399:[[66],256],9400:[[67],256],9401:[[68],256],9402:[[69],256],9403:[[70],256],9404:[[71],256],9405:[[72],256],9406:[[73],256],9407:[[74],256],9408:[[75],256],9409:[[76],256],9410:[[77],256],9411:[[78],256],9412:[[79],256],9413:[[80],256],9414:[[81],256],9415:[[82],256],9416:[[83],256],9417:[[84],256],9418:[[85],256],9419:[[86],256],9420:[[87],256],9421:[[88],256],9422:[[89],256],9423:[[90],256],9424:[[97],256],9425:[[98],256],9426:[[99],256],9427:[[100],256],9428:[[101],256],9429:[[102],256],9430:[[103],256],9431:[[104],256],9432:[[105],256],9433:[[106],256],9434:[[107],256],9435:[[108],256],9436:[[109],256],9437:[[110],256],9438:[[111],256],9439:[[112],256],9440:[[113],256],9441:[[114],256],9442:[[115],256],9443:[[116],256],9444:[[117],256],9445:[[118],256],9446:[[119],256],9447:[[120],256],9448:[[121],256],9449:[[122],256],9450:[[48],256]},
10752:{10764:[[8747,8747,8747,8747],256],10868:[[58,58,61],256],10869:[[61,61],256],10870:[[61,61,61],256],10972:[[10973,824],512]},
11264:{11388:[[106],256],11389:[[86],256],11503:[,230],11504:[,230],11505:[,230]},
11520:{11631:[[11617],256],11647:[,9],11744:[,230],11745:[,230],11746:[,230],11747:[,230],11748:[,230],11749:[,230],11750:[,230],11751:[,230],11752:[,230],11753:[,230],11754:[,230],11755:[,230],11756:[,230],11757:[,230],11758:[,230],11759:[,230],11760:[,230],11761:[,230],11762:[,230],11763:[,230],11764:[,230],11765:[,230],11766:[,230],11767:[,230],11768:[,230],11769:[,230],11770:[,230],11771:[,230],11772:[,230],11773:[,230],11774:[,230],11775:[,230]},
11776:{11935:[[27597],256],12019:[[40863],256]},
12032:{12032:[[19968],256],12033:[[20008],256],12034:[[20022],256],12035:[[20031],256],12036:[[20057],256],12037:[[20101],256],12038:[[20108],256],12039:[[20128],256],12040:[[20154],256],12041:[[20799],256],12042:[[20837],256],12043:[[20843],256],12044:[[20866],256],12045:[[20886],256],12046:[[20907],256],12047:[[20960],256],12048:[[20981],256],12049:[[20992],256],12050:[[21147],256],12051:[[21241],256],12052:[[21269],256],12053:[[21274],256],12054:[[21304],256],12055:[[21313],256],12056:[[21340],256],12057:[[21353],256],12058:[[21378],256],12059:[[21430],256],12060:[[21448],256],12061:[[21475],256],12062:[[22231],256],12063:[[22303],256],12064:[[22763],256],12065:[[22786],256],12066:[[22794],256],12067:[[22805],256],12068:[[22823],256],12069:[[22899],256],12070:[[23376],256],12071:[[23424],256],12072:[[23544],256],12073:[[23567],256],12074:[[23586],256],12075:[[23608],256],12076:[[23662],256],12077:[[23665],256],12078:[[24027],256],12079:[[24037],256],12080:[[24049],256],12081:[[24062],256],12082:[[24178],256],12083:[[24186],256],12084:[[24191],256],12085:[[24308],256],12086:[[24318],256],12087:[[24331],256],12088:[[24339],256],12089:[[24400],256],12090:[[24417],256],12091:[[24435],256],12092:[[24515],256],12093:[[25096],256],12094:[[25142],256],12095:[[25163],256],12096:[[25903],256],12097:[[25908],256],12098:[[25991],256],12099:[[26007],256],12100:[[26020],256],12101:[[26041],256],12102:[[26080],256],12103:[[26085],256],12104:[[26352],256],12105:[[26376],256],12106:[[26408],256],12107:[[27424],256],12108:[[27490],256],12109:[[27513],256],12110:[[27571],256],12111:[[27595],256],12112:[[27604],256],12113:[[27611],256],12114:[[27663],256],12115:[[27668],256],12116:[[27700],256],12117:[[28779],256],12118:[[29226],256],12119:[[29238],256],12120:[[29243],256],12121:[[29247],256],12122:[[29255],256],12123:[[29273],256],12124:[[29275],256],12125:[[29356],256],12126:[[29572],256],12127:[[29577],256],12128:[[29916],256],12129:[[29926],256],12130:[[29976],256],12131:[[29983],256],12132:[[29992],256],12133:[[30000],256],12134:[[30091],256],12135:[[30098],256],12136:[[30326],256],12137:[[30333],256],12138:[[30382],256],12139:[[30399],256],12140:[[30446],256],12141:[[30683],256],12142:[[30690],256],12143:[[30707],256],12144:[[31034],256],12145:[[31160],256],12146:[[31166],256],12147:[[31348],256],12148:[[31435],256],12149:[[31481],256],12150:[[31859],256],12151:[[31992],256],12152:[[32566],256],12153:[[32593],256],12154:[[32650],256],12155:[[32701],256],12156:[[32769],256],12157:[[32780],256],12158:[[32786],256],12159:[[32819],256],12160:[[32895],256],12161:[[32905],256],12162:[[33251],256],12163:[[33258],256],12164:[[33267],256],12165:[[33276],256],12166:[[33292],256],12167:[[33307],256],12168:[[33311],256],12169:[[33390],256],12170:[[33394],256],12171:[[33400],256],12172:[[34381],256],12173:[[34411],256],12174:[[34880],256],12175:[[34892],256],12176:[[34915],256],12177:[[35198],256],12178:[[35211],256],12179:[[35282],256],12180:[[35328],256],12181:[[35895],256],12182:[[35910],256],12183:[[35925],256],12184:[[35960],256],12185:[[35997],256],12186:[[36196],256],12187:[[36208],256],12188:[[36275],256],12189:[[36523],256],12190:[[36554],256],12191:[[36763],256],12192:[[36784],256],12193:[[36789],256],12194:[[37009],256],12195:[[37193],256],12196:[[37318],256],12197:[[37324],256],12198:[[37329],256],12199:[[38263],256],12200:[[38272],256],12201:[[38428],256],12202:[[38582],256],12203:[[38585],256],12204:[[38632],256],12205:[[38737],256],12206:[[38750],256],12207:[[38754],256],12208:[[38761],256],12209:[[38859],256],12210:[[38893],256],12211:[[38899],256],12212:[[38913],256],12213:[[39080],256],12214:[[39131],256],12215:[[39135],256],12216:[[39318],256],12217:[[39321],256],12218:[[39340],256],12219:[[39592],256],12220:[[39640],256],12221:[[39647],256],12222:[[39717],256],12223:[[39727],256],12224:[[39730],256],12225:[[39740],256],12226:[[39770],256],12227:[[40165],256],12228:[[40565],256],12229:[[40575],256],12230:[[40613],256],12231:[[40635],256],12232:[[40643],256],12233:[[40653],256],12234:[[40657],256],12235:[[40697],256],12236:[
12288:{12288:[[32],256],12330:[,218],12331:[,228],12332:[,232],12333:[,222],12334:[,224],12335:[,224],12342:[[12306],256],12344:[[21313],256],12345:[[21316],256],12346:[[21317],256],12358:[,,{12441:12436}],12363:[,,{12441:12364}],12364:[[12363,12441]],12365:[,,{12441:12366}],12366:[[12365,12441]],12367:[,,{12441:12368}],12368:[[12367,12441]],12369:[,,{12441:12370}],12370:[[12369,12441]],12371:[,,{12441:12372}],12372:[[12371,12441]],12373:[,,{12441:12374}],12374:[[12373,12441]],12375:[,,{12441:12376}],12376:[[12375,12441]],12377:[,,{12441:12378}],12378:[[12377,12441]],12379:[,,{12441:12380}],12380:[[12379,12441]],12381:[,,{12441:12382}],12382:[[12381,12441]],12383:[,,{12441:12384}],12384:[[12383,12441]],12385:[,,{12441:12386}],12386:[[12385,12441]],12388:[,,{12441:12389}],12389:[[12388,12441]],12390:[,,{12441:12391}],12391:[[12390,12441]],12392:[,,{12441:12393}],12393:[[12392,12441]],12399:[,,{12441:12400,12442:12401}],12400:[[12399,12441]],12401:[[12399,12442]],12402:[,,{12441:12403,12442:12404}],12403:[[12402,12441]],12404:[[12402,12442]],12405:[,,{12441:12406,12442:12407}],12406:[[12405,12441]],12407:[[12405,12442]],12408:[,,{12441:12409,12442:12410}],12409:[[12408,12441]],12410:[[12408,12442]],12411:[,,{12441:12412,12442:12413}],12412:[[12411,12441]],12413:[[12411,12442]],12436:[[12358,12441]],12441:[,8],12442:[,8],12443:[[32,12441],256],12444:[[32,12442],256],12445:[,,{12441:12446}],12446:[[12445,12441]],12447:[[12424,12426],256],12454:[,,{12441:12532}],12459:[,,{12441:12460}],12460:[[12459,12441]],12461:[,,{12441:12462}],12462:[[12461,12441]],12463:[,,{12441:12464}],12464:[[12463,12441]],12465:[,,{12441:12466}],12466:[[12465,12441]],12467:[,,{12441:12468}],12468:[[12467,12441]],12469:[,,{12441:12470}],12470:[[12469,12441]],12471:[,,{12441:12472}],12472:[[12471,12441]],12473:[,,{12441:12474}],12474:[[12473,12441]],12475:[,,{12441:12476}],12476:[[12475,12441]],12477:[,,{12441:12478}],12478:[[12477,12441]],12479:[,,{12441:12480}],12480:[[12479,12441]],12481:[,,{12441:12482}],12482:[[12481,12441]],12484:[,,{12441:12485}],12485:[[12484,12441]],12486:[,,{12441:12487}],12487:[[12486,12441]],12488:[,,{12441:12489}],12489:[[12488,12441]],12495:[,,{12441:12496,12442:12497}],12496:[[12495,12441]],12497:[[12495,12442]],12498:[,,{12441:12499,12442:12500}],12499:[[12498,12441]],12500:[[12498,12442]],12501:[,,{12441:12502,12442:12503}],12502:[[12501,12441]],12503:[[12501,12442]],12504:[,,{12441:12505,12442:12506}],12505:[[12504,12441]],12506:[[12504,12442]],12507:[,,{12441:12508,12442:12509}],12508:[[12507,12441]],12509:[[12507,12442]],12527:[,,{12441:12535}],12528:[,,{12441:12536}],12529:[,,{12441:12537}],12530:[,,{12441:12538}],12532:[[12454,12441]],12535:[[12527,12441]],12536:[[12528,12441]],12537:[[12529,12441]],12538:[[12530,12441]],12541:[,,{12441:12542}],12542:[[12541,12441]],12543:[[12467,12488],256]},
12544:{12593:[[4352],256],12594:[[4353],256],12595:[[4522],256],12596:[[4354],256],12597:[[4524],256],12598:[[4525],256],12599:[[4355],256],12600:[[4356],256],12601:[[4357],256],12602:[[4528],256],12603:[[4529],256],12604:[[4530],256],12605:[[4531],256],12606:[[4532],256],12607:[[4533],256],12608:[[4378],256],12609:[[4358],256],12610:[[4359],256],12611:[[4360],256],12612:[[4385],256],12613:[[4361],256],12614:[[4362],256],12615:[[4363],256],12616:[[4364],256],12617:[[4365],256],12618:[[4366],256],12619:[[4367],256],12620:[[4368],256],12621:[[4369],256],12622:[[4370],256],12623:[[4449],256],12624:[[4450],256],12625:[[4451],256],12626:[[4452],256],12627:[[4453],256],12628:[[4454],256],12629:[[4455],256],12630:[[4456],256],12631:[[4457],256],12632:[[4458],256],12633:[[4459],256],12634:[[4460],256],12635:[[4461],256],12636:[[4462],256],12637:[[4463],256],12638:[[4464],256],12639:[[4465],256],12640:[[4466],256],12641:[[4467],256],12642:[[4468],256],12643:[[4469],256],12644:[[4448],256],12645:[[4372],256],12646:[[4373],256],12647:[[4551],256],12648:[[4552],256],12649:[[4556],256],12650:[[4558],256],12651:[[4563],256],12652:[[4567],256],12653:[[4569],256],12654:[[4380],256],12655:[[4573],256],12656:[[4575],256],12657:[[4381],256],12658:[[4382],256],12659:[[4384],256],12660:[[4386],256],12661:[[4387],256],12662:[[4391],256],12663:[[4393],256],12664:[[4395],256],12665:[[4396],256],12666:[[4397],256],12667:[[4398],256],12668:[[4399],256],12669:[[4402],256],12670:[[4406],256],12671:[[4416],256],12672:[[4423],256],12673:[[4428],256],12674:[[4593],256],12675:[[4594],256],12676:[[4439],256],12677:[[4440],256],12678:[[4441],256],12679:[[4484],256],12680:[[4485],256],12681:[[4488],256],12682:[[4497],256],12683:[[4498],256],12684:[[4500],256],12685:[[4510],256],12686:[[4513],256],12690:[[19968],256],12691:[[20108],256],12692:[[19977],256],12693:[[22235],256],12694:[[19978],256],12695:[[20013],256],12696:[[19979],256],12697:[[30002],256],12698:[[20057],256],12699:[[19993],256],12700:[[19969],256],12701:[[22825],256],12702:[[22320],256],12703:[[20154],256]},
12800:{12800:[[40,4352,41],256],12801:[[40,4354,41],256],12802:[[40,4355,41],256],12803:[[40,4357,41],256],12804:[[40,4358,41],256],12805:[[40,4359,41],256],12806:[[40,4361,41],256],12807:[[40,4363,41],256],12808:[[40,4364,41],256],12809:[[40,4366,41],256],12810:[[40,4367,41],256],12811:[[40,4368,41],256],12812:[[40,4369,41],256],12813:[[40,4370,41],256],12814:[[40,4352,4449,41],256],12815:[[40,4354,4449,41],256],12816:[[40,4355,4449,41],256],12817:[[40,4357,4449,41],256],12818:[[40,4358,4449,41],256],12819:[[40,4359,4449,41],256],12820:[[40,4361,4449,41],256],12821:[[40,4363,4449,41],256],12822:[[40,4364,4449,41],256],12823:[[40,4366,4449,41],256],12824:[[40,4367,4449,41],256],12825:[[40,4368,4449,41],256],12826:[[40,4369,4449,41],256],12827:[[40,4370,4449,41],256],12828:[[40,4364,4462,41],256],12829:[[40,4363,4457,4364,4453,4523,41],256],12830:[[40,4363,4457,4370,4462,41],256],12832:[[40,19968,41],256],12833:[[40,20108,41],256],12834:[[40,19977,41],256],12835:[[40,22235,41],256],12836:[[40,20116,41],256],12837:[[40,20845,41],256],12838:[[40,19971,41],256],12839:[[40,20843,41],256],12840:[[40,20061,41],256],12841:[[40,21313,41],256],12842:[[40,26376,41],256],12843:[[40,28779,41],256],12844:[[40,27700,41],256],12845:[[40,26408,41],256],12846:[[40,37329,41],256],12847:[[40,22303,41],256],12848:[[40,26085,41],256],12849:[[40,26666,41],256],12850:[[40,26377,41],256],12851:[[40,31038,41],256],12852:[[40,21517,41],256],12853:[[40,29305,41],256],12854:[[40,36001,41],256],12855:[[40,31069,41],256],12856:[[40,21172,41],256],12857:[[40,20195,41],256],12858:[[40,21628,41],256],12859:[[40,23398,41],256],12860:[[40,30435,41],256],12861:[[40,20225,41],256],12862:[[40,36039,41],256],12863:[[40,21332,41],256],12864:[[40,31085,41],256],12865:[[40,20241,41],256],12866:[[40,33258,41],256],12867:[[40,33267,41],256],12868:[[21839],256],12869:[[24188],256],12870:[[25991],256],12871:[[31631],256],12880:[[80,84,69],256],12881:[[50,49],256],12882:[[50,50],256],12883:[[50,51],256],12884:[[50,52],256],12885:[[50,53],256],12886:[[50,54],256],12887:[[50,55],256],12888:[[50,56],256],12889:[[50,57],256],12890:[[51,48],256],12891:[[51,49],256],12892:[[51,50],256],12893:[[51,51],256],12894:[[51,52],256],12895:[[51,53],256],12896:[[4352],256],12897:[[4354],256],12898:[[4355],256],12899:[[4357],256],12900:[[4358],256],12901:[[4359],256],12902:[[4361],256],12903:[[4363],256],12904:[[4364],256],12905:[[4366],256],12906:[[4367],256],12907:[[4368],256],12908:[[4369],256],12909:[[4370],256],12910:[[4352,4449],256],12911:[[4354,4449],256],12912:[[4355,4449],256],12913:[[4357,4449],256],12914:[[4358,4449],256],12915:[[4359,4449],256],12916:[[4361,4449],256],12917:[[4363,4449],256],12918:[[4364,4449],256],12919:[[4366,4449],256],12920:[[4367,4449],256],12921:[[4368,4449],256],12922:[[4369,4449],256],12923:[[4370,4449],256],12924:[[4366,4449,4535,4352,4457],256],12925:[[4364,4462,4363,4468],256],12926:[[4363,4462],256],12928:[[19968],256],12929:[[20108],256],12930:[[19977],256],12931:[[22235],256],12932:[[20116],256],12933:[[20845],256],12934:[[19971],256],12935:[[20843],256],12936:[[20061],256],12937:[[21313],256],12938:[[26376],256],12939:[[28779],256],12940:[[27700],256],12941:[[26408],256],12942:[[37329],256],12943:[[22303],256],12944:[[26085],256],12945:[[26666],256],12946:[[26377],256],12947:[[31038],256],12948:[[21517],256],12949:[[29305],256],12950:[[36001],256],12951:[[31069],256],12952:[[21172],256],12953:[[31192],256],12954:[[30007],256],12955:[[22899],256],12956:[[36969],256],12957:[[20778],256],12958:[[21360],256],12959:[[27880],256],12960:[[38917],256],12961:[[20241],256],12962:[[20889],256],12963:[[27491],256],12964:[[19978],256],12965:[[20013],256],12966:[[19979],256],12967:[[24038],256],12968:[[21491],256],12969:[[21307],256],12970:[[23447],256],12971:[[23398],256],12972:[[30435],256],12973:[[20225],256],12974:[[36039],256],12975:[[21332],256],12976:[[22812],256],12977:[[51,54],256],12978:[[51,55],256],12979:[[51,56],256],12980:[[51,57],256],12981:[[52,48],256],12982:[[52,49],256],12983:[[52,50],256],12984:[[52,51],256],12985:[[52,52],256],1298
13056:{13056:[[12450,12497,12540,12488],256],13057:[[12450,12523,12501,12449],256],13058:[[12450,12531,12506,12450],256],13059:[[12450,12540,12523],256],13060:[[12452,12491,12531,12464],256],13061:[[12452,12531,12481],256],13062:[[12454,12457,12531],256],13063:[[12456,12473,12463,12540,12489],256],13064:[[12456,12540,12459,12540],256],13065:[[12458,12531,12473],256],13066:[[12458,12540,12512],256],13067:[[12459,12452,12522],256],13068:[[12459,12521,12483,12488],256],13069:[[12459,12525,12522,12540],256],13070:[[12460,12525,12531],256],13071:[[12460,12531,12510],256],13072:[[12462,12460],256],13073:[[12462,12491,12540],256],13074:[[12461,12517,12522,12540],256],13075:[[12462,12523,12480,12540],256],13076:[[12461,12525],256],13077:[[12461,12525,12464,12521,12512],256],13078:[[12461,12525,12513,12540,12488,12523],256],13079:[[12461,12525,12527,12483,12488],256],13080:[[12464,12521,12512],256],13081:[[12464,12521,12512,12488,12531],256],13082:[[12463,12523,12476,12452,12525],256],13083:[[12463,12525,12540,12493],256],13084:[[12465,12540,12473],256],13085:[[12467,12523,12490],256],13086:[[12467,12540,12509],256],13087:[[12469,12452,12463,12523],256],13088:[[12469,12531,12481,12540,12512],256],13089:[[12471,12522,12531,12464],256],13090:[[12475,12531,12481],256],13091:[[12475,12531,12488],256],13092:[[12480,12540,12473],256],13093:[[12487,12471],256],13094:[[12489,12523],256],13095:[[12488,12531],256],13096:[[12490,12494],256],13097:[[12494,12483,12488],256],13098:[[12495,12452,12484],256],13099:[[12497,12540,12475,12531,12488],256],13100:[[12497,12540,12484],256],13101:[[12496,12540,12524,12523],256],13102:[[12500,12450,12473,12488,12523],256],13103:[[12500,12463,12523],256],13104:[[12500,12467],256],13105:[[12499,12523],256],13106:[[12501,12449,12521,12483,12489],256],13107:[[12501,12451,12540,12488],256],13108:[[12502,12483,12471,12455,12523],256],13109:[[12501,12521,12531],256],13110:[[12504,12463,12479,12540,12523],256],13111:[[12506,12477],256],13112:[[12506,12491,12498],256],13113:[[12504,12523,12484],256],13114:[[12506,12531,12473],256],13115:[[12506,12540,12472],256],13116:[[12505,12540,12479],256],13117:[[12509,12452,12531,12488],256],13118:[[12508,12523,12488],256],13119:[[12507,12531],256],13120:[[12509,12531,12489],256],13121:[[12507,12540,12523],256],13122:[[12507,12540,12531],256],13123:[[12510,12452,12463,12525],256],13124:[[12510,12452,12523],256],13125:[[12510,12483,12495],256],13126:[[12510,12523,12463],256],13127:[[12510,12531,12471,12519,12531],256],13128:[[12511,12463,12525,12531],256],13129:[[12511,12522],256],13130:[[12511,12522,12496,12540,12523],256],13131:[[12513,12460],256],13132:[[12513,12460,12488,12531],256],13133:[[12513,12540,12488,12523],256],13134:[[12516,12540,12489],256],13135:[[12516,12540,12523],256],13136:[[12518,12450,12531],256],13137:[[12522,12483,12488,12523],256],13138:[[12522,12521],256],13139:[[12523,12500,12540],256],13140:[[12523,12540,12502,12523],256],13141:[[12524,12512],256],13142:[[12524,12531,12488,12466,12531],256],13143:[[12527,12483,12488],256],13144:[[48,28857],256],13145:[[49,28857],256],13146:[[50,28857],256],13147:[[51,28857],256],13148:[[52,28857],256],13149:[[53,28857],256],13150:[[54,28857],256],13151:[[55,28857],256],13152:[[56,28857],256],13153:[[57,28857],256],13154:[[49,48,28857],256],13155:[[49,49,28857],256],13156:[[49,50,28857],256],13157:[[49,51,28857],256],13158:[[49,52,28857],256],13159:[[49,53,28857],256],13160:[[49,54,28857],256],13161:[[49,55,28857],256],13162:[[49,56,28857],256],13163:[[49,57,28857],256],13164:[[50,48,28857],256],13165:[[50,49,28857],256],13166:[[50,50,28857],256],13167:[[50,51,28857],256],13168:[[50,52,28857],256],13169:[[104,80,97],256],13170:[[100,97],256],13171:[[65,85],256],13172:[[98,97,114],256],13173:[[111,86],256],13174:[[112,99],256],13175:[[100,109],256],13176:[[100,109,178],256],13177:[[100,109,179],256],13178:[[73,85],256],13179:[[24179,25104],256],13180:[[26157,21644],256],13181:[[22823,27491],256],13182:[[26126,27835],256],13183:[[26666,24335,20250,31038],256],13184:[[112,65],256],13185:[[110,65],256],13186:[[956,65
27136:{92912:[,1],92913:[,1],92914:[,1],92915:[,1],92916:[,1]},
27392:{92976:[,230],92977:[,230],92978:[,230],92979:[,230],92980:[,230],92981:[,230],92982:[,230]},
42496:{42607:[,230],42612:[,230],42613:[,230],42614:[,230],42615:[,230],42616:[,230],42617:[,230],42618:[,230],42619:[,230],42620:[,230],42621:[,230],42652:[[1098],256],42653:[[1100],256],42655:[,230],42736:[,230],42737:[,230]},
42752:{42864:[[42863],256],43000:[[294],256],43001:[[339],256]},
43008:{43014:[,9],43204:[,9],43232:[,230],43233:[,230],43234:[,230],43235:[,230],43236:[,230],43237:[,230],43238:[,230],43239:[,230],43240:[,230],43241:[,230],43242:[,230],43243:[,230],43244:[,230],43245:[,230],43246:[,230],43247:[,230],43248:[,230],43249:[,230]},
43264:{43307:[,220],43308:[,220],43309:[,220],43347:[,9],43443:[,7],43456:[,9]},
43520:{43696:[,230],43698:[,230],43699:[,230],43700:[,220],43703:[,230],43704:[,230],43710:[,230],43711:[,230],43713:[,230],43766:[,9]},
43776:{43868:[[42791],256],43869:[[43831],256],43870:[[619],256],43871:[[43858],256],44013:[,9]},
48128:{113822:[,1]},
53504:{119134:[[119127,119141],512],119135:[[119128,119141],512],119136:[[119135,119150],512],119137:[[119135,119151],512],119138:[[119135,119152],512],119139:[[119135,119153],512],119140:[[119135,119154],512],119141:[,216],119142:[,216],119143:[,1],119144:[,1],119145:[,1],119149:[,226],119150:[,216],119151:[,216],119152:[,216],119153:[,216],119154:[,216],119163:[,220],119164:[,220],119165:[,220],119166:[,220],119167:[,220],119168:[,220],119169:[,220],119170:[,220],119173:[,230],119174:[,230],119175:[,230],119176:[,230],119177:[,230],119178:[,220],119179:[,220],119210:[,230],119211:[,230],119212:[,230],119213:[,230],119227:[[119225,119141],512],119228:[[119226,119141],512],119229:[[119227,119150],512],119230:[[119228,119150],512],119231:[[119227,119151],512],119232:[[119228,119151],512]},
53760:{119362:[,230],119363:[,230],119364:[,230]},
54272:{119808:[[65],256],119809:[[66],256],119810:[[67],256],119811:[[68],256],119812:[[69],256],119813:[[70],256],119814:[[71],256],119815:[[72],256],119816:[[73],256],119817:[[74],256],119818:[[75],256],119819:[[76],256],119820:[[77],256],119821:[[78],256],119822:[[79],256],119823:[[80],256],119824:[[81],256],119825:[[82],256],119826:[[83],256],119827:[[84],256],119828:[[85],256],119829:[[86],256],119830:[[87],256],119831:[[88],256],119832:[[89],256],119833:[[90],256],119834:[[97],256],119835:[[98],256],119836:[[99],256],119837:[[100],256],119838:[[101],256],119839:[[102],256],119840:[[103],256],119841:[[104],256],119842:[[105],256],119843:[[106],256],119844:[[107],256],119845:[[108],256],119846:[[109],256],119847:[[110],256],119848:[[111],256],119849:[[112],256],119850:[[113],256],119851:[[114],256],119852:[[115],256],119853:[[116],256],119854:[[117],256],119855:[[118],256],119856:[[119],256],119857:[[120],256],119858:[[121],256],119859:[[122],256],119860:[[65],256],119861:[[66],256],119862:[[67],256],119863:[[68],256],119864:[[69],256],119865:[[70],256],119866:[[71],256],119867:[[72],256],119868:[[73],256],119869:[[74],256],119870:[[75],256],119871:[[76],256],119872:[[77],256],119873:[[78],256],119874:[[79],256],119875:[[80],256],119876:[[81],256],119877:[[82],256],119878:[[83],256],119879:[[84],256],119880:[[85],256],119881:[[86],256],119882:[[87],256],119883:[[88],256],119884:[[89],256],119885:[[90],256],119886:[[97],256],119887:[[98],256],119888:[[99],256],119889:[[100],256],119890:[[101],256],119891:[[102],256],119892:[[103],256],119894:[[105],256],119895:[[106],256],119896:[[107],256],119897:[[108],256],119898:[[109],256],119899:[[110],256],119900:[[111],256],119901:[[112],256],119902:[[113],256],119903:[[114],256],119904:[[115],256],119905:[[116],256],119906:[[117],256],119907:[[118],256],119908:[[119],256],119909:[[120],256],119910:[[121],256],119911:[[122],256],119912:[[65],256],119913:[[66],256],119914:[[67],256],119915:[[68],256],119916:[[69],256],119917:[[70],256],119918:[[71],256],119919:[[72],256],119920:[[73],256],119921:[[74],256],119922:[[75],256],119923:[[76],256],119924:[[77],256],119925:[[78],256],119926:[[79],256],119927:[[80],256],119928:[[81],256],119929:[[82],256],119930:[[83],256],119931:[[84],256],119932:[[85],256],119933:[[86],256],119934:[[87],256],119935:[[88],256],119936:[[89],256],119937:[[90],256],119938:[[97],256],119939:[[98],256],119940:[[99],256],119941:[[100],256],119942:[[101],256],119943:[[102],256],119944:[[103],256],119945:[[104],256],119946:[[105],256],119947:[[106],256],119948:[[107],256],119949:[[108],256],119950:[[109],256],119951:[[110],256],119952:[[111],256],119953:[[112],256],119954:[[113],256],119955:[[114],256],119956:[[115],256],119957:[[116],256],119958:[[117],256],119959:[[118],256],119960:[[119],256],119961:[[120],256],119962:[[121],256],119963:[[122],256],119964:[[65],256],119966:[[67],256],119967:[[68],256],119970:[[71],256],119973:[[74],256],119974:[[75],256],119977:[[78],256],119978:[[79],256],119979:[[80],256],119980:[[81],256],119982:[[83],256],119983:[[84],256],119984:[[85],256],119985:[[86],256],119986:[[87],256],119987:[[88],256],119988:[[89],256],119989:[[90],256],119990:[[97],256],119991:[[98],256],119992:[[99],256],119993:[[100],256],119995:[[102],256],119997:[[104],256],119998:[[105],256],119999:[[106],256],120000:[[107],256],120001:[[108],256],120002:[[109],256],120003:[[110],256],120005:[[112],256],120006:[[113],256],120007:[[114],256],120008:[[115],256],120009:[[116],256],120010:[[117],256],120011:[[118],256],120012:[[119],256],120013:[[120],256],120014:[[121],256],120015:[[122],256],120016:[[65],256],120017:[[66],256],120018:[[67],256],120019:[[68],256],120020:[[69],256],120021:[[70],256],120022:[[71],256],120023:[[72],256],120024:[[73],256],120025:[[74],256],120026:[[75],256],120027:[[76],256],120028:[[77],256],120029:[[78],256],120030:[[79],256],120031:[[80],256],120032:[[81],256],120033:[[82],256],120034:[[83],256],120035:[[84],256],120036:[[85],256],120037:[[86],256],120038:[[87],256],120039:[[88],256],120040:[[89],256],120041:[[90],256],120
54528:{120064:[[119],256],120065:[[120],256],120066:[[121],256],120067:[[122],256],120068:[[65],256],120069:[[66],256],120071:[[68],256],120072:[[69],256],120073:[[70],256],120074:[[71],256],120077:[[74],256],120078:[[75],256],120079:[[76],256],120080:[[77],256],120081:[[78],256],120082:[[79],256],120083:[[80],256],120084:[[81],256],120086:[[83],256],120087:[[84],256],120088:[[85],256],120089:[[86],256],120090:[[87],256],120091:[[88],256],120092:[[89],256],120094:[[97],256],120095:[[98],256],120096:[[99],256],120097:[[100],256],120098:[[101],256],120099:[[102],256],120100:[[103],256],120101:[[104],256],120102:[[105],256],120103:[[106],256],120104:[[107],256],120105:[[108],256],120106:[[109],256],120107:[[110],256],120108:[[111],256],120109:[[112],256],120110:[[113],256],120111:[[114],256],120112:[[115],256],120113:[[116],256],120114:[[117],256],120115:[[118],256],120116:[[119],256],120117:[[120],256],120118:[[121],256],120119:[[122],256],120120:[[65],256],120121:[[66],256],120123:[[68],256],120124:[[69],256],120125:[[70],256],120126:[[71],256],120128:[[73],256],120129:[[74],256],120130:[[75],256],120131:[[76],256],120132:[[77],256],120134:[[79],256],120138:[[83],256],120139:[[84],256],120140:[[85],256],120141:[[86],256],120142:[[87],256],120143:[[88],256],120144:[[89],256],120146:[[97],256],120147:[[98],256],120148:[[99],256],120149:[[100],256],120150:[[101],256],120151:[[102],256],120152:[[103],256],120153:[[104],256],120154:[[105],256],120155:[[106],256],120156:[[107],256],120157:[[108],256],120158:[[109],256],120159:[[110],256],120160:[[111],256],120161:[[112],256],120162:[[113],256],120163:[[114],256],120164:[[115],256],120165:[[116],256],120166:[[117],256],120167:[[118],256],120168:[[119],256],120169:[[120],256],120170:[[121],256],120171:[[122],256],120172:[[65],256],120173:[[66],256],120174:[[67],256],120175:[[68],256],120176:[[69],256],120177:[[70],256],120178:[[71],256],120179:[[72],256],120180:[[73],256],120181:[[74],256],120182:[[75],256],120183:[[76],256],120184:[[77],256],120185:[[78],256],120186:[[79],256],120187:[[80],256],120188:[[81],256],120189:[[82],256],120190:[[83],256],120191:[[84],256],120192:[[85],256],120193:[[86],256],120194:[[87],256],120195:[[88],256],120196:[[89],256],120197:[[90],256],120198:[[97],256],120199:[[98],256],120200:[[99],256],120201:[[100],256],120202:[[101],256],120203:[[102],256],120204:[[103],256],120205:[[104],256],120206:[[105],256],120207:[[106],256],120208:[[107],256],120209:[[108],256],120210:[[109],256],120211:[[110],256],120212:[[111],256],120213:[[112],256],120214:[[113],256],120215:[[114],256],120216:[[115],256],120217:[[116],256],120218:[[117],256],120219:[[118],256],120220:[[119],256],120221:[[120],256],120222:[[121],256],120223:[[122],256],120224:[[65],256],120225:[[66],256],120226:[[67],256],120227:[[68],256],120228:[[69],256],120229:[[70],256],120230:[[71],256],120231:[[72],256],120232:[[73],256],120233:[[74],256],120234:[[75],256],120235:[[76],256],120236:[[77],256],120237:[[78],256],120238:[[79],256],120239:[[80],256],120240:[[81],256],120241:[[82],256],120242:[[83],256],120243:[[84],256],120244:[[85],256],120245:[[86],256],120246:[[87],256],120247:[[88],256],120248:[[89],256],120249:[[90],256],120250:[[97],256],120251:[[98],256],120252:[[99],256],120253:[[100],256],120254:[[101],256],120255:[[102],256],120256:[[103],256],120257:[[104],256],120258:[[105],256],120259:[[106],256],120260:[[107],256],120261:[[108],256],120262:[[109],256],120263:[[110],256],120264:[[111],256],120265:[[112],256],120266:[[113],256],120267:[[114],256],120268:[[115],256],120269:[[116],256],120270:[[117],256],120271:[[118],256],120272:[[119],256],120273:[[120],256],120274:[[121],256],120275:[[122],256],120276:[[65],256],120277:[[66],256],120278:[[67],256],120279:[[68],256],120280:[[69],256],120281:[[70],256],120282:[[71],256],120283:[[72],256],120284:[[73],256],120285:[[74],256],120286:[[75],256],120287:[[76],256],120288:[[77],256],120289:[[78],256],120290:[[79],256],120291:[[80],256],120292:[[81],256],120293:[[82],256],120294:[[83],256],120295:[[84],256],120296:[[85],256],120297:[[86],
54784:{120320:[[115],256],120321:[[116],256],120322:[[117],256],120323:[[118],256],120324:[[119],256],120325:[[120],256],120326:[[121],256],120327:[[122],256],120328:[[65],256],120329:[[66],256],120330:[[67],256],120331:[[68],256],120332:[[69],256],120333:[[70],256],120334:[[71],256],120335:[[72],256],120336:[[73],256],120337:[[74],256],120338:[[75],256],120339:[[76],256],120340:[[77],256],120341:[[78],256],120342:[[79],256],120343:[[80],256],120344:[[81],256],120345:[[82],256],120346:[[83],256],120347:[[84],256],120348:[[85],256],120349:[[86],256],120350:[[87],256],120351:[[88],256],120352:[[89],256],120353:[[90],256],120354:[[97],256],120355:[[98],256],120356:[[99],256],120357:[[100],256],120358:[[101],256],120359:[[102],256],120360:[[103],256],120361:[[104],256],120362:[[105],256],120363:[[106],256],120364:[[107],256],120365:[[108],256],120366:[[109],256],120367:[[110],256],120368:[[111],256],120369:[[112],256],120370:[[113],256],120371:[[114],256],120372:[[115],256],120373:[[116],256],120374:[[117],256],120375:[[118],256],120376:[[119],256],120377:[[120],256],120378:[[121],256],120379:[[122],256],120380:[[65],256],120381:[[66],256],120382:[[67],256],120383:[[68],256],120384:[[69],256],120385:[[70],256],120386:[[71],256],120387:[[72],256],120388:[[73],256],120389:[[74],256],120390:[[75],256],120391:[[76],256],120392:[[77],256],120393:[[78],256],120394:[[79],256],120395:[[80],256],120396:[[81],256],120397:[[82],256],120398:[[83],256],120399:[[84],256],120400:[[85],256],120401:[[86],256],120402:[[87],256],120403:[[88],256],120404:[[89],256],120405:[[90],256],120406:[[97],256],120407:[[98],256],120408:[[99],256],120409:[[100],256],120410:[[101],256],120411:[[102],256],120412:[[103],256],120413:[[104],256],120414:[[105],256],120415:[[106],256],120416:[[107],256],120417:[[108],256],120418:[[109],256],120419:[[110],256],120420:[[111],256],120421:[[112],256],120422:[[113],256],120423:[[114],256],120424:[[115],256],120425:[[116],256],120426:[[117],256],120427:[[118],256],120428:[[119],256],120429:[[120],256],120430:[[121],256],120431:[[122],256],120432:[[65],256],120433:[[66],256],120434:[[67],256],120435:[[68],256],120436:[[69],256],120437:[[70],256],120438:[[71],256],120439:[[72],256],120440:[[73],256],120441:[[74],256],120442:[[75],256],120443:[[76],256],120444:[[77],256],120445:[[78],256],120446:[[79],256],120447:[[80],256],120448:[[81],256],120449:[[82],256],120450:[[83],256],120451:[[84],256],120452:[[85],256],120453:[[86],256],120454:[[87],256],120455:[[88],256],120456:[[89],256],120457:[[90],256],120458:[[97],256],120459:[[98],256],120460:[[99],256],120461:[[100],256],120462:[[101],256],120463:[[102],256],120464:[[103],256],120465:[[104],256],120466:[[105],256],120467:[[106],256],120468:[[107],256],120469:[[108],256],120470:[[109],256],120471:[[110],256],120472:[[111],256],120473:[[112],256],120474:[[113],256],120475:[[114],256],120476:[[115],256],120477:[[116],256],120478:[[117],256],120479:[[118],256],120480:[[119],256],120481:[[120],256],120482:[[121],256],120483:[[122],256],120484:[[305],256],120485:[[567],256],120488:[[913],256],120489:[[914],256],120490:[[915],256],120491:[[916],256],120492:[[917],256],120493:[[918],256],120494:[[919],256],120495:[[920],256],120496:[[921],256],120497:[[922],256],120498:[[923],256],120499:[[924],256],120500:[[925],256],120501:[[926],256],120502:[[927],256],120503:[[928],256],120504:[[929],256],120505:[[1012],256],120506:[[931],256],120507:[[932],256],120508:[[933],256],120509:[[934],256],120510:[[935],256],120511:[[936],256],120512:[[937],256],120513:[[8711],256],120514:[[945],256],120515:[[946],256],120516:[[947],256],120517:[[948],256],120518:[[949],256],120519:[[950],256],120520:[[951],256],120521:[[952],256],120522:[[953],256],120523:[[954],256],120524:[[955],256],120525:[[956],256],120526:[[957],256],120527:[[958],256],120528:[[959],256],120529:[[960],256],120530:[[961],256],120531:[[962],256],120532:[[963],256],120533:[[964],256],120534:[[965],256],120535:[[966],256],120536:[[967],256],120537:[[968],256],120538:[[969],256],120539:[[8706],256],120540:[[1013],256],120541:[[
55040:{120576:[[949],256],120577:[[950],256],120578:[[951],256],120579:[[952],256],120580:[[953],256],120581:[[954],256],120582:[[955],256],120583:[[956],256],120584:[[957],256],120585:[[958],256],120586:[[959],256],120587:[[960],256],120588:[[961],256],120589:[[962],256],120590:[[963],256],120591:[[964],256],120592:[[965],256],120593:[[966],256],120594:[[967],256],120595:[[968],256],120596:[[969],256],120597:[[8706],256],120598:[[1013],256],120599:[[977],256],120600:[[1008],256],120601:[[981],256],120602:[[1009],256],120603:[[982],256],120604:[[913],256],120605:[[914],256],120606:[[915],256],120607:[[916],256],120608:[[917],256],120609:[[918],256],120610:[[919],256],120611:[[920],256],120612:[[921],256],120613:[[922],256],120614:[[923],256],120615:[[924],256],120616:[[925],256],120617:[[926],256],120618:[[927],256],120619:[[928],256],120620:[[929],256],120621:[[1012],256],120622:[[931],256],120623:[[932],256],120624:[[933],256],120625:[[934],256],120626:[[935],256],120627:[[936],256],120628:[[937],256],120629:[[8711],256],120630:[[945],256],120631:[[946],256],120632:[[947],256],120633:[[948],256],120634:[[949],256],120635:[[950],256],120636:[[951],256],120637:[[952],256],120638:[[953],256],120639:[[954],256],120640:[[955],256],120641:[[956],256],120642:[[957],256],120643:[[958],256],120644:[[959],256],120645:[[960],256],120646:[[961],256],120647:[[962],256],120648:[[963],256],120649:[[964],256],120650:[[965],256],120651:[[966],256],120652:[[967],256],120653:[[968],256],120654:[[969],256],120655:[[8706],256],120656:[[1013],256],120657:[[977],256],120658:[[1008],256],120659:[[981],256],120660:[[1009],256],120661:[[982],256],120662:[[913],256],120663:[[914],256],120664:[[915],256],120665:[[916],256],120666:[[917],256],120667:[[918],256],120668:[[919],256],120669:[[920],256],120670:[[921],256],120671:[[922],256],120672:[[923],256],120673:[[924],256],120674:[[925],256],120675:[[926],256],120676:[[927],256],120677:[[928],256],120678:[[929],256],120679:[[1012],256],120680:[[931],256],120681:[[932],256],120682:[[933],256],120683:[[934],256],120684:[[935],256],120685:[[936],256],120686:[[937],256],120687:[[8711],256],120688:[[945],256],120689:[[946],256],120690:[[947],256],120691:[[948],256],120692:[[949],256],120693:[[950],256],120694:[[951],256],120695:[[952],256],120696:[[953],256],120697:[[954],256],120698:[[955],256],120699:[[956],256],120700:[[957],256],120701:[[958],256],120702:[[959],256],120703:[[960],256],120704:[[961],256],120705:[[962],256],120706:[[963],256],120707:[[964],256],120708:[[965],256],120709:[[966],256],120710:[[967],256],120711:[[968],256],120712:[[969],256],120713:[[8706],256],120714:[[1013],256],120715:[[977],256],120716:[[1008],256],120717:[[981],256],120718:[[1009],256],120719:[[982],256],120720:[[913],256],120721:[[914],256],120722:[[915],256],120723:[[916],256],120724:[[917],256],120725:[[918],256],120726:[[919],256],120727:[[920],256],120728:[[921],256],120729:[[922],256],120730:[[923],256],120731:[[924],256],120732:[[925],256],120733:[[926],256],120734:[[927],256],120735:[[928],256],120736:[[929],256],120737:[[1012],256],120738:[[931],256],120739:[[932],256],120740:[[933],256],120741:[[934],256],120742:[[935],256],120743:[[936],256],120744:[[937],256],120745:[[8711],256],120746:[[945],256],120747:[[946],256],120748:[[947],256],120749:[[948],256],120750:[[949],256],120751:[[950],256],120752:[[951],256],120753:[[952],256],120754:[[953],256],120755:[[954],256],120756:[[955],256],120757:[[956],256],120758:[[957],256],120759:[[958],256],120760:[[959],256],120761:[[960],256],120762:[[961],256],120763:[[962],256],120764:[[963],256],120765:[[964],256],120766:[[965],256],120767:[[966],256],120768:[[967],256],120769:[[968],256],120770:[[969],256],120771:[[8706],256],120772:[[1013],256],120773:[[977],256],120774:[[1008],256],120775:[[981],256],120776:[[1009],256],120777:[[982],256],120778:[[988],256],120779:[[989],256],120782:[[48],256],120783:[[49],256],120784:[[50],256],120785:[[51],256],120786:[[52],256],120787:[[53],256],120788:[[54],256],120789:[[55],256],120790:[[56],256],120791:[[57],256],120792:[[
59392:{125136:[,220],125137:[,220],125138:[,220],125139:[,220],125140:[,220],125141:[,220],125142:[,220]},
60928:{126464:[[1575],256],126465:[[1576],256],126466:[[1580],256],126467:[[1583],256],126469:[[1608],256],126470:[[1586],256],126471:[[1581],256],126472:[[1591],256],126473:[[1610],256],126474:[[1603],256],126475:[[1604],256],126476:[[1605],256],126477:[[1606],256],126478:[[1587],256],126479:[[1593],256],126480:[[1601],256],126481:[[1589],256],126482:[[1602],256],126483:[[1585],256],126484:[[1588],256],126485:[[1578],256],126486:[[1579],256],126487:[[1582],256],126488:[[1584],256],126489:[[1590],256],126490:[[1592],256],126491:[[1594],256],126492:[[1646],256],126493:[[1722],256],126494:[[1697],256],126495:[[1647],256],126497:[[1576],256],126498:[[1580],256],126500:[[1607],256],126503:[[1581],256],126505:[[1610],256],126506:[[1603],256],126507:[[1604],256],126508:[[1605],256],126509:[[1606],256],126510:[[1587],256],126511:[[1593],256],126512:[[1601],256],126513:[[1589],256],126514:[[1602],256],126516:[[1588],256],126517:[[1578],256],126518:[[1579],256],126519:[[1582],256],126521:[[1590],256],126523:[[1594],256],126530:[[1580],256],126535:[[1581],256],126537:[[1610],256],126539:[[1604],256],126541:[[1606],256],126542:[[1587],256],126543:[[1593],256],126545:[[1589],256],126546:[[1602],256],126548:[[1588],256],126551:[[1582],256],126553:[[1590],256],126555:[[1594],256],126557:[[1722],256],126559:[[1647],256],126561:[[1576],256],126562:[[1580],256],126564:[[1607],256],126567:[[1581],256],126568:[[1591],256],126569:[[1610],256],126570:[[1603],256],126572:[[1605],256],126573:[[1606],256],126574:[[1587],256],126575:[[1593],256],126576:[[1601],256],126577:[[1589],256],126578:[[1602],256],126580:[[1588],256],126581:[[1578],256],126582:[[1579],256],126583:[[1582],256],126585:[[1590],256],126586:[[1592],256],126587:[[1594],256],126588:[[1646],256],126590:[[1697],256],126592:[[1575],256],126593:[[1576],256],126594:[[1580],256],126595:[[1583],256],126596:[[1607],256],126597:[[1608],256],126598:[[1586],256],126599:[[1581],256],126600:[[1591],256],126601:[[1610],256],126603:[[1604],256],126604:[[1605],256],126605:[[1606],256],126606:[[1587],256],126607:[[1593],256],126608:[[1601],256],126609:[[1589],256],126610:[[1602],256],126611:[[1585],256],126612:[[1588],256],126613:[[1578],256],126614:[[1579],256],126615:[[1582],256],126616:[[1584],256],126617:[[1590],256],126618:[[1592],256],126619:[[1594],256],126625:[[1576],256],126626:[[1580],256],126627:[[1583],256],126629:[[1608],256],126630:[[1586],256],126631:[[1581],256],126632:[[1591],256],126633:[[1610],256],126635:[[1604],256],126636:[[1605],256],126637:[[1606],256],126638:[[1587],256],126639:[[1593],256],126640:[[1601],256],126641:[[1589],256],126642:[[1602],256],126643:[[1585],256],126644:[[1588],256],126645:[[1578],256],126646:[[1579],256],126647:[[1582],256],126648:[[1584],256],126649:[[1590],256],126650:[[1592],256],126651:[[1594],256]},
61696:{127232:[[48,46],256],127233:[[48,44],256],127234:[[49,44],256],127235:[[50,44],256],127236:[[51,44],256],127237:[[52,44],256],127238:[[53,44],256],127239:[[54,44],256],127240:[[55,44],256],127241:[[56,44],256],127242:[[57,44],256],127248:[[40,65,41],256],127249:[[40,66,41],256],127250:[[40,67,41],256],127251:[[40,68,41],256],127252:[[40,69,41],256],127253:[[40,70,41],256],127254:[[40,71,41],256],127255:[[40,72,41],256],127256:[[40,73,41],256],127257:[[40,74,41],256],127258:[[40,75,41],256],127259:[[40,76,41],256],127260:[[40,77,41],256],127261:[[40,78,41],256],127262:[[40,79,41],256],127263:[[40,80,41],256],127264:[[40,81,41],256],127265:[[40,82,41],256],127266:[[40,83,41],256],127267:[[40,84,41],256],127268:[[40,85,41],256],127269:[[40,86,41],256],127270:[[40,87,41],256],127271:[[40,88,41],256],127272:[[40,89,41],256],127273:[[40,90,41],256],127274:[[12308,83,12309],256],127275:[[67],256],127276:[[82],256],127277:[[67,68],256],127278:[[87,90],256],127280:[[65],256],127281:[[66],256],127282:[[67],256],127283:[[68],256],127284:[[69],256],127285:[[70],256],127286:[[71],256],127287:[[72],256],127288:[[73],256],127289:[[74],256],127290:[[75],256],127291:[[76],256],127292:[[77],256],127293:[[78],256],127294:[[79],256],127295:[[80],256],127296:[[81],256],127297:[[82],256],127298:[[83],256],127299:[[84],256],127300:[[85],256],127301:[[86],256],127302:[[87],256],127303:[[88],256],127304:[[89],256],127305:[[90],256],127306:[[72,86],256],127307:[[77,86],256],127308:[[83,68],256],127309:[[83,83],256],127310:[[80,80,86],256],127311:[[87,67],256],127338:[[77,67],256],127339:[[77,68],256],127376:[[68,74],256]},
61952:{127488:[[12411,12363],256],127489:[[12467,12467],256],127490:[[12469],256],127504:[[25163],256],127505:[[23383],256],127506:[[21452],256],127507:[[12487],256],127508:[[20108],256],127509:[[22810],256],127510:[[35299],256],127511:[[22825],256],127512:[[20132],256],127513:[[26144],256],127514:[[28961],256],127515:[[26009],256],127516:[[21069],256],127517:[[24460],256],127518:[[20877],256],127519:[[26032],256],127520:[[21021],256],127521:[[32066],256],127522:[[29983],256],127523:[[36009],256],127524:[[22768],256],127525:[[21561],256],127526:[[28436],256],127527:[[25237],256],127528:[[25429],256],127529:[[19968],256],127530:[[19977],256],127531:[[36938],256],127532:[[24038],256],127533:[[20013],256],127534:[[21491],256],127535:[[25351],256],127536:[[36208],256],127537:[[25171],256],127538:[[31105],256],127539:[[31354],256],127540:[[21512],256],127541:[[28288],256],127542:[[26377],256],127543:[[26376],256],127544:[[30003],256],127545:[[21106],256],127546:[[21942],256],127552:[[12308,26412,12309],256],127553:[[12308,19977,12309],256],127554:[[12308,20108,12309],256],127555:[[12308,23433,12309],256],127556:[[12308,28857,12309],256],127557:[[12308,25171,12309],256],127558:[[12308,30423,12309],256],127559:[[12308,21213,12309],256],127560:[[12308,25943,12309],256],127568:[[24471],256],127569:[[21487],256]},
63488:{194560:[[20029]],194561:[[20024]],194562:[[20033]],194563:[[131362]],194564:[[20320]],194565:[[20398]],194566:[[20411]],194567:[[20482]],194568:[[20602]],194569:[[20633]],194570:[[20711]],194571:[[20687]],194572:[[13470]],194573:[[132666]],194574:[[20813]],194575:[[20820]],194576:[[20836]],194577:[[20855]],194578:[[132380]],194579:[[13497]],194580:[[20839]],194581:[[20877]],194582:[[132427]],194583:[[20887]],194584:[[20900]],194585:[[20172]],194586:[[20908]],194587:[[20917]],194588:[[168415]],194589:[[20981]],194590:[[20995]],194591:[[13535]],194592:[[21051]],194593:[[21062]],194594:[[21106]],194595:[[21111]],194596:[[13589]],194597:[[21191]],194598:[[21193]],194599:[[21220]],194600:[[21242]],194601:[[21253]],194602:[[21254]],194603:[[21271]],194604:[[21321]],194605:[[21329]],194606:[[21338]],194607:[[21363]],194608:[[21373]],194609:[[21375]],194610:[[21375]],194611:[[21375]],194612:[[133676]],194613:[[28784]],194614:[[21450]],194615:[[21471]],194616:[[133987]],194617:[[21483]],194618:[[21489]],194619:[[21510]],194620:[[21662]],194621:[[21560]],194622:[[21576]],194623:[[21608]],194624:[[21666]],194625:[[21750]],194626:[[21776]],194627:[[21843]],194628:[[21859]],194629:[[21892]],194630:[[21892]],194631:[[21913]],194632:[[21931]],194633:[[21939]],194634:[[21954]],194635:[[22294]],194636:[[22022]],194637:[[22295]],194638:[[22097]],194639:[[22132]],194640:[[20999]],194641:[[22766]],194642:[[22478]],194643:[[22516]],194644:[[22541]],194645:[[22411]],194646:[[22578]],194647:[[22577]],194648:[[22700]],194649:[[136420]],194650:[[22770]],194651:[[22775]],194652:[[22790]],194653:[[22810]],194654:[[22818]],194655:[[22882]],194656:[[136872]],194657:[[136938]],194658:[[23020]],194659:[[23067]],194660:[[23079]],194661:[[23000]],194662:[[23142]],194663:[[14062]],194664:[[14076]],194665:[[23304]],194666:[[23358]],194667:[[23358]],194668:[[137672]],194669:[[23491]],194670:[[23512]],194671:[[23527]],194672:[[23539]],194673:[[138008]],194674:[[23551]],194675:[[23558]],194676:[[24403]],194677:[[23586]],194678:[[14209]],194679:[[23648]],194680:[[23662]],194681:[[23744]],194682:[[23693]],194683:[[138724]],194684:[[23875]],194685:[[138726]],194686:[[23918]],194687:[[23915]],194688:[[23932]],194689:[[24033]],194690:[[24034]],194691:[[14383]],194692:[[24061]],194693:[[24104]],194694:[[24125]],194695:[[24169]],194696:[[14434]],194697:[[139651]],194698:[[14460]],194699:[[24240]],194700:[[24243]],194701:[[24246]],194702:[[24266]],194703:[[172946]],194704:[[24318]],194705:[[140081]],194706:[[140081]],194707:[[33281]],194708:[[24354]],194709:[[24354]],194710:[[14535]],194711:[[144056]],194712:[[156122]],194713:[[24418]],194714:[[24427]],194715:[[14563]],194716:[[24474]],194717:[[24525]],194718:[[24535]],194719:[[24569]],194720:[[24705]],194721:[[14650]],194722:[[14620]],194723:[[24724]],194724:[[141012]],194725:[[24775]],194726:[[24904]],194727:[[24908]],194728:[[24910]],194729:[[24908]],194730:[[24954]],194731:[[24974]],194732:[[25010]],194733:[[24996]],194734:[[25007]],194735:[[25054]],194736:[[25074]],194737:[[25078]],194738:[[25104]],194739:[[25115]],194740:[[25181]],194741:[[25265]],194742:[[25300]],194743:[[25424]],194744:[[142092]],194745:[[25405]],194746:[[25340]],194747:[[25448]],194748:[[25475]],194749:[[25572]],194750:[[142321]],194751:[[25634]],194752:[[25541]],194753:[[25513]],194754:[[14894]],194755:[[25705]],194756:[[25726]],194757:[[25757]],194758:[[25719]],194759:[[14956]],194760:[[25935]],194761:[[25964]],194762:[[143370]],194763:[[26083]],194764:[[26360]],194765:[[26185]],194766:[[15129]],194767:[[26257]],194768:[[15112]],194769:[[15076]],194770:[[20882]],194771:[[20885]],194772:[[26368]],194773:[[26268]],194774:[[32941]],194775:[[17369]],194776:[[26391]],194777:[[26395]],194778:[[26401]],194779:[[26462]],194780:[[26451]],194781:[[144323]],194782:[[15177]],194783:[[26618]],194784:[[26501]],194785:[[26706]],194786:[[26757]],194787:[[144493]],194788:[[26766]],194789:[[26655]],194790:[[26900]],194791:[[15261]],194792:[[26946]],194793:[[27043]],194794:[[27114]],194795:[[27304]],194796:[[145059]],194797:[[27355]],194798:[[15384
63744:{63744:[[35912]],63745:[[26356]],63746:[[36554]],63747:[[36040]],63748:[[28369]],63749:[[20018]],63750:[[21477]],63751:[[40860]],63752:[[40860]],63753:[[22865]],63754:[[37329]],63755:[[21895]],63756:[[22856]],63757:[[25078]],63758:[[30313]],63759:[[32645]],63760:[[34367]],63761:[[34746]],63762:[[35064]],63763:[[37007]],63764:[[27138]],63765:[[27931]],63766:[[28889]],63767:[[29662]],63768:[[33853]],63769:[[37226]],63770:[[39409]],63771:[[20098]],63772:[[21365]],63773:[[27396]],63774:[[29211]],63775:[[34349]],63776:[[40478]],63777:[[23888]],63778:[[28651]],63779:[[34253]],63780:[[35172]],63781:[[25289]],63782:[[33240]],63783:[[34847]],63784:[[24266]],63785:[[26391]],63786:[[28010]],63787:[[29436]],63788:[[37070]],63789:[[20358]],63790:[[20919]],63791:[[21214]],63792:[[25796]],63793:[[27347]],63794:[[29200]],63795:[[30439]],63796:[[32769]],63797:[[34310]],63798:[[34396]],63799:[[36335]],63800:[[38706]],63801:[[39791]],63802:[[40442]],63803:[[30860]],63804:[[31103]],63805:[[32160]],63806:[[33737]],63807:[[37636]],63808:[[40575]],63809:[[35542]],63810:[[22751]],63811:[[24324]],63812:[[31840]],63813:[[32894]],63814:[[29282]],63815:[[30922]],63816:[[36034]],63817:[[38647]],63818:[[22744]],63819:[[23650]],63820:[[27155]],63821:[[28122]],63822:[[28431]],63823:[[32047]],63824:[[32311]],63825:[[38475]],63826:[[21202]],63827:[[32907]],63828:[[20956]],63829:[[20940]],63830:[[31260]],63831:[[32190]],63832:[[33777]],63833:[[38517]],63834:[[35712]],63835:[[25295]],63836:[[27138]],63837:[[35582]],63838:[[20025]],63839:[[23527]],63840:[[24594]],63841:[[29575]],63842:[[30064]],63843:[[21271]],63844:[[30971]],63845:[[20415]],63846:[[24489]],63847:[[19981]],63848:[[27852]],63849:[[25976]],63850:[[32034]],63851:[[21443]],63852:[[22622]],63853:[[30465]],63854:[[33865]],63855:[[35498]],63856:[[27578]],63857:[[36784]],63858:[[27784]],63859:[[25342]],63860:[[33509]],63861:[[25504]],63862:[[30053]],63863:[[20142]],63864:[[20841]],63865:[[20937]],63866:[[26753]],63867:[[31975]],63868:[[33391]],63869:[[35538]],63870:[[37327]],63871:[[21237]],63872:[[21570]],63873:[[22899]],63874:[[24300]],63875:[[26053]],63876:[[28670]],63877:[[31018]],63878:[[38317]],63879:[[39530]],63880:[[40599]],63881:[[40654]],63882:[[21147]],63883:[[26310]],63884:[[27511]],63885:[[36706]],63886:[[24180]],63887:[[24976]],63888:[[25088]],63889:[[25754]],63890:[[28451]],63891:[[29001]],63892:[[29833]],63893:[[31178]],63894:[[32244]],63895:[[32879]],63896:[[36646]],63897:[[34030]],63898:[[36899]],63899:[[37706]],63900:[[21015]],63901:[[21155]],63902:[[21693]],63903:[[28872]],63904:[[35010]],63905:[[35498]],63906:[[24265]],63907:[[24565]],63908:[[25467]],63909:[[27566]],63910:[[31806]],63911:[[29557]],63912:[[20196]],63913:[[22265]],63914:[[23527]],63915:[[23994]],63916:[[24604]],63917:[[29618]],63918:[[29801]],63919:[[32666]],63920:[[32838]],63921:[[37428]],63922:[[38646]],63923:[[38728]],63924:[[38936]],63925:[[20363]],63926:[[31150]],63927:[[37300]],63928:[[38584]],63929:[[24801]],63930:[[20102]],63931:[[20698]],63932:[[23534]],63933:[[23615]],63934:[[26009]],63935:[[27138]],63936:[[29134]],63937:[[30274]],63938:[[34044]],63939:[[36988]],63940:[[40845]],63941:[[26248]],63942:[[38446]],63943:[[21129]],63944:[[26491]],63945:[[26611]],63946:[[27969]],63947:[[28316]],63948:[[29705]],63949:[[30041]],63950:[[30827]],63951:[[32016]],63952:[[39006]],63953:[[20845]],63954:[[25134]],63955:[[38520]],63956:[[20523]],63957:[[23833]],63958:[[28138]],63959:[[36650]],63960:[[24459]],63961:[[24900]],63962:[[26647]],63963:[[29575]],63964:[[38534]],63965:[[21033]],63966:[[21519]],63967:[[23653]],63968:[[26131]],63969:[[26446]],63970:[[26792]],63971:[[27877]],63972:[[29702]],63973:[[30178]],63974:[[32633]],63975:[[35023]],63976:[[35041]],63977:[[37324]],63978:[[38626]],63979:[[21311]],63980:[[28346]],63981:[[21533]],63982:[[29136]],63983:[[29848]],63984:[[34298]],63985:[[38563]],63986:[[40023]],63987:[[40607]],63988:[[26519]],63989:[[28107]],63990:[[33256]],63991:[[31435]],63992:[[31520]],63993:[[31890]],63994:[[29376]],63995:[[28825]],63996:[[35672]],63997:[[20160]],63998:[[33590]],63999:[
64000:{64000:[[20999]],64001:[[24230]],64002:[[25299]],64003:[[31958]],64004:[[23429]],64005:[[27934]],64006:[[26292]],64007:[[36667]],64008:[[34892]],64009:[[38477]],64010:[[35211]],64011:[[24275]],64012:[[20800]],64013:[[21952]],64016:[[22618]],64018:[[26228]],64021:[[20958]],64022:[[29482]],64023:[[30410]],64024:[[31036]],64025:[[31070]],64026:[[31077]],64027:[[31119]],64028:[[38742]],64029:[[31934]],64030:[[32701]],64032:[[34322]],64034:[[35576]],64037:[[36920]],64038:[[37117]],64042:[[39151]],64043:[[39164]],64044:[[39208]],64045:[[40372]],64046:[[37086]],64047:[[38583]],64048:[[20398]],64049:[[20711]],64050:[[20813]],64051:[[21193]],64052:[[21220]],64053:[[21329]],64054:[[21917]],64055:[[22022]],64056:[[22120]],64057:[[22592]],64058:[[22696]],64059:[[23652]],64060:[[23662]],64061:[[24724]],64062:[[24936]],64063:[[24974]],64064:[[25074]],64065:[[25935]],64066:[[26082]],64067:[[26257]],64068:[[26757]],64069:[[28023]],64070:[[28186]],64071:[[28450]],64072:[[29038]],64073:[[29227]],64074:[[29730]],64075:[[30865]],64076:[[31038]],64077:[[31049]],64078:[[31048]],64079:[[31056]],64080:[[31062]],64081:[[31069]],64082:[[31117]],64083:[[31118]],64084:[[31296]],64085:[[31361]],64086:[[31680]],64087:[[32244]],64088:[[32265]],64089:[[32321]],64090:[[32626]],64091:[[32773]],64092:[[33261]],64093:[[33401]],64094:[[33401]],64095:[[33879]],64096:[[35088]],64097:[[35222]],64098:[[35585]],64099:[[35641]],64100:[[36051]],64101:[[36104]],64102:[[36790]],64103:[[36920]],64104:[[38627]],64105:[[38911]],64106:[[38971]],64107:[[24693]],64108:[[148206]],64109:[[33304]],64112:[[20006]],64113:[[20917]],64114:[[20840]],64115:[[20352]],64116:[[20805]],64117:[[20864]],64118:[[21191]],64119:[[21242]],64120:[[21917]],64121:[[21845]],64122:[[21913]],64123:[[21986]],64124:[[22618]],64125:[[22707]],64126:[[22852]],64127:[[22868]],64128:[[23138]],64129:[[23336]],64130:[[24274]],64131:[[24281]],64132:[[24425]],64133:[[24493]],64134:[[24792]],64135:[[24910]],64136:[[24840]],64137:[[24974]],64138:[[24928]],64139:[[25074]],64140:[[25140]],64141:[[25540]],64142:[[25628]],64143:[[25682]],64144:[[25942]],64145:[[26228]],64146:[[26391]],64147:[[26395]],64148:[[26454]],64149:[[27513]],64150:[[27578]],64151:[[27969]],64152:[[28379]],64153:[[28363]],64154:[[28450]],64155:[[28702]],64156:[[29038]],64157:[[30631]],64158:[[29237]],64159:[[29359]],64160:[[29482]],64161:[[29809]],64162:[[29958]],64163:[[30011]],64164:[[30237]],64165:[[30239]],64166:[[30410]],64167:[[30427]],64168:[[30452]],64169:[[30538]],64170:[[30528]],64171:[[30924]],64172:[[31409]],64173:[[31680]],64174:[[31867]],64175:[[32091]],64176:[[32244]],64177:[[32574]],64178:[[32773]],64179:[[33618]],64180:[[33775]],64181:[[34681]],64182:[[35137]],64183:[[35206]],64184:[[35222]],64185:[[35519]],64186:[[35576]],64187:[[35531]],64188:[[35585]],64189:[[35582]],64190:[[35565]],64191:[[35641]],64192:[[35722]],64193:[[36104]],64194:[[36664]],64195:[[36978]],64196:[[37273]],64197:[[37494]],64198:[[38524]],64199:[[38627]],64200:[[38742]],64201:[[38875]],64202:[[38911]],64203:[[38923]],64204:[[38971]],64205:[[39698]],64206:[[40860]],64207:[[141386]],64208:[[141380]],64209:[[144341]],64210:[[15261]],64211:[[16408]],64212:[[16441]],64213:[[152137]],64214:[[154832]],64215:[[163539]],64216:[[40771]],64217:[[40846]],195072:[[38953]],195073:[[169398]],195074:[[39138]],195075:[[19251]],195076:[[39209]],195077:[[39335]],195078:[[39362]],195079:[[39422]],195080:[[19406]],195081:[[170800]],195082:[[39698]],195083:[[40000]],195084:[[40189]],195085:[[19662]],195086:[[19693]],195087:[[40295]],195088:[[172238]],195089:[[19704]],195090:[[172293]],195091:[[172558]],195092:[[172689]],195093:[[40635]],195094:[[19798]],195095:[[40697]],195096:[[40702]],195097:[[40709]],195098:[[40719]],195099:[[40726]],195100:[[40763]],195101:[[173568]]},
64256:{64256:[[102,102],256],64257:[[102,105],256],64258:[[102,108],256],64259:[[102,102,105],256],64260:[[102,102,108],256],64261:[[383,116],256],64262:[[115,116],256],64275:[[1396,1398],256],64276:[[1396,1381],256],64277:[[1396,1387],256],64278:[[1406,1398],256],64279:[[1396,1389],256],64285:[[1497,1460],512],64286:[,26],64287:[[1522,1463],512],64288:[[1506],256],64289:[[1488],256],64290:[[1491],256],64291:[[1492],256],64292:[[1499],256],64293:[[1500],256],64294:[[1501],256],64295:[[1512],256],64296:[[1514],256],64297:[[43],256],64298:[[1513,1473],512],64299:[[1513,1474],512],64300:[[64329,1473],512],64301:[[64329,1474],512],64302:[[1488,1463],512],64303:[[1488,1464],512],64304:[[1488,1468],512],64305:[[1489,1468],512],64306:[[1490,1468],512],64307:[[1491,1468],512],64308:[[1492,1468],512],64309:[[1493,1468],512],64310:[[1494,1468],512],64312:[[1496,1468],512],64313:[[1497,1468],512],64314:[[1498,1468],512],64315:[[1499,1468],512],64316:[[1500,1468],512],64318:[[1502,1468],512],64320:[[1504,1468],512],64321:[[1505,1468],512],64323:[[1507,1468],512],64324:[[1508,1468],512],64326:[[1510,1468],512],64327:[[1511,1468],512],64328:[[1512,1468],512],64329:[[1513,1468],512],64330:[[1514,1468],512],64331:[[1493,1465],512],64332:[[1489,1471],512],64333:[[1499,1471],512],64334:[[1508,1471],512],64335:[[1488,1500],256],64336:[[1649],256],64337:[[1649],256],64338:[[1659],256],64339:[[1659],256],64340:[[1659],256],64341:[[1659],256],64342:[[1662],256],64343:[[1662],256],64344:[[1662],256],64345:[[1662],256],64346:[[1664],256],64347:[[1664],256],64348:[[1664],256],64349:[[1664],256],64350:[[1658],256],64351:[[1658],256],64352:[[1658],256],64353:[[1658],256],64354:[[1663],256],64355:[[1663],256],64356:[[1663],256],64357:[[1663],256],64358:[[1657],256],64359:[[1657],256],64360:[[1657],256],64361:[[1657],256],64362:[[1700],256],64363:[[1700],256],64364:[[1700],256],64365:[[1700],256],64366:[[1702],256],64367:[[1702],256],64368:[[1702],256],64369:[[1702],256],64370:[[1668],256],64371:[[1668],256],64372:[[1668],256],64373:[[1668],256],64374:[[1667],256],64375:[[1667],256],64376:[[1667],256],64377:[[1667],256],64378:[[1670],256],64379:[[1670],256],64380:[[1670],256],64381:[[1670],256],64382:[[1671],256],64383:[[1671],256],64384:[[1671],256],64385:[[1671],256],64386:[[1677],256],64387:[[1677],256],64388:[[1676],256],64389:[[1676],256],64390:[[1678],256],64391:[[1678],256],64392:[[1672],256],64393:[[1672],256],64394:[[1688],256],64395:[[1688],256],64396:[[1681],256],64397:[[1681],256],64398:[[1705],256],64399:[[1705],256],64400:[[1705],256],64401:[[1705],256],64402:[[1711],256],64403:[[1711],256],64404:[[1711],256],64405:[[1711],256],64406:[[1715],256],64407:[[1715],256],64408:[[1715],256],64409:[[1715],256],64410:[[1713],256],64411:[[1713],256],64412:[[1713],256],64413:[[1713],256],64414:[[1722],256],64415:[[1722],256],64416:[[1723],256],64417:[[1723],256],64418:[[1723],256],64419:[[1723],256],64420:[[1728],256],64421:[[1728],256],64422:[[1729],256],64423:[[1729],256],64424:[[1729],256],64425:[[1729],256],64426:[[1726],256],64427:[[1726],256],64428:[[1726],256],64429:[[1726],256],64430:[[1746],256],64431:[[1746],256],64432:[[1747],256],64433:[[1747],256],64467:[[1709],256],64468:[[1709],256],64469:[[1709],256],64470:[[1709],256],64471:[[1735],256],64472:[[1735],256],64473:[[1734],256],64474:[[1734],256],64475:[[1736],256],64476:[[1736],256],64477:[[1655],256],64478:[[1739],256],64479:[[1739],256],64480:[[1733],256],64481:[[1733],256],64482:[[1737],256],64483:[[1737],256],64484:[[1744],256],64485:[[1744],256],64486:[[1744],256],64487:[[1744],256],64488:[[1609],256],64489:[[1609],256],64490:[[1574,1575],256],64491:[[1574,1575],256],64492:[[1574,1749],256],64493:[[1574,1749],256],64494:[[1574,1608],256],64495:[[1574,1608],256],64496:[[1574,1735],256],64497:[[1574,1735],256],64498:[[1574,1734],256],64499:[[1574,1734],256],64500:[[1574,1736],256],64501:[[1574,1736],256],64502:[[1574,1744],256],64503:[[1574,1744],256],64504:[[1574,1744],256],64505:[[1574,1609],256],64506:[[1574,1609],256],64507:[[1574,1609],256],64508:[[1740],256],64509:[[1740]
64512:{64512:[[1574,1580],256],64513:[[1574,1581],256],64514:[[1574,1605],256],64515:[[1574,1609],256],64516:[[1574,1610],256],64517:[[1576,1580],256],64518:[[1576,1581],256],64519:[[1576,1582],256],64520:[[1576,1605],256],64521:[[1576,1609],256],64522:[[1576,1610],256],64523:[[1578,1580],256],64524:[[1578,1581],256],64525:[[1578,1582],256],64526:[[1578,1605],256],64527:[[1578,1609],256],64528:[[1578,1610],256],64529:[[1579,1580],256],64530:[[1579,1605],256],64531:[[1579,1609],256],64532:[[1579,1610],256],64533:[[1580,1581],256],64534:[[1580,1605],256],64535:[[1581,1580],256],64536:[[1581,1605],256],64537:[[1582,1580],256],64538:[[1582,1581],256],64539:[[1582,1605],256],64540:[[1587,1580],256],64541:[[1587,1581],256],64542:[[1587,1582],256],64543:[[1587,1605],256],64544:[[1589,1581],256],64545:[[1589,1605],256],64546:[[1590,1580],256],64547:[[1590,1581],256],64548:[[1590,1582],256],64549:[[1590,1605],256],64550:[[1591,1581],256],64551:[[1591,1605],256],64552:[[1592,1605],256],64553:[[1593,1580],256],64554:[[1593,1605],256],64555:[[1594,1580],256],64556:[[1594,1605],256],64557:[[1601,1580],256],64558:[[1601,1581],256],64559:[[1601,1582],256],64560:[[1601,1605],256],64561:[[1601,1609],256],64562:[[1601,1610],256],64563:[[1602,1581],256],64564:[[1602,1605],256],64565:[[1602,1609],256],64566:[[1602,1610],256],64567:[[1603,1575],256],64568:[[1603,1580],256],64569:[[1603,1581],256],64570:[[1603,1582],256],64571:[[1603,1604],256],64572:[[1603,1605],256],64573:[[1603,1609],256],64574:[[1603,1610],256],64575:[[1604,1580],256],64576:[[1604,1581],256],64577:[[1604,1582],256],64578:[[1604,1605],256],64579:[[1604,1609],256],64580:[[1604,1610],256],64581:[[1605,1580],256],64582:[[1605,1581],256],64583:[[1605,1582],256],64584:[[1605,1605],256],64585:[[1605,1609],256],64586:[[1605,1610],256],64587:[[1606,1580],256],64588:[[1606,1581],256],64589:[[1606,1582],256],64590:[[1606,1605],256],64591:[[1606,1609],256],64592:[[1606,1610],256],64593:[[1607,1580],256],64594:[[1607,1605],256],64595:[[1607,1609],256],64596:[[1607,1610],256],64597:[[1610,1580],256],64598:[[1610,1581],256],64599:[[1610,1582],256],64600:[[1610,1605],256],64601:[[1610,1609],256],64602:[[1610,1610],256],64603:[[1584,1648],256],64604:[[1585,1648],256],64605:[[1609,1648],256],64606:[[32,1612,1617],256],64607:[[32,1613,1617],256],64608:[[32,1614,1617],256],64609:[[32,1615,1617],256],64610:[[32,1616,1617],256],64611:[[32,1617,1648],256],64612:[[1574,1585],256],64613:[[1574,1586],256],64614:[[1574,1605],256],64615:[[1574,1606],256],64616:[[1574,1609],256],64617:[[1574,1610],256],64618:[[1576,1585],256],64619:[[1576,1586],256],64620:[[1576,1605],256],64621:[[1576,1606],256],64622:[[1576,1609],256],64623:[[1576,1610],256],64624:[[1578,1585],256],64625:[[1578,1586],256],64626:[[1578,1605],256],64627:[[1578,1606],256],64628:[[1578,1609],256],64629:[[1578,1610],256],64630:[[1579,1585],256],64631:[[1579,1586],256],64632:[[1579,1605],256],64633:[[1579,1606],256],64634:[[1579,1609],256],64635:[[1579,1610],256],64636:[[1601,1609],256],64637:[[1601,1610],256],64638:[[1602,1609],256],64639:[[1602,1610],256],64640:[[1603,1575],256],64641:[[1603,1604],256],64642:[[1603,1605],256],64643:[[1603,1609],256],64644:[[1603,1610],256],64645:[[1604,1605],256],64646:[[1604,1609],256],64647:[[1604,1610],256],64648:[[1605,1575],256],64649:[[1605,1605],256],64650:[[1606,1585],256],64651:[[1606,1586],256],64652:[[1606,1605],256],64653:[[1606,1606],256],64654:[[1606,1609],256],64655:[[1606,1610],256],64656:[[1609,1648],256],64657:[[1610,1585],256],64658:[[1610,1586],256],64659:[[1610,1605],256],64660:[[1610,1606],256],64661:[[1610,1609],256],64662:[[1610,1610],256],64663:[[1574,1580],256],64664:[[1574,1581],256],64665:[[1574,1582],256],64666:[[1574,1605],256],64667:[[1574,1607],256],64668:[[1576,1580],256],64669:[[1576,1581],256],64670:[[1576,1582],256],64671:[[1576,1605],256],64672:[[1576,1607],256],64673:[[1578,1580],256],64674:[[1578,1581],256],64675:[[1578,1582],256],64676:[[1578,1605],256],64677:[[1578,1607],256],64678:[[1579,1605],256],64679:[[1580,1581],256],64680:[[1580,1605],256],64681:[[1581,
64768:{64768:[[1581,1610],256],64769:[[1580,1609],256],64770:[[1580,1610],256],64771:[[1582,1609],256],64772:[[1582,1610],256],64773:[[1589,1609],256],64774:[[1589,1610],256],64775:[[1590,1609],256],64776:[[1590,1610],256],64777:[[1588,1580],256],64778:[[1588,1581],256],64779:[[1588,1582],256],64780:[[1588,1605],256],64781:[[1588,1585],256],64782:[[1587,1585],256],64783:[[1589,1585],256],64784:[[1590,1585],256],64785:[[1591,1609],256],64786:[[1591,1610],256],64787:[[1593,1609],256],64788:[[1593,1610],256],64789:[[1594,1609],256],64790:[[1594,1610],256],64791:[[1587,1609],256],64792:[[1587,1610],256],64793:[[1588,1609],256],64794:[[1588,1610],256],64795:[[1581,1609],256],64796:[[1581,1610],256],64797:[[1580,1609],256],64798:[[1580,1610],256],64799:[[1582,1609],256],64800:[[1582,1610],256],64801:[[1589,1609],256],64802:[[1589,1610],256],64803:[[1590,1609],256],64804:[[1590,1610],256],64805:[[1588,1580],256],64806:[[1588,1581],256],64807:[[1588,1582],256],64808:[[1588,1605],256],64809:[[1588,1585],256],64810:[[1587,1585],256],64811:[[1589,1585],256],64812:[[1590,1585],256],64813:[[1588,1580],256],64814:[[1588,1581],256],64815:[[1588,1582],256],64816:[[1588,1605],256],64817:[[1587,1607],256],64818:[[1588,1607],256],64819:[[1591,1605],256],64820:[[1587,1580],256],64821:[[1587,1581],256],64822:[[1587,1582],256],64823:[[1588,1580],256],64824:[[1588,1581],256],64825:[[1588,1582],256],64826:[[1591,1605],256],64827:[[1592,1605],256],64828:[[1575,1611],256],64829:[[1575,1611],256],64848:[[1578,1580,1605],256],64849:[[1578,1581,1580],256],64850:[[1578,1581,1580],256],64851:[[1578,1581,1605],256],64852:[[1578,1582,1605],256],64853:[[1578,1605,1580],256],64854:[[1578,1605,1581],256],64855:[[1578,1605,1582],256],64856:[[1580,1605,1581],256],64857:[[1580,1605,1581],256],64858:[[1581,1605,1610],256],64859:[[1581,1605,1609],256],64860:[[1587,1581,1580],256],64861:[[1587,1580,1581],256],64862:[[1587,1580,1609],256],64863:[[1587,1605,1581],256],64864:[[1587,1605,1581],256],64865:[[1587,1605,1580],256],64866:[[1587,1605,1605],256],64867:[[1587,1605,1605],256],64868:[[1589,1581,1581],256],64869:[[1589,1581,1581],256],64870:[[1589,1605,1605],256],64871:[[1588,1581,1605],256],64872:[[1588,1581,1605],256],64873:[[1588,1580,1610],256],64874:[[1588,1605,1582],256],64875:[[1588,1605,1582],256],64876:[[1588,1605,1605],256],64877:[[1588,1605,1605],256],64878:[[1590,1581,1609],256],64879:[[1590,1582,1605],256],64880:[[1590,1582,1605],256],64881:[[1591,1605,1581],256],64882:[[1591,1605,1581],256],64883:[[1591,1605,1605],256],64884:[[1591,1605,1610],256],64885:[[1593,1580,1605],256],64886:[[1593,1605,1605],256],64887:[[1593,1605,1605],256],64888:[[1593,1605,1609],256],64889:[[1594,1605,1605],256],64890:[[1594,1605,1610],256],64891:[[1594,1605,1609],256],64892:[[1601,1582,1605],256],64893:[[1601,1582,1605],256],64894:[[1602,1605,1581],256],64895:[[1602,1605,1605],256],64896:[[1604,1581,1605],256],64897:[[1604,1581,1610],256],64898:[[1604,1581,1609],256],64899:[[1604,1580,1580],256],64900:[[1604,1580,1580],256],64901:[[1604,1582,1605],256],64902:[[1604,1582,1605],256],64903:[[1604,1605,1581],256],64904:[[1604,1605,1581],256],64905:[[1605,1581,1580],256],64906:[[1605,1581,1605],256],64907:[[1605,1581,1610],256],64908:[[1605,1580,1581],256],64909:[[1605,1580,1605],256],64910:[[1605,1582,1580],256],64911:[[1605,1582,1605],256],64914:[[1605,1580,1582],256],64915:[[1607,1605,1580],256],64916:[[1607,1605,1605],256],64917:[[1606,1581,1605],256],64918:[[1606,1581,1609],256],64919:[[1606,1580,1605],256],64920:[[1606,1580,1605],256],64921:[[1606,1580,1609],256],64922:[[1606,1605,1610],256],64923:[[1606,1605,1609],256],64924:[[1610,1605,1605],256],64925:[[1610,1605,1605],256],64926:[[1576,1582,1610],256],64927:[[1578,1580,1610],256],64928:[[1578,1580,1609],256],64929:[[1578,1582,1610],256],64930:[[1578,1582,1609],256],64931:[[1578,1605,1610],256],64932:[[1578,1605,1609],256],64933:[[1580,1605,1610],256],64934:[[1580,1581,1609],256],64935:[[1580,1605,1609],256],64936:[[1587,1582,1609],256],64937:[[1589,1581,1610],256],64938:[[1588,1581,1610],256],64939:[[1590,1581,
65024:{65040:[[44],256],65041:[[12289],256],65042:[[12290],256],65043:[[58],256],65044:[[59],256],65045:[[33],256],65046:[[63],256],65047:[[12310],256],65048:[[12311],256],65049:[[8230],256],65056:[,230],65057:[,230],65058:[,230],65059:[,230],65060:[,230],65061:[,230],65062:[,230],65063:[,220],65064:[,220],65065:[,220],65066:[,220],65067:[,220],65068:[,220],65069:[,220],65072:[[8229],256],65073:[[8212],256],65074:[[8211],256],65075:[[95],256],65076:[[95],256],65077:[[40],256],65078:[[41],256],65079:[[123],256],65080:[[125],256],65081:[[12308],256],65082:[[12309],256],65083:[[12304],256],65084:[[12305],256],65085:[[12298],256],65086:[[12299],256],65087:[[12296],256],65088:[[12297],256],65089:[[12300],256],65090:[[12301],256],65091:[[12302],256],65092:[[12303],256],65095:[[91],256],65096:[[93],256],65097:[[8254],256],65098:[[8254],256],65099:[[8254],256],65100:[[8254],256],65101:[[95],256],65102:[[95],256],65103:[[95],256],65104:[[44],256],65105:[[12289],256],65106:[[46],256],65108:[[59],256],65109:[[58],256],65110:[[63],256],65111:[[33],256],65112:[[8212],256],65113:[[40],256],65114:[[41],256],65115:[[123],256],65116:[[125],256],65117:[[12308],256],65118:[[12309],256],65119:[[35],256],65120:[[38],256],65121:[[42],256],65122:[[43],256],65123:[[45],256],65124:[[60],256],65125:[[62],256],65126:[[61],256],65128:[[92],256],65129:[[36],256],65130:[[37],256],65131:[[64],256],65136:[[32,1611],256],65137:[[1600,1611],256],65138:[[32,1612],256],65140:[[32,1613],256],65142:[[32,1614],256],65143:[[1600,1614],256],65144:[[32,1615],256],65145:[[1600,1615],256],65146:[[32,1616],256],65147:[[1600,1616],256],65148:[[32,1617],256],65149:[[1600,1617],256],65150:[[32,1618],256],65151:[[1600,1618],256],65152:[[1569],256],65153:[[1570],256],65154:[[1570],256],65155:[[1571],256],65156:[[1571],256],65157:[[1572],256],65158:[[1572],256],65159:[[1573],256],65160:[[1573],256],65161:[[1574],256],65162:[[1574],256],65163:[[1574],256],65164:[[1574],256],65165:[[1575],256],65166:[[1575],256],65167:[[1576],256],65168:[[1576],256],65169:[[1576],256],65170:[[1576],256],65171:[[1577],256],65172:[[1577],256],65173:[[1578],256],65174:[[1578],256],65175:[[1578],256],65176:[[1578],256],65177:[[1579],256],65178:[[1579],256],65179:[[1579],256],65180:[[1579],256],65181:[[1580],256],65182:[[1580],256],65183:[[1580],256],65184:[[1580],256],65185:[[1581],256],65186:[[1581],256],65187:[[1581],256],65188:[[1581],256],65189:[[1582],256],65190:[[1582],256],65191:[[1582],256],65192:[[1582],256],65193:[[1583],256],65194:[[1583],256],65195:[[1584],256],65196:[[1584],256],65197:[[1585],256],65198:[[1585],256],65199:[[1586],256],65200:[[1586],256],65201:[[1587],256],65202:[[1587],256],65203:[[1587],256],65204:[[1587],256],65205:[[1588],256],65206:[[1588],256],65207:[[1588],256],65208:[[1588],256],65209:[[1589],256],65210:[[1589],256],65211:[[1589],256],65212:[[1589],256],65213:[[1590],256],65214:[[1590],256],65215:[[1590],256],65216:[[1590],256],65217:[[1591],256],65218:[[1591],256],65219:[[1591],256],65220:[[1591],256],65221:[[1592],256],65222:[[1592],256],65223:[[1592],256],65224:[[1592],256],65225:[[1593],256],65226:[[1593],256],65227:[[1593],256],65228:[[1593],256],65229:[[1594],256],65230:[[1594],256],65231:[[1594],256],65232:[[1594],256],65233:[[1601],256],65234:[[1601],256],65235:[[1601],256],65236:[[1601],256],65237:[[1602],256],65238:[[1602],256],65239:[[1602],256],65240:[[1602],256],65241:[[1603],256],65242:[[1603],256],65243:[[1603],256],65244:[[1603],256],65245:[[1604],256],65246:[[1604],256],65247:[[1604],256],65248:[[1604],256],65249:[[1605],256],65250:[[1605],256],65251:[[1605],256],65252:[[1605],256],65253:[[1606],256],65254:[[1606],256],65255:[[1606],256],65256:[[1606],256],65257:[[1607],256],65258:[[1607],256],65259:[[1607],256],65260:[[1607],256],65261:[[1608],256],65262:[[1608],256],65263:[[1609],256],65264:[[1609],256],65265:[[1610],256],65266:[[1610],256],65267:[[1610],256],65268:[[1610],256],65269:[[1604,1570],256],65270:[[1604,1570],256],65271:[[1604,1571],256],65272:[[1604,1571],256],65273:[[1604,1573],256],65274:[[1604,1573],256],65275:[[1604,1575
65280:{65281:[[33],256],65282:[[34],256],65283:[[35],256],65284:[[36],256],65285:[[37],256],65286:[[38],256],65287:[[39],256],65288:[[40],256],65289:[[41],256],65290:[[42],256],65291:[[43],256],65292:[[44],256],65293:[[45],256],65294:[[46],256],65295:[[47],256],65296:[[48],256],65297:[[49],256],65298:[[50],256],65299:[[51],256],65300:[[52],256],65301:[[53],256],65302:[[54],256],65303:[[55],256],65304:[[56],256],65305:[[57],256],65306:[[58],256],65307:[[59],256],65308:[[60],256],65309:[[61],256],65310:[[62],256],65311:[[63],256],65312:[[64],256],65313:[[65],256],65314:[[66],256],65315:[[67],256],65316:[[68],256],65317:[[69],256],65318:[[70],256],65319:[[71],256],65320:[[72],256],65321:[[73],256],65322:[[74],256],65323:[[75],256],65324:[[76],256],65325:[[77],256],65326:[[78],256],65327:[[79],256],65328:[[80],256],65329:[[81],256],65330:[[82],256],65331:[[83],256],65332:[[84],256],65333:[[85],256],65334:[[86],256],65335:[[87],256],65336:[[88],256],65337:[[89],256],65338:[[90],256],65339:[[91],256],65340:[[92],256],65341:[[93],256],65342:[[94],256],65343:[[95],256],65344:[[96],256],65345:[[97],256],65346:[[98],256],65347:[[99],256],65348:[[100],256],65349:[[101],256],65350:[[102],256],65351:[[103],256],65352:[[104],256],65353:[[105],256],65354:[[106],256],65355:[[107],256],65356:[[108],256],65357:[[109],256],65358:[[110],256],65359:[[111],256],65360:[[112],256],65361:[[113],256],65362:[[114],256],65363:[[115],256],65364:[[116],256],65365:[[117],256],65366:[[118],256],65367:[[119],256],65368:[[120],256],65369:[[121],256],65370:[[122],256],65371:[[123],256],65372:[[124],256],65373:[[125],256],65374:[[126],256],65375:[[10629],256],65376:[[10630],256],65377:[[12290],256],65378:[[12300],256],65379:[[12301],256],65380:[[12289],256],65381:[[12539],256],65382:[[12530],256],65383:[[12449],256],65384:[[12451],256],65385:[[12453],256],65386:[[12455],256],65387:[[12457],256],65388:[[12515],256],65389:[[12517],256],65390:[[12519],256],65391:[[12483],256],65392:[[12540],256],65393:[[12450],256],65394:[[12452],256],65395:[[12454],256],65396:[[12456],256],65397:[[12458],256],65398:[[12459],256],65399:[[12461],256],65400:[[12463],256],65401:[[12465],256],65402:[[12467],256],65403:[[12469],256],65404:[[12471],256],65405:[[12473],256],65406:[[12475],256],65407:[[12477],256],65408:[[12479],256],65409:[[12481],256],65410:[[12484],256],65411:[[12486],256],65412:[[12488],256],65413:[[12490],256],65414:[[12491],256],65415:[[12492],256],65416:[[12493],256],65417:[[12494],256],65418:[[12495],256],65419:[[12498],256],65420:[[12501],256],65421:[[12504],256],65422:[[12507],256],65423:[[12510],256],65424:[[12511],256],65425:[[12512],256],65426:[[12513],256],65427:[[12514],256],65428:[[12516],256],65429:[[12518],256],65430:[[12520],256],65431:[[12521],256],65432:[[12522],256],65433:[[12523],256],65434:[[12524],256],65435:[[12525],256],65436:[[12527],256],65437:[[12531],256],65438:[[12441],256],65439:[[12442],256],65440:[[12644],256],65441:[[12593],256],65442:[[12594],256],65443:[[12595],256],65444:[[12596],256],65445:[[12597],256],65446:[[12598],256],65447:[[12599],256],65448:[[12600],256],65449:[[12601],256],65450:[[12602],256],65451:[[12603],256],65452:[[12604],256],65453:[[12605],256],65454:[[12606],256],65455:[[12607],256],65456:[[12608],256],65457:[[12609],256],65458:[[12610],256],65459:[[12611],256],65460:[[12612],256],65461:[[12613],256],65462:[[12614],256],65463:[[12615],256],65464:[[12616],256],65465:[[12617],256],65466:[[12618],256],65467:[[12619],256],65468:[[12620],256],65469:[[12621],256],65470:[[12622],256],65474:[[12623],256],65475:[[12624],256],65476:[[12625],256],65477:[[12626],256],65478:[[12627],256],65479:[[12628],256],65482:[[12629],256],65483:[[12630],256],65484:[[12631],256],65485:[[12632],256],65486:[[12633],256],65487:[[12634],256],65490:[[12635],256],65491:[[12636],256],65492:[[12637],256],65493:[[12638],256],65494:[[12639],256],65495:[[12640],256],65498:[[12641],256],65499:[[12642],256],65500:[[12643],256],65504:[[162],256],65505:[[163],256],65506:[[172],256],65507:[[175],256],65508:[[166],256],65509:[[165],256],65510:[[8361],
};
/***** Module to export */
var unorm = {
nfc: nfc,
nfd: nfd,
nfkc: nfkc,
nfkd: nfkd
};
/*globals module:true,define:true*/
// CommonJS
if (true) {
module.exports = unorm;
// AMD
} else if (typeof define === "function" && define.amd) {
define("unorm", function () {
return unorm;
});
// Global
} else {
root.unorm = unorm;
}
/***** Export as shim for String::normalize method *****/
/*
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#november_8_2013_draft_rev_21
21.1.3.12 String.prototype.normalize(form="NFC")
When the normalize method is called with one argument form, the following steps are taken:
1. Let O be CheckObjectCoercible(this value).
2. Let S be ToString(O).
3. ReturnIfAbrupt(S).
4. If form is not provided or undefined let form be "NFC".
5. Let f be ToString(form).
6. ReturnIfAbrupt(f).
7. If f is not one of "NFC", "NFD", "NFKC", or "NFKD", then throw a RangeError Exception.
8. Let ns be the String value is the result of normalizing S into the normalization form named by f as specified in Unicode Standard Annex #15, UnicodeNormalizatoin Forms.
9. Return ns.
The length property of the normalize method is 0.
*NOTE* The normalize function is intentionally generic; it does not require that its this value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.
*/
unorm.shimApplied = false;
if (!String.prototype.normalize) {
String.prototype.normalize = function(form) {
var str = "" + this;
form = form === undefined ? "NFC" : form;
if (form === "NFC") {
return unorm.nfc(str);
} else if (form === "NFD") {
return unorm.nfd(str);
} else if (form === "NFKC") {
return unorm.nfkc(str);
} else if (form === "NFKD") {
return unorm.nfkd(str);
} else {
throw new RangeError("Invalid normalization form: " + form);
}
};
unorm.shimApplied = true;
}
}(this));
/***/ }),
/* 153 */
/***/ (function(module, exports, __webpack_require__) {
/* Process inline math */
/*
Like markdown-it-simplemath, this is a stripped down, simplified version of:
https://github.com/runarberg/markdown-it-math
It differs in that it takes (a subset of) LaTeX as input and relies on KaTeX
for rendering output.
*/
/*jslint node: true */
'use strict';
var katex = __webpack_require__(154);
// Test if potential opening or closing delimieter
// Assumes that there is a "$" at state.src[pos]
function isValidDelim(state, pos) {
var prevChar, nextChar,
max = state.posMax,
can_open = true,
can_close = true;
prevChar = pos > 0 ? state.src.charCodeAt(pos - 1) : -1;
nextChar = pos + 1 <= max ? state.src.charCodeAt(pos + 1) : -1;
// Check non-whitespace conditions for opening and closing, and
// check that closing delimeter isn't followed by a number
if (prevChar === 0x20/* " " */ || prevChar === 0x09/* \t */ ||
(nextChar >= 0x30/* "0" */ && nextChar <= 0x39/* "9" */)) {
can_close = false;
}
if (nextChar === 0x20/* " " */ || nextChar === 0x09/* \t */) {
can_open = false;
}
return {
can_open: can_open,
can_close: can_close
};
}
function math_inline(state, silent) {
var start, match, token, res, pos, esc_count;
if (state.src[state.pos] !== "$") { return false; }
res = isValidDelim(state, state.pos);
if (!res.can_open) {
if (!silent) { state.pending += "$"; }
state.pos += 1;
return true;
}
// First check for and bypass all properly escaped delimieters
// This loop will assume that the first leading backtick can not
// be the first character in state.src, which is known since
// we have found an opening delimieter already.
start = state.pos + 1;
match = start;
while ( (match = state.src.indexOf("$", match)) !== -1) {
// Found potential $, look for escapes, pos will point to
// first non escape when complete
pos = match - 1;
while (state.src[pos] === "\\") { pos -= 1; }
// Even number of escapes, potential closing delimiter found
if ( ((match - pos) % 2) == 1 ) { break; }
match += 1;
}
// No closing delimter found. Consume $ and continue.
if (match === -1) {
if (!silent) { state.pending += "$"; }
state.pos = start;
return true;
}
// Check if we have empty content, ie: $$. Do not parse.
if (match - start === 0) {
if (!silent) { state.pending += "$$"; }
state.pos = start + 1;
return true;
}
// Check for valid closing delimiter
res = isValidDelim(state, match);
if (!res.can_close) {
if (!silent) { state.pending += "$"; }
state.pos = start;
return true;
}
if (!silent) {
token = state.push('math_inline', 'math', 0);
token.markup = "$";
token.content = state.src.slice(start, match);
}
state.pos = match + 1;
return true;
}
function math_block(state, start, end, silent){
var firstLine, lastLine, next, lastPos, found = false, token,
pos = state.bMarks[start] + state.tShift[start],
max = state.eMarks[start]
if(pos + 2 > max){ return false; }
if(state.src.slice(pos,pos+2)!=='$$'){ return false; }
pos += 2;
firstLine = state.src.slice(pos,max);
if(silent){ return true; }
if(firstLine.trim().slice(-2)==='$$'){
// Single line expression
firstLine = firstLine.trim().slice(0, -2);
found = true;
}
for(next = start; !found; ){
next++;
if(next >= end){ break; }
pos = state.bMarks[next]+state.tShift[next];
max = state.eMarks[next];
if(pos < max && state.tShift[next] < state.blkIndent){
// non-empty line with negative indent should stop the list:
break;
}
if(state.src.slice(pos,max).trim().slice(-2)==='$$'){
lastPos = state.src.slice(0,max).lastIndexOf('$$');
lastLine = state.src.slice(pos,lastPos);
found = true;
}
}
state.line = next + 1;
token = state.push('math_block', 'math', 0);
token.block = true;
token.content = (firstLine && firstLine.trim() ? firstLine + '\n' : '')
+ state.getLines(start + 1, next, state.tShift[start], true)
+ (lastLine && lastLine.trim() ? lastLine : '');
token.map = [ start, state.line ];
token.markup = '$$';
return true;
}
module.exports = function math_plugin(md, options) {
// Default options
options = options || {};
// set KaTeX as the renderer for markdown-it-simplemath
var katexInline = function(latex){
options.displayMode = false;
try{
return katex.renderToString(latex, options);
}
catch(error){
if(options.throwOnError){ console.log(error); }
return latex;
}
};
var inlineRenderer = function(tokens, idx){
return katexInline(tokens[idx].content);
};
var katexBlock = function(latex){
options.displayMode = true;
try{
return "<p>" + katex.renderToString(latex, options) + "</p>";
}
catch(error){
if(options.throwOnError){ console.log(error); }
return latex;
}
}
var blockRenderer = function(tokens, idx){
return katexBlock(tokens[idx].content) + '\n';
}
md.inline.ruler.after('escape', 'math_inline', math_inline);
md.block.ruler.after('blockquote', 'math_block', math_block, {
alt: [ 'paragraph', 'reference', 'blockquote', 'list' ]
});
md.renderer.rules.math_inline = inlineRenderer;
md.renderer.rules.math_block = blockRenderer;
};
/***/ }),
/* 154 */
/***/ (function(module, exports, __webpack_require__) {
/* eslint no-console:0 */
/**
* This is the main entry point for KaTeX. Here, we expose functions for
* rendering expressions either to DOM nodes or to markup strings.
*
* We also expose the ParseError class to check if errors thrown from KaTeX are
* errors in the expression, or errors in javascript handling.
*/
var ParseError = __webpack_require__(155);
var Settings = __webpack_require__(156);
var buildTree = __webpack_require__(157);
var parseTree = __webpack_require__(170);
var utils = __webpack_require__(162);
/**
* Parse and build an expression, and place that expression in the DOM node
* given.
*/
var render = function(expression, baseNode, options) {
utils.clearNode(baseNode);
var settings = new Settings(options);
var tree = parseTree(expression, settings);
var node = buildTree(tree, expression, settings).toNode();
baseNode.appendChild(node);
};
// KaTeX's styles don't work properly in quirks mode. Print out an error, and
// disable rendering.
if (typeof document !== "undefined") {
if (document.compatMode !== "CSS1Compat") {
typeof console !== "undefined" && console.warn(
"Warning: KaTeX doesn't work in quirks mode. Make sure your " +
"website has a suitable doctype.");
render = function() {
throw new ParseError("KaTeX doesn't work in quirks mode.");
};
}
}
/**
* Parse and build an expression, and return the markup for that.
*/
var renderToString = function(expression, options) {
var settings = new Settings(options);
var tree = parseTree(expression, settings);
return buildTree(tree, expression, settings).toMarkup();
};
/**
* Parse an expression and return the parse tree.
*/
var generateParseTree = function(expression, options) {
var settings = new Settings(options);
return parseTree(expression, settings);
};
module.exports = {
render: render,
renderToString: renderToString,
/**
* NOTE: This method is not currently recommended for public use.
* The internal tree representation is unstable and is very likely
* to change. Use at your own risk.
*/
__parse: generateParseTree,
ParseError: ParseError,
};
/***/ }),
/* 155 */
/***/ (function(module, exports) {
/**
* This is the ParseError class, which is the main error thrown by KaTeX
* functions when something has gone wrong. This is used to distinguish internal
* errors from errors in the expression that the user provided.
*/
function ParseError(message, lexer, position) {
var error = "KaTeX parse error: " + message;
if (lexer !== undefined && position !== undefined) {
// If we have the input and a position, make the error a bit fancier
// Prepend some information
error += " at position " + position + ": ";
// Get the input
var input = lexer._input;
// Insert a combining underscore at the correct position
input = input.slice(0, position) + "\u0332" +
input.slice(position);
// Extract some context from the input and add it to the error
var begin = Math.max(0, position - 15);
var end = position + 15;
error += input.slice(begin, end);
}
// Some hackery to make ParseError a prototype of Error
// See http://stackoverflow.com/a/8460753
var self = new Error(error);
self.name = "ParseError";
self.__proto__ = ParseError.prototype;
self.position = position;
return self;
}
// More hackery
ParseError.prototype.__proto__ = Error.prototype;
module.exports = ParseError;
/***/ }),
/* 156 */
/***/ (function(module, exports) {
/**
* This is a module for storing settings passed into KaTeX. It correctly handles
* default settings.
*/
/**
* Helper function for getting a default value if the value is undefined
*/
function get(option, defaultValue) {
return option === undefined ? defaultValue : option;
}
/**
* The main Settings object
*
* The current options stored are:
* - displayMode: Whether the expression should be typeset by default in
* textstyle or displaystyle (default false)
*/
function Settings(options) {
// allow null options
options = options || {};
this.displayMode = get(options.displayMode, false);
this.throwOnError = get(options.throwOnError, true);
this.errorColor = get(options.errorColor, "#cc0000");
}
module.exports = Settings;
/***/ }),
/* 157 */
/***/ (function(module, exports, __webpack_require__) {
var buildHTML = __webpack_require__(158);
var buildMathML = __webpack_require__(167);
var buildCommon = __webpack_require__(160);
var Options = __webpack_require__(169);
var Settings = __webpack_require__(156);
var Style = __webpack_require__(159);
var makeSpan = buildCommon.makeSpan;
var buildTree = function(tree, expression, settings) {
settings = settings || new Settings({});
var startStyle = Style.TEXT;
if (settings.displayMode) {
startStyle = Style.DISPLAY;
}
// Setup the default options
var options = new Options({
style: startStyle,
size: "size5",
});
// `buildHTML` sometimes messes with the parse tree (like turning bins ->
// ords), so we build the MathML version first.
var mathMLNode = buildMathML(tree, expression, options);
var htmlNode = buildHTML(tree, options);
var katexNode = makeSpan(["katex"], [
mathMLNode, htmlNode,
]);
if (settings.displayMode) {
return makeSpan(["katex-display"], [katexNode]);
} else {
return katexNode;
}
};
module.exports = buildTree;
/***/ }),
/* 158 */
/***/ (function(module, exports, __webpack_require__) {
/* eslint no-console:0 */
/**
* This file does the main work of building a domTree structure from a parse
* tree. The entry point is the `buildHTML` function, which takes a parse tree.
* Then, the buildExpression, buildGroup, and various groupTypes functions are
* called, to produce a final HTML tree.
*/
var ParseError = __webpack_require__(155);
var Style = __webpack_require__(159);
var buildCommon = __webpack_require__(160);
var delimiter = __webpack_require__(166);
var domTree = __webpack_require__(161);
var fontMetrics = __webpack_require__(163);
var utils = __webpack_require__(162);
var makeSpan = buildCommon.makeSpan;
/**
* Take a list of nodes, build them in order, and return a list of the built
* nodes. This function handles the `prev` node correctly, and passes the
* previous element from the list as the prev of the next element.
*/
var buildExpression = function(expression, options, prev) {
var groups = [];
for (var i = 0; i < expression.length; i++) {
var group = expression[i];
groups.push(buildGroup(group, options, prev));
prev = group;
}
return groups;
};
// List of types used by getTypeOfGroup,
// see https://github.com/Khan/KaTeX/wiki/Examining-TeX#group-types
var groupToType = {
mathord: "mord",
textord: "mord",
bin: "mbin",
rel: "mrel",
text: "mord",
open: "mopen",
close: "mclose",
inner: "minner",
genfrac: "mord",
array: "mord",
spacing: "mord",
punct: "mpunct",
ordgroup: "mord",
op: "mop",
katex: "mord",
overline: "mord",
underline: "mord",
rule: "mord",
leftright: "minner",
sqrt: "mord",
accent: "mord",
};
/**
* Gets the final math type of an expression, given its group type. This type is
* used to determine spacing between elements, and affects bin elements by
* causing them to change depending on what types are around them. This type
* must be attached to the outermost node of an element as a CSS class so that
* spacing with its surrounding elements works correctly.
*
* Some elements can be mapped one-to-one from group type to math type, and
* those are listed in the `groupToType` table.
*
* Others (usually elements that wrap around other elements) often have
* recursive definitions, and thus call `getTypeOfGroup` on their inner
* elements.
*/
var getTypeOfGroup = function(group) {
if (group == null) {
// Like when typesetting $^3$
return groupToType.mathord;
} else if (group.type === "supsub") {
return getTypeOfGroup(group.value.base);
} else if (group.type === "llap" || group.type === "rlap") {
return getTypeOfGroup(group.value);
} else if (group.type === "color") {
return getTypeOfGroup(group.value.value);
} else if (group.type === "sizing") {
return getTypeOfGroup(group.value.value);
} else if (group.type === "styling") {
return getTypeOfGroup(group.value.value);
} else if (group.type === "delimsizing") {
return groupToType[group.value.delimType];
} else {
return groupToType[group.type];
}
};
/**
* Sometimes, groups perform special rules when they have superscripts or
* subscripts attached to them. This function lets the `supsub` group know that
* its inner element should handle the superscripts and subscripts instead of
* handling them itself.
*/
var shouldHandleSupSub = function(group, options) {
if (!group) {
return false;
} else if (group.type === "op") {
// Operators handle supsubs differently when they have limits
// (e.g. `\displaystyle\sum_2^3`)
return group.value.limits &&
(options.style.size === Style.DISPLAY.size ||
group.value.alwaysHandleSupSub);
} else if (group.type === "accent") {
return isCharacterBox(group.value.base);
} else {
return null;
}
};
/**
* Sometimes we want to pull out the innermost element of a group. In most
* cases, this will just be the group itself, but when ordgroups and colors have
* a single element, we want to pull that out.
*/
var getBaseElem = function(group) {
if (!group) {
return false;
} else if (group.type === "ordgroup") {
if (group.value.length === 1) {
return getBaseElem(group.value[0]);
} else {
return group;
}
} else if (group.type === "color") {
if (group.value.value.length === 1) {
return getBaseElem(group.value.value[0]);
} else {
return group;
}
} else {
return group;
}
};
/**
* TeXbook algorithms often reference "character boxes", which are simply groups
* with a single character in them. To decide if something is a character box,
* we find its innermost group, and see if it is a single character.
*/
var isCharacterBox = function(group) {
var baseElem = getBaseElem(group);
// These are all they types of groups which hold single characters
return baseElem.type === "mathord" ||
baseElem.type === "textord" ||
baseElem.type === "bin" ||
baseElem.type === "rel" ||
baseElem.type === "inner" ||
baseElem.type === "open" ||
baseElem.type === "close" ||
baseElem.type === "punct";
};
var makeNullDelimiter = function(options) {
return makeSpan([
"sizing", "reset-" + options.size, "size5",
options.style.reset(), Style.TEXT.cls(),
"nulldelimiter",
]);
};
/**
* This is a map of group types to the function used to handle that type.
* Simpler types come at the beginning, while complicated types come afterwards.
*/
var groupTypes = {};
groupTypes.mathord = function(group, options, prev) {
return buildCommon.makeOrd(group, options, "mathord");
};
groupTypes.textord = function(group, options, prev) {
return buildCommon.makeOrd(group, options, "textord");
};
groupTypes.bin = function(group, options, prev) {
var className = "mbin";
// Pull out the most recent element. Do some special handling to find
// things at the end of a \color group. Note that we don't use the same
// logic for ordgroups (which count as ords).
var prevAtom = prev;
while (prevAtom && prevAtom.type === "color") {
var atoms = prevAtom.value.value;
prevAtom = atoms[atoms.length - 1];
}
// See TeXbook pg. 442-446, Rules 5 and 6, and the text before Rule 19.
// Here, we determine whether the bin should turn into an ord. We
// currently only apply Rule 5.
if (!prev || utils.contains(["mbin", "mopen", "mrel", "mop", "mpunct"],
getTypeOfGroup(prevAtom))) {
group.type = "textord";
className = "mord";
}
return buildCommon.mathsym(
group.value, group.mode, options.getColor(), [className]);
};
groupTypes.rel = function(group, options, prev) {
return buildCommon.mathsym(
group.value, group.mode, options.getColor(), ["mrel"]);
};
groupTypes.open = function(group, options, prev) {
return buildCommon.mathsym(
group.value, group.mode, options.getColor(), ["mopen"]);
};
groupTypes.close = function(group, options, prev) {
return buildCommon.mathsym(
group.value, group.mode, options.getColor(), ["mclose"]);
};
groupTypes.inner = function(group, options, prev) {
return buildCommon.mathsym(
group.value, group.mode, options.getColor(), ["minner"]);
};
groupTypes.punct = function(group, options, prev) {
return buildCommon.mathsym(
group.value, group.mode, options.getColor(), ["mpunct"]);
};
groupTypes.ordgroup = function(group, options, prev) {
return makeSpan(
["mord", options.style.cls()],
buildExpression(group.value, options.reset())
);
};
groupTypes.text = function(group, options, prev) {
return makeSpan(["text", "mord", options.style.cls()],
buildExpression(group.value.body, options.reset()));
};
groupTypes.color = function(group, options, prev) {
var elements = buildExpression(
group.value.value,
options.withColor(group.value.color),
prev
);
// \color isn't supposed to affect the type of the elements it contains.
// To accomplish this, we wrap the results in a fragment, so the inner
// elements will be able to directly interact with their neighbors. For
// example, `\color{red}{2 +} 3` has the same spacing as `2 + 3`
return new buildCommon.makeFragment(elements);
};
groupTypes.supsub = function(group, options, prev) {
// Superscript and subscripts are handled in the TeXbook on page
// 445-446, rules 18(a-f).
// Here is where we defer to the inner group if it should handle
// superscripts and subscripts itself.
if (shouldHandleSupSub(group.value.base, options)) {
return groupTypes[group.value.base.type](group, options, prev);
}
var base = buildGroup(group.value.base, options.reset());
var supmid;
var submid;
var sup;
var sub;
if (group.value.sup) {
sup = buildGroup(group.value.sup,
options.withStyle(options.style.sup()));
supmid = makeSpan(
[options.style.reset(), options.style.sup().cls()], [sup]);
}
if (group.value.sub) {
sub = buildGroup(group.value.sub,
options.withStyle(options.style.sub()));
submid = makeSpan(
[options.style.reset(), options.style.sub().cls()], [sub]);
}
// Rule 18a
var supShift;
var subShift;
if (isCharacterBox(group.value.base)) {
supShift = 0;
subShift = 0;
} else {
supShift = base.height - fontMetrics.metrics.supDrop;
subShift = base.depth + fontMetrics.metrics.subDrop;
}
// Rule 18c
var minSupShift;
if (options.style === Style.DISPLAY) {
minSupShift = fontMetrics.metrics.sup1;
} else if (options.style.cramped) {
minSupShift = fontMetrics.metrics.sup3;
} else {
minSupShift = fontMetrics.metrics.sup2;
}
// scriptspace is a font-size-independent size, so scale it
// appropriately
var multiplier = Style.TEXT.sizeMultiplier *
options.style.sizeMultiplier;
var scriptspace =
(0.5 / fontMetrics.metrics.ptPerEm) / multiplier + "em";
var supsub;
if (!group.value.sup) {
// Rule 18b
subShift = Math.max(
subShift, fontMetrics.metrics.sub1,
sub.height - 0.8 * fontMetrics.metrics.xHeight);
supsub = buildCommon.makeVList([
{type: "elem", elem: submid},
], "shift", subShift, options);
supsub.children[0].style.marginRight = scriptspace;
// Subscripts shouldn't be shifted by the base's italic correction.
// Account for that by shifting the subscript back the appropriate
// amount. Note we only do this when the base is a single symbol.
if (base instanceof domTree.symbolNode) {
supsub.children[0].style.marginLeft = -base.italic + "em";
}
} else if (!group.value.sub) {
// Rule 18c, d
supShift = Math.max(supShift, minSupShift,
sup.depth + 0.25 * fontMetrics.metrics.xHeight);
supsub = buildCommon.makeVList([
{type: "elem", elem: supmid},
], "shift", -supShift, options);
supsub.children[0].style.marginRight = scriptspace;
} else {
supShift = Math.max(
supShift, minSupShift,
sup.depth + 0.25 * fontMetrics.metrics.xHeight);
subShift = Math.max(subShift, fontMetrics.metrics.sub2);
var ruleWidth = fontMetrics.metrics.defaultRuleThickness;
// Rule 18e
if ((supShift - sup.depth) - (sub.height - subShift) <
4 * ruleWidth) {
subShift = 4 * ruleWidth - (supShift - sup.depth) + sub.height;
var psi = 0.8 * fontMetrics.metrics.xHeight -
(supShift - sup.depth);
if (psi > 0) {
supShift += psi;
subShift -= psi;
}
}
supsub = buildCommon.makeVList([
{type: "elem", elem: submid, shift: subShift},
{type: "elem", elem: supmid, shift: -supShift},
], "individualShift", null, options);
// See comment above about subscripts not being shifted
if (base instanceof domTree.symbolNode) {
supsub.children[0].style.marginLeft = -base.italic + "em";
}
supsub.children[0].style.marginRight = scriptspace;
supsub.children[1].style.marginRight = scriptspace;
}
return makeSpan([getTypeOfGroup(group.value.base)],
[base, supsub]);
};
groupTypes.genfrac = function(group, options, prev) {
// Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e).
// Figure out what style this fraction should be in based on the
// function used
var fstyle = options.style;
if (group.value.size === "display") {
fstyle = Style.DISPLAY;
} else if (group.value.size === "text") {
fstyle = Style.TEXT;
}
var nstyle = fstyle.fracNum();
var dstyle = fstyle.fracDen();
var numer = buildGroup(group.value.numer, options.withStyle(nstyle));
var numerreset = makeSpan([fstyle.reset(), nstyle.cls()], [numer]);
var denom = buildGroup(group.value.denom, options.withStyle(dstyle));
var denomreset = makeSpan([fstyle.reset(), dstyle.cls()], [denom]);
var ruleWidth;
if (group.value.hasBarLine) {
ruleWidth = fontMetrics.metrics.defaultRuleThickness /
options.style.sizeMultiplier;
} else {
ruleWidth = 0;
}
// Rule 15b
var numShift;
var clearance;
var denomShift;
if (fstyle.size === Style.DISPLAY.size) {
numShift = fontMetrics.metrics.num1;
if (ruleWidth > 0) {
clearance = 3 * ruleWidth;
} else {
clearance = 7 * fontMetrics.metrics.defaultRuleThickness;
}
denomShift = fontMetrics.metrics.denom1;
} else {
if (ruleWidth > 0) {
numShift = fontMetrics.metrics.num2;
clearance = ruleWidth;
} else {
numShift = fontMetrics.metrics.num3;
clearance = 3 * fontMetrics.metrics.defaultRuleThickness;
}
denomShift = fontMetrics.metrics.denom2;
}
var frac;
if (ruleWidth === 0) {
// Rule 15c
var candiateClearance =
(numShift - numer.depth) - (denom.height - denomShift);
if (candiateClearance < clearance) {
numShift += 0.5 * (clearance - candiateClearance);
denomShift += 0.5 * (clearance - candiateClearance);
}
frac = buildCommon.makeVList([
{type: "elem", elem: denomreset, shift: denomShift},
{type: "elem", elem: numerreset, shift: -numShift},
], "individualShift", null, options);
} else {
// Rule 15d
var axisHeight = fontMetrics.metrics.axisHeight;
if ((numShift - numer.depth) - (axisHeight + 0.5 * ruleWidth) <
clearance) {
numShift +=
clearance - ((numShift - numer.depth) -
(axisHeight + 0.5 * ruleWidth));
}
if ((axisHeight - 0.5 * ruleWidth) - (denom.height - denomShift) <
clearance) {
denomShift +=
clearance - ((axisHeight - 0.5 * ruleWidth) -
(denom.height - denomShift));
}
var mid = makeSpan(
[options.style.reset(), Style.TEXT.cls(), "frac-line"]);
// Manually set the height of the line because its height is
// created in CSS
mid.height = ruleWidth;
var midShift = -(axisHeight - 0.5 * ruleWidth);
frac = buildCommon.makeVList([
{type: "elem", elem: denomreset, shift: denomShift},
{type: "elem", elem: mid, shift: midShift},
{type: "elem", elem: numerreset, shift: -numShift},
], "individualShift", null, options);
}
// Since we manually change the style sometimes (with \dfrac or \tfrac),
// account for the possible size change here.
frac.height *= fstyle.sizeMultiplier / options.style.sizeMultiplier;
frac.depth *= fstyle.sizeMultiplier / options.style.sizeMultiplier;
// Rule 15e
var delimSize;
if (fstyle.size === Style.DISPLAY.size) {
delimSize = fontMetrics.metrics.delim1;
} else {
delimSize = fontMetrics.metrics.getDelim2(fstyle);
}
var leftDelim;
var rightDelim;
if (group.value.leftDelim == null) {
leftDelim = makeNullDelimiter(options);
} else {
leftDelim = delimiter.customSizedDelim(
group.value.leftDelim, delimSize, true,
options.withStyle(fstyle), group.mode);
}
if (group.value.rightDelim == null) {
rightDelim = makeNullDelimiter(options);
} else {
rightDelim = delimiter.customSizedDelim(
group.value.rightDelim, delimSize, true,
options.withStyle(fstyle), group.mode);
}
return makeSpan(
["mord", options.style.reset(), fstyle.cls()],
[leftDelim, makeSpan(["mfrac"], [frac]), rightDelim],
options.getColor());
};
groupTypes.array = function(group, options, prev) {
var r;
var c;
var nr = group.value.body.length;
var nc = 0;
var body = new Array(nr);
// Horizontal spacing
var pt = 1 / fontMetrics.metrics.ptPerEm;
var arraycolsep = 5 * pt; // \arraycolsep in article.cls
// Vertical spacing
var baselineskip = 12 * pt; // see size10.clo
// Default \arraystretch from lttab.dtx
// TODO(gagern): may get redefined once we have user-defined macros
var arraystretch = utils.deflt(group.value.arraystretch, 1);
var arrayskip = arraystretch * baselineskip;
var arstrutHeight = 0.7 * arrayskip; // \strutbox in ltfsstrc.dtx and
var arstrutDepth = 0.3 * arrayskip; // \@arstrutbox in lttab.dtx
var totalHeight = 0;
for (r = 0; r < group.value.body.length; ++r) {
var inrow = group.value.body[r];
var height = arstrutHeight; // \@array adds an \@arstrut
var depth = arstrutDepth; // to each tow (via the template)
if (nc < inrow.length) {
nc = inrow.length;
}
var outrow = new Array(inrow.length);
for (c = 0; c < inrow.length; ++c) {
var elt = buildGroup(inrow[c], options);
if (depth < elt.depth) {
depth = elt.depth;
}
if (height < elt.height) {
height = elt.height;
}
outrow[c] = elt;
}
var gap = 0;
if (group.value.rowGaps[r]) {
gap = group.value.rowGaps[r].value;
switch (gap.unit) {
case "em":
gap = gap.number;
break;
case "ex":
gap = gap.number * fontMetrics.metrics.emPerEx;
break;
default:
console.error("Can't handle unit " + gap.unit);
gap = 0;
}
if (gap > 0) { // \@argarraycr
gap += arstrutDepth;
if (depth < gap) {
depth = gap; // \@xargarraycr
}
gap = 0;
}
}
outrow.height = height;
outrow.depth = depth;
totalHeight += height;
outrow.pos = totalHeight;
totalHeight += depth + gap; // \@yargarraycr
body[r] = outrow;
}
var offset = totalHeight / 2 + fontMetrics.metrics.axisHeight;
var colDescriptions = group.value.cols || [];
var cols = [];
var colSep;
var colDescrNum;
for (c = 0, colDescrNum = 0;
// Continue while either there are more columns or more column
// descriptions, so trailing separators don't get lost.
c < nc || colDescrNum < colDescriptions.length;
++c, ++colDescrNum) {
var colDescr = colDescriptions[colDescrNum] || {};
var firstSeparator = true;
while (colDescr.type === "separator") {
// If there is more than one separator in a row, add a space
// between them.
if (!firstSeparator) {
colSep = makeSpan(["arraycolsep"], []);
colSep.style.width =
fontMetrics.metrics.doubleRuleSep + "em";
cols.push(colSep);
}
if (colDescr.separator === "|") {
var separator = makeSpan(
["vertical-separator"],
[]);
separator.style.height = totalHeight + "em";
separator.style.verticalAlign =
-(totalHeight - offset) + "em";
cols.push(separator);
} else {
throw new ParseError(
"Invalid separator type: " + colDescr.separator);
}
colDescrNum++;
colDescr = colDescriptions[colDescrNum] || {};
firstSeparator = false;
}
if (c >= nc) {
continue;
}
var sepwidth;
if (c > 0 || group.value.hskipBeforeAndAfter) {
sepwidth = utils.deflt(colDescr.pregap, arraycolsep);
if (sepwidth !== 0) {
colSep = makeSpan(["arraycolsep"], []);
colSep.style.width = sepwidth + "em";
cols.push(colSep);
}
}
var col = [];
for (r = 0; r < nr; ++r) {
var row = body[r];
var elem = row[c];
if (!elem) {
continue;
}
var shift = row.pos - offset;
elem.depth = row.depth;
elem.height = row.height;
col.push({type: "elem", elem: elem, shift: shift});
}
col = buildCommon.makeVList(col, "individualShift", null, options);
col = makeSpan(
["col-align-" + (colDescr.align || "c")],
[col]);
cols.push(col);
if (c < nc - 1 || group.value.hskipBeforeAndAfter) {
sepwidth = utils.deflt(colDescr.postgap, arraycolsep);
if (sepwidth !== 0) {
colSep = makeSpan(["arraycolsep"], []);
colSep.style.width = sepwidth + "em";
cols.push(colSep);
}
}
}
body = makeSpan(["mtable"], cols);
return makeSpan(["mord"], [body], options.getColor());
};
groupTypes.spacing = function(group, options, prev) {
if (group.value === "\\ " || group.value === "\\space" ||
group.value === " " || group.value === "~") {
// Spaces are generated by adding an actual space. Each of these
// things has an entry in the symbols table, so these will be turned
// into appropriate outputs.
return makeSpan(
["mord", "mspace"],
[buildCommon.mathsym(group.value, group.mode)]
);
} else {
// Other kinds of spaces are of arbitrary width. We use CSS to
// generate these.
return makeSpan(
["mord", "mspace",
buildCommon.spacingFunctions[group.value].className]);
}
};
groupTypes.llap = function(group, options, prev) {
var inner = makeSpan(
["inner"], [buildGroup(group.value.body, options.reset())]);
var fix = makeSpan(["fix"], []);
return makeSpan(
["llap", options.style.cls()], [inner, fix]);
};
groupTypes.rlap = function(group, options, prev) {
var inner = makeSpan(
["inner"], [buildGroup(group.value.body, options.reset())]);
var fix = makeSpan(["fix"], []);
return makeSpan(
["rlap", options.style.cls()], [inner, fix]);
};
groupTypes.op = function(group, options, prev) {
// Operators are handled in the TeXbook pg. 443-444, rule 13(a).
var supGroup;
var subGroup;
var hasLimits = false;
if (group.type === "supsub" ) {
// If we have limits, supsub will pass us its group to handle. Pull
// out the superscript and subscript and set the group to the op in
// its base.
supGroup = group.value.sup;
subGroup = group.value.sub;
group = group.value.base;
hasLimits = true;
}
// Most operators have a large successor symbol, but these don't.
var noSuccessor = [
"\\smallint",
];
var large = false;
if (options.style.size === Style.DISPLAY.size &&
group.value.symbol &&
!utils.contains(noSuccessor, group.value.body)) {
// Most symbol operators get larger in displaystyle (rule 13)
large = true;
}
var base;
var baseShift = 0;
var slant = 0;
if (group.value.symbol) {
// If this is a symbol, create the symbol.
var style = large ? "Size2-Regular" : "Size1-Regular";
base = buildCommon.makeSymbol(
group.value.body, style, "math", options.getColor(),
["op-symbol", large ? "large-op" : "small-op", "mop"]);
// Shift the symbol so its center lies on the axis (rule 13). It
// appears that our fonts have the centers of the symbols already
// almost on the axis, so these numbers are very small. Note we
// don't actually apply this here, but instead it is used either in
// the vlist creation or separately when there are no limits.
baseShift = (base.height - base.depth) / 2 -
fontMetrics.metrics.axisHeight *
options.style.sizeMultiplier;
// The slant of the symbol is just its italic correction.
slant = base.italic;
} else {
// Otherwise, this is a text operator. Build the text from the
// operator's name.
// TODO(emily): Add a space in the middle of some of these
// operators, like \limsup
var output = [];
for (var i = 1; i < group.value.body.length; i++) {
output.push(buildCommon.mathsym(group.value.body[i], group.mode));
}
base = makeSpan(["mop"], output, options.getColor());
}
if (hasLimits) {
// IE 8 clips \int if it is in a display: inline-block. We wrap it
// in a new span so it is an inline, and works.
base = makeSpan([], [base]);
var supmid;
var supKern;
var submid;
var subKern;
// We manually have to handle the superscripts and subscripts. This,
// aside from the kern calculations, is copied from supsub.
if (supGroup) {
var sup = buildGroup(
supGroup, options.withStyle(options.style.sup()));
supmid = makeSpan(
[options.style.reset(), options.style.sup().cls()], [sup]);
supKern = Math.max(
fontMetrics.metrics.bigOpSpacing1,
fontMetrics.metrics.bigOpSpacing3 - sup.depth);
}
if (subGroup) {
var sub = buildGroup(
subGroup, options.withStyle(options.style.sub()));
submid = makeSpan(
[options.style.reset(), options.style.sub().cls()],
[sub]);
subKern = Math.max(
fontMetrics.metrics.bigOpSpacing2,
fontMetrics.metrics.bigOpSpacing4 - sub.height);
}
// Build the final group as a vlist of the possible subscript, base,
// and possible superscript.
var finalGroup;
var top;
var bottom;
if (!supGroup) {
top = base.height - baseShift;
finalGroup = buildCommon.makeVList([
{type: "kern", size: fontMetrics.metrics.bigOpSpacing5},
{type: "elem", elem: submid},
{type: "kern", size: subKern},
{type: "elem", elem: base},
], "top", top, options);
// Here, we shift the limits by the slant of the symbol. Note
// that we are supposed to shift the limits by 1/2 of the slant,
// but since we are centering the limits adding a full slant of
// margin will shift by 1/2 that.
finalGroup.children[0].style.marginLeft = -slant + "em";
} else if (!subGroup) {
bottom = base.depth + baseShift;
finalGroup = buildCommon.makeVList([
{type: "elem", elem: base},
{type: "kern", size: supKern},
{type: "elem", elem: supmid},
{type: "kern", size: fontMetrics.metrics.bigOpSpacing5},
], "bottom", bottom, options);
// See comment above about slants
finalGroup.children[1].style.marginLeft = slant + "em";
} else if (!supGroup && !subGroup) {
// This case probably shouldn't occur (this would mean the
// supsub was sending us a group with no superscript or
// subscript) but be safe.
return base;
} else {
bottom = fontMetrics.metrics.bigOpSpacing5 +
submid.height + submid.depth +
subKern +
base.depth + baseShift;
finalGroup = buildCommon.makeVList([
{type: "kern", size: fontMetrics.metrics.bigOpSpacing5},
{type: "elem", elem: submid},
{type: "kern", size: subKern},
{type: "elem", elem: base},
{type: "kern", size: supKern},
{type: "elem", elem: supmid},
{type: "kern", size: fontMetrics.metrics.bigOpSpacing5},
], "bottom", bottom, options);
// See comment above about slants
finalGroup.children[0].style.marginLeft = -slant + "em";
finalGroup.children[2].style.marginLeft = slant + "em";
}
return makeSpan(["mop", "op-limits"], [finalGroup]);
} else {
if (group.value.symbol) {
base.style.top = baseShift + "em";
}
return base;
}
};
groupTypes.katex = function(group, options, prev) {
// The KaTeX logo. The offsets for the K and a were chosen to look
// good, but the offsets for the T, E, and X were taken from the
// definition of \TeX in TeX (see TeXbook pg. 356)
var k = makeSpan(
["k"], [buildCommon.mathsym("K", group.mode)]);
var a = makeSpan(
["a"], [buildCommon.mathsym("A", group.mode)]);
a.height = (a.height + 0.2) * 0.75;
a.depth = (a.height - 0.2) * 0.75;
var t = makeSpan(
["t"], [buildCommon.mathsym("T", group.mode)]);
var e = makeSpan(
["e"], [buildCommon.mathsym("E", group.mode)]);
e.height = (e.height - 0.2155);
e.depth = (e.depth + 0.2155);
var x = makeSpan(
["x"], [buildCommon.mathsym("X", group.mode)]);
return makeSpan(
["katex-logo", "mord"], [k, a, t, e, x], options.getColor());
};
groupTypes.overline = function(group, options, prev) {
// Overlines are handled in the TeXbook pg 443, Rule 9.
// Build the inner group in the cramped style.
var innerGroup = buildGroup(group.value.body,
options.withStyle(options.style.cramp()));
var ruleWidth = fontMetrics.metrics.defaultRuleThickness /
options.style.sizeMultiplier;
// Create the line above the body
var line = makeSpan(
[options.style.reset(), Style.TEXT.cls(), "overline-line"]);
line.height = ruleWidth;
line.maxFontSize = 1.0;
// Generate the vlist, with the appropriate kerns
var vlist = buildCommon.makeVList([
{type: "elem", elem: innerGroup},
{type: "kern", size: 3 * ruleWidth},
{type: "elem", elem: line},
{type: "kern", size: ruleWidth},
], "firstBaseline", null, options);
return makeSpan(["overline", "mord"], [vlist], options.getColor());
};
groupTypes.underline = function(group, options, prev) {
// Underlines are handled in the TeXbook pg 443, Rule 10.
// Build the inner group.
var innerGroup = buildGroup(group.value.body, options);
var ruleWidth = fontMetrics.metrics.defaultRuleThickness /
options.style.sizeMultiplier;
// Create the line above the body
var line = makeSpan(
[options.style.reset(), Style.TEXT.cls(), "underline-line"]);
line.height = ruleWidth;
line.maxFontSize = 1.0;
// Generate the vlist, with the appropriate kerns
var vlist = buildCommon.makeVList([
{type: "kern", size: ruleWidth},
{type: "elem", elem: line},
{type: "kern", size: 3 * ruleWidth},
{type: "elem", elem: innerGroup},
], "top", innerGroup.height, options);
return makeSpan(["underline", "mord"], [vlist], options.getColor());
};
groupTypes.sqrt = function(group, options, prev) {
// Square roots are handled in the TeXbook pg. 443, Rule 11.
// First, we do the same steps as in overline to build the inner group
// and line
var inner = buildGroup(group.value.body,
options.withStyle(options.style.cramp()));
var ruleWidth = fontMetrics.metrics.defaultRuleThickness /
options.style.sizeMultiplier;
var line = makeSpan(
[options.style.reset(), Style.TEXT.cls(), "sqrt-line"], [],
options.getColor());
line.height = ruleWidth;
line.maxFontSize = 1.0;
var phi = ruleWidth;
if (options.style.id < Style.TEXT.id) {
phi = fontMetrics.metrics.xHeight;
}
// Calculate the clearance between the body and line
var lineClearance = ruleWidth + phi / 4;
var innerHeight =
(inner.height + inner.depth) * options.style.sizeMultiplier;
var minDelimiterHeight = innerHeight + lineClearance + ruleWidth;
// Create a \surd delimiter of the required minimum size
var delim = makeSpan(["sqrt-sign"], [
delimiter.customSizedDelim("\\surd", minDelimiterHeight,
false, options, group.mode)],
options.getColor());
var delimDepth = (delim.height + delim.depth) - ruleWidth;
// Adjust the clearance based on the delimiter size
if (delimDepth > inner.height + inner.depth + lineClearance) {
lineClearance =
(lineClearance + delimDepth - inner.height - inner.depth) / 2;
}
// Shift the delimiter so that its top lines up with the top of the line
var delimShift = -(inner.height + lineClearance + ruleWidth) + delim.height;
delim.style.top = delimShift + "em";
delim.height -= delimShift;
delim.depth += delimShift;
// We add a special case here, because even when `inner` is empty, we
// still get a line. So, we use a simple heuristic to decide if we
// should omit the body entirely. (note this doesn't work for something
// like `\sqrt{\rlap{x}}`, but if someone is doing that they deserve for
// it not to work.
var body;
if (inner.height === 0 && inner.depth === 0) {
body = makeSpan();
} else {
body = buildCommon.makeVList([
{type: "elem", elem: inner},
{type: "kern", size: lineClearance},
{type: "elem", elem: line},
{type: "kern", size: ruleWidth},
], "firstBaseline", null, options);
}
if (!group.value.index) {
return makeSpan(["sqrt", "mord"], [delim, body]);
} else {
// Handle the optional root index
// The index is always in scriptscript style
var root = buildGroup(
group.value.index,
options.withStyle(Style.SCRIPTSCRIPT));
var rootWrap = makeSpan(
[options.style.reset(), Style.SCRIPTSCRIPT.cls()],
[root]);
// Figure out the height and depth of the inner part
var innerRootHeight = Math.max(delim.height, body.height);
var innerRootDepth = Math.max(delim.depth, body.depth);
// The amount the index is shifted by. This is taken from the TeX
// source, in the definition of `\r@@t`.
var toShift = 0.6 * (innerRootHeight - innerRootDepth);
// Build a VList with the superscript shifted up correctly
var rootVList = buildCommon.makeVList(
[{type: "elem", elem: rootWrap}],
"shift", -toShift, options);
// Add a class surrounding it so we can add on the appropriate
// kerning
var rootVListWrap = makeSpan(["root"], [rootVList]);
return makeSpan(["sqrt", "mord"], [rootVListWrap, delim, body]);
}
};
groupTypes.sizing = function(group, options, prev) {
// Handle sizing operators like \Huge. Real TeX doesn't actually allow
// these functions inside of math expressions, so we do some special
// handling.
var inner = buildExpression(group.value.value,
options.withSize(group.value.size), prev);
var span = makeSpan(["mord"],
[makeSpan(["sizing", "reset-" + options.size, group.value.size,
options.style.cls()],
inner)]);
// Calculate the correct maxFontSize manually
var fontSize = buildCommon.sizingMultiplier[group.value.size];
span.maxFontSize = fontSize * options.style.sizeMultiplier;
return span;
};
groupTypes.styling = function(group, options, prev) {
// Style changes are handled in the TeXbook on pg. 442, Rule 3.
// Figure out what style we're changing to.
var style = {
"display": Style.DISPLAY,
"text": Style.TEXT,
"script": Style.SCRIPT,
"scriptscript": Style.SCRIPTSCRIPT,
};
var newStyle = style[group.value.style];
// Build the inner expression in the new style.
var inner = buildExpression(
group.value.value, options.withStyle(newStyle), prev);
return makeSpan([options.style.reset(), newStyle.cls()], inner);
};
groupTypes.font = function(group, options, prev) {
var font = group.value.font;
return buildGroup(group.value.body, options.withFont(font), prev);
};
groupTypes.delimsizing = function(group, options, prev) {
var delim = group.value.value;
if (delim === ".") {
// Empty delimiters still count as elements, even though they don't
// show anything.
return makeSpan([groupToType[group.value.delimType]]);
}
// Use delimiter.sizedDelim to generate the delimiter.
return makeSpan(
[groupToType[group.value.delimType]],
[delimiter.sizedDelim(
delim, group.value.size, options, group.mode)]);
};
groupTypes.leftright = function(group, options, prev) {
// Build the inner expression
var inner = buildExpression(group.value.body, options.reset());
var innerHeight = 0;
var innerDepth = 0;
// Calculate its height and depth
for (var i = 0; i < inner.length; i++) {
innerHeight = Math.max(inner[i].height, innerHeight);
innerDepth = Math.max(inner[i].depth, innerDepth);
}
// The size of delimiters is the same, regardless of what style we are
// in. Thus, to correctly calculate the size of delimiter we need around
// a group, we scale down the inner size based on the size.
innerHeight *= options.style.sizeMultiplier;
innerDepth *= options.style.sizeMultiplier;
var leftDelim;
if (group.value.left === ".") {
// Empty delimiters in \left and \right make null delimiter spaces.
leftDelim = makeNullDelimiter(options);
} else {
// Otherwise, use leftRightDelim to generate the correct sized
// delimiter.
leftDelim = delimiter.leftRightDelim(
group.value.left, innerHeight, innerDepth, options,
group.mode);
}
// Add it to the beginning of the expression
inner.unshift(leftDelim);
var rightDelim;
// Same for the right delimiter
if (group.value.right === ".") {
rightDelim = makeNullDelimiter(options);
} else {
rightDelim = delimiter.leftRightDelim(
group.value.right, innerHeight, innerDepth, options,
group.mode);
}
// Add it to the end of the expression.
inner.push(rightDelim);
return makeSpan(
["minner", options.style.cls()], inner, options.getColor());
};
groupTypes.rule = function(group, options, prev) {
// Make an empty span for the rule
var rule = makeSpan(["mord", "rule"], [], options.getColor());
// Calculate the shift, width, and height of the rule, and account for units
var shift = 0;
if (group.value.shift) {
shift = group.value.shift.number;
if (group.value.shift.unit === "ex") {
shift *= fontMetrics.metrics.xHeight;
}
}
var width = group.value.width.number;
if (group.value.width.unit === "ex") {
width *= fontMetrics.metrics.xHeight;
}
var height = group.value.height.number;
if (group.value.height.unit === "ex") {
height *= fontMetrics.metrics.xHeight;
}
// The sizes of rules are absolute, so make it larger if we are in a
// smaller style.
shift /= options.style.sizeMultiplier;
width /= options.style.sizeMultiplier;
height /= options.style.sizeMultiplier;
// Style the rule to the right size
rule.style.borderRightWidth = width + "em";
rule.style.borderTopWidth = height + "em";
rule.style.bottom = shift + "em";
// Record the height and width
rule.width = width;
rule.height = height + shift;
rule.depth = -shift;
return rule;
};
groupTypes.accent = function(group, options, prev) {
// Accents are handled in the TeXbook pg. 443, rule 12.
var base = group.value.base;
var supsubGroup;
if (group.type === "supsub") {
// If our base is a character box, and we have superscripts and
// subscripts, the supsub will defer to us. In particular, we want
// to attach the superscripts and subscripts to the inner body (so
// that the position of the superscripts and subscripts won't be
// affected by the height of the accent). We accomplish this by
// sticking the base of the accent into the base of the supsub, and
// rendering that, while keeping track of where the accent is.
// The supsub group is the group that was passed in
var supsub = group;
// The real accent group is the base of the supsub group
group = supsub.value.base;
// The character box is the base of the accent group
base = group.value.base;
// Stick the character box into the base of the supsub group
supsub.value.base = base;
// Rerender the supsub group with its new base, and store that
// result.
supsubGroup = buildGroup(
supsub, options.reset(), prev);
}
// Build the base group
var body = buildGroup(
base, options.withStyle(options.style.cramp()));
// Calculate the skew of the accent. This is based on the line "If the
// nucleus is not a single character, let s = 0; otherwise set s to the
// kern amount for the nucleus followed by the \skewchar of its font."
// Note that our skew metrics are just the kern between each character
// and the skewchar.
var skew;
if (isCharacterBox(base)) {
// If the base is a character box, then we want the skew of the
// innermost character. To do that, we find the innermost character:
var baseChar = getBaseElem(base);
// Then, we render its group to get the symbol inside it
var baseGroup = buildGroup(
baseChar, options.withStyle(options.style.cramp()));
// Finally, we pull the skew off of the symbol.
skew = baseGroup.skew;
// Note that we now throw away baseGroup, because the layers we
// removed with getBaseElem might contain things like \color which
// we can't get rid of.
// TODO(emily): Find a better way to get the skew
} else {
skew = 0;
}
// calculate the amount of space between the body and the accent
var clearance = Math.min(body.height, fontMetrics.metrics.xHeight);
// Build the accent
var accent = buildCommon.makeSymbol(
group.value.accent, "Main-Regular", "math", options.getColor());
// Remove the italic correction of the accent, because it only serves to
// shift the accent over to a place we don't want.
accent.italic = 0;
// The \vec character that the fonts use is a combining character, and
// thus shows up much too far to the left. To account for this, we add a
// specific class which shifts the accent over to where we want it.
// TODO(emily): Fix this in a better way, like by changing the font
var vecClass = group.value.accent === "\\vec" ? "accent-vec" : null;
var accentBody = makeSpan(["accent-body", vecClass], [
makeSpan([], [accent])]);
accentBody = buildCommon.makeVList([
{type: "elem", elem: body},
{type: "kern", size: -clearance},
{type: "elem", elem: accentBody},
], "firstBaseline", null, options);
// Shift the accent over by the skew. Note we shift by twice the skew
// because we are centering the accent, so by adding 2*skew to the left,
// we shift it to the right by 1*skew.
accentBody.children[1].style.marginLeft = 2 * skew + "em";
var accentWrap = makeSpan(["mord", "accent"], [accentBody]);
if (supsubGroup) {
// Here, we replace the "base" child of the supsub with our newly
// generated accent.
supsubGroup.children[0] = accentWrap;
// Since we don't rerun the height calculation after replacing the
// accent, we manually recalculate height.
supsubGroup.height = Math.max(accentWrap.height, supsubGroup.height);
// Accents should always be ords, even when their innards are not.
supsubGroup.classes[0] = "mord";
return supsubGroup;
} else {
return accentWrap;
}
};
groupTypes.phantom = function(group, options, prev) {
var elements = buildExpression(
group.value.value,
options.withPhantom(),
prev
);
// \phantom isn't supposed to affect the elements it contains.
// See "color" for more details.
return new buildCommon.makeFragment(elements);
};
/**
* buildGroup is the function that takes a group and calls the correct groupType
* function for it. It also handles the interaction of size and style changes
* between parents and children.
*/
var buildGroup = function(group, options, prev) {
if (!group) {
return makeSpan();
}
if (groupTypes[group.type]) {
// Call the groupTypes function
var groupNode = groupTypes[group.type](group, options, prev);
var multiplier;
// If the style changed between the parent and the current group,
// account for the size difference
if (options.style !== options.parentStyle) {
multiplier = options.style.sizeMultiplier /
options.parentStyle.sizeMultiplier;
groupNode.height *= multiplier;
groupNode.depth *= multiplier;
}
// If the size changed between the parent and the current group, account
// for that size difference.
if (options.size !== options.parentSize) {
multiplier = buildCommon.sizingMultiplier[options.size] /
buildCommon.sizingMultiplier[options.parentSize];
groupNode.height *= multiplier;
groupNode.depth *= multiplier;
}
return groupNode;
} else {
throw new ParseError(
"Got group of unknown type: '" + group.type + "'");
}
};
/**
* Take an entire parse tree, and build it into an appropriate set of HTML
* nodes.
*/
var buildHTML = function(tree, options) {
// buildExpression is destructive, so we need to make a clone
// of the incoming tree so that it isn't accidentally changed
tree = JSON.parse(JSON.stringify(tree));
// Build the expression contained in the tree
var expression = buildExpression(tree, options);
var body = makeSpan(["base", options.style.cls()], expression);
// Add struts, which ensure that the top of the HTML element falls at the
// height of the expression, and the bottom of the HTML element falls at the
// depth of the expression.
var topStrut = makeSpan(["strut"]);
var bottomStrut = makeSpan(["strut", "bottom"]);
topStrut.style.height = body.height + "em";
bottomStrut.style.height = (body.height + body.depth) + "em";
// We'd like to use `vertical-align: top` but in IE 9 this lowers the
// baseline of the box to the bottom of this strut (instead staying in the
// normal place) so we use an absolute value for vertical-align instead
bottomStrut.style.verticalAlign = -body.depth + "em";
// Wrap the struts and body together
var htmlNode = makeSpan(["katex-html"], [topStrut, bottomStrut, body]);
htmlNode.setAttribute("aria-hidden", "true");
return htmlNode;
};
module.exports = buildHTML;
/***/ }),
/* 159 */
/***/ (function(module, exports) {
/**
* This file contains information and classes for the various kinds of styles
* used in TeX. It provides a generic `Style` class, which holds information
* about a specific style. It then provides instances of all the different kinds
* of styles possible, and provides functions to move between them and get
* information about them.
*/
/**
* The main style class. Contains a unique id for the style, a size (which is
* the same for cramped and uncramped version of a style), a cramped flag, and a
* size multiplier, which gives the size difference between a style and
* textstyle.
*/
function Style(id, size, multiplier, cramped) {
this.id = id;
this.size = size;
this.cramped = cramped;
this.sizeMultiplier = multiplier;
}
/**
* Get the style of a superscript given a base in the current style.
*/
Style.prototype.sup = function() {
return styles[sup[this.id]];
};
/**
* Get the style of a subscript given a base in the current style.
*/
Style.prototype.sub = function() {
return styles[sub[this.id]];
};
/**
* Get the style of a fraction numerator given the fraction in the current
* style.
*/
Style.prototype.fracNum = function() {
return styles[fracNum[this.id]];
};
/**
* Get the style of a fraction denominator given the fraction in the current
* style.
*/
Style.prototype.fracDen = function() {
return styles[fracDen[this.id]];
};
/**
* Get the cramped version of a style (in particular, cramping a cramped style
* doesn't change the style).
*/
Style.prototype.cramp = function() {
return styles[cramp[this.id]];
};
/**
* HTML class name, like "displaystyle cramped"
*/
Style.prototype.cls = function() {
return sizeNames[this.size] + (this.cramped ? " cramped" : " uncramped");
};
/**
* HTML Reset class name, like "reset-textstyle"
*/
Style.prototype.reset = function() {
return resetNames[this.size];
};
// IDs of the different styles
var D = 0;
var Dc = 1;
var T = 2;
var Tc = 3;
var S = 4;
var Sc = 5;
var SS = 6;
var SSc = 7;
// String names for the different sizes
var sizeNames = [
"displaystyle textstyle",
"textstyle",
"scriptstyle",
"scriptscriptstyle",
];
// Reset names for the different sizes
var resetNames = [
"reset-textstyle",
"reset-textstyle",
"reset-scriptstyle",
"reset-scriptscriptstyle",
];
// Instances of the different styles
var styles = [
new Style(D, 0, 1.0, false),
new Style(Dc, 0, 1.0, true),
new Style(T, 1, 1.0, false),
new Style(Tc, 1, 1.0, true),
new Style(S, 2, 0.7, false),
new Style(Sc, 2, 0.7, true),
new Style(SS, 3, 0.5, false),
new Style(SSc, 3, 0.5, true),
];
// Lookup tables for switching from one style to another
var sup = [S, Sc, S, Sc, SS, SSc, SS, SSc];
var sub = [Sc, Sc, Sc, Sc, SSc, SSc, SSc, SSc];
var fracNum = [T, Tc, S, Sc, SS, SSc, SS, SSc];
var fracDen = [Tc, Tc, Sc, Sc, SSc, SSc, SSc, SSc];
var cramp = [Dc, Dc, Tc, Tc, Sc, Sc, SSc, SSc];
// We only export some of the styles. Also, we don't export the `Style` class so
// no more styles can be generated.
module.exports = {
DISPLAY: styles[D],
TEXT: styles[T],
SCRIPT: styles[S],
SCRIPTSCRIPT: styles[SS],
};
/***/ }),
/* 160 */
/***/ (function(module, exports, __webpack_require__) {
/* eslint no-console:0 */
/**
* This module contains general functions that can be used for building
* different kinds of domTree nodes in a consistent manner.
*/
var domTree = __webpack_require__(161);
var fontMetrics = __webpack_require__(163);
var symbols = __webpack_require__(165);
var utils = __webpack_require__(162);
var greekCapitals = [
"\\Gamma",
"\\Delta",
"\\Theta",
"\\Lambda",
"\\Xi",
"\\Pi",
"\\Sigma",
"\\Upsilon",
"\\Phi",
"\\Psi",
"\\Omega",
];
var dotlessLetters = [
"\u0131", // dotless i, \imath
"\u0237", // dotless j, \jmath
];
/**
* Makes a symbolNode after translation via the list of symbols in symbols.js.
* Correctly pulls out metrics for the character, and optionally takes a list of
* classes to be attached to the node.
*/
var makeSymbol = function(value, style, mode, color, classes) {
// Replace the value with its replaced value from symbol.js
if (symbols[mode][value] && symbols[mode][value].replace) {
value = symbols[mode][value].replace;
}
var metrics = fontMetrics.getCharacterMetrics(value, style);
var symbolNode;
if (metrics) {
symbolNode = new domTree.symbolNode(
value, metrics.height, metrics.depth, metrics.italic, metrics.skew,
classes);
} else {
// TODO(emily): Figure out a good way to only print this in development
typeof console !== "undefined" && console.warn(
"No character metrics for '" + value + "' in style '" +
style + "'");
symbolNode = new domTree.symbolNode(value, 0, 0, 0, 0, classes);
}
if (color) {
symbolNode.style.color = color;
}
return symbolNode;
};
/**
* Makes a symbol in Main-Regular or AMS-Regular.
* Used for rel, bin, open, close, inner, and punct.
*/
var mathsym = function(value, mode, color, classes) {
// Decide what font to render the symbol in by its entry in the symbols
// table.
// Have a special case for when the value = \ because the \ is used as a
// textord in unsupported command errors but cannot be parsed as a regular
// text ordinal and is therefore not present as a symbol in the symbols
// table for text
if (value === "\\" || symbols[mode][value].font === "main") {
return makeSymbol(value, "Main-Regular", mode, color, classes);
} else {
return makeSymbol(
value, "AMS-Regular", mode, color, classes.concat(["amsrm"]));
}
};
/**
* Makes a symbol in the default font for mathords and textords.
*/
var mathDefault = function(value, mode, color, classes, type) {
if (type === "mathord") {
return mathit(value, mode, color, classes);
} else if (type === "textord") {
return makeSymbol(
value, "Main-Regular", mode, color, classes.concat(["mathrm"]));
} else {
throw new Error("unexpected type: " + type + " in mathDefault");
}
};
/**
* Makes a symbol in the italic math font.
*/
var mathit = function(value, mode, color, classes) {
if (/[0-9]/.test(value.charAt(0)) ||
// glyphs for \imath and \jmath do not exist in Math-Italic so we
// need to use Main-Italic instead
utils.contains(dotlessLetters, value) ||
utils.contains(greekCapitals, value)) {
return makeSymbol(
value, "Main-Italic", mode, color, classes.concat(["mainit"]));
} else {
return makeSymbol(
value, "Math-Italic", mode, color, classes.concat(["mathit"]));
}
};
/**
* Makes either a mathord or textord in the correct font and color.
*/
var makeOrd = function(group, options, type) {
var mode = group.mode;
var value = group.value;
if (symbols[mode][value] && symbols[mode][value].replace) {
value = symbols[mode][value].replace;
}
var classes = ["mord"];
var color = options.getColor();
var font = options.font;
if (font) {
if (font === "mathit" || utils.contains(dotlessLetters, value)) {
return mathit(value, mode, color, classes);
} else {
var fontName = fontMap[font].fontName;
if (fontMetrics.getCharacterMetrics(value, fontName)) {
return makeSymbol(
value, fontName, mode, color, classes.concat([font]));
} else {
return mathDefault(value, mode, color, classes, type);
}
}
} else {
return mathDefault(value, mode, color, classes, type);
}
};
/**
* Calculate the height, depth, and maxFontSize of an element based on its
* children.
*/
var sizeElementFromChildren = function(elem) {
var height = 0;
var depth = 0;
var maxFontSize = 0;
if (elem.children) {
for (var i = 0; i < elem.children.length; i++) {
if (elem.children[i].height > height) {
height = elem.children[i].height;
}
if (elem.children[i].depth > depth) {
depth = elem.children[i].depth;
}
if (elem.children[i].maxFontSize > maxFontSize) {
maxFontSize = elem.children[i].maxFontSize;
}
}
}
elem.height = height;
elem.depth = depth;
elem.maxFontSize = maxFontSize;
};
/**
* Makes a span with the given list of classes, list of children, and color.
*/
var makeSpan = function(classes, children, color) {
var span = new domTree.span(classes, children);
sizeElementFromChildren(span);
if (color) {
span.style.color = color;
}
return span;
};
/**
* Makes a document fragment with the given list of children.
*/
var makeFragment = function(children) {
var fragment = new domTree.documentFragment(children);
sizeElementFromChildren(fragment);
return fragment;
};
/**
* Makes an element placed in each of the vlist elements to ensure that each
* element has the same max font size. To do this, we create a zero-width space
* with the correct font size.
*/
var makeFontSizer = function(options, fontSize) {
var fontSizeInner = makeSpan([], [new domTree.symbolNode("\u200b")]);
fontSizeInner.style.fontSize =
(fontSize / options.style.sizeMultiplier) + "em";
var fontSizer = makeSpan(
["fontsize-ensurer", "reset-" + options.size, "size5"],
[fontSizeInner]);
return fontSizer;
};
/**
* Makes a vertical list by stacking elements and kerns on top of each other.
* Allows for many different ways of specifying the positioning method.
*
* Arguments:
* - children: A list of child or kern nodes to be stacked on top of each other
* (i.e. the first element will be at the bottom, and the last at
* the top). Element nodes are specified as
* {type: "elem", elem: node}
* while kern nodes are specified as
* {type: "kern", size: size}
* - positionType: The method by which the vlist should be positioned. Valid
* values are:
* - "individualShift": The children list only contains elem
* nodes, and each node contains an extra
* "shift" value of how much it should be
* shifted (note that shifting is always
* moving downwards). positionData is
* ignored.
* - "top": The positionData specifies the topmost point of
* the vlist (note this is expected to be a height,
* so positive values move up)
* - "bottom": The positionData specifies the bottommost point
* of the vlist (note this is expected to be a
* depth, so positive values move down
* - "shift": The vlist will be positioned such that its
* baseline is positionData away from the baseline
* of the first child. Positive values move
* downwards.
* - "firstBaseline": The vlist will be positioned such that
* its baseline is aligned with the
* baseline of the first child.
* positionData is ignored. (this is
* equivalent to "shift" with
* positionData=0)
* - positionData: Data used in different ways depending on positionType
* - options: An Options object
*
*/
var makeVList = function(children, positionType, positionData, options) {
var depth;
var currPos;
var i;
if (positionType === "individualShift") {
var oldChildren = children;
children = [oldChildren[0]];
// Add in kerns to the list of children to get each element to be
// shifted to the correct specified shift
depth = -oldChildren[0].shift - oldChildren[0].elem.depth;
currPos = depth;
for (i = 1; i < oldChildren.length; i++) {
var diff = -oldChildren[i].shift - currPos -
oldChildren[i].elem.depth;
var size = diff -
(oldChildren[i - 1].elem.height +
oldChildren[i - 1].elem.depth);
currPos = currPos + diff;
children.push({type: "kern", size: size});
children.push(oldChildren[i]);
}
} else if (positionType === "top") {
// We always start at the bottom, so calculate the bottom by adding up
// all the sizes
var bottom = positionData;
for (i = 0; i < children.length; i++) {
if (children[i].type === "kern") {
bottom -= children[i].size;
} else {
bottom -= children[i].elem.height + children[i].elem.depth;
}
}
depth = bottom;
} else if (positionType === "bottom") {
depth = -positionData;
} else if (positionType === "shift") {
depth = -children[0].elem.depth - positionData;
} else if (positionType === "firstBaseline") {
depth = -children[0].elem.depth;
} else {
depth = 0;
}
// Make the fontSizer
var maxFontSize = 0;
for (i = 0; i < children.length; i++) {
if (children[i].type === "elem") {
maxFontSize = Math.max(maxFontSize, children[i].elem.maxFontSize);
}
}
var fontSizer = makeFontSizer(options, maxFontSize);
// Create a new list of actual children at the correct offsets
var realChildren = [];
currPos = depth;
for (i = 0; i < children.length; i++) {
if (children[i].type === "kern") {
currPos += children[i].size;
} else {
var child = children[i].elem;
var shift = -child.depth - currPos;
currPos += child.height + child.depth;
var childWrap = makeSpan([], [fontSizer, child]);
childWrap.height -= shift;
childWrap.depth += shift;
childWrap.style.top = shift + "em";
realChildren.push(childWrap);
}
}
// Add in an element at the end with no offset to fix the calculation of
// baselines in some browsers (namely IE, sometimes safari)
var baselineFix = makeSpan(
["baseline-fix"], [fontSizer, new domTree.symbolNode("\u200b")]);
realChildren.push(baselineFix);
var vlist = makeSpan(["vlist"], realChildren);
// Fix the final height and depth, in case there were kerns at the ends
// since the makeSpan calculation won't take that in to account.
vlist.height = Math.max(currPos, vlist.height);
vlist.depth = Math.max(-depth, vlist.depth);
return vlist;
};
// A table of size -> font size for the different sizing functions
var sizingMultiplier = {
size1: 0.5,
size2: 0.7,
size3: 0.8,
size4: 0.9,
size5: 1.0,
size6: 1.2,
size7: 1.44,
size8: 1.73,
size9: 2.07,
size10: 2.49,
};
// A map of spacing functions to their attributes, like size and corresponding
// CSS class
var spacingFunctions = {
"\\qquad": {
size: "2em",
className: "qquad",
},
"\\quad": {
size: "1em",
className: "quad",
},
"\\enspace": {
size: "0.5em",
className: "enspace",
},
"\\;": {
size: "0.277778em",
className: "thickspace",
},
"\\:": {
size: "0.22222em",
className: "mediumspace",
},
"\\,": {
size: "0.16667em",
className: "thinspace",
},
"\\!": {
size: "-0.16667em",
className: "negativethinspace",
},
};
/**
* Maps TeX font commands to objects containing:
* - variant: string used for "mathvariant" attribute in buildMathML.js
* - fontName: the "style" parameter to fontMetrics.getCharacterMetrics
*/
// A map between tex font commands an MathML mathvariant attribute values
var fontMap = {
// styles
"mathbf": {
variant: "bold",
fontName: "Main-Bold",
},
"mathrm": {
variant: "normal",
fontName: "Main-Regular",
},
// "mathit" is missing because it requires the use of two fonts: Main-Italic
// and Math-Italic. This is handled by a special case in makeOrd which ends
// up calling mathit.
// families
"mathbb": {
variant: "double-struck",
fontName: "AMS-Regular",
},
"mathcal": {
variant: "script",
fontName: "Caligraphic-Regular",
},
"mathfrak": {
variant: "fraktur",
fontName: "Fraktur-Regular",
},
"mathscr": {
variant: "script",
fontName: "Script-Regular",
},
"mathsf": {
variant: "sans-serif",
fontName: "SansSerif-Regular",
},
"mathtt": {
variant: "monospace",
fontName: "Typewriter-Regular",
},
};
module.exports = {
fontMap: fontMap,
makeSymbol: makeSymbol,
mathsym: mathsym,
makeSpan: makeSpan,
makeFragment: makeFragment,
makeVList: makeVList,
makeOrd: makeOrd,
sizingMultiplier: sizingMultiplier,
spacingFunctions: spacingFunctions,
};
/***/ }),
/* 161 */
/***/ (function(module, exports, __webpack_require__) {
/**
* These objects store the data about the DOM nodes we create, as well as some
* extra data. They can then be transformed into real DOM nodes with the
* `toNode` function or HTML markup using `toMarkup`. They are useful for both
* storing extra properties on the nodes, as well as providing a way to easily
* work with the DOM.
*
* Similar functions for working with MathML nodes exist in mathMLTree.js.
*/
var utils = __webpack_require__(162);
/**
* Create an HTML className based on a list of classes. In addition to joining
* with spaces, we also remove null or empty classes.
*/
var createClass = function(classes) {
classes = classes.slice();
for (var i = classes.length - 1; i >= 0; i--) {
if (!classes[i]) {
classes.splice(i, 1);
}
}
return classes.join(" ");
};
/**
* This node represents a span node, with a className, a list of children, and
* an inline style. It also contains information about its height, depth, and
* maxFontSize.
*/
function span(classes, children, height, depth, maxFontSize, style) {
this.classes = classes || [];
this.children = children || [];
this.height = height || 0;
this.depth = depth || 0;
this.maxFontSize = maxFontSize || 0;
this.style = style || {};
this.attributes = {};
}
/**
* Sets an arbitrary attribute on the span. Warning: use this wisely. Not all
* browsers support attributes the same, and having too many custom attributes
* is probably bad.
*/
span.prototype.setAttribute = function(attribute, value) {
this.attributes[attribute] = value;
};
/**
* Convert the span into an HTML node
*/
span.prototype.toNode = function() {
var span = document.createElement("span");
// Apply the class
span.className = createClass(this.classes);
// Apply inline styles
for (var style in this.style) {
if (Object.prototype.hasOwnProperty.call(this.style, style)) {
span.style[style] = this.style[style];
}
}
// Apply attributes
for (var attr in this.attributes) {
if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
span.setAttribute(attr, this.attributes[attr]);
}
}
// Append the children, also as HTML nodes
for (var i = 0; i < this.children.length; i++) {
span.appendChild(this.children[i].toNode());
}
return span;
};
/**
* Convert the span into an HTML markup string
*/
span.prototype.toMarkup = function() {
var markup = "<span";
// Add the class
if (this.classes.length) {
markup += " class=\"";
markup += utils.escape(createClass(this.classes));
markup += "\"";
}
var styles = "";
// Add the styles, after hyphenation
for (var style in this.style) {
if (this.style.hasOwnProperty(style)) {
styles += utils.hyphenate(style) + ":" + this.style[style] + ";";
}
}
if (styles) {
markup += " style=\"" + utils.escape(styles) + "\"";
}
// Add the attributes
for (var attr in this.attributes) {
if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
markup += " " + attr + "=\"";
markup += utils.escape(this.attributes[attr]);
markup += "\"";
}
}
markup += ">";
// Add the markup of the children, also as markup
for (var i = 0; i < this.children.length; i++) {
markup += this.children[i].toMarkup();
}
markup += "</span>";
return markup;
};
/**
* This node represents a document fragment, which contains elements, but when
* placed into the DOM doesn't have any representation itself. Thus, it only
* contains children and doesn't have any HTML properties. It also keeps track
* of a height, depth, and maxFontSize.
*/
function documentFragment(children, height, depth, maxFontSize) {
this.children = children || [];
this.height = height || 0;
this.depth = depth || 0;
this.maxFontSize = maxFontSize || 0;
}
/**
* Convert the fragment into a node
*/
documentFragment.prototype.toNode = function() {
// Create a fragment
var frag = document.createDocumentFragment();
// Append the children
for (var i = 0; i < this.children.length; i++) {
frag.appendChild(this.children[i].toNode());
}
return frag;
};
/**
* Convert the fragment into HTML markup
*/
documentFragment.prototype.toMarkup = function() {
var markup = "";
// Simply concatenate the markup for the children together
for (var i = 0; i < this.children.length; i++) {
markup += this.children[i].toMarkup();
}
return markup;
};
/**
* A symbol node contains information about a single symbol. It either renders
* to a single text node, or a span with a single text node in it, depending on
* whether it has CSS classes, styles, or needs italic correction.
*/
function symbolNode(value, height, depth, italic, skew, classes, style) {
this.value = value || "";
this.height = height || 0;
this.depth = depth || 0;
this.italic = italic || 0;
this.skew = skew || 0;
this.classes = classes || [];
this.style = style || {};
this.maxFontSize = 0;
}
/**
* Creates a text node or span from a symbol node. Note that a span is only
* created if it is needed.
*/
symbolNode.prototype.toNode = function() {
var node = document.createTextNode(this.value);
var span = null;
if (this.italic > 0) {
span = document.createElement("span");
span.style.marginRight = this.italic + "em";
}
if (this.classes.length > 0) {
span = span || document.createElement("span");
span.className = createClass(this.classes);
}
for (var style in this.style) {
if (this.style.hasOwnProperty(style)) {
span = span || document.createElement("span");
span.style[style] = this.style[style];
}
}
if (span) {
span.appendChild(node);
return span;
} else {
return node;
}
};
/**
* Creates markup for a symbol node.
*/
symbolNode.prototype.toMarkup = function() {
// TODO(alpert): More duplication than I'd like from
// span.prototype.toMarkup and symbolNode.prototype.toNode...
var needsSpan = false;
var markup = "<span";
if (this.classes.length) {
needsSpan = true;
markup += " class=\"";
markup += utils.escape(createClass(this.classes));
markup += "\"";
}
var styles = "";
if (this.italic > 0) {
styles += "margin-right:" + this.italic + "em;";
}
for (var style in this.style) {
if (this.style.hasOwnProperty(style)) {
styles += utils.hyphenate(style) + ":" + this.style[style] + ";";
}
}
if (styles) {
needsSpan = true;
markup += " style=\"" + utils.escape(styles) + "\"";
}
var escaped = utils.escape(this.value);
if (needsSpan) {
markup += ">";
markup += escaped;
markup += "</span>";
return markup;
} else {
return escaped;
}
};
module.exports = {
span: span,
documentFragment: documentFragment,
symbolNode: symbolNode,
};
/***/ }),
/* 162 */
/***/ (function(module, exports) {
/**
* This file contains a list of utility functions which are useful in other
* files.
*/
/**
* Provide an `indexOf` function which works in IE8, but defers to native if
* possible.
*/
var nativeIndexOf = Array.prototype.indexOf;
var indexOf = function(list, elem) {
if (list == null) {
return -1;
}
if (nativeIndexOf && list.indexOf === nativeIndexOf) {
return list.indexOf(elem);
}
var i = 0;
var l = list.length;
for (; i < l; i++) {
if (list[i] === elem) {
return i;
}
}
return -1;
};
/**
* Return whether an element is contained in a list
*/
var contains = function(list, elem) {
return indexOf(list, elem) !== -1;
};
/**
* Provide a default value if a setting is undefined
*/
var deflt = function(setting, defaultIfUndefined) {
return setting === undefined ? defaultIfUndefined : setting;
};
// hyphenate and escape adapted from Facebook's React under Apache 2 license
var uppercase = /([A-Z])/g;
var hyphenate = function(str) {
return str.replace(uppercase, "-$1").toLowerCase();
};
var ESCAPE_LOOKUP = {
"&": "&amp;",
">": "&gt;",
"<": "&lt;",
"\"": "&quot;",
"'": "&#x27;",
};
var ESCAPE_REGEX = /[&><"']/g;
function escaper(match) {
return ESCAPE_LOOKUP[match];
}
/**
* Escapes text to prevent scripting attacks.
*
* @param {*} text Text value to escape.
* @return {string} An escaped string.
*/
function escape(text) {
return ("" + text).replace(ESCAPE_REGEX, escaper);
}
/**
* A function to set the text content of a DOM element in all supported
* browsers. Note that we don't define this if there is no document.
*/
var setTextContent;
if (typeof document !== "undefined") {
var testNode = document.createElement("span");
if ("textContent" in testNode) {
setTextContent = function(node, text) {
node.textContent = text;
};
} else {
setTextContent = function(node, text) {
node.innerText = text;
};
}
}
/**
* A function to clear a node.
*/
function clearNode(node) {
setTextContent(node, "");
}
module.exports = {
contains: contains,
deflt: deflt,
escape: escape,
hyphenate: hyphenate,
indexOf: indexOf,
setTextContent: setTextContent,
clearNode: clearNode,
};
/***/ }),
/* 163 */
/***/ (function(module, exports, __webpack_require__) {
/* eslint no-unused-vars:0 */
var Style = __webpack_require__(159);
/**
* This file contains metrics regarding fonts and individual symbols. The sigma
* and xi variables, as well as the metricMap map contain data extracted from
* TeX, TeX font metrics, and the TTF files. These data are then exposed via the
* `metrics` variable and the getCharacterMetrics function.
*/
// These font metrics are extracted from TeX by using
// \font\a=cmmi10
// \showthe\fontdimenX\a
// where X is the corresponding variable number. These correspond to the font
// parameters of the symbol fonts. In TeX, there are actually three sets of
// dimensions, one for each of textstyle, scriptstyle, and scriptscriptstyle,
// but we only use the textstyle ones, and scale certain dimensions accordingly.
// See the TeXbook, page 441.
var sigma1 = 0.025;
var sigma2 = 0;
var sigma3 = 0;
var sigma4 = 0;
var sigma5 = 0.431;
var sigma6 = 1;
var sigma7 = 0;
var sigma8 = 0.677;
var sigma9 = 0.394;
var sigma10 = 0.444;
var sigma11 = 0.686;
var sigma12 = 0.345;
var sigma13 = 0.413;
var sigma14 = 0.363;
var sigma15 = 0.289;
var sigma16 = 0.150;
var sigma17 = 0.247;
var sigma18 = 0.386;
var sigma19 = 0.050;
var sigma20 = 2.390;
var sigma21 = 1.01;
var sigma21Script = 0.81;
var sigma21ScriptScript = 0.71;
var sigma22 = 0.250;
// These font metrics are extracted from TeX by using
// \font\a=cmex10
// \showthe\fontdimenX\a
// where X is the corresponding variable number. These correspond to the font
// parameters of the extension fonts (family 3). See the TeXbook, page 441.
var xi1 = 0;
var xi2 = 0;
var xi3 = 0;
var xi4 = 0;
var xi5 = 0.431;
var xi6 = 1;
var xi7 = 0;
var xi8 = 0.04;
var xi9 = 0.111;
var xi10 = 0.166;
var xi11 = 0.2;
var xi12 = 0.6;
var xi13 = 0.1;
// This value determines how large a pt is, for metrics which are defined in
// terms of pts.
// This value is also used in katex.less; if you change it make sure the values
// match.
var ptPerEm = 10.0;
// The space between adjacent `|` columns in an array definition. From
// `\showthe\doublerulesep` in LaTeX.
var doubleRuleSep = 2.0 / ptPerEm;
/**
* This is just a mapping from common names to real metrics
*/
var metrics = {
xHeight: sigma5,
quad: sigma6,
num1: sigma8,
num2: sigma9,
num3: sigma10,
denom1: sigma11,
denom2: sigma12,
sup1: sigma13,
sup2: sigma14,
sup3: sigma15,
sub1: sigma16,
sub2: sigma17,
supDrop: sigma18,
subDrop: sigma19,
axisHeight: sigma22,
defaultRuleThickness: xi8,
bigOpSpacing1: xi9,
bigOpSpacing2: xi10,
bigOpSpacing3: xi11,
bigOpSpacing4: xi12,
bigOpSpacing5: xi13,
ptPerEm: ptPerEm,
emPerEx: sigma5 / sigma6,
doubleRuleSep: doubleRuleSep,
// TODO(alpert): Missing parallel structure here. We should probably add
// style-specific metrics for all of these.
delim1: sigma20,
getDelim2: function(style) {
if (style.size === Style.TEXT.size) {
return sigma21;
} else if (style.size === Style.SCRIPT.size) {
return sigma21Script;
} else if (style.size === Style.SCRIPTSCRIPT.size) {
return sigma21ScriptScript;
}
throw new Error("Unexpected style size: " + style.size);
},
};
// This map contains a mapping from font name and character code to character
// metrics, including height, depth, italic correction, and skew (kern from the
// character to the corresponding \skewchar)
// This map is generated via `make metrics`. It should not be changed manually.
var metricMap = __webpack_require__(164);
/**
* This function is a convenience function for looking up information in the
* metricMap table. It takes a character as a string, and a style.
*
* Note: the `width` property may be undefined if fontMetricsData.js wasn't
* built using `Make extended_metrics`.
*/
var getCharacterMetrics = function(character, style) {
var metrics = metricMap[style][character.charCodeAt(0)];
if (metrics) {
return {
depth: metrics[0],
height: metrics[1],
italic: metrics[2],
skew: metrics[3],
width: metrics[4],
};
}
};
module.exports = {
metrics: metrics,
getCharacterMetrics: getCharacterMetrics,
};
/***/ }),
/* 164 */
/***/ (function(module, exports) {
module.exports = {
"AMS-Regular": {
"65": [0, 0.68889, 0, 0],
"66": [0, 0.68889, 0, 0],
"67": [0, 0.68889, 0, 0],
"68": [0, 0.68889, 0, 0],
"69": [0, 0.68889, 0, 0],
"70": [0, 0.68889, 0, 0],
"71": [0, 0.68889, 0, 0],
"72": [0, 0.68889, 0, 0],
"73": [0, 0.68889, 0, 0],
"74": [0.16667, 0.68889, 0, 0],
"75": [0, 0.68889, 0, 0],
"76": [0, 0.68889, 0, 0],
"77": [0, 0.68889, 0, 0],
"78": [0, 0.68889, 0, 0],
"79": [0.16667, 0.68889, 0, 0],
"80": [0, 0.68889, 0, 0],
"81": [0.16667, 0.68889, 0, 0],
"82": [0, 0.68889, 0, 0],
"83": [0, 0.68889, 0, 0],
"84": [0, 0.68889, 0, 0],
"85": [0, 0.68889, 0, 0],
"86": [0, 0.68889, 0, 0],
"87": [0, 0.68889, 0, 0],
"88": [0, 0.68889, 0, 0],
"89": [0, 0.68889, 0, 0],
"90": [0, 0.68889, 0, 0],
"107": [0, 0.68889, 0, 0],
"165": [0, 0.675, 0.025, 0],
"174": [0.15559, 0.69224, 0, 0],
"240": [0, 0.68889, 0, 0],
"295": [0, 0.68889, 0, 0],
"710": [0, 0.825, 0, 0],
"732": [0, 0.9, 0, 0],
"770": [0, 0.825, 0, 0],
"771": [0, 0.9, 0, 0],
"989": [0.08167, 0.58167, 0, 0],
"1008": [0, 0.43056, 0.04028, 0],
"8245": [0, 0.54986, 0, 0],
"8463": [0, 0.68889, 0, 0],
"8487": [0, 0.68889, 0, 0],
"8498": [0, 0.68889, 0, 0],
"8502": [0, 0.68889, 0, 0],
"8503": [0, 0.68889, 0, 0],
"8504": [0, 0.68889, 0, 0],
"8513": [0, 0.68889, 0, 0],
"8592": [-0.03598, 0.46402, 0, 0],
"8594": [-0.03598, 0.46402, 0, 0],
"8602": [-0.13313, 0.36687, 0, 0],
"8603": [-0.13313, 0.36687, 0, 0],
"8606": [0.01354, 0.52239, 0, 0],
"8608": [0.01354, 0.52239, 0, 0],
"8610": [0.01354, 0.52239, 0, 0],
"8611": [0.01354, 0.52239, 0, 0],
"8619": [0, 0.54986, 0, 0],
"8620": [0, 0.54986, 0, 0],
"8621": [-0.13313, 0.37788, 0, 0],
"8622": [-0.13313, 0.36687, 0, 0],
"8624": [0, 0.69224, 0, 0],
"8625": [0, 0.69224, 0, 0],
"8630": [0, 0.43056, 0, 0],
"8631": [0, 0.43056, 0, 0],
"8634": [0.08198, 0.58198, 0, 0],
"8635": [0.08198, 0.58198, 0, 0],
"8638": [0.19444, 0.69224, 0, 0],
"8639": [0.19444, 0.69224, 0, 0],
"8642": [0.19444, 0.69224, 0, 0],
"8643": [0.19444, 0.69224, 0, 0],
"8644": [0.1808, 0.675, 0, 0],
"8646": [0.1808, 0.675, 0, 0],
"8647": [0.1808, 0.675, 0, 0],
"8648": [0.19444, 0.69224, 0, 0],
"8649": [0.1808, 0.675, 0, 0],
"8650": [0.19444, 0.69224, 0, 0],
"8651": [0.01354, 0.52239, 0, 0],
"8652": [0.01354, 0.52239, 0, 0],
"8653": [-0.13313, 0.36687, 0, 0],
"8654": [-0.13313, 0.36687, 0, 0],
"8655": [-0.13313, 0.36687, 0, 0],
"8666": [0.13667, 0.63667, 0, 0],
"8667": [0.13667, 0.63667, 0, 0],
"8669": [-0.13313, 0.37788, 0, 0],
"8672": [-0.064, 0.437, 0, 0],
"8674": [-0.064, 0.437, 0, 0],
"8705": [0, 0.825, 0, 0],
"8708": [0, 0.68889, 0, 0],
"8709": [0.08167, 0.58167, 0, 0],
"8717": [0, 0.43056, 0, 0],
"8722": [-0.03598, 0.46402, 0, 0],
"8724": [0.08198, 0.69224, 0, 0],
"8726": [0.08167, 0.58167, 0, 0],
"8733": [0, 0.69224, 0, 0],
"8736": [0, 0.69224, 0, 0],
"8737": [0, 0.69224, 0, 0],
"8738": [0.03517, 0.52239, 0, 0],
"8739": [0.08167, 0.58167, 0, 0],
"8740": [0.25142, 0.74111, 0, 0],
"8741": [0.08167, 0.58167, 0, 0],
"8742": [0.25142, 0.74111, 0, 0],
"8756": [0, 0.69224, 0, 0],
"8757": [0, 0.69224, 0, 0],
"8764": [-0.13313, 0.36687, 0, 0],
"8765": [-0.13313, 0.37788, 0, 0],
"8769": [-0.13313, 0.36687, 0, 0],
"8770": [-0.03625, 0.46375, 0, 0],
"8774": [0.30274, 0.79383, 0, 0],
"8776": [-0.01688, 0.48312, 0, 0],
"8778": [0.08167, 0.58167, 0, 0],
"8782": [0.06062, 0.54986, 0, 0],
"8783": [0.06062, 0.54986, 0, 0],
"8785": [0.08198, 0.58198, 0, 0],
"8786": [0.08198, 0.58198, 0, 0],
"8787": [0.08198, 0.58198, 0, 0],
"8790": [0, 0.69224, 0, 0],
"8791": [0.22958, 0.72958, 0, 0],
"8796": [0.08198, 0.91667, 0, 0],
"8806": [0.25583, 0.75583, 0, 0],
"8807": [0.25583, 0.75583, 0, 0],
"8808": [0.25142, 0.75726, 0, 0],
"8809": [0.25142, 0.75726, 0, 0],
"8812": [0.25583, 0.75583, 0, 0],
"8814": [0.20576, 0.70576, 0, 0],
"8815": [0.20576, 0.70576, 0, 0],
"8816": [0.30274, 0.79383, 0, 0],
"8817": [0.30274, 0.79383, 0, 0],
"8818": [0.22958, 0.72958, 0, 0],
"8819": [0.22958, 0.72958, 0, 0],
"8822": [0.1808, 0.675, 0, 0],
"8823": [0.1808, 0.675, 0, 0],
"8828": [0.13667, 0.63667, 0, 0],
"8829": [0.13667, 0.63667, 0, 0],
"8830": [0.22958, 0.72958, 0, 0],
"8831": [0.22958, 0.72958, 0, 0],
"8832": [0.20576, 0.70576, 0, 0],
"8833": [0.20576, 0.70576, 0, 0],
"8840": [0.30274, 0.79383, 0, 0],
"8841": [0.30274, 0.79383, 0, 0],
"8842": [0.13597, 0.63597, 0, 0],
"8843": [0.13597, 0.63597, 0, 0],
"8847": [0.03517, 0.54986, 0, 0],
"8848": [0.03517, 0.54986, 0, 0],
"8858": [0.08198, 0.58198, 0, 0],
"8859": [0.08198, 0.58198, 0, 0],
"8861": [0.08198, 0.58198, 0, 0],
"8862": [0, 0.675, 0, 0],
"8863": [0, 0.675, 0, 0],
"8864": [0, 0.675, 0, 0],
"8865": [0, 0.675, 0, 0],
"8872": [0, 0.69224, 0, 0],
"8873": [0, 0.69224, 0, 0],
"8874": [0, 0.69224, 0, 0],
"8876": [0, 0.68889, 0, 0],
"8877": [0, 0.68889, 0, 0],
"8878": [0, 0.68889, 0, 0],
"8879": [0, 0.68889, 0, 0],
"8882": [0.03517, 0.54986, 0, 0],
"8883": [0.03517, 0.54986, 0, 0],
"8884": [0.13667, 0.63667, 0, 0],
"8885": [0.13667, 0.63667, 0, 0],
"8888": [0, 0.54986, 0, 0],
"8890": [0.19444, 0.43056, 0, 0],
"8891": [0.19444, 0.69224, 0, 0],
"8892": [0.19444, 0.69224, 0, 0],
"8901": [0, 0.54986, 0, 0],
"8903": [0.08167, 0.58167, 0, 0],
"8905": [0.08167, 0.58167, 0, 0],
"8906": [0.08167, 0.58167, 0, 0],
"8907": [0, 0.69224, 0, 0],
"8908": [0, 0.69224, 0, 0],
"8909": [-0.03598, 0.46402, 0, 0],
"8910": [0, 0.54986, 0, 0],
"8911": [0, 0.54986, 0, 0],
"8912": [0.03517, 0.54986, 0, 0],
"8913": [0.03517, 0.54986, 0, 0],
"8914": [0, 0.54986, 0, 0],
"8915": [0, 0.54986, 0, 0],
"8916": [0, 0.69224, 0, 0],
"8918": [0.0391, 0.5391, 0, 0],
"8919": [0.0391, 0.5391, 0, 0],
"8920": [0.03517, 0.54986, 0, 0],
"8921": [0.03517, 0.54986, 0, 0],
"8922": [0.38569, 0.88569, 0, 0],
"8923": [0.38569, 0.88569, 0, 0],
"8926": [0.13667, 0.63667, 0, 0],
"8927": [0.13667, 0.63667, 0, 0],
"8928": [0.30274, 0.79383, 0, 0],
"8929": [0.30274, 0.79383, 0, 0],
"8934": [0.23222, 0.74111, 0, 0],
"8935": [0.23222, 0.74111, 0, 0],
"8936": [0.23222, 0.74111, 0, 0],
"8937": [0.23222, 0.74111, 0, 0],
"8938": [0.20576, 0.70576, 0, 0],
"8939": [0.20576, 0.70576, 0, 0],
"8940": [0.30274, 0.79383, 0, 0],
"8941": [0.30274, 0.79383, 0, 0],
"8994": [0.19444, 0.69224, 0, 0],
"8995": [0.19444, 0.69224, 0, 0],
"9416": [0.15559, 0.69224, 0, 0],
"9484": [0, 0.69224, 0, 0],
"9488": [0, 0.69224, 0, 0],
"9492": [0, 0.37788, 0, 0],
"9496": [0, 0.37788, 0, 0],
"9585": [0.19444, 0.68889, 0, 0],
"9586": [0.19444, 0.74111, 0, 0],
"9632": [0, 0.675, 0, 0],
"9633": [0, 0.675, 0, 0],
"9650": [0, 0.54986, 0, 0],
"9651": [0, 0.54986, 0, 0],
"9654": [0.03517, 0.54986, 0, 0],
"9660": [0, 0.54986, 0, 0],
"9661": [0, 0.54986, 0, 0],
"9664": [0.03517, 0.54986, 0, 0],
"9674": [0.11111, 0.69224, 0, 0],
"9733": [0.19444, 0.69224, 0, 0],
"10003": [0, 0.69224, 0, 0],
"10016": [0, 0.69224, 0, 0],
"10731": [0.11111, 0.69224, 0, 0],
"10846": [0.19444, 0.75583, 0, 0],
"10877": [0.13667, 0.63667, 0, 0],
"10878": [0.13667, 0.63667, 0, 0],
"10885": [0.25583, 0.75583, 0, 0],
"10886": [0.25583, 0.75583, 0, 0],
"10887": [0.13597, 0.63597, 0, 0],
"10888": [0.13597, 0.63597, 0, 0],
"10889": [0.26167, 0.75726, 0, 0],
"10890": [0.26167, 0.75726, 0, 0],
"10891": [0.48256, 0.98256, 0, 0],
"10892": [0.48256, 0.98256, 0, 0],
"10901": [0.13667, 0.63667, 0, 0],
"10902": [0.13667, 0.63667, 0, 0],
"10933": [0.25142, 0.75726, 0, 0],
"10934": [0.25142, 0.75726, 0, 0],
"10935": [0.26167, 0.75726, 0, 0],
"10936": [0.26167, 0.75726, 0, 0],
"10937": [0.26167, 0.75726, 0, 0],
"10938": [0.26167, 0.75726, 0, 0],
"10949": [0.25583, 0.75583, 0, 0],
"10950": [0.25583, 0.75583, 0, 0],
"10955": [0.28481, 0.79383, 0, 0],
"10956": [0.28481, 0.79383, 0, 0],
"57350": [0.08167, 0.58167, 0, 0],
"57351": [0.08167, 0.58167, 0, 0],
"57352": [0.08167, 0.58167, 0, 0],
"57353": [0, 0.43056, 0.04028, 0],
"57356": [0.25142, 0.75726, 0, 0],
"57357": [0.25142, 0.75726, 0, 0],
"57358": [0.41951, 0.91951, 0, 0],
"57359": [0.30274, 0.79383, 0, 0],
"57360": [0.30274, 0.79383, 0, 0],
"57361": [0.41951, 0.91951, 0, 0],
"57366": [0.25142, 0.75726, 0, 0],
"57367": [0.25142, 0.75726, 0, 0],
"57368": [0.25142, 0.75726, 0, 0],
"57369": [0.25142, 0.75726, 0, 0],
"57370": [0.13597, 0.63597, 0, 0],
"57371": [0.13597, 0.63597, 0, 0],
},
"Caligraphic-Regular": {
"48": [0, 0.43056, 0, 0],
"49": [0, 0.43056, 0, 0],
"50": [0, 0.43056, 0, 0],
"51": [0.19444, 0.43056, 0, 0],
"52": [0.19444, 0.43056, 0, 0],
"53": [0.19444, 0.43056, 0, 0],
"54": [0, 0.64444, 0, 0],
"55": [0.19444, 0.43056, 0, 0],
"56": [0, 0.64444, 0, 0],
"57": [0.19444, 0.43056, 0, 0],
"65": [0, 0.68333, 0, 0.19445],
"66": [0, 0.68333, 0.03041, 0.13889],
"67": [0, 0.68333, 0.05834, 0.13889],
"68": [0, 0.68333, 0.02778, 0.08334],
"69": [0, 0.68333, 0.08944, 0.11111],
"70": [0, 0.68333, 0.09931, 0.11111],
"71": [0.09722, 0.68333, 0.0593, 0.11111],
"72": [0, 0.68333, 0.00965, 0.11111],
"73": [0, 0.68333, 0.07382, 0],
"74": [0.09722, 0.68333, 0.18472, 0.16667],
"75": [0, 0.68333, 0.01445, 0.05556],
"76": [0, 0.68333, 0, 0.13889],
"77": [0, 0.68333, 0, 0.13889],
"78": [0, 0.68333, 0.14736, 0.08334],
"79": [0, 0.68333, 0.02778, 0.11111],
"80": [0, 0.68333, 0.08222, 0.08334],
"81": [0.09722, 0.68333, 0, 0.11111],
"82": [0, 0.68333, 0, 0.08334],
"83": [0, 0.68333, 0.075, 0.13889],
"84": [0, 0.68333, 0.25417, 0],
"85": [0, 0.68333, 0.09931, 0.08334],
"86": [0, 0.68333, 0.08222, 0],
"87": [0, 0.68333, 0.08222, 0.08334],
"88": [0, 0.68333, 0.14643, 0.13889],
"89": [0.09722, 0.68333, 0.08222, 0.08334],
"90": [0, 0.68333, 0.07944, 0.13889],
},
"Fraktur-Regular": {
"33": [0, 0.69141, 0, 0],
"34": [0, 0.69141, 0, 0],
"38": [0, 0.69141, 0, 0],
"39": [0, 0.69141, 0, 0],
"40": [0.24982, 0.74947, 0, 0],
"41": [0.24982, 0.74947, 0, 0],
"42": [0, 0.62119, 0, 0],
"43": [0.08319, 0.58283, 0, 0],
"44": [0, 0.10803, 0, 0],
"45": [0.08319, 0.58283, 0, 0],
"46": [0, 0.10803, 0, 0],
"47": [0.24982, 0.74947, 0, 0],
"48": [0, 0.47534, 0, 0],
"49": [0, 0.47534, 0, 0],
"50": [0, 0.47534, 0, 0],
"51": [0.18906, 0.47534, 0, 0],
"52": [0.18906, 0.47534, 0, 0],
"53": [0.18906, 0.47534, 0, 0],
"54": [0, 0.69141, 0, 0],
"55": [0.18906, 0.47534, 0, 0],
"56": [0, 0.69141, 0, 0],
"57": [0.18906, 0.47534, 0, 0],
"58": [0, 0.47534, 0, 0],
"59": [0.12604, 0.47534, 0, 0],
"61": [-0.13099, 0.36866, 0, 0],
"63": [0, 0.69141, 0, 0],
"65": [0, 0.69141, 0, 0],
"66": [0, 0.69141, 0, 0],
"67": [0, 0.69141, 0, 0],
"68": [0, 0.69141, 0, 0],
"69": [0, 0.69141, 0, 0],
"70": [0.12604, 0.69141, 0, 0],
"71": [0, 0.69141, 0, 0],
"72": [0.06302, 0.69141, 0, 0],
"73": [0, 0.69141, 0, 0],
"74": [0.12604, 0.69141, 0, 0],
"75": [0, 0.69141, 0, 0],
"76": [0, 0.69141, 0, 0],
"77": [0, 0.69141, 0, 0],
"78": [0, 0.69141, 0, 0],
"79": [0, 0.69141, 0, 0],
"80": [0.18906, 0.69141, 0, 0],
"81": [0.03781, 0.69141, 0, 0],
"82": [0, 0.69141, 0, 0],
"83": [0, 0.69141, 0, 0],
"84": [0, 0.69141, 0, 0],
"85": [0, 0.69141, 0, 0],
"86": [0, 0.69141, 0, 0],
"87": [0, 0.69141, 0, 0],
"88": [0, 0.69141, 0, 0],
"89": [0.18906, 0.69141, 0, 0],
"90": [0.12604, 0.69141, 0, 0],
"91": [0.24982, 0.74947, 0, 0],
"93": [0.24982, 0.74947, 0, 0],
"94": [0, 0.69141, 0, 0],
"97": [0, 0.47534, 0, 0],
"98": [0, 0.69141, 0, 0],
"99": [0, 0.47534, 0, 0],
"100": [0, 0.62119, 0, 0],
"101": [0, 0.47534, 0, 0],
"102": [0.18906, 0.69141, 0, 0],
"103": [0.18906, 0.47534, 0, 0],
"104": [0.18906, 0.69141, 0, 0],
"105": [0, 0.69141, 0, 0],
"106": [0, 0.69141, 0, 0],
"107": [0, 0.69141, 0, 0],
"108": [0, 0.69141, 0, 0],
"109": [0, 0.47534, 0, 0],
"110": [0, 0.47534, 0, 0],
"111": [0, 0.47534, 0, 0],
"112": [0.18906, 0.52396, 0, 0],
"113": [0.18906, 0.47534, 0, 0],
"114": [0, 0.47534, 0, 0],
"115": [0, 0.47534, 0, 0],
"116": [0, 0.62119, 0, 0],
"117": [0, 0.47534, 0, 0],
"118": [0, 0.52396, 0, 0],
"119": [0, 0.52396, 0, 0],
"120": [0.18906, 0.47534, 0, 0],
"121": [0.18906, 0.47534, 0, 0],
"122": [0.18906, 0.47534, 0, 0],
"8216": [0, 0.69141, 0, 0],
"8217": [0, 0.69141, 0, 0],
"58112": [0, 0.62119, 0, 0],
"58113": [0, 0.62119, 0, 0],
"58114": [0.18906, 0.69141, 0, 0],
"58115": [0.18906, 0.69141, 0, 0],
"58116": [0.18906, 0.47534, 0, 0],
"58117": [0, 0.69141, 0, 0],
"58118": [0, 0.62119, 0, 0],
"58119": [0, 0.47534, 0, 0],
},
"Main-Bold": {
"33": [0, 0.69444, 0, 0],
"34": [0, 0.69444, 0, 0],
"35": [0.19444, 0.69444, 0, 0],
"36": [0.05556, 0.75, 0, 0],
"37": [0.05556, 0.75, 0, 0],
"38": [0, 0.69444, 0, 0],
"39": [0, 0.69444, 0, 0],
"40": [0.25, 0.75, 0, 0],
"41": [0.25, 0.75, 0, 0],
"42": [0, 0.75, 0, 0],
"43": [0.13333, 0.63333, 0, 0],
"44": [0.19444, 0.15556, 0, 0],
"45": [0, 0.44444, 0, 0],
"46": [0, 0.15556, 0, 0],
"47": [0.25, 0.75, 0, 0],
"48": [0, 0.64444, 0, 0],
"49": [0, 0.64444, 0, 0],
"50": [0, 0.64444, 0, 0],
"51": [0, 0.64444, 0, 0],
"52": [0, 0.64444, 0, 0],
"53": [0, 0.64444, 0, 0],
"54": [0, 0.64444, 0, 0],
"55": [0, 0.64444, 0, 0],
"56": [0, 0.64444, 0, 0],
"57": [0, 0.64444, 0, 0],
"58": [0, 0.44444, 0, 0],
"59": [0.19444, 0.44444, 0, 0],
"60": [0.08556, 0.58556, 0, 0],
"61": [-0.10889, 0.39111, 0, 0],
"62": [0.08556, 0.58556, 0, 0],
"63": [0, 0.69444, 0, 0],
"64": [0, 0.69444, 0, 0],
"65": [0, 0.68611, 0, 0],
"66": [0, 0.68611, 0, 0],
"67": [0, 0.68611, 0, 0],
"68": [0, 0.68611, 0, 0],
"69": [0, 0.68611, 0, 0],
"70": [0, 0.68611, 0, 0],
"71": [0, 0.68611, 0, 0],
"72": [0, 0.68611, 0, 0],
"73": [0, 0.68611, 0, 0],
"74": [0, 0.68611, 0, 0],
"75": [0, 0.68611, 0, 0],
"76": [0, 0.68611, 0, 0],
"77": [0, 0.68611, 0, 0],
"78": [0, 0.68611, 0, 0],
"79": [0, 0.68611, 0, 0],
"80": [0, 0.68611, 0, 0],
"81": [0.19444, 0.68611, 0, 0],
"82": [0, 0.68611, 0, 0],
"83": [0, 0.68611, 0, 0],
"84": [0, 0.68611, 0, 0],
"85": [0, 0.68611, 0, 0],
"86": [0, 0.68611, 0.01597, 0],
"87": [0, 0.68611, 0.01597, 0],
"88": [0, 0.68611, 0, 0],
"89": [0, 0.68611, 0.02875, 0],
"90": [0, 0.68611, 0, 0],
"91": [0.25, 0.75, 0, 0],
"92": [0.25, 0.75, 0, 0],
"93": [0.25, 0.75, 0, 0],
"94": [0, 0.69444, 0, 0],
"95": [0.31, 0.13444, 0.03194, 0],
"96": [0, 0.69444, 0, 0],
"97": [0, 0.44444, 0, 0],
"98": [0, 0.69444, 0, 0],
"99": [0, 0.44444, 0, 0],
"100": [0, 0.69444, 0, 0],
"101": [0, 0.44444, 0, 0],
"102": [0, 0.69444, 0.10903, 0],
"103": [0.19444, 0.44444, 0.01597, 0],
"104": [0, 0.69444, 0, 0],
"105": [0, 0.69444, 0, 0],
"106": [0.19444, 0.69444, 0, 0],
"107": [0, 0.69444, 0, 0],
"108": [0, 0.69444, 0, 0],
"109": [0, 0.44444, 0, 0],
"110": [0, 0.44444, 0, 0],
"111": [0, 0.44444, 0, 0],
"112": [0.19444, 0.44444, 0, 0],
"113": [0.19444, 0.44444, 0, 0],
"114": [0, 0.44444, 0, 0],
"115": [0, 0.44444, 0, 0],
"116": [0, 0.63492, 0, 0],
"117": [0, 0.44444, 0, 0],
"118": [0, 0.44444, 0.01597, 0],
"119": [0, 0.44444, 0.01597, 0],
"120": [0, 0.44444, 0, 0],
"121": [0.19444, 0.44444, 0.01597, 0],
"122": [0, 0.44444, 0, 0],
"123": [0.25, 0.75, 0, 0],
"124": [0.25, 0.75, 0, 0],
"125": [0.25, 0.75, 0, 0],
"126": [0.35, 0.34444, 0, 0],
"168": [0, 0.69444, 0, 0],
"172": [0, 0.44444, 0, 0],
"175": [0, 0.59611, 0, 0],
"176": [0, 0.69444, 0, 0],
"177": [0.13333, 0.63333, 0, 0],
"180": [0, 0.69444, 0, 0],
"215": [0.13333, 0.63333, 0, 0],
"247": [0.13333, 0.63333, 0, 0],
"305": [0, 0.44444, 0, 0],
"567": [0.19444, 0.44444, 0, 0],
"710": [0, 0.69444, 0, 0],
"711": [0, 0.63194, 0, 0],
"713": [0, 0.59611, 0, 0],
"714": [0, 0.69444, 0, 0],
"715": [0, 0.69444, 0, 0],
"728": [0, 0.69444, 0, 0],
"729": [0, 0.69444, 0, 0],
"730": [0, 0.69444, 0, 0],
"732": [0, 0.69444, 0, 0],
"768": [0, 0.69444, 0, 0],
"769": [0, 0.69444, 0, 0],
"770": [0, 0.69444, 0, 0],
"771": [0, 0.69444, 0, 0],
"772": [0, 0.59611, 0, 0],
"774": [0, 0.69444, 0, 0],
"775": [0, 0.69444, 0, 0],
"776": [0, 0.69444, 0, 0],
"778": [0, 0.69444, 0, 0],
"779": [0, 0.69444, 0, 0],
"780": [0, 0.63194, 0, 0],
"824": [0.19444, 0.69444, 0, 0],
"915": [0, 0.68611, 0, 0],
"916": [0, 0.68611, 0, 0],
"920": [0, 0.68611, 0, 0],
"923": [0, 0.68611, 0, 0],
"926": [0, 0.68611, 0, 0],
"928": [0, 0.68611, 0, 0],
"931": [0, 0.68611, 0, 0],
"933": [0, 0.68611, 0, 0],
"934": [0, 0.68611, 0, 0],
"936": [0, 0.68611, 0, 0],
"937": [0, 0.68611, 0, 0],
"8211": [0, 0.44444, 0.03194, 0],
"8212": [0, 0.44444, 0.03194, 0],
"8216": [0, 0.69444, 0, 0],
"8217": [0, 0.69444, 0, 0],
"8220": [0, 0.69444, 0, 0],
"8221": [0, 0.69444, 0, 0],
"8224": [0.19444, 0.69444, 0, 0],
"8225": [0.19444, 0.69444, 0, 0],
"8242": [0, 0.55556, 0, 0],
"8407": [0, 0.72444, 0.15486, 0],
"8463": [0, 0.69444, 0, 0],
"8465": [0, 0.69444, 0, 0],
"8467": [0, 0.69444, 0, 0],
"8472": [0.19444, 0.44444, 0, 0],
"8476": [0, 0.69444, 0, 0],
"8501": [0, 0.69444, 0, 0],
"8592": [-0.10889, 0.39111, 0, 0],
"8593": [0.19444, 0.69444, 0, 0],
"8594": [-0.10889, 0.39111, 0, 0],
"8595": [0.19444, 0.69444, 0, 0],
"8596": [-0.10889, 0.39111, 0, 0],
"8597": [0.25, 0.75, 0, 0],
"8598": [0.19444, 0.69444, 0, 0],
"8599": [0.19444, 0.69444, 0, 0],
"8600": [0.19444, 0.69444, 0, 0],
"8601": [0.19444, 0.69444, 0, 0],
"8636": [-0.10889, 0.39111, 0, 0],
"8637": [-0.10889, 0.39111, 0, 0],
"8640": [-0.10889, 0.39111, 0, 0],
"8641": [-0.10889, 0.39111, 0, 0],
"8656": [-0.10889, 0.39111, 0, 0],
"8657": [0.19444, 0.69444, 0, 0],
"8658": [-0.10889, 0.39111, 0, 0],
"8659": [0.19444, 0.69444, 0, 0],
"8660": [-0.10889, 0.39111, 0, 0],
"8661": [0.25, 0.75, 0, 0],
"8704": [0, 0.69444, 0, 0],
"8706": [0, 0.69444, 0.06389, 0],
"8707": [0, 0.69444, 0, 0],
"8709": [0.05556, 0.75, 0, 0],
"8711": [0, 0.68611, 0, 0],
"8712": [0.08556, 0.58556, 0, 0],
"8715": [0.08556, 0.58556, 0, 0],
"8722": [0.13333, 0.63333, 0, 0],
"8723": [0.13333, 0.63333, 0, 0],
"8725": [0.25, 0.75, 0, 0],
"8726": [0.25, 0.75, 0, 0],
"8727": [-0.02778, 0.47222, 0, 0],
"8728": [-0.02639, 0.47361, 0, 0],
"8729": [-0.02639, 0.47361, 0, 0],
"8730": [0.18, 0.82, 0, 0],
"8733": [0, 0.44444, 0, 0],
"8734": [0, 0.44444, 0, 0],
"8736": [0, 0.69224, 0, 0],
"8739": [0.25, 0.75, 0, 0],
"8741": [0.25, 0.75, 0, 0],
"8743": [0, 0.55556, 0, 0],
"8744": [0, 0.55556, 0, 0],
"8745": [0, 0.55556, 0, 0],
"8746": [0, 0.55556, 0, 0],
"8747": [0.19444, 0.69444, 0.12778, 0],
"8764": [-0.10889, 0.39111, 0, 0],
"8768": [0.19444, 0.69444, 0, 0],
"8771": [0.00222, 0.50222, 0, 0],
"8776": [0.02444, 0.52444, 0, 0],
"8781": [0.00222, 0.50222, 0, 0],
"8801": [0.00222, 0.50222, 0, 0],
"8804": [0.19667, 0.69667, 0, 0],
"8805": [0.19667, 0.69667, 0, 0],
"8810": [0.08556, 0.58556, 0, 0],
"8811": [0.08556, 0.58556, 0, 0],
"8826": [0.08556, 0.58556, 0, 0],
"8827": [0.08556, 0.58556, 0, 0],
"8834": [0.08556, 0.58556, 0, 0],
"8835": [0.08556, 0.58556, 0, 0],
"8838": [0.19667, 0.69667, 0, 0],
"8839": [0.19667, 0.69667, 0, 0],
"8846": [0, 0.55556, 0, 0],
"8849": [0.19667, 0.69667, 0, 0],
"8850": [0.19667, 0.69667, 0, 0],
"8851": [0, 0.55556, 0, 0],
"8852": [0, 0.55556, 0, 0],
"8853": [0.13333, 0.63333, 0, 0],
"8854": [0.13333, 0.63333, 0, 0],
"8855": [0.13333, 0.63333, 0, 0],
"8856": [0.13333, 0.63333, 0, 0],
"8857": [0.13333, 0.63333, 0, 0],
"8866": [0, 0.69444, 0, 0],
"8867": [0, 0.69444, 0, 0],
"8868": [0, 0.69444, 0, 0],
"8869": [0, 0.69444, 0, 0],
"8900": [-0.02639, 0.47361, 0, 0],
"8901": [-0.02639, 0.47361, 0, 0],
"8902": [-0.02778, 0.47222, 0, 0],
"8968": [0.25, 0.75, 0, 0],
"8969": [0.25, 0.75, 0, 0],
"8970": [0.25, 0.75, 0, 0],
"8971": [0.25, 0.75, 0, 0],
"8994": [-0.13889, 0.36111, 0, 0],
"8995": [-0.13889, 0.36111, 0, 0],
"9651": [0.19444, 0.69444, 0, 0],
"9657": [-0.02778, 0.47222, 0, 0],
"9661": [0.19444, 0.69444, 0, 0],
"9667": [-0.02778, 0.47222, 0, 0],
"9711": [0.19444, 0.69444, 0, 0],
"9824": [0.12963, 0.69444, 0, 0],
"9825": [0.12963, 0.69444, 0, 0],
"9826": [0.12963, 0.69444, 0, 0],
"9827": [0.12963, 0.69444, 0, 0],
"9837": [0, 0.75, 0, 0],
"9838": [0.19444, 0.69444, 0, 0],
"9839": [0.19444, 0.69444, 0, 0],
"10216": [0.25, 0.75, 0, 0],
"10217": [0.25, 0.75, 0, 0],
"10815": [0, 0.68611, 0, 0],
"10927": [0.19667, 0.69667, 0, 0],
"10928": [0.19667, 0.69667, 0, 0],
},
"Main-Italic": {
"33": [0, 0.69444, 0.12417, 0],
"34": [0, 0.69444, 0.06961, 0],
"35": [0.19444, 0.69444, 0.06616, 0],
"37": [0.05556, 0.75, 0.13639, 0],
"38": [0, 0.69444, 0.09694, 0],
"39": [0, 0.69444, 0.12417, 0],
"40": [0.25, 0.75, 0.16194, 0],
"41": [0.25, 0.75, 0.03694, 0],
"42": [0, 0.75, 0.14917, 0],
"43": [0.05667, 0.56167, 0.03694, 0],
"44": [0.19444, 0.10556, 0, 0],
"45": [0, 0.43056, 0.02826, 0],
"46": [0, 0.10556, 0, 0],
"47": [0.25, 0.75, 0.16194, 0],
"48": [0, 0.64444, 0.13556, 0],
"49": [0, 0.64444, 0.13556, 0],
"50": [0, 0.64444, 0.13556, 0],
"51": [0, 0.64444, 0.13556, 0],
"52": [0.19444, 0.64444, 0.13556, 0],
"53": [0, 0.64444, 0.13556, 0],
"54": [0, 0.64444, 0.13556, 0],
"55": [0.19444, 0.64444, 0.13556, 0],
"56": [0, 0.64444, 0.13556, 0],
"57": [0, 0.64444, 0.13556, 0],
"58": [0, 0.43056, 0.0582, 0],
"59": [0.19444, 0.43056, 0.0582, 0],
"61": [-0.13313, 0.36687, 0.06616, 0],
"63": [0, 0.69444, 0.1225, 0],
"64": [0, 0.69444, 0.09597, 0],
"65": [0, 0.68333, 0, 0],
"66": [0, 0.68333, 0.10257, 0],
"67": [0, 0.68333, 0.14528, 0],
"68": [0, 0.68333, 0.09403, 0],
"69": [0, 0.68333, 0.12028, 0],
"70": [0, 0.68333, 0.13305, 0],
"71": [0, 0.68333, 0.08722, 0],
"72": [0, 0.68333, 0.16389, 0],
"73": [0, 0.68333, 0.15806, 0],
"74": [0, 0.68333, 0.14028, 0],
"75": [0, 0.68333, 0.14528, 0],
"76": [0, 0.68333, 0, 0],
"77": [0, 0.68333, 0.16389, 0],
"78": [0, 0.68333, 0.16389, 0],
"79": [0, 0.68333, 0.09403, 0],
"80": [0, 0.68333, 0.10257, 0],
"81": [0.19444, 0.68333, 0.09403, 0],
"82": [0, 0.68333, 0.03868, 0],
"83": [0, 0.68333, 0.11972, 0],
"84": [0, 0.68333, 0.13305, 0],
"85": [0, 0.68333, 0.16389, 0],
"86": [0, 0.68333, 0.18361, 0],
"87": [0, 0.68333, 0.18361, 0],
"88": [0, 0.68333, 0.15806, 0],
"89": [0, 0.68333, 0.19383, 0],
"90": [0, 0.68333, 0.14528, 0],
"91": [0.25, 0.75, 0.1875, 0],
"93": [0.25, 0.75, 0.10528, 0],
"94": [0, 0.69444, 0.06646, 0],
"95": [0.31, 0.12056, 0.09208, 0],
"97": [0, 0.43056, 0.07671, 0],
"98": [0, 0.69444, 0.06312, 0],
"99": [0, 0.43056, 0.05653, 0],
"100": [0, 0.69444, 0.10333, 0],
"101": [0, 0.43056, 0.07514, 0],
"102": [0.19444, 0.69444, 0.21194, 0],
"103": [0.19444, 0.43056, 0.08847, 0],
"104": [0, 0.69444, 0.07671, 0],
"105": [0, 0.65536, 0.1019, 0],
"106": [0.19444, 0.65536, 0.14467, 0],
"107": [0, 0.69444, 0.10764, 0],
"108": [0, 0.69444, 0.10333, 0],
"109": [0, 0.43056, 0.07671, 0],
"110": [0, 0.43056, 0.07671, 0],
"111": [0, 0.43056, 0.06312, 0],
"112": [0.19444, 0.43056, 0.06312, 0],
"113": [0.19444, 0.43056, 0.08847, 0],
"114": [0, 0.43056, 0.10764, 0],
"115": [0, 0.43056, 0.08208, 0],
"116": [0, 0.61508, 0.09486, 0],
"117": [0, 0.43056, 0.07671, 0],
"118": [0, 0.43056, 0.10764, 0],
"119": [0, 0.43056, 0.10764, 0],
"120": [0, 0.43056, 0.12042, 0],
"121": [0.19444, 0.43056, 0.08847, 0],
"122": [0, 0.43056, 0.12292, 0],
"126": [0.35, 0.31786, 0.11585, 0],
"163": [0, 0.69444, 0, 0],
"305": [0, 0.43056, 0, 0.02778],
"567": [0.19444, 0.43056, 0, 0.08334],
"768": [0, 0.69444, 0, 0],
"769": [0, 0.69444, 0.09694, 0],
"770": [0, 0.69444, 0.06646, 0],
"771": [0, 0.66786, 0.11585, 0],
"772": [0, 0.56167, 0.10333, 0],
"774": [0, 0.69444, 0.10806, 0],
"775": [0, 0.66786, 0.11752, 0],
"776": [0, 0.66786, 0.10474, 0],
"778": [0, 0.69444, 0, 0],
"779": [0, 0.69444, 0.1225, 0],
"780": [0, 0.62847, 0.08295, 0],
"915": [0, 0.68333, 0.13305, 0],
"916": [0, 0.68333, 0, 0],
"920": [0, 0.68333, 0.09403, 0],
"923": [0, 0.68333, 0, 0],
"926": [0, 0.68333, 0.15294, 0],
"928": [0, 0.68333, 0.16389, 0],
"931": [0, 0.68333, 0.12028, 0],
"933": [0, 0.68333, 0.11111, 0],
"934": [0, 0.68333, 0.05986, 0],
"936": [0, 0.68333, 0.11111, 0],
"937": [0, 0.68333, 0.10257, 0],
"8211": [0, 0.43056, 0.09208, 0],
"8212": [0, 0.43056, 0.09208, 0],
"8216": [0, 0.69444, 0.12417, 0],
"8217": [0, 0.69444, 0.12417, 0],
"8220": [0, 0.69444, 0.1685, 0],
"8221": [0, 0.69444, 0.06961, 0],
"8463": [0, 0.68889, 0, 0],
},
"Main-Regular": {
"32": [0, 0, 0, 0],
"33": [0, 0.69444, 0, 0],
"34": [0, 0.69444, 0, 0],
"35": [0.19444, 0.69444, 0, 0],
"36": [0.05556, 0.75, 0, 0],
"37": [0.05556, 0.75, 0, 0],
"38": [0, 0.69444, 0, 0],
"39": [0, 0.69444, 0, 0],
"40": [0.25, 0.75, 0, 0],
"41": [0.25, 0.75, 0, 0],
"42": [0, 0.75, 0, 0],
"43": [0.08333, 0.58333, 0, 0],
"44": [0.19444, 0.10556, 0, 0],
"45": [0, 0.43056, 0, 0],
"46": [0, 0.10556, 0, 0],
"47": [0.25, 0.75, 0, 0],
"48": [0, 0.64444, 0, 0],
"49": [0, 0.64444, 0, 0],
"50": [0, 0.64444, 0, 0],
"51": [0, 0.64444, 0, 0],
"52": [0, 0.64444, 0, 0],
"53": [0, 0.64444, 0, 0],
"54": [0, 0.64444, 0, 0],
"55": [0, 0.64444, 0, 0],
"56": [0, 0.64444, 0, 0],
"57": [0, 0.64444, 0, 0],
"58": [0, 0.43056, 0, 0],
"59": [0.19444, 0.43056, 0, 0],
"60": [0.0391, 0.5391, 0, 0],
"61": [-0.13313, 0.36687, 0, 0],
"62": [0.0391, 0.5391, 0, 0],
"63": [0, 0.69444, 0, 0],
"64": [0, 0.69444, 0, 0],
"65": [0, 0.68333, 0, 0],
"66": [0, 0.68333, 0, 0],
"67": [0, 0.68333, 0, 0],
"68": [0, 0.68333, 0, 0],
"69": [0, 0.68333, 0, 0],
"70": [0, 0.68333, 0, 0],
"71": [0, 0.68333, 0, 0],
"72": [0, 0.68333, 0, 0],
"73": [0, 0.68333, 0, 0],
"74": [0, 0.68333, 0, 0],
"75": [0, 0.68333, 0, 0],
"76": [0, 0.68333, 0, 0],
"77": [0, 0.68333, 0, 0],
"78": [0, 0.68333, 0, 0],
"79": [0, 0.68333, 0, 0],
"80": [0, 0.68333, 0, 0],
"81": [0.19444, 0.68333, 0, 0],
"82": [0, 0.68333, 0, 0],
"83": [0, 0.68333, 0, 0],
"84": [0, 0.68333, 0, 0],
"85": [0, 0.68333, 0, 0],
"86": [0, 0.68333, 0.01389, 0],
"87": [0, 0.68333, 0.01389, 0],
"88": [0, 0.68333, 0, 0],
"89": [0, 0.68333, 0.025, 0],
"90": [0, 0.68333, 0, 0],
"91": [0.25, 0.75, 0, 0],
"92": [0.25, 0.75, 0, 0],
"93": [0.25, 0.75, 0, 0],
"94": [0, 0.69444, 0, 0],
"95": [0.31, 0.12056, 0.02778, 0],
"96": [0, 0.69444, 0, 0],
"97": [0, 0.43056, 0, 0],
"98": [0, 0.69444, 0, 0],
"99": [0, 0.43056, 0, 0],
"100": [0, 0.69444, 0, 0],
"101": [0, 0.43056, 0, 0],
"102": [0, 0.69444, 0.07778, 0],
"103": [0.19444, 0.43056, 0.01389, 0],
"104": [0, 0.69444, 0, 0],
"105": [0, 0.66786, 0, 0],
"106": [0.19444, 0.66786, 0, 0],
"107": [0, 0.69444, 0, 0],
"108": [0, 0.69444, 0, 0],
"109": [0, 0.43056, 0, 0],
"110": [0, 0.43056, 0, 0],
"111": [0, 0.43056, 0, 0],
"112": [0.19444, 0.43056, 0, 0],
"113": [0.19444, 0.43056, 0, 0],
"114": [0, 0.43056, 0, 0],
"115": [0, 0.43056, 0, 0],
"116": [0, 0.61508, 0, 0],
"117": [0, 0.43056, 0, 0],
"118": [0, 0.43056, 0.01389, 0],
"119": [0, 0.43056, 0.01389, 0],
"120": [0, 0.43056, 0, 0],
"121": [0.19444, 0.43056, 0.01389, 0],
"122": [0, 0.43056, 0, 0],
"123": [0.25, 0.75, 0, 0],
"124": [0.25, 0.75, 0, 0],
"125": [0.25, 0.75, 0, 0],
"126": [0.35, 0.31786, 0, 0],
"160": [0, 0, 0, 0],
"168": [0, 0.66786, 0, 0],
"172": [0, 0.43056, 0, 0],
"175": [0, 0.56778, 0, 0],
"176": [0, 0.69444, 0, 0],
"177": [0.08333, 0.58333, 0, 0],
"180": [0, 0.69444, 0, 0],
"215": [0.08333, 0.58333, 0, 0],
"247": [0.08333, 0.58333, 0, 0],
"305": [0, 0.43056, 0, 0],
"567": [0.19444, 0.43056, 0, 0],
"710": [0, 0.69444, 0, 0],
"711": [0, 0.62847, 0, 0],
"713": [0, 0.56778, 0, 0],
"714": [0, 0.69444, 0, 0],
"715": [0, 0.69444, 0, 0],
"728": [0, 0.69444, 0, 0],
"729": [0, 0.66786, 0, 0],
"730": [0, 0.69444, 0, 0],
"732": [0, 0.66786, 0, 0],
"768": [0, 0.69444, 0, 0],
"769": [0, 0.69444, 0, 0],
"770": [0, 0.69444, 0, 0],
"771": [0, 0.66786, 0, 0],
"772": [0, 0.56778, 0, 0],
"774": [0, 0.69444, 0, 0],
"775": [0, 0.66786, 0, 0],
"776": [0, 0.66786, 0, 0],
"778": [0, 0.69444, 0, 0],
"779": [0, 0.69444, 0, 0],
"780": [0, 0.62847, 0, 0],
"824": [0.19444, 0.69444, 0, 0],
"915": [0, 0.68333, 0, 0],
"916": [0, 0.68333, 0, 0],
"920": [0, 0.68333, 0, 0],
"923": [0, 0.68333, 0, 0],
"926": [0, 0.68333, 0, 0],
"928": [0, 0.68333, 0, 0],
"931": [0, 0.68333, 0, 0],
"933": [0, 0.68333, 0, 0],
"934": [0, 0.68333, 0, 0],
"936": [0, 0.68333, 0, 0],
"937": [0, 0.68333, 0, 0],
"8211": [0, 0.43056, 0.02778, 0],
"8212": [0, 0.43056, 0.02778, 0],
"8216": [0, 0.69444, 0, 0],
"8217": [0, 0.69444, 0, 0],
"8220": [0, 0.69444, 0, 0],
"8221": [0, 0.69444, 0, 0],
"8224": [0.19444, 0.69444, 0, 0],
"8225": [0.19444, 0.69444, 0, 0],
"8230": [0, 0.12, 0, 0],
"8242": [0, 0.55556, 0, 0],
"8407": [0, 0.71444, 0.15382, 0],
"8463": [0, 0.68889, 0, 0],
"8465": [0, 0.69444, 0, 0],
"8467": [0, 0.69444, 0, 0.11111],
"8472": [0.19444, 0.43056, 0, 0.11111],
"8476": [0, 0.69444, 0, 0],
"8501": [0, 0.69444, 0, 0],
"8592": [-0.13313, 0.36687, 0, 0],
"8593": [0.19444, 0.69444, 0, 0],
"8594": [-0.13313, 0.36687, 0, 0],
"8595": [0.19444, 0.69444, 0, 0],
"8596": [-0.13313, 0.36687, 0, 0],
"8597": [0.25, 0.75, 0, 0],
"8598": [0.19444, 0.69444, 0, 0],
"8599": [0.19444, 0.69444, 0, 0],
"8600": [0.19444, 0.69444, 0, 0],
"8601": [0.19444, 0.69444, 0, 0],
"8614": [0.011, 0.511, 0, 0],
"8617": [0.011, 0.511, 0, 0],
"8618": [0.011, 0.511, 0, 0],
"8636": [-0.13313, 0.36687, 0, 0],
"8637": [-0.13313, 0.36687, 0, 0],
"8640": [-0.13313, 0.36687, 0, 0],
"8641": [-0.13313, 0.36687, 0, 0],
"8652": [0.011, 0.671, 0, 0],
"8656": [-0.13313, 0.36687, 0, 0],
"8657": [0.19444, 0.69444, 0, 0],
"8658": [-0.13313, 0.36687, 0, 0],
"8659": [0.19444, 0.69444, 0, 0],
"8660": [-0.13313, 0.36687, 0, 0],
"8661": [0.25, 0.75, 0, 0],
"8704": [0, 0.69444, 0, 0],
"8706": [0, 0.69444, 0.05556, 0.08334],
"8707": [0, 0.69444, 0, 0],
"8709": [0.05556, 0.75, 0, 0],
"8711": [0, 0.68333, 0, 0],
"8712": [0.0391, 0.5391, 0, 0],
"8715": [0.0391, 0.5391, 0, 0],
"8722": [0.08333, 0.58333, 0, 0],
"8723": [0.08333, 0.58333, 0, 0],
"8725": [0.25, 0.75, 0, 0],
"8726": [0.25, 0.75, 0, 0],
"8727": [-0.03472, 0.46528, 0, 0],
"8728": [-0.05555, 0.44445, 0, 0],
"8729": [-0.05555, 0.44445, 0, 0],
"8730": [0.2, 0.8, 0, 0],
"8733": [0, 0.43056, 0, 0],
"8734": [0, 0.43056, 0, 0],
"8736": [0, 0.69224, 0, 0],
"8739": [0.25, 0.75, 0, 0],
"8741": [0.25, 0.75, 0, 0],
"8743": [0, 0.55556, 0, 0],
"8744": [0, 0.55556, 0, 0],
"8745": [0, 0.55556, 0, 0],
"8746": [0, 0.55556, 0, 0],
"8747": [0.19444, 0.69444, 0.11111, 0],
"8764": [-0.13313, 0.36687, 0, 0],
"8768": [0.19444, 0.69444, 0, 0],
"8771": [-0.03625, 0.46375, 0, 0],
"8773": [-0.022, 0.589, 0, 0],
"8776": [-0.01688, 0.48312, 0, 0],
"8781": [-0.03625, 0.46375, 0, 0],
"8784": [-0.133, 0.67, 0, 0],
"8800": [0.215, 0.716, 0, 0],
"8801": [-0.03625, 0.46375, 0, 0],
"8804": [0.13597, 0.63597, 0, 0],
"8805": [0.13597, 0.63597, 0, 0],
"8810": [0.0391, 0.5391, 0, 0],
"8811": [0.0391, 0.5391, 0, 0],
"8826": [0.0391, 0.5391, 0, 0],
"8827": [0.0391, 0.5391, 0, 0],
"8834": [0.0391, 0.5391, 0, 0],
"8835": [0.0391, 0.5391, 0, 0],
"8838": [0.13597, 0.63597, 0, 0],
"8839": [0.13597, 0.63597, 0, 0],
"8846": [0, 0.55556, 0, 0],
"8849": [0.13597, 0.63597, 0, 0],
"8850": [0.13597, 0.63597, 0, 0],
"8851": [0, 0.55556, 0, 0],
"8852": [0, 0.55556, 0, 0],
"8853": [0.08333, 0.58333, 0, 0],
"8854": [0.08333, 0.58333, 0, 0],
"8855": [0.08333, 0.58333, 0, 0],
"8856": [0.08333, 0.58333, 0, 0],
"8857": [0.08333, 0.58333, 0, 0],
"8866": [0, 0.69444, 0, 0],
"8867": [0, 0.69444, 0, 0],
"8868": [0, 0.69444, 0, 0],
"8869": [0, 0.69444, 0, 0],
"8872": [0.249, 0.75, 0, 0],
"8900": [-0.05555, 0.44445, 0, 0],
"8901": [-0.05555, 0.44445, 0, 0],
"8902": [-0.03472, 0.46528, 0, 0],
"8904": [0.005, 0.505, 0, 0],
"8942": [0.03, 0.9, 0, 0],
"8943": [-0.19, 0.31, 0, 0],
"8945": [-0.1, 0.82, 0, 0],
"8968": [0.25, 0.75, 0, 0],
"8969": [0.25, 0.75, 0, 0],
"8970": [0.25, 0.75, 0, 0],
"8971": [0.25, 0.75, 0, 0],
"8994": [-0.14236, 0.35764, 0, 0],
"8995": [-0.14236, 0.35764, 0, 0],
"9136": [0.244, 0.744, 0, 0],
"9137": [0.244, 0.744, 0, 0],
"9651": [0.19444, 0.69444, 0, 0],
"9657": [-0.03472, 0.46528, 0, 0],
"9661": [0.19444, 0.69444, 0, 0],
"9667": [-0.03472, 0.46528, 0, 0],
"9711": [0.19444, 0.69444, 0, 0],
"9824": [0.12963, 0.69444, 0, 0],
"9825": [0.12963, 0.69444, 0, 0],
"9826": [0.12963, 0.69444, 0, 0],
"9827": [0.12963, 0.69444, 0, 0],
"9837": [0, 0.75, 0, 0],
"9838": [0.19444, 0.69444, 0, 0],
"9839": [0.19444, 0.69444, 0, 0],
"10216": [0.25, 0.75, 0, 0],
"10217": [0.25, 0.75, 0, 0],
"10222": [0.244, 0.744, 0, 0],
"10223": [0.244, 0.744, 0, 0],
"10229": [0.011, 0.511, 0, 0],
"10230": [0.011, 0.511, 0, 0],
"10231": [0.011, 0.511, 0, 0],
"10232": [0.024, 0.525, 0, 0],
"10233": [0.024, 0.525, 0, 0],
"10234": [0.024, 0.525, 0, 0],
"10236": [0.011, 0.511, 0, 0],
"10815": [0, 0.68333, 0, 0],
"10927": [0.13597, 0.63597, 0, 0],
"10928": [0.13597, 0.63597, 0, 0],
},
"Math-BoldItalic": {
"47": [0.19444, 0.69444, 0, 0],
"65": [0, 0.68611, 0, 0],
"66": [0, 0.68611, 0.04835, 0],
"67": [0, 0.68611, 0.06979, 0],
"68": [0, 0.68611, 0.03194, 0],
"69": [0, 0.68611, 0.05451, 0],
"70": [0, 0.68611, 0.15972, 0],
"71": [0, 0.68611, 0, 0],
"72": [0, 0.68611, 0.08229, 0],
"73": [0, 0.68611, 0.07778, 0],
"74": [0, 0.68611, 0.10069, 0],
"75": [0, 0.68611, 0.06979, 0],
"76": [0, 0.68611, 0, 0],
"77": [0, 0.68611, 0.11424, 0],
"78": [0, 0.68611, 0.11424, 0],
"79": [0, 0.68611, 0.03194, 0],
"80": [0, 0.68611, 0.15972, 0],
"81": [0.19444, 0.68611, 0, 0],
"82": [0, 0.68611, 0.00421, 0],
"83": [0, 0.68611, 0.05382, 0],
"84": [0, 0.68611, 0.15972, 0],
"85": [0, 0.68611, 0.11424, 0],
"86": [0, 0.68611, 0.25555, 0],
"87": [0, 0.68611, 0.15972, 0],
"88": [0, 0.68611, 0.07778, 0],
"89": [0, 0.68611, 0.25555, 0],
"90": [0, 0.68611, 0.06979, 0],
"97": [0, 0.44444, 0, 0],
"98": [0, 0.69444, 0, 0],
"99": [0, 0.44444, 0, 0],
"100": [0, 0.69444, 0, 0],
"101": [0, 0.44444, 0, 0],
"102": [0.19444, 0.69444, 0.11042, 0],
"103": [0.19444, 0.44444, 0.03704, 0],
"104": [0, 0.69444, 0, 0],
"105": [0, 0.69326, 0, 0],
"106": [0.19444, 0.69326, 0.0622, 0],
"107": [0, 0.69444, 0.01852, 0],
"108": [0, 0.69444, 0.0088, 0],
"109": [0, 0.44444, 0, 0],
"110": [0, 0.44444, 0, 0],
"111": [0, 0.44444, 0, 0],
"112": [0.19444, 0.44444, 0, 0],
"113": [0.19444, 0.44444, 0.03704, 0],
"114": [0, 0.44444, 0.03194, 0],
"115": [0, 0.44444, 0, 0],
"116": [0, 0.63492, 0, 0],
"117": [0, 0.44444, 0, 0],
"118": [0, 0.44444, 0.03704, 0],
"119": [0, 0.44444, 0.02778, 0],
"120": [0, 0.44444, 0, 0],
"121": [0.19444, 0.44444, 0.03704, 0],
"122": [0, 0.44444, 0.04213, 0],
"915": [0, 0.68611, 0.15972, 0],
"916": [0, 0.68611, 0, 0],
"920": [0, 0.68611, 0.03194, 0],
"923": [0, 0.68611, 0, 0],
"926": [0, 0.68611, 0.07458, 0],
"928": [0, 0.68611, 0.08229, 0],
"931": [0, 0.68611, 0.05451, 0],
"933": [0, 0.68611, 0.15972, 0],
"934": [0, 0.68611, 0, 0],
"936": [0, 0.68611, 0.11653, 0],
"937": [0, 0.68611, 0.04835, 0],
"945": [0, 0.44444, 0, 0],
"946": [0.19444, 0.69444, 0.03403, 0],
"947": [0.19444, 0.44444, 0.06389, 0],
"948": [0, 0.69444, 0.03819, 0],
"949": [0, 0.44444, 0, 0],
"950": [0.19444, 0.69444, 0.06215, 0],
"951": [0.19444, 0.44444, 0.03704, 0],
"952": [0, 0.69444, 0.03194, 0],
"953": [0, 0.44444, 0, 0],
"954": [0, 0.44444, 0, 0],
"955": [0, 0.69444, 0, 0],
"956": [0.19444, 0.44444, 0, 0],
"957": [0, 0.44444, 0.06898, 0],
"958": [0.19444, 0.69444, 0.03021, 0],
"959": [0, 0.44444, 0, 0],
"960": [0, 0.44444, 0.03704, 0],
"961": [0.19444, 0.44444, 0, 0],
"962": [0.09722, 0.44444, 0.07917, 0],
"963": [0, 0.44444, 0.03704, 0],
"964": [0, 0.44444, 0.13472, 0],
"965": [0, 0.44444, 0.03704, 0],
"966": [0.19444, 0.44444, 0, 0],
"967": [0.19444, 0.44444, 0, 0],
"968": [0.19444, 0.69444, 0.03704, 0],
"969": [0, 0.44444, 0.03704, 0],
"977": [0, 0.69444, 0, 0],
"981": [0.19444, 0.69444, 0, 0],
"982": [0, 0.44444, 0.03194, 0],
"1009": [0.19444, 0.44444, 0, 0],
"1013": [0, 0.44444, 0, 0],
},
"Math-Italic": {
"47": [0.19444, 0.69444, 0, 0],
"65": [0, 0.68333, 0, 0.13889],
"66": [0, 0.68333, 0.05017, 0.08334],
"67": [0, 0.68333, 0.07153, 0.08334],
"68": [0, 0.68333, 0.02778, 0.05556],
"69": [0, 0.68333, 0.05764, 0.08334],
"70": [0, 0.68333, 0.13889, 0.08334],
"71": [0, 0.68333, 0, 0.08334],
"72": [0, 0.68333, 0.08125, 0.05556],
"73": [0, 0.68333, 0.07847, 0.11111],
"74": [0, 0.68333, 0.09618, 0.16667],
"75": [0, 0.68333, 0.07153, 0.05556],
"76": [0, 0.68333, 0, 0.02778],
"77": [0, 0.68333, 0.10903, 0.08334],
"78": [0, 0.68333, 0.10903, 0.08334],
"79": [0, 0.68333, 0.02778, 0.08334],
"80": [0, 0.68333, 0.13889, 0.08334],
"81": [0.19444, 0.68333, 0, 0.08334],
"82": [0, 0.68333, 0.00773, 0.08334],
"83": [0, 0.68333, 0.05764, 0.08334],
"84": [0, 0.68333, 0.13889, 0.08334],
"85": [0, 0.68333, 0.10903, 0.02778],
"86": [0, 0.68333, 0.22222, 0],
"87": [0, 0.68333, 0.13889, 0],
"88": [0, 0.68333, 0.07847, 0.08334],
"89": [0, 0.68333, 0.22222, 0],
"90": [0, 0.68333, 0.07153, 0.08334],
"97": [0, 0.43056, 0, 0],
"98": [0, 0.69444, 0, 0],
"99": [0, 0.43056, 0, 0.05556],
"100": [0, 0.69444, 0, 0.16667],
"101": [0, 0.43056, 0, 0.05556],
"102": [0.19444, 0.69444, 0.10764, 0.16667],
"103": [0.19444, 0.43056, 0.03588, 0.02778],
"104": [0, 0.69444, 0, 0],
"105": [0, 0.65952, 0, 0],
"106": [0.19444, 0.65952, 0.05724, 0],
"107": [0, 0.69444, 0.03148, 0],
"108": [0, 0.69444, 0.01968, 0.08334],
"109": [0, 0.43056, 0, 0],
"110": [0, 0.43056, 0, 0],
"111": [0, 0.43056, 0, 0.05556],
"112": [0.19444, 0.43056, 0, 0.08334],
"113": [0.19444, 0.43056, 0.03588, 0.08334],
"114": [0, 0.43056, 0.02778, 0.05556],
"115": [0, 0.43056, 0, 0.05556],
"116": [0, 0.61508, 0, 0.08334],
"117": [0, 0.43056, 0, 0.02778],
"118": [0, 0.43056, 0.03588, 0.02778],
"119": [0, 0.43056, 0.02691, 0.08334],
"120": [0, 0.43056, 0, 0.02778],
"121": [0.19444, 0.43056, 0.03588, 0.05556],
"122": [0, 0.43056, 0.04398, 0.05556],
"915": [0, 0.68333, 0.13889, 0.08334],
"916": [0, 0.68333, 0, 0.16667],
"920": [0, 0.68333, 0.02778, 0.08334],
"923": [0, 0.68333, 0, 0.16667],
"926": [0, 0.68333, 0.07569, 0.08334],
"928": [0, 0.68333, 0.08125, 0.05556],
"931": [0, 0.68333, 0.05764, 0.08334],
"933": [0, 0.68333, 0.13889, 0.05556],
"934": [0, 0.68333, 0, 0.08334],
"936": [0, 0.68333, 0.11, 0.05556],
"937": [0, 0.68333, 0.05017, 0.08334],
"945": [0, 0.43056, 0.0037, 0.02778],
"946": [0.19444, 0.69444, 0.05278, 0.08334],
"947": [0.19444, 0.43056, 0.05556, 0],
"948": [0, 0.69444, 0.03785, 0.05556],
"949": [0, 0.43056, 0, 0.08334],
"950": [0.19444, 0.69444, 0.07378, 0.08334],
"951": [0.19444, 0.43056, 0.03588, 0.05556],
"952": [0, 0.69444, 0.02778, 0.08334],
"953": [0, 0.43056, 0, 0.05556],
"954": [0, 0.43056, 0, 0],
"955": [0, 0.69444, 0, 0],
"956": [0.19444, 0.43056, 0, 0.02778],
"957": [0, 0.43056, 0.06366, 0.02778],
"958": [0.19444, 0.69444, 0.04601, 0.11111],
"959": [0, 0.43056, 0, 0.05556],
"960": [0, 0.43056, 0.03588, 0],
"961": [0.19444, 0.43056, 0, 0.08334],
"962": [0.09722, 0.43056, 0.07986, 0.08334],
"963": [0, 0.43056, 0.03588, 0],
"964": [0, 0.43056, 0.1132, 0.02778],
"965": [0, 0.43056, 0.03588, 0.02778],
"966": [0.19444, 0.43056, 0, 0.08334],
"967": [0.19444, 0.43056, 0, 0.05556],
"968": [0.19444, 0.69444, 0.03588, 0.11111],
"969": [0, 0.43056, 0.03588, 0],
"977": [0, 0.69444, 0, 0.08334],
"981": [0.19444, 0.69444, 0, 0.08334],
"982": [0, 0.43056, 0.02778, 0],
"1009": [0.19444, 0.43056, 0, 0.08334],
"1013": [0, 0.43056, 0, 0.05556],
},
"Math-Regular": {
"65": [0, 0.68333, 0, 0.13889],
"66": [0, 0.68333, 0.05017, 0.08334],
"67": [0, 0.68333, 0.07153, 0.08334],
"68": [0, 0.68333, 0.02778, 0.05556],
"69": [0, 0.68333, 0.05764, 0.08334],
"70": [0, 0.68333, 0.13889, 0.08334],
"71": [0, 0.68333, 0, 0.08334],
"72": [0, 0.68333, 0.08125, 0.05556],
"73": [0, 0.68333, 0.07847, 0.11111],
"74": [0, 0.68333, 0.09618, 0.16667],
"75": [0, 0.68333, 0.07153, 0.05556],
"76": [0, 0.68333, 0, 0.02778],
"77": [0, 0.68333, 0.10903, 0.08334],
"78": [0, 0.68333, 0.10903, 0.08334],
"79": [0, 0.68333, 0.02778, 0.08334],
"80": [0, 0.68333, 0.13889, 0.08334],
"81": [0.19444, 0.68333, 0, 0.08334],
"82": [0, 0.68333, 0.00773, 0.08334],
"83": [0, 0.68333, 0.05764, 0.08334],
"84": [0, 0.68333, 0.13889, 0.08334],
"85": [0, 0.68333, 0.10903, 0.02778],
"86": [0, 0.68333, 0.22222, 0],
"87": [0, 0.68333, 0.13889, 0],
"88": [0, 0.68333, 0.07847, 0.08334],
"89": [0, 0.68333, 0.22222, 0],
"90": [0, 0.68333, 0.07153, 0.08334],
"97": [0, 0.43056, 0, 0],
"98": [0, 0.69444, 0, 0],
"99": [0, 0.43056, 0, 0.05556],
"100": [0, 0.69444, 0, 0.16667],
"101": [0, 0.43056, 0, 0.05556],
"102": [0.19444, 0.69444, 0.10764, 0.16667],
"103": [0.19444, 0.43056, 0.03588, 0.02778],
"104": [0, 0.69444, 0, 0],
"105": [0, 0.65952, 0, 0],
"106": [0.19444, 0.65952, 0.05724, 0],
"107": [0, 0.69444, 0.03148, 0],
"108": [0, 0.69444, 0.01968, 0.08334],
"109": [0, 0.43056, 0, 0],
"110": [0, 0.43056, 0, 0],
"111": [0, 0.43056, 0, 0.05556],
"112": [0.19444, 0.43056, 0, 0.08334],
"113": [0.19444, 0.43056, 0.03588, 0.08334],
"114": [0, 0.43056, 0.02778, 0.05556],
"115": [0, 0.43056, 0, 0.05556],
"116": [0, 0.61508, 0, 0.08334],
"117": [0, 0.43056, 0, 0.02778],
"118": [0, 0.43056, 0.03588, 0.02778],
"119": [0, 0.43056, 0.02691, 0.08334],
"120": [0, 0.43056, 0, 0.02778],
"121": [0.19444, 0.43056, 0.03588, 0.05556],
"122": [0, 0.43056, 0.04398, 0.05556],
"915": [0, 0.68333, 0.13889, 0.08334],
"916": [0, 0.68333, 0, 0.16667],
"920": [0, 0.68333, 0.02778, 0.08334],
"923": [0, 0.68333, 0, 0.16667],
"926": [0, 0.68333, 0.07569, 0.08334],
"928": [0, 0.68333, 0.08125, 0.05556],
"931": [0, 0.68333, 0.05764, 0.08334],
"933": [0, 0.68333, 0.13889, 0.05556],
"934": [0, 0.68333, 0, 0.08334],
"936": [0, 0.68333, 0.11, 0.05556],
"937": [0, 0.68333, 0.05017, 0.08334],
"945": [0, 0.43056, 0.0037, 0.02778],
"946": [0.19444, 0.69444, 0.05278, 0.08334],
"947": [0.19444, 0.43056, 0.05556, 0],
"948": [0, 0.69444, 0.03785, 0.05556],
"949": [0, 0.43056, 0, 0.08334],
"950": [0.19444, 0.69444, 0.07378, 0.08334],
"951": [0.19444, 0.43056, 0.03588, 0.05556],
"952": [0, 0.69444, 0.02778, 0.08334],
"953": [0, 0.43056, 0, 0.05556],
"954": [0, 0.43056, 0, 0],
"955": [0, 0.69444, 0, 0],
"956": [0.19444, 0.43056, 0, 0.02778],
"957": [0, 0.43056, 0.06366, 0.02778],
"958": [0.19444, 0.69444, 0.04601, 0.11111],
"959": [0, 0.43056, 0, 0.05556],
"960": [0, 0.43056, 0.03588, 0],
"961": [0.19444, 0.43056, 0, 0.08334],
"962": [0.09722, 0.43056, 0.07986, 0.08334],
"963": [0, 0.43056, 0.03588, 0],
"964": [0, 0.43056, 0.1132, 0.02778],
"965": [0, 0.43056, 0.03588, 0.02778],
"966": [0.19444, 0.43056, 0, 0.08334],
"967": [0.19444, 0.43056, 0, 0.05556],
"968": [0.19444, 0.69444, 0.03588, 0.11111],
"969": [0, 0.43056, 0.03588, 0],
"977": [0, 0.69444, 0, 0.08334],
"981": [0.19444, 0.69444, 0, 0.08334],
"982": [0, 0.43056, 0.02778, 0],
"1009": [0.19444, 0.43056, 0, 0.08334],
"1013": [0, 0.43056, 0, 0.05556],
},
"SansSerif-Regular": {
"33": [0, 0.69444, 0, 0],
"34": [0, 0.69444, 0, 0],
"35": [0.19444, 0.69444, 0, 0],
"36": [0.05556, 0.75, 0, 0],
"37": [0.05556, 0.75, 0, 0],
"38": [0, 0.69444, 0, 0],
"39": [0, 0.69444, 0, 0],
"40": [0.25, 0.75, 0, 0],
"41": [0.25, 0.75, 0, 0],
"42": [0, 0.75, 0, 0],
"43": [0.08333, 0.58333, 0, 0],
"44": [0.125, 0.08333, 0, 0],
"45": [0, 0.44444, 0, 0],
"46": [0, 0.08333, 0, 0],
"47": [0.25, 0.75, 0, 0],
"48": [0, 0.65556, 0, 0],
"49": [0, 0.65556, 0, 0],
"50": [0, 0.65556, 0, 0],
"51": [0, 0.65556, 0, 0],
"52": [0, 0.65556, 0, 0],
"53": [0, 0.65556, 0, 0],
"54": [0, 0.65556, 0, 0],
"55": [0, 0.65556, 0, 0],
"56": [0, 0.65556, 0, 0],
"57": [0, 0.65556, 0, 0],
"58": [0, 0.44444, 0, 0],
"59": [0.125, 0.44444, 0, 0],
"61": [-0.13, 0.37, 0, 0],
"63": [0, 0.69444, 0, 0],
"64": [0, 0.69444, 0, 0],
"65": [0, 0.69444, 0, 0],
"66": [0, 0.69444, 0, 0],
"67": [0, 0.69444, 0, 0],
"68": [0, 0.69444, 0, 0],
"69": [0, 0.69444, 0, 0],
"70": [0, 0.69444, 0, 0],
"71": [0, 0.69444, 0, 0],
"72": [0, 0.69444, 0, 0],
"73": [0, 0.69444, 0, 0],
"74": [0, 0.69444, 0, 0],
"75": [0, 0.69444, 0, 0],
"76": [0, 0.69444, 0, 0],
"77": [0, 0.69444, 0, 0],
"78": [0, 0.69444, 0, 0],
"79": [0, 0.69444, 0, 0],
"80": [0, 0.69444, 0, 0],
"81": [0.125, 0.69444, 0, 0],
"82": [0, 0.69444, 0, 0],
"83": [0, 0.69444, 0, 0],
"84": [0, 0.69444, 0, 0],
"85": [0, 0.69444, 0, 0],
"86": [0, 0.69444, 0.01389, 0],
"87": [0, 0.69444, 0.01389, 0],
"88": [0, 0.69444, 0, 0],
"89": [0, 0.69444, 0.025, 0],
"90": [0, 0.69444, 0, 0],
"91": [0.25, 0.75, 0, 0],
"93": [0.25, 0.75, 0, 0],
"94": [0, 0.69444, 0, 0],
"95": [0.35, 0.09444, 0.02778, 0],
"97": [0, 0.44444, 0, 0],
"98": [0, 0.69444, 0, 0],
"99": [0, 0.44444, 0, 0],
"100": [0, 0.69444, 0, 0],
"101": [0, 0.44444, 0, 0],
"102": [0, 0.69444, 0.06944, 0],
"103": [0.19444, 0.44444, 0.01389, 0],
"104": [0, 0.69444, 0, 0],
"105": [0, 0.67937, 0, 0],
"106": [0.19444, 0.67937, 0, 0],
"107": [0, 0.69444, 0, 0],
"108": [0, 0.69444, 0, 0],
"109": [0, 0.44444, 0, 0],
"110": [0, 0.44444, 0, 0],
"111": [0, 0.44444, 0, 0],
"112": [0.19444, 0.44444, 0, 0],
"113": [0.19444, 0.44444, 0, 0],
"114": [0, 0.44444, 0.01389, 0],
"115": [0, 0.44444, 0, 0],
"116": [0, 0.57143, 0, 0],
"117": [0, 0.44444, 0, 0],
"118": [0, 0.44444, 0.01389, 0],
"119": [0, 0.44444, 0.01389, 0],
"120": [0, 0.44444, 0, 0],
"121": [0.19444, 0.44444, 0.01389, 0],
"122": [0, 0.44444, 0, 0],
"126": [0.35, 0.32659, 0, 0],
"305": [0, 0.44444, 0, 0],
"567": [0.19444, 0.44444, 0, 0],
"768": [0, 0.69444, 0, 0],
"769": [0, 0.69444, 0, 0],
"770": [0, 0.69444, 0, 0],
"771": [0, 0.67659, 0, 0],
"772": [0, 0.60889, 0, 0],
"774": [0, 0.69444, 0, 0],
"775": [0, 0.67937, 0, 0],
"776": [0, 0.67937, 0, 0],
"778": [0, 0.69444, 0, 0],
"779": [0, 0.69444, 0, 0],
"780": [0, 0.63194, 0, 0],
"915": [0, 0.69444, 0, 0],
"916": [0, 0.69444, 0, 0],
"920": [0, 0.69444, 0, 0],
"923": [0, 0.69444, 0, 0],
"926": [0, 0.69444, 0, 0],
"928": [0, 0.69444, 0, 0],
"931": [0, 0.69444, 0, 0],
"933": [0, 0.69444, 0, 0],
"934": [0, 0.69444, 0, 0],
"936": [0, 0.69444, 0, 0],
"937": [0, 0.69444, 0, 0],
"8211": [0, 0.44444, 0.02778, 0],
"8212": [0, 0.44444, 0.02778, 0],
"8216": [0, 0.69444, 0, 0],
"8217": [0, 0.69444, 0, 0],
"8220": [0, 0.69444, 0, 0],
"8221": [0, 0.69444, 0, 0],
},
"Script-Regular": {
"65": [0, 0.7, 0.22925, 0],
"66": [0, 0.7, 0.04087, 0],
"67": [0, 0.7, 0.1689, 0],
"68": [0, 0.7, 0.09371, 0],
"69": [0, 0.7, 0.18583, 0],
"70": [0, 0.7, 0.13634, 0],
"71": [0, 0.7, 0.17322, 0],
"72": [0, 0.7, 0.29694, 0],
"73": [0, 0.7, 0.19189, 0],
"74": [0.27778, 0.7, 0.19189, 0],
"75": [0, 0.7, 0.31259, 0],
"76": [0, 0.7, 0.19189, 0],
"77": [0, 0.7, 0.15981, 0],
"78": [0, 0.7, 0.3525, 0],
"79": [0, 0.7, 0.08078, 0],
"80": [0, 0.7, 0.08078, 0],
"81": [0, 0.7, 0.03305, 0],
"82": [0, 0.7, 0.06259, 0],
"83": [0, 0.7, 0.19189, 0],
"84": [0, 0.7, 0.29087, 0],
"85": [0, 0.7, 0.25815, 0],
"86": [0, 0.7, 0.27523, 0],
"87": [0, 0.7, 0.27523, 0],
"88": [0, 0.7, 0.26006, 0],
"89": [0, 0.7, 0.2939, 0],
"90": [0, 0.7, 0.24037, 0],
},
"Size1-Regular": {
"40": [0.35001, 0.85, 0, 0],
"41": [0.35001, 0.85, 0, 0],
"47": [0.35001, 0.85, 0, 0],
"91": [0.35001, 0.85, 0, 0],
"92": [0.35001, 0.85, 0, 0],
"93": [0.35001, 0.85, 0, 0],
"123": [0.35001, 0.85, 0, 0],
"125": [0.35001, 0.85, 0, 0],
"710": [0, 0.72222, 0, 0],
"732": [0, 0.72222, 0, 0],
"770": [0, 0.72222, 0, 0],
"771": [0, 0.72222, 0, 0],
"8214": [-0.00099, 0.601, 0, 0],
"8593": [1e-05, 0.6, 0, 0],
"8595": [1e-05, 0.6, 0, 0],
"8657": [1e-05, 0.6, 0, 0],
"8659": [1e-05, 0.6, 0, 0],
"8719": [0.25001, 0.75, 0, 0],
"8720": [0.25001, 0.75, 0, 0],
"8721": [0.25001, 0.75, 0, 0],
"8730": [0.35001, 0.85, 0, 0],
"8739": [-0.00599, 0.606, 0, 0],
"8741": [-0.00599, 0.606, 0, 0],
"8747": [0.30612, 0.805, 0.19445, 0],
"8748": [0.306, 0.805, 0.19445, 0],
"8749": [0.306, 0.805, 0.19445, 0],
"8750": [0.30612, 0.805, 0.19445, 0],
"8896": [0.25001, 0.75, 0, 0],
"8897": [0.25001, 0.75, 0, 0],
"8898": [0.25001, 0.75, 0, 0],
"8899": [0.25001, 0.75, 0, 0],
"8968": [0.35001, 0.85, 0, 0],
"8969": [0.35001, 0.85, 0, 0],
"8970": [0.35001, 0.85, 0, 0],
"8971": [0.35001, 0.85, 0, 0],
"9168": [-0.00099, 0.601, 0, 0],
"10216": [0.35001, 0.85, 0, 0],
"10217": [0.35001, 0.85, 0, 0],
"10752": [0.25001, 0.75, 0, 0],
"10753": [0.25001, 0.75, 0, 0],
"10754": [0.25001, 0.75, 0, 0],
"10756": [0.25001, 0.75, 0, 0],
"10758": [0.25001, 0.75, 0, 0],
},
"Size2-Regular": {
"40": [0.65002, 1.15, 0, 0],
"41": [0.65002, 1.15, 0, 0],
"47": [0.65002, 1.15, 0, 0],
"91": [0.65002, 1.15, 0, 0],
"92": [0.65002, 1.15, 0, 0],
"93": [0.65002, 1.15, 0, 0],
"123": [0.65002, 1.15, 0, 0],
"125": [0.65002, 1.15, 0, 0],
"710": [0, 0.75, 0, 0],
"732": [0, 0.75, 0, 0],
"770": [0, 0.75, 0, 0],
"771": [0, 0.75, 0, 0],
"8719": [0.55001, 1.05, 0, 0],
"8720": [0.55001, 1.05, 0, 0],
"8721": [0.55001, 1.05, 0, 0],
"8730": [0.65002, 1.15, 0, 0],
"8747": [0.86225, 1.36, 0.44445, 0],
"8748": [0.862, 1.36, 0.44445, 0],
"8749": [0.862, 1.36, 0.44445, 0],
"8750": [0.86225, 1.36, 0.44445, 0],
"8896": [0.55001, 1.05, 0, 0],
"8897": [0.55001, 1.05, 0, 0],
"8898": [0.55001, 1.05, 0, 0],
"8899": [0.55001, 1.05, 0, 0],
"8968": [0.65002, 1.15, 0, 0],
"8969": [0.65002, 1.15, 0, 0],
"8970": [0.65002, 1.15, 0, 0],
"8971": [0.65002, 1.15, 0, 0],
"10216": [0.65002, 1.15, 0, 0],
"10217": [0.65002, 1.15, 0, 0],
"10752": [0.55001, 1.05, 0, 0],
"10753": [0.55001, 1.05, 0, 0],
"10754": [0.55001, 1.05, 0, 0],
"10756": [0.55001, 1.05, 0, 0],
"10758": [0.55001, 1.05, 0, 0],
},
"Size3-Regular": {
"40": [0.95003, 1.45, 0, 0],
"41": [0.95003, 1.45, 0, 0],
"47": [0.95003, 1.45, 0, 0],
"91": [0.95003, 1.45, 0, 0],
"92": [0.95003, 1.45, 0, 0],
"93": [0.95003, 1.45, 0, 0],
"123": [0.95003, 1.45, 0, 0],
"125": [0.95003, 1.45, 0, 0],
"710": [0, 0.75, 0, 0],
"732": [0, 0.75, 0, 0],
"770": [0, 0.75, 0, 0],
"771": [0, 0.75, 0, 0],
"8730": [0.95003, 1.45, 0, 0],
"8968": [0.95003, 1.45, 0, 0],
"8969": [0.95003, 1.45, 0, 0],
"8970": [0.95003, 1.45, 0, 0],
"8971": [0.95003, 1.45, 0, 0],
"10216": [0.95003, 1.45, 0, 0],
"10217": [0.95003, 1.45, 0, 0],
},
"Size4-Regular": {
"40": [1.25003, 1.75, 0, 0],
"41": [1.25003, 1.75, 0, 0],
"47": [1.25003, 1.75, 0, 0],
"91": [1.25003, 1.75, 0, 0],
"92": [1.25003, 1.75, 0, 0],
"93": [1.25003, 1.75, 0, 0],
"123": [1.25003, 1.75, 0, 0],
"125": [1.25003, 1.75, 0, 0],
"710": [0, 0.825, 0, 0],
"732": [0, 0.825, 0, 0],
"770": [0, 0.825, 0, 0],
"771": [0, 0.825, 0, 0],
"8730": [1.25003, 1.75, 0, 0],
"8968": [1.25003, 1.75, 0, 0],
"8969": [1.25003, 1.75, 0, 0],
"8970": [1.25003, 1.75, 0, 0],
"8971": [1.25003, 1.75, 0, 0],
"9115": [0.64502, 1.155, 0, 0],
"9116": [1e-05, 0.6, 0, 0],
"9117": [0.64502, 1.155, 0, 0],
"9118": [0.64502, 1.155, 0, 0],
"9119": [1e-05, 0.6, 0, 0],
"9120": [0.64502, 1.155, 0, 0],
"9121": [0.64502, 1.155, 0, 0],
"9122": [-0.00099, 0.601, 0, 0],
"9123": [0.64502, 1.155, 0, 0],
"9124": [0.64502, 1.155, 0, 0],
"9125": [-0.00099, 0.601, 0, 0],
"9126": [0.64502, 1.155, 0, 0],
"9127": [1e-05, 0.9, 0, 0],
"9128": [0.65002, 1.15, 0, 0],
"9129": [0.90001, 0, 0, 0],
"9130": [0, 0.3, 0, 0],
"9131": [1e-05, 0.9, 0, 0],
"9132": [0.65002, 1.15, 0, 0],
"9133": [0.90001, 0, 0, 0],
"9143": [0.88502, 0.915, 0, 0],
"10216": [1.25003, 1.75, 0, 0],
"10217": [1.25003, 1.75, 0, 0],
"57344": [-0.00499, 0.605, 0, 0],
"57345": [-0.00499, 0.605, 0, 0],
"57680": [0, 0.12, 0, 0],
"57681": [0, 0.12, 0, 0],
"57682": [0, 0.12, 0, 0],
"57683": [0, 0.12, 0, 0],
},
"Typewriter-Regular": {
"33": [0, 0.61111, 0, 0],
"34": [0, 0.61111, 0, 0],
"35": [0, 0.61111, 0, 0],
"36": [0.08333, 0.69444, 0, 0],
"37": [0.08333, 0.69444, 0, 0],
"38": [0, 0.61111, 0, 0],
"39": [0, 0.61111, 0, 0],
"40": [0.08333, 0.69444, 0, 0],
"41": [0.08333, 0.69444, 0, 0],
"42": [0, 0.52083, 0, 0],
"43": [-0.08056, 0.53055, 0, 0],
"44": [0.13889, 0.125, 0, 0],
"45": [-0.08056, 0.53055, 0, 0],
"46": [0, 0.125, 0, 0],
"47": [0.08333, 0.69444, 0, 0],
"48": [0, 0.61111, 0, 0],
"49": [0, 0.61111, 0, 0],
"50": [0, 0.61111, 0, 0],
"51": [0, 0.61111, 0, 0],
"52": [0, 0.61111, 0, 0],
"53": [0, 0.61111, 0, 0],
"54": [0, 0.61111, 0, 0],
"55": [0, 0.61111, 0, 0],
"56": [0, 0.61111, 0, 0],
"57": [0, 0.61111, 0, 0],
"58": [0, 0.43056, 0, 0],
"59": [0.13889, 0.43056, 0, 0],
"60": [-0.05556, 0.55556, 0, 0],
"61": [-0.19549, 0.41562, 0, 0],
"62": [-0.05556, 0.55556, 0, 0],
"63": [0, 0.61111, 0, 0],
"64": [0, 0.61111, 0, 0],
"65": [0, 0.61111, 0, 0],
"66": [0, 0.61111, 0, 0],
"67": [0, 0.61111, 0, 0],
"68": [0, 0.61111, 0, 0],
"69": [0, 0.61111, 0, 0],
"70": [0, 0.61111, 0, 0],
"71": [0, 0.61111, 0, 0],
"72": [0, 0.61111, 0, 0],
"73": [0, 0.61111, 0, 0],
"74": [0, 0.61111, 0, 0],
"75": [0, 0.61111, 0, 0],
"76": [0, 0.61111, 0, 0],
"77": [0, 0.61111, 0, 0],
"78": [0, 0.61111, 0, 0],
"79": [0, 0.61111, 0, 0],
"80": [0, 0.61111, 0, 0],
"81": [0.13889, 0.61111, 0, 0],
"82": [0, 0.61111, 0, 0],
"83": [0, 0.61111, 0, 0],
"84": [0, 0.61111, 0, 0],
"85": [0, 0.61111, 0, 0],
"86": [0, 0.61111, 0, 0],
"87": [0, 0.61111, 0, 0],
"88": [0, 0.61111, 0, 0],
"89": [0, 0.61111, 0, 0],
"90": [0, 0.61111, 0, 0],
"91": [0.08333, 0.69444, 0, 0],
"92": [0.08333, 0.69444, 0, 0],
"93": [0.08333, 0.69444, 0, 0],
"94": [0, 0.61111, 0, 0],
"95": [0.09514, 0, 0, 0],
"96": [0, 0.61111, 0, 0],
"97": [0, 0.43056, 0, 0],
"98": [0, 0.61111, 0, 0],
"99": [0, 0.43056, 0, 0],
"100": [0, 0.61111, 0, 0],
"101": [0, 0.43056, 0, 0],
"102": [0, 0.61111, 0, 0],
"103": [0.22222, 0.43056, 0, 0],
"104": [0, 0.61111, 0, 0],
"105": [0, 0.61111, 0, 0],
"106": [0.22222, 0.61111, 0, 0],
"107": [0, 0.61111, 0, 0],
"108": [0, 0.61111, 0, 0],
"109": [0, 0.43056, 0, 0],
"110": [0, 0.43056, 0, 0],
"111": [0, 0.43056, 0, 0],
"112": [0.22222, 0.43056, 0, 0],
"113": [0.22222, 0.43056, 0, 0],
"114": [0, 0.43056, 0, 0],
"115": [0, 0.43056, 0, 0],
"116": [0, 0.55358, 0, 0],
"117": [0, 0.43056, 0, 0],
"118": [0, 0.43056, 0, 0],
"119": [0, 0.43056, 0, 0],
"120": [0, 0.43056, 0, 0],
"121": [0.22222, 0.43056, 0, 0],
"122": [0, 0.43056, 0, 0],
"123": [0.08333, 0.69444, 0, 0],
"124": [0.08333, 0.69444, 0, 0],
"125": [0.08333, 0.69444, 0, 0],
"126": [0, 0.61111, 0, 0],
"127": [0, 0.61111, 0, 0],
"305": [0, 0.43056, 0, 0],
"567": [0.22222, 0.43056, 0, 0],
"768": [0, 0.61111, 0, 0],
"769": [0, 0.61111, 0, 0],
"770": [0, 0.61111, 0, 0],
"771": [0, 0.61111, 0, 0],
"772": [0, 0.56555, 0, 0],
"774": [0, 0.61111, 0, 0],
"776": [0, 0.61111, 0, 0],
"778": [0, 0.61111, 0, 0],
"780": [0, 0.56597, 0, 0],
"915": [0, 0.61111, 0, 0],
"916": [0, 0.61111, 0, 0],
"920": [0, 0.61111, 0, 0],
"923": [0, 0.61111, 0, 0],
"926": [0, 0.61111, 0, 0],
"928": [0, 0.61111, 0, 0],
"931": [0, 0.61111, 0, 0],
"933": [0, 0.61111, 0, 0],
"934": [0, 0.61111, 0, 0],
"936": [0, 0.61111, 0, 0],
"937": [0, 0.61111, 0, 0],
"2018": [0, 0.61111, 0, 0],
"2019": [0, 0.61111, 0, 0],
"8242": [0, 0.61111, 0, 0],
},
};
/***/ }),
/* 165 */
/***/ (function(module, exports) {
/**
* This file holds a list of all no-argument functions and single-character
* symbols (like 'a' or ';').
*
* For each of the symbols, there are three properties they can have:
* - font (required): the font to be used for this symbol. Either "main" (the
normal font), or "ams" (the ams fonts).
* - group (required): the ParseNode group type the symbol should have (i.e.
"textord", "mathord", etc).
See https://github.com/Khan/KaTeX/wiki/Examining-TeX#group-types
* - replace: the character that this symbol or function should be
* replaced with (i.e. "\phi" has a replace value of "\u03d5", the phi
* character in the main font).
*
* The outermost map in the table indicates what mode the symbols should be
* accepted in (e.g. "math" or "text").
*/
module.exports = {
math: {},
text: {},
};
function defineSymbol(mode, font, group, replace, name) {
module.exports[mode][name] = {
font: font,
group: group,
replace: replace,
};
}
// Some abbreviations for commonly used strings.
// This helps minify the code, and also spotting typos using jshint.
// modes:
var math = "math";
var text = "text";
// fonts:
var main = "main";
var ams = "ams";
// groups:
var accent = "accent";
var bin = "bin";
var close = "close";
var inner = "inner";
var mathord = "mathord";
var op = "op";
var open = "open";
var punct = "punct";
var rel = "rel";
var spacing = "spacing";
var textord = "textord";
// Now comes the symbol table
// Relation Symbols
defineSymbol(math, main, rel, "\u2261", "\\equiv");
defineSymbol(math, main, rel, "\u227a", "\\prec");
defineSymbol(math, main, rel, "\u227b", "\\succ");
defineSymbol(math, main, rel, "\u223c", "\\sim");
defineSymbol(math, main, rel, "\u22a5", "\\perp");
defineSymbol(math, main, rel, "\u2aaf", "\\preceq");
defineSymbol(math, main, rel, "\u2ab0", "\\succeq");
defineSymbol(math, main, rel, "\u2243", "\\simeq");
defineSymbol(math, main, rel, "\u2223", "\\mid");
defineSymbol(math, main, rel, "\u226a", "\\ll");
defineSymbol(math, main, rel, "\u226b", "\\gg");
defineSymbol(math, main, rel, "\u224d", "\\asymp");
defineSymbol(math, main, rel, "\u2225", "\\parallel");
defineSymbol(math, main, rel, "\u22c8", "\\bowtie");
defineSymbol(math, main, rel, "\u2323", "\\smile");
defineSymbol(math, main, rel, "\u2291", "\\sqsubseteq");
defineSymbol(math, main, rel, "\u2292", "\\sqsupseteq");
defineSymbol(math, main, rel, "\u2250", "\\doteq");
defineSymbol(math, main, rel, "\u2322", "\\frown");
defineSymbol(math, main, rel, "\u220b", "\\ni");
defineSymbol(math, main, rel, "\u221d", "\\propto");
defineSymbol(math, main, rel, "\u22a2", "\\vdash");
defineSymbol(math, main, rel, "\u22a3", "\\dashv");
defineSymbol(math, main, rel, "\u220b", "\\owns");
// Punctuation
defineSymbol(math, main, punct, "\u002e", "\\ldotp");
defineSymbol(math, main, punct, "\u22c5", "\\cdotp");
// Misc Symbols
defineSymbol(math, main, textord, "\u0023", "\\#");
defineSymbol(math, main, textord, "\u0026", "\\&");
defineSymbol(math, main, textord, "\u2135", "\\aleph");
defineSymbol(math, main, textord, "\u2200", "\\forall");
defineSymbol(math, main, textord, "\u210f", "\\hbar");
defineSymbol(math, main, textord, "\u2203", "\\exists");
defineSymbol(math, main, textord, "\u2207", "\\nabla");
defineSymbol(math, main, textord, "\u266d", "\\flat");
defineSymbol(math, main, textord, "\u2113", "\\ell");
defineSymbol(math, main, textord, "\u266e", "\\natural");
defineSymbol(math, main, textord, "\u2663", "\\clubsuit");
defineSymbol(math, main, textord, "\u2118", "\\wp");
defineSymbol(math, main, textord, "\u266f", "\\sharp");
defineSymbol(math, main, textord, "\u2662", "\\diamondsuit");
defineSymbol(math, main, textord, "\u211c", "\\Re");
defineSymbol(math, main, textord, "\u2661", "\\heartsuit");
defineSymbol(math, main, textord, "\u2111", "\\Im");
defineSymbol(math, main, textord, "\u2660", "\\spadesuit");
// Math and Text
defineSymbol(math, main, textord, "\u2020", "\\dag");
defineSymbol(math, main, textord, "\u2021", "\\ddag");
// Large Delimiters
defineSymbol(math, main, close, "\u23b1", "\\rmoustache");
defineSymbol(math, main, open, "\u23b0", "\\lmoustache");
defineSymbol(math, main, close, "\u27ef", "\\rgroup");
defineSymbol(math, main, open, "\u27ee", "\\lgroup");
// Binary Operators
defineSymbol(math, main, bin, "\u2213", "\\mp");
defineSymbol(math, main, bin, "\u2296", "\\ominus");
defineSymbol(math, main, bin, "\u228e", "\\uplus");
defineSymbol(math, main, bin, "\u2293", "\\sqcap");
defineSymbol(math, main, bin, "\u2217", "\\ast");
defineSymbol(math, main, bin, "\u2294", "\\sqcup");
defineSymbol(math, main, bin, "\u25ef", "\\bigcirc");
defineSymbol(math, main, bin, "\u2219", "\\bullet");
defineSymbol(math, main, bin, "\u2021", "\\ddagger");
defineSymbol(math, main, bin, "\u2240", "\\wr");
defineSymbol(math, main, bin, "\u2a3f", "\\amalg");
// Arrow Symbols
defineSymbol(math, main, rel, "\u27f5", "\\longleftarrow");
defineSymbol(math, main, rel, "\u21d0", "\\Leftarrow");
defineSymbol(math, main, rel, "\u27f8", "\\Longleftarrow");
defineSymbol(math, main, rel, "\u27f6", "\\longrightarrow");
defineSymbol(math, main, rel, "\u21d2", "\\Rightarrow");
defineSymbol(math, main, rel, "\u27f9", "\\Longrightarrow");
defineSymbol(math, main, rel, "\u2194", "\\leftrightarrow");
defineSymbol(math, main, rel, "\u27f7", "\\longleftrightarrow");
defineSymbol(math, main, rel, "\u21d4", "\\Leftrightarrow");
defineSymbol(math, main, rel, "\u27fa", "\\Longleftrightarrow");
defineSymbol(math, main, rel, "\u21a6", "\\mapsto");
defineSymbol(math, main, rel, "\u27fc", "\\longmapsto");
defineSymbol(math, main, rel, "\u2197", "\\nearrow");
defineSymbol(math, main, rel, "\u21a9", "\\hookleftarrow");
defineSymbol(math, main, rel, "\u21aa", "\\hookrightarrow");
defineSymbol(math, main, rel, "\u2198", "\\searrow");
defineSymbol(math, main, rel, "\u21bc", "\\leftharpoonup");
defineSymbol(math, main, rel, "\u21c0", "\\rightharpoonup");
defineSymbol(math, main, rel, "\u2199", "\\swarrow");
defineSymbol(math, main, rel, "\u21bd", "\\leftharpoondown");
defineSymbol(math, main, rel, "\u21c1", "\\rightharpoondown");
defineSymbol(math, main, rel, "\u2196", "\\nwarrow");
defineSymbol(math, main, rel, "\u21cc", "\\rightleftharpoons");
// AMS Negated Binary Relations
defineSymbol(math, ams, rel, "\u226e", "\\nless");
defineSymbol(math, ams, rel, "\ue010", "\\nleqslant");
defineSymbol(math, ams, rel, "\ue011", "\\nleqq");
defineSymbol(math, ams, rel, "\u2a87", "\\lneq");
defineSymbol(math, ams, rel, "\u2268", "\\lneqq");
defineSymbol(math, ams, rel, "\ue00c", "\\lvertneqq");
defineSymbol(math, ams, rel, "\u22e6", "\\lnsim");
defineSymbol(math, ams, rel, "\u2a89", "\\lnapprox");
defineSymbol(math, ams, rel, "\u2280", "\\nprec");
defineSymbol(math, ams, rel, "\u22e0", "\\npreceq");
defineSymbol(math, ams, rel, "\u22e8", "\\precnsim");
defineSymbol(math, ams, rel, "\u2ab9", "\\precnapprox");
defineSymbol(math, ams, rel, "\u2241", "\\nsim");
defineSymbol(math, ams, rel, "\ue006", "\\nshortmid");
defineSymbol(math, ams, rel, "\u2224", "\\nmid");
defineSymbol(math, ams, rel, "\u22ac", "\\nvdash");
defineSymbol(math, ams, rel, "\u22ad", "\\nvDash");
defineSymbol(math, ams, rel, "\u22ea", "\\ntriangleleft");
defineSymbol(math, ams, rel, "\u22ec", "\\ntrianglelefteq");
defineSymbol(math, ams, rel, "\u228a", "\\subsetneq");
defineSymbol(math, ams, rel, "\ue01a", "\\varsubsetneq");
defineSymbol(math, ams, rel, "\u2acb", "\\subsetneqq");
defineSymbol(math, ams, rel, "\ue017", "\\varsubsetneqq");
defineSymbol(math, ams, rel, "\u226f", "\\ngtr");
defineSymbol(math, ams, rel, "\ue00f", "\\ngeqslant");
defineSymbol(math, ams, rel, "\ue00e", "\\ngeqq");
defineSymbol(math, ams, rel, "\u2a88", "\\gneq");
defineSymbol(math, ams, rel, "\u2269", "\\gneqq");
defineSymbol(math, ams, rel, "\ue00d", "\\gvertneqq");
defineSymbol(math, ams, rel, "\u22e7", "\\gnsim");
defineSymbol(math, ams, rel, "\u2a8a", "\\gnapprox");
defineSymbol(math, ams, rel, "\u2281", "\\nsucc");
defineSymbol(math, ams, rel, "\u22e1", "\\nsucceq");
defineSymbol(math, ams, rel, "\u22e9", "\\succnsim");
defineSymbol(math, ams, rel, "\u2aba", "\\succnapprox");
defineSymbol(math, ams, rel, "\u2246", "\\ncong");
defineSymbol(math, ams, rel, "\ue007", "\\nshortparallel");
defineSymbol(math, ams, rel, "\u2226", "\\nparallel");
defineSymbol(math, ams, rel, "\u22af", "\\nVDash");
defineSymbol(math, ams, rel, "\u22eb", "\\ntriangleright");
defineSymbol(math, ams, rel, "\u22ed", "\\ntrianglerighteq");
defineSymbol(math, ams, rel, "\ue018", "\\nsupseteqq");
defineSymbol(math, ams, rel, "\u228b", "\\supsetneq");
defineSymbol(math, ams, rel, "\ue01b", "\\varsupsetneq");
defineSymbol(math, ams, rel, "\u2acc", "\\supsetneqq");
defineSymbol(math, ams, rel, "\ue019", "\\varsupsetneqq");
defineSymbol(math, ams, rel, "\u22ae", "\\nVdash");
defineSymbol(math, ams, rel, "\u2ab5", "\\precneqq");
defineSymbol(math, ams, rel, "\u2ab6", "\\succneqq");
defineSymbol(math, ams, rel, "\ue016", "\\nsubseteqq");
defineSymbol(math, ams, bin, "\u22b4", "\\unlhd");
defineSymbol(math, ams, bin, "\u22b5", "\\unrhd");
// AMS Negated Arrows
defineSymbol(math, ams, rel, "\u219a", "\\nleftarrow");
defineSymbol(math, ams, rel, "\u219b", "\\nrightarrow");
defineSymbol(math, ams, rel, "\u21cd", "\\nLeftarrow");
defineSymbol(math, ams, rel, "\u21cf", "\\nRightarrow");
defineSymbol(math, ams, rel, "\u21ae", "\\nleftrightarrow");
defineSymbol(math, ams, rel, "\u21ce", "\\nLeftrightarrow");
// AMS Misc
defineSymbol(math, ams, rel, "\u25b3", "\\vartriangle");
defineSymbol(math, ams, textord, "\u210f", "\\hslash");
defineSymbol(math, ams, textord, "\u25bd", "\\triangledown");
defineSymbol(math, ams, textord, "\u25ca", "\\lozenge");
defineSymbol(math, ams, textord, "\u24c8", "\\circledS");
defineSymbol(math, ams, textord, "\u00ae", "\\circledR");
defineSymbol(math, ams, textord, "\u2221", "\\measuredangle");
defineSymbol(math, ams, textord, "\u2204", "\\nexists");
defineSymbol(math, ams, textord, "\u2127", "\\mho");
defineSymbol(math, ams, textord, "\u2132", "\\Finv");
defineSymbol(math, ams, textord, "\u2141", "\\Game");
defineSymbol(math, ams, textord, "\u006b", "\\Bbbk");
defineSymbol(math, ams, textord, "\u2035", "\\backprime");
defineSymbol(math, ams, textord, "\u25b2", "\\blacktriangle");
defineSymbol(math, ams, textord, "\u25bc", "\\blacktriangledown");
defineSymbol(math, ams, textord, "\u25a0", "\\blacksquare");
defineSymbol(math, ams, textord, "\u29eb", "\\blacklozenge");
defineSymbol(math, ams, textord, "\u2605", "\\bigstar");
defineSymbol(math, ams, textord, "\u2222", "\\sphericalangle");
defineSymbol(math, ams, textord, "\u2201", "\\complement");
defineSymbol(math, ams, textord, "\u00f0", "\\eth");
defineSymbol(math, ams, textord, "\u2571", "\\diagup");
defineSymbol(math, ams, textord, "\u2572", "\\diagdown");
defineSymbol(math, ams, textord, "\u25a1", "\\square");
defineSymbol(math, ams, textord, "\u25a1", "\\Box");
defineSymbol(math, ams, textord, "\u25ca", "\\Diamond");
defineSymbol(math, ams, textord, "\u00a5", "\\yen");
defineSymbol(math, ams, textord, "\u2713", "\\checkmark");
// AMS Hebrew
defineSymbol(math, ams, textord, "\u2136", "\\beth");
defineSymbol(math, ams, textord, "\u2138", "\\daleth");
defineSymbol(math, ams, textord, "\u2137", "\\gimel");
// AMS Greek
defineSymbol(math, ams, textord, "\u03dd", "\\digamma");
defineSymbol(math, ams, textord, "\u03f0", "\\varkappa");
// AMS Delimiters
defineSymbol(math, ams, open, "\u250c", "\\ulcorner");
defineSymbol(math, ams, close, "\u2510", "\\urcorner");
defineSymbol(math, ams, open, "\u2514", "\\llcorner");
defineSymbol(math, ams, close, "\u2518", "\\lrcorner");
// AMS Binary Relations
defineSymbol(math, ams, rel, "\u2266", "\\leqq");
defineSymbol(math, ams, rel, "\u2a7d", "\\leqslant");
defineSymbol(math, ams, rel, "\u2a95", "\\eqslantless");
defineSymbol(math, ams, rel, "\u2272", "\\lesssim");
defineSymbol(math, ams, rel, "\u2a85", "\\lessapprox");
defineSymbol(math, ams, rel, "\u224a", "\\approxeq");
defineSymbol(math, ams, bin, "\u22d6", "\\lessdot");
defineSymbol(math, ams, rel, "\u22d8", "\\lll");
defineSymbol(math, ams, rel, "\u2276", "\\lessgtr");
defineSymbol(math, ams, rel, "\u22da", "\\lesseqgtr");
defineSymbol(math, ams, rel, "\u2a8b", "\\lesseqqgtr");
defineSymbol(math, ams, rel, "\u2251", "\\doteqdot");
defineSymbol(math, ams, rel, "\u2253", "\\risingdotseq");
defineSymbol(math, ams, rel, "\u2252", "\\fallingdotseq");
defineSymbol(math, ams, rel, "\u223d", "\\backsim");
defineSymbol(math, ams, rel, "\u22cd", "\\backsimeq");
defineSymbol(math, ams, rel, "\u2ac5", "\\subseteqq");
defineSymbol(math, ams, rel, "\u22d0", "\\Subset");
defineSymbol(math, ams, rel, "\u228f", "\\sqsubset");
defineSymbol(math, ams, rel, "\u227c", "\\preccurlyeq");
defineSymbol(math, ams, rel, "\u22de", "\\curlyeqprec");
defineSymbol(math, ams, rel, "\u227e", "\\precsim");
defineSymbol(math, ams, rel, "\u2ab7", "\\precapprox");
defineSymbol(math, ams, rel, "\u22b2", "\\vartriangleleft");
defineSymbol(math, ams, rel, "\u22b4", "\\trianglelefteq");
defineSymbol(math, ams, rel, "\u22a8", "\\vDash");
defineSymbol(math, ams, rel, "\u22aa", "\\Vvdash");
defineSymbol(math, ams, rel, "\u2323", "\\smallsmile");
defineSymbol(math, ams, rel, "\u2322", "\\smallfrown");
defineSymbol(math, ams, rel, "\u224f", "\\bumpeq");
defineSymbol(math, ams, rel, "\u224e", "\\Bumpeq");
defineSymbol(math, ams, rel, "\u2267", "\\geqq");
defineSymbol(math, ams, rel, "\u2a7e", "\\geqslant");
defineSymbol(math, ams, rel, "\u2a96", "\\eqslantgtr");
defineSymbol(math, ams, rel, "\u2273", "\\gtrsim");
defineSymbol(math, ams, rel, "\u2a86", "\\gtrapprox");
defineSymbol(math, ams, bin, "\u22d7", "\\gtrdot");
defineSymbol(math, ams, rel, "\u22d9", "\\ggg");
defineSymbol(math, ams, rel, "\u2277", "\\gtrless");
defineSymbol(math, ams, rel, "\u22db", "\\gtreqless");
defineSymbol(math, ams, rel, "\u2a8c", "\\gtreqqless");
defineSymbol(math, ams, rel, "\u2256", "\\eqcirc");
defineSymbol(math, ams, rel, "\u2257", "\\circeq");
defineSymbol(math, ams, rel, "\u225c", "\\triangleq");
defineSymbol(math, ams, rel, "\u223c", "\\thicksim");
defineSymbol(math, ams, rel, "\u2248", "\\thickapprox");
defineSymbol(math, ams, rel, "\u2ac6", "\\supseteqq");
defineSymbol(math, ams, rel, "\u22d1", "\\Supset");
defineSymbol(math, ams, rel, "\u2290", "\\sqsupset");
defineSymbol(math, ams, rel, "\u227d", "\\succcurlyeq");
defineSymbol(math, ams, rel, "\u22df", "\\curlyeqsucc");
defineSymbol(math, ams, rel, "\u227f", "\\succsim");
defineSymbol(math, ams, rel, "\u2ab8", "\\succapprox");
defineSymbol(math, ams, rel, "\u22b3", "\\vartriangleright");
defineSymbol(math, ams, rel, "\u22b5", "\\trianglerighteq");
defineSymbol(math, ams, rel, "\u22a9", "\\Vdash");
defineSymbol(math, ams, rel, "\u2223", "\\shortmid");
defineSymbol(math, ams, rel, "\u2225", "\\shortparallel");
defineSymbol(math, ams, rel, "\u226c", "\\between");
defineSymbol(math, ams, rel, "\u22d4", "\\pitchfork");
defineSymbol(math, ams, rel, "\u221d", "\\varpropto");
defineSymbol(math, ams, rel, "\u25c0", "\\blacktriangleleft");
defineSymbol(math, ams, rel, "\u2234", "\\therefore");
defineSymbol(math, ams, rel, "\u220d", "\\backepsilon");
defineSymbol(math, ams, rel, "\u25b6", "\\blacktriangleright");
defineSymbol(math, ams, rel, "\u2235", "\\because");
defineSymbol(math, ams, rel, "\u22d8", "\\llless");
defineSymbol(math, ams, rel, "\u22d9", "\\gggtr");
defineSymbol(math, ams, bin, "\u22b2", "\\lhd");
defineSymbol(math, ams, bin, "\u22b3", "\\rhd");
defineSymbol(math, ams, rel, "\u2242", "\\eqsim");
defineSymbol(math, main, rel, "\u22c8", "\\Join");
defineSymbol(math, ams, rel, "\u2251", "\\Doteq");
// AMS Binary Operators
defineSymbol(math, ams, bin, "\u2214", "\\dotplus");
defineSymbol(math, ams, bin, "\u2216", "\\smallsetminus");
defineSymbol(math, ams, bin, "\u22d2", "\\Cap");
defineSymbol(math, ams, bin, "\u22d3", "\\Cup");
defineSymbol(math, ams, bin, "\u2a5e", "\\doublebarwedge");
defineSymbol(math, ams, bin, "\u229f", "\\boxminus");
defineSymbol(math, ams, bin, "\u229e", "\\boxplus");
defineSymbol(math, ams, bin, "\u22c7", "\\divideontimes");
defineSymbol(math, ams, bin, "\u22c9", "\\ltimes");
defineSymbol(math, ams, bin, "\u22ca", "\\rtimes");
defineSymbol(math, ams, bin, "\u22cb", "\\leftthreetimes");
defineSymbol(math, ams, bin, "\u22cc", "\\rightthreetimes");
defineSymbol(math, ams, bin, "\u22cf", "\\curlywedge");
defineSymbol(math, ams, bin, "\u22ce", "\\curlyvee");
defineSymbol(math, ams, bin, "\u229d", "\\circleddash");
defineSymbol(math, ams, bin, "\u229b", "\\circledast");
defineSymbol(math, ams, bin, "\u22c5", "\\centerdot");
defineSymbol(math, ams, bin, "\u22ba", "\\intercal");
defineSymbol(math, ams, bin, "\u22d2", "\\doublecap");
defineSymbol(math, ams, bin, "\u22d3", "\\doublecup");
defineSymbol(math, ams, bin, "\u22a0", "\\boxtimes");
// AMS Arrows
defineSymbol(math, ams, rel, "\u21e2", "\\dashrightarrow");
defineSymbol(math, ams, rel, "\u21e0", "\\dashleftarrow");
defineSymbol(math, ams, rel, "\u21c7", "\\leftleftarrows");
defineSymbol(math, ams, rel, "\u21c6", "\\leftrightarrows");
defineSymbol(math, ams, rel, "\u21da", "\\Lleftarrow");
defineSymbol(math, ams, rel, "\u219e", "\\twoheadleftarrow");
defineSymbol(math, ams, rel, "\u21a2", "\\leftarrowtail");
defineSymbol(math, ams, rel, "\u21ab", "\\looparrowleft");
defineSymbol(math, ams, rel, "\u21cb", "\\leftrightharpoons");
defineSymbol(math, ams, rel, "\u21b6", "\\curvearrowleft");
defineSymbol(math, ams, rel, "\u21ba", "\\circlearrowleft");
defineSymbol(math, ams, rel, "\u21b0", "\\Lsh");
defineSymbol(math, ams, rel, "\u21c8", "\\upuparrows");
defineSymbol(math, ams, rel, "\u21bf", "\\upharpoonleft");
defineSymbol(math, ams, rel, "\u21c3", "\\downharpoonleft");
defineSymbol(math, ams, rel, "\u22b8", "\\multimap");
defineSymbol(math, ams, rel, "\u21ad", "\\leftrightsquigarrow");
defineSymbol(math, ams, rel, "\u21c9", "\\rightrightarrows");
defineSymbol(math, ams, rel, "\u21c4", "\\rightleftarrows");
defineSymbol(math, ams, rel, "\u21a0", "\\twoheadrightarrow");
defineSymbol(math, ams, rel, "\u21a3", "\\rightarrowtail");
defineSymbol(math, ams, rel, "\u21ac", "\\looparrowright");
defineSymbol(math, ams, rel, "\u21b7", "\\curvearrowright");
defineSymbol(math, ams, rel, "\u21bb", "\\circlearrowright");
defineSymbol(math, ams, rel, "\u21b1", "\\Rsh");
defineSymbol(math, ams, rel, "\u21ca", "\\downdownarrows");
defineSymbol(math, ams, rel, "\u21be", "\\upharpoonright");
defineSymbol(math, ams, rel, "\u21c2", "\\downharpoonright");
defineSymbol(math, ams, rel, "\u21dd", "\\rightsquigarrow");
defineSymbol(math, ams, rel, "\u21dd", "\\leadsto");
defineSymbol(math, ams, rel, "\u21db", "\\Rrightarrow");
defineSymbol(math, ams, rel, "\u21be", "\\restriction");
defineSymbol(math, main, textord, "\u2018", "`");
defineSymbol(math, main, textord, "$", "\\$");
defineSymbol(math, main, textord, "%", "\\%");
defineSymbol(math, main, textord, "_", "\\_");
defineSymbol(math, main, textord, "\u2220", "\\angle");
defineSymbol(math, main, textord, "\u221e", "\\infty");
defineSymbol(math, main, textord, "\u2032", "\\prime");
defineSymbol(math, main, textord, "\u25b3", "\\triangle");
defineSymbol(math, main, textord, "\u0393", "\\Gamma");
defineSymbol(math, main, textord, "\u0394", "\\Delta");
defineSymbol(math, main, textord, "\u0398", "\\Theta");
defineSymbol(math, main, textord, "\u039b", "\\Lambda");
defineSymbol(math, main, textord, "\u039e", "\\Xi");
defineSymbol(math, main, textord, "\u03a0", "\\Pi");
defineSymbol(math, main, textord, "\u03a3", "\\Sigma");
defineSymbol(math, main, textord, "\u03a5", "\\Upsilon");
defineSymbol(math, main, textord, "\u03a6", "\\Phi");
defineSymbol(math, main, textord, "\u03a8", "\\Psi");
defineSymbol(math, main, textord, "\u03a9", "\\Omega");
defineSymbol(math, main, textord, "\u00ac", "\\neg");
defineSymbol(math, main, textord, "\u00ac", "\\lnot");
defineSymbol(math, main, textord, "\u22a4", "\\top");
defineSymbol(math, main, textord, "\u22a5", "\\bot");
defineSymbol(math, main, textord, "\u2205", "\\emptyset");
defineSymbol(math, ams, textord, "\u2205", "\\varnothing");
defineSymbol(math, main, mathord, "\u03b1", "\\alpha");
defineSymbol(math, main, mathord, "\u03b2", "\\beta");
defineSymbol(math, main, mathord, "\u03b3", "\\gamma");
defineSymbol(math, main, mathord, "\u03b4", "\\delta");
defineSymbol(math, main, mathord, "\u03f5", "\\epsilon");
defineSymbol(math, main, mathord, "\u03b6", "\\zeta");
defineSymbol(math, main, mathord, "\u03b7", "\\eta");
defineSymbol(math, main, mathord, "\u03b8", "\\theta");
defineSymbol(math, main, mathord, "\u03b9", "\\iota");
defineSymbol(math, main, mathord, "\u03ba", "\\kappa");
defineSymbol(math, main, mathord, "\u03bb", "\\lambda");
defineSymbol(math, main, mathord, "\u03bc", "\\mu");
defineSymbol(math, main, mathord, "\u03bd", "\\nu");
defineSymbol(math, main, mathord, "\u03be", "\\xi");
defineSymbol(math, main, mathord, "o", "\\omicron");
defineSymbol(math, main, mathord, "\u03c0", "\\pi");
defineSymbol(math, main, mathord, "\u03c1", "\\rho");
defineSymbol(math, main, mathord, "\u03c3", "\\sigma");
defineSymbol(math, main, mathord, "\u03c4", "\\tau");
defineSymbol(math, main, mathord, "\u03c5", "\\upsilon");
defineSymbol(math, main, mathord, "\u03d5", "\\phi");
defineSymbol(math, main, mathord, "\u03c7", "\\chi");
defineSymbol(math, main, mathord, "\u03c8", "\\psi");
defineSymbol(math, main, mathord, "\u03c9", "\\omega");
defineSymbol(math, main, mathord, "\u03b5", "\\varepsilon");
defineSymbol(math, main, mathord, "\u03d1", "\\vartheta");
defineSymbol(math, main, mathord, "\u03d6", "\\varpi");
defineSymbol(math, main, mathord, "\u03f1", "\\varrho");
defineSymbol(math, main, mathord, "\u03c2", "\\varsigma");
defineSymbol(math, main, mathord, "\u03c6", "\\varphi");
defineSymbol(math, main, bin, "\u2217", "*");
defineSymbol(math, main, bin, "+", "+");
defineSymbol(math, main, bin, "\u2212", "-");
defineSymbol(math, main, bin, "\u22c5", "\\cdot");
defineSymbol(math, main, bin, "\u2218", "\\circ");
defineSymbol(math, main, bin, "\u00f7", "\\div");
defineSymbol(math, main, bin, "\u00b1", "\\pm");
defineSymbol(math, main, bin, "\u00d7", "\\times");
defineSymbol(math, main, bin, "\u2229", "\\cap");
defineSymbol(math, main, bin, "\u222a", "\\cup");
defineSymbol(math, main, bin, "\u2216", "\\setminus");
defineSymbol(math, main, bin, "\u2227", "\\land");
defineSymbol(math, main, bin, "\u2228", "\\lor");
defineSymbol(math, main, bin, "\u2227", "\\wedge");
defineSymbol(math, main, bin, "\u2228", "\\vee");
defineSymbol(math, main, textord, "\u221a", "\\surd");
defineSymbol(math, main, open, "(", "(");
defineSymbol(math, main, open, "[", "[");
defineSymbol(math, main, open, "\u27e8", "\\langle");
defineSymbol(math, main, open, "\u2223", "\\lvert");
defineSymbol(math, main, open, "\u2225", "\\lVert");
defineSymbol(math, main, close, ")", ")");
defineSymbol(math, main, close, "]", "]");
defineSymbol(math, main, close, "?", "?");
defineSymbol(math, main, close, "!", "!");
defineSymbol(math, main, close, "\u27e9", "\\rangle");
defineSymbol(math, main, close, "\u2223", "\\rvert");
defineSymbol(math, main, close, "\u2225", "\\rVert");
defineSymbol(math, main, rel, "=", "=");
defineSymbol(math, main, rel, "<", "<");
defineSymbol(math, main, rel, ">", ">");
defineSymbol(math, main, rel, ":", ":");
defineSymbol(math, main, rel, "\u2248", "\\approx");
defineSymbol(math, main, rel, "\u2245", "\\cong");
defineSymbol(math, main, rel, "\u2265", "\\ge");
defineSymbol(math, main, rel, "\u2265", "\\geq");
defineSymbol(math, main, rel, "\u2190", "\\gets");
defineSymbol(math, main, rel, ">", "\\gt");
defineSymbol(math, main, rel, "\u2208", "\\in");
defineSymbol(math, main, rel, "\u2209", "\\notin");
defineSymbol(math, main, rel, "\u2282", "\\subset");
defineSymbol(math, main, rel, "\u2283", "\\supset");
defineSymbol(math, main, rel, "\u2286", "\\subseteq");
defineSymbol(math, main, rel, "\u2287", "\\supseteq");
defineSymbol(math, ams, rel, "\u2288", "\\nsubseteq");
defineSymbol(math, ams, rel, "\u2289", "\\nsupseteq");
defineSymbol(math, main, rel, "\u22a8", "\\models");
defineSymbol(math, main, rel, "\u2190", "\\leftarrow");
defineSymbol(math, main, rel, "\u2264", "\\le");
defineSymbol(math, main, rel, "\u2264", "\\leq");
defineSymbol(math, main, rel, "<", "\\lt");
defineSymbol(math, main, rel, "\u2260", "\\ne");
defineSymbol(math, main, rel, "\u2260", "\\neq");
defineSymbol(math, main, rel, "\u2192", "\\rightarrow");
defineSymbol(math, main, rel, "\u2192", "\\to");
defineSymbol(math, ams, rel, "\u2271", "\\ngeq");
defineSymbol(math, ams, rel, "\u2270", "\\nleq");
defineSymbol(math, main, spacing, null, "\\!");
defineSymbol(math, main, spacing, "\u00a0", "\\ ");
defineSymbol(math, main, spacing, "\u00a0", "~");
defineSymbol(math, main, spacing, null, "\\,");
defineSymbol(math, main, spacing, null, "\\:");
defineSymbol(math, main, spacing, null, "\\;");
defineSymbol(math, main, spacing, null, "\\enspace");
defineSymbol(math, main, spacing, null, "\\qquad");
defineSymbol(math, main, spacing, null, "\\quad");
defineSymbol(math, main, spacing, "\u00a0", "\\space");
defineSymbol(math, main, punct, ",", ",");
defineSymbol(math, main, punct, ";", ";");
defineSymbol(math, main, punct, ":", "\\colon");
defineSymbol(math, ams, bin, "\u22bc", "\\barwedge");
defineSymbol(math, ams, bin, "\u22bb", "\\veebar");
defineSymbol(math, main, bin, "\u2299", "\\odot");
defineSymbol(math, main, bin, "\u2295", "\\oplus");
defineSymbol(math, main, bin, "\u2297", "\\otimes");
defineSymbol(math, main, textord, "\u2202", "\\partial");
defineSymbol(math, main, bin, "\u2298", "\\oslash");
defineSymbol(math, ams, bin, "\u229a", "\\circledcirc");
defineSymbol(math, ams, bin, "\u22a1", "\\boxdot");
defineSymbol(math, main, bin, "\u25b3", "\\bigtriangleup");
defineSymbol(math, main, bin, "\u25bd", "\\bigtriangledown");
defineSymbol(math, main, bin, "\u2020", "\\dagger");
defineSymbol(math, main, bin, "\u22c4", "\\diamond");
defineSymbol(math, main, bin, "\u22c6", "\\star");
defineSymbol(math, main, bin, "\u25c3", "\\triangleleft");
defineSymbol(math, main, bin, "\u25b9", "\\triangleright");
defineSymbol(math, main, open, "{", "\\{");
defineSymbol(math, main, close, "}", "\\}");
defineSymbol(math, main, open, "{", "\\lbrace");
defineSymbol(math, main, close, "}", "\\rbrace");
defineSymbol(math, main, open, "[", "\\lbrack");
defineSymbol(math, main, close, "]", "\\rbrack");
defineSymbol(math, main, open, "\u230a", "\\lfloor");
defineSymbol(math, main, close, "\u230b", "\\rfloor");
defineSymbol(math, main, open, "\u2308", "\\lceil");
defineSymbol(math, main, close, "\u2309", "\\rceil");
defineSymbol(math, main, textord, "\\", "\\backslash");
defineSymbol(math, main, textord, "\u2223", "|");
defineSymbol(math, main, textord, "\u2223", "\\vert");
defineSymbol(math, main, textord, "\u2225", "\\|");
defineSymbol(math, main, textord, "\u2225", "\\Vert");
defineSymbol(math, main, rel, "\u2191", "\\uparrow");
defineSymbol(math, main, rel, "\u21d1", "\\Uparrow");
defineSymbol(math, main, rel, "\u2193", "\\downarrow");
defineSymbol(math, main, rel, "\u21d3", "\\Downarrow");
defineSymbol(math, main, rel, "\u2195", "\\updownarrow");
defineSymbol(math, main, rel, "\u21d5", "\\Updownarrow");
defineSymbol(math, math, op, "\u2210", "\\coprod");
defineSymbol(math, math, op, "\u22c1", "\\bigvee");
defineSymbol(math, math, op, "\u22c0", "\\bigwedge");
defineSymbol(math, math, op, "\u2a04", "\\biguplus");
defineSymbol(math, math, op, "\u22c2", "\\bigcap");
defineSymbol(math, math, op, "\u22c3", "\\bigcup");
defineSymbol(math, math, op, "\u222b", "\\int");
defineSymbol(math, math, op, "\u222b", "\\intop");
defineSymbol(math, math, op, "\u222c", "\\iint");
defineSymbol(math, math, op, "\u222d", "\\iiint");
defineSymbol(math, math, op, "\u220f", "\\prod");
defineSymbol(math, math, op, "\u2211", "\\sum");
defineSymbol(math, math, op, "\u2a02", "\\bigotimes");
defineSymbol(math, math, op, "\u2a01", "\\bigoplus");
defineSymbol(math, math, op, "\u2a00", "\\bigodot");
defineSymbol(math, math, op, "\u222e", "\\oint");
defineSymbol(math, math, op, "\u2a06", "\\bigsqcup");
defineSymbol(math, math, op, "\u222b", "\\smallint");
defineSymbol(math, main, inner, "\u2026", "\\ldots");
defineSymbol(math, main, inner, "\u22ef", "\\cdots");
defineSymbol(math, main, inner, "\u22f1", "\\ddots");
defineSymbol(math, main, textord, "\u22ee", "\\vdots");
defineSymbol(math, main, accent, "\u00b4", "\\acute");
defineSymbol(math, main, accent, "\u0060", "\\grave");
defineSymbol(math, main, accent, "\u00a8", "\\ddot");
defineSymbol(math, main, accent, "\u007e", "\\tilde");
defineSymbol(math, main, accent, "\u00af", "\\bar");
defineSymbol(math, main, accent, "\u02d8", "\\breve");
defineSymbol(math, main, accent, "\u02c7", "\\check");
defineSymbol(math, main, accent, "\u005e", "\\hat");
defineSymbol(math, main, accent, "\u20d7", "\\vec");
defineSymbol(math, main, accent, "\u02d9", "\\dot");
defineSymbol(math, main, mathord, "\u0131", "\\imath");
defineSymbol(math, main, mathord, "\u0237", "\\jmath");
defineSymbol(text, main, spacing, "\u00a0", "\\ ");
defineSymbol(text, main, spacing, "\u00a0", " ");
defineSymbol(text, main, spacing, "\u00a0", "~");
// There are lots of symbols which are the same, so we add them in afterwards.
var i;
var ch;
// All of these are textords in math mode
var mathTextSymbols = "0123456789/@.\"";
for (i = 0; i < mathTextSymbols.length; i++) {
ch = mathTextSymbols.charAt(i);
defineSymbol(math, main, textord, ch, ch);
}
// All of these are textords in text mode
var textSymbols = "0123456789`!@*()-=+[]'\";:?/.,";
for (i = 0; i < textSymbols.length; i++) {
ch = textSymbols.charAt(i);
defineSymbol(text, main, textord, ch, ch);
}
// All of these are textords in text mode, and mathords in math mode
var letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
for (i = 0; i < letters.length; i++) {
ch = letters.charAt(i);
defineSymbol(math, main, mathord, ch, ch);
defineSymbol(text, main, textord, ch, ch);
}
/***/ }),
/* 166 */
/***/ (function(module, exports, __webpack_require__) {
/**
* This file deals with creating delimiters of various sizes. The TeXbook
* discusses these routines on page 441-442, in the "Another subroutine sets box
* x to a specified variable delimiter" paragraph.
*
* There are three main routines here. `makeSmallDelim` makes a delimiter in the
* normal font, but in either text, script, or scriptscript style.
* `makeLargeDelim` makes a delimiter in textstyle, but in one of the Size1,
* Size2, Size3, or Size4 fonts. `makeStackedDelim` makes a delimiter out of
* smaller pieces that are stacked on top of one another.
*
* The functions take a parameter `center`, which determines if the delimiter
* should be centered around the axis.
*
* Then, there are three exposed functions. `sizedDelim` makes a delimiter in
* one of the given sizes. This is used for things like `\bigl`.
* `customSizedDelim` makes a delimiter with a given total height+depth. It is
* called in places like `\sqrt`. `leftRightDelim` makes an appropriate
* delimiter which surrounds an expression of a given height an depth. It is
* used in `\left` and `\right`.
*/
var ParseError = __webpack_require__(155);
var Style = __webpack_require__(159);
var buildCommon = __webpack_require__(160);
var fontMetrics = __webpack_require__(163);
var symbols = __webpack_require__(165);
var utils = __webpack_require__(162);
var makeSpan = buildCommon.makeSpan;
/**
* Get the metrics for a given symbol and font, after transformation (i.e.
* after following replacement from symbols.js)
*/
var getMetrics = function(symbol, font) {
if (symbols.math[symbol] && symbols.math[symbol].replace) {
return fontMetrics.getCharacterMetrics(
symbols.math[symbol].replace, font);
} else {
return fontMetrics.getCharacterMetrics(
symbol, font);
}
};
/**
* Builds a symbol in the given font size (note size is an integer)
*/
var mathrmSize = function(value, size, mode) {
return buildCommon.makeSymbol(value, "Size" + size + "-Regular", mode);
};
/**
* Puts a delimiter span in a given style, and adds appropriate height, depth,
* and maxFontSizes.
*/
var styleWrap = function(delim, toStyle, options) {
var span = makeSpan(
["style-wrap", options.style.reset(), toStyle.cls()], [delim]);
var multiplier = toStyle.sizeMultiplier / options.style.sizeMultiplier;
span.height *= multiplier;
span.depth *= multiplier;
span.maxFontSize = toStyle.sizeMultiplier;
return span;
};
/**
* Makes a small delimiter. This is a delimiter that comes in the Main-Regular
* font, but is restyled to either be in textstyle, scriptstyle, or
* scriptscriptstyle.
*/
var makeSmallDelim = function(delim, style, center, options, mode) {
var text = buildCommon.makeSymbol(delim, "Main-Regular", mode);
var span = styleWrap(text, style, options);
if (center) {
var shift =
(1 - options.style.sizeMultiplier / style.sizeMultiplier) *
fontMetrics.metrics.axisHeight;
span.style.top = shift + "em";
span.height -= shift;
span.depth += shift;
}
return span;
};
/**
* Makes a large delimiter. This is a delimiter that comes in the Size1, Size2,
* Size3, or Size4 fonts. It is always rendered in textstyle.
*/
var makeLargeDelim = function(delim, size, center, options, mode) {
var inner = mathrmSize(delim, size, mode);
var span = styleWrap(
makeSpan(["delimsizing", "size" + size],
[inner], options.getColor()),
Style.TEXT, options);
if (center) {
var shift = (1 - options.style.sizeMultiplier) *
fontMetrics.metrics.axisHeight;
span.style.top = shift + "em";
span.height -= shift;
span.depth += shift;
}
return span;
};
/**
* Make an inner span with the given offset and in the given font. This is used
* in `makeStackedDelim` to make the stacking pieces for the delimiter.
*/
var makeInner = function(symbol, font, mode) {
var sizeClass;
// Apply the correct CSS class to choose the right font.
if (font === "Size1-Regular") {
sizeClass = "delim-size1";
} else if (font === "Size4-Regular") {
sizeClass = "delim-size4";
}
var inner = makeSpan(
["delimsizinginner", sizeClass],
[makeSpan([], [buildCommon.makeSymbol(symbol, font, mode)])]);
// Since this will be passed into `makeVList` in the end, wrap the element
// in the appropriate tag that VList uses.
return {type: "elem", elem: inner};
};
/**
* Make a stacked delimiter out of a given delimiter, with the total height at
* least `heightTotal`. This routine is mentioned on page 442 of the TeXbook.
*/
var makeStackedDelim = function(delim, heightTotal, center, options, mode) {
// There are four parts, the top, an optional middle, a repeated part, and a
// bottom.
var top;
var middle;
var repeat;
var bottom;
top = repeat = bottom = delim;
middle = null;
// Also keep track of what font the delimiters are in
var font = "Size1-Regular";
// We set the parts and font based on the symbol. Note that we use
// '\u23d0' instead of '|' and '\u2016' instead of '\\|' for the
// repeats of the arrows
if (delim === "\\uparrow") {
repeat = bottom = "\u23d0";
} else if (delim === "\\Uparrow") {
repeat = bottom = "\u2016";
} else if (delim === "\\downarrow") {
top = repeat = "\u23d0";
} else if (delim === "\\Downarrow") {
top = repeat = "\u2016";
} else if (delim === "\\updownarrow") {
top = "\\uparrow";
repeat = "\u23d0";
bottom = "\\downarrow";
} else if (delim === "\\Updownarrow") {
top = "\\Uparrow";
repeat = "\u2016";
bottom = "\\Downarrow";
} else if (delim === "[" || delim === "\\lbrack") {
top = "\u23a1";
repeat = "\u23a2";
bottom = "\u23a3";
font = "Size4-Regular";
} else if (delim === "]" || delim === "\\rbrack") {
top = "\u23a4";
repeat = "\u23a5";
bottom = "\u23a6";
font = "Size4-Regular";
} else if (delim === "\\lfloor") {
repeat = top = "\u23a2";
bottom = "\u23a3";
font = "Size4-Regular";
} else if (delim === "\\lceil") {
top = "\u23a1";
repeat = bottom = "\u23a2";
font = "Size4-Regular";
} else if (delim === "\\rfloor") {
repeat = top = "\u23a5";
bottom = "\u23a6";
font = "Size4-Regular";
} else if (delim === "\\rceil") {
top = "\u23a4";
repeat = bottom = "\u23a5";
font = "Size4-Regular";
} else if (delim === "(") {
top = "\u239b";
repeat = "\u239c";
bottom = "\u239d";
font = "Size4-Regular";
} else if (delim === ")") {
top = "\u239e";
repeat = "\u239f";
bottom = "\u23a0";
font = "Size4-Regular";
} else if (delim === "\\{" || delim === "\\lbrace") {
top = "\u23a7";
middle = "\u23a8";
bottom = "\u23a9";
repeat = "\u23aa";
font = "Size4-Regular";
} else if (delim === "\\}" || delim === "\\rbrace") {
top = "\u23ab";
middle = "\u23ac";
bottom = "\u23ad";
repeat = "\u23aa";
font = "Size4-Regular";
} else if (delim === "\\lgroup") {
top = "\u23a7";
bottom = "\u23a9";
repeat = "\u23aa";
font = "Size4-Regular";
} else if (delim === "\\rgroup") {
top = "\u23ab";
bottom = "\u23ad";
repeat = "\u23aa";
font = "Size4-Regular";
} else if (delim === "\\lmoustache") {
top = "\u23a7";
bottom = "\u23ad";
repeat = "\u23aa";
font = "Size4-Regular";
} else if (delim === "\\rmoustache") {
top = "\u23ab";
bottom = "\u23a9";
repeat = "\u23aa";
font = "Size4-Regular";
} else if (delim === "\\surd") {
top = "\ue001";
bottom = "\u23b7";
repeat = "\ue000";
font = "Size4-Regular";
}
// Get the metrics of the four sections
var topMetrics = getMetrics(top, font);
var topHeightTotal = topMetrics.height + topMetrics.depth;
var repeatMetrics = getMetrics(repeat, font);
var repeatHeightTotal = repeatMetrics.height + repeatMetrics.depth;
var bottomMetrics = getMetrics(bottom, font);
var bottomHeightTotal = bottomMetrics.height + bottomMetrics.depth;
var middleHeightTotal = 0;
var middleFactor = 1;
if (middle !== null) {
var middleMetrics = getMetrics(middle, font);
middleHeightTotal = middleMetrics.height + middleMetrics.depth;
middleFactor = 2; // repeat symmetrically above and below middle
}
// Calcuate the minimal height that the delimiter can have.
// It is at least the size of the top, bottom, and optional middle combined.
var minHeight = topHeightTotal + bottomHeightTotal + middleHeightTotal;
// Compute the number of copies of the repeat symbol we will need
var repeatCount = Math.ceil(
(heightTotal - minHeight) / (middleFactor * repeatHeightTotal));
// Compute the total height of the delimiter including all the symbols
var realHeightTotal =
minHeight + repeatCount * middleFactor * repeatHeightTotal;
// The center of the delimiter is placed at the center of the axis. Note
// that in this context, "center" means that the delimiter should be
// centered around the axis in the current style, while normally it is
// centered around the axis in textstyle.
var axisHeight = fontMetrics.metrics.axisHeight;
if (center) {
axisHeight *= options.style.sizeMultiplier;
}
// Calculate the depth
var depth = realHeightTotal / 2 - axisHeight;
// Now, we start building the pieces that will go into the vlist
// Keep a list of the inner pieces
var inners = [];
// Add the bottom symbol
inners.push(makeInner(bottom, font, mode));
var i;
if (middle === null) {
// Add that many symbols
for (i = 0; i < repeatCount; i++) {
inners.push(makeInner(repeat, font, mode));
}
} else {
// When there is a middle bit, we need the middle part and two repeated
// sections
for (i = 0; i < repeatCount; i++) {
inners.push(makeInner(repeat, font, mode));
}
inners.push(makeInner(middle, font, mode));
for (i = 0; i < repeatCount; i++) {
inners.push(makeInner(repeat, font, mode));
}
}
// Add the top symbol
inners.push(makeInner(top, font, mode));
// Finally, build the vlist
var inner = buildCommon.makeVList(inners, "bottom", depth, options);
return styleWrap(
makeSpan(["delimsizing", "mult"], [inner], options.getColor()),
Style.TEXT, options);
};
// There are three kinds of delimiters, delimiters that stack when they become
// too large
var stackLargeDelimiters = [
"(", ")", "[", "\\lbrack", "]", "\\rbrack",
"\\{", "\\lbrace", "\\}", "\\rbrace",
"\\lfloor", "\\rfloor", "\\lceil", "\\rceil",
"\\surd",
];
// delimiters that always stack
var stackAlwaysDelimiters = [
"\\uparrow", "\\downarrow", "\\updownarrow",
"\\Uparrow", "\\Downarrow", "\\Updownarrow",
"|", "\\|", "\\vert", "\\Vert",
"\\lvert", "\\rvert", "\\lVert", "\\rVert",
"\\lgroup", "\\rgroup", "\\lmoustache", "\\rmoustache",
];
// and delimiters that never stack
var stackNeverDelimiters = [
"<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt",
];
// Metrics of the different sizes. Found by looking at TeX's output of
// $\bigl| // \Bigl| \biggl| \Biggl| \showlists$
// Used to create stacked delimiters of appropriate sizes in makeSizedDelim.
var sizeToMaxHeight = [0, 1.2, 1.8, 2.4, 3.0];
/**
* Used to create a delimiter of a specific size, where `size` is 1, 2, 3, or 4.
*/
var makeSizedDelim = function(delim, size, options, mode) {
// < and > turn into \langle and \rangle in delimiters
if (delim === "<" || delim === "\\lt") {
delim = "\\langle";
} else if (delim === ">" || delim === "\\gt") {
delim = "\\rangle";
}
// Sized delimiters are never centered.
if (utils.contains(stackLargeDelimiters, delim) ||
utils.contains(stackNeverDelimiters, delim)) {
return makeLargeDelim(delim, size, false, options, mode);
} else if (utils.contains(stackAlwaysDelimiters, delim)) {
return makeStackedDelim(
delim, sizeToMaxHeight[size], false, options, mode);
} else {
throw new ParseError("Illegal delimiter: '" + delim + "'");
}
};
/**
* There are three different sequences of delimiter sizes that the delimiters
* follow depending on the kind of delimiter. This is used when creating custom
* sized delimiters to decide whether to create a small, large, or stacked
* delimiter.
*
* In real TeX, these sequences aren't explicitly defined, but are instead
* defined inside the font metrics. Since there are only three sequences that
* are possible for the delimiters that TeX defines, it is easier to just encode
* them explicitly here.
*/
// Delimiters that never stack try small delimiters and large delimiters only
var stackNeverDelimiterSequence = [
{type: "small", style: Style.SCRIPTSCRIPT},
{type: "small", style: Style.SCRIPT},
{type: "small", style: Style.TEXT},
{type: "large", size: 1},
{type: "large", size: 2},
{type: "large", size: 3},
{type: "large", size: 4},
];
// Delimiters that always stack try the small delimiters first, then stack
var stackAlwaysDelimiterSequence = [
{type: "small", style: Style.SCRIPTSCRIPT},
{type: "small", style: Style.SCRIPT},
{type: "small", style: Style.TEXT},
{type: "stack"},
];
// Delimiters that stack when large try the small and then large delimiters, and
// stack afterwards
var stackLargeDelimiterSequence = [
{type: "small", style: Style.SCRIPTSCRIPT},
{type: "small", style: Style.SCRIPT},
{type: "small", style: Style.TEXT},
{type: "large", size: 1},
{type: "large", size: 2},
{type: "large", size: 3},
{type: "large", size: 4},
{type: "stack"},
];
/**
* Get the font used in a delimiter based on what kind of delimiter it is.
*/
var delimTypeToFont = function(type) {
if (type.type === "small") {
return "Main-Regular";
} else if (type.type === "large") {
return "Size" + type.size + "-Regular";
} else if (type.type === "stack") {
return "Size4-Regular";
}
};
/**
* Traverse a sequence of types of delimiters to decide what kind of delimiter
* should be used to create a delimiter of the given height+depth.
*/
var traverseSequence = function(delim, height, sequence, options) {
// Here, we choose the index we should start at in the sequences. In smaller
// sizes (which correspond to larger numbers in style.size) we start earlier
// in the sequence. Thus, scriptscript starts at index 3-3=0, script starts
// at index 3-2=1, text starts at 3-1=2, and display starts at min(2,3-0)=2
var start = Math.min(2, 3 - options.style.size);
for (var i = start; i < sequence.length; i++) {
if (sequence[i].type === "stack") {
// This is always the last delimiter, so we just break the loop now.
break;
}
var metrics = getMetrics(delim, delimTypeToFont(sequence[i]));
var heightDepth = metrics.height + metrics.depth;
// Small delimiters are scaled down versions of the same font, so we
// account for the style change size.
if (sequence[i].type === "small") {
heightDepth *= sequence[i].style.sizeMultiplier;
}
// Check if the delimiter at this size works for the given height.
if (heightDepth > height) {
return sequence[i];
}
}
// If we reached the end of the sequence, return the last sequence element.
return sequence[sequence.length - 1];
};
/**
* Make a delimiter of a given height+depth, with optional centering. Here, we
* traverse the sequences, and create a delimiter that the sequence tells us to.
*/
var makeCustomSizedDelim = function(delim, height, center, options, mode) {
if (delim === "<" || delim === "\\lt") {
delim = "\\langle";
} else if (delim === ">" || delim === "\\gt") {
delim = "\\rangle";
}
// Decide what sequence to use
var sequence;
if (utils.contains(stackNeverDelimiters, delim)) {
sequence = stackNeverDelimiterSequence;
} else if (utils.contains(stackLargeDelimiters, delim)) {
sequence = stackLargeDelimiterSequence;
} else {
sequence = stackAlwaysDelimiterSequence;
}
// Look through the sequence
var delimType = traverseSequence(delim, height, sequence, options);
// Depending on the sequence element we decided on, call the appropriate
// function.
if (delimType.type === "small") {
return makeSmallDelim(delim, delimType.style, center, options, mode);
} else if (delimType.type === "large") {
return makeLargeDelim(delim, delimType.size, center, options, mode);
} else if (delimType.type === "stack") {
return makeStackedDelim(delim, height, center, options, mode);
}
};
/**
* Make a delimiter for use with `\left` and `\right`, given a height and depth
* of an expression that the delimiters surround.
*/
var makeLeftRightDelim = function(delim, height, depth, options, mode) {
// We always center \left/\right delimiters, so the axis is always shifted
var axisHeight =
fontMetrics.metrics.axisHeight * options.style.sizeMultiplier;
// Taken from TeX source, tex.web, function make_left_right
var delimiterFactor = 901;
var delimiterExtend = 5.0 / fontMetrics.metrics.ptPerEm;
var maxDistFromAxis = Math.max(
height - axisHeight, depth + axisHeight);
var totalHeight = Math.max(
// In real TeX, calculations are done using integral values which are
// 65536 per pt, or 655360 per em. So, the division here truncates in
// TeX but doesn't here, producing different results. If we wanted to
// exactly match TeX's calculation, we could do
// Math.floor(655360 * maxDistFromAxis / 500) *
// delimiterFactor / 655360
// (To see the difference, compare
// x^{x^{\left(\rule{0.1em}{0.68em}\right)}}
// in TeX and KaTeX)
maxDistFromAxis / 500 * delimiterFactor,
2 * maxDistFromAxis - delimiterExtend);
// Finally, we defer to `makeCustomSizedDelim` with our calculated total
// height
return makeCustomSizedDelim(delim, totalHeight, true, options, mode);
};
module.exports = {
sizedDelim: makeSizedDelim,
customSizedDelim: makeCustomSizedDelim,
leftRightDelim: makeLeftRightDelim,
};
/***/ }),
/* 167 */
/***/ (function(module, exports, __webpack_require__) {
/**
* This file converts a parse tree into a cooresponding MathML tree. The main
* entry point is the `buildMathML` function, which takes a parse tree from the
* parser.
*/
var buildCommon = __webpack_require__(160);
var fontMetrics = __webpack_require__(163);
var mathMLTree = __webpack_require__(168);
var ParseError = __webpack_require__(155);
var symbols = __webpack_require__(165);
var utils = __webpack_require__(162);
var makeSpan = buildCommon.makeSpan;
var fontMap = buildCommon.fontMap;
/**
* Takes a symbol and converts it into a MathML text node after performing
* optional replacement from symbols.js.
*/
var makeText = function(text, mode) {
if (symbols[mode][text] && symbols[mode][text].replace) {
text = symbols[mode][text].replace;
}
return new mathMLTree.TextNode(text);
};
/**
* Returns the math variant as a string or null if none is required.
*/
var getVariant = function(group, options) {
var font = options.font;
if (!font) {
return null;
}
var mode = group.mode;
if (font === "mathit") {
return "italic";
}
var value = group.value;
if (utils.contains(["\\imath", "\\jmath"], value)) {
return null;
}
if (symbols[mode][value] && symbols[mode][value].replace) {
value = symbols[mode][value].replace;
}
var fontName = fontMap[font].fontName;
if (fontMetrics.getCharacterMetrics(value, fontName)) {
return fontMap[options.font].variant;
}
return null;
};
/**
* Functions for handling the different types of groups found in the parse
* tree. Each function should take a parse group and return a MathML node.
*/
var groupTypes = {};
groupTypes.mathord = function(group, options) {
var node = new mathMLTree.MathNode(
"mi",
[makeText(group.value, group.mode)]);
var variant = getVariant(group, options);
if (variant) {
node.setAttribute("mathvariant", variant);
}
return node;
};
groupTypes.textord = function(group, options) {
var text = makeText(group.value, group.mode);
var variant = getVariant(group, options) || "normal";
var node;
if (/[0-9]/.test(group.value)) {
// TODO(kevinb) merge adjacent <mn> nodes
// do it as a post processing step
node = new mathMLTree.MathNode("mn", [text]);
if (options.font) {
node.setAttribute("mathvariant", variant);
}
} else {
node = new mathMLTree.MathNode("mi", [text]);
node.setAttribute("mathvariant", variant);
}
return node;
};
groupTypes.bin = function(group) {
var node = new mathMLTree.MathNode(
"mo", [makeText(group.value, group.mode)]);
return node;
};
groupTypes.rel = function(group) {
var node = new mathMLTree.MathNode(
"mo", [makeText(group.value, group.mode)]);
return node;
};
groupTypes.open = function(group) {
var node = new mathMLTree.MathNode(
"mo", [makeText(group.value, group.mode)]);
return node;
};
groupTypes.close = function(group) {
var node = new mathMLTree.MathNode(
"mo", [makeText(group.value, group.mode)]);
return node;
};
groupTypes.inner = function(group) {
var node = new mathMLTree.MathNode(
"mo", [makeText(group.value, group.mode)]);
return node;
};
groupTypes.punct = function(group) {
var node = new mathMLTree.MathNode(
"mo", [makeText(group.value, group.mode)]);
node.setAttribute("separator", "true");
return node;
};
groupTypes.ordgroup = function(group, options) {
var inner = buildExpression(group.value, options);
var node = new mathMLTree.MathNode("mrow", inner);
return node;
};
groupTypes.text = function(group, options) {
var inner = buildExpression(group.value.body, options);
var node = new mathMLTree.MathNode("mtext", inner);
return node;
};
groupTypes.color = function(group, options) {
var inner = buildExpression(group.value.value, options);
var node = new mathMLTree.MathNode("mstyle", inner);
node.setAttribute("mathcolor", group.value.color);
return node;
};
groupTypes.supsub = function(group, options) {
var children = [buildGroup(group.value.base, options)];
if (group.value.sub) {
children.push(buildGroup(group.value.sub, options));
}
if (group.value.sup) {
children.push(buildGroup(group.value.sup, options));
}
var nodeType;
if (!group.value.sub) {
nodeType = "msup";
} else if (!group.value.sup) {
nodeType = "msub";
} else {
nodeType = "msubsup";
}
var node = new mathMLTree.MathNode(nodeType, children);
return node;
};
groupTypes.genfrac = function(group, options) {
var node = new mathMLTree.MathNode(
"mfrac",
[buildGroup(group.value.numer, options),
buildGroup(group.value.denom, options)]);
if (!group.value.hasBarLine) {
node.setAttribute("linethickness", "0px");
}
if (group.value.leftDelim != null || group.value.rightDelim != null) {
var withDelims = [];
if (group.value.leftDelim != null) {
var leftOp = new mathMLTree.MathNode(
"mo", [new mathMLTree.TextNode(group.value.leftDelim)]);
leftOp.setAttribute("fence", "true");
withDelims.push(leftOp);
}
withDelims.push(node);
if (group.value.rightDelim != null) {
var rightOp = new mathMLTree.MathNode(
"mo", [new mathMLTree.TextNode(group.value.rightDelim)]);
rightOp.setAttribute("fence", "true");
withDelims.push(rightOp);
}
var outerNode = new mathMLTree.MathNode("mrow", withDelims);
return outerNode;
}
return node;
};
groupTypes.array = function(group, options) {
return new mathMLTree.MathNode(
"mtable", group.value.body.map(function(row) {
return new mathMLTree.MathNode(
"mtr", row.map(function(cell) {
return new mathMLTree.MathNode(
"mtd", [buildGroup(cell, options)]);
}));
}));
};
groupTypes.sqrt = function(group, options) {
var node;
if (group.value.index) {
node = new mathMLTree.MathNode(
"mroot", [
buildGroup(group.value.body, options),
buildGroup(group.value.index, options),
]);
} else {
node = new mathMLTree.MathNode(
"msqrt", [buildGroup(group.value.body, options)]);
}
return node;
};
groupTypes.leftright = function(group, options) {
var inner = buildExpression(group.value.body, options);
if (group.value.left !== ".") {
var leftNode = new mathMLTree.MathNode(
"mo", [makeText(group.value.left, group.mode)]);
leftNode.setAttribute("fence", "true");
inner.unshift(leftNode);
}
if (group.value.right !== ".") {
var rightNode = new mathMLTree.MathNode(
"mo", [makeText(group.value.right, group.mode)]);
rightNode.setAttribute("fence", "true");
inner.push(rightNode);
}
var outerNode = new mathMLTree.MathNode("mrow", inner);
return outerNode;
};
groupTypes.accent = function(group, options) {
var accentNode = new mathMLTree.MathNode(
"mo", [makeText(group.value.accent, group.mode)]);
var node = new mathMLTree.MathNode(
"mover",
[buildGroup(group.value.base, options),
accentNode]);
node.setAttribute("accent", "true");
return node;
};
groupTypes.spacing = function(group) {
var node;
if (group.value === "\\ " || group.value === "\\space" ||
group.value === " " || group.value === "~") {
node = new mathMLTree.MathNode(
"mtext", [new mathMLTree.TextNode("\u00a0")]);
} else {
node = new mathMLTree.MathNode("mspace");
node.setAttribute(
"width", buildCommon.spacingFunctions[group.value].size);
}
return node;
};
groupTypes.op = function(group) {
var node;
// TODO(emily): handle big operators using the `largeop` attribute
if (group.value.symbol) {
// This is a symbol. Just add the symbol.
node = new mathMLTree.MathNode(
"mo", [makeText(group.value.body, group.mode)]);
} else {
// This is a text operator. Add all of the characters from the
// operator's name.
// TODO(emily): Add a space in the middle of some of these
// operators, like \limsup.
node = new mathMLTree.MathNode(
"mi", [new mathMLTree.TextNode(group.value.body.slice(1))]);
}
return node;
};
groupTypes.katex = function(group) {
var node = new mathMLTree.MathNode(
"mtext", [new mathMLTree.TextNode("KaTeX")]);
return node;
};
groupTypes.font = function(group, options) {
var font = group.value.font;
return buildGroup(group.value.body, options.withFont(font));
};
groupTypes.delimsizing = function(group) {
var children = [];
if (group.value.value !== ".") {
children.push(makeText(group.value.value, group.mode));
}
var node = new mathMLTree.MathNode("mo", children);
if (group.value.delimType === "open" ||
group.value.delimType === "close") {
// Only some of the delimsizing functions act as fences, and they
// return "open" or "close" delimTypes.
node.setAttribute("fence", "true");
} else {
// Explicitly disable fencing if it's not a fence, to override the
// defaults.
node.setAttribute("fence", "false");
}
return node;
};
groupTypes.styling = function(group, options) {
var inner = buildExpression(group.value.value, options);
var node = new mathMLTree.MathNode("mstyle", inner);
var styleAttributes = {
"display": ["0", "true"],
"text": ["0", "false"],
"script": ["1", "false"],
"scriptscript": ["2", "false"],
};
var attr = styleAttributes[group.value.style];
node.setAttribute("scriptlevel", attr[0]);
node.setAttribute("displaystyle", attr[1]);
return node;
};
groupTypes.sizing = function(group, options) {
var inner = buildExpression(group.value.value, options);
var node = new mathMLTree.MathNode("mstyle", inner);
// TODO(emily): This doesn't produce the correct size for nested size
// changes, because we don't keep state of what style we're currently
// in, so we can't reset the size to normal before changing it. Now
// that we're passing an options parameter we should be able to fix
// this.
node.setAttribute(
"mathsize", buildCommon.sizingMultiplier[group.value.size] + "em");
return node;
};
groupTypes.overline = function(group, options) {
var operator = new mathMLTree.MathNode(
"mo", [new mathMLTree.TextNode("\u203e")]);
operator.setAttribute("stretchy", "true");
var node = new mathMLTree.MathNode(
"mover",
[buildGroup(group.value.body, options),
operator]);
node.setAttribute("accent", "true");
return node;
};
groupTypes.underline = function(group, options) {
var operator = new mathMLTree.MathNode(
"mo", [new mathMLTree.TextNode("\u203e")]);
operator.setAttribute("stretchy", "true");
var node = new mathMLTree.MathNode(
"munder",
[buildGroup(group.value.body, options),
operator]);
node.setAttribute("accentunder", "true");
return node;
};
groupTypes.rule = function(group) {
// TODO(emily): Figure out if there's an actual way to draw black boxes
// in MathML.
var node = new mathMLTree.MathNode("mrow");
return node;
};
groupTypes.llap = function(group, options) {
var node = new mathMLTree.MathNode(
"mpadded", [buildGroup(group.value.body, options)]);
node.setAttribute("lspace", "-1width");
node.setAttribute("width", "0px");
return node;
};
groupTypes.rlap = function(group, options) {
var node = new mathMLTree.MathNode(
"mpadded", [buildGroup(group.value.body, options)]);
node.setAttribute("width", "0px");
return node;
};
groupTypes.phantom = function(group, options, prev) {
var inner = buildExpression(group.value.value, options);
return new mathMLTree.MathNode("mphantom", inner);
};
/**
* Takes a list of nodes, builds them, and returns a list of the generated
* MathML nodes. A little simpler than the HTML version because we don't do any
* previous-node handling.
*/
var buildExpression = function(expression, options) {
var groups = [];
for (var i = 0; i < expression.length; i++) {
var group = expression[i];
groups.push(buildGroup(group, options));
}
return groups;
};
/**
* Takes a group from the parser and calls the appropriate groupTypes function
* on it to produce a MathML node.
*/
var buildGroup = function(group, options) {
if (!group) {
return new mathMLTree.MathNode("mrow");
}
if (groupTypes[group.type]) {
// Call the groupTypes function
return groupTypes[group.type](group, options);
} else {
throw new ParseError(
"Got group of unknown type: '" + group.type + "'");
}
};
/**
* Takes a full parse tree and settings and builds a MathML representation of
* it. In particular, we put the elements from building the parse tree into a
* <semantics> tag so we can also include that TeX source as an annotation.
*
* Note that we actually return a domTree element with a `<math>` inside it so
* we can do appropriate styling.
*/
var buildMathML = function(tree, texExpression, options) {
var expression = buildExpression(tree, options);
// Wrap up the expression in an mrow so it is presented in the semantics
// tag correctly.
var wrapper = new mathMLTree.MathNode("mrow", expression);
// Build a TeX annotation of the source
var annotation = new mathMLTree.MathNode(
"annotation", [new mathMLTree.TextNode(texExpression)]);
annotation.setAttribute("encoding", "application/x-tex");
var semantics = new mathMLTree.MathNode(
"semantics", [wrapper, annotation]);
var math = new mathMLTree.MathNode("math", [semantics]);
// You can't style <math> nodes, so we wrap the node in a span.
return makeSpan(["katex-mathml"], [math]);
};
module.exports = buildMathML;
/***/ }),
/* 168 */
/***/ (function(module, exports, __webpack_require__) {
/**
* These objects store data about MathML nodes. This is the MathML equivalent
* of the types in domTree.js. Since MathML handles its own rendering, and
* since we're mainly using MathML to improve accessibility, we don't manage
* any of the styling state that the plain DOM nodes do.
*
* The `toNode` and `toMarkup` functions work simlarly to how they do in
* domTree.js, creating namespaced DOM nodes and HTML text markup respectively.
*/
var utils = __webpack_require__(162);
/**
* This node represents a general purpose MathML node of any type. The
* constructor requires the type of node to create (for example, `"mo"` or
* `"mspace"`, corresponding to `<mo>` and `<mspace>` tags).
*/
function MathNode(type, children) {
this.type = type;
this.attributes = {};
this.children = children || [];
}
/**
* Sets an attribute on a MathML node. MathML depends on attributes to convey a
* semantic content, so this is used heavily.
*/
MathNode.prototype.setAttribute = function(name, value) {
this.attributes[name] = value;
};
/**
* Converts the math node into a MathML-namespaced DOM element.
*/
MathNode.prototype.toNode = function() {
var node = document.createElementNS(
"http://www.w3.org/1998/Math/MathML", this.type);
for (var attr in this.attributes) {
if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
node.setAttribute(attr, this.attributes[attr]);
}
}
for (var i = 0; i < this.children.length; i++) {
node.appendChild(this.children[i].toNode());
}
return node;
};
/**
* Converts the math node into an HTML markup string.
*/
MathNode.prototype.toMarkup = function() {
var markup = "<" + this.type;
// Add the attributes
for (var attr in this.attributes) {
if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
markup += " " + attr + "=\"";
markup += utils.escape(this.attributes[attr]);
markup += "\"";
}
}
markup += ">";
for (var i = 0; i < this.children.length; i++) {
markup += this.children[i].toMarkup();
}
markup += "</" + this.type + ">";
return markup;
};
/**
* This node represents a piece of text.
*/
function TextNode(text) {
this.text = text;
}
/**
* Converts the text node into a DOM text node.
*/
TextNode.prototype.toNode = function() {
return document.createTextNode(this.text);
};
/**
* Converts the text node into HTML markup (which is just the text itself).
*/
TextNode.prototype.toMarkup = function() {
return utils.escape(this.text);
};
module.exports = {
MathNode: MathNode,
TextNode: TextNode,
};
/***/ }),
/* 169 */
/***/ (function(module, exports) {
/**
* This file contains information about the options that the Parser carries
* around with it while parsing. Data is held in an `Options` object, and when
* recursing, a new `Options` object can be created with the `.with*` and
* `.reset` functions.
*/
/**
* This is the main options class. It contains the style, size, color, and font
* of the current parse level. It also contains the style and size of the parent
* parse level, so size changes can be handled efficiently.
*
* Each of the `.with*` and `.reset` functions passes its current style and size
* as the parentStyle and parentSize of the new options class, so parent
* handling is taken care of automatically.
*/
function Options(data) {
this.style = data.style;
this.color = data.color;
this.size = data.size;
this.phantom = data.phantom;
this.font = data.font;
if (data.parentStyle === undefined) {
this.parentStyle = data.style;
} else {
this.parentStyle = data.parentStyle;
}
if (data.parentSize === undefined) {
this.parentSize = data.size;
} else {
this.parentSize = data.parentSize;
}
}
/**
* Returns a new options object with the same properties as "this". Properties
* from "extension" will be copied to the new options object.
*/
Options.prototype.extend = function(extension) {
var data = {
style: this.style,
size: this.size,
color: this.color,
parentStyle: this.style,
parentSize: this.size,
phantom: this.phantom,
font: this.font,
};
for (var key in extension) {
if (extension.hasOwnProperty(key)) {
data[key] = extension[key];
}
}
return new Options(data);
};
/**
* Create a new options object with the given style.
*/
Options.prototype.withStyle = function(style) {
return this.extend({
style: style,
});
};
/**
* Create a new options object with the given size.
*/
Options.prototype.withSize = function(size) {
return this.extend({
size: size,
});
};
/**
* Create a new options object with the given color.
*/
Options.prototype.withColor = function(color) {
return this.extend({
color: color,
});
};
/**
* Create a new options object with "phantom" set to true.
*/
Options.prototype.withPhantom = function() {
return this.extend({
phantom: true,
});
};
/**
* Create a new options objects with the give font.
*/
Options.prototype.withFont = function(font) {
return this.extend({
font: font,
});
};
/**
* Create a new options object with the same style, size, and color. This is
* used so that parent style and size changes are handled correctly.
*/
Options.prototype.reset = function() {
return this.extend({});
};
/**
* A map of color names to CSS colors.
* TODO(emily): Remove this when we have real macros
*/
var colorMap = {
"katex-blue": "#6495ed",
"katex-orange": "#ffa500",
"katex-pink": "#ff00af",
"katex-red": "#df0030",
"katex-green": "#28ae7b",
"katex-gray": "gray",
"katex-purple": "#9d38bd",
"katex-blueA": "#c7e9f1",
"katex-blueB": "#9cdceb",
"katex-blueC": "#58c4dd",
"katex-blueD": "#29abca",
"katex-blueE": "#1c758a",
"katex-tealA": "#acead7",
"katex-tealB": "#76ddc0",
"katex-tealC": "#5cd0b3",
"katex-tealD": "#55c1a7",
"katex-tealE": "#49a88f",
"katex-greenA": "#c9e2ae",
"katex-greenB": "#a6cf8c",
"katex-greenC": "#83c167",
"katex-greenD": "#77b05d",
"katex-greenE": "#699c52",
"katex-goldA": "#f7c797",
"katex-goldB": "#f9b775",
"katex-goldC": "#f0ac5f",
"katex-goldD": "#e1a158",
"katex-goldE": "#c78d46",
"katex-redA": "#f7a1a3",
"katex-redB": "#ff8080",
"katex-redC": "#fc6255",
"katex-redD": "#e65a4c",
"katex-redE": "#cf5044",
"katex-maroonA": "#ecabc1",
"katex-maroonB": "#ec92ab",
"katex-maroonC": "#c55f73",
"katex-maroonD": "#a24d61",
"katex-maroonE": "#94424f",
"katex-purpleA": "#caa3e8",
"katex-purpleB": "#b189c6",
"katex-purpleC": "#9a72ac",
"katex-purpleD": "#715582",
"katex-purpleE": "#644172",
"katex-mintA": "#f5f9e8",
"katex-mintB": "#edf2df",
"katex-mintC": "#e0e5cc",
"katex-grayA": "#fdfdfd",
"katex-grayB": "#f7f7f7",
"katex-grayC": "#eeeeee",
"katex-grayD": "#dddddd",
"katex-grayE": "#cccccc",
"katex-grayF": "#aaaaaa",
"katex-grayG": "#999999",
"katex-grayH": "#555555",
"katex-grayI": "#333333",
"katex-kaBlue": "#314453",
"katex-kaGreen": "#639b24",
};
/**
* Gets the CSS color of the current options object, accounting for the
* `colorMap`.
*/
Options.prototype.getColor = function() {
if (this.phantom) {
return "transparent";
} else {
return colorMap[this.color] || this.color;
}
};
module.exports = Options;
/***/ }),
/* 170 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Provides a single function for parsing an expression using a Parser
* TODO(emily): Remove this
*/
var Parser = __webpack_require__(171);
/**
* Parses an expression using a Parser, then returns the parsed result.
*/
var parseTree = function(toParse, settings) {
var parser = new Parser(toParse, settings);
return parser.parse();
};
module.exports = parseTree;
/***/ }),
/* 171 */
/***/ (function(module, exports, __webpack_require__) {
/* eslint no-constant-condition:0 */
var functions = __webpack_require__(172);
var environments = __webpack_require__(173);
var Lexer = __webpack_require__(175);
var symbols = __webpack_require__(165);
var utils = __webpack_require__(162);
var parseData = __webpack_require__(174);
var ParseError = __webpack_require__(155);
/**
* This file contains the parser used to parse out a TeX expression from the
* input. Since TeX isn't context-free, standard parsers don't work particularly
* well.
*
* The strategy of this parser is as such:
*
* The main functions (the `.parse...` ones) take a position in the current
* parse string to parse tokens from. The lexer (found in Lexer.js, stored at
* this.lexer) also supports pulling out tokens at arbitrary places. When
* individual tokens are needed at a position, the lexer is called to pull out a
* token, which is then used.
*
* The parser has a property called "mode" indicating the mode that
* the parser is currently in. Currently it has to be one of "math" or
* "text", which denotes whether the current environment is a math-y
* one or a text-y one (e.g. inside \text). Currently, this serves to
* limit the functions which can be used in text mode.
*
* The main functions then return an object which contains the useful data that
* was parsed at its given point, and a new position at the end of the parsed
* data. The main functions can call each other and continue the parsing by
* using the returned position as a new starting point.
*
* There are also extra `.handle...` functions, which pull out some reused
* functionality into self-contained functions.
*
* The earlier functions return ParseNodes.
* The later functions (which are called deeper in the parse) sometimes return
* ParseFuncOrArgument, which contain a ParseNode as well as some data about
* whether the parsed object is a function which is missing some arguments, or a
* standalone object which can be used as an argument to another function.
*/
/**
* Main Parser class
*/
function Parser(input, settings) {
// Make a new lexer
this.lexer = new Lexer(input);
// Store the settings for use in parsing
this.settings = settings;
}
var ParseNode = parseData.ParseNode;
/**
* An initial function (without its arguments), or an argument to a function.
* The `result` argument should be a ParseNode.
*/
function ParseFuncOrArgument(result, isFunction) {
this.result = result;
// Is this a function (i.e. is it something defined in functions.js)?
this.isFunction = isFunction;
}
/**
* Checks a result to make sure it has the right type, and throws an
* appropriate error otherwise.
*
* @param {boolean=} consume whether to consume the expected token,
* defaults to true
*/
Parser.prototype.expect = function(text, consume) {
if (this.nextToken.text !== text) {
throw new ParseError(
"Expected '" + text + "', got '" + this.nextToken.text + "'",
this.lexer, this.nextToken.position
);
}
if (consume !== false) {
this.consume();
}
};
/**
* Considers the current look ahead token as consumed,
* and fetches the one after that as the new look ahead.
*/
Parser.prototype.consume = function() {
this.pos = this.nextToken.position;
this.nextToken = this.lexer.lex(this.pos, this.mode);
};
/**
* Main parsing function, which parses an entire input.
*
* @return {?Array.<ParseNode>}
*/
Parser.prototype.parse = function() {
// Try to parse the input
this.mode = "math";
this.pos = 0;
this.nextToken = this.lexer.lex(this.pos, this.mode);
var parse = this.parseInput();
return parse;
};
/**
* Parses an entire input tree.
*/
Parser.prototype.parseInput = function() {
// Parse an expression
var expression = this.parseExpression(false);
// If we succeeded, make sure there's an EOF at the end
this.expect("EOF", false);
return expression;
};
var endOfExpression = ["}", "\\end", "\\right", "&", "\\\\", "\\cr"];
/**
* Parses an "expression", which is a list of atoms.
*
* @param {boolean} breakOnInfix Should the parsing stop when we hit infix
* nodes? This happens when functions have higher precendence
* than infix nodes in implicit parses.
*
* @param {?string} breakOnToken The token that the expression should end with,
* or `null` if something else should end the expression.
*
* @return {ParseNode}
*/
Parser.prototype.parseExpression = function(breakOnInfix, breakOnToken) {
var body = [];
// Keep adding atoms to the body until we can't parse any more atoms (either
// we reached the end, a }, or a \right)
while (true) {
var lex = this.nextToken;
var pos = this.pos;
if (endOfExpression.indexOf(lex.text) !== -1) {
break;
}
if (breakOnToken && lex.text === breakOnToken) {
break;
}
var atom = this.parseAtom();
if (!atom) {
if (!this.settings.throwOnError && lex.text[0] === "\\") {
var errorNode = this.handleUnsupportedCmd();
body.push(errorNode);
pos = lex.position;
continue;
}
break;
}
if (breakOnInfix && atom.type === "infix") {
// rewind so we can parse the infix atom again
this.pos = pos;
this.nextToken = lex;
break;
}
body.push(atom);
}
return this.handleInfixNodes(body);
};
/**
* Rewrites infix operators such as \over with corresponding commands such
* as \frac.
*
* There can only be one infix operator per group. If there's more than one
* then the expression is ambiguous. This can be resolved by adding {}.
*
* @returns {Array}
*/
Parser.prototype.handleInfixNodes = function(body) {
var overIndex = -1;
var funcName;
for (var i = 0; i < body.length; i++) {
var node = body[i];
if (node.type === "infix") {
if (overIndex !== -1) {
throw new ParseError("only one infix operator per group",
this.lexer, -1);
}
overIndex = i;
funcName = node.value.replaceWith;
}
}
if (overIndex !== -1) {
var numerNode;
var denomNode;
var numerBody = body.slice(0, overIndex);
var denomBody = body.slice(overIndex + 1);
if (numerBody.length === 1 && numerBody[0].type === "ordgroup") {
numerNode = numerBody[0];
} else {
numerNode = new ParseNode("ordgroup", numerBody, this.mode);
}
if (denomBody.length === 1 && denomBody[0].type === "ordgroup") {
denomNode = denomBody[0];
} else {
denomNode = new ParseNode("ordgroup", denomBody, this.mode);
}
var value = this.callFunction(
funcName, [numerNode, denomNode], null);
return [new ParseNode(value.type, value, this.mode)];
} else {
return body;
}
};
// The greediness of a superscript or subscript
var SUPSUB_GREEDINESS = 1;
/**
* Handle a subscript or superscript with nice errors.
*/
Parser.prototype.handleSupSubscript = function(name) {
var symbol = this.nextToken.text;
var symPos = this.pos;
this.consume();
var group = this.parseGroup();
if (!group) {
if (!this.settings.throwOnError && this.nextToken.text[0] === "\\") {
return this.handleUnsupportedCmd();
} else {
throw new ParseError(
"Expected group after '" + symbol + "'",
this.lexer,
symPos + 1
);
}
} else if (group.isFunction) {
// ^ and _ have a greediness, so handle interactions with functions'
// greediness
var funcGreediness = functions[group.result].greediness;
if (funcGreediness > SUPSUB_GREEDINESS) {
return this.parseFunction(group);
} else {
throw new ParseError(
"Got function '" + group.result + "' with no arguments " +
"as " + name,
this.lexer, symPos + 1);
}
} else {
return group.result;
}
};
/**
* Converts the textual input of an unsupported command into a text node
* contained within a color node whose color is determined by errorColor
*/
Parser.prototype.handleUnsupportedCmd = function() {
var text = this.nextToken.text;
var textordArray = [];
for (var i = 0; i < text.length; i++) {
textordArray.push(new ParseNode("textord", text[i], "text"));
}
var textNode = new ParseNode(
"text",
{
body: textordArray,
type: "text",
},
this.mode);
var colorNode = new ParseNode(
"color",
{
color: this.settings.errorColor,
value: [textNode],
type: "color",
},
this.mode);
this.consume();
return colorNode;
};
/**
* Parses a group with optional super/subscripts.
*
* @return {?ParseNode}
*/
Parser.prototype.parseAtom = function() {
// The body of an atom is an implicit group, so that things like
// \left(x\right)^2 work correctly.
var base = this.parseImplicitGroup();
// In text mode, we don't have superscripts or subscripts
if (this.mode === "text") {
return base;
}
// Note that base may be empty (i.e. null) at this point.
var superscript;
var subscript;
while (true) {
// Lex the first token
var lex = this.nextToken;
if (lex.text === "\\limits" || lex.text === "\\nolimits") {
// We got a limit control
if (!base || base.type !== "op") {
throw new ParseError(
"Limit controls must follow a math operator",
this.lexer, this.pos);
} else {
var limits = lex.text === "\\limits";
base.value.limits = limits;
base.value.alwaysHandleSupSub = true;
}
this.consume();
} else if (lex.text === "^") {
// We got a superscript start
if (superscript) {
throw new ParseError(
"Double superscript", this.lexer, this.pos);
}
superscript = this.handleSupSubscript("superscript");
} else if (lex.text === "_") {
// We got a subscript start
if (subscript) {
throw new ParseError(
"Double subscript", this.lexer, this.pos);
}
subscript = this.handleSupSubscript("subscript");
} else if (lex.text === "'") {
// We got a prime
var prime = new ParseNode("textord", "\\prime", this.mode);
// Many primes can be grouped together, so we handle this here
var primes = [prime];
this.consume();
// Keep lexing tokens until we get something that's not a prime
while (this.nextToken.text === "'") {
// For each one, add another prime to the list
primes.push(prime);
this.consume();
}
// Put them into an ordgroup as the superscript
superscript = new ParseNode("ordgroup", primes, this.mode);
} else {
// If it wasn't ^, _, or ', stop parsing super/subscripts
break;
}
}
if (superscript || subscript) {
// If we got either a superscript or subscript, create a supsub
return new ParseNode("supsub", {
base: base,
sup: superscript,
sub: subscript,
}, this.mode);
} else {
// Otherwise return the original body
return base;
}
};
// A list of the size-changing functions, for use in parseImplicitGroup
var sizeFuncs = [
"\\tiny", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize",
"\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge",
];
// A list of the style-changing functions, for use in parseImplicitGroup
var styleFuncs = [
"\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle",
];
/**
* Parses an implicit group, which is a group that starts at the end of a
* specified, and ends right before a higher explicit group ends, or at EOL. It
* is used for functions that appear to affect the current style, like \Large or
* \textrm, where instead of keeping a style we just pretend that there is an
* implicit grouping after it until the end of the group. E.g.
* small text {\Large large text} small text again
* It is also used for \left and \right to get the correct grouping.
*
* @return {?ParseNode}
*/
Parser.prototype.parseImplicitGroup = function() {
var start = this.parseSymbol();
if (start == null) {
// If we didn't get anything we handle, fall back to parseFunction
return this.parseFunction();
}
var func = start.result;
var body;
if (func === "\\left") {
// If we see a left:
// Parse the entire left function (including the delimiter)
var left = this.parseFunction(start);
// Parse out the implicit body
body = this.parseExpression(false);
// Check the next token
this.expect("\\right", false);
var right = this.parseFunction();
return new ParseNode("leftright", {
body: body,
left: left.value.value,
right: right.value.value,
}, this.mode);
} else if (func === "\\begin") {
// begin...end is similar to left...right
var begin = this.parseFunction(start);
var envName = begin.value.name;
if (!environments.hasOwnProperty(envName)) {
throw new ParseError(
"No such environment: " + envName,
this.lexer, begin.value.namepos);
}
// Build the environment object. Arguments and other information will
// be made available to the begin and end methods using properties.
var env = environments[envName];
var args = this.parseArguments("\\begin{" + envName + "}", env);
var context = {
mode: this.mode,
envName: envName,
parser: this,
lexer: this.lexer,
positions: args.pop(),
};
var result = env.handler(context, args);
this.expect("\\end", false);
var end = this.parseFunction();
if (end.value.name !== envName) {
throw new ParseError(
"Mismatch: \\begin{" + envName + "} matched " +
"by \\end{" + end.value.name + "}",
this.lexer /* , end.value.namepos */);
// TODO: Add position to the above line and adjust test case,
// requires #385 to get merged first
}
result.position = end.position;
return result;
} else if (utils.contains(sizeFuncs, func)) {
// If we see a sizing function, parse out the implict body
body = this.parseExpression(false);
return new ParseNode("sizing", {
// Figure out what size to use based on the list of functions above
size: "size" + (utils.indexOf(sizeFuncs, func) + 1),
value: body,
}, this.mode);
} else if (utils.contains(styleFuncs, func)) {
// If we see a styling function, parse out the implict body
body = this.parseExpression(true);
return new ParseNode("styling", {
// Figure out what style to use by pulling out the style from
// the function name
style: func.slice(1, func.length - 5),
value: body,
}, this.mode);
} else {
// Defer to parseFunction if it's not a function we handle
return this.parseFunction(start);
}
};
/**
* Parses an entire function, including its base and all of its arguments.
* The base might either have been parsed already, in which case
* it is provided as an argument, or it's the next group in the input.
*
* @param {ParseFuncOrArgument=} baseGroup optional as described above
* @return {?ParseNode}
*/
Parser.prototype.parseFunction = function(baseGroup) {
if (!baseGroup) {
baseGroup = this.parseGroup();
}
if (baseGroup) {
if (baseGroup.isFunction) {
var func = baseGroup.result;
var funcData = functions[func];
if (this.mode === "text" && !funcData.allowedInText) {
throw new ParseError(
"Can't use function '" + func + "' in text mode",
this.lexer, baseGroup.position);
}
var args = this.parseArguments(func, funcData);
var result = this.callFunction(func, args, args.pop());
return new ParseNode(result.type, result, this.mode);
} else {
return baseGroup.result;
}
} else {
return null;
}
};
/**
* Call a function handler with a suitable context and arguments.
*/
Parser.prototype.callFunction = function(name, args, positions) {
var context = {
funcName: name,
parser: this,
lexer: this.lexer,
positions: positions,
};
return functions[name].handler(context, args);
};
/**
* Parses the arguments of a function or environment
*
* @param {string} func "\name" or "\begin{name}"
* @param {{numArgs:number,numOptionalArgs:number|undefined}} funcData
* @return the array of arguments, with the list of positions as last element
*/
Parser.prototype.parseArguments = function(func, funcData) {
var totalArgs = funcData.numArgs + funcData.numOptionalArgs;
if (totalArgs === 0) {
return [[this.pos]];
}
var baseGreediness = funcData.greediness;
var positions = [this.pos];
var args = [];
for (var i = 0; i < totalArgs; i++) {
var argType = funcData.argTypes && funcData.argTypes[i];
var arg;
if (i < funcData.numOptionalArgs) {
if (argType) {
arg = this.parseSpecialGroup(argType, true);
} else {
arg = this.parseOptionalGroup();
}
if (!arg) {
args.push(null);
positions.push(this.pos);
continue;
}
} else {
if (argType) {
arg = this.parseSpecialGroup(argType);
} else {
arg = this.parseGroup();
}
if (!arg) {
if (!this.settings.throwOnError &&
this.nextToken.text[0] === "\\") {
arg = new ParseFuncOrArgument(
this.handleUnsupportedCmd(this.nextToken.text),
false);
} else {
throw new ParseError(
"Expected group after '" + func + "'",
this.lexer, this.pos);
}
}
}
var argNode;
if (arg.isFunction) {
var argGreediness =
functions[arg.result].greediness;
if (argGreediness > baseGreediness) {
argNode = this.parseFunction(arg);
} else {
throw new ParseError(
"Got function '" + arg.result + "' as " +
"argument to '" + func + "'",
this.lexer, this.pos - 1);
}
} else {
argNode = arg.result;
}
args.push(argNode);
positions.push(this.pos);
}
args.push(positions);
return args;
};
/**
* Parses a group when the mode is changing. Takes a position, a new mode, and
* an outer mode that is used to parse the outside.
*
* @return {?ParseFuncOrArgument}
*/
Parser.prototype.parseSpecialGroup = function(innerMode, optional) {
var outerMode = this.mode;
// Handle `original` argTypes
if (innerMode === "original") {
innerMode = outerMode;
}
if (innerMode === "color" || innerMode === "size") {
// color and size modes are special because they should have braces and
// should only lex a single symbol inside
var openBrace = this.nextToken;
if (optional && openBrace.text !== "[") {
// optional arguments should return null if they don't exist
return null;
}
// The call to expect will lex the token after the '{' in inner mode
this.mode = innerMode;
this.expect(optional ? "[" : "{");
var inner = this.nextToken;
this.mode = outerMode;
var data;
if (innerMode === "color") {
data = inner.text;
} else {
data = inner.data;
}
this.consume(); // consume the token stored in inner
this.expect(optional ? "]" : "}");
return new ParseFuncOrArgument(
new ParseNode(innerMode, data, outerMode),
false);
} else if (innerMode === "text") {
// text mode is special because it should ignore the whitespace before
// it
var whitespace = this.lexer.lex(this.pos, "whitespace");
this.pos = whitespace.position;
}
// By the time we get here, innerMode is one of "text" or "math".
// We switch the mode of the parser, recurse, then restore the old mode.
this.mode = innerMode;
this.nextToken = this.lexer.lex(this.pos, innerMode);
var res;
if (optional) {
res = this.parseOptionalGroup();
} else {
res = this.parseGroup();
}
this.mode = outerMode;
this.nextToken = this.lexer.lex(this.pos, outerMode);
return res;
};
/**
* Parses a group, which is either a single nucleus (like "x") or an expression
* in braces (like "{x+y}")
*
* @return {?ParseFuncOrArgument}
*/
Parser.prototype.parseGroup = function() {
// Try to parse an open brace
if (this.nextToken.text === "{") {
// If we get a brace, parse an expression
this.consume();
var expression = this.parseExpression(false);
// Make sure we get a close brace
this.expect("}");
return new ParseFuncOrArgument(
new ParseNode("ordgroup", expression, this.mode),
false);
} else {
// Otherwise, just return a nucleus
return this.parseSymbol();
}
};
/**
* Parses a group, which is an expression in brackets (like "[x+y]")
*
* @return {?ParseFuncOrArgument}
*/
Parser.prototype.parseOptionalGroup = function() {
// Try to parse an open bracket
if (this.nextToken.text === "[") {
// If we get a brace, parse an expression
this.consume();
var expression = this.parseExpression(false, "]");
// Make sure we get a close bracket
this.expect("]");
return new ParseFuncOrArgument(
new ParseNode("ordgroup", expression, this.mode),
false);
} else {
// Otherwise, return null,
return null;
}
};
/**
* Parse a single symbol out of the string. Here, we handle both the functions
* we have defined, as well as the single character symbols
*
* @return {?ParseFuncOrArgument}
*/
Parser.prototype.parseSymbol = function() {
var nucleus = this.nextToken;
if (functions[nucleus.text]) {
this.consume();
// If there exists a function with this name, we return the function and
// say that it is a function.
return new ParseFuncOrArgument(
nucleus.text,
true);
} else if (symbols[this.mode][nucleus.text]) {
this.consume();
// Otherwise if this is a no-argument function, find the type it
// corresponds to in the symbols map
return new ParseFuncOrArgument(
new ParseNode(symbols[this.mode][nucleus.text].group,
nucleus.text, this.mode),
false);
} else {
return null;
}
};
Parser.prototype.ParseNode = ParseNode;
module.exports = Parser;
/***/ }),
/* 172 */
/***/ (function(module, exports, __webpack_require__) {
var utils = __webpack_require__(162);
var ParseError = __webpack_require__(155);
/* This file contains a list of functions that we parse, identified by
* the calls to defineFunction.
*
* The first argument to defineFunction is a single name or a list of names.
* All functions named in such a list will share a single implementation.
*
* Each declared function can have associated properties, which
* include the following:
*
* - numArgs: The number of arguments the function takes.
* If this is the only property, it can be passed as a number
* instead of an element of a properties object.
* - argTypes: (optional) An array corresponding to each argument of the
* function, giving the type of argument that should be parsed. Its
* length should be equal to `numArgs + numOptionalArgs`. Valid
* types:
* - "size": A size-like thing, such as "1em" or "5ex"
* - "color": An html color, like "#abc" or "blue"
* - "original": The same type as the environment that the
* function being parsed is in (e.g. used for the
* bodies of functions like \color where the first
* argument is special and the second argument is
* parsed normally)
* Other possible types (probably shouldn't be used)
* - "text": Text-like (e.g. \text)
* - "math": Normal math
* If undefined, this will be treated as an appropriate length
* array of "original" strings
* - greediness: (optional) The greediness of the function to use ungrouped
* arguments.
*
* E.g. if you have an expression
* \sqrt \frac 1 2
* since \frac has greediness=2 vs \sqrt's greediness=1, \frac
* will use the two arguments '1' and '2' as its two arguments,
* then that whole function will be used as the argument to
* \sqrt. On the other hand, the expressions
* \frac \frac 1 2 3
* and
* \frac \sqrt 1 2
* will fail because \frac and \frac have equal greediness
* and \sqrt has a lower greediness than \frac respectively. To
* make these parse, we would have to change them to:
* \frac {\frac 1 2} 3
* and
* \frac {\sqrt 1} 2
*
* The default value is `1`
* - allowedInText: (optional) Whether or not the function is allowed inside
* text mode (default false)
* - numOptionalArgs: (optional) The number of optional arguments the function
* should parse. If the optional arguments aren't found,
* `null` will be passed to the handler in their place.
* (default 0)
*
* The last argument is that implementation, the handler for the function(s).
* It is called to handle these functions and their arguments.
* It receives two arguments:
* - context contains information and references provided by the parser
* - args is an array of arguments obtained from TeX input
* The context contains the following properties:
* - funcName: the text (i.e. name) of the function, including \
* - parser: the parser object
* - lexer: the lexer object
* - positions: the positions in the overall string of the function
* and the arguments.
* The latter three should only be used to produce error messages.
*
* The function should return an object with the following keys:
* - type: The type of element that this is. This is then used in
* buildHTML/buildMathML to determine which function
* should be called to build this node into a DOM node
* Any other data can be added to the object, which will be passed
* in to the function in buildHTML/buildMathML as `group.value`.
*/
function defineFunction(names, props, handler) {
if (typeof names === "string") {
names = [names];
}
if (typeof props === "number") {
props = { numArgs: props };
}
// Set default values of functions
var data = {
numArgs: props.numArgs,
argTypes: props.argTypes,
greediness: (props.greediness === undefined) ? 1 : props.greediness,
allowedInText: !!props.allowedInText,
numOptionalArgs: props.numOptionalArgs || 0,
handler: handler,
};
for (var i = 0; i < names.length; ++i) {
module.exports[names[i]] = data;
}
}
// A normal square root
defineFunction("\\sqrt", {
numArgs: 1,
numOptionalArgs: 1,
}, function(context, args) {
var index = args[0];
var body = args[1];
return {
type: "sqrt",
body: body,
index: index,
};
});
// Some non-mathy text
defineFunction("\\text", {
numArgs: 1,
argTypes: ["text"],
greediness: 2,
}, function(context, args) {
var body = args[0];
// Since the corresponding buildHTML/buildMathML function expects a
// list of elements, we normalize for different kinds of arguments
// TODO(emily): maybe this should be done somewhere else
var inner;
if (body.type === "ordgroup") {
inner = body.value;
} else {
inner = [body];
}
return {
type: "text",
body: inner,
};
});
// A two-argument custom color
defineFunction("\\color", {
numArgs: 2,
allowedInText: true,
greediness: 3,
argTypes: ["color", "original"],
}, function(context, args) {
var color = args[0];
var body = args[1];
// Normalize the different kinds of bodies (see \text above)
var inner;
if (body.type === "ordgroup") {
inner = body.value;
} else {
inner = [body];
}
return {
type: "color",
color: color.value,
value: inner,
};
});
// An overline
defineFunction("\\overline", {
numArgs: 1,
}, function(context, args) {
var body = args[0];
return {
type: "overline",
body: body,
};
});
// An underline
defineFunction("\\underline", {
numArgs: 1,
}, function(context, args) {
var body = args[0];
return {
type: "underline",
body: body,
};
});
// A box of the width and height
defineFunction("\\rule", {
numArgs: 2,
numOptionalArgs: 1,
argTypes: ["size", "size", "size"],
}, function(context, args) {
var shift = args[0];
var width = args[1];
var height = args[2];
return {
type: "rule",
shift: shift && shift.value,
width: width.value,
height: height.value,
};
});
// A KaTeX logo
defineFunction("\\KaTeX", {
numArgs: 0,
}, function(context) {
return {
type: "katex",
};
});
defineFunction("\\phantom", {
numArgs: 1,
}, function(context, args) {
var body = args[0];
var inner;
if (body.type === "ordgroup") {
inner = body.value;
} else {
inner = [body];
}
return {
type: "phantom",
value: inner,
};
});
// Extra data needed for the delimiter handler down below
var delimiterSizes = {
"\\bigl" : {type: "open", size: 1},
"\\Bigl" : {type: "open", size: 2},
"\\biggl": {type: "open", size: 3},
"\\Biggl": {type: "open", size: 4},
"\\bigr" : {type: "close", size: 1},
"\\Bigr" : {type: "close", size: 2},
"\\biggr": {type: "close", size: 3},
"\\Biggr": {type: "close", size: 4},
"\\bigm" : {type: "rel", size: 1},
"\\Bigm" : {type: "rel", size: 2},
"\\biggm": {type: "rel", size: 3},
"\\Biggm": {type: "rel", size: 4},
"\\big" : {type: "textord", size: 1},
"\\Big" : {type: "textord", size: 2},
"\\bigg" : {type: "textord", size: 3},
"\\Bigg" : {type: "textord", size: 4},
};
var delimiters = [
"(", ")", "[", "\\lbrack", "]", "\\rbrack",
"\\{", "\\lbrace", "\\}", "\\rbrace",
"\\lfloor", "\\rfloor", "\\lceil", "\\rceil",
"<", ">", "\\langle", "\\rangle", "\\lt", "\\gt",
"\\lvert", "\\rvert", "\\lVert", "\\rVert",
"\\lgroup", "\\rgroup", "\\lmoustache", "\\rmoustache",
"/", "\\backslash",
"|", "\\vert", "\\|", "\\Vert",
"\\uparrow", "\\Uparrow",
"\\downarrow", "\\Downarrow",
"\\updownarrow", "\\Updownarrow",
".",
];
var fontAliases = {
"\\Bbb": "\\mathbb",
"\\bold": "\\mathbf",
"\\frak": "\\mathfrak",
};
// Single-argument color functions
defineFunction([
"\\blue", "\\orange", "\\pink", "\\red",
"\\green", "\\gray", "\\purple",
"\\blueA", "\\blueB", "\\blueC", "\\blueD", "\\blueE",
"\\tealA", "\\tealB", "\\tealC", "\\tealD", "\\tealE",
"\\greenA", "\\greenB", "\\greenC", "\\greenD", "\\greenE",
"\\goldA", "\\goldB", "\\goldC", "\\goldD", "\\goldE",
"\\redA", "\\redB", "\\redC", "\\redD", "\\redE",
"\\maroonA", "\\maroonB", "\\maroonC", "\\maroonD", "\\maroonE",
"\\purpleA", "\\purpleB", "\\purpleC", "\\purpleD", "\\purpleE",
"\\mintA", "\\mintB", "\\mintC",
"\\grayA", "\\grayB", "\\grayC", "\\grayD", "\\grayE",
"\\grayF", "\\grayG", "\\grayH", "\\grayI",
"\\kaBlue", "\\kaGreen",
], {
numArgs: 1,
allowedInText: true,
greediness: 3,
}, function(context, args) {
var body = args[0];
var atoms;
if (body.type === "ordgroup") {
atoms = body.value;
} else {
atoms = [body];
}
return {
type: "color",
color: "katex-" + context.funcName.slice(1),
value: atoms,
};
});
// There are 2 flags for operators; whether they produce limits in
// displaystyle, and whether they are symbols and should grow in
// displaystyle. These four groups cover the four possible choices.
// No limits, not symbols
defineFunction([
"\\arcsin", "\\arccos", "\\arctan", "\\arg", "\\cos", "\\cosh",
"\\cot", "\\coth", "\\csc", "\\deg", "\\dim", "\\exp", "\\hom",
"\\ker", "\\lg", "\\ln", "\\log", "\\sec", "\\sin", "\\sinh",
"\\tan", "\\tanh",
], {
numArgs: 0,
}, function(context) {
return {
type: "op",
limits: false,
symbol: false,
body: context.funcName,
};
});
// Limits, not symbols
defineFunction([
"\\det", "\\gcd", "\\inf", "\\lim", "\\liminf", "\\limsup", "\\max",
"\\min", "\\Pr", "\\sup",
], {
numArgs: 0,
}, function(context) {
return {
type: "op",
limits: true,
symbol: false,
body: context.funcName,
};
});
// No limits, symbols
defineFunction([
"\\int", "\\iint", "\\iiint", "\\oint",
], {
numArgs: 0,
}, function(context) {
return {
type: "op",
limits: false,
symbol: true,
body: context.funcName,
};
});
// Limits, symbols
defineFunction([
"\\coprod", "\\bigvee", "\\bigwedge", "\\biguplus", "\\bigcap",
"\\bigcup", "\\intop", "\\prod", "\\sum", "\\bigotimes",
"\\bigoplus", "\\bigodot", "\\bigsqcup", "\\smallint",
], {
numArgs: 0,
}, function(context) {
return {
type: "op",
limits: true,
symbol: true,
body: context.funcName,
};
});
// Fractions
defineFunction([
"\\dfrac", "\\frac", "\\tfrac",
"\\dbinom", "\\binom", "\\tbinom",
], {
numArgs: 2,
greediness: 2,
}, function(context, args) {
var numer = args[0];
var denom = args[1];
var hasBarLine;
var leftDelim = null;
var rightDelim = null;
var size = "auto";
switch (context.funcName) {
case "\\dfrac":
case "\\frac":
case "\\tfrac":
hasBarLine = true;
break;
case "\\dbinom":
case "\\binom":
case "\\tbinom":
hasBarLine = false;
leftDelim = "(";
rightDelim = ")";
break;
default:
throw new Error("Unrecognized genfrac command");
}
switch (context.funcName) {
case "\\dfrac":
case "\\dbinom":
size = "display";
break;
case "\\tfrac":
case "\\tbinom":
size = "text";
break;
}
return {
type: "genfrac",
numer: numer,
denom: denom,
hasBarLine: hasBarLine,
leftDelim: leftDelim,
rightDelim: rightDelim,
size: size,
};
});
// Left and right overlap functions
defineFunction(["\\llap", "\\rlap"], {
numArgs: 1,
allowedInText: true,
}, function(context, args) {
var body = args[0];
return {
type: context.funcName.slice(1),
body: body,
};
});
// Delimiter functions
defineFunction([
"\\bigl", "\\Bigl", "\\biggl", "\\Biggl",
"\\bigr", "\\Bigr", "\\biggr", "\\Biggr",
"\\bigm", "\\Bigm", "\\biggm", "\\Biggm",
"\\big", "\\Big", "\\bigg", "\\Bigg",
"\\left", "\\right",
], {
numArgs: 1,
}, function(context, args) {
var delim = args[0];
if (!utils.contains(delimiters, delim.value)) {
throw new ParseError(
"Invalid delimiter: '" + delim.value + "' after '" +
context.funcName + "'",
context.lexer, context.positions[1]);
}
// \left and \right are caught somewhere in Parser.js, which is
// why this data doesn't match what is in buildHTML.
if (context.funcName === "\\left" || context.funcName === "\\right") {
return {
type: "leftright",
value: delim.value,
};
} else {
return {
type: "delimsizing",
size: delimiterSizes[context.funcName].size,
delimType: delimiterSizes[context.funcName].type,
value: delim.value,
};
}
});
// Sizing functions (handled in Parser.js explicitly, hence no handler)
defineFunction([
"\\tiny", "\\scriptsize", "\\footnotesize", "\\small",
"\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge",
], 0, null);
// Style changing functions (handled in Parser.js explicitly, hence no
// handler)
defineFunction([
"\\displaystyle", "\\textstyle", "\\scriptstyle",
"\\scriptscriptstyle",
], 0, null);
defineFunction([
// styles
"\\mathrm", "\\mathit", "\\mathbf",
// families
"\\mathbb", "\\mathcal", "\\mathfrak", "\\mathscr", "\\mathsf",
"\\mathtt",
// aliases
"\\Bbb", "\\bold", "\\frak",
], {
numArgs: 1,
greediness: 2,
}, function(context, args) {
var body = args[0];
var func = context.funcName;
if (func in fontAliases) {
func = fontAliases[func];
}
return {
type: "font",
font: func.slice(1),
body: body,
};
});
// Accents
defineFunction([
"\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve",
"\\check", "\\hat", "\\vec", "\\dot",
// We don't support expanding accents yet
// "\\widetilde", "\\widehat"
], {
numArgs: 1,
}, function(context, args) {
var base = args[0];
return {
type: "accent",
accent: context.funcName,
base: base,
};
});
// Infix generalized fractions
defineFunction(["\\over", "\\choose"], {
numArgs: 0,
}, function(context) {
var replaceWith;
switch (context.funcName) {
case "\\over":
replaceWith = "\\frac";
break;
case "\\choose":
replaceWith = "\\binom";
break;
default:
throw new Error("Unrecognized infix genfrac command");
}
return {
type: "infix",
replaceWith: replaceWith,
};
});
// Row breaks for aligned data
defineFunction(["\\\\", "\\cr"], {
numArgs: 0,
numOptionalArgs: 1,
argTypes: ["size"],
}, function(context, args) {
var size = args[0];
return {
type: "cr",
size: size,
};
});
// Environment delimiters
defineFunction(["\\begin", "\\end"], {
numArgs: 1,
argTypes: ["text"],
}, function(context, args) {
var nameGroup = args[0];
if (nameGroup.type !== "ordgroup") {
throw new ParseError(
"Invalid environment name",
context.lexer, context.positions[1]);
}
var name = "";
for (var i = 0; i < nameGroup.value.length; ++i) {
name += nameGroup.value[i].value;
}
return {
type: "environment",
name: name,
namepos: context.positions[1],
};
});
/***/ }),
/* 173 */
/***/ (function(module, exports, __webpack_require__) {
/* eslint no-constant-condition:0 */
var fontMetrics = __webpack_require__(163);
var parseData = __webpack_require__(174);
var ParseError = __webpack_require__(155);
var ParseNode = parseData.ParseNode;
/**
* Parse the body of the environment, with rows delimited by \\ and
* columns delimited by &, and create a nested list in row-major order
* with one group per cell.
*/
function parseArray(parser, result) {
var row = [];
var body = [row];
var rowGaps = [];
while (true) {
var cell = parser.parseExpression(false, null);
row.push(new ParseNode("ordgroup", cell, parser.mode));
var next = parser.nextToken.text;
if (next === "&") {
parser.consume();
} else if (next === "\\end") {
break;
} else if (next === "\\\\" || next === "\\cr") {
var cr = parser.parseFunction();
rowGaps.push(cr.value.size);
row = [];
body.push(row);
} else {
// TODO: Clean up the following hack once #385 got merged
var pos = Math.min(parser.pos + 1, parser.lexer._input.length);
throw new ParseError("Expected & or \\\\ or \\end",
parser.lexer, pos);
}
}
result.body = body;
result.rowGaps = rowGaps;
return new ParseNode(result.type, result, parser.mode);
}
/*
* An environment definition is very similar to a function definition:
* it is declared with a name or a list of names, a set of properties
* and a handler containing the actual implementation.
*
* The properties include:
* - numArgs: The number of arguments after the \begin{name} function.
* - argTypes: (optional) Just like for a function
* - allowedInText: (optional) Whether or not the environment is allowed inside
* text mode (default false) (not enforced yet)
* - numOptionalArgs: (optional) Just like for a function
* A bare number instead of that object indicates the numArgs value.
*
* The handler function will receive two arguments
* - context: information and references provided by the parser
* - args: an array of arguments passed to \begin{name}
* The context contains the following properties:
* - envName: the name of the environment, one of the listed names.
* - parser: the parser object
* - lexer: the lexer object
* - positions: the positions associated with these arguments from args.
* The handler must return a ParseResult.
*/
function defineEnvironment(names, props, handler) {
if (typeof names === "string") {
names = [names];
}
if (typeof props === "number") {
props = { numArgs: props };
}
// Set default values of environments
var data = {
numArgs: props.numArgs || 0,
argTypes: props.argTypes,
greediness: 1,
allowedInText: !!props.allowedInText,
numOptionalArgs: props.numOptionalArgs || 0,
handler: handler,
};
for (var i = 0; i < names.length; ++i) {
module.exports[names[i]] = data;
}
}
// Arrays are part of LaTeX, defined in lttab.dtx so its documentation
// is part of the source2e.pdf file of LaTeX2e source documentation.
defineEnvironment("array", {
numArgs: 1,
}, function(context, args) {
var colalign = args[0];
colalign = colalign.value.map ? colalign.value : [colalign];
var cols = colalign.map(function(node) {
var ca = node.value;
if ("lcr".indexOf(ca) !== -1) {
return {
type: "align",
align: ca,
};
} else if (ca === "|") {
return {
type: "separator",
separator: "|",
};
}
throw new ParseError(
"Unknown column alignment: " + node.value,
context.lexer, context.positions[1]);
});
var res = {
type: "array",
cols: cols,
hskipBeforeAndAfter: true, // \@preamble in lttab.dtx
};
res = parseArray(context.parser, res);
return res;
});
// The matrix environments of amsmath builds on the array environment
// of LaTeX, which is discussed above.
defineEnvironment([
"matrix",
"pmatrix",
"bmatrix",
"Bmatrix",
"vmatrix",
"Vmatrix",
], {
}, function(context) {
var delimiters = {
"matrix": null,
"pmatrix": ["(", ")"],
"bmatrix": ["[", "]"],
"Bmatrix": ["\\{", "\\}"],
"vmatrix": ["|", "|"],
"Vmatrix": ["\\Vert", "\\Vert"],
}[context.envName];
var res = {
type: "array",
hskipBeforeAndAfter: false, // \hskip -\arraycolsep in amsmath
};
res = parseArray(context.parser, res);
if (delimiters) {
res = new ParseNode("leftright", {
body: [res],
left: delimiters[0],
right: delimiters[1],
}, context.mode);
}
return res;
});
// A cases environment (in amsmath.sty) is almost equivalent to
// \def\arraystretch{1.2}%
// \left\{\begin{array}{@{}l@{\quad}l@{}} … \end{array}\right.
defineEnvironment("cases", {
}, function(context) {
var res = {
type: "array",
arraystretch: 1.2,
cols: [{
type: "align",
align: "l",
pregap: 0,
postgap: fontMetrics.metrics.quad,
}, {
type: "align",
align: "l",
pregap: 0,
postgap: 0,
}],
};
res = parseArray(context.parser, res);
res = new ParseNode("leftright", {
body: [res],
left: "\\{",
right: ".",
}, context.mode);
return res;
});
// An aligned environment is like the align* environment
// except it operates within math mode.
// Note that we assume \nomallineskiplimit to be zero,
// so that \strut@ is the same as \strut.
defineEnvironment("aligned", {
}, function(context) {
var res = {
type: "array",
cols: [],
};
res = parseArray(context.parser, res);
var emptyGroup = new ParseNode("ordgroup", [], context.mode);
var numCols = 0;
res.value.body.forEach(function(row) {
var i;
for (i = 1; i < row.length; i += 2) {
row[i].value.unshift(emptyGroup);
}
if (numCols < row.length) {
numCols = row.length;
}
});
for (var i = 0; i < numCols; ++i) {
var align = "r";
var pregap = 0;
if (i % 2 === 1) {
align = "l";
} else if (i > 0) {
pregap = 2; // one \qquad between columns
}
res.value.cols[i] = {
type: "align",
align: align,
pregap: pregap,
postgap: 0,
};
}
return res;
});
/***/ }),
/* 174 */
/***/ (function(module, exports) {
/**
* The resulting parse tree nodes of the parse tree.
*/
function ParseNode(type, value, mode) {
this.type = type;
this.value = value;
this.mode = mode;
}
module.exports = {
ParseNode: ParseNode,
};
/***/ }),
/* 175 */
/***/ (function(module, exports, __webpack_require__) {
/**
* The Lexer class handles tokenizing the input in various ways. Since our
* parser expects us to be able to backtrack, the lexer allows lexing from any
* given starting point.
*
* Its main exposed function is the `lex` function, which takes a position to
* lex from and a type of token to lex. It defers to the appropriate `_innerLex`
* function.
*
* The various `_innerLex` functions perform the actual lexing of different
* kinds.
*/
var matchAt = __webpack_require__(176);
var ParseError = __webpack_require__(155);
// The main lexer class
function Lexer(input) {
this._input = input;
}
// The resulting token returned from `lex`.
function Token(text, data, position) {
this.text = text;
this.data = data;
this.position = position;
}
/* The following tokenRegex
* - matches typical whitespace (but not NBSP etc.) using its first group
* - matches symbol combinations which result in a single output character
* - does not match any control character \x00-\x1f except whitespace
* - does not match a bare backslash
* - matches any ASCII character except those just mentioned
* - does not match the BMP private use area \uE000-\uF8FF
* - does not match bare surrogate code units
* - matches any BMP character except for those just described
* - matches any valid Unicode surrogate pair
* - matches a backslash followed by one or more letters
* - matches a backslash followed by any BMP character, including newline
* Just because the Lexer matches something doesn't mean it's valid input:
* If there is no matching function or symbol definition, the Parser will
* still reject the input.
*/
var tokenRegex = new RegExp(
"([ \r\n\t]+)|(" + // whitespace
"---?" + // special combinations
"|[!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]" + // single codepoint
"|[\uD800-\uDBFF][\uDC00-\uDFFF]" + // surrogate pair
"|\\\\(?:[a-zA-Z]+|[^\uD800-\uDFFF])" + // function name
")"
);
var whitespaceRegex = /\s*/;
/**
* This function lexes a single normal token. It takes a position and
* whether it should completely ignore whitespace or not.
*/
Lexer.prototype._innerLex = function(pos, ignoreWhitespace) {
var input = this._input;
if (pos === input.length) {
return new Token("EOF", null, pos);
}
var match = matchAt(tokenRegex, input, pos);
if (match === null) {
throw new ParseError(
"Unexpected character: '" + input[pos] + "'",
this, pos);
} else if (match[2]) { // matched non-whitespace
return new Token(match[2], null, pos + match[2].length);
} else if (ignoreWhitespace) {
return this._innerLex(pos + match[1].length, true);
} else { // concatenate whitespace to a single space
return new Token(" ", null, pos + match[1].length);
}
};
// A regex to match a CSS color (like #ffffff or BlueViolet)
var cssColor = /#[a-z0-9]+|[a-z]+/i;
/**
* This function lexes a CSS color.
*/
Lexer.prototype._innerLexColor = function(pos) {
var input = this._input;
// Ignore whitespace
var whitespace = matchAt(whitespaceRegex, input, pos)[0];
pos += whitespace.length;
var match;
if ((match = matchAt(cssColor, input, pos))) {
// If we look like a color, return a color
return new Token(match[0], null, pos + match[0].length);
} else {
throw new ParseError("Invalid color", this, pos);
}
};
// A regex to match a dimension. Dimensions look like
// "1.2em" or ".4pt" or "1 ex"
var sizeRegex = /(-?)\s*(\d+(?:\.\d*)?|\.\d+)\s*([a-z]{2})/;
/**
* This function lexes a dimension.
*/
Lexer.prototype._innerLexSize = function(pos) {
var input = this._input;
// Ignore whitespace
var whitespace = matchAt(whitespaceRegex, input, pos)[0];
pos += whitespace.length;
var match;
if ((match = matchAt(sizeRegex, input, pos))) {
var unit = match[3];
// We only currently handle "em" and "ex" units
if (unit !== "em" && unit !== "ex") {
throw new ParseError("Invalid unit: '" + unit + "'", this, pos);
}
return new Token(match[0], {
number: +(match[1] + match[2]),
unit: unit,
}, pos + match[0].length);
}
throw new ParseError("Invalid size", this, pos);
};
/**
* This function lexes a string of whitespace.
*/
Lexer.prototype._innerLexWhitespace = function(pos) {
var input = this._input;
var whitespace = matchAt(whitespaceRegex, input, pos)[0];
pos += whitespace.length;
return new Token(whitespace[0], null, pos);
};
/**
* This function lexes a single token starting at `pos` and of the given mode.
* Based on the mode, we defer to one of the `_innerLex` functions.
*/
Lexer.prototype.lex = function(pos, mode) {
if (mode === "math") {
return this._innerLex(pos, true);
} else if (mode === "text") {
return this._innerLex(pos, false);
} else if (mode === "color") {
return this._innerLexColor(pos);
} else if (mode === "size") {
return this._innerLexSize(pos);
} else if (mode === "whitespace") {
return this._innerLexWhitespace(pos);
}
};
module.exports = Lexer;
/***/ }),
/* 176 */
/***/ (function(module, exports) {
/** @flow */
"use strict";
function getRelocatable(re) {
// In the future, this could use a WeakMap instead of an expando.
if (!re.__matchAtRelocatable) {
// Disjunctions are the lowest-precedence operator, so we can make any
// pattern match the empty string by appending `|()` to it:
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-patterns
var source = re.source + "|()";
// We always make the new regex global.
var flags = "g" + (re.ignoreCase ? "i" : "") + (re.multiline ? "m" : "") + (re.unicode ? "u" : "")
// sticky (/.../y) doesn't make sense in conjunction with our relocation
// logic, so we ignore it here.
;
re.__matchAtRelocatable = new RegExp(source, flags);
}
return re.__matchAtRelocatable;
}
function matchAt(re, str, pos) {
if (re.global || re.sticky) {
throw new Error("matchAt(...): Only non-global regexes are supported");
}
var reloc = getRelocatable(re);
reloc.lastIndex = pos;
var match = reloc.exec(str);
// Last capturing group is our sentinel that indicates whether the regex
// matched at the given location.
if (match[match.length - 1] == null) {
// Original regex matched.
match.length = match.length - 1;
return match;
} else {
return null;
}
}
module.exports = matchAt;
/***/ }),
/* 177 */
/***/ (function(module, exports) {
// Markdown-it plugin to render GitHub-style task lists; see
//
// https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments
// https://github.com/blog/1825-task-lists-in-all-markdown-documents
var disableCheckboxes = true;
var useLabelWrapper = false;
module.exports = function(md, options) {
if (options) {
disableCheckboxes = !options.enabled;
useLabelWrapper = !!options.label;
}
md.core.ruler.after('inline', 'github-task-lists', function(state) {
var tokens = state.tokens;
for (var i = 2; i < tokens.length; i++) {
if (isTodoItem(tokens, i)) {
todoify(tokens[i], state.Token);
attrSet(tokens[i-2], 'class', 'task-list-item' + (!disableCheckboxes ? ' enabled' : ''));
attrSet(tokens[parentToken(tokens, i-2)], 'class', 'contains-task-list');
}
}
});
};
function attrSet(token, name, value) {
var index = token.attrIndex(name);
var attr = [name, value];
if (index < 0) {
token.attrPush(attr);
} else {
token.attrs[index] = attr;
}
}
function parentToken(tokens, index) {
var targetLevel = tokens[index].level - 1;
for (var i = index - 1; i >= 0; i--) {
if (tokens[i].level === targetLevel) {
return i;
}
}
return -1;
}
function isTodoItem(tokens, index) {
return isInline(tokens[index]) &&
isParagraph(tokens[index - 1]) &&
isListItem(tokens[index - 2]) &&
startsWithTodoMarkdown(tokens[index]);
}
function todoify(token, TokenConstructor) {
token.children.unshift(makeCheckbox(token, TokenConstructor));
token.children[1].content = token.children[1].content.slice(3);
token.content = token.content.slice(3);
if (useLabelWrapper) {
token.children.unshift(beginLabel(TokenConstructor));
token.children.push(endLabel(TokenConstructor));
}
}
function makeCheckbox(token, TokenConstructor) {
var checkbox = new TokenConstructor('html_inline', '', 0);
var disabledAttr = disableCheckboxes ? ' disabled="" ' : '';
if (token.content.indexOf('[ ] ') === 0) {
checkbox.content = '<input class="task-list-item-checkbox"' + disabledAttr + 'type="checkbox">';
} else if (token.content.indexOf('[x] ') === 0 || token.content.indexOf('[X] ') === 0) {
checkbox.content = '<input class="task-list-item-checkbox" checked=""' + disabledAttr + 'type="checkbox">';
}
return checkbox;
}
// these next two functions are kind of hacky; probably should really be a
// true block-level token with .tag=='label'
function beginLabel(TokenConstructor) {
var token = new TokenConstructor('html_inline', '', 0);
token.content = '<label>';
return token;
}
function endLabel(TokenConstructor) {
var token = new TokenConstructor('html_inline', '', 0);
token.content = '</label>';
return token;
}
function isInline(token) { return token.type === 'inline'; }
function isParagraph(token) { return token.type === 'paragraph_open'; }
function isListItem(token) { return token.type === 'list_item_open'; }
function startsWithTodoMarkdown(token) {
// leading whitespace in a list item is already trimmed off by markdown-it
return token.content.indexOf('[ ] ') === 0 || token.content.indexOf('[x] ') === 0 || token.content.indexOf('[X] ') === 0;
}
/***/ })
/******/ ])
});
;