Socket
Socket
Sign inDemoInstall

katex

Package Overview
Dependencies
Maintainers
6
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

katex - npm Package Compare versions

Comparing version 0.11.1 to 0.12.0

src/functions/def.js

44

CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file. This CHANGELOG roughly follows the guidelines from [www.keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
## [v0.12.0]
### Added
- `globalGroup` option to place definitions in global scope (#2091)
- `\cal` (#2116)
- `{rcases}` and `{drcases}` (#2149)
- HTML extension (#2082)
- HTML extension can be enabled using `strict` and `trust` setting. See https://katex.org/docs/options.html for more details. **Please review its security implication before enabling the extension.**
- `\message`, `\errmessage`, and `\show` for debugging (#2135)
- bra-ket notation (#2162)
- `\expandafter`, `\noexpand`, `\edef`, `\let`, and `\long` (#2122)
- Support MathML display mode (#2220)
- `\minuso` (#2213)
### Changed
- Update documentation (#2086, #2108, #2107, #2106, #2143, #2178, #2195, #2231, #2239, #2263, #2279, #2289, #2280. #2269, #2294, #2296, #2297)
- `mathtex-script`: Use html 'defer' attribute (#2069)
- `auto-render`: do not touch text nodes w/o formulas (#2154)
- Move \global and \def to functions (#2138)
- Cleanup font build scripts & font updates (#2155, #2171, #2156)
- **BREAKING CHANGE:** old-style numerals are now available via `\mathnormal` instead of `\mathcal`
- Upgrade minimum development Node version to v10 (#2177)
### Removed
- **BREAKING CHANGE:** IE 9/10 support (#2136)
### Fixed
- Set `border-collapse: collapse` in vlist, fix misalignment in table (#2103)
- `\@ifnextchar` consumes spaces (#2118)
- Add spacing on left of fleqn display math (#2127)
- Fix `\boxed` inherited color (#2130)
- Fix laps having visible width in Safari (#1919)
- Improve MathML for corners (#1922)
- `auto-render`: ignore "option" tags (#2180)
- Fix delimiter error message (#2186)
- Fix under accent depth (#2252)
- Enable empty environment (#2258)
- Enable an empty `\substack` (#2278)
- Fix jagged parentheses (#2234)
- `\boldsymbol` not italic for textords such as Greek (#2290, #2299)
- Protect fraction bars from CSS border-color (#2292)
- Reset to leftmost spacing mode after newline (#1841)
- Fix missing metrics for space (0x20) and no-break space (0xa0) (#2298)
## [v0.11.1]

@@ -5,0 +49,0 @@ ### Changed

15

contrib/auto-render/auto-render.js

@@ -22,2 +22,9 @@ /* eslint no-console:0 */

const data = splitWithDelimiters(text, optionsCopy.delimiters);
if (data.length === 1 && data[0].type === 'text') {
// There is no formula in the text.
// Let's return null which means there is no need to replace
// the current text node with a new one.
return null;
}
const fragment = document.createDocumentFragment();

@@ -64,4 +71,6 @@

const frag = renderMathInText(childNode.textContent, optionsCopy);
i += frag.childNodes.length - 1;
elem.replaceChild(frag, childNode);
if (frag) {
i += frag.childNodes.length - 1;
elem.replaceChild(frag, childNode);
}
} else if (childNode.nodeType === 1) {

@@ -111,3 +120,3 @@ // Element node

optionsCopy.ignoredTags = optionsCopy.ignoredTags || [
"script", "noscript", "style", "textarea", "pre", "code",
"script", "noscript", "style", "textarea", "pre", "code", "option",
];

@@ -114,0 +123,0 @@ optionsCopy.ignoredClasses = optionsCopy.ignoredClasses || [];

8

contrib/copy-tex/README.md

@@ -24,4 +24,4 @@ # Copy-tex extension

```html
<link href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/copy-tex.css" rel="stylesheet" type="text/css">
<script src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/copy-tex.min.js" integrity="sha384-XhWAe6BtVcvEdS3FFKT7Mcft4HJjPqMQvi5V4YhzH9Qxw497jC13TupOEvjoIPy7" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/copy-tex.css" rel="stylesheet" type="text/css">
<script src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/copy-tex.min.js" integrity="sha384-XhWAe6BtVcvEdS3FFKT7Mcft4HJjPqMQvi5V4YhzH9Qxw497jC13TupOEvjoIPy7" crossorigin="anonymous"></script>
```

@@ -39,7 +39,5 @@

<!-- TODO: uncomment when releasing a new version
ECMAScript module is also available:
```html
<script type="module" src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/copy-tex.mjs" integrity="sha384-kS7UtO844uqLwxPmaRwzg1nGbKiHsIteWh+DP2cvT2FtigL0v6w1yPXYKEDzct0C" crossorigin="anonymous"></script>
```` -->
<script type="module" src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/copy-tex.mjs" integrity="sha384-kS7UtO844uqLwxPmaRwzg1nGbKiHsIteWh+DP2cvT2FtigL0v6w1yPXYKEDzct0C" crossorigin="anonymous"></script>

@@ -46,0 +44,0 @@ ### Known Issues

@@ -12,6 +12,5 @@ # `math/tex` Custom Script Type Extension

Load the extension by adding the following line to your HTML file.
This extension should be loaded *after* all `script type=math/tex` blocks that you want to render.
```html
<script src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/mathtex-script-type.min.js" integrity="sha384-LJ2FmexL77rmGm6SIpxq7y+XA6bkLzGZEgCywzKOZG/ws4va9fUVu2neMjvc3zdv"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/mathtex-script-type.min.js" integrity="sha384-LJ2FmexL77rmGm6SIpxq7y+XA6bkLzGZEgCywzKOZG/ws4va9fUVu2neMjvc3zdv" crossorigin="anonymous"></script>
```

@@ -22,21 +21,20 @@ You can download the script and use it locally, or from a local KaTeX installation instead.

Then, in the body, we use a `math/tex` script to typeset the equation `x+\sqrt{1-x^2}`.
After we're done writing `math/tex` scripts, we load this extension.
```html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
</head>
<body>
<script type="math/tex">x+\sqrt{1-x^2}</script>
<script src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/mathtex-script-type.min.js" integrity="sha384-LJ2FmexL77rmGm6SIpxq7y+XA6bkLzGZEgCywzKOZG/ws4va9fUVu2neMjvc3zdv"></script>
</body>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/mathtex-script-type.min.js" integrity="sha384-LJ2FmexL77rmGm6SIpxq7y+XA6bkLzGZEgCywzKOZG/ws4va9fUVu2neMjvc3zdv" crossorigin="anonymous"></script>
</head>
<body>
<script type="math/tex">x+\sqrt{1-x^2}</script>
</body>
</html>
```
<!-- TODO: uncomment when releasing a new version
ECMAScript module is also available:
```html
<script type="module" src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/mathtex-script-type.mjs" integrity="sha384-qc7HqE4GHbr2H9R+C8mTSdJmkkZ9E1bkIRyRrxMsoj3dcbGjILzoXJGcBGGns1bk" crossorigin="anonymous"></script>
```` -->
<script type="module" src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/mathtex-script-type.mjs" integrity="sha384-qc7HqE4GHbr2H9R+C8mTSdJmkkZ9E1bkIRyRrxMsoj3dcbGjILzoXJGcBGGns1bk" crossorigin="anonymous"></script>

@@ -10,3 +10,3 @@ # mhchem extension

```html
<script src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/mhchem.min.js" integrity="sha384-oa0lfxCGjaU1LdYckhq8LZcP+JTf8cyJXe69O6VE6UrShzWveT6KiCElJrck/stm"></script>
<script src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/mhchem.min.js" integrity="sha384-5gCAXJ0ZgozlShOzzT0OWArn7yCPGWVIvgo+BAd8NUKbCmulrJiQuCVR9cHlPHeG"></script>
```

@@ -13,0 +13,0 @@

@@ -658,2 +658,12 @@ // @flow

case "internal": {
// internal nodes are never included in the parse tree
break;
}
case "html": {
buildA11yStrings(tree.body, a11yStrings, atomType);
break;
}
default:

@@ -660,0 +670,0 @@ (tree.type: empty);

@@ -232,2 +232,10 @@ (function webpackUniversalModuleDefinition(root, factory) {

var data = auto_render_splitWithDelimiters(text, optionsCopy.delimiters);
if (data.length === 1 && data[0].type === 'text') {
// There is no formula in the text.
// Let's return null which means there is no need to replace
// the current text node with a new one.
return null;
}
var fragment = document.createDocumentFragment();

@@ -275,4 +283,7 @@

var frag = auto_render_renderMathInText(childNode.textContent, optionsCopy);
i += frag.childNodes.length - 1;
elem.replaceChild(frag, childNode);
if (frag) {
i += frag.childNodes.length - 1;
elem.replaceChild(frag, childNode);
}
} else if (childNode.nodeType === 1) {

@@ -328,3 +339,3 @@ (function () {

}];
optionsCopy.ignoredTags = optionsCopy.ignoredTags || ["script", "noscript", "style", "textarea", "pre", "code"];
optionsCopy.ignoredTags = optionsCopy.ignoredTags || ["script", "noscript", "style", "textarea", "pre", "code", "option"];
optionsCopy.ignoredClasses = optionsCopy.ignoredClasses || [];

@@ -331,0 +342,0 @@ optionsCopy.errorCallback = optionsCopy.errorCallback || console.error; // Enable sharing of global macros defined via `\gdef` between different

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),a=function(e,t,r){for(var n=r,o=0,a=e.length;n<t.length;){var i=t[n];if(o<=0&&t.slice(n,n+a)===e)return n;"\\"===i?n++:"{"===i?o++:"}"===i&&o--,n++}return-1},i=function(e,t,r,n){for(var o=[],i=0;i<e.length;i++)if("text"===e[i].type){var l=e[i].data,d=!0,s=0,f=void 0;for(-1!==(f=l.indexOf(t))&&(s=f,o.push({type:"text",data:l.slice(0,s)}),d=!1);;){if(d){if(-1===(f=l.indexOf(t,s)))break;o.push({type:"text",data:l.slice(s,f)}),s=f}else{if(-1===(f=a(r,l,s+t.length)))break;o.push({type:"math",data:l.slice(s+t.length,f),rawData:l.slice(s,f+r.length),display:n}),s=f+r.length}d=!d}o.push({type:"text",data:l.slice(s)})}else o.push(e[i]);return o},l=function(e,t){for(var r=function(e,t){for(var r=[{type:"text",data:e}],n=0;n<t.length;n++){var o=t[n];r=i(r,o.left,o.right,o.display||!1)}return r}(e,t.delimiters),n=document.createDocumentFragment(),a=0;a<r.length;a++)if("text"===r[a].type)n.appendChild(document.createTextNode(r[a].data));else{var l=document.createElement("span"),d=r[a].data;t.displayMode=r[a].display;try{t.preProcess&&(d=t.preProcess(d)),o.a.render(d,l,t)}catch(e){if(!(e instanceof o.a.ParseError))throw e;t.errorCallback("KaTeX auto-render: Failed to parse `"+r[a].data+"` with ",e),n.appendChild(document.createTextNode(r[a].rawData));continue}n.appendChild(l)}return n};t.default=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},function e(t,r){for(var n=0;n<t.childNodes.length;n++){var o=t.childNodes[n];if(3===o.nodeType){var a=l(o.textContent,r);n+=a.childNodes.length-1,t.replaceChild(a,o)}else 1===o.nodeType&&function(){var t=" "+o.className+" ";-1===r.ignoredTags.indexOf(o.nodeName.toLowerCase())&&r.ignoredClasses.every(function(e){return-1===t.indexOf(" "+e+" ")})&&e(o,r)}()}}(e,r)}}]).default});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),a=function(e,t,r){for(var n=r,o=0,a=e.length;n<t.length;){var i=t[n];if(o<=0&&t.slice(n,n+a)===e)return n;"\\"===i?n++:"{"===i?o++:"}"===i&&o--,n++}return-1},i=function(e,t,r,n){for(var o=[],i=0;i<e.length;i++)if("text"===e[i].type){var l=e[i].data,d=!0,s=0,f=void 0;for(-1!==(f=l.indexOf(t))&&(s=f,o.push({type:"text",data:l.slice(0,s)}),d=!1);;){if(d){if(-1===(f=l.indexOf(t,s)))break;o.push({type:"text",data:l.slice(s,f)}),s=f}else{if(-1===(f=a(r,l,s+t.length)))break;o.push({type:"math",data:l.slice(s+t.length,f),rawData:l.slice(s,f+r.length),display:n}),s=f+r.length}d=!d}o.push({type:"text",data:l.slice(s)})}else o.push(e[i]);return o},l=function(e,t){var r=function(e,t){for(var r=[{type:"text",data:e}],n=0;n<t.length;n++){var o=t[n];r=i(r,o.left,o.right,o.display||!1)}return r}(e,t.delimiters);if(1===r.length&&"text"===r[0].type)return null;for(var n=document.createDocumentFragment(),a=0;a<r.length;a++)if("text"===r[a].type)n.appendChild(document.createTextNode(r[a].data));else{var l=document.createElement("span"),d=r[a].data;t.displayMode=r[a].display;try{t.preProcess&&(d=t.preProcess(d)),o.a.render(d,l,t)}catch(e){if(!(e instanceof o.a.ParseError))throw e;t.errorCallback("KaTeX auto-render: Failed to parse `"+r[a].data+"` with ",e),n.appendChild(document.createTextNode(r[a].rawData));continue}n.appendChild(l)}return n};t.default=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},function e(t,r){for(var n=0;n<t.childNodes.length;n++){var o=t.childNodes[n];if(3===o.nodeType){var a=l(o.textContent,r);a&&(n+=a.childNodes.length-1,t.replaceChild(a,o))}else 1===o.nodeType&&function(){var t=" "+o.className+" ";-1===r.ignoredTags.indexOf(o.nodeName.toLowerCase())&&r.ignoredClasses.every(function(e){return-1===t.indexOf(" "+e+" ")})&&e(o,r)}()}}(e,r)}}]).default});

@@ -1,1 +0,1 @@

!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("katex"));else if("function"==typeof define&&define.amd)define(["katex"],e);else{var n="object"==typeof exports?e(require("katex")):e(t.katex);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}("undefined"!=typeof self?self:this,function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var a=e[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(o,a,function(e){return t[e]}.bind(null,a));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.r(e);var o=n(0),a=n.n(o);a.a.__defineMacro("\\ce",function(t){return r(t.consumeArgs(1)[0],"ce")}),a.a.__defineMacro("\\pu",function(t){return r(t.consumeArgs(1)[0],"pu")}),a.a.__defineMacro("\\tripledash","{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}");var r=function(t,e){for(var n="",o=t[t.length-1].loc.start,a=t.length-1;a>=0;a--)t[a].loc.start>o&&(n+=" ",o=t[a].loc.start),n+=t[a].text,o+=t[a].text.length;return c.go(i.go(n,e))},i={go:function(t,e){if(!t)return[];void 0===e&&(e="ce");var n,o="0",a={};a.parenthesisLevel=0,t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var r=10,c=[];;){n!==t?(r=10,n=t):r--;var u=i.stateMachines[e],p=u.transitions[o]||u.transitions["*"];t:for(var s=0;s<p.length;s++){var _=i.patterns.match_(p[s].pattern,t);if(_){for(var d=p[s].task,m=0;m<d.action_.length;m++){var l;if(u.actions[d.action_[m].type_])l=u.actions[d.action_[m].type_](a,_.match_,d.action_[m].option);else{if(!i.actions[d.action_[m].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[m].type_+")"];l=i.actions[d.action_[m].type_](a,_.match_,d.action_[m].option)}i.concatArray(c,l)}if(o=d.nextState||o,!(t.length>0))return c;if(d.revisit||(t=_.remainder),!d.toContinue)break t}}if(r<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var n=0;n<e.length;n++)t.push(e[n]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"state of aggregation $":function(t){var e=i.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;var n=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return n?{match_:n[0],remainder:t.substr(n[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(t){return i.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return i.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return i.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(t){return i.patterns.findObserveGroups(t,"_{","","","}")},"_($...$)":function(t){return i.patterns.findObserveGroups(t,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(t){return i.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(t){return i.patterns.findObserveGroups(t,"","{","}","")},"{(...)}":function(t){return i.patterns.findObserveGroups(t,"{","","","}")},"$...$":function(t){return i.patterns.findObserveGroups(t,"","$","$","")},"${(...)}$":function(t){return i.patterns.findObserveGroups(t,"${","","","}$")},"$(...)$":function(t){return i.patterns.findObserveGroups(t,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]\/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return i.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return i.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return i.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return i.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return i.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){var e;if(e=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/))return{match_:e[0],remainder:t.substr(e[0].length)};var n=i.patterns.findObserveGroups(t,"","$","$","");return n&&(e=n.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:e[0],remainder:t.substr(e[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;var e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,n,o,a,r,i,c,u,p){var s=function(t,e){if("string"==typeof e)return 0!==t.indexOf(e)?null:e;var n=t.match(e);return n?n[0]:null},_=s(t,e);if(null===_)return null;if(t=t.substr(_.length),null===(_=s(t,n)))return null;var d=function(t,e,n){for(var o=0;e<t.length;){var a=t.charAt(e),r=s(t.substr(e),n);if(null!==r&&0===o)return{endMatchBegin:e,endMatchEnd:e+r.length};if("{"===a)o++;else if("}"===a){if(0===o)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];o--}e++}return null}(t,_.length,o||a);if(null===d)return null;var m=t.substring(0,o?d.endMatchEnd:d.endMatchBegin);if(r||i){var l=this.findObserveGroups(t.substr(d.endMatchEnd),r,i,c,u);if(null===l)return null;var f=[m,l.match_];return{match_:p?f.join(""):f,remainder:l.remainder}}return{match_:m,remainder:t.substr(d.endMatchEnd)}},match_:function(t,e){var n=i.patterns.patterns[t];if(void 0===n)throw["MhchemBugP","mhchem bug P. Please report. ("+t+")"];if("function"==typeof n)return i.patterns.patterns[t](e);var o=e.match(n);return o?{match_:o[2]?[o[1],o[2]]:o[1]?o[1]:o[0],remainder:e.substr(o[0].length)}:null}},actions:{"a=":function(t,e){t.a=(t.a||"")+e},"b=":function(t,e){t.b=(t.b||"")+e},"p=":function(t,e){t.p=(t.p||"")+e},"o=":function(t,e){t.o=(t.o||"")+e},"q=":function(t,e){t.q=(t.q||"")+e},"d=":function(t,e){t.d=(t.d||"")+e},"rm=":function(t,e){t.rm=(t.rm||"")+e},"text=":function(t,e){t.text_=(t.text_||"")+e},insert:function(t,e,n){return{type_:n}},"insert+p1":function(t,e,n){return{type_:n,p1:e}},"insert+p1+p2":function(t,e,n){return{type_:n,p1:e[0],p2:e[1]}},copy:function(t,e){return e},rm:function(t,e){return{type_:"rm",p1:e||""}},text:function(t,e){return i.go(e,"text")},"{text}":function(t,e){var n=["{"];return i.concatArray(n,i.go(e,"text")),n.push("}"),n},"tex-math":function(t,e){return i.go(e,"tex-math")},"tex-math tight":function(t,e){return i.go(e,"tex-math tight")},bond:function(t,e,n){return{type_:"bond",kind_:n||e}},"color0-output":function(t,e){return{type_:"color0",color:e[0]}},ce:function(t,e){return i.go(e)},"1/2":function(t,e){var n=[];e.match(/^[+\-]/)&&(n.push(e.substr(0,1)),e=e.substr(1));var o=e.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return o[1]=o[1].replace(/\$/g,""),n.push({type_:"frac",p1:o[1],p2:o[2]}),o[3]&&(o[3]=o[3].replace(/\$/g,""),n.push({type_:"tex-math",p1:o[3]})),n},"9,9":function(t,e){return i.go(e,"9,9")}},createTransitions:function(t){var e,n,o,a,r={};for(e in t)for(n in t[e])for(o=n.split("|"),t[e][n].stateArray=o,a=0;a<o.length;a++)r[o[a]]=[];for(e in t)for(n in t[e])for(o=t[e][n].stateArray||[],a=0;a<o.length;a++){var i=t[e][n];if(i.action_){i.action_=[].concat(i.action_);for(var c=0;c<i.action_.length;c++)"string"==typeof i.action_[c]&&(i.action_[c]={type_:i.action_[c]})}else i.action_=[];for(var u=e.split("|"),p=0;p<u.length;p++)if("*"===o[a])for(var s in r)r[s].push({pattern:u[p],task:i});else r[o[a]].push({pattern:u[p],task:i})}return r},stateMachines:{}};i.stateMachines={ce:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,e){var n;if((t.d||"").match(/^[0-9]+$/)){var o=t.d;t.d=void 0,n=this.output(t),t.b=o}else n=this.output(t);return i.actions["o="](t,e),n},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var n=[];return i.concatArray(n,this.output(t)),i.concatArray(n,i.actions.bond(t,e,"-")),n}t.d=e},"- after o/d":function(t,e,n){var o=i.patterns.match_("orbital",t.o||""),a=i.patterns.match_("one lowercase greek letter $",t.o||""),r=i.patterns.match_("one lowercase latin letter $",t.o||""),c=i.patterns.match_("$one lowercase latin letter$ $",t.o||""),u="-"===e&&(o&&""===o.remainder||a||r||c);!u||t.a||t.b||t.p||t.d||t.q||o||!r||(t.o="$"+t.o+"$");var p=[];return u?(i.concatArray(p,this.output(t)),p.push({type_:"hyphen"})):(o=i.patterns.match_("digits",t.d||""),n&&o&&""===o.remainder?(i.concatArray(p,i.actions["d="](t,e)),i.concatArray(p,this.output(t))):(i.concatArray(p,this.output(t)),i.concatArray(p,i.actions.bond(t,e,"-")))),p},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,e){return{type_:"state of aggregation",p1:i.go(e,"o")}},comma:function(t,e){var n=e.replace(/\s*$/,"");return n!==e&&0===t.parenthesisLevel?{type_:"comma enumeration L",p1:n}:{type_:"comma enumeration M",p1:n}},output:function(t,e,n){var o,a,r;t.r?(a="M"===t.rdt?i.go(t.rd,"tex-math"):"T"===t.rdt?[{type_:"text",p1:t.rd||""}]:i.go(t.rd),r="M"===t.rqt?i.go(t.rq,"tex-math"):"T"===t.rqt?[{type_:"text",p1:t.rq||""}]:i.go(t.rq),o={type_:"arrow",r:t.r,rd:a,rq:r}):(o=[],(t.a||t.b||t.p||t.o||t.q||t.d||n)&&(t.sb&&o.push({type_:"entitySkip"}),t.o||t.q||t.d||t.b||t.p||2===n?t.o||t.q||t.d||!t.b&&!t.p?t.o&&"kv"===t.dType&&i.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&"kv"===t.dType&&!t.q&&(t.dType=void 0):(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):(t.o=t.a,t.a=void 0),o.push({type_:"chemfive",a:i.go(t.a,"a"),b:i.go(t.b,"bd"),p:i.go(t.p,"pq"),o:i.go(t.o,"o"),q:i.go(t.q,"pq"),d:i.go(t.d,"oxidation"===t.dType?"oxidation":"bd"),dType:t.dType})));for(var c in t)"parenthesisLevel"!==c&&"beginsWithBond"!==c&&delete t[c];return o},"oxidation-output":function(t,e){var n=["{"];return i.concatArray(n,i.go(e,"oxidation")),n.push("}"),n},"frac-output":function(t,e){return{type_:"frac-ce",p1:i.go(e[0]),p2:i.go(e[1])}},"overset-output":function(t,e){return{type_:"overset",p1:i.go(e[0]),p2:i.go(e[1])}},"underset-output":function(t,e){return{type_:"underset",p1:i.go(e[0]),p2:i.go(e[1])}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:i.go(e[0]),p2:i.go(e[1])}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1])}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,n){return{type_:"operator",kind_:n||e}}}},a:{transitions:i.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:i.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){var e={type_:"text",p1:t.text_};for(var n in t)delete t[n];return e}}}},pq:{transitions:i.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,e){return{type_:"state of aggregation subscript",p1:i.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1],"pq")}}}},bd:{transitions:i.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1],"bd")}}}},oxidation:{transitions:i.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"tex-math tight":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"9,9":{transitions:i.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),e[1]&&(i.concatArray(n,i.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?i.concatArray(n,i.go(e[2],"pu-9,9")):n.push(e[2])),e[3]=e[4]||e[3],e[3]&&(e[3]=e[3].trim(),"e"===e[3]||"*"===e[3].substr(0,1)?n.push({type_:"cdot"}):n.push({type_:"times"}))),e[3]&&n.push("10^{"+e[5]+"}"),n},"number^":function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),i.concatArray(n,i.go(e[1],"pu-9,9")),n.push("^{"+e[2]+"}"),n},operator:function(t,e,n){return{type_:"operator",kind_:n||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,n=i.patterns.match_("{(...)}",t.d||"");n&&""===n.remainder&&(t.d=n.match_);var o=i.patterns.match_("{(...)}",t.q||"");if(o&&""===o.remainder&&(t.q=o.match_),t.d&&(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d=t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var a={d:i.go(t.d,"pu"),q:i.go(t.q,"pu")};"//"===t.o?e={type_:"pu-frac",p1:a.d,p2:a.q}:(e=a.d,a.d.length>1||a.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),i.concatArray(e,a.q))}else e=i.go(t.d,"pu-2");for(var r in t)delete t[r];return e}}},"pu-2":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var n=i.patterns.match_("{(...)}",t.rm||"");e=n&&""===n.remainder?i.go(n.match_,"pu"):{type_:"rm",p1:t.rm}}for(var o in t)delete t[o];return e}}},"pu-9,9":{transitions:i.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){var n=t.text_.length%3;0===n&&(n=3);for(var o=t.text_.length-3;o>0;o-=3)e.push(t.text_.substr(o,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,n)),e.reverse()}else e.push(t.text_);for(var a in t)delete t[a];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){for(var n=t.text_.length-3,o=0;o<n;o+=3)e.push(t.text_.substr(o,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(o))}else e.push(t.text_);for(var a in t)delete t[a];return e}}}};var c={go:function(t,e){if(!t)return"";for(var n="",o=!1,a=0;a<t.length;a++){var r=t[a];"string"==typeof r?n+=r:(n+=c._go2(r),"1st-level escape"===r.type_&&(o=!0))}return e||o||!n||(n="{"+n+"}"),n},_goInner:function(t){return t?c.go(t,!0):t},_go2:function(t){var e;switch(t.type_){case"chemfive":e="";var n={a:c._goInner(t.a),b:c._goInner(t.b),p:c._goInner(t.p),o:c._goInner(t.o),q:c._goInner(t.q),d:c._goInner(t.d)};n.a&&(n.a.match(/^[+\-]/)&&(n.a="{"+n.a+"}"),e+=n.a+"\\,"),(n.b||n.p)&&(e+="{\\vphantom{X}}",e+="^{\\hphantom{"+(n.b||"")+"}}_{\\hphantom{"+(n.p||"")+"}}",e+="{\\vphantom{X}}",e+="^{\\smash[t]{\\vphantom{2}}\\mathllap{"+(n.b||"")+"}}",e+="_{\\vphantom{2}\\mathllap{\\smash[t]{"+(n.p||"")+"}}}"),n.o&&(n.o.match(/^[+\-]/)&&(n.o="{"+n.o+"}"),e+=n.o),"kv"===t.dType?((n.d||n.q)&&(e+="{\\vphantom{X}}"),n.d&&(e+="^{"+n.d+"}"),n.q&&(e+="_{\\smash[t]{"+n.q+"}}")):"oxidation"===t.dType?(n.d&&(e+="{\\vphantom{X}}",e+="^{"+n.d+"}"),n.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+n.q+"}}")):(n.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+n.q+"}}"),n.d&&(e+="{\\vphantom{X}}",e+="^{"+n.d+"}"));break;case"rm":e="\\mathrm{"+t.p1+"}";break;case"text":t.p1.match(/[\^_]/)?(t.p1=t.p1.replace(" ","~").replace("-","\\text{-}"),e="\\mathrm{"+t.p1+"}"):e="\\text{"+t.p1+"}";break;case"roman numeral":e="\\mathrm{"+t.p1+"}";break;case"state of aggregation":e="\\mskip2mu "+c._goInner(t.p1);break;case"state of aggregation subscript":e="\\mskip1mu "+c._goInner(t.p1);break;case"bond":if(!(e=c._getBond(t.kind_)))throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+t.kind_+")"];break;case"frac":var o="\\frac{"+t.p1+"}{"+t.p2+"}";e="\\mathchoice{\\textstyle"+o+"}{"+o+"}{"+o+"}{"+o+"}";break;case"pu-frac":var a="\\frac{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";e="\\mathchoice{\\textstyle"+a+"}{"+a+"}{"+a+"}{"+a+"}";break;case"tex-math":e=t.p1+" ";break;case"frac-ce":e="\\frac{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"overset":e="\\overset{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"underset":e="\\underset{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"underbrace":e="\\underbrace{"+c._goInner(t.p1)+"}_{"+c._goInner(t.p2)+"}";break;case"color":e="{\\color{"+t.color1+"}{"+c._goInner(t.color2)+"}}";break;case"color0":e="\\color{"+t.color+"}";break;case"arrow":var r={rd:c._goInner(t.rd),rq:c._goInner(t.rq)},i="\\x"+c._getArrow(t.r);r.rq&&(i+="[{"+r.rq+"}]"),e=i+=r.rd?"{"+r.rd+"}":"{}";break;case"operator":e=c._getOperator(t.kind_);break;case"1st-level escape":e=t.p1+" ";break;case"space":e=" ";break;case"entitySkip":case"pu-space-1":e="~";break;case"pu-space-2":e="\\mkern3mu ";break;case"1000 separator":e="\\mkern2mu ";break;case"commaDecimal":e="{,}";break;case"comma enumeration L":e="{"+t.p1+"}\\mkern6mu ";break;case"comma enumeration M":e="{"+t.p1+"}\\mkern3mu ";break;case"comma enumeration S":e="{"+t.p1+"}\\mkern1mu ";break;case"hyphen":e="\\text{-}";break;case"addition compound":e="\\,{\\cdot}\\,";break;case"electron dot":e="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":e="{\\times}";break;case"prime":e="\\prime ";break;case"cdot":e="\\cdot ";break;case"tight cdot":e="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":e="\\times ";break;case"circa":e="{\\sim}";break;case"^":e="uparrow";break;case"v":e="downarrow";break;case"ellipsis":e="\\ldots ";break;case"/":e="/";break;case" / ":e="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return e},_getArrow:function(t){switch(t){case"->":case"\u2192":case"\u27f6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"\u21cc":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}}}]).default});
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("katex"));else if("function"==typeof define&&define.amd)define(["katex"],e);else{var n="object"==typeof exports?e(require("katex")):e(t.katex);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}("undefined"!=typeof self?self:this,function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var a=e[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(o,a,function(e){return t[e]}.bind(null,a));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.r(e);var o=n(0),a=n.n(o);a.a.__defineMacro("\\ce",function(t){return r(t.consumeArgs(1)[0],"ce")}),a.a.__defineMacro("\\pu",function(t){return r(t.consumeArgs(1)[0],"pu")}),a.a.__defineMacro("\\tripledash","{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}");var r=function(t,e){for(var n="",o=t[t.length-1].loc.start,a=t.length-1;a>=0;a--)t[a].loc.start>o&&(n+=" ",o=t[a].loc.start),n+=t[a].text,o+=t[a].text.length;return c.go(i.go(n,e))},i={go:function(t,e){if(!t)return[];void 0===e&&(e="ce");var n,o="0",a={};a.parenthesisLevel=0,t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var r=10,c=[];;){n!==t?(r=10,n=t):r--;var u=i.stateMachines[e],p=u.transitions[o]||u.transitions["*"];t:for(var s=0;s<p.length;s++){var _=i.patterns.match_(p[s].pattern,t);if(_){for(var d=p[s].task,m=0;m<d.action_.length;m++){var l;if(u.actions[d.action_[m].type_])l=u.actions[d.action_[m].type_](a,_.match_,d.action_[m].option);else{if(!i.actions[d.action_[m].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[m].type_+")"];l=i.actions[d.action_[m].type_](a,_.match_,d.action_[m].option)}i.concatArray(c,l)}if(o=d.nextState||o,!(t.length>0))return c;if(d.revisit||(t=_.remainder),!d.toContinue)break t}}if(r<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var n=0;n<e.length;n++)t.push(e[n]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"state of aggregation $":function(t){var e=i.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;var n=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return n?{match_:n[0],remainder:t.substr(n[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(t){return i.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return i.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return i.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(t){return i.patterns.findObserveGroups(t,"_{","","","}")},"_($...$)":function(t){return i.patterns.findObserveGroups(t,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(t){return i.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(t){return i.patterns.findObserveGroups(t,"","{","}","")},"{(...)}":function(t){return i.patterns.findObserveGroups(t,"{","","","}")},"$...$":function(t){return i.patterns.findObserveGroups(t,"","$","$","")},"${(...)}$":function(t){return i.patterns.findObserveGroups(t,"${","","","}$")},"$(...)$":function(t){return i.patterns.findObserveGroups(t,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return i.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return i.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return i.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return i.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return i.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){var e;if(e=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/))return{match_:e[0],remainder:t.substr(e[0].length)};var n=i.patterns.findObserveGroups(t,"","$","$","");return n&&(e=n.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:e[0],remainder:t.substr(e[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;var e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,n,o,a,r,i,c,u,p){var s=function(t,e){if("string"==typeof e)return 0!==t.indexOf(e)?null:e;var n=t.match(e);return n?n[0]:null},_=s(t,e);if(null===_)return null;if(t=t.substr(_.length),null===(_=s(t,n)))return null;var d=function(t,e,n){for(var o=0;e<t.length;){var a=t.charAt(e),r=s(t.substr(e),n);if(null!==r&&0===o)return{endMatchBegin:e,endMatchEnd:e+r.length};if("{"===a)o++;else if("}"===a){if(0===o)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];o--}e++}return null}(t,_.length,o||a);if(null===d)return null;var m=t.substring(0,o?d.endMatchEnd:d.endMatchBegin);if(r||i){var l=this.findObserveGroups(t.substr(d.endMatchEnd),r,i,c,u);if(null===l)return null;var f=[m,l.match_];return{match_:p?f.join(""):f,remainder:l.remainder}}return{match_:m,remainder:t.substr(d.endMatchEnd)}},match_:function(t,e){var n=i.patterns.patterns[t];if(void 0===n)throw["MhchemBugP","mhchem bug P. Please report. ("+t+")"];if("function"==typeof n)return i.patterns.patterns[t](e);var o=e.match(n);return o?{match_:o[2]?[o[1],o[2]]:o[1]?o[1]:o[0],remainder:e.substr(o[0].length)}:null}},actions:{"a=":function(t,e){t.a=(t.a||"")+e},"b=":function(t,e){t.b=(t.b||"")+e},"p=":function(t,e){t.p=(t.p||"")+e},"o=":function(t,e){t.o=(t.o||"")+e},"q=":function(t,e){t.q=(t.q||"")+e},"d=":function(t,e){t.d=(t.d||"")+e},"rm=":function(t,e){t.rm=(t.rm||"")+e},"text=":function(t,e){t.text_=(t.text_||"")+e},insert:function(t,e,n){return{type_:n}},"insert+p1":function(t,e,n){return{type_:n,p1:e}},"insert+p1+p2":function(t,e,n){return{type_:n,p1:e[0],p2:e[1]}},copy:function(t,e){return e},rm:function(t,e){return{type_:"rm",p1:e||""}},text:function(t,e){return i.go(e,"text")},"{text}":function(t,e){var n=["{"];return i.concatArray(n,i.go(e,"text")),n.push("}"),n},"tex-math":function(t,e){return i.go(e,"tex-math")},"tex-math tight":function(t,e){return i.go(e,"tex-math tight")},bond:function(t,e,n){return{type_:"bond",kind_:n||e}},"color0-output":function(t,e){return{type_:"color0",color:e[0]}},ce:function(t,e){return i.go(e)},"1/2":function(t,e){var n=[];e.match(/^[+\-]/)&&(n.push(e.substr(0,1)),e=e.substr(1));var o=e.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return o[1]=o[1].replace(/\$/g,""),n.push({type_:"frac",p1:o[1],p2:o[2]}),o[3]&&(o[3]=o[3].replace(/\$/g,""),n.push({type_:"tex-math",p1:o[3]})),n},"9,9":function(t,e){return i.go(e,"9,9")}},createTransitions:function(t){var e,n,o,a,r={};for(e in t)for(n in t[e])for(o=n.split("|"),t[e][n].stateArray=o,a=0;a<o.length;a++)r[o[a]]=[];for(e in t)for(n in t[e])for(o=t[e][n].stateArray||[],a=0;a<o.length;a++){var i=t[e][n];if(i.action_){i.action_=[].concat(i.action_);for(var c=0;c<i.action_.length;c++)"string"==typeof i.action_[c]&&(i.action_[c]={type_:i.action_[c]})}else i.action_=[];for(var u=e.split("|"),p=0;p<u.length;p++)if("*"===o[a])for(var s in r)r[s].push({pattern:u[p],task:i});else r[o[a]].push({pattern:u[p],task:i})}return r},stateMachines:{}};i.stateMachines={ce:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,e){var n;if((t.d||"").match(/^[0-9]+$/)){var o=t.d;t.d=void 0,n=this.output(t),t.b=o}else n=this.output(t);return i.actions["o="](t,e),n},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var n=[];return i.concatArray(n,this.output(t)),i.concatArray(n,i.actions.bond(t,e,"-")),n}t.d=e},"- after o/d":function(t,e,n){var o=i.patterns.match_("orbital",t.o||""),a=i.patterns.match_("one lowercase greek letter $",t.o||""),r=i.patterns.match_("one lowercase latin letter $",t.o||""),c=i.patterns.match_("$one lowercase latin letter$ $",t.o||""),u="-"===e&&(o&&""===o.remainder||a||r||c);!u||t.a||t.b||t.p||t.d||t.q||o||!r||(t.o="$"+t.o+"$");var p=[];return u?(i.concatArray(p,this.output(t)),p.push({type_:"hyphen"})):(o=i.patterns.match_("digits",t.d||""),n&&o&&""===o.remainder?(i.concatArray(p,i.actions["d="](t,e)),i.concatArray(p,this.output(t))):(i.concatArray(p,this.output(t)),i.concatArray(p,i.actions.bond(t,e,"-")))),p},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,e){return{type_:"state of aggregation",p1:i.go(e,"o")}},comma:function(t,e){var n=e.replace(/\s*$/,"");return n!==e&&0===t.parenthesisLevel?{type_:"comma enumeration L",p1:n}:{type_:"comma enumeration M",p1:n}},output:function(t,e,n){var o,a,r;t.r?(a="M"===t.rdt?i.go(t.rd,"tex-math"):"T"===t.rdt?[{type_:"text",p1:t.rd||""}]:i.go(t.rd),r="M"===t.rqt?i.go(t.rq,"tex-math"):"T"===t.rqt?[{type_:"text",p1:t.rq||""}]:i.go(t.rq),o={type_:"arrow",r:t.r,rd:a,rq:r}):(o=[],(t.a||t.b||t.p||t.o||t.q||t.d||n)&&(t.sb&&o.push({type_:"entitySkip"}),t.o||t.q||t.d||t.b||t.p||2===n?t.o||t.q||t.d||!t.b&&!t.p?t.o&&"kv"===t.dType&&i.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&"kv"===t.dType&&!t.q&&(t.dType=void 0):(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):(t.o=t.a,t.a=void 0),o.push({type_:"chemfive",a:i.go(t.a,"a"),b:i.go(t.b,"bd"),p:i.go(t.p,"pq"),o:i.go(t.o,"o"),q:i.go(t.q,"pq"),d:i.go(t.d,"oxidation"===t.dType?"oxidation":"bd"),dType:t.dType})));for(var c in t)"parenthesisLevel"!==c&&"beginsWithBond"!==c&&delete t[c];return o},"oxidation-output":function(t,e){var n=["{"];return i.concatArray(n,i.go(e,"oxidation")),n.push("}"),n},"frac-output":function(t,e){return{type_:"frac-ce",p1:i.go(e[0]),p2:i.go(e[1])}},"overset-output":function(t,e){return{type_:"overset",p1:i.go(e[0]),p2:i.go(e[1])}},"underset-output":function(t,e){return{type_:"underset",p1:i.go(e[0]),p2:i.go(e[1])}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:i.go(e[0]),p2:i.go(e[1])}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1])}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,n){return{type_:"operator",kind_:n||e}}}},a:{transitions:i.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:i.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){var e={type_:"text",p1:t.text_};for(var n in t)delete t[n];return e}}}},pq:{transitions:i.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,e){return{type_:"state of aggregation subscript",p1:i.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1],"pq")}}}},bd:{transitions:i.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1],"bd")}}}},oxidation:{transitions:i.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"tex-math tight":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"9,9":{transitions:i.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),e[1]&&(i.concatArray(n,i.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?i.concatArray(n,i.go(e[2],"pu-9,9")):n.push(e[2])),e[3]=e[4]||e[3],e[3]&&(e[3]=e[3].trim(),"e"===e[3]||"*"===e[3].substr(0,1)?n.push({type_:"cdot"}):n.push({type_:"times"}))),e[3]&&n.push("10^{"+e[5]+"}"),n},"number^":function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),i.concatArray(n,i.go(e[1],"pu-9,9")),n.push("^{"+e[2]+"}"),n},operator:function(t,e,n){return{type_:"operator",kind_:n||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,n=i.patterns.match_("{(...)}",t.d||"");n&&""===n.remainder&&(t.d=n.match_);var o=i.patterns.match_("{(...)}",t.q||"");if(o&&""===o.remainder&&(t.q=o.match_),t.d&&(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d=t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var a={d:i.go(t.d,"pu"),q:i.go(t.q,"pu")};"//"===t.o?e={type_:"pu-frac",p1:a.d,p2:a.q}:(e=a.d,a.d.length>1||a.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),i.concatArray(e,a.q))}else e=i.go(t.d,"pu-2");for(var r in t)delete t[r];return e}}},"pu-2":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var n=i.patterns.match_("{(...)}",t.rm||"");e=n&&""===n.remainder?i.go(n.match_,"pu"):{type_:"rm",p1:t.rm}}for(var o in t)delete t[o];return e}}},"pu-9,9":{transitions:i.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){var n=t.text_.length%3;0===n&&(n=3);for(var o=t.text_.length-3;o>0;o-=3)e.push(t.text_.substr(o,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,n)),e.reverse()}else e.push(t.text_);for(var a in t)delete t[a];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){for(var n=t.text_.length-3,o=0;o<n;o+=3)e.push(t.text_.substr(o,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(o))}else e.push(t.text_);for(var a in t)delete t[a];return e}}}};var c={go:function(t,e){if(!t)return"";for(var n="",o=!1,a=0;a<t.length;a++){var r=t[a];"string"==typeof r?n+=r:(n+=c._go2(r),"1st-level escape"===r.type_&&(o=!0))}return e||o||!n||(n="{"+n+"}"),n},_goInner:function(t){return t?c.go(t,!0):t},_go2:function(t){var e;switch(t.type_){case"chemfive":e="";var n={a:c._goInner(t.a),b:c._goInner(t.b),p:c._goInner(t.p),o:c._goInner(t.o),q:c._goInner(t.q),d:c._goInner(t.d)};n.a&&(n.a.match(/^[+\-]/)&&(n.a="{"+n.a+"}"),e+=n.a+"\\,"),(n.b||n.p)&&(e+="{\\vphantom{X}}",e+="^{\\hphantom{"+(n.b||"")+"}}_{\\hphantom{"+(n.p||"")+"}}",e+="{\\vphantom{X}}",e+="^{\\smash[t]{\\vphantom{2}}\\mathllap{"+(n.b||"")+"}}",e+="_{\\vphantom{2}\\mathllap{\\smash[t]{"+(n.p||"")+"}}}"),n.o&&(n.o.match(/^[+\-]/)&&(n.o="{"+n.o+"}"),e+=n.o),"kv"===t.dType?((n.d||n.q)&&(e+="{\\vphantom{X}}"),n.d&&(e+="^{"+n.d+"}"),n.q&&(e+="_{\\smash[t]{"+n.q+"}}")):"oxidation"===t.dType?(n.d&&(e+="{\\vphantom{X}}",e+="^{"+n.d+"}"),n.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+n.q+"}}")):(n.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+n.q+"}}"),n.d&&(e+="{\\vphantom{X}}",e+="^{"+n.d+"}"));break;case"rm":e="\\mathrm{"+t.p1+"}";break;case"text":t.p1.match(/[\^_]/)?(t.p1=t.p1.replace(" ","~").replace("-","\\text{-}"),e="\\mathrm{"+t.p1+"}"):e="\\text{"+t.p1+"}";break;case"roman numeral":e="\\mathrm{"+t.p1+"}";break;case"state of aggregation":e="\\mskip2mu "+c._goInner(t.p1);break;case"state of aggregation subscript":e="\\mskip1mu "+c._goInner(t.p1);break;case"bond":if(!(e=c._getBond(t.kind_)))throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+t.kind_+")"];break;case"frac":var o="\\frac{"+t.p1+"}{"+t.p2+"}";e="\\mathchoice{\\textstyle"+o+"}{"+o+"}{"+o+"}{"+o+"}";break;case"pu-frac":var a="\\frac{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";e="\\mathchoice{\\textstyle"+a+"}{"+a+"}{"+a+"}{"+a+"}";break;case"tex-math":e=t.p1+" ";break;case"frac-ce":e="\\frac{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"overset":e="\\overset{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"underset":e="\\underset{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"underbrace":e="\\underbrace{"+c._goInner(t.p1)+"}_{"+c._goInner(t.p2)+"}";break;case"color":e="{\\color{"+t.color1+"}{"+c._goInner(t.color2)+"}}";break;case"color0":e="\\color{"+t.color+"}";break;case"arrow":var r={rd:c._goInner(t.rd),rq:c._goInner(t.rq)},i="\\x"+c._getArrow(t.r);r.rq&&(i+="[{"+r.rq+"}]"),e=i+=r.rd?"{"+r.rd+"}":"{}";break;case"operator":e=c._getOperator(t.kind_);break;case"1st-level escape":e=t.p1+" ";break;case"space":e=" ";break;case"entitySkip":case"pu-space-1":e="~";break;case"pu-space-2":e="\\mkern3mu ";break;case"1000 separator":e="\\mkern2mu ";break;case"commaDecimal":e="{,}";break;case"comma enumeration L":e="{"+t.p1+"}\\mkern6mu ";break;case"comma enumeration M":e="{"+t.p1+"}\\mkern3mu ";break;case"comma enumeration S":e="{"+t.p1+"}\\mkern1mu ";break;case"hyphen":e="\\text{-}";break;case"addition compound":e="\\,{\\cdot}\\,";break;case"electron dot":e="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":e="{\\times}";break;case"prime":e="\\prime ";break;case"cdot":e="\\cdot ";break;case"tight cdot":e="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":e="\\times ";break;case"circa":e="{\\sim}";break;case"^":e="uparrow";break;case"v":e="downarrow";break;case"ellipsis":e="\\ldots ";break;case"/":e="/";break;case" / ":e="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return e},_getArrow:function(t){switch(t){case"->":case"\u2192":case"\u27f6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"\u21cc":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}}}]).default});

@@ -813,2 +813,14 @@ (function webpackUniversalModuleDefinition(root, factory) {

case "internal":
{
// internal nodes are never included in the parse tree
break;
}
case "html":
{
buildA11yStrings(tree.body, a11yStrings, atomType);
break;
}
default:

@@ -815,0 +827,0 @@ tree.type;

@@ -1,1 +0,1 @@

!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("katex"));else if("function"==typeof define&&define.amd)define(["katex"],r);else{var t="object"==typeof exports?r(require("katex")):r(e.katex);for(var a in t)("object"==typeof exports?exports:e)[a]=t[a]}}("undefined"!=typeof self?self:this,function(e){return function(e){var r={};function t(a){if(r[a])return r[a].exports;var o=r[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:a})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(a,o,function(r){return e[r]}.bind(null,o));return a},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=1)}([function(r,t){r.exports=e},function(e,r,t){"use strict";t.r(r);var a=t(0),o=t.n(a),n={"(":"left parenthesis",")":"right parenthesis","[":"open bracket","]":"close bracket","\\{":"left brace","\\}":"right brace","\\lvert":"open vertical bar","\\rvert":"close vertical bar","|":"vertical bar","\\uparrow":"up arrow","\\Uparrow":"up arrow","\\downarrow":"down arrow","\\Downarrow":"down arrow","\\updownarrow":"up down arrow","\\leftarrow":"left arrow","\\Leftarrow":"left arrow","\\rightarrow":"right arrow","\\Rightarrow":"right arrow","\\langle":"open angle","\\rangle":"close angle","\\lfloor":"open floor","\\rfloor":"close floor","\\int":"integral","\\intop":"integral","\\lim":"limit","\\ln":"natural log","\\log":"log","\\sin":"sine","\\cos":"cosine","\\tan":"tangent","\\cot":"cotangent","\\sum":"sum","/":"slash",",":"comma",".":"point","-":"negative","+":"plus","~":"tilde",":":"colon","?":"question mark","'":"apostrophe","\\%":"percent"," ":"space","\\ ":"space","\\$":"dollar sign","\\angle":"angle","\\degree":"degree","\\circ":"circle","\\vec":"vector","\\triangle":"triangle","\\pi":"pi","\\prime":"prime","\\infty":"infinity","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\omega":"omega","\\theta":"theta","\\sigma":"sigma","\\lambda":"lambda","\\tau":"tau","\\Delta":"delta","\\delta":"delta","\\mu":"mu","\\rho":"rho","\\nabla":"del","\\ell":"ell","\\ldots":"dots","\\hat":"hat","\\acute":"acute"},s={prime:"prime",degree:"degrees",circle:"degrees",2:"squared",3:"cubed"},i={"|":"open vertical bar",".":""},l={"|":"close vertical bar",".":""},c={"+":"plus","-":"minus","\\pm":"plus minus","\\cdot":"dot","*":"times","/":"divided by","\\times":"times","\\div":"divided by","\\circ":"circle","\\bullet":"bullet"},u={"=":"equals","\\approx":"approximately equals","\u2260":"does not equal","\\geq":"is greater than or equal to","\\ge":"is greater than or equal to","\\leq":"is less than or equal to","\\le":"is less than or equal to",">":"is greater than","<":"is less than","\\leftarrow":"left arrow","\\Leftarrow":"left arrow","\\rightarrow":"right arrow","\\Rightarrow":"right arrow",":":"colon"},p={"\\underleftarrow":"left arrow","\\underrightarrow":"right arrow","\\underleftrightarrow":"left-right arrow","\\undergroup":"group","\\underlinesegment":"line segment","\\utilde":"tilde"},d=function(e,r,t){var a;e&&(/^\d+$/.test(a="open"===r?e in i?i[e]:n[e]||e:"close"===r?e in l?l[e]:n[e]||e:"bin"===r?c[e]||e:"rel"===r?u[e]||e:n[e]||e)&&t.length>0&&/^\d+$/.test(t[t.length-1])?t[t.length-1]+=a:a&&t.push(a))},b=function(e,r){var t=[];e.push(t),r(t)},h=function(e,r,t){switch(e.type){case"accent":b(r,function(r){f(e.base,r,t),r.push("with"),d(e.label,"normal",r),r.push("on top")});break;case"accentUnder":b(r,function(r){f(e.base,r,t),r.push("with"),d(p[e.label],"normal",r),r.push("underneath")});break;case"accent-token":break;case"atom":var a=e.text;switch(e.family){case"bin":d(a,"bin",r);break;case"close":d(a,"close",r);break;case"inner":d(e.text,"inner",r);break;case"open":d(a,"open",r);break;case"punct":d(a,"punct",r);break;case"rel":d(a,"rel",r);break;default:throw e.family,new Error('"'+e.family+'" is not a valid atom type')}break;case"color":var o=e.color.replace(/katex-/,"");b(r,function(r){r.push("start color "+o),f(e.body,r,t),r.push("end color "+o)});break;case"color-token":break;case"delimsizing":e.delim&&"."!==e.delim&&d(e.delim,"normal",r);break;case"genfrac":b(r,function(r){var a=e.leftDelim,o=e.rightDelim;e.hasBarLine?(r.push("start fraction"),a&&d(a,"open",r),f(e.numer,r,t),r.push("divided by"),f(e.denom,r,t),o&&d(o,"close",r),r.push("end fraction")):(r.push("start binomial"),a&&d(a,"open",r),f(e.numer,r,t),r.push("over"),f(e.denom,r,t),o&&d(o,"close",r),r.push("end binomial"))});break;case"kern":break;case"leftright":b(r,function(r){d(e.left,"open",r),f(e.body,r,t),d(e.right,"close",r)});break;case"leftright-right":break;case"lap":f(e.body,r,t);break;case"mathord":d(e.text,"normal",r);break;case"op":var n=e.body,i=e.name;n?f(n,r,t):i&&d(i,"normal",r);break;case"op-token":d(e.text,t,r);break;case"ordgroup":f(e.body,r,t);break;case"overline":b(r,function(r){r.push("start overline"),f(e.body,r,t),r.push("end overline")});break;case"phantom":r.push("empty space");break;case"raisebox":f(e.body,r,t);break;case"rule":r.push("rectangle");break;case"sizing":f(e.body,r,t);break;case"spacing":r.push("space");break;case"styling":f(e.body,r,t);break;case"sqrt":b(r,function(r){var a=e.body,o=e.index;if(o)return"3"===m(f(o,[],t)).join(",")?(r.push("cube root of"),f(a,r,t),void r.push("end cube root")):(r.push("root"),r.push("start index"),f(o,r,t),void r.push("end index"));r.push("square root of"),f(a,r,t),r.push("end square root")});break;case"supsub":var l=e.base,c=e.sub,u=e.sup,h=!1;if(l&&(f(l,r,t),h="op"===l.type&&"\\log"===l.name),c){var y=h?"base":"subscript";b(r,function(e){e.push("start "+y),f(c,e,t),e.push("end "+y)})}u&&b(r,function(e){var r=m(f(u,[],t)).join(",");r in s?e.push(s[r]):(e.push("start superscript"),f(u,e,t),e.push("end superscript"))});break;case"text":if("\\textbf"===e.font){b(r,function(r){r.push("start bold text"),f(e.body,r,t),r.push("end bold text")});break}b(r,function(r){r.push("start text"),f(e.body,r,t),r.push("end text")});break;case"textord":d(e.text,t,r);break;case"smash":f(e.body,r,t);break;case"enclose":if(/cancel/.test(e.label)){b(r,function(r){r.push("start cancel"),f(e.body,r,t),r.push("end cancel")});break}if(/box/.test(e.label)){b(r,function(r){r.push("start box"),f(e.body,r,t),r.push("end box")});break}if(/sout/.test(e.label)){b(r,function(r){r.push("start strikeout"),f(e.body,r,t),r.push("end strikeout")});break}throw new Error("KaTeX-a11y: enclose node with "+e.label+" not supported yet");case"vphantom":throw new Error("KaTeX-a11y: vphantom not implemented yet");case"hphantom":throw new Error("KaTeX-a11y: hphantom not implemented yet");case"operatorname":f(e.body,r,t);break;case"array":throw new Error("KaTeX-a11y: array not implemented yet");case"raw":throw new Error("KaTeX-a11y: raw not implemented yet");case"size":break;case"url":throw new Error("KaTeX-a11y: url not implemented yet");case"tag":throw new Error("KaTeX-a11y: tag not implemented yet");case"verb":d("start verbatim","normal",r),d(e.body,"normal",r),d("end verbatim","normal",r);break;case"environment":throw new Error("KaTeX-a11y: environment not implemented yet");case"horizBrace":d("start "+e.label.slice(1),"normal",r),f(e.base,r,t),d("end "+e.label.slice(1),"normal",r);break;case"infix":break;case"includegraphics":throw new Error("KaTeX-a11y: includegraphics not implemented yet");case"font":f(e.body,r,t);break;case"href":throw new Error("KaTeX-a11y: href not implemented yet");case"cr":throw new Error("KaTeX-a11y: cr not implemented yet");case"underline":b(r,function(r){r.push("start underline"),f(e.body,r,t),r.push("end underline")});break;case"xArrow":throw new Error("KaTeX-a11y: xArrow not implemented yet");case"mclass":var g=e.mclass.slice(1);f(e.body,r,g);break;case"mathchoice":f(e.text,r,t);break;case"htmlmathml":f(e.mathml,r,t);break;case"middle":d(e.delim,t,r);break;default:throw e.type,new Error("KaTeX a11y un-recognized type: "+e.type)}},f=function e(r,t,a){if(void 0===t&&(t=[]),r instanceof Array)for(var o=0;o<r.length;o++)e(r[o],t,a);else h(r,t,a);return t},m=function e(r){var t=[];return r.forEach(function(r){r instanceof Array?t=t.concat(e(r)):t.push(r)}),t};r.default=function(e,r){var t=o.a.__parse(e,r),a=f(t,[],"normal");return m(a).join(", ")}}]).default});
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("katex"));else if("function"==typeof define&&define.amd)define(["katex"],r);else{var t="object"==typeof exports?r(require("katex")):r(e.katex);for(var a in t)("object"==typeof exports?exports:e)[a]=t[a]}}("undefined"!=typeof self?self:this,function(e){return function(e){var r={};function t(a){if(r[a])return r[a].exports;var o=r[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:a})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(a,o,function(r){return e[r]}.bind(null,o));return a},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=1)}([function(r,t){r.exports=e},function(e,r,t){"use strict";t.r(r);var a=t(0),o=t.n(a),n={"(":"left parenthesis",")":"right parenthesis","[":"open bracket","]":"close bracket","\\{":"left brace","\\}":"right brace","\\lvert":"open vertical bar","\\rvert":"close vertical bar","|":"vertical bar","\\uparrow":"up arrow","\\Uparrow":"up arrow","\\downarrow":"down arrow","\\Downarrow":"down arrow","\\updownarrow":"up down arrow","\\leftarrow":"left arrow","\\Leftarrow":"left arrow","\\rightarrow":"right arrow","\\Rightarrow":"right arrow","\\langle":"open angle","\\rangle":"close angle","\\lfloor":"open floor","\\rfloor":"close floor","\\int":"integral","\\intop":"integral","\\lim":"limit","\\ln":"natural log","\\log":"log","\\sin":"sine","\\cos":"cosine","\\tan":"tangent","\\cot":"cotangent","\\sum":"sum","/":"slash",",":"comma",".":"point","-":"negative","+":"plus","~":"tilde",":":"colon","?":"question mark","'":"apostrophe","\\%":"percent"," ":"space","\\ ":"space","\\$":"dollar sign","\\angle":"angle","\\degree":"degree","\\circ":"circle","\\vec":"vector","\\triangle":"triangle","\\pi":"pi","\\prime":"prime","\\infty":"infinity","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\omega":"omega","\\theta":"theta","\\sigma":"sigma","\\lambda":"lambda","\\tau":"tau","\\Delta":"delta","\\delta":"delta","\\mu":"mu","\\rho":"rho","\\nabla":"del","\\ell":"ell","\\ldots":"dots","\\hat":"hat","\\acute":"acute"},s={prime:"prime",degree:"degrees",circle:"degrees",2:"squared",3:"cubed"},i={"|":"open vertical bar",".":""},l={"|":"close vertical bar",".":""},c={"+":"plus","-":"minus","\\pm":"plus minus","\\cdot":"dot","*":"times","/":"divided by","\\times":"times","\\div":"divided by","\\circ":"circle","\\bullet":"bullet"},u={"=":"equals","\\approx":"approximately equals","\u2260":"does not equal","\\geq":"is greater than or equal to","\\ge":"is greater than or equal to","\\leq":"is less than or equal to","\\le":"is less than or equal to",">":"is greater than","<":"is less than","\\leftarrow":"left arrow","\\Leftarrow":"left arrow","\\rightarrow":"right arrow","\\Rightarrow":"right arrow",":":"colon"},p={"\\underleftarrow":"left arrow","\\underrightarrow":"right arrow","\\underleftrightarrow":"left-right arrow","\\undergroup":"group","\\underlinesegment":"line segment","\\utilde":"tilde"},d=function(e,r,t){var a;e&&(/^\d+$/.test(a="open"===r?e in i?i[e]:n[e]||e:"close"===r?e in l?l[e]:n[e]||e:"bin"===r?c[e]||e:"rel"===r?u[e]||e:n[e]||e)&&t.length>0&&/^\d+$/.test(t[t.length-1])?t[t.length-1]+=a:a&&t.push(a))},b=function(e,r){var t=[];e.push(t),r(t)},h=function(e,r,t){switch(e.type){case"accent":b(r,function(r){f(e.base,r,t),r.push("with"),d(e.label,"normal",r),r.push("on top")});break;case"accentUnder":b(r,function(r){f(e.base,r,t),r.push("with"),d(p[e.label],"normal",r),r.push("underneath")});break;case"accent-token":break;case"atom":var a=e.text;switch(e.family){case"bin":d(a,"bin",r);break;case"close":d(a,"close",r);break;case"inner":d(e.text,"inner",r);break;case"open":d(a,"open",r);break;case"punct":d(a,"punct",r);break;case"rel":d(a,"rel",r);break;default:throw e.family,new Error('"'+e.family+'" is not a valid atom type')}break;case"color":var o=e.color.replace(/katex-/,"");b(r,function(r){r.push("start color "+o),f(e.body,r,t),r.push("end color "+o)});break;case"color-token":break;case"delimsizing":e.delim&&"."!==e.delim&&d(e.delim,"normal",r);break;case"genfrac":b(r,function(r){var a=e.leftDelim,o=e.rightDelim;e.hasBarLine?(r.push("start fraction"),a&&d(a,"open",r),f(e.numer,r,t),r.push("divided by"),f(e.denom,r,t),o&&d(o,"close",r),r.push("end fraction")):(r.push("start binomial"),a&&d(a,"open",r),f(e.numer,r,t),r.push("over"),f(e.denom,r,t),o&&d(o,"close",r),r.push("end binomial"))});break;case"kern":break;case"leftright":b(r,function(r){d(e.left,"open",r),f(e.body,r,t),d(e.right,"close",r)});break;case"leftright-right":break;case"lap":f(e.body,r,t);break;case"mathord":d(e.text,"normal",r);break;case"op":var n=e.body,i=e.name;n?f(n,r,t):i&&d(i,"normal",r);break;case"op-token":d(e.text,t,r);break;case"ordgroup":f(e.body,r,t);break;case"overline":b(r,function(r){r.push("start overline"),f(e.body,r,t),r.push("end overline")});break;case"phantom":r.push("empty space");break;case"raisebox":f(e.body,r,t);break;case"rule":r.push("rectangle");break;case"sizing":f(e.body,r,t);break;case"spacing":r.push("space");break;case"styling":f(e.body,r,t);break;case"sqrt":b(r,function(r){var a=e.body,o=e.index;if(o)return"3"===m(f(o,[],t)).join(",")?(r.push("cube root of"),f(a,r,t),void r.push("end cube root")):(r.push("root"),r.push("start index"),f(o,r,t),void r.push("end index"));r.push("square root of"),f(a,r,t),r.push("end square root")});break;case"supsub":var l=e.base,c=e.sub,u=e.sup,h=!1;if(l&&(f(l,r,t),h="op"===l.type&&"\\log"===l.name),c){var y=h?"base":"subscript";b(r,function(e){e.push("start "+y),f(c,e,t),e.push("end "+y)})}u&&b(r,function(e){var r=m(f(u,[],t)).join(",");r in s?e.push(s[r]):(e.push("start superscript"),f(u,e,t),e.push("end superscript"))});break;case"text":if("\\textbf"===e.font){b(r,function(r){r.push("start bold text"),f(e.body,r,t),r.push("end bold text")});break}b(r,function(r){r.push("start text"),f(e.body,r,t),r.push("end text")});break;case"textord":d(e.text,t,r);break;case"smash":f(e.body,r,t);break;case"enclose":if(/cancel/.test(e.label)){b(r,function(r){r.push("start cancel"),f(e.body,r,t),r.push("end cancel")});break}if(/box/.test(e.label)){b(r,function(r){r.push("start box"),f(e.body,r,t),r.push("end box")});break}if(/sout/.test(e.label)){b(r,function(r){r.push("start strikeout"),f(e.body,r,t),r.push("end strikeout")});break}throw new Error("KaTeX-a11y: enclose node with "+e.label+" not supported yet");case"vphantom":throw new Error("KaTeX-a11y: vphantom not implemented yet");case"hphantom":throw new Error("KaTeX-a11y: hphantom not implemented yet");case"operatorname":f(e.body,r,t);break;case"array":throw new Error("KaTeX-a11y: array not implemented yet");case"raw":throw new Error("KaTeX-a11y: raw not implemented yet");case"size":break;case"url":throw new Error("KaTeX-a11y: url not implemented yet");case"tag":throw new Error("KaTeX-a11y: tag not implemented yet");case"verb":d("start verbatim","normal",r),d(e.body,"normal",r),d("end verbatim","normal",r);break;case"environment":throw new Error("KaTeX-a11y: environment not implemented yet");case"horizBrace":d("start "+e.label.slice(1),"normal",r),f(e.base,r,t),d("end "+e.label.slice(1),"normal",r);break;case"infix":break;case"includegraphics":throw new Error("KaTeX-a11y: includegraphics not implemented yet");case"font":f(e.body,r,t);break;case"href":throw new Error("KaTeX-a11y: href not implemented yet");case"cr":throw new Error("KaTeX-a11y: cr not implemented yet");case"underline":b(r,function(r){r.push("start underline"),f(e.body,r,t),r.push("end underline")});break;case"xArrow":throw new Error("KaTeX-a11y: xArrow not implemented yet");case"mclass":var g=e.mclass.slice(1);f(e.body,r,g);break;case"mathchoice":f(e.text,r,t);break;case"htmlmathml":f(e.mathml,r,t);break;case"middle":d(e.delim,t,r);break;case"internal":break;case"html":f(e.body,r,t);break;default:throw e.type,new Error("KaTeX a11y un-recognized type: "+e.type)}},f=function e(r,t,a){if(void 0===t&&(t=[]),r instanceof Array)for(var o=0;o<r.length;o++)e(r[o],t,a);else h(r,t,a);return t},m=function e(r){var t=[];return r.forEach(function(r){r instanceof Array?t=t.concat(e(r)):t.push(r)}),t};r.default=function(e,r){var t=o.a.__parse(e,r),a=f(t,[],"normal");return m(a).join(", ")}}]).default});

