=0)return a}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return null},e.prototype.createAnnotationMenu=function(t,e,r){var n=this,o=this.findID(t,"Annotation");o.submenu=this.factory.get("subMenu")(this.factory,{items:e.map((function(t){var e=s(t,2),o=e[0],i=e[1];return{type:"command",id:o,content:o,action:function(){n.annotation=i,r()}}})),id:"annotations"},o),e.length?o.enable():o.disable()},e.prototype.dynamicSubmenus=function(){var t,r;try{for(var n=i(e.DynamicSubmenus),o=n.next();!o.done;o=n.next()){var a=s(o.value,2),c=a[0],l=a[1],u=this.find(c);if(u){var p=l(this,u);u.submenu=p,p.items.length?u.enable():u.disable()}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.DynamicSubmenus=new Map,e}(a.ContextMenu);e.MJContextMenu=l},8310:function(t,e,r){var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Menu=void 0;var s=r(5713),a=r(4474),c=r(9515),l=r(7233),u=r(5865),p=r(473),h=r(4414),d=r(4922),f=r(6914),m=r(3463),y=r(7309),g=i(r(5445)),b=c.MathJax,v="undefined"!=typeof window&&window.navigator&&"Mac"===window.navigator.platform.substr(0,3),_=function(){function t(t,e){void 0===e&&(e={});var r=this;this.settings=null,this.defaultSettings=null,this.menu=null,this.MmlVisitor=new p.MmlVisitor,this.jax={CHTML:null,SVG:null},this.rerenderStart=a.STATE.LAST,this.about=new d.Info('MathJax v'+s.mathjax.version,(function(){var t=[];return t.push("Input Jax: "+r.document.inputJax.map((function(t){return t.name})).join(", ")),t.push("Output Jax: "+r.document.outputJax.name),t.push("Document Type: "+r.document.kind),t.join("
")}),'www.mathjax.org'),this.help=new d.Info("MathJax Help",(function(){return["MathJax is a JavaScript library that allows page"," authors to include mathematics within their web pages."," As a reader, you don't need to do anything to make that happen.
","Browsers: MathJax works with all modern browsers including"," Edge, Firefox, Chrome, Safari, Opera, and most mobile browsers.
","Math Menu: MathJax adds a contextual menu to equations."," Right-click or CTRL-click on any mathematics to access the menu.
",'',"
Show Math As: These options allow you to view the formula's"," source markup (as MathML or in its original format).
","
Copy to Clipboard: These options copy the formula's source markup,"," as MathML or in its original format, to the clipboard"," (in browsers that support that).
","
Math Settings: These give you control over features of MathJax,"," such the size of the mathematics, and the mechanism used"," to display equations.
","
Accessibility: MathJax can work with screen"," readers to make mathematics accessible to the visually impaired."," Turn on the explorer to enable generation of speech strings"," and the ability to investigate expressions interactively.
","
Language: This menu lets you select the language used by MathJax"," for its menus and warning messages. (Not yet implemented in version 3.)
","
","Math Zoom: If you are having difficulty reading an"," equation, MathJax can enlarge it to help you see it better, or"," you can scall all the math on the page to make it larger."," Turn these features on in the Math Settings menu.
","Preferences: MathJax uses your browser's localStorage database"," to save the preferences set via this menu locally in your browser. These"," are not used to track you, and are not transferred or used remotely by"," MathJax in any way.
"].join("\n")}),'www.mathjax.org'),this.mathmlCode=new h.SelectableInfo("MathJax MathML Expression",(function(){if(!r.menu.mathItem)return"";var t=r.toMML(r.menu.mathItem);return""+r.formatSource(t)+"
"}),""),this.originalText=new h.SelectableInfo("MathJax Original Source",(function(){if(!r.menu.mathItem)return"";var t=r.menu.mathItem.math;return''+r.formatSource(t)+"
"}),""),this.annotationText=new h.SelectableInfo("MathJax Annotation Text",(function(){if(!r.menu.mathItem)return"";var t=r.menu.annotation;return''+r.formatSource(t)+"
"}),""),this.zoomBox=new d.Info("MathJax Zoomed Expression",(function(){if(!r.menu.mathItem)return"";var t=r.menu.mathItem.typesetRoot.cloneNode(!0);return t.style.margin="0",''+t.outerHTML+"
"}),""),this.document=t,this.options=(0,l.userOptions)((0,l.defaultOptions)({},this.constructor.OPTIONS),e),this.initSettings(),this.mergeUserSettings(),this.initMenu(),this.applySettings()}return Object.defineProperty(t.prototype,"isLoading",{get:function(){return t.loading>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loadingPromise",{get:function(){return this.isLoading?(t._loadingPromise||(t._loadingPromise=new Promise((function(e,r){t._loadingOK=e,t._loadingFailed=r}))),t._loadingPromise):Promise.resolve()},enumerable:!1,configurable:!0}),t.prototype.initSettings=function(){this.settings=this.options.settings,this.jax=this.options.jax;var t=this.document.outputJax;this.jax[t.name]=t,this.settings.renderer=t.name,b._.a11y&&b._.a11y.explorer&&Object.assign(this.settings,this.document.options.a11y),this.settings.scale=t.options.scale,this.defaultSettings=Object.assign({},this.settings)},t.prototype.initMenu=function(){var t=this,e=new f.Parser([["contextMenu",u.MJContextMenu.fromJson.bind(u.MJContextMenu)]]);this.menu=e.parse({type:"contextMenu",id:"MathJax_Menu",pool:[this.variable("texHints"),this.variable("semantics"),this.variable("zoom"),this.variable("zscale"),this.variable("renderer",(function(e){return t.setRenderer(e)})),this.variable("alt"),this.variable("cmd"),this.variable("ctrl"),this.variable("shift"),this.variable("scale",(function(e){return t.setScale(e)})),this.variable("explorer",(function(e){return t.setExplorer(e)})),this.a11yVar("highlight"),this.a11yVar("backgroundColor"),this.a11yVar("backgroundOpacity"),this.a11yVar("foregroundColor"),this.a11yVar("foregroundOpacity"),this.a11yVar("speech"),this.a11yVar("subtitles"),this.a11yVar("braille"),this.a11yVar("viewBraille"),this.a11yVar("locale",(function(t){return g.default.setupEngine({locale:t})})),this.a11yVar("speechRules",(function(e){var r=n(e.split("-"),2),o=r[0],i=r[1];t.document.options.sre.domain=o,t.document.options.sre.style=i})),this.a11yVar("magnification"),this.a11yVar("magnify"),this.a11yVar("treeColoring"),this.a11yVar("infoType"),this.a11yVar("infoRole"),this.a11yVar("infoPrefix"),this.variable("autocollapse"),this.variable("collapsible",(function(e){return t.setCollapsible(e)})),this.variable("inTabOrder",(function(e){return t.setTabOrder(e)})),this.variable("assistiveMml",(function(e){return t.setAssistiveMml(e)}))],items:[this.submenu("Show","Show Math As",[this.command("MathMLcode","MathML Code",(function(){return t.mathmlCode.post()})),this.command("Original","Original Form",(function(){return t.originalText.post()})),this.submenu("Annotation","Annotation")]),this.submenu("Copy","Copy to Clipboard",[this.command("MathMLcode","MathML Code",(function(){return t.copyMathML()})),this.command("Original","Original Form",(function(){return t.copyOriginal()})),this.submenu("Annotation","Annotation")]),this.rule(),this.submenu("Settings","Math Settings",[this.submenu("Renderer","Math Renderer",this.radioGroup("renderer",[["CHTML"],["SVG"]])),this.rule(),this.submenu("ZoomTrigger","Zoom Trigger",[this.command("ZoomNow","Zoom Once Now",(function(){return t.zoom(null,"",t.menu.mathItem)})),this.rule(),this.radioGroup("zoom",[["Click"],["DoubleClick","Double-Click"],["NoZoom","No Zoom"]]),this.rule(),this.label("TriggerRequires","Trigger Requires:"),this.checkbox(v?"Option":"Alt",v?"Option":"Alt","alt"),this.checkbox("Command","Command","cmd",{hidden:!v}),this.checkbox("Control","Control","ctrl",{hiddne:v}),this.checkbox("Shift","Shift","shift")]),this.submenu("ZoomFactor","Zoom Factor",this.radioGroup("zscale",[["150%"],["175%"],["200%"],["250%"],["300%"],["400%"]])),this.rule(),this.command("Scale","Scale All Math...",(function(){return t.scaleAllMath()})),this.rule(),this.checkbox("texHints","Add TeX hints to MathML","texHints"),this.checkbox("semantics","Add original as annotation","semantics"),this.rule(),this.command("Reset","Reset to defaults",(function(){return t.resetDefaults()}))]),this.submenu("Accessibility","Accessibility",[this.checkbox("Activate","Activate","explorer"),this.submenu("Speech","Speech",[this.checkbox("Speech","Speech Output","speech"),this.checkbox("Subtitles","Speech Subtitles","subtitles"),this.checkbox("Braille","Braille Output","braille"),this.checkbox("View Braille","Braille Subtitles","viewBraille"),this.rule(),this.submenu("A11yLanguage","Language"),this.rule(),this.submenu("Mathspeak","Mathspeak Rules",this.radioGroup("speechRules",[["mathspeak-default","Verbose"],["mathspeak-brief","Brief"],["mathspeak-sbrief","Superbrief"]])),this.submenu("Clearspeak","Clearspeak Rules",this.radioGroup("speechRules",[["clearspeak-default","Auto"]])),this.submenu("ChromeVox","ChromeVox Rules",this.radioGroup("speechRules",[["chromevox-default","Standard"],["chromevox-alternative","Alternative"]]))]),this.submenu("Highlight","Highlight",[this.submenu("Background","Background",this.radioGroup("backgroundColor",[["Blue"],["Red"],["Green"],["Yellow"],["Cyan"],["Magenta"],["White"],["Black"]])),{type:"slider",variable:"backgroundOpacity",content:" "},this.submenu("Foreground","Foreground",this.radioGroup("foregroundColor",[["Black"],["White"],["Magenta"],["Cyan"],["Yellow"],["Green"],["Red"],["Blue"]])),{type:"slider",variable:"foregroundOpacity",content:" "},this.rule(),this.radioGroup("highlight",[["None"],["Hover"],["Flame"]]),this.rule(),this.checkbox("TreeColoring","Tree Coloring","treeColoring")]),this.submenu("Magnification","Magnification",[this.radioGroup("magnification",[["None"],["Keyboard"],["Mouse"]]),this.rule(),this.radioGroup("magnify",[["200%"],["300%"],["400%"],["500%"]])]),this.submenu("Semantic Info","Semantic Info",[this.checkbox("Type","Type","infoType"),this.checkbox("Role","Role","infoRole"),this.checkbox("Prefix","Prefix","infoPrefix")],!0),this.rule(),this.checkbox("Collapsible","Collapsible Math","collapsible"),this.checkbox("AutoCollapse","Auto Collapse","autocollapse",{disabled:!0}),this.rule(),this.checkbox("InTabOrder","Include in Tab Order","inTabOrder"),this.checkbox("AssistiveMml","Include Hidden MathML","assistiveMml")]),this.submenu("Language","Language"),this.rule(),this.command("About","About MathJax",(function(){return t.about.post()})),this.command("Help","MathJax Help",(function(){return t.help.post()}))]});var r=this.menu;this.about.attachMenu(r),this.help.attachMenu(r),this.originalText.attachMenu(r),this.annotationText.attachMenu(r),this.mathmlCode.attachMenu(r),this.zoomBox.attachMenu(r),this.checkLoadableItems(),this.enableExplorerItems(this.settings.explorer),r.showAnnotation=this.annotationText,r.copyAnnotation=this.copyAnnotation.bind(this),r.annotationTypes=this.options.annotationTypes,y.CssStyles.addInfoStyles(this.document.document),y.CssStyles.addMenuStyles(this.document.document)},t.prototype.checkLoadableItems=function(){var t,e;if(b&&b._&&b.loader&&b.startup)!this.settings.collapsible||b._.a11y&&b._.a11y.complexity||this.loadA11y("complexity"),!this.settings.explorer||b._.a11y&&b._.a11y.explorer||this.loadA11y("explorer"),!this.settings.assistiveMml||b._.a11y&&b._.a11y["assistive-mml"]||this.loadA11y("assistive-mml");else{var r=this.menu;try{for(var n=o(Object.keys(this.jax)),i=n.next();!i.done;i=n.next()){var s=i.value;this.jax[s]||r.findID("Settings","Renderer",s).disable()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}r.findID("Accessibility","Activate").disable(),r.findID("Accessibility","AutoCollapse").disable(),r.findID("Accessibility","Collapsible").disable()}},t.prototype.enableExplorerItems=function(t){var e,r,n=this.menu.findID("Accessibility","Activate").menu;try{for(var i=o(n.items.slice(1)),s=i.next();!s.done;s=i.next()){var a=s.value;if(a instanceof m.Rule)break;t?a.enable():a.disable()}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}},t.prototype.mergeUserSettings=function(){try{var e=localStorage.getItem(t.MENU_STORAGE);if(!e)return;Object.assign(this.settings,JSON.parse(e)),this.setA11y(this.settings)}catch(t){console.log("MathJax localStorage error: "+t.message)}},t.prototype.saveUserSettings=function(){var e,r,n={};try{for(var i=o(Object.keys(this.settings)),s=i.next();!s.done;s=i.next()){var a=s.value;this.settings[a]!==this.defaultSettings[a]&&(n[a]=this.settings[a])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}try{Object.keys(n).length?localStorage.setItem(t.MENU_STORAGE,JSON.stringify(n)):localStorage.removeItem(t.MENU_STORAGE)}catch(t){console.log("MathJax localStorage error: "+t.message)}},t.prototype.setA11y=function(t){b._.a11y&&b._.a11y.explorer&&b._.a11y.explorer_ts.setA11yOptions(this.document,t)},t.prototype.getA11y=function(t){if(b._.a11y&&b._.a11y.explorer)return void 0!==this.document.options.a11y[t]?this.document.options.a11y[t]:this.document.options.sre[t]},t.prototype.applySettings=function(){this.setTabOrder(this.settings.inTabOrder),this.document.options.enableAssistiveMml=this.settings.assistiveMml,this.document.outputJax.options.scale=parseFloat(this.settings.scale),this.settings.renderer!==this.defaultSettings.renderer&&this.setRenderer(this.settings.renderer)},t.prototype.setScale=function(t){this.document.outputJax.options.scale=parseFloat(t),this.document.rerender()},t.prototype.setRenderer=function(t){var e=this;if(this.jax[t])this.setOutputJax(t);else{var r=t.toLowerCase();this.loadComponent("output/"+r,(function(){var n=b.startup;r in n.constructors&&(n.useOutput(r,!0),n.output=n.getOutputJax(),e.jax[t]=n.output,e.setOutputJax(t))}))}},t.prototype.setOutputJax=function(t){this.jax[t].setAdaptor(this.document.adaptor),this.document.outputJax=this.jax[t],this.rerender()},t.prototype.setTabOrder=function(t){this.menu.store.inTaborder(t)},t.prototype.setAssistiveMml=function(t){this.document.options.enableAssistiveMml=t,!t||b._.a11y&&b._.a11y["assistive-mml"]?this.rerender():this.loadA11y("assistive-mml")},t.prototype.setExplorer=function(t){this.enableExplorerItems(t),this.document.options.enableExplorer=t,!t||b._.a11y&&b._.a11y.explorer?this.rerender(this.settings.collapsible?a.STATE.RERENDER:a.STATE.COMPILED):this.loadA11y("explorer")},t.prototype.setCollapsible=function(t){this.document.options.enableComplexity=t,!t||b._.a11y&&b._.a11y.complexity?this.rerender(a.STATE.COMPILED):this.loadA11y("complexity")},t.prototype.scaleAllMath=function(){var t=(100*parseFloat(this.settings.scale)).toFixed(1).replace(/.0$/,""),e=prompt("Scale all mathematics (compared to surrounding text) by",t+"%");if(e)if(e.match(/^\s*\d+(\.\d*)?\s*%?\s*$/)){var r=parseFloat(e)/100;r?this.menu.pool.lookup("scale").setValue(String(r)):alert("The scale should not be zero")}else alert("The scale should be a percentage (e.g., 120%)")},t.prototype.resetDefaults=function(){var e,r;t.loading++;var n=this.menu.pool,i=this.defaultSettings;try{for(var s=o(Object.keys(this.settings)),c=s.next();!c.done;c=s.next()){var l=c.value,u=n.lookup(l);if(u){u.setValue(i[l]);var p=u.items[0];p&&p.executeCallbacks_()}else this.settings[l]=i[l]}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}t.loading--,this.rerender(a.STATE.COMPILED)},t.prototype.checkComponent=function(e){var r=t.loadingPromises.get(e);r&&s.mathjax.retryAfter(r)},t.prototype.loadComponent=function(e,r){if(!t.loadingPromises.has(e)){var n=b.loader;if(n){t.loading++;var o=n.load(e).then((function(){t.loading--,t.loadingPromises.delete(e),r(),0===t.loading&&t._loadingPromise&&(t._loadingPromise=null,t._loadingOK())})).catch((function(e){t._loadingPromise?(t._loadingPromise=null,t._loadingFailed(e)):console.log(e)}));t.loadingPromises.set(e,o)}}},t.prototype.loadA11y=function(e){var r=this,n=!a.STATE.ENRICHED;this.loadComponent("a11y/"+e,(function(){var o=b.startup;s.mathjax.handlers.unregister(o.handler),o.handler=o.getHandler(),s.mathjax.handlers.register(o.handler);var i=r.document;r.document=o.document=o.getDocument(),r.document.menu=r,r.document.outputJax.reset(),r.transferMathList(i),r.document.processed=i.processed,t._loadingPromise||(r.document.outputJax.reset(),r.rerender("complexity"===e||n?a.STATE.COMPILED:a.STATE.TYPESET))}))},t.prototype.transferMathList=function(t){var e,r,n=this.document.options.MathItem;try{for(var i=o(t.math),s=i.next();!s.done;s=i.next()){var a=s.value,c=new n;Object.assign(c,a),this.document.math.push(c)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}},t.prototype.formatSource=function(t){return t.trim().replace(/&/g,"&").replace(//g,">")},t.prototype.toMML=function(t){return this.MmlVisitor.visitTree(t.root,t,{texHints:this.settings.texHints,semantics:this.settings.semantics&&"MathML"!==t.inputJax.name})},t.prototype.zoom=function(t,e,r){t&&!this.isZoomEvent(t,e)||(this.menu.mathItem=r,t&&this.menu.post(t),this.zoomBox.post())},t.prototype.isZoomEvent=function(t,e){return this.settings.zoom===e&&(!this.settings.alt||t.altKey)&&(!this.settings.ctrl||t.ctrlKey)&&(!this.settings.cmd||t.metaKey)&&(!this.settings.shift||t.shiftKey)},t.prototype.rerender=function(e){void 0===e&&(e=a.STATE.TYPESET),this.rerenderStart=Math.min(e,this.rerenderStart),t.loading||(this.rerenderStart<=a.STATE.COMPILED&&this.document.reset({inputJax:[]}),this.document.rerender(this.rerenderStart),this.rerenderStart=a.STATE.LAST)},t.prototype.copyMathML=function(){this.copyToClipboard(this.toMML(this.menu.mathItem))},t.prototype.copyOriginal=function(){this.copyToClipboard(this.menu.mathItem.math.trim())},t.prototype.copyAnnotation=function(){this.copyToClipboard(this.menu.annotation.trim())},t.prototype.copyToClipboard=function(t){var e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.cssText="height: 1px; width: 1px; padding: 1px; position: absolute; left: -10px",document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(t){alert("Can't copy to clipboard: "+t.message)}document.body.removeChild(e)},t.prototype.addMenu=function(t){var e=this,r=t.typesetRoot;r.addEventListener("contextmenu",(function(){return e.menu.mathItem=t}),!0),r.addEventListener("keydown",(function(){return e.menu.mathItem=t}),!0),r.addEventListener("click",(function(r){return e.zoom(r,"Click",t)}),!0),r.addEventListener("dblclick",(function(r){return e.zoom(r,"DoubleClick",t)}),!0),this.menu.store.insert(r)},t.prototype.clear=function(){this.menu.store.clear()},t.prototype.variable=function(t,e){var r=this;return{name:t,getter:function(){return r.settings[t]},setter:function(n){r.settings[t]=n,e&&e(n),r.saveUserSettings()}}},t.prototype.a11yVar=function(t,e){var r=this;return{name:t,getter:function(){return r.getA11y(t)},setter:function(n){r.settings[t]=n;var o={};o[t]=n,r.setA11y(o),e&&e(n),r.saveUserSettings()}}},t.prototype.submenu=function(t,e,r,n){var i,s;void 0===r&&(r=[]),void 0===n&&(n=!1);var a=[];try{for(var c=o(r),l=c.next();!l.done;l=c.next()){var u=l.value;Array.isArray(u)?a=a.concat(u):a.push(u)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(s=c.return)&&s.call(c)}finally{if(i)throw i.error}}return{type:"submenu",id:t,content:e,menu:{items:a},disabled:0===a.length||n}},t.prototype.command=function(t,e,r,n){return void 0===n&&(n={}),Object.assign({type:"command",id:t,content:e,action:r},n)},t.prototype.checkbox=function(t,e,r,n){return void 0===n&&(n={}),Object.assign({type:"checkbox",id:t,content:e,variable:r},n)},t.prototype.radioGroup=function(t,e){var r=this;return e.map((function(e){return r.radio(e[0],e[1]||e[0],t)}))},t.prototype.radio=function(t,e,r,n){return void 0===n&&(n={}),Object.assign({type:"radio",id:t,content:e,variable:r},n)},t.prototype.label=function(t,e){return{type:"label",id:t,content:e}},t.prototype.rule=function(){return{type:"rule"}},t.MENU_STORAGE="MathJax-Menu-Settings",t.OPTIONS={settings:{texHints:!0,semantics:!1,zoom:"NoZoom",zscale:"200%",renderer:"CHTML",alt:!1,cmd:!1,ctrl:!1,shift:!1,scale:1,autocollapse:!1,collapsible:!1,inTabOrder:!0,assistiveMml:!0,explorer:!1},jax:{CHTML:null,SVG:null},annotationTypes:(0,l.expandable)({TeX:["TeX","LaTeX","application/x-tex"],StarMath:["StarMath 5.0"],Maple:["Maple"],ContentMathML:["MathML-Content","application/mathml-content+xml"],OpenMath:["OpenMath"]})},t.loading=0,t.loadingPromises=new Map,t._loadingPromise=null,t._loadingOK=null,t._loadingFailed=null,t}();e.Menu=_},4001:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},a=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MenuHandler=e.MenuMathDocumentMixin=e.MenuMathItemMixin=void 0;var l=r(5713),u=r(4474),p=r(7233),h=r(8310);function d(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.addMenu=function(t,e){void 0===e&&(e=!1),this.state()>=u.STATE.CONTEXT_MENU||(this.isEscaped||!t.options.enableMenu&&!e||t.menu.addMenu(this),this.state(u.STATE.CONTEXT_MENU))},e.prototype.checkLoading=function(t){t.checkLoading()},e}(t)}function f(t){var e;return e=function(t){function e(){for(var e=[],r=0;r\n"+this.childNodeMml(e,r+" ","\n")+r+""},e.prototype.visitMathNode=function(e,r){if(!this.options.semantics||"TeX"!==this.mathItem.inputJax.name)return t.prototype.visitDefault.call(this,e,r);var n=e.childNodes.length&&e.childNodes[0].childNodes.length>1;return r+""},e}(i.SerializedMmlVisitor);e.MmlVisitor=a},4414:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.SelectableInfo=void 0;var i=r(4922),s=r(2165),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.addEvents=function(t){var e=this;t.addEventListener("keypress",(function(t){"a"===t.key&&(t.ctrlKey||t.metaKey)&&(e.selectAll(),e.stop(t))}))},e.prototype.selectAll=function(){document.getSelection().selectAllChildren(this.html.querySelector("pre"))},e.prototype.copyToClipboard=function(){this.selectAll();try{document.execCommand("copy")}catch(t){alert("Can't copy to clipboard: "+t.message)}document.getSelection().removeAllRanges()},e.prototype.generateHtml=function(){var e=this;t.prototype.generateHtml.call(this);var r=this.html.querySelector("span."+s.HtmlClasses.INFOSIGNATURE).appendChild(document.createElement("input"));r.type="button",r.value="Copy to Clipboard",r.addEventListener("click",(function(t){return e.copyToClipboard()}))},e}(i.Info);e.SelectableInfo=a},9923:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.asyncLoad=void 0;var n=r(5713);e.asyncLoad=function(t){return n.mathjax.asyncLoad?new Promise((function(e,r){var o=n.mathjax.asyncLoad(t);o instanceof Promise?o.then((function(t){return e(t)})).catch((function(t){return r(t)})):e(o)})):Promise.reject("Can't load '".concat(t,"': No asyncLoad method specified"))}},6469:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.BBox=void 0;var n=r(6010),o=function(){function t(t){void 0===t&&(t={w:0,h:-n.BIGDIMEN,d:-n.BIGDIMEN}),this.w=t.w||0,this.h="h"in t?t.h:-n.BIGDIMEN,this.d="d"in t?t.d:-n.BIGDIMEN,this.L=this.R=this.ic=this.sk=this.dx=0,this.scale=this.rscale=1,this.pwidth=""}return t.zero=function(){return new t({h:0,d:0,w:0})},t.empty=function(){return new t},t.prototype.empty=function(){return this.w=0,this.h=this.d=-n.BIGDIMEN,this},t.prototype.clean=function(){this.w===-n.BIGDIMEN&&(this.w=0),this.h===-n.BIGDIMEN&&(this.h=0),this.d===-n.BIGDIMEN&&(this.d=0)},t.prototype.rescale=function(t){this.w*=t,this.h*=t,this.d*=t},t.prototype.combine=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var n=t.rscale,o=e+n*(t.w+t.L+t.R),i=r+n*t.h,s=n*t.d-r;o>this.w&&(this.w=o),i>this.h&&(this.h=i),s>this.d&&(this.d=s)},t.prototype.append=function(t){var e=t.rscale;this.w+=e*(t.w+t.L+t.R),e*t.h>this.h&&(this.h=e*t.h),e*t.d>this.d&&(this.d=e*t.d)},t.prototype.updateFrom=function(t){this.h=t.h,this.d=t.d,this.w=t.w,t.pwidth&&(this.pwidth=t.pwidth)},t.fullWidth="100%",t.StyleAdjust=[["borderTopWidth","h"],["borderRightWidth","w"],["borderBottomWidth","d"],["borderLeftWidth","w",0],["paddingTop","h"],["paddingRight","w"],["paddingBottom","d"],["paddingLeft","w",0]],t}();e.BBox=o},6751:function(t,e){var r,n=this&&this.__extends||(r=function(t,e){return r=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])},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 n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},s=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o",gtdot:"\u22d7",harrw:"\u21ad",hbar:"\u210f",hellip:"\u2026",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",imath:"\u0131",infin:"\u221e",intcal:"\u22ba",iota:"\u03b9",jmath:"\u0237",kappa:"\u03ba",kappav:"\u03f0",lEg:"\u2a8b",lambda:"\u03bb",lap:"\u2a85",larrlp:"\u21ab",larrtl:"\u21a2",lbrace:"{",lbrack:"[",le:"\u2264",leftleftarrows:"\u21c7",leftthreetimes:"\u22cb",lessdot:"\u22d6",lmoust:"\u23b0",lnE:"\u2268",lnap:"\u2a89",lne:"\u2a87",lnsim:"\u22e6",longmapsto:"\u27fc",looparrowright:"\u21ac",lowast:"\u2217",loz:"\u25ca",lt:"<",ltimes:"\u22c9",ltri:"\u25c3",macr:"\xaf",malt:"\u2720",mho:"\u2127",mu:"\u03bc",multimap:"\u22b8",nLeftarrow:"\u21cd",nLeftrightarrow:"\u21ce",nRightarrow:"\u21cf",nVDash:"\u22af",nVdash:"\u22ae",natur:"\u266e",nearr:"\u2197",nharr:"\u21ae",nlarr:"\u219a",not:"\xac",nrarr:"\u219b",nu:"\u03bd",nvDash:"\u22ad",nvdash:"\u22ac",nwarr:"\u2196",omega:"\u03c9",omicron:"\u03bf",or:"\u2228",osol:"\u2298",period:".",phi:"\u03c6",phiv:"\u03d5",pi:"\u03c0",piv:"\u03d6",prap:"\u2ab7",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",prime:"\u2032",psi:"\u03c8",quot:'"',rarrtl:"\u21a3",rbrace:"}",rbrack:"]",rho:"\u03c1",rhov:"\u03f1",rightrightarrows:"\u21c9",rightthreetimes:"\u22cc",ring:"\u02da",rmoust:"\u23b1",rtimes:"\u22ca",rtri:"\u25b9",scap:"\u2ab8",scnE:"\u2ab6",scnap:"\u2aba",scnsim:"\u22e9",sdot:"\u22c5",searr:"\u2198",sect:"\xa7",sharp:"\u266f",sigma:"\u03c3",sigmav:"\u03c2",simne:"\u2246",smile:"\u2323",spades:"\u2660",sub:"\u2282",subE:"\u2ac5",subnE:"\u2acb",subne:"\u228a",supE:"\u2ac6",supnE:"\u2acc",supne:"\u228b",swarr:"\u2199",tau:"\u03c4",theta:"\u03b8",thetav:"\u03d1",tilde:"\u02dc",times:"\xd7",triangle:"\u25b5",triangleq:"\u225c",upsi:"\u03c5",upuparrows:"\u21c8",veebar:"\u22bb",vellip:"\u22ee",weierp:"\u2118",xi:"\u03be",yen:"\xa5",zeta:"\u03b6",zigrarr:"\u21dd",nbsp:"\xa0",rsquo:"\u2019",lsquo:"\u2018"};var i={};function s(t,r){if("#"===r.charAt(0))return a(r.slice(1));if(e.entities[r])return e.entities[r];if(e.options.loadMissingEntities){var s=r.match(/^[a-zA-Z](fr|scr|opf)$/)?RegExp.$1:r.charAt(0).toLowerCase();i[s]||(i[s]=!0,(0,n.retryAfter)((0,o.asyncLoad)("./util/entities/"+s+".js")))}return t}function a(t){var e="x"===t.charAt(0)?parseInt(t.slice(1),16):parseInt(t);return String.fromCodePoint(e)}e.add=function(t,r){Object.assign(e.entities,t),i[r]=!0},e.remove=function(t){delete e.entities[t]},e.translate=function(t){return t.replace(/&([a-z][a-z0-9]*|#(?:[0-9]+|x[0-9a-f]+));/gi,s)},e.numeric=a},7525:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},a=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=e.ListItem=e.END=void 0,e.END=Symbol();var s=function(t){void 0===t&&(t=null),this.next=null,this.prev=null,this.data=t};e.ListItem=s;var a=function(){function t(){for(var t=[],r=0;r1;){var l=o.shift(),u=o.shift();l.merge(u,e),o.push(l)}return o.length&&(this.list=o[0].list),this},t.prototype.merge=function(t,r){var o,i,s,a,c;void 0===r&&(r=null),null===r&&(r=this.isBefore.bind(this));for(var l=this.list.next,u=t.list.next;l.data!==e.END&&u.data!==e.END;)r(u.data,l.data)?(o=n([l,u],2),u.prev.next=o[0],l.prev.next=o[1],i=n([l.prev,u.prev],2),u.prev=i[0],l.prev=i[1],s=n([t.list,this.list],2),this.list.prev.next=s[0],t.list.prev.next=s[1],a=n([t.list.prev,this.list.prev],2),this.list.prev=a[0],t.list.prev=a[1],l=(c=n([u.next,l],2))[0],u=c[1]):l=l.next;return u.data!==e.END&&(this.list.prev.next=t.list.next,t.list.next.prev=this.list.prev,t.list.prev.next=this.list,this.list.prev=t.list.prev,t.list.next=t.list.prev=t.list),this},t}();e.LinkedList=a},7233:function(t,e){var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;oe.length}}}},t.prototype.add=function(e,r){void 0===r&&(r=t.DEFAULTPRIORITY);var n=this.items.length;do{n--}while(n>=0&&r=0&&this.items[e].item!==t);e>=0&&this.items.splice(e,1)},t.DEFAULTPRIORITY=5,t}();e.PrioritizedList=r},4542:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.retryAfter=e.handleRetriesFor=void 0,e.handleRetriesFor=function(t){return new Promise((function e(r,n){try{r(t())}catch(t){t.retry&&t.retry instanceof Promise?t.retry.then((function(){return e(r,n)})).catch((function(t){return n(t)})):t.restart&&t.restart.isCallback?MathJax.Callback.After((function(){return e(r,n)}),t.restart):n(t)}}))},e.retryAfter=function(t){var e=new Error("MathJax retry");throw e.retry=t,e}},4139:function(t,e){var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.CssStyles=void 0;var n=function(){function t(t){void 0===t&&(t=null),this.styles={},this.addStyles(t)}return Object.defineProperty(t.prototype,"cssText",{get:function(){return this.getStyleString()},enumerable:!1,configurable:!0}),t.prototype.addStyles=function(t){var e,n;if(t)try{for(var o=r(Object.keys(t)),i=o.next();!i.done;i=o.next()){var s=i.value;this.styles[s]||(this.styles[s]={}),Object.assign(this.styles[s],t[s])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},t.prototype.removeStyles=function(){for(var t,e,n=[],o=0;o=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o1;)e.shift(),r.push(e.shift());return r}function c(t){var e,n,o=a(this.styles[t]);0===o.length&&o.push(""),1===o.length&&o.push(o[0]),2===o.length&&o.push(o[0]),3===o.length&&o.push(o[1]);try{for(var i=r(v.connect[t].children),s=i.next();!s.done;s=i.next()){var c=s.value;this.setStyle(this.childName(t,c),o.shift())}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}}function l(t){var e,n,o=v.connect[t].children,i=[];try{for(var s=r(o),a=s.next();!a.done;a=s.next()){var c=a.value,l=this.styles[t+"-"+c];if(!l)return void delete this.styles[t];i.push(l)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}i[3]===i[1]&&(i.pop(),i[2]===i[0]&&(i.pop(),i[1]===i[0]&&i.pop())),this.styles[t]=i.join(" ")}function u(t){var e,n;try{for(var o=r(v.connect[t].children),i=o.next();!i.done;i=o.next()){var s=i.value;this.setStyle(this.childName(t,s),this.styles[t])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}}function p(t){var e,i,s=o([],n(v.connect[t].children),!1),a=this.styles[this.childName(t,s.shift())];try{for(var c=r(s),l=c.next();!l.done;l=c.next()){var u=l.value;if(this.styles[this.childName(t,u)]!==a)return void delete this.styles[t]}}catch(t){e={error:t}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(e)throw e.error}}this.styles[t]=a}var h=/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,d=/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/;function f(t){var e,n,o,i,s={width:"",style:"",color:""};try{for(var c=r(a(this.styles[t])),l=c.next();!l.done;l=c.next()){var u=l.value;u.match(h)&&""===s.width?s.width=u:u.match(d)&&""===s.style?s.style=u:s.color=u}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}try{for(var p=r(v.connect[t].children),f=p.next();!f.done;f=p.next()){var m=f.value;this.setStyle(this.childName(t,m),s[m])}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}}function m(t){var e,n,o=[];try{for(var i=r(v.connect[t].children),s=i.next();!s.done;s=i.next()){var a=s.value,c=this.styles[this.childName(t,a)];c&&o.push(c)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}o.length?this.styles[t]=o.join(" "):delete this.styles[t]}var y={style:/^(?:normal|italic|oblique|inherit|initial|unset)$/,variant:new RegExp("^(?:"+["normal|none","inherit|initial|unset","common-ligatures|no-common-ligatures","discretionary-ligatures|no-discretionary-ligatures","historical-ligatures|no-historical-ligatures","contextual|no-contextual","(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)","small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","lining-nums|oldstyle-nums|proportional-nums|tabular-nums","diagonal-fractions|stacked-fractions","ordinal|slashed-zero","jis78|jis83|jis90|jis04|simplified|traditional","full-width|proportional-width","ruby"].join("|")+")$"),weight:/^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,stretch:new RegExp("^(?:"+["normal","(?:(?:ultra|extra|semi)-)?condensed","(?:(?:semi|extra|ulta)-)?expanded","inherit|initial|unset"].join("|")+")$"),size:new RegExp("^(?:"+["xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller","[d.]+%|[d.]+[a-z]+","inherit|initial|unset"].join("|")+")(?:/(?:normal|[d.+](?:%|[a-z]+)?))?$")};function g(t){var e,o,i,s,c=a(this.styles[t]),l={style:"",variant:[],weight:"",stretch:"",size:"",family:"","line-height":""};try{for(var u=r(c),p=u.next();!p.done;p=u.next()){var h=p.value;l.family=h;try{for(var d=(i=void 0,r(Object.keys(y))),f=d.next();!f.done;f=d.next()){var m=f.value;if((Array.isArray(l[m])||""===l[m])&&h.match(y[m]))if("size"===m){var g=n(h.split(/\//),2),b=g[0],_=g[1];l[m]=b,_&&(l["line-height"]=_)}else""===l.size&&(Array.isArray(l[m])?l[m].push(h):l[m]=h)}}catch(t){i={error:t}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(i)throw i.error}}}}catch(t){e={error:t}}finally{try{p&&!p.done&&(o=u.return)&&o.call(u)}finally{if(e)throw e.error}}!function(t,e){var n,o;try{for(var i=r(v.connect[t].children),s=i.next();!s.done;s=i.next()){var a=s.value,c=this.childName(t,a);if(Array.isArray(e[a])){var l=e[a];l.length&&(this.styles[c]=l.join(" "))}else""!==e[a]&&(this.styles[c]=e[a])}}catch(t){n={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}}(t,l),delete this.styles[t]}function b(t){}var v=function(){function t(t){void 0===t&&(t=""),this.parse(t)}return Object.defineProperty(t.prototype,"cssText",{get:function(){var t,e,n=[];try{for(var o=r(Object.keys(this.styles)),i=o.next();!i.done;i=o.next()){var s=i.value,a=this.parentName(s);this.styles[a]||n.push(s+": "+this.styles[s]+";")}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n.join(" ")},enumerable:!1,configurable:!0}),t.prototype.set=function(e,r){for(e=this.normalizeName(e),this.setStyle(e,r),t.connect[e]&&!t.connect[e].combine&&(this.combineChildren(e),delete this.styles[e]);e.match(/-/)&&(e=this.parentName(e),t.connect[e]);)t.connect[e].combine.call(this,e)},t.prototype.get=function(t){return t=this.normalizeName(t),this.styles.hasOwnProperty(t)?this.styles[t]:""},t.prototype.setStyle=function(e,r){this.styles[e]=r,t.connect[e]&&t.connect[e].children&&t.connect[e].split.call(this,e),""===r&&delete this.styles[e]},t.prototype.combineChildren=function(e){var n,o,i=this.parentName(e);try{for(var s=r(t.connect[e].children),a=s.next();!a.done;a=s.next()){var c=a.value,l=this.childName(i,c);t.connect[l].combine.call(this,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},t.prototype.parentName=function(t){var e=t.replace(/-[^-]*$/,"");return t===e?"":e},t.prototype.childName=function(e,r){return r.match(/-/)?r:(t.connect[e]&&!t.connect[e].combine&&(r+=e.replace(/.*-/,"-"),e=this.parentName(e)),e+"-"+r)},t.prototype.normalizeName=function(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))},t.prototype.parse=function(t){void 0===t&&(t="");var e=this.constructor.pattern;this.styles={};for(var r=t.replace(e.comment,"").split(e.style);r.length>1;){var o=n(r.splice(0,3),3),i=o[0],s=o[1],a=o[2];if(i.match(/[^\s\n]/))return;this.set(s,a)}},t.pattern={style:/([-a-z]+)[\s\n]*:[\s\n]*((?:'[^']*'|"[^"]*"|\n|.)*?)[\s\n]*(?:;|$)/g,comment:/\/\*[^]*?\*\//g},t.connect={padding:{children:i,split:c,combine:l},border:{children:i,split:u,combine:p},"border-top":{children:s,split:f,combine:m},"border-right":{children:s,split:f,combine:m},"border-bottom":{children:s,split:f,combine:m},"border-left":{children:s,split:f,combine:m},"border-width":{children:i,split:c,combine:null},"border-style":{children:i,split:c,combine:null},"border-color":{children:i,split:c,combine:null},font:{children:["style","variant","weight","stretch","line-height","size","family"],split:g,combine:b}},t}();e.Styles=v},6010:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.px=e.emRounded=e.em=e.percent=e.length2em=e.MATHSPACE=e.RELUNITS=e.UNITS=e.BIGDIMEN=void 0,e.BIGDIMEN=1e6,e.UNITS={px:1,in:96,cm:96/2.54,mm:96/25.4},e.RELUNITS={em:1,ex:.431,pt:.1,pc:1.2,mu:1/18},e.MATHSPACE={veryverythinmathspace:1/18,verythinmathspace:2/18,thinmathspace:3/18,mediummathspace:4/18,thickmathspace:5/18,verythickmathspace:6/18,veryverythickmathspace:7/18,negativeveryverythinmathspace:-1/18,negativeverythinmathspace:-2/18,negativethinmathspace:-3/18,negativemediummathspace:-4/18,negativethickmathspace:-5/18,negativeverythickmathspace:-6/18,negativeveryverythickmathspace:-7/18,thin:.04,medium:.06,thick:.1,normal:1,big:2,small:1/Math.sqrt(2),infinity:e.BIGDIMEN},e.length2em=function(t,r,n,o){if(void 0===r&&(r=0),void 0===n&&(n=1),void 0===o&&(o=16),"string"!=typeof t&&(t=String(t)),""===t||null==t)return r;if(e.MATHSPACE[t])return e.MATHSPACE[t];var i=t.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);if(!i)return r;var s=parseFloat(i[1]||"1"),a=i[2];return e.UNITS.hasOwnProperty(a)?s*e.UNITS[a]/o/n:e.RELUNITS.hasOwnProperty(a)?s*e.RELUNITS[a]:"%"===a?s/100*r:s*r},e.percent=function(t){return(100*t).toFixed(1).replace(/\.?0+$/,"")+"%"},e.em=function(t){return Math.abs(t)<.001?"0":t.toFixed(3).replace(/\.?0+$/,"")+"em"},e.emRounded=function(t,e){return void 0===e&&(e=16),t=(Math.round(t*e)+.05)/e,Math.abs(t)<.001?"0em":t.toFixed(3).replace(/\.?0+$/,"")+"em"},e.px=function(t,r,n){return void 0===r&&(r=-e.BIGDIMEN),void 0===n&&(n=16),t*=n,r&&t0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},n=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractItem=void 0;var s=r(9329),a=r(2556),c=r(2165),l=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i._content=n,i.disabled=!1,i.callbacks=[],i._id=o||n,i}return o(e,t),Object.defineProperty(e.prototype,"content",{get:function(){return this._content},set:function(t){this._content=t,this.generateHtml(),this.menu&&this.menu.generateHtml()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.press=function(){this.disabled||(this.executeAction(),this.executeCallbacks_())},e.prototype.executeAction=function(){},e.prototype.registerCallback=function(t){-1===this.callbacks.indexOf(t)&&this.callbacks.push(t)},e.prototype.unregisterCallback=function(t){var e=this.callbacks.indexOf(t);-1!==e&&this.callbacks.splice(e,1)},e.prototype.mousedown=function(t){this.press(),this.stop(t)},e.prototype.mouseover=function(t){this.focus(),this.stop(t)},e.prototype.mouseout=function(t){this.deactivate(),this.stop(t)},e.prototype.generateHtml=function(){t.prototype.generateHtml.call(this);var e=this.html;e.setAttribute("aria-disabled","false"),e.textContent=this.content},e.prototype.activate=function(){this.disabled||this.html.classList.add(c.HtmlClasses.MENUACTIVE)},e.prototype.deactivate=function(){this.html.classList.remove(c.HtmlClasses.MENUACTIVE)},e.prototype.focus=function(){this.menu.focused=this,t.prototype.focus.call(this),this.activate()},e.prototype.unfocus=function(){this.deactivate(),t.prototype.unfocus.call(this)},e.prototype.escape=function(t){a.MenuUtil.close(this)},e.prototype.up=function(t){this.menu.up(t)},e.prototype.down=function(t){this.menu.down(t)},e.prototype.left=function(t){this.menu.left(t)},e.prototype.right=function(t){this.menu.right(t)},e.prototype.space=function(t){this.press()},e.prototype.disable=function(){this.disabled=!0;var t=this.html;t.classList.add(c.HtmlClasses.MENUDISABLED),t.setAttribute("aria-disabled","true")},e.prototype.enable=function(){this.disabled=!1;var t=this.html;t.classList.remove(c.HtmlClasses.MENUDISABLED),t.removeAttribute("aria-disabled")},e.prototype.executeCallbacks_=function(){var t,e;try{for(var r=i(this.callbacks),n=r.next();!n.done;n=r.next()){var o=n.value;try{o(this)}catch(t){a.MenuUtil.error(t,"Callback for menu entry "+this.id+" failed.")}}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e}(s.AbstractEntry);e.AbstractItem=l},1484:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMenu=void 0;var s=r(8372),a=r(1340),c=r(2165),l=r(6186),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.className=c.HtmlClasses.CONTEXTMENU,e.role="menu",e._items=[],e._baseMenu=null,e}return o(e,t),Object.defineProperty(e.prototype,"baseMenu",{get:function(){return this._baseMenu},set:function(t){this._baseMenu=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._items},set:function(t){this._items=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pool",{get:function(){return this.variablePool},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){return this._focused},set:function(t){if(this._focused!==t){this._focused||this.unfocus();var e=this._focused;this._focused=t,e&&e.unfocus()}},enumerable:!1,configurable:!0}),e.prototype.up=function(t){var e=this.items.filter((function(t){return t instanceof a.AbstractItem&&!t.isHidden()}));if(0!==e.length)if(this.focused){var r=e.indexOf(this.focused);-1!==r&&e[r=r?--r:e.length-1].focus()}else e[e.length-1].focus()},e.prototype.down=function(t){var e=this.items.filter((function(t){return t instanceof a.AbstractItem&&!t.isHidden()}));if(0!==e.length)if(this.focused){var r=e.indexOf(this.focused);-1!==r&&e[r=++r===e.length?0:r].focus()}else e[0].focus()},e.prototype.generateHtml=function(){t.prototype.generateHtml.call(this),this.generateMenu()},e.prototype.generateMenu=function(){var t,e,r=this.html;r.classList.add(c.HtmlClasses.MENU);try{for(var n=i(this.items),o=n.next();!o.done;o=n.next()){var s=o.value;if(s.isHidden()){var a=s.html;a.parentNode&&a.parentNode.removeChild(a)}else r.appendChild(s.html)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.post=function(e,r){this.variablePool.update(),t.prototype.post.call(this,e,r)},e.prototype.unpostSubmenus=function(){var t,e,r=this.items.filter((function(t){return t instanceof l.Submenu}));try{for(var n=i(r),o=n.next();!o.done;o=n.next()){var s=o.value;s.submenu.unpost(),s!==this.focused&&s.unfocus()}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.unpost=function(){t.prototype.unpost.call(this),this.unpostSubmenus(),this.focused=null},e.prototype.find=function(t){var e,r;try{for(var n=i(this.items),o=n.next();!o.done;o=n.next()){var s=o.value;if("rule"!==s.type){if(s.id===t)return s;if("submenu"===s.type){var a=s.submenu.find(t);if(a)return a}}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return null},e}(s.AbstractPostable);e.AbstractMenu=u},2868:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractNavigatable=void 0;var n=r(3205),o=r(8853),i=function(){function t(){this.bubble=!1}return t.prototype.bubbleKey=function(){this.bubble=!0},t.prototype.keydown=function(t){switch(t.keyCode){case n.KEY.ESCAPE:this.escape(t);break;case n.KEY.RIGHT:this.right(t);break;case n.KEY.LEFT:this.left(t);break;case n.KEY.UP:this.up(t);break;case n.KEY.DOWN:this.down(t);break;case n.KEY.RETURN:case n.KEY.SPACE:this.space(t);break;default:return}this.bubble?this.bubble=!1:this.stop(t)},t.prototype.escape=function(t){},t.prototype.space=function(t){},t.prototype.left=function(t){},t.prototype.right=function(t){},t.prototype.up=function(t){},t.prototype.down=function(t){},t.prototype.stop=function(t){t&&(t.stopPropagation(),t.preventDefault(),t.cancelBubble=!0)},t.prototype.mousedown=function(t){return this.stop(t)},t.prototype.mouseup=function(t){return this.stop(t)},t.prototype.mouseover=function(t){return this.stop(t)},t.prototype.mouseout=function(t){return this.stop(t)},t.prototype.click=function(t){return this.stop(t)},t.prototype.addEvents=function(t){t.addEventListener(o.MOUSE.DOWN,this.mousedown.bind(this)),t.addEventListener(o.MOUSE.UP,this.mouseup.bind(this)),t.addEventListener(o.MOUSE.OVER,this.mouseover.bind(this)),t.addEventListener(o.MOUSE.OUT,this.mouseout.bind(this)),t.addEventListener(o.MOUSE.CLICK,this.click.bind(this)),t.addEventListener("keydown",this.keydown.bind(this)),t.addEventListener("dragstart",this.stop.bind(this)),t.addEventListener(o.MOUSE.SELECTSTART,this.stop.bind(this)),t.addEventListener("contextmenu",this.stop.bind(this)),t.addEventListener(o.MOUSE.DBLCLICK,this.stop.bind(this))},t}();e.AbstractNavigatable=i},8372:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractPostable=void 0;var i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.posted=!1,e}return o(e,t),e.prototype.isPosted=function(){return this.posted},e.prototype.post=function(t,e){this.posted||(void 0!==t&&void 0!==e&&this.html.setAttribute("style","left: "+t+"px; top: "+e+"px;"),this.display(),this.posted=!0)},e.prototype.unpost=function(){if(this.posted){var t=this.html;t.parentNode&&t.parentNode.removeChild(t),this.posted=!1}},e}(r(9328).MenuElement);e.AbstractPostable=i},6765:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractVariableItem=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.generateHtml=function(){t.prototype.generateHtml.call(this);var e=this.html;this.span||this.generateSpan(),e.appendChild(this.span),this.update()},e.prototype.register=function(){this.variable.register(this)},e.prototype.unregister=function(){this.variable.unregister(this)},e.prototype.update=function(){this.updateAria(),this.span&&this.updateSpan()},e}(r(1340).AbstractItem);e.AbstractVariableItem=i},5179:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CloseButton=void 0;var i=r(8372),s=r(2165),a=function(t){function e(e){var r=t.call(this)||this;return r.element=e,r.className=s.HtmlClasses.MENUCLOSE,r.role="button",r}return o(e,t),e.prototype.generateHtml=function(){var t=document.createElement("span");t.classList.add(this.className),t.setAttribute("role",this.role),t.setAttribute("tabindex","0");var e=document.createElement("span");e.textContent="\xd7",t.appendChild(e),this.html=t},e.prototype.display=function(){},e.prototype.unpost=function(){t.prototype.unpost.call(this),this.element.unpost()},e.prototype.keydown=function(e){this.bubbleKey(),t.prototype.keydown.call(this,e)},e.prototype.space=function(t){this.unpost(),this.stop(t)},e.prototype.mousedown=function(t){this.unpost(),this.stop(t)},e}(i.AbstractPostable);e.CloseButton=a},5073:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenu=void 0;var i=r(1484),s=r(2165),a=r(1932),c=r(2358),l=function(t){function e(e){var r=t.call(this)||this;return r.factory=e,r.id="",r.moving=!1,r._store=new a.MenuStore(r),r.widgets=[],r.variablePool=new c.VariablePool,r}return o(e,t),e.fromJson=function(t,e){var r=e.pool,n=e.items,o=e.id,i=void 0===o?"":o,s=new this(t);s.id=i;var a=t.get("variable");r.forEach((function(e){return a(t,e,s.pool)}));var c=t.get("items")(t,n,s);return s.items=c,s},e.prototype.generateHtml=function(){this.isPosted()&&this.unpost(),t.prototype.generateHtml.call(this),this._frame=document.createElement("div"),this._frame.classList.add(s.HtmlClasses.MENUFRAME);var e="left: 0px; top: 0px; z-index: 200; width: 100%; height: 100%; border: 0px; padding: 0px; margin: 0px;";this._frame.setAttribute("style","position: absolute; "+e);var r=document.createElement("div");r.setAttribute("style","position: fixed; "+e),this._frame.appendChild(r),r.addEventListener("mousedown",function(t){this.unpost(),this.unpostWidgets(),this.stop(t)}.bind(this))},e.prototype.display=function(){document.body.appendChild(this.frame),this.frame.appendChild(this.html),this.focus()},e.prototype.escape=function(t){this.unpost(),this.unpostWidgets()},e.prototype.unpost=function(){if(t.prototype.unpost.call(this),!(this.widgets.length>0)){this.frame.parentNode.removeChild(this.frame);var e=this.store;this.moving||e.insertTaborder(),e.active.focus()}},e.prototype.left=function(t){this.move_(this.store.previous())},e.prototype.right=function(t){this.move_(this.store.next())},Object.defineProperty(e.prototype,"frame",{get:function(){return this._frame},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"store",{get:function(){return this._store},enumerable:!1,configurable:!0}),e.prototype.post=function(e,r){if(void 0!==r)return this.moving||this.store.removeTaborder(),void t.prototype.post.call(this,e,r);var n,o,i,s=e;if(s instanceof Event?(n=s.target,this.stop(s)):n=s,s instanceof MouseEvent&&(o=s.pageX,i=s.pageY,o||i||!s.clientX||(o=s.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,i=s.clientY+document.body.scrollTop+document.documentElement.scrollTop)),!o&&!i&&n){var a=window.pageXOffset||document.documentElement.scrollLeft,c=window.pageYOffset||document.documentElement.scrollTop,l=n.getBoundingClientRect();o=(l.right+l.left)/2+a,i=(l.bottom+l.top)/2+c}this.store.active=n,this.anchor=this.store.active;var u=this.html;o+u.offsetWidth>document.body.offsetWidth-5&&(o=document.body.offsetWidth-u.offsetWidth-5),this.post(o,i)},e.prototype.registerWidget=function(t){this.widgets.push(t)},e.prototype.unregisterWidget=function(t){var e=this.widgets.indexOf(t);e>-1&&this.widgets.splice(e,1),0===this.widgets.length&&this.unpost()},e.prototype.unpostWidgets=function(){this.widgets.forEach((function(t){return t.unpost()}))},e.prototype.toJson=function(){return{type:""}},e.prototype.move_=function(t){this.anchor&&t!==this.anchor&&(this.moving=!0,this.unpost(),this.post(t),this.moving=!1)},e}(i.AbstractMenu);e.ContextMenu=l},7309:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CssStyles=void 0;var n=r(2165);!function(t){function e(t){return"."+(n.HtmlClasses[t]||t)}var r={};r[e("INFOCLOSE")]="{ top:.2em; right:.2em;}",r[e("INFOCONTENT")]="{ overflow:auto; text-align:left; font-size:80%; padding:.4em .6em; border:1px inset; margin:1em 0px; max-height:20em; max-width:30em; background-color:#EEEEEE; white-space:normal;}",r[e("INFO")+e("MOUSEPOST")]="{outline:none;}",r[e("INFO")]='{ position:fixed; left:50%; width:auto; text-align:center; border:3px outset; padding:1em 2em; background-color:#DDDDDD; color:black; cursor:default; font-family:message-box; font-size:120%; font-style:normal; text-indent:0; text-transform:none; line-height:normal; letter-spacing:normal; word-spacing:normal; word-wrap:normal; white-space:nowrap; float:none; z-index:201; border-radius: 15px; /* Opera 10.5 and IE9 */ -webkit-border-radius:15px; /* Safari and Chrome */ -moz-border-radius:15px; /* Firefox */ -khtml-border-radius:15px; /* Konqueror */ box-shadow:0px 10px 20px #808080; /* Opera 10.5 and IE9 */ -webkit-box-shadow:0px 10px 20px #808080; /* Safari 3 & Chrome */ -moz-box-shadow:0px 10px 20px #808080; /* Forefox 3.5 */ -khtml-box-shadow:0px 10px 20px #808080; /* Konqueror */ filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color="gray", Positive="true"); /* IE */}';var o={};o[e("MENU")]="{ position:absolute; background-color:white; color:black; width:auto; padding:5px 0px; border:1px solid #CCCCCC; margin:0; cursor:default; font: menu; text-align:left; text-indent:0; text-transform:none; line-height:normal; letter-spacing:normal; word-spacing:normal; word-wrap:normal; white-space:nowrap; float:none; z-index:201; border-radius: 5px; /* Opera 10.5 and IE9 */ -webkit-border-radius: 5px; /* Safari and Chrome */ -moz-border-radius: 5px; /* Firefox */ -khtml-border-radius: 5px; /* Konqueror */ box-shadow:0px 10px 20px #808080; /* Opera 10.5 and IE9 */ -webkit-box-shadow:0px 10px 20px #808080; /* Safari 3 & Chrome */ -moz-box-shadow:0px 10px 20px #808080; /* Forefox 3.5 */ -khtml-box-shadow:0px 10px 20px #808080; /* Konqueror */}",o[e("MENUITEM")]="{ padding: 1px 2em; background:transparent;}",o[e("MENUARROW")]="{ position:absolute; right:.5em; padding-top:.25em; color:#666666; font-family: null; font-size: .75em}",o[e("MENUACTIVE")+" "+e("MENUARROW")]="{color:white}",o[e("MENUARROW")+e("RTL")]="{left:.5em; right:auto}",o[e("MENUCHECK")]="{ position:absolute; left:.7em; font-family: null}",o[e("MENUCHECK")+e("RTL")]="{ right:.7em; left:auto }",o[e("MENURADIOCHECK")]="{ position:absolute; left: .7em;}",o[e("MENURADIOCHECK")+e("RTL")]="{ right: .7em; left:auto}",o[e("MENUINPUTBOX")]="{ padding-left: 1em; right:.5em; color:#666666; font-family: null;}",o[e("MENUINPUTBOX")+e("RTL")]="{ left: .1em;}",o[e("MENUCOMBOBOX")]="{ left:.1em; padding-bottom:.5em;}",o[e("MENUSLIDER")]="{ left: .1em;}",o[e("SLIDERVALUE")]="{ position:absolute; right:.1em; padding-top:.25em; color:#333333; font-size: .75em}",o[e("SLIDERBAR")]="{ outline: none; background: #d3d3d3}",o[e("MENULABEL")]="{ padding: 1px 2em 3px 1.33em; font-style:italic}",o[e("MENURULE")]="{ border-top: 1px solid #DDDDDD; margin: 4px 3px;}",o[e("MENUDISABLED")]="{ color:GrayText}",o[e("MENUACTIVE")]="{ background-color: #606872; color: white;}",o[e("MENUDISABLED")+":focus"]="{ background-color: #E8E8E8}",o[e("MENULABEL")+":focus"]="{ background-color: #E8E8E8}",o[e("CONTEXTMENU")+":focus"]="{ outline:none}",o[e("CONTEXTMENU")+" "+e("MENUITEM")+":focus"]="{ outline:none}",o[e("SELECTIONMENU")]="{ position:relative; float:left; border-bottom: none; -webkit-box-shadow:none; -webkit-border-radius:0px; }",o[e("SELECTIONITEM")]="{ padding-right: 1em;}",o[e("SELECTION")]="{ right: 40%; width:50%; }",o[e("SELECTIONBOX")]="{ padding: 0em; max-height:20em; max-width: none; background-color:#FFFFFF;}",o[e("SELECTIONDIVIDER")]="{ clear: both; border-top: 2px solid #000000;}",o[e("MENU")+" "+e("MENUCLOSE")]="{ top:-10px; left:-10px}";var i={};i[e("MENUCLOSE")]='{ position:absolute; cursor:pointer; display:inline-block; border:2px solid #AAA; border-radius:18px; -webkit-border-radius: 18px; /* Safari and Chrome */ -moz-border-radius: 18px; /* Firefox */ -khtml-border-radius: 18px; /* Konqueror */ font-family: "Courier New", Courier; font-size:24px; color:#F0F0F0}',i[e("MENUCLOSE")+" span"]="{ display:block; background-color:#AAA; border:1.5px solid; border-radius:18px; -webkit-border-radius: 18px; /* Safari and Chrome */ -moz-border-radius: 18px; /* Firefox */ -khtml-border-radius: 18px; /* Konqueror */ line-height:0; padding:8px 0 6px /* may need to be browser-specific */}",i[e("MENUCLOSE")+":hover"]="{ color:white!important; border:2px solid #CCC!important}",i[e("MENUCLOSE")+":hover span"]="{ background-color:#CCC!important}",i[e("MENUCLOSE")+":hover:focus"]="{ outline:none}";var s=!1,a=!1,c=!1;function l(t){c||(u(i,t),c=!0)}function u(t,e){var r=e||document,n=r.createElement("style");n.type="text/css";var o="";for(var i in t)o+=i,o+=" ",o+=t[i],o+="\n";n.innerHTML=o,r.head.appendChild(n)}t.addMenuStyles=function(t){a||(u(o,t),a=!0,l(t))},t.addInfoStyles=function(t){s||(u(r,t),s=!0,l(t))}}(e.CssStyles||(e.CssStyles={}))},2165:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.HtmlAttrs=e.HtmlClasses=void 0;function r(t){return"CtxtMenu_"+t}function n(t){return r(t)}function o(t){return r(t)}e.HtmlClasses={ATTACHED:n("Attached"),CONTEXTMENU:n("ContextMenu"),MENU:n("Menu"),MENUARROW:n("MenuArrow"),MENUACTIVE:n("MenuActive"),MENUCHECK:n("MenuCheck"),MENUCLOSE:n("MenuClose"),MENUCOMBOBOX:n("MenuComboBox"),MENUDISABLED:n("MenuDisabled"),MENUFRAME:n("MenuFrame"),MENUITEM:n("MenuItem"),MENULABEL:n("MenuLabel"),MENURADIOCHECK:n("MenuRadioCheck"),MENUINPUTBOX:n("MenuInputBox"),MENURULE:n("MenuRule"),MENUSLIDER:n("MenuSlider"),MOUSEPOST:n("MousePost"),RTL:n("RTL"),INFO:n("Info"),INFOCLOSE:n("InfoClose"),INFOCONTENT:n("InfoContent"),INFOSIGNATURE:n("InfoSignature"),INFOTITLE:n("InfoTitle"),SLIDERVALUE:n("SliderValue"),SLIDERBAR:n("SliderBar"),SELECTION:n("Selection"),SELECTIONBOX:n("SelectionBox"),SELECTIONMENU:n("SelectionMenu"),SELECTIONDIVIDER:n("SelectionDivider"),SELECTIONITEM:n("SelectionItem")},e.HtmlAttrs={COUNTER:o("Counter"),KEYDOWNFUNC:o("keydownFunc"),CONTEXTMENUFUNC:o("contextmenuFunc"),OLDTAB:o("Oldtabindex"),TOUCHFUNC:o("TouchFunc")}},4922:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.Info=void 0;var i=r(5179),s=r(2165),a=function(t){function e(e,r,n){var o=t.call(this)||this;return o.title=e,o.signature=n,o.className=s.HtmlClasses.INFO,o.role="dialog",o.contentDiv=o.generateContent(),o.close=o.generateClose(),o.content=r||function(){return""},o}return o(e,t),e.prototype.attachMenu=function(t){this.menu=t},e.prototype.generateHtml=function(){t.prototype.generateHtml.call(this);var e=this.html;e.appendChild(this.generateTitle()),e.appendChild(this.contentDiv),e.appendChild(this.generateSignature()),e.appendChild(this.close.html),e.setAttribute("tabindex","0")},e.prototype.post=function(){t.prototype.post.call(this);var e=document.documentElement,r=this.html,n=window.innerHeight||e.clientHeight||e.scrollHeight||0,o=Math.floor(-r.offsetWidth/2),i=Math.floor((n-r.offsetHeight)/3);r.setAttribute("style","margin-left: "+o+"px; top: "+i+"px;"),window.event instanceof MouseEvent&&r.classList.add(s.HtmlClasses.MOUSEPOST),r.focus()},e.prototype.display=function(){this.menu.registerWidget(this),this.contentDiv.innerHTML=this.content();var t=this.menu.html;t.parentNode&&t.parentNode.removeChild(t),this.menu.frame.appendChild(this.html)},e.prototype.click=function(t){},e.prototype.keydown=function(e){this.bubbleKey(),t.prototype.keydown.call(this,e)},e.prototype.escape=function(t){this.unpost()},e.prototype.unpost=function(){t.prototype.unpost.call(this),this.html.classList.remove(s.HtmlClasses.MOUSEPOST),this.menu.unregisterWidget(this)},e.prototype.generateClose=function(){var t=new i.CloseButton(this),e=t.html;return e.classList.add(s.HtmlClasses.INFOCLOSE),e.setAttribute("aria-label","Close Dialog Box"),t},e.prototype.generateTitle=function(){var t=document.createElement("span");return t.innerHTML=this.title,t.classList.add(s.HtmlClasses.INFOTITLE),t},e.prototype.generateContent=function(){var t=document.createElement("div");return t.classList.add(s.HtmlClasses.INFOCONTENT),t.setAttribute("tabindex","0"),t},e.prototype.generateSignature=function(){var t=document.createElement("span");return t.innerHTML=this.signature,t.classList.add(s.HtmlClasses.INFOSIGNATURE),t},e.prototype.toJson=function(){return{type:""}},e}(r(8372).AbstractPostable);e.Info=a},1409:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.Checkbox=void 0;var i=r(6765),s=r(2556),a=r(2165),c=function(t){function e(e,r,n,o){var i=t.call(this,e,"checkbox",r,o)||this;return i.role="menuitemcheckbox",i.variable=e.pool.lookup(n),i.register(),i}return o(e,t),e.fromJson=function(t,e,r){return new this(r,e.content,e.variable,e.id)},e.prototype.executeAction=function(){this.variable.setValue(!this.variable.getValue()),s.MenuUtil.close(this)},e.prototype.generateSpan=function(){this.span=document.createElement("span"),this.span.textContent="\u2713",this.span.classList.add(a.HtmlClasses.MENUCHECK)},e.prototype.updateAria=function(){this.html.setAttribute("aria-checked",this.variable.getValue()?"true":"false")},e.prototype.updateSpan=function(){this.span.style.display=this.variable.getValue()?"":"none"},e.prototype.toJson=function(){return{type:""}},e}(i.AbstractVariableItem);e.Checkbox=c},9886:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.Combo=void 0;var i=r(6765),s=r(2556),a=r(2165),c=r(3205),l=function(t){function e(e,r,n,o){var i=t.call(this,e,"combobox",r,o)||this;return i.role="combobox",i.inputEvent=!1,i.variable=e.pool.lookup(n),i.register(),i}return o(e,t),e.fromJson=function(t,e,r){return new this(r,e.content,e.variable,e.id)},e.prototype.executeAction=function(){this.variable.setValue(this.input.value,s.MenuUtil.getActiveElement(this))},e.prototype.space=function(e){t.prototype.space.call(this,e),s.MenuUtil.close(this)},e.prototype.focus=function(){t.prototype.focus.call(this),this.input.focus()},e.prototype.unfocus=function(){t.prototype.unfocus.call(this),this.updateSpan()},e.prototype.generateHtml=function(){t.prototype.generateHtml.call(this),this.html.classList.add(a.HtmlClasses.MENUCOMBOBOX)},e.prototype.generateSpan=function(){this.span=document.createElement("span"),this.span.classList.add(a.HtmlClasses.MENUINPUTBOX),this.input=document.createElement("input"),this.input.addEventListener("keydown",this.inputKey.bind(this)),this.input.setAttribute("size","10em"),this.input.setAttribute("type","text"),this.input.setAttribute("tabindex","-1"),this.span.appendChild(this.input)},e.prototype.inputKey=function(t){this.bubbleKey(),this.inputEvent=!0},e.prototype.keydown=function(e){if(this.inputEvent&&e.keyCode!==c.KEY.ESCAPE&&e.keyCode!==c.KEY.RETURN)return this.inputEvent=!1,void e.stopPropagation();t.prototype.keydown.call(this,e),e.stopPropagation()},e.prototype.updateAria=function(){},e.prototype.updateSpan=function(){var t;try{t=this.variable.getValue(s.MenuUtil.getActiveElement(this))}catch(e){t=""}this.input.value=t},e.prototype.toJson=function(){return{type:""}},e}(i.AbstractVariableItem);e.Combo=l},3467:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.Command=void 0;var i=r(1340),s=r(2556),a=function(t){function e(e,r,n,o){var i=t.call(this,e,"command",r,o)||this;return i.command=n,i}return o(e,t),e.fromJson=function(t,e,r){return new this(r,e.content,e.action,e.id)},e.prototype.executeAction=function(){try{this.command(s.MenuUtil.getActiveElement(this))}catch(t){s.MenuUtil.error(t,"Illegal command callback.")}s.MenuUtil.close(this)},e.prototype.toJson=function(){return{type:""}},e}(i.AbstractItem);e.Command=a},2965:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.Label=void 0;var i=r(1340),s=r(2165),a=function(t){function e(e,r,n){return t.call(this,e,"label",r,n)||this}return o(e,t),e.fromJson=function(t,e,r){return new this(r,e.content,e.id)},e.prototype.generateHtml=function(){t.prototype.generateHtml.call(this),this.html.classList.add(s.HtmlClasses.MENULABEL)},e.prototype.toJson=function(){return{type:""}},e}(i.AbstractItem);e.Label=a},385:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.Radio=void 0;var i=r(6765),s=r(2556),a=r(2165),c=function(t){function e(e,r,n,o){var i=t.call(this,e,"radio",r,o)||this;return i.role="menuitemradio",i.variable=e.pool.lookup(n),i.register(),i}return o(e,t),e.fromJson=function(t,e,r){return new this(r,e.content,e.variable,e.id)},e.prototype.executeAction=function(){this.variable.setValue(this.id),s.MenuUtil.close(this)},e.prototype.generateSpan=function(){this.span=document.createElement("span"),this.span.textContent="\u2713",this.span.classList.add(a.HtmlClasses.MENURADIOCHECK)},e.prototype.updateAria=function(){this.html.setAttribute("aria-checked",this.variable.getValue()===this.id?"true":"false")},e.prototype.updateSpan=function(){this.span.style.display=this.variable.getValue()===this.id?"":"none"},e.prototype.toJson=function(){return{type:""}},e}(i.AbstractVariableItem);e.Radio=c},3463:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.Rule=void 0;var i=r(9329),s=r(2165),a=function(t){function e(e){var r=t.call(this,e,"rule")||this;return r.className=s.HtmlClasses.MENUITEM,r.role="separator",r}return o(e,t),e.fromJson=function(t,e,r){return new this(r)},e.prototype.generateHtml=function(){t.prototype.generateHtml.call(this);var e=this.html;e.classList.add(s.HtmlClasses.MENURULE),e.setAttribute("aria-orientation","vertical")},e.prototype.addEvents=function(t){},e.prototype.toJson=function(){return{type:"rule"}},e}(i.AbstractEntry);e.Rule=a},7625:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.Slider=void 0;var i=r(6765),s=r(2556),a=r(2165),c=r(3205),l=function(t){function e(e,r,n,o){var i=t.call(this,e,"slider",r,o)||this;return i.role="slider",i.labelId="ctx_slideLabel"+s.MenuUtil.counter(),i.valueId="ctx_slideValue"+s.MenuUtil.counter(),i.inputEvent=!1,i.variable=e.pool.lookup(n),i.register(),i}return o(e,t),e.fromJson=function(t,e,r){return new this(r,e.content,e.variable,e.id)},e.prototype.executeAction=function(){this.variable.setValue(this.input.value,s.MenuUtil.getActiveElement(this)),this.update()},e.prototype.space=function(e){t.prototype.space.call(this,e),s.MenuUtil.close(this)},e.prototype.focus=function(){t.prototype.focus.call(this),this.input.focus()},e.prototype.unfocus=function(){t.prototype.unfocus.call(this),this.updateSpan()},e.prototype.generateHtml=function(){t.prototype.generateHtml.call(this),this.html.classList.add(a.HtmlClasses.MENUSLIDER),this.valueSpan=document.createElement("span"),this.valueSpan.setAttribute("id",this.valueId),this.valueSpan.classList.add(a.HtmlClasses.SLIDERVALUE),this.html.appendChild(this.valueSpan)},e.prototype.generateSpan=function(){this.span=document.createElement("span"),this.labelSpan=document.createElement("span"),this.labelSpan.setAttribute("id",this.labelId),this.labelSpan.appendChild(this.html.childNodes[0]),this.html.appendChild(this.labelSpan),this.input=document.createElement("input"),this.input.setAttribute("type","range"),this.input.setAttribute("min","0"),this.input.setAttribute("max","100"),this.input.setAttribute("aria-valuemin","0"),this.input.setAttribute("aria-valuemax","100"),this.input.setAttribute("aria-labelledby",this.labelId),this.input.addEventListener("keydown",this.inputKey.bind(this)),this.input.addEventListener("input",this.executeAction.bind(this)),this.input.classList.add(a.HtmlClasses.SLIDERBAR),this.span.appendChild(this.input)},e.prototype.inputKey=function(t){this.inputEvent=!0},e.prototype.mousedown=function(t){t.stopPropagation()},e.prototype.mouseup=function(t){event.stopPropagation()},e.prototype.keydown=function(e){var r=e.keyCode;return r===c.KEY.UP||r===c.KEY.DOWN?(e.preventDefault(),void t.prototype.keydown.call(this,e)):this.inputEvent&&r!==c.KEY.ESCAPE&&r!==c.KEY.RETURN?(this.inputEvent=!1,void e.stopPropagation()):(t.prototype.keydown.call(this,e),void e.stopPropagation())},e.prototype.updateAria=function(){var t=this.variable.getValue();t&&this.input&&(this.input.setAttribute("aria-valuenow",t),this.input.setAttribute("aria-valuetext",t+"%"))},e.prototype.updateSpan=function(){var t;try{t=this.variable.getValue(s.MenuUtil.getActiveElement(this)),this.valueSpan.innerHTML=t+"%"}catch(e){t=""}this.input.value=t},e.prototype.toJson=function(){return{type:""}},e}(i.AbstractVariableItem);e.Slider=l},6186:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.Submenu=void 0;var i=r(1340),s=r(2165),a=function(t){function e(e,r,n){var o=t.call(this,e,"submenu",r,n)||this;return o._submenu=null,o}return o(e,t),e.fromJson=function(t,e,r){var n=e.content,o=e.menu,i=new this(r,n,e.id),s=t.get("subMenu")(t,o,i);return i.submenu=s,i},Object.defineProperty(e.prototype,"submenu",{get:function(){return this._submenu},set:function(t){this._submenu=t},enumerable:!1,configurable:!0}),e.prototype.mouseover=function(t){this.focus(),this.stop(t)},e.prototype.mouseout=function(t){this.stop(t)},e.prototype.unfocus=function(){if(this.submenu.isPosted()){if(this.menu.focused!==this)return t.prototype.unfocus.call(this),void this.menu.unpostSubmenus();this.html.setAttribute("tabindex","-1"),this.html.blur()}else t.prototype.unfocus.call(this)},e.prototype.focus=function(){t.prototype.focus.call(this),this.submenu.isPosted()||this.disabled||this.submenu.post()},e.prototype.executeAction=function(){this.submenu.isPosted()?this.submenu.unpost():this.submenu.post()},e.prototype.generateHtml=function(){t.prototype.generateHtml.call(this);var e=this.html;this.span=document.createElement("span"),this.span.textContent="\u25ba",this.span.classList.add(s.HtmlClasses.MENUARROW),e.appendChild(this.span),e.setAttribute("aria-haspopup","true")},e.prototype.left=function(e){this.submenu.isPosted()?this.submenu.unpost():t.prototype.left.call(this,e)},e.prototype.right=function(t){this.submenu.isPosted()?this.submenu.down(t):this.submenu.post()},e.prototype.toJson=function(){return{type:""}},e}(i.AbstractItem);e.Submenu=a},3205:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.KEY=void 0,function(t){t[t.RETURN=13]="RETURN",t[t.ESCAPE=27]="ESCAPE",t[t.SPACE=32]="SPACE",t[t.LEFT=37]="LEFT",t[t.UP=38]="UP",t[t.RIGHT=39]="RIGHT",t[t.DOWN=40]="DOWN"}(e.KEY||(e.KEY={}))},9328:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.MenuElement=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.addAttributes=function(t){for(var e in t)this.html.setAttribute(e,t[e])},Object.defineProperty(e.prototype,"html",{get:function(){return this._html||this.generateHtml(),this._html},set:function(t){this._html=t,this.addEvents(t)},enumerable:!1,configurable:!0}),e.prototype.generateHtml=function(){var t=document.createElement("div");t.classList.add(this.className),t.setAttribute("role",this.role),this.html=t},e.prototype.focus=function(){var t=this.html;t.setAttribute("tabindex","0"),t.focus()},e.prototype.unfocus=function(){var t=this.html;t.hasAttribute("tabindex")&&t.setAttribute("tabindex","-1");try{t.blur()}catch(t){}t.blur()},e}(r(2868).AbstractNavigatable);e.MenuElement=i},1932:function(t,e,r){var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MenuStore=void 0;var o=r(2556),i=r(2165),s=r(3205),a=function(){function t(t){this.menu=t,this.store=[],this._active=null,this.counter=0,this.attachedClass=i.HtmlClasses.ATTACHED+"_"+o.MenuUtil.counter(),this.taborder=!0,this.attrMap={}}return Object.defineProperty(t.prototype,"active",{get:function(){return this._active},set:function(t){do{if(-1!==this.store.indexOf(t)){this._active=t;break}t=t.parentNode}while(t)},enumerable:!1,configurable:!0}),t.prototype.next=function(){var t=this.store.length;if(0===t)return this.active=null,null;var e=this.store.indexOf(this.active);return e=-1===e?0:e0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__spread||function(){for(var t=[],e=0;e0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionBox=e.SelectionMenu=void 0;var s=r(2556),a=r(2165),c=r(1484),l=r(4922),u=function(t){function e(e){var r=t.call(this)||this;return r.anchor=e,r.className=a.HtmlClasses.SELECTIONMENU,r.variablePool=r.anchor.menu.pool,r.baseMenu=r.anchor.menu,r}return o(e,t),e.fromJson=function(t,e,r){var n=e.title,o=e.values,i=e.variable,s=new this(r),a=t.get("label")(t,{content:n||"",id:n||"id"},s),c=t.get("rule")(t,{},s),l=o.map((function(e){return t.get("radio")(t,{content:e,variable:i,id:e},s)})),u=[a,c].concat(l);return s.items=u,s},e.prototype.generateHtml=function(){t.prototype.generateHtml.call(this),this.items.forEach((function(t){return t.html.classList.add(a.HtmlClasses.SELECTIONITEM)}))},e.prototype.display=function(){},e.prototype.right=function(t){this.anchor.right(t)},e.prototype.left=function(t){this.anchor.left(t)},e}(c.AbstractMenu);e.SelectionMenu=u;var p=function(t){function e(e,r,n,o){void 0===n&&(n="none"),void 0===o&&(o="vertical");var i=t.call(this,e,null,r)||this;return i.style=n,i.grid=o,i._selections=[],i.prefix="ctxt-selection",i._balanced=!0,i}return o(e,t),e.fromJson=function(t,e,r){var n=e.title,o=e.signature,i=e.selections,s=new this(n,o,e.order,e.grid);s.attachMenu(r);var a=i.map((function(e){return t.get("selectionMenu")(t,e,s)}));return s.selections=a,s},e.prototype.attachMenu=function(t){this.menu=t},Object.defineProperty(e.prototype,"selections",{get:function(){return this._selections},set:function(t){var e=this;this._selections=[],t.forEach((function(t){return e.addSelection(t)}))},enumerable:!1,configurable:!0}),e.prototype.addSelection=function(t){t.anchor=this,this._selections.push(t)},e.prototype.rowDiv=function(t){var e=this,r=document.createElement("div");this.contentDiv.appendChild(r);var n=t.map((function(t){return r.appendChild(t.html),t.html.id||(t.html.id=e.prefix+s.MenuUtil.counter()),t.html.getBoundingClientRect()})),o=n.map((function(t){return t.width})),i=o.reduce((function(t,e){return t+e}),0),c=n.reduce((function(t,e){return Math.max(t,e.height)}),0);return r.classList.add(a.HtmlClasses.SELECTIONDIVIDER),r.setAttribute("style","height: "+c+"px;"),[r,i,c,o]},e.prototype.display=function(){if(t.prototype.display.call(this),this.order(),this.selections.length){for(var e=[],r=0,n=[],o=this.getChunkSize(this.selections.length),s=function(t){var s=a.selections.slice(t,t+o),c=i(a.rowDiv(s),4),l=c[0],u=c[1],p=c[2],h=c[3];e.push(l),r=Math.max(r,u),s.forEach((function(t){return t.html.style.height=p+"px"})),n=a.combineColumn(n,h)},a=this,c=0;cdocument.body.offsetWidth-5&&(i=Math.max(5,i-o-r.offsetWidth+6)),t.prototype.post.call(this,i,s)}},e.prototype.display=function(){this.baseMenu.frame.appendChild(this.html)},e.prototype.setBaseMenu=function(){var t=this;do{t=t.anchor.menu}while(t instanceof e);this.baseMenu=t},e.prototype.left=function(t){this.focused=null,this.anchor.focus()},e.prototype.toJson=function(){return{type:""}},e}(r(1484).AbstractMenu);e.SubMenu=i},3737:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.Variable=void 0;var n=r(2556),o=function(){function t(t,e,r){this._name=t,this.getter=e,this.setter=r,this.items=[]}return t.fromJson=function(t,e,r){var n=new this(e.name,e.getter,e.setter);r.insert(n)},Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t.prototype.getValue=function(t){try{return this.getter(t)}catch(t){return n.MenuUtil.error(t,"Command of variable "+this.name+" failed."),null}},t.prototype.setValue=function(t,e){try{this.setter(t,e)}catch(t){n.MenuUtil.error(t,"Command of variable "+this.name+" failed.")}this.update()},t.prototype.register=function(t){-1===this.items.indexOf(t)&&this.items.push(t)},t.prototype.unregister=function(t){var e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1)},t.prototype.update=function(){this.items.forEach((function(t){return t.update()}))},t.prototype.registerCallback=function(t){this.items.forEach((function(e){return e.registerCallback(t)}))},t.prototype.unregisterCallback=function(t){this.items.forEach((function(e){return e.unregisterCallback(t)}))},t.prototype.toJson=function(){return{type:"variable",name:this.name,getter:this.getter.toString(),setter:this.setter.toString()}},t}();e.Variable=o},2358:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.VariablePool=void 0;var r=function(){function t(){this.pool={}}return t.prototype.insert=function(t){this.pool[t.name]=t},t.prototype.lookup=function(t){return this.pool[t]},t.prototype.remove=function(t){delete this.pool[t]},t.prototype.update=function(){for(var t in this.pool)this.pool[t].update()},t}();e.VariablePool=r},3921:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractAudioRenderer=void 0;const n=r(5897);e.AbstractAudioRenderer=class{constructor(){this.separator_=" "}setSeparator(t){this.separator_=t}getSeparator(){return"braille"===n.default.getInstance().modality?"":this.separator_}error(t){return null}merge(t){let e="";const r=t.length-1;for(let n,o=0;n=t[o];o++)if(e+=n.speech,odelete t[e])),e.open.forEach((r=>t[r]=e[r]));const r=Object.keys(t);t.open=r},e.sortClose=function(t,e){if(t.length<=1)return t;const r=[];for(let n,o=0;n=e[o],t.length;o++)n.close&&n.close.length&&n.close.forEach((function(e){const n=t.indexOf(e);-1!==n&&(r.unshift(e),t.splice(n,1))}));return r};let a={},c=[];function l(t,e){const r=t[t.length-1];if(r){if(d(e)&&d(r)){if(void 0===r.join)return void(r.span=r.span.concat(e.span));const t=r.span.pop(),n=e.span.shift();return r.span.push(t+r.join+n),r.span=r.span.concat(e.span),void(r.join=e.join)}h(e)&&h(r)?r.pause=s(r.pause,e.pause):t.push(e)}else t.push(e)}function u(t,e){t.rate&&(e.rate=t.rate),t.pitch&&(e.pitch=t.pitch),t.volume&&(e.volume=t.volume)}function p(t){return"object"==typeof t&&t.open}function h(t){return"object"==typeof t&&1===Object.keys(t).length&&Object.keys(t)[0]===o.personalityProps.PAUSE}function d(t){const e=Object.keys(t);return"object"==typeof t&&(1===e.length&&"span"===e[0]||2===e.length&&("span"===e[0]&&"join"===e[1]||"span"===e[1]&&"join"===e[0]))}function f(t,e,r,n,a,c=!1){if(c){const c=t[t.length-1];let l;if(c&&(l=c[o.personalityProps.JOIN]),c&&!e.speech&&a&&h(c)){const t=o.personalityProps.PAUSE;c[t]=s(c[t],a[t]),a=null}if(c&&e.speech&&0===Object.keys(r).length&&d(c)){if(void 0!==l){const t=c.span.pop();e=new i.Span(t.speech+l+e.speech,t.attributes)}c.span.push(e),e=new i.Span("",{}),c[o.personalityProps.JOIN]=n}}0!==Object.keys(r).length&&t.push(r),e.speech&&t.push({span:[e],join:n}),a&&t.push(a)}function m(t,e){if(!e)return t;const r={};for(const n of o.personalityPropList){const o=t[n],i=e[n];if(!o&&!i||o&&i&&o===i)continue;const s=o||0;p(r)||(r.open=[],r.close=[]),o||r.close.push(n),i||r.open.push(n),i&&o&&(r.close.push(n),r.open.push(n)),e[n]=s,r[n]=s,a[n]?a[n].push(s):a[n]=[s]}if(p(r)){let t=r.close.slice();for(;t.length>0;){let o=c.pop();const i=(0,n.setdifference)(o,t);if(t=(0,n.setdifference)(t,o),o=i,0!==t.length){if(0!==o.length){r.close=r.close.concat(o),r.open=r.open.concat(o);for(let t,n=0;t=o[n];n++)r[t]=e[t]}}else 0!==o.length&&c.push(o)}c.push(r.open)}return r}e.personalityMarkup=function(t){a={},c=[];let e=[];const r={};for(let n,i=0;n=t[i];i++){let t=null;const i=n.descriptionSpan(),s=n.personality,a=s[o.personalityProps.JOIN];delete s[o.personalityProps.JOIN],void 0!==s[o.personalityProps.PAUSE]&&(t={[o.personalityProps.PAUSE]:s[o.personalityProps.PAUSE]},delete s[o.personalityProps.PAUSE]);f(e,i,m(s,r),a,t,!0)}return e=e.concat(function(){const t=[];for(let e=c.length-1;e>=0;e--){const r=c[e];if(r.length){const e={open:[],close:[]};for(let t=0;t"string"==typeof t?new l.Span(t,{}):t)),r=m.get(n.default.getInstance().markup);return r?r.merge(e):t.join()},e.finalize=function(t){const e=m.get(n.default.getInstance().markup);return e?e.finalize(t):t},e.error=function(t){const e=m.get(n.default.getInstance().markup);return e?e.error(t):""},e.registerRenderer=function(t,e){m.set(t,e)},e.isXml=function(){return m.get(n.default.getInstance().markup)instanceof d.XmlRenderer}},8639:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.LayoutRenderer=void 0;const n=r(2057),o=r(5740),i=r(4440),s=r(3706),a=r(2456);class c extends a.XmlRenderer{finalize(t){return function(t){l="";const e=o.parseInput(`${t}`);return n.Debugger.getInstance().output(o.formatXml(e.toString())),l=d(e),l}(t)}pause(t){return""}prosodyElement(t,e){return t===i.personalityProps.LAYOUT?`<${e}>`:""}closeTag(t){return`${t}>`}markup(t){const e=[];let r=[];for(const n of t){if(!n.layout){r.push(n);continue}e.push(this.processContent(r)),r=[];const t=n.layout;t.match(/^begin/)?e.push("<"+t.replace(/^begin/,"")+">"):t.match(/^end/)?e.push(""+t.replace(/^end/,"")+">"):console.warn("Something went wrong with layout markup: "+t)}return e.push(this.processContent(r)),e.join("")}processContent(t){const e=[],r=s.personalityMarkup(t);for(let t,n=0;t=r[n];n++)t.span?e.push(this.merge(t.span)):s.isPauseElement(t);return e.join("")}}e.LayoutRenderer=c;let l="";const u={TABLE:function(t){let e=g(t);e.forEach((t=>{t.cells=t.cells.slice(1).slice(0,-1),t.width=t.width.slice(1).slice(0,-1)}));const[r,n]=b(e);return e=v(e,n),_(e,r)},CASES:function(t){let e=g(t);e.forEach((t=>{t.cells=t.cells.slice(0,-1),t.width=t.width.slice(0,-1)}));const[r,n]=b(e);return e=v(e,n),_(e,r)},CAYLEY:function(t){let e=g(t);e.forEach((t=>{t.cells=t.cells.slice(1).slice(0,-1),t.width=t.width.slice(1).slice(0,-1),t.sep=t.sep+t.sep}));const[r,n]=b(e),o={lfence:"",rfence:"",cells:n.map((t=>"\u2810"+new Array(t).join("\u2812"))),width:n,height:1,sep:e[0].sep};return e.splice(1,0,o),e=v(e,n),_(e,r)},MATRIX:function(t){let e=g(t);const[r,n]=b(e);return e=v(e,n),_(e,r)},CELL:d,FENCE:d,ROW:d,FRACTION:function(t){const[e,r,,n,o]=Array.from(t.childNodes),i=p(r),s=p(n),a=m(i),c=m(s);let l=Math.max(a,c);const u=e+new Array(l+1).join("\u2812")+o;return l=u.length,`${E(i,l)}\n${u}\n${E(s,l)}`},NUMERATOR:x,DENOMINATOR:x};function p(t){const e=o.tagName(t),r=u[e];return r?r(t):t.textContent}function h(t,e){if(!t||!e)return t+e;const r=f(t),n=f(e),o=r-n;t=o<0?y(t,n,m(t)):t,e=o>0?y(e,r,m(e)):e;const i=t.split(/\r\n|\r|\n/),s=e.split(/\r\n|\r|\n/),a=[];for(let t=0;tMath.max(e.length,t)),0)}function y(t,e,r){return t=function(t,e){const r=e-f(t);return t+(r>0?new Array(r+1).join("\n"):"")}(t,e),function(t,e){const r=t.split(/\r\n|\r|\n/),n=[];for(const t of r){const r=e-t.length;n.push(t+(r>0?new Array(r+1).join("\u2800"):""))}return n.join("\n")}(t,r)}function g(t){const e=Array.from(t.childNodes),r=[];for(const t of e)t.nodeType===o.NodeType.ELEMENT_NODE&&r.push(O(t));return r}function b(t){const e=t.reduce(((t,e)=>Math.max(e.height,t)),0),r=[];for(let e=0;et.width[e])).reduce(((t,e)=>Math.max(t,e)),0));return[e,r]}function v(t,e){const r=[];for(const n of t){if(0===n.height)continue;const t=[];for(let r=0;rt.lfence+t.cells.join(t.sep)+t.rfence)).join("\n");const r=[];for(const e of t){const t=S(e.sep,e.height);let n=e.cells.shift();for(;e.cells.length;)n=h(n,t),n=h(n,e.cells.shift());n=h(S(e.lfence,e.height),n),n=h(n,S(e.rfence,e.height)),r.push(n),r.push(e.lfence+new Array(m(n)-3).join(e.sep)+e.rfence)}return r.slice(0,-1).join("\n")}function S(t,e){let r="";for(;e;)r+=t+"\n",e--;return r.slice(0,-1)}function M(t){return t.nodeType===o.NodeType.ELEMENT_NODE&&"FENCE"===o.tagName(t)?p(t):""}function O(t){const e=Array.from(t.childNodes),r=M(e[0]),n=M(e[e.length-1]);r&&e.shift(),n&&e.pop();let i="";const s=[];for(const t of e){if(t.nodeType===o.NodeType.TEXT_NODE){i=t.textContent;continue}const e=p(t);s.push(e)}return{lfence:r,rfence:n,sep:i,cells:s,height:s.reduce(((t,e)=>Math.max(f(e),t)),0),width:s.map(m)}}function E(t,e){const r=(e-m(t))/2,[n,o]=Math.floor(r)===r?[r,r]:[Math.floor(r),Math.ceil(r)],i=t.split(/\r\n|\r|\n/),s=[],[a,c]=[new Array(n+1).join("\u2800"),new Array(o+1).join("\u2800")];for(const t of i)s.push(a+t+c);return s.join("\n")}function x(t){const e=t.firstChild,r=d(t);if(e&&e.nodeType===o.NodeType.ELEMENT_NODE){if("ENGLISH"===o.tagName(e))return"\u2830"+r;if("NUMBER"===o.tagName(e))return"\u283c"+r}return r}},182:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.MarkupRenderer=void 0;const n=r(4440),o=r(3921);class i extends o.AbstractAudioRenderer{constructor(){super(...arguments),this.ignoreElements=[n.personalityProps.LAYOUT],this.scaleFunction=null}setScaleFunction(t,e,r,n,o=0){this.scaleFunction=i=>{const s=(i-t)/(e-t),a=r*(1-s)+n*s;return+(Math.round(a+"e+"+o)+"e-"+o)}}applyScaleFunction(t){return this.scaleFunction?this.scaleFunction(t):t}ignoreElement(t){return-1!==this.ignoreElements.indexOf(t)}}e.MarkupRenderer=i},8990:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.PunctuationRenderer=void 0;const n=r(4440),o=r(3921),i=r(3706);class s extends o.AbstractAudioRenderer{markup(t){const e=i.personalityMarkup(t);let r="",o=null,s=!1;for(let t,a=0;t=e[a];a++)i.isMarkupElement(t)||(i.isPauseElement(t)?s&&(o=i.mergePause(o,t,Math.max)):(o&&(r+=this.pause(o[n.personalityProps.PAUSE]),o=null),r+=(s?this.getSeparator():"")+this.merge(t.span),s=!0));return r}pause(t){let e;return e="number"==typeof t?t<=250?"short":t<=500?"medium":"long":t,s.PAUSE_PUNCTUATION.get(e)||""}}e.PunctuationRenderer=s,s.PAUSE_PUNCTUATION=new Map([["short",","],["medium",";"],["long","."]])},6660:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SableRenderer=void 0;const n=r(4440),o=r(2456);class i extends o.XmlRenderer{finalize(t){return''+this.getSeparator()+t+this.getSeparator()+""}pause(t){return''}prosodyElement(t,e){switch(e=this.applyScaleFunction(e),t){case n.personalityProps.PITCH:return'';case n.personalityProps.RATE:return'';case n.personalityProps.VOLUME:return'';default:return"<"+t.toUpperCase()+' VALUE="'+e+'">'}}closeTag(t){return""+t.toUpperCase()+">"}}e.SableRenderer=i},9536:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Span=void 0;e.Span=class{constructor(t,e){this.speech=t,this.attributes=e}}},7504:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SsmlRenderer=void 0;const n=r(5897),o=r(4440),i=r(2456);class s extends i.XmlRenderer{finalize(t){return''+this.getSeparator()+t+this.getSeparator()+""}pause(t){return''}prosodyElement(t,e){const r=(e=Math.floor(this.applyScaleFunction(e)))<0?e.toString():"+"+e.toString();return"":'%">')}closeTag(t){return""}}e.SsmlRenderer=s},3757:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SsmlStepRenderer=void 0;const n=r(7504);class o extends n.SsmlRenderer{markup(t){return o.MARKS={},super.markup(t)}merge(t){const e=[];for(let r=0;r'),o.MARKS[i]=!0),1===n.speech.length&&n.speech.match(/[a-zA-Z]/)?e.push(''+n.speech+""):e.push(n.speech)}return e.join(this.getSeparator())}}e.SsmlStepRenderer=o,o.CHARACTER_ATTR="character",o.MARKS={}},4032:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.StringRenderer=void 0;const n=r(3921),o=r(3706);class i extends n.AbstractAudioRenderer{markup(t){let e="";const r=(0,o.personalityMarkup)(t).filter((t=>t.span));if(!r.length)return e;const n=r.length-1;for(let t,o=0;t=r[o];o++){if(t.span&&(e+=this.merge(t.span)),o>=n)continue;const r=t.join;e+=void 0===r?this.getSeparator():r}return e}}e.StringRenderer=i},2456:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.XmlRenderer=void 0;const n=r(5897),o=r(3706),i=r(182);class s extends i.MarkupRenderer{markup(t){this.setScaleFunction(-2,2,-100,100,2);const e=o.personalityMarkup(t),r=[],i=[];for(let t,s=0;t=e[s];s++)if(t.span)r.push(this.merge(t.span));else if(o.isPauseElement(t))r.push(this.pause(t));else{if(t.close.length)for(let e=0;e{r.push(this.prosodyElement(e,t[e])),i.push(e)}))}}return r.join(" ")}}e.XmlRenderer=s},707:function(t,e){function r(t,e){return t?e?t.filter((t=>e.indexOf(t)<0)):t:[]}Object.defineProperty(e,"__esModule",{value:!0}),e.union=e.setdifference=e.interleaveLists=e.removeEmpty=void 0,e.removeEmpty=function(t){return t.filter((t=>t))},e.interleaveLists=function(t,e){const r=[];for(;t.length||e.length;)t.length&&r.push(t.shift()),e.length&&r.push(e.shift());return r},e.setdifference=r,e.union=function(t,e){return t&&e?t.concat(r(e,t)):t||e||[]}},2139:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.loadScript=e.loadMapsForIE_=e.installWGXpath_=e.loadWGXpath_=e.mapsForIE=e.detectEdge=e.detectIE=void 0;const n=r(2315),o=r(5274);function i(t){c(n.default.WGXpath),s(t)}function s(t,e){let r=e||1;"undefined"==typeof wgxpath&&r<10?setTimeout((function(){s(t,r++)}),200):r>=10||(n.default.wgxpath=wgxpath,t?n.default.wgxpath.install({document:document}):n.default.wgxpath.install(),o.xpath.evaluate=document.evaluate,o.xpath.result=XPathResult,o.xpath.createNSResolver=document.createNSResolver)}function a(){c(n.default.mathmapsIePath)}function c(t){const e=n.default.document.createElement("script");e.type="text/javascript",e.src=t,n.default.document.head?n.default.document.head.appendChild(e):n.default.document.body.appendChild(e)}e.detectIE=function(){return"undefined"!=typeof window&&"ActiveXObject"in window&&"clipboardData"in window&&(a(),i(),!0)},e.detectEdge=function(){var t;return"undefined"!=typeof window&&"MSGestureEvent"in window&&null===(null===(t=window.chrome)||void 0===t?void 0:t.loadTimes)&&(document.evaluate=null,i(!0),!0)},e.mapsForIE=null,e.loadWGXpath_=i,e.installWGXpath_=s,e.loadMapsForIE_=a,e.loadScript=c},2057:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.Debugger=void 0;const n=r(2315);class o{constructor(){this.isActive_=!1,this.outputFunction_=console.info,this.stream_=null}static getInstance(){return o.instance=o.instance||new o,o.instance}init(t){t&&this.startDebugFile_(t),this.isActive_=!0}output(...t){this.isActive_&&this.output_(t)}generateOutput(t){this.isActive_&&this.output_(t.apply(t,[]))}exit(t=(()=>{})){this.isActive_&&this.stream_&&this.stream_.end("","",t)}startDebugFile_(t){this.stream_=n.default.fs.createWriteStream(t),this.outputFunction_=function(...t){this.stream_.write(t.join(" ")),this.stream_.write("\n")}.bind(this),this.stream_.on("error",function(t){console.info("Invalid log file. Debug information sent to console."),this.outputFunction_=console.info}.bind(this)),this.stream_.on("finish",(function(){console.info("Finalizing debug file.")}))}output_(t){this.outputFunction_.apply(console.info===this.outputFunction_?console:this.outputFunction_,["Speech Rule Engine Debugger:"].concat(t))}}e.Debugger=o},5740:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeXml=e.cloneNode=e.tagName=e.querySelectorAll=e.querySelectorAllByAttrValue=e.querySelectorAllByAttr=e.formatXml=e.createTextNode=e.createElementNS=e.createElement=e.replaceNode=e.NodeType=e.parseInput=e.XML_ENTITIES=e.trimInput_=e.toArray=void 0;const n=r(5897),o=r(4440),i=r(2315),s=r(5274);function a(t){const e=[];for(let r=0,n=t.length;r[ \f\n\r\t\v\u200b]+<").trim()}function l(t,e){if(!e)return[!1,""];const r=t.match(/^<([^> ]+).*>/),n=e.match(/^<\/([^>]+)>(.*)/);return r&&n&&r[1]===n[1]?[!0,n[2]]:[!1,""]}e.toArray=a,e.trimInput_=c,e.XML_ENTITIES={"<":!0,">":!0,"&":!0,""":!0,"'":!0},e.parseInput=function(t){const e=new i.default.xmldom.DOMParser,r=c(t),a=!!r.match(/&(?!lt|gt|amp|quot|apos)\w+;/g);if(!r)throw new Error("Empty input!");try{const t=e.parseFromString(r,a?"text/html":"text/xml");return n.default.getInstance().mode===o.Mode.HTTP?(s.xpath.currentDocument=t,a?t.body.childNodes[0]:t.documentElement):t.documentElement}catch(t){throw new n.SREError("Illegal input: "+t.message)}},function(t){t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t[t.NOTATION_NODE=12]="NOTATION_NODE"}(e.NodeType||(e.NodeType={})),e.replaceNode=function(t,e){t.parentNode&&(t.parentNode.insertBefore(e,t),t.parentNode.removeChild(t))},e.createElement=function(t){return i.default.document.createElement(t)},e.createElementNS=function(t,e){return i.default.document.createElementNS(t,e)},e.createTextNode=function(t){return i.default.document.createTextNode(t)},e.formatXml=function(t){let e="",r=/(>)(<)(\/*)/g,n=0,o=(t=t.replace(r,"$1\r\n$2$3")).split("\r\n");for(r=/(\.)*(<)(\/*)/g,o=o.map((t=>t.replace(r,"$1\r\n$2$3").split("\r\n"))).reduce(((t,e)=>t.concat(e)),[]);o.length;){let t=o.shift();if(!t)continue;let r=0;if(t.match(/^<\w[^>/]*>[^>]+$/)){const e=l(t,o[0]);e[0]?e[1]?(t+=o.shift().slice(0,-e[1].length),e[1].trim()&&o.unshift(e[1])):t+=o.shift():r=1}else if(t.match(/^<\/\w/))0!==n&&(n-=1);else if(t.match(/^<\w[^>]*[^/]>.*$/))r=1;else if(t.match(/^<\w[^>]*\/>.+$/)){const e=t.indexOf(">")+1;t.slice(e).trim()&&o.unshift(),t=t.slice(0,e)}else r=0;e+=new Array(n+1).join(" ")+t+"\r\n",n+=r}return e},e.querySelectorAllByAttr=function(t,e){return t.querySelectorAll?a(t.querySelectorAll(`[${e}]`)):s.evalXPath(`.//*[@${e}]`,t)},e.querySelectorAllByAttrValue=function(t,e,r){return t.querySelectorAll?a(t.querySelectorAll(`[${e}="${r}"]`)):s.evalXPath(`.//*[@${e}="${r}"]`,t)},e.querySelectorAll=function(t,e){return t.querySelectorAll?a(t.querySelectorAll(e)):s.evalXPath(`.//${e}`,t)},e.tagName=function(t){return t.tagName.toUpperCase()},e.cloneNode=function(t){return t.cloneNode(!0)},e.serializeXml=function(t){return(new i.default.xmldom.XMLSerializer).serializeToString(t)}},5897:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.EnginePromise=e.SREError=void 0;const n=r(1676),o=r(4440),i=r(2057),s=r(1377);class a extends Error{constructor(t=""){super(),this.message=t,this.name="SRE Error"}}e.SREError=a;class c{constructor(){this.customLoader=null,this.parsers={},this.comparator=null,this.mode=o.Mode.SYNC,this.init=!0,this.delay=!1,this.comparators={},this.domain="mathspeak",this.style=n.DynamicCstr.DEFAULT_VALUES[n.Axis.STYLE],this._defaultLocale=n.DynamicCstr.DEFAULT_VALUES[n.Axis.LOCALE],this.locale=this.defaultLocale,this.subiso="",this.modality=n.DynamicCstr.DEFAULT_VALUES[n.Axis.MODALITY],this.speech=o.Speech.NONE,this.markup=o.Markup.NONE,this.walker="Table",this.structure=!1,this.ruleSets=[],this.strict=!1,this.isIE=!1,this.isEdge=!1,this.rate="100",this.pprint=!1,this.config=!1,this.rules="",this.prune="",this.evaluator=c.defaultEvaluator,this.defaultParser=new n.DynamicCstrParser(n.DynamicCstr.DEFAULT_ORDER),this.parser=this.defaultParser,this.dynamicCstr=n.DynamicCstr.defaultCstr()}set defaultLocale(t){this._defaultLocale=s.Variables.ensureLocale(t,this._defaultLocale)}get defaultLocale(){return this._defaultLocale}static getInstance(){return c.instance=c.instance||new c,c.instance}static defaultEvaluator(t,e){return t}static evaluateNode(t){return c.nodeEvaluator(t)}getRate(){const t=parseInt(this.rate,10);return isNaN(t)?100:t}setDynamicCstr(t){if(this.defaultLocale&&(n.DynamicCstr.DEFAULT_VALUES[n.Axis.LOCALE]=this.defaultLocale),t){const e=Object.keys(t);for(let r=0;r{void 0!==t[r]&&(e[r]=t[r])};return r("mode"),e.configurate(t),a.default.BINARY_FEATURES.forEach((r=>{void 0!==t[r]&&(e[r]=!!t[r])})),a.default.STRING_FEATURES.forEach(r),t.json&&(l.default.jsonPath=c.makePath(t.json)),t.xpath&&(l.default.WGXpath=t.xpath),e.setCustomLoader(t.custom),function(t){t.isIE=s.detectIE(),t.isEdge=s.detectEdge()}(e),o.setLocale(),e.setDynamicCstr(),e.init?(a.EnginePromise.promises.init=new Promise(((t,e)=>{setTimeout((()=>{t("init")}),10)})),e.init=!1,a.EnginePromise.get()):e.delay?(e.delay=!1,a.EnginePromise.get()):i.loadLocale()}))}},8496:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Event=e.EventType=e.Move=e.KeyCode=void 0,function(t){t[t.ENTER=13]="ENTER",t[t.ESC=27]="ESC",t[t.SPACE=32]="SPACE",t[t.PAGE_UP=33]="PAGE_UP",t[t.PAGE_DOWN=34]="PAGE_DOWN",t[t.END=35]="END",t[t.HOME=36]="HOME",t[t.LEFT=37]="LEFT",t[t.UP=38]="UP",t[t.RIGHT=39]="RIGHT",t[t.DOWN=40]="DOWN",t[t.TAB=9]="TAB",t[t.LESS=188]="LESS",t[t.GREATER=190]="GREATER",t[t.DASH=189]="DASH",t[t.ZERO=48]="ZERO",t[t.ONE=49]="ONE",t[t.TWO=50]="TWO",t[t.THREE=51]="THREE",t[t.FOUR=52]="FOUR",t[t.FIVE=53]="FIVE",t[t.SIX=54]="SIX",t[t.SEVEN=55]="SEVEN",t[t.EIGHT=56]="EIGHT",t[t.NINE=57]="NINE",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z"}(e.KeyCode||(e.KeyCode={})),e.Move=new Map([[13,"ENTER"],[27,"ESC"],[32,"SPACE"],[33,"PAGE_UP"],[34,"PAGE_DOWN"],[35,"END"],[36,"HOME"],[37,"LEFT"],[38,"UP"],[39,"RIGHT"],[40,"DOWN"],[9,"TAB"],[188,"LESS"],[190,"GREATER"],[189,"DASH"],[48,"ZERO"],[49,"ONE"],[50,"TWO"],[51,"THREE"],[52,"FOUR"],[53,"FIVE"],[54,"SIX"],[55,"SEVEN"],[56,"EIGHT"],[57,"NINE"],[65,"A"],[66,"B"],[67,"C"],[68,"D"],[69,"E"],[70,"F"],[71,"G"],[72,"H"],[73,"I"],[74,"J"],[75,"K"],[76,"L"],[77,"M"],[78,"N"],[79,"O"],[80,"P"],[81,"Q"],[82,"R"],[83,"S"],[84,"T"],[85,"U"],[86,"V"],[87,"W"],[88,"X"],[89,"Y"],[90,"Z"]]),function(t){t.CLICK="click",t.DBLCLICK="dblclick",t.MOUSEDOWN="mousedown",t.MOUSEUP="mouseup",t.MOUSEOVER="mouseover",t.MOUSEOUT="mouseout",t.MOUSEMOVE="mousemove",t.SELECTSTART="selectstart",t.KEYPRESS="keypress",t.KEYDOWN="keydown",t.KEYUP="keyup",t.TOUCHSTART="touchstart",t.TOUCHMOVE="touchmove",t.TOUCHEND="touchend",t.TOUCHCANCEL="touchcancel"}(e.EventType||(e.EventType={}));e.Event=class{constructor(t,e,r){this.src=t,this.type=e,this.callback=r}add(){this.src.addEventListener(this.type,this.callback)}remove(){this.src.removeEventListener(this.type,this.callback)}}},7248:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.localePath=e.makePath=void 0;const n=r(2315);function o(t){return t.match("/$")?t:t+"/"}e.makePath=o,e.localePath=function(t,e="json"){return o(n.default.jsonPath)+t+(e.match(/^\./)?e:"."+e)}},3769:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.KeyProcessor=e.Processor=void 0;const n=r(8496);class o{constructor(t,e){this.name=t,this.process=e.processor,this.postprocess=e.postprocessor||((t,e)=>t),this.processor=this.postprocess?function(t){return this.postprocess(this.process(t),t)}:this.process,this.print=e.print||o.stringify_,this.pprint=e.pprint||this.print}static stringify_(t){return t?t.toString():t}}e.Processor=o,o.LocalState={walker:null,speechGenerator:null,highlighter:null};class i extends o{constructor(t,e){super(t,e),this.key=e.key||i.getKey_}static getKey_(t){return"string"==typeof t?n.KeyCode[t.toUpperCase()]:t}}e.KeyProcessor=i},6499:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.keypress=e.output=e.print=e.process=e.set=void 0;const n=r(8290),o=r(5714),i=r(3090),s=r(4356),a=r(1414),c=r(9552),l=r(9543),u=r(3362),p=r(1204),h=r(5740),d=r(5897),f=r(4440),m=r(3769),y=r(5274),g=new Map;function b(t){g.set(t.name,t)}function v(t){const e=g.get(t);if(!e)throw new d.SREError("Unknown processor "+t);return e}function _(t,e){const r=v(t);try{return r.processor(e)}catch(t){throw new d.SREError("Processing error for expression "+e)}}function S(t,e){const r=v(t);return d.default.getInstance().pprint?r.pprint(e):r.print(e)}e.set=b,e.process=_,e.print=S,e.output=function(t,e){const r=v(t);try{const t=r.processor(e);return d.default.getInstance().pprint?r.pprint(t):r.print(t)}catch(t){throw new d.SREError("Processing error for expression "+e)}},e.keypress=function(t,e){const r=v(t),n=r instanceof m.KeyProcessor?r.key(e):e,o=r.processor(n);return d.default.getInstance().pprint?r.pprint(o):r.print(o)},b(new m.Processor("semantic",{processor:function(t){const e=h.parseInput(t);return a.xmlTree(e)},postprocessor:function(t,e){const r=d.default.getInstance().speech;if(r===f.Speech.NONE)return t;const o=h.cloneNode(t);let i=l.computeMarkup(o);if(r===f.Speech.SHALLOW)return t.setAttribute("speech",n.finalize(i)),t;const s=y.evalXPath(".//*[@id]",t),a=y.evalXPath(".//*[@id]",o);for(let t,e,r=0;t=s[r],e=a[r];r++)i=l.computeMarkup(e),t.setAttribute("speech",n.finalize(i));return t},pprint:function(t){return h.formatXml(t.toString())}})),b(new m.Processor("speech",{processor:function(t){const e=h.parseInput(t),r=a.xmlTree(e),o=l.computeSpeech(r);return n.finalize(n.markup(o))},pprint:function(t){const e=t.toString();return n.isXml()?h.formatXml(e):e}})),b(new m.Processor("json",{processor:function(t){const e=h.parseInput(t);return a.getTree(e).toJson()},postprocessor:function(t,e){const r=d.default.getInstance().speech;if(r===f.Speech.NONE)return t;const o=h.parseInput(e),i=a.xmlTree(o),s=l.computeMarkup(i);if(r===f.Speech.SHALLOW)return t.stree.speech=n.finalize(s),t;const c=t=>{const e=y.evalXPath(`.//*[@id=${t.id}]`,i)[0],r=l.computeMarkup(e);t.speech=n.finalize(r),t.children&&t.children.forEach(c)};return c(t.stree),t},print:function(t){return JSON.stringify(t)},pprint:function(t){return JSON.stringify(t,null,2)}})),b(new m.Processor("description",{processor:function(t){const e=h.parseInput(t),r=a.xmlTree(e);return l.computeSpeech(r)},print:function(t){return JSON.stringify(t)},pprint:function(t){return JSON.stringify(t,null,2)}})),b(new m.Processor("enriched",{processor:function(t){return o.semanticMathmlSync(t)},postprocessor:function(t,e){const r=p.getSemanticRoot(t);let n;switch(d.default.getInstance().speech){case f.Speech.NONE:break;case f.Speech.SHALLOW:n=c.generator("Adhoc"),n.getSpeech(r,t);break;case f.Speech.DEEP:n=c.generator("Tree"),n.getSpeech(t,t)}return t},pprint:function(t){return h.formatXml(t.toString())}})),b(new m.Processor("walker",{processor:function(t){const e=c.generator("Node");m.Processor.LocalState.speechGenerator=e,e.setOptions({modality:d.default.getInstance().modality,locale:d.default.getInstance().locale,domain:d.default.getInstance().domain,style:d.default.getInstance().style}),m.Processor.LocalState.highlighter=i.highlighter({color:"black"},{color:"white"},{renderer:"NativeMML"});const r=_("enriched",t),n=S("enriched",r);return m.Processor.LocalState.walker=u.walker(d.default.getInstance().walker,r,e,m.Processor.LocalState.highlighter,n),m.Processor.LocalState.walker},print:function(t){return m.Processor.LocalState.walker.speech()}})),b(new m.KeyProcessor("move",{processor:function(t){if(!m.Processor.LocalState.walker)return null;return!1===m.Processor.LocalState.walker.move(t)?n.error(t):m.Processor.LocalState.walker.speech()}})),b(new m.Processor("number",{processor:function(t){const e=parseInt(t,10);return isNaN(e)?"":s.LOCALE.NUMBERS.numberToWords(e)}})),b(new m.Processor("ordinal",{processor:function(t){const e=parseInt(t,10);return isNaN(e)?"":s.LOCALE.NUMBERS.wordOrdinal(e)}})),b(new m.Processor("numericOrdinal",{processor:function(t){const e=parseInt(t,10);return isNaN(e)?"":s.LOCALE.NUMBERS.numericOrdinal(e)}})),b(new m.Processor("vulgar",{processor:function(t){const[e,r]=t.split("/").map((t=>parseInt(t,10)));return isNaN(e)||isNaN(r)?"":_("speech",`${e}${r}`)}}))},2998:function(t,e,r){var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.localePath=e.exit=e.move=e.walk=e.processFile=e.file=e.vulgar=e.numericOrdinal=e.ordinal=e.number=e.toEnriched=e.toDescription=e.toJson=e.toSemantic=e.toSpeech=e.localeLoader=e.engineReady=e.engineSetup=e.setupEngine=e.version=void 0;const o=r(5897),i=r(6828),s=r(4440),a=r(7248),c=r(6499),l=r(2315),u=r(1377),p=r(6141);function h(t){return n(this,void 0,void 0,(function*(){return(0,i.setup)(t)}))}function d(t,e){return c.process(t,e)}function f(t,e,r){switch(o.default.getInstance().mode){case s.Mode.ASYNC:return function(t,e,r){return n(this,void 0,void 0,(function*(){const n=yield l.default.fs.promises.readFile(e,{encoding:"utf8"}),i=c.output(t,n);if(r)try{l.default.fs.promises.writeFile(r,i)}catch(t){throw new o.SREError("Can not write to file: "+r)}return i}))}(t,e,r);case s.Mode.SYNC:return function(t,e,r){const n=function(t){let e;try{e=l.default.fs.readFileSync(t,{encoding:"utf8"})}catch(e){throw new o.SREError("Can not open file: "+t)}return e}(e),i=c.output(t,n);if(r)try{l.default.fs.writeFileSync(r,i)}catch(t){throw new o.SREError("Can not write to file: "+r)}return i}(t,e,r);default:throw new o.SREError(`Can process files in ${o.default.getInstance().mode} mode`)}}e.version=u.Variables.VERSION,e.setupEngine=h,e.engineSetup=function(){const t=["mode"].concat(o.default.STRING_FEATURES,o.default.BINARY_FEATURES),e=o.default.getInstance(),r={};return t.forEach((function(t){r[t]=e[t]})),r.json=l.default.jsonPath,r.xpath=l.default.WGXpath,r.rules=e.ruleSets.slice(),r},e.engineReady=function(){return n(this,void 0,void 0,(function*(){return h({}).then((()=>o.EnginePromise.getall()))}))},e.localeLoader=p.standardLoader,e.toSpeech=function(t){return d("speech",t)},e.toSemantic=function(t){return d("semantic",t)},e.toJson=function(t){return d("json",t)},e.toDescription=function(t){return d("description",t)},e.toEnriched=function(t){return d("enriched",t)},e.number=function(t){return d("number",t)},e.ordinal=function(t){return d("ordinal",t)},e.numericOrdinal=function(t){return d("numericOrdinal",t)},e.vulgar=function(t){return d("vulgar",t)},e.file={},e.file.toSpeech=function(t,e){return f("speech",t,e)},e.file.toSemantic=function(t,e){return f("semantic",t,e)},e.file.toJson=function(t,e){return f("json",t,e)},e.file.toDescription=function(t,e){return f("description",t,e)},e.file.toEnriched=function(t,e){return f("enriched",t,e)},e.processFile=f,e.walk=function(t){return c.output("walker",t)},e.move=function(t){return c.keypress("move",t)},e.exit=function(t){const e=t||0;o.EnginePromise.getall().then((()=>process.exit(e)))},e.localePath=a.localePath,l.default.documentSupported?h({mode:s.Mode.HTTP}).then((()=>h({}))):h({mode:s.Mode.SYNC}).then((()=>h({mode:s.Mode.ASYNC})))},2315:function(__unused_webpack_module,exports,__webpack_require__){var __dirname="/";Object.defineProperty(exports,"__esModule",{value:!0});const variables_1=__webpack_require__(1377);class SystemExternal{static extRequire(library){if("undefined"!=typeof process){const nodeRequire=eval("require");return nodeRequire(library)}return null}}exports.default=SystemExternal,SystemExternal.windowSupported=!("undefined"==typeof window),SystemExternal.documentSupported=SystemExternal.windowSupported&&!(void 0===window.document),SystemExternal.xmldom=SystemExternal.documentSupported?window:SystemExternal.extRequire("xmldom-sre"),SystemExternal.document=SystemExternal.documentSupported?window.document:(new SystemExternal.xmldom.DOMImplementation).createDocument("","",0),SystemExternal.xpath=SystemExternal.documentSupported?document:function(){const t={document:{},XPathResult:{}};return SystemExternal.extRequire("wicked-good-xpath").install(t),t.document.XPathResult=t.XPathResult,t.document}(),SystemExternal.mathmapsIePath="https://cdn.jsdelivr.net/npm/sre-mathmaps-ie@"+variables_1.Variables.VERSION+"mathmaps_ie.js",SystemExternal.commander=SystemExternal.documentSupported?null:SystemExternal.extRequire("commander"),SystemExternal.fs=SystemExternal.documentSupported?null:SystemExternal.extRequire("fs"),SystemExternal.url=variables_1.Variables.url,SystemExternal.jsonPath=(SystemExternal.documentSupported?SystemExternal.url:process.env.SRE_JSON_PATH||__webpack_require__.g.SRE_JSON_PATH||__dirname+"/mathmaps")+"/",SystemExternal.WGXpath=variables_1.Variables.WGXpath,SystemExternal.wgxpath=null},1377:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Variables=void 0;class r{static ensureLocale(t,e){return r.LOCALES.get(t)?t:(console.error(`Locale ${t} does not exist! Using ${r.LOCALES.get(e)} instead.`),e)}}e.Variables=r,r.VERSION="4.0.6",r.LOCALES=new Map([["ca","Catalan"],["da","Danish"],["de","German"],["en","English"],["es","Spanish"],["fr","French"],["hi","Hindi"],["it","Italian"],["nb","Bokm\xe5l"],["nn","Nynorsk"],["sv","Swedish"],["nemeth","Nemeth"]]),r.mathjaxVersion="3.2.1",r.url="https://cdn.jsdelivr.net/npm/speech-rule-engine@"+r.VERSION+"/lib/mathmaps",r.WGXpath="https://cdn.jsdelivr.net/npm/wicked-good-xpath@1.3.0/dist/wgxpath.install.js"},5274:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.updateEvaluator=e.evaluateString=e.evaluateBoolean=e.getLeafNodes=e.evalXPath=e.resolveNameSpace=e.xpath=void 0;const n=r(5897),o=r(4440),i=r(2315);function s(){return"undefined"!=typeof XPathResult}e.xpath={currentDocument:null,evaluate:s()?document.evaluate:i.default.xpath.evaluate,result:s()?XPathResult:i.default.xpath.XPathResult,createNSResolver:s()?document.createNSResolver:i.default.xpath.createNSResolver};const a={xhtml:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",mml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function c(t){return a[t]||null}e.resolveNameSpace=c;class l{constructor(){this.lookupNamespaceURI=c}}function u(t,r,i){return n.default.getInstance().mode!==o.Mode.HTTP||n.default.getInstance().isIE||n.default.getInstance().isEdge?e.xpath.evaluate(t,r,new l,i,null):e.xpath.currentDocument.evaluate(t,r,c,i,null)}function p(t,r){let n;try{n=u(t,r,e.xpath.result.ORDERED_NODE_ITERATOR_TYPE)}catch(t){return[]}const o=[];for(let t=n.iterateNext();t;t=n.iterateNext())o.push(t);return o}e.evalXPath=p,e.getLeafNodes=function(t){return p(".//*[count(*)=0]",t)},e.evaluateBoolean=function(t,r){let n;try{n=u(t,r,e.xpath.result.BOOLEAN_TYPE)}catch(t){return!1}return n.booleanValue},e.evaluateString=function(t,r){let n;try{n=u(t,r,e.xpath.result.STRING_TYPE)}catch(t){return""}return n.stringValue},e.updateEvaluator=function(t){if(n.default.getInstance().mode!==o.Mode.HTTP)return;let r=t;for(;r&&!r.evaluate;)r=r.parentNode;r&&r.evaluate?e.xpath.currentDocument=r:t.ownerDocument&&(e.xpath.currentDocument=t.ownerDocument)}},9268:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEnrichCase=void 0;e.AbstractEnrichCase=class{constructor(t){this.semantic=t}}},6061:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseBinomial=void 0;const n=r(5740),o=r(9268),i=r(5452),s=r(2298);class a extends o.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){return!t.mathmlTree&&"line"===t.type&&"binomial"===t.role}getMathml(){if(!this.semantic.childNodes.length)return this.mml;const t=this.semantic.childNodes[0];if(this.mml=(0,i.walkTree)(t),this.mml.hasAttribute(s.Attribute.TYPE)){const t=n.createElement("mrow");t.setAttribute(s.Attribute.ADDED,"true"),n.replaceNode(this.mml,t),t.appendChild(this.mml),this.mml=t}return(0,s.setAttributes)(this.mml,this.semantic),this.mml}}e.CaseBinomial=a},5765:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseDoubleScript=void 0;const n=r(5740),o=r(9268),i=r(5452),s=r(2298);class a extends o.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){if(!t.mathmlTree||!t.childNodes.length)return!1;const e=n.tagName(t.mathmlTree),r=t.childNodes[0].role;return"MSUBSUP"===e&&"subsup"===r||"MUNDEROVER"===e&&"underover"===r}getMathml(){const t=this.semantic.childNodes[0],e=t.childNodes[0],r=this.semantic.childNodes[1],n=t.childNodes[1],o=i.walkTree(r),a=i.walkTree(e),c=i.walkTree(n);return(0,s.setAttributes)(this.mml,this.semantic),this.mml.setAttribute(s.Attribute.CHILDREN,(0,s.makeIdList)([e,n,r])),[a,c,o].forEach((t=>i.getInnerNode(t).setAttribute(s.Attribute.PARENT,this.mml.getAttribute(s.Attribute.ID)))),this.mml.setAttribute(s.Attribute.TYPE,t.role),i.addCollapsedAttribute(this.mml,[this.semantic.id,[t.id,e.id,n.id],r.id]),this.mml}}e.CaseDoubleScript=a},7251:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseEmbellished=void 0;const n=r(5740),o=r(5952),i=r(9268),s=r(5765),a=r(7014),c=r(6887),l=r(5452),u=r(2298);class p extends i.AbstractEnrichCase{constructor(t){super(t),this.fenced=null,this.fencedMml=null,this.fencedMmlNodes=[],this.ofence=null,this.ofenceMml=null,this.ofenceMap={},this.cfence=null,this.cfenceMml=null,this.cfenceMap={},this.parentCleanup=[]}static test(t){return!(!t.mathmlTree||!t.fencePointer||t.mathmlTree.getAttribute("data-semantic-type"))}static makeEmptyNode_(t){const e=n.createElement("mrow"),r=new o.SemanticNode(t);return r.type="empty",r.mathmlTree=e,r}static fencedMap_(t,e){e[t.id]=t.mathmlTree,t.embellished&&p.fencedMap_(t.childNodes[0],e)}getMathml(){this.getFenced_(),this.fencedMml=l.walkTree(this.fenced),this.getFencesMml_(),"empty"!==this.fenced.type||this.fencedMml.parentNode||(this.fencedMml.setAttribute(u.Attribute.ADDED,"true"),this.cfenceMml.parentNode.insertBefore(this.fencedMml,this.cfenceMml)),this.getFencedMml_();return this.rewrite_()}fencedElement(t){return"fenced"===t.type||"matrix"===t.type||"vector"===t.type}getFenced_(){let t=this.semantic;for(;!this.fencedElement(t);)t=t.childNodes[0];this.fenced=t.childNodes[0],this.ofence=t.contentNodes[0],this.cfence=t.contentNodes[1],p.fencedMap_(this.ofence,this.ofenceMap),p.fencedMap_(this.cfence,this.cfenceMap)}getFencedMml_(){let t=this.ofenceMml.nextSibling;for(t=t===this.fencedMml?t:this.fencedMml;t&&t!==this.cfenceMml;)this.fencedMmlNodes.push(t),t=t.nextSibling}getFencesMml_(){let t=this.semantic;const e=Object.keys(this.ofenceMap),r=Object.keys(this.cfenceMap);for(;!(this.ofenceMml&&this.cfenceMml||t===this.fenced);)-1===e.indexOf(t.fencePointer)||this.ofenceMml||(this.ofenceMml=t.mathmlTree),-1===r.indexOf(t.fencePointer)||this.cfenceMml||(this.cfenceMml=t.mathmlTree),t=t.childNodes[0];this.ofenceMml||(this.ofenceMml=this.ofence.mathmlTree),this.cfenceMml||(this.cfenceMml=this.cfence.mathmlTree),this.ofenceMml&&(this.ofenceMml=l.ascendNewNode(this.ofenceMml)),this.cfenceMml&&(this.cfenceMml=l.ascendNewNode(this.cfenceMml))}rewrite_(){let t=this.semantic,e=null;const r=this.introduceNewLayer_();for((0,u.setAttributes)(r,this.fenced.parent);!this.fencedElement(t);){const o=t.mathmlTree,i=this.specialCase_(t,o);if(i)t=i;else{(0,u.setAttributes)(o,t);const e=[];for(let r,n=1;r=t.childNodes[n];n++)e.push(l.walkTree(r));t=t.childNodes[0]}const s=n.createElement("dummy"),a=o.childNodes[0];n.replaceNode(o,s),n.replaceNode(r,o),n.replaceNode(o.childNodes[0],r),n.replaceNode(s,a),e||(e=o)}return l.walkTree(this.ofence),l.walkTree(this.cfence),this.cleanupParents_(),e||r}specialCase_(t,e){const r=n.tagName(e);let o,i=null;if("MSUBSUP"===r?(i=t.childNodes[0],o=s.CaseDoubleScript):"MMULTISCRIPTS"===r&&("superscript"===t.type||"subscript"===t.type?o=a.CaseMultiscripts:"tensor"===t.type&&(o=c.CaseTensor),i=o&&t.childNodes[0]&&"subsup"===t.childNodes[0].role?t.childNodes[0]:t),!i)return null;const l=i.childNodes[0],u=p.makeEmptyNode_(l.id);return i.childNodes[0]=u,e=new o(t).getMathml(),i.childNodes[0]=l,this.parentCleanup.push(e),i.childNodes[0]}introduceNewLayer_(){const t=this.fullFence(this.ofenceMml),e=this.fullFence(this.cfenceMml);let r=n.createElement("mrow");if(n.replaceNode(this.fencedMml,r),this.fencedMmlNodes.forEach((t=>r.appendChild(t))),r.insertBefore(t,this.fencedMml),r.appendChild(e),!r.parentNode){const t=n.createElement("mrow");for(;r.childNodes.length>0;)t.appendChild(r.childNodes[0]);r.appendChild(t),r=t}return r}fullFence(t){const e=this.fencedMml.parentNode;let r=t;for(;r.parentNode&&r.parentNode!==e;)r=r.parentNode;return r}cleanupParents_(){this.parentCleanup.forEach((function(t){const e=t.childNodes[1].getAttribute(u.Attribute.PARENT);t.childNodes[0].setAttribute(u.Attribute.PARENT,e)}))}}e.CaseEmbellished=p},6265:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseLimit=void 0;const n=r(5740),o=r(9268),i=r(5452),s=r(2298);class a extends o.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){if(!t.mathmlTree||!t.childNodes.length)return!1;const e=n.tagName(t.mathmlTree),r=t.type;return("limupper"===r||"limlower"===r)&&("MSUBSUP"===e||"MUNDEROVER"===e)||"limboth"===r&&("MSUB"===e||"MUNDER"===e||"MSUP"===e||"MOVER"===e)}static walkTree_(t){t&&i.walkTree(t)}getMathml(){const t=this.semantic.childNodes;return"limboth"!==this.semantic.type&&this.mml.childNodes.length>=3&&(this.mml=i.introduceNewLayer([this.mml],this.semantic)),(0,s.setAttributes)(this.mml,this.semantic),t[0].mathmlTree||(t[0].mathmlTree=this.semantic.mathmlTree),t.forEach(a.walkTree_),this.mml}}e.CaseLimit=a},6514:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseLine=void 0;const n=r(9268),o=r(5452),i=r(2298);class s extends n.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){return!!t.mathmlTree&&"line"===t.type}getMathml(){return this.semantic.contentNodes.length&&o.walkTree(this.semantic.contentNodes[0]),this.semantic.childNodes.length&&o.walkTree(this.semantic.childNodes[0]),(0,i.setAttributes)(this.mml,this.semantic),this.mml}}e.CaseLine=s},6839:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseMultiindex=void 0;const n=r(5740),o=r(9268),i=r(5452),s=r(2298);class a extends o.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static multiscriptIndex(t){return"punctuated"===t.type&&"dummy"===t.contentNodes[0].role?i.collapsePunctuated(t):(i.walkTree(t),t.id)}static createNone_(t){const e=n.createElement("none");return t&&(0,s.setAttributes)(e,t),e.setAttribute(s.Attribute.ADDED,"true"),e}completeMultiscript(t,e){const r=n.toArray(this.mml.childNodes).slice(1);let o=0;const c=t=>{for(let e,n=0;e=t[n];n++){const t=r[o];if(t&&e===parseInt(i.getInnerNode(t).getAttribute(s.Attribute.ID)))i.getInnerNode(t).setAttribute(s.Attribute.PARENT,this.semantic.id.toString()),o++;else{const r=this.semantic.querySelectorAll((t=>t.id===e));this.mml.insertBefore(a.createNone_(r[0]),t||null)}}};c(t),r[o]&&"MPRESCRIPTS"!==n.tagName(r[o])?this.mml.insertBefore(r[o],n.createElement("mprescripts")):o++,c(e)}}e.CaseMultiindex=a},7014:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseMultiscripts=void 0;const n=r(5740),o=r(5656),i=r(6839),s=r(5452),a=r(2298);class c extends i.CaseMultiindex{static test(t){if(!t.mathmlTree)return!1;return"MMULTISCRIPTS"===n.tagName(t.mathmlTree)&&("superscript"===t.type||"subscript"===t.type)}constructor(t){super(t)}getMathml(){let t,e,r;if((0,a.setAttributes)(this.mml,this.semantic),this.semantic.childNodes[0]&&"subsup"===this.semantic.childNodes[0].role){const n=this.semantic.childNodes[0];t=n.childNodes[0],e=i.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]),r=i.CaseMultiindex.multiscriptIndex(n.childNodes[1]);const c=[this.semantic.id,[n.id,t.id,r],e];s.addCollapsedAttribute(this.mml,c),this.mml.setAttribute(a.Attribute.TYPE,n.role),this.completeMultiscript(o.SemanticSkeleton.interleaveIds(r,e),[])}else{t=this.semantic.childNodes[0],e=i.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]);const r=[this.semantic.id,t.id,e];s.addCollapsedAttribute(this.mml,r)}const n=o.SemanticSkeleton.collapsedLeafs(r||[],e),c=s.walkTree(t);return s.getInnerNode(c).setAttribute(a.Attribute.PARENT,this.semantic.id.toString()),n.unshift(t.id),this.mml.setAttribute(a.Attribute.CHILDREN,n.join(",")),this.mml}}e.CaseMultiscripts=c},3416:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseProof=void 0;const n=r(9268),o=r(5452),i=r(2298);class s extends n.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){return!!t.mathmlTree&&("inference"===t.type||"premises"===t.type)}getMathml(){return this.semantic.childNodes.length?(this.semantic.contentNodes.forEach((function(t){o.walkTree(t),(0,i.setAttributes)(t.mathmlTree,t)})),this.semantic.childNodes.forEach((function(t){o.walkTree(t)})),(0,i.setAttributes)(this.mml,this.semantic),this.mml.getAttribute("data-semantic-id")===this.mml.getAttribute("data-semantic-parent")&&this.mml.removeAttribute("data-semantic-parent"),this.mml):this.mml}}e.CaseProof=s},5699:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseTable=void 0;const n=r(5740),o=r(9268),i=r(5452),s=r(2298);class a extends o.AbstractEnrichCase{constructor(t){super(t),this.inner=[],this.mml=t.mathmlTree}static test(t){return"matrix"===t.type||"vector"===t.type||"cases"===t.type}getMathml(){const t=i.cloneContentNode(this.semantic.contentNodes[0]),e=this.semantic.contentNodes[1]?i.cloneContentNode(this.semantic.contentNodes[1]):null;if(this.inner=this.semantic.childNodes.map(i.walkTree),this.mml)if("MFENCED"===n.tagName(this.mml)){const r=this.mml.childNodes;this.mml.insertBefore(t,r[0]||null),e&&this.mml.appendChild(e),this.mml=i.rewriteMfenced(this.mml)}else{const r=[t,this.mml];e&&r.push(e),this.mml=i.introduceNewLayer(r,this.semantic)}else this.mml=i.introduceNewLayer([t].concat(this.inner,[e]),this.semantic);return(0,s.setAttributes)(this.mml,this.semantic),this.mml}}e.CaseTable=a},6887:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseTensor=void 0;const n=r(5656),o=r(6839),i=r(5452),s=r(2298);class a extends o.CaseMultiindex{static test(t){return!!t.mathmlTree&&"tensor"===t.type}constructor(t){super(t)}getMathml(){i.walkTree(this.semantic.childNodes[0]);const t=o.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]),e=o.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[2]),r=o.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[3]),a=o.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[4]);(0,s.setAttributes)(this.mml,this.semantic);const c=[this.semantic.id,this.semantic.childNodes[0].id,t,e,r,a];i.addCollapsedAttribute(this.mml,c);const l=n.SemanticSkeleton.collapsedLeafs(t,e,r,a);return l.unshift(this.semantic.childNodes[0].id),this.mml.setAttribute(s.Attribute.CHILDREN,l.join(",")),this.completeMultiscript(n.SemanticSkeleton.interleaveIds(r,a),n.SemanticSkeleton.interleaveIds(t,e)),this.mml}}e.CaseTensor=a},9236:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CaseText=void 0;const n=r(9268),o=r(5452),i=r(2298);class s extends n.AbstractEnrichCase{constructor(t){super(t),this.mml=t.mathmlTree}static test(t){return"punctuated"===t.type&&("text"===t.role||t.contentNodes.every((t=>"dummy"===t.role)))}getMathml(){const t=[],e=o.collapsePunctuated(this.semantic,t);return this.mml=o.introduceNewLayer(t,this.semantic),(0,i.setAttributes)(this.mml,this.semantic),this.mml.removeAttribute(i.Attribute.CONTENT),o.addCollapsedAttribute(this.mml,e),this.mml}}e.CaseText=s},5714:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.prepareMmlString=e.testTranslation__=e.semanticMathml=e.semanticMathmlSync=e.semanticMathmlNode=void 0;const n=r(2057),o=r(5740),i=r(5897),s=r(1414),a=r(5452),c=r(2298);function l(t){const e=o.cloneNode(t),r=s.getTree(e);return a.enrich(e,r)}function u(t){return l(o.parseInput(t))}function p(t){return t.match(/^"),t}r(1513),e.semanticMathmlNode=l,e.semanticMathmlSync=u,e.semanticMathml=function(t,e){i.EnginePromise.getall().then((()=>{const r=o.parseInput(t);e(l(r))}))},e.testTranslation__=function(t){n.Debugger.getInstance().init();const e=u(p(t)).toString();return(0,c.removeAttributePrefix)(e),n.Debugger.getInstance().exit(),e},e.prepareMmlString=p},2298:function(t,e){var r;function n(t){return t.map((function(t){return t.id})).join(",")}function o(t,e){const n=[];"mglyph"===e.role&&n.push("image"),e.attributes.href&&n.push("link"),n.length&&t.setAttribute(r.POSTFIX,n.join(" "))}Object.defineProperty(e,"__esModule",{value:!0}),e.addPrefix=e.removeAttributePrefix=e.setPostfix=e.setAttributes=e.makeIdList=e.EnrichAttributes=e.Attribute=e.Prefix=void 0,e.Prefix="data-semantic-",function(t){t.ADDED="data-semantic-added",t.ALTERNATIVE="data-semantic-alternative",t.CHILDREN="data-semantic-children",t.COLLAPSED="data-semantic-collapsed",t.CONTENT="data-semantic-content",t.EMBELLISHED="data-semantic-embellished",t.FENCEPOINTER="data-semantic-fencepointer",t.FONT="data-semantic-font",t.ID="data-semantic-id",t.ANNOTATION="data-semantic-annotation",t.OPERATOR="data-semantic-operator",t.OWNS="data-semantic-owns",t.PARENT="data-semantic-parent",t.POSTFIX="data-semantic-postfix",t.PREFIX="data-semantic-prefix",t.ROLE="data-semantic-role",t.SPEECH="data-semantic-speech",t.STRUCTURE="data-semantic-structure",t.TYPE="data-semantic-type"}(r=e.Attribute||(e.Attribute={})),e.EnrichAttributes=[r.ADDED,r.ALTERNATIVE,r.CHILDREN,r.COLLAPSED,r.CONTENT,r.EMBELLISHED,r.FENCEPOINTER,r.FONT,r.ID,r.ANNOTATION,r.OPERATOR,r.OWNS,r.PARENT,r.POSTFIX,r.PREFIX,r.ROLE,r.SPEECH,r.STRUCTURE,r.TYPE],e.makeIdList=n,e.setAttributes=function(t,i){t.setAttribute(r.TYPE,i.type);const s=i.allAttributes();for(let r,n=0;r=s[n];n++)t.setAttribute(e.Prefix+r[0].toLowerCase(),r[1]);i.childNodes.length&&t.setAttribute(r.CHILDREN,n(i.childNodes)),i.contentNodes.length&&t.setAttribute(r.CONTENT,n(i.contentNodes)),i.parent&&t.setAttribute(r.PARENT,i.parent.id.toString()),o(t,i)},e.setPostfix=o,e.removeAttributePrefix=function(t){return t.toString().replace(new RegExp(e.Prefix,"g"),"")},e.addPrefix=function(t){return e.Prefix+t}},3532:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.factory=e.getCase=void 0,e.getCase=function(t){for(let r,n=0;r=e.factory[n];n++)if(r.test(t))return r.constr(t);return null},e.factory=[]},1513:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const n=r(6061),o=r(5765),i=r(7251),s=r(6265),a=r(6514),c=r(7014),l=r(3416),u=r(5699),p=r(6887),h=r(9236);r(3532).factory.push({test:s.CaseLimit.test,constr:t=>new s.CaseLimit(t)},{test:i.CaseEmbellished.test,constr:t=>new i.CaseEmbellished(t)},{test:o.CaseDoubleScript.test,constr:t=>new o.CaseDoubleScript(t)},{test:p.CaseTensor.test,constr:t=>new p.CaseTensor(t)},{test:c.CaseMultiscripts.test,constr:t=>new c.CaseMultiscripts(t)},{test:a.CaseLine.test,constr:t=>new a.CaseLine(t)},{test:n.CaseBinomial.test,constr:t=>new n.CaseBinomial(t)},{test:l.CaseProof.test,constr:t=>new l.CaseProof(t)},{test:u.CaseTable.test,constr:t=>new u.CaseTable(t)},{test:h.CaseText.test,constr:t=>new h.CaseText(t)})},5452:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.printNodeList__=e.collapsePunctuated=e.formattedOutput_=e.formattedOutput=e.getInnerNode=e.setOperatorAttribute_=e.createInvisibleOperator_=e.rewriteMfenced=e.cloneContentNode=e.addCollapsedAttribute=e.parentNode_=e.isIgnorable_=e.unitChild_=e.descendNode_=e.ascendNewNode=e.validLca_=e.pathToRoot_=e.attachedElement_=e.prunePath_=e.mathmlLca_=e.lcaType=e.functionApplication_=e.isDescendant_=e.insertNewChild_=e.mergeChildren_=e.collectChildNodes_=e.collateChildNodes_=e.childrenSubset_=e.moveSemanticAttributes_=e.introduceLayerAboveLca=e.introduceNewLayer=e.walkTree=e.enrich=e.SETTINGS=void 0;const n=r(2057),o=r(5740),i=r(5897),s=r(3588),a=r(7516),c=r(5656),l=r(4795),u=r(2298),p=r(3532);function h(t){const e=(0,p.getCase)(t);let r;if(e)return r=e.getMathml(),T(r);if(1===t.mathml.length)return n.Debugger.getInstance().output("Walktree Case 0"),r=t.mathml[0],u.setAttributes(r,t),t.childNodes.length&&(n.Debugger.getInstance().output("Walktree Case 0.1"),t.childNodes.forEach((function(t){"empty"===t.type&&r.appendChild(h(t))}))),T(r);const o=t.contentNodes.map(P);B(t,o);const i=t.childNodes.map(h),s=c.SemanticSkeleton.combineContentChildren(t,o,i);if(r=t.mathmlTree,null===r)n.Debugger.getInstance().output("Walktree Case 1"),r=d(s,t);else{const t=A(s);n.Debugger.getInstance().output("Walktree Case 2"),t?(n.Debugger.getInstance().output("Walktree Case 2.1"),r=t.parentNode):(n.Debugger.getInstance().output("Walktree Case 2.2"),r=D(r))}return r=k(r),v(r,s,t),u.setAttributes(r,t),T(r)}function d(t,e){const r=E(t);let i=r.node;const s=r.type;if(s!==O.VALID||!l.hasEmptyTag(i))if(n.Debugger.getInstance().output("Walktree Case 1.1"),i=o.createElement("mrow"),s===O.PRUNED)n.Debugger.getInstance().output("Walktree Case 1.1.0"),i=f(i,r.node,t);else if(t[0]){n.Debugger.getInstance().output("Walktree Case 1.1.1");const e=A(t),r=y(e.parentNode,t);o.replaceNode(e,i),r.forEach((function(t){i.appendChild(t)}))}return e.mathmlTree||(e.mathmlTree=i),i}function f(t,e,r){let i=L(e);if(l.hasMathTag(i)){n.Debugger.getInstance().output("Walktree Case 1.1.0.0"),m(i,t),o.toArray(i.childNodes).forEach((function(e){t.appendChild(e)}));const e=t;t=i,i=e}const s=r.indexOf(e);return r[s]=i,o.replaceNode(i,t),t.appendChild(i),r.forEach((function(e){t.appendChild(e)})),t}function m(t,e){for(const r of u.EnrichAttributes)t.hasAttribute(r)&&(e.setAttribute(r,t.getAttribute(r)),t.removeAttribute(r))}function y(t,e){const r=o.toArray(t.childNodes);let n=1/0,i=-1/0;return e.forEach((function(t){const e=r.indexOf(t);-1!==e&&(n=Math.min(n,e),i=Math.max(i,e))})),r.slice(n,i+1)}function g(t,e,r){const n=[];let i=o.toArray(t.childNodes),s=!1;for(;i.length;){const t=i.shift();if(t.hasAttribute(u.Attribute.TYPE)){n.push(t);continue}const e=b(t);0!==e.length&&(1!==e.length?(s?t.setAttribute("AuxiliaryImplicit",!0):s=!0,i=e.concat(i)):n.push(t))}const a=[],c=r.childNodes.map((function(t){return t.mathmlTree}));for(;c.length;){const t=c.pop();if(t){if(-1!==n.indexOf(t))break;-1!==e.indexOf(t)&&a.unshift(t)}}return n.concat(a)}function b(t){const e=[];let r=o.toArray(t.childNodes);for(;r.length;){const t=r.shift();t.nodeType===o.NodeType.ELEMENT_NODE&&(t.hasAttribute(u.Attribute.TYPE)?e.push(t):r=o.toArray(t.childNodes).concat(r))}return e}function v(t,e,r){const n="implicit"===r.role&&a.flags.combine_juxtaposition?g(t,e,r):o.toArray(t.childNodes);if(!n.length)return void e.forEach((function(e){t.appendChild(e)}));let i=0;for(;e.length;){const r=e[0];n[i]===r||M(n[i],r)?(e.shift(),i++):n[i]&&-1===e.indexOf(n[i])?i++:(S(r,t)||_(t,n[i],r),e.shift())}}function _(t,e,r){if(!e)return void t.insertBefore(r,null);let n=e,o=R(n);for(;o&&o.firstChild===n&&!n.hasAttribute("AuxiliaryImplicit")&&o!==t;)n=o,o=R(n);o&&(o.insertBefore(r,n),n.removeAttribute("AuxiliaryImplicit"))}function S(t,e){if(!t)return!1;do{if((t=t.parentNode)===e)return!0}while(t);return!1}function M(t,e){const r=s.functionApplication();if(t&&e&&t.textContent&&e.textContent&&t.textContent===r&&e.textContent===r&&"true"===e.getAttribute(u.Attribute.ADDED)){for(let r,n=0;r=t.attributes[n];n++)e.hasAttribute(r.nodeName)||e.setAttribute(r.nodeName,r.nodeValue);return o.replaceNode(t,e),!0}return!1}var O;function E(t){const e=A(t);if(!e)return{type:O.INVALID,node:null};const r=A(t.slice().reverse());if(e===r)return{type:O.VALID,node:e};const n=C(e),o=x(n,t),i=C(r,(function(t){return-1!==o.indexOf(t)})),s=i[0],a=o.indexOf(s);return-1===a?{type:O.INVALID,node:null}:{type:o.length!==n.length?O.PRUNED:N(o[a+1],i[1])?O.VALID:O.INVALID,node:s}}function x(t,e){let r=0;for(;t[r]&&-1===e.indexOf(t[r]);)r++;return t.slice(0,r+1)}function A(t){let e=0,r=null;for(;!r&&e!1),n=[t];for(;!r(t)&&!l.hasMathTag(t)&&t.parentNode;)t=R(t),n.unshift(t);return n}function N(t,e){return!(!t||!e||t.previousSibling||e.nextSibling)}function T(t){for(;!l.hasMathTag(t)&&w(t);)t=R(t);return t}function L(t){const e=o.toArray(t.childNodes);if(!e)return t;const r=e.filter((function(t){return t.nodeType===o.NodeType.ELEMENT_NODE&&!l.hasIgnoreTag(t)}));return 1===r.length&&l.hasEmptyTag(r[0])&&!r[0].hasAttribute(u.Attribute.TYPE)?L(r[0]):t}function w(t){const e=R(t);return!(!e||!l.hasEmptyTag(e))&&o.toArray(e.childNodes).every((function(e){return e===t||I(e)}))}function I(t){if(t.nodeType!==o.NodeType.ELEMENT_NODE)return!0;if(!t||l.hasIgnoreTag(t))return!0;const e=o.toArray(t.childNodes);return!(!l.hasEmptyTag(t)&&e.length||l.hasDisplayTag(t)||t.hasAttribute(u.Attribute.TYPE)||l.isOrphanedGlyph(t))&&o.toArray(t.childNodes).every(I)}function R(t){return t.parentNode}function P(t){if(t.mathml.length)return h(t);const r=e.SETTINGS.implicit?j(t):o.createElement("mrow");return t.mathml=[r],r}function k(t){if("MFENCED"!==o.tagName(t))return t;const e=o.createElement("mrow");for(let r,n=0;r=t.attributes[n];n++)-1===["open","close","separators"].indexOf(r.name)&&e.setAttribute(r.name,r.value);return o.toArray(t.childNodes).forEach((function(t){e.appendChild(t)})),o.replaceNode(t,e),e}function j(t){const e=o.createElement("mo"),r=o.createTextNode(t.textContent);return e.appendChild(r),u.setAttributes(e,t),e.setAttribute(u.Attribute.ADDED,"true"),e}function B(t,e){const r=t.type+(t.textContent?","+t.textContent:"");e.forEach((function(t){D(t).setAttribute(u.Attribute.OPERATOR,r)}))}function D(t){const e=o.toArray(t.childNodes);if(!e)return t;const r=e.filter((function(t){return!I(t)})),n=[];for(let t,e=0;t=r[e];e++)if(l.hasEmptyTag(t)){const e=D(t);e&&e!==t&&n.push(e)}else n.push(t);return 1===n.length?n[0]:t}function F(t,e,r,n){const o=n||!1;H(t,"Original MathML",o),H(r,"Semantic Tree",o),H(e,"Semantically enriched MathML",o)}function H(t,e,r){const n=o.formatXml(t.toString());r?console.info(e+":\n```html\n"+u.removeAttributePrefix(n)+"\n```\n"):console.info(n)}e.SETTINGS={collapsed:!0,implicit:!0},e.enrich=function(t,e){const r=o.cloneNode(t);return h(e.root),i.default.getInstance().structure&&t.setAttribute(u.Attribute.STRUCTURE,c.SemanticSkeleton.fromStructure(t,e).toString()),n.Debugger.getInstance().generateOutput((function(){return F(r,t,e,!0),[]})),t},e.walkTree=h,e.introduceNewLayer=d,e.introduceLayerAboveLca=f,e.moveSemanticAttributes_=m,e.childrenSubset_=y,e.collateChildNodes_=g,e.collectChildNodes_=b,e.mergeChildren_=v,e.insertNewChild_=_,e.isDescendant_=S,e.functionApplication_=M,function(t){t.VALID="valid",t.INVALID="invalid",t.PRUNED="pruned"}(O=e.lcaType||(e.lcaType={})),e.mathmlLca_=E,e.prunePath_=x,e.attachedElement_=A,e.pathToRoot_=C,e.validLca_=N,e.ascendNewNode=T,e.descendNode_=L,e.unitChild_=w,e.isIgnorable_=I,e.parentNode_=R,e.addCollapsedAttribute=function(t,e){const r=new c.SemanticSkeleton(e);t.setAttribute(u.Attribute.COLLAPSED,r.toString())},e.cloneContentNode=P,e.rewriteMfenced=k,e.createInvisibleOperator_=j,e.setOperatorAttribute_=B,e.getInnerNode=D,e.formattedOutput=F,e.formattedOutput_=H,e.collapsePunctuated=function(t,e){const r=!!e,n=e||[],o=t.parent,i=t.contentNodes.map((function(t){return t.id}));i.unshift("c");const s=[t.id,i];for(let e,i=0;e=t.childNodes[i];i++){const t=h(e);n.push(t);const i=D(t);o&&!r&&i.setAttribute(u.Attribute.PARENT,o.id.toString()),s.push(e.id)}return s},e.printNodeList__=function(t,e){console.info(t),o.toArray(e).forEach((function(t){console.info(t.toString())})),console.info("<<<<<<<<<<<<<<<<<")}},5105:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractHighlighter=void 0;const n=r(5274),o=r(2298);class i{constructor(){this.color=null,this.mactionName="",this.currentHighlights=[]}highlight(t){this.currentHighlights.push(t.map((t=>{const e=this.highlightNode(t);return this.setHighlighted(t),e})))}highlightAll(t){const e=this.getMactionNodes(t);for(let t,r=0;t=e[r];r++)this.highlight([t])}unhighlight(){const t=this.currentHighlights.pop();t&&t.forEach((t=>{this.isHighlighted(t.node)&&(this.unhighlightNode(t),this.unsetHighlighted(t.node))}))}unhighlightAll(){for(;this.currentHighlights.length>0;)this.unhighlight()}setColor(t){this.color=t}colorString(){return this.color.rgba()}addEvents(t,e){const r=this.getMactionNodes(t);for(let t,n=0;t=r[n];n++)for(const r in e)t.addEventListener(r,e[r])}getMactionNodes(t){return Array.from(t.getElementsByClassName(this.mactionName))}isMactionNode(t){const e=t.className||t.getAttribute("class");return!!e&&!!e.match(new RegExp(this.mactionName))}isHighlighted(t){return t.hasAttribute(i.ATTR)}setHighlighted(t){t.setAttribute(i.ATTR,"true")}unsetHighlighted(t){t.removeAttribute(i.ATTR)}colorizeAll(t){n.evalXPath(`.//*[@${o.Attribute.ID}]`,t).forEach((t=>this.colorize(t)))}uncolorizeAll(t){n.evalXPath(`.//*[@${o.Attribute.ID}]`,t).forEach((t=>this.uncolorize(t)))}colorize(t){const e=(0,o.addPrefix)("foreground");t.hasAttribute(e)&&(t.setAttribute(e+"-old",t.style.color),t.style.color=t.getAttribute(e))}uncolorize(t){const e=(0,o.addPrefix)("foreground")+"-old";t.hasAttribute(e)&&(t.style.color=t.getAttribute(e))}}e.AbstractHighlighter=i,i.ATTR="sre-highlight"},6937:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.ChtmlHighlighter=void 0;const n=r(933);class o extends n.CssHighlighter{constructor(){super()}isMactionNode(t){return t.tagName.toUpperCase()===this.mactionName.toUpperCase()}getMactionNodes(t){return Array.from(t.getElementsByTagName(this.mactionName))}}e.ChtmlHighlighter=o},8396:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContrastPicker=e.ColorPicker=void 0;const r={red:{red:255,green:0,blue:0},green:{red:0,green:255,blue:0},blue:{red:0,green:0,blue:255},yellow:{red:255,green:255,blue:0},cyan:{red:0,green:255,blue:255},magenta:{red:255,green:0,blue:255},white:{red:255,green:255,blue:255},black:{red:0,green:0,blue:0}};function n(t,e){const n=t||{color:e};let o=Object.prototype.hasOwnProperty.call(n,"color")?r[n.color]:n;return o||(o=r[e]),o.alpha=Object.prototype.hasOwnProperty.call(n,"alpha")?n.alpha:1,function(t){const e=t=>(t=Math.max(t,0),t=Math.min(255,t),Math.round(t));return t.red=e(t.red),t.green=e(t.green),t.blue=e(t.blue),t.alpha=Math.max(t.alpha,0),t.alpha=Math.min(1,t.alpha),t}(o)}class o{constructor(t,e){this.foreground=n(e,o.DEFAULT_FOREGROUND_),this.background=n(t,o.DEFAULT_BACKGROUND_)}static toHex(t){const e=t.toString(16);return 1===e.length?"0"+e:e}rgba(){const t=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"};return{background:t(this.background),foreground:t(this.foreground)}}rgb(){const t=function(t){return"rgb("+t.red+","+t.green+","+t.blue+")"};return{background:t(this.background),alphaback:this.background.alpha.toString(),foreground:t(this.foreground),alphafore:this.foreground.alpha.toString()}}hex(){const t=function(t){return"#"+o.toHex(t.red)+o.toHex(t.green)+o.toHex(t.blue)};return{background:t(this.background),alphaback:this.background.alpha.toString(),foreground:t(this.foreground),alphafore:this.foreground.alpha.toString()}}}e.ColorPicker=o,o.DEFAULT_BACKGROUND_="blue",o.DEFAULT_FOREGROUND_="black";e.ContrastPicker=class{constructor(){this.hue=10,this.sat=100,this.light=50,this.incr=50}generate(){return e=function(t,e,r){e=e>1?e/100:e,r=r>1?r/100:r;const n=(1-Math.abs(2*r-1))*e,o=n*(1-Math.abs(t/60%2-1)),i=r-n/2;let s=0,a=0,c=0;return 0<=t&&t<60?[s,a,c]=[n,o,0]:60<=t&&t<120?[s,a,c]=[o,n,0]:120<=t&&t<180?[s,a,c]=[0,n,o]:180<=t&&t<240?[s,a,c]=[0,o,n]:240<=t&&t<300?[s,a,c]=[o,0,n]:300<=t&&t<360&&([s,a,c]=[n,0,o]),{red:s+i,green:a+i,blue:c+i}}(this.hue,this.sat,this.light),"rgb("+(t={red:Math.round(255*e.red),green:Math.round(255*e.green),blue:Math.round(255*e.blue)}).red+","+t.green+","+t.blue+")";var t,e}increment(){this.hue=(this.hue+this.incr)%360}}},933:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.CssHighlighter=void 0;const n=r(5105);class o extends n.AbstractHighlighter{constructor(){super(),this.mactionName="mjx-maction"}highlightNode(t){const e={node:t,background:t.style.backgroundColor,foreground:t.style.color},r=this.colorString();return t.style.backgroundColor=r.background,t.style.color=r.foreground,e}unhighlightNode(t){t.node.style.backgroundColor=t.background,t.node.style.color=t.foreground}}e.CssHighlighter=o},3090:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.highlighterMapping_=e.addEvents=e.highlighter=void 0;const n=r(6937),o=r(8396),i=r(933),s=r(2598),a=r(4500),c=r(7071),l=r(4346),u=r(2222);e.highlighter=function(t,r,n){const i=new o.ColorPicker(t,r),s="NativeMML"===n.renderer&&"Safari"===n.browser?"MML-CSS":"SVG"===n.renderer&&"v3"===n.browser?"SVG-V3":n.renderer,a=new(e.highlighterMapping_[s]||e.highlighterMapping_.NativeMML);return a.setColor(i),a},e.addEvents=function(t,r,n){const o=e.highlighterMapping_[n.renderer];o&&(new o).addEvents(t,r)},e.highlighterMapping_={SVG:l.SvgHighlighter,"SVG-V3":u.SvgV3Highlighter,NativeMML:c.MmlHighlighter,"HTML-CSS":s.HtmlHighlighter,"MML-CSS":a.MmlCssHighlighter,CommonHTML:i.CssHighlighter,CHTML:n.ChtmlHighlighter}},2598:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.HtmlHighlighter=void 0;const n=r(5740),o=r(5105);class i extends o.AbstractHighlighter{constructor(){super(),this.mactionName="maction"}highlightNode(t){const e={node:t,foreground:t.style.color,position:t.style.position},r=this.color.rgb();t.style.color=r.foreground,t.style.position="relative";const o=t.bbox;if(o&&o.w){const i=.05,s=0,a=n.createElement("span"),c=parseFloat(t.style.paddingLeft||"0");a.style.backgroundColor=r.background,a.style.opacity=r.alphaback.toString(),a.style.display="inline-block",a.style.height=o.h+o.d+2*i+"em",a.style.verticalAlign=-o.d+"em",a.style.marginTop=a.style.marginBottom=-i+"em",a.style.width=o.w+2*s+"em",a.style.marginLeft=c-s+"em",a.style.marginRight=-o.w-s-c+"em",t.parentNode.insertBefore(a,t),e.box=a}return e}unhighlightNode(t){const e=t.node;e.style.color=t.foreground,e.style.position=t.position,t.box&&t.box.parentNode.removeChild(t.box)}}e.HtmlHighlighter=i},4500:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.MmlCssHighlighter=void 0;const n=r(933);class o extends n.CssHighlighter{constructor(){super(),this.mactionName="maction"}getMactionNodes(t){return Array.from(t.getElementsByTagName(this.mactionName))}isMactionNode(t){return t.tagName===this.mactionName}}e.MmlCssHighlighter=o},7071:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.MmlHighlighter=void 0;const n=r(5105);class o extends n.AbstractHighlighter{constructor(){super(),this.mactionName="maction"}highlightNode(t){let e=t.getAttribute("style");return e+=";background-color: "+this.colorString().background,e+=";color: "+this.colorString().foreground,t.setAttribute("style",e),{node:t}}unhighlightNode(t){let e=t.node.getAttribute("style");e=e.replace(";background-color: "+this.colorString().background,""),e=e.replace(";color: "+this.colorString().foreground,""),t.node.setAttribute("style",e)}colorString(){return this.color.rgba()}getMactionNodes(t){return Array.from(t.getElementsByTagName(this.mactionName))}isMactionNode(t){return t.tagName===this.mactionName}}e.MmlHighlighter=o},4346:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SvgHighlighter=void 0;const n=r(5740),o=r(5105);class i extends o.AbstractHighlighter{constructor(){super(),this.mactionName="mjx-svg-maction"}highlightNode(t){let e;if(this.isHighlighted(t))return e={node:t.previousSibling||t,background:t.style.backgroundColor,foreground:t.style.color},e;if("svg"===t.tagName){const e={node:t,background:t.style.backgroundColor,foreground:t.style.color};return t.style.backgroundColor=this.colorString().background,t.style.color=this.colorString().foreground,e}const r=n.createElementNS("http://www.w3.org/2000/svg","rect");let i;if("use"===t.nodeName){const e=n.createElementNS("http://www.w3.org/2000/svg","g");t.parentNode.insertBefore(e,t),e.appendChild(t),i=e.getBBox(),e.parentNode.replaceChild(t,e)}else i=t.getBBox();r.setAttribute("x",(i.x-40).toString()),r.setAttribute("y",(i.y-40).toString()),r.setAttribute("width",(i.width+80).toString()),r.setAttribute("height",(i.height+80).toString());const s=t.getAttribute("transform");return s&&r.setAttribute("transform",s),r.setAttribute("fill",this.colorString().background),r.setAttribute(o.AbstractHighlighter.ATTR,"true"),t.parentNode.insertBefore(r,t),e={node:r,foreground:t.getAttribute("fill")},t.setAttribute("fill",this.colorString().foreground),e}setHighlighted(t){"svg"===t.tagName&&super.setHighlighted(t)}unhighlightNode(t){if("background"in t)return t.node.style.backgroundColor=t.background,void(t.node.style.color=t.foreground);t.foreground?t.node.nextSibling.setAttribute("fill",t.foreground):t.node.nextSibling.removeAttribute("fill"),t.node.parentNode.removeChild(t.node)}isMactionNode(t){let e=t.className||t.getAttribute("class");return e=void 0!==e.baseVal?e.baseVal:e,!!e&&!!e.match(new RegExp(this.mactionName))}}e.SvgHighlighter=i},2222:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SvgV3Highlighter=void 0;const n=r(5740),o=r(5274),i=r(5105),s=r(8396),a=r(4346);class c extends a.SvgHighlighter{constructor(){super(),this.mactionName="maction"}highlightNode(t){let e;if(this.isHighlighted(t))return e={node:t,background:this.colorString().background,foreground:this.colorString().foreground},e;if("svg"===t.tagName||"MJX-CONTAINER"===t.tagName)return e={node:t,background:t.style.backgroundColor,foreground:t.style.color},t.style.backgroundColor=this.colorString().background,t.style.color=this.colorString().foreground,e;const r=n.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttribute("sre-highlighter-added","true");const o=t.getBBox();r.setAttribute("x",(o.x-40).toString()),r.setAttribute("y",(o.y-40).toString()),r.setAttribute("width",(o.width+80).toString()),r.setAttribute("height",(o.height+80).toString());const a=t.getAttribute("transform");if(a&&r.setAttribute("transform",a),r.setAttribute("fill",this.colorString().background),t.setAttribute(i.AbstractHighlighter.ATTR,"true"),t.parentNode.insertBefore(r,t),e={node:t,foreground:t.getAttribute("fill")},"rect"===t.nodeName){const e=new s.ColorPicker({alpha:0,color:"black"});t.setAttribute("fill",e.rgba().foreground)}else t.setAttribute("fill",this.colorString().foreground);return e}unhighlightNode(t){const e=t.node.previousSibling;if(e&&e.hasAttribute("sre-highlighter-added"))return t.foreground?t.node.setAttribute("fill",t.foreground):t.node.removeAttribute("fill"),void t.node.parentNode.removeChild(e);t.node.style.backgroundColor=t.background,t.node.style.color=t.foreground}isMactionNode(t){return t.getAttribute("data-mml-node")===this.mactionName}getMactionNodes(t){return Array.from(o.evalXPath(`.//*[@data-mml-node="${this.mactionName}"]`,t))}}e.SvgV3Highlighter=c},7222:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.StaticTrieNode=e.AbstractTrieNode=void 0;const n=r(2057),o=r(4391);class i{constructor(t,e){this.constraint=t,this.test=e,this.children_={},this.kind=o.TrieNodeKind.ROOT}getConstraint(){return this.constraint}getKind(){return this.kind}applyTest(t){return this.test(t)}addChild(t){const e=t.getConstraint(),r=this.children_[e];return this.children_[e]=t,r}getChild(t){return this.children_[t]}getChildren(){const t=[];for(const e in this.children_)t.push(this.children_[e]);return t}findChildren(t){const e=[];for(const r in this.children_){const n=this.children_[r];n.applyTest(t)&&e.push(n)}return e}removeChild(t){delete this.children_[t]}toString(){return this.constraint}}e.AbstractTrieNode=i;e.StaticTrieNode=class extends i{constructor(t,e){super(t,e),this.rule_=null,this.kind=o.TrieNodeKind.STATIC}getRule(){return this.rule_}setRule(t){this.rule_&&n.Debugger.getInstance().output("Replacing rule "+this.rule_+" with "+t),this.rule_=t}toString(){return this.getRule()?this.constraint+"\n==> "+this.getRule().action:this.constraint}}},4508:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.Trie=void 0;const n=r(4391),o=r(9701);class i{constructor(){this.root=(0,o.getNode)(n.TrieNodeKind.ROOT,"",null)}static collectRules_(t){const e=[];let r=[t];for(;r.length;){const t=r.shift();if(t.getKind()===n.TrieNodeKind.QUERY||t.getKind()===n.TrieNodeKind.BOOLEAN){const r=t.getRule();r&&e.unshift(r)}r=r.concat(t.getChildren())}return e}static printWithDepth_(t,e,r){r+=new Array(e+2).join(e.toString())+": "+t.toString()+"\n";const n=t.getChildren();for(let t,o=0;t=n[o];o++)r=i.printWithDepth_(t,e+1,r);return r}static order_(t){const e=t.getChildren();if(!e.length)return 0;const r=Math.max.apply(null,e.map(i.order_));return Math.max(e.length,r)}addRule(t){let e=this.root;const r=t.context,o=t.dynamicCstr.getValues();for(let t=0,i=o.length;t{e.getKind()===n.TrieNodeKind.DYNAMIC&&-1===t.indexOf(e.getConstraint())||o.push(e)}))}r=o.slice()}for(;r.length;){const e=r.shift();if(e.getRule){const t=e.getRule();t&&o.push(t)}const n=e.findChildren(t);r=r.concat(n)}return o}hasSubtrie(t){let e=this.root;for(let r=0,n=t.length;r!0)),this.kind=l.TrieNodeKind.ROOT}}e.RootTrieNode=u;class p extends a.AbstractTrieNode{constructor(t){super(t,(e=>e===t)),this.kind=l.TrieNodeKind.DYNAMIC}}e.DynamicTrieNode=p;const h={"=":(t,e)=>t===e,"!=":(t,e)=>t!==e,"<":(t,e)=>t":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e};function d(t){if(t.match(/^self::\*$/))return t=>!0;if(t.match(/^self::\w+$/)){const e=t.slice(6).toUpperCase();return t=>t.tagName&&n.tagName(t)===e}if(t.match(/^self::\w+:\w+$/)){const e=t.split(":"),r=o.resolveNameSpace(e[2]);if(!r)return null;const n=e[3].toUpperCase();return t=>t.localName&&t.localName.toUpperCase()===n&&t.namespaceURI===r}if(t.match(/^@\w+$/)){const e=t.slice(1);return t=>t.hasAttribute&&t.hasAttribute(e)}if(t.match(/^@\w+="[\w\d ]+"$/)){const e=t.split("="),r=e[0].slice(1),n=e[1].slice(1,-1);return t=>t.hasAttribute&&t.hasAttribute(r)&&t.getAttribute(r)===n}if(t.match(/^@\w+!="[\w\d ]+"$/)){const e=t.split("!="),r=e[0].slice(1),n=e[1].slice(1,-1);return t=>!t.hasAttribute||!t.hasAttribute(r)||t.getAttribute(r)!==n}if(t.match(/^contains\(\s*@grammar\s*,\s*"[\w\d ]+"\s*\)$/)){const e=t.split('"')[1];return t=>!!i.Grammar.getInstance().getParameter(e)}if(t.match(/^not\(\s*contains\(\s*@grammar\s*,\s*"[\w\d ]+"\s*\)\s*\)$/)){const e=t.split('"')[1];return t=>!i.Grammar.getInstance().getParameter(e)}if(t.match(/^name\(\.\.\/\.\.\)="\w+"$/)){const e=t.split('"')[1].toUpperCase();return t=>{var r,o;return(null===(o=null===(r=t.parentNode)||void 0===r?void 0:r.parentNode)||void 0===o?void 0:o.tagName)&&n.tagName(t.parentNode.parentNode)===e}}if(t.match(/^count\(preceding-sibling::\*\)=\d+$/)){const e=t.split("="),r=parseInt(e[1],10);return t=>{var e;return(null===(e=t.parentNode)||void 0===e?void 0:e.childNodes[r])===t}}if(t.match(/^.+\[@category!?=".+"\]$/)){let[,e,r,n]=t.match(/^(.+)\[@category(!?=)"(.+)"\]$/);const i=n.match(/^unit:(.+)$/);let a="";return i&&(n=i[1],a=":unit"),t=>{const i=o.evalXPath(e,t)[0];if(i){const t=s.lookupCategory(i.textContent+a);return"="===r?t===n:t!==n}return!1}}if(t.match(/^string-length\(.+\)\W+\d+/)){const[,e,r,n]=t.match(/^string-length\((.+)\)(\W+)(\d+)/),i=h[r]||h["="],s=parseInt(n,10);return t=>{const r=o.evalXPath(e,t)[0];return!!r&&i(Array.from(r.textContent).length,s)}}return null}e.constraintTest_=d;class f extends c.StaticTrieNode{constructor(t,e){super(t,d(t)),this.context=e,this.kind=l.TrieNodeKind.QUERY}applyTest(t){return this.test?this.test(t):this.context.applyQuery(t,this.constraint)===t}}e.QueryTrieNode=f;class m extends c.StaticTrieNode{constructor(t,e){super(t,d(t)),this.context=e,this.kind=l.TrieNodeKind.BOOLEAN}applyTest(t){return this.test?this.test(t):this.context.applyConstraint(t,this.constraint)}}e.BooleanTrieNode=m},7491:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.completeLocale=e.getLocale=e.setLocale=e.locales=void 0;const n=r(5897),o=r(1377),i=r(2105),s=r(4249),a=r(8657),c=r(173),l=r(9393),u=r(7978),p=r(5540),h=r(5218),d=r(3887),f=r(8384),m=r(7206),y=r(7734),g=r(7264),b=r(4356);function v(){const t=o.Variables.ensureLocale(n.default.getInstance().locale,n.default.getInstance().defaultLocale);return n.default.getInstance().locale=t,e.locales[t]()}e.locales={ca:s.ca,da:a.da,de:c.de,en:l.en,es:u.es,fr:p.fr,hi:h.hi,it:d.it,nb:f.nb,nn:y.nn,sv:g.sv,nemeth:m.nemeth},e.setLocale=function(){const t=v();if(function(t){const e=n.default.getInstance().subiso;-1===t.SUBISO.all.indexOf(e)&&(n.default.getInstance().subiso=t.SUBISO.default);t.SUBISO.current=n.default.getInstance().subiso}(t),t){for(const e of Object.getOwnPropertyNames(t))b.LOCALE[e]=t[e];for(const[e,r]of Object.entries(t.CORRECTIONS))i.Grammar.getInstance().setCorrection(e,r)}},e.getLocale=v,e.completeLocale=function(t){const r=e.locales[t.locale];if(!r)return void console.error("Locale "+t.locale+" does not exist!");const n=t.kind.toUpperCase(),o=t.messages;if(!o)return;const i=r();for(const[t,e]of Object.entries(o))i[n][t]=e}},4356:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.createLocale=e.LOCALE=void 0;const n=r(7549);function o(){return{FUNCTIONS:(0,n.FUNCTIONS)(),MESSAGES:(0,n.MESSAGES)(),ALPHABETS:(0,n.ALPHABETS)(),NUMBERS:(0,n.NUMBERS)(),COMBINERS:{},CORRECTIONS:{},SUBISO:(0,n.SUBISO)()}}e.LOCALE=o(),e.createLocale=o},2536:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.localeFontCombiner=e.extractString=e.localEnclose=e.localRole=e.localFont=e.combinePostfixIndex=e.nestingToString=void 0;const n=r(4356),o=r(4977);function i(t,e){return void 0===t?e:"string"==typeof t?t:t[0]}e.nestingToString=function(t){switch(t){case 1:return n.LOCALE.MESSAGES.MS.ONCE||"";case 2:return n.LOCALE.MESSAGES.MS.TWICE;default:return t.toString()}},e.combinePostfixIndex=function(t,e){return t===n.LOCALE.MESSAGES.MS.ROOTINDEX||t===n.LOCALE.MESSAGES.MS.INDEX?t:t+" "+e},e.localFont=function(t){return i(n.LOCALE.MESSAGES.font[t],t)},e.localRole=function(t){return i(n.LOCALE.MESSAGES.role[t],t)},e.localEnclose=function(t){return i(n.LOCALE.MESSAGES.enclose[t],t)},e.extractString=i,e.localeFontCombiner=function(t){return"string"==typeof t?{font:t,combiner:n.LOCALE.ALPHABETS.combiner}:{font:t[0],combiner:n.LOCALE.COMBINERS[t[1]]||o.Combiners[t[1]]||n.LOCALE.ALPHABETS.combiner}}},4249:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.ca=void 0;const n=r(4356),o=r(2536),i=r(614),s=r(4977),a=function(t,e,r){return t="sans serif "+(r?r+" "+t:t),e?t+" "+e:t};let c=null;e.ca=function(){return c||(c=function(){const t=(0,n.createLocale)();return t.NUMBERS=i.default,t.COMBINERS.sansserif=a,t.FUNCTIONS.fracNestDepth=t=>!1,t.FUNCTIONS.combineRootIndex=o.combinePostfixIndex,t.FUNCTIONS.combineNestedRadical=(t,e,r)=>t+r,t.FUNCTIONS.fontRegexp=t=>RegExp("^"+t+" "),t.FUNCTIONS.plural=t=>/.*os$/.test(t)?t+"sos":/.*s$/.test(t)?t+"os":/.*ga$/.test(t)?t.slice(0,-2)+"gues":/.*\xe7a$/.test(t)?t.slice(0,-2)+"ces":/.*ca$/.test(t)?t.slice(0,-2)+"ques":/.*ja$/.test(t)?t.slice(0,-2)+"ges":/.*qua$/.test(t)?t.slice(0,-3)+"q\xfces":/.*a$/.test(t)?t.slice(0,-1)+"es":/.*(e|i)$/.test(t)?t+"ns":/.*\xed$/.test(t)?t.slice(0,-1)+"ins":t+"s",t.FUNCTIONS.si=(t,e)=>(e.match(/^metre/)&&(t=t.replace(/a$/,"\xe0").replace(/o$/,"\xf2").replace(/i$/,"\xed")),t+e),t.ALPHABETS.combiner=s.Combiners.prefixCombiner,t}()),c}},8657:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.da=void 0;const n=r(4356),o=r(2536),i=r(3866),s=r(4977);let a=null;e.da=function(){return a||(a=function(){const t=(0,n.createLocale)();return t.NUMBERS=i.default,t.FUNCTIONS.radicalNestDepth=o.nestingToString,t.FUNCTIONS.fontRegexp=e=>e===t.ALPHABETS.capPrefix.default?RegExp("^"+e+" "):RegExp(" "+e+"$"),t.ALPHABETS.combiner=s.Combiners.postfixCombiner,t.ALPHABETS.digitTrans.default=i.default.numberToWords,t}()),a}},173:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.de=void 0;const n=r(2105),o=r(2536),i=r(4356),s=r(1435),a=function(t,e,r){return"s"===r&&(e=e.split(" ").map((function(t){return t.replace(/s$/,"")})).join(" "),r=""),t=r?r+" "+t:t,e?e+" "+t:t},c=function(t,e,r){return t=r&&"s"!==r?r+" "+t:t,e?t+" "+e:t};let l=null;e.de=function(){return l||(l=function(){const t=(0,i.createLocale)();return t.NUMBERS=s.default,t.COMBINERS.germanPostfix=c,t.ALPHABETS.combiner=a,t.FUNCTIONS.radicalNestDepth=e=>e>1?t.NUMBERS.numberToWords(e)+"fach":"",t.FUNCTIONS.combineRootIndex=(t,e)=>{const r=e?e+"wurzel":"";return t.replace("Wurzel",r)},t.FUNCTIONS.combineNestedRadical=(t,e,r)=>{const n=(e?e+" ":"")+(t=r.match(/exponent$/)?t+"r":t);return r.match(/ /)?r.replace(/ /," "+n+" "):n+" "+r},t.FUNCTIONS.fontRegexp=function(t){return t=t.split(" ").map((function(t){return t.replace(/s$/,"(|s)")})).join(" "),new RegExp("((^"+t+" )|( "+t+"$))")},t.CORRECTIONS.correctOne=t=>t.replace(/^eins$/,"ein"),t.CORRECTIONS.localFontNumber=t=>(0,o.localFont)(t).split(" ").map((function(t){return t.replace(/s$/,"")})).join(" "),t.CORRECTIONS.lowercase=t=>t.toLowerCase(),t.CORRECTIONS.article=t=>{const e=n.Grammar.getInstance().getParameter("case"),r=n.Grammar.getInstance().getParameter("plural");return"dative"===e?{der:"dem",die:r?"den":"der",das:"dem"}[t]:t},t.CORRECTIONS.masculine=t=>"dative"===n.Grammar.getInstance().getParameter("case")?t+"n":t,t}()),l}},9393:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.en=void 0;const n=r(2105),o=r(4356),i=r(2536),s=r(310),a=r(4977);let c=null;e.en=function(){return c||(c=function(){const t=(0,o.createLocale)();return t.NUMBERS=s.default,t.FUNCTIONS.radicalNestDepth=i.nestingToString,t.FUNCTIONS.plural=t=>/.*s$/.test(t)?t:t+"s",t.ALPHABETS.combiner=a.Combiners.prefixCombiner,t.ALPHABETS.digitTrans.default=s.default.numberToWords,t.CORRECTIONS.article=t=>n.Grammar.getInstance().getParameter("noArticle")?"":t,t}()),c}},7978:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.es=void 0;const n=r(4356),o=r(2536),i=r(4634),s=r(4977),a=function(t,e,r){return t="sans serif "+(r?r+" "+t:t),e?t+" "+e:t};let c=null;e.es=function(){return c||(c=function(){const t=(0,n.createLocale)();return t.NUMBERS=i.default,t.COMBINERS.sansserif=a,t.FUNCTIONS.fracNestDepth=t=>!1,t.FUNCTIONS.combineRootIndex=o.combinePostfixIndex,t.FUNCTIONS.combineNestedRadical=(t,e,r)=>t+r,t.FUNCTIONS.fontRegexp=t=>RegExp("^"+t+" "),t.FUNCTIONS.plural=t=>/.*(a|e|i|o|u)$/.test(t)?t+"s":/.*z$/.test(t)?t.slice(0,-1)+"ces":/.*c$/.test(t)?t.slice(0,-1)+"ques":/.*g$/.test(t)?t+"ues":/.*\u00f3n$/.test(t)?t.slice(0,-2)+"ones":t+"es",t.FUNCTIONS.si=(t,e)=>(e.match(/^metro/)&&(t=t.replace(/a$/,"\xe1").replace(/o$/,"\xf3").replace(/i$/,"\xed")),t+e),t.ALPHABETS.combiner=s.Combiners.prefixCombiner,t}()),c}},5540:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.fr=void 0;const n=r(2105),o=r(4356),i=r(2536),s=r(2350),a=r(4977);let c=null;e.fr=function(){return c||(c=function(){const t=(0,o.createLocale)();return t.NUMBERS=s.default,t.FUNCTIONS.radicalNestDepth=i.nestingToString,t.FUNCTIONS.combineRootIndex=i.combinePostfixIndex,t.FUNCTIONS.combineNestedFraction=(t,e,r)=>r.replace(/ $/g,"")+e+t,t.FUNCTIONS.combineNestedRadical=(t,e,r)=>r+" "+t,t.FUNCTIONS.fontRegexp=t=>RegExp(" (en |)"+t+"$"),t.FUNCTIONS.plural=t=>/.*s$/.test(t)?t:t+"s",t.CORRECTIONS.article=t=>n.Grammar.getInstance().getParameter("noArticle")?"":t,t.ALPHABETS.combiner=a.Combiners.romanceCombiner,t.SUBISO={default:"fr",current:"fr",all:["fr","be","ch"]},t}()),c}},5218:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.hi=void 0;const n=r(4356),o=r(4438),i=r(4977),s=r(2536);let a=null;e.hi=function(){return a||(a=function(){const t=(0,n.createLocale)();return t.NUMBERS=o.default,t.ALPHABETS.combiner=i.Combiners.prefixCombiner,t.FUNCTIONS.radicalNestDepth=s.nestingToString,t}()),a}},3887:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.it=void 0;const n=r(2536),o=r(4356),i=r(8825),s=r(4977),a=function(t,e,r){return t.match(/^[a-zA-Z]$/)&&(e=e.replace("cerchiato","cerchiata")),t=r?t+" "+r:t,e?t+" "+e:t};let c=null;e.it=function(){return c||(c=function(){const t=(0,o.createLocale)();return t.NUMBERS=i.default,t.COMBINERS.italianPostfix=a,t.FUNCTIONS.radicalNestDepth=n.nestingToString,t.FUNCTIONS.combineRootIndex=n.combinePostfixIndex,t.FUNCTIONS.combineNestedFraction=(t,e,r)=>r.replace(/ $/g,"")+e+t,t.FUNCTIONS.combineNestedRadical=(t,e,r)=>r+" "+t,t.FUNCTIONS.fontRegexp=t=>RegExp(" (en |)"+t+"$"),t.ALPHABETS.combiner=s.Combiners.romanceCombiner,t}()),c}},8384:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.nb=void 0;const n=r(4356),o=r(2536),i=r(8274),s=r(4977);let a=null;e.nb=function(){return a||(a=function(){const t=(0,n.createLocale)();return t.NUMBERS=i.default,t.ALPHABETS.combiner=s.Combiners.prefixCombiner,t.ALPHABETS.digitTrans.default=i.default.numberToWords,t.FUNCTIONS.radicalNestDepth=o.nestingToString,t}()),a}},7206:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.nemeth=void 0;const n=r(4356),o=r(3720),i=r(4977),s=function(t){return t.match(RegExp("^"+h.ALPHABETS.languagePrefix.english))?t.slice(1):t},a=function(t,e,r){return t=s(t),e?t+e:t},c=function(t,e,r){return e+s(t)},l=function(t,e,r){return e+(r||"")+(t=s(t))+"\u283b"},u=function(t,e,r){return e+(r||"")+(t=s(t))+"\u283b\u283b"},p=function(t,e,r){return e+(t=s(t))+"\u283e"};let h=null;e.nemeth=function(){return h||(h=function(){const t=(0,n.createLocale)();return t.NUMBERS=o.default,t.COMBINERS={postfixCombiner:a,germanCombiner:c,embellishCombiner:l,doubleEmbellishCombiner:u,parensCombiner:p},t.FUNCTIONS.fracNestDepth=t=>!1,t.FUNCTIONS.fontRegexp=t=>RegExp("^"+t),t.FUNCTIONS.si=i.identityTransformer,t.ALPHABETS.combiner=(t,e,r)=>e?e+r+t:s(t),t.ALPHABETS.digitTrans={default:o.default.numberToWords},t}()),h}},7734:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.nn=void 0;const n=r(4356),o=r(2536),i=r(8274),s=r(4977);let a=null;e.nn=function(){return a||(a=function(){const t=(0,n.createLocale)();return t.NUMBERS=i.default,t.ALPHABETS.combiner=s.Combiners.prefixCombiner,t.ALPHABETS.digitTrans.default=i.default.numberToWords,t.FUNCTIONS.radicalNestDepth=o.nestingToString,t.SUBISO={default:"",current:"",all:["","alt"]},t}()),a}},7264:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.sv=void 0;const n=r(4356),o=r(2536),i=r(3898),s=r(4977);let a=null;e.sv=function(){return a||(a=function(){const t=(0,n.createLocale)();return t.NUMBERS=i.default,t.FUNCTIONS.radicalNestDepth=o.nestingToString,t.FUNCTIONS.fontRegexp=function(t){return new RegExp("((^"+t+" )|( "+t+"$))")},t.ALPHABETS.combiner=s.Combiners.prefixCombiner,t.ALPHABETS.digitTrans.default=i.default.numberToWords,t.CORRECTIONS.correctOne=t=>t.replace(/^ett$/,"en"),t}()),a}},7549:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SUBISO=e.FUNCTIONS=e.ALPHABETS=e.NUMBERS=e.MESSAGES=void 0;const n=r(4977);e.MESSAGES=function(){return{MS:{},MSroots:{},font:{},embellish:{},role:{},enclose:{},navigate:{},regexp:{},unitTimes:""}},e.NUMBERS=function(){return{zero:"zero",ones:[],tens:[],large:[],special:{},wordOrdinal:n.identityTransformer,numericOrdinal:n.identityTransformer,numberToWords:n.identityTransformer,numberToOrdinal:n.pluralCase,vulgarSep:" ",numSep:" "}},e.ALPHABETS=function(){return{latinSmall:[],latinCap:[],greekSmall:[],greekCap:[],capPrefix:{default:""},smallPrefix:{default:""},digitPrefix:{default:""},languagePrefix:{},digitTrans:{default:n.identityTransformer,mathspeak:n.identityTransformer,clearspeak:n.identityTransformer},letterTrans:{default:n.identityTransformer},combiner:(t,e,r)=>t}},e.FUNCTIONS=function(){return{fracNestDepth:t=>n.vulgarFractionSmall(t,10,100),radicalNestDepth:t=>"",combineRootIndex:function(t,e){return t},combineNestedFraction:n.Combiners.identityCombiner,combineNestedRadical:n.Combiners.identityCombiner,fontRegexp:function(t){return new RegExp("^"+t.split(/ |-/).join("( |-)")+"( |-)")},si:n.siCombiner,plural:n.identityTransformer}},e.SUBISO=function(){return{default:"",current:"",all:[]}}},614:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const n=r(2105);function o(t){const e=t%1e3,r=Math.floor(e/100),n=r?1===r?"cent":a.ones[r]+"-cents":"",o=function(t){const e=t%100;if(e<20)return a.ones[e];const r=Math.floor(e/10),n=a.tens[r],o=a.ones[e%10];return n&&o?n+(2===r?"-i-":"-")+o:n||o}(e%100);return n&&o?n+a.numSep+o:n||o}function i(t){if(0===t)return a.zero;if(t>=Math.pow(10,36))return t.toString();let e=0,r="";for(;t>0;){const n=t%(e>1?1e6:1e3);if(n){let t=a.large[e];if(e)if(1===e)r=(1===n?"":o(n)+a.numSep)+t+(r?a.numSep+r:"");else{const e=i(n);t=1===n?t:t.replace(/\u00f3$/,"ons"),r=e+a.numSep+t+(r?a.numSep+r:"")}else r=o(n)}t=Math.floor(t/(e>1?1e6:1e3)),e++}return r}function s(t){const e=n.Grammar.getInstance().getParameter("gender");return t.toString()+("f"===e?"a":"n")}const a=(0,r(7549).NUMBERS)();a.numericOrdinal=s,a.numberToWords=i,a.numberToOrdinal=function(t,e){if(t>1999)return s(t);if(t<=10)return a.special.onesOrdinals[t-1];const r=i(t);return r.match(/mil$/)?r.replace(/mil$/,"mil\xb7l\xe8sima"):r.match(/u$/)?r.replace(/u$/,"vena"):r.match(/a$/)?r.replace(/a$/,"ena"):r+(r.match(/e$/)?"na":"ena")},e.default=a},3866:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});function n(t,e=!1){return t===a.ones[1]?e?"et":"en":t}function o(t,e=!1){let r=t%1e3,o="",i=a.ones[Math.floor(r/100)];if(o+=i?n(i,!0)+" hundrede":"",r%=100,r)if(o+=o?" og ":"",i=e?a.special.smallOrdinals[r]:a.ones[r],i)o+=i;else{const t=e?a.special.tensOrdinals[Math.floor(r/10)]:a.tens[Math.floor(r/10)];i=a.ones[r%10],o+=i?n(i)+"og"+t:t}return o}function i(t,e=!1){if(0===t)return a.zero;if(t>=Math.pow(10,36))return t.toString();let r=0,i="";for(;t>0;){const s=t%1e3;if(s){const t=o(s,e&&!r);if(r){const e=a.large[r],o=s>1?"er":"";i=n(t,r<=1)+" "+e+o+(i?" og ":"")+i}else i=n(t)+i}t=Math.floor(t/1e3),r++}return i}function s(t){if(t%100)return i(t,!0);const e=i(t);return e.match(/e$/)?e:e+"e"}const a=(0,r(7549).NUMBERS)();a.wordOrdinal=s,a.numericOrdinal=function(t){return t.toString()+"."},a.numberToWords=i,a.numberToOrdinal=function(t,e){return 1===t?e?"hel":"hele":2===t?e?"halv":"halve":s(t)+(e?"dele":"del")},e.default=a},1435:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});function n(t,e=!1){return t===a.ones[1]?e?"eine":"ein":t}function o(t){let e=t%1e3,r="",o=a.ones[Math.floor(e/100)];if(r+=o?n(o)+"hundert":"",e%=100,e)if(r+=r?a.numSep:"",o=a.ones[e],o)r+=o;else{const t=a.tens[Math.floor(e/10)];o=a.ones[e%10],r+=o?n(o)+"und"+t:t}return r}function i(t){if(0===t)return a.zero;if(t>=Math.pow(10,36))return t.toString();let e=0,r="";for(;t>0;){const i=t%1e3;if(i){const s=o(t%1e3);if(e){const t=a.large[e],o=e>1&&i>1?t.match(/e$/)?"n":"en":"";r=n(s,e>1)+t+o+r}else r=n(s,e>1)+r}t=Math.floor(t/1e3),e++}return r.replace(/ein$/,"eins")}function s(t){if(1===t)return"erste";if(3===t)return"dritte";if(7===t)return"siebte";if(8===t)return"achte";return i(t)+(t<19?"te":"ste")}const a=(0,r(7549).NUMBERS)();a.wordOrdinal=s,a.numericOrdinal=function(t){return t.toString()+"."},a.numberToWords=i,a.numberToOrdinal=function(t,e){return 1===t?"eintel":2===t?e?"halbe":"halb":s(t)+"l"},e.default=a},310:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});function n(t){let e=t%1e3,r="";return r+=s.ones[Math.floor(e/100)]?s.ones[Math.floor(e/100)]+s.numSep+"hundred":"",e%=100,e&&(r+=r?s.numSep:"",r+=s.ones[e]||s.tens[Math.floor(e/10)]+(e%10?s.numSep+s.ones[e%10]:"")),r}function o(t){if(0===t)return s.zero;if(t>=Math.pow(10,36))return t.toString();let e=0,r="";for(;t>0;){t%1e3&&(r=n(t%1e3)+(e?"-"+s.large[e]+"-":"")+r),t=Math.floor(t/1e3),e++}return r.replace(/-$/,"")}function i(t){let e=o(t);return e.match(/one$/)?e=e.slice(0,-3)+"first":e.match(/two$/)?e=e.slice(0,-3)+"second":e.match(/three$/)?e=e.slice(0,-5)+"third":e.match(/five$/)?e=e.slice(0,-4)+"fifth":e.match(/eight$/)?e=e.slice(0,-5)+"eighth":e.match(/nine$/)?e=e.slice(0,-4)+"ninth":e.match(/twelve$/)?e=e.slice(0,-6)+"twelfth":e.match(/ty$/)?e=e.slice(0,-2)+"tieth":e+="th",e}const s=(0,r(7549).NUMBERS)();s.wordOrdinal=i,s.numericOrdinal=function(t){const e=t%100,r=t.toString();if(e>10&&e<20)return r+"th";switch(t%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd";default:return r+"th"}},s.numberToWords=o,s.numberToOrdinal=function(t,e){if(1===t)return e?"oneths":"oneth";if(2===t)return e?"halves":"half";const r=i(t);return e?r+"s":r},e.default=s},4634:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const n=r(2105);function o(t){const e=t%1e3,r=Math.floor(e/100),n=i.special.hundreds[r],o=function(t){const e=t%100;if(e<30)return i.ones[e];const r=i.tens[Math.floor(e/10)],n=i.ones[e%10];return r&&n?r+" y "+n:r||n}(e%100);return 1===r?o?n+"to "+o:n:n&&o?n+" "+o:n||o}const i=(0,r(7549).NUMBERS)();i.numericOrdinal=function(t){const e=n.Grammar.getInstance().getParameter("gender");return t.toString()+("f"===e?"a":"o")},i.numberToWords=function(t){if(0===t)return i.zero;if(t>=Math.pow(10,36))return t.toString();let e=0,r="";for(;t>0;){const n=t%1e3;if(n){let t=i.large[e];const s=o(n);e?1===n?(t=t.match("/^mil( |$)/")?t:"un "+t,r=t+(r?" "+r:"")):(t=t.replace(/\u00f3n$/,"ones"),r=o(n)+" "+t+(r?" "+r:"")):r=s}t=Math.floor(t/1e3),e++}return r},i.numberToOrdinal=function(t,e){if(t>1999)return t.toString()+"a";if(t<=12)return i.special.onesOrdinals[t-1];const r=[];if(t>=1e3&&(t-=1e3,r.push("mil\xe9sima")),!t)return r.join(" ");let n=0;return n=Math.floor(t/100),n>0&&(r.push(i.special.hundredsOrdinals[n-1]),t%=100),t<=12?r.push(i.special.onesOrdinals[t-1]):(n=Math.floor(t/10),n>0&&(r.push(i.special.tensOrdinals[n-1]),t%=10),t>0&&r.push(i.special.onesOrdinals[t-1])),r.join(" ")},e.default=i},2350:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const n=r(5897),o=r(2105),i=r(7549);function s(t){let e=t%1e3,r="";if(r+=u.ones[Math.floor(e/100)]?u.ones[Math.floor(e/100)]+"-cent":"",e%=100,e){r+=r?"-":"";let t=u.ones[e];if(t)r+=t;else{const n=u.tens[Math.floor(e/10)];n.match(/-dix$/)?(t=u.ones[e%10+10],r+=n.replace(/-dix$/,"")+"-"+t):r+=n+(e%10?"-"+u.ones[e%10]:"")}}const n=r.match(/s-\w+$/);return n?r.replace(/s-\w+$/,n[0].slice(1)):r.replace(/-un$/,"-et-un")}function a(t){if(0===t)return u.zero;if(t>=Math.pow(10,36))return t.toString();u.special["tens-"+n.default.getInstance().subiso]&&(u.tens=u.special["tens-"+n.default.getInstance().subiso]);let e=0,r="";for(;t>0;){const n=t%1e3;if(n){let t=u.large[e];const o=s(n);if(t&&t.match(/^mille /)){const n=t.replace(/^mille /,"");r=r.match(RegExp(n))?o+(e?"-mille-":"")+r:r.match(RegExp(n.replace(/s$/,"")))?o+(e?"-mille-":"")+r.replace(n.replace(/s$/,""),n):o+(e?"-"+t+"-":"")+r}else t=1===n&&t?t.replace(/s$/,""):t,r=o+(e?"-"+t+"-":"")+r}t=Math.floor(t/1e3),e++}return r.replace(/-$/,"")}const c={1:"uni\xe8me",2:"demi",3:"tiers",4:"quart"};function l(t){if(1===t)return"premi\xe8re";let e=a(t);return e.match(/^neuf$/)?e=e.slice(0,-1)+"v":e.match(/cinq$/)?e+="u":e.match(/trois$/)?e+="":(e.match(/e$/)||e.match(/s$/))&&(e=e.slice(0,-1)),e+="i\xe8me",e}const u=(0,i.NUMBERS)();u.wordOrdinal=l,u.numericOrdinal=function(t){const e=o.Grammar.getInstance().getParameter("gender");return 1===t?t.toString()+("m"===e?"er":"re"):t.toString()+"e"},u.numberToWords=a,u.numberToOrdinal=function(t,e){const r=c[t]||l(t);return 3===t?r:e?r+"s":r},e.default=u},4438:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const n=r(2105);function o(t){if(0===t)return s.zero;if(t>=Math.pow(10,32))return t.toString();let e=0,r="";const n=function(t){let e=t%1e3,r="";return r+=s.ones[Math.floor(e/100)]?s.ones[Math.floor(e/100)]+s.numSep+s.special.hundred:"",e%=100,e&&(r+=r?s.numSep:"",r+=s.ones[e]),r}(t%1e3);if(!(t=Math.floor(t/1e3)))return n;for(;t>0;){const n=t%100;n&&(r=s.ones[n]+s.numSep+s.large[e]+(r?s.numSep+r:"")),t=Math.floor(t/100),e++}return n?r+s.numSep+n:r}function i(t){const e=n.Grammar.getInstance().getParameter("gender");if(t<=0)return t.toString();if(t<10)return"f"===e?s.special.ordinalsFeminine[t]:s.special.ordinalsMasculine[t];return o(t)+("f"===e?"\u0935\u0940\u0902":"\u0935\u093e\u0901")}const s=(0,r(7549).NUMBERS)();s.wordOrdinal=i,s.numericOrdinal=function(t){const e=n.Grammar.getInstance().getParameter("gender");return t>0&&t<10?"f"===e?s.special.simpleSmallOrdinalsFeminine[t]:s.special.simpleSmallOrdinalsMasculine[t]:t.toString().split("").map((function(t){const e=parseInt(t,10);return isNaN(e)?"":s.special.simpleNumbers[e]})).join("")+("f"===e?"\u0935\u0940\u0902":"\u0935\u093e\u0901")},s.numberToWords=o,s.numberToOrdinal=function(t,e){return t<=10?s.special.smallDenominators[t]:i(t)+" \u0905\u0902\u0936"},e.default=s},8825:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const n=r(2105);function o(t){let e=t%1e3,r="";if(r+=a.ones[Math.floor(e/100)]?a.ones[Math.floor(e/100)]+a.numSep+"cento":"",e%=100,e){r+=r?a.numSep:"";const t=a.ones[e];if(t)r+=t;else{let t=a.tens[Math.floor(e/10)];const n=e%10;1!==n&&8!==n||(t=t.slice(0,-1)),r+=t,r+=n?a.numSep+a.ones[e%10]:""}}return r}function i(t){if(0===t)return a.zero;if(t>=Math.pow(10,36))return t.toString();if(1===t&&n.Grammar.getInstance().getParameter("fraction"))return"un";let e=0,r="";for(;t>0;){t%1e3&&(r=o(t%1e3)+(e?"-"+a.large[e]+"-":"")+r),t=Math.floor(t/1e3),e++}return r.replace(/-$/,"")}function s(t){const e="m"===n.Grammar.getInstance().getParameter("gender")?"o":"a";let r=a.special.onesOrdinals[t];return r?r.slice(0,-1)+e:(r=i(t),r.slice(0,-1)+"esim"+e)}const a=(0,r(7549).NUMBERS)();a.wordOrdinal=s,a.numericOrdinal=function(t){const e=n.Grammar.getInstance().getParameter("gender");return t.toString()+("m"===e?"o":"a")},a.numberToWords=i,a.numberToOrdinal=function(t,e){if(2===t)return e?"mezzi":"mezzo";const r=s(t);if(!e)return r;const n=r.match(/o$/)?"i":"e";return r.slice(0,-1)+n},e.default=a},3720:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});function n(t){return t.toString().split("").map((function(t){return o.ones[parseInt(t,10)]})).join("")}const o=(0,r(7549).NUMBERS)();o.numberToWords=n,o.numberToOrdinal=n,e.default=o},8274:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const n=r(5897);function o(t,e=!1){let r=t%1e3,n="";const o=Math.floor(r/100),s=a.ones[o];if(n+=s?(1===o?"":s)+"hundre":"",r%=100,r){if(n+=n?"og":"",e){const t=a.special.smallOrdinals[r];if(t)return n+t;if(r%10)return n+a.tens[Math.floor(r/10)]+a.special.smallOrdinals[r%10]}n+=a.ones[r]||a.tens[Math.floor(r/10)]+(r%10?a.ones[r%10]:"")}return e?i(n):n}function i(t){const e=a.special.endOrdinal[0];return"a"===e&&t.match(/en$/)?t.slice(0,-2)+a.special.endOrdinal:t.match(/(d|n)$/)||t.match(/hundre$/)?t+"de":t.match(/i$/)?t+a.special.endOrdinal:"a"===e&&t.match(/e$/)?t.slice(0,-1)+a.special.endOrdinal:(t.match(/e$/),t+"nde")}function s(t){return u(t,!0)}const a=(0,r(7549).NUMBERS)();function c(t,e=!1){return t===a.ones[1]?"ein"===t?"eitt ":e?"et":"ett":t}function l(t,e=!1){let r=t%1e3,n="",o=a.ones[Math.floor(r/100)];if(n+=o?c(o)+"hundre":"",r%=100,r){if(n+=n?"og":"",e){const t=a.special.smallOrdinals[r];if(t)return n+t}if(o=a.ones[r],o)n+=o;else{const t=a.tens[Math.floor(r/10)];o=a.ones[r%10],n+=o?o+"og"+t:t}}return e?i(n):n}function u(t,e=!1){const r="alt"===n.default.getInstance().subiso?function(t,e=!1){if(0===t)return e?a.special.smallOrdinals[0]:a.zero;if(t>=Math.pow(10,36))return t.toString();let r=0,n="";for(;t>0;){const o=t%1e3;if(o){const i=l(t%1e3,!r&&e);!r&&e&&(e=!e),n=(1===r?c(i,!0):i)+(r>1?a.numSep:"")+(r?a.large[r]+(r>1&&o>1?"er":""):"")+(r>1&&n?a.numSep:"")+n}t=Math.floor(t/1e3),r++}return e?n+(n.match(/tusen$/)?"de":"te"):n}(t,e):function(t,e=!1){if(0===t)return e?a.special.smallOrdinals[0]:a.zero;if(t>=Math.pow(10,36))return t.toString();let r=0,n="";for(;t>0;){const i=t%1e3;if(i){const s=o(t%1e3,!r&&e);!r&&e&&(e=!e),n=s+(r?" "+a.large[r]+(r>1&&i>1?"er":"")+(n?" ":""):"")+n}t=Math.floor(t/1e3),r++}return e?n+(n.match(/tusen$/)?"de":"te"):n}(t,e);return r}a.wordOrdinal=s,a.numericOrdinal=function(t){return t.toString()+"."},a.numberToWords=u,a.numberToOrdinal=function(t,e){return s(t)},e.default=a},3898:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});function n(t){let e=t%1e3,r="";const n=Math.floor(e/100);return r+=s.ones[n]?(1===n?"":s.ones[n]+s.numSep)+"hundra":"",e%=100,e&&(r+=r?s.numSep:"",r+=s.ones[e]||s.tens[Math.floor(e/10)]+(e%10?s.numSep+s.ones[e%10]:"")),r}function o(t,e=!1){if(0===t)return s.zero;if(t>=Math.pow(10,36))return t.toString();let r=0,o="";for(;t>0;){const i=t%1e3;if(i){const a=s.large[r],c=i>1&&r>1&&!e?"er":"";o=(1===r&&1===i?"":(r>1&&1===i?"en":n(t%1e3))+(r>1?" ":""))+(r?a+c+(r>1?" ":""):"")+o}t=Math.floor(t/1e3),r++}return o.replace(/ $/,"")}function i(t){let e=o(t,!0);return e.match(/^noll$/)?e="nollte":e.match(/ett$/)?e=e.replace(/ett$/,"f\xf6rsta"):e.match(/tv\xe5$/)?e=e.replace(/tv\xe5$/,"andra"):e.match(/tre$/)?e=e.replace(/tre$/,"tredje"):e.match(/fyra$/)?e=e.replace(/fyra$/,"fj\xe4rde"):e.match(/fem$/)?e=e.replace(/fem$/,"femte"):e.match(/sex$/)?e=e.replace(/sex$/,"sj\xe4tte"):e.match(/sju$/)?e=e.replace(/sju$/,"sjunde"):e.match(/\xe5tta$/)?e=e.replace(/\xe5tta$/,"\xe5ttonde"):e.match(/nio$/)?e=e.replace(/nio$/,"nionde"):e.match(/tio$/)?e=e.replace(/tio$/,"tionde"):e.match(/elva$/)?e=e.replace(/elva$/,"elfte"):e.match(/tolv$/)?e=e.replace(/tolv$/,"tolfte"):e.match(/tusen$/)?e=e.replace(/tusen$/,"tusonde"):e.match(/jard$/)||e.match(/jon$/)?e+="te":e+="de",e}const s=(0,r(7549).NUMBERS)();s.wordOrdinal=i,s.numericOrdinal=function(t){const e=t.toString();return e.match(/11$|12$/)?e+":e":e+(e.match(/1$|2$/)?":a":":e")},s.numberToWords=o,s.numberToOrdinal=function(t,e){if(1===t)return"hel";if(2===t)return e?"halva":"halv";let r=i(t);return r=r.match(/de$/)?r.replace(/de$/,""):r,r+(e?"delar":"del")},e.default=s},4977:function(t,e){function r(t,e=""){if(!t.childNodes||!t.childNodes[0]||!t.childNodes[0].childNodes||t.childNodes[0].childNodes.length<2||"number"!==t.childNodes[0].childNodes[0].tagName||"integer"!==t.childNodes[0].childNodes[0].getAttribute("role")||"number"!==t.childNodes[0].childNodes[1].tagName||"integer"!==t.childNodes[0].childNodes[1].getAttribute("role"))return{convertible:!1,content:t.textContent};const r=t.childNodes[0].childNodes[1].textContent,n=t.childNodes[0].childNodes[0].textContent,o=Number(r),i=Number(n);return isNaN(o)||isNaN(i)?{convertible:!1,content:`${n} ${e} ${r}`}:{convertible:!0,enumerator:i,denominator:o}}Object.defineProperty(e,"__esModule",{value:!0}),e.vulgarFractionSmall=e.convertVulgarFraction=e.Combiners=e.siCombiner=e.identityTransformer=e.pluralCase=void 0,e.pluralCase=function(t,e){return t.toString()},e.identityTransformer=function(t){return t.toString()},e.siCombiner=function(t,e){return t+e.toLowerCase()},e.Combiners={},e.Combiners.identityCombiner=function(t,e,r){return t+e+r},e.Combiners.prefixCombiner=function(t,e,r){return t=r?r+" "+t:t,e?e+" "+t:t},e.Combiners.postfixCombiner=function(t,e,r){return t=r?r+" "+t:t,e?t+" "+e:t},e.Combiners.romanceCombiner=function(t,e,r){return t=r?t+" "+r:t,e?t+" "+e:t},e.convertVulgarFraction=r,e.vulgarFractionSmall=function(t,e,n){const o=r(t);if(o.convertible){const t=o.enumerator,r=o.denominator;return t>0&&t0&&r{const s=this.parseCstr(e.toString().replace(o,""));this.addRule(new i.SpeechRule(t,s,n,r))}))}getFullPreconditions(t){const e=this.preconditions.get(t);return e||!this.inherits?e:this.inherits.getFullPreconditions(t)}definePrecondition(t,e,r,...n){const o=this.parsePrecondition(r,n),i=this.parseCstr(e);o&&i?(o.rank=this.rank++,this.preconditions.set(t,new c(i,o))):console.error(`Precondition Error: ${r}, (${e})`)}inheritRules(){if(!this.inherits||!this.inherits.getSpeechRules().length)return;const t=new RegExp("^\\w+\\.\\w+\\."+(this.domain?"\\w+\\.":""));this.inherits.getSpeechRules().forEach((e=>{const r=this.parseCstr(e.dynamicCstr.toString().replace(t,""));this.addRule(new i.SpeechRule(e.name,r,e.precondition,e.action))}))}ignoreRules(t,...e){let r=this.findAllRules((e=>e.name===t));if(!e.length)return void r.forEach(this.deleteRule.bind(this));let n=[];for(const t of e){const e=this.parseCstr(t);for(const t of r)e.equal(t.dynamicCstr)?this.deleteRule(t):n.push(t);r=n,n=[]}}parsePrecondition_(t){const e=this.context.customGenerators.lookup(t);return e?e():[t]}}e.BaseRuleStore=a;class c{constructor(t,e){this.base=t,this._conditions=[],this.constraints=[],this.allCstr={},this.constraints.push(t),this.addCondition(t,e)}get conditions(){return this._conditions}addConstraint(t){if(this.constraints.filter((e=>e.equal(t))).length)return;this.constraints.push(t);const e=[];for(const[r,n]of this.conditions)this.base.equal(r)&&e.push([t,n]);this._conditions=this._conditions.concat(e)}addBaseCondition(t){this.addCondition(this.base,t)}addFullCondition(t){this.constraints.forEach((e=>this.addCondition(e,t)))}addCondition(t,e){const r=t.toString()+" "+e.toString();this.allCstr.condStr||(this.allCstr[r]=!0,this._conditions.push([t,e]))}}e.Condition=c},2469:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.BrailleStore=void 0;const n=r(7630),o=r(9935);class i extends o.MathStore{constructor(){super(...arguments),this.modality="braille",this.customTranscriptions={"\u22ca":"\u2808\u2821\u2833"}}evaluateString(t){const e=[],r=Array.from(t);for(let t=0;tt.push(this.getProperty(e).slice()))),t}toString(){const t=[];return this.order.forEach((e=>t.push(e+": "+this.getProperty(e).toString()))),t.join("\n")}}e.DynamicProperties=n;class o extends n{constructor(t,e){const r={};for(const[e,n]of Object.entries(t))r[e]=[n];super(r,e),this.components=t}static createCstr(...t){const e=o.DEFAULT_ORDER,r={};for(let n=0,o=t.length,i=e.length;n{const r=e.indexOf(t);return-1!==r&&e.splice(r,1)}))}getComponents(){return this.components}getValue(t){return this.components[t]}getValues(){return this.order.map((t=>this.getValue(t)))}allProperties(){const t=super.allProperties();for(let e,r,n=0;e=t[n],r=this.order[n];n++){const t=this.getValue(r);-1===e.indexOf(t)&&e.unshift(t)}return t}toString(){return this.getValues().join(".")}equal(t){const e=t.getAxes();if(this.order.length!==e.length)return!1;for(let r,n=0;r=e[n];n++){const e=this.getValue(r);if(!e||t.getValue(r)!==e)return!1}return!0}}e.DynamicCstr=o,o.DEFAULT_ORDER=[r.LOCALE,r.MODALITY,r.DOMAIN,r.STYLE,r.TOPIC],o.BASE_LOCALE="base",o.DEFAULT_VALUE="default",o.DEFAULT_VALUES={[r.LOCALE]:"en",[r.DOMAIN]:o.DEFAULT_VALUE,[r.STYLE]:o.DEFAULT_VALUE,[r.TOPIC]:o.DEFAULT_VALUE,[r.MODALITY]:"speech"};e.DynamicCstrParser=class{constructor(t){this.order=t}parse(t){const e=t.split("."),r={};if(e.length>this.order.length)throw new Error("Invalid dynamic constraint: "+r);let n=0;for(let t,o=0;t=this.order[o],e.length;o++,n++){const n=e.shift();r[t]=n}return new o(r,this.order.slice(0,n))}};e.DefaultComparator=class{constructor(t,e=new n(t.getProperties(),t.getOrder())){this.reference=t,this.fallback=e,this.order=this.reference.getOrder()}getReference(){return this.reference}setReference(t,e){this.reference=t,this.fallback=e||new n(t.getProperties(),t.getOrder()),this.order=this.reference.getOrder()}match(t){const e=t.getAxes();return e.length===this.reference.getAxes().length&&e.every((e=>{const r=t.getValue(e);return r===this.reference.getValue(e)||-1!==this.fallback.getProperty(e).indexOf(r)}))}compare(t,e){let r=!1;for(let n,o=0;n=this.order[o];o++){const o=t.getValue(n),i=e.getValue(n);if(!r){const t=this.reference.getValue(n);if(t===o&&t!==i)return-1;if(t===i&&t!==o)return 1;if(t===o&&t===i)continue;t!==o&&t!==i&&(r=!0)}const s=this.fallback.getProperty(n),a=s.indexOf(o),c=s.indexOf(i);if(a!h.equal(t.cstr))),c.push(m),this.rules.set(e,c),d.setReference(f)}lookupRule(t,e){let r=this.getRules(e.getValue(o.Axis.LOCALE));return r=r.filter((function(t){return i.testDynamicConstraints_(e,t)})),1===r.length?r[0]:r.length?r.sort(((t,e)=>n.default.getInstance().comparator.compare(t.cstr,e.cstr)))[0]:null}}e.MathSimpleStore=i},9935:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.MathStore=void 0;const n=r(707),o=r(4356),i=r(7630),s=r(4504),a=r(4650);class c extends s.BaseRuleStore{constructor(){super(),this.annotators=[],this.parseMethods.Alias=this.defineAlias,this.parseMethods.SpecializedRule=this.defineSpecializedRule,this.parseMethods.Specialized=this.defineSpecialized}initialize(){this.initialized||(this.annotations(),this.initialized=!0)}annotations(){for(let t,e=0;t=this.annotators[e];e++)(0,i.activate)(this.domain,t)}defineAlias(t,e,...r){const n=this.parsePrecondition(e,r);if(!n)return void console.error(`Precondition Error: ${e} ${r}`);const o=this.preconditions.get(t);o?o.addFullCondition(n):console.error(`Alias Error: No precondition by the name of ${t}`)}defineRulesAlias(t,e,...r){const n=this.findAllRules((function(e){return e.name===t}));if(0===n.length)throw new a.OutputError("Rule with name "+t+" does not exist.");const o=[];n.forEach((t=>{(t=>{const e=t.dynamicCstr.toString(),r=t.action.toString();for(let t,n=0;t=o[n];n++)if(t.action===r&&t.cstr===e)return!1;return o.push({cstr:e,action:r}),!0})(t)&&this.addAlias_(t,e,r)}))}defineSpecializedRule(t,e,r,n){const o=this.parseCstr(e),i=this.findRule((e=>e.name===t&&o.equal(e.dynamicCstr))),s=this.parseCstr(r);if(!i&&n)throw new a.OutputError("Rule named "+t+" with style "+e+" does not exist.");const c=n?a.Action.fromString(n):i.action,l=new a.SpeechRule(i.name,s,i.precondition,c);this.addRule(l)}defineSpecialized(t,e,r){const n=this.parseCstr(r);if(!n)return void console.error(`Dynamic Constraint Error: ${r}`);const o=this.preconditions.get(t);o?o.addConstraint(n):console.error(`Alias Error: No precondition by the name of ${t}`)}evaluateString(t){const e=[];if(t.match(/^\s+$/))return e;let r=this.matchNumber_(t);if(r&&r.length===t.length)return e.push(this.evaluateCharacter(r.number)),e;const i=n.removeEmpty(t.replace(/\s/g," ").split(" "));for(let t,n=0;t=i[n];n++)if(1===t.length)e.push(this.evaluateCharacter(t));else if(t.match(new RegExp("^["+o.LOCALE.MESSAGES.regexp.TEXT+"]+$")))e.push(this.evaluateCharacter(t));else{let n=t;for(;n;){r=this.matchNumber_(n);const t=n.match(new RegExp("^["+o.LOCALE.MESSAGES.regexp.TEXT+"]+"));if(r)e.push(this.evaluateCharacter(r.number)),n=n.substring(r.length);else if(t)e.push(this.evaluateCharacter(t[0])),n=n.substring(t[0].length);else{const t=Array.from(n),r=t[0];e.push(this.evaluateCharacter(r)),n=t.slice(1).join("")}}}return e}parse(t){super.parse(t),this.annotators=t.annotators||[]}addAlias_(t,e,r){const n=this.parsePrecondition(e,r),o=new a.SpeechRule(t.name,t.dynamicCstr,n,t.action);o.name=t.name,this.addRule(o)}matchNumber_(t){const e=t.match(new RegExp("^"+o.LOCALE.MESSAGES.regexp.NUMBER)),r=t.match(new RegExp("^"+c.regexp.NUMBER));if(!e&&!r)return null;const n=r&&r[0]===t;if(e&&e[0]===t||!n)return e?{number:e[0],length:e[0].length}:null;return{number:r[0].replace(new RegExp(c.regexp.DIGIT_GROUP,"g"),"X").replace(new RegExp(c.regexp.DECIMAL_MARK,"g"),o.LOCALE.MESSAGES.regexp.DECIMAL_MARK).replace(/X/g,o.LOCALE.MESSAGES.regexp.DIGIT_GROUP.replace(/\\/g,"")),length:r[0].length}}}e.MathStore=c,c.regexp={NUMBER:"((\\d{1,3})(?=(,| ))((,| )\\d{3})*(\\.\\d+)?)|^\\d*\\.\\d+|^\\d+",DECIMAL_MARK:"\\.",DIGIT_GROUP:","}},4650:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.OutputError=e.Precondition=e.Action=e.Component=e.ActionType=e.SpeechRule=void 0;const n=r(5897),o=r(2105);var i;function s(t){switch(t){case"[n]":return i.NODE;case"[m]":return i.MULTI;case"[t]":return i.TEXT;case"[p]":return i.PERSONALITY;default:throw"Parse error: "+t}}e.SpeechRule=class{constructor(t,e,r,n){this.name=t,this.dynamicCstr=e,this.precondition=r,this.action=n,this.context=null}toString(){return this.name+" | "+this.dynamicCstr.toString()+" | "+this.precondition.toString()+" ==> "+this.action.toString()}},function(t){t.NODE="NODE",t.MULTI="MULTI",t.TEXT="TEXT",t.PERSONALITY="PERSONALITY"}(i=e.ActionType||(e.ActionType={}));class a{constructor({type:t,content:e,attributes:r,grammar:n}){this.type=t,this.content=e,this.attributes=r,this.grammar=n}static grammarFromString(t){return o.Grammar.parseInput(t)}static fromString(t){const e={type:s(t.substring(0,3))};let r=t.slice(3).trim();if(!r)throw new u("Missing content.");switch(e.type){case i.TEXT:if('"'===r[0]){const t=p(r,"\\(")[0].trim();if('"'!==t.slice(-1))throw new u("Invalid string syntax.");e.content=t,r=r.slice(t.length).trim(),-1===r.indexOf("(")&&(r="");break}case i.NODE:case i.MULTI:{const t=r.indexOf(" (");if(-1===t){e.content=r.trim(),r="";break}e.content=r.substring(0,t).trim(),r=r.slice(t).trim()}}if(r){const t=a.attributesFromString(r);t.grammar&&(e.grammar=t.grammar,delete t.grammar),Object.keys(t).length&&(e.attributes=t)}return new a(e)}static attributesFromString(t){if("("!==t[0]||")"!==t.slice(-1))throw new u("Invalid attribute expression: "+t);const e={},r=p(t.slice(1,-1),",");for(let t=0,n=r.length;t0?"("+t.join(", ")+")":""}getAttributes(){const t=[];for(const e in this.attributes){const r=this.attributes[e];"true"===r?t.push(e):t.push(e+":"+r)}return t}}e.Component=a;class c{constructor(t){this.components=t}static fromString(t){const e=p(t,";").filter((function(t){return t.match(/\S/)})).map((function(t){return t.trim()})),r=[];for(let t=0,n=e.length;t0?r[0]:null}applyConstraint(t,e){return!!this.applyQuery(t,e)||n.evaluateBoolean(e,t)}constructString(t,e){if(!e)return"";if('"'===e.charAt(0))return e.slice(1,-1);const r=this.customStrings.lookup(e);return r?r(t):n.evaluateString(e,t)}parse(t){const e=Array.isArray(t)?t:Object.entries(t);for(let t,r=0;t=e[r];r++){switch(t[0].slice(0,3)){case"CQF":this.customQueries.add(t[0],t[1]);break;case"CSF":this.customStrings.add(t[0],t[1]);break;case"CTF":this.contextFunctions.add(t[0],t[1]);break;case"CGF":this.customGenerators.add(t[0],t[1]);break;default:console.error("FunctionError: Invalid function name "+t[0])}}}}},2362:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.storeFactory=e.SpeechRuleEngine=void 0;const n=r(7052),o=r(2057),i=r(5740),s=r(5897),a=r(4440),c=r(5274),l=r(7283),u=r(7599),p=r(2469),h=r(1676),d=r(2105),f=r(9935),m=r(4650),y=r(4508);class g{constructor(){this.trie=null,this.evaluators_={},this.trie=new y.Trie}static getInstance(){return g.instance=g.instance||new g,g.instance}static debugSpeechRule(t,e){const r=t.precondition,n=t.context.applyQuery(e,r.query);o.Debugger.getInstance().output(r.query,n?n.toString():n),r.constraints.forEach((r=>o.Debugger.getInstance().output(r,t.context.applyConstraint(e,r))))}static debugNamedSpeechRule(t,e){const r=g.getInstance().trie.collectRules().filter((e=>e.name==t));for(let n,i=0;n=r[i];i++)o.Debugger.getInstance().output("Rule",t,"DynamicCstr:",n.dynamicCstr.toString(),"number",i),g.debugSpeechRule(n,e)}evaluateNode(t){(0,c.updateEvaluator)(t);const e=(new Date).getTime();let r=[];try{r=this.evaluateNode_(t)}catch(t){console.error("Something went wrong computing speech."),o.Debugger.getInstance().output(t)}const n=(new Date).getTime();return o.Debugger.getInstance().output("Time:",n-e),r}toString(){return this.trie.collectRules().map((t=>t.toString())).join("\n")}runInSetting(t,e){const r=s.default.getInstance(),n={};for(const e in t)n[e]=r[e],r[e]=t[e];r.setDynamicCstr();const o=e();for(const t in n)r[t]=n[t];return r.setDynamicCstr(),o}addStore(t){const e=v(t);"abstract"!==e.kind&&e.getSpeechRules().forEach((t=>this.trie.addRule(t))),this.addEvaluator(e)}processGrammar(t,e,r){const n={};for(const o in r){const i=r[o];n[o]="string"==typeof i?t.constructString(e,i):i}d.Grammar.getInstance().pushState(n)}addEvaluator(t){const e=t.evaluateDefault.bind(t),r=this.evaluators_[t.locale];if(r)return void(r[t.modality]=e);const n={};n[t.modality]=e,this.evaluators_[t.locale]=n}getEvaluator(t,e){const r=this.evaluators_[t]||this.evaluators_[h.DynamicCstr.DEFAULT_VALUES[h.Axis.LOCALE]];return r[e]||r[h.DynamicCstr.DEFAULT_VALUES[h.Axis.MODALITY]]}enumerate(t){return this.trie.enumerate(t)}evaluateNode_(t){return t?(this.updateConstraint_(),this.evaluateTree_(t)):[]}evaluateTree_(t){const e=s.default.getInstance();let r;o.Debugger.getInstance().output(e.mode!==a.Mode.HTTP?t.toString():t),d.Grammar.getInstance().setAttribute(t);const i=this.lookupRule(t,e.dynamicCstr);if(!i)return e.strict?[]:(r=this.getEvaluator(e.locale,e.modality)(t),t.attributes&&this.addPersonality_(r,{},!1,t),r);o.Debugger.getInstance().generateOutput((()=>["Apply Rule:",i.name,i.dynamicCstr.toString(),(e.mode,a.Mode.HTTP,t).toString()]));const l=i.context,u=i.action.components;r=[];for(let e,o=0;e=u[o];o++){let o=[];const i=e.content||"",a=e.attributes||{};let u=!1;e.grammar&&this.processGrammar(l,t,e.grammar);let p=null;if(a.engine){p=s.default.getInstance().dynamicCstr.getComponents();const t=d.Grammar.parseInput(a.engine);s.default.getInstance().setDynamicCstr(t)}switch(e.type){case m.ActionType.NODE:{const e=l.applyQuery(t,i);e&&(o=this.evaluateTree_(e))}break;case m.ActionType.MULTI:{u=!0;const e=l.applySelector(t,i);e.length>0&&(o=this.evaluateNodeList_(l,e,a.sepFunc,l.constructString(t,a.separator),a.ctxtFunc,l.constructString(t,a.context)))}break;case m.ActionType.TEXT:{const e=a.span,r={};if(e){const n=(0,c.evalXPath)(e,t);n.length&&(r.extid=n[0].getAttribute("extid"))}const s=l.constructString(t,i);(s||""===s)&&(o=Array.isArray(s)?s.map((function(t){return n.AuditoryDescription.create({text:t.speech,attributes:t.attributes},{adjust:!0})})):[n.AuditoryDescription.create({text:s,attributes:r},{adjust:!0})])}break;case m.ActionType.PERSONALITY:default:o=[n.AuditoryDescription.create({text:i})]}o[0]&&!u&&(a.context&&(o[0].context=l.constructString(t,a.context)+(o[0].context||"")),a.annotation&&(o[0].annotation=a.annotation)),this.addLayout(o,a,u),e.grammar&&d.Grammar.getInstance().popState(),r=r.concat(this.addPersonality_(o,a,u,t)),p&&s.default.getInstance().setDynamicCstr(p)}return r}evaluateNodeList_(t,e,r,o,i,s){if(!e.length)return[];const a=o||"",c=s||"",l=t.contextFunctions.lookup(i),u=l?l(e,c):function(){return c},p=t.contextFunctions.lookup(r),h=p?p(e,a):function(){return[n.AuditoryDescription.create({text:a},{translate:!0})]};let d=[];for(let t,r=0;t=e[r];r++){const n=this.evaluateTree_(t);if(n.length>0&&(n[0].context=u()+(n[0].context||""),d=d.concat(n),r=0;e--){const n=r[e].name;!t.attributes[n]&&n.match(/^ext/)&&(t.attributes[n]=r[e].value)}}}addRelativePersonality_(t,e){if(!t.personality)return t.personality=e,t;const r=t.personality;for(const t in e)r[t]&&"number"==typeof r[t]&&"number"==typeof e[t]?r[t]=r[t]+e[t]:r[t]||(r[t]=e[t]);return t}updateConstraint_(){const t=s.default.getInstance().dynamicCstr,e=s.default.getInstance().strict,r=this.trie,n={};let o=t.getValue(h.Axis.LOCALE),i=t.getValue(h.Axis.MODALITY),a=t.getValue(h.Axis.DOMAIN);r.hasSubtrie([o,i,a])||(a=h.DynamicCstr.DEFAULT_VALUES[h.Axis.DOMAIN],r.hasSubtrie([o,i,a])||(i=h.DynamicCstr.DEFAULT_VALUES[h.Axis.MODALITY],r.hasSubtrie([o,i,a])||(o=h.DynamicCstr.DEFAULT_VALUES[h.Axis.LOCALE]))),n[h.Axis.LOCALE]=[o],n[h.Axis.MODALITY]=["summary"!==i?i:h.DynamicCstr.DEFAULT_VALUES[h.Axis.MODALITY]],n[h.Axis.DOMAIN]=["speech"!==i?h.DynamicCstr.DEFAULT_VALUES[h.Axis.DOMAIN]:a];const c=t.getOrder();for(let r,o=0;r=c[o];o++)if(!n[r]){const o=t.getValue(r),i=this.makeSet_(o,t.preference),s=h.DynamicCstr.DEFAULT_VALUES[r];e||o===s||i.push(s),n[r]=i}t.updateProperties(n)}makeSet_(t,e){return e&&Object.keys(e).length?t.split(":"):[t]}lookupRule(t,e){if(!t||t.nodeType!==i.NodeType.ELEMENT_NODE&&t.nodeType!==i.NodeType.TEXT_NODE)return null;const r=this.lookupRules(t,e);return r.length>0?this.pickMostConstraint_(e,r):null}lookupRules(t,e){return this.trie.lookupRules(t,e.allProperties())}pickMostConstraint_(t,e){const r=s.default.getInstance().comparator;return e.sort((function(t,e){return r.compare(t.dynamicCstr,e.dynamicCstr)||e.precondition.priority-t.precondition.priority||e.precondition.constraints.length-t.precondition.constraints.length||e.precondition.rank-t.precondition.rank})),o.Debugger.getInstance().generateOutput((()=>e.map((t=>t.name+"("+t.dynamicCstr.toString()+")"))).bind(this)),e[0]}}e.SpeechRuleEngine=g;const b=new Map;function v(t){const e=`${t.locale}.${t.modality}.${t.domain}`;if("actions"===t.kind){const r=b.get(e);return r.parse(t),r}u.init(),t&&!t.functions&&(t.functions=l.getStore(t.locale,t.modality,t.domain));const r="braille"===t.modality?new p.BrailleStore:new f.MathStore;return b.set(e,r),t.inherits&&(r.inherits=b.get(`${t.inherits}.${t.modality}.${t.domain}`)),r.parse(t),r.initialize(),r}e.storeFactory=v,s.default.nodeEvaluator=g.getInstance().evaluateNode.bind(g.getInstance())},5662:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CustomGenerators=e.ContextFunctions=e.CustomStrings=e.CustomQueries=void 0;class r{constructor(t,e){this.prefix=t,this.store=e}add(t,e){this.checkCustomFunctionSyntax_(t)&&(this.store[t]=e)}addStore(t){const e=Object.keys(t.store);for(let r,n=0;r=e[n];n++)this.add(r,t.store[r])}lookup(t){return this.store[t]}checkCustomFunctionSyntax_(t){const e=new RegExp("^"+this.prefix);return!!t.match(e)||(console.error("FunctionError: Invalid function name. Expected prefix "+this.prefix),!1)}}e.CustomQueries=class extends r{constructor(){super("CQF",{})}};e.CustomStrings=class extends r{constructor(){super("CSF",{})}};e.ContextFunctions=class extends r{constructor(){super("CTF",{})}};e.CustomGenerators=class extends r{constructor(){super("CGF",{})}}},365:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.contentIterator=e.pauseSeparator=e.nodeCounter=void 0;const n=r(7052),o=r(5274),i=r(5897);e.nodeCounter=function(t,e){const r=t.length;let n=0,o=e;return e||(o=""),function(){return n0?o.evalXPath("../../content/*",t[0]):[],function(){const t=r.shift(),o=e?[n.AuditoryDescription.create({text:e},{translate:!0})]:[];if(!t)return o;const s=i.default.evaluateNode(t);return o.concat(s)}}},1414:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.getTreeFromString=e.getTree=e.xmlTree=void 0;const n=r(5740),o=r(7075);function i(t){return new o.SemanticTree(t)}e.xmlTree=function(t){return i(t).xml()},e.getTree=i,e.getTreeFromString=function(t){return i(n.parseInput(t))}},7630:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.annotate=e.activate=e.register=e.visitors=e.annotators=void 0;const n=r(9265);e.annotators=new Map,e.visitors=new Map,e.register=function(t){const r=t.domain+":"+t.name;t instanceof n.SemanticAnnotator?e.annotators.set(r,t):e.visitors.set(r,t)},e.activate=function(t,r){const n=t+":"+r,o=e.annotators.get(n)||e.visitors.get(n);o&&(o.active=!0)},e.annotate=function(t){for(const r of e.annotators.values())r.active&&r.annotate(t);for(const r of e.visitors.values())r.active&&r.visit(t,Object.assign({},r.def))}},9265:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticVisitor=e.SemanticAnnotator=void 0;e.SemanticAnnotator=class{constructor(t,e,r){this.domain=t,this.name=e,this.func=r,this.active=!1}annotate(t){t.childNodes.forEach(this.annotate.bind(this)),t.addAnnotation(this.domain,this.func(t))}};e.SemanticVisitor=class{constructor(t,e,r,n={}){this.domain=t,this.name=e,this.func=r,this.def=n,this.active=!1}visit(t,e){let r=this.func(t,e);t.addAnnotation(this.domain,r[0]);for(let e,n=0;e=t.childNodes[n];n++)r=this.visit(e,r[1]);return r}}},3588:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.lookupSecondary=e.isEmbellishedType=e.isMatchingFence=e.functionApplication=e.invisibleComma=e.invisiblePlus=e.invisibleTimes=e.lookupMeaning=e.lookupRole=e.lookupType=e.equal=e.allLettersRegExp=void 0;const r=String.fromCodePoint(8291),n=["\uff0c","\ufe50",",",r],o=["\xaf","\u2012","\u2013","\u2014","\u2015","\ufe58","-","\u207b","\u208b","\u2212","\u2796","\ufe63","\uff0d","\u2010","\u2011","\u203e","_"],i=["~","\u0303","\u223c","\u02dc","\u223d","\u02f7","\u0334","\u0330"],s={"(":")","[":"]","{":"}","\u2045":"\u2046","\u2329":"\u232a","\u2768":"\u2769","\u276a":"\u276b","\u276c":"\u276d","\u276e":"\u276f","\u2770":"\u2771","\u2772":"\u2773","\u2774":"\u2775","\u27c5":"\u27c6","\u27e6":"\u27e7","\u27e8":"\u27e9","\u27ea":"\u27eb","\u27ec":"\u27ed","\u27ee":"\u27ef","\u2983":"\u2984","\u2985":"\u2986","\u2987":"\u2988","\u2989":"\u298a","\u298b":"\u298c","\u298d":"\u298e","\u298f":"\u2990","\u2991":"\u2992","\u2993":"\u2994","\u2995":"\u2996","\u2997":"\u2998","\u29d8":"\u29d9","\u29da":"\u29db","\u29fc":"\u29fd","\u2e22":"\u2e23","\u2e24":"\u2e25","\u2e26":"\u2e27","\u2e28":"\u2e29","\u3008":"\u3009","\u300a":"\u300b","\u300c":"\u300d","\u300e":"\u300f","\u3010":"\u3011","\u3014":"\u3015","\u3016":"\u3017","\u3018":"\u3019","\u301a":"\u301b","\u301d":"\u301e","\ufd3e":"\ufd3f","\ufe17":"\ufe18","\ufe59":"\ufe5a","\ufe5b":"\ufe5c","\ufe5d":"\ufe5e","\uff08":"\uff09","\uff3b":"\uff3d","\uff5b":"\uff5d","\uff5f":"\uff60","\uff62":"\uff63","\u2308":"\u2309","\u230a":"\u230b","\u230c":"\u230d","\u230e":"\u230f","\u231c":"\u231d","\u231e":"\u231f","\u239b":"\u239e","\u239c":"\u239f","\u239d":"\u23a0","\u23a1":"\u23a4","\u23a2":"\u23a5","\u23a3":"\u23a6","\u23a7":"\u23ab","\u23a8":"\u23ac","\u23a9":"\u23ad","\u23b0":"\u23b1","\u23b8":"\u23b9"},a={"\u23b4":"\u23b5","\u23dc":"\u23dd","\u23de":"\u23df","\u23e0":"\u23e1","\ufe35":"\ufe36","\ufe37":"\ufe38","\ufe39":"\ufe3a","\ufe3b":"\ufe3c","\ufe3d":"\ufe3e","\ufe3f":"\ufe40","\ufe41":"\ufe42","\ufe43":"\ufe44","\ufe47":"\ufe48"},c=Object.keys(s),l=Object.values(s);l.push("\u301f");const u=Object.keys(a),p=Object.values(a),h=["|","\xa6","\u2223","\u23d0","\u23b8","\u23b9","\u2758","\uff5c","\uffe4","\ufe31","\ufe32"],d=["\u2016","\u2225","\u2980","\u2af4"],f=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],m=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","\u0131","\u0237"],y=["\uff21","\uff22","\uff23","\uff24","\uff25","\uff26","\uff27","\uff28","\uff29","\uff2a","\uff2b","\uff2c","\uff2d","\uff2e","\uff2f","\uff30","\uff31","\uff32","\uff33","\uff34","\uff35","\uff36","\uff37","\uff38","\uff39","\uff3a"],g=["\uff41","\uff42","\uff43","\uff44","\uff45","\uff46","\uff47","\uff48","\uff49","\uff4a","\uff4b","\uff4c","\uff4d","\uff4e","\uff4f","\uff50","\uff51","\uff52","\uff53","\uff54","\uff55","\uff56","\uff57","\uff58","\uff59","\uff5a"],b=["\ud835\udc00","\ud835\udc01","\ud835\udc02","\ud835\udc03","\ud835\udc04","\ud835\udc05","\ud835\udc06","\ud835\udc07","\ud835\udc08","\ud835\udc09","\ud835\udc0a","\ud835\udc0b","\ud835\udc0c","\ud835\udc0d","\ud835\udc0e","\ud835\udc0f","\ud835\udc10","\ud835\udc11","\ud835\udc12","\ud835\udc13","\ud835\udc14","\ud835\udc15","\ud835\udc16","\ud835\udc17","\ud835\udc18","\ud835\udc19"],v=["\ud835\udc1a","\ud835\udc1b","\ud835\udc1c","\ud835\udc1d","\ud835\udc1e","\ud835\udc1f","\ud835\udc20","\ud835\udc21","\ud835\udc22","\ud835\udc23","\ud835\udc24","\ud835\udc25","\ud835\udc26","\ud835\udc27","\ud835\udc28","\ud835\udc29","\ud835\udc2a","\ud835\udc2b","\ud835\udc2c","\ud835\udc2d","\ud835\udc2e","\ud835\udc2f","\ud835\udc30","\ud835\udc31","\ud835\udc32","\ud835\udc33"],_=["\ud835\udc34","\ud835\udc35","\ud835\udc36","\ud835\udc37","\ud835\udc38","\ud835\udc39","\ud835\udc3a","\ud835\udc3b","\ud835\udc3c","\ud835\udc3d","\ud835\udc3e","\ud835\udc3f","\ud835\udc40","\ud835\udc41","\ud835\udc42","\ud835\udc43","\ud835\udc44","\ud835\udc45","\ud835\udc46","\ud835\udc47","\ud835\udc48","\ud835\udc49","\ud835\udc4a","\ud835\udc4b","\ud835\udc4c","\ud835\udc4d"],S=["\ud835\udc4e","\ud835\udc4f","\ud835\udc50","\ud835\udc51","\ud835\udc52","\ud835\udc53","\ud835\udc54","\u210e","\ud835\udc56","\ud835\udc57","\ud835\udc58","\ud835\udc59","\ud835\udc5a","\ud835\udc5b","\ud835\udc5c","\ud835\udc5d","\ud835\udc5e","\ud835\udc5f","\ud835\udc60","\ud835\udc61","\ud835\udc62","\ud835\udc63","\ud835\udc64","\ud835\udc65","\ud835\udc66","\ud835\udc67","\ud835\udea4","\ud835\udea5"],M=["\ud835\udc68","\ud835\udc69","\ud835\udc6a","\ud835\udc6b","\ud835\udc6c","\ud835\udc6d","\ud835\udc6e","\ud835\udc6f","\ud835\udc70","\ud835\udc71","\ud835\udc72","\ud835\udc73","\ud835\udc74","\ud835\udc75","\ud835\udc76","\ud835\udc77","\ud835\udc78","\ud835\udc79","\ud835\udc7a","\ud835\udc7b","\ud835\udc7c","\ud835\udc7d","\ud835\udc7e","\ud835\udc7f","\ud835\udc80","\ud835\udc81"],O=["\ud835\udc82","\ud835\udc83","\ud835\udc84","\ud835\udc85","\ud835\udc86","\ud835\udc87","\ud835\udc88","\ud835\udc89","\ud835\udc8a","\ud835\udc8b","\ud835\udc8c","\ud835\udc8d","\ud835\udc8e","\ud835\udc8f","\ud835\udc90","\ud835\udc91","\ud835\udc92","\ud835\udc93","\ud835\udc94","\ud835\udc95","\ud835\udc96","\ud835\udc97","\ud835\udc98","\ud835\udc99","\ud835\udc9a","\ud835\udc9b"],E=["\ud835\udc9c","\u212c","\ud835\udc9e","\ud835\udc9f","\u2130","\u2131","\ud835\udca2","\u210b","\u2110","\ud835\udca5","\ud835\udca6","\u2112","\u2133","\ud835\udca9","\ud835\udcaa","\ud835\udcab","\ud835\udcac","\u211b","\ud835\udcae","\ud835\udcaf","\ud835\udcb0","\ud835\udcb1","\ud835\udcb2","\ud835\udcb3","\ud835\udcb4","\ud835\udcb5","\u2118"],x=["\ud835\udcb6","\ud835\udcb7","\ud835\udcb8","\ud835\udcb9","\u212f","\ud835\udcbb","\u210a","\ud835\udcbd","\ud835\udcbe","\ud835\udcbf","\ud835\udcc0","\ud835\udcc1","\ud835\udcc2","\ud835\udcc3","\u2134","\ud835\udcc5","\ud835\udcc6","\ud835\udcc7","\ud835\udcc8","\ud835\udcc9","\ud835\udcca","\ud835\udccb","\ud835\udccc","\ud835\udccd","\ud835\udcce","\ud835\udccf","\u2113"],A=["\ud835\udcd0","\ud835\udcd1","\ud835\udcd2","\ud835\udcd3","\ud835\udcd4","\ud835\udcd5","\ud835\udcd6","\ud835\udcd7","\ud835\udcd8","\ud835\udcd9","\ud835\udcda","\ud835\udcdb","\ud835\udcdc","\ud835\udcdd","\ud835\udcde","\ud835\udcdf","\ud835\udce0","\ud835\udce1","\ud835\udce2","\ud835\udce3","\ud835\udce4","\ud835\udce5","\ud835\udce6","\ud835\udce7","\ud835\udce8","\ud835\udce9"],C=["\ud835\udcea","\ud835\udceb","\ud835\udcec","\ud835\udced","\ud835\udcee","\ud835\udcef","\ud835\udcf0","\ud835\udcf1","\ud835\udcf2","\ud835\udcf3","\ud835\udcf4","\ud835\udcf5","\ud835\udcf6","\ud835\udcf7","\ud835\udcf8","\ud835\udcf9","\ud835\udcfa","\ud835\udcfb","\ud835\udcfc","\ud835\udcfd","\ud835\udcfe","\ud835\udcff","\ud835\udd00","\ud835\udd01","\ud835\udd02","\ud835\udd03"],N=["\ud835\udd04","\ud835\udd05","\u212d","\ud835\udd07","\ud835\udd08","\ud835\udd09","\ud835\udd0a","\u210c","\u2111","\ud835\udd0d","\ud835\udd0e","\ud835\udd0f","\ud835\udd10","\ud835\udd11","\ud835\udd12","\ud835\udd13","\ud835\udd14","\u211c","\ud835\udd16","\ud835\udd17","\ud835\udd18","\ud835\udd19","\ud835\udd1a","\ud835\udd1b","\ud835\udd1c","\u2128"],T=["\ud835\udd1e","\ud835\udd1f","\ud835\udd20","\ud835\udd21","\ud835\udd22","\ud835\udd23","\ud835\udd24","\ud835\udd25","\ud835\udd26","\ud835\udd27","\ud835\udd28","\ud835\udd29","\ud835\udd2a","\ud835\udd2b","\ud835\udd2c","\ud835\udd2d","\ud835\udd2e","\ud835\udd2f","\ud835\udd30","\ud835\udd31","\ud835\udd32","\ud835\udd33","\ud835\udd34","\ud835\udd35","\ud835\udd36","\ud835\udd37"],L=["\ud835\udd38","\ud835\udd39","\u2102","\ud835\udd3b","\ud835\udd3c","\ud835\udd3d","\ud835\udd3e","\u210d","\ud835\udd40","\ud835\udd41","\ud835\udd42","\ud835\udd43","\ud835\udd44","\u2115","\ud835\udd46","\u2119","\u211a","\u211d","\ud835\udd4a","\ud835\udd4b","\ud835\udd4c","\ud835\udd4d","\ud835\udd4e","\ud835\udd4f","\ud835\udd50","\u2124"],w=["\ud835\udd52","\ud835\udd53","\ud835\udd54","\ud835\udd55","\ud835\udd56","\ud835\udd57","\ud835\udd58","\ud835\udd59","\ud835\udd5a","\ud835\udd5b","\ud835\udd5c","\ud835\udd5d","\ud835\udd5e","\ud835\udd5f","\ud835\udd60","\ud835\udd61","\ud835\udd62","\ud835\udd63","\ud835\udd64","\ud835\udd65","\ud835\udd66","\ud835\udd67","\ud835\udd68","\ud835\udd69","\ud835\udd6a","\ud835\udd6b"],I=["\ud835\udd6c","\ud835\udd6d","\ud835\udd6e","\ud835\udd6f","\ud835\udd70","\ud835\udd71","\ud835\udd72","\ud835\udd73","\ud835\udd74","\ud835\udd75","\ud835\udd76","\ud835\udd77","\ud835\udd78","\ud835\udd79","\ud835\udd7a","\ud835\udd7b","\ud835\udd7c","\ud835\udd7d","\ud835\udd7e","\ud835\udd7f","\ud835\udd80","\ud835\udd81","\ud835\udd82","\ud835\udd83","\ud835\udd84","\ud835\udd85"],R=["\ud835\udd86","\ud835\udd87","\ud835\udd88","\ud835\udd89","\ud835\udd8a","\ud835\udd8b","\ud835\udd8c","\ud835\udd8d","\ud835\udd8e","\ud835\udd8f","\ud835\udd90","\ud835\udd91","\ud835\udd92","\ud835\udd93","\ud835\udd94","\ud835\udd95","\ud835\udd96","\ud835\udd97","\ud835\udd98","\ud835\udd99","\ud835\udd9a","\ud835\udd9b","\ud835\udd9c","\ud835\udd9d","\ud835\udd9e","\ud835\udd9f"],P=["\ud835\udda0","\ud835\udda1","\ud835\udda2","\ud835\udda3","\ud835\udda4","\ud835\udda5","\ud835\udda6","\ud835\udda7","\ud835\udda8","\ud835\udda9","\ud835\uddaa","\ud835\uddab","\ud835\uddac","\ud835\uddad","\ud835\uddae","\ud835\uddaf","\ud835\uddb0","\ud835\uddb1","\ud835\uddb2","\ud835\uddb3","\ud835\uddb4","\ud835\uddb5","\ud835\uddb6","\ud835\uddb7","\ud835\uddb8","\ud835\uddb9"],k=["\ud835\uddba","\ud835\uddbb","\ud835\uddbc","\ud835\uddbd","\ud835\uddbe","\ud835\uddbf","\ud835\uddc0","\ud835\uddc1","\ud835\uddc2","\ud835\uddc3","\ud835\uddc4","\ud835\uddc5","\ud835\uddc6","\ud835\uddc7","\ud835\uddc8","\ud835\uddc9","\ud835\uddca","\ud835\uddcb","\ud835\uddcc","\ud835\uddcd","\ud835\uddce","\ud835\uddcf","\ud835\uddd0","\ud835\uddd1","\ud835\uddd2","\ud835\uddd3"],j=["\ud835\uddd4","\ud835\uddd5","\ud835\uddd6","\ud835\uddd7","\ud835\uddd8","\ud835\uddd9","\ud835\uddda","\ud835\udddb","\ud835\udddc","\ud835\udddd","\ud835\uddde","\ud835\udddf","\ud835\udde0","\ud835\udde1","\ud835\udde2","\ud835\udde3","\ud835\udde4","\ud835\udde5","\ud835\udde6","\ud835\udde7","\ud835\udde8","\ud835\udde9","\ud835\uddea","\ud835\uddeb","\ud835\uddec","\ud835\udded"],B=["\ud835\uddee","\ud835\uddef","\ud835\uddf0","\ud835\uddf1","\ud835\uddf2","\ud835\uddf3","\ud835\uddf4","\ud835\uddf5","\ud835\uddf6","\ud835\uddf7","\ud835\uddf8","\ud835\uddf9","\ud835\uddfa","\ud835\uddfb","\ud835\uddfc","\ud835\uddfd","\ud835\uddfe","\ud835\uddff","\ud835\ude00","\ud835\ude01","\ud835\ude02","\ud835\ude03","\ud835\ude04","\ud835\ude05","\ud835\ude06","\ud835\ude07"],D=["\ud835\ude08","\ud835\ude09","\ud835\ude0a","\ud835\ude0b","\ud835\ude0c","\ud835\ude0d","\ud835\ude0e","\ud835\ude0f","\ud835\ude10","\ud835\ude11","\ud835\ude12","\ud835\ude13","\ud835\ude14","\ud835\ude15","\ud835\ude16","\ud835\ude17","\ud835\ude18","\ud835\ude19","\ud835\ude1a","\ud835\ude1b","\ud835\ude1c","\ud835\ude1d","\ud835\ude1e","\ud835\ude1f","\ud835\ude20","\ud835\ude21"],F=["\ud835\ude22","\ud835\ude23","\ud835\ude24","\ud835\ude25","\ud835\ude26","\ud835\ude27","\ud835\ude28","\ud835\ude29","\ud835\ude2a","\ud835\ude2b","\ud835\ude2c","\ud835\ude2d","\ud835\ude2e","\ud835\ude2f","\ud835\ude30","\ud835\ude31","\ud835\ude32","\ud835\ude33","\ud835\ude34","\ud835\ude35","\ud835\ude36","\ud835\ude37","\ud835\ude38","\ud835\ude39","\ud835\ude3a","\ud835\ude3b"],H=["\ud835\ude3c","\ud835\ude3d","\ud835\ude3e","\ud835\ude3f","\ud835\ude40","\ud835\ude41","\ud835\ude42","\ud835\ude43","\ud835\ude44","\ud835\ude45","\ud835\ude46","\ud835\ude47","\ud835\ude48","\ud835\ude49","\ud835\ude4a","\ud835\ude4b","\ud835\ude4c","\ud835\ude4d","\ud835\ude4e","\ud835\ude4f","\ud835\ude50","\ud835\ude51","\ud835\ude52","\ud835\ude53","\ud835\ude54","\ud835\ude55"],U=["\ud835\ude56","\ud835\ude57","\ud835\ude58","\ud835\ude59","\ud835\ude5a","\ud835\ude5b","\ud835\ude5c","\ud835\ude5d","\ud835\ude5e","\ud835\ude5f","\ud835\ude60","\ud835\ude61","\ud835\ude62","\ud835\ude63","\ud835\ude64","\ud835\ude65","\ud835\ude66","\ud835\ude67","\ud835\ude68","\ud835\ude69","\ud835\ude6a","\ud835\ude6b","\ud835\ude6c","\ud835\ude6d","\ud835\ude6e","\ud835\ude6f"],X=["\ud835\ude70","\ud835\ude71","\ud835\ude72","\ud835\ude73","\ud835\ude74","\ud835\ude75","\ud835\ude76","\ud835\ude77","\ud835\ude78","\ud835\ude79","\ud835\ude7a","\ud835\ude7b","\ud835\ude7c","\ud835\ude7d","\ud835\ude7e","\ud835\ude7f","\ud835\ude80","\ud835\ude81","\ud835\ude82","\ud835\ude83","\ud835\ude84","\ud835\ude85","\ud835\ude86","\ud835\ude87","\ud835\ude88","\ud835\ude89"],W=["\ud835\ude8a","\ud835\ude8b","\ud835\ude8c","\ud835\ude8d","\ud835\ude8e","\ud835\ude8f","\ud835\ude90","\ud835\ude91","\ud835\ude92","\ud835\ude93","\ud835\ude94","\ud835\ude95","\ud835\ude96","\ud835\ude97","\ud835\ude98","\ud835\ude99","\ud835\ude9a","\ud835\ude9b","\ud835\ude9c","\ud835\ude9d","\ud835\ude9e","\ud835\ude9f","\ud835\udea0","\ud835\udea1","\ud835\udea2","\ud835\udea3"],V=["\u2145","\u2146","\u2147","\u2148","\u2149"],G=["\u0391","\u0392","\u0393","\u0394","\u0395","\u0396","\u0397","\u0398","\u0399","\u039a","\u039b","\u039c","\u039d","\u039e","\u039f","\u03a0","\u03a1","\u03a3","\u03a4","\u03a5","\u03a6","\u03a7","\u03a8","\u03a9"],q=["\u03b1","\u03b2","\u03b3","\u03b4","\u03b5","\u03b6","\u03b7","\u03b8","\u03b9","\u03ba","\u03bb","\u03bc","\u03bd","\u03be","\u03bf","\u03c0","\u03c1","\u03c2","\u03c3","\u03c4","\u03c5","\u03c6","\u03c7","\u03c8","\u03c9"],J=["\ud835\udea8","\ud835\udea9","\ud835\udeaa","\ud835\udeab","\ud835\udeac","\ud835\udead","\ud835\udeae","\ud835\udeaf","\ud835\udeb0","\ud835\udeb1","\ud835\udeb2","\ud835\udeb3","\ud835\udeb4","\ud835\udeb5","\ud835\udeb6","\ud835\udeb7","\ud835\udeb8","\ud835\udeba","\ud835\udebb","\ud835\udebc","\ud835\udebd","\ud835\udebe","\ud835\udebf","\ud835\udec0"],z=["\ud835\udec2","\ud835\udec3","\ud835\udec4","\ud835\udec5","\ud835\udec6","\ud835\udec7","\ud835\udec8","\ud835\udec9","\ud835\udeca","\ud835\udecb","\ud835\udecc","\ud835\udecd","\ud835\udece","\ud835\udecf","\ud835\uded0","\ud835\uded1","\ud835\uded2","\ud835\uded3","\ud835\uded4","\ud835\uded5","\ud835\uded6","\ud835\uded7","\ud835\uded8","\ud835\uded9","\ud835\udeda"],K=["\ud835\udee2","\ud835\udee3","\ud835\udee4","\ud835\udee5","\ud835\udee6","\ud835\udee7","\ud835\udee8","\ud835\udee9","\ud835\udeea","\ud835\udeeb","\ud835\udeec","\ud835\udeed","\ud835\udeee","\ud835\udeef","\ud835\udef0","\ud835\udef1","\ud835\udef2","\ud835\udef4","\ud835\udef5","\ud835\udef6","\ud835\udef7","\ud835\udef8","\ud835\udef9","\ud835\udefa"],$=["\ud835\udefc","\ud835\udefd","\ud835\udefe","\ud835\udeff","\ud835\udf00","\ud835\udf01","\ud835\udf02","\ud835\udf03","\ud835\udf04","\ud835\udf05","\ud835\udf06","\ud835\udf07","\ud835\udf08","\ud835\udf09","\ud835\udf0a","\ud835\udf0b","\ud835\udf0c","\ud835\udf0d","\ud835\udf0e","\ud835\udf0f","\ud835\udf10","\ud835\udf11","\ud835\udf12","\ud835\udf13","\ud835\udf14"],Y=["\ud835\udf1c","\ud835\udf1d","\ud835\udf1e","\ud835\udf1f","\ud835\udf20","\ud835\udf21","\ud835\udf22","\ud835\udf23","\ud835\udf24","\ud835\udf25","\ud835\udf26","\ud835\udf27","\ud835\udf28","\ud835\udf29","\ud835\udf2a","\ud835\udf2b","\ud835\udf2c","\ud835\udf2e","\ud835\udf2f","\ud835\udf30","\ud835\udf31","\ud835\udf32","\ud835\udf33","\ud835\udf34"],Z=["\ud835\udf36","\ud835\udf37","\ud835\udf38","\ud835\udf39","\ud835\udf3a","\ud835\udf3b","\ud835\udf3c","\ud835\udf3d","\ud835\udf3e","\ud835\udf3f","\ud835\udf40","\ud835\udf41","\ud835\udf42","\ud835\udf43","\ud835\udf44","\ud835\udf45","\ud835\udf46","\ud835\udf47","\ud835\udf48","\ud835\udf49","\ud835\udf4a","\ud835\udf4b","\ud835\udf4c","\ud835\udf4d","\ud835\udf4e"],Q=["\ud835\udf56","\ud835\udf57","\ud835\udf58","\ud835\udf59","\ud835\udf5a","\ud835\udf5b","\ud835\udf5c","\ud835\udf5d","\ud835\udf5e","\ud835\udf5f","\ud835\udf60","\ud835\udf61","\ud835\udf62","\ud835\udf63","\ud835\udf64","\ud835\udf65","\ud835\udf66","\ud835\udf68","\ud835\udf69","\ud835\udf6a","\ud835\udf6b","\ud835\udf6c","\ud835\udf6d","\ud835\udf6e"],tt=["\ud835\udf70","\ud835\udf71","\ud835\udf72","\ud835\udf73","\ud835\udf74","\ud835\udf75","\ud835\udf76","\ud835\udf77","\ud835\udf78","\ud835\udf79","\ud835\udf7a","\ud835\udf7b","\ud835\udf7c","\ud835\udf7d","\ud835\udf7e","\ud835\udf7f","\ud835\udf80","\ud835\udf81","\ud835\udf82","\ud835\udf83","\ud835\udf84","\ud835\udf85","\ud835\udf86","\ud835\udf87","\ud835\udf88"],et=["\ud835\udf90","\ud835\udf91","\ud835\udf92","\ud835\udf93","\ud835\udf94","\ud835\udf95","\ud835\udf96","\ud835\udf97","\ud835\udf98","\ud835\udf99","\ud835\udf9a","\ud835\udf9b","\ud835\udf9c","\ud835\udf9d","\ud835\udf9e","\ud835\udf9f","\ud835\udfa0","\ud835\udfa2","\ud835\udfa3","\ud835\udfa4","\ud835\udfa5","\ud835\udfa6","\ud835\udfa7","\ud835\udfa8"],rt=["\ud835\udfaa","\ud835\udfab","\ud835\udfac","\ud835\udfad","\ud835\udfae","\ud835\udfaf","\ud835\udfb0","\ud835\udfb1","\ud835\udfb2","\ud835\udfb3","\ud835\udfb4","\ud835\udfb5","\ud835\udfb6","\ud835\udfb7","\ud835\udfb8","\ud835\udfb9","\ud835\udfba","\ud835\udfbb","\ud835\udfbc","\ud835\udfbd","\ud835\udfbe","\ud835\udfbf","\ud835\udfc0","\ud835\udfc1","\ud835\udfc2"],nt=["\u213c","\u213d","\u213e","\u213f"],ot=["\u03d0","\u03d1","\u03d5","\u03d6","\u03d7","\u03f0","\u03f1","\u03f5","\u03f6","\u03f4"],it=["\ud835\udedc","\ud835\udedd","\ud835\udede","\ud835\udedf","\ud835\udee0","\ud835\udee1"],st=["\ud835\udf16","\ud835\udf17","\ud835\udf18","\ud835\udf19","\ud835\udf1a","\ud835\udf1b"],at=["\ud835\udf8a","\ud835\udf8b","\ud835\udf8c","\ud835\udf8d","\ud835\udf8e","\ud835\udf8f"],ct=["\u2135","\u2136","\u2137","\u2138"],lt=f.concat(m,y,g,b,v,_,M,O,S,E,x,A,C,N,T,L,w,I,R,P,k,j,B,D,F,H,U,X,W,V,G,q,J,z,K,$,Y,Z,Q,tt,nt,ot,et,rt,it,st,at,ct);e.allLettersRegExp=new RegExp(lt.join("|"));const ut=["+","\xb1","\u2213","\u2214","\u2227","\u2228","\u2229","\u222a","\u228c","\u228d","\u228e","\u2293","\u2294","\u229d","\u229e","\u22a4","\u22a5","\u22ba","\u22bb","\u22bc","\u22c4","\u22ce","\u22cf","\u22d2","\u22d3","\u2a5e","\u2295","\u22d4"],pt=String.fromCodePoint(8292);ut.push(pt);const ht=["\u2020","\u2021","\u2210","\u2217","\u2218","\u2219","\u2240","\u229a","\u229b","\u22a0","\u22a1","\u22c5","\u22c6","\u22c7","\u22c8","\u22c9","\u22ca","\u22cb","\u22cc","\u25cb","\xb7","*","\u2297","\u2299"],dt=String.fromCodePoint(8290);ht.push(dt);const ft=String.fromCodePoint(8289),mt=["\xbc","\xbd","\xbe","\u2150","\u2151","\u2152","\u2153","\u2154","\u2155","\u2156","\u2157","\u2158","\u2159","\u215a","\u215b","\u215c","\u215d","\u215e","\u215f","\u2189"],yt=["\xb2","\xb3","\xb9","\u2070","\u2074","\u2075","\u2076","\u2077","\u2078","\u2079"].concat(["\u2080","\u2081","\u2082","\u2083","\u2084","\u2085","\u2086","\u2087","\u2088","\u2089"],["\u2460","\u2461","\u2462","\u2463","\u2464","\u2465","\u2466","\u2467","\u2468","\u2469","\u246a","\u246b","\u246c","\u246d","\u246e","\u246f","\u2470","\u2471","\u2472","\u2473","\u24ea","\u24eb","\u24ec","\u24ed","\u24ee","\u24ef","\u24f0","\u24f1","\u24f2","\u24f3","\u24f4","\u24f5","\u24f6","\u24f7","\u24f8","\u24f9","\u24fa","\u24fb","\u24fc","\u24fd","\u24fe","\u24ff","\u2776","\u2777","\u2778","\u2779","\u277a","\u277b","\u277c","\u277d","\u277e","\u277f","\u2780","\u2781","\u2782","\u2783","\u2784","\u2785","\u2786","\u2787","\u2788","\u2789","\u278a","\u278b","\u278c","\u278d","\u278e","\u278f","\u2790","\u2791","\u2792","\u2793","\u3248","\u3249","\u324a","\u324b","\u324c","\u324d","\u324e","\u324f","\u3251","\u3252","\u3253","\u3254","\u3255","\u3256","\u3257","\u3258","\u3259","\u325a","\u325b","\u325c","\u325d","\u325e","\u325f","\u32b1","\u32b2","\u32b3","\u32b4","\u32b5","\u32b6","\u32b7","\u32b8","\u32b9","\u32ba","\u32bb","\u32bc","\u32bd","\u32be","\u32bf"],["\u2474","\u2475","\u2476","\u2477","\u2478","\u2479","\u247a","\u247b","\u247c","\u247d","\u247e","\u247f","\u2480","\u2481","\u2482","\u2483","\u2484","\u2485","\u2486","\u2487"],["\u2488","\u2489","\u248a","\u248b","\u248c","\u248d","\u248e","\u248f","\u2490","\u2491","\u2492","\u2493","\u2494","\u2495","\u2496","\u2497","\u2498","\u2499","\u249a","\u249b","\ud83c\udd00","\ud83c\udd01","\ud83c\udd02","\ud83c\udd03","\ud83c\udd04","\ud83c\udd05","\ud83c\udd06","\ud83c\udd07","\ud83c\udd08","\ud83c\udd09","\ud83c\udd0a"]),gt=["cos","cot","csc","sec","sin","tan","arccos","arccot","arccsc","arcsec","arcsin","arctan","arc cos","arc cot","arc csc","arc sec","arc sin","arc tan"].concat(["cosh","coth","csch","sech","sinh","tanh","arcosh","arcoth","arcsch","arsech","arsinh","artanh","arccosh","arccoth","arccsch","arcsech","arcsinh","arctanh"],["deg","det","dim","hom","ker","Tr","tr"],["log","ln","lg","exp","expt","gcd","gcd","arg","im","re","Pr"]),bt=[{set:["!",'"',"#","%","&",";","?","@","\\","\xa1","\xa7","\xb6","\xbf","\u2017","\u2020","\u2021","\u2022","\u2023","\u2024","\u2025","\u2027","\u2030","\u2031","\u2038","\u203b","\u203c","\u203d","\u203e","\u2041","\u2042","\u2043","\u2047","\u2048","\u2049","\u204b","\u204c","\u204d","\u204e","\u204f","\u2050","\u2051","\u2053","\u2055","\u2056","\u2058","\u2059","\u205a","\u205b","\u205c","\u205d","\u205e","\ufe10","\ufe14","\ufe15","\ufe16","\ufe30","\ufe45","\ufe46","\ufe49","\ufe4a","\ufe4b","\ufe4c","\ufe54","\ufe56","\ufe57","\ufe5f","\ufe60","\ufe61","\ufe68","\ufe6a","\ufe6b","\uff01","\uff02","\uff03","\uff05","\uff06","\uff07","\uff0a","\uff0f","\uff1b","\uff1f","\uff20","\uff3c"],type:"punctuation",role:"unknown"},{set:["\ufe13",":","\uff1a","\ufe55"],type:"punctuation",role:"colon"},{set:n,type:"punctuation",role:"comma"},{set:["\u2026","\u22ee","\u22ef","\u22f0","\u22f1","\ufe19"],type:"punctuation",role:"ellipsis"},{set:[".","\ufe52","\uff0e"],type:"punctuation",role:"fullstop"},{set:o,type:"operator",role:"dash"},{set:i,type:"operator",role:"tilde"},{set:["'","\u2032","\u2033","\u2034","\u2035","\u2036","\u2037","\u2057","\u02b9","\u02ba"],type:"punctuation",role:"prime"},{set:["\xb0"],type:"punctuation",role:"degree"},{set:c,type:"fence",role:"open"},{set:l,type:"fence",role:"close"},{set:u,type:"fence",role:"top"},{set:p,type:"fence",role:"bottom"},{set:h,type:"fence",role:"neutral"},{set:d,type:"fence",role:"metric"},{set:m,type:"identifier",role:"latinletter",font:"normal"},{set:f,type:"identifier",role:"latinletter",font:"normal"},{set:g,type:"identifier",role:"latinletter",font:"normal"},{set:y,type:"identifier",role:"latinletter",font:"normal"},{set:v,type:"identifier",role:"latinletter",font:"bold"},{set:b,type:"identifier",role:"latinletter",font:"bold"},{set:S,type:"identifier",role:"latinletter",font:"italic"},{set:_,type:"identifier",role:"latinletter",font:"italic"},{set:O,type:"identifier",role:"latinletter",font:"bold-italic"},{set:M,type:"identifier",role:"latinletter",font:"bold-italic"},{set:x,type:"identifier",role:"latinletter",font:"script"},{set:E,type:"identifier",role:"latinletter",font:"script"},{set:C,type:"identifier",role:"latinletter",font:"bold-script"},{set:A,type:"identifier",role:"latinletter",font:"bold-script"},{set:T,type:"identifier",role:"latinletter",font:"fraktur"},{set:N,type:"identifier",role:"latinletter",font:"fraktur"},{set:w,type:"identifier",role:"latinletter",font:"double-struck"},{set:L,type:"identifier",role:"latinletter",font:"double-struck"},{set:R,type:"identifier",role:"latinletter",font:"bold-fraktur"},{set:I,type:"identifier",role:"latinletter",font:"bold-fraktur"},{set:k,type:"identifier",role:"latinletter",font:"sans-serif"},{set:P,type:"identifier",role:"latinletter",font:"sans-serif"},{set:B,type:"identifier",role:"latinletter",font:"sans-serif-bold"},{set:j,type:"identifier",role:"latinletter",font:"sans-serif-bold"},{set:F,type:"identifier",role:"latinletter",font:"sans-serif-italic"},{set:D,type:"identifier",role:"latinletter",font:"sans-serif-italic"},{set:U,type:"identifier",role:"latinletter",font:"sans-serif-bold-italic"},{set:H,type:"identifier",role:"latinletter",font:"sans-serif-bold-italic"},{set:W,type:"identifier",role:"latinletter",font:"monospace"},{set:X,type:"identifier",role:"latinletter",font:"monospace"},{set:V,type:"identifier",role:"latinletter",font:"double-struck-italic"},{set:q,type:"identifier",role:"greekletter",font:"normal"},{set:G,type:"identifier",role:"greekletter",font:"normal"},{set:z,type:"identifier",role:"greekletter",font:"bold"},{set:J,type:"identifier",role:"greekletter",font:"bold"},{set:$,type:"identifier",role:"greekletter",font:"italic"},{set:K,type:"identifier",role:"greekletter",font:"italic"},{set:Z,type:"identifier",role:"greekletter",font:"bold-italic"},{set:Y,type:"identifier",role:"greekletter",font:"bold-italic"},{set:tt,type:"identifier",role:"greekletter",font:"sans-serif-bold"},{set:Q,type:"identifier",role:"greekletter",font:"sans-serif-bold"},{set:et,type:"identifier",role:"greekletter",font:"sans-serif-bold-italic"},{set:rt,type:"identifier",role:"greekletter",font:"sans-serif-bold-italic"},{set:nt,type:"identifier",role:"greekletter",font:"double-struck"},{set:ot,type:"identifier",role:"greekletter",font:"normal"},{set:it,type:"identifier",role:"greekletter",font:"bold"},{set:st,type:"identifier",role:"greekletter",font:"italic"},{set:at,type:"identifier",role:"greekletter",font:"sans-serif-bold"},{set:ct,type:"identifier",role:"otherletter",font:"normal"},{set:["0","1","2","3","4","5","6","7","8","9"],type:"number",role:"integer",font:"normal"},{set:["\uff10","\uff11","\uff12","\uff13","\uff14","\uff15","\uff16","\uff17","\uff18","\uff19"],type:"number",role:"integer",font:"normal"},{set:["\ud835\udfce","\ud835\udfcf","\ud835\udfd0","\ud835\udfd1","\ud835\udfd2","\ud835\udfd3","\ud835\udfd4","\ud835\udfd5","\ud835\udfd6","\ud835\udfd7"],type:"number",role:"integer",font:"bold"},{set:["\ud835\udfd8","\ud835\udfd9","\ud835\udfda","\ud835\udfdb","\ud835\udfdc","\ud835\udfdd","\ud835\udfde","\ud835\udfdf","\ud835\udfe0","\ud835\udfe1"],type:"number",role:"integer",font:"double-struck"},{set:["\ud835\udfe2","\ud835\udfe3","\ud835\udfe4","\ud835\udfe5","\ud835\udfe6","\ud835\udfe7","\ud835\udfe8","\ud835\udfe9","\ud835\udfea","\ud835\udfeb"],type:"number",role:"integer",font:"sans-serif"},{set:["\ud835\udfec","\ud835\udfed","\ud835\udfee","\ud835\udfef","\ud835\udff0","\ud835\udff1","\ud835\udff2","\ud835\udff3","\ud835\udff4","\ud835\udff5"],type:"number",role:"integer",font:"sans-serif-bold"},{set:["\ud835\udff6","\ud835\udff7","\ud835\udff8","\ud835\udff9","\ud835\udffa","\ud835\udffb","\ud835\udffc","\ud835\udffd","\ud835\udffe","\ud835\udfff"],type:"number",role:"integer",font:"monospace"},{set:mt,type:"number",role:"float"},{set:yt,type:"number",role:"othernumber"},{set:ut,type:"operator",role:"addition"},{set:ht,type:"operator",role:"multiplication"},{set:["\xaf","-","\u2052","\u207b","\u208b","\u2212","\u2216","\u2238","\u2242","\u2296","\u229f","\u2796","\u2a29","\u2a2a","\u2a2b","\u2a2c","\u2a3a","\u2a41","\ufe63","\uff0d","\u2010","\u2011"],type:"operator",role:"subtraction"},{set:["/","\xf7","\u2044","\u2215","\u2298","\u27cc","\u29bc","\u2a38"],type:"operator",role:"division"},{set:["\u2200","\u2203","\u2206","\u2207","\u2202","\u2201","\u2204"],type:"operator",role:"prefix operator"},{set:["\ud835\udec1","\ud835\udedb","\ud835\udfca","\ud835\udfcb"],type:"operator",role:"prefix operator",font:"bold"},{set:["\ud835\udefb","\ud835\udf15"],type:"operator",role:"prefix operator",font:"italic"},{set:["\ud835\udf6f","\ud835\udf89"],type:"operator",role:"prefix operator",font:"sans-serif-bold"},{set:["=","~","\u207c","\u208c","\u223c","\u223d","\u2243","\u2245","\u2248","\u224a","\u224b","\u224c","\u224d","\u224e","\u2251","\u2252","\u2253","\u2254","\u2255","\u2256","\u2257","\u2258","\u2259","\u225a","\u225b","\u225c","\u225d","\u225e","\u225f","\u2261","\u2263","\u29e4","\u2a66","\u2a6e","\u2a6f","\u2a70","\u2a71","\u2a72","\u2a73","\u2a74","\u2a75","\u2a76","\u2a77","\u2a78","\u22d5","\u2a6d","\u2a6a","\u2a6b","\u2a6c","\ufe66","\uff1d","\u2a6c","\u229c","\u2237"],type:"relation",role:"equality"},{set:["<",">","\u2241","\u2242","\u2244","\u2246","\u2247","\u2249","\u224f","\u2250","\u2260","\u2262","\u2264","\u2265","\u2266","\u2267","\u2268","\u2269","\u226a","\u226b","\u226c","\u226d","\u226e","\u226f","\u2270","\u2271","\u2272","\u2273","\u2274","\u2275","\u2276","\u2277","\u2278","\u2279","\u227a","\u227b","\u227c","\u227d","\u227e","\u227f","\u2280","\u2281","\u22d6","\u22d7","\u22d8","\u22d9","\u22da","\u22db","\u22dc","\u22dd","\u22de","\u22df","\u22e0","\u22e1","\u22e6","\u22e7","\u22e8","\u22e9","\u2a79","\u2a7a","\u2a7b","\u2a7c","\u2a7d","\u2a7e","\u2a7f","\u2a80","\u2a81","\u2a82","\u2a83","\u2a84","\u2a85","\u2a86","\u2a87","\u2a88","\u2a89","\u2a8a","\u2a8b","\u2a8c","\u2a8d","\u2a8e","\u2a8f","\u2a90","\u2a91","\u2a92","\u2a93","\u2a94","\u2a95","\u2a96","\u2a97","\u2a98","\u2a99","\u2a9a","\u2a9b","\u2a9c","\u2a9d","\u2a9e","\u2a9f","\u2aa0","\u2aa1","\u2aa2","\u2aa3","\u2aa4","\u2aa5","\u2aa6","\u2aa7","\u2aa8","\u2aa9","\u2aaa","\u2aab","\u2aac","\u2aad","\u2aae","\u2aaf","\u2ab0","\u2ab1","\u2ab2","\u2ab3","\u2ab4","\u2ab5","\u2ab6","\u2ab7","\u2ab8","\u2ab9","\u2aba","\u2abb","\u2abc","\u2af7","\u2af8","\u2af9","\u2afa","\u29c0","\u29c1","\ufe64","\ufe65","\uff1c","\uff1e"],type:"relation",role:"inequality"},{set:["\u22e2","\u22e3","\u22e4","\u22e5","\u2282","\u2283","\u2284","\u2285","\u2286","\u2287","\u2288","\u2289","\u228a","\u228b","\u228f","\u2290","\u2291","\u2292","\u2abd","\u2abe","\u2abf","\u2ac0","\u2ac1","\u2ac2","\u2ac3","\u2ac4","\u2ac5","\u2ac6","\u2ac7","\u2ac8","\u2ac9","\u2aca","\u2acb","\u2acc","\u2acd","\u2ace","\u2acf","\u2ad0","\u2ad1","\u2ad2","\u2ad3","\u2ad4","\u2ad5","\u2ad6","\u2ad7","\u2ad8","\u22d0","\u22d1","\u22ea","\u22eb","\u22ec","\u22ed","\u22b2","\u22b3","\u22b4","\u22b5"],type:"relation",role:"set"},{set:["\u22a2","\u22a3","\u22a6","\u22a7","\u22a8","\u22a9","\u22aa","\u22ab","\u22ac","\u22ad","\u22ae","\u22af","\u2ade","\u2adf","\u2ae0","\u2ae1","\u2ae2","\u2ae3","\u2ae4","\u2ae5","\u2ae6","\u2ae7","\u2ae8","\u2ae9","\u2aea","\u2aeb","\u2aec","\u2aed"],type:"relation",role:"unknown"},{set:["\u2190","\u2191","\u2192","\u2193","\u2194","\u2195","\u2196","\u2197","\u2198","\u2199","\u219a","\u219b","\u219c","\u219d","\u219e","\u219f","\u21a0","\u21a1","\u21a2","\u21a3","\u21a4","\u21a5","\u21a6","\u21a7","\u21a8","\u21a9","\u21aa","\u21ab","\u21ac","\u21ad","\u21ae","\u21af","\u21b0","\u21b1","\u21b2","\u21b3","\u21b4","\u21b5","\u21b6","\u21b7","\u21b8","\u21b9","\u21ba","\u21bb","\u21c4","\u21c5","\u21c6","\u21c7","\u21c8","\u21c9","\u21ca","\u21cd","\u21ce","\u21cf","\u21d0","\u21d1","\u21d2","\u21d3","\u21d4","\u21d5","\u21d6","\u21d7","\u21d8","\u21d9","\u21da","\u21db","\u21dc","\u21dd","\u21de","\u21df","\u21e0","\u21e1","\u21e2","\u21e3","\u21e4","\u21e5","\u21e6","\u21e7","\u21e8","\u21e9","\u21ea","\u21eb","\u21ec","\u21ed","\u21ee","\u21ef","\u21f0","\u21f1","\u21f2","\u21f3","\u21f4","\u21f5","\u21f6","\u21f7","\u21f8","\u21f9","\u21fa","\u21fb","\u21fc","\u21fd","\u21fe","\u21ff","\u2301","\u2303","\u2304","\u2324","\u238b","\u2794","\u2798","\u2799","\u279a","\u279b","\u279c","\u279d","\u279e","\u279f","\u27a0","\u27a1","\u27a2","\u27a3","\u27a4","\u27a5","\u27a6","\u27a7","\u27a8","\u27a9","\u27aa","\u27ab","\u27ac","\u27ad","\u27ae","\u27af","\u27b1","\u27b2","\u27b3","\u27b4","\u27b5","\u27b6","\u27b7","\u27b8","\u27b9","\u27ba","\u27bb","\u27bc","\u27bd","\u27be","\u27f0","\u27f1","\u27f2","\u27f3","\u27f4","\u27f5","\u27f6","\u27f7","\u27f8","\u27f9","\u27fa","\u27fb","\u27fc","\u27fd","\u27fe","\u27ff","\u2900","\u2901","\u2902","\u2903","\u2904","\u2905","\u2906","\u2907","\u2908","\u2909","\u290a","\u290b","\u290c","\u290d","\u290e","\u290f","\u2910","\u2911","\u2912","\u2913","\u2914","\u2915","\u2916","\u2917","\u2918","\u2919","\u291a","\u291b","\u291c","\u291d","\u291e","\u291f","\u2920","\u2921","\u2922","\u2923","\u2924","\u2925","\u2926","\u2927","\u2928","\u2929","\u292a","\u292d","\u292e","\u292f","\u2930","\u2931","\u2932","\u2933","\u2934","\u2935","\u2936","\u2937","\u2938","\u2939","\u293a","\u293b","\u293c","\u293d","\u293e","\u293f","\u2940","\u2941","\u2942","\u2943","\u2944","\u2945","\u2946","\u2947","\u2948","\u2949","\u2970","\u2971","\u2972","\u2973","\u2974","\u2975","\u2976","\u2977","\u2978","\u2979","\u297a","\u297b","\u29b3","\u29b4","\u29bd","\u29ea","\u29ec","\u29ed","\u2a17","\u2b00","\u2b01","\u2b02","\u2b03","\u2b04","\u2b05","\u2b06","\u2b07","\u2b08","\u2b09","\u2b0a","\u2b0b","\u2b0c","\u2b0d","\u2b0e","\u2b0f","\u2b10","\u2b11","\u2b30","\u2b31","\u2b32","\u2b33","\u2b34","\u2b35","\u2b36","\u2b37","\u2b38","\u2b39","\u2b3a","\u2b3b","\u2b3c","\u2b3d","\u2b3e","\u2b3f","\u2b40","\u2b41","\u2b42","\u2b43","\u2b44","\u2b45","\u2b46","\u2b47","\u2b48","\u2b49","\u2b4a","\u2b4b","\u2b4c","\uffe9","\uffea","\uffeb","\uffec","\u21bc","\u21bd","\u21be","\u21bf","\u21c0","\u21c1","\u21c2","\u21c3","\u21cb","\u21cc","\u294a","\u294b","\u294c","\u294d","\u294e","\u294f","\u2950","\u2951","\u2952","\u2953","\u2954","\u2955","\u2956","\u2957","\u2958","\u2959","\u295a","\u295b","\u295c","\u295d","\u295e","\u295f","\u2960","\u2961","\u2962","\u2963","\u2964","\u2965","\u2966","\u2967","\u2968","\u2969","\u296a","\u296b","\u296c","\u296d","\u296e","\u296f","\u297c","\u297d","\u297e","\u297f"],type:"relation",role:"arrow"},{set:["\u2208","\u220a","\u22f2","\u22f3","\u22f4","\u22f5","\u22f6","\u22f7","\u22f8","\u22f9","\u22ff"],type:"operator",role:"element"},{set:["\u2209"],type:"operator",role:"nonelement"},{set:["\u220b","\u220d","\u22fa","\u22fb","\u22fc","\u22fd","\u22fe"],type:"operator",role:"reelement"},{set:["\u220c"],type:"operator",role:"renonelement"},{set:["\u2140","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a03","\u2a04","\u2a05","\u2a06","\u2a07","\u2a08","\u2a09","\u2a0a","\u2a0b","\u2afc","\u2aff"],type:"largeop",role:"sum"},{set:["\u222b","\u222c","\u222d","\u222e","\u222f","\u2230","\u2231","\u2232","\u2233","\u2a0c","\u2a0d","\u2a0e","\u2a0f","\u2a10","\u2a11","\u2a12","\u2a13","\u2a14","\u2a15","\u2a16","\u2a17","\u2a18","\u2a19","\u2a1a","\u2a1b","\u2a1c"],type:"largeop",role:"integral"},{set:["\u221f","\u2220","\u2221","\u2222","\u22be","\u22bf","\u25b3","\u25b7","\u25bd","\u25c1"],type:"operator",role:"geometry"},{set:["inf","lim","liminf","limsup","max","min","sup","injlim","projlim","inj lim","proj lim"],type:"function",role:"limit function"},{set:gt,type:"function",role:"prefix function"},{set:["mod","rem"],type:"operator",role:"prefix function"}],vt=function(){const t={};for(let e,r=0;e=bt[r];r++)e.set.forEach((function(r){t[r]={role:e.role||"unknown",type:e.type||"unknown",font:e.font||"unknown"}}));return t}();e.equal=function(t,e){return t.type===e.type&&t.role===e.role&&t.font===e.font},e.lookupType=function(t){var e;return(null===(e=vt[t])||void 0===e?void 0:e.type)||"unknown"},e.lookupRole=function(t){var e;return(null===(e=vt[t])||void 0===e?void 0:e.role)||"unknown"},e.lookupMeaning=function(t){return vt[t]||{role:"unknown",type:"unknown",font:"unknown"}},e.invisibleTimes=function(){return dt},e.invisiblePlus=function(){return pt},e.invisibleComma=function(){return r},e.functionApplication=function(){return ft},e.isMatchingFence=function(t,e){return-1!==h.indexOf(t)||-1!==d.indexOf(t)?t===e:s[t]===e||a[t]===e},e.isEmbellishedType=function(t){return"operator"===t||"relation"===t||"fence"===t||"punctuation"===t};const _t=new Map;function St(t,e){return`${t} ${e}`}function Mt(t,e,r=""){for(const n of e)_t.set(St(t,n),r||t)}Mt("d",["d","\u2146","\uff44","\ud835\udc1d","\ud835\udc51","\ud835\udcb9","\ud835\udced","\ud835\udd21","\ud835\udd55","\ud835\udd89","\ud835\uddbd","\ud835\uddf1","\ud835\ude25","\ud835\ude8d"]),Mt("bar",o),Mt("tilde",i),e.lookupSecondary=function(t,e){return _t.get(St(t,e))}},8158:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticMeaningCollator=e.SemanticNodeCollator=e.SemanticDefault=void 0;const n=r(3588),o=r(3882);class i{constructor(){this.map={}}static key(t,e){return e?t+":"+e:t}add(t,e){this.map[i.key(t,e.font)]=e}addNode(t){this.add(t.textContent,t.meaning())}retrieve(t,e){return this.map[i.key(t,e)]}retrieveNode(t){return this.retrieve(t.textContent,t.font)}size(){return Object.keys(this.map).length}}e.SemanticDefault=i;class s{constructor(){this.map={}}add(t,e){const r=this.map[t];r?r.push(e):this.map[t]=[e]}retrieve(t,e){return this.map[i.key(t,e)]}retrieveNode(t){return this.retrieve(t.textContent,t.font)}copy(){const t=this.copyCollator();for(const e in this.map)t.map[e]=this.map[e];return t}minimize(){for(const t in this.map)1===this.map[t].length&&delete this.map[t]}minimalCollator(){const t=this.copy();for(const e in t.map)1===t.map[e].length&&delete t.map[e];return t}isMultiValued(){for(const t in this.map)if(this.map[t].length>1)return!0;return!1}isEmpty(){return!Object.keys(this.map).length}}class a extends s{copyCollator(){return new a}add(t,e){const r=i.key(t,e.font);super.add(r,e)}addNode(t){this.add(t.textContent,t)}toString(){const t=[];for(const e in this.map){const r=Array(e.length+3).join(" "),n=this.map[e],o=[];for(let t,e=0;t=n[e];e++)o.push(t.toString());t.push(e+": "+o.join("\n"+r))}return t.join("\n")}collateMeaning(){const t=new c;for(const e in this.map)t.map[e]=this.map[e].map((function(t){return t.meaning()}));return t}}e.SemanticNodeCollator=a;class c extends s{copyCollator(){return new c}add(t,e){const r=this.retrieve(t,e.font);if(!r||!r.find((function(t){return n.equal(t,e)}))){const r=i.key(t,e.font);super.add(r,e)}}addNode(t){this.add(t.textContent,t.meaning())}toString(){const t=[];for(const e in this.map){const r=Array(e.length+3).join(" "),n=this.map[e],o=[];for(let t,e=0;t=n[e];e++)o.push("{type: "+t.type+", role: "+t.role+", font: "+t.font+"}");t.push(e+": "+o.join("\n"+r))}return t.join("\n")}reduce(){for(const t in this.map)1!==this.map[t].length&&(this.map[t]=(0,o.reduce)(this.map[t]))}default(){const t=new i;for(const e in this.map)1===this.map[e].length&&(t.map[e]=this.map[e][0]);return t}newDefault(){const t=this.default();this.reduce();const e=this.default();return t.size()!==e.size()?e:null}}e.SemanticMeaningCollator=c},9911:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticMultiHeuristic=e.SemanticTreeHeuristic=e.SemanticAbstractHeuristic=void 0;class r{constructor(t,e,r=(t=>!1)){this.name=t,this.apply=e,this.applicable=r}}e.SemanticAbstractHeuristic=r;e.SemanticTreeHeuristic=class extends r{};e.SemanticMultiHeuristic=class extends r{}},7516:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.lookup=e.run=e.add=e.blacklist=e.flags=e.updateFactory=e.factory=void 0,e.factory=null,e.updateFactory=function(t){e.factory=t};const r=new Map;function n(t){return r.get(t)}e.flags={combine_juxtaposition:!0,convert_juxtaposition:!0,multioperator:!0},e.blacklist={},e.add=function(t){const n=t.name;r.set(n,t),e.flags[n]||(e.flags[n]=!1)},e.run=function(t,r,o){const i=n(t);return i&&!e.blacklist[t]&&(e.flags[t]||i.applicable(r))?i.apply(r):o?o(r):r},e.lookup=n},94:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const n=r(2057),o=r(5897),i=r(3588),s=r(7516),a=r(9911),c=r(5609),l=r(3308),u=r(4795);function p(t,e,r){let n=null;if(!t.length)return n;const o=r[r.length-1],i=o&&o.length,s=e&&e.length,a=l.default.getInstance();if(i&&s){if("infixop"===e[0].type&&"implicit"===e[0].role)return n=t.pop(),o.push(a.postfixNode_(o.pop(),t)),n;n=t.shift();const r=a.prefixNode_(e.shift(),t);return e.unshift(r),n}return i?(o.push(a.postfixNode_(o.pop(),t)),n):(s&&e.unshift(a.prefixNode_(e.shift(),t)),n)}function h(t,e,r){if(!e.length)return t;const o=t.pop(),i=e.shift(),a=r.shift();if(c.isImplicitOp(i)){n.Debugger.getInstance().output("Juxta Heuristic Case 2");const s=(o?[o,i]:[i]).concat(a);return h(t.concat(s),e,r)}if(!o)return n.Debugger.getInstance().output("Juxta Heuristic Case 3"),h([i].concat(a),e,r);const l=a.shift();if(!l){n.Debugger.getInstance().output("Juxta Heuristic Case 9");const a=s.factory.makeBranchNode("infixop",[o,e.shift()],[i],i.textContent);return a.role="implicit",s.run("combine_juxtaposition",a),e.unshift(a),h(t,e,r)}if(c.isOperator(o)||c.isOperator(l))return n.Debugger.getInstance().output("Juxta Heuristic Case 4"),h(t.concat([o,i,l]).concat(a),e,r);let u=null;return c.isImplicitOp(o)&&c.isImplicitOp(l)?(n.Debugger.getInstance().output("Juxta Heuristic Case 5"),o.contentNodes.push(i),o.contentNodes=o.contentNodes.concat(l.contentNodes),o.childNodes.push(l),o.childNodes=o.childNodes.concat(l.childNodes),l.childNodes.forEach((t=>t.parent=o)),i.parent=o,o.addMathmlNodes(i.mathml),o.addMathmlNodes(l.mathml),u=o):c.isImplicitOp(o)?(n.Debugger.getInstance().output("Juxta Heuristic Case 6"),o.contentNodes.push(i),o.childNodes.push(l),l.parent=o,i.parent=o,o.addMathmlNodes(i.mathml),o.addMathmlNodes(l.mathml),u=o):c.isImplicitOp(l)?(n.Debugger.getInstance().output("Juxta Heuristic Case 7"),l.contentNodes.unshift(i),l.childNodes.unshift(o),o.parent=l,i.parent=l,l.addMathmlNodes(i.mathml),l.addMathmlNodes(o.mathml),u=l):(n.Debugger.getInstance().output("Juxta Heuristic Case 8"),u=s.factory.makeBranchNode("infixop",[o,l],[i],i.textContent),u.role="implicit"),t.push(u),h(t.concat(a),e,r)}s.add(new a.SemanticTreeHeuristic("combine_juxtaposition",(function(t){for(let e,r=t.childNodes.length-1;e=t.childNodes[r];r--)c.isImplicitOp(e)&&!e.nobreaking&&(t.childNodes.splice(r,1,...e.childNodes),t.contentNodes.splice(r,0,...e.contentNodes),e.childNodes.concat(e.contentNodes).forEach((function(e){e.parent=t})),t.addMathmlNodes(e.mathml));return t}))),s.add(new a.SemanticTreeHeuristic("propagateSimpleFunction",(t=>("infixop"!==t.type&&"fraction"!==t.type||!t.childNodes.every(c.isSimpleFunction)||(t.role="composed function"),t)),(t=>"clearspeak"===o.default.getInstance().domain))),s.add(new a.SemanticTreeHeuristic("simpleNamedFunction",(t=>("unit"!==t.role&&-1!==["f","g","h","F","G","H"].indexOf(t.textContent)&&(t.role="simple function"),t)),(t=>"clearspeak"===o.default.getInstance().domain))),s.add(new a.SemanticTreeHeuristic("propagateComposedFunction",(t=>("fenced"===t.type&&"composed function"===t.childNodes[0].role&&(t.role="composed function"),t)),(t=>"clearspeak"===o.default.getInstance().domain))),s.add(new a.SemanticTreeHeuristic("multioperator",(t=>{if("unknown"!==t.role||t.textContent.length<=1)return;const e=[...t.textContent].map(i.lookupMeaning).reduce((function(t,e){return t&&e.role&&"unknown"!==e.role&&e.role!==t?"unknown"===t?e.role:null:t}),"unknown");e&&(t.role=e)}))),s.add(new a.SemanticMultiHeuristic("convert_juxtaposition",(t=>{let e=u.partitionNodes(t,(function(t){return t.textContent===i.invisibleTimes()&&"operator"===t.type}));e=e.rel.length?function(t){const e=[],r=[];let n=t.comp.shift(),o=null,i=[];for(;t.comp.length;)if(i=[],n.length)o&&e.push(o),r.push(n),o=t.rel.shift(),n=t.comp.shift();else{for(o&&i.push(o);!n.length&&t.comp.length;)n=t.comp.shift(),i.push(t.rel.shift());o=p(i,n,r)}i.length||n.length?(e.push(o),r.push(n)):(i.push(o),p(i,n,r));return{rel:e,comp:r}}(e):e,t=e.comp[0];for(let r,n,o=1;r=e.comp[o],n=e.rel[o-1];o++)t.push(n),t=t.concat(r);return e=u.partitionNodes(t,(function(t){return t.textContent===i.invisibleTimes()&&("operator"===t.type||"infixop"===t.type)})),e.rel.length?h(e.comp.shift(),e.rel,e.comp):t}))),s.add(new a.SemanticTreeHeuristic("simple2prefix",(t=>(t.textContent.length>1&&!t.textContent[0].match(/[A-Z]/)&&(t.role="prefix function"),t)),(t=>"braille"===o.default.getInstance().modality&&"identifier"===t.type))),s.add(new a.SemanticTreeHeuristic("detect_cycle",(t=>{t.type="matrix",t.role="cycle";const e=t.childNodes[0];return e.type="row",e.role="cycle",e.textContent="",e.contentNodes=[],t}),(t=>"fenced"===t.type&&"infixop"===t.childNodes[0].type&&"implicit"===t.childNodes[0].role&&t.childNodes[0].childNodes.every((function(t){return"number"===t.type}))&&t.childNodes[0].contentNodes.every((function(t){return"space"===t.role})))))},7228:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticMathml=void 0;const n=r(5740),o=r(5250),i=r(5609),s=r(3308),a=r(4795);class c extends o.SemanticAbstractParser{constructor(){super("MathML"),this.parseMap_={SEMANTICS:this.semantics_.bind(this),MATH:this.rows_.bind(this),MROW:this.rows_.bind(this),MPADDED:this.rows_.bind(this),MSTYLE:this.rows_.bind(this),MFRAC:this.fraction_.bind(this),MSUB:this.limits_.bind(this),MSUP:this.limits_.bind(this),MSUBSUP:this.limits_.bind(this),MOVER:this.limits_.bind(this),MUNDER:this.limits_.bind(this),MUNDEROVER:this.limits_.bind(this),MROOT:this.root_.bind(this),MSQRT:this.sqrt_.bind(this),MTABLE:this.table_.bind(this),MLABELEDTR:this.tableLabeledRow_.bind(this),MTR:this.tableRow_.bind(this),MTD:this.tableCell_.bind(this),MS:this.text_.bind(this),MTEXT:this.text_.bind(this),MSPACE:this.space_.bind(this),"ANNOTATION-XML":this.text_.bind(this),MI:this.identifier_.bind(this),MN:this.number_.bind(this),MO:this.operator_.bind(this),MFENCED:this.fenced_.bind(this),MENCLOSE:this.enclosed_.bind(this),MMULTISCRIPTS:this.multiscripts_.bind(this),ANNOTATION:this.empty_.bind(this),NONE:this.empty_.bind(this),MACTION:this.action_.bind(this)};const t={type:"identifier",role:"numbersetletter",font:"double-struck"};["C","H","N","P","Q","R","Z","\u2102","\u210d","\u2115","\u2119","\u211a","\u211d","\u2124"].forEach((e=>this.getFactory().defaultMap.add(e,t)).bind(this))}static getAttribute_(t,e,r){if(!t.hasAttribute(e))return r;const n=t.getAttribute(e);return n.match(/^\s*$/)?null:n}parse(t){s.default.getInstance().setNodeFactory(this.getFactory());const e=n.toArray(t.childNodes),r=n.tagName(t),o=this.parseMap_[r],i=(o||this.dummy_.bind(this))(t,e);return a.addAttributes(i,t),-1!==["MATH","MROW","MPADDED","MSTYLE","SEMANTICS"].indexOf(r)||(i.mathml.unshift(t),i.mathmlTree=t),i}semantics_(t,e){return e.length?this.parse(e[0]):this.getFactory().makeEmptyNode()}rows_(t,e){const r=t.getAttribute("semantics");if(r&&r.match("bspr_"))return s.default.proof(t,r,this.parseList.bind(this));let n;return 1===(e=a.purgeNodes(e)).length?(n=this.parse(e[0]),"empty"!==n.type||n.mathmlTree||(n.mathmlTree=t)):n=s.default.getInstance().row(this.parseList(e)),n.mathml.unshift(t),n}fraction_(t,e){if(!e.length)return this.getFactory().makeEmptyNode();const r=this.parse(e[0]),n=e[1]?this.parse(e[1]):this.getFactory().makeEmptyNode();return s.default.getInstance().fractionLikeNode(r,n,t.getAttribute("linethickness"),"true"===t.getAttribute("bevelled"))}limits_(t,e){return s.default.getInstance().limitNode(n.tagName(t),this.parseList(e))}root_(t,e){return e[1]?this.getFactory().makeBranchNode("root",[this.parse(e[1]),this.parse(e[0])],[]):this.sqrt_(t,e)}sqrt_(t,e){const r=this.parseList(a.purgeNodes(e));return this.getFactory().makeBranchNode("sqrt",[s.default.getInstance().row(r)],[])}table_(t,e){const r=t.getAttribute("semantics");if(r&&r.match("bspr_"))return s.default.proof(t,r,this.parseList.bind(this));const n=this.getFactory().makeBranchNode("table",this.parseList(e),[]);return n.mathmlTree=t,s.default.tableToMultiline(n),n}tableRow_(t,e){const r=this.getFactory().makeBranchNode("row",this.parseList(e),[]);return r.role="table",r}tableLabeledRow_(t,e){if(!e.length)return this.tableRow_(t,e);const r=this.parse(e[0]);r.role="label";const n=this.getFactory().makeBranchNode("row",this.parseList(e.slice(1)),[r]);return n.role="table",n}tableCell_(t,e){const r=this.parseList(a.purgeNodes(e));let n;n=r.length?1===r.length&&i.isType(r[0],"empty")?r:[s.default.getInstance().row(r)]:[];const o=this.getFactory().makeBranchNode("cell",n,[]);return o.role="table",o}space_(t,e){const r=t.getAttribute("width"),o=r&&r.match(/[a-z]*$/);if(!o)return this.empty_(t,e);const i=o[0],a=parseFloat(r.slice(0,o.index)),c={cm:.4,pc:.5,em:.5,ex:1,in:.15,pt:5,mm:5}[i];if(!c||isNaN(a)||a1?this.parse(e[1]):this.getFactory().makeUnprocessed(t)}dummy_(t,e){const r=this.getFactory().makeUnprocessed(t);return r.role=t.tagName,r.textContent=t.textContent,r}leaf_(t,e){if(1===e.length&&e[0].nodeType!==n.NodeType.TEXT_NODE){const r=this.getFactory().makeUnprocessed(t);return r.role=e[0].tagName,a.addAttributes(r,e[0]),r}return this.getFactory().makeLeafNode(t.textContent,s.default.getInstance().font(t.getAttribute("mathvariant")))}}e.SemanticMathml=c},5952:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticNode=void 0;const n=r(5740),o=r(3588),i=r(4795);class s{constructor(t){this.id=t,this.mathml=[],this.parent=null,this.type="unknown",this.role="unknown",this.font="unknown",this.embellished=null,this.fencePointer="",this.childNodes=[],this.textContent="",this.mathmlTree=null,this.contentNodes=[],this.annotation={},this.attributes={},this.nobreaking=!1}static fromXml(t){const e=parseInt(t.getAttribute("id"),10),r=new s(e);return r.type=t.tagName,s.setAttribute(r,t,"role"),s.setAttribute(r,t,"font"),s.setAttribute(r,t,"embellished"),s.setAttribute(r,t,"fencepointer","fencePointer"),t.getAttribute("annotation")&&r.parseAnnotation(t.getAttribute("annotation")),i.addAttributes(r,t),s.processChildren(r,t),r}static setAttribute(t,e,r,n){n=n||r;const o=e.getAttribute(r);o&&(t[n]=o)}static processChildren(t,e){for(const r of n.toArray(e.childNodes)){if(r.nodeType===n.NodeType.TEXT_NODE){t.textContent=r.textContent;continue}const e=n.toArray(r.childNodes).map(s.fromXml);e.forEach((e=>e.parent=t)),"CONTENT"===n.tagName(r)?t.contentNodes=e:t.childNodes=e}}querySelectorAll(t){let e=[];for(let r,n=0;r=this.childNodes[n];n++)e=e.concat(r.querySelectorAll(t));for(let r,n=0;r=this.contentNodes[n];n++)e=e.concat(r.querySelectorAll(t));return t(this)&&e.unshift(this),e}xml(t,e){const r=function(r,n){const o=n.map((function(r){return r.xml(t,e)})),i=t.createElementNS("",r);for(let t,e=0;t=o[e];e++)i.appendChild(t);return i},n=t.createElementNS("",this.type);return e||this.xmlAttributes(n),n.textContent=this.textContent,this.contentNodes.length>0&&n.appendChild(r("content",this.contentNodes)),this.childNodes.length>0&&n.appendChild(r("children",this.childNodes)),n}toString(t=!1){const e=n.parseInput("");return n.serializeXml(this.xml(e,t))}allAttributes(){const t=[];return t.push(["role",this.role]),"unknown"!==this.font&&t.push(["font",this.font]),Object.keys(this.annotation).length&&t.push(["annotation",this.xmlAnnotation()]),this.embellished&&t.push(["embellished",this.embellished]),this.fencePointer&&t.push(["fencepointer",this.fencePointer]),t.push(["id",this.id.toString()]),t}xmlAnnotation(){const t=[];for(const e in this.annotation)this.annotation[e].forEach((function(r){t.push(e+":"+r)}));return t.join(";")}toJson(){const t={};t.type=this.type;const e=this.allAttributes();for(let r,n=0;r=e[n];n++)t[r[0]]=r[1].toString();return this.textContent&&(t.$t=this.textContent),this.childNodes.length&&(t.children=this.childNodes.map((function(t){return t.toJson()}))),this.contentNodes.length&&(t.content=this.contentNodes.map((function(t){return t.toJson()}))),t}updateContent(t,e){const r=e?t.replace(/^[ \f\n\r\t\v\u200b]*/,"").replace(/[ \f\n\r\t\v\u200b]*$/,""):t.trim();if(t=t&&!r?t:r,this.textContent===t)return;const n=(0,o.lookupMeaning)(t);this.textContent=t,this.role=n.role,this.type=n.type,this.font=n.font}addMathmlNodes(t){for(let e,r=0;e=t[r];r++)-1===this.mathml.indexOf(e)&&this.mathml.push(e)}appendChild(t){this.childNodes.push(t),this.addMathmlNodes(t.mathml),t.parent=this}replaceChild(t,e){const r=this.childNodes.indexOf(t);if(-1===r)return;t.parent=null,e.parent=this,this.childNodes[r]=e;const n=t.mathml.filter((function(t){return-1===e.mathml.indexOf(t)})),o=e.mathml.filter((function(e){return-1===t.mathml.indexOf(e)}));this.removeMathmlNodes(n),this.addMathmlNodes(o)}appendContentNode(t){t&&(this.contentNodes.push(t),this.addMathmlNodes(t.mathml),t.parent=this)}removeContentNode(t){if(t){const e=this.contentNodes.indexOf(t);-1!==e&&this.contentNodes.slice(e,1)}}equals(t){if(!t)return!1;if(this.type!==t.type||this.role!==t.role||this.textContent!==t.textContent||this.childNodes.length!==t.childNodes.length||this.contentNodes.length!==t.contentNodes.length)return!1;for(let e,r,n=0;e=this.childNodes[n],r=t.childNodes[n];n++)if(!e.equals(r))return!1;for(let e,r,n=0;e=this.contentNodes[n],r=t.contentNodes[n];n++)if(!e.equals(r))return!1;return!0}displayTree(){console.info(this.displayTree_(0))}addAnnotation(t,e){e&&this.addAnnotation_(t,e)}getAnnotation(t){const e=this.annotation[t];return e||[]}hasAnnotation(t,e){const r=this.annotation[t];return!!r&&-1!==r.indexOf(e)}parseAnnotation(t){const e=t.split(";");for(let t=0,r=e.length;t1)return!1;const r=e[0];if("infixop"===r.type){if("implicit"!==r.role)return!1;if(r.childNodes.some((t=>i(t,"infixop"))))return!1}return!0},e.isPrefixFunctionBoundary=function(t){return l(t)&&!a(t,"division")||i(t,"appl")||c(t)},e.isBigOpBoundary=function(t){return l(t)||c(t)},e.isIntegralDxBoundary=function(t,e){return!!e&&i(e,"identifier")&&n.lookupSecondary("d",t.textContent)},e.isIntegralDxBoundarySingle=function(t){if(i(t,"identifier")){const e=t.textContent[0];return e&&t.textContent[1]&&n.lookupSecondary("d",e)}return!1},e.isGeneralFunctionBoundary=c,e.isEmbellished=function(t){return t.embellished?t.embellished:n.isEmbellishedType(t.type)?t.type:null},e.isOperator=l,e.isRelation=u,e.isPunctuation=p,e.isFence=h,e.isElligibleEmbellishedFence=function(t){return!(!t||!h(t))&&(!t.embellished||d(t))},e.isTableOrMultiline=f,e.tableIsMatrixOrVector=function(t){return!!t&&m(t)&&f(t.childNodes[0])},e.isFencedElement=m,e.tableIsCases=function(t,e){return e.length>0&&a(e[e.length-1],"openfence")},e.tableIsMultiline=function(t){return t.childNodes.every((function(t){return t.childNodes.length<=1}))},e.lineIsLabelled=function(t){return i(t,"line")&&t.contentNodes.length&&a(t.contentNodes[0],"label")},e.isBinomial=function(t){return 2===t.childNodes.length},e.isLimitBase=function t(e){return i(e,"largeop")||i(e,"limboth")||i(e,"limlower")||i(e,"limupper")||i(e,"function")&&a(e,"limit function")||(i(e,"overscore")||i(e,"underscore"))&&t(e.childNodes[0])},e.isSimpleFunctionHead=function(t){return"identifier"===t.type||"latinletter"===t.role||"greekletter"===t.role||"otherletter"===t.role},e.singlePunctAtPosition=function(t,e,r){return 1===e.length&&("punctuation"===t[r].type||"punctuation"===t[r].embellished)&&t[r]===e[0]},e.isSimpleFunction=function(t){return i(t,"identifier")&&a(t,"simple function")},e.isLeftBrace=y,e.isRightBrace=g,e.isSetNode=function(t){return y(t.contentNodes[0])&&g(t.contentNodes[1])},e.illegalSingleton_=["punctuation","punctuated","relseq","multirel","table","multiline","cases","inference"],e.scriptedElement_=["limupper","limlower","limboth","subscript","superscript","underscore","overscore","tensor"],e.isSingletonSetContent=function t(r){const n=r.type;return-1===e.illegalSingleton_.indexOf(n)&&("infixop"!==n||"implicit"===r.role)&&("fenced"===n?"leftright"!==r.role||t(r.childNodes[0]):-1===e.scriptedElement_.indexOf(n)||t(r.childNodes[0]))},e.isNumber=b,e.isUnitCounter=function(t){return b(t)||"vulgar"===t.role||"mixed"===t.role},e.isPureUnit=function(t){const e=t.childNodes;return"unit"===t.role&&(!e.length||"unit"===e[0].role)},e.isImplicit=function(t){return"implicit"===t.role||"unit"===t.role&&!!t.contentNodes.length&&t.contentNodes[0].textContent===n.invisibleTimes()},e.isImplicitOp=function(t){return"infixop"===t.type&&"implicit"===t.role},e.isNeutralFence=v,e.compareNeutralFences=function(t,e){return v(t)&&v(e)&&(0,o.getEmbellishedInner)(t).textContent===(0,o.getEmbellishedInner)(e).textContent},e.elligibleLeftNeutral=function(t){return!!v(t)&&(!t.embellished||"superscript"!==t.type&&"subscript"!==t.type&&("tensor"!==t.type||"empty"===t.childNodes[3].type&&"empty"===t.childNodes[4].type))},e.elligibleRightNeutral=function(t){return!!v(t)&&(!t.embellished||("tensor"!==t.type||"empty"===t.childNodes[1].type&&"empty"===t.childNodes[2].type))},e.isMembership=function(t){return["element","nonelement","reelement","renonelement"].includes(t.role)}},3308:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});const n=r(5740),o=r(3588),i=r(7516),s=r(6537),a=r(5609),c=r(4795);class l{constructor(){this.funcAppls={},this.factory_=new s.SemanticNodeFactory,i.updateFactory(this.factory_)}static getInstance(){return l.instance=l.instance||new l,l.instance}static tableToMultiline(t){if(a.tableIsMultiline(t)){t.type="multiline";for(let e,r=0;e=t.childNodes[r];r++)l.rowToLine_(e,"multiline");1===t.childNodes.length&&!a.lineIsLabelled(t.childNodes[0])&&a.isFencedElement(t.childNodes[0].childNodes[0])&&l.tableToMatrixOrVector_(l.rewriteFencedLine_(t)),l.binomialForm_(t),l.classifyMultiline(t)}else l.classifyTable(t)}static number(t){"unknown"!==t.type&&"identifier"!==t.type||(t.type="number"),l.numberRole_(t),l.exprFont_(t)}static classifyMultiline(t){let e=0;const r=t.childNodes.length;let n;for(;e=r)return;const o=n.childNodes[0].role;"unknown"!==o&&t.childNodes.every((function(t){const e=t.childNodes[0];return!e||e.role===o&&(a.isType(e,"relation")||a.isType(e,"relseq"))}))&&(t.role=o)}static classifyTable(t){const e=l.computeColumns_(t);l.classifyByColumns_(t,e,"equality")||l.classifyByColumns_(t,e,"inequality",["equality"])||l.classifyByColumns_(t,e,"arrow")||l.detectCaleyTable(t)}static detectCaleyTable(t){if(!t.mathmlTree)return!1;const e=t.mathmlTree,r=e.getAttribute("columnlines"),n=e.getAttribute("rowlines");return!(!r||!n)&&(!(!l.cayleySpacing(r)||!l.cayleySpacing(n))&&(t.role="cayley",!0))}static cayleySpacing(t){const e=t.split(" ");return("solid"===e[0]||"dashed"===e[0])&&e.slice(1).every((t=>"none"===t))}static proof(t,e,r){const n=l.separateSemantics(e);return l.getInstance().proof(t,n,r)}static findSemantics(t,e,r){const n=null==r?null:r,o=l.getSemantics(t);return!!o&&(!!o[e]&&(null==n||o[e]===n))}static getSemantics(t){const e=t.getAttribute("semantics");return e?l.separateSemantics(e):null}static removePrefix(t){const[,...e]=t.split("_");return e.join("_")}static separateSemantics(t){const e={};return t.split(";").forEach((function(t){const[r,n]=t.split(":");e[l.removePrefix(r)]=n})),e}static matchSpaces_(t,e){for(let r,n=0;r=e[n];n++){const e=t[n].mathmlTree,o=t[n+1].mathmlTree;if(!e||!o)continue;const i=e.nextSibling;if(!i||i===o)continue;const s=l.getSpacer_(i);s&&(r.mathml.push(s),r.mathmlTree=s,r.role="space")}}static getSpacer_(t){if("MSPACE"===n.tagName(t))return t;for(;c.hasEmptyTag(t)&&1===t.childNodes.length;)if(t=t.childNodes[0],"MSPACE"===n.tagName(t))return t;return null}static fenceToPunct_(t){const e=l.FENCE_TO_PUNCT_[t.role];if(e){for(;t.embellished;)t.embellished="punctuation",a.isRole(t,"subsup")||a.isRole(t,"underover")||(t.role=e),t=t.childNodes[0];t.type="punctuation",t.role=e}}static classifyFunction_(t,e){if("appl"===t.type||"bigop"===t.type||"integral"===t.type)return"";if(e[0]&&e[0].textContent===o.functionApplication()){l.getInstance().funcAppls[t.id]=e.shift();let r="simple function";return i.run("simple2prefix",t),"prefix function"!==t.role&&"limit function"!==t.role||(r=t.role),l.propagateFunctionRole_(t,r),"prefix"}const r=l.CLASSIFY_FUNCTION_[t.role];return r||(a.isSimpleFunctionHead(t)?"simple":"")}static propagateFunctionRole_(t,e){if(t){if("infixop"===t.type)return;a.isRole(t,"subsup")||a.isRole(t,"underover")||(t.role=e),l.propagateFunctionRole_(t.childNodes[0],e)}}static getFunctionOp_(t,e){if(e(t))return t;for(let r,n=0;r=t.childNodes[n];n++){const t=l.getFunctionOp_(r,e);if(t)return t}return null}static tableToMatrixOrVector_(t){const e=t.childNodes[0];a.isType(e,"multiline")?l.tableToVector_(t):l.tableToMatrix_(t),t.contentNodes.forEach(e.appendContentNode.bind(e));for(let t,r=0;t=e.childNodes[r];r++)l.assignRoleToRow_(t,l.getComponentRoles_(e));return e.parent=null,e}static tableToVector_(t){const e=t.childNodes[0];e.type="vector",1!==e.childNodes.length?l.binomialForm_(e):l.tableToSquare_(t)}static binomialForm_(t){a.isBinomial(t)&&(t.role="binomial",t.childNodes[0].role="binomial",t.childNodes[1].role="binomial")}static tableToMatrix_(t){const e=t.childNodes[0];e.type="matrix",e.childNodes&&e.childNodes.length>0&&e.childNodes[0].childNodes&&e.childNodes.length===e.childNodes[0].childNodes.length?l.tableToSquare_(t):e.childNodes&&1===e.childNodes.length&&(e.role="rowvector")}static tableToSquare_(t){const e=t.childNodes[0];a.isNeutralFence(t)?e.role="determinant":e.role="squarematrix"}static getComponentRoles_(t){const e=t.role;return e&&"unknown"!==e?e:t.type.toLowerCase()||"unknown"}static tableToCases_(t,e){for(let e,r=0;e=t.childNodes[r];r++)l.assignRoleToRow_(e,"cases");return t.type="cases",t.appendContentNode(e),a.tableIsMultiline(t)&&l.binomialForm_(t),t}static rewriteFencedLine_(t){const e=t.childNodes[0],r=t.childNodes[0].childNodes[0],n=t.childNodes[0].childNodes[0].childNodes[0];return r.parent=t.parent,t.parent=r,n.parent=e,r.childNodes=[t],e.childNodes=[n],r}static rowToLine_(t,e){const r=e||"unknown";a.isType(t,"row")&&(t.type="line",t.role=r,1===t.childNodes.length&&a.isType(t.childNodes[0],"cell")&&(t.childNodes=t.childNodes[0].childNodes,t.childNodes.forEach((function(e){e.parent=t}))))}static assignRoleToRow_(t,e){a.isType(t,"line")?t.role=e:a.isType(t,"row")&&(t.role=e,t.childNodes.forEach((function(t){a.isType(t,"cell")&&(t.role=e)})))}static nextSeparatorFunction_(t){let e;if(t){if(t.match(/^\s+$/))return null;e=t.replace(/\s/g,"").split("").filter((function(t){return t}))}else e=[","];return function(){return e.length>1?e.shift():e[0]}}static numberRole_(t){if("unknown"!==t.role)return;const e=[...t.textContent].filter((t=>t.match(/[^\s]/))),r=e.map(o.lookupMeaning);if(r.every((function(t){return"number"===t.type&&"integer"===t.role||"punctuation"===t.type&&"comma"===t.role})))return t.role="integer",void("0"===e[0]&&t.addAnnotation("general","basenumber"));r.every((function(t){return"number"===t.type&&"integer"===t.role||"punctuation"===t.type}))?t.role="float":t.role="othernumber"}static exprFont_(t){if("unknown"!==t.font)return;const e=[...t.textContent].map(o.lookupMeaning).reduce((function(t,e){return t&&e.font&&"unknown"!==e.font&&e.font!==t?"unknown"===t?e.font:null:t}),"unknown");e&&(t.font=e)}static purgeFences_(t){const e=t.rel,r=t.comp,n=[],o=[];for(;e.length>0;){const t=e.shift();let i=r.shift();a.isElligibleEmbellishedFence(t)?(n.push(t),o.push(i)):(l.fenceToPunct_(t),i.push(t),i=i.concat(r.shift()),r.unshift(i))}return o.push(r.shift()),{rel:n,comp:o}}static rewriteFencedNode_(t){const e=t.contentNodes[0],r=t.contentNodes[1];let n=l.rewriteFence_(t,e);return t.contentNodes[0]=n.fence,n=l.rewriteFence_(n.node,r),t.contentNodes[1]=n.fence,t.contentNodes[0].parent=t,t.contentNodes[1].parent=t,n.node.parent=null,n.node}static rewriteFence_(t,e){if(!e.embellished)return{node:t,fence:e};const r=e.childNodes[0],n=l.rewriteFence_(t,r);return a.isType(e,"superscript")||a.isType(e,"subscript")||a.isType(e,"tensor")?(a.isRole(e,"subsup")||(e.role=t.role),r!==n.node&&(e.replaceChild(r,n.node),r.parent=t),l.propagateFencePointer_(e,r),{node:e,fence:n.fence}):(e.replaceChild(r,n.fence),e.mathmlTree&&-1===e.mathml.indexOf(e.mathmlTree)&&e.mathml.push(e.mathmlTree),{node:n.node,fence:e})}static propagateFencePointer_(t,e){t.fencePointer=e.fencePointer||e.id.toString(),t.embellished=null}static classifyByColumns_(t,e,r,n){return!!(3===e.length&&l.testColumns_(e,1,(t=>l.isPureRelation_(t,r)))||2===e.length&&(l.testColumns_(e,1,(t=>l.isEndRelation_(t,r)||l.isPureRelation_(t,r)))||l.testColumns_(e,0,(t=>l.isEndRelation_(t,r,!0)||l.isPureRelation_(t,r)))))&&(t.role=r,!0)}static isEndRelation_(t,e,r){const n=r?t.childNodes.length-1:0;return a.isType(t,"relseq")&&a.isRole(t,e)&&a.isType(t.childNodes[n],"empty")}static isPureRelation_(t,e){return a.isType(t,"relation")&&a.isRole(t,e)}static computeColumns_(t){const e=[];for(let r,n=0;r=t.childNodes[n];n++)for(let t,n=0;t=r.childNodes[n];n++){e[n]?e[n].push(t):e[n]=[t]}return e}static testColumns_(t,e,r){const n=t[e];return!!n&&(n.some((function(t){return t.childNodes.length&&r(t.childNodes[0])}))&&n.every((function(t){return!t.childNodes.length||r(t.childNodes[0])})))}setNodeFactory(t){l.getInstance().factory_=t,i.updateFactory(l.getInstance().factory_)}getNodeFactory(){return l.getInstance().factory_}identifierNode(t,e,r){if("MathML-Unit"===r)t.type="identifier",t.role="unit";else if(!e&&1===t.textContent.length&&("integer"===t.role||"latinletter"===t.role||"greekletter"===t.role)&&"normal"===t.font)return t.font="italic",i.run("simpleNamedFunction",t);return"unknown"===t.type&&(t.type="identifier"),l.exprFont_(t),i.run("simpleNamedFunction",t)}implicitNode(t){if(t=l.getInstance().getMixedNumbers_(t),1===(t=l.getInstance().combineUnits_(t)).length)return t[0];const e=l.getInstance().implicitNode_(t);return i.run("combine_juxtaposition",e)}text(t,e){return l.exprFont_(t),t.type="text","MS"===e?(t.role="string",t):"MSPACE"===e||t.textContent.match(/^\s*$/)?(t.role="space",t):t}row(t){return 0===(t=t.filter((function(t){return!a.isType(t,"empty")}))).length?l.getInstance().factory_.makeEmptyNode():(t=l.getInstance().getFencesInRow_(t),t=l.getInstance().tablesInRow(t),t=l.getInstance().getPunctuationInRow_(t),t=l.getInstance().getTextInRow_(t),t=l.getInstance().getFunctionsInRow_(t),l.getInstance().relationsInRow_(t))}limitNode(t,e){if(!e.length)return l.getInstance().factory_.makeEmptyNode();let r,n=e[0],o="unknown";if(!e[1])return n;if(a.isLimitBase(n)){r=l.MML_TO_LIMIT_[t];const i=r.length;if(o=r.type,e=e.slice(0,r.length+1),1===i&&a.isAccent(e[1])||2===i&&a.isAccent(e[1])&&a.isAccent(e[2]))return r=l.MML_TO_BOUNDS_[t],l.getInstance().accentNode_(n,e,r.type,r.length,r.accent);if(2===i){if(a.isAccent(e[1]))return n=l.getInstance().accentNode_(n,[n,e[1]],{MSUBSUP:"subscript",MUNDEROVER:"underscore"}[t],1,!0),e[2]?l.getInstance().makeLimitNode_(n,[n,e[2]],null,"limupper"):n;if(e[2]&&a.isAccent(e[2]))return n=l.getInstance().accentNode_(n,[n,e[2]],{MSUBSUP:"superscript",MUNDEROVER:"overscore"}[t],1,!0),l.getInstance().makeLimitNode_(n,[n,e[1]],null,"limlower");e[i]||(o="limlower")}return l.getInstance().makeLimitNode_(n,e,null,o)}return r=l.MML_TO_BOUNDS_[t],l.getInstance().accentNode_(n,e,r.type,r.length,r.accent)}tablesInRow(t){let e=c.partitionNodes(t,a.tableIsMatrixOrVector),r=[];for(let t,n=0;t=e.rel[n];n++)r=r.concat(e.comp.shift()),r.push(l.tableToMatrixOrVector_(t));r=r.concat(e.comp.shift()),e=c.partitionNodes(r,a.isTableOrMultiline),r=[];for(let t,n=0;t=e.rel[n];n++){const n=e.comp.shift();a.tableIsCases(t,n)&&l.tableToCases_(t,n.pop()),r=r.concat(n),r.push(t)}return r.concat(e.comp.shift())}mfenced(t,e,r,n){if(r&&n.length>0){const t=l.nextSeparatorFunction_(r),e=[n.shift()];n.forEach((r=>{e.push(l.getInstance().factory_.makeContentNode(t())),e.push(r)})),n=e}return t&&e?l.getInstance().horizontalFencedNode_(l.getInstance().factory_.makeContentNode(t),l.getInstance().factory_.makeContentNode(e),n):(t&&n.unshift(l.getInstance().factory_.makeContentNode(t)),e&&n.push(l.getInstance().factory_.makeContentNode(e)),l.getInstance().row(n))}fractionLikeNode(t,e,r,n){let o;if(!n&&c.isZeroLength(r)){const r=l.getInstance().factory_.makeBranchNode("line",[t],[]),n=l.getInstance().factory_.makeBranchNode("line",[e],[]);return o=l.getInstance().factory_.makeBranchNode("multiline",[r,n],[]),l.binomialForm_(o),l.classifyMultiline(o),o}return o=l.getInstance().fractionNode_(t,e),n&&o.addAnnotation("general","bevelled"),o}tensor(t,e,r,n,o){const i=l.getInstance().factory_.makeBranchNode("tensor",[t,l.getInstance().scriptNode_(e,"leftsub"),l.getInstance().scriptNode_(r,"leftsuper"),l.getInstance().scriptNode_(n,"rightsub"),l.getInstance().scriptNode_(o,"rightsuper")],[]);return i.role=t.role,i.embellished=a.isEmbellished(t),i}pseudoTensor(t,e,r){const n=t=>!a.isType(t,"empty"),o=e.filter(n).length,i=r.filter(n).length;if(!o&&!i)return t;const s=o?i?"MSUBSUP":"MSUB":"MSUP",c=[t];return o&&c.push(l.getInstance().scriptNode_(e,"rightsub",!0)),i&&c.push(l.getInstance().scriptNode_(r,"rightsuper",!0)),l.getInstance().limitNode(s,c)}font(t){const e=l.MATHJAX_FONTS[t];return e||t}proof(t,e,r){if(e.inference||e.axiom||console.log("Noise"),e.axiom){const e=l.getInstance().cleanInference(t.childNodes),n=e.length?l.getInstance().factory_.makeBranchNode("inference",r(e),[]):l.getInstance().factory_.makeEmptyNode();return n.role="axiom",n.mathmlTree=t,n}const n=l.getInstance().inference(t,e,r);return e.proof&&(n.role="proof",n.childNodes[0].role="final"),n}inference(t,e,r){if(e.inferenceRule){const e=l.getInstance().getFormulas(t,[],r);return l.getInstance().factory_.makeBranchNode("inference",[e.conclusion,e.premises],[])}const o=e.labelledRule,i=n.toArray(t.childNodes),s=[];"left"!==o&&"both"!==o||s.push(l.getInstance().getLabel(t,i,r,"left")),"right"!==o&&"both"!==o||s.push(l.getInstance().getLabel(t,i,r,"right"));const a=l.getInstance().getFormulas(t,i,r),c=l.getInstance().factory_.makeBranchNode("inference",[a.conclusion,a.premises],s);return c.mathmlTree=t,c}getLabel(t,e,r,o){const i=l.getInstance().findNestedRow(e,"prooflabel",o),s=l.getInstance().factory_.makeBranchNode("rulelabel",r(n.toArray(i.childNodes)),[]);return s.role=o,s.mathmlTree=i,s}getFormulas(t,e,r){const o=e.length?l.getInstance().findNestedRow(e,"inferenceRule"):t,i="up"===l.getSemantics(o).inferenceRule,s=i?o.childNodes[1]:o.childNodes[0],a=i?o.childNodes[0]:o.childNodes[1],c=s.childNodes[0].childNodes[0],u=n.toArray(c.childNodes[0].childNodes),p=[];let h=1;for(const t of u)h%2&&p.push(t.childNodes[0]),h++;const d=r(p),f=r(n.toArray(a.childNodes[0].childNodes))[0],m=l.getInstance().factory_.makeBranchNode("premises",d,[]);m.mathmlTree=c;const y=l.getInstance().factory_.makeBranchNode("conclusion",[f],[]);return y.mathmlTree=a.childNodes[0].childNodes[0],{conclusion:y,premises:m}}findNestedRow(t,e,r){return l.getInstance().findNestedRow_(t,e,0,r)}cleanInference(t){return n.toArray(t).filter((function(t){return"MSPACE"!==n.tagName(t)}))}operatorNode(t){return"unknown"===t.type&&(t.type="operator"),i.run("multioperator",t)}implicitNode_(t){const e=l.getInstance().factory_.makeMultipleContentNodes(t.length-1,o.invisibleTimes());l.matchSpaces_(t,e);const r=l.getInstance().infixNode_(t,e[0]);return r.role="implicit",e.forEach((function(t){t.parent=r})),r.contentNodes=e,r}infixNode_(t,e){const r=l.getInstance().factory_.makeBranchNode("infixop",t,[e],c.getEmbellishedInner(e).textContent);return r.role=e.role,i.run("propagateSimpleFunction",r)}explicitMixed_(t){const e=c.partitionNodes(t,(function(t){return t.textContent===o.invisiblePlus()}));if(!e.rel.length)return t;let r=[];for(let t,n=0;t=e.rel[n];n++){const o=e.comp[n],i=e.comp[n+1],s=o.length-1;if(o[s]&&i[0]&&a.isType(o[s],"number")&&!a.isRole(o[s],"mixed")&&a.isType(i[0],"fraction")){const t=l.getInstance().factory_.makeBranchNode("number",[o[s],i[0]],[]);t.role="mixed",r=r.concat(o.slice(0,s)),r.push(t),i.shift()}else r=r.concat(o),r.push(t)}return r.concat(e.comp[e.comp.length-1])}concatNode_(t,e,r){if(0===e.length)return t;const n=e.map((function(t){return c.getEmbellishedInner(t).textContent})).join(" "),o=l.getInstance().factory_.makeBranchNode(r,[t],e,n);return e.length>1&&(o.role="multiop"),o}prefixNode_(t,e){const r=c.partitionNodes(e,(t=>a.isRole(t,"subtraction")));let n=l.getInstance().concatNode_(t,r.comp.pop(),"prefixop");for(1===n.contentNodes.length&&"addition"===n.contentNodes[0].role&&"+"===n.contentNodes[0].textContent&&(n.role="positive");r.rel.length>0;)n=l.getInstance().concatNode_(n,[r.rel.pop()],"prefixop"),n.role="negative",n=l.getInstance().concatNode_(n,r.comp.pop(),"prefixop");return n}postfixNode_(t,e){return e.length?l.getInstance().concatNode_(t,e,"postfixop"):t}combineUnits_(t){const e=c.partitionNodes(t,(function(t){return!a.isRole(t,"unit")}));if(t.length===e.rel.length)return e.rel;const r=[];let n,o;do{const t=e.comp.shift();n=e.rel.shift();let i=null;o=r.pop(),o&&(t.length&&a.isUnitCounter(o)?t.unshift(o):r.push(o)),1===t.length&&(i=t.pop()),t.length>1&&(i=l.getInstance().implicitNode_(t),i.role="unit"),i&&r.push(i),n&&r.push(n)}while(n);return r}getMixedNumbers_(t){const e=c.partitionNodes(t,(function(t){return a.isType(t,"fraction")&&a.isRole(t,"vulgar")}));if(!e.rel.length)return t;let r=[];for(let t,n=0;t=e.rel[n];n++){const o=e.comp[n],i=o.length-1;if(o[i]&&a.isType(o[i],"number")&&(a.isRole(o[i],"integer")||a.isRole(o[i],"float"))){const e=l.getInstance().factory_.makeBranchNode("number",[o[i],t],[]);e.role="mixed",r=r.concat(o.slice(0,i)),r.push(e)}else r=r.concat(o),r.push(t)}return r.concat(e.comp[e.comp.length-1])}getTextInRow_(t){if(t.length<=1)return t;const e=c.partitionNodes(t,(t=>a.isType(t,"text")));if(0===e.rel.length)return t;const r=[];let n=e.comp[0];n.length>0&&r.push(l.getInstance().row(n));for(let t,o=0;t=e.rel[o];o++)r.push(t),n=e.comp[o+1],n.length>0&&r.push(l.getInstance().row(n));return[l.getInstance().dummyNode_(r)]}relationsInRow_(t){const e=c.partitionNodes(t,a.isRelation),r=e.rel[0];if(!r)return l.getInstance().operationsInRow_(t);if(1===t.length)return t[0];const n=e.comp.map(l.getInstance().operationsInRow_);let o;return e.rel.some((function(t){return!t.equals(r)}))?(o=l.getInstance().factory_.makeBranchNode("multirel",n,e.rel),e.rel.every((function(t){return t.role===r.role}))&&(o.role=r.role),o):(o=l.getInstance().factory_.makeBranchNode("relseq",n,e.rel,c.getEmbellishedInner(r).textContent),o.role=r.role,o)}operationsInRow_(t){if(0===t.length)return l.getInstance().factory_.makeEmptyNode();if(1===(t=l.getInstance().explicitMixed_(t)).length)return t[0];const e=[];for(;t.length>0&&a.isOperator(t[0]);)e.push(t.shift());if(0===t.length)return l.getInstance().prefixNode_(e.pop(),e);if(1===t.length)return l.getInstance().prefixNode_(t[0],e);t=i.run("convert_juxtaposition",t);const r=c.sliceNodes(t,a.isOperator),n=l.getInstance().prefixNode_(l.getInstance().implicitNode(r.head),e);return r.div?l.getInstance().operationsTree_(r.tail,n,r.div):n}operationsTree_(t,e,r,n){const o=n||[];if(0===t.length){if(o.unshift(r),"infixop"===e.type){const t=l.getInstance().postfixNode_(e.childNodes.pop(),o);return e.appendChild(t),e}return l.getInstance().postfixNode_(e,o)}const i=c.sliceNodes(t,a.isOperator);if(0===i.head.length)return o.push(i.div),l.getInstance().operationsTree_(i.tail,e,r,o);const s=l.getInstance().prefixNode_(l.getInstance().implicitNode(i.head),o),u=l.getInstance().appendOperand_(e,r,s);return i.div?l.getInstance().operationsTree_(i.tail,u,i.div,[]):u}appendOperand_(t,e,r){if("infixop"!==t.type)return l.getInstance().infixNode_([t,r],e);const n=l.getInstance().appendDivisionOp_(t,e,r);return n||(l.getInstance().appendExistingOperator_(t,e,r)?t:"multiplication"===e.role?l.getInstance().appendMultiplicativeOp_(t,e,r):l.getInstance().appendAdditiveOp_(t,e,r))}appendDivisionOp_(t,e,r){return"division"===e.role?a.isImplicit(t)?l.getInstance().infixNode_([t,r],e):l.getInstance().appendLastOperand_(t,e,r):"division"===t.role?l.getInstance().infixNode_([t,r],e):null}appendLastOperand_(t,e,r){let n=t,o=t.childNodes[t.childNodes.length-1];for(;o&&"infixop"===o.type&&!a.isImplicit(o);)n=o,o=n.childNodes[t.childNodes.length-1];const i=l.getInstance().infixNode_([n.childNodes.pop(),r],e);return n.appendChild(i),t}appendMultiplicativeOp_(t,e,r){if(a.isImplicit(t))return l.getInstance().infixNode_([t,r],e);let n=t,o=t.childNodes[t.childNodes.length-1];for(;o&&"infixop"===o.type&&!a.isImplicit(o);)n=o,o=n.childNodes[t.childNodes.length-1];const i=l.getInstance().infixNode_([n.childNodes.pop(),r],e);return n.appendChild(i),t}appendAdditiveOp_(t,e,r){return l.getInstance().infixNode_([t,r],e)}appendExistingOperator_(t,e,r){return!(!t||"infixop"!==t.type||a.isImplicit(t))&&(t.contentNodes[0].equals(e)?(t.appendContentNode(e),t.appendChild(r),!0):l.getInstance().appendExistingOperator_(t.childNodes[t.childNodes.length-1],e,r))}getFencesInRow_(t){let e=c.partitionNodes(t,a.isFence);e=l.purgeFences_(e);const r=e.comp.shift();return l.getInstance().fences_(e.rel,e.comp,[],[r])}fences_(t,e,r,n){if(0===t.length&&0===r.length)return n[0];const o=t=>a.isRole(t,"open");if(0===t.length){const t=n.shift();for(;r.length>0;){if(o(r[0])){const e=r.shift();l.fenceToPunct_(e),t.push(e)}else{const e=c.sliceNodes(r,o),i=e.head.length-1,s=l.getInstance().neutralFences_(e.head,n.slice(0,i));n=n.slice(i),t.push(...s),e.div&&e.tail.unshift(e.div),r=e.tail}t.push(...n.shift())}return t}const i=r[r.length-1],s=t[0].role;if("open"===s||a.isNeutralFence(t[0])&&(!i||!a.compareNeutralFences(t[0],i))){r.push(t.shift());const o=e.shift();return o&&n.push(o),l.getInstance().fences_(t,e,r,n)}if(i&&"close"===s&&"open"===i.role){const o=l.getInstance().horizontalFencedNode_(r.pop(),t.shift(),n.pop());return n.push(n.pop().concat([o],e.shift())),l.getInstance().fences_(t,e,r,n)}if(i&&a.compareNeutralFences(t[0],i)){if(!a.elligibleLeftNeutral(i)||!a.elligibleRightNeutral(t[0])){r.push(t.shift());const o=e.shift();return o&&n.push(o),l.getInstance().fences_(t,e,r,n)}const o=l.getInstance().horizontalFencedNode_(r.pop(),t.shift(),n.pop());return n.push(n.pop().concat([o],e.shift())),l.getInstance().fences_(t,e,r,n)}if(i&&"close"===s&&a.isNeutralFence(i)&&r.some(o)){const i=c.sliceNodes(r,o,!0),s=n.pop(),a=n.length-i.tail.length+1,u=l.getInstance().neutralFences_(i.tail,n.slice(a));n=n.slice(0,a);const p=l.getInstance().horizontalFencedNode_(i.div,t.shift(),n.pop().concat(u,s));return n.push(n.pop().concat([p],e.shift())),l.getInstance().fences_(t,e,i.head,n)}const u=t.shift();return l.fenceToPunct_(u),n.push(n.pop().concat([u],e.shift())),l.getInstance().fences_(t,e,r,n)}neutralFences_(t,e){if(0===t.length)return t;if(1===t.length)return l.fenceToPunct_(t[0]),t;const r=t.shift();if(!a.elligibleLeftNeutral(r)){l.fenceToPunct_(r);const n=e.shift();return n.unshift(r),n.concat(l.getInstance().neutralFences_(t,e))}const n=c.sliceNodes(t,(function(t){return a.compareNeutralFences(t,r)}));if(!n.div){l.fenceToPunct_(r);const n=e.shift();return n.unshift(r),n.concat(l.getInstance().neutralFences_(t,e))}if(!a.elligibleRightNeutral(n.div))return l.fenceToPunct_(n.div),t.unshift(r),l.getInstance().neutralFences_(t,e);const o=l.getInstance().combineFencedContent_(r,n.div,n.head,e);if(n.tail.length>0){const t=o.shift(),e=l.getInstance().neutralFences_(n.tail,o);return t.concat(e)}return o[0]}combineFencedContent_(t,e,r,n){if(0===r.length){const r=l.getInstance().horizontalFencedNode_(t,e,n.shift());return n.length>0?n[0].unshift(r):n=[[r]],n}const o=n.shift(),i=r.length-1,s=n.slice(0,i),a=(n=n.slice(i)).shift(),c=l.getInstance().neutralFences_(r,s);o.push(...c),o.push(...a);const u=l.getInstance().horizontalFencedNode_(t,e,o);return n.length>0?n[0].unshift(u):n=[[u]],n}horizontalFencedNode_(t,e,r){const n=l.getInstance().row(r);let o=l.getInstance().factory_.makeBranchNode("fenced",[n],[t,e]);return"open"===t.role?(l.getInstance().classifyHorizontalFence_(o),o=i.run("propagateComposedFunction",o)):o.role=t.role,o=i.run("detect_cycle",o),l.rewriteFencedNode_(o)}classifyHorizontalFence_(t){t.role="leftright";const e=t.childNodes;if(!a.isSetNode(t)||e.length>1)return;if(0===e.length||"empty"===e[0].type)return void(t.role="set empty");const r=e[0].type;if(1===e.length&&a.isSingletonSetContent(e[0]))return void(t.role="set singleton");const n=e[0].role;if("punctuated"===r&&"sequence"===n){if("comma"!==e[0].contentNodes[0].role)return 1!==e[0].contentNodes.length||"vbar"!==e[0].contentNodes[0].role&&"colon"!==e[0].contentNodes[0].role?void 0:(t.role="set extended",void l.getInstance().setExtension_(t));t.role="set collection"}}setExtension_(t){const e=t.childNodes[0].childNodes[0];e&&"infixop"===e.type&&1===e.contentNodes.length&&a.isMembership(e.contentNodes[0])&&(e.addAnnotation("set","intensional"),e.contentNodes[0].addAnnotation("set","intensional"))}getPunctuationInRow_(t){if(t.length<=1)return t;const e=t=>{const e=t.type;return"punctuation"===e||"text"===e||"operator"===e||"relation"===e},r=c.partitionNodes(t,(function(r){if(!a.isPunctuation(r))return!1;if(a.isPunctuation(r)&&!a.isRole(r,"ellipsis"))return!0;const n=t.indexOf(r);if(0===n)return!t[1]||!e(t[1]);const o=t[n-1];if(n===t.length-1)return!e(o);const i=t[n+1];return!e(o)||!e(i)}));if(0===r.rel.length)return t;const n=[];let o=r.comp.shift();o.length>0&&n.push(l.getInstance().row(o));let i=0;for(;r.comp.length>0;)n.push(r.rel[i++]),o=r.comp.shift(),o.length>0&&n.push(l.getInstance().row(o));return[l.getInstance().punctuatedNode_(n,r.rel)]}punctuatedNode_(t,e){const r=l.getInstance().factory_.makeBranchNode("punctuated",t,e);if(e.length===t.length){const t=e[0].role;if("unknown"!==t&&e.every((function(e){return e.role===t})))return r.role=t,r}return a.singlePunctAtPosition(t,e,0)?r.role="startpunct":a.singlePunctAtPosition(t,e,t.length-1)?r.role="endpunct":e.every((t=>a.isRole(t,"dummy")))?r.role="text":e.every((t=>a.isRole(t,"space")))?r.role="space":r.role="sequence",r}dummyNode_(t){const e=l.getInstance().factory_.makeMultipleContentNodes(t.length-1,o.invisibleComma());return e.forEach((function(t){t.role="dummy"})),l.getInstance().punctuatedNode_(t,e)}accentRole_(t,e){if(!a.isAccent(t))return!1;const r=t.textContent,n=o.lookupSecondary("bar",r)||o.lookupSecondary("tilde",r)||t.role;return t.role="underscore"===e?"underaccent":"overaccent",t.addAnnotation("accent",n),!0}accentNode_(t,e,r,n,o){const i=(e=e.slice(0,n+1))[1],s=e[2];let a;if(!o&&s&&(a=l.getInstance().factory_.makeBranchNode("subscript",[t,i],[]),a.role="subsup",e=[a,s],r="superscript"),o){const n=l.getInstance().accentRole_(i,r);if(s){l.getInstance().accentRole_(s,"overscore")&&!n?(a=l.getInstance().factory_.makeBranchNode("overscore",[t,s],[]),e=[a,i],r="underscore"):(a=l.getInstance().factory_.makeBranchNode("underscore",[t,i],[]),e=[a,s],r="overscore"),a.role="underover"}}return l.getInstance().makeLimitNode_(t,e,a,r)}makeLimitNode_(t,e,r,n){if("limupper"===n&&"limlower"===t.type)return t.childNodes.push(e[1]),e[1].parent=t,t.type="limboth",t;if("limlower"===n&&"limupper"===t.type)return t.childNodes.splice(1,-1,e[1]),e[1].parent=t,t.type="limboth",t;const o=l.getInstance().factory_.makeBranchNode(n,e,[]),i=a.isEmbellished(t);return r&&(r.embellished=i),o.embellished=i,o.role=t.role,o}getFunctionsInRow_(t,e){const r=e||[];if(0===t.length)return r;const n=t.shift(),o=l.classifyFunction_(n,t);if(!o)return r.push(n),l.getInstance().getFunctionsInRow_(t,r);const i=l.getInstance().getFunctionsInRow_(t,[]),s=l.getInstance().getFunctionArgs_(n,i,o);return r.concat(s)}getFunctionArgs_(t,e,r){let n,o,i;switch(r){case"integral":{const r=l.getInstance().getIntegralArgs_(e);if(!r.intvar&&!r.integrand.length)return r.rest.unshift(t),r.rest;const n=l.getInstance().row(r.integrand);return i=l.getInstance().integralNode_(t,n,r.intvar),r.rest.unshift(i),r.rest}case"prefix":if(e[0]&&"fenced"===e[0].type){const r=e.shift();return a.isNeutralFence(r)||(r.role="leftright"),i=l.getInstance().functionNode_(t,r),e.unshift(i),e}if(n=c.sliceNodes(e,a.isPrefixFunctionBoundary),n.head.length)o=l.getInstance().row(n.head),n.div&&n.tail.unshift(n.div);else{if(!n.div||!a.isType(n.div,"appl"))return e.unshift(t),e;o=n.div}return i=l.getInstance().functionNode_(t,o),n.tail.unshift(i),n.tail;case"bigop":return n=c.sliceNodes(e,a.isBigOpBoundary),n.head.length?(o=l.getInstance().row(n.head),i=l.getInstance().bigOpNode_(t,o),n.div&&n.tail.unshift(n.div),n.tail.unshift(i),n.tail):(e.unshift(t),e);default:{if(0===e.length)return[t];const r=e[0];return"fenced"===r.type&&!a.isNeutralFence(r)&&a.isSimpleFunctionScope(r)?(r.role="leftright",l.propagateFunctionRole_(t,"simple function"),i=l.getInstance().functionNode_(t,e.shift()),e.unshift(i),e):(e.unshift(t),e)}}}getIntegralArgs_(t,e=[]){if(0===t.length)return{integrand:e,intvar:null,rest:t};const r=t[0];if(a.isGeneralFunctionBoundary(r))return{integrand:e,intvar:null,rest:t};if(a.isIntegralDxBoundarySingle(r))return r.role="integral",{integrand:e,intvar:r,rest:t.slice(1)};if(t[1]&&a.isIntegralDxBoundary(r,t[1])){const n=l.getInstance().prefixNode_(t[1],[r]);return n.role="integral",{integrand:e,intvar:n,rest:t.slice(2)}}return e.push(t.shift()),l.getInstance().getIntegralArgs_(t,e)}functionNode_(t,e){const r=l.getInstance().factory_.makeContentNode(o.functionApplication()),n=l.getInstance().funcAppls[t.id];n&&(r.mathmlTree=n.mathmlTree,r.mathml=n.mathml,r.annotation=n.annotation,r.attributes=n.attributes,delete l.getInstance().funcAppls[t.id]),r.type="punctuation",r.role="application";const i=l.getFunctionOp_(t,(function(t){return a.isType(t,"function")||a.isType(t,"identifier")&&a.isRole(t,"simple function")}));return l.getInstance().functionalNode_("appl",[t,e],i,[r])}bigOpNode_(t,e){const r=l.getFunctionOp_(t,(t=>a.isType(t,"largeop")));return l.getInstance().functionalNode_("bigop",[t,e],r,[])}integralNode_(t,e,r){e=e||l.getInstance().factory_.makeEmptyNode(),r=r||l.getInstance().factory_.makeEmptyNode();const n=l.getFunctionOp_(t,(t=>a.isType(t,"largeop")));return l.getInstance().functionalNode_("integral",[t,e,r],n,[])}functionalNode_(t,e,r,n){const o=e[0];let i;r&&(i=r.parent,n.push(r));const s=l.getInstance().factory_.makeBranchNode(t,e,n);return s.role=o.role,i&&(r.parent=i),s}fractionNode_(t,e){const r=l.getInstance().factory_.makeBranchNode("fraction",[t,e],[]);return r.role=r.childNodes.every((function(t){return a.isType(t,"number")&&a.isRole(t,"integer")}))?"vulgar":r.childNodes.every(a.isPureUnit)?"unit":"division",i.run("propagateSimpleFunction",r)}scriptNode_(t,e,r){let n;switch(t.length){case 0:n=l.getInstance().factory_.makeEmptyNode();break;case 1:if(n=t[0],r)return n;break;default:n=l.getInstance().dummyNode_(t)}return n.role=e,n}findNestedRow_(t,e,r,o){if(r>3)return null;for(let i,s=0;i=t[s];s++){const t=n.tagName(i);if("MSPACE"!==t){if("MROW"===t)return l.getInstance().findNestedRow_(n.toArray(i.childNodes),e,r+1,o);if(l.findSemantics(i,e,o))return i}}return null}}e.default=l,l.FENCE_TO_PUNCT_={metric:"metric",neutral:"vbar",open:"openfence",close:"closefence"},l.MML_TO_LIMIT_={MSUB:{type:"limlower",length:1},MUNDER:{type:"limlower",length:1},MSUP:{type:"limupper",length:1},MOVER:{type:"limupper",length:1},MSUBSUP:{type:"limboth",length:2},MUNDEROVER:{type:"limboth",length:2}},l.MML_TO_BOUNDS_={MSUB:{type:"subscript",length:1,accent:!1},MSUP:{type:"superscript",length:1,accent:!1},MSUBSUP:{type:"subscript",length:2,accent:!1},MUNDER:{type:"underscore",length:1,accent:!0},MOVER:{type:"overscore",length:1,accent:!0},MUNDEROVER:{type:"underscore",length:2,accent:!0}},l.CLASSIFY_FUNCTION_={integral:"integral",sum:"bigop","prefix function":"prefix","limit function":"prefix","simple function":"prefix","composed function":"prefix"},l.MATHJAX_FONTS={"-tex-caligraphic":"caligraphic","-tex-caligraphic-bold":"caligraphic-bold","-tex-calligraphic":"caligraphic","-tex-calligraphic-bold":"caligraphic-bold","-tex-oldstyle":"oldstyle","-tex-oldstyle-bold":"oldstyle-bold","-tex-mathit":"italic"}},5656:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticSkeleton=void 0;const n=r(707),o=r(5274),i=r(2298);class s{constructor(t){this.parents=null,this.levelsMap=null,t=0===t?t:t||[],this.array=t}static fromTree(t){return s.fromNode(t.root)}static fromNode(t){return new s(s.fromNode_(t))}static fromString(t){return new s(s.fromString_(t))}static simpleCollapseStructure(t){return"number"==typeof t}static contentCollapseStructure(t){return!!t&&!s.simpleCollapseStructure(t)&&"c"===t[0]}static interleaveIds(t,e){return n.interleaveLists(s.collapsedLeafs(t),s.collapsedLeafs(e))}static collapsedLeafs(...t){return t.reduce(((t,e)=>{return t.concat((r=e,s.simpleCollapseStructure(r)?[r]:(r=r,s.contentCollapseStructure(r[1])?r.slice(2):r.slice(1))));var r}),[])}static fromStructure(t,e){return new s(s.tree_(t,e.root))}static combineContentChildren(t,e,r){switch(t.type){case"relseq":case"infixop":case"multirel":return n.interleaveLists(r,e);case"prefixop":return e.concat(r);case"postfixop":return r.concat(e);case"fenced":return r.unshift(e[0]),r.push(e[1]),r;case"appl":return[r[0],e[0],r[1]];case"root":return[r[1],r[0]];case"row":case"line":return e.length&&r.unshift(e[0]),r;default:return r}}static makeSexp_(t){return s.simpleCollapseStructure(t)?t.toString():s.contentCollapseStructure(t)?"(c "+t.slice(1).map(s.makeSexp_).join(" ")+")":"("+t.map(s.makeSexp_).join(" ")+")"}static fromString_(t){let e=t.replace(/\(/g,"[");return e=e.replace(/\)/g,"]"),e=e.replace(/ /g,","),e=e.replace(/c/g,'"c"'),JSON.parse(e)}static fromNode_(t){if(!t)return[];const e=t.contentNodes;let r;e.length&&(r=e.map(s.fromNode_),r.unshift("c"));const n=t.childNodes;if(!n.length)return e.length?[t.id,r]:t.id;const o=n.map(s.fromNode_);return e.length&&o.unshift(r),o.unshift(t.id),o}static tree_(t,e){if(!e)return[];if(!e.childNodes.length)return e.id;const r=e.id,n=[r],a=o.evalXPath(`.//self::*[@${i.Attribute.ID}=${r}]`,t)[0],c=s.combineContentChildren(e,e.contentNodes.map((function(t){return t})),e.childNodes.map((function(t){return t})));a&&s.addOwns_(a,c);for(let e,r=0;e=c[r];r++)n.push(s.tree_(t,e));return n}static addOwns_(t,e){const r=t.getAttribute(i.Attribute.COLLAPSED),n=r?s.realLeafs_(s.fromString(r).array):e.map((t=>t.id));t.setAttribute(i.Attribute.OWNS,n.join(" "))}static realLeafs_(t){if(s.simpleCollapseStructure(t))return[t];if(s.contentCollapseStructure(t))return[];t=t;let e=[];for(let r=1;rs.simpleCollapseStructure(t)?t:s.contentCollapseStructure(t)?t[1]:t[0]))}subtreeNodes(t){if(!this.isRoot(t))return[];const e=(t,r)=>{s.simpleCollapseStructure(t)?r.push(t):(t=t,s.contentCollapseStructure(t)&&(t=t.slice(1)),t.forEach((t=>e(t,r))))},r=this.levelsMap[t],n=[];return e(r.slice(1),n),n}}e.SemanticSkeleton=s},7075:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTree=void 0;const n=r(5740),o=r(7630),i=r(9265),s=r(7228),a=r(5952),c=r(5609);r(94);class l{constructor(t){this.mathml=t,this.parser=new s.SemanticMathml,this.root=this.parser.parse(t),this.collator=this.parser.getFactory().leafMap.collateMeaning();const e=this.collator.newDefault();e&&(this.parser=new s.SemanticMathml,this.parser.getFactory().defaultMap=e,this.root=this.parser.parse(t)),u.visit(this.root,{}),(0,o.annotate)(this.root)}static empty(){const t=n.parseInput(""),e=new l(t);return e.mathml=t,e}static fromNode(t,e){const r=l.empty();return r.root=t,e&&(r.mathml=e),r}static fromRoot(t,e){let r=t;for(;r.parent;)r=r.parent;const n=l.fromNode(r);return e&&(n.mathml=e),n}static fromXml(t){const e=l.empty();return t.childNodes[0]&&(e.root=a.SemanticNode.fromXml(t.childNodes[0])),e}xml(t){const e=n.parseInput(""),r=this.root.xml(e.ownerDocument,t);return e.appendChild(r),e}toString(t){return n.serializeXml(this.xml(t))}formatXml(t){const e=this.toString(t);return n.formatXml(e)}displayTree(){this.root.displayTree()}replaceNode(t,e){const r=t.parent;r?r.replaceChild(t,e):this.root=e}toJson(){const t={};return t.stree=this.root.toJson(),t}}e.SemanticTree=l;const u=new i.SemanticVisitor("general","unit",((t,e)=>{if("infixop"===t.type&&("multiplication"===t.role||"implicit"===t.role)){const e=t.childNodes;e.length&&(c.isPureUnit(e[0])||c.isUnitCounter(e[0]))&&t.childNodes.slice(1).every(c.isPureUnit)&&(t.role="unit")}return!1}))},4795:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.partitionNodes=e.sliceNodes=e.getEmbellishedInner=e.addAttributes=e.isZeroLength=e.purgeNodes=e.isOrphanedGlyph=e.hasDisplayTag=e.hasEmptyTag=e.hasIgnoreTag=e.hasLeafTag=e.hasMathTag=e.directSpeechKeys=e.DISPLAYTAGS=e.EMPTYTAGS=e.IGNORETAGS=e.LEAFTAGS=void 0;const n=r(5740);function o(t){return!!t&&-1!==e.LEAFTAGS.indexOf(n.tagName(t))}function i(t,e,r){r&&t.reverse();const n=[];for(let o,i=0;o=t[i];i++){if(e(o))return r?{head:t.slice(i+1).reverse(),div:o,tail:n.reverse()}:{head:n,div:o,tail:t.slice(i+1)};n.push(o)}return r?{head:[],div:null,tail:n.reverse()}:{head:n,div:null,tail:[]}}e.LEAFTAGS=["MO","MI","MN","MTEXT","MS","MSPACE"],e.IGNORETAGS=["MERROR","MPHANTOM","MALIGNGROUP","MALIGNMARK","MPRESCRIPTS","ANNOTATION","ANNOTATION-XML"],e.EMPTYTAGS=["MATH","MROW","MPADDED","MACTION","NONE","MSTYLE","SEMANTICS"],e.DISPLAYTAGS=["MROOT","MSQRT"],e.directSpeechKeys=["aria-label","exact-speech","alt"],e.hasMathTag=function(t){return!!t&&"MATH"===n.tagName(t)},e.hasLeafTag=o,e.hasIgnoreTag=function(t){return!!t&&-1!==e.IGNORETAGS.indexOf(n.tagName(t))},e.hasEmptyTag=function(t){return!!t&&-1!==e.EMPTYTAGS.indexOf(n.tagName(t))},e.hasDisplayTag=function(t){return!!t&&-1!==e.DISPLAYTAGS.indexOf(n.tagName(t))},e.isOrphanedGlyph=function(t){return!!t&&"MGLYPH"===n.tagName(t)&&!o(t.parentNode)},e.purgeNodes=function(t){const r=[];for(let o,i=0;o=t[i];i++){if(o.nodeType!==n.NodeType.ELEMENT_NODE)continue;const t=n.tagName(o);-1===e.IGNORETAGS.indexOf(t)&&(-1!==e.EMPTYTAGS.indexOf(t)&&0===o.childNodes.length||r.push(o))}return r},e.isZeroLength=function(t){if(!t)return!1;if(-1!==["negativeveryverythinmathspace","negativeverythinmathspace","negativethinmathspace","negativemediummathspace","negativethickmathspace","negativeverythickmathspace","negativeveryverythickmathspace"].indexOf(t))return!0;const e=t.match(/[0-9.]+/);return!!e&&0===parseFloat(e[0])},e.addAttributes=function(t,r){if(r.hasAttributes()){const n=r.attributes;for(let r=n.length-1;r>=0;r--){const o=n[r].name;o.match(/^ext/)&&(t.attributes[o]=n[r].value,t.nobreaking=!0),-1!==e.directSpeechKeys.indexOf(o)&&(t.attributes["ext-speech"]=n[r].value,t.nobreaking=!0),o.match(/texclass$/)&&(t.attributes.texclass=n[r].value),"href"===o&&(t.attributes.href=n[r].value,t.nobreaking=!0)}}},e.getEmbellishedInner=function t(e){return e&&e.embellished&&e.childNodes.length>0?t(e.childNodes[0]):e},e.sliceNodes=i,e.partitionNodes=function(t,e){let r=t;const n=[],o=[];let s=null;do{s=i(r,e),o.push(s.head),n.push(s.div),r=s.tail}while(s.div);return n.pop(),{rel:n,comp:o}}},6278:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractSpeechGenerator=void 0;const n=r(6828),o=r(2298),i=r(1214),s=r(9543);e.AbstractSpeechGenerator=class{constructor(){this.modality=o.addPrefix("speech"),this.rebuilt_=null,this.options_={}}getRebuilt(){return this.rebuilt_}setRebuilt(t){this.rebuilt_=t}setOptions(t){this.options_=t||{},this.modality=o.addPrefix(this.options_.modality||"speech")}getOptions(){return this.options_}start(){}end(){}generateSpeech(t,e){return this.rebuilt_||(this.rebuilt_=new i.RebuildStree(e)),(0,n.setup)(this.options_),s.computeMarkup(this.getRebuilt().xml)}}},1452:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AdhocSpeechGenerator=void 0;const n=r(6278);class o extends n.AbstractSpeechGenerator{getSpeech(t,e){const r=this.generateSpeech(t,e);return t.setAttribute(this.modality,r),r}}e.AdhocSpeechGenerator=o},5152:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorGenerator=void 0;const n=r(2298),o=r(8396),i=r(1214),s=r(1204),a=r(6278);class c extends a.AbstractSpeechGenerator{constructor(){super(...arguments),this.modality=(0,n.addPrefix)("foreground"),this.contrast=new o.ContrastPicker}static visitStree_(t,e,r){if(t.childNodes.length){if(t.contentNodes.length&&("punctuated"===t.type&&t.contentNodes.forEach((t=>r[t.id]=!0)),"implicit"!==t.role&&e.push(t.contentNodes.map((t=>t.id)))),t.childNodes.length){if("implicit"===t.role){const n=[];let o=[];for(const e of t.childNodes){const t=[];c.visitStree_(e,t,r),t.length<=2&&n.push(t.shift()),o=o.concat(t)}return e.push(n),void o.forEach((t=>e.push(t)))}t.childNodes.forEach((t=>c.visitStree_(t,e,r)))}}else r[t.id]||e.push(t.id)}getSpeech(t,e){return s.getAttribute(t,this.modality)}generateSpeech(t,e){return this.getRebuilt()||this.setRebuilt(new i.RebuildStree(t)),this.colorLeaves_(t),s.getAttribute(t,this.modality)}colorLeaves_(t){const e=[];c.visitStree_(this.getRebuilt().streeRoot,e,{});for(const r of e){const e=this.contrast.generate();let n=!1;n=Array.isArray(r)?r.map((r=>this.colorLeave_(t,r,e))).reduce(((t,e)=>t||e),!1):this.colorLeave_(t,r.toString(),e),n&&this.contrast.increment()}}colorLeave_(t,e,r){const n=s.getBySemanticId(t,e);return!!n&&(n.setAttribute(this.modality,r),!0)}}e.ColorGenerator=c},6604:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.DirectSpeechGenerator=void 0;const n=r(1204),o=r(6278);class i extends o.AbstractSpeechGenerator{getSpeech(t,e){return n.getAttribute(t,this.modality)}}e.DirectSpeechGenerator=i},3123:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.DummySpeechGenerator=void 0;const n=r(6278);class o extends n.AbstractSpeechGenerator{getSpeech(t,e){return""}}e.DummySpeechGenerator=o},5858:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.NodeSpeechGenerator=void 0;const n=r(1204),o=r(4598);class i extends o.TreeSpeechGenerator{getSpeech(t,e){return super.getSpeech(t,e),n.getAttribute(t,this.modality)}}e.NodeSpeechGenerator=i},9552:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.generatorMapping_=e.generator=void 0;const n=r(1452),o=r(5152),i=r(6604),s=r(3123),a=r(5858),c=r(597),l=r(4598);e.generator=function(t){return(e.generatorMapping_[t]||e.generatorMapping_.Direct)()},e.generatorMapping_={Adhoc:()=>new n.AdhocSpeechGenerator,Color:()=>new o.ColorGenerator,Direct:()=>new i.DirectSpeechGenerator,Dummy:()=>new s.DummySpeechGenerator,Node:()=>new a.NodeSpeechGenerator,Summary:()=>new c.SummarySpeechGenerator,Tree:()=>new l.TreeSpeechGenerator}},9543:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.computeSummary_=e.retrieveSummary=e.connectAllMactions=e.connectMactions=e.nodeAtPosition_=e.computePrefix_=e.retrievePrefix=e.addPrefix=e.addModality=e.addSpeech=e.recomputeMarkup=e.computeMarkup=e.recomputeSpeech=e.computeSpeech=void 0;const n=r(8290),o=r(5740),i=r(5274),s=r(2298),a=r(2362),c=r(7075),l=r(1204);function u(t){return a.SpeechRuleEngine.getInstance().evaluateNode(t)}function p(t){return u(c.SemanticTree.fromNode(t).xml())}function h(t){const e=p(t);return n.markup(e)}function d(t){const e=f(t);return n.markup(e)}function f(t){const e=c.SemanticTree.fromRoot(t),r=i.evalXPath('.//*[@id="'+t.id+'"]',e.xml());let n=r[0];return r.length>1&&(n=m(t,r)||n),n?a.SpeechRuleEngine.getInstance().runInSetting({modality:"prefix",domain:"default",style:"default",strict:!0,speech:!0},(function(){return a.SpeechRuleEngine.getInstance().evaluateNode(n)})):[]}function m(t,e){const r=e[0];if(!t.parent)return r;const n=[];for(;t;)n.push(t.id),t=t.parent;const o=function(t,e){for(;e.length&&e.shift().toString()===t.getAttribute("id")&&t.parentNode&&t.parentNode.parentNode;)t=t.parentNode.parentNode;return!e.length};for(let t,r=0;t=e[r];r++)if(o(t,n.slice()))return t;return r}function y(t){return t?a.SpeechRuleEngine.getInstance().runInSetting({modality:"summary",strict:!1,speech:!0},(function(){return a.SpeechRuleEngine.getInstance().evaluateNode(t)})):[]}e.computeSpeech=u,e.recomputeSpeech=p,e.computeMarkup=function(t){const e=u(t);return n.markup(e)},e.recomputeMarkup=h,e.addSpeech=function(t,e,r){const i=o.querySelectorAllByAttrValue(r,"id",e.id.toString())[0],a=i?n.markup(u(i)):h(e);t.setAttribute(s.Attribute.SPEECH,a)},e.addModality=function(t,e,r){const n=h(e);t.setAttribute(r,n)},e.addPrefix=function(t,e){const r=d(e);r&&t.setAttribute(s.Attribute.PREFIX,r)},e.retrievePrefix=d,e.computePrefix_=f,e.nodeAtPosition_=m,e.connectMactions=function(t,e,r){const n=o.querySelectorAll(e,"maction");for(let e,i=0;e=n[i];i++){const n=e.getAttribute("id"),i=o.querySelectorAllByAttrValue(t,"id",n)[0];if(!i)continue;const a=e.childNodes[1],c=a.getAttribute(s.Attribute.ID);let u=l.getBySemanticId(t,c);if(u&&"dummy"!==u.getAttribute(s.Attribute.TYPE))continue;if(u=i.childNodes[0],u.getAttribute("sre-highlighter-added"))continue;const p=a.getAttribute(s.Attribute.PARENT);p&&u.setAttribute(s.Attribute.PARENT,p),u.setAttribute(s.Attribute.TYPE,"dummy"),u.setAttribute(s.Attribute.ID,c);o.querySelectorAllByAttrValue(r,"id",c)[0].setAttribute("alternative",c)}},e.connectAllMactions=function(t,e){const r=o.querySelectorAll(t,"maction");for(let t,n=0;t=r[n];n++){const r=t.childNodes[1].getAttribute(s.Attribute.ID);o.querySelectorAllByAttrValue(e,"id",r)[0].setAttribute("alternative",r)}},e.retrieveSummary=function(t){const e=y(t);return n.markup(e)},e.computeSummary_=y},597:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SummarySpeechGenerator=void 0;const n=r(6278),o=r(9543);class i extends n.AbstractSpeechGenerator{getSpeech(t,e){return o.connectAllMactions(e,this.getRebuilt().xml),this.generateSpeech(t,e)}}e.SummarySpeechGenerator=i},4598:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.TreeSpeechGenerator=void 0;const n=r(2298),o=r(1204),i=r(6278),s=r(9543);class a extends i.AbstractSpeechGenerator{getSpeech(t,e){const r=this.generateSpeech(t,e),i=this.getRebuilt().nodeDict;for(const r in i){const a=i[r],c=o.getBySemanticId(e,r),l=o.getBySemanticId(t,r);c&&l&&(this.modality&&this.modality!==n.Attribute.SPEECH?s.addModality(l,a,this.modality):s.addSpeech(l,a,this.getRebuilt().xml),this.modality===n.Attribute.SPEECH&&s.addPrefix(l,a))}return r}}e.TreeSpeechGenerator=a},313:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.INTERVALS=e.makeLetter=e.numberRules=e.alphabetRules=e.getFont=e.makeInterval=e.generate=e.makeDomains_=e.Domains_=e.Base=e.Embellish=e.Font=void 0;const n=r(5897),o=r(7491),i=r(4356),s=r(2536),a=r(2780);var c,l,u;function p(){const t=i.LOCALE.ALPHABETS,r=(t,e)=>{const r={};return Object.keys(t).forEach((t=>r[t]=!0)),Object.keys(e).forEach((t=>r[t]=!0)),Object.keys(r)};e.Domains_.small=r(t.smallPrefix,t.letterTrans),e.Domains_.capital=r(t.capPrefix,t.letterTrans),e.Domains_.digit=r(t.digitPrefix,t.digitTrans)}function h(t){const e=t.toString(16).toUpperCase();return e.length>3?e:("000"+e).slice(-4)}function d([t,e],r){const n=parseInt(t,16),o=parseInt(e,16),i=[];for(let t=n;t<=o;t++){let e=h(t);!1!==r[e]&&(e=r[e]||e,i.push(e))}return i}function f(t){const e="normal"===t||"fullwidth"===t?"":i.LOCALE.MESSAGES.font[t]||i.LOCALE.MESSAGES.embellish[t]||"";return(0,s.localeFontCombiner)(e)}function m(t,r,n,o,s,a){const c=f(o);for(let o,l,u,p=0;o=t[p],l=r[p],u=n[p];p++){const t=a?i.LOCALE.ALPHABETS.capPrefix:i.LOCALE.ALPHABETS.smallPrefix,r=a?e.Domains_.capital:e.Domains_.small;g(c.combiner,o,l,u,c.font,t,s,i.LOCALE.ALPHABETS.letterTrans,r)}}function y(t,r,n,o,s){const a=f(n);for(let n,c,l=0;n=t[l],c=r[l];l++){const t=i.LOCALE.ALPHABETS.digitPrefix,r=l+s;g(a.combiner,n,c,r,a.font,t,o,i.LOCALE.ALPHABETS.digitTrans,e.Domains_.digit)}}function g(t,e,r,n,o,i,s,c,l){for(let u,p=0;u=l[p];p++){const l=u in c?c[u]:c.default,p=u in i?i[u]:i.default;a.defineRule(e.toString(),u,"default",s,r,t(l(n),o,p))}}!function(t){t.BOLD="bold",t.BOLDFRAKTUR="bold-fraktur",t.BOLDITALIC="bold-italic",t.BOLDSCRIPT="bold-script",t.DOUBLESTRUCK="double-struck",t.FULLWIDTH="fullwidth",t.FRAKTUR="fraktur",t.ITALIC="italic",t.MONOSPACE="monospace",t.NORMAL="normal",t.SCRIPT="script",t.SANSSERIF="sans-serif",t.SANSSERIFITALIC="sans-serif-italic",t.SANSSERIFBOLD="sans-serif-bold",t.SANSSERIFBOLDITALIC="sans-serif-bold-italic"}(c=e.Font||(e.Font={})),function(t){t.SUPER="super",t.SUB="sub",t.CIRCLED="circled",t.PARENTHESIZED="parenthesized",t.PERIOD="period",t.NEGATIVECIRCLED="negative-circled",t.DOUBLECIRCLED="double-circled",t.CIRCLEDSANSSERIF="circled-sans-serif",t.NEGATIVECIRCLEDSANSSERIF="negative-circled-sans-serif",t.COMMA="comma",t.SQUARED="squared",t.NEGATIVESQUARED="negative-squared"}(l=e.Embellish||(e.Embellish={})),function(t){t.LATINCAP="latinCap",t.LATINSMALL="latinSmall",t.GREEKCAP="greekCap",t.GREEKSMALL="greekSmall",t.DIGIT="digit"}(u=e.Base||(e.Base={})),e.Domains_={small:["default"],capital:["default"],digit:["default"]},e.makeDomains_=p,e.generate=function(t){const r=n.default.getInstance().locale;n.default.getInstance().locale=t,o.setLocale(),a.addSymbolRules({locale:t}),p();const s=e.INTERVALS;for(let t,e=0;t=s[e];e++){const e=d(t.interval,t.subst),r=e.map((function(t){return String.fromCodePoint(parseInt(t,16))}));if("offset"in t)y(e,r,t.font,t.category,t.offset||0);else{m(e,r,i.LOCALE.ALPHABETS[t.base],t.font,t.category,!!t.capital)}}n.default.getInstance().locale=r,o.setLocale()},e.makeInterval=d,e.getFont=f,e.alphabetRules=m,e.numberRules=y,e.makeLetter=g,e.INTERVALS=[{interval:["1D400","1D419"],base:u.LATINCAP,subst:{},capital:!0,category:"Lu",font:c.BOLD},{interval:["1D41A","1D433"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.BOLD},{interval:["1D56C","1D585"],base:u.LATINCAP,subst:{},capital:!0,category:"Lu",font:c.BOLDFRAKTUR},{interval:["1D586","1D59F"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.BOLDFRAKTUR},{interval:["1D468","1D481"],base:u.LATINCAP,subst:{},capital:!0,category:"Lu",font:c.BOLDITALIC},{interval:["1D482","1D49B"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.BOLDITALIC},{interval:["1D4D0","1D4E9"],base:u.LATINCAP,subst:{},capital:!0,category:"Lu",font:c.BOLDSCRIPT},{interval:["1D4EA","1D503"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.BOLDSCRIPT},{interval:["1D538","1D551"],base:u.LATINCAP,subst:{"1D53A":"2102","1D53F":"210D","1D545":"2115","1D547":"2119","1D548":"211A","1D549":"211D","1D551":"2124"},capital:!0,category:"Lu",font:c.DOUBLESTRUCK},{interval:["1D552","1D56B"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.DOUBLESTRUCK},{interval:["1D504","1D51D"],base:u.LATINCAP,subst:{"1D506":"212D","1D50B":"210C","1D50C":"2111","1D515":"211C","1D51D":"2128"},capital:!0,category:"Lu",font:c.FRAKTUR},{interval:["1D51E","1D537"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.FRAKTUR},{interval:["FF21","FF3A"],base:u.LATINCAP,subst:{},capital:!0,category:"Lu",font:c.FULLWIDTH},{interval:["FF41","FF5A"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.FULLWIDTH},{interval:["1D434","1D44D"],base:u.LATINCAP,subst:{},capital:!0,category:"Lu",font:c.ITALIC},{interval:["1D44E","1D467"],base:u.LATINSMALL,subst:{"1D455":"210E"},capital:!1,category:"Ll",font:c.ITALIC},{interval:["1D670","1D689"],base:u.LATINCAP,subst:{},capital:!0,category:"Lu",font:c.MONOSPACE},{interval:["1D68A","1D6A3"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.MONOSPACE},{interval:["0041","005A"],base:u.LATINCAP,subst:{},capital:!0,category:"Lu",font:c.NORMAL},{interval:["0061","007A"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.NORMAL},{interval:["1D49C","1D4B5"],base:u.LATINCAP,subst:{"1D49D":"212C","1D4A0":"2130","1D4A1":"2131","1D4A3":"210B","1D4A4":"2110","1D4A7":"2112","1D4A8":"2133","1D4AD":"211B"},capital:!0,category:"Lu",font:c.SCRIPT},{interval:["1D4B6","1D4CF"],base:u.LATINSMALL,subst:{"1D4BA":"212F","1D4BC":"210A","1D4C4":"2134"},capital:!1,category:"Ll",font:c.SCRIPT},{interval:["1D5A0","1D5B9"],base:u.LATINCAP,subst:{},capital:!0,category:"Lu",font:c.SANSSERIF},{interval:["1D5BA","1D5D3"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.SANSSERIF},{interval:["1D608","1D621"],base:u.LATINCAP,subst:{},capital:!0,category:"Lu",font:c.SANSSERIFITALIC},{interval:["1D622","1D63B"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.SANSSERIFITALIC},{interval:["1D5D4","1D5ED"],base:u.LATINCAP,subst:{},capital:!0,category:"Lu",font:c.SANSSERIFBOLD},{interval:["1D5EE","1D607"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.SANSSERIFBOLD},{interval:["1D63C","1D655"],base:u.LATINCAP,subst:{},capital:!0,category:"Lu",font:c.SANSSERIFBOLDITALIC},{interval:["1D656","1D66F"],base:u.LATINSMALL,subst:{},capital:!1,category:"Ll",font:c.SANSSERIFBOLDITALIC},{interval:["0391","03A9"],base:u.GREEKCAP,subst:{"03A2":"03F4"},capital:!0,category:"Lu",font:c.NORMAL},{interval:["03B0","03D0"],base:u.GREEKSMALL,subst:{"03B0":"2207","03CA":"2202","03CB":"03F5","03CC":"03D1","03CD":"03F0","03CE":"03D5","03CF":"03F1","03D0":"03D6"},capital:!1,category:"Ll",font:c.NORMAL},{interval:["1D6A8","1D6C0"],base:u.GREEKCAP,subst:{},capital:!0,category:"Lu",font:c.BOLD},{interval:["1D6C1","1D6E1"],base:u.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:c.BOLD},{interval:["1D6E2","1D6FA"],base:u.GREEKCAP,subst:{},capital:!0,category:"Lu",font:c.ITALIC},{interval:["1D6FB","1D71B"],base:u.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:c.ITALIC},{interval:["1D71C","1D734"],base:u.GREEKCAP,subst:{},capital:!0,category:"Lu",font:c.BOLDITALIC},{interval:["1D735","1D755"],base:u.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:c.BOLDITALIC},{interval:["1D756","1D76E"],base:u.GREEKCAP,subst:{},capital:!0,category:"Lu",font:c.SANSSERIFBOLD},{interval:["1D76F","1D78F"],base:u.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:c.SANSSERIFBOLD},{interval:["1D790","1D7A8"],base:u.GREEKCAP,subst:{},capital:!0,category:"Lu",font:c.SANSSERIFBOLDITALIC},{interval:["1D7A9","1D7C9"],base:u.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:c.SANSSERIFBOLDITALIC},{interval:["0030","0039"],base:u.DIGIT,subst:{},offset:0,category:"Nd",font:c.NORMAL},{interval:["2070","2079"],base:u.DIGIT,subst:{2071:"00B9",2072:"00B2",2073:"00B3"},offset:0,category:"No",font:l.SUPER},{interval:["2080","2089"],base:u.DIGIT,subst:{},offset:0,category:"No",font:l.SUB},{interval:["245F","2473"],base:u.DIGIT,subst:{"245F":"24EA"},offset:0,category:"No",font:l.CIRCLED},{interval:["3251","325F"],base:u.DIGIT,subst:{},offset:21,category:"No",font:l.CIRCLED},{interval:["32B1","32BF"],base:u.DIGIT,subst:{},offset:36,category:"No",font:l.CIRCLED},{interval:["2474","2487"],base:u.DIGIT,subst:{},offset:1,category:"No",font:l.PARENTHESIZED},{interval:["2487","249B"],base:u.DIGIT,subst:{2487:"1F100"},offset:0,category:"No",font:l.PERIOD},{interval:["2775","277F"],base:u.DIGIT,subst:{2775:"24FF"},offset:0,category:"No",font:l.NEGATIVECIRCLED},{interval:["24EB","24F4"],base:u.DIGIT,subst:{},offset:11,category:"No",font:l.NEGATIVECIRCLED},{interval:["24F5","24FE"],base:u.DIGIT,subst:{},offset:1,category:"No",font:l.DOUBLECIRCLED},{interval:["277F","2789"],base:u.DIGIT,subst:{"277F":"1F10B"},offset:0,category:"No",font:l.CIRCLEDSANSSERIF},{interval:["2789","2793"],base:u.DIGIT,subst:{2789:"1F10C"},offset:0,category:"No",font:l.NEGATIVECIRCLEDSANSSERIF},{interval:["FF10","FF19"],base:u.DIGIT,subst:{},offset:0,category:"Nd",font:c.FULLWIDTH},{interval:["1D7CE","1D7D7"],base:u.DIGIT,subst:{},offset:0,category:"Nd",font:c.BOLD},{interval:["1D7D8","1D7E1"],base:u.DIGIT,subst:{},offset:0,category:"Nd",font:c.DOUBLESTRUCK},{interval:["1D7E2","1D7EB"],base:u.DIGIT,subst:{},offset:0,category:"Nd",font:c.SANSSERIF},{interval:["1D7EC","1D7F5"],base:u.DIGIT,subst:{},offset:0,category:"Nd",font:c.SANSSERIFBOLD},{interval:["1D7F6","1D7FF"],base:u.DIGIT,subst:{},offset:0,category:"Nd",font:c.MONOSPACE},{interval:["1F101","1F10A"],base:u.DIGIT,subst:{},offset:0,category:"No",font:l.COMMA},{interval:["24B6","24CF"],base:u.LATINCAP,subst:{},capital:!0,category:"So",font:l.CIRCLED},{interval:["24D0","24E9"],base:u.LATINSMALL,subst:{},capital:!1,category:"So",font:l.CIRCLED},{interval:["1F110","1F129"],base:u.LATINCAP,subst:{},capital:!0,category:"So",font:l.PARENTHESIZED},{interval:["249C","24B5"],base:u.LATINSMALL,subst:{},capital:!1,category:"So",font:l.PARENTHESIZED},{interval:["1F130","1F149"],base:u.LATINCAP,subst:{},capital:!0,category:"So",font:l.SQUARED},{interval:["1F170","1F189"],base:u.LATINCAP,subst:{},capital:!0,category:"So",font:l.NEGATIVESQUARED},{interval:["1F150","1F169"],base:u.LATINCAP,subst:{},capital:!0,category:"So",font:l.NEGATIVECIRCLED}]},8504:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=e.Comparator=e.ClearspeakPreferences=void 0;const n=r(5897),o=r(4440),i=r(1676),s=r(1676),a=r(2780),c=r(2362);class l extends i.DynamicCstr{constructor(t,e){super(t),this.preference=e}static comparator(){return new p(n.default.getInstance().dynamicCstr,s.DynamicProperties.createProp([i.DynamicCstr.DEFAULT_VALUES[s.Axis.LOCALE]],[i.DynamicCstr.DEFAULT_VALUES[s.Axis.MODALITY]],[i.DynamicCstr.DEFAULT_VALUES[s.Axis.DOMAIN]],[i.DynamicCstr.DEFAULT_VALUES[s.Axis.STYLE]]))}static fromPreference(t){const e=t.split(":"),r={},n=u.getProperties(),o=Object.keys(n);for(let t,i=0;t=e[i];i++){const e=t.split("_");if(-1===o.indexOf(e[0]))continue;const i=e[1];i&&i!==l.AUTO&&-1!==n[e[0]].indexOf(i)&&(r[e[0]]=e[1])}return r}static toPreference(t){const e=Object.keys(t),r=[];for(let n=0;ns?-1:i0&&e<20&&r>0&&r<11}function O(t){return o.default.getInstance().style===t}function E(t){if(!t.hasAttribute("annotation"))return!1;const e=t.getAttribute("annotation");return!!/clearspeak:simple$|clearspeak:simple;/.exec(e)}function x(t){if(E(t))return!0;if("subscript"!==t.tagName)return!1;const e=t.childNodes[0].childNodes,r=e[1];return"identifier"===e[0].tagName&&(A(r)||"infixop"===r.tagName&&r.hasAttribute("role")&&"implicit"===r.getAttribute("role")&&C(r))}function A(t){return"number"===t.tagName&&t.hasAttribute("role")&&"integer"===t.getAttribute("role")}function C(t){return i.evalXPath("children/*",t).every((t=>A(t)||"identifier"===t.tagName))}function N(t){return"text"===t.type||"punctuated"===t.type&&"text"===t.role&&_(t.childNodes[0])&&T(t.childNodes.slice(1))||"identifier"===t.type&&"unit"===t.role||"infixop"===t.type&&("implicit"===t.role||"unit"===t.role)}function T(t){for(let e=0;e10?s.LOCALE.NUMBERS.numericOrdinal(e):s.LOCALE.NUMBERS.wordOrdinal(e)},e.NESTING_DEPTH=null,e.nestingDepth=function(t){let r=0;const n=t.textContent,o="open"===t.getAttribute("role")?0:1;let i=t.parentNode;for(;i;)"fenced"===i.tagName&&i.childNodes[0].childNodes[o].textContent===n&&r++,i=i.parentNode;return e.NESTING_DEPTH=r>1?s.LOCALE.NUMBERS.wordOrdinal(r):"",e.NESTING_DEPTH},e.matchingFences=function(t){const e=t.previousSibling;let r,n;return e?(r=e,n=t):(r=t,n=t.nextSibling),n&&(0,h.isMatchingFence)(r.textContent,n.textContent)?[t]:[]},e.insertNesting=L,c.Grammar.getInstance().setCorrection("insertNesting",L),e.fencedArguments=function(t){const e=n.toArray(t.parentNode.childNodes),r=i.evalXPath("../../children/*",t),o=e.indexOf(t);return I(r[o])||I(r[o+1])?[t]:[]},e.simpleArguments=function(t){const e=n.toArray(t.parentNode.childNodes),r=i.evalXPath("../../children/*",t),o=e.indexOf(t);return w(r[o])&&r[o+1]&&(w(r[o+1])||"root"===r[o+1].tagName||"sqrt"===r[o+1].tagName||"superscript"===r[o+1].tagName&&r[o+1].childNodes[0].childNodes[0]&&("number"===r[o+1].childNodes[0].childNodes[0].tagName||"identifier"===r[o+1].childNodes[0].childNodes[0].tagName)&&("2"===r[o+1].childNodes[0].childNodes[1].textContent||"3"===r[o+1].childNodes[0].childNodes[1].textContent))?[t]:[]},e.simpleFactor_=w,e.fencedFactor_=I,e.layoutFactor_=R,e.wordOrdinal=function(t){return s.LOCALE.NUMBERS.wordOrdinal(parseInt(t.textContent,10))}},6141:function(t,e,r){var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.loadAjax=e.loadFileSync=e.loadFile=e.parseMaps=e.retrieveFiles=e.standardLoader=e.loadLocale=e.store=void 0;const o=r(2139),i=r(5897),s=r(4440),a=r(7248),c=r(2315),l=r(1676),u=r(2780),p=r(2362),h=r(7491),d=r(313);e.store=u;const f={functions:u.addFunctionRules,symbols:u.addSymbolRules,units:u.addUnitRules,si:u.setSiPrefixes};let m=!1;function y(t=i.default.getInstance().locale){i.EnginePromise.loaded[t]||(i.EnginePromise.loaded[t]=[!1,!1],function(t){if(i.default.getInstance().isIE&&i.default.getInstance().mode===s.Mode.HTTP)return void S(t);b(t)}(t))}function g(){switch(i.default.getInstance().mode){case s.Mode.ASYNC:return M;case s.Mode.HTTP:return E;case s.Mode.SYNC:default:return O}}function b(t){const e=i.default.getInstance().customLoader?i.default.getInstance().customLoader:g(),r=new Promise((r=>{e(t).then((e=>{v(e),i.EnginePromise.loaded[t]=[!0,!0],r(t)}),(e=>{i.EnginePromise.loaded[t]=[!0,!1],console.error(`Unable to load locale: ${t}`),i.default.getInstance().locale=i.default.getInstance().defaultLocale,r(t)}))}));i.EnginePromise.promises[t]=r}function v(t){_(JSON.parse(t))}function _(t,e){let r=!0;for(let n,o=0;n=Object.keys(t)[o];o++){const o=n.split("/");e&&e!==o[0]||("rules"===o[1]?p.SpeechRuleEngine.getInstance().addStore(t[n]):"messages"===o[1]?(0,h.completeLocale)(t[n]):(r&&(d.generate(o[0]),r=!1),t[n].forEach(f[o[1]])))}}function S(t,e){let r=e||1;o.mapsForIE?_(o.mapsForIE,t):r<=5&&setTimeout((()=>S(t,r++)).bind(this),300)}function M(t){const e=a.localePath(t);return new Promise(((t,r)=>{c.default.fs.readFile(e,"utf8",((e,n)=>{if(e)return r(e);t(n)}))}))}function O(t){const e=a.localePath(t);return new Promise(((t,r)=>{let n="{}";try{n=c.default.fs.readFileSync(e,"utf8")}catch(t){return r(t)}t(n)}))}function E(t){const e=a.localePath(t),r=new XMLHttpRequest;return new Promise(((t,n)=>{r.onreadystatechange=function(){if(4===r.readyState){const e=r.status;0===e||e>=200&&e<400?t(r.responseText):n(e)}},r.open("GET",e,!0),r.send()}))}e.loadLocale=function(t=i.default.getInstance().locale){return n(this,void 0,void 0,(function*(){return m||(y(l.DynamicCstr.BASE_LOCALE),m=!0),i.EnginePromise.promises[l.DynamicCstr.BASE_LOCALE].then((()=>n(this,void 0,void 0,(function*(){const e=i.default.getInstance().defaultLocale;return e?(y(e),i.EnginePromise.promises[e].then((()=>n(this,void 0,void 0,(function*(){return y(t),i.EnginePromise.promises[t]}))))):(y(t),i.EnginePromise.promises[t])}))))}))},e.standardLoader=g,e.retrieveFiles=b,e.parseMaps=v,e.loadFile=M,e.loadFileSync=O,e.loadAjax=E},7088:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.leftSubscriptBrief=e.leftSuperscriptBrief=e.leftSubscriptVerbose=e.leftSuperscriptVerbose=e.baselineBrief=e.baselineVerbose=void 0;const n=r(1378);e.baselineVerbose=function(t){return n.baselineVerbose(t).replace(/-$/,"")},e.baselineBrief=function(t){return n.baselineBrief(t).replace(/-$/,"")},e.leftSuperscriptVerbose=function(t){return n.superscriptVerbose(t).replace(/^exposant/,"exposant gauche")},e.leftSubscriptVerbose=function(t){return n.subscriptVerbose(t).replace(/^indice/,"indice gauche")},e.leftSuperscriptBrief=function(t){return n.superscriptBrief(t).replace(/^sup/,"sup gauche")},e.leftSubscriptBrief=function(t){return n.subscriptBrief(t).replace(/^sub/,"sub gauche")}},9577:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.MathspeakRules=void 0;const n=r(1676),o=r(365),i=r(7088),s=r(1378),a=r(8437),c=r(7283),l=r(7598);e.MathspeakRules=function(){c.addStore(n.DynamicCstr.BASE_LOCALE+".speech.mathspeak","",{CQFspaceoutNumber:s.spaceoutNumber,CQFspaceoutIdentifier:s.spaceoutIdentifier,CSFspaceoutText:s.spaceoutText,CSFopenFracVerbose:s.openingFractionVerbose,CSFcloseFracVerbose:s.closingFractionVerbose,CSFoverFracVerbose:s.overFractionVerbose,CSFopenFracBrief:s.openingFractionBrief,CSFcloseFracBrief:s.closingFractionBrief,CSFopenFracSbrief:s.openingFractionSbrief,CSFcloseFracSbrief:s.closingFractionSbrief,CSFoverFracSbrief:s.overFractionSbrief,CSFvulgarFraction:a.vulgarFraction,CQFvulgarFractionSmall:s.isSmallVulgarFraction,CSFopenRadicalVerbose:s.openingRadicalVerbose,CSFcloseRadicalVerbose:s.closingRadicalVerbose,CSFindexRadicalVerbose:s.indexRadicalVerbose,CSFopenRadicalBrief:s.openingRadicalBrief,CSFcloseRadicalBrief:s.closingRadicalBrief,CSFindexRadicalBrief:s.indexRadicalBrief,CSFopenRadicalSbrief:s.openingRadicalSbrief,CSFindexRadicalSbrief:s.indexRadicalSbrief,CQFisSmallRoot:s.smallRoot,CSFsuperscriptVerbose:s.superscriptVerbose,CSFsuperscriptBrief:s.superscriptBrief,CSFsubscriptVerbose:s.subscriptVerbose,CSFsubscriptBrief:s.subscriptBrief,CSFbaselineVerbose:s.baselineVerbose,CSFbaselineBrief:s.baselineBrief,CSFleftsuperscriptVerbose:s.superscriptVerbose,CSFleftsubscriptVerbose:s.subscriptVerbose,CSFrightsuperscriptVerbose:s.superscriptVerbose,CSFrightsubscriptVerbose:s.subscriptVerbose,CSFleftsuperscriptBrief:s.superscriptBrief,CSFleftsubscriptBrief:s.subscriptBrief,CSFrightsuperscriptBrief:s.superscriptBrief,CSFrightsubscriptBrief:s.subscriptBrief,CSFunderscript:s.nestedUnderscript,CSFoverscript:s.nestedOverscript,CSFendscripts:s.endscripts,CTFordinalCounter:a.ordinalCounter,CTFwordCounter:a.wordCounter,CTFcontentIterator:o.contentIterator,CQFdetIsSimple:s.determinantIsSimple,CSFRemoveParens:s.removeParens,CQFresetNesting:s.resetNestingDepth,CGFbaselineConstraint:s.generateBaselineConstraint,CGFtensorRules:s.generateTensorRules}),c.addStore("es.speech.mathspeak",n.DynamicCstr.BASE_LOCALE+".speech.mathspeak",{CTFunitMultipliers:l.unitMultipliers,CQFoneLeft:l.oneLeft}),c.addStore("fr.speech.mathspeak",n.DynamicCstr.BASE_LOCALE+".speech.mathspeak",{CSFbaselineVerbose:i.baselineVerbose,CSFbaselineBrief:i.baselineBrief,CSFleftsuperscriptVerbose:i.leftSuperscriptVerbose,CSFleftsubscriptVerbose:i.leftSubscriptVerbose,CSFleftsuperscriptBrief:i.leftSuperscriptBrief,CSFleftsubscriptBrief:i.leftSubscriptBrief})}},1378:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.smallRoot=e.generateTensorRules=e.removeParens=e.generateBaselineConstraint=e.determinantIsSimple=e.nestedOverscript=e.endscripts=e.overscoreNestingDepth=e.nestedUnderscript=e.underscoreNestingDepth=e.indexRadicalSbrief=e.openingRadicalSbrief=e.indexRadicalBrief=e.closingRadicalBrief=e.openingRadicalBrief=e.indexRadicalVerbose=e.closingRadicalVerbose=e.openingRadicalVerbose=e.getRootIndex=e.nestedRadical=e.radicalNestingDepth=e.baselineBrief=e.baselineVerbose=e.superscriptBrief=e.superscriptVerbose=e.subscriptBrief=e.subscriptVerbose=e.nestedSubSuper=e.isSmallVulgarFraction=e.overFractionSbrief=e.closingFractionSbrief=e.openingFractionSbrief=e.closingFractionBrief=e.openingFractionBrief=e.overFractionVerbose=e.closingFractionVerbose=e.openingFractionVerbose=e.nestedFraction=e.fractionNestingDepth=e.computeNestingDepth_=e.containsAttr=e.getNestingDepth=e.resetNestingDepth=e.nestingBarriers=e.spaceoutIdentifier=e.spaceoutNumber=e.spaceoutNodes=e.spaceoutText=void 0;const n=r(707),o=r(5740),i=r(5274),s=r(4356),a=r(3308);let c={};function l(t,e){const r=Array.from(t.textContent),n=[],o=a.default.getInstance(),i=t.ownerDocument;for(let t,s=0;t=r[s];s++){const r=o.getNodeFactory().makeLeafNode(t,"unknown"),s=o.identifierNode(r,"unknown","");e(s),n.push(s.xml(i))}return n}function u(t,r,i,s,a,l){s=s||e.nestingBarriers,a=a||{},l=l||function(t){return!1};const u=o.serializeXml(r);if(c[t]||(c[t]={}),c[t][u])return c[t][u];if(l(r)||i.indexOf(r.tagName)<0)return 0;const p=h(r,i,n.setdifference(s,i),a,l,0);return c[t][u]=p,p}function p(t,e){if(!t.attributes)return!1;const r=o.toArray(t.attributes);for(let t,n=0;t=r[n];n++)if(e[t.nodeName]===t.nodeValue)return!0;return!1}function h(t,e,r,n,i,s){if(i(t)||r.indexOf(t.tagName)>-1||p(t,n))return s;if(e.indexOf(t.tagName)>-1&&s++,!t.childNodes||0===t.childNodes.length)return s;const a=o.toArray(t.childNodes);return Math.max.apply(null,a.map((function(t){return h(t,e,r,n,i,s)})))}function d(t){return u("fraction",t,["fraction"],e.nestingBarriers,{},s.LOCALE.FUNCTIONS.fracNestDepth)}function f(t,e,r){const n=d(t),o=Array(n).fill(e);return r&&o.push(r),o.join(s.LOCALE.MESSAGES.regexp.JOINER_FRAC)}function m(t,e,r){for(;t.parentNode;){const n=t.parentNode,o=n.parentNode;if(!o)break;const i=t.getAttribute&&t.getAttribute("role");("subscript"===o.tagName&&t===n.childNodes[1]||"tensor"===o.tagName&&i&&("leftsub"===i||"rightsub"===i))&&(e=r.sub+s.LOCALE.MESSAGES.regexp.JOINER_SUBSUPER+e),("superscript"===o.tagName&&t===n.childNodes[1]||"tensor"===o.tagName&&i&&("leftsuper"===i||"rightsuper"===i))&&(e=r.sup+s.LOCALE.MESSAGES.regexp.JOINER_SUBSUPER+e),t=o}return e.trim()}function y(t){return u("radical",t,["sqrt","root"],e.nestingBarriers,{})}function g(t,e,r){const n=y(t),o=b(t);return r=o?s.LOCALE.FUNCTIONS.combineRootIndex(r,o):r,1===n?r:s.LOCALE.FUNCTIONS.combineNestedRadical(e,s.LOCALE.FUNCTIONS.radicalNestDepth(n-1),r)}function b(t){const e="sqrt"===t.tagName?"2":i.evalXPath("children/*[1]",t)[0].textContent.trim();return s.LOCALE.MESSAGES.MSroots[e]||""}function v(t){return u("underscore",t,["underscore"],e.nestingBarriers,{},(function(t){return t.tagName&&"underscore"===t.tagName&&"underaccent"===t.childNodes[0].childNodes[1].getAttribute("role")}))}function _(t){return u("overscore",t,["overscore"],e.nestingBarriers,{},(function(t){return t.tagName&&"overscore"===t.tagName&&"overaccent"===t.childNodes[0].childNodes[1].getAttribute("role")}))}e.spaceoutText=function(t){return Array.from(t.textContent).join(" ")},e.spaceoutNodes=l,e.spaceoutNumber=function(t){return l(t,(function(t){t.textContent.match(/\W/)||(t.type="number")}))},e.spaceoutIdentifier=function(t){return l(t,(function(t){t.font="unknown",t.type="identifier"}))},e.nestingBarriers=["cases","cell","integral","line","matrix","multiline","overscore","root","row","sqrt","subscript","superscript","table","underscore","vector"],e.resetNestingDepth=function(t){return c={},[t]},e.getNestingDepth=u,e.containsAttr=p,e.computeNestingDepth_=h,e.fractionNestingDepth=d,e.nestedFraction=f,e.openingFractionVerbose=function(t){return f(t,s.LOCALE.MESSAGES.MS.START,s.LOCALE.MESSAGES.MS.FRAC_V)},e.closingFractionVerbose=function(t){return f(t,s.LOCALE.MESSAGES.MS.END,s.LOCALE.MESSAGES.MS.FRAC_V)},e.overFractionVerbose=function(t){return f(t,s.LOCALE.MESSAGES.MS.FRAC_OVER)},e.openingFractionBrief=function(t){return f(t,s.LOCALE.MESSAGES.MS.START,s.LOCALE.MESSAGES.MS.FRAC_B)},e.closingFractionBrief=function(t){return f(t,s.LOCALE.MESSAGES.MS.END,s.LOCALE.MESSAGES.MS.FRAC_B)},e.openingFractionSbrief=function(t){const e=d(t);return 1===e?s.LOCALE.MESSAGES.MS.FRAC_S:s.LOCALE.FUNCTIONS.combineNestedFraction(s.LOCALE.MESSAGES.MS.NEST_FRAC,s.LOCALE.FUNCTIONS.radicalNestDepth(e-1),s.LOCALE.MESSAGES.MS.FRAC_S)},e.closingFractionSbrief=function(t){const e=d(t);return 1===e?s.LOCALE.MESSAGES.MS.ENDFRAC:s.LOCALE.FUNCTIONS.combineNestedFraction(s.LOCALE.MESSAGES.MS.NEST_FRAC,s.LOCALE.FUNCTIONS.radicalNestDepth(e-1),s.LOCALE.MESSAGES.MS.ENDFRAC)},e.overFractionSbrief=function(t){const e=d(t);return 1===e?s.LOCALE.MESSAGES.MS.FRAC_OVER:s.LOCALE.FUNCTIONS.combineNestedFraction(s.LOCALE.MESSAGES.MS.NEST_FRAC,s.LOCALE.FUNCTIONS.radicalNestDepth(e-1),s.LOCALE.MESSAGES.MS.FRAC_OVER)},e.isSmallVulgarFraction=function(t){return s.LOCALE.FUNCTIONS.fracNestDepth(t)?[t]:[]},e.nestedSubSuper=m,e.subscriptVerbose=function(t){return m(t,s.LOCALE.MESSAGES.MS.SUBSCRIPT,{sup:s.LOCALE.MESSAGES.MS.SUPER,sub:s.LOCALE.MESSAGES.MS.SUB})},e.subscriptBrief=function(t){return m(t,s.LOCALE.MESSAGES.MS.SUB,{sup:s.LOCALE.MESSAGES.MS.SUP,sub:s.LOCALE.MESSAGES.MS.SUB})},e.superscriptVerbose=function(t){return m(t,s.LOCALE.MESSAGES.MS.SUPERSCRIPT,{sup:s.LOCALE.MESSAGES.MS.SUPER,sub:s.LOCALE.MESSAGES.MS.SUB})},e.superscriptBrief=function(t){return m(t,s.LOCALE.MESSAGES.MS.SUP,{sup:s.LOCALE.MESSAGES.MS.SUP,sub:s.LOCALE.MESSAGES.MS.SUB})},e.baselineVerbose=function(t){const e=m(t,"",{sup:s.LOCALE.MESSAGES.MS.SUPER,sub:s.LOCALE.MESSAGES.MS.SUB});return e?e.replace(new RegExp(s.LOCALE.MESSAGES.MS.SUB+"$"),s.LOCALE.MESSAGES.MS.SUBSCRIPT).replace(new RegExp(s.LOCALE.MESSAGES.MS.SUPER+"$"),s.LOCALE.MESSAGES.MS.SUPERSCRIPT):s.LOCALE.MESSAGES.MS.BASELINE},e.baselineBrief=function(t){return m(t,"",{sup:s.LOCALE.MESSAGES.MS.SUP,sub:s.LOCALE.MESSAGES.MS.SUB})||s.LOCALE.MESSAGES.MS.BASE},e.radicalNestingDepth=y,e.nestedRadical=g,e.getRootIndex=b,e.openingRadicalVerbose=function(t){return g(t,s.LOCALE.MESSAGES.MS.NESTED,s.LOCALE.MESSAGES.MS.STARTROOT)},e.closingRadicalVerbose=function(t){return g(t,s.LOCALE.MESSAGES.MS.NESTED,s.LOCALE.MESSAGES.MS.ENDROOT)},e.indexRadicalVerbose=function(t){return g(t,s.LOCALE.MESSAGES.MS.NESTED,s.LOCALE.MESSAGES.MS.ROOTINDEX)},e.openingRadicalBrief=function(t){return g(t,s.LOCALE.MESSAGES.MS.NEST_ROOT,s.LOCALE.MESSAGES.MS.STARTROOT)},e.closingRadicalBrief=function(t){return g(t,s.LOCALE.MESSAGES.MS.NEST_ROOT,s.LOCALE.MESSAGES.MS.ENDROOT)},e.indexRadicalBrief=function(t){return g(t,s.LOCALE.MESSAGES.MS.NEST_ROOT,s.LOCALE.MESSAGES.MS.ROOTINDEX)},e.openingRadicalSbrief=function(t){return g(t,s.LOCALE.MESSAGES.MS.NEST_ROOT,s.LOCALE.MESSAGES.MS.ROOT)},e.indexRadicalSbrief=function(t){return g(t,s.LOCALE.MESSAGES.MS.NEST_ROOT,s.LOCALE.MESSAGES.MS.INDEX)},e.underscoreNestingDepth=v,e.nestedUnderscript=function(t){const e=v(t);return Array(e).join(s.LOCALE.MESSAGES.MS.UNDER)+s.LOCALE.MESSAGES.MS.UNDERSCRIPT},e.overscoreNestingDepth=_,e.endscripts=function(t){return s.LOCALE.MESSAGES.MS.ENDSCRIPTS},e.nestedOverscript=function(t){const e=_(t);return Array(e).join(s.LOCALE.MESSAGES.MS.OVER)+s.LOCALE.MESSAGES.MS.OVERSCRIPT},e.determinantIsSimple=function(t){if("matrix"!==t.tagName||"determinant"!==t.getAttribute("role"))return[];const e=i.evalXPath("children/row/children/cell/children/*",t);for(let t,r=0;t=e[r];r++)if("number"!==t.tagName){if("identifier"===t.tagName){const e=t.getAttribute("role");if("latinletter"===e||"greekletter"===e||"otherletter"===e)continue}return[]}return[t]},e.generateBaselineConstraint=function(){const t=t=>t.map((t=>"ancestor::"+t)),e=t=>"not("+t+")",r=e(t(["subscript","superscript","tensor"]).join(" or ")),n=t(["relseq","multrel"]),o=t(["fraction","punctuation","fenced","sqrt","root"]);let i=[];for(let t,e=0;t=o[e];e++)i=i.concat(n.map((function(e){return t+"/"+e})));return[["ancestor::*/following-sibling::*",r,e(i.join(" | "))].join(" and ")]},e.removeParens=function(t){if(!t.childNodes.length||!t.childNodes[0].childNodes.length||!t.childNodes[0].childNodes[0].childNodes.length)return"";const e=t.childNodes[0].childNodes[0].childNodes[0].textContent;return e.match(/^\(.+\)$/)?e.slice(1,-1):e};const S=new Map([[3,"CSFleftsuperscript"],[4,"CSFleftsubscript"],[2,"CSFbaseline"],[1,"CSFrightsubscript"],[0,"CSFrightsuperscript"]]),M=new Map([[4,2],[3,3],[2,1],[1,4],[0,5]]);function O(t){const e=[];let r="",n="",o=parseInt(t,2);for(let t=0;t<5;t++){const i="children/*["+M.get(t)+"]";if(1&o){const e=S.get(t%5);r="[t] "+e+"Verbose; [n] "+i+";"+r,n="[t] "+e+"Brief; [n] "+i+";"+n}else e.unshift("name("+i+')="empty"');o>>=1}return[e,r,n]}e.generateTensorRules=function(t,e=!0){const r=["11111","11110","11101","11100","10111","10110","10101","10100","01111","01110","01101","01100"];for(let n,o=0;n=r[o];o++){let r="tensor"+n,[o,i,s]=O(n);t.defineRule(r,"default",i,"self::tensor",...o),e&&(t.defineRule(r,"brief",s,"self::tensor",...o),t.defineRule(r,"sbrief",s,"self::tensor",...o));const a=S.get(2);i+="; [t]"+a+"Verbose",s+="; [t]"+a+"Brief",r+="-baseline";const c="((.//*[not(*)])[last()]/@id)!=(((.//ancestor::fraction|ancestor::root|ancestor::sqrt|ancestor::cell|ancestor::line|ancestor::stree)[1]//*[not(*)])[last()]/@id)";t.defineRule(r,"default",i,"self::tensor",c,...o),e&&(t.defineRule(r,"brief",s,"self::tensor",c,...o),t.defineRule(r,"sbrief",s,"self::tensor",c,...o))}},e.smallRoot=function(t){let e=Object.keys(s.LOCALE.MESSAGES.MSroots).length;if(!e)return[];if(e++,!t.childNodes||0===t.childNodes.length||!t.childNodes[0].childNodes)return[];const r=t.childNodes[0].childNodes[0].textContent;if(!/^\d+$/.test(r))return[];const n=parseInt(r,10);return n>1&&n<=e?[t]:[]}},6922:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.implicitIterator=e.relationIterator=e.propagateNumber=e.checkParent_=e.NUMBER_INHIBITORS_=e.NUMBER_PROPAGATORS_=e.enlargeFence=e.indexRadical=e.closingRadical=e.openingRadical=e.radicalNestingDepth=e.nestedRadical=e.overBevelledFraction=e.overFraction=e.closingFraction=e.openingFraction=void 0;const n=r(7052),o=r(5740),i=r(5274),s=r(2105),a=r(5897),c=r(7630),l=r(9265),u=r(4356),p=r(1378);function h(t,e){const r=d(t);return 1===r?e:new Array(r).join(u.LOCALE.MESSAGES.MS.NESTED)+e}function d(t,e){const r=e||0;return t.parentNode?d(t.parentNode,"root"===t.tagName||"sqrt"===t.tagName?r+1:r):r}function f(t){const e="\u2820";if(1===t.length)return e+t;const r=t.split("");return r.every((function(t){return"\u2833"===t}))?e+r.join(e):t.slice(0,-1)+e+t.slice(-1)}function m(t,r){const n=t.parent;if(!n)return!1;const o=n.type;return-1!==e.NUMBER_PROPAGATORS_.indexOf(o)||"prefixop"===o&&"negative"===n.role&&!r.script||"prefixop"===o&&"geometry"===n.role||!("punctuated"!==o||r.enclosed&&"text"!==n.role)}function y(t,r){return t.childNodes.length?(-1!==e.NUMBER_INHIBITORS_.indexOf(t.type)&&(r.script=!0),"fenced"===t.type?(r.number=!1,r.enclosed=!0,["",r]):(m(t,r)&&(r.number=!0,r.enclosed=!1),["",r])):(m(t,r)&&(r.number=!0,r.script=!1,r.enclosed=!1),[r.number?"number":"",{number:!1,enclosed:r.enclosed,script:r.script}])}e.openingFraction=function(t){const e=p.fractionNestingDepth(t);return new Array(e).join(u.LOCALE.MESSAGES.MS.FRACTION_REPEAT)+u.LOCALE.MESSAGES.MS.FRACTION_START},e.closingFraction=function(t){const e=p.fractionNestingDepth(t);return new Array(e).join(u.LOCALE.MESSAGES.MS.FRACTION_REPEAT)+u.LOCALE.MESSAGES.MS.FRACTION_END},e.overFraction=function(t){const e=p.fractionNestingDepth(t);return new Array(e).join(u.LOCALE.MESSAGES.MS.FRACTION_REPEAT)+u.LOCALE.MESSAGES.MS.FRACTION_OVER},e.overBevelledFraction=function(t){const e=p.fractionNestingDepth(t);return new Array(e).join(u.LOCALE.MESSAGES.MS.FRACTION_REPEAT)+"\u2838"+u.LOCALE.MESSAGES.MS.FRACTION_OVER},e.nestedRadical=h,e.radicalNestingDepth=d,e.openingRadical=function(t){return h(t,u.LOCALE.MESSAGES.MS.STARTROOT)},e.closingRadical=function(t){return h(t,u.LOCALE.MESSAGES.MS.ENDROOT)},e.indexRadical=function(t){return h(t,u.LOCALE.MESSAGES.MS.ROOTINDEX)},e.enlargeFence=f,s.Grammar.getInstance().setCorrection("enlargeFence",f),e.NUMBER_PROPAGATORS_=["multirel","relseq","appl","row","line"],e.NUMBER_INHIBITORS_=["subscript","superscript","overscore","underscore"],e.checkParent_=m,e.propagateNumber=y,(0,c.register)(new l.SemanticVisitor("nemeth","number",y,{number:!0})),e.relationIterator=function(t,e){const r=t.slice(0);let s,c=!0;return s=t.length>0?i.evalXPath("../../content/*",t[0]):[],function(){const t=s.shift(),i=r.shift(),l=r[0],h=e?[n.AuditoryDescription.create({text:e},{translate:!0})]:[];if(!t)return h;const d=i?p.nestedSubSuper(i,"",{sup:u.LOCALE.MESSAGES.MS.SUPER,sub:u.LOCALE.MESSAGES.MS.SUB}):"",f=i&&"EMPTY"!==o.tagName(i)||c&&t.parentNode.parentNode&&t.parentNode.parentNode.previousSibling?[n.AuditoryDescription.create({text:"\u2800"+d},{})]:[],m=l&&"EMPTY"!==o.tagName(l)||!s.length&&t.parentNode.parentNode&&t.parentNode.parentNode.nextSibling?[n.AuditoryDescription.create({text:"\u2800"},{})]:[],y=a.default.evaluateNode(t);return c=!1,h.concat(f,y,m)}},e.implicitIterator=function(t,e){const r=t.slice(0);let s;return s=t.length>0?i.evalXPath("../../content/*",t[0]):[],function(){const t=r.shift(),i=r[0],a=s.shift(),c=e?[n.AuditoryDescription.create({text:e},{translate:!0})]:[];if(!a)return c;const l=t&&"NUMBER"===o.tagName(t),u=i&&"NUMBER"===o.tagName(i);return c.concat(l&&u&&"space"===a.getAttribute("role")?[n.AuditoryDescription.create({text:"\u2800"},{})]:[])}}},8437:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.ordinalPosition=e.vulgarFraction=e.wordCounter=e.ordinalCounter=void 0;const n=r(9536),o=r(5740),i=r(4356),s=r(4977);e.ordinalCounter=function(t,e){let r=0;return function(){return i.LOCALE.NUMBERS.numericOrdinal(++r)+" "+e}},e.wordCounter=function(t,e){let r=0;return function(){return i.LOCALE.NUMBERS.numberToOrdinal(++r,!1)+" "+e}},e.vulgarFraction=function(t){const e=(0,s.convertVulgarFraction)(t,i.LOCALE.MESSAGES.MS.FRAC_OVER);return e.convertible&&e.enumerator&&e.denominator?[new n.Span(i.LOCALE.NUMBERS.numberToWords(e.enumerator),{extid:t.childNodes[0].childNodes[0].getAttribute("extid"),separator:""}),new n.Span(i.LOCALE.NUMBERS.vulgarSep,{separator:""}),new n.Span(i.LOCALE.NUMBERS.numberToOrdinal(e.denominator,1!==e.enumerator),{extid:t.childNodes[0].childNodes[1].getAttribute("extid")})]:[new n.Span(e.content||"",{extid:t.getAttribute("extid")})]},e.ordinalPosition=function(t){const e=o.toArray(t.parentNode.childNodes);return i.LOCALE.NUMBERS.numericOrdinal(e.indexOf(t)+1).toString()}},9284:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.BrailleRules=e.OtherRules=e.PrefixRules=void 0;const n=r(1676),o=r(365),i=r(1378),s=r(6922),a=r(8437),c=r(7283);e.PrefixRules=function(){c.addStore("en.prefix.default","",{CSFordinalPosition:a.ordinalPosition})},e.OtherRules=function(){c.addStore("en.speech.chromevox","",{CTFnodeCounter:o.nodeCounter,CTFcontentIterator:o.contentIterator}),c.addStore("en.speech.emacspeak","en.speech.chromevox",{CQFvulgarFractionSmall:i.isSmallVulgarFraction,CSFvulgarFraction:a.vulgarFraction})},e.BrailleRules=function(){c.addStore("nemeth.braille.default",n.DynamicCstr.BASE_LOCALE+".speech.mathspeak",{CSFopenFraction:s.openingFraction,CSFcloseFraction:s.closingFraction,CSFoverFraction:s.overFraction,CSFoverBevFraction:s.overBevelledFraction,CSFopenRadical:s.openingRadical,CSFcloseRadical:s.closingRadical,CSFindexRadical:s.indexRadical,CSFsubscript:i.subscriptVerbose,CSFsuperscript:i.superscriptVerbose,CSFbaseline:i.baselineVerbose,CGFtensorRules:t=>i.generateTensorRules(t,!1),CTFrelationIterator:s.relationIterator,CTFimplicitIterator:s.implicitIterator})}},7599:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.init=e.INIT_=void 0;const n=r(5425),o=r(9577),i=r(9284);e.INIT_=!1,e.init=function(){e.INIT_||((0,o.MathspeakRules)(),(0,n.ClearspeakRules)(),(0,i.PrefixRules)(),(0,i.OtherRules)(),(0,i.BrailleRules)(),e.INIT_=!0)}},7283:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.getStore=e.addStore=e.funcStore=void 0;const n=r(1676);e.funcStore=new Map,e.addStore=function(t,r,n){const o={};if(r){const t=e.funcStore.get(r)||{};Object.assign(o,t)}e.funcStore.set(t,Object.assign(o,n))},e.getStore=function(t,r,o){return e.funcStore.get([t,r,o].join("."))||e.funcStore.get([n.DynamicCstr.DEFAULT_VALUES[n.Axis.LOCALE],r,o].join("."))||e.funcStore.get([n.DynamicCstr.BASE_LOCALE,r,o].join("."))||{}}},7598:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.oneLeft=e.leftMostUnit=e.rightMostUnit=e.unitMultipliers=void 0;const n=r(7052),o=r(5274),i=r(4356);e.unitMultipliers=function(t,e){const r=t;let o=0;return function(){const t=n.AuditoryDescription.create({text:a(r[o])&&c(r[o+1])?i.LOCALE.MESSAGES.unitTimes:""},{});return o++,[t]}};const s=["superscript","subscript","overscore","underscore"];function a(t){for(;t;){if("unit"===t.getAttribute("role"))return!0;const e=t.tagName,r=o.evalXPath("children/*",t);t=-1!==s.indexOf(e)?r[0]:r[r.length-1]}return!1}function c(t){for(;t;){if("unit"===t.getAttribute("role"))return!0;t=o.evalXPath("children/*",t)[0]}return!1}e.rightMostUnit=a,e.leftMostUnit=c,e.oneLeft=function(t){for(;t;){if("number"===t.tagName&&"1"===t.textContent)return[t];if("infixop"!==t.tagName||"multiplication"!==t.getAttribute("role")&&"implicit"!==t.getAttribute("role"))return[];t=o.evalXPath("children/*",t)[0]}return[]}},3284:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractWalker=void 0;const n=r(7052),o=r(8290),i=r(5740),s=r(4440),a=r(6828),c=r(8496),l=r(2298),u=r(4356),p=r(2105),h=r(5656),d=r(9552),f=r(9543),m=r(8504),y=r(7730),g=r(1214),b=r(179),v=r(1204),_=r(5274);class S{constructor(t,e,r,n){this.node=t,this.generator=e,this.highlighter=r,this.modifier=!1,this.keyMapping=new Map([[c.KeyCode.UP,this.up.bind(this)],[c.KeyCode.DOWN,this.down.bind(this)],[c.KeyCode.RIGHT,this.right.bind(this)],[c.KeyCode.LEFT,this.left.bind(this)],[c.KeyCode.TAB,this.repeat.bind(this)],[c.KeyCode.DASH,this.expand.bind(this)],[c.KeyCode.SPACE,this.depth.bind(this)],[c.KeyCode.HOME,this.home.bind(this)],[c.KeyCode.X,this.summary.bind(this)],[c.KeyCode.Z,this.detail.bind(this)],[c.KeyCode.V,this.virtualize.bind(this)],[c.KeyCode.P,this.previous.bind(this)],[c.KeyCode.U,this.undo.bind(this)],[c.KeyCode.LESS,this.previousRules.bind(this)],[c.KeyCode.GREATER,this.nextRules.bind(this)]]),this.cursors=[],this.xml_=null,this.rebuilt_=null,this.focus_=null,this.active_=!1,this.node.id?this.id=this.node.id:this.node.hasAttribute(S.SRE_ID_ATTR)?this.id=this.node.getAttribute(S.SRE_ID_ATTR):(this.node.setAttribute(S.SRE_ID_ATTR,S.ID_COUNTER.toString()),this.id=S.ID_COUNTER++),this.rootNode=v.getSemanticRoot(t),this.rootId=this.rootNode.getAttribute(l.Attribute.ID),this.xmlString_=n,this.moved=b.WalkerMoves.ENTER}getXml(){return this.xml_||(this.xml_=i.parseInput(this.xmlString_)),this.xml_}getRebuilt(){return this.rebuilt_||this.rebuildStree(),this.rebuilt_}isActive(){return this.active_}activate(){this.isActive()||(this.generator.start(),this.toggleActive_())}deactivate(){this.isActive()&&(b.WalkerState.setState(this.id,this.primaryId()),this.generator.end(),this.toggleActive_())}getFocus(t=!1){return this.focus_||(this.focus_=this.singletonFocus(this.rootId)),t&&this.updateFocus(),this.focus_}setFocus(t){this.focus_=t}getDepth(){return this.levels.depth()-1}isSpeech(){return this.generator.modality===l.Attribute.SPEECH}focusDomNodes(){return this.getFocus().getDomNodes()}focusSemanticNodes(){return this.getFocus().getSemanticNodes()}speech(){const t=this.focusDomNodes();if(!t.length)return"";const e=this.specialMove();if(null!==e)return e;switch(this.moved){case b.WalkerMoves.DEPTH:return this.depth_();case b.WalkerMoves.SUMMARY:return this.summary_();case b.WalkerMoves.DETAIL:return this.detail_();default:{const e=[],r=this.focusSemanticNodes();for(let n=0,o=t.length;n0}restoreState(){if(!this.highlighter)return;const t=b.WalkerState.getState(this.id);if(!t)return;let e=this.getRebuilt().nodeDict[t];const r=[];for(;e;)r.push(e.id),e=e.parent;for(r.pop();r.length>0;){this.down();const t=r.pop(),e=this.findFocusOnLevel(t);if(!e)break;this.setFocus(e)}this.moved=b.WalkerMoves.ENTER}updateFocus(){this.setFocus(y.Focus.factory(this.getFocus().getSemanticPrimary().id.toString(),this.getFocus().getSemanticNodes().map((t=>t.id.toString())),this.getRebuilt(),this.node))}rebuildStree(){this.rebuilt_=new g.RebuildStree(this.getXml()),this.rootId=this.rebuilt_.stree.root.id.toString(),this.generator.setRebuilt(this.rebuilt_),this.skeleton=h.SemanticSkeleton.fromTree(this.rebuilt_.stree),this.skeleton.populate(),this.focus_=this.singletonFocus(this.rootId),this.levels=this.initLevels(),f.connectMactions(this.node,this.getXml(),this.rebuilt_.xml)}previousLevel(){const t=this.getFocus().getDomPrimary();return t?v.getAttribute(t,l.Attribute.PARENT):this.getFocus().getSemanticPrimary().parent.id.toString()}nextLevel(){const t=this.getFocus().getDomPrimary();let e,r;if(t){e=v.splitAttribute(v.getAttribute(t,l.Attribute.CHILDREN)),r=v.splitAttribute(v.getAttribute(t,l.Attribute.CONTENT));const n=v.getAttribute(t,l.Attribute.TYPE),o=v.getAttribute(t,l.Attribute.ROLE);return this.combineContentChildren(n,o,r,e)}const n=t=>t.id.toString(),o=this.getRebuilt().nodeDict[this.primaryId()];return e=o.childNodes.map(n),r=o.contentNodes.map(n),0===e.length?[]:this.combineContentChildren(o.type,o.role,r,e)}singletonFocus(t){this.getRebuilt();const e=this.retrieveVisuals(t);return this.focusFromId(t,e)}retrieveVisuals(t){if(!this.skeleton)return[t];const e=parseInt(t,10),r=this.skeleton.subtreeNodes(e);if(!r.length)return[t];r.unshift(e);const n={},o=[];_.updateEvaluator(this.getXml());for(const t of r)n[t]||(o.push(t.toString()),n[t]=!0,this.subtreeIds(t,n));return o}subtreeIds(t,e){const r=_.evalXPath(`//*[@data-semantic-id="${t}"]`,this.getXml());_.evalXPath("*//@data-semantic-id",r[0]).forEach((t=>e[parseInt(t.textContent,10)]=!0))}focusFromId(t,e){return y.Focus.factory(t,e,this.getRebuilt(),this.node)}summary(){return this.moved=this.isSpeech()?b.WalkerMoves.SUMMARY:b.WalkerMoves.REPEAT,this.getFocus().clone()}detail(){return this.moved=this.isSpeech()?b.WalkerMoves.DETAIL:b.WalkerMoves.REPEAT,this.getFocus().clone()}specialMove(){return null}virtualize(t){return this.cursors.push({focus:this.getFocus(),levels:this.levels,undo:t||!this.cursors.length}),this.levels=this.levels.clone(),this.getFocus().clone()}previous(){const t=this.cursors.pop();return t?(this.levels=t.levels,t.focus):this.getFocus()}undo(){let t;do{t=this.cursors.pop()}while(t&&!t.undo);return t?(this.levels=t.levels,t.focus):this.getFocus()}update(t){this.generator.setOptions(t),(0,a.setup)(t).then((()=>d.generator("Tree").getSpeech(this.node,this.getXml())))}nextRules(){const t=this.generator.getOptions();return"speech"!==t.modality?this.getFocus():(s.DOMAIN_TO_STYLES[t.domain]=t.style,t.domain="mathspeak"===t.domain?"clearspeak":"mathspeak",t.style=s.DOMAIN_TO_STYLES[t.domain],this.update(t),this.moved=b.WalkerMoves.REPEAT,this.getFocus().clone())}nextStyle(t,e){if("mathspeak"===t){const t=["default","brief","sbrief"],r=t.indexOf(e);return-1===r?e:r>=t.length-1?t[0]:t[r+1]}if("clearspeak"===t){const t=m.ClearspeakPreferences.getLocalePreferences().en;if(!t)return"default";const r=m.ClearspeakPreferences.relevantPreferences(this.getFocus().getSemanticPrimary()),n=m.ClearspeakPreferences.findPreference(e,r),o=t[r].map((function(t){return t.split("_")[1]})),i=o.indexOf(n);if(-1===i)return e;const s=i>=o.length-1?o[0]:o[i+1];return m.ClearspeakPreferences.addPreference(e,r,s)}return e}previousRules(){const t=this.generator.getOptions();return"speech"!==t.modality?this.getFocus():(t.style=this.nextStyle(t.domain,t.style),this.update(t),this.moved=b.WalkerMoves.REPEAT,this.getFocus().clone())}refocus(){let t,e=this.getFocus();for(;!e.getNodes().length;){t=this.levels.peek();const r=this.up();if(!r)break;this.setFocus(r),e=this.getFocus(!0)}this.levels.push(t),this.setFocus(e)}toggleActive_(){this.active_=!this.active_}mergePrefix_(t,e=[]){const r=this.isSpeech()?this.prefix_():"";r&&t.unshift(r);const n=this.isSpeech()?this.postfix_():"";return n&&t.push(n),o.finalize(o.merge(e.concat(t)))}prefix_(){const t=this.getFocus().getDomNodes(),e=this.getFocus().getSemanticNodes();return t[0]?v.getAttribute(t[0],l.Attribute.PREFIX):f.retrievePrefix(e[0])}postfix_(){const t=this.getFocus().getDomNodes();return t[0]?v.getAttribute(t[0],l.Attribute.POSTFIX):""}depth_(){const t=p.Grammar.getInstance().getParameter("depth");p.Grammar.getInstance().setParameter("depth",!0);const e=this.getFocus().getDomPrimary(),r=this.expandable(e)?u.LOCALE.MESSAGES.navigate.EXPANDABLE:this.collapsible(e)?u.LOCALE.MESSAGES.navigate.COLLAPSIBLE:"",i=u.LOCALE.MESSAGES.navigate.LEVEL+" "+this.getDepth(),s=this.getFocus().getSemanticNodes(),a=f.retrievePrefix(s[0]),c=[new n.AuditoryDescription({text:i,personality:{}}),new n.AuditoryDescription({text:a,personality:{}}),new n.AuditoryDescription({text:r,personality:{}})];return p.Grammar.getInstance().setParameter("depth",t),o.finalize(o.markup(c))}actionable_(t){const e=null==t?void 0:t.parentNode;return e&&this.highlighter.isMactionNode(e)?e:null}summary_(){const t=this.getFocus().getSemanticPrimary().id.toString(),e=this.getRebuilt().xml.getAttribute("id")===t?this.getRebuilt().xml:i.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",t)[0],r=f.retrieveSummary(e);return this.mergePrefix_([r])}detail_(){const t=this.getFocus().getSemanticPrimary().id.toString(),e=this.getRebuilt().xml.getAttribute("id")===t?this.getRebuilt().xml:i.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",t)[0],r=e.getAttribute("alternative");e.removeAttribute("alternative");const n=f.computeMarkup(e),o=this.mergePrefix_([n]);return e.setAttribute("alternative",r),o}}e.AbstractWalker=S,S.ID_COUNTER=0,S.SRE_ID_ATTR="sre-explorer-id"},162:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.DummyWalker=void 0;const n=r(3284);class o extends n.AbstractWalker{up(){return null}down(){return null}left(){return null}right(){return null}repeat(){return null}depth(){return null}home(){return null}getDepth(){return 0}initLevels(){return null}combineContentChildren(t,e,r,n){return[]}findFocusOnLevel(t){return null}}e.DummyWalker=o},7730:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.Focus=void 0;const n=r(1204);class o{constructor(t,e){this.nodes=t,this.primary=e,this.domNodes=[],this.domPrimary_=null,this.allNodes=[]}static factory(t,e,r,i){const s=t=>n.getBySemanticId(i,t),a=r.nodeDict,c=s(t),l=e.map(s),u=e.map((function(t){return a[t]})),p=new o(u,a[t]);return p.domNodes=l,p.domPrimary_=c,p.allNodes=o.generateAllVisibleNodes_(e,l,a,i),p}static generateAllVisibleNodes_(t,e,r,i){const s=t=>n.getBySemanticId(i,t);let a=[];for(let n=0,c=t.length;n=e.length?null:e[t]}depth(){return this.level_.length}clone(){const t=new r;return t.level_=this.level_.slice(0),t}toString(){let t="";for(let e,r=0;e=this.level_[r];r++)t+="\n"+e.map((function(t){return t.toString()}));return t}}e.Levels=r},1214:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.RebuildStree=void 0;const n=r(5740),o=r(2298),i=r(3588),s=r(6537),a=r(3308),c=r(5656),l=r(7075),u=r(4795),p=r(1204);class h{constructor(t){this.mathml=t,this.factory=new s.SemanticNodeFactory,this.nodeDict={},this.mmlRoot=p.getSemanticRoot(t),this.streeRoot=this.assembleTree(this.mmlRoot),this.stree=l.SemanticTree.fromNode(this.streeRoot,this.mathml),this.xml=this.stree.xml(),a.default.getInstance().setNodeFactory(this.factory)}static addAttributes(t,e,r){r&&1===e.childNodes.length&&e.childNodes[0].nodeType!==n.NodeType.TEXT_NODE&&u.addAttributes(t,e.childNodes[0]),u.addAttributes(t,e)}static textContent(t,e,r){if(!r&&e.textContent)return void(t.textContent=e.textContent);const n=p.splitAttribute(p.getAttribute(e,o.Attribute.OPERATOR));n.length>1&&(t.textContent=n[1])}static isPunctuated(t){return!c.SemanticSkeleton.simpleCollapseStructure(t)&&t[1]&&c.SemanticSkeleton.contentCollapseStructure(t[1])}getTree(){return this.stree}assembleTree(t){const e=this.makeNode(t),r=p.splitAttribute(p.getAttribute(t,o.Attribute.CHILDREN)),n=p.splitAttribute(p.getAttribute(t,o.Attribute.CONTENT));if(h.addAttributes(e,t,!(r.length||n.length)),0===n.length&&0===r.length)return h.textContent(e,t),e;if(n.length>0){const t=p.getBySemanticId(this.mathml,n[0]);t&&h.textContent(e,t,!0)}e.contentNodes=n.map((t=>this.setParent(t,e))),e.childNodes=r.map((t=>this.setParent(t,e)));const i=p.getAttribute(t,o.Attribute.COLLAPSED);return i?this.postProcess(e,i):e}makeNode(t){const e=p.getAttribute(t,o.Attribute.TYPE),r=p.getAttribute(t,o.Attribute.ROLE),n=p.getAttribute(t,o.Attribute.FONT),i=p.getAttribute(t,o.Attribute.ANNOTATION)||"",s=p.getAttribute(t,o.Attribute.ID),a=p.getAttribute(t,o.Attribute.EMBELLISHED),c=p.getAttribute(t,o.Attribute.FENCEPOINTER),l=this.createNode(parseInt(s,10));return l.type=e,l.role=r,l.font=n||"unknown",l.parseAnnotation(i),c&&(l.fencePointer=c),a&&(l.embellished=a),l}makePunctuation(t){const e=this.createNode(t);return e.updateContent((0,i.invisibleComma)()),e.role="dummy",e}makePunctuated(t,e,r){const n=this.createNode(e[0]);n.type="punctuated",n.embellished=t.embellished,n.fencePointer=t.fencePointer,n.role=r;const o=e.splice(1,1)[0].slice(1);n.contentNodes=o.map(this.makePunctuation.bind(this)),this.collapsedChildren_(e)}makeEmpty(t,e,r){const n=this.createNode(e);n.type="empty",n.embellished=t.embellished,n.fencePointer=t.fencePointer,n.role=r}makeIndex(t,e,r){if(h.isPunctuated(e))return this.makePunctuated(t,e,r),void(e=e[0]);c.SemanticSkeleton.simpleCollapseStructure(e)&&!this.nodeDict[e.toString()]&&this.makeEmpty(t,e,r)}postProcess(t,e){const r=c.SemanticSkeleton.fromString(e).array;if("subsup"===t.type){const e=this.createNode(r[1][0]);return e.type="subscript",e.role="subsup",t.type="superscript",e.embellished=t.embellished,e.fencePointer=t.fencePointer,this.makeIndex(t,r[1][2],"rightsub"),this.makeIndex(t,r[2],"rightsuper"),this.collapsedChildren_(r),t}if("subscript"===t.type)return this.makeIndex(t,r[2],"rightsub"),this.collapsedChildren_(r),t;if("superscript"===t.type)return this.makeIndex(t,r[2],"rightsuper"),this.collapsedChildren_(r),t;if("tensor"===t.type)return this.makeIndex(t,r[2],"leftsub"),this.makeIndex(t,r[3],"leftsuper"),this.makeIndex(t,r[4],"rightsub"),this.makeIndex(t,r[5],"rightsuper"),this.collapsedChildren_(r),t;if("punctuated"===t.type){if(h.isPunctuated(r)){const e=r.splice(1,1)[0].slice(1);t.contentNodes=e.map(this.makePunctuation.bind(this))}return t}if("underover"===t.type){const e=this.createNode(r[1][0]);return"overaccent"===t.childNodes[1].role?(e.type="overscore",t.type="underscore"):(e.type="underscore",t.type="overscore"),e.role="underover",e.embellished=t.embellished,e.fencePointer=t.fencePointer,this.collapsedChildren_(r),t}return t}createNode(t){const e=this.factory.makeNode(t);return this.nodeDict[t.toString()]=e,e}collapsedChildren_(t){const e=t=>{const r=this.nodeDict[t[0]];r.childNodes=[];for(let n=1,o=t.length;ne.getSemanticPrimary().id===t))}}e.SemanticWalker=i},9806:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.SyntaxWalker=void 0;const n=r(707),o=r(3284),i=r(9797);class s extends o.AbstractWalker{constructor(t,e,r,n){super(t,e,r,n),this.node=t,this.generator=e,this.highlighter=r,this.levels=null,this.restoreState()}initLevels(){const t=new i.Levels;return t.push([this.primaryId()]),t}up(){super.up();const t=this.previousLevel();return t?(this.levels.pop(),this.singletonFocus(t)):null}down(){super.down();const t=this.nextLevel();if(0===t.length)return null;const e=this.singletonFocus(t[0]);return e&&this.levels.push(t),e}combineContentChildren(t,e,r,o){switch(t){case"relseq":case"infixop":case"multirel":return(0,n.interleaveLists)(o,r);case"prefixop":return r.concat(o);case"postfixop":return o.concat(r);case"matrix":case"vector":case"fenced":return o.unshift(r[0]),o.push(r[1]),o;case"cases":return o.unshift(r[0]),o;case"punctuated":return"text"===e?(0,n.interleaveLists)(o,r):o;case"appl":return[o[0],r[0],o[1]];case"root":return[o[1],o[0]];default:return o}}left(){super.left();const t=this.levels.indexOf(this.primaryId());if(null===t)return null;const e=this.levels.get(t-1);return e?this.singletonFocus(e):null}right(){super.right();const t=this.levels.indexOf(this.primaryId());if(null===t)return null;const e=this.levels.get(t+1);return e?this.singletonFocus(e):null}findFocusOnLevel(t){return this.singletonFocus(t.toString())}focusDomNodes(){return[this.getFocus().getDomPrimary()]}focusSemanticNodes(){return[this.getFocus().getSemanticPrimary()]}}e.SyntaxWalker=s},1799:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.TableWalker=void 0;const n=r(5740),o=r(8496),i=r(9806),s=r(179);class a extends i.SyntaxWalker{constructor(t,e,r,n){super(t,e,r,n),this.node=t,this.generator=e,this.highlighter=r,this.firstJump=null,this.key_=null,this.row_=0,this.currentTable_=null,this.keyMapping.set(o.KeyCode.ZERO,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.ONE,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.TWO,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.THREE,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.FOUR,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.FIVE,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.SIX,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.SEVEN,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.EIGHT,this.jumpCell.bind(this)),this.keyMapping.set(o.KeyCode.NINE,this.jumpCell.bind(this))}move(t){this.key_=t;const e=super.move(t);return this.modifier=!1,e}up(){return this.moved=s.WalkerMoves.UP,this.eligibleCell_()?this.verticalMove_(!1):super.up()}down(){return this.moved=s.WalkerMoves.DOWN,this.eligibleCell_()?this.verticalMove_(!0):super.down()}jumpCell(){if(!this.isInTable_()||null===this.key_)return this.getFocus();if(this.moved===s.WalkerMoves.ROW){this.moved=s.WalkerMoves.CELL;const t=this.key_-o.KeyCode.ZERO;return this.isLegalJump_(this.row_,t)?this.jumpCell_(this.row_,t):this.getFocus()}const t=this.key_-o.KeyCode.ZERO;return t>this.currentTable_.childNodes.length?this.getFocus():(this.row_=t,this.moved=s.WalkerMoves.ROW,this.getFocus().clone())}undo(){const t=super.undo();return t===this.firstJump&&(this.firstJump=null),t}eligibleCell_(){const t=this.getFocus().getSemanticPrimary();return this.modifier&&"cell"===t.type&&-1!==a.ELIGIBLE_CELL_ROLES.indexOf(t.role)}verticalMove_(t){const e=this.previousLevel();if(!e)return null;const r=this.getFocus(),n=this.levels.indexOf(this.primaryId()),o=this.levels.pop(),i=this.levels.indexOf(e),s=this.levels.get(t?i+1:i-1);if(!s)return this.levels.push(o),null;this.setFocus(this.singletonFocus(s));const a=this.nextLevel();return a[n]?(this.levels.push(a),this.singletonFocus(a[n])):(this.setFocus(r),this.levels.push(o),null)}jumpCell_(t,e){this.firstJump?this.virtualize(!1):(this.firstJump=this.getFocus(),this.virtualize(!0));const r=this.currentTable_.id.toString();let n;do{n=this.levels.pop()}while(-1===n.indexOf(r));this.levels.push(n),this.setFocus(this.singletonFocus(r)),this.levels.push(this.nextLevel());const o=this.currentTable_.childNodes[t-1];return this.setFocus(this.singletonFocus(o.id.toString())),this.levels.push(this.nextLevel()),this.singletonFocus(o.childNodes[e-1].id.toString())}isLegalJump_(t,e){const r=n.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",this.currentTable_.id.toString())[0];if(!r||r.hasAttribute("alternative"))return!1;const o=this.currentTable_.childNodes[t-1];if(!o)return!1;const i=n.querySelectorAllByAttrValue(r,"id",o.id.toString())[0];return!(!i||i.hasAttribute("alternative"))&&!(!o||!o.childNodes[e-1])}isInTable_(){let t=this.getFocus().getSemanticPrimary();for(;t;){if(-1!==a.ELIGIBLE_TABLE_TYPES.indexOf(t.type))return this.currentTable_=t,!0;t=t.parent}return!1}}e.TableWalker=a,a.ELIGIBLE_CELL_ROLES=["determinant","rowvector","binomial","squarematrix","multiline","matrix","vector","cases","table"],a.ELIGIBLE_TABLE_TYPES=["multiline","matrix","vector","cases","table"]},179:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.WalkerState=e.WalkerMoves=void 0,function(t){t.UP="up",t.DOWN="down",t.LEFT="left",t.RIGHT="right",t.REPEAT="repeat",t.DEPTH="depth",t.ENTER="enter",t.EXPAND="expand",t.HOME="home",t.SUMMARY="summary",t.DETAIL="detail",t.ROW="row",t.CELL="cell"}(e.WalkerMoves||(e.WalkerMoves={}));class r{static resetState(t){delete r.STATE[t]}static setState(t,e){r.STATE[t]=e}static getState(t){return r.STATE[t]}}e.WalkerState=r,r.STATE={}},3362:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.walkerMapping_=e.walker=void 0;const n=r(162),o=r(6295),i=r(9806),s=r(1799);e.walker=function(t,r,n,o,i){return(e.walkerMapping_[t.toLowerCase()]||e.walkerMapping_.dummy)(r,n,o,i)},e.walkerMapping_={dummy:(t,e,r,o)=>new n.DummyWalker(t,e,r,o),semantic:(t,e,r,n)=>new o.SemanticWalker(t,e,r,n),syntax:(t,e,r,n)=>new i.SyntaxWalker(t,e,r,n),table:(t,e,r,n)=>new s.TableWalker(t,e,r,n)}},1204:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.getBySemanticId=e.getSemanticRoot=e.getAttribute=e.splitAttribute=void 0;const n=r(5740),o=r(2298);e.splitAttribute=function(t){return t?t.split(/,/):[]},e.getAttribute=function(t,e){return t.getAttribute(e)},e.getSemanticRoot=function(t){if(t.hasAttribute(o.Attribute.TYPE)&&!t.hasAttribute(o.Attribute.PARENT))return t;const e=n.querySelectorAllByAttr(t,o.Attribute.TYPE);for(let t,r=0;t=e[r];r++)if(!t.hasAttribute(o.Attribute.PARENT))return t;return t},e.getBySemanticId=function(t,e){return t.getAttribute(o.Attribute.ID)===e?t:n.querySelectorAllByAttrValue(t,o.Attribute.ID,e)[0]}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}();var __webpack_exports__={};!function(){var t=__webpack_require__(9515),e=__webpack_require__(3282),r=__webpack_require__(235),n=__webpack_require__(265),o=__webpack_require__(2388);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o},i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,Q=0,T=e.length;Q=t.length&&(t=void 0),{value:t&&t[n++],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 a=r(4474),l=r(9259),c=r(7233),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(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 Q(e,t),e.prototype.assistiveMml=function(t,e){if(void 0===e&&(e=!1),!(this.state()>=a.STATE.ASSISTIVEMML)){if(!this.isEscaped&&(t.options.enableAssistiveMml||e)){var r=t.adaptor,n=t.toMML(this.root).replace(/\n */g,"").replace(//g,""),Q=r.firstChild(r.body(r.parse(n,"text/html"))),T=r.node("mjx-assistive-mml",{unselectable:"on",display:this.display?"block":"inline"},[Q]);r.setAttribute(r.firstChild(this.typesetRoot),"aria-hidden","true"),r.setStyle(this.typesetRoot,"position","relative"),r.append(this.typesetRoot,T)}this.state(a.STATE.ASSISTIVEMML)}},e}(t)}function h(t){var e;return e=function(t){function e(){for(var e=[],r=0;r0&&Q[Q.length-1])||6!==T[0]&&2!==T[0])){o=0;continue}if(3===T[0]&&(!Q||T[1]>Q[0]&&T[1]=t.length&&(t=void 0),{value:t&&t[n++],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 Q(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||t},e.prototype.body=function(t){return t.body||t},e.prototype.root=function(t){return t.documentElement||t},e.prototype.doctype=function(t){return t.doctype?""):""},e.prototype.tags=function(t,e,r){void 0===r&&(r=null);var n=r?t.getElementsByTagNameNS(r,e):t.getElementsByTagName(e);return Array.from(n)},e.prototype.getElements=function(t,e){var r,n,Q=[];try{for(var o=T(t),i=o.next();!i.done;i=o.next()){var s=i.value;"string"==typeof s?Q=Q.concat(Array.from(this.document.querySelectorAll(s))):Array.isArray(s)||s instanceof this.window.NodeList||s instanceof this.window.HTMLCollection?Q=Q.concat(Array.from(s)):Q.push(s)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return Q},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,n){return void 0===n&&(n=null),n?(e=n.replace(/.*\//,"")+":"+e.replace(/^.*:/,""),t.setAttributeNS(n,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,n;try{for(var Q=T(e.reverse()),o=Q.next();!o.done;o=Q.next()){var i=o.value;try{t.sheet.insertRule(i,0)}catch(t){console.warn("MathJax: can't insert css rule '".concat(i,"': ").concat(t.message))}}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=Q.return)&&n.call(Q)}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 n=t.getBBox();return[n.width/e,n.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 n=r(444);e.browserAdaptor=function(){return new n.HTMLAdaptor(window)}},9515:function(t,e,r){var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MathJax=e.combineWithMathJax=e.combineDefaults=e.combineConfig=e.isObject=void 0;var Q=r(3282);function T(t){return"object"==typeof t&&null!==t}function o(t,e){var r,Q;try{for(var i=n(Object.keys(e)),s=i.next();!s.done;s=i.next()){var a=s.value;"__esModule"!==a&&(!T(t[a])||!T(e[a])||e[a]instanceof Promise?null!==e[a]&&void 0!==e[a]&&(t[a]=e[a]):o(t[a],e[a]))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(Q=i.return)&&Q.call(i)}finally{if(r)throw r.error}}return t}e.isObject=T,e.combineConfig=o,e.combineDefaults=function t(e,r,Q){var o,i;e[r]||(e[r]={}),e=e[r];try{for(var s=n(Object.keys(Q)),a=s.next();!a.done;a=s.next()){var l=a.value;T(e[l])&&T(Q[l])?t(e,l,Q[l]):null==e[l]&&null!=Q[l]&&(e[l]=Q[l])}}catch(t){o={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return e},e.combineWithMathJax=function(t){return o(e.MathJax,t)},void 0===r.g.MathJax&&(r.g.MathJax={}),r.g.MathJax.version||(r.g.MathJax={version:Q.VERSION,_:{},config:r.g.MathJax}),e.MathJax=r.g.MathJax},235:function(t,e,r){var n,Q,T=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],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),s=r(265);Object.defineProperty(e,"Package",{enumerable:!0,get:function(){return s.Package}}),Object.defineProperty(e,"PackageError",{enumerable:!0,get:function(){return s.PackageError}});var a,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){var r=o.MathJax.version;t.versions=new Map,t.ready=function(){for(var t,e,r=[],n=0;n=t.length&&(t=void 0),{value:t&&t[n++],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 n,Q,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o},i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,Q=0,T=e.length;Q=t.length&&(t=void 0),{value:t&&t[n++],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 n,Q,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,Q=0,T=e.length;Q=t.length&&(t=void 0),{value:t&&t[n++],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 n=function(){function t(t){void 0===t&&(t=null),this.document=t}return t.prototype.node=function(t,e,n,Q){var T,o;void 0===e&&(e={}),void 0===n&&(n=[]);var i=this.create(t,Q);this.setAttributes(i,e);try{for(var s=r(n),a=s.next();!a.done;a=s.next()){var l=a.value;this.append(i,l)}}catch(t){T={error:t}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(T)throw T.error}}return i},t.prototype.setAttributes=function(t,e){var n,Q,T,o,i,s;if(e.style&&"string"!=typeof e.style)try{for(var a=r(Object.keys(e.style)),l=a.next();!l.done;l=a.next()){var c=l.value;this.setStyle(t,c.replace(/-([a-z])/g,(function(t,e){return e.toUpperCase()})),e.style[c])}}catch(t){n={error:t}}finally{try{l&&!l.done&&(Q=a.return)&&Q.call(a)}finally{if(n)throw n.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)),d=h.next();!d.done;d=h.next()){"style"===(c=d.value)&&"string"!=typeof e.style||"properties"===c||this.setAttribute(t,c,e[c])}}catch(t){i={error:t}}finally{try{d&&!d.done&&(s=h.return)&&s.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=n},3494:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractFindMath=void 0;var n=r(7233),Q=function(){function t(t){var e=this.constructor;this.options=(0,n.userOptions)((0,n.defaultOptions)({},e.OPTIONS),t)}return t.OPTIONS={},t}();e.AbstractFindMath=Q},3670:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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 Q(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 n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],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 Q(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 n=T(this),Q=n.next();!Q.done;Q=n.next()){var o=Q.value.item;if(o.handlesDocument(t))return o}}catch(t){e={error:t}}finally{try{Q&&!Q.done&&(r=n.return)&&r.call(n)}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 n=r(7233),Q=r(7525),T=function(){function t(t){void 0===t&&(t={}),this.adaptor=null,this.mmlFactory=null;var e=this.constructor;this.options=(0,n.userOptions)((0,n.defaultOptions)({},e.OPTIONS),t),this.preFilters=new Q.FunctionList,this.postFilters=new Q.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=t.length&&(t=void 0),{value:t&&t[n++],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 n,Q,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o},i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,Q=0,T=e.length;Q=e&&i.item.renderDoc(t))return}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=Q.return)&&n.call(Q)}finally{if(r)throw r.error}}},e.prototype.renderMath=function(t,e,r){var n,Q;void 0===r&&(r=u.STATE.UNPROCESSED);try{for(var o=T(this.items),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.priority>=r&&s.item.renderMath(t,e))return}}catch(t){n={error:t}}finally{try{i&&!i.done&&(Q=o.return)&&Q.call(o)}finally{if(n)throw n.error}}},e.prototype.renderConvert=function(t,e,r){var n,Q;void 0===r&&(r=u.STATE.LAST);try{for(var o=T(this.items),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.priority>r)return;if(s.item.convert&&s.item.renderMath(t,e))return}}catch(t){n={error:t}}finally{try{i&&!i.done&&(Q=o.return)&&Q.call(o)}finally{if(n)throw n.error}}},e.prototype.findID=function(t){var e,r;try{for(var n=T(this.items),Q=n.next();!Q.done;Q=n.next()){var o=Q.value;if(o.item.id===t)return o.item}}catch(t){e={error:t}}finally{try{Q&&!Q.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return null},e}(r(8666).PrioritizedList);e.RenderList=d,e.resetOptions={all:!1,processed:!1,inputJax:null,outputJax:null},e.resetAllOptions={all:!0,processed:!0,inputJax:[],outputJax:[]};var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),e.prototype.compile=function(t){return null},e}(a.AbstractInputJax),L=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(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 Q(e,t),e}(c.AbstractMathList),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),e}(u.AbstractMathItem),H=function(){function t(e,r,n){var Q=this,T=this.constructor;this.document=e,this.options=(0,s.userOptions)((0,s.defaultOptions)({},T.OPTIONS),n),this.math=new(this.options.MathList||m),this.renderActions=d.create(this.options.renderActions),this.processed=new t.ProcessBits,this.outputJax=this.options.OutputJax||new L;var o=this.options.InputJax||[new f];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(Q.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=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.INSERTED&&this.removeFromDocument(r),t=e.STATE.TYPESET&&(this.outputData={}),t=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 n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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 Q(e,t),e.prototype.isBefore=function(t,e){return t.start.i=t.length&&(t=void 0),{value:t&&t[n++],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 n=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,n=[],Q=0;Q=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MathMLVisitor=void 0;var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.document=null,e}return Q(e,t),e.prototype.visitTree=function(t,e){this.document=e;var r=e.createElement("top");return this.visitNode(t,r),this.document=null,r.firstChild},e.prototype.visitTextNode=function(t,e){e.appendChild(this.document.createTextNode(t.getText()))},e.prototype.visitXMLNode=function(t,e){e.appendChild(t.getXML().cloneNode(!0))},e.prototype.visitInferredMrowNode=function(t,e){var r,n;try{for(var Q=T(t.childNodes),o=Q.next();!o.done;o=Q.next()){var i=o.value;this.visitNode(i,e)}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=Q.return)&&n.call(Q)}finally{if(r)throw r.error}}},e.prototype.visitDefault=function(t,e){var r,n,Q=this.document.createElement(t.kind);this.addAttributes(t,Q);try{for(var o=T(t.childNodes),i=o.next();!i.done;i=o.next()){var s=i.value;this.visitNode(s,Q)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}e.appendChild(Q)},e.prototype.addAttributes=function(t,e){var r,n,Q=t.attributes,o=Q.getExplicitNames();try{for(var i=T(o),s=i.next();!s.done;s=i.next()){var a=s.value;e.setAttribute(a,Q.getExplicit(a).toString())}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e}(r(6325).MmlVisitor);e.MathMLVisitor=o},3909:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.MmlFactory=void 0;var T=r(7860),o=r(6336),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e.prototype,"MML",{get:function(){return this.node},enumerable:!1,configurable:!0}),e.defaultNodes=o.MML,e}(T.AbstractNodeFactory);e.MmlFactory=i},9007:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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,n=arguments.length;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,Q,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o};Object.defineProperty(e,"__esModule",{value:!0}),e.XMLNode=e.TextNode=e.AbstractMmlEmptyNode=e.AbstractMmlBaseNode=e.AbstractMmlLayoutNode=e.AbstractMmlTokenNode=e.AbstractMmlNode=e.indentAttributes=e.TEXCLASSNAMES=e.TEXCLASS=void 0;var s=r(91),a=r(4596);e.TEXCLASS={ORD:0,OP:1,BIN:2,REL:3,OPEN:4,CLOSE:5,PUNCT:6,INNER:7,VCENTER:8,NONE:-1},e.TEXCLASSNAMES=["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"];var l=["","thinmathspace","mediummathspace","thickmathspace"],c=[[0,-1,2,3,0,0,0,1],[-1,-1,0,3,0,0,0,1],[2,2,0,0,2,0,0,2],[3,3,0,0,3,0,0,3],[0,0,0,0,0,0,0,0],[0,-1,2,3,0,0,0,1],[1,1,0,1,1,1,1,1],[1,-1,2,3,1,0,1,1]];e.indentAttributes=["indentalign","indentalignfirst","indentshift","indentshiftfirst"];var u=function(t){function r(e,r,n){void 0===r&&(r={}),void 0===n&&(n=[]);var Q=t.call(this,e)||this;return Q.prevClass=null,Q.prevLevel=null,Q.texclass=null,Q.arity<0&&(Q.childNodes=[e.create("inferredMrow")],Q.childNodes[0].parent=Q),Q.setChildren(n),Q.attributes=new s.Attributes(e.getNodeClass(Q.kind).defaults,e.getNodeClass("math").defaults),Q.attributes.setList(r),Q}return Q(r,t),r.prototype.copy=function(t){var e,r,n,Q;void 0===t&&(t=!1);var i=this.factory.create(this.kind);if(i.properties=T({},this.properties),this.attributes){var s=this.attributes.getAllAttributes();try{for(var a=o(Object.keys(s)),l=a.next();!l.done;l=a.next()){var c=l.value;("id"!==c||t)&&i.attributes.set(c,s[c])}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}}if(this.childNodes&&this.childNodes.length){var u=this.childNodes;1===u.length&&u[0].isInferred&&(u=u[0].childNodes);try{for(var p=o(u),h=p.next();!h.done;h=p.next()){var d=h.value;d?i.appendChild(d.copy()):i.childNodes.push(null)}}catch(t){n={error:t}}finally{try{h&&!h.done&&(Q=p.return)&&Q.call(p)}finally{if(n)throw n.error}}}return i},Object.defineProperty(r.prototype,"texClass",{get:function(){return this.texclass},set:function(t){this.texclass=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isToken",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isEmbellished",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isSpacelike",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"linebreakContainer",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasNewLine",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"arity",{get:function(){return 1/0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isInferred",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Parent",{get:function(){for(var t=this.parent;t&&t.notParent;)t=t.Parent;return t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"notParent",{get:function(){return!1},enumerable:!1,configurable:!0}),r.prototype.setChildren=function(e){return this.arity<0?this.childNodes[0].setChildren(e):t.prototype.setChildren.call(this,e)},r.prototype.appendChild=function(e){var r,n,Q=this;if(this.arity<0)return this.childNodes[0].appendChild(e),e;if(e.isInferred){if(this.arity===1/0)return e.childNodes.forEach((function(e){return t.prototype.appendChild.call(Q,e)})),e;var T=e;(e=this.factory.create("mrow")).setChildren(T.childNodes),e.attributes=T.attributes;try{for(var i=o(T.getPropertyNames()),s=i.next();!s.done;s=i.next()){var a=s.value;e.setProperty(a,T.getProperty(a))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}return t.prototype.appendChild.call(this,e)},r.prototype.replaceChild=function(e,r){return this.arity<0?(this.childNodes[0].replaceChild(e,r),e):t.prototype.replaceChild.call(this,e,r)},r.prototype.core=function(){return this},r.prototype.coreMO=function(){return this},r.prototype.coreIndex=function(){return 0},r.prototype.childPosition=function(){for(var t,e,r=this,n=r.parent;n&&n.notParent;)r=n,n=n.parent;if(n){var Q=0;try{for(var T=o(n.childNodes),i=T.next();!i.done;i=T.next()){if(i.value===r)return Q;Q++}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=T.return)&&e.call(T)}finally{if(t)throw t.error}}}return null},r.prototype.setTeXclass=function(t){return this.getPrevClass(t),null!=this.texClass?this:t},r.prototype.updateTeXclass=function(t){t&&(this.prevClass=t.prevClass,this.prevLevel=t.prevLevel,t.prevClass=t.prevLevel=null,this.texClass=t.texClass)},r.prototype.getPrevClass=function(t){t&&(this.prevClass=t.texClass,this.prevLevel=t.attributes.get("scriptlevel"))},r.prototype.texSpacing=function(){var t=null!=this.prevClass?this.prevClass:e.TEXCLASS.NONE,r=this.texClass||e.TEXCLASS.ORD;if(t===e.TEXCLASS.NONE||r===e.TEXCLASS.NONE)return"";t===e.TEXCLASS.VCENTER&&(t=e.TEXCLASS.ORD),r===e.TEXCLASS.VCENTER&&(r=e.TEXCLASS.ORD);var n=c[t][r];return(this.prevLevel>0||this.attributes.get("scriptlevel")>0)&&n>=0?"":l[Math.abs(n)]},r.prototype.hasSpacingAttributes=function(){return this.isEmbellished&&this.coreMO().hasSpacingAttributes()},r.prototype.setInheritedAttributes=function(t,e,n,Q){var T,s;void 0===t&&(t={}),void 0===e&&(e=!1),void 0===n&&(n=0),void 0===Q&&(Q=!1);var a=this.attributes.getAllDefaults();try{for(var l=o(Object.keys(t)),c=l.next();!c.done;c=l.next()){var u=c.value;if(a.hasOwnProperty(u)||r.alwaysInherit.hasOwnProperty(u)){var p=i(t[u],2),h=p[0],d=p[1];((r.noInherit[h]||{})[this.kind]||{})[u]||this.attributes.setInherited(u,d)}}}catch(t){T={error:t}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(T)throw T.error}}void 0===this.attributes.getExplicit("displaystyle")&&this.attributes.setInherited("displaystyle",e),void 0===this.attributes.getExplicit("scriptlevel")&&this.attributes.setInherited("scriptlevel",n),Q&&this.setProperty("texprimestyle",Q);var f=this.arity;if(f>=0&&f!==1/0&&(1===f&&0===this.childNodes.length||1!==f&&this.childNodes.length!==f))if(f=0&&e!==1/0&&(1===e&&0===this.childNodes.length||1!==e&&this.childNodes.length!==e)&&this.mError('Wrong number of children for "'+this.kind+'" node',t,!0),this.verifyChildren(t)}},r.prototype.verifyAttributes=function(t){var e,r;if(t.checkAttributes){var n=this.attributes,Q=[];try{for(var T=o(n.getExplicitNames()),i=T.next();!i.done;i=T.next()){var s=i.value;"data-"===s.substr(0,5)||void 0!==n.getDefault(s)||s.match(/^(?:class|style|id|(?:xlink:)?href)$/)||Q.push(s)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=T.return)&&r.call(T)}finally{if(e)throw e.error}}Q.length&&this.mError("Unknown attributes for "+this.kind+" node: "+Q.join(", "),t)}},r.prototype.verifyChildren=function(t){var e,r;try{for(var n=o(this.childNodes),Q=n.next();!Q.done;Q=n.next()){Q.value.verifyTree(t)}}catch(t){e={error:t}}finally{try{Q&&!Q.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},r.prototype.mError=function(t,e,r){if(void 0===r&&(r=!1),this.parent&&this.parent.isKind("merror"))return null;var n=this.factory.create("merror");if(n.attributes.set("data-mjx-message",t),e.fullErrors||r){var Q=this.factory.create("mtext"),T=this.factory.create("text");T.setText(e.fullErrors?t:this.kind),Q.appendChild(T),n.appendChild(Q),this.parent.replaceChild(n,this)}else this.parent.replaceChild(n,this),n.appendChild(this);return n},r.defaults={mathbackground:s.INHERIT,mathcolor:s.INHERIT,mathsize:s.INHERIT,dir:s.INHERIT},r.noInherit={mstyle:{mpadded:{width:!0,height:!0,depth:!0,lspace:!0,voffset:!0},mtable:{width:!0,height:!0,depth:!0,align:!0}},maligngroup:{mrow:{groupalign:!0},mtable:{groupalign:!0}}},r.alwaysInherit={scriptminsize:!0,scriptsizemultiplier:!0},r.verifyDefaults={checkArity:!0,checkAttributes:!1,fullErrors:!1,fixMmultiscripts:!0,fixMtables:!0},r}(a.AbstractNode);e.AbstractMmlNode=u;var p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e.prototype,"isToken",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.getText=function(){var t,e,r="";try{for(var n=o(this.childNodes),Q=n.next();!Q.done;Q=n.next()){var T=Q.value;T instanceof L&&(r+=T.getText())}}catch(e){t={error:e}}finally{try{Q&&!Q.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},e.prototype.setChildInheritedAttributes=function(t,e,r,n){var Q,T;try{for(var i=o(this.childNodes),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof u&&a.setInheritedAttributes(t,e,r,n)}}catch(t){Q={error:t}}finally{try{s&&!s.done&&(T=i.return)&&T.call(i)}finally{if(Q)throw Q.error}}},e.prototype.walkTree=function(t,e){var r,n;t(this,e);try{for(var Q=o(this.childNodes),T=Q.next();!T.done;T=Q.next()){var i=T.value;i instanceof u&&i.walkTree(t,e)}}catch(t){r={error:t}}finally{try{T&&!T.done&&(n=Q.return)&&n.call(Q)}finally{if(r)throw r.error}}return e},e.defaults=T(T({},u.defaults),{mathvariant:"normal",mathsize:s.INHERIT}),e}(u);e.AbstractMmlTokenNode=p;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e.prototype,"isSpacelike",{get:function(){return this.childNodes[0].isSpacelike},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmbellished",{get:function(){return this.childNodes[0].isEmbellished},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return-1},enumerable:!1,configurable:!0}),e.prototype.core=function(){return this.childNodes[0]},e.prototype.coreMO=function(){return this.childNodes[0].coreMO()},e.prototype.setTeXclass=function(t){return t=this.childNodes[0].setTeXclass(t),this.updateTeXclass(this.childNodes[0]),t},e.defaults=u.defaults,e}(u);e.AbstractMmlLayoutNode=h;var d=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return Q(r,t),Object.defineProperty(r.prototype,"isEmbellished",{get:function(){return this.childNodes[0].isEmbellished},enumerable:!1,configurable:!0}),r.prototype.core=function(){return this.childNodes[0]},r.prototype.coreMO=function(){return this.childNodes[0].coreMO()},r.prototype.setTeXclass=function(t){var r,n;this.getPrevClass(t),this.texClass=e.TEXCLASS.ORD;var Q=this.childNodes[0];Q?this.isEmbellished||Q.isKind("mi")?(t=Q.setTeXclass(t),this.updateTeXclass(this.core())):(Q.setTeXclass(null),t=this):t=this;try{for(var T=o(this.childNodes.slice(1)),i=T.next();!i.done;i=T.next()){var s=i.value;s&&s.setTeXclass(null)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=T.return)&&n.call(T)}finally{if(r)throw r.error}}return t},r.defaults=u.defaults,r}(u);e.AbstractMmlBaseNode=d;var f=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return Q(r,t),Object.defineProperty(r.prototype,"isToken",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isEmbellished",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isSpacelike",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"linebreakContainer",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasNewLine",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"arity",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isInferred",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"notParent",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Parent",{get:function(){return this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"texClass",{get:function(){return e.TEXCLASS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"prevClass",{get:function(){return e.TEXCLASS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"prevLevel",{get:function(){return 0},enumerable:!1,configurable:!0}),r.prototype.hasSpacingAttributes=function(){return!1},Object.defineProperty(r.prototype,"attributes",{get:function(){return null},enumerable:!1,configurable:!0}),r.prototype.core=function(){return this},r.prototype.coreMO=function(){return this},r.prototype.coreIndex=function(){return 0},r.prototype.childPosition=function(){return 0},r.prototype.setTeXclass=function(t){return t},r.prototype.texSpacing=function(){return""},r.prototype.setInheritedAttributes=function(t,e,r,n){},r.prototype.inheritAttributesFrom=function(t){},r.prototype.verifyTree=function(t){},r.prototype.mError=function(t,e,r){return void 0===r&&(r=!1),null},r}(a.AbstractEmptyNode);e.AbstractMmlEmptyNode=f;var L=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.text="",e}return Q(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"text"},enumerable:!1,configurable:!0}),e.prototype.getText=function(){return this.text},e.prototype.setText=function(t){return this.text=t,this},e.prototype.copy=function(){return this.factory.create(this.kind).setText(this.getText())},e.prototype.toString=function(){return this.text},e}(f);e.TextNode=L;var m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.xml=null,e.adaptor=null,e}return Q(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"XML"},enumerable:!1,configurable:!0}),e.prototype.getXML=function(){return this.xml},e.prototype.setXML=function(t,e){return void 0===e&&(e=null),this.xml=t,this.adaptor=e,this},e.prototype.getSerializedXML=function(){return this.adaptor.serializeXML(this.xml)},e.prototype.copy=function(){return this.factory.create(this.kind).setXML(this.adaptor.clone(this.xml))},e.prototype.toString=function(){return"XML data"},e}(f);e.XMLNode=m},3948:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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,n=arguments.length;rthis.childNodes.length&&(t=1),this.attributes.set("selection",t)},e.defaults=T(T({},o.AbstractMmlNode.defaults),{actiontype:"toggle",selection:1}),e}(o.AbstractMmlNode);e.MmlMaction=i},142:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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,n=arguments.length;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MmlMfenced=void 0;var i=r(9007),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.texclass=i.TEXCLASS.INNER,e.separators=[],e.open=null,e.close=null,e}return Q(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mfenced"},enumerable:!1,configurable:!0}),e.prototype.setTeXclass=function(t){this.getPrevClass(t),this.open&&(t=this.open.setTeXclass(t)),this.childNodes[0]&&(t=this.childNodes[0].setTeXclass(t));for(var e=1,r=this.childNodes.length;e=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MmlMfrac=void 0;var i=r(9007),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mfrac"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linebreakContainer",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.setTeXclass=function(t){var e,r;this.getPrevClass(t);try{for(var n=o(this.childNodes),Q=n.next();!Q.done;Q=n.next()){Q.value.setTeXclass(null)}}catch(t){e={error:t}}finally{try{Q&&!Q.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},e.prototype.setChildInheritedAttributes=function(t,e,r,n){(!e||r>0)&&r++,this.childNodes[0].setInheritedAttributes(t,!1,r,n),this.childNodes[1].setInheritedAttributes(t,!1,r,!0)},e.defaults=T(T({},i.AbstractMmlBaseNode.defaults),{linethickness:"medium",numalign:"center",denomalign:"center",bevelled:!1}),e}(i.AbstractMmlBaseNode);e.MmlMfrac=s},3985:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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,n=arguments.length;r1&&r.match(e.operatorName)&&"normal"===this.attributes.get("mathvariant")&&void 0===this.getProperty("autoOP")&&void 0===this.getProperty("texClass")&&(this.texClass=o.TEXCLASS.OP,this.setProperty("autoOP",!0)),this},e.defaults=T({},o.AbstractMmlTokenNode.defaults),e.operatorName=/^[a-z][a-z0-9]*$/i,e.singleCharacter=/^[\uD800-\uDBFF]?.[\u0300-\u036F\u1AB0-\u1ABE\u1DC0-\u1DFF\u20D0-\u20EF]*$/,e}(o.AbstractMmlTokenNode);e.MmlMi=i},6405:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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,n=arguments.length;r0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o},i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MmlMo=void 0;var s=r(9007),a=r(4082),l=r(505),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._texClass=null,e.lspace=5/18,e.rspace=5/18,e}return Q(e,t),Object.defineProperty(e.prototype,"texClass",{get:function(){if(null===this._texClass){var t=this.getText(),e=o(this.handleExplicitForm(this.getForms()),3),r=e[0],n=e[1],Q=e[2],T=this.constructor.OPTABLE,i=T[r][t]||T[n][t]||T[Q][t];return i?i[2]:s.TEXCLASS.REL}return this._texClass},set:function(t){this._texClass=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"kind",{get:function(){return"mo"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmbellished",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasNewLine",{get:function(){return"newline"===this.attributes.get("linebreak")},enumerable:!1,configurable:!0}),e.prototype.coreParent=function(){for(var t=this,e=this,r=this.factory.getNodeClass("math");e&&e.isEmbellished&&e.coreMO()===this&&!(e instanceof r);)t=e,e=e.parent;return t},e.prototype.coreText=function(t){if(!t)return"";if(t.isEmbellished)return t.coreMO().getText();for(;((t.isKind("mrow")||t.isKind("TeXAtom")&&t.texClass!==s.TEXCLASS.VCENTER||t.isKind("mstyle")||t.isKind("mphantom"))&&1===t.childNodes.length||t.isKind("munderover"))&&t.childNodes[0];)t=t.childNodes[0];return t.isToken?t.getText():""},e.prototype.hasSpacingAttributes=function(){return this.attributes.isSet("lspace")||this.attributes.isSet("rspace")},Object.defineProperty(e.prototype,"isAccent",{get:function(){var t=!1,e=this.coreParent().parent;if(e){var r=e.isKind("mover")?e.childNodes[e.over].coreMO()?"accent":"":e.isKind("munder")?e.childNodes[e.under].coreMO()?"accentunder":"":e.isKind("munderover")?this===e.childNodes[e.over].coreMO()?"accent":this===e.childNodes[e.under].coreMO()?"accentunder":"":"";if(r)t=void 0!==e.attributes.getExplicit(r)?t:this.attributes.get("accent")}return t},enumerable:!1,configurable:!0}),e.prototype.setTeXclass=function(t){var e=this.attributes.getList("form","fence"),r=e.form,n=e.fence;return void 0===this.getProperty("texClass")&&(this.attributes.isSet("lspace")||this.attributes.isSet("rspace"))?null:(n&&this.texClass===s.TEXCLASS.REL&&("prefix"===r&&(this.texClass=s.TEXCLASS.OPEN),"postfix"===r&&(this.texClass=s.TEXCLASS.CLOSE)),this.adjustTeXclass(t))},e.prototype.adjustTeXclass=function(t){var e=this.texClass,r=this.prevClass;if(e===s.TEXCLASS.NONE)return t;if(t?(!t.getProperty("autoOP")||e!==s.TEXCLASS.BIN&&e!==s.TEXCLASS.REL||(r=t.texClass=s.TEXCLASS.ORD),r=this.prevClass=t.texClass||s.TEXCLASS.ORD,this.prevLevel=this.attributes.getInherited("scriptlevel")):r=this.prevClass=s.TEXCLASS.NONE,e!==s.TEXCLASS.BIN||r!==s.TEXCLASS.NONE&&r!==s.TEXCLASS.BIN&&r!==s.TEXCLASS.OP&&r!==s.TEXCLASS.REL&&r!==s.TEXCLASS.OPEN&&r!==s.TEXCLASS.PUNCT)if(r!==s.TEXCLASS.BIN||e!==s.TEXCLASS.REL&&e!==s.TEXCLASS.CLOSE&&e!==s.TEXCLASS.PUNCT){if(e===s.TEXCLASS.BIN){for(var n=this,Q=this.parent;Q&&Q.parent&&Q.isEmbellished&&(1===Q.childNodes.length||!Q.isKind("mrow")&&Q.core()===n);)n=Q,Q=Q.parent;Q.childNodes[Q.childNodes.length-1]===n&&(this.texClass=s.TEXCLASS.ORD)}}else t.texClass=this.prevClass=s.TEXCLASS.ORD;else this.texClass=s.TEXCLASS.ORD;return this},e.prototype.setInheritedAttributes=function(e,r,n,Q){void 0===e&&(e={}),void 0===r&&(r=!1),void 0===n&&(n=0),void 0===Q&&(Q=!1),t.prototype.setInheritedAttributes.call(this,e,r,n,Q);var T=this.getText();this.checkOperatorTable(T),this.checkPseudoScripts(T),this.checkPrimes(T),this.checkMathAccent(T)},e.prototype.checkOperatorTable=function(t){var e,r,n=o(this.handleExplicitForm(this.getForms()),3),Q=n[0],T=n[1],s=n[2];this.attributes.setInherited("form",Q);var l=this.constructor.OPTABLE,c=l[Q][t]||l[T][t]||l[s][t];if(c){void 0===this.getProperty("texClass")&&(this.texClass=c[2]);try{for(var u=i(Object.keys(c[3]||{})),p=u.next();!p.done;p=u.next()){var h=p.value;this.attributes.setInherited(h,c[3][h])}}catch(t){e={error:t}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}this.lspace=(c[0]+1)/18,this.rspace=(c[1]+1)/18}else{var d=(0,a.getRange)(t);if(d){void 0===this.getProperty("texClass")&&(this.texClass=d[2]);var f=this.constructor.MMLSPACING[d[2]];this.lspace=(f[0]+1)/18,this.rspace=(f[1]+1)/18}}},e.prototype.getForms=function(){for(var t=this,e=this.parent,r=this.Parent;r&&r.isEmbellished;)t=e,e=r.parent,r=r.Parent;if(e&&e.isKind("mrow")&&1!==e.nonSpaceLength()){if(e.firstNonSpace()===t)return["prefix","infix","postfix"];if(e.lastNonSpace()===t)return["postfix","infix","prefix"]}return["infix","prefix","postfix"]},e.prototype.handleExplicitForm=function(t){if(this.attributes.isSet("form")){var e=this.attributes.get("form");t=[e].concat(t.filter((function(t){return t!==e})))}return t},e.prototype.checkPseudoScripts=function(t){var e=this.constructor.pseudoScripts;if(t.match(e)){var r=this.coreParent().Parent,n=!r||!(r.isKind("msubsup")&&!r.isKind("msub"));this.setProperty("pseudoscript",n),n&&(this.attributes.setInherited("lspace",0),this.attributes.setInherited("rspace",0))}},e.prototype.checkPrimes=function(t){var e=this.constructor.primes;if(t.match(e)){var r=this.constructor.remapPrimes,n=(0,l.unicodeString)((0,l.unicodeChars)(t).map((function(t){return r[t]})));this.setProperty("primes",n)}},e.prototype.checkMathAccent=function(t){var e=this.Parent;if(void 0===this.getProperty("mathaccent")&&e&&e.isKind("munderover")){var r=e.childNodes[0];if(!r.isEmbellished||r.coreMO()!==this){var n=this.constructor.mathaccents;t.match(n)&&this.setProperty("mathaccent",!0)}}},e.defaults=T(T({},s.AbstractMmlTokenNode.defaults),{form:"infix",fence:!1,separator:!1,lspace:"thickmathspace",rspace:"thickmathspace",stretchy:!1,symmetric:!1,maxsize:"infinity",minsize:"0em",largeop:!1,movablelimits:!1,accent:!1,linebreak:"auto",lineleading:"1ex",linebreakstyle:"before",indentalign:"auto",indentshift:"0",indenttarget:"",indentalignfirst:"indentalign",indentshiftfirst:"indentshift",indentalignlast:"indentalign",indentshiftlast:"indentshift"}),e.MMLSPACING=a.MMLSPACING,e.OPTABLE=a.OPTABLE,e.pseudoScripts=new RegExp(["^[\"'*`","\xaa","\xb0","\xb2-\xb4","\xb9","\xba","\u2018-\u201f","\u2032-\u2037\u2057","\u2070\u2071","\u2074-\u207f","\u2080-\u208e","]+$"].join("")),e.primes=new RegExp(["^[\"'`","\u2018-\u201f","]+$"].join("")),e.remapPrimes={34:8243,39:8242,96:8245,8216:8245,8217:8242,8218:8242,8219:8245,8220:8246,8221:8243,8222:8243,8223:8246},e.mathaccents=new RegExp(["^[","\xb4\u0301\u02ca","`\u0300\u02cb","\xa8\u0308","~\u0303\u02dc","\xaf\u0304\u02c9","\u02d8\u0306","\u02c7\u030c","^\u0302\u02c6","\u2192\u20d7","\u02d9\u0307","\u02da\u030a","\u20db","\u20dc","]$"].join("")),e}(s.AbstractMmlTokenNode);e.MmlMo=c},7238:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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,n=arguments.length;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MmlInferredMrow=e.MmlMrow=void 0;var i=r(9007),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._core=null,e}return Q(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mrow"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSpacelike",{get:function(){var t,e;try{for(var r=o(this.childNodes),n=r.next();!n.done;n=r.next()){if(!n.value.isSpacelike)return!1}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmbellished",{get:function(){var t,e,r=!1,n=0;try{for(var Q=o(this.childNodes),T=Q.next();!T.done;T=Q.next()){var i=T.value;if(i)if(i.isEmbellished){if(r)return!1;r=!0,this._core=n}else if(!i.isSpacelike)return!1;n++}}catch(e){t={error:e}}finally{try{T&&!T.done&&(e=Q.return)&&e.call(Q)}finally{if(t)throw t.error}}return r},enumerable:!1,configurable:!0}),e.prototype.core=function(){return this.isEmbellished&&null!=this._core?this.childNodes[this._core]:this},e.prototype.coreMO=function(){return this.isEmbellished&&null!=this._core?this.childNodes[this._core].coreMO():this},e.prototype.nonSpaceLength=function(){var t,e,r=0;try{for(var n=o(this.childNodes),Q=n.next();!Q.done;Q=n.next()){var T=Q.value;T&&!T.isSpacelike&&r++}}catch(e){t={error:e}}finally{try{Q&&!Q.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},e.prototype.firstNonSpace=function(){var t,e;try{for(var r=o(this.childNodes),n=r.next();!n.done;n=r.next()){var Q=n.value;if(Q&&!Q.isSpacelike)return Q}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return null},e.prototype.lastNonSpace=function(){for(var t=this.childNodes.length;--t>=0;){var e=this.childNodes[t];if(e&&!e.isSpacelike)return e}return null},e.prototype.setTeXclass=function(t){var e,r,n,Q;if(null!=this.getProperty("open")||null!=this.getProperty("close")){this.getPrevClass(t),t=null;try{for(var T=o(this.childNodes),s=T.next();!s.done;s=T.next()){t=s.value.setTeXclass(t)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=T.return)&&r.call(T)}finally{if(e)throw e.error}}null==this.texClass&&(this.texClass=i.TEXCLASS.INNER)}else{try{for(var a=o(this.childNodes),l=a.next();!l.done;l=a.next()){t=l.value.setTeXclass(t)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(Q=a.return)&&Q.call(a)}finally{if(n)throw n.error}}this.childNodes[0]&&this.updateTeXclass(this.childNodes[0])}return t},e.defaults=T({},i.AbstractMmlNode.defaults),e}(i.AbstractMmlNode);e.MmlMrow=s;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"inferredMrow"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInferred",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"notParent",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"["+this.childNodes.join(",")+"]"},e.defaults=s.defaults,e}(s);e.MmlInferredMrow=a},7265:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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,n=arguments.length;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MmlMtable=void 0;var i=r(9007),s=r(505),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.properties={useHeight:!0},e.texclass=i.TEXCLASS.ORD,e}return Q(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mtable"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linebreakContainer",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.setInheritedAttributes=function(e,r,n,Q){var T,s;try{for(var a=o(i.indentAttributes),l=a.next();!l.done;l=a.next()){var c=l.value;e[c]&&this.attributes.setInherited(c,e[c][1]),void 0!==this.attributes.getExplicit(c)&&delete this.attributes.getAllAttributes()[c]}}catch(t){T={error:t}}finally{try{l&&!l.done&&(s=a.return)&&s.call(a)}finally{if(T)throw T.error}}t.prototype.setInheritedAttributes.call(this,e,r,n,Q)},e.prototype.setChildInheritedAttributes=function(t,e,r,n){var Q,T,i,a;try{for(var l=o(this.childNodes),c=l.next();!c.done;c=l.next()){(f=c.value).isKind("mtr")||this.replaceChild(this.factory.create("mtr"),f).appendChild(f)}}catch(t){Q={error:t}}finally{try{c&&!c.done&&(T=l.return)&&T.call(l)}finally{if(Q)throw Q.error}}r=this.getProperty("scriptlevel")||r,e=!(!this.attributes.getExplicit("displaystyle")&&!this.attributes.getDefault("displaystyle")),t=this.addInheritedAttributes(t,{columnalign:this.attributes.get("columnalign"),rowalign:"center"});var u=this.attributes.getExplicit("data-cramped"),p=(0,s.split)(this.attributes.get("rowalign"));try{for(var h=o(this.childNodes),d=h.next();!d.done;d=h.next()){var f=d.value;t.rowalign[1]=p.shift()||t.rowalign[1],f.setInheritedAttributes(t,e,r,!!u)}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}},e.prototype.verifyChildren=function(e){for(var r=null,n=this.factory,Q=0;Q=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MmlMlabeledtr=e.MmlMtr=void 0;var i=r(9007),s=r(91),a=r(505),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mtr"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linebreakContainer",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.setChildInheritedAttributes=function(t,e,r,n){var Q,T,i,s;try{for(var l=o(this.childNodes),c=l.next();!c.done;c=l.next()){(d=c.value).isKind("mtd")||this.replaceChild(this.factory.create("mtd"),d).appendChild(d)}}catch(t){Q={error:t}}finally{try{c&&!c.done&&(T=l.return)&&T.call(l)}finally{if(Q)throw Q.error}}var u=(0,a.split)(this.attributes.get("columnalign"));1===this.arity&&u.unshift(this.parent.attributes.get("side")),t=this.addInheritedAttributes(t,{rowalign:this.attributes.get("rowalign"),columnalign:"center"});try{for(var p=o(this.childNodes),h=p.next();!h.done;h=p.next()){var d=h.value;t.columnalign[1]=u.shift()||t.columnalign[1],d.setInheritedAttributes(t,e,r,n)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}},e.prototype.verifyChildren=function(e){var r,n;if(!this.parent||this.parent.isKind("mtable")){try{for(var Q=o(this.childNodes),T=Q.next();!T.done;T=Q.next()){var i=T.value;if(!i.isKind("mtd"))this.replaceChild(this.factory.create("mtd"),i).appendChild(i),e.fixMtables||i.mError("Children of "+this.kind+" must be mtd",e)}}catch(t){r={error:t}}finally{try{T&&!T.done&&(n=Q.return)&&n.call(Q)}finally{if(r)throw r.error}}t.prototype.verifyChildren.call(this,e)}else this.mError(this.kind+" can only be a child of an mtable",e,!0)},e.prototype.setTeXclass=function(t){var e,r;this.getPrevClass(t);try{for(var n=o(this.childNodes),Q=n.next();!Q.done;Q=n.next()){Q.value.setTeXclass(null)}}catch(t){e={error:t}}finally{try{Q&&!Q.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this},e.defaults=T(T({},i.AbstractMmlNode.defaults),{rowalign:s.INHERIT,columnalign:s.INHERIT,groupalign:s.INHERIT}),e}(i.AbstractMmlNode);e.MmlMtr=l;var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"mlabeledtr"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arity",{get:function(){return 1},enumerable:!1,configurable:!0}),e}(l);e.MmlMlabeledtr=c},5184:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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,n=arguments.length;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.OPTABLE=e.MMLSPACING=e.getRange=e.RANGES=e.MO=e.OPDEF=void 0;var Q=r(9007);function T(t,e,r,n){return void 0===r&&(r=Q.TEXCLASS.BIN),void 0===n&&(n=null),[t,e,r,n]}e.OPDEF=T,e.MO={ORD:T(0,0,Q.TEXCLASS.ORD),ORD11:T(1,1,Q.TEXCLASS.ORD),ORD21:T(2,1,Q.TEXCLASS.ORD),ORD02:T(0,2,Q.TEXCLASS.ORD),ORD55:T(5,5,Q.TEXCLASS.ORD),NONE:T(0,0,Q.TEXCLASS.NONE),OP:T(1,2,Q.TEXCLASS.OP,{largeop:!0,movablelimits:!0,symmetric:!0}),OPFIXED:T(1,2,Q.TEXCLASS.OP,{largeop:!0,movablelimits:!0}),INTEGRAL:T(0,1,Q.TEXCLASS.OP,{largeop:!0,symmetric:!0}),INTEGRAL2:T(1,2,Q.TEXCLASS.OP,{largeop:!0,symmetric:!0}),BIN3:T(3,3,Q.TEXCLASS.BIN),BIN4:T(4,4,Q.TEXCLASS.BIN),BIN01:T(0,1,Q.TEXCLASS.BIN),BIN5:T(5,5,Q.TEXCLASS.BIN),TALLBIN:T(4,4,Q.TEXCLASS.BIN,{stretchy:!0}),BINOP:T(4,4,Q.TEXCLASS.BIN,{largeop:!0,movablelimits:!0}),REL:T(5,5,Q.TEXCLASS.REL),REL1:T(1,1,Q.TEXCLASS.REL,{stretchy:!0}),REL4:T(4,4,Q.TEXCLASS.REL),RELSTRETCH:T(5,5,Q.TEXCLASS.REL,{stretchy:!0}),RELACCENT:T(5,5,Q.TEXCLASS.REL,{accent:!0}),WIDEREL:T(5,5,Q.TEXCLASS.REL,{accent:!0,stretchy:!0}),OPEN:T(0,0,Q.TEXCLASS.OPEN,{fence:!0,stretchy:!0,symmetric:!0}),CLOSE:T(0,0,Q.TEXCLASS.CLOSE,{fence:!0,stretchy:!0,symmetric:!0}),INNER:T(0,0,Q.TEXCLASS.INNER),PUNCT:T(0,3,Q.TEXCLASS.PUNCT),ACCENT:T(0,0,Q.TEXCLASS.ORD,{accent:!0}),WIDEACCENT:T(0,0,Q.TEXCLASS.ORD,{accent:!0,stretchy:!0})},e.RANGES=[[32,127,Q.TEXCLASS.REL,"mo"],[160,191,Q.TEXCLASS.ORD,"mo"],[192,591,Q.TEXCLASS.ORD,"mi"],[688,879,Q.TEXCLASS.ORD,"mo"],[880,6688,Q.TEXCLASS.ORD,"mi"],[6832,6911,Q.TEXCLASS.ORD,"mo"],[6912,7615,Q.TEXCLASS.ORD,"mi"],[7616,7679,Q.TEXCLASS.ORD,"mo"],[7680,8191,Q.TEXCLASS.ORD,"mi"],[8192,8303,Q.TEXCLASS.ORD,"mo"],[8304,8351,Q.TEXCLASS.ORD,"mo"],[8448,8527,Q.TEXCLASS.ORD,"mi"],[8528,8591,Q.TEXCLASS.ORD,"mn"],[8592,8703,Q.TEXCLASS.REL,"mo"],[8704,8959,Q.TEXCLASS.BIN,"mo"],[8960,9215,Q.TEXCLASS.ORD,"mo"],[9312,9471,Q.TEXCLASS.ORD,"mn"],[9472,10223,Q.TEXCLASS.ORD,"mo"],[10224,10239,Q.TEXCLASS.REL,"mo"],[10240,10495,Q.TEXCLASS.ORD,"mtext"],[10496,10623,Q.TEXCLASS.REL,"mo"],[10624,10751,Q.TEXCLASS.ORD,"mo"],[10752,11007,Q.TEXCLASS.BIN,"mo"],[11008,11055,Q.TEXCLASS.ORD,"mo"],[11056,11087,Q.TEXCLASS.REL,"mo"],[11088,11263,Q.TEXCLASS.ORD,"mo"],[11264,11744,Q.TEXCLASS.ORD,"mi"],[11776,11903,Q.TEXCLASS.ORD,"mo"],[11904,12255,Q.TEXCLASS.ORD,"mi","normal"],[12272,12351,Q.TEXCLASS.ORD,"mo"],[12352,42143,Q.TEXCLASS.ORD,"mi","normal"],[42192,43055,Q.TEXCLASS.ORD,"mi"],[43056,43071,Q.TEXCLASS.ORD,"mn"],[43072,55295,Q.TEXCLASS.ORD,"mi"],[63744,64255,Q.TEXCLASS.ORD,"mi","normal"],[64256,65023,Q.TEXCLASS.ORD,"mi"],[65024,65135,Q.TEXCLASS.ORD,"mo"],[65136,65791,Q.TEXCLASS.ORD,"mi"],[65792,65935,Q.TEXCLASS.ORD,"mn"],[65936,74751,Q.TEXCLASS.ORD,"mi","normal"],[74752,74879,Q.TEXCLASS.ORD,"mn"],[74880,113823,Q.TEXCLASS.ORD,"mi","normal"],[113824,119391,Q.TEXCLASS.ORD,"mo"],[119648,119679,Q.TEXCLASS.ORD,"mn"],[119808,120781,Q.TEXCLASS.ORD,"mi"],[120782,120831,Q.TEXCLASS.ORD,"mn"],[122624,129023,Q.TEXCLASS.ORD,"mo"],[129024,129279,Q.TEXCLASS.REL,"mo"],[129280,129535,Q.TEXCLASS.ORD,"mo"],[131072,195103,Q.TEXCLASS.ORD,"mi","normnal"]],e.getRange=function(t){var r,Q,T=t.codePointAt(0);try{for(var o=n(e.RANGES),i=o.next();!i.done;i=o.next()){var s=i.value;if(T<=s[1]){if(T>=s[0])return s;break}}}catch(t){r={error:t}}finally{try{i&&!i.done&&(Q=o.return)&&Q.call(o)}finally{if(r)throw r.error}}return null},e.MMLSPACING=[[0,0],[1,2],[3,3],[4,4],[0,0],[0,0],[0,3]],e.OPTABLE={prefix:{"(":e.MO.OPEN,"+":e.MO.BIN01,"-":e.MO.BIN01,"[":e.MO.OPEN,"{":e.MO.OPEN,"|":e.MO.OPEN,"||":[0,0,Q.TEXCLASS.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[0,0,Q.TEXCLASS.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"\xac":e.MO.ORD21,"\xb1":e.MO.BIN01,"\u2016":[0,0,Q.TEXCLASS.ORD,{fence:!0,stretchy:!0}],"\u2018":[0,0,Q.TEXCLASS.OPEN,{fence:!0}],"\u201c":[0,0,Q.TEXCLASS.OPEN,{fence:!0}],"\u2145":e.MO.ORD21,"\u2146":T(2,0,Q.TEXCLASS.ORD),"\u2200":e.MO.ORD21,"\u2202":e.MO.ORD21,"\u2203":e.MO.ORD21,"\u2204":e.MO.ORD21,"\u2207":e.MO.ORD21,"\u220f":e.MO.OP,"\u2210":e.MO.OP,"\u2211":e.MO.OP,"\u2212":e.MO.BIN01,"\u2213":e.MO.BIN01,"\u221a":[1,1,Q.TEXCLASS.ORD,{stretchy:!0}],"\u221b":e.MO.ORD11,"\u221c":e.MO.ORD11,"\u2220":e.MO.ORD,"\u2221":e.MO.ORD,"\u2222":e.MO.ORD,"\u222b":e.MO.INTEGRAL,"\u222c":e.MO.INTEGRAL,"\u222d":e.MO.INTEGRAL,"\u222e":e.MO.INTEGRAL,"\u222f":e.MO.INTEGRAL,"\u2230":e.MO.INTEGRAL,"\u2231":e.MO.INTEGRAL,"\u2232":e.MO.INTEGRAL,"\u2233":e.MO.INTEGRAL,"\u22c0":e.MO.OP,"\u22c1":e.MO.OP,"\u22c2":e.MO.OP,"\u22c3":e.MO.OP,"\u2308":e.MO.OPEN,"\u230a":e.MO.OPEN,"\u2329":e.MO.OPEN,"\u2772":e.MO.OPEN,"\u27e6":e.MO.OPEN,"\u27e8":e.MO.OPEN,"\u27ea":e.MO.OPEN,"\u27ec":e.MO.OPEN,"\u27ee":e.MO.OPEN,"\u2980":[0,0,Q.TEXCLASS.ORD,{fence:!0,stretchy:!0}],"\u2983":e.MO.OPEN,"\u2985":e.MO.OPEN,"\u2987":e.MO.OPEN,"\u2989":e.MO.OPEN,"\u298b":e.MO.OPEN,"\u298d":e.MO.OPEN,"\u298f":e.MO.OPEN,"\u2991":e.MO.OPEN,"\u2993":e.MO.OPEN,"\u2995":e.MO.OPEN,"\u2997":e.MO.OPEN,"\u29fc":e.MO.OPEN,"\u2a00":e.MO.OP,"\u2a01":e.MO.OP,"\u2a02":e.MO.OP,"\u2a03":e.MO.OP,"\u2a04":e.MO.OP,"\u2a05":e.MO.OP,"\u2a06":e.MO.OP,"\u2a07":e.MO.OP,"\u2a08":e.MO.OP,"\u2a09":e.MO.OP,"\u2a0a":e.MO.OP,"\u2a0b":e.MO.INTEGRAL2,"\u2a0c":e.MO.INTEGRAL,"\u2a0d":e.MO.INTEGRAL2,"\u2a0e":e.MO.INTEGRAL2,"\u2a0f":e.MO.INTEGRAL2,"\u2a10":e.MO.OP,"\u2a11":e.MO.OP,"\u2a12":e.MO.OP,"\u2a13":e.MO.OP,"\u2a14":e.MO.OP,"\u2a15":e.MO.INTEGRAL2,"\u2a16":e.MO.INTEGRAL2,"\u2a17":e.MO.INTEGRAL2,"\u2a18":e.MO.INTEGRAL2,"\u2a19":e.MO.INTEGRAL2,"\u2a1a":e.MO.INTEGRAL2,"\u2a1b":e.MO.INTEGRAL2,"\u2a1c":e.MO.INTEGRAL2,"\u2afc":e.MO.OP,"\u2aff":e.MO.OP},postfix:{"!!":T(1,0),"!":[1,0,Q.TEXCLASS.CLOSE,null],'"':e.MO.ACCENT,"&":e.MO.ORD,")":e.MO.CLOSE,"++":T(0,0),"--":T(0,0),"..":T(0,0),"...":e.MO.ORD,"'":e.MO.ACCENT,"]":e.MO.CLOSE,"^":e.MO.WIDEACCENT,_:e.MO.WIDEACCENT,"`":e.MO.ACCENT,"|":e.MO.CLOSE,"}":e.MO.CLOSE,"~":e.MO.WIDEACCENT,"||":[0,0,Q.TEXCLASS.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[0,0,Q.TEXCLASS.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"\xa8":e.MO.ACCENT,"\xaa":e.MO.ACCENT,"\xaf":e.MO.WIDEACCENT,"\xb0":e.MO.ORD,"\xb2":e.MO.ACCENT,"\xb3":e.MO.ACCENT,"\xb4":e.MO.ACCENT,"\xb8":e.MO.ACCENT,"\xb9":e.MO.ACCENT,"\xba":e.MO.ACCENT,"\u02c6":e.MO.WIDEACCENT,"\u02c7":e.MO.WIDEACCENT,"\u02c9":e.MO.WIDEACCENT,"\u02ca":e.MO.ACCENT,"\u02cb":e.MO.ACCENT,"\u02cd":e.MO.WIDEACCENT,"\u02d8":e.MO.ACCENT,"\u02d9":e.MO.ACCENT,"\u02da":e.MO.ACCENT,"\u02dc":e.MO.WIDEACCENT,"\u02dd":e.MO.ACCENT,"\u02f7":e.MO.WIDEACCENT,"\u0302":e.MO.WIDEACCENT,"\u0311":e.MO.ACCENT,"\u03f6":e.MO.REL,"\u2016":[0,0,Q.TEXCLASS.ORD,{fence:!0,stretchy:!0}],"\u2019":[0,0,Q.TEXCLASS.CLOSE,{fence:!0}],"\u201a":e.MO.ACCENT,"\u201b":e.MO.ACCENT,"\u201d":[0,0,Q.TEXCLASS.CLOSE,{fence:!0}],"\u201e":e.MO.ACCENT,"\u201f":e.MO.ACCENT,"\u2032":e.MO.ORD,"\u2033":e.MO.ACCENT,"\u2034":e.MO.ACCENT,"\u2035":e.MO.ACCENT,"\u2036":e.MO.ACCENT,"\u2037":e.MO.ACCENT,"\u203e":e.MO.WIDEACCENT,"\u2057":e.MO.ACCENT,"\u20db":e.MO.ACCENT,"\u20dc":e.MO.ACCENT,"\u2309":e.MO.CLOSE,"\u230b":e.MO.CLOSE,"\u232a":e.MO.CLOSE,"\u23b4":e.MO.WIDEACCENT,"\u23b5":e.MO.WIDEACCENT,"\u23dc":e.MO.WIDEACCENT,"\u23dd":e.MO.WIDEACCENT,"\u23de":e.MO.WIDEACCENT,"\u23df":e.MO.WIDEACCENT,"\u23e0":e.MO.WIDEACCENT,"\u23e1":e.MO.WIDEACCENT,"\u25a0":e.MO.BIN3,"\u25a1":e.MO.BIN3,"\u25aa":e.MO.BIN3,"\u25ab":e.MO.BIN3,"\u25ad":e.MO.BIN3,"\u25ae":e.MO.BIN3,"\u25af":e.MO.BIN3,"\u25b0":e.MO.BIN3,"\u25b1":e.MO.BIN3,"\u25b2":e.MO.BIN4,"\u25b4":e.MO.BIN4,"\u25b6":e.MO.BIN4,"\u25b7":e.MO.BIN4,"\u25b8":e.MO.BIN4,"\u25bc":e.MO.BIN4,"\u25be":e.MO.BIN4,"\u25c0":e.MO.BIN4,"\u25c1":e.MO.BIN4,"\u25c2":e.MO.BIN4,"\u25c4":e.MO.BIN4,"\u25c5":e.MO.BIN4,"\u25c6":e.MO.BIN4,"\u25c7":e.MO.BIN4,"\u25c8":e.MO.BIN4,"\u25c9":e.MO.BIN4,"\u25cc":e.MO.BIN4,"\u25cd":e.MO.BIN4,"\u25ce":e.MO.BIN4,"\u25cf":e.MO.BIN4,"\u25d6":e.MO.BIN4,"\u25d7":e.MO.BIN4,"\u25e6":e.MO.BIN4,"\u266d":e.MO.ORD02,"\u266e":e.MO.ORD02,"\u266f":e.MO.ORD02,"\u2773":e.MO.CLOSE,"\u27e7":e.MO.CLOSE,"\u27e9":e.MO.CLOSE,"\u27eb":e.MO.CLOSE,"\u27ed":e.MO.CLOSE,"\u27ef":e.MO.CLOSE,"\u2980":[0,0,Q.TEXCLASS.ORD,{fence:!0,stretchy:!0}],"\u2984":e.MO.CLOSE,"\u2986":e.MO.CLOSE,"\u2988":e.MO.CLOSE,"\u298a":e.MO.CLOSE,"\u298c":e.MO.CLOSE,"\u298e":e.MO.CLOSE,"\u2990":e.MO.CLOSE,"\u2992":e.MO.CLOSE,"\u2994":e.MO.CLOSE,"\u2996":e.MO.CLOSE,"\u2998":e.MO.CLOSE,"\u29fd":e.MO.CLOSE},infix:{"!=":e.MO.BIN4,"#":e.MO.ORD,$:e.MO.ORD,"%":[3,3,Q.TEXCLASS.ORD,null],"&&":e.MO.BIN4,"":e.MO.ORD,"*":e.MO.BIN3,"**":T(1,1),"*=":e.MO.BIN4,"+":e.MO.BIN4,"+=":e.MO.BIN4,",":[0,3,Q.TEXCLASS.PUNCT,{linebreakstyle:"after",separator:!0}],"-":e.MO.BIN4,"-=":e.MO.BIN4,"->":e.MO.BIN5,".":[0,3,Q.TEXCLASS.PUNCT,{separator:!0}],"/":e.MO.ORD11,"//":T(1,1),"/=":e.MO.BIN4,":":[1,2,Q.TEXCLASS.REL,null],":=":e.MO.BIN4,";":[0,3,Q.TEXCLASS.PUNCT,{linebreakstyle:"after",separator:!0}],"<":e.MO.REL,"<=":e.MO.BIN5,"<>":T(1,1),"=":e.MO.REL,"==":e.MO.BIN4,">":e.MO.REL,">=":e.MO.BIN5,"?":[1,1,Q.TEXCLASS.CLOSE,null],"@":e.MO.ORD11,"\\":e.MO.ORD,"^":e.MO.ORD11,_:e.MO.ORD11,"|":[2,2,Q.TEXCLASS.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"||":[2,2,Q.TEXCLASS.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[2,2,Q.TEXCLASS.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"\xb1":e.MO.BIN4,"\xb7":e.MO.BIN4,"\xd7":e.MO.BIN4,"\xf7":e.MO.BIN4,"\u02b9":e.MO.ORD,"\u0300":e.MO.ACCENT,"\u0301":e.MO.ACCENT,"\u0303":e.MO.WIDEACCENT,"\u0304":e.MO.ACCENT,"\u0306":e.MO.ACCENT,"\u0307":e.MO.ACCENT,"\u0308":e.MO.ACCENT,"\u030c":e.MO.ACCENT,"\u0332":e.MO.WIDEACCENT,"\u0338":e.MO.REL4,"\u2015":[0,0,Q.TEXCLASS.ORD,{stretchy:!0}],"\u2017":[0,0,Q.TEXCLASS.ORD,{stretchy:!0}],"\u2020":e.MO.BIN3,"\u2021":e.MO.BIN3,"\u2022":e.MO.BIN4,"\u2026":e.MO.INNER,"\u2043":e.MO.BIN4,"\u2044":e.MO.TALLBIN,"\u2061":e.MO.NONE,"\u2062":e.MO.NONE,"\u2063":[0,0,Q.TEXCLASS.NONE,{linebreakstyle:"after",separator:!0}],"\u2064":e.MO.NONE,"\u20d7":e.MO.ACCENT,"\u2111":e.MO.ORD,"\u2113":e.MO.ORD,"\u2118":e.MO.ORD,"\u211c":e.MO.ORD,"\u2190":e.MO.WIDEREL,"\u2191":e.MO.RELSTRETCH,"\u2192":e.MO.WIDEREL,"\u2193":e.MO.RELSTRETCH,"\u2194":e.MO.WIDEREL,"\u2195":e.MO.RELSTRETCH,"\u2196":e.MO.RELSTRETCH,"\u2197":e.MO.RELSTRETCH,"\u2198":e.MO.RELSTRETCH,"\u2199":e.MO.RELSTRETCH,"\u219a":e.MO.RELACCENT,"\u219b":e.MO.RELACCENT,"\u219c":e.MO.WIDEREL,"\u219d":e.MO.WIDEREL,"\u219e":e.MO.WIDEREL,"\u219f":e.MO.WIDEREL,"\u21a0":e.MO.WIDEREL,"\u21a1":e.MO.RELSTRETCH,"\u21a2":e.MO.WIDEREL,"\u21a3":e.MO.WIDEREL,"\u21a4":e.MO.WIDEREL,"\u21a5":e.MO.RELSTRETCH,"\u21a6":e.MO.WIDEREL,"\u21a7":e.MO.RELSTRETCH,"\u21a8":e.MO.RELSTRETCH,"\u21a9":e.MO.WIDEREL,"\u21aa":e.MO.WIDEREL,"\u21ab":e.MO.WIDEREL,"\u21ac":e.MO.WIDEREL,"\u21ad":e.MO.WIDEREL,"\u21ae":e.MO.RELACCENT,"\u21af":e.MO.RELSTRETCH,"\u21b0":e.MO.RELSTRETCH,"\u21b1":e.MO.RELSTRETCH,"\u21b2":e.MO.RELSTRETCH,"\u21b3":e.MO.RELSTRETCH,"\u21b4":e.MO.RELSTRETCH,"\u21b5":e.MO.RELSTRETCH,"\u21b6":e.MO.RELACCENT,"\u21b7":e.MO.RELACCENT,"\u21b8":e.MO.REL,"\u21b9":e.MO.WIDEREL,"\u21ba":e.MO.REL,"\u21bb":e.MO.REL,"\u21bc":e.MO.WIDEREL,"\u21bd":e.MO.WIDEREL,"\u21be":e.MO.RELSTRETCH,"\u21bf":e.MO.RELSTRETCH,"\u21c0":e.MO.WIDEREL,"\u21c1":e.MO.WIDEREL,"\u21c2":e.MO.RELSTRETCH,"\u21c3":e.MO.RELSTRETCH,"\u21c4":e.MO.WIDEREL,"\u21c5":e.MO.RELSTRETCH,"\u21c6":e.MO.WIDEREL,"\u21c7":e.MO.WIDEREL,"\u21c8":e.MO.RELSTRETCH,"\u21c9":e.MO.WIDEREL,"\u21ca":e.MO.RELSTRETCH,"\u21cb":e.MO.WIDEREL,"\u21cc":e.MO.WIDEREL,"\u21cd":e.MO.RELACCENT,"\u21ce":e.MO.RELACCENT,"\u21cf":e.MO.RELACCENT,"\u21d0":e.MO.WIDEREL,"\u21d1":e.MO.RELSTRETCH,"\u21d2":e.MO.WIDEREL,"\u21d3":e.MO.RELSTRETCH,"\u21d4":e.MO.WIDEREL,"\u21d5":e.MO.RELSTRETCH,"\u21d6":e.MO.RELSTRETCH,"\u21d7":e.MO.RELSTRETCH,"\u21d8":e.MO.RELSTRETCH,"\u21d9":e.MO.RELSTRETCH,"\u21da":e.MO.WIDEREL,"\u21db":e.MO.WIDEREL,"\u21dc":e.MO.WIDEREL,"\u21dd":e.MO.WIDEREL,"\u21de":e.MO.REL,"\u21df":e.MO.REL,"\u21e0":e.MO.WIDEREL,"\u21e1":e.MO.RELSTRETCH,"\u21e2":e.MO.WIDEREL,"\u21e3":e.MO.RELSTRETCH,"\u21e4":e.MO.WIDEREL,"\u21e5":e.MO.WIDEREL,"\u21e6":e.MO.WIDEREL,"\u21e7":e.MO.RELSTRETCH,"\u21e8":e.MO.WIDEREL,"\u21e9":e.MO.RELSTRETCH,"\u21ea":e.MO.RELSTRETCH,"\u21eb":e.MO.RELSTRETCH,"\u21ec":e.MO.RELSTRETCH,"\u21ed":e.MO.RELSTRETCH,"\u21ee":e.MO.RELSTRETCH,"\u21ef":e.MO.RELSTRETCH,"\u21f0":e.MO.WIDEREL,"\u21f1":e.MO.REL,"\u21f2":e.MO.REL,"\u21f3":e.MO.RELSTRETCH,"\u21f4":e.MO.RELACCENT,"\u21f5":e.MO.RELSTRETCH,"\u21f6":e.MO.WIDEREL,"\u21f7":e.MO.RELACCENT,"\u21f8":e.MO.RELACCENT,"\u21f9":e.MO.RELACCENT,"\u21fa":e.MO.RELACCENT,"\u21fb":e.MO.RELACCENT,"\u21fc":e.MO.RELACCENT,"\u21fd":e.MO.WIDEREL,"\u21fe":e.MO.WIDEREL,"\u21ff":e.MO.WIDEREL,"\u2201":T(1,2,Q.TEXCLASS.ORD),"\u2205":e.MO.ORD,"\u2206":e.MO.BIN3,"\u2208":e.MO.REL,"\u2209":e.MO.REL,"\u220a":e.MO.REL,"\u220b":e.MO.REL,"\u220c":e.MO.REL,"\u220d":e.MO.REL,"\u220e":e.MO.BIN3,"\u2212":e.MO.BIN4,"\u2213":e.MO.BIN4,"\u2214":e.MO.BIN4,"\u2215":e.MO.TALLBIN,"\u2216":e.MO.BIN4,"\u2217":e.MO.BIN4,"\u2218":e.MO.BIN4,"\u2219":e.MO.BIN4,"\u221d":e.MO.REL,"\u221e":e.MO.ORD,"\u221f":e.MO.REL,"\u2223":e.MO.REL,"\u2224":e.MO.REL,"\u2225":e.MO.REL,"\u2226":e.MO.REL,"\u2227":e.MO.BIN4,"\u2228":e.MO.BIN4,"\u2229":e.MO.BIN4,"\u222a":e.MO.BIN4,"\u2234":e.MO.REL,"\u2235":e.MO.REL,"\u2236":e.MO.REL,"\u2237":e.MO.REL,"\u2238":e.MO.BIN4,"\u2239":e.MO.REL,"\u223a":e.MO.BIN4,"\u223b":e.MO.REL,"\u223c":e.MO.REL,"\u223d":e.MO.REL,"\u223d\u0331":e.MO.BIN3,"\u223e":e.MO.REL,"\u223f":e.MO.BIN3,"\u2240":e.MO.BIN4,"\u2241":e.MO.REL,"\u2242":e.MO.REL,"\u2242\u0338":e.MO.REL,"\u2243":e.MO.REL,"\u2244":e.MO.REL,"\u2245":e.MO.REL,"\u2246":e.MO.REL,"\u2247":e.MO.REL,"\u2248":e.MO.REL,"\u2249":e.MO.REL,"\u224a":e.MO.REL,"\u224b":e.MO.REL,"\u224c":e.MO.REL,"\u224d":e.MO.REL,"\u224e":e.MO.REL,"\u224e\u0338":e.MO.REL,"\u224f":e.MO.REL,"\u224f\u0338":e.MO.REL,"\u2250":e.MO.REL,"\u2251":e.MO.REL,"\u2252":e.MO.REL,"\u2253":e.MO.REL,"\u2254":e.MO.REL,"\u2255":e.MO.REL,"\u2256":e.MO.REL,"\u2257":e.MO.REL,"\u2258":e.MO.REL,"\u2259":e.MO.REL,"\u225a":e.MO.REL,"\u225b":e.MO.REL,"\u225c":e.MO.REL,"\u225d":e.MO.REL,"\u225e":e.MO.REL,"\u225f":e.MO.REL,"\u2260":e.MO.REL,"\u2261":e.MO.REL,"\u2262":e.MO.REL,"\u2263":e.MO.REL,"\u2264":e.MO.REL,"\u2265":e.MO.REL,"\u2266":e.MO.REL,"\u2266\u0338":e.MO.REL,"\u2267":e.MO.REL,"\u2268":e.MO.REL,"\u2269":e.MO.REL,"\u226a":e.MO.REL,"\u226a\u0338":e.MO.REL,"\u226b":e.MO.REL,"\u226b\u0338":e.MO.REL,"\u226c":e.MO.REL,"\u226d":e.MO.REL,"\u226e":e.MO.REL,"\u226f":e.MO.REL,"\u2270":e.MO.REL,"\u2271":e.MO.REL,"\u2272":e.MO.REL,"\u2273":e.MO.REL,"\u2274":e.MO.REL,"\u2275":e.MO.REL,"\u2276":e.MO.REL,"\u2277":e.MO.REL,"\u2278":e.MO.REL,"\u2279":e.MO.REL,"\u227a":e.MO.REL,"\u227b":e.MO.REL,"\u227c":e.MO.REL,"\u227d":e.MO.REL,"\u227e":e.MO.REL,"\u227f":e.MO.REL,"\u227f\u0338":e.MO.REL,"\u2280":e.MO.REL,"\u2281":e.MO.REL,"\u2282":e.MO.REL,"\u2282\u20d2":e.MO.REL,"\u2283":e.MO.REL,"\u2283\u20d2":e.MO.REL,"\u2284":e.MO.REL,"\u2285":e.MO.REL,"\u2286":e.MO.REL,"\u2287":e.MO.REL,"\u2288":e.MO.REL,"\u2289":e.MO.REL,"\u228a":e.MO.REL,"\u228b":e.MO.REL,"\u228c":e.MO.BIN4,"\u228d":e.MO.BIN4,"\u228e":e.MO.BIN4,"\u228f":e.MO.REL,"\u228f\u0338":e.MO.REL,"\u2290":e.MO.REL,"\u2290\u0338":e.MO.REL,"\u2291":e.MO.REL,"\u2292":e.MO.REL,"\u2293":e.MO.BIN4,"\u2294":e.MO.BIN4,"\u2295":e.MO.BIN4,"\u2296":e.MO.BIN4,"\u2297":e.MO.BIN4,"\u2298":e.MO.BIN4,"\u2299":e.MO.BIN4,"\u229a":e.MO.BIN4,"\u229b":e.MO.BIN4,"\u229c":e.MO.BIN4,"\u229d":e.MO.BIN4,"\u229e":e.MO.BIN4,"\u229f":e.MO.BIN4,"\u22a0":e.MO.BIN4,"\u22a1":e.MO.BIN4,"\u22a2":e.MO.REL,"\u22a3":e.MO.REL,"\u22a4":e.MO.ORD55,"\u22a5":e.MO.REL,"\u22a6":e.MO.REL,"\u22a7":e.MO.REL,"\u22a8":e.MO.REL,"\u22a9":e.MO.REL,"\u22aa":e.MO.REL,"\u22ab":e.MO.REL,"\u22ac":e.MO.REL,"\u22ad":e.MO.REL,"\u22ae":e.MO.REL,"\u22af":e.MO.REL,"\u22b0":e.MO.REL,"\u22b1":e.MO.REL,"\u22b2":e.MO.REL,"\u22b3":e.MO.REL,"\u22b4":e.MO.REL,"\u22b5":e.MO.REL,"\u22b6":e.MO.REL,"\u22b7":e.MO.REL,"\u22b8":e.MO.REL,"\u22b9":e.MO.REL,"\u22ba":e.MO.BIN4,"\u22bb":e.MO.BIN4,"\u22bc":e.MO.BIN4,"\u22bd":e.MO.BIN4,"\u22be":e.MO.BIN3,"\u22bf":e.MO.BIN3,"\u22c4":e.MO.BIN4,"\u22c5":e.MO.BIN4,"\u22c6":e.MO.BIN4,"\u22c7":e.MO.BIN4,"\u22c8":e.MO.REL,"\u22c9":e.MO.BIN4,"\u22ca":e.MO.BIN4,"\u22cb":e.MO.BIN4,"\u22cc":e.MO.BIN4,"\u22cd":e.MO.REL,"\u22ce":e.MO.BIN4,"\u22cf":e.MO.BIN4,"\u22d0":e.MO.REL,"\u22d1":e.MO.REL,"\u22d2":e.MO.BIN4,"\u22d3":e.MO.BIN4,"\u22d4":e.MO.REL,"\u22d5":e.MO.REL,"\u22d6":e.MO.REL,"\u22d7":e.MO.REL,"\u22d8":e.MO.REL,"\u22d9":e.MO.REL,"\u22da":e.MO.REL,"\u22db":e.MO.REL,"\u22dc":e.MO.REL,"\u22dd":e.MO.REL,"\u22de":e.MO.REL,"\u22df":e.MO.REL,"\u22e0":e.MO.REL,"\u22e1":e.MO.REL,"\u22e2":e.MO.REL,"\u22e3":e.MO.REL,"\u22e4":e.MO.REL,"\u22e5":e.MO.REL,"\u22e6":e.MO.REL,"\u22e7":e.MO.REL,"\u22e8":e.MO.REL,"\u22e9":e.MO.REL,"\u22ea":e.MO.REL,"\u22eb":e.MO.REL,"\u22ec":e.MO.REL,"\u22ed":e.MO.REL,"\u22ee":e.MO.ORD55,"\u22ef":e.MO.INNER,"\u22f0":e.MO.REL,"\u22f1":[5,5,Q.TEXCLASS.INNER,null],"\u22f2":e.MO.REL,"\u22f3":e.MO.REL,"\u22f4":e.MO.REL,"\u22f5":e.MO.REL,"\u22f6":e.MO.REL,"\u22f7":e.MO.REL,"\u22f8":e.MO.REL,"\u22f9":e.MO.REL,"\u22fa":e.MO.REL,"\u22fb":e.MO.REL,"\u22fc":e.MO.REL,"\u22fd":e.MO.REL,"\u22fe":e.MO.REL,"\u22ff":e.MO.REL,"\u2305":e.MO.BIN3,"\u2306":e.MO.BIN3,"\u2322":e.MO.REL4,"\u2323":e.MO.REL4,"\u2329":e.MO.OPEN,"\u232a":e.MO.CLOSE,"\u23aa":e.MO.ORD,"\u23af":[0,0,Q.TEXCLASS.ORD,{stretchy:!0}],"\u23b0":e.MO.OPEN,"\u23b1":e.MO.CLOSE,"\u2500":e.MO.ORD,"\u25b3":e.MO.BIN4,"\u25b5":e.MO.BIN4,"\u25b9":e.MO.BIN4,"\u25bd":e.MO.BIN4,"\u25bf":e.MO.BIN4,"\u25c3":e.MO.BIN4,"\u25ef":e.MO.BIN3,"\u2660":e.MO.ORD,"\u2661":e.MO.ORD,"\u2662":e.MO.ORD,"\u2663":e.MO.ORD,"\u2758":e.MO.REL,"\u27f0":e.MO.RELSTRETCH,"\u27f1":e.MO.RELSTRETCH,"\u27f5":e.MO.WIDEREL,"\u27f6":e.MO.WIDEREL,"\u27f7":e.MO.WIDEREL,"\u27f8":e.MO.WIDEREL,"\u27f9":e.MO.WIDEREL,"\u27fa":e.MO.WIDEREL,"\u27fb":e.MO.WIDEREL,"\u27fc":e.MO.WIDEREL,"\u27fd":e.MO.WIDEREL,"\u27fe":e.MO.WIDEREL,"\u27ff":e.MO.WIDEREL,"\u2900":e.MO.RELACCENT,"\u2901":e.MO.RELACCENT,"\u2902":e.MO.RELACCENT,"\u2903":e.MO.RELACCENT,"\u2904":e.MO.RELACCENT,"\u2905":e.MO.RELACCENT,"\u2906":e.MO.RELACCENT,"\u2907":e.MO.RELACCENT,"\u2908":e.MO.REL,"\u2909":e.MO.REL,"\u290a":e.MO.RELSTRETCH,"\u290b":e.MO.RELSTRETCH,"\u290c":e.MO.WIDEREL,"\u290d":e.MO.WIDEREL,"\u290e":e.MO.WIDEREL,"\u290f":e.MO.WIDEREL,"\u2910":e.MO.WIDEREL,"\u2911":e.MO.RELACCENT,"\u2912":e.MO.RELSTRETCH,"\u2913":e.MO.RELSTRETCH,"\u2914":e.MO.RELACCENT,"\u2915":e.MO.RELACCENT,"\u2916":e.MO.RELACCENT,"\u2917":e.MO.RELACCENT,"\u2918":e.MO.RELACCENT,"\u2919":e.MO.RELACCENT,"\u291a":e.MO.RELACCENT,"\u291b":e.MO.RELACCENT,"\u291c":e.MO.RELACCENT,"\u291d":e.MO.RELACCENT,"\u291e":e.MO.RELACCENT,"\u291f":e.MO.RELACCENT,"\u2920":e.MO.RELACCENT,"\u2921":e.MO.RELSTRETCH,"\u2922":e.MO.RELSTRETCH,"\u2923":e.MO.REL,"\u2924":e.MO.REL,"\u2925":e.MO.REL,"\u2926":e.MO.REL,"\u2927":e.MO.REL,"\u2928":e.MO.REL,"\u2929":e.MO.REL,"\u292a":e.MO.REL,"\u292b":e.MO.REL,"\u292c":e.MO.REL,"\u292d":e.MO.REL,"\u292e":e.MO.REL,"\u292f":e.MO.REL,"\u2930":e.MO.REL,"\u2931":e.MO.REL,"\u2932":e.MO.REL,"\u2933":e.MO.RELACCENT,"\u2934":e.MO.REL,"\u2935":e.MO.REL,"\u2936":e.MO.REL,"\u2937":e.MO.REL,"\u2938":e.MO.REL,"\u2939":e.MO.REL,"\u293a":e.MO.RELACCENT,"\u293b":e.MO.RELACCENT,"\u293c":e.MO.RELACCENT,"\u293d":e.MO.RELACCENT,"\u293e":e.MO.REL,"\u293f":e.MO.REL,"\u2940":e.MO.REL,"\u2941":e.MO.REL,"\u2942":e.MO.RELACCENT,"\u2943":e.MO.RELACCENT,"\u2944":e.MO.RELACCENT,"\u2945":e.MO.RELACCENT,"\u2946":e.MO.RELACCENT,"\u2947":e.MO.RELACCENT,"\u2948":e.MO.RELACCENT,"\u2949":e.MO.REL,"\u294a":e.MO.RELACCENT,"\u294b":e.MO.RELACCENT,"\u294c":e.MO.REL,"\u294d":e.MO.REL,"\u294e":e.MO.WIDEREL,"\u294f":e.MO.RELSTRETCH,"\u2950":e.MO.WIDEREL,"\u2951":e.MO.RELSTRETCH,"\u2952":e.MO.WIDEREL,"\u2953":e.MO.WIDEREL,"\u2954":e.MO.RELSTRETCH,"\u2955":e.MO.RELSTRETCH,"\u2956":e.MO.RELSTRETCH,"\u2957":e.MO.RELSTRETCH,"\u2958":e.MO.RELSTRETCH,"\u2959":e.MO.RELSTRETCH,"\u295a":e.MO.WIDEREL,"\u295b":e.MO.WIDEREL,"\u295c":e.MO.RELSTRETCH,"\u295d":e.MO.RELSTRETCH,"\u295e":e.MO.WIDEREL,"\u295f":e.MO.WIDEREL,"\u2960":e.MO.RELSTRETCH,"\u2961":e.MO.RELSTRETCH,"\u2962":e.MO.RELACCENT,"\u2963":e.MO.REL,"\u2964":e.MO.RELACCENT,"\u2965":e.MO.REL,"\u2966":e.MO.RELACCENT,"\u2967":e.MO.RELACCENT,"\u2968":e.MO.RELACCENT,"\u2969":e.MO.RELACCENT,"\u296a":e.MO.RELACCENT,"\u296b":e.MO.RELACCENT,"\u296c":e.MO.RELACCENT,"\u296d":e.MO.RELACCENT,"\u296e":e.MO.RELSTRETCH,"\u296f":e.MO.RELSTRETCH,"\u2970":e.MO.RELACCENT,"\u2971":e.MO.RELACCENT,"\u2972":e.MO.RELACCENT,"\u2973":e.MO.RELACCENT,"\u2974":e.MO.RELACCENT,"\u2975":e.MO.RELACCENT,"\u2976":e.MO.RELACCENT,"\u2977":e.MO.RELACCENT,"\u2978":e.MO.RELACCENT,"\u2979":e.MO.RELACCENT,"\u297a":e.MO.RELACCENT,"\u297b":e.MO.RELACCENT,"\u297c":e.MO.RELACCENT,"\u297d":e.MO.RELACCENT,"\u297e":e.MO.REL,"\u297f":e.MO.REL,"\u2981":e.MO.BIN3,"\u2982":e.MO.BIN3,"\u2999":e.MO.BIN3,"\u299a":e.MO.BIN3,"\u299b":e.MO.BIN3,"\u299c":e.MO.BIN3,"\u299d":e.MO.BIN3,"\u299e":e.MO.BIN3,"\u299f":e.MO.BIN3,"\u29a0":e.MO.BIN3,"\u29a1":e.MO.BIN3,"\u29a2":e.MO.BIN3,"\u29a3":e.MO.BIN3,"\u29a4":e.MO.BIN3,"\u29a5":e.MO.BIN3,"\u29a6":e.MO.BIN3,"\u29a7":e.MO.BIN3,"\u29a8":e.MO.BIN3,"\u29a9":e.MO.BIN3,"\u29aa":e.MO.BIN3,"\u29ab":e.MO.BIN3,"\u29ac":e.MO.BIN3,"\u29ad":e.MO.BIN3,"\u29ae":e.MO.BIN3,"\u29af":e.MO.BIN3,"\u29b0":e.MO.BIN3,"\u29b1":e.MO.BIN3,"\u29b2":e.MO.BIN3,"\u29b3":e.MO.BIN3,"\u29b4":e.MO.BIN3,"\u29b5":e.MO.BIN3,"\u29b6":e.MO.BIN4,"\u29b7":e.MO.BIN4,"\u29b8":e.MO.BIN4,"\u29b9":e.MO.BIN4,"\u29ba":e.MO.BIN4,"\u29bb":e.MO.BIN4,"\u29bc":e.MO.BIN4,"\u29bd":e.MO.BIN4,"\u29be":e.MO.BIN4,"\u29bf":e.MO.BIN4,"\u29c0":e.MO.REL,"\u29c1":e.MO.REL,"\u29c2":e.MO.BIN3,"\u29c3":e.MO.BIN3,"\u29c4":e.MO.BIN4,"\u29c5":e.MO.BIN4,"\u29c6":e.MO.BIN4,"\u29c7":e.MO.BIN4,"\u29c8":e.MO.BIN4,"\u29c9":e.MO.BIN3,"\u29ca":e.MO.BIN3,"\u29cb":e.MO.BIN3,"\u29cc":e.MO.BIN3,"\u29cd":e.MO.BIN3,"\u29ce":e.MO.REL,"\u29cf":e.MO.REL,"\u29cf\u0338":e.MO.REL,"\u29d0":e.MO.REL,"\u29d0\u0338":e.MO.REL,"\u29d1":e.MO.REL,"\u29d2":e.MO.REL,"\u29d3":e.MO.REL,"\u29d4":e.MO.REL,"\u29d5":e.MO.REL,"\u29d6":e.MO.BIN4,"\u29d7":e.MO.BIN4,"\u29d8":e.MO.BIN3,"\u29d9":e.MO.BIN3,"\u29db":e.MO.BIN3,"\u29dc":e.MO.BIN3,"\u29dd":e.MO.BIN3,"\u29de":e.MO.REL,"\u29df":e.MO.BIN3,"\u29e0":e.MO.BIN3,"\u29e1":e.MO.REL,"\u29e2":e.MO.BIN4,"\u29e3":e.MO.REL,"\u29e4":e.MO.REL,"\u29e5":e.MO.REL,"\u29e6":e.MO.REL,"\u29e7":e.MO.BIN3,"\u29e8":e.MO.BIN3,"\u29e9":e.MO.BIN3,"\u29ea":e.MO.BIN3,"\u29eb":e.MO.BIN3,"\u29ec":e.MO.BIN3,"\u29ed":e.MO.BIN3,"\u29ee":e.MO.BIN3,"\u29ef":e.MO.BIN3,"\u29f0":e.MO.BIN3,"\u29f1":e.MO.BIN3,"\u29f2":e.MO.BIN3,"\u29f3":e.MO.BIN3,"\u29f4":e.MO.REL,"\u29f5":e.MO.BIN4,"\u29f6":e.MO.BIN4,"\u29f7":e.MO.BIN4,"\u29f8":e.MO.BIN3,"\u29f9":e.MO.BIN3,"\u29fa":e.MO.BIN3,"\u29fb":e.MO.BIN3,"\u29fe":e.MO.BIN4,"\u29ff":e.MO.BIN4,"\u2a1d":e.MO.BIN3,"\u2a1e":e.MO.BIN3,"\u2a1f":e.MO.BIN3,"\u2a20":e.MO.BIN3,"\u2a21":e.MO.BIN3,"\u2a22":e.MO.BIN4,"\u2a23":e.MO.BIN4,"\u2a24":e.MO.BIN4,"\u2a25":e.MO.BIN4,"\u2a26":e.MO.BIN4,"\u2a27":e.MO.BIN4,"\u2a28":e.MO.BIN4,"\u2a29":e.MO.BIN4,"\u2a2a":e.MO.BIN4,"\u2a2b":e.MO.BIN4,"\u2a2c":e.MO.BIN4,"\u2a2d":e.MO.BIN4,"\u2a2e":e.MO.BIN4,"\u2a2f":e.MO.BIN4,"\u2a30":e.MO.BIN4,"\u2a31":e.MO.BIN4,"\u2a32":e.MO.BIN4,"\u2a33":e.MO.BIN4,"\u2a34":e.MO.BIN4,"\u2a35":e.MO.BIN4,"\u2a36":e.MO.BIN4,"\u2a37":e.MO.BIN4,"\u2a38":e.MO.BIN4,"\u2a39":e.MO.BIN4,"\u2a3a":e.MO.BIN4,"\u2a3b":e.MO.BIN4,"\u2a3c":e.MO.BIN4,"\u2a3d":e.MO.BIN4,"\u2a3e":e.MO.BIN4,"\u2a3f":e.MO.BIN4,"\u2a40":e.MO.BIN4,"\u2a41":e.MO.BIN4,"\u2a42":e.MO.BIN4,"\u2a43":e.MO.BIN4,"\u2a44":e.MO.BIN4,"\u2a45":e.MO.BIN4,"\u2a46":e.MO.BIN4,"\u2a47":e.MO.BIN4,"\u2a48":e.MO.BIN4,"\u2a49":e.MO.BIN4,"\u2a4a":e.MO.BIN4,"\u2a4b":e.MO.BIN4,"\u2a4c":e.MO.BIN4,"\u2a4d":e.MO.BIN4,"\u2a4e":e.MO.BIN4,"\u2a4f":e.MO.BIN4,"\u2a50":e.MO.BIN4,"\u2a51":e.MO.BIN4,"\u2a52":e.MO.BIN4,"\u2a53":e.MO.BIN4,"\u2a54":e.MO.BIN4,"\u2a55":e.MO.BIN4,"\u2a56":e.MO.BIN4,"\u2a57":e.MO.BIN4,"\u2a58":e.MO.BIN4,"\u2a59":e.MO.REL,"\u2a5a":e.MO.BIN4,"\u2a5b":e.MO.BIN4,"\u2a5c":e.MO.BIN4,"\u2a5d":e.MO.BIN4,"\u2a5e":e.MO.BIN4,"\u2a5f":e.MO.BIN4,"\u2a60":e.MO.BIN4,"\u2a61":e.MO.BIN4,"\u2a62":e.MO.BIN4,"\u2a63":e.MO.BIN4,"\u2a64":e.MO.BIN4,"\u2a65":e.MO.BIN4,"\u2a66":e.MO.REL,"\u2a67":e.MO.REL,"\u2a68":e.MO.REL,"\u2a69":e.MO.REL,"\u2a6a":e.MO.REL,"\u2a6b":e.MO.REL,"\u2a6c":e.MO.REL,"\u2a6d":e.MO.REL,"\u2a6e":e.MO.REL,"\u2a6f":e.MO.REL,"\u2a70":e.MO.REL,"\u2a71":e.MO.BIN4,"\u2a72":e.MO.BIN4,"\u2a73":e.MO.REL,"\u2a74":e.MO.REL,"\u2a75":e.MO.REL,"\u2a76":e.MO.REL,"\u2a77":e.MO.REL,"\u2a78":e.MO.REL,"\u2a79":e.MO.REL,"\u2a7a":e.MO.REL,"\u2a7b":e.MO.REL,"\u2a7c":e.MO.REL,"\u2a7d":e.MO.REL,"\u2a7d\u0338":e.MO.REL,"\u2a7e":e.MO.REL,"\u2a7e\u0338":e.MO.REL,"\u2a7f":e.MO.REL,"\u2a80":e.MO.REL,"\u2a81":e.MO.REL,"\u2a82":e.MO.REL,"\u2a83":e.MO.REL,"\u2a84":e.MO.REL,"\u2a85":e.MO.REL,"\u2a86":e.MO.REL,"\u2a87":e.MO.REL,"\u2a88":e.MO.REL,"\u2a89":e.MO.REL,"\u2a8a":e.MO.REL,"\u2a8b":e.MO.REL,"\u2a8c":e.MO.REL,"\u2a8d":e.MO.REL,"\u2a8e":e.MO.REL,"\u2a8f":e.MO.REL,"\u2a90":e.MO.REL,"\u2a91":e.MO.REL,"\u2a92":e.MO.REL,"\u2a93":e.MO.REL,"\u2a94":e.MO.REL,"\u2a95":e.MO.REL,"\u2a96":e.MO.REL,"\u2a97":e.MO.REL,"\u2a98":e.MO.REL,"\u2a99":e.MO.REL,"\u2a9a":e.MO.REL,"\u2a9b":e.MO.REL,"\u2a9c":e.MO.REL,"\u2a9d":e.MO.REL,"\u2a9e":e.MO.REL,"\u2a9f":e.MO.REL,"\u2aa0":e.MO.REL,"\u2aa1":e.MO.REL,"\u2aa1\u0338":e.MO.REL,"\u2aa2":e.MO.REL,"\u2aa2\u0338":e.MO.REL,"\u2aa3":e.MO.REL,"\u2aa4":e.MO.REL,"\u2aa5":e.MO.REL,"\u2aa6":e.MO.REL,"\u2aa7":e.MO.REL,"\u2aa8":e.MO.REL,"\u2aa9":e.MO.REL,"\u2aaa":e.MO.REL,"\u2aab":e.MO.REL,"\u2aac":e.MO.REL,"\u2aad":e.MO.REL,"\u2aae":e.MO.REL,"\u2aaf":e.MO.REL,"\u2aaf\u0338":e.MO.REL,"\u2ab0":e.MO.REL,"\u2ab0\u0338":e.MO.REL,"\u2ab1":e.MO.REL,"\u2ab2":e.MO.REL,"\u2ab3":e.MO.REL,"\u2ab4":e.MO.REL,"\u2ab5":e.MO.REL,"\u2ab6":e.MO.REL,"\u2ab7":e.MO.REL,"\u2ab8":e.MO.REL,"\u2ab9":e.MO.REL,"\u2aba":e.MO.REL,"\u2abb":e.MO.REL,"\u2abc":e.MO.REL,"\u2abd":e.MO.REL,"\u2abe":e.MO.REL,"\u2abf":e.MO.REL,"\u2ac0":e.MO.REL,"\u2ac1":e.MO.REL,"\u2ac2":e.MO.REL,"\u2ac3":e.MO.REL,"\u2ac4":e.MO.REL,"\u2ac5":e.MO.REL,"\u2ac6":e.MO.REL,"\u2ac7":e.MO.REL,"\u2ac8":e.MO.REL,"\u2ac9":e.MO.REL,"\u2aca":e.MO.REL,"\u2acb":e.MO.REL,"\u2acc":e.MO.REL,"\u2acd":e.MO.REL,"\u2ace":e.MO.REL,"\u2acf":e.MO.REL,"\u2ad0":e.MO.REL,"\u2ad1":e.MO.REL,"\u2ad2":e.MO.REL,"\u2ad3":e.MO.REL,"\u2ad4":e.MO.REL,"\u2ad5":e.MO.REL,"\u2ad6":e.MO.REL,"\u2ad7":e.MO.REL,"\u2ad8":e.MO.REL,"\u2ad9":e.MO.REL,"\u2ada":e.MO.REL,"\u2adb":e.MO.REL,"\u2add":e.MO.REL,"\u2add\u0338":e.MO.REL,"\u2ade":e.MO.REL,"\u2adf":e.MO.REL,"\u2ae0":e.MO.REL,"\u2ae1":e.MO.REL,"\u2ae2":e.MO.REL,"\u2ae3":e.MO.REL,"\u2ae4":e.MO.REL,"\u2ae5":e.MO.REL,"\u2ae6":e.MO.REL,"\u2ae7":e.MO.REL,"\u2ae8":e.MO.REL,"\u2ae9":e.MO.REL,"\u2aea":e.MO.REL,"\u2aeb":e.MO.REL,"\u2aec":e.MO.REL,"\u2aed":e.MO.REL,"\u2aee":e.MO.REL,"\u2aef":e.MO.REL,"\u2af0":e.MO.REL,"\u2af1":e.MO.REL,"\u2af2":e.MO.REL,"\u2af3":e.MO.REL,"\u2af4":e.MO.BIN4,"\u2af5":e.MO.BIN4,"\u2af6":e.MO.BIN4,"\u2af7":e.MO.REL,"\u2af8":e.MO.REL,"\u2af9":e.MO.REL,"\u2afa":e.MO.REL,"\u2afb":e.MO.BIN4,"\u2afd":e.MO.BIN4,"\u2afe":e.MO.BIN3,"\u2b45":e.MO.RELSTRETCH,"\u2b46":e.MO.RELSTRETCH,"\u3008":e.MO.OPEN,"\u3009":e.MO.CLOSE,"\ufe37":e.MO.WIDEACCENT,"\ufe38":e.MO.WIDEACCENT}},e.OPTABLE.infix["^"]=e.MO.WIDEREL,e.OPTABLE.infix._=e.MO.WIDEREL,e.OPTABLE.infix["\u2adc"]=e.MO.REL},9259:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],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 n,Q,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o};Object.defineProperty(e,"__esModule",{value:!0}),e.SerializedMmlVisitor=e.toEntity=e.DATAMJX=void 0;var i=r(6325),s=r(9007),a=r(450);e.DATAMJX="data-mjx-";e.toEntity=function(t){return""+t.codePointAt(0).toString(16).toUpperCase()+";"};var l=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return Q(r,t),r.prototype.visitTree=function(t){return this.visitNode(t,"")},r.prototype.visitTextNode=function(t,e){return this.quoteHTML(t.getText())},r.prototype.visitXMLNode=function(t,e){return e+t.getSerializedXML()},r.prototype.visitInferredMrowNode=function(t,e){var r,n,Q=[];try{for(var o=T(t.childNodes),i=o.next();!i.done;i=o.next()){var s=i.value;Q.push(this.visitNode(s,e))}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return Q.join("\n")},r.prototype.visitTeXAtomNode=function(t,e){var r=this.childNodeMml(t,e+" ","\n");return e+""+(r.match(/\S/)?"\n"+r+e:"")+""},r.prototype.visitAnnotationNode=function(t,e){return e+""+this.childNodeMml(t,"","")+""},r.prototype.visitDefault=function(t,e){var r=t.kind,n=o(t.isToken||0===t.childNodes.length?["",""]:["\n",e],2),Q=n[0],T=n[1],i=this.childNodeMml(t,e+" ",Q);return e+"<"+r+this.getAttributes(t)+">"+(i.match(/\S/)?Q+i+T:"")+""+r+">"},r.prototype.childNodeMml=function(t,e,r){var n,Q,o="";try{for(var i=T(t.childNodes),s=i.next();!s.done;s=i.next()){var a=s.value;o+=this.visitNode(a,e)+r}}catch(t){n={error:t}}finally{try{s&&!s.done&&(Q=i.return)&&Q.call(i)}finally{if(n)throw n.error}}return o},r.prototype.getAttributes=function(t){var e,r,n=[],Q=this.constructor.defaultAttributes[t.kind]||{},o=Object.assign({},Q,this.getDataAttributes(t),t.attributes.getAllAttributes()),i=this.constructor.variants;o.hasOwnProperty("mathvariant")&&i.hasOwnProperty(o.mathvariant)&&(o.mathvariant=i[o.mathvariant]);try{for(var s=T(Object.keys(o)),a=s.next();!a.done;a=s.next()){var l=a.value,c=String(o[l]);void 0!==c&&n.push(l+'="'+this.quoteHTML(c)+'"')}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return n.length?" "+n.join(" "):""},r.prototype.getDataAttributes=function(t){var e={},r=t.attributes.getExplicit("mathvariant"),n=this.constructor.variants;r&&n.hasOwnProperty(r)&&this.setDataAttribute(e,"variant",r),t.getProperty("variantForm")&&this.setDataAttribute(e,"alternate","1"),t.getProperty("pseudoscript")&&this.setDataAttribute(e,"pseudoscript","true"),!1===t.getProperty("autoOP")&&this.setDataAttribute(e,"auto-op","false");var Q=t.getProperty("scriptalign");Q&&this.setDataAttribute(e,"script-align",Q);var T=t.getProperty("texClass");if(void 0!==T){var o=!0;if(T===s.TEXCLASS.OP&&t.isKind("mi")){var i=t.getText();o=!(i.length>1&&i.match(a.MmlMi.operatorName))}o&&this.setDataAttribute(e,"texclass",T<0?"NONE":s.TEXCLASSNAMES[T])}return t.getProperty("scriptlevel")&&!1===t.getProperty("useHeight")&&this.setDataAttribute(e,"smallmatrix","true"),e},r.prototype.setDataAttribute=function(t,r,n){t[e.DATAMJX+r]=n},r.prototype.quoteHTML=function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/\"/g,""").replace(/[\uD800-\uDBFF]./g,e.toEntity).replace(/[\u0080-\uD7FF\uE000-\uFFFF]/g,e.toEntity)},r.variants={"-tex-calligraphic":"script","-tex-bold-calligraphic":"bold-script","-tex-oldstyle":"normal","-tex-bold-oldstyle":"bold","-tex-mathit":"italic"},r.defaultAttributes={math:{xmlns:"http://www.w3.org/1998/Math/MathML"}},r}(i.MmlVisitor);e.SerializedMmlVisitor=l},2975:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractOutputJax=void 0;var n=r(7233),Q=r(7525),T=function(){function t(t){void 0===t&&(t={}),this.adaptor=null;var e=this.constructor;this.options=(0,n.userOptions)((0,n.defaultOptions)({},e.OPTIONS),t),this.postFilters=new Q.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.initialize=function(){},t.prototype.reset=function(){for(var t=[],e=0;e=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,Q,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o},Q=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,Q=0,T=e.length;Q=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEmptyNode=e.AbstractNode=void 0;var o=function(){function t(t,e,r){var n,Q;void 0===e&&(e={}),void 0===r&&(r=[]),this.factory=t,this.parent=null,this.properties={},this.childNodes=[];try{for(var o=T(Object.keys(e)),i=o.next();!i.done;i=o.next()){var s=i.value;this.setProperty(s,e[s])}}catch(t){n={error:t}}finally{try{i&&!i.done&&(Q=o.return)&&Q.call(o)}finally{if(n)throw n.error}}r.length&&this.setChildren(r)}return Object.defineProperty(t.prototype,"kind",{get:function(){return"unknown"},enumerable:!1,configurable:!0}),t.prototype.setProperty=function(t,e){this.properties[t]=e},t.prototype.getProperty=function(t){return this.properties[t]},t.prototype.getPropertyNames=function(){return Object.keys(this.properties)},t.prototype.getAllProperties=function(){return this.properties},t.prototype.removeProperty=function(){for(var t,e,r=[],n=0;n=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Q=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,Q,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o},T=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,Q=0,T=e.length;Q0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,Q=0,T=e.length;Q0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o},i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLDocument=void 0;var s=r(5722),a=r(7233),l=r(3363),c=r(3335),u=r(5138),p=r(4474),h=function(t){function e(e,r,n){var Q=this,T=o((0,a.separateOptions)(n,u.HTMLDomStrings.OPTIONS),2),i=T[0],s=T[1];return(Q=t.call(this,e,r,i)||this).domStrings=Q.options.DomStrings||new u.HTMLDomStrings(s),Q.domStrings.adaptor=r,Q.styles=[],Q}return Q(e,t),e.prototype.findPosition=function(t,e,r,n){var Q,T,s=this.adaptor;try{for(var a=i(n[t]),l=a.next();!l.done;l=a.next()){var c=l.value,u=o(c,2),p=u[0],h=u[1];if(e<=h&&"#text"===s.kind(p))return{node:p,n:Math.max(e,0),delim:r};e-=h}}catch(t){Q={error:t}}finally{try{l&&!l.done&&(T=a.return)&&T.call(a)}finally{if(Q)throw Q.error}}return{node:null,n:0,delim:r}},e.prototype.mathItem=function(t,e,r){var n=t.math,Q=this.findPosition(t.n,t.start.n,t.open,r),T=this.findPosition(t.n,t.end.n,t.close,r);return new this.options.MathItem(n,e,t.display,Q,T)},e.prototype.findMath=function(t){var e,r,n,Q,T,s,l,c,u;if(!this.processed.isSet("findMath")){this.adaptor.document=this.document,t=(0,a.userOptions)({elements:this.options.elements||[this.adaptor.body(this.document)]},t);try{for(var p=i(this.adaptor.getElements(t.elements,this.document)),h=p.next();!h.done;h=p.next()){var d=h.value,f=o([null,null],2),L=f[0],m=f[1];try{for(var y=(n=void 0,i(this.inputJax)),H=y.next();!H.done;H=y.next()){var g=H.value,b=new this.options.MathList;if(g.processStrings){null===L&&(L=(T=o(this.domStrings.find(d),2))[0],m=T[1]);try{for(var v=(s=void 0,i(g.findMath(L))),M=v.next();!M.done;M=v.next()){var V=M.value;b.push(this.mathItem(V,g,m))}}catch(t){s={error:t}}finally{try{M&&!M.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}}else try{for(var _=(c=void 0,i(g.findMath(d))),O=_.next();!O.done;O=_.next()){V=O.value;var S=new this.options.MathItem(V.math,g,V.display,V.start,V.end);b.push(S)}}catch(t){c={error:t}}finally{try{O&&!O.done&&(u=_.return)&&u.call(_)}finally{if(c)throw c.error}}this.math.merge(b)}}catch(t){n={error:t}}finally{try{H&&!H.done&&(Q=y.return)&&Q.call(y)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(e)throw e.error}}this.processed.set("findMath")}return this},e.prototype.updateDocument=function(){return this.processed.isSet("updateDocument")||(this.addPageElements(),this.addStyleSheet(),t.prototype.updateDocument.call(this),this.processed.set("updateDocument")),this},e.prototype.addPageElements=function(){var t=this.adaptor.body(this.document),e=this.documentPageElements();e&&this.adaptor.append(t,e)},e.prototype.addStyleSheet=function(){var t=this.documentStyleSheet(),e=this.adaptor;if(t&&!e.parent(t)){var r=e.head(this.document),n=this.findSheet(r,e.getAttribute(t,"id"));n?e.replace(t,n):e.append(r,t)}},e.prototype.findSheet=function(t,e){var r,n;if(e)try{for(var Q=i(this.adaptor.tags(t,"style")),T=Q.next();!T.done;T=Q.next()){var o=T.value;if(this.adaptor.getAttribute(o,"id")===e)return o}}catch(t){r={error:t}}finally{try{T&&!T.done&&(n=Q.return)&&n.call(Q)}finally{if(r)throw r.error}}return null},e.prototype.removeFromDocument=function(t){var e,r;if(void 0===t&&(t=!1),this.processed.isSet("updateDocument"))try{for(var n=i(this.math),Q=n.next();!Q.done;Q=n.next()){var T=Q.value;T.state()>=p.STATE.INSERTED&&T.state(p.STATE.TYPESET,t)}}catch(t){e={error:t}}finally{try{Q&&!Q.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return this.processed.clear("updateDocument"),this},e.prototype.documentStyleSheet=function(){return this.outputJax.styleSheet(this)},e.prototype.documentPageElements=function(){return this.outputJax.pageElements(this)},e.prototype.addStyles=function(t){this.styles.push(t)},e.prototype.getStyles=function(){return this.styles},e.KIND="HTML",e.OPTIONS=T(T({},s.AbstractMathDocument.OPTIONS),{renderActions:(0,a.expandable)(T(T({},s.AbstractMathDocument.OPTIONS.renderActions),{styles:[p.STATE.INSERTED+1,"","updateStyleSheet",!1]})),MathList:c.HTMLMathList,MathItem:l.HTMLMathItem,DomStrings:null}),e}(s.AbstractMathDocument);e.HTMLDocument=h},5138:function(t,e,r){var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,Q,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o};Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLDomStrings=void 0;var Q=r(7233),T=function(){function t(t){void 0===t&&(t=null);var e=this.constructor;this.options=(0,Q.userOptions)((0,Q.defaultOptions)({},e.OPTIONS),t),this.init(),this.getPatterns()}return t.prototype.init=function(){this.strings=[],this.string="",this.snodes=[],this.nodes=[],this.stack=[]},t.prototype.getPatterns=function(){var t=(0,Q.makeArray)(this.options.skipHtmlTags),e=(0,Q.makeArray)(this.options.ignoreHtmlClass),r=(0,Q.makeArray)(this.options.processHtmlClass);this.skipHtmlTags=new RegExp("^(?:"+t.join("|")+")$","i"),this.ignoreHtmlClass=new RegExp("(?:^| )(?:"+e.join("|")+")(?: |$)"),this.processHtmlClass=new RegExp("(?:^| )(?:"+r+")(?: |$)")},t.prototype.pushString=function(){this.string.match(/\S/)&&(this.strings.push(this.string),this.nodes.push(this.snodes)),this.string="",this.snodes=[]},t.prototype.extendString=function(t,e){this.snodes.push([t,e.length]),this.string+=e},t.prototype.handleText=function(t,e){return e||this.extendString(t,this.adaptor.value(t)),this.adaptor.next(t)},t.prototype.handleTag=function(t,e){if(!e){var r=this.options.includeHtmlTags[this.adaptor.kind(t)];this.extendString(t,r)}return this.adaptor.next(t)},t.prototype.handleContainer=function(t,e){this.pushString();var r=this.adaptor.getAttribute(t,"class")||"",n=this.adaptor.kind(t)||"",Q=this.processHtmlClass.exec(r),T=t;return!this.adaptor.firstChild(t)||this.adaptor.getAttribute(t,"data-MJX")||!Q&&this.skipHtmlTags.exec(n)?T=this.adaptor.next(t):(this.adaptor.next(t)&&this.stack.push([this.adaptor.next(t),e]),T=this.adaptor.firstChild(t),e=(e||this.ignoreHtmlClass.exec(r))&&!Q),[T,e]},t.prototype.handleOther=function(t,e){return this.pushString(),this.adaptor.next(t)},t.prototype.find=function(t){var e,r;this.init();for(var Q=this.adaptor.next(t),T=!1,o=this.options.includeHtmlTags;t&&t!==Q;){var i=this.adaptor.kind(t);"#text"===i?t=this.handleText(t,T):o.hasOwnProperty(i)?t=this.handleTag(t,T):i?(t=(e=n(this.handleContainer(t,T),2))[0],T=e[1]):t=this.handleOther(t,T),!t&&this.stack.length&&(this.pushString(),t=(r=n(this.stack.pop(),2))[0],T=r[1])}this.pushString();var s=[this.strings,this.nodes];return this.init(),s},t.OPTIONS={skipHtmlTags:["script","noscript","style","textarea","pre","code","annotation","annotation-xml"],includeHtmlTags:{br:"\n",wbr:"","#comment":""},ignoreHtmlClass:"mathjax_ignore",processHtmlClass:"mathjax_process"},t}();e.HTMLDomStrings=T},3726:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLHandler=void 0;var T=r(3670),o=r(3683),i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.documentClass=o.HTMLDocument,e}return Q(e,t),e.prototype.handlesDocument=function(t){var e=this.adaptor;if("string"==typeof t)try{t=e.parse(t,"text/html")}catch(t){}return t instanceof e.window.Document||t instanceof e.window.HTMLElement||t instanceof e.window.DocumentFragment},e.prototype.create=function(e,r){var n=this.adaptor;if("string"==typeof e)e=n.parse(e,"text/html");else if(e instanceof n.window.HTMLElement||e instanceof n.window.DocumentFragment){var Q=e;e=n.parse("","text/html"),n.append(n.body(e),Q)}return t.prototype.create.call(this,e,r)},e}(T.AbstractHandler);e.HTMLHandler=i},3363:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLMathItem=void 0;var T=r(4474),o=function(t){function e(e,r,n,Q,T){return void 0===n&&(n=!0),void 0===Q&&(Q={node:null,n:0,delim:""}),void 0===T&&(T={node:null,n:0,delim:""}),t.call(this,e,r,n,Q,T)||this}return Q(e,t),Object.defineProperty(e.prototype,"adaptor",{get:function(){return this.inputJax.adaptor},enumerable:!1,configurable:!0}),e.prototype.updateDocument=function(t){if(this.state()=T.STATE.TYPESET){var e=this.adaptor,r=this.start.node,n=e.text("");if(t){var Q=this.start.delim+this.math+this.end.delim;if(this.inputJax.processStrings)n=e.text(Q);else{var o=e.parse(Q,"text/html");n=e.firstChild(e.body(o))}}e.parent(r)&&e.replace(n,r),this.start.node=this.end.node=n,this.start.n=this.end.n=0}},e}(T.AbstractMathItem);e.HTMLMathItem=o},3335:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLMathList=void 0;var T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),e}(r(9e3).AbstractMathList);e.HTMLMathList=T},2892:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),T=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,Q,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o};Object.defineProperty(e,"__esModule",{value:!0}),e.MathML=void 0;var o=r(9206),i=r(7233),s=r(7525),a=r(625),l=r(2769),c=function(t){function e(e){void 0===e&&(e={});var r=this,n=T((0,i.separateOptions)(e,a.FindMathML.OPTIONS,l.MathMLCompile.OPTIONS),3),Q=n[0],o=n[1],c=n[2];return(r=t.call(this,Q)||this).findMathML=r.options.FindMathML||new a.FindMathML(o),r.mathml=r.options.MathMLCompile||new l.MathMLCompile(c),r.mmlFilters=new s.FunctionList,r}return Q(e,t),e.prototype.setAdaptor=function(e){t.prototype.setAdaptor.call(this,e),this.findMathML.adaptor=e,this.mathml.adaptor=e},e.prototype.setMmlFactory=function(e){t.prototype.setMmlFactory.call(this,e),this.mathml.setMmlFactory(e)},Object.defineProperty(e.prototype,"processStrings",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.compile=function(t,e){var r=t.start.node;if(!r||!t.end.node||this.options.forceReparse||"#text"===this.adaptor.kind(r)){var n=this.executeFilters(this.preFilters,t,e,(t.math||"").trim()),Q=this.checkForErrors(this.adaptor.parse(n,"text/"+this.options.parseAs)),T=this.adaptor.body(Q);1!==this.adaptor.childNodes(T).length&&this.error("MathML must consist of a single element"),r=this.adaptor.remove(this.adaptor.firstChild(T)),"math"!==this.adaptor.kind(r).replace(/^[a-z]+:/,"")&&this.error("MathML must be formed by a