mathjax
Version:
Beautiful and accessible math in all browsers. MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all browsers. This package includes the packaged components (install mathjax-full to get the source
1 lines • 1.9 MB
JavaScript
!function(){"use strict";var t={351:function(t,e,r){var Q,n=this&&this.__extends||(Q=function(t,e){return(Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Q(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),T=this&&this.__assign||function(){return(T=Object.assign||function(t){for(var e,r=1,Q=arguments.length;r<Q;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var Q,n,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(Q=T.next()).done;)o.push(Q.value)}catch(t){n={error:t}}finally{try{Q&&!Q.done&&(r=T.return)&&r.call(T)}finally{if(n)throw n.error}}return o},i=this&&this.__spreadArray||function(t,e){for(var r=0,Q=e.length,n=t.length;r<Q;r++,n++)t[n]=e[r];return t},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],Q=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&Q>=t.length&&(t=void 0),{value:t&&t[Q++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AssistiveMmlHandler=e.AssistiveMmlMathDocumentMixin=e.AssistiveMmlMathItemMixin=e.LimitedMmlVisitor=void 0;var s=r(4474),l=r(9259),c=r(7233),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getAttributes=function(e){return t.prototype.getAttributes.call(this,e).replace(/ ?id=".*?"/,"")},e}(l.SerializedMmlVisitor);function p(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.assistiveMml=function(t,e){if(void 0===e&&(e=!1),!(this.state()>=s.STATE.ASSISTIVEMML)){if(!this.isEscaped&&(t.options.enableAssistiveMml||e)){var r=t.adaptor,Q=t.toMML(this.root).replace(/\n */g,"").replace(/<!--.*?-->/g,""),n=r.firstChild(r.body(r.parse(Q,"text/html"))),T=r.node("mjx-assistive-mml",{unselectable:"on",display:this.display?"block":"inline"},[n]);r.setAttribute(r.firstChild(this.typesetRoot),"aria-hidden","true"),r.setStyle(this.typesetRoot,"position","relative"),r.append(this.typesetRoot,T)}this.state(s.STATE.ASSISTIVEMML)}},e}(t)}function h(t){var e;return(e=function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var Q=t.apply(this,i([],o(e)))||this,n=Q.constructor,T=n.ProcessBits;return T.has("assistive-mml")||T.allocate("assistive-mml"),Q.visitor=new u(Q.mmlFactory),Q.options.MathItem=p(Q.options.MathItem),"addStyles"in Q&&Q.addStyles(n.assistiveStyles),Q}return n(e,t),e.prototype.toMML=function(t){return this.visitor.visitTree(t)},e.prototype.assistiveMml=function(){var t,e;if(!this.processed.isSet("assistive-mml")){try{for(var r=a(this.math),Q=r.next();!Q.done;Q=r.next()){Q.value.assistiveMml(this)}}catch(e){t={error:e}}finally{try{Q&&!Q.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.processed.set("assistive-mml")}return this},e.prototype.state=function(e,r){return void 0===r&&(r=!1),t.prototype.state.call(this,e,r),e<s.STATE.ASSISTIVEMML&&this.processed.clear("assistive-mml"),this},e}(t)).OPTIONS=T(T({},t.OPTIONS),{enableAssistiveMml:!0,renderActions:c.expandable(T(T({},t.OPTIONS.renderActions),{assistiveMml:[s.STATE.ASSISTIVEMML]}))}),e.assistiveStyles={"mjx-assistive-mml":{position:"absolute !important",top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)",padding:"1px 0px 0px 0px !important",border:"0px !important",display:"block !important",width:"auto !important",overflow:"hidden !important","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},'mjx-assistive-mml[display="block"]':{width:"100% !important"}},e}e.LimitedMmlVisitor=u,s.newState("ASSISTIVEMML",153),e.AssistiveMmlMathItemMixin=p,e.AssistiveMmlMathDocumentMixin=h,e.AssistiveMmlHandler=function(t){return t.documentClass=h(t.documentClass),t}},444:function(t,e,r){var Q,n=this&&this.__extends||(Q=function(t,e){return(Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Q(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),T=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],Q=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&Q>=t.length&&(t=void 0),{value:t&&t[Q++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLAdaptor=void 0;var o=function(t){function e(e){var r=t.call(this,e.document)||this;return r.window=e,r.parser=new e.DOMParser,r}return n(e,t),e.prototype.parse=function(t,e){return void 0===e&&(e="text/html"),this.parser.parseFromString(t,e)},e.prototype.create=function(t,e){return e?this.document.createElementNS(e,t):this.document.createElement(t)},e.prototype.text=function(t){return this.document.createTextNode(t)},e.prototype.head=function(t){return t.head},e.prototype.body=function(t){return t.body},e.prototype.root=function(t){return t.documentElement},e.prototype.doctype=function(t){return t.doctype?"<!DOCTYPE "+t.doctype.name+">":""},e.prototype.tags=function(t,e,r){void 0===r&&(r=null);var Q=r?t.getElementsByTagNameNS(r,e):t.getElementsByTagName(e);return Array.from(Q)},e.prototype.getElements=function(t,e){var r,Q,n=[];try{for(var o=T(t),i=o.next();!i.done;i=o.next()){var a=i.value;"string"==typeof a?n=n.concat(Array.from(this.document.querySelectorAll(a))):Array.isArray(a)||a instanceof this.window.NodeList||a instanceof this.window.HTMLCollection?n=n.concat(Array.from(a)):n.push(a)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(Q=o.return)&&Q.call(o)}finally{if(r)throw r.error}}return n},e.prototype.contains=function(t,e){return t.contains(e)},e.prototype.parent=function(t){return t.parentNode},e.prototype.append=function(t,e){return t.appendChild(e)},e.prototype.insert=function(t,e){return this.parent(e).insertBefore(t,e)},e.prototype.remove=function(t){return this.parent(t).removeChild(t)},e.prototype.replace=function(t,e){return this.parent(e).replaceChild(t,e)},e.prototype.clone=function(t){return t.cloneNode(!0)},e.prototype.split=function(t,e){return t.splitText(e)},e.prototype.next=function(t){return t.nextSibling},e.prototype.previous=function(t){return t.previousSibling},e.prototype.firstChild=function(t){return t.firstChild},e.prototype.lastChild=function(t){return t.lastChild},e.prototype.childNodes=function(t){return Array.from(t.childNodes)},e.prototype.childNode=function(t,e){return t.childNodes[e]},e.prototype.kind=function(t){var e=t.nodeType;return 1===e||3===e||8===e?t.nodeName.toLowerCase():""},e.prototype.value=function(t){return t.nodeValue||""},e.prototype.textContent=function(t){return t.textContent},e.prototype.innerHTML=function(t){return t.innerHTML},e.prototype.outerHTML=function(t){return t.outerHTML},e.prototype.serializeXML=function(t){return(new this.window.XMLSerializer).serializeToString(t)},e.prototype.setAttribute=function(t,e,r,Q){return void 0===Q&&(Q=null),Q?(e=Q.replace(/.*\//,"")+":"+e.replace(/^.*:/,""),t.setAttributeNS(Q,e,r)):t.setAttribute(e,r)},e.prototype.getAttribute=function(t,e){return t.getAttribute(e)},e.prototype.removeAttribute=function(t,e){return t.removeAttribute(e)},e.prototype.hasAttribute=function(t,e){return t.hasAttribute(e)},e.prototype.allAttributes=function(t){return Array.from(t.attributes).map((function(t){return{name:t.name,value:t.value}}))},e.prototype.addClass=function(t,e){t.classList?t.classList.add(e):t.className=(t.className+" "+e).trim()},e.prototype.removeClass=function(t,e){t.classList?t.classList.remove(e):t.className=t.className.split(/ /).filter((function(t){return t!==e})).join(" ")},e.prototype.hasClass=function(t,e){return t.classList?t.classList.contains(e):t.className.split(/ /).indexOf(e)>=0},e.prototype.setStyle=function(t,e,r){t.style[e]=r},e.prototype.getStyle=function(t,e){return t.style[e]},e.prototype.allStyles=function(t){return t.style.cssText},e.prototype.insertRules=function(t,e){var r,Q;try{for(var n=T(e.reverse()),o=n.next();!o.done;o=n.next()){var i=o.value;try{t.sheet.insertRule(i,0)}catch(t){console.warn("MathJax: can't insert css rule '"+i+"': "+t.message)}}}catch(t){r={error:t}}finally{try{o&&!o.done&&(Q=n.return)&&Q.call(n)}finally{if(r)throw r.error}}},e.prototype.fontSize=function(t){var e=this.window.getComputedStyle(t);return parseFloat(e.fontSize)},e.prototype.fontFamily=function(t){return this.window.getComputedStyle(t).fontFamily||""},e.prototype.nodeSize=function(t,e,r){if(void 0===e&&(e=1),void 0===r&&(r=!1),r&&t.getBBox){var Q=t.getBBox();return[Q.width/e,Q.height/e]}return[t.offsetWidth/e,t.offsetHeight/e]},e.prototype.nodeBBox=function(t){var e=t.getBoundingClientRect();return{left:e.left,right:e.right,top:e.top,bottom:e.bottom}},e}(r(5009).AbstractDOMAdaptor);e.HTMLAdaptor=o},6191:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.browserAdaptor=void 0;var Q=r(444);e.browserAdaptor=function(){return new Q.HTMLAdaptor(window)}},9515:function(t,e,r){var Q=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],Q=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&Q>=t.length&&(t=void 0),{value:t&&t[Q++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function n(t){return"object"==typeof t&&null!==t}function T(t,e){var r,o;try{for(var i=Q(Object.keys(e)),a=i.next();!a.done;a=i.next()){var s=a.value;"__esModule"!==s&&(!n(t[s])||!n(e[s])||e[s]instanceof Promise?null!==e[s]&&void 0!==e[s]&&(t[s]=e[s]):T(t[s],e[s]))}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return t}Object.defineProperty(e,"__esModule",{value:!0}),e.MathJax=e.combineWithMathJax=e.combineDefaults=e.combineConfig=e.isObject=void 0,e.isObject=n,e.combineConfig=T,e.combineDefaults=function t(e,r,T){var o,i;e[r]||(e[r]={}),e=e[r];try{for(var a=Q(Object.keys(T)),s=a.next();!s.done;s=a.next()){var l=s.value;n(e[l])&&n(T[l])?t(e,l,T[l]):null==e[l]&&null!=T[l]&&(e[l]=T[l])}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return e},e.combineWithMathJax=function(t){return T(e.MathJax,t)},void 0===r.g.MathJax&&(r.g.MathJax={}),r.g.MathJax.version||(r.g.MathJax={version:"3.2.0",_:{},config:r.g.MathJax}),e.MathJax=r.g.MathJax},235:function(t,e,r){var Q,n,T=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],Q=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&Q>=t.length&&(t=void 0),{value:t&&t[Q++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.CONFIG=e.MathJax=e.Loader=e.PathFilters=e.PackageError=e.Package=void 0;var o=r(9515),i=r(265),a=r(265);Object.defineProperty(e,"Package",{enumerable:!0,get:function(){return a.Package}}),Object.defineProperty(e,"PackageError",{enumerable:!0,get:function(){return a.PackageError}});var s,l=r(7525);if(e.PathFilters={source:function(t){return e.CONFIG.source.hasOwnProperty(t.name)&&(t.name=e.CONFIG.source[t.name]),!0},normalize:function(t){var e=t.name;return e.match(/^(?:[a-z]+:\/)?\/|[a-z]:\\|\[/i)||(t.name="[mathjax]/"+e.replace(/^\.\//,"")),t.addExtension&&!e.match(/\.[^\/]+$/)&&(t.name+=".js"),!0},prefix:function(t){for(var r;(r=t.name.match(/^\[([^\]]*)\]/))&&e.CONFIG.paths.hasOwnProperty(r[1]);)t.name=e.CONFIG.paths[r[1]]+t.name.substr(r[0].length);return!0}},function(t){t.ready=function(){for(var t,e,r=[],Q=0;Q<arguments.length;Q++)r[Q]=arguments[Q];0===r.length&&(r=Array.from(i.Package.packages.keys()));var n=[];try{for(var o=T(r),a=o.next();!a.done;a=o.next()){var s=a.value,l=i.Package.packages.get(s)||new i.Package(s,!0);n.push(l.promise)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return Promise.all(n)},t.load=function(){for(var t,r,Q=[],n=0;n<arguments.length;n++)Q[n]=arguments[n];if(0===Q.length)return Promise.resolve();var o=[];try{for(var a=T(Q),s=a.next();!s.done;s=a.next()){var l=s.value,c=i.Package.packages.get(l);c||(c=new i.Package(l)).provides(e.CONFIG.provides[l]),c.checkNoLoad(),o.push(c.promise)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return i.Package.loadAll(),Promise.all(o)},t.preLoad=function(){for(var t,r,Q=[],n=0;n<arguments.length;n++)Q[n]=arguments[n];try{for(var o=T(Q),a=o.next();!a.done;a=o.next()){var s=a.value,l=i.Package.packages.get(s);l||(l=new i.Package(s,!0)).provides(e.CONFIG.provides[s]),l.loaded()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},t.defaultReady=function(){void 0!==e.MathJax.startup&&e.MathJax.config.startup.ready()},t.getRoot=function(){var t="//../../es5";if("undefined"!=typeof document){var e=document.currentScript||document.getElementById("MathJax-script");e&&(t=e.src.replace(/\/[^\/]*$/,""))}return t},t.pathFilters=new l.FunctionList,t.pathFilters.add(e.PathFilters.source,0),t.pathFilters.add(e.PathFilters.normalize,10),t.pathFilters.add(e.PathFilters.prefix,20)}(s=e.Loader||(e.Loader={})),e.MathJax=o.MathJax,void 0===e.MathJax.loader){o.combineDefaults(e.MathJax.config,"loader",{paths:{mathjax:s.getRoot()},source:{},dependencies:{},provides:{},load:[],ready:s.defaultReady.bind(s),failed:function(t){return console.log("MathJax("+(t.package||"?")+"): "+t.message)},require:null,pathFilters:[]}),o.combineWithMathJax({loader:s});try{for(var c=T(e.MathJax.config.loader.pathFilters),u=c.next();!u.done;u=c.next()){var p=u.value;Array.isArray(p)?s.pathFilters.add(p[0],p[1]):s.pathFilters.add(p)}}catch(t){Q={error:t}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(Q)throw Q.error}}}e.CONFIG=e.MathJax.config.loader},265:function(t,e,r){var Q,n=this&&this.__extends||(Q=function(t,e){return(Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Q(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),T=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],Q=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&Q>=t.length&&(t=void 0),{value:t&&t[Q++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var Q,n,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(Q=T.next()).done;)o.push(Q.value)}catch(t){n={error:t}}finally{try{Q&&!Q.done&&(r=T.return)&&r.call(T)}finally{if(n)throw n.error}}return o},i=this&&this.__spreadArray||function(t,e){for(var r=0,Q=e.length,n=t.length;r<Q;r++,n++)t[n]=e[r];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.Package=e.PackageError=void 0;var a=r(235),s=function(t){function e(e,r){var Q=t.call(this,e)||this;return Q.package=r,Q}return n(e,t),e}(Error);e.PackageError=s;var l=function(){function t(e,r){void 0===r&&(r=!1),this.isLoaded=!1,this.isLoading=!1,this.hasFailed=!1,this.dependents=[],this.dependencies=[],this.dependencyCount=0,this.provided=[],this.name=e,this.noLoad=r,t.packages.set(e,this),this.promise=this.makePromise(this.makeDependencies())}return Object.defineProperty(t.prototype,"canLoad",{get:function(){return 0===this.dependencyCount&&!this.noLoad&&!this.isLoading&&!this.hasFailed},enumerable:!1,configurable:!0}),t.resolvePath=function(t,e){void 0===e&&(e=!0);var r={name:t,original:t,addExtension:e};return a.Loader.pathFilters.execute(r),r.name},t.loadAll=function(){var t,e;try{for(var r=T(this.packages.values()),Q=r.next();!Q.done;Q=r.next()){var n=Q.value;n.canLoad&&n.load()}}catch(e){t={error:e}}finally{try{Q&&!Q.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.makeDependencies=function(){var e,r,Q=[],n=t.packages,s=this.noLoad,l=this.name,c=[];a.CONFIG.dependencies.hasOwnProperty(l)?c.push.apply(c,i([],o(a.CONFIG.dependencies[l]))):"core"!==l&&c.push("core");try{for(var u=T(c),p=u.next();!p.done;p=u.next()){var h=p.value,f=n.get(h)||new t(h,s);this.dependencies.indexOf(f)<0&&(f.addDependent(this,s),this.dependencies.push(f),f.isLoaded||(this.dependencyCount++,Q.push(f.promise)))}}catch(t){e={error:t}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}return Q},t.prototype.makePromise=function(t){var e=this,r=new Promise((function(t,r){e.resolve=t,e.reject=r})),Q=a.CONFIG[this.name]||{};return Q.ready&&(r=r.then((function(t){return Q.ready(e.name)}))),t.length&&(t.push(r),r=Promise.all(t).then((function(t){return t.join(", ")}))),Q.failed&&r.catch((function(t){return Q.failed(new s(t,e.name))})),r},t.prototype.load=function(){if(!this.isLoaded&&!this.isLoading&&!this.noLoad){this.isLoading=!0;var e=t.resolvePath(this.name);a.CONFIG.require?this.loadCustom(e):this.loadScript(e)}},t.prototype.loadCustom=function(t){var e=this;try{var r=a.CONFIG.require(t);r instanceof Promise?r.then((function(){return e.checkLoad()})).catch((function(r){return e.failed("Can't load \""+t+'"\n'+r.message.trim())})):this.checkLoad()}catch(t){this.failed(t.message)}},t.prototype.loadScript=function(t){var e=this,r=document.createElement("script");r.src=t,r.charset="UTF-8",r.onload=function(t){return e.checkLoad()},r.onerror=function(r){return e.failed("Can't load \""+t+'"')},document.head.appendChild(r)},t.prototype.loaded=function(){var t,e,r,Q;this.isLoaded=!0,this.isLoading=!1;try{for(var n=T(this.dependents),o=n.next();!o.done;o=n.next()){o.value.requirementSatisfied()}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}try{for(var i=T(this.provided),a=i.next();!a.done;a=i.next()){a.value.loaded()}}catch(t){r={error:t}}finally{try{a&&!a.done&&(Q=i.return)&&Q.call(i)}finally{if(r)throw r.error}}this.resolve(this.name)},t.prototype.failed=function(t){this.hasFailed=!0,this.isLoading=!1,this.reject(new s(t,this.name))},t.prototype.checkLoad=function(){var t=this;((a.CONFIG[this.name]||{}).checkReady||function(){return Promise.resolve()})().then((function(){return t.loaded()})).catch((function(e){return t.failed(e)}))},t.prototype.requirementSatisfied=function(){this.dependencyCount&&(this.dependencyCount--,this.canLoad&&this.load())},t.prototype.provides=function(e){var r,Q;void 0===e&&(e=[]);try{for(var n=T(e),o=n.next();!o.done;o=n.next()){var i=o.value,s=t.packages.get(i);s||(a.CONFIG.dependencies[i]||(a.CONFIG.dependencies[i]=[]),a.CONFIG.dependencies[i].push(i),(s=new t(i,!0)).isLoading=!0),this.provided.push(s)}}catch(t){r={error:t}}finally{try{o&&!o.done&&(Q=n.return)&&Q.call(n)}finally{if(r)throw r.error}}},t.prototype.addDependent=function(t,e){this.dependents.push(t),e||this.checkNoLoad()},t.prototype.checkNoLoad=function(){var t,e;if(this.noLoad){this.noLoad=!1;try{for(var r=T(this.dependencies),Q=r.next();!Q.done;Q=r.next()){Q.value.checkNoLoad()}}catch(e){t={error:e}}finally{try{Q&&!Q.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}}},t.packages=new Map,t}();e.Package=l},2388:function(t,e,r){var Q=this&&this.__assign||function(){return(Q=Object.assign||function(t){for(var e,r=1,Q=arguments.length;r<Q;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],Q=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&Q>=t.length&&(t=void 0),{value:t&&t[Q++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},T=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var Q,n,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(Q=T.next()).done;)o.push(Q.value)}catch(t){n={error:t}}finally{try{Q&&!Q.done&&(r=T.return)&&r.call(T)}finally{if(n)throw n.error}}return o},o=this&&this.__spreadArray||function(t,e){for(var r=0,Q=e.length,n=t.length;r<Q;r++,n++)t[n]=e[r];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.CONFIG=e.MathJax=e.Startup=void 0;var i,a=r(9515),s=r(8666),l=r(7233);!function(t){var i,a,l=new s.PrioritizedList;function u(e){return i.visitTree(e,t.document)}function p(){i=new e.MathJax._.core.MmlTree.SerializedMmlVisitor.SerializedMmlVisitor,a=e.MathJax._.mathjax.mathjax,t.input=y(),t.output=H(),t.adaptor=v(),t.handler&&a.handlers.unregister(t.handler),t.handler=g(),t.handler&&(a.handlers.register(t.handler),t.document=b())}function h(){var e,r;t.input&&t.output&&f();var Q=t.output?t.output.name.toLowerCase():"";try{for(var T=n(t.input),o=T.next();!o.done;o=T.next()){var i=o.value,a=i.name.toLowerCase();L(a,i),m(a,i),t.output&&d(a,Q,i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=T.return)&&r.call(T)}finally{if(e)throw e.error}}}function f(){e.MathJax.typeset=function(e){void 0===e&&(e=null),t.document.options.elements=e,t.document.reset(),t.document.render()},e.MathJax.typesetPromise=function(e){return void 0===e&&(e=null),t.document.options.elements=e,t.document.reset(),a.handleRetriesFor((function(){t.document.render()}))},e.MathJax.typesetClear=function(e){void 0===e&&(e=null),e?t.document.clearMathItemsWithin(e):t.document.clear()}}function d(r,Q,n){var T=r+"2"+Q;e.MathJax[T]=function(e,r){return void 0===r&&(r={}),r.format=n.name,t.document.convert(e,r)},e.MathJax[T+"Promise"]=function(e,r){return void 0===r&&(r={}),r.format=n.name,a.handleRetriesFor((function(){return t.document.convert(e,r)}))},e.MathJax[Q+"Stylesheet"]=function(){return t.output.styleSheet(t.document)},"getMetricsFor"in t.output&&(e.MathJax.getMetricsFor=function(e,r){return t.output.getMetricsFor(e,r)})}function L(r,Q){var n=e.MathJax._.core.MathItem.STATE;e.MathJax[r+"2mml"]=function(e,r){return void 0===r&&(r={}),r.end=n.CONVERT,r.format=Q.name,u(t.document.convert(e,r))},e.MathJax[r+"2mmlPromise"]=function(e,r){return void 0===r&&(r={}),r.end=n.CONVERT,r.format=Q.name,a.handleRetriesFor((function(){return u(t.document.convert(e,r))}))}}function m(t,r){e.MathJax[t+"Reset"]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.reset.apply(r,o([],T(t)))}}function y(){var r,Q,T=[];try{for(var o=n(e.CONFIG.input),i=o.next();!i.done;i=o.next()){var a=i.value,s=t.constructors[a];if(!s)throw Error('Input Jax "'+a+'" is not defined (has it been loaded?)');T.push(new s(e.MathJax.config[a]))}}catch(t){r={error:t}}finally{try{i&&!i.done&&(Q=o.return)&&Q.call(o)}finally{if(r)throw r.error}}return T}function H(){var r=e.CONFIG.output;if(!r)return null;var Q=t.constructors[r];if(!Q)throw Error('Output Jax "'+r+'" is not defined (has it been loaded?)');return new Q(e.MathJax.config[r])}function v(){var r=e.CONFIG.adaptor;if(!r||"none"===r)return null;var Q=t.constructors[r];if(!Q)throw Error('DOMAdaptor "'+r+'" is not defined (has it been loaded?)');return Q(e.MathJax.config[r])}function g(){var r,Q,T=e.CONFIG.handler;if(!T||"none"===T||!t.adaptor)return null;var o=t.constructors[T];if(!o)throw Error('Handler "'+T+'" is not defined (has it been loaded?)');var i=new o(t.adaptor,5);try{for(var a=n(l),s=a.next();!s.done;s=a.next()){i=s.value.item(i)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(Q=a.return)&&Q.call(a)}finally{if(r)throw r.error}}return i}function b(r){return void 0===r&&(r=null),a.document(r||e.CONFIG.document,Q(Q({},e.MathJax.config.options),{InputJax:t.input,OutputJax:t.output}))}t.constructors={},t.input=[],t.output=null,t.handler=null,t.adaptor=null,t.elements=null,t.document=null,t.promise=new Promise((function(e,r){t.promiseResolve=e,t.promiseReject=r})),t.pagePromise=new Promise((function(t,e){var Q=r.g.document;if(Q&&Q.readyState&&"complete"!==Q.readyState&&"interactive"!==Q.readyState){var n=function(){return t()};Q.defaultView.addEventListener("load",n,!0),Q.defaultView.addEventListener("DOMContentLoaded",n,!0)}else t()})),t.toMML=u,t.registerConstructor=function(e,r){t.constructors[e]=r},t.useHandler=function(t,r){void 0===r&&(r=!1),e.CONFIG.handler&&!r||(e.CONFIG.handler=t)},t.useAdaptor=function(t,r){void 0===r&&(r=!1),e.CONFIG.adaptor&&!r||(e.CONFIG.adaptor=t)},t.useInput=function(t,r){void 0===r&&(r=!1),c&&!r||e.CONFIG.input.push(t)},t.useOutput=function(t,r){void 0===r&&(r=!1),e.CONFIG.output&&!r||(e.CONFIG.output=t)},t.extendHandler=function(t,e){void 0===e&&(e=10),l.add(t,e)},t.defaultReady=function(){p(),h(),t.pagePromise.then((function(){return e.CONFIG.pageReady()})).then((function(){return t.promiseResolve()})).catch((function(e){return t.promiseReject(e)}))},t.defaultPageReady=function(){return e.CONFIG.typeset&&e.MathJax.typesetPromise?e.MathJax.typesetPromise(e.CONFIG.elements):Promise.resolve()},t.getComponents=p,t.makeMethods=h,t.makeTypesetMethods=f,t.makeOutputMethods=d,t.makeMmlMethods=L,t.makeResetMethod=m,t.getInputJax=y,t.getOutputJax=H,t.getAdaptor=v,t.getHandler=g,t.getDocument=b}(i=e.Startup||(e.Startup={})),e.MathJax=a.MathJax,void 0===e.MathJax._.startup&&(a.combineDefaults(e.MathJax.config,"startup",{input:[],output:"",handler:null,adaptor:null,document:"undefined"==typeof document?"":document,elements:null,typeset:!0,ready:i.defaultReady.bind(i),pageReady:i.defaultPageReady.bind(i)}),a.combineWithMathJax({startup:i,options:{}}),e.MathJax.config.startup.invalidOption&&(l.OPTIONS.invalidOption=e.MathJax.config.startup.invalidOption),e.MathJax.config.startup.optionError&&(l.OPTIONS.optionError=e.MathJax.config.startup.optionError)),e.CONFIG=e.MathJax.config.startup;var c=0!==e.CONFIG.input.length},5009:function(t,e){var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],Q=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&Q>=t.length&&(t=void 0),{value:t&&t[Q++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDOMAdaptor=void 0;var Q=function(){function t(t){void 0===t&&(t=null),this.document=t}return t.prototype.node=function(t,e,Q,n){var T,o;void 0===e&&(e={}),void 0===Q&&(Q=[]);var i=this.create(t,n);this.setAttributes(i,e);try{for(var a=r(Q),s=a.next();!s.done;s=a.next()){var l=s.value;this.append(i,l)}}catch(t){T={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(T)throw T.error}}return i},t.prototype.setAttributes=function(t,e){var Q,n,T,o,i,a;if(e.style&&"string"!=typeof e.style)try{for(var s=r(Object.keys(e.style)),l=s.next();!l.done;l=s.next()){var c=l.value;this.setStyle(t,c.replace(/-([a-z])/g,(function(t,e){return e.toUpperCase()})),e.style[c])}}catch(t){Q={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(Q)throw Q.error}}if(e.properties)try{for(var u=r(Object.keys(e.properties)),p=u.next();!p.done;p=u.next()){t[c=p.value]=e.properties[c]}}catch(t){T={error:t}}finally{try{p&&!p.done&&(o=u.return)&&o.call(u)}finally{if(T)throw T.error}}try{for(var h=r(Object.keys(e)),f=h.next();!f.done;f=h.next()){"style"===(c=f.value)&&"string"!=typeof e.style||"properties"===c||this.setAttribute(t,c,e[c])}}catch(t){i={error:t}}finally{try{f&&!f.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}},t.prototype.replace=function(t,e){return this.insert(t,e),this.remove(e),e},t.prototype.childNode=function(t,e){return this.childNodes(t)[e]},t.prototype.allClasses=function(t){var e=this.getAttribute(t,"class");return e?e.replace(/ +/g," ").replace(/^ /,"").replace(/ $/,"").split(/ /):[]},t}();e.AbstractDOMAdaptor=Q},3494:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractFindMath=void 0;var Q=r(7233),n=function(){function t(t){var e=this.constructor;this.options=Q.userOptions(Q.defaultOptions({},e.OPTIONS),t)}return t.OPTIONS={},t}();e.AbstractFindMath=n},3670:function(t,e,r){var Q,n=this&&this.__extends||(Q=function(t,e){return(Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Q(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractHandler=void 0;var T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(r(5722).AbstractMathDocument),o=function(){function t(t,e){void 0===e&&(e=5),this.documentClass=T,this.adaptor=t,this.priority=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.constructor.NAME},enumerable:!1,configurable:!0}),t.prototype.handlesDocument=function(t){return!1},t.prototype.create=function(t,e){return new this.documentClass(t,this.adaptor,e)},t.NAME="generic",t}();e.AbstractHandler=o},805:function(t,e,r){var Q,n=this&&this.__extends||(Q=function(t,e){return(Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Q(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),T=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],Q=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&Q>=t.length&&(t=void 0),{value:t&&t[Q++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.HandlerList=void 0;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.register=function(t){return this.add(t,t.priority)},e.prototype.unregister=function(t){this.remove(t)},e.prototype.handlesDocument=function(t){var e,r;try{for(var Q=T(this),n=Q.next();!n.done;n=Q.next()){var o=n.value.item;if(o.handlesDocument(t))return o}}catch(t){e={error:t}}finally{try{n&&!n.done&&(r=Q.return)&&r.call(Q)}finally{if(e)throw e.error}}throw new Error("Can't find handler for document")},e.prototype.document=function(t,e){return void 0===e&&(e=null),this.handlesDocument(t).create(t,e)},e}(r(8666).PrioritizedList);e.HandlerList=o},9206:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractInputJax=void 0;var Q=r(7233),n=r(7525),T=function(){function t(t){void 0===t&&(t={}),this.adaptor=null,this.mmlFactory=null;var e=this.constructor;this.options=Q.userOptions(Q.defaultOptions({},e.OPTIONS),t),this.preFilters=new n.FunctionList,this.postFilters=new n.FunctionList}return Object.defineProperty(t.prototype,"name",{get:function(){return this.constructor.NAME},enumerable:!1,configurable:!0}),t.prototype.setAdaptor=function(t){this.adaptor=t},t.prototype.setMmlFactory=function(t){this.mmlFactory=t},t.prototype.initialize=function(){},t.prototype.reset=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},Object.defineProperty(t.prototype,"processStrings",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.findMath=function(t,e){return[]},t.prototype.executeFilters=function(t,e,r,Q){var n={math:e,document:r,data:Q};return t.execute(n),n.data},t.NAME="generic",t.OPTIONS={},t}();e.AbstractInputJax=T},5722:function(t,e,r){var Q,n=this&&this.__extends||(Q=function(t,e){return(Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Q(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),T=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],Q=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&Q>=t.length&&(t=void 0),{value:t&&t[Q++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var Q,n,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(Q=T.next()).done;)o.push(Q.value)}catch(t){n={error:t}}finally{try{Q&&!Q.done&&(r=T.return)&&r.call(T)}finally{if(n)throw n.error}}return o},i=this&&this.__spreadArray||function(t,e){for(var r=0,Q=e.length,n=t.length;r<Q;r++,n++)t[n]=e[r];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMathDocument=e.resetAllOptions=e.resetOptions=e.RenderList=void 0;var a=r(7233),s=r(9206),l=r(2975),c=r(9e3),u=r(4474),p=r(3909),h=r(6751),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.create=function(t){var e,r,Q=new this;try{for(var n=T(Object.keys(t)),i=n.next();!i.done;i=n.next()){var a=i.value,s=o(this.action(a,t[a]),2),l=s[0],c=s[1];c&&Q.add(l,c)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return Q},e.action=function(t,e){var r,Q,n,T,i,a,s=!0,l=e[0];if(1===e.length||"boolean"==typeof e[1])2===e.length&&(s=e[1]),i=(r=o(this.methodActions(t),2))[0],a=r[1];else if("string"==typeof e[1])if("string"==typeof e[2]){4===e.length&&(s=e[3]);var c=o(e.slice(1),2),u=c[0],p=c[1];i=(Q=o(this.methodActions(u,p),2))[0],a=Q[1]}else 3===e.length&&(s=e[2]),i=(n=o(this.methodActions(e[1]),2))[0],a=n[1];else 4===e.length&&(s=e[3]),i=(T=o(e.slice(1),2))[0],a=T[1];return[{id:t,renderDoc:i,renderMath:a,convert:s},l]},e.methodActions=function(t,e){return void 0===e&&(e=t),[function(e){return t&&e[t](),!1},function(t,r){return e&&t[e](r),!1}]},e.prototype.renderDoc=function(t,e){var r,Q;void 0===e&&(e=u.STATE.UNPROCESSED);try{for(var n=T(this.items),o=n.next();!o.done;o=n.next()){var i=o.value;if(i.priority>=e&&i.item.renderDoc(t))return}}catch(t){r={error:t}}finally{try{o&&!o.done&&(Q=n.return)&&Q.call(n)}finally{if(r)throw r.error}}},e.prototype.renderMath=function(t,e,r){var Q,n;void 0===r&&(r=u.STATE.UNPROCESSED);try{for(var o=T(this.items),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.priority>=r&&a.item.renderMath(t,e))return}}catch(t){Q={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(Q)throw Q.error}}},e.prototype.renderConvert=function(t,e,r){var Q,n;void 0===r&&(r=u.STATE.LAST);try{for(var o=T(this.items),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.priority>r)return;if(a.item.convert&&a.item.renderMath(t,e))return}}catch(t){Q={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(Q)throw Q.error}}},e.prototype.findID=function(t){var e,r;try{for(var Q=T(this.items),n=Q.next();!n.done;n=Q.next()){var o=n.value;if(o.item.id===t)return o.item}}catch(t){e={error:t}}finally{try{n&&!n.done&&(r=Q.return)&&r.call(Q)}finally{if(e)throw e.error}}return null},e}(r(8666).PrioritizedList);e.RenderList=f,e.resetOptions={all:!1,processed:!1,inputJax:null,outputJax:null},e.resetAllOptions={all:!0,processed:!0,inputJax:[],outputJax:[]};var d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.compile=function(t){return null},e}(s.AbstractInputJax),L=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.typeset=function(t,e){return void 0===e&&(e=null),null},e.prototype.escaped=function(t,e){return null},e}(l.AbstractOutputJax),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(c.AbstractMathList),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(u.AbstractMathItem),H=function(){function t(e,r,Q){var n=this,T=this.constructor;this.document=e,this.options=a.userOptions(a.defaultOptions({},T.OPTIONS),Q),this.math=new(this.options.MathList||m),this.renderActions=f.create(this.options.renderActions),this.processed=new t.ProcessBits,this.outputJax=this.options.OutputJax||new L;var o=this.options.InputJax||[new d];Array.isArray(o)||(o=[o]),this.inputJax=o,this.adaptor=r,this.outputJax.setAdaptor(r),this.inputJax.map((function(t){return t.setAdaptor(r)})),this.mmlFactory=this.options.MmlFactory||new p.MmlFactory,this.inputJax.map((function(t){return t.setMmlFactory(n.mmlFactory)})),this.outputJax.initialize(),this.inputJax.map((function(t){return t.initialize()}))}return Object.defineProperty(t.prototype,"kind",{get:function(){return this.constructor.KIND},enumerable:!1,configurable:!0}),t.prototype.addRenderAction=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var Q=o(f.action(t,e),2),n=Q[0],T=Q[1];this.renderActions.add(n,T)},t.prototype.removeRenderAction=function(t){var e=this.renderActions.findID(t);e&&this.renderActions.remove(e)},t.prototype.render=function(){return this.renderActions.renderDoc(this),this},t.prototype.rerender=function(t){return void 0===t&&(t=u.STATE.RERENDER),this.state(t-1),this.render(),this},t.prototype.convert=function(t,e){void 0===e&&(e={});var r=a.userOptions({format:this.inputJax[0].name,display:!0,end:u.STATE.LAST,em:16,ex:8,containerWidth:null,lineWidth:1e6,scale:1,family:""},e),Q=r.format,n=r.display,T=r.end,o=r.ex,i=r.em,s=r.containerWidth,l=r.lineWidth,c=r.scale,p=r.family;null===s&&(s=80*o);var h=this.inputJax.reduce((function(t,e){return e.name===Q?e:t}),null),f=new this.options.MathItem(t,h,n);return f.start.node=this.adaptor.body(this.document),f.setMetrics(i,o,s,l,c),this.outputJax.options.mtextInheritFont&&(f.outputData.mtextFamily=p),this.outputJax.options.merrorInheritFont&&(f.outputData.merrorFamily=p),f.convert(this,T),f.typesetRoot||f.root},t.prototype.findMath=function(t){return void 0===t&&(t=null),this.processed.set("findMath"),this},t.prototype.compile=function(){var t,e,r,Q;if(!this.processed.isSet("compile")){var n=[];try{for(var o=T(this.math),i=o.next();!i.done;i=o.next()){var a=i.value;this.compileMath(a),void 0!==a.inputData.recompile&&n.push(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}try{for(var s=T(n),l=s.next();!l.done;l=s.next()){var c=(a=l.value).inputData.recompile;a.state(c.state),a.inputData.recompile=c,this.compileMath(a)}}catch(t){r={error:t}}finally{try{l&&!l.done&&(Q=s.return)&&Q.call(s)}finally{if(r)throw r.error}}this.processed.set("compile")}return this},t.prototype.compileMath=function(t){try{t.compile(this)}catch(e){if(e.retry||e.restart)throw e;this.options.compileError(this,t,e),t.inputData.error=e}},t.prototype.compileError=function(t,e){t.root=this.mmlFactory.create("math",null,[this.mmlFactory.create("merror",{"data-mjx-error":e.message,title:e.message},[this.mmlFactory.create("mtext",null,[this.mmlFactory.create("text").setText("Math input error")])])]),t.display&&t.root.attributes.set("display","block"),t.inputData.error=e.message},t.prototype.typeset=function(){var t,e;if(!this.processed.isSet("typeset")){try{for(var r=T(this.math),Q=r.next();!Q.done;Q=r.next()){var n=Q.value;try{n.typeset(this)}catch(t){if(t.retry||t.restart)throw t;this.options.typesetError(this,n,t),n.outputData.error=t}}}catch(e){t={error:e}}finally{try{Q&&!Q.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.processed.set("typeset")}return this},t.prototype.typesetError=function(t,e){t.typesetRoot=this.adaptor.node("mjx-container",{class:"MathJax mjx-output-error",jax:this.outputJax.name},[this.adaptor.node("span",{"data-mjx-error":e.message,title:e.message,style:{color:"red","background-color":"yellow","line-height":"normal"}},[this.adaptor.text("Math output error")])]),t.display&&this.adaptor.setAttributes(t.typesetRoot,{style:{display:"block",margin:"1em 0","text-align":"center"}}),t.outputData.error=e.message},t.prototype.getMetrics=function(){return this.processed.isSet("getMetrics")||(this.outputJax.getMetrics(this),this.processed.set("getMetrics")),this},t.prototype.updateDocument=function(){var t,e;if(!this.processed.isSet("updateDocument")){try{for(var r=T(this.math.reversed()),Q=r.next();!Q.done;Q=r.next()){Q.value.updateDocument(this)}}catch(e){t={error:e}}finally{try{Q&&!Q.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.processed.set("updateDocument")}return this},t.prototype.removeFromDocument=function(t){return void 0===t&&(t=!1),this},t.prototype.state=function(t,e){var r,Q;void 0===e&&(e=!1);try{for(var n=T(this.math),o=n.next();!o.done;o=n.next()){o.value.state(t,e)}}catch(t){r={error:t}}finally{try{o&&!o.done&&(Q=n.return)&&Q.call(n)}finally{if(r)throw r.error}}return t<u.STATE.INSERTED&&this.processed.clear("updateDocument"),t<u.STATE.TYPESET&&(this.processed.clear("typeset"),this.processed.clear("getMetrics")),t<u.STATE.COMPILED&&this.processed.clear("compile"),this},t.prototype.reset=function(t){var r;return void 0===t&&(t={processed:!0}),(t=a.userOptions(Object.assign({},e.resetOptions),t)).all&&Object.assign(t,e.resetAllOptions),t.processed&&this.processed.reset(),t.inputJax&&this.inputJax.forEach((function(e){return e.reset.apply(e,i([],o(t.inputJax)))})),t.outputJax&&(r=this.outputJax).reset.apply(r,i([],o(t.outputJax))),this},t.prototype.clear=function(){return this.reset(),this.math.clear(),this},t.prototype.concat=function(t){return this.math.merge(t),this},t.prototype.clearMathItemsWithin=function(t){var e,r=this.getMathItemsWithin(t);return(e=this.math).remove.apply(e,i([],o(r))),r},t.prototype.getMathItemsWithin=function(t){var e,r,Q,n;Array.isArray(t)||(t=[t]);var o=this.adaptor,i=[],a=o.getElements(t,this.document);try{t:for(var s=T(this.math),l=s.next();!l.done;l=s.next()){var c=l.value;try{for(var u=(Q=void 0,T(a)),p=u.next();!p.done;p=u.next()){var h=p.value;if(c.start.node&&o.contains(h,c.start.node)){i.push(c);continue t}}}catch(t){Q={error:t}}finally{try{p&&!p.done&&(n=u.return)&&n.call(u)}finally{if(Q)throw Q.error}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return i},t.KIND="MathDocument",t.OPTIONS={OutputJax:null,InputJax:null,MmlFactory:null,MathList:m,MathItem:y,compileError:function(t,e,r){t.compileError(e,r)},typesetError:function(t,e,r){t.typesetError(e,r)},renderActions:a.expandable({find:[u.STATE.FINDMATH,"findMath","",!1],compile:[u.STATE.COMPILED],metrics:[u.STATE.METRICS,"getMetrics","",!1],typeset:[u.STATE.TYPESET],update:[u.STATE.INSERTED,"updateDocument",!1]})},t.ProcessBits=h.BitFieldClass("findMath","compile","getMetrics","typeset","updateDocument"),t}();e.AbstractMathDocument=H},4474:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.newState=e.STATE=e.AbstractMathItem=e.protoItem=void 0,e.protoItem=function(t,e,r,Q,n,T,o){return void 0===o&&(o=null),{open:t,math:e,close:r,n:Q,start:{n:n},end:{n:T},display:o}};var r=function(){function t(t,r,Q,n,T){void 0===Q&&(Q=!0),void 0===n&&(n={i:0,n:0,delim:""}),void 0===T&&(T={i:0,n:0,delim:""}),this.root=null,this.typesetRoot=null,this.metrics={},this.inputData={},this.outputData={},this._state=e.STATE.UNPROCESSED,this.math=t,this.inputJax=r,this.display=Q,this.start=n,this.end=T,this.root=null,this.typesetRoot=null,this.metrics={},this.inputData={},this.outputData={}}return Object.defineProperty(t.prototype,"isEscaped",{get:function(){return null===this.display},enumerable:!1,configurable:!0}),t.prototype.render=function(t){t.renderActions.renderMath(this,t)},t.prototype.rerender=function(t,r){void 0===r&&(r=e.STATE.RERENDER),this.state()>=r&&this.state(r-1),t.renderActions.renderMath(this,t,r)},t.prototype.convert=function(t,r){void 0===r&&(r=e.STATE.LAST),t.renderActions.renderConvert(this,t,r)},t.prototype.compile=function(t){this.state()<e.STATE.COMPILED&&(this.root=this.inputJax.compile(this,t),this.state(e.STATE.COMPILED))},t.prototype.typeset=function(t){this.state()<e.STATE.TYPESET&&(this.typesetRoot=t.outputJax[this.isEscaped?"escaped":"typeset"](this,t),this.state(e.STATE.TYPESET))},t.prototype.updateDocument=function(t){},t.prototype.removeFromDocument=function(t){void 0===t&&(t=!1)},t.prototype.setMetrics=function(t,e,r,Q,n){this.metrics={em:t,ex:e,containerWidth:r,lineWidth:Q,scale:n}},t.prototype.state=function(t,r){return void 0===t&&(t=null),void 0===r&&(r=!1),null!=t&&(t<e.STATE.INSERTED&&this._state>=e.STATE.INSERTED&&this.removeFromDocument(r),t<e.STATE.TYPESET&&this._state>=e.STATE.TYPESET&&(this.outputData={}),t<e.STATE.COMPILED&&this._state>=e.STATE.COMPILED&&(this.inputData={}),this._state=t),this._state},t.prototype.reset=function(t){void 0===t&&(t=!1),this.state(e.STATE.UNPROCESSED,t)},t}();e.AbstractMathItem=r,e.STATE={UNPROCESSED:0,FINDMATH:10,COMPILED:20,CONVERT:100,METRICS:110,RERENDER:125,TYPESET:150,INSERTED:200,LAST:1e4},e.newState=function(t,r){if(t in e.STATE)throw Error("State "+t+" already exists");e.STATE[t]=r}},9e3:function(t,e,r){var Q,n=this&&this.__extends||(Q=function(t,e){return(Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Q(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMathList=void 0;var T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.isBefore=function(t,e){return t.start.i<e.start.i||t.start.i===e.start.i&&t.start.n<e.start.n},e}(r(103).LinkedList);e.AbstractMathList=T},91:function(t,e){var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],Q=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&Q>=t.length&&(t=void 0),{value:t&&t[Q++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.Attributes=e.INHERIT=void 0,e.INHERIT="_inherit_";var Q=function(){function t(t,e){this.global=e,this.defaults=Object.create(e),this.inherited=Object.create(this.defaults),this.attributes=Object.create(this.inherited),Object.assign(this.defaults,t)}return t.prototype.set=function(t,e){this.attributes[t]=e},t.prototype.setList=function(t){Object.assign(this.attributes,t)},t.prototype.get=function(t){var r=this.attributes[t];return r===e.INHERIT&&(r=this.global[t]),r},t.prototype.getExplicit=function(t){if(this.attributes.hasOwnProperty(t))return this.attributes[t]},t.prototype.getList=function(){for(var t,e,Q=[],n=0;n<arguments.length;n++)Q[n]=arguments[n];var T={};try{for(var o=r(Q),i=o.next();!i.done;i=o.next()){var a=i.value;T[a]=this.get(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return T},t.prototype.setInherited=function(t,e){this.inherited[t]=e},t.prototype.getInherited=function(t){return this.inherited[t]},t.prototype.getDefault=function(t){return this.defaults[t]},t.prototype.isSet=function(t){return this.attributes.hasOwnProperty(t)||this.inherited.hasOwnProperty(t)},t.prototype.hasDefault=function(t){return t in this.defaults},t.prototype.getExplicitNames=function(){return Object.keys(this.attributes)},t.prototype.getInheritedNames=function(){return Object.keys(this.inherited)},t.prototype.getDefaultNames=function(){return Object.keys(this.defaults)},t.prototype.getGlobalNames=function(){return Object.keys(this.global)},t.prototype.getAllAttributes=function(){return this.attributes},t.prototype.getAllInherited=function(){return this.inherited},t.prototype.getAllDefaults=function(){return this.defaults},t.prototype.getAllGlobals=function(){return this.global},t}();e.Attributes=Q},6336:function(t,e,r){var Q;Object.defineProperty(e,"__esModule",{value:!0}),e.MML=void 0;var n=r(9007),T=r(3233),o=r(450),i=r(3050),a=r(2756),s=r(4770),l=r(6030),c=r(7265),u=r(9878),p=r(6850),h=r(7131),f=r(6145),d=r(1314),L=r(1581),m=r(7238),y=r(5741),H=r(5410),v=r(6661),g=r(9145),b=r(4461),M=r(5184),V=r(6405),x=r(1349),O=r(5022),_=r(4359),S=r(142),w=r(7590),E=r(3985),C=r(9102),A=r(3948),P=r(1334);e.MML=((Q={})[T.MmlMath.prototype.kind]=T.MmlMath,Q[o.MmlMi.prototype.kind]=o.MmlMi,Q[i.MmlMn.prototype.kind]=i.MmlMn,Q[a.MmlMo.prototype.kind]=a.MmlMo,Q[s.MmlMtext.prototype.kind]=s.MmlMtext,Q[l.MmlMspace.prototype.kind]=l.MmlMspace,Q[c.MmlMs.prototype.kind]=c.MmlMs,Q[u.MmlMrow.prototype.kind]=u.MmlMrow,Q[u.MmlInferredMrow.prototype.kind]=u.MmlInferredMrow,Q[p.MmlMfrac.prototype.kind]=p.MmlMfrac,Q[h.MmlMsqrt.prototype.kind]=h.MmlMsqrt,Q[f.MmlMroot.prototype.kind]=f.MmlMroot,Q[d.MmlMstyle.prototype.kind]=d.MmlMstyle,Q[L.MmlMerror.prototype.kind]