@@ -8,3 +8,3 @@ # [<img src="https://katex.org/img/katex-logo-black.svg" width="130" alt="KaTeX">](https://katex.org/)

[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/katex/badge?style=rounded)](https://www.jsdelivr.com/package/npm/katex)
![](https://img.badgesize.io/KaTeX/KaTeX/v0.11.1/dist/katex.min.js?compression=gzip)
![](https://img.badgesize.io/KaTeX/KaTeX/v0.12.0/dist/katex.min.js?compression=gzip)

@@ -18,3 +18,3 @@ KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.

KaTeX is compatible with all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 9–11.
KaTeX is compatible with all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 11.

@@ -34,9 +34,9 @@ KaTeX supports much (but not all) of LaTeX and many LaTeX packages. See the [list of supported functions](https://katex.org/docs/supported.html).

<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
<!-- The loading of KaTeX is deferred to speed up page rendering -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
<!-- To automatically render math in text elements, include the auto-render extension: -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>

@@ -43,0 +43,0 @@ </head>

{
"name": "katex",
"version": "0.11.1",
"version": "0.12.0",
"description": "Fast math typesetting for the web.",

@@ -31,6 +31,7 @@ "main": "dist/katex.js",

"babel-plugin-istanbul": "^5.1.1",
"babel-plugin-preval": "^3.0.1",
"babel-plugin-version-inline": "^1.0.0",
"benchmark": "^2.1.4",
"browserslist": "^4.4.1",
"caniuse-lite": "^1.0.30000938",
"browserslist": "^4.7.1",
"caniuse-lite": "^1.0.30001002",
"codecov": "^3.2.0",

@@ -79,3 +80,3 @@ "css-loader": "^3.0.0",

"scripts": {
"test": "yarn prestart && yarn test:lint && yarn test:flow && yarn test:jest",
"test": "yarn test:lint && yarn test:flow && yarn test:jest",
"test:lint": "yarn test:lint:js && yarn test:lint:css",

@@ -90,10 +91,9 @@ "test:lint:js": "eslint *.js src static test contrib dockers website",

"test:screenshots": "yarn test:screenshots:update --verify",
"test:screenshots:update": "yarn prestart && dockers/screenshotter/screenshotter.sh",
"test:perf": "yarn prestart && NODE_ENV=test node test/perf-test.js",
"test:screenshots:update": "dockers/screenshotter/screenshotter.sh",
"test:perf": "NODE_ENV=test node test/perf-test.js",
"clean": "rm -rf dist/ node_modules/",
"clean-install": "yarn clean && yarn",
"prestart": "node src/unicodeMake.js",
"start": "webpack-dev-server --hot --config webpack.dev.js",
"analyze": "webpack --config webpack.analyze.js",
"build": "yarn prestart && rimraf dist/ && mkdirp dist && cp README.md dist && rollup -c && webpack",
"build": "rimraf dist/ && mkdirp dist && cp README.md dist && rollup -c && webpack",
"watch": "yarn build --watch",

@@ -117,3 +117,3 @@ "dist": "yarn test && yarn build && yarn dist:zip",

"contrib/**/*.js",
"!src/unicodeMake.js",
"!src/unicodeSymbols.js",
"!contrib/mhchem/**"

@@ -120,0 +120,0 @@ ],

@@ -8,3 +8,3 @@ # [<img src="https://katex.org/img/katex-logo-black.svg" width="130" alt="KaTeX">](https://katex.org/)

[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/katex/badge?style=rounded)](https://www.jsdelivr.com/package/npm/katex)
![](https://img.badgesize.io/KaTeX/KaTeX/v0.11.1/dist/katex.min.js?compression=gzip)
![](https://img.badgesize.io/KaTeX/KaTeX/v0.12.0/dist/katex.min.js?compression=gzip)

@@ -18,3 +18,3 @@ KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.

KaTeX is compatible with all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 9–11.
KaTeX is compatible with all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 11.

@@ -34,9 +34,9 @@ KaTeX supports much (but not all) of LaTeX and many LaTeX packages. See the [list of supported functions](https://katex.org/docs/supported.html).

<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
<!-- The loading of KaTeX is deferred to speed up page rendering -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
<!-- To automatically render math in text elements, include the auto-render extension: -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>

@@ -43,0 +43,0 @@ </head>

@@ -11,3 +11,2 @@ // @flow

import symbols, {ligatures} from "./symbols";
import utils from "./utils";
import {wideCharacterFont} from "./wide-character";

@@ -25,9 +24,2 @@ import {calculateSize} from "./units";

// The following have to be loaded from Main-Italic font, using class mathit
const mathitLetters = [
"\\imath", "ı", // dotless i
"\\jmath", "ȷ", // dotless j
"\\pounds", "\\mathsterling", "\\textsterling", "£", // pounds symbol
];
/**

@@ -134,59 +126,2 @@ * Looks up the given symbol in fontMetrics, after applying any symbol

/**
* Determines which of the two font names (Main-Italic and Math-Italic) and
* corresponding style tags (maindefault or mathit) to use for default math font,
* depending on the symbol.
*/
const mathdefault = function(
value: string,
mode: Mode,
options: Options,
classes: string[],
): {| fontName: string, fontClass: string |} {
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(mathitLetters, value)) {
return {
fontName: "Main-Italic",
fontClass: "mathit",
};
} else {
return {
fontName: "Math-Italic",
fontClass: "mathdefault",
};
}
};
/**
* Determines which of the font names (Main-Italic, Math-Italic, and Caligraphic)
* and corresponding style tags (mathit, mathdefault, or mathcal) to use for font
* "mathnormal", depending on the symbol. Use this function instead of fontMap for
* font "mathnormal".
*/
const mathnormal = function(
value: string,
mode: Mode,
options: Options,
classes: string[],
): {| fontName: string, fontClass: string |} {
if (utils.contains(mathitLetters, value)) {
return {
fontName: "Main-Italic",
fontClass: "mathit",
};
} else if (/[0-9]/.test(value.charAt(0))) {
return {
fontName: "Caligraphic-Regular",
fontClass: "mathcal",
};
} else {
return {
fontName: "Math-Italic",
fontClass: "mathdefault",
};
}
};
/**
* Determines which of the two font names (Main-Bold and Math-BoldItalic) and

@@ -202,4 +137,6 @@ * corresponding style tags (mathbf or boldsymbol) to use for font "boldsymbol",

classes: string[],
type: "mathord" | "textord",
): {| fontName: string, fontClass: string |} {
if (lookupSymbol(value, "Math-BoldItalic", mode).metrics) {
if (type !== "textord" &&
lookupSymbol(value, "Math-BoldItalic", mode).metrics) {
return {

@@ -243,11 +180,6 @@ fontName: "Math-BoldItalic",

let fontClasses;
if (fontOrFamily === "boldsymbol" || fontOrFamily === "mathnormal") {
const fontData = fontOrFamily === "boldsymbol"
? boldsymbol(text, mode, options, classes)
: mathnormal(text, mode, options, classes);
if (fontOrFamily === "boldsymbol") {
const fontData = boldsymbol(text, mode, options, classes, type);
fontName = fontData.fontName;
fontClasses = [fontData.fontClass];
} else if (utils.contains(mathitLetters, text)) {
fontName = "Main-Italic";
fontClasses = ["mathit"];
} else if (isFont) {

@@ -279,5 +211,4 @@ fontName = fontMap[fontOrFamily].fontName;

if (type === "mathord") {
const fontLookup = mathdefault(text, mode, options, classes);
return makeSymbol(text, fontLookup.fontName, mode, options,
classes.concat([fontLookup.fontClass]));
return makeSymbol(text, "Math-Italic", mode, options,
classes.concat(["mathnormal"]));
} else if (type === "textord") {

@@ -761,9 +692,10 @@ const font = symbols[mode][text] && symbols[mode][text].font;

},
"mathnormal": {
variant: "italic",
fontName: "Math-Italic",
},
// Default math font, "mathnormal" and "boldsymbol" are missing because they
// require the use of several fonts: Main-Italic and Math-Italic for default
// math font, Main-Italic, Math-Italic, Caligraphic for "mathnormal", and
// Math-BoldItalic and Main-Bold for "boldsymbol". This is handled by a
// special case in makeOrd which ends up calling mathdefault, mathnormal,
// and boldsymbol.
// "boldsymbol" is missing because they require the use of multiple fonts:
// Math-BoldItalic and Main-Bold. This is handled by a special case in
// makeOrd which ends up calling boldsymbol.

@@ -806,2 +738,4 @@ // families

oiiintSize2: ["oiiintSize2", 1.98, 0.659],
leftParenInner: ["leftParenInner", 0.875, 0.3],
rightParenInner: ["rightParenInner", 0.875, 0.3],
};

@@ -808,0 +742,0 @@

@@ -12,5 +12,4 @@ // @flow

import buildCommon from "./buildCommon";
import {Anchor} from "./domTree";
import {Span, Anchor} from "./domTree";
import utils from "./utils";
import {checkNodeType} from "./parseNode";
import {spacings, tightSpacings} from "./spacingData";

@@ -64,3 +63,3 @@ import {_htmlGroupBuilders as groupBuilders} from "./defineFunction";

options: Options,
isRealGroup: boolean,
isRealGroup: boolean | "root",
surrounding: [?DomType, ?DomType] = [null, null],

@@ -88,7 +87,4 @@ ): HtmlDomNode[] {

if (expression.length === 1) {
const node = checkNodeType(expression[0], "sizing") ||
checkNodeType(expression[0], "styling");
if (!node) {
// No match.
} else if (node.type === "sizing") {
const node = expression[0];
if (node.type === "sizing") {
glueOptions = options.havingSize(node.size);

@@ -112,2 +108,3 @@ } else if (node.type === "styling") {

// Binary operators change to ordinary symbols in some contexts.
const isRoot = (isRealGroup === "root");
traverseNonSpaceNodes(groups, (node, prev) => {

@@ -121,3 +118,3 @@ const prevType = prev.classes[0];

}
}, {node: dummyPrev}, dummyNext);
}, {node: dummyPrev}, dummyNext, isRoot);

@@ -135,3 +132,3 @@ traverseNonSpaceNodes(groups, (node, prev) => {

}
}, {node: dummyPrev}, dummyNext);
}, {node: dummyPrev}, dummyNext, isRoot);

@@ -154,2 +151,3 @@ return groups;

next: ?HtmlDomNode,
isRoot: boolean,
) {

@@ -165,3 +163,4 @@ if (next) { // temporarily append the right node, if exists

// $FlowFixMe: make nodes a $ReadOnlyArray by returning a new array
traverseNonSpaceNodes(partialGroup.children, callback, prev);
traverseNonSpaceNodes(partialGroup.children,
callback, prev, null, isRoot);
continue;

@@ -172,17 +171,20 @@ }

// spacing should go between atoms of different classes
if (node.classes[0] === "mspace") {
continue;
const nonspace = !node.hasClass("mspace");
if (nonspace) {
const result = callback(node, prev.node);
if (result) {
if (prev.insertAfter) {
prev.insertAfter(result);
} else { // insert at front
nodes.unshift(result);
i++;
}
}
}
const result = callback(node, prev.node);
if (result) {
if (prev.insertAfter) {
prev.insertAfter(result);
} else { // insert at front
nodes.unshift(result);
i++;
}
if (nonspace) {
prev.node = node;
} else if (isRoot && node.hasClass("newline")) {
prev.node = makeSpan(["leftmost"]); // treat like beginning of line
}
prev.node = node;
prev.insertAfter = (index => n => {

@@ -201,4 +203,5 @@ nodes.splice(index + 1, 0, n);

node: HtmlDomNode,
): ?(DocumentFragment<HtmlDomNode> | Anchor) {
if (node instanceof DocumentFragment || node instanceof Anchor) {
): ?(DocumentFragment<HtmlDomNode> | Anchor | DomSpan) {
if (node instanceof DocumentFragment || node instanceof Anchor
|| (node instanceof Span && node.hasClass("enclosing"))) {
return node;

@@ -305,6 +308,2 @@ }

// falls at the depth of the expression.
// We used to have separate top and bottom struts, where the bottom strut
// would like to use `vertical-align: top`, but in IE 9 this lowers the
// baseline of the box to the bottom of this strut (instead of staying in
// the normal place) so we use an absolute value for vertical-align instead.
const strut = makeSpan(["strut"]);

@@ -331,3 +330,3 @@ strut.style.height = (body.height + body.depth) + "em";

// Build the expression contained in the tree
const expression = buildExpression(tree, options, true);
const expression = buildExpression(tree, options, "root");

@@ -334,0 +333,0 @@ const children = [];

@@ -96,3 +96,3 @@ // @flow

} else if (font === "boldsymbol") {
return "bold-italic";
return group.type === "textord" ? "bold" : "bold-italic";
} else if (font === "mathbf") {

@@ -242,2 +242,3 @@ return "bold";

options: Options,
isDisplayMode: boolean,
forMathmlOnly: boolean,

@@ -268,2 +269,5 @@ ): DomSpan {

math.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML");
if (isDisplayMode) {
math.setAttribute("display", "block");
}

@@ -270,0 +274,0 @@ // You can't style <math> nodes, so we wrap the node in a span.

@@ -42,3 +42,3 @@ // @flow

if (settings.output === "mathml") {
return buildMathML(tree, expression, options, true);
return buildMathML(tree, expression, options, settings.displayMode, true);
} else if (settings.output === "html") {

@@ -48,3 +48,4 @@ const htmlNode = buildHTML(tree, options);

} else {
const mathMLNode = buildMathML(tree, expression, options, false);
const mathMLNode = buildMathML(tree, expression, options,
settings.displayMode, false);
const htmlNode = buildHTML(tree, options);

@@ -51,0 +52,0 @@ katexNode = buildCommon.makeSpan(["katex"], [mathMLNode, htmlNode]);

// @flow
import {checkNodeType} from "./parseNode";
import type Parser from "./Parser";

@@ -231,4 +229,3 @@ import type {ParseNode, AnyParseNode, NodeType, UnsupportedCmdParseNode}

export const ordargument = function(arg: AnyParseNode): AnyParseNode[] {
const node = checkNodeType(arg, "ordgroup");
return node ? node.body : [arg];
return arg.type === "ordgroup" ? arg.body : [arg];
};

@@ -378,5 +378,16 @@ // @flow

// at a position that juts 0.005 above the bottom of the top element.
inners.push({type: "kern", size: shiftOfExtraElement});
inners.push(makeInner(repeat, font, mode));
inners.push(lap);
if ((repeat === "\u239c" || repeat === "\u239f") && repeatCount === 0) {
// Parentheses need a short repeat element in order to avoid an overrun.
// We'll make a 0.3em tall element from a SVG.
const overlap = buildCommon.svgData.leftParenInner[2] / 2;
inners.push({type: "kern", size: -overlap});
const pathName = repeat === "\u239c" ? "leftParenInner" : "rightParenInner";
const innerSpan = buildCommon.staticSvg(pathName, options);
inners.push({type: "elem", elem: innerSpan});
inners.push({type: "kern", size: -overlap});
} else {
inners.push({type: "kern", size: shiftOfExtraElement});
inners.push(makeInner(repeat, font, mode));
inners.push(lap);
}

@@ -383,0 +394,0 @@ // Add the top symbol

@@ -9,3 +9,3 @@ // @flow

import {assertNodeType, assertSymbolNodeType} from "../parseNode";
import {checkNodeType, checkSymbolNodeType} from "../parseNode";
import {checkSymbolNodeType} from "../parseNode";
import {calculateSize} from "../units";

@@ -439,3 +439,3 @@ import utils from "../utils";

if (group.cols) {
if (group.cols && group.cols.length > 0) {
// Find column alignment, column spacing, and vertical lines.

@@ -552,7 +552,6 @@ const cols = group.cols;

};
const ordgroup = checkNodeType(args[0], "ordgroup");
if (ordgroup) {
if (args[0] && args[0].type === "ordgroup") {
let arg0 = "";
for (let i = 0; i < ordgroup.body.length; i++) {
const textord = assertNodeType(ordgroup.body[i], "textord");
for (let i = 0; i < args[0].body.length; i++) {
const textord = assertNodeType(args[0].body[i], "textord");
arg0 += textord.text;

@@ -744,3 +743,3 @@ }

res = parseArray(context.parser, res, "script");
if (res.body[0].length > 1) {
if (res.body.length > 0 && res.body[0].length > 1) {
throw new ParseError("{subarray} can contain only one column");

@@ -759,2 +758,3 @@ }

// as defined in mathtools.sty.
// {rcases} is another mathtools environment. It's brace is on the right side.
defineEnvironment({

@@ -765,2 +765,4 @@ type: "array",

"dcases",
"rcases",
"drcases",
],

@@ -795,4 +797,4 @@ props: {

body: [res],
left: "\\{",
right: ".",
left: context.envName.indexOf("r") > -1 ? "." : "\\{",
right: context.envName.indexOf("r") > -1 ? "\\}" : ".",
rightColor: undefined,

@@ -799,0 +801,0 @@ };

@@ -16,2 +16,3 @@ // @flow

import "./functions/cr";
import "./functions/def";
import "./functions/delimsizing";

@@ -24,2 +25,3 @@ import "./functions/enclose";

import "./functions/href";
import "./functions/html";
import "./functions/htmlmathml";

@@ -26,0 +28,0 @@ import "./functions/includegraphics";

@@ -7,3 +7,3 @@ // @flow

import stretchy from "../stretchy";
import {assertNodeType, checkNodeType} from "../parseNode";
import {assertNodeType} from "../parseNode";
import {assertSpan, assertSymbolDomNode} from "../domTree";

@@ -24,5 +24,4 @@

const supSub: ?ParseNode<"supsub"> = checkNodeType(grp, "supsub");
let supSubGroup;
if (supSub) {
if (grp && grp.type === "supsub") {
// If our base is a character box, and we have superscripts and

@@ -37,14 +36,14 @@ // subscripts, the supsub will defer to us. In particular, we want

// The real accent group is the base of the supsub group
group = assertNodeType(supSub.base, "accent");
group = assertNodeType(grp.base, "accent");
// The character box is the base of the accent group
base = group.base;
// Stick the character box into the base of the supsub group
supSub.base = base;
grp.base = base;
// Rerender the supsub group with its new base, and store that
// result.
supSubGroup = assertSpan(html.buildGroup(supSub, options));
supSubGroup = assertSpan(html.buildGroup(grp, options));
// reset original base
supSub.base = group;
grp.base = group;
} else {

@@ -51,0 +50,0 @@ group = assertNodeType(grp, "accent");

@@ -40,4 +40,4 @@ // @flow

const vlist = buildCommon.makeVList({
positionType: "bottom",
positionData: accentBody.height + kern,
positionType: "top",
positionData: innerGroup.height,
children: [

@@ -44,0 +44,0 @@ {type: "elem", elem: accentBody, wrapperClasses: ["svg-align"]},

@@ -65,7 +65,8 @@ // @flow

return symDelim;
} else if (symDelim) {
throw new ParseError(
`Invalid delimiter '${symDelim.text}' after '${context.funcName}'`,
delim);
} else {
throw new ParseError(
"Invalid delimiter: '" +
(symDelim ? symDelim.text : JSON.stringify(delim)) +
"' after '" + context.funcName + "'", delim);
throw new ParseError(`Invalid delimiter type '${delim.type}'`, delim);
}

@@ -72,0 +73,0 @@ }

@@ -98,3 +98,3 @@ // @flow

type: "font",
names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it"],
names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it", "\\cal"],
props: {

@@ -101,0 +101,0 @@ numArgs: 0,

@@ -7,3 +7,3 @@ // @flow

import Style from "../Style";
import {assertNodeType, assertAtomFamily, checkNodeType} from "../parseNode";
import {assertNodeType} from "../parseNode";
import {assert} from "../utils";

@@ -386,14 +386,7 @@

// Look into the parse nodes to get the desired delimiters.
let leftNode = checkNodeType(args[0], "atom");
if (leftNode) {
leftNode = assertAtomFamily(args[0], "open");
}
const leftDelim = leftNode ? delimFromValue(leftNode.text) : null;
const leftDelim = args[0].type === "atom" && args[0].family === "open"
? delimFromValue(args[0].text) : null;
const rightDelim = args[1].type === "atom" && args[1].family === "close"
? delimFromValue(args[1].text) : null;
let rightNode = checkNodeType(args[1], "atom");
if (rightNode) {
rightNode = assertAtomFamily(args[1], "close");
}
const rightDelim = rightNode ? delimFromValue(rightNode.text) : null;
const barNode = assertNodeType(args[2], "size");

@@ -414,4 +407,4 @@ let hasBarLine;

let size = "auto";
let styl = checkNodeType(args[3], "ordgroup");
if (styl) {
let styl = args[3];
if (styl.type === "ordgroup") {
if (styl.body.length > 0) {

@@ -422,3 +415,3 @@ const textOrd = assertNodeType(styl.body[0], "textord");

} else {
styl = assertNodeType(args[3], "textord");
styl = assertNodeType(styl, "textord");
size = stylArray[Number(styl.text)];

@@ -425,0 +418,0 @@ }

@@ -7,3 +7,3 @@ // @flow

import Style from "../Style";
import {assertNodeType, checkNodeType} from "../parseNode";
import {assertNodeType} from "../parseNode";

@@ -24,11 +24,10 @@ import * as html from "../buildHTML";

let group: ParseNode<"horizBrace">;
const supSub = checkNodeType(grp, "supsub");
if (supSub) {
if (grp.type === "supsub") {
// Ref: LaTeX source2e: }}}}\limits}
// i.e. LaTeX treats the brace similar to an op and passes it
// with \limits, so we need to assign supsub style.
supSubGroup = supSub.sup ?
html.buildGroup(supSub.sup, options.havingStyle(style.sup()), options) :
html.buildGroup(supSub.sub, options.havingStyle(style.sub()), options);
group = assertNodeType(supSub.base, "horizBrace");
supSubGroup = grp.sup ?
html.buildGroup(grp.sup, options.havingStyle(style.sup()), options) :
html.buildGroup(grp.sub, options.havingStyle(style.sub()), options);
group = assertNodeType(grp.base, "horizBrace");
} else {

@@ -35,0 +34,0 @@ group = assertNodeType(grp, "horizBrace");

@@ -47,2 +47,3 @@ // @flow

// Otherwise, a tall argument may be misplaced.
// This code resolved issue #1153
const strut = buildCommon.makeSpan(["strut"]);

@@ -54,9 +55,5 @@ strut.style.height = (node.height + node.depth) + "em";

// Next, prevent vertical misplacement when next to something tall.
node = buildCommon.makeVList({
positionType: "firstBaseline",
children: [{type: "elem", elem: node}],
}, options);
// Get the horizontal spacing correct relative to adjacent items.
return buildCommon.makeSpan(["mord"], [node], options);
// This code resolves issue #1234
node = buildCommon.makeSpan(["thinbox"], [node], options);
return buildCommon.makeSpan(["mord", "vbox"], [node], options);
},

@@ -63,0 +60,0 @@ mathmlBuilder: (group, options) => {

@@ -10,3 +10,3 @@ // @flow

import {assembleSupSub} from "./utils/assembleSupSub";
import {assertNodeType, checkNodeType} from "../parseNode";
import {assertNodeType} from "../parseNode";

@@ -32,10 +32,9 @@ import * as html from "../buildHTML";

let group: ParseNode<"op">;
const supSub = checkNodeType(grp, "supsub");
if (supSub) {
if (grp.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 = supSub.sup;
subGroup = supSub.sub;
group = assertNodeType(supSub.base, "op");
supGroup = grp.sup;
subGroup = grp.sub;
group = assertNodeType(grp.base, "op");
hasLimits = true;

@@ -42,0 +41,0 @@ } else {

@@ -7,3 +7,3 @@ // @flow

import {assembleSupSub} from "./utils/assembleSupSub";
import {assertNodeType, checkNodeType} from "../parseNode";
import {assertNodeType} from "../parseNode";

@@ -25,10 +25,9 @@ import * as html from "../buildHTML";

let group: ParseNode<"operatorname">;
const supSub = checkNodeType(grp, "supsub");
if (supSub) {
if (grp.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 = supSub.sup;
subGroup = supSub.sub;
group = assertNodeType(supSub.base, "operatorname");
supGroup = grp.sup;
subGroup = grp.sub;
group = assertNodeType(grp.base, "operatorname");
hasLimits = true;

@@ -35,0 +34,0 @@ } else {

@@ -8,3 +8,2 @@ // @flow

import Style from "../Style";
import {checkNodeType} from "../parseNode";

@@ -201,8 +200,7 @@ import * as html from "../buildHTML";

const horizBrace = checkNodeType(group.base, "horizBrace");
if (horizBrace) {
if (group.base && group.base.type === "horizBrace") {
isSup = !!group.sup;
if (isSup === horizBrace.isOver) {
if (isSup === group.base.isOver) {
isBrace = true;
isOver = horizBrace.isOver;
isOver = group.base.isOver;
}

@@ -209,0 +207,0 @@ }

@@ -20,4 +20,2 @@ // @flow

): DomSpan => {
// 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 = buildCommon.makeSpan([], [base]);

@@ -24,0 +22,0 @@ let sub;

@@ -183,9 +183,15 @@ // @flow

* See the TeX book page 202ff. for details on how those should behave.
*
* If expandableOnly, only expandable tokens are expanded and
* an undefined control sequence results in an error.
*/
expandOnce(): Token | Token[] {
expandOnce(expandableOnly?: boolean): Token | Token[] {
const topToken = this.popToken();
const name = topToken.text;
const expansion = this._getExpansion(name);
if (expansion == null) { // mainly checking for undefined here
// Fully expanded
const expansion = !topToken.noexpand ? this._getExpansion(name) : null;
if (expansion == null || (expandableOnly && expansion.unexpandable)) {
if (expandableOnly && expansion == null &&
name[0] === "\\" && !this.isDefined(name)) {
throw new ParseError("Undefined control sequence: " + name);
}
this.pushToken(topToken);

@@ -252,3 +258,5 @@ return topToken;

// null return value couldn't get implemented as a function).
if (expanded.text === "\\relax") {
// the token after \noexpand is interpreted as if its meaning
// were ‘\relax’
if (expanded.text === "\\relax" || expanded.treatAsRelax) {
this.stack.pop();

@@ -271,12 +279,22 @@ } else {

expandMacro(name: string): Token[] | void {
if (!this.macros.get(name)) {
return undefined;
}
return this.macros.has(name)
? this.expandTokens([new Token(name)]) : undefined;
}
/**
* Fully expand the given token stream and return the resulting list of tokens
*/
expandTokens(tokens: Token[]): Token[] {
const output = [];
const oldStackLength = this.stack.length;
this.pushToken(new Token(name));
this.pushTokens(tokens);
while (this.stack.length > oldStackLength) {
const expanded = this.expandOnce();
const expanded = this.expandOnce(true); // expand only expandable tokens
// expandOnce returns Token if and only if it's fully expanded.
if (expanded instanceof Token) {
if (expanded.treatAsRelax) {
// the expansion of \noexpand is the token itself
expanded.noexpand = false;
expanded.treatAsRelax = false;
}
output.push(this.stack.pop());

@@ -348,2 +366,13 @@ }

}
/**
* Determine whether a command is expandable.
*/
isExpandable(name: string): boolean {
const macro = this.macros.get(name);
return macro != null ? typeof macro === "string"
|| typeof macro === "function" || !macro.unexpandable
// TODO(ylem): #2085
: functions.hasOwnProperty(name)/* && !functions[name].primitive*/;
}
}

@@ -8,2 +8,3 @@ // @flow

import fontMetricsData from "../submodules/katex-fonts/fontMetricsData";
import functions from "./functions";
import symbols from "./symbols";

@@ -41,2 +42,12 @@ import utils from "./utils";

/**
* Consume all following space tokens, without expansion.
*/
consumeSpaces(): void;
/**
* Expand the next token only once if possible.
*/
expandOnce(expandableOnly?: boolean): Token | Token[];
/**
* Expand the next token only once (if possible), and return the resulting

@@ -78,6 +89,15 @@ * top token on the stack (without removing anything from the stack).

isDefined(name: string): boolean;
/**
* Determine whether a command is expandable.
*/
isExpandable(name: string): boolean;
}
/** Macro tokens (in reverse order). */
export type MacroExpansion = {tokens: Token[], numArgs: number};
export type MacroExpansion = {
tokens: Token[],
numArgs: number,
unexpandable?: boolean, // used in \let
};

@@ -99,2 +119,25 @@ export type MacroDefinition = string | MacroExpansion |

defineMacro("\\noexpand", function(context) {
// The expansion is the token itself; but that token is interpreted
// as if its meaning were ‘\relax’ if it is a control sequence that
// would ordinarily be expanded by TeX’s expansion rules.
const t = context.popToken();
if (context.isExpandable(t.text)) {
t.noexpand = true;
t.treatAsRelax = true;
}
return {tokens: [t], numArgs: 0};
});
defineMacro("\\expandafter", function(context) {
// TeX first reads the token that comes immediately after \expandafter,
// without expanding it; let’s call this token t. Then TeX reads the
// token that comes after t (and possibly more tokens, if that token
// has an argument), replacing it by its expansion. Finally TeX puts
// t back in front of that expansion.
const t = context.popToken();
context.expandOnce(true); // expand only an expandable token
return {tokens: [t], numArgs: 0};
});
// LaTeX's \@firstoftwo{#1}{#2} expands to #1, skipping #2

@@ -115,6 +158,8 @@ // TeX source: \long\def\@firstoftwo#1#2{#1}

// LaTeX's \@ifnextchar{#1}{#2}{#3} looks ahead to the next (unexpanded)
// symbol. If it matches #1, then the macro expands to #2; otherwise, #3.
// Note, however, that it does not consume the next symbol in either case.
// symbol that isn't a space, consuming any spaces but not consuming the
// first nonspace character. If that nonspace character matches #1, then
// the macro expands to #2; otherwise, it expands to #3.
defineMacro("\\@ifnextchar", function(context) {
const args = context.consumeArgs(3); // symbol, if, else
context.consumeSpaces();
const nextToken = context.future();

@@ -199,55 +244,2 @@ if (args[0].length === 1 && args[0][0].text === nextToken.text) {

// Basic support for macro definitions:
// \def\macro{expansion}
// \def\macro#1{expansion}
// \def\macro#1#2{expansion}
// \def\macro#1#2#3#4#5#6#7#8#9{expansion}
// Also the \gdef and \global\def equivalents
const def = (context, global: boolean) => {
let arg = context.consumeArgs(1)[0];
if (arg.length !== 1) {
throw new ParseError("\\gdef's first argument must be a macro name");
}
const name = arg[0].text;
// Count argument specifiers, and check they are in the order #1 #2 ...
let numArgs = 0;
arg = context.consumeArgs(1)[0];
while (arg.length === 1 && arg[0].text === "#") {
arg = context.consumeArgs(1)[0];
if (arg.length !== 1) {
throw new ParseError(`Invalid argument number length "${arg.length}"`);
}
if (!(/^[1-9]$/.test(arg[0].text))) {
throw new ParseError(`Invalid argument number "${arg[0].text}"`);
}
numArgs++;
if (parseInt(arg[0].text) !== numArgs) {
throw new ParseError(`Argument number "${arg[0].text}" out of order`);
}
arg = context.consumeArgs(1)[0];
}
// Final arg is the expansion of the macro
context.macros.set(name, {
tokens: arg,
numArgs,
}, global);
return '';
};
defineMacro("\\gdef", (context) => def(context, true));
defineMacro("\\def", (context) => def(context, false));
defineMacro("\\global", (context) => {
const next = context.consumeArgs(1)[0];
if (next.length !== 1) {
throw new ParseError("Invalid command after \\global");
}
const command = next[0].text;
// TODO: Should expand command
if (command === "\\def") {
// \global\def is equivalent to \gdef
return def(context, true);
} else {
throw new ParseError(`Invalid command '${command}' after \\global`);
}
});
// \newcommand{\macro}[args]{definition}

@@ -302,2 +294,24 @@ // \renewcommand{\macro}[args]{definition}

// terminal (console) tools
defineMacro("\\message", (context) => {
const arg = context.consumeArgs(1)[0];
// eslint-disable-next-line no-console
console.log(arg.reverse().map(token => token.text).join(""));
return '';
});
defineMacro("\\errmessage", (context) => {
const arg = context.consumeArgs(1)[0];
// eslint-disable-next-line no-console
console.error(arg.reverse().map(token => token.text).join(""));
return '';
});
defineMacro("\\show", (context) => {
const tok = context.popToken();
const name = tok.text;
// eslint-disable-next-line no-console
console.log(tok, context.macros.get(name), functions[name],
symbols.math[name], symbols.text[name]);
return '';
});
//////////////////////////////////////////////////////////////////////

@@ -408,2 +422,9 @@ // Grouping

// The KaTeX fonts have corners at codepoints that don't match Unicode.
// For MathML purposes, use the Unicode code point.
defineMacro("\\ulcorner", "\\html@mathml{\\@ulcorner}{\\mathop{\\char\"231c}}");
defineMacro("\\urcorner", "\\html@mathml{\\@urcorner}{\\mathop{\\char\"231d}}");
defineMacro("\\llcorner", "\\html@mathml{\\@llcorner}{\\mathop{\\char\"231e}}");
defineMacro("\\lrcorner", "\\html@mathml{\\@lrcorner}{\\mathop{\\char\"231f}}");
//////////////////////////////////////////////////////////////////////

@@ -845,2 +866,4 @@ // LaTeX_2ε

defineMacro("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}");
defineMacro("\\imath", "\\html@mathml{\\@imath}{\u0131}");
defineMacro("\\jmath", "\\html@mathml{\\@jmath}{\u0237}");

@@ -876,2 +899,10 @@ //////////////////////////////////////////////////////////////////////

// The stmaryrd function `\minuso` provides a "Plimsoll" symbol that
// superimposes the characters \circ and \mathminus. Used in chemistry.
defineMacro("\\minuso", "\\mathbin{\\html@mathml{" +
"{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}" +
"{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}" +
"{\\char`⦵}}");
defineMacro("⦵", "\\minuso");
//////////////////////////////////////////////////////////////////////

@@ -959,2 +990,12 @@ // texvc.sty

//////////////////////////////////////////////////////////////////////
// braket.sty
// http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/braket/braket.pdf
defineMacro("\\bra", "\\mathinner{\\langle{#1}|}");
defineMacro("\\ket", "\\mathinner{|{#1}\\rangle}");
defineMacro("\\braket", "\\mathinner{\\langle{#1}\\rangle}");
defineMacro("\\Bra", "\\left\\langle#1\\right|");
defineMacro("\\Ket", "\\left|#1\\right\\rangle");
// Custom Khan Academy colors, should be moved to an optional package

@@ -961,0 +1002,0 @@ defineMacro("\\blue", "\\textcolor{##6495ed}{#1}");

@@ -273,2 +273,9 @@ // @flow

|},
"html": {|
type: "html",
mode: Mode,
loc?: ?SourceLocation,
attributes: {[string]: string},
body: AnyParseNode[],
|},
"htmlmathml": {|

@@ -299,2 +306,7 @@ type: "htmlmathml",

|},
"internal": {|
type: "internal",
mode: Mode,
loc?: ?SourceLocation,
|},
"kern": {|

@@ -446,4 +458,3 @@ type: "kern",

): ParseNode<NODETYPE> {
const typedNode = checkNodeType(node, type);
if (!typedNode) {
if (!node || node.type !== type) {
throw new Error(

@@ -453,4 +464,3 @@ `Expected node of type ${type}, but got ` +

}
// $FlowFixMe: Unsure why.
return typedNode;
return node;
}

@@ -462,54 +472,2 @@

*/
export function checkNodeType<NODETYPE: NodeType>(
node: ?AnyParseNode,
type: NODETYPE,
): ?ParseNode<NODETYPE> {
if (node && node.type === type) {
// The definition of ParseNode<TYPE> doesn't communicate to flow that
// `type: TYPE` (as that's not explicitly mentioned anywhere), though that
// happens to be true for all our value types.
// $FlowFixMe
return node;
}
return null;
}
/**
* Asserts that the node is of the given type and returns it with stricter
* typing. Throws if the node's type does not match.
*/
export function assertAtomFamily(
node: ?AnyParseNode,
family: Atom,
): ParseNode<"atom"> {
const typedNode = checkAtomFamily(node, family);
if (!typedNode) {
throw new Error(
`Expected node of type "atom" and family "${family}", but got ` +
(node ?
(node.type === "atom" ?
`atom of family ${node.family}` :
`node of type ${node.type}`) :
String(node)));
}
return typedNode;
}
/**
* Returns the node more strictly typed iff it is of the given type. Otherwise,
* returns null.
*/
export function checkAtomFamily(
node: ?AnyParseNode,
family: Atom,
): ?ParseNode<"atom"> {
return node && node.type === "atom" && node.family === family ?
node :
null;
}
/**
* Returns the node more strictly typed iff it is of the given type. Otherwise,
* returns null.
*/
export function assertSymbolNodeType(node: ?AnyParseNode): SymbolParseNode {

@@ -516,0 +474,0 @@ const typedNode = checkSymbolNodeType(node);

@@ -8,5 +8,2 @@ // @flow

import {supportedCodepoint} from "./unicodeScripts";
import unicodeAccents from "./unicodeAccents";
import unicodeSymbols from "./unicodeSymbols";
import {checkNodeType} from "./parseNode";
import ParseError from "./ParseError";

@@ -17,2 +14,7 @@ import {combiningDiacriticalMarksEndRegex} from "./Lexer";

import {Token} from "./Token";
// Pre-evaluate both modules as unicodeSymbols require String.normalize()
import unicodeAccents from /*preval*/ "./unicodeAccents";
import unicodeSymbols from /*preval*/ "./unicodeSymbols";
import type {ParseNode, AnyParseNode, SymbolParseNode, UnsupportedCmdParseNode}

@@ -120,5 +122,7 @@ from "./parseNode";

parse(): AnyParseNode[] {
// Create a group namespace for the math expression.
// (LaTeX creates a new group for every $...$, $$...$$, \[...\].)
this.gullet.beginGroup();
if (!this.settings.globalGroup) {
// Create a group namespace for the math expression.
// (LaTeX creates a new group for every $...$, $$...$$, \[...\].)
this.gullet.beginGroup();
}

@@ -139,3 +143,5 @@ // Use old \color behavior (same as LaTeX's \textcolor) if requested.

// End the group namespace for the expression
this.gullet.endGroup();
if (!this.settings.globalGroup) {
this.gullet.endGroup();
}
return parse;

@@ -188,2 +194,4 @@ }

break;
} else if (atom.type === "internal") {
continue;
}

@@ -210,11 +218,10 @@ body.push(atom);

for (let i = 0; i < body.length; i++) {
const node = checkNodeType(body[i], "infix");
if (node) {
if (body[i].type === "infix") {
if (overIndex !== -1) {
throw new ParseError(
"only one infix operator per group",
node.token);
body[i].token);
}
overIndex = i;
funcName = node.replaceWith;
funcName = body[i].replaceWith;
}

@@ -334,17 +341,14 @@ }

// We got a limit control
let opNode = checkNodeType(base, "op");
if (opNode) {
if (base && base.type === "op") {
const limits = lex.text === "\\limits";
opNode.limits = limits;
opNode.alwaysHandleSupSub = true;
base.limits = limits;
base.alwaysHandleSupSub = true;
} else if (base && base.type === "operatorname"
&& base.alwaysHandleSupSub) {
const limits = lex.text === "\\limits";
base.limits = limits;
} else {
opNode = checkNodeType(base, "operatorname");
if (opNode && opNode.alwaysHandleSupSub) {
const limits = lex.text === "\\limits";
opNode.limits = limits;
} else {
throw new ParseError(
"Limit controls must follow a math operator",
lex);
}
throw new ParseError(
"Limit controls must follow a math operator",
lex);
}

@@ -351,0 +355,0 @@ this.consume();

@@ -35,2 +35,18 @@ // @flow

|},
"\\htmlClass": {|
command: "\\htmlClass",
class: string,
|},
"\\htmlId": {|
command: "\\htmlId",
id: string,
|},
"\\htmlStyle": {|
command: "\\htmlStyle",
style: string,
|},
"\\htmlData": {|
command: "\\htmlData",
attributes: {[string]: string},
|},
};

@@ -54,2 +70,3 @@ export type AnyTrustContext = $Values<TrustContextTypes>;

maxExpand?: number;
globalGroup?: boolean;
};

@@ -81,2 +98,3 @@

maxExpand: number;
globalGroup: boolean;

@@ -102,2 +120,3 @@ constructor(options: SettingsOptions) {

this.maxExpand = Math.max(0, utils.deflt(options.maxExpand, 1000));
this.globalGroup = utils.deflt(options.globalGroup, false);
}

@@ -104,0 +123,0 @@

@@ -150,2 +150,6 @@ // @flow

export const path: {[string]: string} = {
// Two paths that cover gaps in built-up parentheses.
leftParenInner: `M291 0 H417 V300 H291 z`,
rightParenInner: `M457 0 H583 V300 H457 z`,
// The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main

@@ -152,0 +156,0 @@ doubleleftarrow: `M262 157

@@ -290,4 +290,5 @@ // @flow

defineSymbol(math, ams, textord, "\u2201", "\\complement", true);
// unicode-math maps U+F0 (ð) to \matheth. We map to AMS function \eth
// unicode-math maps U+F0 to \matheth. We map to AMS function \eth
defineSymbol(math, ams, textord, "\u00f0", "\\eth", true);
defineSymbol(text, main, textord, "\u00f0", "\u00f0");
defineSymbol(math, ams, textord, "\u2571", "\\diagup");

@@ -314,6 +315,6 @@ defineSymbol(math, ams, textord, "\u2572", "\\diagdown");

// AMS Delimiters
defineSymbol(math, ams, open, "\u250c", "\\ulcorner", true);
defineSymbol(math, ams, close, "\u2510", "\\urcorner", true);
defineSymbol(math, ams, open, "\u2514", "\\llcorner", true);
defineSymbol(math, ams, close, "\u2518", "\\lrcorner", true);
defineSymbol(math, ams, open, "\u250c", "\\@ulcorner", true);
defineSymbol(math, ams, close, "\u2510", "\\@urcorner", true);
defineSymbol(math, ams, open, "\u2514", "\\@llcorner", true);
defineSymbol(math, ams, close, "\u2518", "\\@lrcorner", true);

@@ -550,9 +551,5 @@ // AMS Binary Relations

defineSymbol(math, main, textord, "\u221a", "\\surd");
defineSymbol(math, main, open, "(", "(");
defineSymbol(math, main, open, "[", "[");
defineSymbol(math, main, open, "\u27e8", "\\langle", true);
defineSymbol(math, main, open, "\u2223", "\\lvert");
defineSymbol(math, main, open, "\u2225", "\\lVert");
defineSymbol(math, main, close, ")", ")");
defineSymbol(math, main, close, "]", "]");
defineSymbol(math, main, close, "?", "?");

@@ -564,4 +561,2 @@ defineSymbol(math, main, close, "!", "!");

defineSymbol(math, main, rel, "=", "=");
defineSymbol(math, main, rel, "<", "<");
defineSymbol(math, main, rel, ">", ">");
defineSymbol(math, main, rel, ":", ":");

@@ -573,3 +568,3 @@ defineSymbol(math, main, rel, "\u2248", "\\approx", true);

defineSymbol(math, main, rel, "\u2190", "\\gets");
defineSymbol(math, main, rel, ">", "\\gt");
defineSymbol(math, main, rel, ">", "\\gt", true);
defineSymbol(math, main, rel, "\u2208", "\\in", true);

@@ -587,3 +582,3 @@ defineSymbol(math, main, rel, "\ue020", "\\@not");

defineSymbol(math, main, rel, "\u2264", "\\leq", true);
defineSymbol(math, main, rel, "<", "\\lt");
defineSymbol(math, main, rel, "<", "\\lt", true);
defineSymbol(math, main, rel, "\u2192", "\\rightarrow", true);

@@ -599,2 +594,3 @@ defineSymbol(math, main, rel, "\u2192", "\\to");

defineSymbol(text, main, spacing, "\u00a0", "\\ ");
defineSymbol(text, main, spacing, "\u00a0", " ");
defineSymbol(text, main, spacing, "\u00a0", "~");

@@ -631,10 +627,10 @@ defineSymbol(text, main, spacing, "\u00a0", "\\space");

defineSymbol(math, main, close, "}", "\\rbrace");
defineSymbol(math, main, open, "[", "\\lbrack");
defineSymbol(text, main, textord, "[", "\\lbrack");
defineSymbol(math, main, close, "]", "\\rbrack");
defineSymbol(text, main, textord, "]", "\\rbrack");
defineSymbol(math, main, open, "(", "\\lparen");
defineSymbol(math, main, close, ")", "\\rparen");
defineSymbol(text, main, textord, "<", "\\textless"); // in T1 fontenc
defineSymbol(text, main, textord, ">", "\\textgreater"); // in T1 fontenc
defineSymbol(math, main, open, "[", "\\lbrack", true);
defineSymbol(text, main, textord, "[", "\\lbrack", true);
defineSymbol(math, main, close, "]", "\\rbrack", true);
defineSymbol(text, main, textord, "]", "\\rbrack", true);
defineSymbol(math, main, open, "(", "\\lparen", true);
defineSymbol(math, main, close, ")", "\\rparen", true);
defineSymbol(text, main, textord, "<", "\\textless", true); // in T1 fontenc
defineSymbol(text, main, textord, ">", "\\textgreater", true); // in T1 fontenc
defineSymbol(math, main, open, "\u230a", "\\lfloor", true);

@@ -647,3 +643,3 @@ defineSymbol(math, main, close, "\u230b", "\\rfloor", true);

defineSymbol(math, main, textord, "\u2223", "\\vert");
defineSymbol(text, main, textord, "|", "\\textbar"); // in T1 fontenc
defineSymbol(text, main, textord, "|", "\\textbar", true); // in T1 fontenc
defineSymbol(math, main, textord, "\u2225", "\\|");

@@ -677,4 +673,2 @@ defineSymbol(math, main, textord, "\u2225", "\\Vert");

defineSymbol(math, main, op, "\u222e", "\\oint");
defineSymbol(math, main, op, "\u222f", "\\oiint");
defineSymbol(math, main, op, "\u2230", "\\oiiint");
defineSymbol(math, main, op, "\u2a06", "\\bigsqcup");

@@ -700,4 +694,7 @@ defineSymbol(math, main, op, "\u222b", "\\smallint");

defineSymbol(math, main, accent, "\u02da", "\\mathring");
defineSymbol(math, main, mathord, "\u0131", "\\imath", true);
defineSymbol(math, main, mathord, "\u0237", "\\jmath", true);
// \imath and \jmath should be invariant to \mathrm, \mathbf, etc., so use PUA
defineSymbol(math, main, mathord, "\ue131", "\\@imath");
defineSymbol(math, main, mathord, "\ue237", "\\@jmath");
defineSymbol(math, main, textord, "\u0131", "\u0131");
defineSymbol(math, main, textord, "\u0237", "\u0237");
defineSymbol(text, main, textord, "\u0131", "\\i", true);

@@ -707,3 +704,2 @@ defineSymbol(text, main, textord, "\u0237", "\\j", true);

defineSymbol(text, main, textord, "\u00e6", "\\ae", true);
defineSymbol(text, main, textord, "\u00e6", "\\ae", true);
defineSymbol(text, main, textord, "\u0153", "\\oe", true);

@@ -735,13 +731,13 @@ defineSymbol(text, main, textord, "\u00f8", "\\o", true);

defineSymbol(text, main, textord, "\u2013", "--");
defineSymbol(text, main, textord, "\u2013", "--", true);
defineSymbol(text, main, textord, "\u2013", "\\textendash");
defineSymbol(text, main, textord, "\u2014", "---");
defineSymbol(text, main, textord, "\u2014", "---", true);
defineSymbol(text, main, textord, "\u2014", "\\textemdash");
defineSymbol(text, main, textord, "\u2018", "`");
defineSymbol(text, main, textord, "\u2018", "`", true);
defineSymbol(text, main, textord, "\u2018", "\\textquoteleft");
defineSymbol(text, main, textord, "\u2019", "'");
defineSymbol(text, main, textord, "\u2019", "'", true);
defineSymbol(text, main, textord, "\u2019", "\\textquoteright");
defineSymbol(text, main, textord, "\u201c", "``");
defineSymbol(text, main, textord, "\u201c", "``", true);
defineSymbol(text, main, textord, "\u201c", "\\textquotedblleft");
defineSymbol(text, main, textord, "\u201d", "''");
defineSymbol(text, main, textord, "\u201d", "''", true);
defineSymbol(text, main, textord, "\u201d", "\\textquotedblright");

@@ -754,14 +750,10 @@ // \degree from gensymb package

// TODO: In LaTeX, \pounds can generate a different character in text and math
// mode, but among our fonts, only Main-Italic defines this character "163".
defineSymbol(math, main, mathord, "\u00a3", "\\pounds");
defineSymbol(math, main, mathord, "\u00a3", "\\mathsterling", true);
defineSymbol(text, main, mathord, "\u00a3", "\\pounds");
defineSymbol(text, main, mathord, "\u00a3", "\\textsterling", true);
// mode, but among our fonts, only Main-Regular defines this character "163".
defineSymbol(math, main, textord, "\u00a3", "\\pounds");
defineSymbol(math, main, textord, "\u00a3", "\\mathsterling", true);
defineSymbol(text, main, textord, "\u00a3", "\\pounds");
defineSymbol(text, main, textord, "\u00a3", "\\textsterling", true);
defineSymbol(math, ams, textord, "\u2720", "\\maltese");
defineSymbol(text, ams, textord, "\u2720", "\\maltese");
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.

@@ -776,3 +768,3 @@ // All of these are textords in math mode

// All of these are textords in text mode
const textSymbols = "0123456789!@*()-=+[]<>|\";:?/.,";
const textSymbols = "0123456789!@*()-=+\";:?/.,";
for (let i = 0; i < textSymbols.length; i++) {

@@ -897,3 +889,3 @@ const ch = textSymbols.charAt(i);

// TODO(edemaine): Fix this.
export const extraLatin = "ÇÐÞçþ";
export const extraLatin = "\u00c7\u00d0\u00de\u00e7\u00fe";
for (let i = 0; i < extraLatin.length; i++) {

@@ -904,10 +896,1 @@ const ch = extraLatin.charAt(i);

}
defineSymbol(text, main, textord, "ð", "ð");
// Unicode versions of existing characters
defineSymbol(text, main, textord, "\u2013", "–");
defineSymbol(text, main, textord, "\u2014", "—");
defineSymbol(text, main, textord, "\u2018", "‘");
defineSymbol(text, main, textord, "\u2019", "’");
defineSymbol(text, main, textord, "\u201c", "“");
defineSymbol(text, main, textord, "\u201d", "”");

@@ -26,2 +26,4 @@ // @flow

loc: ?SourceLocation;
noexpand: ?boolean; // don't expand the token
treatAsRelax: ?boolean; // used in \noexpand

@@ -28,0 +30,0 @@ constructor(

// Mapping of Unicode accent characters to their LaTeX equivalent in text and
// math mode (when they exist).
export default {
// This exports a CommonJS module, allowing to be required in unicodeSymbols
// without transpiling.
module.exports = {
'\u0301': {text: "\\'", math: '\\acute'},

@@ -5,0 +7,0 @@ '\u0300': {text: '\\`', math: '\\grave'},

// @flow
// This file is GENERATED by unicodeMake.js. DO NOT MODIFY.
// This is an internal module, not part of the KaTeX distribution,
// whose purpose is to generate `unicodeSymbols` in Parser.js
// In this way, only this module, and not the distribution/browser,
// needs String's normalize function. As this file is not transpiled,
// Flow comment types syntax is used.
const accents = require('./unicodeAccents');
export default {
"\u00e1": "\u0061\u0301", // á = \'{a}
"\u00e0": "\u0061\u0300", // à = \`{a}
"\u00e4": "\u0061\u0308", // ä = \"{a}
"\u01df": "\u0061\u0308\u0304", // ǟ = \"\={a}
"\u00e3": "\u0061\u0303", // ã = \~{a}
"\u0101": "\u0061\u0304", // ā = \={a}
"\u0103": "\u0061\u0306", // ă = \u{a}
"\u1eaf": "\u0061\u0306\u0301", // ắ = \u\'{a}
"\u1eb1": "\u0061\u0306\u0300", // ằ = \u\`{a}
"\u1eb5": "\u0061\u0306\u0303", // ẵ = \u\~{a}
"\u01ce": "\u0061\u030c", // ǎ = \v{a}
"\u00e2": "\u0061\u0302", // â = \^{a}
"\u1ea5": "\u0061\u0302\u0301", // ấ = \^\'{a}
"\u1ea7": "\u0061\u0302\u0300", // ầ = \^\`{a}
"\u1eab": "\u0061\u0302\u0303", // ẫ = \^\~{a}
"\u0227": "\u0061\u0307", // ȧ = \.{a}
"\u01e1": "\u0061\u0307\u0304", // ǡ = \.\={a}
"\u00e5": "\u0061\u030a", // å = \r{a}
"\u01fb": "\u0061\u030a\u0301", // ǻ = \r\'{a}
"\u1e03": "\u0062\u0307", // ḃ = \.{b}
"\u0107": "\u0063\u0301", // ć = \'{c}
"\u010d": "\u0063\u030c", // č = \v{c}
"\u0109": "\u0063\u0302", // ĉ = \^{c}
"\u010b": "\u0063\u0307", // ċ = \.{c}
"\u010f": "\u0064\u030c", // ď = \v{d}
"\u1e0b": "\u0064\u0307", // ḋ = \.{d}
"\u00e9": "\u0065\u0301", // é = \'{e}
"\u00e8": "\u0065\u0300", // è = \`{e}
"\u00eb": "\u0065\u0308", // ë = \"{e}
"\u1ebd": "\u0065\u0303", // ẽ = \~{e}
"\u0113": "\u0065\u0304", // ē = \={e}
"\u1e17": "\u0065\u0304\u0301", // ḗ = \=\'{e}
"\u1e15": "\u0065\u0304\u0300", // ḕ = \=\`{e}
"\u0115": "\u0065\u0306", // ĕ = \u{e}
"\u011b": "\u0065\u030c", // ě = \v{e}
"\u00ea": "\u0065\u0302", // ê = \^{e}
"\u1ebf": "\u0065\u0302\u0301", // ế = \^\'{e}
"\u1ec1": "\u0065\u0302\u0300", // ề = \^\`{e}
"\u1ec5": "\u0065\u0302\u0303", // ễ = \^\~{e}
"\u0117": "\u0065\u0307", // ė = \.{e}
"\u1e1f": "\u0066\u0307", // ḟ = \.{f}
"\u01f5": "\u0067\u0301", // ǵ = \'{g}
"\u1e21": "\u0067\u0304", // ḡ = \={g}
"\u011f": "\u0067\u0306", // ğ = \u{g}
"\u01e7": "\u0067\u030c", // ǧ = \v{g}
"\u011d": "\u0067\u0302", // ĝ = \^{g}
"\u0121": "\u0067\u0307", // ġ = \.{g}
"\u1e27": "\u0068\u0308", // ḧ = \"{h}
"\u021f": "\u0068\u030c", // ȟ = \v{h}
"\u0125": "\u0068\u0302", // ĥ = \^{h}
"\u1e23": "\u0068\u0307", // ḣ = \.{h}
"\u00ed": "\u0069\u0301", // í = \'{i}
"\u00ec": "\u0069\u0300", // ì = \`{i}
"\u00ef": "\u0069\u0308", // ï = \"{i}
"\u1e2f": "\u0069\u0308\u0301", // ḯ = \"\'{i}
"\u0129": "\u0069\u0303", // ĩ = \~{i}
"\u012b": "\u0069\u0304", // ī = \={i}
"\u012d": "\u0069\u0306", // ĭ = \u{i}
"\u01d0": "\u0069\u030c", // ǐ = \v{i}
"\u00ee": "\u0069\u0302", // î = \^{i}
"\u01f0": "\u006a\u030c", // ǰ = \v{j}
"\u0135": "\u006a\u0302", // ĵ = \^{j}
"\u1e31": "\u006b\u0301", // ḱ = \'{k}
"\u01e9": "\u006b\u030c", // ǩ = \v{k}
"\u013a": "\u006c\u0301", // ĺ = \'{l}
"\u013e": "\u006c\u030c", // ľ = \v{l}
"\u1e3f": "\u006d\u0301", // ḿ = \'{m}
"\u1e41": "\u006d\u0307", // ṁ = \.{m}
"\u0144": "\u006e\u0301", // ń = \'{n}
"\u01f9": "\u006e\u0300", // ǹ = \`{n}
"\u00f1": "\u006e\u0303", // ñ = \~{n}
"\u0148": "\u006e\u030c", // ň = \v{n}
"\u1e45": "\u006e\u0307", // ṅ = \.{n}
"\u00f3": "\u006f\u0301", // ó = \'{o}
"\u00f2": "\u006f\u0300", // ò = \`{o}
"\u00f6": "\u006f\u0308", // ö = \"{o}
"\u022b": "\u006f\u0308\u0304", // ȫ = \"\={o}
"\u00f5": "\u006f\u0303", // õ = \~{o}
"\u1e4d": "\u006f\u0303\u0301", // ṍ = \~\'{o}
"\u1e4f": "\u006f\u0303\u0308", // ṏ = \~\"{o}
"\u022d": "\u006f\u0303\u0304", // ȭ = \~\={o}
"\u014d": "\u006f\u0304", // ō = \={o}
"\u1e53": "\u006f\u0304\u0301", // ṓ = \=\'{o}
"\u1e51": "\u006f\u0304\u0300", // ṑ = \=\`{o}
"\u014f": "\u006f\u0306", // ŏ = \u{o}
"\u01d2": "\u006f\u030c", // ǒ = \v{o}
"\u00f4": "\u006f\u0302", // ô = \^{o}
"\u1ed1": "\u006f\u0302\u0301", // ố = \^\'{o}
"\u1ed3": "\u006f\u0302\u0300", // ồ = \^\`{o}
"\u1ed7": "\u006f\u0302\u0303", // ỗ = \^\~{o}
"\u022f": "\u006f\u0307", // ȯ = \.{o}
"\u0231": "\u006f\u0307\u0304", // ȱ = \.\={o}
"\u0151": "\u006f\u030b", // ő = \H{o}
"\u1e55": "\u0070\u0301", // ṕ = \'{p}
"\u1e57": "\u0070\u0307", // ṗ = \.{p}
"\u0155": "\u0072\u0301", // ŕ = \'{r}
"\u0159": "\u0072\u030c", // ř = \v{r}
"\u1e59": "\u0072\u0307", // ṙ = \.{r}
"\u015b": "\u0073\u0301", // ś = \'{s}
"\u1e65": "\u0073\u0301\u0307", // ṥ = \'\.{s}
"\u0161": "\u0073\u030c", // š = \v{s}
"\u1e67": "\u0073\u030c\u0307", // ṧ = \v\.{s}
"\u015d": "\u0073\u0302", // ŝ = \^{s}
"\u1e61": "\u0073\u0307", // ṡ = \.{s}
"\u1e97": "\u0074\u0308", // ẗ = \"{t}
"\u0165": "\u0074\u030c", // ť = \v{t}
"\u1e6b": "\u0074\u0307", // ṫ = \.{t}
"\u00fa": "\u0075\u0301", // ú = \'{u}
"\u00f9": "\u0075\u0300", // ù = \`{u}
"\u00fc": "\u0075\u0308", // ü = \"{u}
"\u01d8": "\u0075\u0308\u0301", // ǘ = \"\'{u}
"\u01dc": "\u0075\u0308\u0300", // ǜ = \"\`{u}
"\u01d6": "\u0075\u0308\u0304", // ǖ = \"\={u}
"\u01da": "\u0075\u0308\u030c", // ǚ = \"\v{u}
"\u0169": "\u0075\u0303", // ũ = \~{u}
"\u1e79": "\u0075\u0303\u0301", // ṹ = \~\'{u}
"\u016b": "\u0075\u0304", // ū = \={u}
"\u1e7b": "\u0075\u0304\u0308", // ṻ = \=\"{u}
"\u016d": "\u0075\u0306", // ŭ = \u{u}
"\u01d4": "\u0075\u030c", // ǔ = \v{u}
"\u00fb": "\u0075\u0302", // û = \^{u}
"\u016f": "\u0075\u030a", // ů = \r{u}
"\u0171": "\u0075\u030b", // ű = \H{u}
"\u1e7d": "\u0076\u0303", // ṽ = \~{v}
"\u1e83": "\u0077\u0301", // ẃ = \'{w}
"\u1e81": "\u0077\u0300", // ẁ = \`{w}
"\u1e85": "\u0077\u0308", // ẅ = \"{w}
"\u0175": "\u0077\u0302", // ŵ = \^{w}
"\u1e87": "\u0077\u0307", // ẇ = \.{w}
"\u1e98": "\u0077\u030a", // ẘ = \r{w}
"\u1e8d": "\u0078\u0308", // ẍ = \"{x}
"\u1e8b": "\u0078\u0307", // ẋ = \.{x}
"\u00fd": "\u0079\u0301", // ý = \'{y}
"\u1ef3": "\u0079\u0300", // ỳ = \`{y}
"\u00ff": "\u0079\u0308", // ÿ = \"{y}
"\u1ef9": "\u0079\u0303", // ỹ = \~{y}
"\u0233": "\u0079\u0304", // ȳ = \={y}
"\u0177": "\u0079\u0302", // ŷ = \^{y}
"\u1e8f": "\u0079\u0307", // ẏ = \.{y}
"\u1e99": "\u0079\u030a", // ẙ = \r{y}
"\u017a": "\u007a\u0301", // ź = \'{z}
"\u017e": "\u007a\u030c", // ž = \v{z}
"\u1e91": "\u007a\u0302", // ẑ = \^{z}
"\u017c": "\u007a\u0307", // ż = \.{z}
"\u00c1": "\u0041\u0301", // Á = \'{A}
"\u00c0": "\u0041\u0300", // À = \`{A}
"\u00c4": "\u0041\u0308", // Ä = \"{A}
"\u01de": "\u0041\u0308\u0304", // Ǟ = \"\={A}
"\u00c3": "\u0041\u0303", // Ã = \~{A}
"\u0100": "\u0041\u0304", // Ā = \={A}
"\u0102": "\u0041\u0306", // Ă = \u{A}
"\u1eae": "\u0041\u0306\u0301", // Ắ = \u\'{A}
"\u1eb0": "\u0041\u0306\u0300", // Ằ = \u\`{A}
"\u1eb4": "\u0041\u0306\u0303", // Ẵ = \u\~{A}
"\u01cd": "\u0041\u030c", // Ǎ = \v{A}
"\u00c2": "\u0041\u0302", // Â = \^{A}
"\u1ea4": "\u0041\u0302\u0301", // Ấ = \^\'{A}
"\u1ea6": "\u0041\u0302\u0300", // Ầ = \^\`{A}
"\u1eaa": "\u0041\u0302\u0303", // Ẫ = \^\~{A}
"\u0226": "\u0041\u0307", // Ȧ = \.{A}
"\u01e0": "\u0041\u0307\u0304", // Ǡ = \.\={A}
"\u00c5": "\u0041\u030a", // Å = \r{A}
"\u01fa": "\u0041\u030a\u0301", // Ǻ = \r\'{A}
"\u1e02": "\u0042\u0307", // Ḃ = \.{B}
"\u0106": "\u0043\u0301", // Ć = \'{C}
"\u010c": "\u0043\u030c", // Č = \v{C}
"\u0108": "\u0043\u0302", // Ĉ = \^{C}
"\u010a": "\u0043\u0307", // Ċ = \.{C}
"\u010e": "\u0044\u030c", // Ď = \v{D}
"\u1e0a": "\u0044\u0307", // Ḋ = \.{D}
"\u00c9": "\u0045\u0301", // É = \'{E}
"\u00c8": "\u0045\u0300", // È = \`{E}
"\u00cb": "\u0045\u0308", // Ë = \"{E}
"\u1ebc": "\u0045\u0303", // Ẽ = \~{E}
"\u0112": "\u0045\u0304", // Ē = \={E}
"\u1e16": "\u0045\u0304\u0301", // Ḗ = \=\'{E}
"\u1e14": "\u0045\u0304\u0300", // Ḕ = \=\`{E}
"\u0114": "\u0045\u0306", // Ĕ = \u{E}
"\u011a": "\u0045\u030c", // Ě = \v{E}
"\u00ca": "\u0045\u0302", // Ê = \^{E}
"\u1ebe": "\u0045\u0302\u0301", // Ế = \^\'{E}
"\u1ec0": "\u0045\u0302\u0300", // Ề = \^\`{E}
"\u1ec4": "\u0045\u0302\u0303", // Ễ = \^\~{E}
"\u0116": "\u0045\u0307", // Ė = \.{E}
"\u1e1e": "\u0046\u0307", // Ḟ = \.{F}
"\u01f4": "\u0047\u0301", // Ǵ = \'{G}
"\u1e20": "\u0047\u0304", // Ḡ = \={G}
"\u011e": "\u0047\u0306", // Ğ = \u{G}
"\u01e6": "\u0047\u030c", // Ǧ = \v{G}
"\u011c": "\u0047\u0302", // Ĝ = \^{G}
"\u0120": "\u0047\u0307", // Ġ = \.{G}
"\u1e26": "\u0048\u0308", // Ḧ = \"{H}
"\u021e": "\u0048\u030c", // Ȟ = \v{H}
"\u0124": "\u0048\u0302", // Ĥ = \^{H}
"\u1e22": "\u0048\u0307", // Ḣ = \.{H}
"\u00cd": "\u0049\u0301", // Í = \'{I}
"\u00cc": "\u0049\u0300", // Ì = \`{I}
"\u00cf": "\u0049\u0308", // Ï = \"{I}
"\u1e2e": "\u0049\u0308\u0301", // Ḯ = \"\'{I}
"\u0128": "\u0049\u0303", // Ĩ = \~{I}
"\u012a": "\u0049\u0304", // Ī = \={I}
"\u012c": "\u0049\u0306", // Ĭ = \u{I}
"\u01cf": "\u0049\u030c", // Ǐ = \v{I}
"\u00ce": "\u0049\u0302", // Î = \^{I}
"\u0130": "\u0049\u0307", // İ = \.{I}
"\u0134": "\u004a\u0302", // Ĵ = \^{J}
"\u1e30": "\u004b\u0301", // Ḱ = \'{K}
"\u01e8": "\u004b\u030c", // Ǩ = \v{K}
"\u0139": "\u004c\u0301", // Ĺ = \'{L}
"\u013d": "\u004c\u030c", // Ľ = \v{L}
"\u1e3e": "\u004d\u0301", // Ḿ = \'{M}
"\u1e40": "\u004d\u0307", // Ṁ = \.{M}
"\u0143": "\u004e\u0301", // Ń = \'{N}
"\u01f8": "\u004e\u0300", // Ǹ = \`{N}
"\u00d1": "\u004e\u0303", // Ñ = \~{N}
"\u0147": "\u004e\u030c", // Ň = \v{N}
"\u1e44": "\u004e\u0307", // Ṅ = \.{N}
"\u00d3": "\u004f\u0301", // Ó = \'{O}
"\u00d2": "\u004f\u0300", // Ò = \`{O}
"\u00d6": "\u004f\u0308", // Ö = \"{O}
"\u022a": "\u004f\u0308\u0304", // Ȫ = \"\={O}
"\u00d5": "\u004f\u0303", // Õ = \~{O}
"\u1e4c": "\u004f\u0303\u0301", // Ṍ = \~\'{O}
"\u1e4e": "\u004f\u0303\u0308", // Ṏ = \~\"{O}
"\u022c": "\u004f\u0303\u0304", // Ȭ = \~\={O}
"\u014c": "\u004f\u0304", // Ō = \={O}
"\u1e52": "\u004f\u0304\u0301", // Ṓ = \=\'{O}
"\u1e50": "\u004f\u0304\u0300", // Ṑ = \=\`{O}
"\u014e": "\u004f\u0306", // Ŏ = \u{O}
"\u01d1": "\u004f\u030c", // Ǒ = \v{O}
"\u00d4": "\u004f\u0302", // Ô = \^{O}
"\u1ed0": "\u004f\u0302\u0301", // Ố = \^\'{O}
"\u1ed2": "\u004f\u0302\u0300", // Ồ = \^\`{O}
"\u1ed6": "\u004f\u0302\u0303", // Ỗ = \^\~{O}
"\u022e": "\u004f\u0307", // Ȯ = \.{O}
"\u0230": "\u004f\u0307\u0304", // Ȱ = \.\={O}
"\u0150": "\u004f\u030b", // Ő = \H{O}
"\u1e54": "\u0050\u0301", // Ṕ = \'{P}
"\u1e56": "\u0050\u0307", // Ṗ = \.{P}
"\u0154": "\u0052\u0301", // Ŕ = \'{R}
"\u0158": "\u0052\u030c", // Ř = \v{R}
"\u1e58": "\u0052\u0307", // Ṙ = \.{R}
"\u015a": "\u0053\u0301", // Ś = \'{S}
"\u1e64": "\u0053\u0301\u0307", // Ṥ = \'\.{S}
"\u0160": "\u0053\u030c", // Š = \v{S}
"\u1e66": "\u0053\u030c\u0307", // Ṧ = \v\.{S}
"\u015c": "\u0053\u0302", // Ŝ = \^{S}
"\u1e60": "\u0053\u0307", // Ṡ = \.{S}
"\u0164": "\u0054\u030c", // Ť = \v{T}
"\u1e6a": "\u0054\u0307", // Ṫ = \.{T}
"\u00da": "\u0055\u0301", // Ú = \'{U}
"\u00d9": "\u0055\u0300", // Ù = \`{U}
"\u00dc": "\u0055\u0308", // Ü = \"{U}
"\u01d7": "\u0055\u0308\u0301", // Ǘ = \"\'{U}
"\u01db": "\u0055\u0308\u0300", // Ǜ = \"\`{U}
"\u01d5": "\u0055\u0308\u0304", // Ǖ = \"\={U}
"\u01d9": "\u0055\u0308\u030c", // Ǚ = \"\v{U}
"\u0168": "\u0055\u0303", // Ũ = \~{U}
"\u1e78": "\u0055\u0303\u0301", // Ṹ = \~\'{U}
"\u016a": "\u0055\u0304", // Ū = \={U}
"\u1e7a": "\u0055\u0304\u0308", // Ṻ = \=\"{U}
"\u016c": "\u0055\u0306", // Ŭ = \u{U}
"\u01d3": "\u0055\u030c", // Ǔ = \v{U}
"\u00db": "\u0055\u0302", // Û = \^{U}
"\u016e": "\u0055\u030a", // Ů = \r{U}
"\u0170": "\u0055\u030b", // Ű = \H{U}
"\u1e7c": "\u0056\u0303", // Ṽ = \~{V}
"\u1e82": "\u0057\u0301", // Ẃ = \'{W}
"\u1e80": "\u0057\u0300", // Ẁ = \`{W}
"\u1e84": "\u0057\u0308", // Ẅ = \"{W}
"\u0174": "\u0057\u0302", // Ŵ = \^{W}
"\u1e86": "\u0057\u0307", // Ẇ = \.{W}
"\u1e8c": "\u0058\u0308", // Ẍ = \"{X}
"\u1e8a": "\u0058\u0307", // Ẋ = \.{X}
"\u00dd": "\u0059\u0301", // Ý = \'{Y}
"\u1ef2": "\u0059\u0300", // Ỳ = \`{Y}
"\u0178": "\u0059\u0308", // Ÿ = \"{Y}
"\u1ef8": "\u0059\u0303", // Ỹ = \~{Y}
"\u0232": "\u0059\u0304", // Ȳ = \={Y}
"\u0176": "\u0059\u0302", // Ŷ = \^{Y}
"\u1e8e": "\u0059\u0307", // Ẏ = \.{Y}
"\u0179": "\u005a\u0301", // Ź = \'{Z}
"\u017d": "\u005a\u030c", // Ž = \v{Z}
"\u1e90": "\u005a\u0302", // Ẑ = \^{Z}
"\u017b": "\u005a\u0307", // Ż = \.{Z}
"\u03ac": "\u03b1\u0301", // ά = \'{α}
"\u1f70": "\u03b1\u0300", // ὰ = \`{α}
"\u1fb1": "\u03b1\u0304", // ᾱ = \={α}
"\u1fb0": "\u03b1\u0306", // ᾰ = \u{α}
"\u03ad": "\u03b5\u0301", // έ = \'{ε}
"\u1f72": "\u03b5\u0300", // ὲ = \`{ε}
"\u03ae": "\u03b7\u0301", // ή = \'{η}
"\u1f74": "\u03b7\u0300", // ὴ = \`{η}
"\u03af": "\u03b9\u0301", // ί = \'{ι}
"\u1f76": "\u03b9\u0300", // ὶ = \`{ι}
"\u03ca": "\u03b9\u0308", // ϊ = \"{ι}
"\u0390": "\u03b9\u0308\u0301", // ΐ = \"\'{ι}
"\u1fd2": "\u03b9\u0308\u0300", // ῒ = \"\`{ι}
"\u1fd1": "\u03b9\u0304", // ῑ = \={ι}
"\u1fd0": "\u03b9\u0306", // ῐ = \u{ι}
"\u03cc": "\u03bf\u0301", // ό = \'{ο}
"\u1f78": "\u03bf\u0300", // ὸ = \`{ο}
"\u03cd": "\u03c5\u0301", // ύ = \'{υ}
"\u1f7a": "\u03c5\u0300", // ὺ = \`{υ}
"\u03cb": "\u03c5\u0308", // ϋ = \"{υ}
"\u03b0": "\u03c5\u0308\u0301", // ΰ = \"\'{υ}
"\u1fe2": "\u03c5\u0308\u0300", // ῢ = \"\`{υ}
"\u1fe1": "\u03c5\u0304", // ῡ = \={υ}
"\u1fe0": "\u03c5\u0306", // ῠ = \u{υ}
"\u03ce": "\u03c9\u0301", // ώ = \'{ω}
"\u1f7c": "\u03c9\u0300", // ὼ = \`{ω}
"\u038e": "\u03a5\u0301", // Ύ = \'{Υ}
"\u1fea": "\u03a5\u0300", // Ὺ = \`{Υ}
"\u03ab": "\u03a5\u0308", // Ϋ = \"{Υ}
"\u1fe9": "\u03a5\u0304", // Ῡ = \={Υ}
"\u1fe8": "\u03a5\u0306", // Ῠ = \u{Υ}
"\u038f": "\u03a9\u0301", // Ώ = \'{Ω}
"\u1ffa": "\u03a9\u0300", // Ὼ = \`{Ω}
};
const result /*: {[string]: string}*/ = {};
const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" +
"αβγδεϵζηθϑικλμνξοπϖρϱςστυφϕχψωΓΔΘΛΞΠΣΥΦΨΩ";
for (const letter of letters) {
for (const accent of Object.getOwnPropertyNames(accents)) {
const combined = letter + accent;
const normalized = combined.normalize('NFC');
if (normalized.length === 1) {
result[normalized] = combined;
}
for (const accent2 of Object.getOwnPropertyNames(accents)) {
if (accent === accent2) {
continue;
}
const combined2 = combined + accent2;
const normalized2 = combined2.normalize('NFC');
if (normalized2.length === 1) {
result[normalized2] = combined2;
}
}
}
}
module.exports = result;

@@ -28,4 +28,4 @@ // @flow

["mathdefault", "textit", "Math-Italic"], // A-Z italic
["mathdefault", "textit", "Math-Italic"], // a-z italic
["mathnormal", "textit", "Math-Italic"], // A-Z italic
["mathnormal", "textit", "Math-Italic"], // a-z italic

@@ -32,0 +32,0 @@ ["boldsymbol", "boldsymbol", "Main-BoldItalic"], // A-Z bold italic

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc